@stigg/typescript 0.1.0-alpha.7 → 0.1.0-alpha.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.
Files changed (190) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/client.d.mts.map +1 -1
  3. package/client.d.ts.map +1 -1
  4. package/client.js +7 -0
  5. package/client.js.map +1 -1
  6. package/client.mjs +7 -0
  7. package/client.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/v1/coupons.d.mts +25 -1
  10. package/resources/v1/coupons.d.mts.map +1 -1
  11. package/resources/v1/coupons.d.ts +25 -1
  12. package/resources/v1/coupons.d.ts.map +1 -1
  13. package/resources/v1/coupons.js +12 -0
  14. package/resources/v1/coupons.js.map +1 -1
  15. package/resources/v1/coupons.mjs +12 -0
  16. package/resources/v1/coupons.mjs.map +1 -1
  17. package/resources/v1/customers/customers.d.mts +2 -2
  18. package/resources/v1/customers/customers.d.mts.map +1 -1
  19. package/resources/v1/customers/customers.d.ts +2 -2
  20. package/resources/v1/customers/customers.d.ts.map +1 -1
  21. package/resources/v1/customers/customers.js.map +1 -1
  22. package/resources/v1/customers/customers.mjs.map +1 -1
  23. package/resources/v1/customers/index.d.mts +1 -1
  24. package/resources/v1/customers/index.d.mts.map +1 -1
  25. package/resources/v1/customers/index.d.ts +1 -1
  26. package/resources/v1/customers/index.d.ts.map +1 -1
  27. package/resources/v1/customers/index.js.map +1 -1
  28. package/resources/v1/customers/index.mjs.map +1 -1
  29. package/resources/v1/customers/promotional-entitlements.d.mts +155 -9
  30. package/resources/v1/customers/promotional-entitlements.d.mts.map +1 -1
  31. package/resources/v1/customers/promotional-entitlements.d.ts +155 -9
  32. package/resources/v1/customers/promotional-entitlements.d.ts.map +1 -1
  33. package/resources/v1/customers/promotional-entitlements.js +11 -4
  34. package/resources/v1/customers/promotional-entitlements.js.map +1 -1
  35. package/resources/v1/customers/promotional-entitlements.mjs +11 -4
  36. package/resources/v1/customers/promotional-entitlements.mjs.map +1 -1
  37. package/resources/v1/events/addons/addons.d.mts +605 -0
  38. package/resources/v1/events/addons/addons.d.mts.map +1 -0
  39. package/resources/v1/events/addons/addons.d.ts +605 -0
  40. package/resources/v1/events/addons/addons.d.ts.map +1 -0
  41. package/resources/v1/events/addons/addons.js +60 -0
  42. package/resources/v1/events/addons/addons.js.map +1 -0
  43. package/resources/v1/events/addons/addons.mjs +55 -0
  44. package/resources/v1/events/addons/addons.mjs.map +1 -0
  45. package/resources/v1/events/addons/draft.d.mts +121 -0
  46. package/resources/v1/events/addons/draft.d.mts.map +1 -0
  47. package/resources/v1/events/addons/draft.d.ts +121 -0
  48. package/resources/v1/events/addons/draft.d.ts.map +1 -0
  49. package/resources/v1/events/addons/draft.js +22 -0
  50. package/resources/v1/events/addons/draft.js.map +1 -0
  51. package/resources/v1/events/addons/draft.mjs +18 -0
  52. package/resources/v1/events/addons/draft.mjs.map +1 -0
  53. package/resources/v1/events/addons/index.d.mts +3 -0
  54. package/resources/v1/events/addons/index.d.mts.map +1 -0
  55. package/resources/v1/events/addons/index.d.ts +3 -0
  56. package/resources/v1/events/addons/index.d.ts.map +1 -0
  57. package/resources/v1/events/addons/index.js +9 -0
  58. package/resources/v1/events/addons/index.js.map +1 -0
  59. package/resources/v1/events/addons/index.mjs +4 -0
  60. package/resources/v1/events/addons/index.mjs.map +1 -0
  61. package/resources/v1/events/addons.d.mts +2 -0
  62. package/resources/v1/events/addons.d.mts.map +1 -0
  63. package/resources/v1/events/addons.d.ts +2 -0
  64. package/resources/v1/events/addons.d.ts.map +1 -0
  65. package/resources/v1/events/addons.js +6 -0
  66. package/resources/v1/events/addons.js.map +1 -0
  67. package/resources/v1/events/addons.mjs +3 -0
  68. package/resources/v1/events/addons.mjs.map +1 -0
  69. package/resources/v1/events/events.d.mts +75 -0
  70. package/resources/v1/events/events.d.mts.map +1 -0
  71. package/resources/v1/events/events.d.ts +75 -0
  72. package/resources/v1/events/events.d.ts.map +1 -0
  73. package/resources/v1/events/events.js +32 -0
  74. package/resources/v1/events/events.js.map +1 -0
  75. package/resources/v1/events/events.mjs +27 -0
  76. package/resources/v1/events/events.mjs.map +1 -0
  77. package/resources/v1/events/features.d.mts +856 -0
  78. package/resources/v1/events/features.d.mts.map +1 -0
  79. package/resources/v1/events/features.d.ts +856 -0
  80. package/resources/v1/events/features.d.ts.map +1 -0
  81. package/resources/v1/events/features.js +51 -0
  82. package/resources/v1/events/features.js.map +1 -0
  83. package/resources/v1/events/features.mjs +47 -0
  84. package/resources/v1/events/features.mjs.map +1 -0
  85. package/resources/v1/events/index.d.mts +5 -0
  86. package/resources/v1/events/index.d.mts.map +1 -0
  87. package/resources/v1/events/index.d.ts +5 -0
  88. package/resources/v1/events/index.d.ts.map +1 -0
  89. package/resources/v1/events/index.js +13 -0
  90. package/resources/v1/events/index.js.map +1 -0
  91. package/resources/v1/events/index.mjs +6 -0
  92. package/resources/v1/events/index.mjs.map +1 -0
  93. package/resources/v1/events/plans.d.mts +348 -0
  94. package/resources/v1/events/plans.d.mts.map +1 -0
  95. package/resources/v1/events/plans.d.ts +348 -0
  96. package/resources/v1/events/plans.d.ts.map +1 -0
  97. package/resources/v1/events/plans.js +30 -0
  98. package/resources/v1/events/plans.js.map +1 -0
  99. package/resources/v1/events/plans.mjs +26 -0
  100. package/resources/v1/events/plans.mjs.map +1 -0
  101. package/resources/v1/events.d.mts +1 -62
  102. package/resources/v1/events.d.mts.map +1 -1
  103. package/resources/v1/events.d.ts +1 -62
  104. package/resources/v1/events.d.ts.map +1 -1
  105. package/resources/v1/events.js +2 -12
  106. package/resources/v1/events.js.map +1 -1
  107. package/resources/v1/events.mjs +1 -10
  108. package/resources/v1/events.mjs.map +1 -1
  109. package/resources/v1/index.d.mts +3 -3
  110. package/resources/v1/index.d.mts.map +1 -1
  111. package/resources/v1/index.d.ts +3 -3
  112. package/resources/v1/index.d.ts.map +1 -1
  113. package/resources/v1/index.js +4 -4
  114. package/resources/v1/index.js.map +1 -1
  115. package/resources/v1/index.mjs +1 -1
  116. package/resources/v1/index.mjs.map +1 -1
  117. package/resources/v1/products.d.mts +547 -1
  118. package/resources/v1/products.d.mts.map +1 -1
  119. package/resources/v1/products.d.ts +547 -1
  120. package/resources/v1/products.d.ts.map +1 -1
  121. package/resources/v1/products.js +33 -0
  122. package/resources/v1/products.js.map +1 -1
  123. package/resources/v1/products.mjs +33 -0
  124. package/resources/v1/products.mjs.map +1 -1
  125. package/resources/v1/subscriptions/index.d.mts +2 -0
  126. package/resources/v1/subscriptions/index.d.mts.map +1 -1
  127. package/resources/v1/subscriptions/index.d.ts +2 -0
  128. package/resources/v1/subscriptions/index.d.ts.map +1 -1
  129. package/resources/v1/subscriptions/index.js +5 -1
  130. package/resources/v1/subscriptions/index.js.map +1 -1
  131. package/resources/v1/subscriptions/index.mjs +2 -0
  132. package/resources/v1/subscriptions/index.mjs.map +1 -1
  133. package/resources/v1/subscriptions/invoice.d.mts +34 -0
  134. package/resources/v1/subscriptions/invoice.d.mts.map +1 -0
  135. package/resources/v1/subscriptions/invoice.d.ts +34 -0
  136. package/resources/v1/subscriptions/invoice.d.ts.map +1 -0
  137. package/resources/v1/subscriptions/invoice.js +17 -0
  138. package/resources/v1/subscriptions/invoice.js.map +1 -0
  139. package/resources/v1/subscriptions/invoice.mjs +13 -0
  140. package/resources/v1/subscriptions/invoice.mjs.map +1 -0
  141. package/resources/v1/subscriptions/subscriptions.d.mts +15 -7
  142. package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
  143. package/resources/v1/subscriptions/subscriptions.d.ts +15 -7
  144. package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
  145. package/resources/v1/subscriptions/subscriptions.js +8 -0
  146. package/resources/v1/subscriptions/subscriptions.js.map +1 -1
  147. package/resources/v1/subscriptions/subscriptions.mjs +8 -0
  148. package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
  149. package/resources/v1/subscriptions/usage.d.mts +98 -0
  150. package/resources/v1/subscriptions/usage.d.mts.map +1 -0
  151. package/resources/v1/subscriptions/usage.d.ts +98 -0
  152. package/resources/v1/subscriptions/usage.d.ts.map +1 -0
  153. package/resources/v1/subscriptions/usage.js +24 -0
  154. package/resources/v1/subscriptions/usage.js.map +1 -0
  155. package/resources/v1/subscriptions/usage.mjs +20 -0
  156. package/resources/v1/subscriptions/usage.mjs.map +1 -0
  157. package/resources/v1/v1.d.mts +6 -6
  158. package/resources/v1/v1.d.mts.map +1 -1
  159. package/resources/v1/v1.d.ts +6 -6
  160. package/resources/v1/v1.d.ts.map +1 -1
  161. package/resources/v1/v1.js +2 -2
  162. package/resources/v1/v1.js.map +1 -1
  163. package/resources/v1/v1.mjs +2 -2
  164. package/resources/v1/v1.mjs.map +1 -1
  165. package/src/client.ts +8 -0
  166. package/src/resources/v1/coupons.ts +32 -0
  167. package/src/resources/v1/customers/customers.ts +10 -4
  168. package/src/resources/v1/customers/index.ts +5 -2
  169. package/src/resources/v1/customers/promotional-entitlements.ts +217 -16
  170. package/src/resources/v1/events/addons/addons.ts +761 -0
  171. package/src/resources/v1/events/addons/draft.ts +151 -0
  172. package/src/resources/v1/events/addons/index.ts +17 -0
  173. package/src/resources/v1/events/addons.ts +3 -0
  174. package/src/resources/v1/events/events.ts +160 -0
  175. package/src/resources/v1/events/features.ts +1066 -0
  176. package/src/resources/v1/events/index.ts +39 -0
  177. package/src/resources/v1/events/plans.ts +429 -0
  178. package/src/resources/v1/events.ts +1 -72
  179. package/src/resources/v1/index.ts +10 -1
  180. package/src/resources/v1/products.ts +667 -0
  181. package/src/resources/v1/subscriptions/index.ts +7 -0
  182. package/src/resources/v1/subscriptions/invoice.ts +42 -0
  183. package/src/resources/v1/subscriptions/subscriptions.ts +24 -7
  184. package/src/resources/v1/subscriptions/usage.ts +126 -0
  185. package/src/resources/v1/v1.ts +20 -2
  186. package/src/version.ts +1 -1
  187. package/version.d.mts +1 -1
  188. package/version.d.ts +1 -1
  189. package/version.js +1 -1
  190. package/version.mjs +1 -1
@@ -1,14 +1,14 @@
1
1
  import { APIResource } from "../../core/resource.js";
2
2
  import * as CouponsAPI from "./coupons.js";
3
- import { Coupon, CouponCreateParams, CouponListParams, CouponListResponse, CouponListResponsesMyCursorIDPage, Coupons } from "./coupons.js";
4
- import * as EventsAPI from "./events.js";
5
- import { EventReportParams, EventReportResponse, Events } from "./events.js";
3
+ import { Coupon, CouponCreateParams, CouponListParams, CouponListResponse, CouponListResponsesMyCursorIDPage, CouponUpdateCouponParams, Coupons } from "./coupons.js";
6
4
  import * as ProductsAPI from "./products.js";
7
- import { ProductListProductsParams, ProductListProductsResponse, ProductListProductsResponsesMyCursorIDPage, Products } from "./products.js";
5
+ import { ProductArchiveProductResponse, ProductCreateProductParams, ProductCreateProductResponse, ProductDuplicateProductParams, ProductDuplicateProductResponse, ProductListProductsParams, ProductListProductsResponse, ProductListProductsResponsesMyCursorIDPage, ProductUnarchiveProductResponse, ProductUpdateProductParams, ProductUpdateProductResponse, Products } from "./products.js";
8
6
  import * as UsageAPI from "./usage.js";
9
7
  import { Usage, UsageHistoryParams, UsageHistoryResponse, UsageReportParams, UsageReportResponse } from "./usage.js";
10
8
  import * as CustomersAPI from "./customers/customers.js";
11
9
  import { CustomerImportParams, CustomerImportResponse, CustomerListParams, CustomerListResourcesParams, CustomerListResourcesResponse, CustomerListResourcesResponsesMyCursorIDPage, CustomerListResponse, CustomerListResponsesMyCursorIDPage, CustomerProvisionParams, CustomerResponse, CustomerUpdateParams, Customers } from "./customers/customers.js";
10
+ import * as EventsAPI from "./events/events.js";
11
+ import { EventReportParams, EventReportResponse, Events } from "./events/events.js";
12
12
  import * as SubscriptionsAPI from "./subscriptions/subscriptions.js";
13
13
  import { Subscription, SubscriptionCancelParams, SubscriptionDelegateParams, SubscriptionImportParams, SubscriptionImportResponse, SubscriptionListParams, SubscriptionListResponse, SubscriptionListResponsesMyCursorIDPage, SubscriptionMigrateParams, SubscriptionPreviewParams, SubscriptionPreviewResponse, SubscriptionProvisionParams, SubscriptionProvisionResponse, SubscriptionTransferParams, SubscriptionUpdateParams, Subscriptions } from "./subscriptions/subscriptions.js";
14
14
  export declare class V1 extends APIResource {
@@ -22,9 +22,9 @@ export declare class V1 extends APIResource {
22
22
  export declare namespace V1 {
23
23
  export { Customers as Customers, type CustomerResponse as CustomerResponse, type CustomerListResponse as CustomerListResponse, type CustomerImportResponse as CustomerImportResponse, type CustomerListResourcesResponse as CustomerListResourcesResponse, type CustomerListResponsesMyCursorIDPage as CustomerListResponsesMyCursorIDPage, type CustomerListResourcesResponsesMyCursorIDPage as CustomerListResourcesResponsesMyCursorIDPage, type CustomerUpdateParams as CustomerUpdateParams, type CustomerListParams as CustomerListParams, type CustomerImportParams as CustomerImportParams, type CustomerListResourcesParams as CustomerListResourcesParams, type CustomerProvisionParams as CustomerProvisionParams, };
24
24
  export { Subscriptions as Subscriptions, type Subscription as Subscription, type SubscriptionListResponse as SubscriptionListResponse, type SubscriptionImportResponse as SubscriptionImportResponse, type SubscriptionPreviewResponse as SubscriptionPreviewResponse, type SubscriptionProvisionResponse as SubscriptionProvisionResponse, type SubscriptionListResponsesMyCursorIDPage as SubscriptionListResponsesMyCursorIDPage, type SubscriptionUpdateParams as SubscriptionUpdateParams, type SubscriptionListParams as SubscriptionListParams, type SubscriptionCancelParams as SubscriptionCancelParams, type SubscriptionDelegateParams as SubscriptionDelegateParams, type SubscriptionImportParams as SubscriptionImportParams, type SubscriptionMigrateParams as SubscriptionMigrateParams, type SubscriptionPreviewParams as SubscriptionPreviewParams, type SubscriptionProvisionParams as SubscriptionProvisionParams, type SubscriptionTransferParams as SubscriptionTransferParams, };
25
- export { Coupons as Coupons, type Coupon as Coupon, type CouponListResponse as CouponListResponse, type CouponListResponsesMyCursorIDPage as CouponListResponsesMyCursorIDPage, type CouponCreateParams as CouponCreateParams, type CouponListParams as CouponListParams, };
25
+ export { Coupons as Coupons, type Coupon as Coupon, type CouponListResponse as CouponListResponse, type CouponListResponsesMyCursorIDPage as CouponListResponsesMyCursorIDPage, type CouponCreateParams as CouponCreateParams, type CouponListParams as CouponListParams, type CouponUpdateCouponParams as CouponUpdateCouponParams, };
26
26
  export { Events as Events, type EventReportResponse as EventReportResponse, type EventReportParams as EventReportParams, };
27
27
  export { Usage as Usage, type UsageHistoryResponse as UsageHistoryResponse, type UsageReportResponse as UsageReportResponse, type UsageHistoryParams as UsageHistoryParams, type UsageReportParams as UsageReportParams, };
28
- export { Products as Products, type ProductListProductsResponse as ProductListProductsResponse, type ProductListProductsResponsesMyCursorIDPage as ProductListProductsResponsesMyCursorIDPage, type ProductListProductsParams as ProductListProductsParams, };
28
+ export { Products as Products, type ProductArchiveProductResponse as ProductArchiveProductResponse, type ProductCreateProductResponse as ProductCreateProductResponse, type ProductDuplicateProductResponse as ProductDuplicateProductResponse, type ProductListProductsResponse as ProductListProductsResponse, type ProductUnarchiveProductResponse as ProductUnarchiveProductResponse, type ProductUpdateProductResponse as ProductUpdateProductResponse, type ProductListProductsResponsesMyCursorIDPage as ProductListProductsResponsesMyCursorIDPage, type ProductCreateProductParams as ProductCreateProductParams, type ProductDuplicateProductParams as ProductDuplicateProductParams, type ProductListProductsParams as ProductListProductsParams, type ProductUpdateProductParams as ProductUpdateProductParams, };
29
29
  }
30
30
  //# sourceMappingURL=v1.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"v1.d.ts","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,EACL,MAAM,EACN,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,iCAAiC,EACjC,OAAO,EACR;OACM,KAAK,SAAS;OACd,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,EAAE;OAClD,KAAK,WAAW;OAChB,EACL,yBAAyB,EACzB,2BAA2B,EAC3B,0CAA0C,EAC1C,QAAQ,EACT;OACM,KAAK,QAAQ;OACb,EACL,KAAK,EACL,kBAAkB,EAClB,oBAAoB,EACpB,iBAAi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AAI,0BAA0B,GAC9D,CAAC;IAEF,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;IAEF,OAAO,EACL,MAAM,IAAI,MAAM,EAChB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;IAEF,OAAO,EACL,KAAK,IAAI,KAAK,EACd,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;IAEF,OAAO,EACL,QAAQ,IAAI,QAAQ,EACpB,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,0CAA0C,IAAI,0CAA0C,EAC7F,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;CACH"}
@@ -6,14 +6,14 @@ const tslib_1 = require("../../internal/tslib.js");
6
6
  const resource_1 = require("../../core/resource.js");
7
7
  const CouponsAPI = tslib_1.__importStar(require("./coupons.js"));
8
8
  const coupons_1 = require("./coupons.js");
9
- const EventsAPI = tslib_1.__importStar(require("./events.js"));
10
- const events_1 = require("./events.js");
11
9
  const ProductsAPI = tslib_1.__importStar(require("./products.js"));
12
10
  const products_1 = require("./products.js");
13
11
  const UsageAPI = tslib_1.__importStar(require("./usage.js"));
14
12
  const usage_1 = require("./usage.js");
15
13
  const CustomersAPI = tslib_1.__importStar(require("./customers/customers.js"));
16
14
  const customers_1 = require("./customers/customers.js");
15
+ const EventsAPI = tslib_1.__importStar(require("./events/events.js"));
16
+ const events_1 = require("./events/events.js");
17
17
  const SubscriptionsAPI = tslib_1.__importStar(require("./subscriptions/subscriptions.js"));
18
18
  const subscriptions_1 = require("./subscriptions/subscriptions.js");
19
19
  class V1 extends resource_1.APIResource {
@@ -1 +1 @@
1
- {"version":3,"file":"v1.js","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,iEAAwC;AACxC,0CAOmB;AACnB,+DAAsC;AACtC,wCAA0E;AAC1E,mEAA0C;AAC1C,4CAKoB;AACpB,6DAAoC;AACpC,sCAMiB;AACjB,+EAAsD;AACtD,wDAa+B;AAC/B,2FAAkE;AAClE,oEAiBuC;AAEvC,MAAa,EAAG,SAAQ,sBAAW;IAAnC;;QACE,cAAS,GAA2B,IAAI,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC7E,kBAAa,GAAmC,IAAI,gBAAgB,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACjG,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9D,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzD,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC1E,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,OAAO,GAAG,iBAAO,CAAC;AACrB,EAAE,CAAC,MAAM,GAAG,eAAM,CAAC;AACnB,EAAE,CAAC,KAAK,GAAG,aAAK,CAAC;AACjB,EAAE,CAAC,QAAQ,GAAG,mBAAQ,CAAC"}
@@ -2,14 +2,14 @@
2
2
  import { APIResource } from "../../core/resource.mjs";
3
3
  import * as CouponsAPI from "./coupons.mjs";
4
4
  import { Coupons, } from "./coupons.mjs";
5
- import * as EventsAPI from "./events.mjs";
6
- import { Events } from "./events.mjs";
7
5
  import * as ProductsAPI from "./products.mjs";
8
6
  import { Products, } from "./products.mjs";
9
7
  import * as UsageAPI from "./usage.mjs";
10
8
  import { Usage, } from "./usage.mjs";
11
9
  import * as CustomersAPI from "./customers/customers.mjs";
12
10
  import { Customers, } from "./customers/customers.mjs";
11
+ import * as EventsAPI from "./events/events.mjs";
12
+ import { Events } from "./events/events.mjs";
13
13
  import * as SubscriptionsAPI from "./subscriptions/subscriptions.mjs";
14
14
  import { Subscriptions, } from "./subscriptions/subscriptions.mjs";
15
15
  export class V1 extends APIResource {
@@ -1 +1 @@
1
- {"version":3,"file":"v1.mjs","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,EAML,OAAO,GACR;OACM,KAAK,SAAS;OACd,EAA0C,MAAM,EAAE;OAClD,KAAK,WAAW;OAChB,EAIL,QAAQ,GACT;OACM,KAAK,QAAQ;OACb,EACL,KAAK,GAKN;OACM,KAAK,YAAY;OACjB,EAYL,SAAS,GACV;OACM,KAAK,gBAAgB;OACrB,EAgBL,aAAa,GACd;AAED,MAAM,OAAO,EAAG,SAAQ,WAAW;IAAnC;;QACE,cAAS,GAA2B,IAAI,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC7E,kBAAa,GAAmC,IAAI,gBAAgB,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CA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C,OAAO,CAAC,CAAC;QACnE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9D,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzD,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC1E,CAAC;CAAA;AAED,EAAE,CAAC,SAAS,GAAG,SAAS,CAAC;AACzB,EAAE,CAAC,aAAa,GAAG,aAAa,CAAC;AACjC,EAAE,CAAC,OAAO,GAAG,OAAO,CAAC;AACrB,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC;AACnB,EAAE,CAAC,KAAK,GAAG,KAAK,CAAC;AACjB,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC"}
package/src/client.ts CHANGED
@@ -708,6 +708,14 @@ export class Stigg {
708
708
  (Symbol.iterator in body && 'next' in body && typeof body.next === 'function'))
709
709
  ) {
710
710
  return { bodyHeaders: undefined, body: Shims.ReadableStreamFrom(body as AsyncIterable<Uint8Array>) };
711
+ } else if (
712
+ typeof body === 'object' &&
713
+ headers.values.get('content-type') === 'application/x-www-form-urlencoded'
714
+ ) {
715
+ return {
716
+ bodyHeaders: { 'content-type': 'application/x-www-form-urlencoded' },
717
+ body: this.stringifyQuery(body as Record<string, unknown>),
718
+ };
711
719
  } else {
712
720
  return this.#encoder({ body, headers });
713
721
  }
@@ -34,6 +34,20 @@ export class Coupons extends APIResource {
34
34
  ...options,
35
35
  });
36
36
  }
37
+
38
+ /**
39
+ * Archives a coupon, preventing it from being applied to new subscriptions.
40
+ */
41
+ archiveCoupon(id: string, options?: RequestOptions): APIPromise<Coupon> {
42
+ return this._client.post(path`/api/v1/coupons/${id}/archive`, options);
43
+ }
44
+
45
+ /**
46
+ * Updates an existing coupon's properties such as name, description, and metadata.
47
+ */
48
+ updateCoupon(id: string, body: CouponUpdateCouponParams, options?: RequestOptions): APIPromise<Coupon> {
49
+ return this._client.patch(path`/api/v1/coupons/${id}`, { body, ...options });
50
+ }
37
51
  }
38
52
 
39
53
  export type CouponListResponsesMyCursorIDPage = MyCursorIDPage<CouponListResponse>;
@@ -675,6 +689,23 @@ export namespace CouponListParams {
675
689
  }
676
690
  }
677
691
 
692
+ export interface CouponUpdateCouponParams {
693
+ /**
694
+ * Description of the coupon
695
+ */
696
+ description?: string | null;
697
+
698
+ /**
699
+ * Metadata associated with the entity
700
+ */
701
+ metadata?: { [key: string]: string } | null;
702
+
703
+ /**
704
+ * Name of the coupon
705
+ */
706
+ name?: string;
707
+ }
708
+
678
709
  export declare namespace Coupons {
679
710
  export {
680
711
  type Coupon as Coupon,
@@ -682,5 +713,6 @@ export declare namespace Coupons {
682
713
  type CouponListResponsesMyCursorIDPage as CouponListResponsesMyCursorIDPage,
683
714
  type CouponCreateParams as CouponCreateParams,
684
715
  type CouponListParams as CouponListParams,
716
+ type CouponUpdateCouponParams as CouponUpdateCouponParams,
685
717
  };
686
718
  }
@@ -5,8 +5,11 @@ import * as PaymentMethodAPI from './payment-method';
5
5
  import { PaymentMethod, PaymentMethodAttachParams } from './payment-method';
6
6
  import * as PromotionalEntitlementsAPI from './promotional-entitlements';
7
7
  import {
8
- PromotionalEntitlementGrantParams,
9
- PromotionalEntitlementGrantResponse,
8
+ PromotionalEntitlementCreateParams,
9
+ PromotionalEntitlementCreateResponse,
10
+ PromotionalEntitlementListParams,
11
+ PromotionalEntitlementListResponse,
12
+ PromotionalEntitlementListResponsesMyCursorIDPage,
10
13
  PromotionalEntitlementRevokeParams,
11
14
  PromotionalEntitlementRevokeResponse,
12
15
  PromotionalEntitlements,
@@ -656,9 +659,12 @@ export declare namespace Customers {
656
659
 
657
660
  export {
658
661
  PromotionalEntitlements as PromotionalEntitlements,
659
- type PromotionalEntitlementGrantResponse as PromotionalEntitlementGrantResponse,
662
+ type PromotionalEntitlementCreateResponse as PromotionalEntitlementCreateResponse,
663
+ type PromotionalEntitlementListResponse as PromotionalEntitlementListResponse,
660
664
  type PromotionalEntitlementRevokeResponse as PromotionalEntitlementRevokeResponse,
661
- type PromotionalEntitlementGrantParams as PromotionalEntitlementGrantParams,
665
+ type PromotionalEntitlementListResponsesMyCursorIDPage as PromotionalEntitlementListResponsesMyCursorIDPage,
666
+ type PromotionalEntitlementCreateParams as PromotionalEntitlementCreateParams,
667
+ type PromotionalEntitlementListParams as PromotionalEntitlementListParams,
662
668
  type PromotionalEntitlementRevokeParams as PromotionalEntitlementRevokeParams,
663
669
  };
664
670
  }
@@ -17,8 +17,11 @@ export {
17
17
  export { PaymentMethod, type PaymentMethodAttachParams } from './payment-method';
18
18
  export {
19
19
  PromotionalEntitlements,
20
- type PromotionalEntitlementGrantResponse,
20
+ type PromotionalEntitlementCreateResponse,
21
+ type PromotionalEntitlementListResponse,
21
22
  type PromotionalEntitlementRevokeResponse,
22
- type PromotionalEntitlementGrantParams,
23
+ type PromotionalEntitlementCreateParams,
24
+ type PromotionalEntitlementListParams,
23
25
  type PromotionalEntitlementRevokeParams,
26
+ type PromotionalEntitlementListResponsesMyCursorIDPage,
24
27
  } from './promotional-entitlements';
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { APIResource } from '../../../core/resource';
4
4
  import { APIPromise } from '../../../core/api-promise';
5
+ import { MyCursorIDPage, type MyCursorIDPageParams, PagePromise } from '../../../core/pagination';
5
6
  import { RequestOptions } from '../../../internal/request-options';
6
7
  import { path } from '../../../internal/utils/path';
7
8
 
@@ -10,12 +11,27 @@ export class PromotionalEntitlements extends APIResource {
10
11
  * Grants promotional entitlements to a customer, providing feature access outside
11
12
  * their subscription. Entitlements can be time-limited or permanent.
12
13
  */
13
- grant(
14
- customerID: string,
15
- body: PromotionalEntitlementGrantParams,
14
+ create(
15
+ id: string,
16
+ body: PromotionalEntitlementCreateParams,
16
17
  options?: RequestOptions,
17
- ): APIPromise<PromotionalEntitlementGrantResponse> {
18
- return this._client.post(path`/api/v1/customers/${customerID}/promotional`, { body, ...options });
18
+ ): APIPromise<PromotionalEntitlementCreateResponse> {
19
+ return this._client.post(path`/api/v1/customers/${id}/promotional-entitlements`, { body, ...options });
20
+ }
21
+
22
+ /**
23
+ * Retrieves a paginated list of a customer's promotional entitlements.
24
+ */
25
+ list(
26
+ id: string,
27
+ query: PromotionalEntitlementListParams | null | undefined = {},
28
+ options?: RequestOptions,
29
+ ): PagePromise<PromotionalEntitlementListResponsesMyCursorIDPage, PromotionalEntitlementListResponse> {
30
+ return this._client.getAPIList(
31
+ path`/api/v1/customers/${id}/promotional-entitlements`,
32
+ MyCursorIDPage<PromotionalEntitlementListResponse>,
33
+ { query, ...options },
34
+ );
19
35
  }
20
36
 
21
37
  /**
@@ -27,19 +43,22 @@ export class PromotionalEntitlements extends APIResource {
27
43
  params: PromotionalEntitlementRevokeParams,
28
44
  options?: RequestOptions,
29
45
  ): APIPromise<PromotionalEntitlementRevokeResponse> {
30
- const { customerId } = params;
31
- return this._client.delete(path`/api/v1/customers/${customerId}/promotional/${featureID}`, options);
46
+ const { id } = params;
47
+ return this._client.delete(path`/api/v1/customers/${id}/promotional-entitlements/${featureID}`, options);
32
48
  }
33
49
  }
34
50
 
51
+ export type PromotionalEntitlementListResponsesMyCursorIDPage =
52
+ MyCursorIDPage<PromotionalEntitlementListResponse>;
53
+
35
54
  /**
36
55
  * Response object
37
56
  */
38
- export interface PromotionalEntitlementGrantResponse {
39
- data: Array<PromotionalEntitlementGrantResponse.Data>;
57
+ export interface PromotionalEntitlementCreateResponse {
58
+ data: Array<PromotionalEntitlementCreateResponse.Data>;
40
59
  }
41
60
 
42
- export namespace PromotionalEntitlementGrantResponse {
61
+ export namespace PromotionalEntitlementCreateResponse {
43
62
  /**
44
63
  * Granted feature entitlement
45
64
  */
@@ -180,6 +199,145 @@ export namespace PromotionalEntitlementGrantResponse {
180
199
  }
181
200
  }
182
201
 
202
+ /**
203
+ * Granted feature entitlement
204
+ */
205
+ export interface PromotionalEntitlementListResponse {
206
+ /**
207
+ * Unique identifier for the entity
208
+ */
209
+ id: string;
210
+
211
+ /**
212
+ * Timestamp of when the record was created
213
+ */
214
+ createdAt: string;
215
+
216
+ /**
217
+ * The description of the entitlement
218
+ */
219
+ description: string | null;
220
+
221
+ /**
222
+ * The end date of the promotional entitlement
223
+ */
224
+ endDate: string | null;
225
+
226
+ /**
227
+ * The enum values of the entitlement
228
+ */
229
+ enumValues: Array<string> | null;
230
+
231
+ /**
232
+ * The unique identifier for the environment
233
+ */
234
+ environmentId: string;
235
+
236
+ /**
237
+ * Feature group IDs associated with this entitlement
238
+ */
239
+ featureGroupIds: Array<string> | null;
240
+
241
+ /**
242
+ * The unique identifier of the entitlement feature
243
+ */
244
+ featureId: string;
245
+
246
+ /**
247
+ * Whether the entitlement has a soft limit
248
+ */
249
+ hasSoftLimit: boolean | null;
250
+
251
+ /**
252
+ * Whether the entitlement has an unlimited usage
253
+ */
254
+ hasUnlimitedUsage: boolean | null;
255
+
256
+ /**
257
+ * Whether the entitlement is visible
258
+ */
259
+ isVisible: boolean;
260
+
261
+ /**
262
+ * The grant period of the promotional entitlement
263
+ */
264
+ period: '1 week' | '1 month' | '6 month' | '1 year' | 'lifetime' | 'custom';
265
+
266
+ /**
267
+ * The reset period of the entitlement
268
+ */
269
+ resetPeriod: 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR' | null;
270
+
271
+ /**
272
+ * The reset period configuration of the entitlement
273
+ */
274
+ resetPeriodConfiguration:
275
+ | PromotionalEntitlementListResponse.YearlyResetPeriodConfig
276
+ | PromotionalEntitlementListResponse.MonthlyResetPeriodConfig
277
+ | PromotionalEntitlementListResponse.WeeklyResetPeriodConfig
278
+ | null;
279
+
280
+ /**
281
+ * The start date of the entitlement
282
+ */
283
+ startDate: string;
284
+
285
+ /**
286
+ * The status of the entitlement
287
+ */
288
+ status: 'Active' | 'Expired' | 'Paused';
289
+
290
+ /**
291
+ * Timestamp of when the record was last updated
292
+ */
293
+ updatedAt: string;
294
+
295
+ /**
296
+ * The usage limit of the entitlement
297
+ */
298
+ usageLimit: number | null;
299
+ }
300
+
301
+ export namespace PromotionalEntitlementListResponse {
302
+ /**
303
+ * Yearly reset configuration
304
+ */
305
+ export interface YearlyResetPeriodConfig {
306
+ /**
307
+ * Reset anchor (SubscriptionStart)
308
+ */
309
+ accordingTo: 'SubscriptionStart';
310
+ }
311
+
312
+ /**
313
+ * Monthly reset configuration
314
+ */
315
+ export interface MonthlyResetPeriodConfig {
316
+ /**
317
+ * Reset anchor (SubscriptionStart or StartOfTheMonth)
318
+ */
319
+ accordingTo: 'SubscriptionStart' | 'StartOfTheMonth';
320
+ }
321
+
322
+ /**
323
+ * Weekly reset configuration
324
+ */
325
+ export interface WeeklyResetPeriodConfig {
326
+ /**
327
+ * Reset anchor (SubscriptionStart or specific day)
328
+ */
329
+ accordingTo:
330
+ | 'SubscriptionStart'
331
+ | 'EverySunday'
332
+ | 'EveryMonday'
333
+ | 'EveryTuesday'
334
+ | 'EveryWednesday'
335
+ | 'EveryThursday'
336
+ | 'EveryFriday'
337
+ | 'EverySaturday';
338
+ }
339
+ }
340
+
183
341
  /**
184
342
  * Response object
185
343
  */
@@ -331,14 +489,14 @@ export namespace PromotionalEntitlementRevokeResponse {
331
489
  }
332
490
  }
333
491
 
334
- export interface PromotionalEntitlementGrantParams {
492
+ export interface PromotionalEntitlementCreateParams {
335
493
  /**
336
494
  * Promotional entitlements to grant
337
495
  */
338
- promotionalEntitlements: Array<PromotionalEntitlementGrantParams.PromotionalEntitlement>;
496
+ promotionalEntitlements: Array<PromotionalEntitlementCreateParams.PromotionalEntitlement>;
339
497
  }
340
498
 
341
- export namespace PromotionalEntitlementGrantParams {
499
+ export namespace PromotionalEntitlementCreateParams {
342
500
  /**
343
501
  * Single entitlement grant config
344
502
  */
@@ -451,18 +609,61 @@ export namespace PromotionalEntitlementGrantParams {
451
609
  }
452
610
  }
453
611
 
612
+ export interface PromotionalEntitlementListParams extends MyCursorIDPageParams {
613
+ /**
614
+ * Filter by creation date using range operators: gt, gte, lt, lte
615
+ */
616
+ createdAt?: PromotionalEntitlementListParams.CreatedAt;
617
+
618
+ /**
619
+ * Filter by promotional entitlement status. Supports comma-separated values for
620
+ * multiple statuses
621
+ */
622
+ status?: string;
623
+ }
624
+
625
+ export namespace PromotionalEntitlementListParams {
626
+ /**
627
+ * Filter by creation date using range operators: gt, gte, lt, lte
628
+ */
629
+ export interface CreatedAt {
630
+ /**
631
+ * Greater than the specified createdAt value
632
+ */
633
+ gt?: string;
634
+
635
+ /**
636
+ * Greater than or equal to the specified createdAt value
637
+ */
638
+ gte?: string;
639
+
640
+ /**
641
+ * Less than the specified createdAt value
642
+ */
643
+ lt?: string;
644
+
645
+ /**
646
+ * Less than or equal to the specified createdAt value
647
+ */
648
+ lte?: string;
649
+ }
650
+ }
651
+
454
652
  export interface PromotionalEntitlementRevokeParams {
455
653
  /**
456
654
  * The unique identifier of the customer
457
655
  */
458
- customerId: string;
656
+ id: string;
459
657
  }
460
658
 
461
659
  export declare namespace PromotionalEntitlements {
462
660
  export {
463
- type PromotionalEntitlementGrantResponse as PromotionalEntitlementGrantResponse,
661
+ type PromotionalEntitlementCreateResponse as PromotionalEntitlementCreateResponse,
662
+ type PromotionalEntitlementListResponse as PromotionalEntitlementListResponse,
464
663
  type PromotionalEntitlementRevokeResponse as PromotionalEntitlementRevokeResponse,
465
- type PromotionalEntitlementGrantParams as PromotionalEntitlementGrantParams,
664
+ type PromotionalEntitlementListResponsesMyCursorIDPage as PromotionalEntitlementListResponsesMyCursorIDPage,
665
+ type PromotionalEntitlementCreateParams as PromotionalEntitlementCreateParams,
666
+ type PromotionalEntitlementListParams as PromotionalEntitlementListParams,
466
667
  type PromotionalEntitlementRevokeParams as PromotionalEntitlementRevokeParams,
467
668
  };
468
669
  }