@stigg/typescript 0.1.0-alpha.2 → 0.1.0-alpha.4

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 (135) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/client.d.mts +2 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +2 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js.map +1 -1
  7. package/client.mjs +1 -1
  8. package/client.mjs.map +1 -1
  9. package/package.json +1 -1
  10. package/resources/index.d.mts +1 -1
  11. package/resources/index.d.mts.map +1 -1
  12. package/resources/index.d.ts +1 -1
  13. package/resources/index.d.ts.map +1 -1
  14. package/resources/index.js.map +1 -1
  15. package/resources/index.mjs +1 -1
  16. package/resources/index.mjs.map +1 -1
  17. package/resources/v1/coupons.d.mts +28 -78
  18. package/resources/v1/coupons.d.mts.map +1 -1
  19. package/resources/v1/coupons.d.ts +28 -78
  20. package/resources/v1/coupons.d.ts.map +1 -1
  21. package/resources/v1/coupons.js +3 -3
  22. package/resources/v1/coupons.mjs +3 -3
  23. package/resources/v1/customers/customers.d.mts +132 -48
  24. package/resources/v1/customers/customers.d.mts.map +1 -1
  25. package/resources/v1/customers/customers.d.ts +132 -48
  26. package/resources/v1/customers/customers.d.ts.map +1 -1
  27. package/resources/v1/customers/customers.js +21 -15
  28. package/resources/v1/customers/customers.js.map +1 -1
  29. package/resources/v1/customers/customers.mjs +21 -15
  30. package/resources/v1/customers/customers.mjs.map +1 -1
  31. package/resources/v1/customers/index.d.mts +2 -2
  32. package/resources/v1/customers/index.d.mts.map +1 -1
  33. package/resources/v1/customers/index.d.ts +2 -2
  34. package/resources/v1/customers/index.d.ts.map +1 -1
  35. package/resources/v1/customers/index.js +3 -3
  36. package/resources/v1/customers/index.js.map +1 -1
  37. package/resources/v1/customers/index.mjs +1 -1
  38. package/resources/v1/customers/index.mjs.map +1 -1
  39. package/resources/v1/customers/payment-method.d.mts +5 -2
  40. package/resources/v1/customers/payment-method.d.mts.map +1 -1
  41. package/resources/v1/customers/payment-method.d.ts +5 -2
  42. package/resources/v1/customers/payment-method.d.ts.map +1 -1
  43. package/resources/v1/customers/payment-method.js +2 -2
  44. package/resources/v1/customers/payment-method.mjs +2 -2
  45. package/resources/v1/customers/promotional-entitlements.d.mts +350 -0
  46. package/resources/v1/customers/promotional-entitlements.d.mts.map +1 -0
  47. package/resources/v1/customers/promotional-entitlements.d.ts +350 -0
  48. package/resources/v1/customers/promotional-entitlements.d.ts.map +1 -0
  49. package/resources/v1/customers/promotional-entitlements.js +23 -0
  50. package/resources/v1/customers/promotional-entitlements.js.map +1 -0
  51. package/resources/v1/customers/promotional-entitlements.mjs +19 -0
  52. package/resources/v1/customers/promotional-entitlements.mjs.map +1 -0
  53. package/resources/v1/events.d.mts +62 -0
  54. package/resources/v1/events.d.mts.map +1 -0
  55. package/resources/v1/events.d.ts +62 -0
  56. package/resources/v1/events.d.ts.map +1 -0
  57. package/resources/v1/events.js +15 -0
  58. package/resources/v1/events.js.map +1 -0
  59. package/resources/v1/events.mjs +11 -0
  60. package/resources/v1/events.mjs.map +1 -0
  61. package/resources/v1/index.d.mts +6 -4
  62. package/resources/v1/index.d.mts.map +1 -1
  63. package/resources/v1/index.d.ts +6 -4
  64. package/resources/v1/index.d.ts.map +1 -1
  65. package/resources/v1/index.js +5 -1
  66. package/resources/v1/index.js.map +1 -1
  67. package/resources/v1/index.mjs +3 -1
  68. package/resources/v1/index.mjs.map +1 -1
  69. package/resources/v1/subscriptions/future-update.d.mts +11 -19
  70. package/resources/v1/subscriptions/future-update.d.mts.map +1 -1
  71. package/resources/v1/subscriptions/future-update.d.ts +11 -19
  72. package/resources/v1/subscriptions/future-update.d.ts.map +1 -1
  73. package/resources/v1/subscriptions/future-update.js +2 -2
  74. package/resources/v1/subscriptions/future-update.js.map +1 -1
  75. package/resources/v1/subscriptions/future-update.mjs +2 -2
  76. package/resources/v1/subscriptions/future-update.mjs.map +1 -1
  77. package/resources/v1/subscriptions/index.d.mts +2 -2
  78. package/resources/v1/subscriptions/index.d.mts.map +1 -1
  79. package/resources/v1/subscriptions/index.d.ts +2 -2
  80. package/resources/v1/subscriptions/index.d.ts.map +1 -1
  81. package/resources/v1/subscriptions/index.js.map +1 -1
  82. package/resources/v1/subscriptions/index.mjs +1 -1
  83. package/resources/v1/subscriptions/index.mjs.map +1 -1
  84. package/resources/v1/subscriptions/subscriptions.d.mts +1354 -446
  85. package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
  86. package/resources/v1/subscriptions/subscriptions.d.ts +1354 -446
  87. package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
  88. package/resources/v1/subscriptions/subscriptions.js +29 -11
  89. package/resources/v1/subscriptions/subscriptions.js.map +1 -1
  90. package/resources/v1/subscriptions/subscriptions.mjs +30 -12
  91. package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
  92. package/resources/v1/usage.d.mts +229 -0
  93. package/resources/v1/usage.d.mts.map +1 -0
  94. package/resources/v1/usage.d.ts +229 -0
  95. package/resources/v1/usage.d.ts.map +1 -0
  96. package/resources/v1/usage.js +23 -0
  97. package/resources/v1/usage.js.map +1 -0
  98. package/resources/v1/usage.mjs +19 -0
  99. package/resources/v1/usage.mjs.map +1 -0
  100. package/resources/v1/v1.d.mts +14 -149
  101. package/resources/v1/v1.d.mts.map +1 -1
  102. package/resources/v1/v1.d.ts +14 -149
  103. package/resources/v1/v1.d.ts.map +1 -1
  104. package/resources/v1/v1.js +8 -12
  105. package/resources/v1/v1.js.map +1 -1
  106. package/resources/v1/v1.mjs +8 -12
  107. package/resources/v1/v1.mjs.map +1 -1
  108. package/src/client.ts +2 -14
  109. package/src/resources/index.ts +1 -7
  110. package/src/resources/v1/coupons.ts +28 -211
  111. package/src/resources/v1/customers/customers.ts +167 -62
  112. package/src/resources/v1/customers/index.ts +10 -2
  113. package/src/resources/v1/customers/payment-method.ts +5 -2
  114. package/src/resources/v1/customers/promotional-entitlements.ts +466 -0
  115. package/src/resources/v1/events.ts +73 -0
  116. package/src/resources/v1/index.ts +19 -15
  117. package/src/resources/v1/subscriptions/future-update.ts +11 -27
  118. package/src/resources/v1/subscriptions/index.ts +8 -11
  119. package/src/resources/v1/subscriptions/subscriptions.ts +2987 -689
  120. package/src/resources/v1/usage.ts +283 -0
  121. package/src/resources/v1/v1.ts +50 -197
  122. package/src/version.ts +1 -1
  123. package/version.d.mts +1 -1
  124. package/version.d.ts +1 -1
  125. package/version.js +1 -1
  126. package/version.mjs +1 -1
  127. package/resources/v1/customers/usage.d.mts +0 -98
  128. package/resources/v1/customers/usage.d.mts.map +0 -1
  129. package/resources/v1/customers/usage.d.ts +0 -98
  130. package/resources/v1/customers/usage.d.ts.map +0 -1
  131. package/resources/v1/customers/usage.js +0 -20
  132. package/resources/v1/customers/usage.js.map +0 -1
  133. package/resources/v1/customers/usage.mjs +0 -16
  134. package/resources/v1/customers/usage.mjs.map +0 -1
  135. package/src/resources/v1/customers/usage.ts +0 -132
@@ -4,11 +4,11 @@ import { APIPromise } from "../../../core/api-promise.js";
4
4
  import { RequestOptions } from "../../../internal/request-options.js";
5
5
  export declare class PaymentMethod extends APIResource {
6
6
  /**
7
- * Perform payment-method attachment on a Customer
7
+ * Attach payment method
8
8
  */
9
9
  attach(id: string, body: PaymentMethodAttachParams, options?: RequestOptions): APIPromise<CustomersAPI.CustomerResponse>;
10
10
  /**
11
- * Perform payment-method detachment on a Customer
11
+ * Detach payment method
12
12
  */
13
13
  detach(id: string, options?: RequestOptions): APIPromise<CustomersAPI.CustomerResponse>;
14
14
  }
@@ -25,6 +25,9 @@ export interface PaymentMethodAttachParams {
25
25
  * The vendor identifier of integration
26
26
  */
27
27
  vendorIdentifier: 'AUTH0' | 'ZUORA' | 'STRIPE' | 'HUBSPOT' | 'AWS_MARKETPLACE' | 'SNOWFLAKE' | 'SALESFORCE' | 'BIG_QUERY' | 'OPEN_FGA' | 'APP_STORE';
28
+ /**
29
+ * Customers selected currency
30
+ */
28
31
  billingCurrency?: 'usd' | 'aed' | 'all' | 'amd' | 'ang' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bif' | 'bmd' | 'bnd' | 'bsd' | 'bwp' | 'byn' | 'bzd' | 'brl' | 'cad' | 'cdf' | 'chf' | 'cny' | 'czk' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'etb' | 'eur' | 'fjd' | 'gbp' | 'gel' | 'gip' | 'gmd' | 'gyd' | 'hkd' | 'hrk' | 'htg' | 'idr' | 'ils' | 'inr' | 'isk' | 'jmd' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'krw' | 'kyd' | 'kzt' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mvr' | 'mwk' | 'mxn' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nok' | 'npr' | 'nzd' | 'pgk' | 'php' | 'pkr' | 'pln' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sek' | 'sgd' | 'sle' | 'sll' | 'sos' | 'szl' | 'thb' | 'tjs' | 'top' | 'try' | 'ttd' | 'tzs' | 'uah' | 'uzs' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xcd' | 'yer' | 'zar' | 'zmw' | 'clp' | 'djf' | 'gnf' | 'ugx' | 'pyg' | 'xof' | 'xpf' | null;
29
32
  }
30
33
  export declare namespace PaymentMethod {
@@ -1 +1 @@
1
- {"version":3,"file":"payment-method.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/customers/payment-method.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,YAAY;OACjB,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;OAEG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,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AAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,IAAI,CAAC;CACV;AAED,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EAAE,KAAK,yBAAyB,IAAI,yBAAyB,EAAE,CAAC;CACxE"}
1
+ {"version":3,"file":"payment-method.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/customers/payment-method.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,YAAY;OACjB,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;OAEG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,yBAAyB,EAC/B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,YAAY,CAAC,gBAAgB,CAAC;IAI5C;;OAEG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,YAAY,CAAC,gBAAgB,CAAC;CAGxF;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,gBAAgB,EACZ,OAAO,GACP,OAAO,GACP,QAAQ,GACR,SAAS,GACT,iBAAiB,GACjB,WAAW,GACX,YAAY,GACZ,WAAW,GACX,UAAU,GACV,WAAW,CAAC;IAEhB;;OAEG;IACH,eAAe,CAAC,EACZ,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,IAAI,CAAC;CACV;AAED,MAAM,CAAC,OAAO,WAAW,aAAa,CAAC;IACrC,OAAO,EAAE,KAAK,yBAAyB,IAAI,yBAAyB,EAAE,CAAC;CACxE"}
@@ -6,13 +6,13 @@ const resource_1 = require("../../../core/resource.js");
6
6
  const path_1 = require("../../../internal/utils/path.js");
7
7
  class PaymentMethod extends resource_1.APIResource {
8
8
  /**
9
- * Perform payment-method attachment on a Customer
9
+ * Attach payment method
10
10
  */
11
11
  attach(id, body, options) {
12
12
  return this._client.post((0, path_1.path) `/api/v1/customers/${id}/payment-method`, { body, ...options });
13
13
  }
14
14
  /**
15
- * Perform payment-method detachment on a Customer
15
+ * Detach payment method
16
16
  */
17
17
  detach(id, options) {
18
18
  return this._client.delete((0, path_1.path) `/api/v1/customers/${id}/payment-method`, options);
@@ -3,13 +3,13 @@ import { APIResource } from "../../../core/resource.mjs";
3
3
  import { path } from "../../../internal/utils/path.mjs";
4
4
  export class PaymentMethod extends APIResource {
5
5
  /**
6
- * Perform payment-method attachment on a Customer
6
+ * Attach payment method
7
7
  */
8
8
  attach(id, body, options) {
9
9
  return this._client.post(path `/api/v1/customers/${id}/payment-method`, { body, ...options });
10
10
  }
11
11
  /**
12
- * Perform payment-method detachment on a Customer
12
+ * Detach payment method
13
13
  */
14
14
  detach(id, options) {
15
15
  return this._client.delete(path `/api/v1/customers/${id}/payment-method`, options);
@@ -0,0 +1,350 @@
1
+ import { APIResource } from "../../../core/resource.mjs";
2
+ import { APIPromise } from "../../../core/api-promise.mjs";
3
+ import { RequestOptions } from "../../../internal/request-options.mjs";
4
+ export declare class PromotionalEntitlements extends APIResource {
5
+ /**
6
+ * Create a promotional entitlements
7
+ */
8
+ grant(customerID: string, body: PromotionalEntitlementGrantParams, options?: RequestOptions): APIPromise<PromotionalEntitlementGrantResponse>;
9
+ /**
10
+ * Revoke promotional entitlement
11
+ */
12
+ revoke(featureID: string, params: PromotionalEntitlementRevokeParams, options?: RequestOptions): APIPromise<PromotionalEntitlementRevokeResponse>;
13
+ }
14
+ /**
15
+ * Response object
16
+ */
17
+ export interface PromotionalEntitlementGrantResponse {
18
+ data: Array<PromotionalEntitlementGrantResponse.Data>;
19
+ }
20
+ export declare namespace PromotionalEntitlementGrantResponse {
21
+ /**
22
+ * Granted feature entitlement
23
+ */
24
+ interface Data {
25
+ /**
26
+ * Unique identifier for the entity
27
+ */
28
+ id: string;
29
+ /**
30
+ * Timestamp of when the record was created
31
+ */
32
+ createdAt: string;
33
+ /**
34
+ * The description of the entitlement
35
+ */
36
+ description: string | null;
37
+ /**
38
+ * The end date of the promotional entitlement
39
+ */
40
+ endDate: string | null;
41
+ /**
42
+ * The enum values of the entitlement
43
+ */
44
+ enumValues: Array<string> | null;
45
+ /**
46
+ * The unique identifier for the environment
47
+ */
48
+ environmentId: string;
49
+ /**
50
+ * Feature group IDs associated with this entitlement
51
+ */
52
+ featureGroupIds: Array<string> | null;
53
+ /**
54
+ * The unique identifier of the entitlement feature
55
+ */
56
+ featureId: string;
57
+ /**
58
+ * Whether the entitlement has a soft limit
59
+ */
60
+ hasSoftLimit: boolean | null;
61
+ /**
62
+ * Whether the entitlement has an unlimited usage
63
+ */
64
+ hasUnlimitedUsage: boolean | null;
65
+ /**
66
+ * Whether the entitlement is visible
67
+ */
68
+ isVisible: boolean;
69
+ /**
70
+ * The grant period of the promotional entitlement
71
+ */
72
+ period: '1 week' | '1 month' | '6 month' | '1 year' | 'lifetime' | 'custom';
73
+ /**
74
+ * The reset period of the entitlement
75
+ */
76
+ resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR' | null;
77
+ /**
78
+ * The reset period configuration of the entitlement
79
+ */
80
+ resetPeriodConfiguration: Data.YearlyResetPeriodConfig | Data.MonthlyResetPeriodConfig | Data.WeeklyResetPeriodConfig | null;
81
+ /**
82
+ * The start date of the entitlement
83
+ */
84
+ startDate: string;
85
+ /**
86
+ * The status of the entitlement
87
+ */
88
+ status: 'Active' | 'Expired' | 'Paused';
89
+ /**
90
+ * Timestamp of when the record was last updated
91
+ */
92
+ updatedAt: string;
93
+ /**
94
+ * The usage limit of the entitlement
95
+ */
96
+ usageLimit: number | null;
97
+ }
98
+ namespace Data {
99
+ /**
100
+ * Yearly reset configuration
101
+ */
102
+ interface YearlyResetPeriodConfig {
103
+ /**
104
+ * Reset anchor (SubscriptionStart)
105
+ */
106
+ accordingTo: 'SubscriptionStart';
107
+ }
108
+ /**
109
+ * Monthly reset configuration
110
+ */
111
+ interface MonthlyResetPeriodConfig {
112
+ /**
113
+ * Reset anchor (SubscriptionStart or StartOfTheMonth)
114
+ */
115
+ accordingTo: 'SubscriptionStart' | 'StartOfTheMonth';
116
+ }
117
+ /**
118
+ * Weekly reset configuration
119
+ */
120
+ interface WeeklyResetPeriodConfig {
121
+ /**
122
+ * Reset anchor (SubscriptionStart or specific day)
123
+ */
124
+ accordingTo: 'SubscriptionStart' | 'EverySunday' | 'EveryMonday' | 'EveryTuesday' | 'EveryWednesday' | 'EveryThursday' | 'EveryFriday' | 'EverySaturday';
125
+ }
126
+ }
127
+ }
128
+ /**
129
+ * Response object
130
+ */
131
+ export interface PromotionalEntitlementRevokeResponse {
132
+ /**
133
+ * Granted feature entitlement
134
+ */
135
+ data: PromotionalEntitlementRevokeResponse.Data;
136
+ }
137
+ export declare namespace PromotionalEntitlementRevokeResponse {
138
+ /**
139
+ * Granted feature entitlement
140
+ */
141
+ interface Data {
142
+ /**
143
+ * Unique identifier for the entity
144
+ */
145
+ id: string;
146
+ /**
147
+ * Timestamp of when the record was created
148
+ */
149
+ createdAt: string;
150
+ /**
151
+ * The description of the entitlement
152
+ */
153
+ description: string | null;
154
+ /**
155
+ * The end date of the promotional entitlement
156
+ */
157
+ endDate: string | null;
158
+ /**
159
+ * The enum values of the entitlement
160
+ */
161
+ enumValues: Array<string> | null;
162
+ /**
163
+ * The unique identifier for the environment
164
+ */
165
+ environmentId: string;
166
+ /**
167
+ * Feature group IDs associated with this entitlement
168
+ */
169
+ featureGroupIds: Array<string> | null;
170
+ /**
171
+ * The unique identifier of the entitlement feature
172
+ */
173
+ featureId: string;
174
+ /**
175
+ * Whether the entitlement has a soft limit
176
+ */
177
+ hasSoftLimit: boolean | null;
178
+ /**
179
+ * Whether the entitlement has an unlimited usage
180
+ */
181
+ hasUnlimitedUsage: boolean | null;
182
+ /**
183
+ * Whether the entitlement is visible
184
+ */
185
+ isVisible: boolean;
186
+ /**
187
+ * The grant period of the promotional entitlement
188
+ */
189
+ period: '1 week' | '1 month' | '6 month' | '1 year' | 'lifetime' | 'custom';
190
+ /**
191
+ * The reset period of the entitlement
192
+ */
193
+ resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR' | null;
194
+ /**
195
+ * The reset period configuration of the entitlement
196
+ */
197
+ resetPeriodConfiguration: Data.YearlyResetPeriodConfig | Data.MonthlyResetPeriodConfig | Data.WeeklyResetPeriodConfig | null;
198
+ /**
199
+ * The start date of the entitlement
200
+ */
201
+ startDate: string;
202
+ /**
203
+ * The status of the entitlement
204
+ */
205
+ status: 'Active' | 'Expired' | 'Paused';
206
+ /**
207
+ * Timestamp of when the record was last updated
208
+ */
209
+ updatedAt: string;
210
+ /**
211
+ * The usage limit of the entitlement
212
+ */
213
+ usageLimit: number | null;
214
+ }
215
+ namespace Data {
216
+ /**
217
+ * Yearly reset configuration
218
+ */
219
+ interface YearlyResetPeriodConfig {
220
+ /**
221
+ * Reset anchor (SubscriptionStart)
222
+ */
223
+ accordingTo: 'SubscriptionStart';
224
+ }
225
+ /**
226
+ * Monthly reset configuration
227
+ */
228
+ interface MonthlyResetPeriodConfig {
229
+ /**
230
+ * Reset anchor (SubscriptionStart or StartOfTheMonth)
231
+ */
232
+ accordingTo: 'SubscriptionStart' | 'StartOfTheMonth';
233
+ }
234
+ /**
235
+ * Weekly reset configuration
236
+ */
237
+ interface WeeklyResetPeriodConfig {
238
+ /**
239
+ * Reset anchor (SubscriptionStart or specific day)
240
+ */
241
+ accordingTo: 'SubscriptionStart' | 'EverySunday' | 'EveryMonday' | 'EveryTuesday' | 'EveryWednesday' | 'EveryThursday' | 'EveryFriday' | 'EverySaturday';
242
+ }
243
+ }
244
+ }
245
+ export interface PromotionalEntitlementGrantParams {
246
+ /**
247
+ * Promotional entitlements to grant
248
+ */
249
+ promotionalEntitlements: Array<PromotionalEntitlementGrantParams.PromotionalEntitlement>;
250
+ }
251
+ export declare namespace PromotionalEntitlementGrantParams {
252
+ /**
253
+ * Single entitlement grant config
254
+ */
255
+ interface PromotionalEntitlement {
256
+ /**
257
+ * The custom end date of the promotional entitlement
258
+ */
259
+ customEndDate: string | null;
260
+ /**
261
+ * The enum values of the entitlement
262
+ */
263
+ enumValues: Array<string> | null;
264
+ /**
265
+ * The unique identifier of the entitlement feature
266
+ */
267
+ featureId: string;
268
+ /**
269
+ * Whether the entitlement has a soft limit
270
+ */
271
+ hasSoftLimit: boolean | null;
272
+ /**
273
+ * Whether the entitlement has an unlimited usage
274
+ */
275
+ hasUnlimitedUsage: boolean | null;
276
+ /**
277
+ * Whether the entitlement is visible
278
+ */
279
+ isVisible: boolean | null;
280
+ /**
281
+ * The monthly reset period configuration of the entitlement, defined when reset
282
+ * period is monthly
283
+ */
284
+ monthlyResetPeriodConfiguration: PromotionalEntitlement.MonthlyResetPeriodConfiguration | null;
285
+ /**
286
+ * The grant period of the promotional entitlement
287
+ */
288
+ period: '1 week' | '1 month' | '6 month' | '1 year' | 'lifetime' | 'custom';
289
+ /**
290
+ * The reset period of the entitlement
291
+ */
292
+ resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR' | null;
293
+ /**
294
+ * The usage limit of the entitlement
295
+ */
296
+ usageLimit: number | null;
297
+ /**
298
+ * The weekly reset period configuration of the entitlement, defined when reset
299
+ * period is weekly
300
+ */
301
+ weeklyResetPeriodConfiguration: PromotionalEntitlement.WeeklyResetPeriodConfiguration | null;
302
+ /**
303
+ * The yearly reset period configuration of the entitlement, defined when reset
304
+ * period is yearly
305
+ */
306
+ yearlyResetPeriodConfiguration: PromotionalEntitlement.YearlyResetPeriodConfiguration | null;
307
+ }
308
+ namespace PromotionalEntitlement {
309
+ /**
310
+ * The monthly reset period configuration of the entitlement, defined when reset
311
+ * period is monthly
312
+ */
313
+ interface MonthlyResetPeriodConfiguration {
314
+ /**
315
+ * Reset anchor (SubscriptionStart or StartOfTheMonth)
316
+ */
317
+ accordingTo: 'SubscriptionStart' | 'StartOfTheMonth';
318
+ }
319
+ /**
320
+ * The weekly reset period configuration of the entitlement, defined when reset
321
+ * period is weekly
322
+ */
323
+ interface WeeklyResetPeriodConfiguration {
324
+ /**
325
+ * Reset anchor (SubscriptionStart or specific day)
326
+ */
327
+ accordingTo: 'SubscriptionStart' | 'EverySunday' | 'EveryMonday' | 'EveryTuesday' | 'EveryWednesday' | 'EveryThursday' | 'EveryFriday' | 'EverySaturday';
328
+ }
329
+ /**
330
+ * The yearly reset period configuration of the entitlement, defined when reset
331
+ * period is yearly
332
+ */
333
+ interface YearlyResetPeriodConfiguration {
334
+ /**
335
+ * Reset anchor (SubscriptionStart)
336
+ */
337
+ accordingTo: 'SubscriptionStart';
338
+ }
339
+ }
340
+ }
341
+ export interface PromotionalEntitlementRevokeParams {
342
+ /**
343
+ * The unique identifier of the customer
344
+ */
345
+ customerId: string;
346
+ }
347
+ export declare namespace PromotionalEntitlements {
348
+ export { type PromotionalEntitlementGrantResponse as PromotionalEntitlementGrantResponse, type PromotionalEntitlementRevokeResponse as PromotionalEntitlementRevokeResponse, type PromotionalEntitlementGrantParams as PromotionalEntitlementGrantParams, type PromotionalEntitlementRevokeParams as PromotionalEntitlementRevokeParams, };
349
+ }
350
+ //# sourceMappingURL=promotional-entitlements.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"promotional-entitlements.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/customers/promotional-entitlements.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,uBAAwB,SAAQ,WAAW;IACtD;;OAEG;IACH,KAAK,CACH,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,iCAAiC,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mCAAmC,CAAC;IAIlD;;OAEG;IACH,MAAM,CACJ,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,kCAAkC,EAC1C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,oCAAoC,CAAC;CAIpD;AAED;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAClD,IAAI,EAAE,KAAK,CAAC,mCAAmC,CAAC,IAAI,CAAC,CAAC;CACvD;AAED,yBAAiB,mCAAmC,CAAC;IACnD;;OAEG;IACH,UAAiB,IAAI;QACnB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;WAEG;QACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;QAE3B;;WAEG;QACH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;QAEvB;;WAEG;QACH,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;QAEjC;;WAEG;QACH,aAAa,EAAE,MAAM,CAAC;QAEtB;;WAEG;QACH,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;QAEtC;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;WAEG;QACH,YAAY,EAAE,OAAO,GAAG,IAAI,CAAC;QAE7B;;WAEG;QACH,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