@iblai/iblai-api 4.288.1-core → 4.289.0-core
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/dist/index.cjs.js +10618 -12607
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +10619 -12593
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +10618 -12607
- package/dist/index.umd.js.map +1 -1
- package/dist/types/index.d.ts +0 -15
- package/dist/types/services/BillingService.d.ts +215 -4
- package/package.json +1 -1
- package/sdk_schema.yml +10797 -14096
- package/src/core/OpenAPI.ts +1 -1
- package/src/index.ts +0 -15
- package/src/services/BillingService.ts +468 -6
- package/dist/types/services/AccessCheckService.d.ts +0 -17
- package/dist/types/services/AccountService.d.ts +0 -36
- package/dist/types/services/ActivitiesService.d.ts +0 -126
- package/dist/types/services/AutoRechargeService.d.ts +0 -14
- package/dist/types/services/CreditsService.d.ts +0 -12
- package/dist/types/services/DealsService.d.ts +0 -192
- package/dist/types/services/ItemsService.d.ts +0 -13
- package/dist/types/services/LeadSourcesService.d.ts +0 -95
- package/dist/types/services/OrganizationsService.d.ts +0 -109
- package/dist/types/services/PersonsService.d.ts +0 -168
- package/dist/types/services/PipelinesService.d.ts +0 -183
- package/dist/types/services/PlatformsService.d.ts +0 -332
- package/dist/types/services/PricesService.d.ts +0 -15
- package/dist/types/services/TagsService.d.ts +0 -96
- package/dist/types/services/TransactionsService.d.ts +0 -35
- package/src/services/AccessCheckService.ts +0 -39
- package/src/services/AccountService.ts +0 -70
- package/src/services/ActivitiesService.ts +0 -255
- package/src/services/AutoRechargeService.ts +0 -29
- package/src/services/CreditsService.ts +0 -23
- package/src/services/DealsService.ts +0 -406
- package/src/services/ItemsService.ts +0 -29
- package/src/services/LeadSourcesService.ts +0 -198
- package/src/services/OrganizationsService.ts +0 -249
- package/src/services/PersonsService.ts +0 -367
- package/src/services/PipelinesService.ts +0 -406
- package/src/services/PlatformsService.ts +0 -716
- package/src/services/PricesService.ts +0 -34
- package/src/services/TagsService.ts +0 -201
- package/src/services/TransactionsService.ts +0 -57
package/src/core/OpenAPI.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -621,37 +621,22 @@ export type { WatcherUpdate } from './models/WatcherUpdate';
|
|
|
621
621
|
export type { WatcherWrite } from './models/WatcherWrite';
|
|
622
622
|
export type { WhitelistedDomain } from './models/WhitelistedDomain';
|
|
623
623
|
|
|
624
|
-
export { AccessCheckService } from './services/AccessCheckService';
|
|
625
|
-
export { AccountService } from './services/AccountService';
|
|
626
|
-
export { ActivitiesService } from './services/ActivitiesService';
|
|
627
624
|
export { AiAnalyticsService } from './services/AiAnalyticsService';
|
|
628
625
|
export { AnalyticsService } from './services/AnalyticsService';
|
|
629
|
-
export { AutoRechargeService } from './services/AutoRechargeService';
|
|
630
626
|
export { BillingService } from './services/BillingService';
|
|
631
627
|
export { CareerService } from './services/CareerService';
|
|
632
628
|
export { CatalogService } from './services/CatalogService';
|
|
633
629
|
export { CommerceService } from './services/CommerceService';
|
|
634
630
|
export { CoreService } from './services/CoreService';
|
|
635
631
|
export { CredentialsService } from './services/CredentialsService';
|
|
636
|
-
export { CreditsService } from './services/CreditsService';
|
|
637
632
|
export { CrmService } from './services/CrmService';
|
|
638
633
|
export { CustomDomainsService } from './services/CustomDomainsService';
|
|
639
|
-
export { DealsService } from './services/DealsService';
|
|
640
634
|
export { EximService } from './services/EximService';
|
|
641
635
|
export { FeaturesService } from './services/FeaturesService';
|
|
642
|
-
export { ItemsService } from './services/ItemsService';
|
|
643
|
-
export { LeadSourcesService } from './services/LeadSourcesService';
|
|
644
636
|
export { MediaService } from './services/MediaService';
|
|
645
637
|
export { NotificationsService } from './services/NotificationsService';
|
|
646
|
-
export { OrganizationsService } from './services/OrganizationsService';
|
|
647
|
-
export { PersonsService } from './services/PersonsService';
|
|
648
|
-
export { PipelinesService } from './services/PipelinesService';
|
|
649
|
-
export { PlatformsService } from './services/PlatformsService';
|
|
650
|
-
export { PricesService } from './services/PricesService';
|
|
651
638
|
export { RecommendationsService } from './services/RecommendationsService';
|
|
652
639
|
export { ReportsService } from './services/ReportsService';
|
|
653
640
|
export { ScimService } from './services/ScimService';
|
|
654
641
|
export { SearchService } from './services/SearchService';
|
|
655
642
|
export { SkillsService } from './services/SkillsService';
|
|
656
|
-
export { TagsService } from './services/TagsService';
|
|
657
|
-
export { TransactionsService } from './services/TransactionsService';
|
|
@@ -132,22 +132,484 @@ export class BillingService {
|
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
134
|
/**
|
|
135
|
-
*
|
|
136
|
-
*
|
|
135
|
+
* Check whether the authenticated user has payment access to an item.
|
|
136
|
+
* @returns ItemAccessCheckResponse
|
|
137
|
+
* @throws ApiError
|
|
138
|
+
*/
|
|
139
|
+
public static billingItemsAccessCheckRetrieve({
|
|
140
|
+
itemUniqueId,
|
|
141
|
+
platformKey,
|
|
142
|
+
}: {
|
|
143
|
+
itemUniqueId: string,
|
|
144
|
+
/**
|
|
145
|
+
* Platform key. Omit to resolve from request context.
|
|
146
|
+
*/
|
|
147
|
+
platformKey?: string,
|
|
148
|
+
}): CancelablePromise<ItemAccessCheckResponse> {
|
|
149
|
+
return __request(OpenAPI, {
|
|
150
|
+
method: 'GET',
|
|
151
|
+
url: '/api/billing/items/{item_unique_id}/access-check/',
|
|
152
|
+
path: {
|
|
153
|
+
'item_unique_id': itemUniqueId,
|
|
154
|
+
},
|
|
155
|
+
query: {
|
|
156
|
+
'platform_key': platformKey,
|
|
157
|
+
},
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Create checkout session
|
|
162
|
+
* Create a Stripe checkout session for an authenticated user to purchase or subscribe to an item.
|
|
163
|
+
* @returns CheckoutSessionResponse
|
|
164
|
+
* @throws ApiError
|
|
165
|
+
*/
|
|
166
|
+
public static billingItemsCheckoutCreate({
|
|
167
|
+
itemUniqueId,
|
|
168
|
+
requestBody,
|
|
169
|
+
}: {
|
|
170
|
+
itemUniqueId: string,
|
|
171
|
+
requestBody?: CheckoutSessionCreate,
|
|
172
|
+
}): CancelablePromise<CheckoutSessionResponse> {
|
|
173
|
+
return __request(OpenAPI, {
|
|
174
|
+
method: 'POST',
|
|
175
|
+
url: '/api/billing/items/{item_unique_id}/checkout/',
|
|
176
|
+
path: {
|
|
177
|
+
'item_unique_id': itemUniqueId,
|
|
178
|
+
},
|
|
179
|
+
body: requestBody,
|
|
180
|
+
mediaType: 'application/json',
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Handle checkout callback
|
|
185
|
+
* Stripe redirects here after checkout. Processes the completed session and redirects to the return URL.
|
|
186
|
+
* @returns void
|
|
187
|
+
* @throws ApiError
|
|
188
|
+
*/
|
|
189
|
+
public static billingItemsCheckoutCallbackRetrieve({
|
|
190
|
+
itemUniqueId,
|
|
191
|
+
returnUrl,
|
|
192
|
+
}: {
|
|
193
|
+
itemUniqueId: string,
|
|
194
|
+
returnUrl?: string | null,
|
|
195
|
+
}): CancelablePromise<void> {
|
|
196
|
+
return __request(OpenAPI, {
|
|
197
|
+
method: 'GET',
|
|
198
|
+
url: '/api/billing/items/{item_unique_id}/checkout-callback/',
|
|
199
|
+
path: {
|
|
200
|
+
'item_unique_id': itemUniqueId,
|
|
201
|
+
},
|
|
202
|
+
query: {
|
|
203
|
+
'return_url': returnUrl,
|
|
204
|
+
},
|
|
205
|
+
errors: {
|
|
206
|
+
302: `No response body`,
|
|
207
|
+
},
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Handle checkout callback
|
|
212
|
+
* Stripe redirects here after checkout. Processes the completed session and redirects to the return URL.
|
|
213
|
+
* @returns void
|
|
214
|
+
* @throws ApiError
|
|
215
|
+
*/
|
|
216
|
+
public static billingItemsCheckoutCallbackRetrieve2({
|
|
217
|
+
checkoutSessionId,
|
|
218
|
+
itemUniqueId,
|
|
219
|
+
returnUrl,
|
|
220
|
+
}: {
|
|
221
|
+
checkoutSessionId: string,
|
|
222
|
+
itemUniqueId: string,
|
|
223
|
+
returnUrl?: string | null,
|
|
224
|
+
}): CancelablePromise<void> {
|
|
225
|
+
return __request(OpenAPI, {
|
|
226
|
+
method: 'GET',
|
|
227
|
+
url: '/api/billing/items/{item_unique_id}/checkout-callback/{checkout_session_id}/',
|
|
228
|
+
path: {
|
|
229
|
+
'checkout_session_id': checkoutSessionId,
|
|
230
|
+
'item_unique_id': itemUniqueId,
|
|
231
|
+
},
|
|
232
|
+
query: {
|
|
233
|
+
'return_url': returnUrl,
|
|
234
|
+
},
|
|
235
|
+
errors: {
|
|
236
|
+
302: `No response body`,
|
|
237
|
+
},
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Create guest checkout session
|
|
242
|
+
* Create a Stripe checkout session for a guest user (email required).
|
|
243
|
+
* @returns CheckoutSessionResponse
|
|
244
|
+
* @throws ApiError
|
|
245
|
+
*/
|
|
246
|
+
public static billingItemsCheckoutGuestCreate({
|
|
247
|
+
itemUniqueId,
|
|
248
|
+
requestBody,
|
|
249
|
+
}: {
|
|
250
|
+
itemUniqueId: string,
|
|
251
|
+
requestBody?: CheckoutSessionCreate,
|
|
252
|
+
}): CancelablePromise<CheckoutSessionResponse> {
|
|
253
|
+
return __request(OpenAPI, {
|
|
254
|
+
method: 'POST',
|
|
255
|
+
url: '/api/billing/items/{item_unique_id}/checkout-guest/',
|
|
256
|
+
path: {
|
|
257
|
+
'item_unique_id': itemUniqueId,
|
|
258
|
+
},
|
|
259
|
+
body: requestBody,
|
|
260
|
+
mediaType: 'application/json',
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Get paywall configuration
|
|
265
|
+
* Retrieve the paywall configuration for an item. Returns default (disabled) config if none exists.
|
|
266
|
+
* @returns ItemPaywallConfig
|
|
267
|
+
* @throws ApiError
|
|
268
|
+
*/
|
|
269
|
+
public static billingItemsPaywallRetrieve({
|
|
270
|
+
itemUniqueId,
|
|
271
|
+
}: {
|
|
272
|
+
itemUniqueId: string,
|
|
273
|
+
}): CancelablePromise<ItemPaywallConfig> {
|
|
274
|
+
return __request(OpenAPI, {
|
|
275
|
+
method: 'GET',
|
|
276
|
+
url: '/api/billing/items/{item_unique_id}/paywall/',
|
|
277
|
+
path: {
|
|
278
|
+
'item_unique_id': itemUniqueId,
|
|
279
|
+
},
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Create or update paywall configuration
|
|
284
|
+
* Enable or configure the paywall for an item. Creates a Stripe product on first enable.
|
|
285
|
+
* @returns ItemPaywallConfig
|
|
286
|
+
* @throws ApiError
|
|
287
|
+
*/
|
|
288
|
+
public static billingItemsPaywallCreate({
|
|
289
|
+
itemUniqueId,
|
|
290
|
+
requestBody,
|
|
291
|
+
}: {
|
|
292
|
+
itemUniqueId: string,
|
|
293
|
+
requestBody?: ItemPaywallConfigCreate,
|
|
294
|
+
}): CancelablePromise<ItemPaywallConfig> {
|
|
295
|
+
return __request(OpenAPI, {
|
|
296
|
+
method: 'POST',
|
|
297
|
+
url: '/api/billing/items/{item_unique_id}/paywall/',
|
|
298
|
+
path: {
|
|
299
|
+
'item_unique_id': itemUniqueId,
|
|
300
|
+
},
|
|
301
|
+
body: requestBody,
|
|
302
|
+
mediaType: 'application/json',
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Update paywall configuration
|
|
307
|
+
* Same as POST. Update the paywall configuration for an item.
|
|
308
|
+
* @returns ItemPaywallConfig
|
|
309
|
+
* @throws ApiError
|
|
310
|
+
*/
|
|
311
|
+
public static billingItemsPaywallUpdate({
|
|
312
|
+
itemUniqueId,
|
|
313
|
+
requestBody,
|
|
314
|
+
}: {
|
|
315
|
+
itemUniqueId: string,
|
|
316
|
+
requestBody?: ItemPaywallConfigCreate,
|
|
317
|
+
}): CancelablePromise<ItemPaywallConfig> {
|
|
318
|
+
return __request(OpenAPI, {
|
|
319
|
+
method: 'PUT',
|
|
320
|
+
url: '/api/billing/items/{item_unique_id}/paywall/',
|
|
321
|
+
path: {
|
|
322
|
+
'item_unique_id': itemUniqueId,
|
|
323
|
+
},
|
|
324
|
+
body: requestBody,
|
|
325
|
+
mediaType: 'application/json',
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Disable paywall configuration
|
|
330
|
+
* Disable the paywall for an item. Does not delete the configuration.
|
|
331
|
+
* @returns void
|
|
332
|
+
* @throws ApiError
|
|
333
|
+
*/
|
|
334
|
+
public static billingItemsPaywallDestroy({
|
|
335
|
+
itemUniqueId,
|
|
336
|
+
}: {
|
|
337
|
+
itemUniqueId: string,
|
|
338
|
+
}): CancelablePromise<void> {
|
|
339
|
+
return __request(OpenAPI, {
|
|
340
|
+
method: 'DELETE',
|
|
341
|
+
url: '/api/billing/items/{item_unique_id}/paywall/',
|
|
342
|
+
path: {
|
|
343
|
+
'item_unique_id': itemUniqueId,
|
|
344
|
+
},
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* List prices
|
|
349
|
+
* List active prices for an item's paywall configuration.
|
|
350
|
+
* @returns ItemPrice
|
|
351
|
+
* @throws ApiError
|
|
352
|
+
*/
|
|
353
|
+
public static billingItemsPaywallPricesList({
|
|
354
|
+
itemUniqueId,
|
|
355
|
+
}: {
|
|
356
|
+
itemUniqueId: string,
|
|
357
|
+
}): CancelablePromise<Array<ItemPrice>> {
|
|
358
|
+
return __request(OpenAPI, {
|
|
359
|
+
method: 'GET',
|
|
360
|
+
url: '/api/billing/items/{item_unique_id}/paywall/prices/',
|
|
361
|
+
path: {
|
|
362
|
+
'item_unique_id': itemUniqueId,
|
|
363
|
+
},
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Create a price
|
|
368
|
+
* Create a new price tier for an item. Requires paywall to be enabled and Stripe Connect account ready.
|
|
369
|
+
* @returns ItemPrice
|
|
370
|
+
* @throws ApiError
|
|
371
|
+
*/
|
|
372
|
+
public static billingItemsPaywallPricesCreate({
|
|
373
|
+
itemUniqueId,
|
|
374
|
+
requestBody,
|
|
375
|
+
}: {
|
|
376
|
+
itemUniqueId: string,
|
|
377
|
+
requestBody: ItemPriceCreate,
|
|
378
|
+
}): CancelablePromise<ItemPrice> {
|
|
379
|
+
return __request(OpenAPI, {
|
|
380
|
+
method: 'POST',
|
|
381
|
+
url: '/api/billing/items/{item_unique_id}/paywall/prices/',
|
|
382
|
+
path: {
|
|
383
|
+
'item_unique_id': itemUniqueId,
|
|
384
|
+
},
|
|
385
|
+
body: requestBody,
|
|
386
|
+
mediaType: 'application/json',
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* Get public pricing
|
|
391
|
+
* Retrieve public pricing information for an item. No authentication required.
|
|
392
|
+
* @returns PublicItemPricing
|
|
393
|
+
* @throws ApiError
|
|
394
|
+
*/
|
|
395
|
+
public static billingItemsPricingRetrieve({
|
|
396
|
+
itemUniqueId,
|
|
397
|
+
}: {
|
|
398
|
+
itemUniqueId: string,
|
|
399
|
+
}): CancelablePromise<PublicItemPricing> {
|
|
400
|
+
return __request(OpenAPI, {
|
|
401
|
+
method: 'GET',
|
|
402
|
+
url: '/api/billing/items/{item_unique_id}/pricing/',
|
|
403
|
+
path: {
|
|
404
|
+
'item_unique_id': itemUniqueId,
|
|
405
|
+
},
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* Get public pricing
|
|
410
|
+
* Retrieve public pricing information for an item. No authentication required.
|
|
137
411
|
* @returns PublicItemPricing
|
|
138
412
|
* @throws ApiError
|
|
139
413
|
*/
|
|
140
414
|
public static billingItemsPublicPricingRetrieve({
|
|
141
|
-
|
|
415
|
+
itemUniqueId,
|
|
142
416
|
}: {
|
|
143
|
-
|
|
417
|
+
itemUniqueId: string,
|
|
144
418
|
}): CancelablePromise<PublicItemPricing> {
|
|
145
419
|
return __request(OpenAPI, {
|
|
146
420
|
method: 'GET',
|
|
147
|
-
url: '/api/billing/items/{
|
|
421
|
+
url: '/api/billing/items/{item_unique_id}/public-pricing/',
|
|
422
|
+
path: {
|
|
423
|
+
'item_unique_id': itemUniqueId,
|
|
424
|
+
},
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
/**
|
|
428
|
+
* Check whether the authenticated user has payment access to an item on a scoped platform.
|
|
429
|
+
* @returns ItemAccessCheckResponse
|
|
430
|
+
* @throws ApiError
|
|
431
|
+
*/
|
|
432
|
+
public static billingItemsScopedAccessCheckRetrieve({
|
|
433
|
+
itemUniqueId,
|
|
434
|
+
}: {
|
|
435
|
+
itemUniqueId: string,
|
|
436
|
+
}): CancelablePromise<ItemAccessCheckResponse> {
|
|
437
|
+
return __request(OpenAPI, {
|
|
438
|
+
method: 'GET',
|
|
439
|
+
url: '/api/billing/items/{item_unique_id}/scoped-access-check/',
|
|
440
|
+
path: {
|
|
441
|
+
'item_unique_id': itemUniqueId,
|
|
442
|
+
},
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
/**
|
|
446
|
+
* List item subscribers
|
|
447
|
+
* List all subscribers for an item. Optionally filter by subscription status.
|
|
448
|
+
* @returns PaginatedItemSubscriptionList
|
|
449
|
+
* @throws ApiError
|
|
450
|
+
*/
|
|
451
|
+
public static billingItemsSubscribersList({
|
|
452
|
+
itemUniqueId,
|
|
453
|
+
page,
|
|
454
|
+
pageSize,
|
|
455
|
+
search,
|
|
456
|
+
status,
|
|
457
|
+
}: {
|
|
458
|
+
itemUniqueId: string,
|
|
459
|
+
/**
|
|
460
|
+
* A page number within the paginated result set.
|
|
461
|
+
*/
|
|
462
|
+
page?: number,
|
|
463
|
+
/**
|
|
464
|
+
* Number of results to return per page.
|
|
465
|
+
*/
|
|
466
|
+
pageSize?: number,
|
|
467
|
+
search?: string,
|
|
468
|
+
/**
|
|
469
|
+
* * `active` - Active
|
|
470
|
+
* * `free` - Free Tier
|
|
471
|
+
* * `grandfathered` - Grandfathered
|
|
472
|
+
* * `trialing` - Trialing
|
|
473
|
+
* * `past_due` - Past Due
|
|
474
|
+
* * `canceled` - Canceled
|
|
475
|
+
* * `incomplete` - Incomplete
|
|
476
|
+
*/
|
|
477
|
+
status?: 'active' | 'free' | 'grandfathered' | 'trialing' | 'past_due' | 'canceled' | 'incomplete',
|
|
478
|
+
}): CancelablePromise<PaginatedItemSubscriptionList> {
|
|
479
|
+
return __request(OpenAPI, {
|
|
480
|
+
method: 'GET',
|
|
481
|
+
url: '/api/billing/items/{item_unique_id}/subscribers/',
|
|
482
|
+
path: {
|
|
483
|
+
'item_unique_id': itemUniqueId,
|
|
484
|
+
},
|
|
485
|
+
query: {
|
|
486
|
+
'page': page,
|
|
487
|
+
'page_size': pageSize,
|
|
488
|
+
'search': search,
|
|
489
|
+
'status': status,
|
|
490
|
+
},
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
/**
|
|
494
|
+
* Get user subscription
|
|
495
|
+
* Retrieve the current user's subscription to an item.
|
|
496
|
+
* @returns ItemSubscription
|
|
497
|
+
* @throws ApiError
|
|
498
|
+
*/
|
|
499
|
+
public static billingItemsSubscriptionRetrieve({
|
|
500
|
+
itemUniqueId,
|
|
501
|
+
}: {
|
|
502
|
+
itemUniqueId: string,
|
|
503
|
+
}): CancelablePromise<ItemSubscription> {
|
|
504
|
+
return __request(OpenAPI, {
|
|
505
|
+
method: 'GET',
|
|
506
|
+
url: '/api/billing/items/{item_unique_id}/subscription/',
|
|
507
|
+
path: {
|
|
508
|
+
'item_unique_id': itemUniqueId,
|
|
509
|
+
},
|
|
510
|
+
});
|
|
511
|
+
}
|
|
512
|
+
/**
|
|
513
|
+
* Cancel subscription
|
|
514
|
+
* Cancel the current user's subscription. Returns a Stripe customer portal URL for recurring subscriptions, or cancels directly for one-time purchases.
|
|
515
|
+
* @returns PortalUrlResponse
|
|
516
|
+
* @throws ApiError
|
|
517
|
+
*/
|
|
518
|
+
public static billingItemsSubscriptionCancelCreate({
|
|
519
|
+
itemUniqueId,
|
|
520
|
+
}: {
|
|
521
|
+
itemUniqueId: string,
|
|
522
|
+
}): CancelablePromise<PortalUrlResponse> {
|
|
523
|
+
return __request(OpenAPI, {
|
|
524
|
+
method: 'POST',
|
|
525
|
+
url: '/api/billing/items/{item_unique_id}/subscription/cancel/',
|
|
526
|
+
path: {
|
|
527
|
+
'item_unique_id': itemUniqueId,
|
|
528
|
+
},
|
|
529
|
+
});
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* Get price details
|
|
533
|
+
* Retrieve a specific price by ID.
|
|
534
|
+
* @returns ItemPrice
|
|
535
|
+
* @throws ApiError
|
|
536
|
+
*/
|
|
537
|
+
public static billingItemsPricesRetrieve({
|
|
538
|
+
priceUniqueId,
|
|
539
|
+
}: {
|
|
540
|
+
priceUniqueId: string,
|
|
541
|
+
}): CancelablePromise<ItemPrice> {
|
|
542
|
+
return __request(OpenAPI, {
|
|
543
|
+
method: 'GET',
|
|
544
|
+
url: '/api/billing/items/prices/{price_unique_id}/',
|
|
545
|
+
path: {
|
|
546
|
+
'price_unique_id': priceUniqueId,
|
|
547
|
+
},
|
|
548
|
+
});
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* Update a price
|
|
552
|
+
* Update a price tier. If pricing fields change and a Stripe price exists, a new Stripe price is created and the old one deactivated.
|
|
553
|
+
* @returns ItemPrice
|
|
554
|
+
* @throws ApiError
|
|
555
|
+
*/
|
|
556
|
+
public static billingItemsPricesUpdate({
|
|
557
|
+
priceUniqueId,
|
|
558
|
+
requestBody,
|
|
559
|
+
}: {
|
|
560
|
+
priceUniqueId: string,
|
|
561
|
+
requestBody: ItemPriceCreate,
|
|
562
|
+
}): CancelablePromise<ItemPrice> {
|
|
563
|
+
return __request(OpenAPI, {
|
|
564
|
+
method: 'PUT',
|
|
565
|
+
url: '/api/billing/items/prices/{price_unique_id}/',
|
|
148
566
|
path: {
|
|
149
|
-
'
|
|
567
|
+
'price_unique_id': priceUniqueId,
|
|
150
568
|
},
|
|
569
|
+
body: requestBody,
|
|
570
|
+
mediaType: 'application/json',
|
|
571
|
+
});
|
|
572
|
+
}
|
|
573
|
+
/**
|
|
574
|
+
* Delete a price
|
|
575
|
+
* Soft-delete a price tier and deactivate the corresponding Stripe price.
|
|
576
|
+
* @returns void
|
|
577
|
+
* @throws ApiError
|
|
578
|
+
*/
|
|
579
|
+
public static billingItemsPricesDestroy({
|
|
580
|
+
priceUniqueId,
|
|
581
|
+
}: {
|
|
582
|
+
priceUniqueId: string,
|
|
583
|
+
}): CancelablePromise<void> {
|
|
584
|
+
return __request(OpenAPI, {
|
|
585
|
+
method: 'DELETE',
|
|
586
|
+
url: '/api/billing/items/prices/{price_unique_id}/',
|
|
587
|
+
path: {
|
|
588
|
+
'price_unique_id': priceUniqueId,
|
|
589
|
+
},
|
|
590
|
+
});
|
|
591
|
+
}
|
|
592
|
+
/**
|
|
593
|
+
* Create checkout session
|
|
594
|
+
* Create a Stripe checkout session for an authenticated user to purchase or subscribe to an item.
|
|
595
|
+
* @returns CheckoutSessionResponse
|
|
596
|
+
* @throws ApiError
|
|
597
|
+
*/
|
|
598
|
+
public static billingItemsPricesCheckoutCreate({
|
|
599
|
+
priceUniqueId,
|
|
600
|
+
requestBody,
|
|
601
|
+
}: {
|
|
602
|
+
priceUniqueId: string,
|
|
603
|
+
requestBody?: CheckoutSessionCreate,
|
|
604
|
+
}): CancelablePromise<CheckoutSessionResponse> {
|
|
605
|
+
return __request(OpenAPI, {
|
|
606
|
+
method: 'POST',
|
|
607
|
+
url: '/api/billing/items/prices/{price_unique_id}/checkout/',
|
|
608
|
+
path: {
|
|
609
|
+
'price_unique_id': priceUniqueId,
|
|
610
|
+
},
|
|
611
|
+
body: requestBody,
|
|
612
|
+
mediaType: 'application/json',
|
|
151
613
|
});
|
|
152
614
|
}
|
|
153
615
|
/**
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { ItemAccessCheckResponse } from '../models/ItemAccessCheckResponse';
|
|
2
|
-
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
3
|
-
export declare class AccessCheckService {
|
|
4
|
-
/**
|
|
5
|
-
* Check whether the authenticated user has payment access to an item.
|
|
6
|
-
* @returns ItemAccessCheckResponse
|
|
7
|
-
* @throws ApiError
|
|
8
|
-
*/
|
|
9
|
-
static accessCheckRetrieve({ itemId, itemType, platformKey, }: {
|
|
10
|
-
itemId: string;
|
|
11
|
-
itemType: string;
|
|
12
|
-
/**
|
|
13
|
-
* Platform key. Omit to resolve from request context.
|
|
14
|
-
*/
|
|
15
|
-
platformKey?: string;
|
|
16
|
-
}): CancelablePromise<ItemAccessCheckResponse>;
|
|
17
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { CreditAccountAutoRechargeUpdate } from '../models/CreditAccountAutoRechargeUpdate';
|
|
2
|
-
import type { CreditAccountInfo } from '../models/CreditAccountInfo';
|
|
3
|
-
import type { PatchedCreditAccountAutoRechargeUpdate } from '../models/PatchedCreditAccountAutoRechargeUpdate';
|
|
4
|
-
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
5
|
-
export declare class AccountService {
|
|
6
|
-
/**
|
|
7
|
-
* Get credit account information
|
|
8
|
-
* Return display credits (available_credits, has_credits, account_id) and auto-recharge settings. Pass platform_key (or key) to see platform balance if you are a platform admin.
|
|
9
|
-
* @returns CreditAccountInfo
|
|
10
|
-
* @throws ApiError
|
|
11
|
-
*/
|
|
12
|
-
static accountRetrieve({ platformKey, }: {
|
|
13
|
-
/**
|
|
14
|
-
* The unique key of the platform to access. If not provided, defaults to 'main' (user's own account).
|
|
15
|
-
*/
|
|
16
|
-
platformKey?: string;
|
|
17
|
-
}): CancelablePromise<CreditAccountInfo>;
|
|
18
|
-
/**
|
|
19
|
-
* Update auto-recharge preferences
|
|
20
|
-
* Update auto_recharge_threshold_usd, auto_recharge_amount_usd, auto_recharge_enabled, and/or auto_recharge_spending_limit_usd. When enabling auto-recharge, missing values are calculated: if only limit set, amount = 20% of limit; if only amount set, limit = 5x amount; if neither set, defaults are limit=20, amount=4. Pass platform_key in the request body to update platform settings.
|
|
21
|
-
* @returns CreditAccountInfo
|
|
22
|
-
* @throws ApiError
|
|
23
|
-
*/
|
|
24
|
-
static accountUpdate({ requestBody, }: {
|
|
25
|
-
requestBody?: CreditAccountAutoRechargeUpdate;
|
|
26
|
-
}): CancelablePromise<CreditAccountInfo>;
|
|
27
|
-
/**
|
|
28
|
-
* Partially update auto-recharge preferences
|
|
29
|
-
* Same as PUT; partial update of auto-recharge fields.
|
|
30
|
-
* @returns CreditAccountInfo
|
|
31
|
-
* @throws ApiError
|
|
32
|
-
*/
|
|
33
|
-
static accountPartialUpdate({ requestBody, }: {
|
|
34
|
-
requestBody?: PatchedCreditAccountAutoRechargeUpdate;
|
|
35
|
-
}): CancelablePromise<CreditAccountInfo>;
|
|
36
|
-
}
|