@flowcore/data-pump 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.6.0](https://github.com/flowcore-io/data-pump/compare/v0.5.0...v0.6.0) (2025-04-02)
4
+
5
+
6
+ ### Features
7
+
8
+ * **data-source:** :sparkles: add noTranslation option to FlowcoreDataPump and FlowcoreDataSource ([692b79e](https://github.com/flowcore-io/data-pump/commit/692b79e2f1b07b1300a7ab016ec39efb23dc578b))
9
+
3
10
  ## [0.5.0](https://github.com/flowcore-io/data-pump/compare/v0.4.2...v0.5.0) (2025-04-02)
4
11
 
5
12
 
@@ -27,6 +27,7 @@ export interface FlowcoreDataPumpOptions {
27
27
  logger?: FlowcoreLogger;
28
28
  stopAt?: Date;
29
29
  baseUrlOverride?: string;
30
+ noTranslation?: boolean;
30
31
  }
31
32
  export declare class FlowcoreDataPump {
32
33
  private readonly dataSource;
@@ -1 +1 @@
1
- {"version":3,"file":"data-pump.d.ts","sourceRoot":"","sources":["../../src/data-pump/data-pump.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAA;AAMnF,OAAO,KAAK,EACV,oBAAoB,EACpB,0BAA0B,EAC1B,yBAAyB,EACzB,qBAAqB,EACrB,4BAA4B,EAC5B,cAAc,EACf,MAAM,YAAY,CAAA;AAEnB,UAAU,mCAAmC;IAC3C,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB;AAED,UAAU,wCAAwC;IAChD,IAAI,EAAE,WAAW,CAAA;CAClB;AAED,UAAU,qCAAqC;IAC7C,IAAI,EAAE,QAAQ,CAAA;IACd;;OAEG;IACH,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,KAAK,+BAA+B,GAChC,mCAAmC,GACnC,wCAAwC,GAC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EAAE;YA4BtB,MAAM;YAiDN,WAAW;IAiBzB,OAAO,CAAC,mBAAmB;IA4D3B,OAAO,CAAC,iBAAiB;IA0CzB,OAAO,CAAC,YAAY,CAAC,CAAY;YACnB,aAAa;IAO3B,OAAO,CAAC,qBAAqB,CAAC,CAAY;YAC5B,sBAAsB;IAOpC,OAAO,CAAC,iBAAiB,CAAC,CAAY;YACxB,kBAAkB;CAWjC"}
@@ -105,6 +105,7 @@ export class FlowcoreDataPump {
105
105
  auth: options.auth,
106
106
  dataSource: options.dataSource,
107
107
  baseUrlOverride: options.baseUrlOverride,
108
+ noTranslation: options.noTranslation,
108
109
  });
109
110
  const notifier = new FlowcoreNotifier({
110
111
  auth: options.auth,
@@ -3,6 +3,7 @@ export interface FlowcoreDataSourceOptions {
3
3
  auth: FlowcoreDataPumpAuth;
4
4
  dataSource: FlowcoreDataPumpDataSource;
5
5
  baseUrlOverride?: string;
6
+ noTranslation?: boolean;
6
7
  }
7
8
  export declare class FlowcoreDataSource {
8
9
  private readonly options;
@@ -1 +1 @@
1
- {"version":3,"file":"data-source.d.ts","sourceRoot":"","sources":["../../src/data-pump/data-source.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AACzG,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,oBAAoB,CAAA;IAC1B,UAAU,EAAE,0BAA0B,CAAA;IACtC,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAED,qBAAa,kBAAkB;IAQjB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAPpC,OAAO,CAAC,cAAc,CAAgB;IACtC,OAAO,CAAC,QAAQ,CAAC,CAAQ;IACzB,OAAO,CAAC,UAAU,CAAC,CAAQ;IAC3B,OAAO,CAAC,UAAU,CAAC,CAAQ;IAC3B,OAAO,CAAC,YAAY,CAAC,CAAU;IAC/B,OAAO,CAAC,WAAW,CAAC,CAAU;gBAED,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AU,aAEpB;IAEY,WAAW;IAiBX,aAAa;IAkBb,aAAa;IAkBb,eAAe;IAyBf,cAAc,CAAC,KAAK,UAAQ;IAuB5B,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAa7D,oBAAoB,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,UAAQ,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAiBnF,SAAS,CAAC,IAAI,EAAE,qBAAqB,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM;;;;;;;;;;;;;;;CAcvF"}
@@ -62,54 +62,74 @@ export class FlowcoreDataSource {
62
62
  if (this.tenantId) {
63
63
  return this.tenantId;
64
64
  }
65
- const command = new TenantTranslateNameToIdCommand({
66
- tenant: this.options.dataSource.tenant,
67
- });
68
- const result = await this.flowcoreClient.execute(command);
69
- this.tenantId = result.id;
65
+ if (this.options.noTranslation) {
66
+ this.tenantId = this.options.dataSource.tenant;
67
+ }
68
+ else {
69
+ const command = new TenantTranslateNameToIdCommand({
70
+ tenant: this.options.dataSource.tenant,
71
+ });
72
+ const result = await this.flowcoreClient.execute(command);
73
+ this.tenantId = result.id;
74
+ }
70
75
  return this.tenantId;
71
76
  }
72
77
  async getDataCoreId() {
73
78
  if (this.dataCoreId) {
74
79
  return this.dataCoreId;
75
80
  }
76
- const command = new DataCoreFetchCommand({
77
- tenant: this.options.dataSource.tenant,
78
- dataCore: this.options.dataSource.dataCore,
79
- });
80
- const result = await this.flowcoreClient.execute(command);
81
- this.dataCoreId = result.id;
81
+ if (this.options.noTranslation) {
82
+ this.dataCoreId = this.options.dataSource.dataCore;
83
+ }
84
+ else {
85
+ const command = new DataCoreFetchCommand({
86
+ tenant: this.options.dataSource.tenant,
87
+ dataCore: this.options.dataSource.dataCore,
88
+ });
89
+ const result = await this.flowcoreClient.execute(command);
90
+ this.dataCoreId = result.id;
91
+ }
82
92
  return this.dataCoreId;
83
93
  }
84
94
  async getFlowTypeId() {
85
95
  if (this.flowTypeId) {
86
96
  return this.flowTypeId;
87
97
  }
88
- const command = new FlowTypeFetchCommand({
89
- dataCoreId: await this.getDataCoreId(),
90
- flowType: this.options.dataSource.flowType,
91
- });
92
- const result = await this.flowcoreClient.execute(command);
93
- this.flowTypeId = result.id;
98
+ if (this.options.noTranslation) {
99
+ this.flowTypeId = this.options.dataSource.flowType;
100
+ }
101
+ else {
102
+ const command = new FlowTypeFetchCommand({
103
+ dataCoreId: await this.getDataCoreId(),
104
+ flowType: this.options.dataSource.flowType,
105
+ });
106
+ const result = await this.flowcoreClient.execute(command);
107
+ this.flowTypeId = result.id;
108
+ }
94
109
  return this.flowTypeId;
95
110
  }
96
111
  async getEventTypeIds() {
97
112
  if (this.eventTypeIds) {
98
113
  return this.eventTypeIds;
99
114
  }
100
- const command = new EventTypeListCommand({
101
- flowTypeId: await this.getFlowTypeId(),
102
- });
103
- const results = await this.flowcoreClient.execute(command);
104
- const eventTypeIds = [];
105
- for (const eventType of this.eventTypes) {
106
- const found = results.find((result) => result.name === eventType);
107
- if (!found) {
108
- throw new Error(`Event type ${eventType} not found`);
115
+ if (this.options.noTranslation) {
116
+ this.eventTypeIds = this.options.dataSource.eventTypes;
117
+ }
118
+ else {
119
+ const command = new EventTypeListCommand({
120
+ flowTypeId: await this.getFlowTypeId(),
121
+ });
122
+ const results = await this.flowcoreClient.execute(command);
123
+ const eventTypeIds = [];
124
+ for (const eventType of this.eventTypes) {
125
+ const found = results.find((result) => result.name === eventType);
126
+ if (!found) {
127
+ throw new Error(`Event type ${eventType} not found`);
128
+ }
129
+ eventTypeIds.push(found.id);
109
130
  }
110
- eventTypeIds.push(found.id);
131
+ this.eventTypeIds = eventTypeIds;
111
132
  }
112
- this.eventTypeIds = eventTypeIds;
113
133
  return this.eventTypeIds;
114
134
  }
115
135
  async getTimeBuckets(force = false) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowcore/data-pump",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Flowcore Data Pump",
5
5
  "homepage": "https://github.com/flowcore-io/flowcore-data-pump#readme",
6
6
  "repository": {
@@ -27,6 +27,7 @@ export interface FlowcoreDataPumpOptions {
27
27
  logger?: FlowcoreLogger;
28
28
  stopAt?: Date;
29
29
  baseUrlOverride?: string;
30
+ noTranslation?: boolean;
30
31
  }
31
32
  export declare class FlowcoreDataPump {
32
33
  private readonly dataSource;
@@ -1 +1 @@
1
- {"version":3,"file":"data-pump.d.ts","sourceRoot":"","sources":["../../src/data-pump/data-pump.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAA;AAMnF,OAAO,KAAK,EACV,oBAAoB,EACpB,0BAA0B,EAC1B,yBAAyB,EACzB,qBAAqB,EACrB,4BAA4B,EAC5B,cAAc,EACf,MAAM,YAAY,CAAA;AAEnB,UAAU,mCAAmC;IAC3C,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB;AAED,UAAU,wCAAwC;IAChD,IAAI,EAAE,WAAW,CAAA;CAClB;AAED,UAAU,qCAAqC;IAC7C,IAAI,EAAE,QAAQ,CAAA;IACd;;OAEG;IACH,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,KAAK,+BAA+B,GAChC,mCAAmC,GACnC,wCAAwC,GACxC,qCAAqC,CAAA;AAEzC,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,oBAAoB,CAAA;IAC1B,UAAU,EAAE,0BAA0B,CAAA;IACtC,YAAY,EAAE,4BAA4B,CAAA;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,SAAS,CAAC,EAAE,yBAAyB,CAAA;IACrC,QAAQ,CAAC,EAAE,+BAA+B,CAAA;IAC1C,MA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ride: options.baseUrlOverride,
111
+ noTranslation: options.noTranslation,
111
112
  });
112
113
  const notifier = new notifier_js_1.FlowcoreNotifier({
113
114
  auth: options.auth,
@@ -3,6 +3,7 @@ export interface FlowcoreDataSourceOptions {
3
3
  auth: FlowcoreDataPumpAuth;
4
4
  dataSource: FlowcoreDataPumpDataSource;
5
5
  baseUrlOverride?: string;
6
+ noTranslation?: boolean;
6
7
  }
7
8
  export declare class FlowcoreDataSource {
8
9
  private readonly options;
@@ -1 +1 @@
1
- {"version":3,"file":"data-source.d.ts","sourceRoot":"","sources":["../../src/data-pump/data-source.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AACzG,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,oBAAoB,CAAA;IAC1B,UAAU,EAAE,0BAA0B,CAAA;IACtC,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAED,qBAAa,kBAAkB;IAQjB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAPpC,OAAO,CAAC,cAAc,CAAgB;IACtC,OAAO,CAAC,QAAQ,CAAC,CAAQ;IACzB,OAAO,CAAC,UAAU,CAAC,CAAQ;IAC3B,OAAO,CAAC,UAAU,CAAC,CAAQ;IAC3B,OAAO,CAAC,YAAY,CAAC,CAAU;IAC/B,OAAO,CAAC,WAAW,CAAC,CAAU;gBAED,OAAO,EAAE,yBAAyB;IAI/D,IAAW,MAAM,WAEhB;IAED,IAAW,QAAQ,WAElB;IAED,IAAW,QAAQ,WAElB;IAED,IAAW,UAAU,aAEpB;IAEY,WAAW;IAYX,aAAa;IAab,aAAa;IAcb,eAAe;IAoBf,cAAc,CAAC,KAAK,UAAQ;IAsB5B,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAa7D,oBAAoB,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,UAAQ,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AM,EAAE,SAAS,CAAC,EAAE,MAAM;;;;;;;;;;;;;;;CAcvF"}
@@ -65,54 +65,74 @@ class FlowcoreDataSource {
65
65
  if (this.tenantId) {
66
66
  return this.tenantId;
67
67
  }
68
- const command = new mod_js_1.TenantTranslateNameToIdCommand({
69
- tenant: this.options.dataSource.tenant,
70
- });
71
- const result = await this.flowcoreClient.execute(command);
72
- this.tenantId = result.id;
68
+ if (this.options.noTranslation) {
69
+ this.tenantId = this.options.dataSource.tenant;
70
+ }
71
+ else {
72
+ const command = new mod_js_1.TenantTranslateNameToIdCommand({
73
+ tenant: this.options.dataSource.tenant,
74
+ });
75
+ const result = await this.flowcoreClient.execute(command);
76
+ this.tenantId = result.id;
77
+ }
73
78
  return this.tenantId;
74
79
  }
75
80
  async getDataCoreId() {
76
81
  if (this.dataCoreId) {
77
82
  return this.dataCoreId;
78
83
  }
79
- const command = new mod_js_1.DataCoreFetchCommand({
80
- tenant: this.options.dataSource.tenant,
81
- dataCore: this.options.dataSource.dataCore,
82
- });
83
- const result = await this.flowcoreClient.execute(command);
84
- this.dataCoreId = result.id;
84
+ if (this.options.noTranslation) {
85
+ this.dataCoreId = this.options.dataSource.dataCore;
86
+ }
87
+ else {
88
+ const command = new mod_js_1.DataCoreFetchCommand({
89
+ tenant: this.options.dataSource.tenant,
90
+ dataCore: this.options.dataSource.dataCore,
91
+ });
92
+ const result = await this.flowcoreClient.execute(command);
93
+ this.dataCoreId = result.id;
94
+ }
85
95
  return this.dataCoreId;
86
96
  }
87
97
  async getFlowTypeId() {
88
98
  if (this.flowTypeId) {
89
99
  return this.flowTypeId;
90
100
  }
91
- const command = new mod_js_1.FlowTypeFetchCommand({
92
- dataCoreId: await this.getDataCoreId(),
93
- flowType: this.options.dataSource.flowType,
94
- });
95
- const result = await this.flowcoreClient.execute(command);
96
- this.flowTypeId = result.id;
101
+ if (this.options.noTranslation) {
102
+ this.flowTypeId = this.options.dataSource.flowType;
103
+ }
104
+ else {
105
+ const command = new mod_js_1.FlowTypeFetchCommand({
106
+ dataCoreId: await this.getDataCoreId(),
107
+ flowType: this.options.dataSource.flowType,
108
+ });
109
+ const result = await this.flowcoreClient.execute(command);
110
+ this.flowTypeId = result.id;
111
+ }
97
112
  return this.flowTypeId;
98
113
  }
99
114
  async getEventTypeIds() {
100
115
  if (this.eventTypeIds) {
101
116
  return this.eventTypeIds;
102
117
  }
103
- const command = new mod_js_1.EventTypeListCommand({
104
- flowTypeId: await this.getFlowTypeId(),
105
- });
106
- const results = await this.flowcoreClient.execute(command);
107
- const eventTypeIds = [];
108
- for (const eventType of this.eventTypes) {
109
- const found = results.find((result) => result.name === eventType);
110
- if (!found) {
111
- throw new Error(`Event type ${eventType} not found`);
118
+ if (this.options.noTranslation) {
119
+ this.eventTypeIds = this.options.dataSource.eventTypes;
120
+ }
121
+ else {
122
+ const command = new mod_js_1.EventTypeListCommand({
123
+ flowTypeId: await this.getFlowTypeId(),
124
+ });
125
+ const results = await this.flowcoreClient.execute(command);
126
+ const eventTypeIds = [];
127
+ for (const eventType of this.eventTypes) {
128
+ const found = results.find((result) => result.name === eventType);
129
+ if (!found) {
130
+ throw new Error(`Event type ${eventType} not found`);
131
+ }
132
+ eventTypeIds.push(found.id);
112
133
  }
113
- eventTypeIds.push(found.id);
134
+ this.eventTypeIds = eventTypeIds;
114
135
  }
115
- this.eventTypeIds = eventTypeIds;
116
136
  return this.eventTypeIds;
117
137
  }
118
138
  async getTimeBuckets(force = false) {