namirasoft-payment 1.4.112 → 1.4.114

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.
Files changed (37) hide show
  1. package/.ns-sdkg-file-keep +1 -1
  2. package/dist/NamirasoftPaymentServer.js +1 -1
  3. package/dist/NamirasoftPaymentServerOffer.d.ts +2 -1
  4. package/dist/NamirasoftPaymentServerOffer.js.map +1 -1
  5. package/dist/NamirasoftPaymentServerOfferItem.d.ts +3 -3
  6. package/dist/NamirasoftPaymentServerOfferItem.js.map +1 -1
  7. package/dist/NamirasoftPaymentServerSalesItem.d.ts +2 -1
  8. package/dist/NamirasoftPaymentServerSalesItem.js.map +1 -1
  9. package/dist/index.d.ts +3 -0
  10. package/dist/index.js +3 -0
  11. package/dist/index.js.map +1 -1
  12. package/dist/row/OfferFullRow.d.ts +27 -0
  13. package/dist/row/OfferFullRow.js +3 -0
  14. package/dist/row/OfferFullRow.js.map +1 -0
  15. package/dist/row/OfferItemFullRow.d.ts +61 -0
  16. package/dist/row/OfferItemFullRow.js +3 -0
  17. package/dist/row/OfferItemFullRow.js.map +1 -0
  18. package/dist/row/OfferItemRow.d.ts +0 -6
  19. package/dist/row/OfferRow.d.ts +0 -6
  20. package/dist/row/SalesItemFullRow.d.ts +19 -0
  21. package/dist/row/SalesItemFullRow.js +3 -0
  22. package/dist/row/SalesItemFullRow.js.map +1 -0
  23. package/dist/row/SalesItemRow.d.ts +0 -2
  24. package/package.json +2 -2
  25. package/src/NamirasoftPaymentServer.ts +1 -1
  26. package/src/NamirasoftPaymentServerOffer.ts +3 -2
  27. package/src/NamirasoftPaymentServerOfferItem.ts +5 -5
  28. package/src/NamirasoftPaymentServerSalesItem.ts +3 -2
  29. package/src/PaymentBase.ts +145 -145
  30. package/src/SubscriptionValidation.ts +66 -66
  31. package/src/index.ts +3 -0
  32. package/src/row/OfferFullRow.ts +49 -0
  33. package/src/row/OfferItemFullRow.ts +83 -0
  34. package/src/row/OfferItemRow.ts +0 -6
  35. package/src/row/OfferRow.ts +0 -6
  36. package/src/row/SalesItemFullRow.ts +41 -0
  37. package/src/row/SalesItemRow.ts +0 -2
@@ -1,2 +1,2 @@
1
- src/PaymentBase.ts
1
+ src/PaymentBase.ts
2
2
  src/SubscriptionValidation.ts
@@ -21,7 +21,7 @@ const NamirasoftPaymentServerTrial_1 = require("./NamirasoftPaymentServerTrial")
21
21
  const NamirasoftPaymentServerValue_1 = require("./NamirasoftPaymentServerValue");
22
22
  class NamirasoftPaymentServer extends namirasoft_account_1.NSABaseServer {
23
23
  constructor(base_url, manager, onError) {
24
- super(base_url, `1.4.111`, manager, onError);
24
+ super(base_url, `1.4.114`, manager, onError);
25
25
  this.healthz = new NamirasoftPaymentServerHealthz_1.NamirasoftPaymentServerHealthz(this);
26
26
  this.metrics = new NamirasoftPaymentServerMetrics_1.NamirasoftPaymentServerMetrics(this);
27
27
  this.value = new NamirasoftPaymentServerValue_1.NamirasoftPaymentServerValue(this);
@@ -1,6 +1,7 @@
1
1
  import { FilterItem } from "namirasoft-core";
2
2
  import { NamirasoftPaymentServer } from "./NamirasoftPaymentServer";
3
3
  import { NamirasoftPaymentServerBase } from "./NamirasoftPaymentServerBase";
4
+ import { OfferFullRow } from "./row/OfferFullRow";
4
5
  import { OfferRow } from "./row/OfferRow";
5
6
  import { SortItem } from "namirasoft-core";
6
7
  export declare class NamirasoftPaymentServerOffer extends NamirasoftPaymentServerBase {
@@ -9,5 +10,5 @@ export declare class NamirasoftPaymentServerOffer extends NamirasoftPaymentServe
9
10
  rows: OfferRow[];
10
11
  count: number;
11
12
  }>;
12
- Get(id: string): Promise<OfferRow>;
13
+ Get(id: string): Promise<OfferFullRow>;
13
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"NamirasoftPaymentServerOffer.js","sourceRoot":"","sources":["../src/NamirasoftPaymentServerOffer.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,qDAA6C;AAE7C,+EAA4E;AAE5E,qDAA2C;AA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K,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IACK,IAAI,CAAC,OAA4B,EAAE,IAAqB,EAAE,IAAqB,EAAE,KAAiB;;YAEpG,IAAI,oBAAoB,GAAW,4BAAU,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;YACjE,IAAI,kBAAkB,GAAW,0BAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;YAC3D,IAAI,IAAI,GAAG,aAAa,CAAC;YACzB,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAsC,IAAI,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,kBAAkB,EAAE,CAAC,CAAC;YAC3J,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;IACK,GAAG,CAAC,EAAU;;YAEhB,IAAI,IAAI,GAAG,UAAU,EAAE,EAAE,CAAC;YAC1B,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAe,IAAI,EAAE,EAAE,CAAC,CAAC;YAC9D,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;CACJ;AAtBD,oEAsBC;AAAA,CAAC"}
@@ -1,13 +1,13 @@
1
1
  import { FilterItem } from "namirasoft-core";
2
2
  import { NamirasoftPaymentServer } from "./NamirasoftPaymentServer";
3
3
  import { NamirasoftPaymentServerBase } from "./NamirasoftPaymentServerBase";
4
- import { OfferItemRow } from "./row/OfferItemRow";
4
+ import { OfferItemFullRow } from "./row/OfferItemFullRow";
5
5
  import { SortItem } from "namirasoft-core";
6
6
  export declare class NamirasoftPaymentServerOfferItem extends NamirasoftPaymentServerBase {
7
7
  constructor(server: NamirasoftPaymentServer);
8
8
  List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[]): Promise<{
9
- rows: OfferItemRow[];
9
+ rows: OfferItemFullRow[];
10
10
  count: number;
11
11
  }>;
12
- Get(id: string): Promise<OfferItemRow>;
12
+ Get(id: string): Promise<OfferItemFullRow>;
13
13
  }
@@ -1 +1 @@
1
- {"version":3,"file":"NamirasoftPaymentServerOfferItem.js","sourceRoot":"","sources":["../src/NamirasoftPaymentServerOfferItem.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,qDAA6C;AAE7C,+EAA4E;AAE5E,qDAA2C;AAE3C,MAAa,gCAAiC,SAAQ,yDAA2B;IAE7E,YAAY,MAA+B;QAEvC,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IACK,IAAI,CAAC,OAA4B,EAAE,IAAqB,EAAE,IAAqB,EAAE,KAAiB;;YAEpG,IAAI,oBAAoB,GAAW,4BAAU,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;YACjE,IAAI,kBAAkB,GAAW,0BAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;YAC3D,IAAI,IAAI,GAAG,kBAAkB,CAAC;YAC9B,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAA0C,IAAI,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,kBAAkB,EAAE,CAAC,CAAC;YAC/J,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;IACK,GAAG,CAAC,EAAU;;YAEhB,IAAI,IAAI,GAAG,eAAe,EAAE,EAAE,CAAC;YAC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AAC,IAAI,CAAmB,IAAI,EAAE,EAAE,CAAC,CAAC;YAClE,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;CACJ;AAtBD,4EAsBC;AAAA,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { FilterItem } from "namirasoft-core";
2
2
  import { NamirasoftPaymentServer } from "./NamirasoftPaymentServer";
3
3
  import { NamirasoftPaymentServerBase } from "./NamirasoftPaymentServerBase";
4
+ import { SalesItemFullRow } from "./row/SalesItemFullRow";
4
5
  import { SalesItemRow } from "./row/SalesItemRow";
5
6
  import { SortItem } from "namirasoft-core";
6
7
  export declare class NamirasoftPaymentServerSalesItem extends NamirasoftPaymentServerBase {
@@ -9,5 +10,5 @@ export declare class NamirasoftPaymentServerSalesItem extends NamirasoftPaymentS
9
10
  rows: SalesItemRow[];
10
11
  count: number;
11
12
  }>;
12
- Get(id: string): Promise<SalesItemRow>;
13
+ Get(id: string): Promise<SalesItemFullRow>;
13
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"NamirasoftPaymentServerSalesItem.js","sourceRoot":"","sources":["../src/NamirasoftPaymentServerSalesItem.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,qDAA6C;AAE7C,+EAA4E;AAE5E,qDAA2C;AAE3C,MAAa,gCAAiC,SAAQ,yDAA2B;IAE7E,YAAY,MAA+B;QAEvC,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IACK,IAAI,CAAC,OAA4B,EAAE,IAAqB,EAAE,IAAqB,EAAE,KAAiB;;YAEpG,IAAI,oBAAoB,GAAW,4BAAU,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;YACjE,IAAI,kBAAkB,GAAW,0BAAQ,CAAC,SAAS,CAA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C;YAC9B,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAA0C,IAAI,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,kBAAkB,EAAE,CAAC,CAAC;YAC/J,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;IACK,GAAG,CAAC,EAAU;;YAEhB,IAAI,IAAI,GAAG,eAAe,EAAE,EAAE,CAAC;YAC/B,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAmB,IAAI,EAAE,EAAE,CAAC,CAAC;YAClE,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;CACJ;AAtBD,4EAsBC;AAAA,CAAC"}
package/dist/index.d.ts CHANGED
@@ -111,10 +111,13 @@ export * from "./row/InvoiceInputRow";
111
111
  export * from "./row/InvoiceItemInputRow";
112
112
  export * from "./row/InvoiceItemRow";
113
113
  export * from "./row/InvoiceRow";
114
+ export * from "./row/OfferFullRow";
115
+ export * from "./row/OfferItemFullRow";
114
116
  export * from "./row/OfferItemRow";
115
117
  export * from "./row/OfferRow";
116
118
  export * from "./row/PaymentRow";
117
119
  export * from "./row/ProductRow";
120
+ export * from "./row/SalesItemFullRow";
118
121
  export * from "./row/SalesItemRow";
119
122
  export * from "./row/SubscriptionCancellationReasonRow";
120
123
  export * from "./row/SubscriptionFullRow";
package/dist/index.js CHANGED
@@ -127,10 +127,13 @@ __exportStar(require("./row/InvoiceInputRow"), exports);
127
127
  __exportStar(require("./row/InvoiceItemInputRow"), exports);
128
128
  __exportStar(require("./row/InvoiceItemRow"), exports);
129
129
  __exportStar(require("./row/InvoiceRow"), exports);
130
+ __exportStar(require("./row/OfferFullRow"), exports);
131
+ __exportStar(require("./row/OfferItemFullRow"), exports);
130
132
  __exportStar(require("./row/OfferItemRow"), exports);
131
133
  __exportStar(require("./row/OfferRow"), exports);
132
134
  __exportStar(require("./row/PaymentRow"), exports);
133
135
  __exportStar(require("./row/ProductRow"), exports);
136
+ __exportStar(require("./row/SalesItemFullRow"), exports);
134
137
  __exportStar(require("./row/SalesItemRow"), exports);
135
138
  __exportStar(require("./row/SubscriptionCancellationReasonRow"), exports);
136
139
  __exportStar(require("./row/SubscriptionFullRow"), exports);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAoBA,4DAA0C;AAC1C,gEAA8C;AAC9C,gEAA8C;AAC9C,mEAAiD;AACjD,mEAAiD;AACjD,iEAA+C;AAC/C,mEAAiD;AACjD,iEAA+C;AAC/C,qEAAmD;AACnD,mEAAiD;AACjD,mEAAiD;AACjD,mEAAiD;AACjD,qEAAmD;AACnD,wEAAsD;AACtD,0FAAwE;AACxE,4EAA0D;AAC1D,4EAA0D;AAC1D,iEAA+C;AAC/C,iEAA+C;AAC/C,gDAA8B;AAC9B,2DAAyC;AACzC,wDAAsC;AACtC,2DAAyC;AACzC,4DAA0C;AAC1C,2DAAyC;AACzC,8DAA4C;AAC5C,iEAA+C;AAC/C,2DAAyC;AACzC,8DAA4C;AAC5C,+DAA6C;AAC7C,qEAAmD;AACnD,qEAAmD;AACnD,yDAAuC;AACvC,mEAAiD;AACjD,2DAAyC;AACzC,8DAA4C;AAC5C,yDAAuC;AACvC,4DAA0C;AAC1C,6DAA2C;AAC3C,gEAA8C;AAC9C,iEAA+C;AAC/C,6DAA2C;AAC3C,mEAAiD;AACjD,2DAAyC;AACzC,2DAAyC;AACzC,8DAA4C;AAC5C,+DAA6C;AAC7C,2DAAyC;AACzC,8DAA4C;AAC5C,+DAA6C;AAC7C,6DAA2C;AAC3C,gEAA8C;AAC9C,iEAA+C;AAC/C,uFAAqE;AACrE,sEAAoD;AACpD,kFAAgE;AAChE,qFAAmE;AACnE,sFAAoE;AACpE,6EAA2D;AAC3D,gEAA8C;AAC9C,oFAA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D,4DAA0C;AAC1C,wDAAsC;AACtC,0DAAwC;AACxC,0DAAwC;AACxC,4DAA0C;AAC1C,iFAA+D;AAC/D,mEAAiD;AACjD,+DAA6C;AAC7C,mEAAiD;AACjD,gDAA8B;AAC9B,4DAA0C;AAC1C,uDAAqC;AACrC,uDAAqC;AACrC,wDAAsC;AACtC,4DAA0C;AAC1C,uDAAqC;AACrC,mDAAiC;AACjC,qDAAmC;AACnC,yDAAuC;AACvC,qDAAmC;AACnC,iDAA+B;AAC/B,mDAAiC;AACjC,mDAAiC;AACjC,yDAAuC;AACvC,qDAAmC;AACnC,0EAAwD;AACxD,4DAA0C;AAC1C,4DAA0C;AAC1C,4DAA0C;AAC1C,wDAAsC;AACtC,iDAA+B"}
@@ -0,0 +1,27 @@
1
+ import { OfferItemRow } from "./OfferItemRow";
2
+ import { OfferRecurringDurationUnit } from "../enum/OfferRecurringDurationUnit";
3
+ import { ProductRow } from "./ProductRow";
4
+ import { SalesItemRow } from "./SalesItemRow";
5
+ import { SubscriptionRow } from "./SubscriptionRow";
6
+ export type OfferFullRow = {
7
+ id: string;
8
+ product_id: string;
9
+ sales_item_id: string;
10
+ name: string;
11
+ logo: (string | null);
12
+ order: number;
13
+ recurring: number;
14
+ recurring_duration_value: (number | null);
15
+ recurring_duration_unit: (OfferRecurringDurationUnit | null);
16
+ applies_at: (Date | null);
17
+ expires_at: (Date | null);
18
+ recommended: boolean;
19
+ features: string;
20
+ description: string;
21
+ created_at: Date;
22
+ updated_at: Date;
23
+ product: ProductRow;
24
+ sales_item: SalesItemRow;
25
+ offer_item: OfferItemRow[];
26
+ subscription: SubscriptionRow;
27
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=OfferFullRow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OfferFullRow.js","sourceRoot":"","sources":["../../src/row/OfferFullRow.ts"],"names":[],"mappings":""}
@@ -0,0 +1,61 @@
1
+ import { OfferItemExpireUnit } from "../enum/OfferItemExpireUnit";
2
+ import { OfferItemOneOffModel } from "../enum/OfferItemOneOffModel";
3
+ import { OfferItemRecurringDurationUnit } from "../enum/OfferItemRecurringDurationUnit";
4
+ import { OfferItemRecurringModel } from "../enum/OfferItemRecurringModel";
5
+ import { OfferItemRecurringTieredType } from "../enum/OfferItemRecurringTieredType";
6
+ import { OfferItemRecurringUsageTieredType } from "../enum/OfferItemRecurringUsageTieredType";
7
+ import { OfferItemRecurringUsageType } from "../enum/OfferItemRecurringUsageType";
8
+ import { OfferItemType } from "../enum/OfferItemType";
9
+ import { OfferRow } from "./OfferRow";
10
+ import { ProductRow } from "./ProductRow";
11
+ import { SalesItemRow } from "./SalesItemRow";
12
+ export type OfferItemFullRow = {
13
+ id: string;
14
+ product_id: string;
15
+ sales_item_id: string;
16
+ offer_id: string;
17
+ name: string;
18
+ logo: (string | null);
19
+ order: number;
20
+ dominant: boolean;
21
+ consumable: boolean;
22
+ consumable_asset_id: (string | null);
23
+ expire_value: (number | null);
24
+ expire_unit: (OfferItemExpireUnit | null);
25
+ type: OfferItemType;
26
+ one_off_model: (OfferItemOneOffModel | null);
27
+ one_off_flat_amount: (number | null);
28
+ one_off_package_amount: (number | null);
29
+ one_off_package_per_value: (number | null);
30
+ one_off_package_per_unit: (string | null);
31
+ one_off_choosable_on_gateway: (boolean | null);
32
+ one_off_choosable_suggested_amount: (number | null);
33
+ one_off_choosable_limit_min: (number | null);
34
+ one_off_choosable_limit_max: (number | null);
35
+ recurring_model: (OfferItemRecurringModel | null);
36
+ recurring_duration_value: (number | null);
37
+ recurring_duration_unit: (OfferItemRecurringDurationUnit | null);
38
+ recurring_flat_amount: (number | null);
39
+ recurring_package_amount: (number | null);
40
+ recurring_package_per_value: (number | null);
41
+ recurring_package_per_unit: (string | null);
42
+ recurring_tiered_type: (OfferItemRecurringTieredType | null);
43
+ recurring_tiered_amounts: (any | null);
44
+ recurring_usage_type: (OfferItemRecurringUsageType | null);
45
+ recurring_usage_unit: (string | null);
46
+ recurring_usage_meter_event_name: (string | null);
47
+ recurring_usage_unit_amount: (number | null);
48
+ recurring_usage_package_amount: (number | null);
49
+ recurring_usage_package_per_value: (number | null);
50
+ recurring_usage_package_per_unit: (string | null);
51
+ recurring_usage_tiered_type: (OfferItemRecurringUsageTieredType | null);
52
+ recurring_usage_tiered_amounts: (any | null);
53
+ currency: string;
54
+ was_price: (string | null);
55
+ description: string;
56
+ created_at: Date;
57
+ updated_at: Date;
58
+ product: ProductRow;
59
+ sales_item: SalesItemRow;
60
+ offer: OfferRow;
61
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=OfferItemFullRow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OfferItemFullRow.js","sourceRoot":"","sources":["../../src/row/OfferItemFullRow.ts"],"names":[],"mappings":""}
@@ -6,9 +6,6 @@ import { OfferItemRecurringTieredType } from "../enum/OfferItemRecurringTieredTy
6
6
  import { OfferItemRecurringUsageTieredType } from "../enum/OfferItemRecurringUsageTieredType";
7
7
  import { OfferItemRecurringUsageType } from "../enum/OfferItemRecurringUsageType";
8
8
  import { OfferItemType } from "../enum/OfferItemType";
9
- import { OfferRow } from "./OfferRow";
10
- import { ProductRow } from "./ProductRow";
11
- import { SalesItemRow } from "./SalesItemRow";
12
9
  export type OfferItemRow = {
13
10
  id: string;
14
11
  product_id: string;
@@ -55,7 +52,4 @@ export type OfferItemRow = {
55
52
  description: string;
56
53
  created_at: Date;
57
54
  updated_at: Date;
58
- product: ProductRow;
59
- sales_item: SalesItemRow;
60
- offer: OfferRow;
61
55
  };
@@ -1,7 +1,4 @@
1
1
  import { OfferRecurringDurationUnit } from "../enum/OfferRecurringDurationUnit";
2
- import { ProductRow } from "./ProductRow";
3
- import { SalesItemRow } from "./SalesItemRow";
4
- import { SubscriptionRow } from "./SubscriptionRow";
5
2
  export type OfferRow = {
6
3
  id: string;
7
4
  product_id: string;
@@ -19,7 +16,4 @@ export type OfferRow = {
19
16
  description: string;
20
17
  created_at: Date;
21
18
  updated_at: Date;
22
- product: ProductRow;
23
- sales_item: SalesItemRow;
24
- subscription: SubscriptionRow;
25
19
  };
@@ -0,0 +1,19 @@
1
+ import { ProductRow } from "./ProductRow";
2
+ import { SalesItemExpireUnit } from "../enum/SalesItemExpireUnit";
3
+ export type SalesItemFullRow = {
4
+ id: string;
5
+ product_id: string;
6
+ sales_item_group_id: (string | null);
7
+ name: string;
8
+ slug: string;
9
+ logo: string;
10
+ order: number;
11
+ consumable: boolean;
12
+ consumable_asset_id: (string | null);
13
+ expire_value: number;
14
+ expire_unit: SalesItemExpireUnit;
15
+ description: string;
16
+ created_at: Date;
17
+ updated_at: Date;
18
+ product: ProductRow;
19
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=SalesItemFullRow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SalesItemFullRow.js","sourceRoot":"","sources":["../../src/row/SalesItemFullRow.ts"],"names":[],"mappings":""}
@@ -1,4 +1,3 @@
1
- import { ProductRow } from "./ProductRow";
2
1
  import { SalesItemExpireUnit } from "../enum/SalesItemExpireUnit";
3
2
  export type SalesItemRow = {
4
3
  id: string;
@@ -15,5 +14,4 @@ export type SalesItemRow = {
15
14
  description: string;
16
15
  created_at: Date;
17
16
  updated_at: Date;
18
- product: ProductRow;
19
17
  };
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "framework": "npm",
9
9
  "application": "package",
10
10
  "private": false,
11
- "version": "1.4.112",
11
+ "version": "1.4.114",
12
12
  "author": "Amir Abolhasani",
13
13
  "license": "MIT",
14
14
  "main": "./dist/index.js",
@@ -17,7 +17,7 @@
17
17
  "build": ""
18
18
  },
19
19
  "dependencies": {
20
- "namirasoft-core": "^1.4.81",
20
+ "namirasoft-core": "^1.4.84",
21
21
  "namirasoft-site": "^1.4.39",
22
22
  "namirasoft-node-cli": "^1.4.8",
23
23
  "namirasoft-account": "^1.4.85"
@@ -59,7 +59,7 @@ export class NamirasoftPaymentServer extends NSABaseServer
59
59
  product: NamirasoftPaymentServerProduct;
60
60
  constructor(base_url: string, manager: TokenManager, onError: (error: Error) => void)
61
61
  {
62
- super(base_url, `1.4.111`, manager, onError);
62
+ super(base_url, `1.4.114`, manager, onError);
63
63
  this.healthz = new NamirasoftPaymentServerHealthz(this);
64
64
  this.metrics = new NamirasoftPaymentServerMetrics(this);
65
65
  this.value = new NamirasoftPaymentServerValue(this);
@@ -21,6 +21,7 @@
21
21
  import { FilterItem } from "namirasoft-core";
22
22
  import { NamirasoftPaymentServer } from "./NamirasoftPaymentServer";
23
23
  import { NamirasoftPaymentServerBase } from "./NamirasoftPaymentServerBase";
24
+ import { OfferFullRow } from "./row/OfferFullRow";
24
25
  import { OfferRow } from "./row/OfferRow";
25
26
  import { SortItem } from "namirasoft-core";
26
27
 
@@ -40,10 +41,10 @@ export class NamirasoftPaymentServerOffer extends NamirasoftPaymentServerBase
40
41
  let { data } = await this.server._get<{ rows: OfferRow[], count: number }>(path, { filters: filters_string_value, page, size, sorts: sorts_string_value });
41
42
  return data;
42
43
  }
43
- async Get(id: string): Promise<OfferRow>
44
+ async Get(id: string): Promise<OfferFullRow>
44
45
  {
45
46
  let path = `/offer/${id}`;
46
- let { data } = await this.server._get<OfferRow>(path, {});
47
+ let { data } = await this.server._get<OfferFullRow>(path, {});
47
48
  return data;
48
49
  }
49
50
  };
@@ -21,7 +21,7 @@
21
21
  import { FilterItem } from "namirasoft-core";
22
22
  import { NamirasoftPaymentServer } from "./NamirasoftPaymentServer";
23
23
  import { NamirasoftPaymentServerBase } from "./NamirasoftPaymentServerBase";
24
- import { OfferItemRow } from "./row/OfferItemRow";
24
+ import { OfferItemFullRow } from "./row/OfferItemFullRow";
25
25
  import { SortItem } from "namirasoft-core";
26
26
 
27
27
  export class NamirasoftPaymentServerOfferItem extends NamirasoftPaymentServerBase
@@ -32,18 +32,18 @@ export class NamirasoftPaymentServerOfferItem extends NamirasoftPaymentServerBas
32
32
  this.List = this.List.bind(this);
33
33
  this.Get = this.Get.bind(this);
34
34
  }
35
- async List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[]): Promise<{ rows: OfferItemRow[], count: number }>
35
+ async List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[]): Promise<{ rows: OfferItemFullRow[], count: number }>
36
36
  {
37
37
  let filters_string_value: string = FilterItem.stringify(filters);
38
38
  let sorts_string_value: string = SortItem.stringify(sorts);
39
39
  let path = `/offer/item/list`;
40
- let { data } = await this.server._get<{ rows: OfferItemRow[], count: number }>(path, { filters: filters_string_value, page, size, sorts: sorts_string_value });
40
+ let { data } = await this.server._get<{ rows: OfferItemFullRow[], count: number }>(path, { filters: filters_string_value, page, size, sorts: sorts_string_value });
41
41
  return data;
42
42
  }
43
- async Get(id: string): Promise<OfferItemRow>
43
+ async Get(id: string): Promise<OfferItemFullRow>
44
44
  {
45
45
  let path = `/offer/item/${id}`;
46
- let { data } = await this.server._get<OfferItemRow>(path, {});
46
+ let { data } = await this.server._get<OfferItemFullRow>(path, {});
47
47
  return data;
48
48
  }
49
49
  };
@@ -21,6 +21,7 @@
21
21
  import { FilterItem } from "namirasoft-core";
22
22
  import { NamirasoftPaymentServer } from "./NamirasoftPaymentServer";
23
23
  import { NamirasoftPaymentServerBase } from "./NamirasoftPaymentServerBase";
24
+ import { SalesItemFullRow } from "./row/SalesItemFullRow";
24
25
  import { SalesItemRow } from "./row/SalesItemRow";
25
26
  import { SortItem } from "namirasoft-core";
26
27
 
@@ -40,10 +41,10 @@ export class NamirasoftPaymentServerSalesItem extends NamirasoftPaymentServerBas
40
41
  let { data } = await this.server._get<{ rows: SalesItemRow[], count: number }>(path, { filters: filters_string_value, page, size, sorts: sorts_string_value });
41
42
  return data;
42
43
  }
43
- async Get(id: string): Promise<SalesItemRow>
44
+ async Get(id: string): Promise<SalesItemFullRow>
44
45
  {
45
46
  let path = `/sales/item/${id}`;
46
- let { data } = await this.server._get<SalesItemRow>(path, {});
47
+ let { data } = await this.server._get<SalesItemFullRow>(path, {});
47
48
  return data;
48
49
  }
49
50
  };
@@ -1,146 +1,146 @@
1
- export class PaymentBase
2
- {
3
- static NAMIRASOFT_BILL_WATCH = {
4
- id: "prd-237ccb143fb04e52",
5
- sales_items: {
6
- AWS: {
7
- id: "pym-sit-0@bw-----aws",
8
- offers: {
9
- STANDARD: {
10
- id: "pym-ofr-98d1fcc64ed2",
11
- items: {
12
- USAGE_PER_RECORD: {
13
- id: "pym-ofr-itm-969c9ab5"
14
- }
15
- }
16
- }
17
- }
18
- },
19
- AZURE: {
20
- id: "pym-sit-0@bw---azure",
21
- offers: {
22
- STANDARD: {
23
- id: "pym-ofr-8e5183c3fa74",
24
- items: {
25
- USAGE_PER_RECORD: {
26
- id: "pym-ofr-itm-004dddfc"
27
- }
28
- }
29
- }
30
- }
31
- },
32
- GCP: {
33
- id: "pym-sit-0@bw-----gcp",
34
- offers: {
35
- STANDARD: {
36
- id: "pym-ofr-3b1830f46f19",
37
- items: {
38
- USAGE_PER_RECORD: {
39
- id: "pym-ofr-itm-7ac93d85"
40
- }
41
- }
42
- }
43
- }
44
- }
45
- }
46
- };
47
- static NAMIRASOFT_FIELD = {
48
- id: "prd-a9fb78ad0b6e4cd3",
49
- sales_items: {
50
- CATEGORY: {
51
- id: "pym-sit-0@f-category",
52
- offers: {
53
- STANDARD: {
54
- id: "pym-ofr-e5eda59e2f4d",
55
- items: {
56
- USAGE_PER_RECORD: {
57
- id: "pym-ofr-itm-4bc1b267"
58
- }
59
- }
60
- }
61
- }
62
- },
63
- FIELD: {
64
- id: "pym-sit-0@f----field",
65
- offers: {
66
- STANDARD: {
67
- id: "pym-ofr-715f15d80cec",
68
- items: {
69
- USAGE_PER_RECORD: {
70
- id: "pym-ofr-itm-ff792299"
71
- }
72
- }
73
- }
74
- }
75
- }
76
- }
77
- };
78
- static NAMIRASOFT_JOB_ARRANGER = {
79
- id: "prd-23e6a126ab4e4627",
80
- sales_items: {
81
- MEMBERSHIP: {
82
- id: "pym-sit-0@ja--member",
83
- offers: {
84
- MONTHLY: {
85
- id: "pym-ofr-c882e68827d7",
86
- items: {
87
- FIX_PER_MONTH: {
88
- id: "pym-ofr-itm-ece89dd6",
89
- }
90
- }
91
- },
92
- YEARLY: {
93
- id: "pym-ofr-943ff3f16b42",
94
- items: {
95
- FIX_PER_YEAR: {
96
- id: "pym-ofr-itm-50ec8c77"
97
- }
98
- }
99
- }
100
- }
101
- }
102
- }
103
- };
104
- static NAMIRASOFT_LOG = {
105
- id: "prd-d0388150e7054a43",
106
- sales_items: {
107
- LOG: {
108
- id: "pym-sit-0@l------log",
109
- offers: {
110
- STANDARD: {
111
- id: "pym-ofr-acd5b874c021",
112
- items: {
113
- USAGE_PER_RECORD: {
114
- id: "pym-ofr-itm-a6afd28e"
115
- },
116
- USAGE_PER_READ: {
117
- id: "pym-ofr-itm-628c79ac"
118
- }
119
- }
120
- }
121
- }
122
- }
123
- }
124
- };
125
- static NAMIRASOFT_SECRET = {
126
- id: "prd-84a5484d86bd4c11",
127
- sales_items: {
128
- SECRET: {
129
- id: "pym-sit-0@s---secret",
130
- offers: {
131
- STANDARD: {
132
- id: "pym-ofr-7b5502c41c5e",
133
- items: {
134
- USAGE_PER_RECORD: {
135
- id: "pym-ofr-itm-b61f98d1"
136
- },
137
- USAGE_PER_READ: {
138
- id: "pym-ofr-itm-0c41a416"
139
- }
140
- }
141
- }
142
- }
143
- }
144
- }
145
- };
1
+ export class PaymentBase
2
+ {
3
+ static NAMIRASOFT_BILL_WATCH = {
4
+ id: "prd-237ccb143fb04e52",
5
+ sales_items: {
6
+ AWS: {
7
+ id: "pym-sit-0@bw-----aws",
8
+ offers: {
9
+ STANDARD: {
10
+ id: "pym-ofr-98d1fcc64ed2",
11
+ items: {
12
+ USAGE_PER_RECORD: {
13
+ id: "pym-ofr-itm-969c9ab5"
14
+ }
15
+ }
16
+ }
17
+ }
18
+ },
19
+ AZURE: {
20
+ id: "pym-sit-0@bw---azure",
21
+ offers: {
22
+ STANDARD: {
23
+ id: "pym-ofr-8e5183c3fa74",
24
+ items: {
25
+ USAGE_PER_RECORD: {
26
+ id: "pym-ofr-itm-004dddfc"
27
+ }
28
+ }
29
+ }
30
+ }
31
+ },
32
+ GCP: {
33
+ id: "pym-sit-0@bw-----gcp",
34
+ offers: {
35
+ STANDARD: {
36
+ id: "pym-ofr-3b1830f46f19",
37
+ items: {
38
+ USAGE_PER_RECORD: {
39
+ id: "pym-ofr-itm-7ac93d85"
40
+ }
41
+ }
42
+ }
43
+ }
44
+ }
45
+ }
46
+ };
47
+ static NAMIRASOFT_FIELD = {
48
+ id: "prd-a9fb78ad0b6e4cd3",
49
+ sales_items: {
50
+ CATEGORY: {
51
+ id: "pym-sit-0@f-category",
52
+ offers: {
53
+ STANDARD: {
54
+ id: "pym-ofr-e5eda59e2f4d",
55
+ items: {
56
+ USAGE_PER_RECORD: {
57
+ id: "pym-ofr-itm-4bc1b267"
58
+ }
59
+ }
60
+ }
61
+ }
62
+ },
63
+ FIELD: {
64
+ id: "pym-sit-0@f----field",
65
+ offers: {
66
+ STANDARD: {
67
+ id: "pym-ofr-715f15d80cec",
68
+ items: {
69
+ USAGE_PER_RECORD: {
70
+ id: "pym-ofr-itm-ff792299"
71
+ }
72
+ }
73
+ }
74
+ }
75
+ }
76
+ }
77
+ };
78
+ static NAMIRASOFT_JOB_ARRANGER = {
79
+ id: "prd-23e6a126ab4e4627",
80
+ sales_items: {
81
+ MEMBERSHIP: {
82
+ id: "pym-sit-0@ja--member",
83
+ offers: {
84
+ MONTHLY: {
85
+ id: "pym-ofr-c882e68827d7",
86
+ items: {
87
+ FIX_PER_MONTH: {
88
+ id: "pym-ofr-itm-ece89dd6",
89
+ }
90
+ }
91
+ },
92
+ YEARLY: {
93
+ id: "pym-ofr-943ff3f16b42",
94
+ items: {
95
+ FIX_PER_YEAR: {
96
+ id: "pym-ofr-itm-50ec8c77"
97
+ }
98
+ }
99
+ }
100
+ }
101
+ }
102
+ }
103
+ };
104
+ static NAMIRASOFT_LOG = {
105
+ id: "prd-d0388150e7054a43",
106
+ sales_items: {
107
+ LOG: {
108
+ id: "pym-sit-0@l------log",
109
+ offers: {
110
+ STANDARD: {
111
+ id: "pym-ofr-acd5b874c021",
112
+ items: {
113
+ USAGE_PER_RECORD: {
114
+ id: "pym-ofr-itm-a6afd28e"
115
+ },
116
+ USAGE_PER_READ: {
117
+ id: "pym-ofr-itm-628c79ac"
118
+ }
119
+ }
120
+ }
121
+ }
122
+ }
123
+ }
124
+ };
125
+ static NAMIRASOFT_SECRET = {
126
+ id: "prd-84a5484d86bd4c11",
127
+ sales_items: {
128
+ SECRET: {
129
+ id: "pym-sit-0@s---secret",
130
+ offers: {
131
+ STANDARD: {
132
+ id: "pym-ofr-7b5502c41c5e",
133
+ items: {
134
+ USAGE_PER_RECORD: {
135
+ id: "pym-ofr-itm-b61f98d1"
136
+ },
137
+ USAGE_PER_READ: {
138
+ id: "pym-ofr-itm-0c41a416"
139
+ }
140
+ }
141
+ }
142
+ }
143
+ }
144
+ }
145
+ };
146
146
  };
@@ -1,67 +1,67 @@
1
- import { SubscriptionStatus } from "./enum/SubscriptionStatus";
2
- import { FreeRow } from "./row/FreeRow";
3
- import { SubscriptionPaidRow } from "./row/SubscriptionPaidRow";
4
- import { SubscriptionRow } from "./row/SubscriptionRow";
5
-
6
- export class SubscriptionValidation
7
- {
8
- public user_id: string;
9
- public sales_item_id: string;
10
- public date: Date = new Date();
11
- public subscribed: boolean;
12
- public valid: boolean;
13
- public valid_row: SubscriptionPaidRow | null;
14
- public valid_date: Date | null;
15
- public subscriptions: SubscriptionRow[] | null;
16
- public subscription_paids: SubscriptionPaidRow[] | null;
17
- public free: FreeRow | null;
18
- constructor(user_id: string, sales_item_id: string, subscriptions: SubscriptionRow[] | null, subscription_paids: SubscriptionPaidRow[] | null, free: FreeRow | null)
19
- {
20
- this.user_id = user_id;
21
- this.sales_item_id = sales_item_id;
22
- this.subscriptions = subscriptions;
23
- this.subscription_paids = subscription_paids;
24
- this.free = free;
25
- if (subscription_paids)
26
- for (let i = 0; i < subscription_paids.length; i++)
27
- {
28
- const row = subscription_paids[i];
29
- row.applies_at = new Date(row.applies_at);
30
- row.expires_at = new Date(row.expires_at);
31
- }
32
- this.subscribed = SubscriptionValidation.isSubscribed(this, null);
33
- this.valid = SubscriptionValidation.isValid(this, this.date);
34
- this.valid_row = SubscriptionValidation.getValid(this, this.date);
35
- this.valid_date = SubscriptionValidation.getValidDateTo(this, this.date);
36
- }
37
- static isSubscribed(validation: SubscriptionValidation, offer_id: string | null)
38
- {
39
- let s = (validation.subscriptions ?? []).filter(s => s.status === SubscriptionStatus.Active).filter(s => offer_id == null || s.offer_id == offer_id);
40
- return s.length > 0;
41
- }
42
- static isValid(validation: SubscriptionValidation, now: Date | null = null)
43
- {
44
- return SubscriptionValidation.getValid(validation, now) != null;
45
- }
46
- static getValid(validation: SubscriptionValidation, now: Date | null = null): SubscriptionPaidRow | null
47
- {
48
- if (now == null)
49
- now = new Date();
50
- if (validation.subscription_paids)
51
- for (let i = 0; i < validation.subscription_paids.length; i++)
52
- {
53
- const row = validation.subscription_paids[i];
54
- if (row.applies_at <= now)
55
- if (now <= row.expires_at)
56
- return row;
57
- }
58
- return null;
59
- }
60
- static getValidDateTo(validation: SubscriptionValidation, now: Date | null = null): Date | null
61
- {
62
- let row = SubscriptionValidation.getValid(validation, now);
63
- if (row)
64
- return row.expires_at;
65
- return null;
66
- }
1
+ import { SubscriptionStatus } from "./enum/SubscriptionStatus";
2
+ import { FreeRow } from "./row/FreeRow";
3
+ import { SubscriptionPaidRow } from "./row/SubscriptionPaidRow";
4
+ import { SubscriptionRow } from "./row/SubscriptionRow";
5
+
6
+ export class SubscriptionValidation
7
+ {
8
+ public user_id: string;
9
+ public sales_item_id: string;
10
+ public date: Date = new Date();
11
+ public subscribed: boolean;
12
+ public valid: boolean;
13
+ public valid_row: SubscriptionPaidRow | null;
14
+ public valid_date: Date | null;
15
+ public subscriptions: SubscriptionRow[] | null;
16
+ public subscription_paids: SubscriptionPaidRow[] | null;
17
+ public free: FreeRow | null;
18
+ constructor(user_id: string, sales_item_id: string, subscriptions: SubscriptionRow[] | null, subscription_paids: SubscriptionPaidRow[] | null, free: FreeRow | null)
19
+ {
20
+ this.user_id = user_id;
21
+ this.sales_item_id = sales_item_id;
22
+ this.subscriptions = subscriptions;
23
+ this.subscription_paids = subscription_paids;
24
+ this.free = free;
25
+ if (subscription_paids)
26
+ for (let i = 0; i < subscription_paids.length; i++)
27
+ {
28
+ const row = subscription_paids[i];
29
+ row.applies_at = new Date(row.applies_at);
30
+ row.expires_at = new Date(row.expires_at);
31
+ }
32
+ this.subscribed = SubscriptionValidation.isSubscribed(this, null);
33
+ this.valid = SubscriptionValidation.isValid(this, this.date);
34
+ this.valid_row = SubscriptionValidation.getValid(this, this.date);
35
+ this.valid_date = SubscriptionValidation.getValidDateTo(this, this.date);
36
+ }
37
+ static isSubscribed(validation: SubscriptionValidation, offer_id: string | null)
38
+ {
39
+ let s = (validation.subscriptions ?? []).filter(s => s.status === SubscriptionStatus.Active).filter(s => offer_id == null || s.offer_id == offer_id);
40
+ return s.length > 0;
41
+ }
42
+ static isValid(validation: SubscriptionValidation, now: Date | null = null)
43
+ {
44
+ return SubscriptionValidation.getValid(validation, now) != null;
45
+ }
46
+ static getValid(validation: SubscriptionValidation, now: Date | null = null): SubscriptionPaidRow | null
47
+ {
48
+ if (now == null)
49
+ now = new Date();
50
+ if (validation.subscription_paids)
51
+ for (let i = 0; i < validation.subscription_paids.length; i++)
52
+ {
53
+ const row = validation.subscription_paids[i];
54
+ if (row.applies_at <= now)
55
+ if (now <= row.expires_at)
56
+ return row;
57
+ }
58
+ return null;
59
+ }
60
+ static getValidDateTo(validation: SubscriptionValidation, now: Date | null = null): Date | null
61
+ {
62
+ let row = SubscriptionValidation.getValid(validation, now);
63
+ if (row)
64
+ return row.expires_at;
65
+ return null;
66
+ }
67
67
  }
package/src/index.ts CHANGED
@@ -131,10 +131,13 @@ export * from "./row/InvoiceInputRow";
131
131
  export * from "./row/InvoiceItemInputRow";
132
132
  export * from "./row/InvoiceItemRow";
133
133
  export * from "./row/InvoiceRow";
134
+ export * from "./row/OfferFullRow";
135
+ export * from "./row/OfferItemFullRow";
134
136
  export * from "./row/OfferItemRow";
135
137
  export * from "./row/OfferRow";
136
138
  export * from "./row/PaymentRow";
137
139
  export * from "./row/ProductRow";
140
+ export * from "./row/SalesItemFullRow";
138
141
  export * from "./row/SalesItemRow";
139
142
  export * from "./row/SubscriptionCancellationReasonRow";
140
143
  export * from "./row/SubscriptionFullRow";
@@ -0,0 +1,49 @@
1
+ /****************************************************************/
2
+ /* */
3
+ /* This is an Auto-Generated File */
4
+ /* Made By */
5
+ /* Namirasoft SDK Generator NPM Package */
6
+ /* */
7
+ /****************************************************************/
8
+ /****************************************************************/
9
+ /* */
10
+ /* Please do not make any change to this file */
11
+ /* If any change is required, ns-sdkg command must be used */
12
+ /* */
13
+ /****************************************************************/
14
+ /****************************************************************/
15
+ /* */
16
+ /* Namira Software Corporation */
17
+ /* https://namirasoft.com */
18
+ /* */
19
+ /****************************************************************/
20
+
21
+ import { OfferItemRow } from "./OfferItemRow";
22
+ import { OfferRecurringDurationUnit } from "../enum/OfferRecurringDurationUnit";
23
+ import { ProductRow } from "./ProductRow";
24
+ import { SalesItemRow } from "./SalesItemRow";
25
+ import { SubscriptionRow } from "./SubscriptionRow";
26
+
27
+ export type OfferFullRow =
28
+ {
29
+ id: string;
30
+ product_id: string;
31
+ sales_item_id: string;
32
+ name: string;
33
+ logo: (string | null);
34
+ order: number;
35
+ recurring: number;
36
+ recurring_duration_value: (number | null);
37
+ recurring_duration_unit: (OfferRecurringDurationUnit | null);
38
+ applies_at: (Date | null);
39
+ expires_at: (Date | null);
40
+ recommended: boolean;
41
+ features: string;
42
+ description: string;
43
+ created_at: Date;
44
+ updated_at: Date;
45
+ product: ProductRow;
46
+ sales_item: SalesItemRow;
47
+ offer_item: OfferItemRow[];
48
+ subscription: SubscriptionRow;
49
+ }
@@ -0,0 +1,83 @@
1
+ /****************************************************************/
2
+ /* */
3
+ /* This is an Auto-Generated File */
4
+ /* Made By */
5
+ /* Namirasoft SDK Generator NPM Package */
6
+ /* */
7
+ /****************************************************************/
8
+ /****************************************************************/
9
+ /* */
10
+ /* Please do not make any change to this file */
11
+ /* If any change is required, ns-sdkg command must be used */
12
+ /* */
13
+ /****************************************************************/
14
+ /****************************************************************/
15
+ /* */
16
+ /* Namira Software Corporation */
17
+ /* https://namirasoft.com */
18
+ /* */
19
+ /****************************************************************/
20
+
21
+ import { OfferItemExpireUnit } from "../enum/OfferItemExpireUnit";
22
+ import { OfferItemOneOffModel } from "../enum/OfferItemOneOffModel";
23
+ import { OfferItemRecurringDurationUnit } from "../enum/OfferItemRecurringDurationUnit";
24
+ import { OfferItemRecurringModel } from "../enum/OfferItemRecurringModel";
25
+ import { OfferItemRecurringTieredType } from "../enum/OfferItemRecurringTieredType";
26
+ import { OfferItemRecurringUsageTieredType } from "../enum/OfferItemRecurringUsageTieredType";
27
+ import { OfferItemRecurringUsageType } from "../enum/OfferItemRecurringUsageType";
28
+ import { OfferItemType } from "../enum/OfferItemType";
29
+ import { OfferRow } from "./OfferRow";
30
+ import { ProductRow } from "./ProductRow";
31
+ import { SalesItemRow } from "./SalesItemRow";
32
+
33
+ export type OfferItemFullRow =
34
+ {
35
+ id: string;
36
+ product_id: string;
37
+ sales_item_id: string;
38
+ offer_id: string;
39
+ name: string;
40
+ logo: (string | null);
41
+ order: number;
42
+ dominant: boolean;
43
+ consumable: boolean;
44
+ consumable_asset_id: (string | null);
45
+ expire_value: (number | null);
46
+ expire_unit: (OfferItemExpireUnit | null);
47
+ type: OfferItemType;
48
+ one_off_model: (OfferItemOneOffModel | null);
49
+ one_off_flat_amount: (number | null);
50
+ one_off_package_amount: (number | null);
51
+ one_off_package_per_value: (number | null);
52
+ one_off_package_per_unit: (string | null);
53
+ one_off_choosable_on_gateway: (boolean | null);
54
+ one_off_choosable_suggested_amount: (number | null);
55
+ one_off_choosable_limit_min: (number | null);
56
+ one_off_choosable_limit_max: (number | null);
57
+ recurring_model: (OfferItemRecurringModel | null);
58
+ recurring_duration_value: (number | null);
59
+ recurring_duration_unit: (OfferItemRecurringDurationUnit | null);
60
+ recurring_flat_amount: (number | null);
61
+ recurring_package_amount: (number | null);
62
+ recurring_package_per_value: (number | null);
63
+ recurring_package_per_unit: (string | null);
64
+ recurring_tiered_type: (OfferItemRecurringTieredType | null);
65
+ recurring_tiered_amounts: (any | null);
66
+ recurring_usage_type: (OfferItemRecurringUsageType | null);
67
+ recurring_usage_unit: (string | null);
68
+ recurring_usage_meter_event_name: (string | null);
69
+ recurring_usage_unit_amount: (number | null);
70
+ recurring_usage_package_amount: (number | null);
71
+ recurring_usage_package_per_value: (number | null);
72
+ recurring_usage_package_per_unit: (string | null);
73
+ recurring_usage_tiered_type: (OfferItemRecurringUsageTieredType | null);
74
+ recurring_usage_tiered_amounts: (any | null);
75
+ currency: string;
76
+ was_price: (string | null);
77
+ description: string;
78
+ created_at: Date;
79
+ updated_at: Date;
80
+ product: ProductRow;
81
+ sales_item: SalesItemRow;
82
+ offer: OfferRow;
83
+ }
@@ -26,9 +26,6 @@ import { OfferItemRecurringTieredType } from "../enum/OfferItemRecurringTieredTy
26
26
  import { OfferItemRecurringUsageTieredType } from "../enum/OfferItemRecurringUsageTieredType";
27
27
  import { OfferItemRecurringUsageType } from "../enum/OfferItemRecurringUsageType";
28
28
  import { OfferItemType } from "../enum/OfferItemType";
29
- import { OfferRow } from "./OfferRow";
30
- import { ProductRow } from "./ProductRow";
31
- import { SalesItemRow } from "./SalesItemRow";
32
29
 
33
30
  export type OfferItemRow =
34
31
  {
@@ -77,7 +74,4 @@ export type OfferItemRow =
77
74
  description: string;
78
75
  created_at: Date;
79
76
  updated_at: Date;
80
- product: ProductRow;
81
- sales_item: SalesItemRow;
82
- offer: OfferRow;
83
77
  }
@@ -19,9 +19,6 @@
19
19
  /****************************************************************/
20
20
 
21
21
  import { OfferRecurringDurationUnit } from "../enum/OfferRecurringDurationUnit";
22
- import { ProductRow } from "./ProductRow";
23
- import { SalesItemRow } from "./SalesItemRow";
24
- import { SubscriptionRow } from "./SubscriptionRow";
25
22
 
26
23
  export type OfferRow =
27
24
  {
@@ -41,7 +38,4 @@ export type OfferRow =
41
38
  description: string;
42
39
  created_at: Date;
43
40
  updated_at: Date;
44
- product: ProductRow;
45
- sales_item: SalesItemRow;
46
- subscription: SubscriptionRow;
47
41
  }
@@ -0,0 +1,41 @@
1
+ /****************************************************************/
2
+ /* */
3
+ /* This is an Auto-Generated File */
4
+ /* Made By */
5
+ /* Namirasoft SDK Generator NPM Package */
6
+ /* */
7
+ /****************************************************************/
8
+ /****************************************************************/
9
+ /* */
10
+ /* Please do not make any change to this file */
11
+ /* If any change is required, ns-sdkg command must be used */
12
+ /* */
13
+ /****************************************************************/
14
+ /****************************************************************/
15
+ /* */
16
+ /* Namira Software Corporation */
17
+ /* https://namirasoft.com */
18
+ /* */
19
+ /****************************************************************/
20
+
21
+ import { ProductRow } from "./ProductRow";
22
+ import { SalesItemExpireUnit } from "../enum/SalesItemExpireUnit";
23
+
24
+ export type SalesItemFullRow =
25
+ {
26
+ id: string;
27
+ product_id: string;
28
+ sales_item_group_id: (string | null);
29
+ name: string;
30
+ slug: string;
31
+ logo: string;
32
+ order: number;
33
+ consumable: boolean;
34
+ consumable_asset_id: (string | null);
35
+ expire_value: number;
36
+ expire_unit: SalesItemExpireUnit;
37
+ description: string;
38
+ created_at: Date;
39
+ updated_at: Date;
40
+ product: ProductRow;
41
+ }
@@ -18,7 +18,6 @@
18
18
  /* */
19
19
  /****************************************************************/
20
20
 
21
- import { ProductRow } from "./ProductRow";
22
21
  import { SalesItemExpireUnit } from "../enum/SalesItemExpireUnit";
23
22
 
24
23
  export type SalesItemRow =
@@ -37,5 +36,4 @@ export type SalesItemRow =
37
36
  description: string;
38
37
  created_at: Date;
39
38
  updated_at: Date;
40
- product: ProductRow;
41
39
  }