@paymentsdb/sync-engine 0.0.6 → 0.0.8

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.
@@ -3,11 +3,11 @@ import {
3
3
  StripeSync,
4
4
  createStripeWebSocketClient,
5
5
  runMigrations
6
- } from "./chunk-2KB2ISYF.js";
6
+ } from "./chunk-SY3Y6EPM.js";
7
7
  import {
8
8
  install,
9
9
  uninstall
10
- } from "./chunk-GXIMCH5Y.js";
10
+ } from "./chunk-FNRHJKY2.js";
11
11
 
12
12
  // src/cli/config.ts
13
13
  import dotenv from "dotenv";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  package_default
3
- } from "./chunk-E6BGC7CB.js";
3
+ } from "./chunk-XWQBYFVJ.js";
4
4
 
5
5
  // src/supabase/supabase.ts
6
6
  import { SupabaseManagementAPI } from "supabase-management-js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  package_default
3
- } from "./chunk-E6BGC7CB.js";
3
+ } from "./chunk-XWQBYFVJ.js";
4
4
 
5
5
  // src/stripeSync.ts
6
6
  import Stripe3 from "stripe";
@@ -45213,7 +45213,7 @@ var StripeSync = class {
45213
45213
  subscription: {
45214
45214
  order: 5,
45215
45215
  // Depends on customer, price
45216
- listFn: (p) => this.stripe.subscriptions.list(p),
45216
+ listFn: (p) => this.stripe.subscriptions.list({ ...p, status: "all" }),
45217
45217
  upsertFn: (items, id, bf) => this.upsertSubscriptions(items, id, bf),
45218
45218
  supportsCreatedFilter: true
45219
45219
  },
@@ -46098,6 +46098,10 @@ ${message}`;
46098
46098
  if (object === "payment_method") {
46099
46099
  return this.fetchOnePagePaymentMethods(accountId, resourceName, runStartedAt, cursor, pageCursor, params);
46100
46100
  }
46101
+ if (object === "tax_id") {
46102
+ await this.postgresClient.completeObjectSync(accountId, runStartedAt, resourceName);
46103
+ return { processed: 0, hasMore: false, runStartedAt };
46104
+ }
46101
46105
  if (object === "_event_catchup") {
46102
46106
  return this.fetchOnePageEventCatchup(accountId, resourceName, runStartedAt, cursor, pageCursor);
46103
46107
  }
@@ -46455,9 +46459,11 @@ ${message}`;
46455
46459
  ]);
46456
46460
  let processed = 0;
46457
46461
  let skipped = 0;
46462
+ const skipObjectTypes = /* @__PURE__ */ new Set(["tax_id"]);
46458
46463
  for (const [, event] of entityMap) {
46459
46464
  const obj = event.data.object;
46460
46465
  const eventType = event.type;
46466
+ if (skipObjectTypes.has(obj.object)) continue;
46461
46467
  try {
46462
46468
  if (!hardDeleteEventTypes.has(eventType)) {
46463
46469
  const tableName = eventObjectTypeToTable(obj.object);
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var package_default = {
3
3
  name: "@paymentsdb/sync-engine",
4
- version: "0.0.5",
4
+ version: "0.0.8",
5
5
  private: false,
6
6
  description: "Stripe Sync Engine to sync Stripe data to Postgres",
7
7
  type: "module",
@@ -33,7 +33,7 @@ var import_commander = require("commander");
33
33
  // package.json
34
34
  var package_default = {
35
35
  name: "@paymentsdb/sync-engine",
36
- version: "0.0.5",
36
+ version: "0.0.8",
37
37
  private: false,
38
38
  description: "Stripe Sync Engine to sync Stripe data to Postgres",
39
39
  type: "module",
@@ -45404,7 +45404,7 @@ var StripeSync = class {
45404
45404
  subscription: {
45405
45405
  order: 5,
45406
45406
  // Depends on customer, price
45407
- listFn: (p) => this.stripe.subscriptions.list(p),
45407
+ listFn: (p) => this.stripe.subscriptions.list({ ...p, status: "all" }),
45408
45408
  upsertFn: (items, id, bf) => this.upsertSubscriptions(items, id, bf),
45409
45409
  supportsCreatedFilter: true
45410
45410
  },
@@ -46289,6 +46289,10 @@ ${message}`;
46289
46289
  if (object === "payment_method") {
46290
46290
  return this.fetchOnePagePaymentMethods(accountId, resourceName, runStartedAt, cursor, pageCursor, params);
46291
46291
  }
46292
+ if (object === "tax_id") {
46293
+ await this.postgresClient.completeObjectSync(accountId, runStartedAt, resourceName);
46294
+ return { processed: 0, hasMore: false, runStartedAt };
46295
+ }
46292
46296
  if (object === "_event_catchup") {
46293
46297
  return this.fetchOnePageEventCatchup(accountId, resourceName, runStartedAt, cursor, pageCursor);
46294
46298
  }
@@ -46646,9 +46650,11 @@ ${message}`;
46646
46650
  ]);
46647
46651
  let processed = 0;
46648
46652
  let skipped = 0;
46653
+ const skipObjectTypes = /* @__PURE__ */ new Set(["tax_id"]);
46649
46654
  for (const [, event] of entityMap) {
46650
46655
  const obj = event.data.object;
46651
46656
  const eventType = event.type;
46657
+ if (skipObjectTypes.has(obj.object)) continue;
46652
46658
  try {
46653
46659
  if (!hardDeleteEventTypes.has(eventType)) {
46654
46660
  const tableName = eventObjectTypeToTable(obj.object);
package/dist/cli/index.js CHANGED
@@ -5,12 +5,12 @@ import {
5
5
  migrateCommand,
6
6
  syncCommand,
7
7
  uninstallCommand
8
- } from "../chunk-WHNAH5B7.js";
9
- import "../chunk-2KB2ISYF.js";
10
- import "../chunk-GXIMCH5Y.js";
8
+ } from "../chunk-62ZCAQ7D.js";
9
+ import "../chunk-SY3Y6EPM.js";
10
+ import "../chunk-FNRHJKY2.js";
11
11
  import {
12
12
  package_default
13
- } from "../chunk-E6BGC7CB.js";
13
+ } from "../chunk-XWQBYFVJ.js";
14
14
 
15
15
  // src/cli/index.ts
16
16
  import { Command } from "commander";
package/dist/cli/lib.cjs CHANGED
@@ -117,7 +117,7 @@ async function loadConfig(options) {
117
117
  // package.json
118
118
  var package_default = {
119
119
  name: "@paymentsdb/sync-engine",
120
- version: "0.0.5",
120
+ version: "0.0.8",
121
121
  private: false,
122
122
  description: "Stripe Sync Engine to sync Stripe data to Postgres",
123
123
  type: "module",
@@ -45418,7 +45418,7 @@ var StripeSync = class {
45418
45418
  subscription: {
45419
45419
  order: 5,
45420
45420
  // Depends on customer, price
45421
- listFn: (p) => this.stripe.subscriptions.list(p),
45421
+ listFn: (p) => this.stripe.subscriptions.list({ ...p, status: "all" }),
45422
45422
  upsertFn: (items, id, bf) => this.upsertSubscriptions(items, id, bf),
45423
45423
  supportsCreatedFilter: true
45424
45424
  },
@@ -46303,6 +46303,10 @@ ${message}`;
46303
46303
  if (object === "payment_method") {
46304
46304
  return this.fetchOnePagePaymentMethods(accountId, resourceName, runStartedAt, cursor, pageCursor, params);
46305
46305
  }
46306
+ if (object === "tax_id") {
46307
+ await this.postgresClient.completeObjectSync(accountId, runStartedAt, resourceName);
46308
+ return { processed: 0, hasMore: false, runStartedAt };
46309
+ }
46306
46310
  if (object === "_event_catchup") {
46307
46311
  return this.fetchOnePageEventCatchup(accountId, resourceName, runStartedAt, cursor, pageCursor);
46308
46312
  }
@@ -46660,9 +46664,11 @@ ${message}`;
46660
46664
  ]);
46661
46665
  let processed = 0;
46662
46666
  let skipped = 0;
46667
+ const skipObjectTypes = /* @__PURE__ */ new Set(["tax_id"]);
46663
46668
  for (const [, event] of entityMap) {
46664
46669
  const obj = event.data.object;
46665
46670
  const eventType = event.type;
46671
+ if (skipObjectTypes.has(obj.object)) continue;
46666
46672
  try {
46667
46673
  if (!hardDeleteEventTypes.has(eventType)) {
46668
46674
  const tableName = eventObjectTypeToTable(obj.object);
package/dist/cli/lib.js CHANGED
@@ -6,10 +6,10 @@ import {
6
6
  migrateCommand,
7
7
  syncCommand,
8
8
  uninstallCommand
9
- } from "../chunk-WHNAH5B7.js";
10
- import "../chunk-2KB2ISYF.js";
11
- import "../chunk-GXIMCH5Y.js";
12
- import "../chunk-E6BGC7CB.js";
9
+ } from "../chunk-62ZCAQ7D.js";
10
+ import "../chunk-SY3Y6EPM.js";
11
+ import "../chunk-FNRHJKY2.js";
12
+ import "../chunk-XWQBYFVJ.js";
13
13
  export {
14
14
  backfillCommand,
15
15
  createTunnel,
package/dist/index.cjs CHANGED
@@ -46,7 +46,7 @@ var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
46
46
  // package.json
47
47
  var package_default = {
48
48
  name: "@paymentsdb/sync-engine",
49
- version: "0.0.5",
49
+ version: "0.0.8",
50
50
  private: false,
51
51
  description: "Stripe Sync Engine to sync Stripe data to Postgres",
52
52
  type: "module",
@@ -45347,7 +45347,7 @@ var StripeSync = class {
45347
45347
  subscription: {
45348
45348
  order: 5,
45349
45349
  // Depends on customer, price
45350
- listFn: (p) => this.stripe.subscriptions.list(p),
45350
+ listFn: (p) => this.stripe.subscriptions.list({ ...p, status: "all" }),
45351
45351
  upsertFn: (items, id, bf) => this.upsertSubscriptions(items, id, bf),
45352
45352
  supportsCreatedFilter: true
45353
45353
  },
@@ -46232,6 +46232,10 @@ ${message}`;
46232
46232
  if (object === "payment_method") {
46233
46233
  return this.fetchOnePagePaymentMethods(accountId, resourceName, runStartedAt, cursor, pageCursor, params);
46234
46234
  }
46235
+ if (object === "tax_id") {
46236
+ await this.postgresClient.completeObjectSync(accountId, runStartedAt, resourceName);
46237
+ return { processed: 0, hasMore: false, runStartedAt };
46238
+ }
46235
46239
  if (object === "_event_catchup") {
46236
46240
  return this.fetchOnePageEventCatchup(accountId, resourceName, runStartedAt, cursor, pageCursor);
46237
46241
  }
@@ -46589,9 +46593,11 @@ ${message}`;
46589
46593
  ]);
46590
46594
  let processed = 0;
46591
46595
  let skipped = 0;
46596
+ const skipObjectTypes = /* @__PURE__ */ new Set(["tax_id"]);
46592
46597
  for (const [, event] of entityMap) {
46593
46598
  const obj = event.data.object;
46594
46599
  const eventType = event.type;
46600
+ if (skipObjectTypes.has(obj.object)) continue;
46595
46601
  try {
46596
46602
  if (!hardDeleteEventTypes.has(eventType)) {
46597
46603
  const tableName = eventObjectTypeToTable(obj.object);
package/dist/index.js CHANGED
@@ -5,8 +5,8 @@ import {
5
5
  createStripeWebSocketClient,
6
6
  hashApiKey,
7
7
  runMigrations
8
- } from "./chunk-2KB2ISYF.js";
9
- import "./chunk-E6BGC7CB.js";
8
+ } from "./chunk-SY3Y6EPM.js";
9
+ import "./chunk-XWQBYFVJ.js";
10
10
  export {
11
11
  PostgresClient,
12
12
  StripeSync,
@@ -59,7 +59,7 @@ var sigmaWorkerFunctionCode = sigma_data_worker_default;
59
59
  // package.json
60
60
  var package_default = {
61
61
  name: "@paymentsdb/sync-engine",
62
- version: "0.0.5",
62
+ version: "0.0.8",
63
63
  private: false,
64
64
  description: "Stripe Sync Engine to sync Stripe data to Postgres",
65
65
  type: "module",
@@ -10,8 +10,8 @@ import {
10
10
  uninstall,
11
11
  webhookFunctionCode,
12
12
  workerFunctionCode
13
- } from "../chunk-GXIMCH5Y.js";
14
- import "../chunk-E6BGC7CB.js";
13
+ } from "../chunk-FNRHJKY2.js";
14
+ import "../chunk-XWQBYFVJ.js";
15
15
  export {
16
16
  INSTALLATION_ERROR_SUFFIX,
17
17
  INSTALLATION_INSTALLED_SUFFIX,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paymentsdb/sync-engine",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "private": false,
5
5
  "description": "Stripe Sync Engine to sync Stripe data to Postgres",
6
6
  "type": "module",