rerobe-js-orm 4.2.1 → 4.2.3

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.
@@ -61,3 +61,13 @@ export namespace RIBBN_WEBHOOK_EVENT_DICT {
61
61
  const productUpdate: string;
62
62
  const productDelete: string;
63
63
  }
64
+ export namespace SUBSCRIPTION_STATUSES {
65
+ const active: string;
66
+ const past_due: string;
67
+ const canceled: string;
68
+ const unpaid: string;
69
+ const trialing: string;
70
+ const incomplete: string;
71
+ const incomplete_expired: string;
72
+ const paused: string;
73
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RIBBN_WEBHOOK_EVENT_DICT = exports.IMPERIAL_WEIGHT_TYPES = exports.METRIC_WEIGHT_TYPES = exports.UNIT_SYSTEM_TYPES = exports.INDUSTRY_TYPES = exports.PAYMENT_TIERS = exports.MERCHANT_TYPES = void 0;
3
+ exports.SUBSCRIPTION_STATUSES = exports.RIBBN_WEBHOOK_EVENT_DICT = exports.IMPERIAL_WEIGHT_TYPES = exports.METRIC_WEIGHT_TYPES = exports.UNIT_SYSTEM_TYPES = exports.INDUSTRY_TYPES = exports.PAYMENT_TIERS = exports.MERCHANT_TYPES = void 0;
4
4
  exports.MERCHANT_TYPES = {
5
5
  individual: 'INDIVIDUAL',
6
6
  business: 'BUSINESS',
@@ -55,3 +55,13 @@ exports.RIBBN_WEBHOOK_EVENT_DICT = {
55
55
  productDelete: 'PRODUCT_DELETE',
56
56
  // TODO: Add webhook events for other models (Orders, User, etc)
57
57
  };
58
+ exports.SUBSCRIPTION_STATUSES = {
59
+ active: 'ACTIVE',
60
+ past_due: 'PAST_DUE',
61
+ canceled: 'CANCELED',
62
+ unpaid: 'UNPAID',
63
+ trialing: 'TRIALING',
64
+ incomplete: 'INCOMPLETE',
65
+ incomplete_expired: 'INCOMPLETE_EXPIRED',
66
+ paused: 'PAUSED',
67
+ };
@@ -89,7 +89,9 @@ export default class Merchant extends Base {
89
89
  hasAutomatedPayouts?: boolean;
90
90
  hasAIQuickList?: boolean;
91
91
  hasReceiptPrinter?: boolean;
92
- activeSubscription?: StripeSubscription;
92
+ hasActiveWebshop?: boolean;
93
+ stripeSubscription?: StripeSubscription;
94
+ subscriptionStatus?: string;
93
95
  constructor(props?: any);
94
96
  toObj(): MerchantObj;
95
97
  toMerchantMutableData(): MerchantMutableData;
@@ -50,6 +50,8 @@ class Merchant extends Base_1.default {
50
50
  };
51
51
  this.organizationNumber = (props === null || props === void 0 ? void 0 : props.organizationNumber) || '';
52
52
  this.returnPolicy = (props === null || props === void 0 ? void 0 : props.returnPolicy) || '';
53
+ this.subscriptionStatus = (props === null || props === void 0 ? void 0 : props.subscriptionStatus) || merchant_constants_1.SUBSCRIPTION_STATUSES.trialing;
54
+ this.hasActiveWebshop = (props === null || props === void 0 ? void 0 : props.hasActiveWebshop) || false;
53
55
  if (props === null || props === void 0 ? void 0 : props.isChannelPartner) {
54
56
  this.isChannelPartner = props.isChannelPartner;
55
57
  }
@@ -103,6 +105,8 @@ class Merchant extends Base_1.default {
103
105
  socialLinks: this.socialLinks,
104
106
  organizationNumber: this.organizationNumber,
105
107
  returnPolicy: this.returnPolicy,
108
+ subscriptionStatus: this.subscriptionStatus,
109
+ hasActiveWebshop: this.hasActiveWebshop,
106
110
  };
107
111
  if (this.isChannelPartner) {
108
112
  mObj.isChannelPartner = this.isChannelPartner;
@@ -45,6 +45,8 @@ type MerchantSystemOnlyMutableData = {
45
45
  hasAutomatedPayouts?: boolean;
46
46
  hasAIQuickList?: boolean;
47
47
  hasReceiptPrinter?: boolean;
48
+ hasActiveWebshop?: boolean;
49
+ subscriptionStatus?: string;
48
50
  };
49
51
  type MerchantObj = MerchantMutableData & MerchantSystemOnlyMutableData;
50
52
  type MerchantTypes = 'INDIVIDUAL' | 'BUSINESS';
@@ -104,7 +106,7 @@ interface LocationInput extends AddressInput {
104
106
  }
105
107
  type StripeSubscription = {
106
108
  id: string;
107
- status: 'active' | 'past_due' | 'canceled' | 'unpaid' | 'trialing' | 'incomplete' | 'incomplete_expired';
109
+ status: 'active' | 'past_due' | 'canceled' | 'unpaid' | 'trialing' | 'incomplete' | 'incomplete_expired' | 'paused';
108
110
  currentPeriodStart: number;
109
111
  currentPeriodEnd: number;
110
112
  priceId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rerobe-js-orm",
3
- "version": "4.2.1",
3
+ "version": "4.2.3",
4
4
  "description": "ReRobe's Javascript ORM Framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",