feat(platform): add replaceable geozone data layer

This commit is contained in:
Codex
2026-07-20 21:48:27 +03:00
parent 8a7465cf0e
commit 3446f3edc2
31 changed files with 1342 additions and 128 deletions
@@ -25,7 +25,7 @@ export class NdcDataProductPublish implements INodeType {
name: 'ndcDataProductPublish',
icon: NDC_NODE_ICON,
group: ['output'],
version: 1,
version: [1, 2],
subtitle: '={{$parameter["dataProductId"]}}',
description: 'Publish canonical facts through a scoped NDC Data Product grant',
defaults: { name: 'NDC Data Product Publish' },
@@ -41,6 +41,19 @@ export class NdcDataProductPublish implements INodeType {
default: '',
required: true,
},
{
displayName: 'Publish Mode',
name: 'publishMode',
type: 'options',
options: [
{ name: 'Create or Update', value: 'upsert' },
{ name: 'Replace Complete Snapshot', value: 'replace' },
],
default: 'upsert',
required: true,
displayOptions: { show: { '@version': [2] } },
description: 'Replace commits one complete generation atomically and removes keys absent from it',
},
{
displayName: 'Batch Sequence',
name: 'sequence',
@@ -71,6 +84,9 @@ export class NdcDataProductPublish implements INodeType {
const inputItems = this.getInputData();
const dataProductId = this.getNodeParameter('dataProductId', 0) as string;
const sequence = this.getNodeParameter('sequence', 0, 0) as number;
const publishMode = this.getNode().typeVersion >= 2
? this.getNodeParameter('publishMode', 0, 'upsert') as 'upsert' | 'replace'
: 'upsert';
let body;
let encodedProductId;
try {
@@ -81,6 +97,7 @@ export class NdcDataProductPublish implements INodeType {
this.getNode().id,
dataProductId,
sequence,
publishMode,
);
encodedProductId = encodeIdentifierPath(dataProductId, 'dataProductId');
} catch (error) {