@iblai/iblai-api 4.288.1-ai → 4.289.0-ai

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 (43) hide show
  1. package/dist/index.cjs.js +547 -2536
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +548 -2522
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/index.umd.js +547 -2536
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/types/index.d.ts +0 -15
  8. package/dist/types/services/BillingService.d.ts +215 -4
  9. package/package.json +1 -1
  10. package/sdk_schema.yml +10797 -14096
  11. package/src/core/OpenAPI.ts +1 -1
  12. package/src/index.ts +0 -15
  13. package/src/services/BillingService.ts +468 -6
  14. package/dist/types/services/AccessCheckService.d.ts +0 -17
  15. package/dist/types/services/AccountService.d.ts +0 -36
  16. package/dist/types/services/ActivitiesService.d.ts +0 -126
  17. package/dist/types/services/AutoRechargeService.d.ts +0 -14
  18. package/dist/types/services/CreditsService.d.ts +0 -12
  19. package/dist/types/services/DealsService.d.ts +0 -192
  20. package/dist/types/services/ItemsService.d.ts +0 -13
  21. package/dist/types/services/LeadSourcesService.d.ts +0 -95
  22. package/dist/types/services/OrganizationsService.d.ts +0 -109
  23. package/dist/types/services/PersonsService.d.ts +0 -168
  24. package/dist/types/services/PipelinesService.d.ts +0 -183
  25. package/dist/types/services/PlatformsService.d.ts +0 -332
  26. package/dist/types/services/PricesService.d.ts +0 -15
  27. package/dist/types/services/TagsService.d.ts +0 -96
  28. package/dist/types/services/TransactionsService.d.ts +0 -35
  29. package/src/services/AccessCheckService.ts +0 -39
  30. package/src/services/AccountService.ts +0 -70
  31. package/src/services/ActivitiesService.ts +0 -255
  32. package/src/services/AutoRechargeService.ts +0 -29
  33. package/src/services/CreditsService.ts +0 -23
  34. package/src/services/DealsService.ts +0 -406
  35. package/src/services/ItemsService.ts +0 -29
  36. package/src/services/LeadSourcesService.ts +0 -198
  37. package/src/services/OrganizationsService.ts +0 -249
  38. package/src/services/PersonsService.ts +0 -367
  39. package/src/services/PipelinesService.ts +0 -406
  40. package/src/services/PlatformsService.ts +0 -716
  41. package/src/services/PricesService.ts +0 -34
  42. package/src/services/TagsService.ts +0 -201
  43. package/src/services/TransactionsService.ts +0 -57
package/dist/index.cjs.js CHANGED
@@ -110,7 +110,7 @@ class CancelablePromise {
110
110
 
111
111
  const OpenAPI = {
112
112
  BASE: 'https://base.manager.iblai.app',
113
- VERSION: '4.288.0-ai-plus',
113
+ VERSION: '4.289.0-ai-plus',
114
114
  WITH_CREDENTIALS: false,
115
115
  CREDENTIALS: 'include',
116
116
  TOKEN: undefined,
@@ -2277,272 +2277,6 @@ const request = (config, options) => {
2277
2277
  });
2278
2278
  };
2279
2279
 
2280
- class AccessCheckService {
2281
- /**
2282
- * Check whether the authenticated user has payment access to an item.
2283
- * @returns ItemAccessCheckResponse
2284
- * @throws ApiError
2285
- */
2286
- static accessCheckRetrieve({
2287
- itemId,
2288
- itemType,
2289
- platformKey
2290
- }) {
2291
- return request(OpenAPI, {
2292
- method: 'GET',
2293
- url: '/access-check/{item_type}/{item_id}/',
2294
- path: {
2295
- 'item_id': itemId,
2296
- 'item_type': itemType
2297
- },
2298
- query: {
2299
- 'platform_key': platformKey
2300
- }
2301
- });
2302
- }
2303
- }
2304
-
2305
- class AccountService {
2306
- /**
2307
- * Get credit account information
2308
- * 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.
2309
- * @returns CreditAccountInfo
2310
- * @throws ApiError
2311
- */
2312
- static accountRetrieve({
2313
- platformKey
2314
- }) {
2315
- return request(OpenAPI, {
2316
- method: 'GET',
2317
- url: '/account/',
2318
- query: {
2319
- 'platform_key': platformKey
2320
- }
2321
- });
2322
- }
2323
- /**
2324
- * Update auto-recharge preferences
2325
- * 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.
2326
- * @returns CreditAccountInfo
2327
- * @throws ApiError
2328
- */
2329
- static accountUpdate({
2330
- requestBody
2331
- }) {
2332
- return request(OpenAPI, {
2333
- method: 'PUT',
2334
- url: '/account/',
2335
- body: requestBody,
2336
- mediaType: 'application/json'
2337
- });
2338
- }
2339
- /**
2340
- * Partially update auto-recharge preferences
2341
- * Same as PUT; partial update of auto-recharge fields.
2342
- * @returns CreditAccountInfo
2343
- * @throws ApiError
2344
- */
2345
- static accountPartialUpdate({
2346
- requestBody
2347
- }) {
2348
- return request(OpenAPI, {
2349
- method: 'PATCH',
2350
- url: '/account/',
2351
- body: requestBody,
2352
- mediaType: 'application/json'
2353
- });
2354
- }
2355
- }
2356
-
2357
- class ActivitiesService {
2358
- /**
2359
- * List activities
2360
- * Returns a paginated list of Activities in your Platform. Supports filtering by `type`, `is_done`, `owner`, `deal`, `person`, schedule-from ranges, and `metadata__has_key`.
2361
- *
2362
- * **Required permission:** `Ibl.CRM/Activities/list`.
2363
- * @returns PaginatedActivityList
2364
- * @throws ApiError
2365
- */
2366
- static activitiesList({
2367
- deal,
2368
- isDone,
2369
- metadataHasKey,
2370
- owner,
2371
- page,
2372
- pageSize,
2373
- person,
2374
- scheduleFromGte,
2375
- scheduleFromLte,
2376
- type
2377
- }) {
2378
- return request(OpenAPI, {
2379
- method: 'GET',
2380
- url: '/activities/',
2381
- query: {
2382
- 'deal': deal,
2383
- 'is_done': isDone,
2384
- 'metadata__has_key': metadataHasKey,
2385
- 'owner': owner,
2386
- 'page': page,
2387
- 'page_size': pageSize,
2388
- 'person': person,
2389
- 'schedule_from__gte': scheduleFromGte,
2390
- 'schedule_from__lte': scheduleFromLte,
2391
- 'type': type
2392
- },
2393
- errors: {
2394
- 401: `Authentication required.`,
2395
- 403: `Missing required permission \`Ibl.CRM/Activities/list\`.`
2396
- }
2397
- });
2398
- }
2399
- /**
2400
- * Create an activity
2401
- * Creates an Activity. Either `deal` or `person` must be supplied; both must belong to your Platform.
2402
- *
2403
- * **Required permission:** `Ibl.CRM/Activities/action`.
2404
- * @returns Activity
2405
- * @throws ApiError
2406
- */
2407
- static activitiesCreate({
2408
- requestBody
2409
- }) {
2410
- return request(OpenAPI, {
2411
- method: 'POST',
2412
- url: '/activities/',
2413
- body: requestBody,
2414
- mediaType: 'application/json',
2415
- errors: {
2416
- 400: `Validation error.`,
2417
- 403: `Missing required permission \`Ibl.CRM/Activities/action\`.`
2418
- }
2419
- });
2420
- }
2421
- /**
2422
- * Retrieve an activity
2423
- * Returns a single Activity by id.
2424
- *
2425
- * **Required permission:** `Ibl.CRM/Activities/read`.
2426
- * @returns Activity
2427
- * @throws ApiError
2428
- */
2429
- static activitiesRetrieve({
2430
- id
2431
- }) {
2432
- return request(OpenAPI, {
2433
- method: 'GET',
2434
- url: '/activities/{id}/',
2435
- path: {
2436
- 'id': id
2437
- },
2438
- errors: {
2439
- 403: `Missing required permission \`Ibl.CRM/Activities/read\`.`,
2440
- 404: `Activity not found.`
2441
- }
2442
- });
2443
- }
2444
- /**
2445
- * Replace an activity
2446
- * Replaces all editable fields on the Activity.
2447
- *
2448
- * **Required permission:** `Ibl.CRM/Activities/write`.
2449
- * @returns Activity
2450
- * @throws ApiError
2451
- */
2452
- static activitiesUpdate({
2453
- id,
2454
- requestBody
2455
- }) {
2456
- return request(OpenAPI, {
2457
- method: 'PUT',
2458
- url: '/activities/{id}/',
2459
- path: {
2460
- 'id': id
2461
- },
2462
- body: requestBody,
2463
- mediaType: 'application/json',
2464
- errors: {
2465
- 400: `Validation error.`,
2466
- 403: `Missing required permission \`Ibl.CRM/Activities/write\`.`,
2467
- 404: `Activity not found.`
2468
- }
2469
- });
2470
- }
2471
- /**
2472
- * Update an activity
2473
- * Updates only the supplied fields on the Activity.
2474
- *
2475
- * **Required permission:** `Ibl.CRM/Activities/write`.
2476
- * @returns Activity
2477
- * @throws ApiError
2478
- */
2479
- static activitiesPartialUpdate({
2480
- id,
2481
- requestBody
2482
- }) {
2483
- return request(OpenAPI, {
2484
- method: 'PATCH',
2485
- url: '/activities/{id}/',
2486
- path: {
2487
- 'id': id
2488
- },
2489
- body: requestBody,
2490
- mediaType: 'application/json',
2491
- errors: {
2492
- 400: `Validation error.`,
2493
- 403: `Missing required permission \`Ibl.CRM/Activities/write\`.`,
2494
- 404: `Activity not found.`
2495
- }
2496
- });
2497
- }
2498
- /**
2499
- * Delete an activity
2500
- * Deletes the Activity.
2501
- *
2502
- * **Required permission:** `Ibl.CRM/Activities/delete`.
2503
- * @returns void
2504
- * @throws ApiError
2505
- */
2506
- static activitiesDestroy({
2507
- id
2508
- }) {
2509
- return request(OpenAPI, {
2510
- method: 'DELETE',
2511
- url: '/activities/{id}/',
2512
- path: {
2513
- 'id': id
2514
- },
2515
- errors: {
2516
- 403: `Missing required permission \`Ibl.CRM/Activities/delete\`.`,
2517
- 404: `Activity not found.`
2518
- }
2519
- });
2520
- }
2521
- /**
2522
- * Mark an activity as done
2523
- * Flips `is_done=True` and stamps `done_at` if it isn't already set. Idempotent — calling on an already-done Activity preserves the original `done_at`.
2524
- *
2525
- * **Required permission:** `Ibl.CRM/Activities/write`.
2526
- * @returns Activity
2527
- * @throws ApiError
2528
- */
2529
- static activitiesDoneCreate({
2530
- id
2531
- }) {
2532
- return request(OpenAPI, {
2533
- method: 'POST',
2534
- url: '/activities/{id}/done/',
2535
- path: {
2536
- 'id': id
2537
- },
2538
- errors: {
2539
- 403: `Missing required permission \`Ibl.CRM/Activities/write\`.`,
2540
- 404: `Activity not found.`
2541
- }
2542
- });
2543
- }
2544
- }
2545
-
2546
2280
  class AiAccountService {
2547
2281
  /**
2548
2282
  * @returns ConnectedService Callback for the OAuth flow
@@ -30813,25 +30547,6 @@ class AnalyticsService {
30813
30547
  }
30814
30548
  }
30815
30549
 
30816
- class AutoRechargeService {
30817
- /**
30818
- * Trigger auto-recharge or manual top-up
30819
- * With amount_usd: manual top-up (charge that amount, add credits; no threshold/limit/cooldown). Without amount_usd: run auto-recharge once if enabled and balance below threshold. Returns 400 if skipped or failed (e.g. no payment method, cooldown). Pass platform_key in request body.
30820
- * @returns AutoRechargeTriggerResponse
30821
- * @throws ApiError
30822
- */
30823
- static autoRechargeTriggerCreate({
30824
- requestBody
30825
- }) {
30826
- return request(OpenAPI, {
30827
- method: 'POST',
30828
- url: '/auto-recharge/trigger/',
30829
- body: requestBody,
30830
- mediaType: 'application/json'
30831
- });
30832
- }
30833
- }
30834
-
30835
30550
  class BillingService {
30836
30551
  /**
30837
30552
  * Check whether the authenticated user has payment access to an item.
@@ -30921,22 +30636,411 @@ class BillingService {
30921
30636
  });
30922
30637
  }
30923
30638
  /**
30924
- * Get public pricing by paywall config unique_id
30925
- * Looks up the paywall config by its unique_id and delegates to the standard public pricing endpoint.
30639
+ * Check whether the authenticated user has payment access to an item.
30640
+ * @returns ItemAccessCheckResponse
30641
+ * @throws ApiError
30642
+ */
30643
+ static billingItemsAccessCheckRetrieve({
30644
+ itemUniqueId,
30645
+ platformKey
30646
+ }) {
30647
+ return request(OpenAPI, {
30648
+ method: 'GET',
30649
+ url: '/api/billing/items/{item_unique_id}/access-check/',
30650
+ path: {
30651
+ 'item_unique_id': itemUniqueId
30652
+ },
30653
+ query: {
30654
+ 'platform_key': platformKey
30655
+ }
30656
+ });
30657
+ }
30658
+ /**
30659
+ * Create checkout session
30660
+ * Create a Stripe checkout session for an authenticated user to purchase or subscribe to an item.
30661
+ * @returns CheckoutSessionResponse
30662
+ * @throws ApiError
30663
+ */
30664
+ static billingItemsCheckoutCreate({
30665
+ itemUniqueId,
30666
+ requestBody
30667
+ }) {
30668
+ return request(OpenAPI, {
30669
+ method: 'POST',
30670
+ url: '/api/billing/items/{item_unique_id}/checkout/',
30671
+ path: {
30672
+ 'item_unique_id': itemUniqueId
30673
+ },
30674
+ body: requestBody,
30675
+ mediaType: 'application/json'
30676
+ });
30677
+ }
30678
+ /**
30679
+ * Handle checkout callback
30680
+ * Stripe redirects here after checkout. Processes the completed session and redirects to the return URL.
30681
+ * @returns void
30682
+ * @throws ApiError
30683
+ */
30684
+ static billingItemsCheckoutCallbackRetrieve({
30685
+ itemUniqueId,
30686
+ returnUrl
30687
+ }) {
30688
+ return request(OpenAPI, {
30689
+ method: 'GET',
30690
+ url: '/api/billing/items/{item_unique_id}/checkout-callback/',
30691
+ path: {
30692
+ 'item_unique_id': itemUniqueId
30693
+ },
30694
+ query: {
30695
+ 'return_url': returnUrl
30696
+ },
30697
+ errors: {
30698
+ 302: `No response body`
30699
+ }
30700
+ });
30701
+ }
30702
+ /**
30703
+ * Handle checkout callback
30704
+ * Stripe redirects here after checkout. Processes the completed session and redirects to the return URL.
30705
+ * @returns void
30706
+ * @throws ApiError
30707
+ */
30708
+ static billingItemsCheckoutCallbackRetrieve2({
30709
+ checkoutSessionId,
30710
+ itemUniqueId,
30711
+ returnUrl
30712
+ }) {
30713
+ return request(OpenAPI, {
30714
+ method: 'GET',
30715
+ url: '/api/billing/items/{item_unique_id}/checkout-callback/{checkout_session_id}/',
30716
+ path: {
30717
+ 'checkout_session_id': checkoutSessionId,
30718
+ 'item_unique_id': itemUniqueId
30719
+ },
30720
+ query: {
30721
+ 'return_url': returnUrl
30722
+ },
30723
+ errors: {
30724
+ 302: `No response body`
30725
+ }
30726
+ });
30727
+ }
30728
+ /**
30729
+ * Create guest checkout session
30730
+ * Create a Stripe checkout session for a guest user (email required).
30731
+ * @returns CheckoutSessionResponse
30732
+ * @throws ApiError
30733
+ */
30734
+ static billingItemsCheckoutGuestCreate({
30735
+ itemUniqueId,
30736
+ requestBody
30737
+ }) {
30738
+ return request(OpenAPI, {
30739
+ method: 'POST',
30740
+ url: '/api/billing/items/{item_unique_id}/checkout-guest/',
30741
+ path: {
30742
+ 'item_unique_id': itemUniqueId
30743
+ },
30744
+ body: requestBody,
30745
+ mediaType: 'application/json'
30746
+ });
30747
+ }
30748
+ /**
30749
+ * Get paywall configuration
30750
+ * Retrieve the paywall configuration for an item. Returns default (disabled) config if none exists.
30751
+ * @returns ItemPaywallConfig
30752
+ * @throws ApiError
30753
+ */
30754
+ static billingItemsPaywallRetrieve({
30755
+ itemUniqueId
30756
+ }) {
30757
+ return request(OpenAPI, {
30758
+ method: 'GET',
30759
+ url: '/api/billing/items/{item_unique_id}/paywall/',
30760
+ path: {
30761
+ 'item_unique_id': itemUniqueId
30762
+ }
30763
+ });
30764
+ }
30765
+ /**
30766
+ * Create or update paywall configuration
30767
+ * Enable or configure the paywall for an item. Creates a Stripe product on first enable.
30768
+ * @returns ItemPaywallConfig
30769
+ * @throws ApiError
30770
+ */
30771
+ static billingItemsPaywallCreate({
30772
+ itemUniqueId,
30773
+ requestBody
30774
+ }) {
30775
+ return request(OpenAPI, {
30776
+ method: 'POST',
30777
+ url: '/api/billing/items/{item_unique_id}/paywall/',
30778
+ path: {
30779
+ 'item_unique_id': itemUniqueId
30780
+ },
30781
+ body: requestBody,
30782
+ mediaType: 'application/json'
30783
+ });
30784
+ }
30785
+ /**
30786
+ * Update paywall configuration
30787
+ * Same as POST. Update the paywall configuration for an item.
30788
+ * @returns ItemPaywallConfig
30789
+ * @throws ApiError
30790
+ */
30791
+ static billingItemsPaywallUpdate({
30792
+ itemUniqueId,
30793
+ requestBody
30794
+ }) {
30795
+ return request(OpenAPI, {
30796
+ method: 'PUT',
30797
+ url: '/api/billing/items/{item_unique_id}/paywall/',
30798
+ path: {
30799
+ 'item_unique_id': itemUniqueId
30800
+ },
30801
+ body: requestBody,
30802
+ mediaType: 'application/json'
30803
+ });
30804
+ }
30805
+ /**
30806
+ * Disable paywall configuration
30807
+ * Disable the paywall for an item. Does not delete the configuration.
30808
+ * @returns void
30809
+ * @throws ApiError
30810
+ */
30811
+ static billingItemsPaywallDestroy({
30812
+ itemUniqueId
30813
+ }) {
30814
+ return request(OpenAPI, {
30815
+ method: 'DELETE',
30816
+ url: '/api/billing/items/{item_unique_id}/paywall/',
30817
+ path: {
30818
+ 'item_unique_id': itemUniqueId
30819
+ }
30820
+ });
30821
+ }
30822
+ /**
30823
+ * List prices
30824
+ * List active prices for an item's paywall configuration.
30825
+ * @returns ItemPrice
30826
+ * @throws ApiError
30827
+ */
30828
+ static billingItemsPaywallPricesList({
30829
+ itemUniqueId
30830
+ }) {
30831
+ return request(OpenAPI, {
30832
+ method: 'GET',
30833
+ url: '/api/billing/items/{item_unique_id}/paywall/prices/',
30834
+ path: {
30835
+ 'item_unique_id': itemUniqueId
30836
+ }
30837
+ });
30838
+ }
30839
+ /**
30840
+ * Create a price
30841
+ * Create a new price tier for an item. Requires paywall to be enabled and Stripe Connect account ready.
30842
+ * @returns ItemPrice
30843
+ * @throws ApiError
30844
+ */
30845
+ static billingItemsPaywallPricesCreate({
30846
+ itemUniqueId,
30847
+ requestBody
30848
+ }) {
30849
+ return request(OpenAPI, {
30850
+ method: 'POST',
30851
+ url: '/api/billing/items/{item_unique_id}/paywall/prices/',
30852
+ path: {
30853
+ 'item_unique_id': itemUniqueId
30854
+ },
30855
+ body: requestBody,
30856
+ mediaType: 'application/json'
30857
+ });
30858
+ }
30859
+ /**
30860
+ * Get public pricing
30861
+ * Retrieve public pricing information for an item. No authentication required.
30862
+ * @returns PublicItemPricing
30863
+ * @throws ApiError
30864
+ */
30865
+ static billingItemsPricingRetrieve({
30866
+ itemUniqueId
30867
+ }) {
30868
+ return request(OpenAPI, {
30869
+ method: 'GET',
30870
+ url: '/api/billing/items/{item_unique_id}/pricing/',
30871
+ path: {
30872
+ 'item_unique_id': itemUniqueId
30873
+ }
30874
+ });
30875
+ }
30876
+ /**
30877
+ * Get public pricing
30878
+ * Retrieve public pricing information for an item. No authentication required.
30926
30879
  * @returns PublicItemPricing
30927
30880
  * @throws ApiError
30928
30881
  */
30929
30882
  static billingItemsPublicPricingRetrieve({
30930
- configUniqueId
30883
+ itemUniqueId
30884
+ }) {
30885
+ return request(OpenAPI, {
30886
+ method: 'GET',
30887
+ url: '/api/billing/items/{item_unique_id}/public-pricing/',
30888
+ path: {
30889
+ 'item_unique_id': itemUniqueId
30890
+ }
30891
+ });
30892
+ }
30893
+ /**
30894
+ * Check whether the authenticated user has payment access to an item on a scoped platform.
30895
+ * @returns ItemAccessCheckResponse
30896
+ * @throws ApiError
30897
+ */
30898
+ static billingItemsScopedAccessCheckRetrieve({
30899
+ itemUniqueId
30900
+ }) {
30901
+ return request(OpenAPI, {
30902
+ method: 'GET',
30903
+ url: '/api/billing/items/{item_unique_id}/scoped-access-check/',
30904
+ path: {
30905
+ 'item_unique_id': itemUniqueId
30906
+ }
30907
+ });
30908
+ }
30909
+ /**
30910
+ * List item subscribers
30911
+ * List all subscribers for an item. Optionally filter by subscription status.
30912
+ * @returns PaginatedItemSubscriptionList
30913
+ * @throws ApiError
30914
+ */
30915
+ static billingItemsSubscribersList({
30916
+ itemUniqueId,
30917
+ page,
30918
+ pageSize,
30919
+ search,
30920
+ status
30921
+ }) {
30922
+ return request(OpenAPI, {
30923
+ method: 'GET',
30924
+ url: '/api/billing/items/{item_unique_id}/subscribers/',
30925
+ path: {
30926
+ 'item_unique_id': itemUniqueId
30927
+ },
30928
+ query: {
30929
+ 'page': page,
30930
+ 'page_size': pageSize,
30931
+ 'search': search,
30932
+ 'status': status
30933
+ }
30934
+ });
30935
+ }
30936
+ /**
30937
+ * Get user subscription
30938
+ * Retrieve the current user's subscription to an item.
30939
+ * @returns ItemSubscription
30940
+ * @throws ApiError
30941
+ */
30942
+ static billingItemsSubscriptionRetrieve({
30943
+ itemUniqueId
30944
+ }) {
30945
+ return request(OpenAPI, {
30946
+ method: 'GET',
30947
+ url: '/api/billing/items/{item_unique_id}/subscription/',
30948
+ path: {
30949
+ 'item_unique_id': itemUniqueId
30950
+ }
30951
+ });
30952
+ }
30953
+ /**
30954
+ * Cancel subscription
30955
+ * Cancel the current user's subscription. Returns a Stripe customer portal URL for recurring subscriptions, or cancels directly for one-time purchases.
30956
+ * @returns PortalUrlResponse
30957
+ * @throws ApiError
30958
+ */
30959
+ static billingItemsSubscriptionCancelCreate({
30960
+ itemUniqueId
30961
+ }) {
30962
+ return request(OpenAPI, {
30963
+ method: 'POST',
30964
+ url: '/api/billing/items/{item_unique_id}/subscription/cancel/',
30965
+ path: {
30966
+ 'item_unique_id': itemUniqueId
30967
+ }
30968
+ });
30969
+ }
30970
+ /**
30971
+ * Get price details
30972
+ * Retrieve a specific price by ID.
30973
+ * @returns ItemPrice
30974
+ * @throws ApiError
30975
+ */
30976
+ static billingItemsPricesRetrieve({
30977
+ priceUniqueId
30931
30978
  }) {
30932
30979
  return request(OpenAPI, {
30933
30980
  method: 'GET',
30934
- url: '/api/billing/items/{config_unique_id}/public-pricing/',
30981
+ url: '/api/billing/items/prices/{price_unique_id}/',
30935
30982
  path: {
30936
- 'config_unique_id': configUniqueId
30983
+ 'price_unique_id': priceUniqueId
30937
30984
  }
30938
30985
  });
30939
30986
  }
30987
+ /**
30988
+ * Update a price
30989
+ * Update a price tier. If pricing fields change and a Stripe price exists, a new Stripe price is created and the old one deactivated.
30990
+ * @returns ItemPrice
30991
+ * @throws ApiError
30992
+ */
30993
+ static billingItemsPricesUpdate({
30994
+ priceUniqueId,
30995
+ requestBody
30996
+ }) {
30997
+ return request(OpenAPI, {
30998
+ method: 'PUT',
30999
+ url: '/api/billing/items/prices/{price_unique_id}/',
31000
+ path: {
31001
+ 'price_unique_id': priceUniqueId
31002
+ },
31003
+ body: requestBody,
31004
+ mediaType: 'application/json'
31005
+ });
31006
+ }
31007
+ /**
31008
+ * Delete a price
31009
+ * Soft-delete a price tier and deactivate the corresponding Stripe price.
31010
+ * @returns void
31011
+ * @throws ApiError
31012
+ */
31013
+ static billingItemsPricesDestroy({
31014
+ priceUniqueId
31015
+ }) {
31016
+ return request(OpenAPI, {
31017
+ method: 'DELETE',
31018
+ url: '/api/billing/items/prices/{price_unique_id}/',
31019
+ path: {
31020
+ 'price_unique_id': priceUniqueId
31021
+ }
31022
+ });
31023
+ }
31024
+ /**
31025
+ * Create checkout session
31026
+ * Create a Stripe checkout session for an authenticated user to purchase or subscribe to an item.
31027
+ * @returns CheckoutSessionResponse
31028
+ * @throws ApiError
31029
+ */
31030
+ static billingItemsPricesCheckoutCreate({
31031
+ priceUniqueId,
31032
+ requestBody
31033
+ }) {
31034
+ return request(OpenAPI, {
31035
+ method: 'POST',
31036
+ url: '/api/billing/items/prices/{price_unique_id}/checkout/',
31037
+ path: {
31038
+ 'price_unique_id': priceUniqueId
31039
+ },
31040
+ body: requestBody,
31041
+ mediaType: 'application/json'
31042
+ });
31043
+ }
30940
31044
  /**
30941
31045
  * Check whether the authenticated user has payment access to an item on a scoped platform.
30942
31046
  * @returns ItemAccessCheckResponse
@@ -45782,23 +45886,6 @@ class CredentialsService {
45782
45886
  }
45783
45887
  }
45784
45888
 
45785
- class CreditsService {
45786
- /**
45787
- * Sample endpoint protected by @consume_credits (opt-in).
45788
- *
45789
- * Balance is checked before the view runs. If insufficient, 402 with
45790
- * pricing_table is returned; otherwise the view runs and 1 credit is consumed.
45791
- * @returns any No response body
45792
- * @throws ApiError
45793
- */
45794
- static creditsSampleActionCreate() {
45795
- return request(OpenAPI, {
45796
- method: 'POST',
45797
- url: '/credits/sample-action/'
45798
- });
45799
- }
45800
- }
45801
-
45802
45889
  class CrmService {
45803
45890
  /**
45804
45891
  * List activities
@@ -47517,316 +47604,6 @@ class CustomDomainsService {
47517
47604
  }
47518
47605
  }
47519
47606
 
47520
- class DealsService {
47521
- /**
47522
- * List deals
47523
- * Returns a paginated list of Deals in your Platform. Supports filtering by `status`, `pipeline`, `stage`, `owner`, `source`, `person`, `organization`, expected-close-date and created-at ranges, and `metadata__has_key`.
47524
- *
47525
- * **Required permission:** `Ibl.CRM/Deals/list`.
47526
- * @returns PaginatedDealList
47527
- * @throws ApiError
47528
- */
47529
- static dealsList({
47530
- createdAtGte,
47531
- createdAtLte,
47532
- expectedCloseDateGte,
47533
- expectedCloseDateLte,
47534
- metadataHasKey,
47535
- organization,
47536
- owner,
47537
- page,
47538
- pageSize,
47539
- person,
47540
- pipeline,
47541
- source,
47542
- stage,
47543
- status,
47544
- tags
47545
- }) {
47546
- return request(OpenAPI, {
47547
- method: 'GET',
47548
- url: '/deals/',
47549
- query: {
47550
- 'created_at__gte': createdAtGte,
47551
- 'created_at__lte': createdAtLte,
47552
- 'expected_close_date__gte': expectedCloseDateGte,
47553
- 'expected_close_date__lte': expectedCloseDateLte,
47554
- 'metadata__has_key': metadataHasKey,
47555
- 'organization': organization,
47556
- 'owner': owner,
47557
- 'page': page,
47558
- 'page_size': pageSize,
47559
- 'person': person,
47560
- 'pipeline': pipeline,
47561
- 'source': source,
47562
- 'stage': stage,
47563
- 'status': status,
47564
- 'tags': tags
47565
- },
47566
- errors: {
47567
- 401: `Authentication required.`,
47568
- 403: `Missing required permission \`Ibl.CRM/Deals/list\`.`
47569
- }
47570
- });
47571
- }
47572
- /**
47573
- * Create a deal
47574
- * Creates a new Deal. All FK targets (`person`, `organization`, `pipeline`, `stage`, `source`) must belong to your Platform; `stage` must belong to `pipeline`. `status` and `closed_at` are service-managed — passing them returns `400`.
47575
- *
47576
- * **Required permission:** `Ibl.CRM/Deals/action`.
47577
- * @returns Deal
47578
- * @throws ApiError
47579
- */
47580
- static dealsCreate({
47581
- requestBody
47582
- }) {
47583
- return request(OpenAPI, {
47584
- method: 'POST',
47585
- url: '/deals/',
47586
- body: requestBody,
47587
- mediaType: 'application/json',
47588
- errors: {
47589
- 400: `Validation error.`,
47590
- 403: `Missing required permission \`Ibl.CRM/Deals/action\`.`
47591
- }
47592
- });
47593
- }
47594
- /**
47595
- * Retrieve a deal
47596
- * Returns a single Deal by id.
47597
- *
47598
- * **Required permission:** `Ibl.CRM/Deals/read`.
47599
- * @returns Deal
47600
- * @throws ApiError
47601
- */
47602
- static dealsRetrieve({
47603
- id
47604
- }) {
47605
- return request(OpenAPI, {
47606
- method: 'GET',
47607
- url: '/deals/{id}/',
47608
- path: {
47609
- 'id': id
47610
- },
47611
- errors: {
47612
- 403: `Missing required permission \`Ibl.CRM/Deals/read\`.`,
47613
- 404: `Deal not found.`
47614
- }
47615
- });
47616
- }
47617
- /**
47618
- * Replace a deal
47619
- * Replaces all editable fields on the Deal.
47620
- *
47621
- * **Required permission:** `Ibl.CRM/Deals/write`.
47622
- * @returns Deal
47623
- * @throws ApiError
47624
- */
47625
- static dealsUpdate({
47626
- id,
47627
- requestBody
47628
- }) {
47629
- return request(OpenAPI, {
47630
- method: 'PUT',
47631
- url: '/deals/{id}/',
47632
- path: {
47633
- 'id': id
47634
- },
47635
- body: requestBody,
47636
- mediaType: 'application/json',
47637
- errors: {
47638
- 400: `Validation error.`,
47639
- 403: `Missing required permission \`Ibl.CRM/Deals/write\`.`,
47640
- 404: `Deal not found.`
47641
- }
47642
- });
47643
- }
47644
- /**
47645
- * Update a deal
47646
- * Updates only the supplied fields on the Deal. Direct writes to `status` or `closed_at` are rejected with `400` — use `POST /deals/{id}/move-stage/`, `won/`, or `lost/`.
47647
- *
47648
- * **Required permission:** `Ibl.CRM/Deals/write`.
47649
- * @returns Deal
47650
- * @throws ApiError
47651
- */
47652
- static dealsPartialUpdate({
47653
- id,
47654
- requestBody
47655
- }) {
47656
- return request(OpenAPI, {
47657
- method: 'PATCH',
47658
- url: '/deals/{id}/',
47659
- path: {
47660
- 'id': id
47661
- },
47662
- body: requestBody,
47663
- mediaType: 'application/json',
47664
- errors: {
47665
- 400: `Validation error.`,
47666
- 403: `Missing required permission \`Ibl.CRM/Deals/write\`.`,
47667
- 404: `Deal not found.`
47668
- }
47669
- });
47670
- }
47671
- /**
47672
- * Delete a deal
47673
- * Deletes the Deal.
47674
- *
47675
- * **Required permission:** `Ibl.CRM/Deals/delete`.
47676
- * @returns void
47677
- * @throws ApiError
47678
- */
47679
- static dealsDestroy({
47680
- id
47681
- }) {
47682
- return request(OpenAPI, {
47683
- method: 'DELETE',
47684
- url: '/deals/{id}/',
47685
- path: {
47686
- 'id': id
47687
- },
47688
- errors: {
47689
- 403: `Missing required permission \`Ibl.CRM/Deals/delete\`.`,
47690
- 404: `Deal not found.`
47691
- }
47692
- });
47693
- }
47694
- /**
47695
- * Mark a deal as lost
47696
- * Moves the Deal into a closed-lost stage and persists `lost_reason`. If `stage_code` is omitted, the first `is_lost=True` stage in the Deal's pipeline (by sort order) is used.
47697
- *
47698
- * **Required permission:** `Ibl.CRM/Deals/write`.
47699
- * @returns Deal
47700
- * @throws ApiError
47701
- */
47702
- static dealsLostCreate({
47703
- id,
47704
- requestBody
47705
- }) {
47706
- return request(OpenAPI, {
47707
- method: 'POST',
47708
- url: '/deals/{id}/lost/',
47709
- path: {
47710
- 'id': id
47711
- },
47712
- body: requestBody,
47713
- mediaType: 'application/json',
47714
- errors: {
47715
- 400: `Missing \`lost_reason\`, no \`is_lost\` stage configured, or the supplied stage_code is not flagged is_lost=True.`,
47716
- 403: `Missing required permission \`Ibl.CRM/Deals/write\`.`,
47717
- 404: `Deal not found.`
47718
- }
47719
- });
47720
- }
47721
- /**
47722
- * Move a deal to a different stage
47723
- * Moves the Deal to the stage identified by `stage_id` or `stage_code`. The target stage must belong to this Deal's pipeline. Records an audit Activity and emits `deal_stage_changed`. `Deal.status` is recomputed from the new stage's `is_won` / `is_lost` flags.
47724
- *
47725
- * **Required permission:** `Ibl.CRM/Deals/write`.
47726
- * @returns Deal
47727
- * @throws ApiError
47728
- */
47729
- static dealsMoveStageCreate({
47730
- id,
47731
- requestBody
47732
- }) {
47733
- return request(OpenAPI, {
47734
- method: 'POST',
47735
- url: '/deals/{id}/move-stage/',
47736
- path: {
47737
- 'id': id
47738
- },
47739
- body: requestBody,
47740
- mediaType: 'application/json',
47741
- errors: {
47742
- 400: `Validation error (e.g. stage not in pipeline).`,
47743
- 403: `Missing required permission \`Ibl.CRM/Deals/write\`.`,
47744
- 404: `Deal or stage not found.`
47745
- }
47746
- });
47747
- }
47748
- /**
47749
- * Attach a tag to this record
47750
- * Attaches an existing Tag to this record. Both the Tag and the record must belong to your Platform. Returns `409 Conflict` with the existing `assignment_id` if the tag is already attached.
47751
- *
47752
- * **Required permission:** `Ibl.CRM/Tags/write`.
47753
- * @returns any No response body
47754
- * @throws ApiError
47755
- */
47756
- static dealsTagsCreate({
47757
- id,
47758
- requestBody
47759
- }) {
47760
- return request(OpenAPI, {
47761
- method: 'POST',
47762
- url: '/deals/{id}/tags/',
47763
- path: {
47764
- 'id': id
47765
- },
47766
- body: requestBody,
47767
- mediaType: 'application/json',
47768
- errors: {
47769
- 400: `No response body`,
47770
- 403: `No response body`,
47771
- 404: `No response body`,
47772
- 409: `No response body`
47773
- }
47774
- });
47775
- }
47776
- /**
47777
- * Detach a tag from this record
47778
- * Removes the Tag with id `tag_id` from this record. Returns `404` if the tag was not attached.
47779
- *
47780
- * **Required permission:** `Ibl.CRM/Tags/write`.
47781
- * @returns void
47782
- * @throws ApiError
47783
- */
47784
- static dealsTagsDestroy({
47785
- id,
47786
- tagId
47787
- }) {
47788
- return request(OpenAPI, {
47789
- method: 'DELETE',
47790
- url: '/deals/{id}/tags/{tag_id}/',
47791
- path: {
47792
- 'id': id,
47793
- 'tag_id': tagId
47794
- },
47795
- errors: {
47796
- 403: `No response body`,
47797
- 404: `No response body`
47798
- }
47799
- });
47800
- }
47801
- /**
47802
- * Mark a deal as won
47803
- * Moves the Deal into a closed-won stage and sets `status='won'`. If `stage_code` is omitted, the first `is_won=True` stage in the Deal's pipeline (by sort order) is used.
47804
- *
47805
- * **Required permission:** `Ibl.CRM/Deals/write`.
47806
- * @returns Deal
47807
- * @throws ApiError
47808
- */
47809
- static dealsWonCreate({
47810
- id,
47811
- requestBody
47812
- }) {
47813
- return request(OpenAPI, {
47814
- method: 'POST',
47815
- url: '/deals/{id}/won/',
47816
- path: {
47817
- 'id': id
47818
- },
47819
- body: requestBody,
47820
- mediaType: 'application/json',
47821
- errors: {
47822
- 400: `No \`is_won\` stage configured, or the supplied stage_code is not flagged is_won=True.`,
47823
- 403: `Missing required permission \`Ibl.CRM/Deals/write\`.`,
47824
- 404: `Deal not found.`
47825
- }
47826
- });
47827
- }
47828
- }
47829
-
47830
47607
  class EximService {
47831
47608
  /**
47832
47609
  * Admin-only CRUD for CourseExportEligibility records.
@@ -48413,180 +48190,6 @@ class IntegrationCredentialsService {
48413
48190
  }
48414
48191
  }
48415
48192
 
48416
- class ItemsService {
48417
- /**
48418
- * Get public pricing by paywall config unique_id
48419
- * Looks up the paywall config by its unique_id and delegates to the standard public pricing endpoint.
48420
- * @returns PublicItemPricing
48421
- * @throws ApiError
48422
- */
48423
- static itemsPublicPricingRetrieve({
48424
- configUniqueId
48425
- }) {
48426
- return request(OpenAPI, {
48427
- method: 'GET',
48428
- url: '/items/{config_unique_id}/public-pricing/',
48429
- path: {
48430
- 'config_unique_id': configUniqueId
48431
- }
48432
- });
48433
- }
48434
- }
48435
-
48436
- class LeadSourcesService {
48437
- /**
48438
- * List lead sources
48439
- * Returns a paginated list of LeadSources in your Platform.
48440
- *
48441
- * **Required permission:** `Ibl.CRM/Pipelines/list`.
48442
- * @returns PaginatedLeadSourceList
48443
- * @throws ApiError
48444
- */
48445
- static leadSourcesList({
48446
- code,
48447
- name,
48448
- page,
48449
- pageSize
48450
- }) {
48451
- return request(OpenAPI, {
48452
- method: 'GET',
48453
- url: '/lead-sources/',
48454
- query: {
48455
- 'code': code,
48456
- 'name': name,
48457
- 'page': page,
48458
- 'page_size': pageSize
48459
- },
48460
- errors: {
48461
- 401: `Authentication required.`,
48462
- 403: `Missing required permission \`Ibl.CRM/Pipelines/list\`.`
48463
- }
48464
- });
48465
- }
48466
- /**
48467
- * Create a lead source
48468
- * Creates a new LeadSource in your Platform. `code` must be unique.
48469
- *
48470
- * **Required permission:** `Ibl.CRM/Pipelines/action`.
48471
- * @returns LeadSource
48472
- * @throws ApiError
48473
- */
48474
- static leadSourcesCreate({
48475
- requestBody
48476
- }) {
48477
- return request(OpenAPI, {
48478
- method: 'POST',
48479
- url: '/lead-sources/',
48480
- body: requestBody,
48481
- mediaType: 'application/json',
48482
- errors: {
48483
- 400: `Validation error.`,
48484
- 403: `Missing required permission \`Ibl.CRM/Pipelines/action\`.`
48485
- }
48486
- });
48487
- }
48488
- /**
48489
- * Retrieve a lead source
48490
- * Returns a single LeadSource by id.
48491
- *
48492
- * **Required permission:** `Ibl.CRM/Pipelines/read`.
48493
- * @returns LeadSource
48494
- * @throws ApiError
48495
- */
48496
- static leadSourcesRetrieve({
48497
- id
48498
- }) {
48499
- return request(OpenAPI, {
48500
- method: 'GET',
48501
- url: '/lead-sources/{id}/',
48502
- path: {
48503
- 'id': id
48504
- },
48505
- errors: {
48506
- 403: `Missing required permission \`Ibl.CRM/Pipelines/read\`.`,
48507
- 404: `LeadSource not found.`
48508
- }
48509
- });
48510
- }
48511
- /**
48512
- * Replace a lead source
48513
- * Replaces all editable fields on the LeadSource.
48514
- *
48515
- * **Required permission:** `Ibl.CRM/Pipelines/write`.
48516
- * @returns LeadSource
48517
- * @throws ApiError
48518
- */
48519
- static leadSourcesUpdate({
48520
- id,
48521
- requestBody
48522
- }) {
48523
- return request(OpenAPI, {
48524
- method: 'PUT',
48525
- url: '/lead-sources/{id}/',
48526
- path: {
48527
- 'id': id
48528
- },
48529
- body: requestBody,
48530
- mediaType: 'application/json',
48531
- errors: {
48532
- 400: `Validation error.`,
48533
- 403: `Missing required permission \`Ibl.CRM/Pipelines/write\`.`,
48534
- 404: `LeadSource not found.`
48535
- }
48536
- });
48537
- }
48538
- /**
48539
- * Update a lead source
48540
- * Updates only the supplied fields on the LeadSource.
48541
- *
48542
- * **Required permission:** `Ibl.CRM/Pipelines/write`.
48543
- * @returns LeadSource
48544
- * @throws ApiError
48545
- */
48546
- static leadSourcesPartialUpdate({
48547
- id,
48548
- requestBody
48549
- }) {
48550
- return request(OpenAPI, {
48551
- method: 'PATCH',
48552
- url: '/lead-sources/{id}/',
48553
- path: {
48554
- 'id': id
48555
- },
48556
- body: requestBody,
48557
- mediaType: 'application/json',
48558
- errors: {
48559
- 400: `Validation error.`,
48560
- 403: `Missing required permission \`Ibl.CRM/Pipelines/write\`.`,
48561
- 404: `LeadSource not found.`
48562
- }
48563
- });
48564
- }
48565
- /**
48566
- * Delete a lead source
48567
- * Deletes the LeadSource. Any Deals referencing it have their `source` cleared.
48568
- *
48569
- * **Required permission:** `Ibl.CRM/Pipelines/delete`.
48570
- * @returns void
48571
- * @throws ApiError
48572
- */
48573
- static leadSourcesDestroy({
48574
- id
48575
- }) {
48576
- return request(OpenAPI, {
48577
- method: 'DELETE',
48578
- url: '/lead-sources/{id}/',
48579
- path: {
48580
- 'id': id
48581
- },
48582
- errors: {
48583
- 403: `Missing required permission \`Ibl.CRM/Pipelines/delete\`.`,
48584
- 404: `LeadSource not found.`
48585
- }
48586
- });
48587
- }
48588
- }
48589
-
48590
48193
  class MediaService {
48591
48194
  /**
48592
48195
  * List and filter media resources. Supports filtering by course_id, unit_id, item_id and searching across multiple fields.
@@ -49143,1338 +48746,20 @@ class NotificationsService {
49143
48746
  }
49144
48747
  });
49145
48748
  }
49146
- /**
49147
- * Preview notification
49148
- * Preview notification recipients and get build ID for sending
49149
- * @returns PreviewResponse
49150
- * @throws ApiError
49151
- */
49152
- static notificationV1OrgsNotificationBuilderPreviewCreate({
49153
- platformKey,
49154
- requestBody
49155
- }) {
49156
- return request(OpenAPI, {
49157
- method: 'POST',
49158
- url: '/api/notification/v1/orgs/{platform_key}/notification-builder/preview/',
49159
- path: {
49160
- 'platform_key': platformKey
49161
- },
49162
- body: requestBody,
49163
- mediaType: 'application/json'
49164
- });
49165
- }
49166
- /**
49167
- * Send notification
49168
- * Send notifications to all recipients in a build
49169
- * @returns SendResponse
49170
- * @throws ApiError
49171
- */
49172
- static notificationV1OrgsNotificationBuilderSendCreate({
49173
- platformKey,
49174
- requestBody
49175
- }) {
49176
- return request(OpenAPI, {
49177
- method: 'POST',
49178
- url: '/api/notification/v1/orgs/{platform_key}/notification-builder/send/',
49179
- path: {
49180
- 'platform_key': platformKey
49181
- },
49182
- body: requestBody,
49183
- mediaType: 'application/json'
49184
- });
49185
- }
49186
- /**
49187
- * Validate notification source
49188
- * Validate a single notification source (email, username, platform, csv)
49189
- * @returns ValidateSourceResponse
49190
- * @throws ApiError
49191
- */
49192
- static notificationV1OrgsNotificationBuilderValidateSourceCreate({
49193
- platformKey,
49194
- requestBody
49195
- }) {
49196
- return request(OpenAPI, {
49197
- method: 'POST',
49198
- url: '/api/notification/v1/orgs/{platform_key}/notification-builder/validate_source/',
49199
- path: {
49200
- 'platform_key': platformKey
49201
- },
49202
- body: requestBody,
49203
- mediaType: 'application/json'
49204
- });
49205
- }
49206
- /**
49207
- * Test SMTP credentials for a platform
49208
- * Test SMTP credentials by sending a test email to the specified address. Requires: Ibl.Notifications/SMTP/action
49209
- * @returns TestSMTPResponse
49210
- * @throws ApiError
49211
- */
49212
- static notificationV1PlatformsConfigTestSmtpCreate({
49213
- platformKey,
49214
- requestBody
49215
- }) {
49216
- return request(OpenAPI, {
49217
- method: 'POST',
49218
- url: '/api/notification/v1/platforms/{platform_key}/config/test-smtp/',
49219
- path: {
49220
- 'platform_key': platformKey
49221
- },
49222
- body: requestBody,
49223
- mediaType: 'application/json'
49224
- });
49225
- }
49226
- /**
49227
- * Get user notification preferences
49228
- * Retrieve notification preferences for the authenticated user (or another user via ?username= for admins). Auto-creates preferences with defaults on first access. RBAC: Ibl.Notifications/Notification/read
49229
- * @returns UserNotificationPreferences
49230
- * @throws ApiError
49231
- */
49232
- static notificationV1PlatformsNotificationPreferencesRetrieve({
49233
- platformKey,
49234
- tags,
49235
- username
49236
- }) {
49237
- return request(OpenAPI, {
49238
- method: 'GET',
49239
- url: '/api/notification/v1/platforms/{platform_key}/notification-preferences/',
49240
- path: {
49241
- 'platform_key': platformKey
49242
- },
49243
- query: {
49244
- 'tags': tags,
49245
- 'username': username
49246
- }
49247
- });
49248
- }
49249
- /**
49250
- * Update user notification preferences
49251
- * Partially update global notification preferences. Per-type overrides use the /types/{notification_type}/ endpoint. RBAC: Ibl.Notifications/Notification/write
49252
- * @returns UserNotificationPreferences
49253
- * @throws ApiError
49254
- */
49255
- static notificationV1PlatformsNotificationPreferencesPartialUpdate({
49256
- platformKey,
49257
- tags,
49258
- username,
49259
- requestBody
49260
- }) {
49261
- return request(OpenAPI, {
49262
- method: 'PATCH',
49263
- url: '/api/notification/v1/platforms/{platform_key}/notification-preferences/',
49264
- path: {
49265
- 'platform_key': platformKey
49266
- },
49267
- query: {
49268
- 'tags': tags,
49269
- 'username': username
49270
- },
49271
- body: requestBody,
49272
- mediaType: 'application/json'
49273
- });
49274
- }
49275
- /**
49276
- * List available notification types
49277
- * Returns notification types enabled for this platform, annotated with the user's per-type preferences. RBAC: Ibl.Notifications/Notification/read
49278
- * @returns AvailableNotificationType
49279
- * @throws ApiError
49280
- */
49281
- static notificationV1PlatformsNotificationPreferencesAvailableTypesList({
49282
- platformKey,
49283
- tags,
49284
- username
49285
- }) {
49286
- return request(OpenAPI, {
49287
- method: 'GET',
49288
- url: '/api/notification/v1/platforms/{platform_key}/notification-preferences/available-types/',
49289
- path: {
49290
- 'platform_key': platformKey
49291
- },
49292
- query: {
49293
- 'tags': tags,
49294
- 'username': username
49295
- }
49296
- });
49297
- }
49298
- /**
49299
- * Update per-type notification preference
49300
- * Set enabled/frequency for a single notification type. RBAC: Ibl.Notifications/Notification/write
49301
- * @returns NotificationTypePreference
49302
- * @throws ApiError
49303
- */
49304
- static notificationV1PlatformsNotificationPreferencesTypesPartialUpdate({
49305
- notificationType,
49306
- platformKey,
49307
- tags,
49308
- username,
49309
- requestBody
49310
- }) {
49311
- return request(OpenAPI, {
49312
- method: 'PATCH',
49313
- url: '/api/notification/v1/platforms/{platform_key}/notification-preferences/types/{notification_type}/',
49314
- path: {
49315
- 'notification_type': notificationType,
49316
- 'platform_key': platformKey
49317
- },
49318
- query: {
49319
- 'tags': tags,
49320
- 'username': username
49321
- },
49322
- body: requestBody,
49323
- mediaType: 'application/json'
49324
- });
49325
- }
49326
- /**
49327
- * List notification templates
49328
- * Get all notification templates for the platform. Includes both platform-specific and inherited templates from main. Filter by tags with ?tags=learning,activity (comma-separated, OR logic). Requires permission: Ibl.Notifications/NotificationTemplate/list
49329
- * @returns NotificationTemplateList
49330
- * @throws ApiError
49331
- */
49332
- static notificationV1PlatformsTemplatesList({
49333
- platformKey,
49334
- page,
49335
- pageSize = 25,
49336
- tags
49337
- }) {
49338
- return request(OpenAPI, {
49339
- method: 'GET',
49340
- url: '/api/notification/v1/platforms/{platform_key}/templates/',
49341
- path: {
49342
- 'platform_key': platformKey
49343
- },
49344
- query: {
49345
- 'page': page,
49346
- 'page_size': pageSize,
49347
- 'tags': tags
49348
- }
49349
- });
49350
- }
49351
- /**
49352
- * Get notification template details
49353
- * Get detailed view of a notification template by type. Returns platform-specific template if exists, otherwise main template. Requires permission: Ibl.Notifications/NotificationTemplate/read
49354
- * @returns NotificationTemplateDetail
49355
- * @throws ApiError
49356
- */
49357
- static notificationV1PlatformsTemplatesRetrieve({
49358
- notificationType,
49359
- platformKey
49360
- }) {
49361
- return request(OpenAPI, {
49362
- method: 'GET',
49363
- url: '/api/notification/v1/platforms/{platform_key}/templates/{notification_type}/',
49364
- path: {
49365
- 'notification_type': notificationType,
49366
- 'platform_key': platformKey
49367
- }
49368
- });
49369
- }
49370
- /**
49371
- * Update notification template
49372
- * Update notification template. Creates platform-specific copy on first edit. Requires permission: Ibl.Notifications/NotificationTemplate/write
49373
- * @returns NotificationTemplateDetail
49374
- * @throws ApiError
49375
- */
49376
- static notificationV1PlatformsTemplatesPartialUpdate({
49377
- notificationType,
49378
- platformKey,
49379
- requestBody
49380
- }) {
49381
- return request(OpenAPI, {
49382
- method: 'PATCH',
49383
- url: '/api/notification/v1/platforms/{platform_key}/templates/{notification_type}/',
49384
- path: {
49385
- 'notification_type': notificationType,
49386
- 'platform_key': platformKey
49387
- },
49388
- body: requestBody,
49389
- mediaType: 'application/json'
49390
- });
49391
- }
49392
- /**
49393
- * Reset template to default
49394
- * Delete platform-specific template override and revert to main template. Notification preference (on/off) is preserved. Requires permission: Ibl.Notifications/NotificationTemplate/write
49395
- * @returns any
49396
- * @throws ApiError
49397
- */
49398
- static notificationV1PlatformsTemplatesResetCreate({
49399
- notificationType,
49400
- platformKey
49401
- }) {
49402
- return request(OpenAPI, {
49403
- method: 'POST',
49404
- url: '/api/notification/v1/platforms/{platform_key}/templates/{notification_type}/reset/',
49405
- path: {
49406
- 'notification_type': notificationType,
49407
- 'platform_key': platformKey
49408
- }
49409
- });
49410
- }
49411
- /**
49412
- * Send test notification
49413
- * Send a test notification to verify template rendering and delivery. Sends to the requesting admin's email or a specified test email. Requires permission: Ibl.Notifications/NotificationTemplate/action
49414
- * @returns NotificationTemplateTestResponse
49415
- * @throws ApiError
49416
- */
49417
- static notificationV1PlatformsTemplatesTestCreate({
49418
- notificationType,
49419
- platformKey,
49420
- requestBody
49421
- }) {
49422
- return request(OpenAPI, {
49423
- method: 'POST',
49424
- url: '/api/notification/v1/platforms/{platform_key}/templates/{notification_type}/test/',
49425
- path: {
49426
- 'notification_type': notificationType,
49427
- 'platform_key': platformKey
49428
- },
49429
- body: requestBody,
49430
- mediaType: 'application/json'
49431
- });
49432
- }
49433
- /**
49434
- * Toggle notification preference
49435
- * Enable or disable a notification type for the platform. This sets the NotificationPreference, not the template. Requires permission: Ibl.Notifications/NotificationTemplate/write
49436
- * @returns NotificationToggle
49437
- * @throws ApiError
49438
- */
49439
- static notificationV1PlatformsTemplatesTogglePartialUpdate({
49440
- notificationType,
49441
- platformKey,
49442
- requestBody
49443
- }) {
49444
- return request(OpenAPI, {
49445
- method: 'PATCH',
49446
- url: '/api/notification/v1/platforms/{platform_key}/templates/{notification_type}/toggle/',
49447
- path: {
49448
- 'notification_type': notificationType,
49449
- 'platform_key': platformKey
49450
- },
49451
- body: requestBody,
49452
- mediaType: 'application/json'
49453
- });
49454
- }
49455
- /**
49456
- * List distinct template tags
49457
- * Get all unique tags used across notification templates for this platform. Useful for autocomplete / filter UIs. Requires permission: Ibl.Notifications/NotificationTemplate/list
49458
- * @returns string
49459
- * @throws ApiError
49460
- */
49461
- static notificationV1PlatformsTemplatesTagsRetrieve({
49462
- platformKey
49463
- }) {
49464
- return request(OpenAPI, {
49465
- method: 'GET',
49466
- url: '/api/notification/v1/platforms/{platform_key}/templates/tags/',
49467
- path: {
49468
- 'platform_key': platformKey
49469
- }
49470
- });
49471
- }
49472
- }
49473
-
49474
- class OrganizationsService {
49475
- /**
49476
- * List organizations
49477
- * Returns a paginated list of organizations in your Platform. Supports filtering by `owner` and by `name` (case-insensitive substring match).
49478
- *
49479
- * **Required permission:** `Ibl.CRM/Organizations/list`.
49480
- * @returns PaginatedOrganizationList
49481
- * @throws ApiError
49482
- */
49483
- static organizationsList({
49484
- name,
49485
- owner,
49486
- page,
49487
- pageSize,
49488
- tags
49489
- }) {
49490
- return request(OpenAPI, {
49491
- method: 'GET',
49492
- url: '/organizations/',
49493
- query: {
49494
- 'name': name,
49495
- 'owner': owner,
49496
- 'page': page,
49497
- 'page_size': pageSize,
49498
- 'tags': tags
49499
- },
49500
- errors: {
49501
- 401: `Authentication required.`,
49502
- 403: `Missing required permission \`Ibl.CRM/Organizations/list\`.`
49503
- }
49504
- });
49505
- }
49506
- /**
49507
- * Create an organization
49508
- * Creates a new organization in your Platform. The Platform is inferred from your credentials. `name` must be unique within your Platform.
49509
- *
49510
- * **Required permission:** `Ibl.CRM/Organizations/action`.
49511
- * @returns Organization
49512
- * @throws ApiError
49513
- */
49514
- static organizationsCreate({
49515
- requestBody
49516
- }) {
49517
- return request(OpenAPI, {
49518
- method: 'POST',
49519
- url: '/organizations/',
49520
- body: requestBody,
49521
- mediaType: 'application/json',
49522
- errors: {
49523
- 400: `Validation error (for example, duplicate name).`,
49524
- 403: `Missing required permission \`Ibl.CRM/Organizations/action\`.`
49525
- }
49526
- });
49527
- }
49528
- /**
49529
- * Retrieve an organization
49530
- * Returns a single organization by id.
49531
- *
49532
- * **Required permission:** `Ibl.CRM/Organizations/read`.
49533
- * @returns Organization
49534
- * @throws ApiError
49535
- */
49536
- static organizationsRetrieve({
49537
- id
49538
- }) {
49539
- return request(OpenAPI, {
49540
- method: 'GET',
49541
- url: '/organizations/{id}/',
49542
- path: {
49543
- 'id': id
49544
- },
49545
- errors: {
49546
- 403: `Missing required permission \`Ibl.CRM/Organizations/read\`.`,
49547
- 404: `Organization not found.`
49548
- }
49549
- });
49550
- }
49551
- /**
49552
- * Replace an organization
49553
- * Replaces all editable fields on the organization.
49554
- *
49555
- * **Required permission:** `Ibl.CRM/Organizations/write`.
49556
- * @returns Organization
49557
- * @throws ApiError
49558
- */
49559
- static organizationsUpdate({
49560
- id,
49561
- requestBody
49562
- }) {
49563
- return request(OpenAPI, {
49564
- method: 'PUT',
49565
- url: '/organizations/{id}/',
49566
- path: {
49567
- 'id': id
49568
- },
49569
- body: requestBody,
49570
- mediaType: 'application/json',
49571
- errors: {
49572
- 400: `Validation error.`,
49573
- 403: `Missing required permission \`Ibl.CRM/Organizations/write\`.`,
49574
- 404: `Organization not found.`
49575
- }
49576
- });
49577
- }
49578
- /**
49579
- * Update an organization
49580
- * Updates only the supplied fields on the organization.
49581
- *
49582
- * **Required permission:** `Ibl.CRM/Organizations/write`.
49583
- * @returns Organization
49584
- * @throws ApiError
49585
- */
49586
- static organizationsPartialUpdate({
49587
- id,
49588
- requestBody
49589
- }) {
49590
- return request(OpenAPI, {
49591
- method: 'PATCH',
49592
- url: '/organizations/{id}/',
49593
- path: {
49594
- 'id': id
49595
- },
49596
- body: requestBody,
49597
- mediaType: 'application/json',
49598
- errors: {
49599
- 400: `Validation error.`,
49600
- 403: `Missing required permission \`Ibl.CRM/Organizations/write\`.`,
49601
- 404: `Organization not found.`
49602
- }
49603
- });
49604
- }
49605
- /**
49606
- * Delete an organization
49607
- * Deletes the organization. Any persons linked to it are kept; their organization reference is cleared.
49608
- *
49609
- * **Required permission:** `Ibl.CRM/Organizations/delete`.
49610
- * @returns void
49611
- * @throws ApiError
49612
- */
49613
- static organizationsDestroy({
49614
- id
49615
- }) {
49616
- return request(OpenAPI, {
49617
- method: 'DELETE',
49618
- url: '/organizations/{id}/',
49619
- path: {
49620
- 'id': id
49621
- },
49622
- errors: {
49623
- 403: `Missing required permission \`Ibl.CRM/Organizations/delete\`.`,
49624
- 404: `Organization not found.`
49625
- }
49626
- });
49627
- }
49628
- /**
49629
- * Attach a tag to this record
49630
- * Attaches an existing Tag to this record. Both the Tag and the record must belong to your Platform. Returns `409 Conflict` with the existing `assignment_id` if the tag is already attached.
49631
- *
49632
- * **Required permission:** `Ibl.CRM/Tags/write`.
49633
- * @returns any No response body
49634
- * @throws ApiError
49635
- */
49636
- static organizationsTagsCreate({
49637
- id,
49638
- requestBody
49639
- }) {
49640
- return request(OpenAPI, {
49641
- method: 'POST',
49642
- url: '/organizations/{id}/tags/',
49643
- path: {
49644
- 'id': id
49645
- },
49646
- body: requestBody,
49647
- mediaType: 'application/json',
49648
- errors: {
49649
- 400: `No response body`,
49650
- 403: `No response body`,
49651
- 404: `No response body`,
49652
- 409: `No response body`
49653
- }
49654
- });
49655
- }
49656
- /**
49657
- * Detach a tag from this record
49658
- * Removes the Tag with id `tag_id` from this record. Returns `404` if the tag was not attached.
49659
- *
49660
- * **Required permission:** `Ibl.CRM/Tags/write`.
49661
- * @returns void
49662
- * @throws ApiError
49663
- */
49664
- static organizationsTagsDestroy({
49665
- id,
49666
- tagId
49667
- }) {
49668
- return request(OpenAPI, {
49669
- method: 'DELETE',
49670
- url: '/organizations/{id}/tags/{tag_id}/',
49671
- path: {
49672
- 'id': id,
49673
- 'tag_id': tagId
49674
- },
49675
- errors: {
49676
- 403: `No response body`,
49677
- 404: `No response body`
49678
- }
49679
- });
49680
- }
49681
- }
49682
-
49683
- class PersonsService {
49684
- /**
49685
- * List persons
49686
- * Returns a paginated list of persons in your Platform. Supports filtering by `lifecycle_stage`, `owner`, `organization`, `created_at__gte`/`created_at__lte`, and `metadata__has_key`.
49687
- *
49688
- * **Required permission:** `Ibl.CRM/Persons/list`.
49689
- * @returns PaginatedPersonList
49690
- * @throws ApiError
49691
- */
49692
- static personsList({
49693
- createdAtGte,
49694
- createdAtLte,
49695
- lifecycleStage,
49696
- metadataHasKey,
49697
- organization,
49698
- owner,
49699
- page,
49700
- pageSize,
49701
- tags
49702
- }) {
49703
- return request(OpenAPI, {
49704
- method: 'GET',
49705
- url: '/persons/',
49706
- query: {
49707
- 'created_at__gte': createdAtGte,
49708
- 'created_at__lte': createdAtLte,
49709
- 'lifecycle_stage': lifecycleStage,
49710
- 'metadata__has_key': metadataHasKey,
49711
- 'organization': organization,
49712
- 'owner': owner,
49713
- 'page': page,
49714
- 'page_size': pageSize,
49715
- 'tags': tags
49716
- },
49717
- errors: {
49718
- 401: `Authentication required.`,
49719
- 403: `Missing required permission \`Ibl.CRM/Persons/list\`.`
49720
- }
49721
- });
49722
- }
49723
- /**
49724
- * Create a person
49725
- * Creates a new person in your Platform. The Platform is inferred from your credentials. If `organization` is supplied, it must reference an organization in your Platform.
49726
- *
49727
- * **Required permission:** `Ibl.CRM/Persons/action`.
49728
- * @returns Person
49729
- * @throws ApiError
49730
- */
49731
- static personsCreate({
49732
- requestBody
49733
- }) {
49734
- return request(OpenAPI, {
49735
- method: 'POST',
49736
- url: '/persons/',
49737
- body: requestBody,
49738
- mediaType: 'application/json',
49739
- errors: {
49740
- 400: `Validation error.`,
49741
- 403: `Missing required permission \`Ibl.CRM/Persons/action\`.`
49742
- }
49743
- });
49744
- }
49745
- /**
49746
- * Retrieve a person
49747
- * Returns a single person by id.
49748
- *
49749
- * **Required permission:** `Ibl.CRM/Persons/read`.
49750
- * @returns Person
49751
- * @throws ApiError
49752
- */
49753
- static personsRetrieve({
49754
- id
49755
- }) {
49756
- return request(OpenAPI, {
49757
- method: 'GET',
49758
- url: '/persons/{id}/',
49759
- path: {
49760
- 'id': id
49761
- },
49762
- errors: {
49763
- 403: `Missing required permission \`Ibl.CRM/Persons/read\`.`,
49764
- 404: `Person not found.`
49765
- }
49766
- });
49767
- }
49768
- /**
49769
- * Replace a person
49770
- * Replaces all editable fields on the person.
49771
- *
49772
- * **Required permission:** `Ibl.CRM/Persons/write`.
49773
- * @returns Person
49774
- * @throws ApiError
49775
- */
49776
- static personsUpdate({
49777
- id,
49778
- requestBody
49779
- }) {
49780
- return request(OpenAPI, {
49781
- method: 'PUT',
49782
- url: '/persons/{id}/',
49783
- path: {
49784
- 'id': id
49785
- },
49786
- body: requestBody,
49787
- mediaType: 'application/json',
49788
- errors: {
49789
- 400: `Validation error.`,
49790
- 403: `Missing required permission \`Ibl.CRM/Persons/write\`.`,
49791
- 404: `Person not found.`
49792
- }
49793
- });
49794
- }
49795
- /**
49796
- * Update a person
49797
- * Updates only the supplied fields on the person.
49798
- *
49799
- * **Required permission:** `Ibl.CRM/Persons/write`.
49800
- * @returns Person
49801
- * @throws ApiError
49802
- */
49803
- static personsPartialUpdate({
49804
- id,
49805
- requestBody
49806
- }) {
49807
- return request(OpenAPI, {
49808
- method: 'PATCH',
49809
- url: '/persons/{id}/',
49810
- path: {
49811
- 'id': id
49812
- },
49813
- body: requestBody,
49814
- mediaType: 'application/json',
49815
- errors: {
49816
- 400: `Validation error.`,
49817
- 403: `Missing required permission \`Ibl.CRM/Persons/write\`.`,
49818
- 404: `Person not found.`
49819
- }
49820
- });
49821
- }
49822
- /**
49823
- * Delete a person
49824
- * Deletes the person.
49825
- *
49826
- * **Required permission:** `Ibl.CRM/Persons/delete`.
49827
- * @returns void
49828
- * @throws ApiError
49829
- */
49830
- static personsDestroy({
49831
- id
49832
- }) {
49833
- return request(OpenAPI, {
49834
- method: 'DELETE',
49835
- url: '/persons/{id}/',
49836
- path: {
49837
- 'id': id
49838
- },
49839
- errors: {
49840
- 403: `Missing required permission \`Ibl.CRM/Persons/delete\`.`,
49841
- 404: `Person not found.`
49842
- }
49843
- });
49844
- }
49845
- /**
49846
- * Invite a person to the platform
49847
- * Sends a platform invitation to the person's `primary_email`. On acceptance, the invitee joins your Platform with the privileges configured in the request body.
49848
- *
49849
- * Returns `409 Conflict` if an active invitation already exists for this email in your Platform, and `422 Unprocessable Entity` if the person is already linked to a platform user.
49850
- *
49851
- * **Required permission:** `Ibl.CRM/Invite/action`.
49852
- * @returns PersonInviteResponse
49853
- * @throws ApiError
49854
- */
49855
- static personsInviteCreate({
49856
- id,
49857
- requestBody
49858
- }) {
49859
- return request(OpenAPI, {
49860
- method: 'POST',
49861
- url: '/persons/{id}/invite/',
49862
- path: {
49863
- 'id': id
49864
- },
49865
- body: requestBody,
49866
- mediaType: 'application/json',
49867
- errors: {
49868
- 400: `Person has no \`primary_email\`; cannot invite.`,
49869
- 403: `Missing required permission \`Ibl.CRM/Invite/action\`.`,
49870
- 404: `Person not found.`,
49871
- 422: `Person is already linked to a platform user.`
49872
- }
49873
- });
49874
- }
49875
- /**
49876
- * Bind a person to an existing platform user
49877
- * Links this person to an existing platform user. The target user must already be a member of your Platform — if they are not, send them an invitation via `POST /persons/{id}/invite/` instead.
49878
- *
49879
- * This call is idempotent: linking a person that is already bound to the same user is a no-op. Re-linking a person that is already bound to a *different* user is refused; the existing binding is preserved and the unchanged person is returned.
49880
- *
49881
- * **Required permission:** `Ibl.CRM/Persons/write`.
49882
- * @returns Person
49883
- * @throws ApiError
49884
- */
49885
- static personsLinkUserCreate({
49886
- id,
49887
- requestBody
49888
- }) {
49889
- return request(OpenAPI, {
49890
- method: 'POST',
49891
- url: '/persons/{id}/link-user/',
49892
- path: {
49893
- 'id': id
49894
- },
49895
- body: requestBody,
49896
- mediaType: 'application/json',
49897
- errors: {
49898
- 400: `Validation error.`,
49899
- 403: `Missing required permission \`Ibl.CRM/Persons/write\`, or the target user is not a member of your Platform.`,
49900
- 404: `Person or user not found.`
49901
- }
49902
- });
49903
- }
49904
- /**
49905
- * Attach a tag to this record
49906
- * Attaches an existing Tag to this record. Both the Tag and the record must belong to your Platform. Returns `409 Conflict` with the existing `assignment_id` if the tag is already attached.
49907
- *
49908
- * **Required permission:** `Ibl.CRM/Tags/write`.
49909
- * @returns any No response body
49910
- * @throws ApiError
49911
- */
49912
- static personsTagsCreate({
49913
- id,
49914
- requestBody
49915
- }) {
49916
- return request(OpenAPI, {
49917
- method: 'POST',
49918
- url: '/persons/{id}/tags/',
49919
- path: {
49920
- 'id': id
49921
- },
49922
- body: requestBody,
49923
- mediaType: 'application/json',
49924
- errors: {
49925
- 400: `No response body`,
49926
- 403: `No response body`,
49927
- 404: `No response body`,
49928
- 409: `No response body`
49929
- }
49930
- });
49931
- }
49932
- /**
49933
- * Detach a tag from this record
49934
- * Removes the Tag with id `tag_id` from this record. Returns `404` if the tag was not attached.
49935
- *
49936
- * **Required permission:** `Ibl.CRM/Tags/write`.
49937
- * @returns void
49938
- * @throws ApiError
49939
- */
49940
- static personsTagsDestroy({
49941
- id,
49942
- tagId
49943
- }) {
49944
- return request(OpenAPI, {
49945
- method: 'DELETE',
49946
- url: '/persons/{id}/tags/{tag_id}/',
49947
- path: {
49948
- 'id': id,
49949
- 'tag_id': tagId
49950
- },
49951
- errors: {
49952
- 403: `No response body`,
49953
- 404: `No response body`
49954
- }
49955
- });
49956
- }
49957
- /**
49958
- * Merge duplicate persons into a primary
49959
- * Marks each person in `duplicate_ids` as inactive and reports how many related records (deals, activities, tags) were re-parented onto `primary_id`.
49960
- *
49961
- * All ids — both the primary and every duplicate — must belong to your Platform. `primary_id` may not appear in `duplicate_ids`.
49962
- *
49963
- * **Required permission:** `Ibl.CRM/Persons/write`.
49964
- * @returns PersonMergeResponse
49965
- * @throws ApiError
49966
- */
49967
- static personsMergeCreate({
49968
- requestBody
49969
- }) {
49970
- return request(OpenAPI, {
49971
- method: 'POST',
49972
- url: '/persons/merge/',
49973
- body: requestBody,
49974
- mediaType: 'application/json',
49975
- errors: {
49976
- 400: `Validation error: the primary appears in duplicates, or one or more ids belong to another Platform.`,
49977
- 403: `Missing required permission \`Ibl.CRM/Persons/write\`.`,
49978
- 404: `Primary person not found.`
49979
- }
49980
- });
49981
- }
49982
- }
49983
-
49984
- class PipelinesService {
49985
- /**
49986
- * List pipelines
49987
- * Returns a paginated list of Pipelines in your Platform. Each Pipeline includes its ordered `stages` inline.
49988
- *
49989
- * **Required permission:** `Ibl.CRM/Pipelines/list`.
49990
- * @returns PaginatedPipelineList
49991
- * @throws ApiError
49992
- */
49993
- static pipelinesList({
49994
- code,
49995
- isDefault,
49996
- name,
49997
- page,
49998
- pageSize
49999
- }) {
50000
- return request(OpenAPI, {
50001
- method: 'GET',
50002
- url: '/pipelines/',
50003
- query: {
50004
- 'code': code,
50005
- 'is_default': isDefault,
50006
- 'name': name,
50007
- 'page': page,
50008
- 'page_size': pageSize
50009
- },
50010
- errors: {
50011
- 401: `Authentication required.`,
50012
- 403: `Missing required permission \`Ibl.CRM/Pipelines/list\`.`
50013
- }
50014
- });
50015
- }
50016
- /**
50017
- * Create a pipeline
50018
- * Creates a new Pipeline. `code` must be unique within your Platform. Promoting another Pipeline to `is_default=true` while one already exists will fail — unset the existing default first.
50019
- *
50020
- * **Required permission:** `Ibl.CRM/Pipelines/action`.
50021
- * @returns Pipeline
50022
- * @throws ApiError
50023
- */
50024
- static pipelinesCreate({
50025
- requestBody
50026
- }) {
50027
- return request(OpenAPI, {
50028
- method: 'POST',
50029
- url: '/pipelines/',
50030
- body: requestBody,
50031
- mediaType: 'application/json',
50032
- errors: {
50033
- 400: `Validation error.`,
50034
- 403: `Missing required permission \`Ibl.CRM/Pipelines/action\`.`
50035
- }
50036
- });
50037
- }
50038
- /**
50039
- * List stages for a pipeline
50040
- * Returns the ordered list of PipelineStages for the given Pipeline.
50041
- *
50042
- * **Required permission:** `Ibl.CRM/Pipelines/list`.
50043
- * @returns PaginatedPipelineStageList
50044
- * @throws ApiError
50045
- */
50046
- static pipelinesStagesList({
50047
- pipelinePk,
50048
- code,
50049
- isLost,
50050
- isWon,
50051
- page,
50052
- pageSize
50053
- }) {
50054
- return request(OpenAPI, {
50055
- method: 'GET',
50056
- url: '/pipelines/{pipeline_pk}/stages/',
50057
- path: {
50058
- 'pipeline_pk': pipelinePk
50059
- },
50060
- query: {
50061
- 'code': code,
50062
- 'is_lost': isLost,
50063
- 'is_won': isWon,
50064
- 'page': page,
50065
- 'page_size': pageSize
50066
- },
50067
- errors: {
50068
- 403: `Missing required permission \`Ibl.CRM/Pipelines/list\`.`,
50069
- 404: `Pipeline not found.`
50070
- }
50071
- });
50072
- }
50073
- /**
50074
- * Create a stage
50075
- * Creates a new PipelineStage in the URL Pipeline. `code` must be unique within that Pipeline. At most one of `is_won` / `is_lost` may be true.
50076
- *
50077
- * **Required permission:** `Ibl.CRM/Pipelines/action`.
50078
- * @returns PipelineStage
50079
- * @throws ApiError
50080
- */
50081
- static pipelinesStagesCreate({
50082
- pipelinePk,
50083
- requestBody
50084
- }) {
50085
- return request(OpenAPI, {
50086
- method: 'POST',
50087
- url: '/pipelines/{pipeline_pk}/stages/',
50088
- path: {
50089
- 'pipeline_pk': pipelinePk
50090
- },
50091
- body: requestBody,
50092
- mediaType: 'application/json',
50093
- errors: {
50094
- 400: `Validation error.`,
50095
- 403: `Missing required permission \`Ibl.CRM/Pipelines/action\`.`,
50096
- 404: `Pipeline not found.`
50097
- }
50098
- });
50099
- }
50100
- /**
50101
- * Retrieve a stage
50102
- * Returns a single PipelineStage by id (must belong to the URL Pipeline).
50103
- *
50104
- * **Required permission:** `Ibl.CRM/Pipelines/read`.
50105
- * @returns PipelineStage
50106
- * @throws ApiError
50107
- */
50108
- static pipelinesStagesRetrieve({
50109
- id,
50110
- pipelinePk
50111
- }) {
50112
- return request(OpenAPI, {
50113
- method: 'GET',
50114
- url: '/pipelines/{pipeline_pk}/stages/{id}/',
50115
- path: {
50116
- 'id': id,
50117
- 'pipeline_pk': pipelinePk
50118
- },
50119
- errors: {
50120
- 403: `Missing required permission \`Ibl.CRM/Pipelines/read\`.`,
50121
- 404: `Stage not found in this Pipeline.`
50122
- }
50123
- });
50124
- }
50125
- /**
50126
- * Replace a stage
50127
- * Replaces all editable fields on the PipelineStage.
50128
- *
50129
- * **Required permission:** `Ibl.CRM/Pipelines/write`.
50130
- * @returns PipelineStage
50131
- * @throws ApiError
50132
- */
50133
- static pipelinesStagesUpdate({
50134
- id,
50135
- pipelinePk,
50136
- requestBody
50137
- }) {
50138
- return request(OpenAPI, {
50139
- method: 'PUT',
50140
- url: '/pipelines/{pipeline_pk}/stages/{id}/',
50141
- path: {
50142
- 'id': id,
50143
- 'pipeline_pk': pipelinePk
50144
- },
50145
- body: requestBody,
50146
- mediaType: 'application/json',
50147
- errors: {
50148
- 400: `Validation error.`,
50149
- 403: `Missing required permission \`Ibl.CRM/Pipelines/write\`.`,
50150
- 404: `Stage not found in this Pipeline.`
50151
- }
50152
- });
50153
- }
50154
- /**
50155
- * Update a stage
50156
- * Updates only the supplied fields on the PipelineStage.
50157
- *
50158
- * **Required permission:** `Ibl.CRM/Pipelines/write`.
50159
- * @returns PipelineStage
50160
- * @throws ApiError
50161
- */
50162
- static pipelinesStagesPartialUpdate({
50163
- id,
50164
- pipelinePk,
50165
- requestBody
50166
- }) {
50167
- return request(OpenAPI, {
50168
- method: 'PATCH',
50169
- url: '/pipelines/{pipeline_pk}/stages/{id}/',
50170
- path: {
50171
- 'id': id,
50172
- 'pipeline_pk': pipelinePk
50173
- },
50174
- body: requestBody,
50175
- mediaType: 'application/json',
50176
- errors: {
50177
- 400: `Validation error.`,
50178
- 403: `Missing required permission \`Ibl.CRM/Pipelines/write\`.`,
50179
- 404: `Stage not found in this Pipeline.`
50180
- }
50181
- });
50182
- }
50183
- /**
50184
- * Delete a stage
50185
- * Deletes the PipelineStage. Fails with `409 Conflict` if any Deal still references it (FK is PROTECTed).
50186
- *
50187
- * **Required permission:** `Ibl.CRM/Pipelines/delete`.
50188
- * @returns void
50189
- * @throws ApiError
50190
- */
50191
- static pipelinesStagesDestroy({
50192
- id,
50193
- pipelinePk
50194
- }) {
50195
- return request(OpenAPI, {
50196
- method: 'DELETE',
50197
- url: '/pipelines/{pipeline_pk}/stages/{id}/',
50198
- path: {
50199
- 'id': id,
50200
- 'pipeline_pk': pipelinePk
50201
- },
50202
- errors: {
50203
- 403: `Missing required permission \`Ibl.CRM/Pipelines/delete\`.`,
50204
- 404: `Stage not found in this Pipeline.`,
50205
- 409: `Stage still has Deals attached.`
50206
- }
50207
- });
50208
- }
50209
- /**
50210
- * Retrieve a pipeline
50211
- * Returns a single Pipeline by id, including its ordered `stages`.
50212
- *
50213
- * **Required permission:** `Ibl.CRM/Pipelines/read`.
50214
- * @returns Pipeline
50215
- * @throws ApiError
50216
- */
50217
- static pipelinesRetrieve({
50218
- id
50219
- }) {
50220
- return request(OpenAPI, {
50221
- method: 'GET',
50222
- url: '/pipelines/{id}/',
50223
- path: {
50224
- 'id': id
50225
- },
50226
- errors: {
50227
- 403: `Missing required permission \`Ibl.CRM/Pipelines/read\`.`,
50228
- 404: `Pipeline not found.`
50229
- }
50230
- });
50231
- }
50232
- /**
50233
- * Replace a pipeline
50234
- * Replaces all editable fields on the Pipeline.
50235
- *
50236
- * **Required permission:** `Ibl.CRM/Pipelines/write`.
50237
- * @returns Pipeline
50238
- * @throws ApiError
50239
- */
50240
- static pipelinesUpdate({
50241
- id,
50242
- requestBody
50243
- }) {
50244
- return request(OpenAPI, {
50245
- method: 'PUT',
50246
- url: '/pipelines/{id}/',
50247
- path: {
50248
- 'id': id
50249
- },
50250
- body: requestBody,
50251
- mediaType: 'application/json',
50252
- errors: {
50253
- 400: `Validation error.`,
50254
- 403: `Missing required permission \`Ibl.CRM/Pipelines/write\`.`,
50255
- 404: `Pipeline not found.`
50256
- }
50257
- });
50258
- }
50259
- /**
50260
- * Update a pipeline
50261
- * Updates only the supplied fields on the Pipeline.
50262
- *
50263
- * **Required permission:** `Ibl.CRM/Pipelines/write`.
50264
- * @returns Pipeline
50265
- * @throws ApiError
50266
- */
50267
- static pipelinesPartialUpdate({
50268
- id,
50269
- requestBody
50270
- }) {
50271
- return request(OpenAPI, {
50272
- method: 'PATCH',
50273
- url: '/pipelines/{id}/',
50274
- path: {
50275
- 'id': id
50276
- },
50277
- body: requestBody,
50278
- mediaType: 'application/json',
50279
- errors: {
50280
- 400: `Validation error.`,
50281
- 403: `Missing required permission \`Ibl.CRM/Pipelines/write\`.`,
50282
- 404: `Pipeline not found.`
50283
- }
50284
- });
50285
- }
50286
- /**
50287
- * Delete a pipeline
50288
- * Deletes the Pipeline. Fails with `409 Conflict` if any Deal still references it (FK is PROTECTed).
50289
- *
50290
- * **Required permission:** `Ibl.CRM/Pipelines/delete`.
50291
- * @returns void
50292
- * @throws ApiError
50293
- */
50294
- static pipelinesDestroy({
50295
- id
50296
- }) {
50297
- return request(OpenAPI, {
50298
- method: 'DELETE',
50299
- url: '/pipelines/{id}/',
50300
- path: {
50301
- 'id': id
50302
- },
50303
- errors: {
50304
- 403: `Missing required permission \`Ibl.CRM/Pipelines/delete\`.`,
50305
- 404: `Pipeline not found.`,
50306
- 409: `Pipeline still has Deals attached.`
50307
- }
50308
- });
50309
- }
50310
- }
50311
-
50312
- class PlatformsService {
50313
- /**
50314
- * Check whether the authenticated user has payment access to an item on a scoped platform.
50315
- * @returns ItemAccessCheckResponse
50316
- * @throws ApiError
50317
- */
50318
- static platformsItemsAccessCheckRetrieve({
50319
- itemId,
50320
- itemType,
50321
- platformKey
50322
- }) {
50323
- return request(OpenAPI, {
50324
- method: 'GET',
50325
- url: '/platforms/{platform_key}/items/{item_type}/{item_id}/access-check/',
50326
- path: {
50327
- 'item_id': itemId,
50328
- 'item_type': itemType,
50329
- 'platform_key': platformKey
50330
- }
50331
- });
50332
- }
50333
- /**
50334
- * Create checkout session
50335
- * Create a Stripe checkout session for an authenticated user to purchase or subscribe to an item.
50336
- * @returns CheckoutSessionResponse
50337
- * @throws ApiError
50338
- */
50339
- static platformsItemsCheckoutCreate({
50340
- itemId,
50341
- itemType,
50342
- platformKey,
50343
- requestBody
50344
- }) {
50345
- return request(OpenAPI, {
50346
- method: 'POST',
50347
- url: '/platforms/{platform_key}/items/{item_type}/{item_id}/checkout/',
50348
- path: {
50349
- 'item_id': itemId,
50350
- 'item_type': itemType,
50351
- 'platform_key': platformKey
50352
- },
50353
- body: requestBody,
50354
- mediaType: 'application/json'
50355
- });
50356
- }
50357
- /**
50358
- * Handle checkout callback
50359
- * Stripe redirects here after checkout. Processes the completed session and redirects to the return URL.
50360
- * @returns void
50361
- * @throws ApiError
50362
- */
50363
- static platformsItemsCheckoutCallbackRetrieve({
50364
- itemId,
50365
- itemType,
50366
- platformKey,
50367
- returnUrl
50368
- }) {
50369
- return request(OpenAPI, {
50370
- method: 'GET',
50371
- url: '/platforms/{platform_key}/items/{item_type}/{item_id}/checkout-callback/',
50372
- path: {
50373
- 'item_id': itemId,
50374
- 'item_type': itemType,
50375
- 'platform_key': platformKey
50376
- },
50377
- query: {
50378
- 'return_url': returnUrl
50379
- },
50380
- errors: {
50381
- 302: `No response body`
50382
- }
50383
- });
50384
- }
50385
- /**
50386
- * Handle checkout callback
50387
- * Stripe redirects here after checkout. Processes the completed session and redirects to the return URL.
50388
- * @returns void
50389
- * @throws ApiError
50390
- */
50391
- static platformsItemsCheckoutCallbackRetrieve2({
50392
- checkoutSessionId,
50393
- itemId,
50394
- itemType,
50395
- platformKey,
50396
- returnUrl
50397
- }) {
50398
- return request(OpenAPI, {
50399
- method: 'GET',
50400
- url: '/platforms/{platform_key}/items/{item_type}/{item_id}/checkout-callback/{checkout_session_id}/',
50401
- path: {
50402
- 'checkout_session_id': checkoutSessionId,
50403
- 'item_id': itemId,
50404
- 'item_type': itemType,
50405
- 'platform_key': platformKey
50406
- },
50407
- query: {
50408
- 'return_url': returnUrl
50409
- },
50410
- errors: {
50411
- 302: `No response body`
50412
- }
50413
- });
50414
- }
50415
- /**
50416
- * Create guest checkout session
50417
- * Create a Stripe checkout session for a guest user (email required).
50418
- * @returns CheckoutSessionResponse
50419
- * @throws ApiError
50420
- */
50421
- static platformsItemsCheckoutGuestCreate({
50422
- itemId,
50423
- itemType,
50424
- platformKey,
50425
- requestBody
50426
- }) {
50427
- return request(OpenAPI, {
50428
- method: 'POST',
50429
- url: '/platforms/{platform_key}/items/{item_type}/{item_id}/checkout-guest/',
50430
- path: {
50431
- 'item_id': itemId,
50432
- 'item_type': itemType,
50433
- 'platform_key': platformKey
50434
- },
50435
- body: requestBody,
50436
- mediaType: 'application/json'
50437
- });
50438
- }
50439
- /**
50440
- * Get paywall configuration
50441
- * Retrieve the paywall configuration for an item. Returns default (disabled) config if none exists.
50442
- * @returns ItemPaywallConfig
50443
- * @throws ApiError
50444
- */
50445
- static platformsItemsPaywallRetrieve({
50446
- itemId,
50447
- itemType,
50448
- platformKey
50449
- }) {
50450
- return request(OpenAPI, {
50451
- method: 'GET',
50452
- url: '/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/',
50453
- path: {
50454
- 'item_id': itemId,
50455
- 'item_type': itemType,
50456
- 'platform_key': platformKey
50457
- }
50458
- });
50459
- }
50460
- /**
50461
- * Create or update paywall configuration
50462
- * Enable or configure the paywall for an item. Creates a Stripe product on first enable.
50463
- * @returns ItemPaywallConfig
48749
+ /**
48750
+ * Preview notification
48751
+ * Preview notification recipients and get build ID for sending
48752
+ * @returns PreviewResponse
50464
48753
  * @throws ApiError
50465
48754
  */
50466
- static platformsItemsPaywallCreate({
50467
- itemId,
50468
- itemType,
48755
+ static notificationV1OrgsNotificationBuilderPreviewCreate({
50469
48756
  platformKey,
50470
48757
  requestBody
50471
48758
  }) {
50472
48759
  return request(OpenAPI, {
50473
48760
  method: 'POST',
50474
- url: '/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/',
48761
+ url: '/api/notification/v1/orgs/{platform_key}/notification-builder/preview/',
50475
48762
  path: {
50476
- 'item_id': itemId,
50477
- 'item_type': itemType,
50478
48763
  'platform_key': platformKey
50479
48764
  },
50480
48765
  body: requestBody,
@@ -50482,23 +48767,19 @@ class PlatformsService {
50482
48767
  });
50483
48768
  }
50484
48769
  /**
50485
- * Update paywall configuration
50486
- * Same as POST. Update the paywall configuration for an item.
50487
- * @returns ItemPaywallConfig
48770
+ * Send notification
48771
+ * Send notifications to all recipients in a build
48772
+ * @returns SendResponse
50488
48773
  * @throws ApiError
50489
48774
  */
50490
- static platformsItemsPaywallUpdate({
50491
- itemId,
50492
- itemType,
48775
+ static notificationV1OrgsNotificationBuilderSendCreate({
50493
48776
  platformKey,
50494
48777
  requestBody
50495
48778
  }) {
50496
48779
  return request(OpenAPI, {
50497
- method: 'PUT',
50498
- url: '/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/',
48780
+ method: 'POST',
48781
+ url: '/api/notification/v1/orgs/{platform_key}/notification-builder/send/',
50499
48782
  path: {
50500
- 'item_id': itemId,
50501
- 'item_type': itemType,
50502
48783
  'platform_key': platformKey
50503
48784
  },
50504
48785
  body: requestBody,
@@ -50506,65 +48787,39 @@ class PlatformsService {
50506
48787
  });
50507
48788
  }
50508
48789
  /**
50509
- * Disable paywall configuration
50510
- * Disable the paywall for an item. Does not delete the configuration.
50511
- * @returns void
50512
- * @throws ApiError
50513
- */
50514
- static platformsItemsPaywallDestroy({
50515
- itemId,
50516
- itemType,
50517
- platformKey
50518
- }) {
50519
- return request(OpenAPI, {
50520
- method: 'DELETE',
50521
- url: '/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/',
50522
- path: {
50523
- 'item_id': itemId,
50524
- 'item_type': itemType,
50525
- 'platform_key': platformKey
50526
- }
50527
- });
50528
- }
50529
- /**
50530
- * List prices
50531
- * List active prices for an item's paywall configuration.
50532
- * @returns ItemPrice
48790
+ * Validate notification source
48791
+ * Validate a single notification source (email, username, platform, csv)
48792
+ * @returns ValidateSourceResponse
50533
48793
  * @throws ApiError
50534
48794
  */
50535
- static platformsItemsPaywallPricesList({
50536
- itemId,
50537
- itemType,
50538
- platformKey
48795
+ static notificationV1OrgsNotificationBuilderValidateSourceCreate({
48796
+ platformKey,
48797
+ requestBody
50539
48798
  }) {
50540
48799
  return request(OpenAPI, {
50541
- method: 'GET',
50542
- url: '/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/prices/',
48800
+ method: 'POST',
48801
+ url: '/api/notification/v1/orgs/{platform_key}/notification-builder/validate_source/',
50543
48802
  path: {
50544
- 'item_id': itemId,
50545
- 'item_type': itemType,
50546
48803
  'platform_key': platformKey
50547
- }
48804
+ },
48805
+ body: requestBody,
48806
+ mediaType: 'application/json'
50548
48807
  });
50549
48808
  }
50550
48809
  /**
50551
- * Create a price
50552
- * Create a new price tier for an item. Requires paywall to be enabled and Stripe Connect account ready.
50553
- * @returns ItemPrice
48810
+ * Test SMTP credentials for a platform
48811
+ * Test SMTP credentials by sending a test email to the specified address. Requires: Ibl.Notifications/SMTP/action
48812
+ * @returns TestSMTPResponse
50554
48813
  * @throws ApiError
50555
48814
  */
50556
- static platformsItemsPaywallPricesCreate({
50557
- itemId,
50558
- itemType,
48815
+ static notificationV1PlatformsConfigTestSmtpCreate({
50559
48816
  platformKey,
50560
48817
  requestBody
50561
48818
  }) {
50562
48819
  return request(OpenAPI, {
50563
48820
  method: 'POST',
50564
- url: '/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/prices/',
48821
+ url: '/api/notification/v1/platforms/{platform_key}/config/test-smtp/',
50565
48822
  path: {
50566
- 'item_id': itemId,
50567
- 'item_type': itemType,
50568
48823
  'platform_key': platformKey
50569
48824
  },
50570
48825
  body: requestBody,
@@ -50572,300 +48827,253 @@ class PlatformsService {
50572
48827
  });
50573
48828
  }
50574
48829
  /**
50575
- * Get price details
50576
- * Retrieve a specific price by ID.
50577
- * @returns ItemPrice
48830
+ * Get user notification preferences
48831
+ * Retrieve notification preferences for the authenticated user (or another user via ?username= for admins). Auto-creates preferences with defaults on first access. RBAC: Ibl.Notifications/Notification/read
48832
+ * @returns UserNotificationPreferences
50578
48833
  * @throws ApiError
50579
48834
  */
50580
- static platformsItemsPaywallPricesRetrieve({
50581
- itemId,
50582
- itemType,
48835
+ static notificationV1PlatformsNotificationPreferencesRetrieve({
50583
48836
  platformKey,
50584
- priceId
48837
+ tags,
48838
+ username
50585
48839
  }) {
50586
48840
  return request(OpenAPI, {
50587
48841
  method: 'GET',
50588
- url: '/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/prices/{price_id}/',
48842
+ url: '/api/notification/v1/platforms/{platform_key}/notification-preferences/',
50589
48843
  path: {
50590
- 'item_id': itemId,
50591
- 'item_type': itemType,
50592
- 'platform_key': platformKey,
50593
- 'price_id': priceId
48844
+ 'platform_key': platformKey
48845
+ },
48846
+ query: {
48847
+ 'tags': tags,
48848
+ 'username': username
50594
48849
  }
50595
48850
  });
50596
48851
  }
50597
48852
  /**
50598
- * Update a price
50599
- * Update a price tier. If pricing fields change and a Stripe price exists, a new Stripe price is created and the old one deactivated.
50600
- * @returns ItemPrice
48853
+ * Update user notification preferences
48854
+ * Partially update global notification preferences. Per-type overrides use the /types/{notification_type}/ endpoint. RBAC: Ibl.Notifications/Notification/write
48855
+ * @returns UserNotificationPreferences
50601
48856
  * @throws ApiError
50602
48857
  */
50603
- static platformsItemsPaywallPricesUpdate({
50604
- itemId,
50605
- itemType,
48858
+ static notificationV1PlatformsNotificationPreferencesPartialUpdate({
50606
48859
  platformKey,
50607
- priceId,
48860
+ tags,
48861
+ username,
50608
48862
  requestBody
50609
48863
  }) {
50610
48864
  return request(OpenAPI, {
50611
- method: 'PUT',
50612
- url: '/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/prices/{price_id}/',
48865
+ method: 'PATCH',
48866
+ url: '/api/notification/v1/platforms/{platform_key}/notification-preferences/',
50613
48867
  path: {
50614
- 'item_id': itemId,
50615
- 'item_type': itemType,
50616
- 'platform_key': platformKey,
50617
- 'price_id': priceId
48868
+ 'platform_key': platformKey
48869
+ },
48870
+ query: {
48871
+ 'tags': tags,
48872
+ 'username': username
50618
48873
  },
50619
48874
  body: requestBody,
50620
48875
  mediaType: 'application/json'
50621
48876
  });
50622
48877
  }
50623
48878
  /**
50624
- * Delete a price
50625
- * Soft-delete a price tier and deactivate the corresponding Stripe price.
50626
- * @returns void
48879
+ * List available notification types
48880
+ * Returns notification types enabled for this platform, annotated with the user's per-type preferences. RBAC: Ibl.Notifications/Notification/read
48881
+ * @returns AvailableNotificationType
50627
48882
  * @throws ApiError
50628
48883
  */
50629
- static platformsItemsPaywallPricesDestroy({
50630
- itemId,
50631
- itemType,
48884
+ static notificationV1PlatformsNotificationPreferencesAvailableTypesList({
50632
48885
  platformKey,
50633
- priceId
48886
+ tags,
48887
+ username
50634
48888
  }) {
50635
48889
  return request(OpenAPI, {
50636
- method: 'DELETE',
50637
- url: '/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/prices/{price_id}/',
48890
+ method: 'GET',
48891
+ url: '/api/notification/v1/platforms/{platform_key}/notification-preferences/available-types/',
50638
48892
  path: {
50639
- 'item_id': itemId,
50640
- 'item_type': itemType,
50641
- 'platform_key': platformKey,
50642
- 'price_id': priceId
48893
+ 'platform_key': platformKey
48894
+ },
48895
+ query: {
48896
+ 'tags': tags,
48897
+ 'username': username
50643
48898
  }
50644
48899
  });
50645
48900
  }
50646
48901
  /**
50647
- * Get public pricing
50648
- * Retrieve public pricing information for an item. No authentication required.
50649
- * @returns PublicItemPricing
48902
+ * Update per-type notification preference
48903
+ * Set enabled/frequency for a single notification type. RBAC: Ibl.Notifications/Notification/write
48904
+ * @returns NotificationTypePreference
50650
48905
  * @throws ApiError
50651
48906
  */
50652
- static platformsItemsPricingRetrieve({
50653
- itemId,
50654
- itemType,
50655
- platformKey
48907
+ static notificationV1PlatformsNotificationPreferencesTypesPartialUpdate({
48908
+ notificationType,
48909
+ platformKey,
48910
+ tags,
48911
+ username,
48912
+ requestBody
50656
48913
  }) {
50657
48914
  return request(OpenAPI, {
50658
- method: 'GET',
50659
- url: '/platforms/{platform_key}/items/{item_type}/{item_id}/pricing/',
48915
+ method: 'PATCH',
48916
+ url: '/api/notification/v1/platforms/{platform_key}/notification-preferences/types/{notification_type}/',
50660
48917
  path: {
50661
- 'item_id': itemId,
50662
- 'item_type': itemType,
48918
+ 'notification_type': notificationType,
50663
48919
  'platform_key': platformKey
50664
- }
48920
+ },
48921
+ query: {
48922
+ 'tags': tags,
48923
+ 'username': username
48924
+ },
48925
+ body: requestBody,
48926
+ mediaType: 'application/json'
50665
48927
  });
50666
48928
  }
50667
48929
  /**
50668
- * List item subscribers
50669
- * List all subscribers for an item. Optionally filter by subscription status.
50670
- * @returns PaginatedItemSubscriptionList
48930
+ * List notification templates
48931
+ * Get all notification templates for the platform. Includes both platform-specific and inherited templates from main. Filter by tags with ?tags=learning,activity (comma-separated, OR logic). Requires permission: Ibl.Notifications/NotificationTemplate/list
48932
+ * @returns NotificationTemplateList
50671
48933
  * @throws ApiError
50672
48934
  */
50673
- static platformsItemsSubscribersList({
50674
- itemId,
50675
- itemType,
48935
+ static notificationV1PlatformsTemplatesList({
50676
48936
  platformKey,
50677
48937
  page,
50678
- pageSize,
50679
- search,
50680
- status
48938
+ pageSize = 25,
48939
+ tags
50681
48940
  }) {
50682
48941
  return request(OpenAPI, {
50683
48942
  method: 'GET',
50684
- url: '/platforms/{platform_key}/items/{item_type}/{item_id}/subscribers/',
48943
+ url: '/api/notification/v1/platforms/{platform_key}/templates/',
50685
48944
  path: {
50686
- 'item_id': itemId,
50687
- 'item_type': itemType,
50688
48945
  'platform_key': platformKey
50689
48946
  },
50690
48947
  query: {
50691
48948
  'page': page,
50692
48949
  'page_size': pageSize,
50693
- 'search': search,
50694
- 'status': status
48950
+ 'tags': tags
50695
48951
  }
50696
48952
  });
50697
48953
  }
50698
48954
  /**
50699
- * Get user subscription
50700
- * Retrieve the current user's subscription to an item.
50701
- * @returns ItemSubscription
48955
+ * Get notification template details
48956
+ * Get detailed view of a notification template by type. Returns platform-specific template if exists, otherwise main template. Requires permission: Ibl.Notifications/NotificationTemplate/read
48957
+ * @returns NotificationTemplateDetail
50702
48958
  * @throws ApiError
50703
48959
  */
50704
- static platformsItemsSubscriptionRetrieve({
50705
- itemId,
50706
- itemType,
48960
+ static notificationV1PlatformsTemplatesRetrieve({
48961
+ notificationType,
50707
48962
  platformKey
50708
48963
  }) {
50709
48964
  return request(OpenAPI, {
50710
48965
  method: 'GET',
50711
- url: '/platforms/{platform_key}/items/{item_type}/{item_id}/subscription/',
48966
+ url: '/api/notification/v1/platforms/{platform_key}/templates/{notification_type}/',
50712
48967
  path: {
50713
- 'item_id': itemId,
50714
- 'item_type': itemType,
48968
+ 'notification_type': notificationType,
50715
48969
  'platform_key': platformKey
50716
48970
  }
50717
48971
  });
50718
48972
  }
50719
48973
  /**
50720
- * Cancel subscription
50721
- * Cancel the current user's subscription. Returns a Stripe customer portal URL for recurring subscriptions, or cancels directly for one-time purchases.
50722
- * @returns PortalUrlResponse
48974
+ * Update notification template
48975
+ * Update notification template. Creates platform-specific copy on first edit. Requires permission: Ibl.Notifications/NotificationTemplate/write
48976
+ * @returns NotificationTemplateDetail
50723
48977
  * @throws ApiError
50724
48978
  */
50725
- static platformsItemsSubscriptionCancelCreate({
50726
- itemId,
50727
- itemType,
50728
- platformKey
48979
+ static notificationV1PlatformsTemplatesPartialUpdate({
48980
+ notificationType,
48981
+ platformKey,
48982
+ requestBody
50729
48983
  }) {
50730
48984
  return request(OpenAPI, {
50731
- method: 'POST',
50732
- url: '/platforms/{platform_key}/items/{item_type}/{item_id}/subscription/cancel/',
48985
+ method: 'PATCH',
48986
+ url: '/api/notification/v1/platforms/{platform_key}/templates/{notification_type}/',
50733
48987
  path: {
50734
- 'item_id': itemId,
50735
- 'item_type': itemType,
48988
+ 'notification_type': notificationType,
50736
48989
  'platform_key': platformKey
50737
- }
48990
+ },
48991
+ body: requestBody,
48992
+ mediaType: 'application/json'
50738
48993
  });
50739
48994
  }
50740
48995
  /**
50741
- * List user subscriptions
50742
- * Paginated list of the current user's subscriptions on a platform. Optionally filter by status or item_type.
50743
- * @returns PaginatedItemSubscriptionListList
48996
+ * Reset template to default
48997
+ * Delete platform-specific template override and revert to main template. Notification preference (on/off) is preserved. Requires permission: Ibl.Notifications/NotificationTemplate/write
48998
+ * @returns any
50744
48999
  * @throws ApiError
50745
49000
  */
50746
- static platformsMySubscriptionsList({
50747
- platformKey,
50748
- itemType,
50749
- page,
50750
- pageSize,
50751
- search,
50752
- status
49001
+ static notificationV1PlatformsTemplatesResetCreate({
49002
+ notificationType,
49003
+ platformKey
50753
49004
  }) {
50754
49005
  return request(OpenAPI, {
50755
- method: 'GET',
50756
- url: '/platforms/{platform_key}/my-subscriptions/',
49006
+ method: 'POST',
49007
+ url: '/api/notification/v1/platforms/{platform_key}/templates/{notification_type}/reset/',
50757
49008
  path: {
49009
+ 'notification_type': notificationType,
50758
49010
  'platform_key': platformKey
50759
- },
50760
- query: {
50761
- 'item_type': itemType,
50762
- 'page': page,
50763
- 'page_size': pageSize,
50764
- 'search': search,
50765
- 'status': status
50766
49011
  }
50767
49012
  });
50768
49013
  }
50769
49014
  /**
50770
- * List all platform paywall configurations
50771
- * Paginated list of all item paywall configurations on a platform. Filterable by item_type and is_enabled.
50772
- * @returns PaginatedItemPaywallConfigList
49015
+ * Send test notification
49016
+ * Send a test notification to verify template rendering and delivery. Sends to the requesting admin's email or a specified test email. Requires permission: Ibl.Notifications/NotificationTemplate/action
49017
+ * @returns NotificationTemplateTestResponse
50773
49018
  * @throws ApiError
50774
49019
  */
50775
- static platformsPaywallsList({
49020
+ static notificationV1PlatformsTemplatesTestCreate({
49021
+ notificationType,
50776
49022
  platformKey,
50777
- isEnabled,
50778
- itemType,
50779
- page,
50780
- pageSize,
50781
- search
49023
+ requestBody
50782
49024
  }) {
50783
49025
  return request(OpenAPI, {
50784
- method: 'GET',
50785
- url: '/platforms/{platform_key}/paywalls/',
49026
+ method: 'POST',
49027
+ url: '/api/notification/v1/platforms/{platform_key}/templates/{notification_type}/test/',
50786
49028
  path: {
49029
+ 'notification_type': notificationType,
50787
49030
  'platform_key': platformKey
50788
49031
  },
50789
- query: {
50790
- 'is_enabled': isEnabled,
50791
- 'item_type': itemType,
50792
- 'page': page,
50793
- 'page_size': pageSize,
50794
- 'search': search
50795
- }
49032
+ body: requestBody,
49033
+ mediaType: 'application/json'
50796
49034
  });
50797
49035
  }
50798
49036
  /**
50799
- * Platform sales summary
50800
- * Aggregate sales volume and count for a platform across all item types.
50801
- * @returns PlatformRevenueSummary
49037
+ * Toggle notification preference
49038
+ * Enable or disable a notification type for the platform. This sets the NotificationPreference, not the template. Requires permission: Ibl.Notifications/NotificationTemplate/write
49039
+ * @returns NotificationToggle
50802
49040
  * @throws ApiError
50803
49041
  */
50804
- static platformsRevenueRetrieve({
50805
- platformKey
49042
+ static notificationV1PlatformsTemplatesTogglePartialUpdate({
49043
+ notificationType,
49044
+ platformKey,
49045
+ requestBody
50806
49046
  }) {
50807
49047
  return request(OpenAPI, {
50808
- method: 'GET',
50809
- url: '/platforms/{platform_key}/revenue/',
49048
+ method: 'PATCH',
49049
+ url: '/api/notification/v1/platforms/{platform_key}/templates/{notification_type}/toggle/',
50810
49050
  path: {
49051
+ 'notification_type': notificationType,
50811
49052
  'platform_key': platformKey
50812
- }
49053
+ },
49054
+ body: requestBody,
49055
+ mediaType: 'application/json'
50813
49056
  });
50814
49057
  }
50815
49058
  /**
50816
- * List all platform subscribers
50817
- * Paginated list of all subscribers across all items on a platform. Filterable by status and item_type.
50818
- * @returns PaginatedItemSubscriptionListList
49059
+ * List distinct template tags
49060
+ * Get all unique tags used across notification templates for this platform. Useful for autocomplete / filter UIs. Requires permission: Ibl.Notifications/NotificationTemplate/list
49061
+ * @returns string
50819
49062
  * @throws ApiError
50820
49063
  */
50821
- static platformsSubscribersList({
50822
- platformKey,
50823
- itemType,
50824
- page,
50825
- pageSize,
50826
- search,
50827
- status
49064
+ static notificationV1PlatformsTemplatesTagsRetrieve({
49065
+ platformKey
50828
49066
  }) {
50829
49067
  return request(OpenAPI, {
50830
49068
  method: 'GET',
50831
- url: '/platforms/{platform_key}/subscribers/',
49069
+ url: '/api/notification/v1/platforms/{platform_key}/templates/tags/',
50832
49070
  path: {
50833
49071
  'platform_key': platformKey
50834
- },
50835
- query: {
50836
- 'item_type': itemType,
50837
- 'page': page,
50838
- 'page_size': pageSize,
50839
- 'search': search,
50840
- 'status': status
50841
49072
  }
50842
49073
  });
50843
49074
  }
50844
49075
  }
50845
49076
 
50846
- class PricesService {
50847
- /**
50848
- * Create guest checkout session by price unique_id
50849
- * Looks up the price by its unique_id, derives platform/item_type/item_id, and delegates to the standard guest checkout flow.
50850
- * @returns CheckoutSessionResponse
50851
- * @throws ApiError
50852
- */
50853
- static pricesCheckoutGuestCreate({
50854
- priceUniqueId,
50855
- requestBody
50856
- }) {
50857
- return request(OpenAPI, {
50858
- method: 'POST',
50859
- url: '/prices/{price_unique_id}/checkout-guest/',
50860
- path: {
50861
- 'price_unique_id': priceUniqueId
50862
- },
50863
- body: requestBody,
50864
- mediaType: 'application/json'
50865
- });
50866
- }
50867
- }
50868
-
50869
49077
  class RecommendationsService {
50870
49078
  /**
50871
49079
  * API endpoint that returns a search api url prepopulated with context data
@@ -53128,191 +51336,6 @@ class SkillsService {
53128
51336
  }
53129
51337
  }
53130
51338
 
53131
- class TagsService {
53132
- /**
53133
- * List tags
53134
- * Returns a paginated list of Tags in your Platform. Supports filtering by `name` (case-insensitive substring) and `created_at__gte`/`created_at__lte` ISO timestamp ranges.
53135
- *
53136
- * **Required permission:** `Ibl.CRM/Tags/list`.
53137
- * @returns PaginatedTagList
53138
- * @throws ApiError
53139
- */
53140
- static tagsList({
53141
- createdAtGte,
53142
- createdAtLte,
53143
- name,
53144
- page,
53145
- pageSize
53146
- }) {
53147
- return request(OpenAPI, {
53148
- method: 'GET',
53149
- url: '/tags/',
53150
- query: {
53151
- 'created_at__gte': createdAtGte,
53152
- 'created_at__lte': createdAtLte,
53153
- 'name': name,
53154
- 'page': page,
53155
- 'page_size': pageSize
53156
- },
53157
- errors: {
53158
- 401: `Authentication required.`,
53159
- 403: `Missing required permission \`Ibl.CRM/Tags/list\`.`
53160
- }
53161
- });
53162
- }
53163
- /**
53164
- * Create a tag
53165
- * Creates a new Tag in your Platform. `name` must be unique within your Platform; supply `color` as a `#RRGGBB` hex string (defaults to `#888888`).
53166
- *
53167
- * **Required permission:** `Ibl.CRM/Tags/action`.
53168
- * @returns Tag
53169
- * @throws ApiError
53170
- */
53171
- static tagsCreate({
53172
- requestBody
53173
- }) {
53174
- return request(OpenAPI, {
53175
- method: 'POST',
53176
- url: '/tags/',
53177
- body: requestBody,
53178
- mediaType: 'application/json',
53179
- errors: {
53180
- 400: `Validation error (duplicate name, bad color, etc.).`,
53181
- 403: `Missing required permission \`Ibl.CRM/Tags/action\`.`
53182
- }
53183
- });
53184
- }
53185
- /**
53186
- * Retrieve a tag
53187
- * Returns a single Tag by id.
53188
- *
53189
- * **Required permission:** `Ibl.CRM/Tags/read`.
53190
- * @returns Tag
53191
- * @throws ApiError
53192
- */
53193
- static tagsRetrieve({
53194
- id
53195
- }) {
53196
- return request(OpenAPI, {
53197
- method: 'GET',
53198
- url: '/tags/{id}/',
53199
- path: {
53200
- 'id': id
53201
- },
53202
- errors: {
53203
- 403: `Missing required permission \`Ibl.CRM/Tags/read\`.`,
53204
- 404: `Tag not found.`
53205
- }
53206
- });
53207
- }
53208
- /**
53209
- * Replace a tag
53210
- * Replaces all editable fields on the Tag.
53211
- *
53212
- * **Required permission:** `Ibl.CRM/Tags/write`.
53213
- * @returns Tag
53214
- * @throws ApiError
53215
- */
53216
- static tagsUpdate({
53217
- id,
53218
- requestBody
53219
- }) {
53220
- return request(OpenAPI, {
53221
- method: 'PUT',
53222
- url: '/tags/{id}/',
53223
- path: {
53224
- 'id': id
53225
- },
53226
- body: requestBody,
53227
- mediaType: 'application/json',
53228
- errors: {
53229
- 400: `Validation error.`,
53230
- 403: `Missing required permission \`Ibl.CRM/Tags/write\`.`,
53231
- 404: `Tag not found.`
53232
- }
53233
- });
53234
- }
53235
- /**
53236
- * Update a tag
53237
- * Updates only the supplied fields on the Tag (typically `name` or `color`).
53238
- *
53239
- * **Required permission:** `Ibl.CRM/Tags/write`.
53240
- * @returns Tag
53241
- * @throws ApiError
53242
- */
53243
- static tagsPartialUpdate({
53244
- id,
53245
- requestBody
53246
- }) {
53247
- return request(OpenAPI, {
53248
- method: 'PATCH',
53249
- url: '/tags/{id}/',
53250
- path: {
53251
- 'id': id
53252
- },
53253
- body: requestBody,
53254
- mediaType: 'application/json',
53255
- errors: {
53256
- 400: `Validation error.`,
53257
- 403: `Missing required permission \`Ibl.CRM/Tags/write\`.`,
53258
- 404: `Tag not found.`
53259
- }
53260
- });
53261
- }
53262
- /**
53263
- * Delete a tag
53264
- * Deletes the Tag. All attachments to Persons, Organizations, and Deals are removed atomically via cascade.
53265
- *
53266
- * **Required permission:** `Ibl.CRM/Tags/delete`.
53267
- * @returns void
53268
- * @throws ApiError
53269
- */
53270
- static tagsDestroy({
53271
- id
53272
- }) {
53273
- return request(OpenAPI, {
53274
- method: 'DELETE',
53275
- url: '/tags/{id}/',
53276
- path: {
53277
- 'id': id
53278
- },
53279
- errors: {
53280
- 403: `Missing required permission \`Ibl.CRM/Tags/delete\`.`,
53281
- 404: `Tag not found.`
53282
- }
53283
- });
53284
- }
53285
- }
53286
-
53287
- class TransactionsService {
53288
- /**
53289
- * List transaction history
53290
- * Paginated transaction history for the credit account. Use platform_key query param to list platform account transactions (if permitted). Filter by transaction_type, from_date (YYYY-MM-DD), to_date (YYYY-MM-DD).
53291
- * @returns CreditTransactionHistory
53292
- * @throws ApiError
53293
- */
53294
- static transactionsRetrieve({
53295
- fromDate,
53296
- platformKey,
53297
- toDate,
53298
- transactionType
53299
- }) {
53300
- return request(OpenAPI, {
53301
- method: 'GET',
53302
- url: '/transactions/',
53303
- query: {
53304
- 'from_date': fromDate,
53305
- 'platform_key': platformKey,
53306
- 'to_date': toDate,
53307
- 'transaction_type': transactionType
53308
- }
53309
- });
53310
- }
53311
- }
53312
-
53313
- exports.AccessCheckService = AccessCheckService;
53314
- exports.AccountService = AccountService;
53315
- exports.ActivitiesService = ActivitiesService;
53316
51339
  exports.AiAccountService = AiAccountService;
53317
51340
  exports.AiAnalyticsService = AiAnalyticsService;
53318
51341
  exports.AiBotService = AiBotService;
@@ -53325,7 +51348,6 @@ exports.AiProxyService = AiProxyService;
53325
51348
  exports.AiSearchService = AiSearchService;
53326
51349
  exports.AnalyticsService = AnalyticsService;
53327
51350
  exports.ApiError = ApiError;
53328
- exports.AutoRechargeService = AutoRechargeService;
53329
51351
  exports.BillingService = BillingService;
53330
51352
  exports.CancelError = CancelError;
53331
51353
  exports.CancelablePromise = CancelablePromise;
@@ -53334,28 +51356,17 @@ exports.CatalogService = CatalogService;
53334
51356
  exports.CommerceService = CommerceService;
53335
51357
  exports.CoreService = CoreService;
53336
51358
  exports.CredentialsService = CredentialsService;
53337
- exports.CreditsService = CreditsService;
53338
51359
  exports.CrmService = CrmService;
53339
51360
  exports.CustomDomainsService = CustomDomainsService;
53340
- exports.DealsService = DealsService;
53341
51361
  exports.EximService = EximService;
53342
51362
  exports.FeaturesService = FeaturesService;
53343
51363
  exports.IntegrationCredentialsService = IntegrationCredentialsService;
53344
- exports.ItemsService = ItemsService;
53345
- exports.LeadSourcesService = LeadSourcesService;
53346
51364
  exports.MediaService = MediaService;
53347
51365
  exports.NotificationsService = NotificationsService;
53348
51366
  exports.OpenAPI = OpenAPI;
53349
- exports.OrganizationsService = OrganizationsService;
53350
- exports.PersonsService = PersonsService;
53351
- exports.PipelinesService = PipelinesService;
53352
- exports.PlatformsService = PlatformsService;
53353
- exports.PricesService = PricesService;
53354
51367
  exports.RecommendationsService = RecommendationsService;
53355
51368
  exports.ReportsService = ReportsService;
53356
51369
  exports.ScimService = ScimService;
53357
51370
  exports.SearchService = SearchService;
53358
51371
  exports.SkillsService = SkillsService;
53359
- exports.TagsService = TagsService;
53360
- exports.TransactionsService = TransactionsService;
53361
51372
  //# sourceMappingURL=index.cjs.js.map