@stigg/typescript 0.1.0-alpha.3 → 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.
- package/CHANGELOG.md +8 -0
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/v1/coupons.d.mts +6 -89
- package/resources/v1/coupons.d.mts.map +1 -1
- package/resources/v1/coupons.d.ts +6 -89
- package/resources/v1/coupons.d.ts.map +1 -1
- package/resources/v1/customers/customers.d.mts +106 -46
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts +106 -46
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +16 -10
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +16 -10
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/index.d.mts +2 -2
- package/resources/v1/customers/index.d.mts.map +1 -1
- package/resources/v1/customers/index.d.ts +2 -2
- package/resources/v1/customers/index.d.ts.map +1 -1
- package/resources/v1/customers/index.js +3 -3
- package/resources/v1/customers/index.js.map +1 -1
- package/resources/v1/customers/index.mjs +1 -1
- package/resources/v1/customers/index.mjs.map +1 -1
- package/resources/v1/customers/promotional-entitlements.d.mts +350 -0
- package/resources/v1/customers/promotional-entitlements.d.mts.map +1 -0
- package/resources/v1/customers/promotional-entitlements.d.ts +350 -0
- package/resources/v1/customers/promotional-entitlements.d.ts.map +1 -0
- package/resources/v1/customers/promotional-entitlements.js +23 -0
- package/resources/v1/customers/promotional-entitlements.js.map +1 -0
- package/resources/v1/customers/promotional-entitlements.mjs +19 -0
- package/resources/v1/customers/promotional-entitlements.mjs.map +1 -0
- package/resources/v1/events.d.mts +62 -0
- package/resources/v1/events.d.mts.map +1 -0
- package/resources/v1/events.d.ts +62 -0
- package/resources/v1/events.d.ts.map +1 -0
- package/resources/v1/events.js +15 -0
- package/resources/v1/events.js.map +1 -0
- package/resources/v1/events.mjs +11 -0
- package/resources/v1/events.mjs.map +1 -0
- package/resources/v1/index.d.mts +6 -4
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +6 -4
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +5 -1
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +3 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/subscriptions/future-update.d.mts +6 -20
- package/resources/v1/subscriptions/future-update.d.mts.map +1 -1
- package/resources/v1/subscriptions/future-update.d.ts +6 -20
- package/resources/v1/subscriptions/future-update.d.ts.map +1 -1
- package/resources/v1/subscriptions/future-update.js.map +1 -1
- package/resources/v1/subscriptions/future-update.mjs.map +1 -1
- package/resources/v1/subscriptions/index.d.mts +2 -2
- package/resources/v1/subscriptions/index.d.mts.map +1 -1
- package/resources/v1/subscriptions/index.d.ts +2 -2
- package/resources/v1/subscriptions/index.d.ts.map +1 -1
- package/resources/v1/subscriptions/index.js.map +1 -1
- package/resources/v1/subscriptions/index.mjs +1 -1
- package/resources/v1/subscriptions/index.mjs.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.mts +963 -1049
- package/resources/v1/subscriptions/subscriptions.d.mts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.d.ts +963 -1049
- package/resources/v1/subscriptions/subscriptions.d.ts.map +1 -1
- package/resources/v1/subscriptions/subscriptions.js +24 -6
- package/resources/v1/subscriptions/subscriptions.js.map +1 -1
- package/resources/v1/subscriptions/subscriptions.mjs +25 -7
- package/resources/v1/subscriptions/subscriptions.mjs.map +1 -1
- package/resources/v1/usage.d.mts +229 -0
- package/resources/v1/usage.d.mts.map +1 -0
- package/resources/v1/usage.d.ts +229 -0
- package/resources/v1/usage.d.ts.map +1 -0
- package/resources/v1/usage.js +23 -0
- package/resources/v1/usage.js.map +1 -0
- package/resources/v1/usage.mjs +19 -0
- package/resources/v1/usage.mjs.map +1 -0
- package/resources/v1/v1.d.mts +14 -172
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +14 -172
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +8 -12
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +8 -12
- package/resources/v1/v1.mjs.map +1 -1
- package/src/client.ts +2 -14
- package/src/resources/index.ts +1 -7
- package/src/resources/v1/coupons.ts +6 -222
- package/src/resources/v1/customers/customers.ts +142 -57
- package/src/resources/v1/customers/index.ts +10 -2
- package/src/resources/v1/customers/promotional-entitlements.ts +466 -0
- package/src/resources/v1/events.ts +73 -0
- package/src/resources/v1/index.ts +19 -15
- package/src/resources/v1/subscriptions/future-update.ts +6 -28
- package/src/resources/v1/subscriptions/index.ts +8 -11
- package/src/resources/v1/subscriptions/subscriptions.ts +2541 -2304
- package/src/resources/v1/usage.ts +283 -0
- package/src/resources/v1/v1.ts +50 -220
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/v1/customers/usage.d.mts +0 -4
- package/resources/v1/customers/usage.d.mts.map +0 -1
- package/resources/v1/customers/usage.d.ts +0 -4
- package/resources/v1/customers/usage.d.ts.map +0 -1
- package/resources/v1/customers/usage.js +0 -9
- package/resources/v1/customers/usage.js.map +0 -1
- package/resources/v1/customers/usage.mjs +0 -5
- package/resources/v1/customers/usage.mjs.map +0 -1
- package/src/resources/v1/customers/usage.ts +0 -5
|
@@ -0,0 +1,350 @@
|
|
|
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 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.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promotional-entitlements.d.ts","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,G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,GAAG,MAAM,GAAG,IAAI,CAAC;QAE/D;;WAEG;QACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;QAE1B;;;WAGG;QACH,8BAA8B,EAAE,sBAAsB,CAAC,8BAA8B,GAAG,IAAI,CAAC;QAE7F;;;WAGG;QACH,8BAA8B,EAAE,sBAAsB,CAAC,8BAA8B,GAAG,IAAI,CAAC;KAC9F;IAED,UAAiB,sBAAsB,CAAC;QACtC;;;WAGG;QACH,UAAiB,+BAA+B;YAC9C;;eAEG;YACH,WAAW,EAAE,mBAAmB,GAAG,iBAAiB,CAAC;SACtD;QAED;;;WAGG;QACH,UAAiB,8BAA8B;YAC7C;;eAEG;YACH,WAAW,EACP,mBAAmB,GACnB,aAAa,GACb,aAAa,GACb,cAAc,GACd,gBAAgB,GAChB,eAAe,GACf,aAAa,GACb,eAAe,CAAC;SACrB;QAED;;;WAGG;QACH,UAAiB,8BAA8B;YAC7C;;eAEG;YACH,WAAW,EAAE,mBAAmB,CAAC;SAClC;KACF;CACF;AAED,MAAM,WAAW,kCAAkC;IACjD;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,uBAAuB,CAAC;IAC/C,OAAO,EACL,KAAK,mCAAmC,IAAI,mCAAmC,EAC/E,KAAK,oCAAoC,IAAI,oCAAoC,EACjF,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,kCAAkC,IAAI,kCAAkC,GAC9E,CAAC;CACH"}
|
|
@@ -0,0 +1,23 @@
|
|
|
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.PromotionalEntitlements = void 0;
|
|
5
|
+
const resource_1 = require("../../../core/resource.js");
|
|
6
|
+
const path_1 = require("../../../internal/utils/path.js");
|
|
7
|
+
class PromotionalEntitlements extends resource_1.APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Create a promotional entitlements
|
|
10
|
+
*/
|
|
11
|
+
grant(customerID, body, options) {
|
|
12
|
+
return this._client.post((0, path_1.path) `/api/v1/customers/${customerID}/promotional`, { body, ...options });
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Revoke promotional entitlement
|
|
16
|
+
*/
|
|
17
|
+
revoke(featureID, params, options) {
|
|
18
|
+
const { customerId } = params;
|
|
19
|
+
return this._client.delete((0, path_1.path) `/api/v1/customers/${customerId}/promotional/${featureID}`, options);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.PromotionalEntitlements = PromotionalEntitlements;
|
|
23
|
+
//# sourceMappingURL=promotional-entitlements.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promotional-entitlements.js","sourceRoot":"","sources":["../../../src/resources/v1/customers/promotional-entitlements.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAGrD,0DAAoD;AAEpD,MAAa,uBAAwB,SAAQ,sBAAW;IACtD;;OAEG;IACH,KAAK,CACH,UAAkB,EAClB,IAAuC,EACvC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,qBAAqB,UAAU,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpG,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,SAAiB,EACjB,MAA0C,EAC1C,OAAwB;QAExB,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;QAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,qBAAqB,UAAU,gBAAgB,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC;IACtG,CAAC;CACF;AAvBD,0DAuBC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
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 PromotionalEntitlements extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Create a promotional entitlements
|
|
7
|
+
*/
|
|
8
|
+
grant(customerID, body, options) {
|
|
9
|
+
return this._client.post(path `/api/v1/customers/${customerID}/promotional`, { body, ...options });
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Revoke promotional entitlement
|
|
13
|
+
*/
|
|
14
|
+
revoke(featureID, params, options) {
|
|
15
|
+
const { customerId } = params;
|
|
16
|
+
return this._client.delete(path `/api/v1/customers/${customerId}/promotional/${featureID}`, options);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=promotional-entitlements.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promotional-entitlements.mjs","sourceRoot":"","sources":["../../../src/resources/v1/customers/promotional-entitlements.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,uBAAwB,SAAQ,WAAW;IACtD;;OAEG;IACH,KAAK,CACH,UAAkB,EAClB,IAAuC,EACvC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,qBAAqB,UAAU,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpG,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,SAAiB,EACjB,MAA0C,EAC1C,OAAwB;QAExB,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;QAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,qBAAqB,UAAU,gBAAgB,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC;IACtG,CAAC;CACF"}
|
|
@@ -0,0 +1,62 @@
|
|
|
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 Events extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Report usage events
|
|
7
|
+
*/
|
|
8
|
+
report(body: EventReportParams, options?: RequestOptions): APIPromise<EventReportResponse>;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Response object
|
|
12
|
+
*/
|
|
13
|
+
export interface EventReportResponse {
|
|
14
|
+
/**
|
|
15
|
+
* Empty success response confirming that events were successfully ingested and
|
|
16
|
+
* queued for processing by Stigg's metering system.
|
|
17
|
+
*/
|
|
18
|
+
data: unknown;
|
|
19
|
+
}
|
|
20
|
+
export interface EventReportParams {
|
|
21
|
+
/**
|
|
22
|
+
* A list of usage events to report
|
|
23
|
+
*/
|
|
24
|
+
events: Array<EventReportParams.Event>;
|
|
25
|
+
}
|
|
26
|
+
export declare namespace EventReportParams {
|
|
27
|
+
/**
|
|
28
|
+
* Raw usage event
|
|
29
|
+
*/
|
|
30
|
+
interface Event {
|
|
31
|
+
/**
|
|
32
|
+
* Customer id
|
|
33
|
+
*/
|
|
34
|
+
customerId: string;
|
|
35
|
+
/**
|
|
36
|
+
* The name of the usage event
|
|
37
|
+
*/
|
|
38
|
+
eventName: string;
|
|
39
|
+
/**
|
|
40
|
+
* Idempotency key
|
|
41
|
+
*/
|
|
42
|
+
idempotencyKey: string;
|
|
43
|
+
/**
|
|
44
|
+
* Dimensions associated with the usage event
|
|
45
|
+
*/
|
|
46
|
+
dimensions?: {
|
|
47
|
+
[key: string]: string | number | boolean;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Resource id
|
|
51
|
+
*/
|
|
52
|
+
resourceId?: string | null;
|
|
53
|
+
/**
|
|
54
|
+
* Timestamp
|
|
55
|
+
*/
|
|
56
|
+
timestamp?: string;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
export declare namespace Events {
|
|
60
|
+
export { type EventReportResponse as EventReportResponse, type EventReportParams as EventReportParams };
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=events.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.mts","sourceRoot":"","sources":["../../src/resources/v1/events.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;CAG3F;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,MAAM,EAAE,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;CACxC;AAED,yBAAiB,iBAAiB,CAAC;IACjC;;OAEG;IACH,UAAiB,KAAK;QACpB;;WAEG;QACH,UAAU,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;WAEG;QACH,cAAc,EAAE,MAAM,CAAC;QAEvB;;WAEG;QACH,UAAU,CAAC,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;SAAE,CAAC;QAE1D;;WAEG;QACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAE3B;;WAEG;QACH,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,mBAAmB,IAAI,mBAAmB,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CACzG"}
|
|
@@ -0,0 +1,62 @@
|
|
|
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 Events extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Report usage events
|
|
7
|
+
*/
|
|
8
|
+
report(body: EventReportParams, options?: RequestOptions): APIPromise<EventReportResponse>;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Response object
|
|
12
|
+
*/
|
|
13
|
+
export interface EventReportResponse {
|
|
14
|
+
/**
|
|
15
|
+
* Empty success response confirming that events were successfully ingested and
|
|
16
|
+
* queued for processing by Stigg's metering system.
|
|
17
|
+
*/
|
|
18
|
+
data: unknown;
|
|
19
|
+
}
|
|
20
|
+
export interface EventReportParams {
|
|
21
|
+
/**
|
|
22
|
+
* A list of usage events to report
|
|
23
|
+
*/
|
|
24
|
+
events: Array<EventReportParams.Event>;
|
|
25
|
+
}
|
|
26
|
+
export declare namespace EventReportParams {
|
|
27
|
+
/**
|
|
28
|
+
* Raw usage event
|
|
29
|
+
*/
|
|
30
|
+
interface Event {
|
|
31
|
+
/**
|
|
32
|
+
* Customer id
|
|
33
|
+
*/
|
|
34
|
+
customerId: string;
|
|
35
|
+
/**
|
|
36
|
+
* The name of the usage event
|
|
37
|
+
*/
|
|
38
|
+
eventName: string;
|
|
39
|
+
/**
|
|
40
|
+
* Idempotency key
|
|
41
|
+
*/
|
|
42
|
+
idempotencyKey: string;
|
|
43
|
+
/**
|
|
44
|
+
* Dimensions associated with the usage event
|
|
45
|
+
*/
|
|
46
|
+
dimensions?: {
|
|
47
|
+
[key: string]: string | number | boolean;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Resource id
|
|
51
|
+
*/
|
|
52
|
+
resourceId?: string | null;
|
|
53
|
+
/**
|
|
54
|
+
* Timestamp
|
|
55
|
+
*/
|
|
56
|
+
timestamp?: string;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
export declare namespace Events {
|
|
60
|
+
export { type EventReportResponse as EventReportResponse, type EventReportParams as EventReportParams };
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/resources/v1/events.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,mBAAmB,CAAC;CAG3F;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,MAAM,EAAE,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC;CACxC;AAED,yBAAiB,iBAAiB,CAAC;IACjC;;OAEG;IACH,UAAiB,KAAK;QACpB;;WAEG;QACH,UAAU,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,SAAS,EAAE,MAAM,CAAC;QAElB;;WAEG;QACH,cAAc,EAAE,MAAM,CAAC;QAEvB;;WAEG;QACH,UAAU,CAAC,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;SAAE,CAAC;QAE1D;;WAEG;QACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAE3B;;WAEG;QACH,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,mBAAmB,IAAI,mBAAmB,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CACzG"}
|
|
@@ -0,0 +1,15 @@
|
|
|
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 resource_1 = require("../../core/resource.js");
|
|
6
|
+
class Events extends resource_1.APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Report usage events
|
|
9
|
+
*/
|
|
10
|
+
report(body, options) {
|
|
11
|
+
return this._client.post('/api/v1/events', { body, ...options });
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.Events = Events;
|
|
15
|
+
//# sourceMappingURL=events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/resources/v1/events.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,MAAa,MAAO,SAAQ,sBAAW;IACrC;;OAEG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;CACF;AAPD,wBAOC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
export class Events extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Report usage events
|
|
6
|
+
*/
|
|
7
|
+
report(body, options) {
|
|
8
|
+
return this._client.post('/api/v1/events', { body, ...options });
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=events.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.mjs","sourceRoot":"","sources":["../../src/resources/v1/events.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;OAEG;IACH,MAAM,CAAC,IAAuB,EAAE,OAAwB;QACtD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;CACF"}
|
package/resources/v1/index.d.mts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
export { Coupons, type
|
|
2
|
-
export { Customers, type CustomerResponse, type CustomerListResponse, type
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
1
|
+
export { Coupons, type Coupon, type CouponListResponse, type CouponCreateParams, type CouponListParams, type CouponListResponsesMyCursorIDPage, } from "./coupons.mjs";
|
|
2
|
+
export { Customers, type CustomerResponse, type CustomerListResponse, type CustomerImportResponse, type CustomerUpdateParams, type CustomerListParams, type CustomerImportParams, type CustomerProvisionParams, type CustomerListResponsesMyCursorIDPage, } from "./customers/index.mjs";
|
|
3
|
+
export { Events, type EventReportResponse, type EventReportParams } from "./events.mjs";
|
|
4
|
+
export { Subscriptions, type Subscription, type SubscriptionListResponse, type SubscriptionImportResponse, type SubscriptionPreviewResponse, type SubscriptionProvisionResponse, type SubscriptionUpdateParams, type SubscriptionListParams, type SubscriptionCancelParams, type SubscriptionDelegateParams, type SubscriptionImportParams, type SubscriptionMigrateParams, type SubscriptionPreviewParams, type SubscriptionProvisionParams, type SubscriptionTransferParams, type SubscriptionListResponsesMyCursorIDPage, } from "./subscriptions/index.mjs";
|
|
5
|
+
export { Usage, type UsageHistoryResponse, type UsageReportResponse, type UsageHistoryParams, type UsageReportParams, } from "./usage.mjs";
|
|
6
|
+
export { V1 } from "./v1.mjs";
|
|
5
7
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/v1/index.ts"],"names":[],"mappings":"OAEO,EACL,OAAO,EACP,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/v1/index.ts"],"names":[],"mappings":"OAEO,EACL,OAAO,EACP,KAAK,MAAM,EACX,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,iCAAiC,GACvC;OACM,EACL,SAAS,EACT,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,mCAAmC,GACzC;OACM,EAAE,MAAM,EAAE,KAAK,mBAAmB,EAAE,KAAK,iBAAiB,EAAE;OAC5D,EACL,aAAa,EACb,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAChC,KAAK,6BAA6B,EAClC,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,EAC/B,KAAK,uCAAuC,GAC7C;OACM,EACL,KAAK,EACL,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,GACvB;OACM,EAAE,EAAE,EAAE"}
|
package/resources/v1/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
export { Coupons, type
|
|
2
|
-
export { Customers, type CustomerResponse, type CustomerListResponse, type
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
1
|
+
export { Coupons, type Coupon, type CouponListResponse, type CouponCreateParams, type CouponListParams, type CouponListResponsesMyCursorIDPage, } from "./coupons.js";
|
|
2
|
+
export { Customers, type CustomerResponse, type CustomerListResponse, type CustomerImportResponse, type CustomerUpdateParams, type CustomerListParams, type CustomerImportParams, type CustomerProvisionParams, type CustomerListResponsesMyCursorIDPage, } from "./customers/index.js";
|
|
3
|
+
export { Events, type EventReportResponse, type EventReportParams } from "./events.js";
|
|
4
|
+
export { Subscriptions, type Subscription, type SubscriptionListResponse, type SubscriptionImportResponse, type SubscriptionPreviewResponse, type SubscriptionProvisionResponse, type SubscriptionUpdateParams, type SubscriptionListParams, type SubscriptionCancelParams, type SubscriptionDelegateParams, type SubscriptionImportParams, type SubscriptionMigrateParams, type SubscriptionPreviewParams, type SubscriptionProvisionParams, type SubscriptionTransferParams, type SubscriptionListResponsesMyCursorIDPage, } from "./subscriptions/index.js";
|
|
5
|
+
export { Usage, type UsageHistoryResponse, type UsageReportResponse, type UsageHistoryParams, type UsageReportParams, } from "./usage.js";
|
|
6
|
+
export { V1 } from "./v1.js";
|
|
5
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/v1/index.ts"],"names":[],"mappings":"OAEO,EACL,OAAO,EACP,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/v1/index.ts"],"names":[],"mappings":"OAEO,EACL,OAAO,EACP,KAAK,MAAM,EACX,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,iCAAiC,GACvC;OACM,EACL,SAAS,EACT,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,mCAAmC,GACzC;OACM,EAAE,MAAM,EAAE,KAAK,mBAAmB,EAAE,KAAK,iBAAiB,EAAE;OAC5D,EACL,aAAa,EACb,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAChC,KAAK,6BAA6B,EAClC,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EAChC,KAAK,0BAA0B,EAC/B,KAAK,uCAAuC,GAC7C;OACM,EACL,KAAK,EACL,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,GACvB;OACM,EAAE,EAAE,EAAE"}
|
package/resources/v1/index.js
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.V1 = exports.Subscriptions = exports.Customers = exports.Coupons = void 0;
|
|
4
|
+
exports.V1 = exports.Usage = exports.Subscriptions = exports.Events = exports.Customers = exports.Coupons = void 0;
|
|
5
5
|
var coupons_1 = require("./coupons.js");
|
|
6
6
|
Object.defineProperty(exports, "Coupons", { enumerable: true, get: function () { return coupons_1.Coupons; } });
|
|
7
7
|
var index_1 = require("./customers/index.js");
|
|
8
8
|
Object.defineProperty(exports, "Customers", { enumerable: true, get: function () { return index_1.Customers; } });
|
|
9
|
+
var events_1 = require("./events.js");
|
|
10
|
+
Object.defineProperty(exports, "Events", { enumerable: true, get: function () { return events_1.Events; } });
|
|
9
11
|
var index_2 = require("./subscriptions/index.js");
|
|
10
12
|
Object.defineProperty(exports, "Subscriptions", { enumerable: true, get: function () { return index_2.Subscriptions; } });
|
|
13
|
+
var usage_1 = require("./usage.js");
|
|
14
|
+
Object.defineProperty(exports, "Usage", { enumerable: true, get: function () { return usage_1.Usage; } });
|
|
11
15
|
var v1_1 = require("./v1.js");
|
|
12
16
|
Object.defineProperty(exports, "V1", { enumerable: true, get: function () { return v1_1.V1; } });
|
|
13
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/v1/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/v1/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wCAOmB;AANjB,kGAAA,OAAO,OAAA;AAOT,8CAU2B;AATzB,kGAAA,SAAS,OAAA;AAUX,sCAAoF;AAA3E,gGAAA,MAAM,OAAA;AACf,kDAiB+B;AAhB7B,sGAAA,aAAa,OAAA;AAiBf,oCAMiB;AALf,8FAAA,KAAK,OAAA;AAMP,8BAA0B;AAAjB,wFAAA,EAAE,OAAA"}
|