@stigg/typescript 0.1.0-alpha.7 → 0.1.0-alpha.9

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 +41 -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 +551 -1
  118. package/resources/v1/products.d.mts.map +1 -1
  119. package/resources/v1/products.d.ts +551 -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 +672 -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
@@ -0,0 +1,55 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../../../core/resource.mjs";
3
+ import * as DraftAPI from "./draft.mjs";
4
+ import { Draft } from "./draft.mjs";
5
+ import { MyCursorIDPage } from "../../../../core/pagination.mjs";
6
+ import { path } from "../../../../internal/utils/path.mjs";
7
+ export class Addons extends APIResource {
8
+ constructor() {
9
+ super(...arguments);
10
+ this.draft = new DraftAPI.Draft(this._client);
11
+ }
12
+ /**
13
+ * Archives an addon, preventing it from being used in new subscriptions.
14
+ */
15
+ archiveAddon(id, options) {
16
+ return this._client.post(path `/api/v1/addons/${id}/archive`, options);
17
+ }
18
+ /**
19
+ * Creates a new addon in draft status, associated with a specific product.
20
+ */
21
+ createAddon(body, options) {
22
+ return this._client.post('/api/v1/addons', { body, ...options });
23
+ }
24
+ /**
25
+ * Retrieves a paginated list of addons in the environment.
26
+ */
27
+ listAddons(query = {}, options) {
28
+ return this._client.getAPIList('/api/v1/addons', (MyCursorIDPage), {
29
+ query,
30
+ ...options,
31
+ });
32
+ }
33
+ /**
34
+ * Publishes a draft addon, making it available for use in subscriptions.
35
+ */
36
+ publishAddon(id, body, options) {
37
+ return this._client.post(path `/api/v1/addons/${id}/publish`, { body, ...options });
38
+ }
39
+ /**
40
+ * Retrieves an addon by its unique identifier, including entitlements and pricing
41
+ * details.
42
+ */
43
+ retrieveAddon(id, options) {
44
+ return this._client.get(path `/api/v1/addons/${id}`, options);
45
+ }
46
+ /**
47
+ * Updates an existing addon's properties such as display name, description, and
48
+ * metadata.
49
+ */
50
+ updateAddon(id, body, options) {
51
+ return this._client.patch(path `/api/v1/addons/${id}`, { body, ...options });
52
+ }
53
+ }
54
+ Addons.Draft = Draft;
55
+ //# sourceMappingURL=addons.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addons.mjs","sourceRoot":"","sources":["../../../../src/resources/v1/events/addons/addons.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAA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O,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,kBAAkB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;CACF;AA4pBD,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC"}
@@ -0,0 +1,121 @@
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 Draft extends APIResource {
5
+ /**
6
+ * Creates a draft version of an existing addon for modification before publishing.
7
+ */
8
+ createAddonDraft(id: string, options?: RequestOptions): APIPromise<DraftCreateAddonDraftResponse>;
9
+ /**
10
+ * Removes a draft version of an addon.
11
+ */
12
+ removeAddonDraft(id: string, options?: RequestOptions): APIPromise<DraftRemoveAddonDraftResponse>;
13
+ }
14
+ /**
15
+ * Response object
16
+ */
17
+ export interface DraftCreateAddonDraftResponse {
18
+ /**
19
+ * Addon configuration object
20
+ */
21
+ data: DraftCreateAddonDraftResponse.Data;
22
+ }
23
+ export declare namespace DraftCreateAddonDraftResponse {
24
+ /**
25
+ * Addon configuration object
26
+ */
27
+ interface Data {
28
+ /**
29
+ * The unique identifier for the entity
30
+ */
31
+ id: string;
32
+ /**
33
+ * The unique identifier for the entity in the billing provider
34
+ */
35
+ billingId: string | null;
36
+ /**
37
+ * Timestamp of when the record was created
38
+ */
39
+ createdAt: string;
40
+ /**
41
+ * List of addons the addon is dependant on
42
+ */
43
+ dependencies: Array<string> | null;
44
+ /**
45
+ * The description of the package
46
+ */
47
+ description: string | null;
48
+ /**
49
+ * The display name of the package
50
+ */
51
+ displayName: string;
52
+ /**
53
+ * List of entitlements of the package
54
+ */
55
+ entitlements: Array<Data.Entitlement>;
56
+ /**
57
+ * Indicates if the package is the latest version
58
+ */
59
+ isLatest: boolean | null;
60
+ /**
61
+ * The maximum quantity of this addon that can be added to a subscription
62
+ */
63
+ maxQuantity: number | null;
64
+ /**
65
+ * Metadata associated with the entity
66
+ */
67
+ metadata: {
68
+ [key: string]: string;
69
+ };
70
+ /**
71
+ * The pricing type of the package
72
+ */
73
+ pricingType: 'FREE' | 'PAID' | 'CUSTOM' | null;
74
+ /**
75
+ * The product id of the package
76
+ */
77
+ productId: string;
78
+ /**
79
+ * The status of the package
80
+ */
81
+ status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED';
82
+ /**
83
+ * Timestamp of when the record was last updated
84
+ */
85
+ updatedAt: string;
86
+ /**
87
+ * The version number of the package
88
+ */
89
+ versionNumber: number;
90
+ }
91
+ namespace Data {
92
+ /**
93
+ * Entitlement reference with type and identifier
94
+ */
95
+ interface Entitlement {
96
+ /**
97
+ * The unique identifier for the entity
98
+ */
99
+ id: string;
100
+ type: 'FEATURE' | 'CREDIT';
101
+ }
102
+ }
103
+ }
104
+ /**
105
+ * Response confirming the addon draft was removed.
106
+ */
107
+ export interface DraftRemoveAddonDraftResponse {
108
+ data: DraftRemoveAddonDraftResponse.Data;
109
+ }
110
+ export declare namespace DraftRemoveAddonDraftResponse {
111
+ interface Data {
112
+ /**
113
+ * The unique identifier for the entity
114
+ */
115
+ id: string;
116
+ }
117
+ }
118
+ export declare namespace Draft {
119
+ export { type DraftCreateAddonDraftResponse as DraftCreateAddonDraftResponse, type DraftRemoveAddonDraftResponse as DraftRemoveAddonDraftResponse, };
120
+ }
121
+ //# sourceMappingURL=draft.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"draft.d.mts","sourceRoot":"","sources":["../../../../src/resources/v1/events/addons/draft.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,6BAA6B,CAAC;IAIjG;;OAEG;I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AAC;YAEX,IAAI,EAAE,SAAS,GAAG,QAAQ,CAAC;SAC5B;KACF;CACF;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,6BAA6B,CAAC,IAAI,CAAC;CAC1C;AAED,yBAAiB,6BAA6B,CAAC;IAC7C,UAAiB,IAAI;QACnB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;KACZ;CACF;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,6BAA6B,IAAI,6BAA6B,GACpE,CAAC;CACH"}
@@ -0,0 +1,121 @@
1
+ import { APIResource } from "../../../../core/resource.js";
2
+ import { APIPromise } from "../../../../core/api-promise.js";
3
+ import { RequestOptions } from "../../../../internal/request-options.js";
4
+ export declare class Draft extends APIResource {
5
+ /**
6
+ * Creates a draft version of an existing addon for modification before publishing.
7
+ */
8
+ createAddonDraft(id: string, options?: RequestOptions): APIPromise<DraftCreateAddonDraftResponse>;
9
+ /**
10
+ * Removes a draft version of an addon.
11
+ */
12
+ removeAddonDraft(id: string, options?: RequestOptions): APIPromise<DraftRemoveAddonDraftResponse>;
13
+ }
14
+ /**
15
+ * Response object
16
+ */
17
+ export interface DraftCreateAddonDraftResponse {
18
+ /**
19
+ * Addon configuration object
20
+ */
21
+ data: DraftCreateAddonDraftResponse.Data;
22
+ }
23
+ export declare namespace DraftCreateAddonDraftResponse {
24
+ /**
25
+ * Addon configuration object
26
+ */
27
+ interface Data {
28
+ /**
29
+ * The unique identifier for the entity
30
+ */
31
+ id: string;
32
+ /**
33
+ * The unique identifier for the entity in the billing provider
34
+ */
35
+ billingId: string | null;
36
+ /**
37
+ * Timestamp of when the record was created
38
+ */
39
+ createdAt: string;
40
+ /**
41
+ * List of addons the addon is dependant on
42
+ */
43
+ dependencies: Array<string> | null;
44
+ /**
45
+ * The description of the package
46
+ */
47
+ description: string | null;
48
+ /**
49
+ * The display name of the package
50
+ */
51
+ displayName: string;
52
+ /**
53
+ * List of entitlements of the package
54
+ */
55
+ entitlements: Array<Data.Entitlement>;
56
+ /**
57
+ * Indicates if the package is the latest version
58
+ */
59
+ isLatest: boolean | null;
60
+ /**
61
+ * The maximum quantity of this addon that can be added to a subscription
62
+ */
63
+ maxQuantity: number | null;
64
+ /**
65
+ * Metadata associated with the entity
66
+ */
67
+ metadata: {
68
+ [key: string]: string;
69
+ };
70
+ /**
71
+ * The pricing type of the package
72
+ */
73
+ pricingType: 'FREE' | 'PAID' | 'CUSTOM' | null;
74
+ /**
75
+ * The product id of the package
76
+ */
77
+ productId: string;
78
+ /**
79
+ * The status of the package
80
+ */
81
+ status: 'DRAFT' | 'PUBLISHED' | 'ARCHIVED';
82
+ /**
83
+ * Timestamp of when the record was last updated
84
+ */
85
+ updatedAt: string;
86
+ /**
87
+ * The version number of the package
88
+ */
89
+ versionNumber: number;
90
+ }
91
+ namespace Data {
92
+ /**
93
+ * Entitlement reference with type and identifier
94
+ */
95
+ interface Entitlement {
96
+ /**
97
+ * The unique identifier for the entity
98
+ */
99
+ id: string;
100
+ type: 'FEATURE' | 'CREDIT';
101
+ }
102
+ }
103
+ }
104
+ /**
105
+ * Response confirming the addon draft was removed.
106
+ */
107
+ export interface DraftRemoveAddonDraftResponse {
108
+ data: DraftRemoveAddonDraftResponse.Data;
109
+ }
110
+ export declare namespace DraftRemoveAddonDraftResponse {
111
+ interface Data {
112
+ /**
113
+ * The unique identifier for the entity
114
+ */
115
+ id: string;
116
+ }
117
+ }
118
+ export declare namespace Draft {
119
+ export { type DraftCreateAddonDraftResponse as DraftCreateAddonDraftResponse, type DraftRemoveAddonDraftResponse as DraftRemoveAddonDraftResponse, };
120
+ }
121
+ //# sourceMappingURL=draft.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"draft.d.ts","sourceRoot":"","sources":["../../../../src/resources/v1/events/addons/draft.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EA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AG,UAAU,CAAC;QAE3C;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;WAEG;QACH,aAAa,EAAE,MAAM,CAAC;KACvB;IAED,UAAiB,IAAI,CAAC;QACpB;;WAEG;QACH,UAAiB,WAAW;YAC1B;;eAEG;YACH,EAAE,EAAE,MAAM,CAAC;YAEX,IAAI,EAAE,SAAS,GAAG,QAAQ,CAAC;SAC5B;KACF;CACF;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,6BAA6B,CAAC,IAAI,CAAC;CAC1C;AAED,yBAAiB,6BAA6B,CAAC;IAC7C,UAAiB,IAAI;QACnB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;KACZ;CACF;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,6BAA6B,IAAI,6BAA6B,GACpE,CAAC;CACH"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Draft = void 0;
5
+ const resource_1 = require("../../../../core/resource.js");
6
+ const path_1 = require("../../../../internal/utils/path.js");
7
+ class Draft extends resource_1.APIResource {
8
+ /**
9
+ * Creates a draft version of an existing addon for modification before publishing.
10
+ */
11
+ createAddonDraft(id, options) {
12
+ return this._client.post((0, path_1.path) `/api/v1/addons/${id}/draft`, options);
13
+ }
14
+ /**
15
+ * Removes a draft version of an addon.
16
+ */
17
+ removeAddonDraft(id, options) {
18
+ return this._client.delete((0, path_1.path) `/api/v1/addons/${id}/draft`, options);
19
+ }
20
+ }
21
+ exports.Draft = Draft;
22
+ //# sourceMappingURL=draft.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"draft.js","sourceRoot":"","sources":["../../../../src/resources/v1/events/addons/draft.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,2DAAwD;AAGxD,6DAAuD;AAEvD,MAAa,KAAM,SAAQ,sBAAW;IACpC;;OAEG;IACH,gBAAgB,CAAC,EAAU,EAAE,OAAwB;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,kBAAkB,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IACtE,CAAC;IAED;;OAEG;IACH,gBAAgB,CAAC,EAAU,EAAE,OAAwB;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,kBAAkB,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IACxE,CAAC;CACF;AAdD,sBAcC"}
@@ -0,0 +1,18 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../../../core/resource.mjs";
3
+ import { path } from "../../../../internal/utils/path.mjs";
4
+ export class Draft extends APIResource {
5
+ /**
6
+ * Creates a draft version of an existing addon for modification before publishing.
7
+ */
8
+ createAddonDraft(id, options) {
9
+ return this._client.post(path `/api/v1/addons/${id}/draft`, options);
10
+ }
11
+ /**
12
+ * Removes a draft version of an addon.
13
+ */
14
+ removeAddonDraft(id, options) {
15
+ return this._client.delete(path `/api/v1/addons/${id}/draft`, options);
16
+ }
17
+ }
18
+ //# sourceMappingURL=draft.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"draft.mjs","sourceRoot":"","sources":["../../../../src/resources/v1/events/addons/draft.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,gBAAgB,CAAC,EAAU,EAAE,OAAwB;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,kBAAkB,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IACtE,CAAC;IAED;;OAEG;IACH,gBAAgB,CAAC,EAAU,EAAE,OAAwB;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,kBAAkB,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IACxE,CAAC;CACF"}
@@ -0,0 +1,3 @@
1
+ export { Addons, type AddonArchiveAddonResponse, type AddonCreateAddonResponse, type AddonListAddonsResponse, type AddonPublishAddonResponse, type AddonRetrieveAddonResponse, type AddonUpdateAddonResponse, type AddonCreateAddonParams, type AddonListAddonsParams, type AddonPublishAddonParams, type AddonUpdateAddonParams, type AddonListAddonsResponsesMyCursorIDPage, } from "./addons.mjs";
2
+ export { Draft, type DraftCreateAddonDraftResponse, type DraftRemoveAddonDraftResponse } from "./draft.mjs";
3
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../../src/resources/v1/events/addons/index.ts"],"names":[],"mappings":"OAEO,EACL,MAAM,EACN,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,sCAAsC,GAC5C;OACM,EAAE,KAAK,EAAE,KAAK,6BAA6B,EAAE,KAAK,6BAA6B,EAAE"}
@@ -0,0 +1,3 @@
1
+ export { Addons, type AddonArchiveAddonResponse, type AddonCreateAddonResponse, type AddonListAddonsResponse, type AddonPublishAddonResponse, type AddonRetrieveAddonResponse, type AddonUpdateAddonResponse, type AddonCreateAddonParams, type AddonListAddonsParams, type AddonPublishAddonParams, type AddonUpdateAddonParams, type AddonListAddonsResponsesMyCursorIDPage, } from "./addons.js";
2
+ export { Draft, type DraftCreateAddonDraftResponse, type DraftRemoveAddonDraftResponse } from "./draft.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/resources/v1/events/addons/index.ts"],"names":[],"mappings":"OAEO,EACL,MAAM,EACN,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,sCAAsC,GAC5C;OACM,EAAE,KAAK,EAAE,KAAK,6BAA6B,EAAE,KAAK,6BAA6B,EAAE"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Draft = exports.Addons = void 0;
5
+ var addons_1 = require("./addons.js");
6
+ Object.defineProperty(exports, "Addons", { enumerable: true, get: function () { return addons_1.Addons; } });
7
+ var draft_1 = require("./draft.js");
8
+ Object.defineProperty(exports, "Draft", { enumerable: true, get: function () { return draft_1.Draft; } });
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/resources/v1/events/addons/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sCAakB;AAZhB,gGAAA,MAAM,OAAA;AAaR,oCAAwG;AAA/F,8FAAA,KAAK,OAAA"}
@@ -0,0 +1,4 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export { Addons, } from "./addons.mjs";
3
+ export { Draft } from "./draft.mjs";
4
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../../src/resources/v1/events/addons/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,MAAM,GAYP;OACM,EAAE,KAAK,EAA0E"}
@@ -0,0 +1,2 @@
1
+ export * from "./addons/index.mjs";
2
+ //# sourceMappingURL=addons.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addons.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/events/addons.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from "./addons/index.js";
2
+ //# sourceMappingURL=addons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addons.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/events/addons.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const tslib_1 = require("../../../internal/tslib.js");
5
+ tslib_1.__exportStar(require("./addons/index.js"), exports);
6
+ //# sourceMappingURL=addons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addons.js","sourceRoot":"","sources":["../../../src/resources/v1/events/addons.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,4DAA+B"}
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export * from "./addons/index.mjs";
3
+ //# sourceMappingURL=addons.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addons.mjs","sourceRoot":"","sources":["../../../src/resources/v1/events/addons.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
@@ -0,0 +1,75 @@
1
+ import { APIResource } from "../../../core/resource.mjs";
2
+ import * as FeaturesAPI from "./features.mjs";
3
+ import { FeatureArchiveFeatureResponse, FeatureCreateFeatureParams, FeatureCreateFeatureResponse, FeatureListFeaturesParams, FeatureListFeaturesResponse, FeatureListFeaturesResponsesMyCursorIDPage, FeatureRetrieveFeatureResponse, FeatureUnarchiveFeatureResponse, FeatureUpdateFeatureParams, FeatureUpdateFeatureResponse, Features } from "./features.mjs";
4
+ import * as PlansAPI from "./plans.mjs";
5
+ import { PlanCreateParams, PlanCreateResponse, PlanListParams, PlanListResponse, PlanListResponsesMyCursorIDPage, PlanRetrieveResponse, Plans } from "./plans.mjs";
6
+ import * as AddonsAPI from "./addons/addons.mjs";
7
+ import { AddonArchiveAddonResponse, AddonCreateAddonParams, AddonCreateAddonResponse, AddonListAddonsParams, AddonListAddonsResponse, AddonListAddonsResponsesMyCursorIDPage, AddonPublishAddonParams, AddonPublishAddonResponse, AddonRetrieveAddonResponse, AddonUpdateAddonParams, AddonUpdateAddonResponse, Addons } from "./addons/addons.mjs";
8
+ import { APIPromise } from "../../../core/api-promise.mjs";
9
+ import { RequestOptions } from "../../../internal/request-options.mjs";
10
+ export declare class Events extends APIResource {
11
+ features: FeaturesAPI.Features;
12
+ addons: AddonsAPI.Addons;
13
+ plans: PlansAPI.Plans;
14
+ /**
15
+ * Reports raw usage events for event-based metering. Events are ingested
16
+ * asynchronously and aggregated into usage totals.
17
+ */
18
+ report(body: EventReportParams, options?: RequestOptions): APIPromise<EventReportResponse>;
19
+ }
20
+ /**
21
+ * Response object
22
+ */
23
+ export interface EventReportResponse {
24
+ /**
25
+ * Empty success response confirming that events were successfully ingested and
26
+ * queued for processing by Stigg's metering system.
27
+ */
28
+ data: unknown;
29
+ }
30
+ export interface EventReportParams {
31
+ /**
32
+ * A list of usage events to report
33
+ */
34
+ events: Array<EventReportParams.Event>;
35
+ }
36
+ export declare namespace EventReportParams {
37
+ /**
38
+ * Raw usage event
39
+ */
40
+ interface Event {
41
+ /**
42
+ * Customer id
43
+ */
44
+ customerId: string;
45
+ /**
46
+ * The name of the usage event
47
+ */
48
+ eventName: string;
49
+ /**
50
+ * Idempotency key
51
+ */
52
+ idempotencyKey: string;
53
+ /**
54
+ * Dimensions associated with the usage event
55
+ */
56
+ dimensions?: {
57
+ [key: string]: string | number | boolean;
58
+ };
59
+ /**
60
+ * Resource id
61
+ */
62
+ resourceId?: string | null;
63
+ /**
64
+ * Timestamp
65
+ */
66
+ timestamp?: string;
67
+ }
68
+ }
69
+ export declare namespace Events {
70
+ export { type EventReportResponse as EventReportResponse, type EventReportParams as EventReportParams };
71
+ export { Features as Features, type FeatureArchiveFeatureResponse as FeatureArchiveFeatureResponse, type FeatureCreateFeatureResponse as FeatureCreateFeatureResponse, type FeatureListFeaturesResponse as FeatureListFeaturesResponse, type FeatureRetrieveFeatureResponse as FeatureRetrieveFeatureResponse, type FeatureUnarchiveFeatureResponse as FeatureUnarchiveFeatureResponse, type FeatureUpdateFeatureResponse as FeatureUpdateFeatureResponse, type FeatureListFeaturesResponsesMyCursorIDPage as FeatureListFeaturesResponsesMyCursorIDPage, type FeatureCreateFeatureParams as FeatureCreateFeatureParams, type FeatureListFeaturesParams as FeatureListFeaturesParams, type FeatureUpdateFeatureParams as FeatureUpdateFeatureParams, };
72
+ export { Addons as Addons, type AddonArchiveAddonResponse as AddonArchiveAddonResponse, type AddonCreateAddonResponse as AddonCreateAddonResponse, type AddonListAddonsResponse as AddonListAddonsResponse, type AddonPublishAddonResponse as AddonPublishAddonResponse, type AddonRetrieveAddonResponse as AddonRetrieveAddonResponse, type AddonUpdateAddonResponse as AddonUpdateAddonResponse, type AddonListAddonsResponsesMyCursorIDPage as AddonListAddonsResponsesMyCursorIDPage, type AddonCreateAddonParams as AddonCreateAddonParams, type AddonListAddonsParams as AddonListAddonsParams, type AddonPublishAddonParams as AddonPublishAddonParams, type AddonUpdateAddonParams as AddonUpdateAddonParams, };
73
+ export { Plans as Plans, type PlanCreateResponse as PlanCreateResponse, type PlanRetrieveResponse as PlanRetrieveResponse, type PlanListResponse as PlanListResponse, type PlanListResponsesMyCursorIDPage as PlanListResponsesMyCursorIDPage, type PlanCreateParams as PlanCreateParams, type PlanListParams as PlanListParams, };
74
+ }
75
+ //# sourceMappingURL=events.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/events/events.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AAI,sBAAsB,GACtD,CAAC;IAEF,OAAO,EACL,KAAK,IAAI,KAAK,EACd,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;CACH"}
@@ -0,0 +1,75 @@
1
+ import { APIResource } from "../../../core/resource.js";
2
+ import * as FeaturesAPI from "./features.js";
3
+ import { FeatureArchiveFeatureResponse, FeatureCreateFeatureParams, FeatureCreateFeatureResponse, FeatureListFeaturesParams, FeatureListFeaturesResponse, FeatureListFeaturesResponsesMyCursorIDPage, FeatureRetrieveFeatureResponse, FeatureUnarchiveFeatureResponse, FeatureUpdateFeatureParams, FeatureUpdateFeatureResponse, Features } from "./features.js";
4
+ import * as PlansAPI from "./plans.js";
5
+ import { PlanCreateParams, PlanCreateResponse, PlanListParams, PlanListResponse, PlanListResponsesMyCursorIDPage, PlanRetrieveResponse, Plans } from "./plans.js";
6
+ import * as AddonsAPI from "./addons/addons.js";
7
+ import { AddonArchiveAddonResponse, AddonCreateAddonParams, AddonCreateAddonResponse, AddonListAddonsParams, AddonListAddonsResponse, AddonListAddonsResponsesMyCursorIDPage, AddonPublishAddonParams, AddonPublishAddonResponse, AddonRetrieveAddonResponse, AddonUpdateAddonParams, AddonUpdateAddonResponse, Addons } from "./addons/addons.js";
8
+ import { APIPromise } from "../../../core/api-promise.js";
9
+ import { RequestOptions } from "../../../internal/request-options.js";
10
+ export declare class Events extends APIResource {
11
+ features: FeaturesAPI.Features;
12
+ addons: AddonsAPI.Addons;
13
+ plans: PlansAPI.Plans;
14
+ /**
15
+ * Reports raw usage events for event-based metering. Events are ingested
16
+ * asynchronously and aggregated into usage totals.
17
+ */
18
+ report(body: EventReportParams, options?: RequestOptions): APIPromise<EventReportResponse>;
19
+ }
20
+ /**
21
+ * Response object
22
+ */
23
+ export interface EventReportResponse {
24
+ /**
25
+ * Empty success response confirming that events were successfully ingested and
26
+ * queued for processing by Stigg's metering system.
27
+ */
28
+ data: unknown;
29
+ }
30
+ export interface EventReportParams {
31
+ /**
32
+ * A list of usage events to report
33
+ */
34
+ events: Array<EventReportParams.Event>;
35
+ }
36
+ export declare namespace EventReportParams {
37
+ /**
38
+ * Raw usage event
39
+ */
40
+ interface Event {
41
+ /**
42
+ * Customer id
43
+ */
44
+ customerId: string;
45
+ /**
46
+ * The name of the usage event
47
+ */
48
+ eventName: string;
49
+ /**
50
+ * Idempotency key
51
+ */
52
+ idempotencyKey: string;
53
+ /**
54
+ * Dimensions associated with the usage event
55
+ */
56
+ dimensions?: {
57
+ [key: string]: string | number | boolean;
58
+ };
59
+ /**
60
+ * Resource id
61
+ */
62
+ resourceId?: string | null;
63
+ /**
64
+ * Timestamp
65
+ */
66
+ timestamp?: string;
67
+ }
68
+ }
69
+ export declare namespace Events {
70
+ export { type EventReportResponse as EventReportResponse, type EventReportParams as EventReportParams };
71
+ export { Features as Features, type FeatureArchiveFeatureResponse as FeatureArchiveFeatureResponse, type FeatureCreateFeatureResponse as FeatureCreateFeatureResponse, type FeatureListFeaturesResponse as FeatureListFeaturesResponse, type FeatureRetrieveFeatureResponse as FeatureRetrieveFeatureResponse, type FeatureUnarchiveFeatureResponse as FeatureUnarchiveFeatureResponse, type FeatureUpdateFeatureResponse as FeatureUpdateFeatureResponse, type FeatureListFeaturesResponsesMyCursorIDPage as FeatureListFeaturesResponsesMyCursorIDPage, type FeatureCreateFeatureParams as FeatureCreateFeatureParams, type FeatureListFeaturesParams as FeatureListFeaturesParams, type FeatureUpdateFeatureParams as FeatureUpdateFeatureParams, };
72
+ export { Addons as Addons, type AddonArchiveAddonResponse as AddonArchiveAddonResponse, type AddonCreateAddonResponse as AddonCreateAddonResponse, type AddonListAddonsResponse as AddonListAddonsResponse, type AddonPublishAddonResponse as AddonPublishAddonResponse, type AddonRetrieveAddonResponse as AddonRetrieveAddonResponse, type AddonUpdateAddonResponse as AddonUpdateAddonResponse, type AddonListAddonsResponsesMyCursorIDPage as AddonListAddonsResponsesMyCursorIDPage, type AddonCreateAddonParams as AddonCreateAddonParams, type AddonListAddonsParams as AddonListAddonsParams, type AddonPublishAddonParams as AddonPublishAddonParams, type AddonUpdateAddonParams as AddonUpdateAddonParams, };
73
+ export { Plans as Plans, type PlanCreateResponse as PlanCreateResponse, type PlanRetrieveResponse as PlanRetrieveResponse, type PlanListResponse as PlanListResponse, type PlanListResponsesMyCursorIDPage as PlanListResponsesMyCursorIDPage, type PlanCreateParams as PlanCreateParams, type PlanListParams as PlanListParams, };
74
+ }
75
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/events/events.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,EACL,6BAA6B,EAC7B,0BAA0B,EAC1B,4BAA4B,EAC5B,yBAAyB,EACzB,2BAA2B,EAC3B,0CAA0C,EAC1C,8BAA8B,EAC9B,+BAA+B,EAC/B,0BAA0B,EAC1B,4BAA4B,EAC5B,QAAQ,EACT;OACM,KAAK,QAAQ;OACb,EACL,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,+BAA+B,EAC/B,oBAAoB,EACpB,KAAK,EACN;OACM,KAAK,SAAS;OACd,EACL,yBAAyB,EACzB,sBAAsB,EACtB,wBAAwB,EACxB,qBAAqB,EACrB,uBAAuB,EACvB,sCAAsC,EACtC,uBAAuB,EACvB,yBAAyB,EACzB,0BAA0B,EAC1B,sBAAsB,EACtB,wBAAwB,EACxB,MAAM,EACP;OACM,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,MAAO,SAAQ,WAAW;IACrC,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAA0C;IACxE,MAAM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,0CAA0C,EAC7F,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,0BAA0B,IAAI,0BAA0B,GAC9D,CAAC;IAEF,OAAO,EACL,MAAM,IAAI,MAAM,EAChB,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sCAAsC,IAAI,sCAAsC,EACrF,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;IAEF,OAAO,EACL,KAAK,IAAI,KAAK,EACd,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;CACH"}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Events = void 0;
5
+ const tslib_1 = require("../../../internal/tslib.js");
6
+ const resource_1 = require("../../../core/resource.js");
7
+ const FeaturesAPI = tslib_1.__importStar(require("./features.js"));
8
+ const features_1 = require("./features.js");
9
+ const PlansAPI = tslib_1.__importStar(require("./plans.js"));
10
+ const plans_1 = require("./plans.js");
11
+ const AddonsAPI = tslib_1.__importStar(require("./addons/addons.js"));
12
+ const addons_1 = require("./addons/addons.js");
13
+ class Events extends resource_1.APIResource {
14
+ constructor() {
15
+ super(...arguments);
16
+ this.features = new FeaturesAPI.Features(this._client);
17
+ this.addons = new AddonsAPI.Addons(this._client);
18
+ this.plans = new PlansAPI.Plans(this._client);
19
+ }
20
+ /**
21
+ * Reports raw usage events for event-based metering. Events are ingested
22
+ * asynchronously and aggregated into usage totals.
23
+ */
24
+ report(body, options) {
25
+ return this._client.post('/api/v1/events', { body, ...options });
26
+ }
27
+ }
28
+ exports.Events = Events;
29
+ Events.Features = features_1.Features;
30
+ Events.Addons = addons_1.Addons;
31
+ Events.Plans = plans_1.Plans;
32
+ //# sourceMappingURL=events.js.map