@owox/connectors 0.16.0-next-20251229144653 → 0.16.0-next-20251231124015

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/dist/index.cjs CHANGED
@@ -1257,6 +1257,14 @@ var FormatUtils = {
1257
1257
  (acc[key] = acc[key] || []).push(value.trim());
1258
1258
  return acc;
1259
1259
  }, {});
1260
+ },
1261
+ /**
1262
+ * Parse account IDs from a comma/semicolon separated string
1263
+ * @param {string} accountIdsString - Comma/semicolon separated list of account IDs
1264
+ * @return {Array<string>} Array of trimmed account IDs (non-empty strings)
1265
+ */
1266
+ parseAccountIds: function(accountIdsString) {
1267
+ return String(accountIdsString).split(/[,;]\s*/).filter((id) => id.trim().length > 0);
1260
1268
  }
1261
1269
  };
1262
1270
  var FileUtils = class FileUtils2 {
@@ -14346,11 +14354,11 @@ API Response: ${JSON.stringify(statusResult, null, 2)}`);
14346
14354
  description: "Your Microsoft Ads API Refresh Token",
14347
14355
  attributes: [CONFIG_ATTRIBUTES2.SECRET]
14348
14356
  },
14349
- AccountID: {
14357
+ AccountIDs: {
14350
14358
  isRequired: true,
14351
14359
  requiredType: "string",
14352
- label: "Account ID",
14353
- description: "Your Microsoft Ads Account ID"
14360
+ label: "Account ID(s)",
14361
+ description: "Your Microsoft Ads Account IDs (comma separated)"
14354
14362
  },
14355
14363
  CustomerID: {
14356
14364
  isRequired: true,
@@ -14810,13 +14818,18 @@ API Response: ${JSON.stringify(statusResult, null, 2)}`);
14810
14818
  * Processes all nodes defined in the fields configuration
14811
14819
  */
14812
14820
  async startImportProcess() {
14821
+ const accountIds = FormatUtils.parseAccountIds(this.config.AccountIDs.value);
14813
14822
  const fields = MicrosoftAdsHelper.parseFields(this.config.Fields.value);
14814
- for (const nodeName in fields) {
14815
- await this.processNode({
14816
- nodeName,
14817
- accountId: this.config.AccountID.value,
14818
- fields: fields[nodeName] || []
14819
- });
14823
+ for (const rawAccountId of accountIds) {
14824
+ const accountId = rawAccountId.trim();
14825
+ this.config.logMessage(`Starting import process for Account ID: ${accountId}`);
14826
+ for (const nodeName in fields) {
14827
+ await this.processNode({
14828
+ nodeName,
14829
+ accountId,
14830
+ fields: fields[nodeName] || []
14831
+ });
14832
+ }
14820
14833
  }
14821
14834
  }
14822
14835
  /**
package/dist/index.js CHANGED
@@ -1255,6 +1255,14 @@ var FormatUtils = {
1255
1255
  (acc[key] = acc[key] || []).push(value.trim());
1256
1256
  return acc;
1257
1257
  }, {});
1258
+ },
1259
+ /**
1260
+ * Parse account IDs from a comma/semicolon separated string
1261
+ * @param {string} accountIdsString - Comma/semicolon separated list of account IDs
1262
+ * @return {Array<string>} Array of trimmed account IDs (non-empty strings)
1263
+ */
1264
+ parseAccountIds: function(accountIdsString) {
1265
+ return String(accountIdsString).split(/[,;]\s*/).filter((id) => id.trim().length > 0);
1258
1266
  }
1259
1267
  };
1260
1268
  var FileUtils = class FileUtils2 {
@@ -14344,11 +14352,11 @@ API Response: ${JSON.stringify(statusResult, null, 2)}`);
14344
14352
  description: "Your Microsoft Ads API Refresh Token",
14345
14353
  attributes: [CONFIG_ATTRIBUTES2.SECRET]
14346
14354
  },
14347
- AccountID: {
14355
+ AccountIDs: {
14348
14356
  isRequired: true,
14349
14357
  requiredType: "string",
14350
- label: "Account ID",
14351
- description: "Your Microsoft Ads Account ID"
14358
+ label: "Account ID(s)",
14359
+ description: "Your Microsoft Ads Account IDs (comma separated)"
14352
14360
  },
14353
14361
  CustomerID: {
14354
14362
  isRequired: true,
@@ -14808,13 +14816,18 @@ API Response: ${JSON.stringify(statusResult, null, 2)}`);
14808
14816
  * Processes all nodes defined in the fields configuration
14809
14817
  */
14810
14818
  async startImportProcess() {
14819
+ const accountIds = FormatUtils.parseAccountIds(this.config.AccountIDs.value);
14811
14820
  const fields = MicrosoftAdsHelper.parseFields(this.config.Fields.value);
14812
- for (const nodeName in fields) {
14813
- await this.processNode({
14814
- nodeName,
14815
- accountId: this.config.AccountID.value,
14816
- fields: fields[nodeName] || []
14817
- });
14821
+ for (const rawAccountId of accountIds) {
14822
+ const accountId = rawAccountId.trim();
14823
+ this.config.logMessage(`Starting import process for Account ID: ${accountId}`);
14824
+ for (const nodeName in fields) {
14825
+ await this.processNode({
14826
+ nodeName,
14827
+ accountId,
14828
+ fields: fields[nodeName] || []
14829
+ });
14830
+ }
14818
14831
  }
14819
14832
  }
14820
14833
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owox/connectors",
3
- "version": "0.16.0-next-20251229144653",
3
+ "version": "0.16.0-next-20251231124015",
4
4
  "description": "Connectors and storages for different data sources",
5
5
  "license": "MIT",
6
6
  "publishConfig": {