@iblai/iblai-api 4.194.2-core → 4.195.0-core

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/index.cjs.js +1163 -185
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +1163 -186
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/index.umd.js +1163 -185
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/types/index.d.ts +18 -1
  8. package/dist/types/models/CheckoutSessionCreate.d.ts +6 -0
  9. package/dist/types/models/CheckoutSessionResponse.d.ts +13 -0
  10. package/dist/types/models/GrandfatheringStrategyEnum.d.ts +8 -0
  11. package/dist/types/models/IntervalEnum.d.ts +10 -0
  12. package/dist/types/models/ItemAccessCheckResponse.d.ts +7 -2
  13. package/dist/types/models/ItemPaywallConfig.d.ts +52 -0
  14. package/dist/types/models/ItemPaywallConfigCreate.d.ts +8 -0
  15. package/dist/types/models/ItemPrice.d.ts +46 -0
  16. package/dist/types/models/ItemPriceCreate.d.ts +36 -0
  17. package/dist/types/models/ItemSubscription.d.ts +67 -0
  18. package/dist/types/models/ItemSubscriptionList.d.ts +34 -0
  19. package/dist/types/models/ItemType5d7Enum.d.ts +10 -0
  20. package/dist/types/models/{ItemAccessCheckResponseItemTypeEnum.d.ts → ItemTypeC6bEnum.d.ts} +1 -1
  21. package/dist/types/models/PaginatedItemSubscriptionList.d.ts +7 -0
  22. package/dist/types/models/PaginatedItemSubscriptionListList.d.ts +7 -0
  23. package/dist/types/models/PortalUrlResponse.d.ts +9 -0
  24. package/dist/types/models/PublicItemPricing.d.ts +11 -0
  25. package/dist/types/models/Status0e3Enum.d.ts +18 -0
  26. package/dist/types/services/BillingService.d.ts +271 -0
  27. package/dist/types/services/PlatformsService.d.ts +275 -0
  28. package/package.json +1 -1
  29. package/sdk_schema.yml +7861 -5691
  30. package/src/core/OpenAPI.ts +1 -1
  31. package/src/index.ts +18 -1
  32. package/src/models/CheckoutSessionCreate.ts +11 -0
  33. package/src/models/CheckoutSessionResponse.ts +18 -0
  34. package/src/models/GrandfatheringStrategyEnum.ts +12 -0
  35. package/src/models/IntervalEnum.ts +14 -0
  36. package/src/models/ItemAccessCheckResponse.ts +7 -2
  37. package/src/models/ItemPaywallConfig.ts +57 -0
  38. package/src/models/ItemPaywallConfigCreate.ts +13 -0
  39. package/src/models/ItemPrice.ts +51 -0
  40. package/src/models/ItemPriceCreate.ts +41 -0
  41. package/src/models/ItemSubscription.ts +72 -0
  42. package/src/models/ItemSubscriptionList.ts +39 -0
  43. package/src/models/ItemType5d7Enum.ts +14 -0
  44. package/src/models/{ItemAccessCheckResponseItemTypeEnum.ts → ItemTypeC6bEnum.ts} +1 -1
  45. package/src/models/PaginatedItemSubscriptionList.ts +12 -0
  46. package/src/models/PaginatedItemSubscriptionListList.ts +12 -0
  47. package/src/models/PortalUrlResponse.ts +14 -0
  48. package/src/models/PublicItemPricing.ts +16 -0
  49. package/src/models/Status0e3Enum.ts +22 -0
  50. package/src/services/BillingService.ts +591 -0
  51. package/src/services/PlatformsService.ts +601 -0
package/dist/index.umd.js CHANGED
@@ -114,7 +114,7 @@
114
114
 
115
115
  const OpenAPI = {
116
116
  BASE: 'https://base.manager.iblai.app',
117
- VERSION: '4.194.2-core',
117
+ VERSION: '4.195.0-core',
118
118
  WITH_CREDENTIALS: false,
119
119
  CREDENTIALS: 'include',
120
120
  TOKEN: undefined,
@@ -247,6 +247,20 @@
247
247
  GooglePayAccountResponseStatusEnum["ACCOUNT_PENDING"] = "ACCOUNT_PENDING";
248
248
  })(exports.GooglePayAccountResponseStatusEnum || (exports.GooglePayAccountResponseStatusEnum = {}));
249
249
 
250
+ /* generated using openapi-typescript-codegen -- do not edit */
251
+ /* istanbul ignore file */
252
+ /* tslint:disable */
253
+ /* eslint-disable */
254
+ /**
255
+ * * `free_forever` - Free Forever - Existing users get unlimited free access
256
+ * * `require_subscription` - Require Subscription - All users must subscribe (no grandfathering)
257
+ */
258
+ exports.GrandfatheringStrategyEnum = void 0;
259
+ (function (GrandfatheringStrategyEnum) {
260
+ GrandfatheringStrategyEnum["FREE_FOREVER"] = "free_forever";
261
+ GrandfatheringStrategyEnum["REQUIRE_SUBSCRIPTION"] = "require_subscription";
262
+ })(exports.GrandfatheringStrategyEnum || (exports.GrandfatheringStrategyEnum = {}));
263
+
250
264
  /* generated using openapi-typescript-codegen -- do not edit */
251
265
  /* istanbul ignore file */
252
266
  /* tslint:disable */
@@ -285,6 +299,38 @@
285
299
  InstitutionTypeEnum["OTHER"] = "other";
286
300
  })(exports.InstitutionTypeEnum || (exports.InstitutionTypeEnum = {}));
287
301
 
302
+ /* generated using openapi-typescript-codegen -- do not edit */
303
+ /* istanbul ignore file */
304
+ /* tslint:disable */
305
+ /* eslint-disable */
306
+ /**
307
+ * * `month` - Monthly
308
+ * * `year` - Yearly
309
+ * * `one_time` - One Time
310
+ */
311
+ exports.IntervalEnum = void 0;
312
+ (function (IntervalEnum) {
313
+ IntervalEnum["MONTH"] = "month";
314
+ IntervalEnum["YEAR"] = "year";
315
+ IntervalEnum["ONE_TIME"] = "one_time";
316
+ })(exports.IntervalEnum || (exports.IntervalEnum = {}));
317
+
318
+ /* generated using openapi-typescript-codegen -- do not edit */
319
+ /* istanbul ignore file */
320
+ /* tslint:disable */
321
+ /* eslint-disable */
322
+ /**
323
+ * * `mentor` - Mentor
324
+ * * `course` - Course
325
+ * * `program` - Program
326
+ */
327
+ exports.ItemType5d7Enum = void 0;
328
+ (function (ItemType5d7Enum) {
329
+ ItemType5d7Enum["MENTOR"] = "mentor";
330
+ ItemType5d7Enum["COURSE"] = "course";
331
+ ItemType5d7Enum["PROGRAM"] = "program";
332
+ })(exports.ItemType5d7Enum || (exports.ItemType5d7Enum = {}));
333
+
288
334
  /* generated using openapi-typescript-codegen -- do not edit */
289
335
  /* istanbul ignore file */
290
336
  /* tslint:disable */
@@ -294,12 +340,12 @@
294
340
  * * `course` - course
295
341
  * * `program` - program
296
342
  */
297
- exports.ItemAccessCheckResponseItemTypeEnum = void 0;
298
- (function (ItemAccessCheckResponseItemTypeEnum) {
299
- ItemAccessCheckResponseItemTypeEnum["MENTOR"] = "mentor";
300
- ItemAccessCheckResponseItemTypeEnum["COURSE"] = "course";
301
- ItemAccessCheckResponseItemTypeEnum["PROGRAM"] = "program";
302
- })(exports.ItemAccessCheckResponseItemTypeEnum || (exports.ItemAccessCheckResponseItemTypeEnum = {}));
343
+ exports.ItemTypeC6bEnum = void 0;
344
+ (function (ItemTypeC6bEnum) {
345
+ ItemTypeC6bEnum["MENTOR"] = "mentor";
346
+ ItemTypeC6bEnum["COURSE"] = "course";
347
+ ItemTypeC6bEnum["PROGRAM"] = "program";
348
+ })(exports.ItemTypeC6bEnum || (exports.ItemTypeC6bEnum = {}));
303
349
 
304
350
  /* generated using openapi-typescript-codegen -- do not edit */
305
351
  /* istanbul ignore file */
@@ -515,6 +561,30 @@
515
561
  StateEnum["EXPIRED"] = "expired";
516
562
  })(exports.StateEnum || (exports.StateEnum = {}));
517
563
 
564
+ /* generated using openapi-typescript-codegen -- do not edit */
565
+ /* istanbul ignore file */
566
+ /* tslint:disable */
567
+ /* eslint-disable */
568
+ /**
569
+ * * `active` - Active
570
+ * * `free` - Free Tier
571
+ * * `grandfathered` - Grandfathered
572
+ * * `trialing` - Trialing
573
+ * * `past_due` - Past Due
574
+ * * `canceled` - Canceled
575
+ * * `incomplete` - Incomplete
576
+ */
577
+ exports.Status0e3Enum = void 0;
578
+ (function (Status0e3Enum) {
579
+ Status0e3Enum["ACTIVE"] = "active";
580
+ Status0e3Enum["FREE"] = "free";
581
+ Status0e3Enum["GRANDFATHERED"] = "grandfathered";
582
+ Status0e3Enum["TRIALING"] = "trialing";
583
+ Status0e3Enum["PAST_DUE"] = "past_due";
584
+ Status0e3Enum["CANCELED"] = "canceled";
585
+ Status0e3Enum["INCOMPLETE"] = "incomplete";
586
+ })(exports.Status0e3Enum || (exports.Status0e3Enum = {}));
587
+
518
588
  /* generated using openapi-typescript-codegen -- do not edit */
519
589
  /* istanbul ignore file */
520
590
  /* tslint:disable */
@@ -4716,260 +4786,495 @@
4716
4786
  });
4717
4787
  }
4718
4788
  /**
4719
- * List transaction history
4720
- * 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).
4721
- * @returns CreditTransactionHistory
4789
+ * Check whether the authenticated user has payment access to an item on a scoped platform.
4790
+ * @returns ItemAccessCheckResponse
4722
4791
  * @throws ApiError
4723
4792
  */
4724
- static billingTransactionsRetrieve({
4725
- fromDate,
4726
- platformKey,
4727
- toDate,
4728
- transactionType
4793
+ static billingPlatformsItemsAccessCheckRetrieve({
4794
+ itemId,
4795
+ itemType,
4796
+ platformKey
4729
4797
  }) {
4730
4798
  return request(OpenAPI, {
4731
4799
  method: 'GET',
4732
- url: '/api/billing/transactions/',
4733
- query: {
4734
- 'from_date': fromDate,
4735
- 'platform_key': platformKey,
4736
- 'to_date': toDate,
4737
- 'transaction_type': transactionType
4800
+ url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/access-check/',
4801
+ path: {
4802
+ 'item_id': itemId,
4803
+ 'item_type': itemType,
4804
+ 'platform_key': platformKey
4738
4805
  }
4739
4806
  });
4740
4807
  }
4741
- }
4742
-
4743
- class CareerService {
4744
4808
  /**
4745
- * API endpoint for managing user base locations
4746
- * @returns any No response body
4809
+ * Create checkout session
4810
+ * Create a Stripe checkout session for an authenticated user to purchase or subscribe to an item.
4811
+ * @returns CheckoutSessionResponse
4747
4812
  * @throws ApiError
4748
4813
  */
4749
- static careerLocationOrgsUsersRetrieve({
4750
- org,
4751
- username
4814
+ static billingPlatformsItemsCheckoutCreate({
4815
+ itemId,
4816
+ itemType,
4817
+ platformKey,
4818
+ requestBody
4752
4819
  }) {
4753
4820
  return request(OpenAPI, {
4754
- method: 'GET',
4755
- url: '/api/career/location/orgs/{org}/users/{username}/',
4821
+ method: 'POST',
4822
+ url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/checkout/',
4756
4823
  path: {
4757
- 'org': org,
4758
- 'username': username
4759
- }
4824
+ 'item_id': itemId,
4825
+ 'item_type': itemType,
4826
+ 'platform_key': platformKey
4827
+ },
4828
+ body: requestBody,
4829
+ mediaType: 'application/json'
4760
4830
  });
4761
4831
  }
4762
4832
  /**
4763
- * API endpoint for managing user base locations
4764
- * @returns any No response body
4833
+ * Handle checkout callback
4834
+ * Stripe redirects here after checkout. Processes the completed session and redirects to the return URL.
4835
+ * @returns void
4765
4836
  * @throws ApiError
4766
4837
  */
4767
- static careerLocationOrgsUsersCreate({
4768
- org,
4769
- username
4838
+ static billingPlatformsItemsCheckoutCallbackRetrieve({
4839
+ itemId,
4840
+ itemType,
4841
+ platformKey,
4842
+ returnUrl
4770
4843
  }) {
4771
4844
  return request(OpenAPI, {
4772
- method: 'POST',
4773
- url: '/api/career/location/orgs/{org}/users/{username}/',
4845
+ method: 'GET',
4846
+ url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/checkout-callback/',
4774
4847
  path: {
4775
- 'org': org,
4776
- 'username': username
4848
+ 'item_id': itemId,
4849
+ 'item_type': itemType,
4850
+ 'platform_key': platformKey
4851
+ },
4852
+ query: {
4853
+ 'return_url': returnUrl
4854
+ },
4855
+ errors: {
4856
+ 302: `No response body`
4777
4857
  }
4778
4858
  });
4779
4859
  }
4780
4860
  /**
4781
- * API endpoint for managing user base locations
4782
- * @returns any No response body
4861
+ * Handle checkout callback
4862
+ * Stripe redirects here after checkout. Processes the completed session and redirects to the return URL.
4863
+ * @returns void
4783
4864
  * @throws ApiError
4784
4865
  */
4785
- static careerLocationOrgsUsersUpdate({
4786
- org,
4787
- username
4866
+ static billingPlatformsItemsCheckoutCallbackRetrieve2({
4867
+ checkoutSessionId,
4868
+ itemId,
4869
+ itemType,
4870
+ platformKey,
4871
+ returnUrl
4788
4872
  }) {
4789
4873
  return request(OpenAPI, {
4790
- method: 'PUT',
4791
- url: '/api/career/location/orgs/{org}/users/{username}/',
4874
+ method: 'GET',
4875
+ url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/checkout-callback/{checkout_session_id}/',
4792
4876
  path: {
4793
- 'org': org,
4794
- 'username': username
4877
+ 'checkout_session_id': checkoutSessionId,
4878
+ 'item_id': itemId,
4879
+ 'item_type': itemType,
4880
+ 'platform_key': platformKey
4881
+ },
4882
+ query: {
4883
+ 'return_url': returnUrl
4884
+ },
4885
+ errors: {
4886
+ 302: `No response body`
4795
4887
  }
4796
4888
  });
4797
4889
  }
4798
4890
  /**
4799
- * Platform-wide location statistics (GET only)
4800
- * @returns any No response body
4891
+ * Create guest checkout session
4892
+ * Create a Stripe checkout session for a guest user (email required).
4893
+ * @returns CheckoutSessionResponse
4801
4894
  * @throws ApiError
4802
4895
  */
4803
- static careerLocationsOrgsRetrieve({
4804
- org
4896
+ static billingPlatformsItemsCheckoutGuestCreate({
4897
+ itemId,
4898
+ itemType,
4899
+ platformKey,
4900
+ requestBody
4805
4901
  }) {
4806
4902
  return request(OpenAPI, {
4807
- method: 'GET',
4808
- url: '/api/career/locations/orgs/{org}/',
4903
+ method: 'POST',
4904
+ url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/checkout-guest/',
4809
4905
  path: {
4810
- 'org': org
4811
- }
4906
+ 'item_id': itemId,
4907
+ 'item_type': itemType,
4908
+ 'platform_key': platformKey
4909
+ },
4910
+ body: requestBody,
4911
+ mediaType: 'application/json'
4812
4912
  });
4813
4913
  }
4814
4914
  /**
4815
- * @returns Company
4915
+ * Get paywall configuration
4916
+ * Retrieve the paywall configuration for an item. Returns default (disabled) config if none exists.
4917
+ * @returns ItemPaywallConfig
4816
4918
  * @throws ApiError
4817
4919
  */
4818
- static careerOrgsCompaniesUsersRetrieve({
4819
- org,
4820
- username
4920
+ static billingPlatformsItemsPaywallRetrieve({
4921
+ itemId,
4922
+ itemType,
4923
+ platformKey
4821
4924
  }) {
4822
4925
  return request(OpenAPI, {
4823
4926
  method: 'GET',
4824
- url: '/api/career/orgs/{org}/companies/users/{username}/',
4927
+ url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/',
4825
4928
  path: {
4826
- 'org': org,
4827
- 'username': username
4929
+ 'item_id': itemId,
4930
+ 'item_type': itemType,
4931
+ 'platform_key': platformKey
4828
4932
  }
4829
4933
  });
4830
4934
  }
4831
4935
  /**
4832
- * @returns Company
4936
+ * Create or update paywall configuration
4937
+ * Enable or configure the paywall for an item. Creates a Stripe product on first enable.
4938
+ * @returns ItemPaywallConfig
4833
4939
  * @throws ApiError
4834
4940
  */
4835
- static careerOrgsCompaniesUsersCreate({
4836
- org,
4837
- username,
4941
+ static billingPlatformsItemsPaywallCreate({
4942
+ itemId,
4943
+ itemType,
4944
+ platformKey,
4838
4945
  requestBody
4839
4946
  }) {
4840
4947
  return request(OpenAPI, {
4841
4948
  method: 'POST',
4842
- url: '/api/career/orgs/{org}/companies/users/{username}/',
4949
+ url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/',
4843
4950
  path: {
4844
- 'org': org,
4845
- 'username': username
4951
+ 'item_id': itemId,
4952
+ 'item_type': itemType,
4953
+ 'platform_key': platformKey
4846
4954
  },
4847
4955
  body: requestBody,
4848
4956
  mediaType: 'application/json'
4849
4957
  });
4850
4958
  }
4851
4959
  /**
4852
- * @returns Company
4960
+ * Update paywall configuration
4961
+ * Same as POST. Update the paywall configuration for an item.
4962
+ * @returns ItemPaywallConfig
4853
4963
  * @throws ApiError
4854
4964
  */
4855
- static careerOrgsCompaniesUsersUpdate({
4856
- org,
4857
- username,
4965
+ static billingPlatformsItemsPaywallUpdate({
4966
+ itemId,
4967
+ itemType,
4968
+ platformKey,
4858
4969
  requestBody
4859
4970
  }) {
4860
4971
  return request(OpenAPI, {
4861
4972
  method: 'PUT',
4862
- url: '/api/career/orgs/{org}/companies/users/{username}/',
4973
+ url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/',
4863
4974
  path: {
4864
- 'org': org,
4865
- 'username': username
4975
+ 'item_id': itemId,
4976
+ 'item_type': itemType,
4977
+ 'platform_key': platformKey
4866
4978
  },
4867
4979
  body: requestBody,
4868
4980
  mediaType: 'application/json'
4869
4981
  });
4870
4982
  }
4871
4983
  /**
4984
+ * Disable paywall configuration
4985
+ * Disable the paywall for an item. Does not delete the configuration.
4872
4986
  * @returns void
4873
4987
  * @throws ApiError
4874
4988
  */
4875
- static careerOrgsCompaniesUsersDestroy({
4876
- org,
4877
- username
4989
+ static billingPlatformsItemsPaywallDestroy({
4990
+ itemId,
4991
+ itemType,
4992
+ platformKey
4878
4993
  }) {
4879
4994
  return request(OpenAPI, {
4880
4995
  method: 'DELETE',
4881
- url: '/api/career/orgs/{org}/companies/users/{username}/',
4996
+ url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/',
4882
4997
  path: {
4883
- 'org': org,
4884
- 'username': username
4998
+ 'item_id': itemId,
4999
+ 'item_type': itemType,
5000
+ 'platform_key': platformKey
4885
5001
  }
4886
5002
  });
4887
5003
  }
4888
5004
  /**
4889
- * @returns Education
5005
+ * List prices
5006
+ * List active prices for an item's paywall configuration.
5007
+ * @returns ItemPrice
4890
5008
  * @throws ApiError
4891
5009
  */
4892
- static careerOrgsEducationUsersRetrieve({
4893
- org,
4894
- username
5010
+ static billingPlatformsItemsPaywallPricesList({
5011
+ itemId,
5012
+ itemType,
5013
+ platformKey
4895
5014
  }) {
4896
5015
  return request(OpenAPI, {
4897
5016
  method: 'GET',
4898
- url: '/api/career/orgs/{org}/education/users/{username}/',
5017
+ url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/prices/',
4899
5018
  path: {
4900
- 'org': org,
4901
- 'username': username
5019
+ 'item_id': itemId,
5020
+ 'item_type': itemType,
5021
+ 'platform_key': platformKey
4902
5022
  }
4903
5023
  });
4904
5024
  }
4905
5025
  /**
4906
- * @returns Education
5026
+ * Create a price
5027
+ * Create a new price tier for an item. Requires paywall to be enabled and Stripe Connect account ready.
5028
+ * @returns ItemPrice
4907
5029
  * @throws ApiError
4908
5030
  */
4909
- static careerOrgsEducationUsersCreate({
4910
- org,
4911
- username,
5031
+ static billingPlatformsItemsPaywallPricesCreate({
5032
+ itemId,
5033
+ itemType,
5034
+ platformKey,
4912
5035
  requestBody
4913
5036
  }) {
4914
5037
  return request(OpenAPI, {
4915
5038
  method: 'POST',
4916
- url: '/api/career/orgs/{org}/education/users/{username}/',
5039
+ url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/prices/',
4917
5040
  path: {
4918
- 'org': org,
4919
- 'username': username
5041
+ 'item_id': itemId,
5042
+ 'item_type': itemType,
5043
+ 'platform_key': platformKey
4920
5044
  },
4921
5045
  body: requestBody,
4922
5046
  mediaType: 'application/json'
4923
5047
  });
4924
5048
  }
4925
5049
  /**
4926
- * @returns Education
5050
+ * Get price details
5051
+ * Retrieve a specific price by ID.
5052
+ * @returns ItemPrice
4927
5053
  * @throws ApiError
4928
5054
  */
4929
- static careerOrgsEducationUsersUpdate({
4930
- org,
4931
- username,
5055
+ static billingPlatformsItemsPaywallPricesRetrieve({
5056
+ itemId,
5057
+ itemType,
5058
+ platformKey,
5059
+ priceId
5060
+ }) {
5061
+ return request(OpenAPI, {
5062
+ method: 'GET',
5063
+ url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/prices/{price_id}/',
5064
+ path: {
5065
+ 'item_id': itemId,
5066
+ 'item_type': itemType,
5067
+ 'platform_key': platformKey,
5068
+ 'price_id': priceId
5069
+ }
5070
+ });
5071
+ }
5072
+ /**
5073
+ * Update a price
5074
+ * Update a price tier. If pricing fields change and a Stripe price exists, a new Stripe price is created and the old one deactivated.
5075
+ * @returns ItemPrice
5076
+ * @throws ApiError
5077
+ */
5078
+ static billingPlatformsItemsPaywallPricesUpdate({
5079
+ itemId,
5080
+ itemType,
5081
+ platformKey,
5082
+ priceId,
4932
5083
  requestBody
4933
5084
  }) {
4934
5085
  return request(OpenAPI, {
4935
5086
  method: 'PUT',
4936
- url: '/api/career/orgs/{org}/education/users/{username}/',
5087
+ url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/prices/{price_id}/',
4937
5088
  path: {
4938
- 'org': org,
4939
- 'username': username
5089
+ 'item_id': itemId,
5090
+ 'item_type': itemType,
5091
+ 'platform_key': platformKey,
5092
+ 'price_id': priceId
4940
5093
  },
4941
5094
  body: requestBody,
4942
5095
  mediaType: 'application/json'
4943
5096
  });
4944
5097
  }
4945
5098
  /**
5099
+ * Delete a price
5100
+ * Soft-delete a price tier and deactivate the corresponding Stripe price.
4946
5101
  * @returns void
4947
5102
  * @throws ApiError
4948
5103
  */
4949
- static careerOrgsEducationUsersDestroy({
4950
- org,
4951
- username
5104
+ static billingPlatformsItemsPaywallPricesDestroy({
5105
+ itemId,
5106
+ itemType,
5107
+ platformKey,
5108
+ priceId
4952
5109
  }) {
4953
5110
  return request(OpenAPI, {
4954
5111
  method: 'DELETE',
4955
- url: '/api/career/orgs/{org}/education/users/{username}/',
5112
+ url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/prices/{price_id}/',
4956
5113
  path: {
4957
- 'org': org,
4958
- 'username': username
5114
+ 'item_id': itemId,
5115
+ 'item_type': itemType,
5116
+ 'platform_key': platformKey,
5117
+ 'price_id': priceId
4959
5118
  }
4960
5119
  });
4961
5120
  }
4962
5121
  /**
4963
- * @returns Experience
5122
+ * Get public pricing
5123
+ * Retrieve public pricing information for an item. No authentication required.
5124
+ * @returns PublicItemPricing
4964
5125
  * @throws ApiError
4965
5126
  */
4966
- static careerOrgsExperienceUsersRetrieve({
5127
+ static billingPlatformsItemsPricingRetrieve({
5128
+ itemId,
5129
+ itemType,
5130
+ platformKey
5131
+ }) {
5132
+ return request(OpenAPI, {
5133
+ method: 'GET',
5134
+ url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/pricing/',
5135
+ path: {
5136
+ 'item_id': itemId,
5137
+ 'item_type': itemType,
5138
+ 'platform_key': platformKey
5139
+ }
5140
+ });
5141
+ }
5142
+ /**
5143
+ * List item subscribers
5144
+ * List all subscribers for an item. Optionally filter by subscription status.
5145
+ * @returns PaginatedItemSubscriptionList
5146
+ * @throws ApiError
5147
+ */
5148
+ static billingPlatformsItemsSubscribersList({
5149
+ itemId,
5150
+ itemType,
5151
+ platformKey,
5152
+ page,
5153
+ pageSize,
5154
+ status
5155
+ }) {
5156
+ return request(OpenAPI, {
5157
+ method: 'GET',
5158
+ url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/subscribers/',
5159
+ path: {
5160
+ 'item_id': itemId,
5161
+ 'item_type': itemType,
5162
+ 'platform_key': platformKey
5163
+ },
5164
+ query: {
5165
+ 'page': page,
5166
+ 'page_size': pageSize,
5167
+ 'status': status
5168
+ }
5169
+ });
5170
+ }
5171
+ /**
5172
+ * Get user subscription
5173
+ * Retrieve the current user's subscription to an item.
5174
+ * @returns ItemSubscription
5175
+ * @throws ApiError
5176
+ */
5177
+ static billingPlatformsItemsSubscriptionRetrieve({
5178
+ itemId,
5179
+ itemType,
5180
+ platformKey
5181
+ }) {
5182
+ return request(OpenAPI, {
5183
+ method: 'GET',
5184
+ url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/subscription/',
5185
+ path: {
5186
+ 'item_id': itemId,
5187
+ 'item_type': itemType,
5188
+ 'platform_key': platformKey
5189
+ }
5190
+ });
5191
+ }
5192
+ /**
5193
+ * Cancel subscription
5194
+ * Cancel the current user's subscription. Returns a Stripe customer portal URL for recurring subscriptions, or cancels directly for one-time purchases.
5195
+ * @returns PortalUrlResponse
5196
+ * @throws ApiError
5197
+ */
5198
+ static billingPlatformsItemsSubscriptionCancelCreate({
5199
+ itemId,
5200
+ itemType,
5201
+ platformKey
5202
+ }) {
5203
+ return request(OpenAPI, {
5204
+ method: 'POST',
5205
+ url: '/api/billing/platforms/{platform_key}/items/{item_type}/{item_id}/subscription/cancel/',
5206
+ path: {
5207
+ 'item_id': itemId,
5208
+ 'item_type': itemType,
5209
+ 'platform_key': platformKey
5210
+ }
5211
+ });
5212
+ }
5213
+ /**
5214
+ * List user subscriptions
5215
+ * Paginated list of the current user's subscriptions on a platform. Optionally filter by status or item_type.
5216
+ * @returns PaginatedItemSubscriptionListList
5217
+ * @throws ApiError
5218
+ */
5219
+ static billingPlatformsMySubscriptionsList({
5220
+ platformKey,
5221
+ itemType,
5222
+ page,
5223
+ pageSize,
5224
+ status
5225
+ }) {
5226
+ return request(OpenAPI, {
5227
+ method: 'GET',
5228
+ url: '/api/billing/platforms/{platform_key}/my-subscriptions/',
5229
+ path: {
5230
+ 'platform_key': platformKey
5231
+ },
5232
+ query: {
5233
+ 'item_type': itemType,
5234
+ 'page': page,
5235
+ 'page_size': pageSize,
5236
+ 'status': status
5237
+ }
5238
+ });
5239
+ }
5240
+ /**
5241
+ * List transaction history
5242
+ * 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).
5243
+ * @returns CreditTransactionHistory
5244
+ * @throws ApiError
5245
+ */
5246
+ static billingTransactionsRetrieve({
5247
+ fromDate,
5248
+ platformKey,
5249
+ toDate,
5250
+ transactionType
5251
+ }) {
5252
+ return request(OpenAPI, {
5253
+ method: 'GET',
5254
+ url: '/api/billing/transactions/',
5255
+ query: {
5256
+ 'from_date': fromDate,
5257
+ 'platform_key': platformKey,
5258
+ 'to_date': toDate,
5259
+ 'transaction_type': transactionType
5260
+ }
5261
+ });
5262
+ }
5263
+ }
5264
+
5265
+ class CareerService {
5266
+ /**
5267
+ * API endpoint for managing user base locations
5268
+ * @returns any No response body
5269
+ * @throws ApiError
5270
+ */
5271
+ static careerLocationOrgsUsersRetrieve({
4967
5272
  org,
4968
5273
  username
4969
5274
  }) {
4970
5275
  return request(OpenAPI, {
4971
5276
  method: 'GET',
4972
- url: '/api/career/orgs/{org}/experience/users/{username}/',
5277
+ url: '/api/career/location/orgs/{org}/users/{username}/',
4973
5278
  path: {
4974
5279
  'org': org,
4975
5280
  'username': username
@@ -4977,73 +5282,68 @@
4977
5282
  });
4978
5283
  }
4979
5284
  /**
4980
- * @returns Experience
5285
+ * API endpoint for managing user base locations
5286
+ * @returns any No response body
4981
5287
  * @throws ApiError
4982
5288
  */
4983
- static careerOrgsExperienceUsersCreate({
5289
+ static careerLocationOrgsUsersCreate({
4984
5290
  org,
4985
- username,
4986
- requestBody
5291
+ username
4987
5292
  }) {
4988
5293
  return request(OpenAPI, {
4989
5294
  method: 'POST',
4990
- url: '/api/career/orgs/{org}/experience/users/{username}/',
5295
+ url: '/api/career/location/orgs/{org}/users/{username}/',
4991
5296
  path: {
4992
5297
  'org': org,
4993
5298
  'username': username
4994
- },
4995
- body: requestBody,
4996
- mediaType: 'application/json'
5299
+ }
4997
5300
  });
4998
5301
  }
4999
5302
  /**
5000
- * @returns Experience
5303
+ * API endpoint for managing user base locations
5304
+ * @returns any No response body
5001
5305
  * @throws ApiError
5002
5306
  */
5003
- static careerOrgsExperienceUsersUpdate({
5307
+ static careerLocationOrgsUsersUpdate({
5004
5308
  org,
5005
- username,
5006
- requestBody
5309
+ username
5007
5310
  }) {
5008
5311
  return request(OpenAPI, {
5009
5312
  method: 'PUT',
5010
- url: '/api/career/orgs/{org}/experience/users/{username}/',
5313
+ url: '/api/career/location/orgs/{org}/users/{username}/',
5011
5314
  path: {
5012
5315
  'org': org,
5013
5316
  'username': username
5014
- },
5015
- body: requestBody,
5016
- mediaType: 'application/json'
5317
+ }
5017
5318
  });
5018
5319
  }
5019
5320
  /**
5020
- * @returns void
5321
+ * Platform-wide location statistics (GET only)
5322
+ * @returns any No response body
5021
5323
  * @throws ApiError
5022
5324
  */
5023
- static careerOrgsExperienceUsersDestroy({
5024
- org,
5025
- username
5325
+ static careerLocationsOrgsRetrieve({
5326
+ org
5026
5327
  }) {
5027
5328
  return request(OpenAPI, {
5028
- method: 'DELETE',
5029
- url: '/api/career/orgs/{org}/experience/users/{username}/',
5329
+ method: 'GET',
5330
+ url: '/api/career/locations/orgs/{org}/',
5030
5331
  path: {
5031
- 'org': org,
5032
- 'username': username
5332
+ 'org': org
5033
5333
  }
5034
5334
  });
5035
5335
  }
5036
5336
  /**
5037
- * @returns Institution
5337
+ * @returns Company
5038
5338
  * @throws ApiError
5039
5339
  */
5040
- static careerOrgsInstitutionsUsersRetrieve({
5340
+ static careerOrgsCompaniesUsersRetrieve({
5041
5341
  org,
5042
5342
  username
5043
5343
  }) {
5044
5344
  return request(OpenAPI, {
5045
5345
  method: 'GET',
5046
- url: '/api/career/orgs/{org}/institutions/users/{username}/',
5346
+ url: '/api/career/orgs/{org}/companies/users/{username}/',
5047
5347
  path: {
5048
5348
  'org': org,
5049
5349
  'username': username
@@ -5051,17 +5351,17 @@
5051
5351
  });
5052
5352
  }
5053
5353
  /**
5054
- * @returns Institution
5354
+ * @returns Company
5055
5355
  * @throws ApiError
5056
5356
  */
5057
- static careerOrgsInstitutionsUsersCreate({
5357
+ static careerOrgsCompaniesUsersCreate({
5058
5358
  org,
5059
5359
  username,
5060
5360
  requestBody
5061
5361
  }) {
5062
5362
  return request(OpenAPI, {
5063
5363
  method: 'POST',
5064
- url: '/api/career/orgs/{org}/institutions/users/{username}/',
5364
+ url: '/api/career/orgs/{org}/companies/users/{username}/',
5065
5365
  path: {
5066
5366
  'org': org,
5067
5367
  'username': username
@@ -5071,17 +5371,17 @@
5071
5371
  });
5072
5372
  }
5073
5373
  /**
5074
- * @returns Institution
5374
+ * @returns Company
5075
5375
  * @throws ApiError
5076
5376
  */
5077
- static careerOrgsInstitutionsUsersUpdate({
5377
+ static careerOrgsCompaniesUsersUpdate({
5078
5378
  org,
5079
5379
  username,
5080
5380
  requestBody
5081
5381
  }) {
5082
5382
  return request(OpenAPI, {
5083
5383
  method: 'PUT',
5084
- url: '/api/career/orgs/{org}/institutions/users/{username}/',
5384
+ url: '/api/career/orgs/{org}/companies/users/{username}/',
5085
5385
  path: {
5086
5386
  'org': org,
5087
5387
  'username': username
@@ -5094,13 +5394,13 @@
5094
5394
  * @returns void
5095
5395
  * @throws ApiError
5096
5396
  */
5097
- static careerOrgsInstitutionsUsersDestroy({
5397
+ static careerOrgsCompaniesUsersDestroy({
5098
5398
  org,
5099
5399
  username
5100
5400
  }) {
5101
5401
  return request(OpenAPI, {
5102
5402
  method: 'DELETE',
5103
- url: '/api/career/orgs/{org}/institutions/users/{username}/',
5403
+ url: '/api/career/orgs/{org}/companies/users/{username}/',
5104
5404
  path: {
5105
5405
  'org': org,
5106
5406
  'username': username
@@ -5108,16 +5408,16 @@
5108
5408
  });
5109
5409
  }
5110
5410
  /**
5111
- * @returns Program
5411
+ * @returns Education
5112
5412
  * @throws ApiError
5113
5413
  */
5114
- static careerOrgsProgramsUsersRetrieve({
5414
+ static careerOrgsEducationUsersRetrieve({
5115
5415
  org,
5116
5416
  username
5117
5417
  }) {
5118
5418
  return request(OpenAPI, {
5119
5419
  method: 'GET',
5120
- url: '/api/career/orgs/{org}/programs/users/{username}/',
5420
+ url: '/api/career/orgs/{org}/education/users/{username}/',
5121
5421
  path: {
5122
5422
  'org': org,
5123
5423
  'username': username
@@ -5125,17 +5425,17 @@
5125
5425
  });
5126
5426
  }
5127
5427
  /**
5128
- * @returns Program
5428
+ * @returns Education
5129
5429
  * @throws ApiError
5130
5430
  */
5131
- static careerOrgsProgramsUsersCreate({
5431
+ static careerOrgsEducationUsersCreate({
5132
5432
  org,
5133
5433
  username,
5134
5434
  requestBody
5135
5435
  }) {
5136
5436
  return request(OpenAPI, {
5137
5437
  method: 'POST',
5138
- url: '/api/career/orgs/{org}/programs/users/{username}/',
5438
+ url: '/api/career/orgs/{org}/education/users/{username}/',
5139
5439
  path: {
5140
5440
  'org': org,
5141
5441
  'username': username
@@ -5145,17 +5445,17 @@
5145
5445
  });
5146
5446
  }
5147
5447
  /**
5148
- * @returns Program
5448
+ * @returns Education
5149
5449
  * @throws ApiError
5150
5450
  */
5151
- static careerOrgsProgramsUsersUpdate({
5451
+ static careerOrgsEducationUsersUpdate({
5152
5452
  org,
5153
5453
  username,
5154
5454
  requestBody
5155
5455
  }) {
5156
5456
  return request(OpenAPI, {
5157
5457
  method: 'PUT',
5158
- url: '/api/career/orgs/{org}/programs/users/{username}/',
5458
+ url: '/api/career/orgs/{org}/education/users/{username}/',
5159
5459
  path: {
5160
5460
  'org': org,
5161
5461
  'username': username
@@ -5168,13 +5468,13 @@
5168
5468
  * @returns void
5169
5469
  * @throws ApiError
5170
5470
  */
5171
- static careerOrgsProgramsUsersDestroy({
5471
+ static careerOrgsEducationUsersDestroy({
5172
5472
  org,
5173
5473
  username
5174
5474
  }) {
5175
5475
  return request(OpenAPI, {
5176
5476
  method: 'DELETE',
5177
- url: '/api/career/orgs/{org}/programs/users/{username}/',
5477
+ url: '/api/career/orgs/{org}/education/users/{username}/',
5178
5478
  path: {
5179
5479
  'org': org,
5180
5480
  'username': username
@@ -5182,16 +5482,16 @@
5182
5482
  });
5183
5483
  }
5184
5484
  /**
5185
- * @returns any No response body
5485
+ * @returns Experience
5186
5486
  * @throws ApiError
5187
5487
  */
5188
- static careerResumeOrgsUsersRetrieve({
5488
+ static careerOrgsExperienceUsersRetrieve({
5189
5489
  org,
5190
5490
  username
5191
5491
  }) {
5192
5492
  return request(OpenAPI, {
5193
5493
  method: 'GET',
5194
- url: '/api/career/resume/orgs/{org}/users/{username}/',
5494
+ url: '/api/career/orgs/{org}/experience/users/{username}/',
5195
5495
  path: {
5196
5496
  'org': org,
5197
5497
  'username': username
@@ -5199,51 +5499,273 @@
5199
5499
  });
5200
5500
  }
5201
5501
  /**
5202
- * @returns any No response body
5502
+ * @returns Experience
5203
5503
  * @throws ApiError
5204
5504
  */
5205
- static careerResumeOrgsUsersCreate({
5505
+ static careerOrgsExperienceUsersCreate({
5206
5506
  org,
5207
- username
5507
+ username,
5508
+ requestBody
5208
5509
  }) {
5209
5510
  return request(OpenAPI, {
5210
5511
  method: 'POST',
5211
- url: '/api/career/resume/orgs/{org}/users/{username}/',
5512
+ url: '/api/career/orgs/{org}/experience/users/{username}/',
5212
5513
  path: {
5213
5514
  'org': org,
5214
5515
  'username': username
5215
- }
5516
+ },
5517
+ body: requestBody,
5518
+ mediaType: 'application/json'
5216
5519
  });
5217
5520
  }
5218
5521
  /**
5219
- * @returns any No response body
5522
+ * @returns Experience
5220
5523
  * @throws ApiError
5221
5524
  */
5222
- static careerResumeOrgsUsersUpdate({
5525
+ static careerOrgsExperienceUsersUpdate({
5223
5526
  org,
5224
- username
5527
+ username,
5528
+ requestBody
5225
5529
  }) {
5226
5530
  return request(OpenAPI, {
5227
5531
  method: 'PUT',
5228
- url: '/api/career/resume/orgs/{org}/users/{username}/',
5532
+ url: '/api/career/orgs/{org}/experience/users/{username}/',
5229
5533
  path: {
5230
5534
  'org': org,
5231
5535
  'username': username
5232
- }
5536
+ },
5537
+ body: requestBody,
5538
+ mediaType: 'application/json'
5233
5539
  });
5234
5540
  }
5235
- }
5236
-
5237
- class CatalogService {
5238
5541
  /**
5239
- * Retrieve a paginated list of access requests
5240
- * @returns PaginatedCourseAccessRequest
5542
+ * @returns void
5241
5543
  * @throws ApiError
5242
5544
  */
5243
- static catalogAccessRequestsCourseManageRetrieve({
5244
- page,
5245
- pageSize,
5246
- platformKey,
5545
+ static careerOrgsExperienceUsersDestroy({
5546
+ org,
5547
+ username
5548
+ }) {
5549
+ return request(OpenAPI, {
5550
+ method: 'DELETE',
5551
+ url: '/api/career/orgs/{org}/experience/users/{username}/',
5552
+ path: {
5553
+ 'org': org,
5554
+ 'username': username
5555
+ }
5556
+ });
5557
+ }
5558
+ /**
5559
+ * @returns Institution
5560
+ * @throws ApiError
5561
+ */
5562
+ static careerOrgsInstitutionsUsersRetrieve({
5563
+ org,
5564
+ username
5565
+ }) {
5566
+ return request(OpenAPI, {
5567
+ method: 'GET',
5568
+ url: '/api/career/orgs/{org}/institutions/users/{username}/',
5569
+ path: {
5570
+ 'org': org,
5571
+ 'username': username
5572
+ }
5573
+ });
5574
+ }
5575
+ /**
5576
+ * @returns Institution
5577
+ * @throws ApiError
5578
+ */
5579
+ static careerOrgsInstitutionsUsersCreate({
5580
+ org,
5581
+ username,
5582
+ requestBody
5583
+ }) {
5584
+ return request(OpenAPI, {
5585
+ method: 'POST',
5586
+ url: '/api/career/orgs/{org}/institutions/users/{username}/',
5587
+ path: {
5588
+ 'org': org,
5589
+ 'username': username
5590
+ },
5591
+ body: requestBody,
5592
+ mediaType: 'application/json'
5593
+ });
5594
+ }
5595
+ /**
5596
+ * @returns Institution
5597
+ * @throws ApiError
5598
+ */
5599
+ static careerOrgsInstitutionsUsersUpdate({
5600
+ org,
5601
+ username,
5602
+ requestBody
5603
+ }) {
5604
+ return request(OpenAPI, {
5605
+ method: 'PUT',
5606
+ url: '/api/career/orgs/{org}/institutions/users/{username}/',
5607
+ path: {
5608
+ 'org': org,
5609
+ 'username': username
5610
+ },
5611
+ body: requestBody,
5612
+ mediaType: 'application/json'
5613
+ });
5614
+ }
5615
+ /**
5616
+ * @returns void
5617
+ * @throws ApiError
5618
+ */
5619
+ static careerOrgsInstitutionsUsersDestroy({
5620
+ org,
5621
+ username
5622
+ }) {
5623
+ return request(OpenAPI, {
5624
+ method: 'DELETE',
5625
+ url: '/api/career/orgs/{org}/institutions/users/{username}/',
5626
+ path: {
5627
+ 'org': org,
5628
+ 'username': username
5629
+ }
5630
+ });
5631
+ }
5632
+ /**
5633
+ * @returns Program
5634
+ * @throws ApiError
5635
+ */
5636
+ static careerOrgsProgramsUsersRetrieve({
5637
+ org,
5638
+ username
5639
+ }) {
5640
+ return request(OpenAPI, {
5641
+ method: 'GET',
5642
+ url: '/api/career/orgs/{org}/programs/users/{username}/',
5643
+ path: {
5644
+ 'org': org,
5645
+ 'username': username
5646
+ }
5647
+ });
5648
+ }
5649
+ /**
5650
+ * @returns Program
5651
+ * @throws ApiError
5652
+ */
5653
+ static careerOrgsProgramsUsersCreate({
5654
+ org,
5655
+ username,
5656
+ requestBody
5657
+ }) {
5658
+ return request(OpenAPI, {
5659
+ method: 'POST',
5660
+ url: '/api/career/orgs/{org}/programs/users/{username}/',
5661
+ path: {
5662
+ 'org': org,
5663
+ 'username': username
5664
+ },
5665
+ body: requestBody,
5666
+ mediaType: 'application/json'
5667
+ });
5668
+ }
5669
+ /**
5670
+ * @returns Program
5671
+ * @throws ApiError
5672
+ */
5673
+ static careerOrgsProgramsUsersUpdate({
5674
+ org,
5675
+ username,
5676
+ requestBody
5677
+ }) {
5678
+ return request(OpenAPI, {
5679
+ method: 'PUT',
5680
+ url: '/api/career/orgs/{org}/programs/users/{username}/',
5681
+ path: {
5682
+ 'org': org,
5683
+ 'username': username
5684
+ },
5685
+ body: requestBody,
5686
+ mediaType: 'application/json'
5687
+ });
5688
+ }
5689
+ /**
5690
+ * @returns void
5691
+ * @throws ApiError
5692
+ */
5693
+ static careerOrgsProgramsUsersDestroy({
5694
+ org,
5695
+ username
5696
+ }) {
5697
+ return request(OpenAPI, {
5698
+ method: 'DELETE',
5699
+ url: '/api/career/orgs/{org}/programs/users/{username}/',
5700
+ path: {
5701
+ 'org': org,
5702
+ 'username': username
5703
+ }
5704
+ });
5705
+ }
5706
+ /**
5707
+ * @returns any No response body
5708
+ * @throws ApiError
5709
+ */
5710
+ static careerResumeOrgsUsersRetrieve({
5711
+ org,
5712
+ username
5713
+ }) {
5714
+ return request(OpenAPI, {
5715
+ method: 'GET',
5716
+ url: '/api/career/resume/orgs/{org}/users/{username}/',
5717
+ path: {
5718
+ 'org': org,
5719
+ 'username': username
5720
+ }
5721
+ });
5722
+ }
5723
+ /**
5724
+ * @returns any No response body
5725
+ * @throws ApiError
5726
+ */
5727
+ static careerResumeOrgsUsersCreate({
5728
+ org,
5729
+ username
5730
+ }) {
5731
+ return request(OpenAPI, {
5732
+ method: 'POST',
5733
+ url: '/api/career/resume/orgs/{org}/users/{username}/',
5734
+ path: {
5735
+ 'org': org,
5736
+ 'username': username
5737
+ }
5738
+ });
5739
+ }
5740
+ /**
5741
+ * @returns any No response body
5742
+ * @throws ApiError
5743
+ */
5744
+ static careerResumeOrgsUsersUpdate({
5745
+ org,
5746
+ username
5747
+ }) {
5748
+ return request(OpenAPI, {
5749
+ method: 'PUT',
5750
+ url: '/api/career/resume/orgs/{org}/users/{username}/',
5751
+ path: {
5752
+ 'org': org,
5753
+ 'username': username
5754
+ }
5755
+ });
5756
+ }
5757
+ }
5758
+
5759
+ class CatalogService {
5760
+ /**
5761
+ * Retrieve a paginated list of access requests
5762
+ * @returns PaginatedCourseAccessRequest
5763
+ * @throws ApiError
5764
+ */
5765
+ static catalogAccessRequestsCourseManageRetrieve({
5766
+ page,
5767
+ pageSize,
5768
+ platformKey,
5247
5769
  platformOrg,
5248
5770
  reviewed,
5249
5771
  sort = '-id'
@@ -18974,6 +19496,461 @@
18974
19496
  }
18975
19497
  }
18976
19498
 
19499
+ class PlatformsService {
19500
+ /**
19501
+ * Check whether the authenticated user has payment access to an item on a scoped platform.
19502
+ * @returns ItemAccessCheckResponse
19503
+ * @throws ApiError
19504
+ */
19505
+ static platformsItemsAccessCheckRetrieve({
19506
+ itemId,
19507
+ itemType,
19508
+ platformKey
19509
+ }) {
19510
+ return request(OpenAPI, {
19511
+ method: 'GET',
19512
+ url: '/platforms/{platform_key}/items/{item_type}/{item_id}/access-check/',
19513
+ path: {
19514
+ 'item_id': itemId,
19515
+ 'item_type': itemType,
19516
+ 'platform_key': platformKey
19517
+ }
19518
+ });
19519
+ }
19520
+ /**
19521
+ * Create checkout session
19522
+ * Create a Stripe checkout session for an authenticated user to purchase or subscribe to an item.
19523
+ * @returns CheckoutSessionResponse
19524
+ * @throws ApiError
19525
+ */
19526
+ static platformsItemsCheckoutCreate({
19527
+ itemId,
19528
+ itemType,
19529
+ platformKey,
19530
+ requestBody
19531
+ }) {
19532
+ return request(OpenAPI, {
19533
+ method: 'POST',
19534
+ url: '/platforms/{platform_key}/items/{item_type}/{item_id}/checkout/',
19535
+ path: {
19536
+ 'item_id': itemId,
19537
+ 'item_type': itemType,
19538
+ 'platform_key': platformKey
19539
+ },
19540
+ body: requestBody,
19541
+ mediaType: 'application/json'
19542
+ });
19543
+ }
19544
+ /**
19545
+ * Handle checkout callback
19546
+ * Stripe redirects here after checkout. Processes the completed session and redirects to the return URL.
19547
+ * @returns void
19548
+ * @throws ApiError
19549
+ */
19550
+ static platformsItemsCheckoutCallbackRetrieve({
19551
+ itemId,
19552
+ itemType,
19553
+ platformKey,
19554
+ returnUrl
19555
+ }) {
19556
+ return request(OpenAPI, {
19557
+ method: 'GET',
19558
+ url: '/platforms/{platform_key}/items/{item_type}/{item_id}/checkout-callback/',
19559
+ path: {
19560
+ 'item_id': itemId,
19561
+ 'item_type': itemType,
19562
+ 'platform_key': platformKey
19563
+ },
19564
+ query: {
19565
+ 'return_url': returnUrl
19566
+ },
19567
+ errors: {
19568
+ 302: `No response body`
19569
+ }
19570
+ });
19571
+ }
19572
+ /**
19573
+ * Handle checkout callback
19574
+ * Stripe redirects here after checkout. Processes the completed session and redirects to the return URL.
19575
+ * @returns void
19576
+ * @throws ApiError
19577
+ */
19578
+ static platformsItemsCheckoutCallbackRetrieve2({
19579
+ checkoutSessionId,
19580
+ itemId,
19581
+ itemType,
19582
+ platformKey,
19583
+ returnUrl
19584
+ }) {
19585
+ return request(OpenAPI, {
19586
+ method: 'GET',
19587
+ url: '/platforms/{platform_key}/items/{item_type}/{item_id}/checkout-callback/{checkout_session_id}/',
19588
+ path: {
19589
+ 'checkout_session_id': checkoutSessionId,
19590
+ 'item_id': itemId,
19591
+ 'item_type': itemType,
19592
+ 'platform_key': platformKey
19593
+ },
19594
+ query: {
19595
+ 'return_url': returnUrl
19596
+ },
19597
+ errors: {
19598
+ 302: `No response body`
19599
+ }
19600
+ });
19601
+ }
19602
+ /**
19603
+ * Create guest checkout session
19604
+ * Create a Stripe checkout session for a guest user (email required).
19605
+ * @returns CheckoutSessionResponse
19606
+ * @throws ApiError
19607
+ */
19608
+ static platformsItemsCheckoutGuestCreate({
19609
+ itemId,
19610
+ itemType,
19611
+ platformKey,
19612
+ requestBody
19613
+ }) {
19614
+ return request(OpenAPI, {
19615
+ method: 'POST',
19616
+ url: '/platforms/{platform_key}/items/{item_type}/{item_id}/checkout-guest/',
19617
+ path: {
19618
+ 'item_id': itemId,
19619
+ 'item_type': itemType,
19620
+ 'platform_key': platformKey
19621
+ },
19622
+ body: requestBody,
19623
+ mediaType: 'application/json'
19624
+ });
19625
+ }
19626
+ /**
19627
+ * Get paywall configuration
19628
+ * Retrieve the paywall configuration for an item. Returns default (disabled) config if none exists.
19629
+ * @returns ItemPaywallConfig
19630
+ * @throws ApiError
19631
+ */
19632
+ static platformsItemsPaywallRetrieve({
19633
+ itemId,
19634
+ itemType,
19635
+ platformKey
19636
+ }) {
19637
+ return request(OpenAPI, {
19638
+ method: 'GET',
19639
+ url: '/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/',
19640
+ path: {
19641
+ 'item_id': itemId,
19642
+ 'item_type': itemType,
19643
+ 'platform_key': platformKey
19644
+ }
19645
+ });
19646
+ }
19647
+ /**
19648
+ * Create or update paywall configuration
19649
+ * Enable or configure the paywall for an item. Creates a Stripe product on first enable.
19650
+ * @returns ItemPaywallConfig
19651
+ * @throws ApiError
19652
+ */
19653
+ static platformsItemsPaywallCreate({
19654
+ itemId,
19655
+ itemType,
19656
+ platformKey,
19657
+ requestBody
19658
+ }) {
19659
+ return request(OpenAPI, {
19660
+ method: 'POST',
19661
+ url: '/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/',
19662
+ path: {
19663
+ 'item_id': itemId,
19664
+ 'item_type': itemType,
19665
+ 'platform_key': platformKey
19666
+ },
19667
+ body: requestBody,
19668
+ mediaType: 'application/json'
19669
+ });
19670
+ }
19671
+ /**
19672
+ * Update paywall configuration
19673
+ * Same as POST. Update the paywall configuration for an item.
19674
+ * @returns ItemPaywallConfig
19675
+ * @throws ApiError
19676
+ */
19677
+ static platformsItemsPaywallUpdate({
19678
+ itemId,
19679
+ itemType,
19680
+ platformKey,
19681
+ requestBody
19682
+ }) {
19683
+ return request(OpenAPI, {
19684
+ method: 'PUT',
19685
+ url: '/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/',
19686
+ path: {
19687
+ 'item_id': itemId,
19688
+ 'item_type': itemType,
19689
+ 'platform_key': platformKey
19690
+ },
19691
+ body: requestBody,
19692
+ mediaType: 'application/json'
19693
+ });
19694
+ }
19695
+ /**
19696
+ * Disable paywall configuration
19697
+ * Disable the paywall for an item. Does not delete the configuration.
19698
+ * @returns void
19699
+ * @throws ApiError
19700
+ */
19701
+ static platformsItemsPaywallDestroy({
19702
+ itemId,
19703
+ itemType,
19704
+ platformKey
19705
+ }) {
19706
+ return request(OpenAPI, {
19707
+ method: 'DELETE',
19708
+ url: '/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/',
19709
+ path: {
19710
+ 'item_id': itemId,
19711
+ 'item_type': itemType,
19712
+ 'platform_key': platformKey
19713
+ }
19714
+ });
19715
+ }
19716
+ /**
19717
+ * List prices
19718
+ * List active prices for an item's paywall configuration.
19719
+ * @returns ItemPrice
19720
+ * @throws ApiError
19721
+ */
19722
+ static platformsItemsPaywallPricesList({
19723
+ itemId,
19724
+ itemType,
19725
+ platformKey
19726
+ }) {
19727
+ return request(OpenAPI, {
19728
+ method: 'GET',
19729
+ url: '/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/prices/',
19730
+ path: {
19731
+ 'item_id': itemId,
19732
+ 'item_type': itemType,
19733
+ 'platform_key': platformKey
19734
+ }
19735
+ });
19736
+ }
19737
+ /**
19738
+ * Create a price
19739
+ * Create a new price tier for an item. Requires paywall to be enabled and Stripe Connect account ready.
19740
+ * @returns ItemPrice
19741
+ * @throws ApiError
19742
+ */
19743
+ static platformsItemsPaywallPricesCreate({
19744
+ itemId,
19745
+ itemType,
19746
+ platformKey,
19747
+ requestBody
19748
+ }) {
19749
+ return request(OpenAPI, {
19750
+ method: 'POST',
19751
+ url: '/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/prices/',
19752
+ path: {
19753
+ 'item_id': itemId,
19754
+ 'item_type': itemType,
19755
+ 'platform_key': platformKey
19756
+ },
19757
+ body: requestBody,
19758
+ mediaType: 'application/json'
19759
+ });
19760
+ }
19761
+ /**
19762
+ * Get price details
19763
+ * Retrieve a specific price by ID.
19764
+ * @returns ItemPrice
19765
+ * @throws ApiError
19766
+ */
19767
+ static platformsItemsPaywallPricesRetrieve({
19768
+ itemId,
19769
+ itemType,
19770
+ platformKey,
19771
+ priceId
19772
+ }) {
19773
+ return request(OpenAPI, {
19774
+ method: 'GET',
19775
+ url: '/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/prices/{price_id}/',
19776
+ path: {
19777
+ 'item_id': itemId,
19778
+ 'item_type': itemType,
19779
+ 'platform_key': platformKey,
19780
+ 'price_id': priceId
19781
+ }
19782
+ });
19783
+ }
19784
+ /**
19785
+ * Update a price
19786
+ * Update a price tier. If pricing fields change and a Stripe price exists, a new Stripe price is created and the old one deactivated.
19787
+ * @returns ItemPrice
19788
+ * @throws ApiError
19789
+ */
19790
+ static platformsItemsPaywallPricesUpdate({
19791
+ itemId,
19792
+ itemType,
19793
+ platformKey,
19794
+ priceId,
19795
+ requestBody
19796
+ }) {
19797
+ return request(OpenAPI, {
19798
+ method: 'PUT',
19799
+ url: '/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/prices/{price_id}/',
19800
+ path: {
19801
+ 'item_id': itemId,
19802
+ 'item_type': itemType,
19803
+ 'platform_key': platformKey,
19804
+ 'price_id': priceId
19805
+ },
19806
+ body: requestBody,
19807
+ mediaType: 'application/json'
19808
+ });
19809
+ }
19810
+ /**
19811
+ * Delete a price
19812
+ * Soft-delete a price tier and deactivate the corresponding Stripe price.
19813
+ * @returns void
19814
+ * @throws ApiError
19815
+ */
19816
+ static platformsItemsPaywallPricesDestroy({
19817
+ itemId,
19818
+ itemType,
19819
+ platformKey,
19820
+ priceId
19821
+ }) {
19822
+ return request(OpenAPI, {
19823
+ method: 'DELETE',
19824
+ url: '/platforms/{platform_key}/items/{item_type}/{item_id}/paywall/prices/{price_id}/',
19825
+ path: {
19826
+ 'item_id': itemId,
19827
+ 'item_type': itemType,
19828
+ 'platform_key': platformKey,
19829
+ 'price_id': priceId
19830
+ }
19831
+ });
19832
+ }
19833
+ /**
19834
+ * Get public pricing
19835
+ * Retrieve public pricing information for an item. No authentication required.
19836
+ * @returns PublicItemPricing
19837
+ * @throws ApiError
19838
+ */
19839
+ static platformsItemsPricingRetrieve({
19840
+ itemId,
19841
+ itemType,
19842
+ platformKey
19843
+ }) {
19844
+ return request(OpenAPI, {
19845
+ method: 'GET',
19846
+ url: '/platforms/{platform_key}/items/{item_type}/{item_id}/pricing/',
19847
+ path: {
19848
+ 'item_id': itemId,
19849
+ 'item_type': itemType,
19850
+ 'platform_key': platformKey
19851
+ }
19852
+ });
19853
+ }
19854
+ /**
19855
+ * List item subscribers
19856
+ * List all subscribers for an item. Optionally filter by subscription status.
19857
+ * @returns PaginatedItemSubscriptionList
19858
+ * @throws ApiError
19859
+ */
19860
+ static platformsItemsSubscribersList({
19861
+ itemId,
19862
+ itemType,
19863
+ platformKey,
19864
+ page,
19865
+ pageSize,
19866
+ status
19867
+ }) {
19868
+ return request(OpenAPI, {
19869
+ method: 'GET',
19870
+ url: '/platforms/{platform_key}/items/{item_type}/{item_id}/subscribers/',
19871
+ path: {
19872
+ 'item_id': itemId,
19873
+ 'item_type': itemType,
19874
+ 'platform_key': platformKey
19875
+ },
19876
+ query: {
19877
+ 'page': page,
19878
+ 'page_size': pageSize,
19879
+ 'status': status
19880
+ }
19881
+ });
19882
+ }
19883
+ /**
19884
+ * Get user subscription
19885
+ * Retrieve the current user's subscription to an item.
19886
+ * @returns ItemSubscription
19887
+ * @throws ApiError
19888
+ */
19889
+ static platformsItemsSubscriptionRetrieve({
19890
+ itemId,
19891
+ itemType,
19892
+ platformKey
19893
+ }) {
19894
+ return request(OpenAPI, {
19895
+ method: 'GET',
19896
+ url: '/platforms/{platform_key}/items/{item_type}/{item_id}/subscription/',
19897
+ path: {
19898
+ 'item_id': itemId,
19899
+ 'item_type': itemType,
19900
+ 'platform_key': platformKey
19901
+ }
19902
+ });
19903
+ }
19904
+ /**
19905
+ * Cancel subscription
19906
+ * Cancel the current user's subscription. Returns a Stripe customer portal URL for recurring subscriptions, or cancels directly for one-time purchases.
19907
+ * @returns PortalUrlResponse
19908
+ * @throws ApiError
19909
+ */
19910
+ static platformsItemsSubscriptionCancelCreate({
19911
+ itemId,
19912
+ itemType,
19913
+ platformKey
19914
+ }) {
19915
+ return request(OpenAPI, {
19916
+ method: 'POST',
19917
+ url: '/platforms/{platform_key}/items/{item_type}/{item_id}/subscription/cancel/',
19918
+ path: {
19919
+ 'item_id': itemId,
19920
+ 'item_type': itemType,
19921
+ 'platform_key': platformKey
19922
+ }
19923
+ });
19924
+ }
19925
+ /**
19926
+ * List user subscriptions
19927
+ * Paginated list of the current user's subscriptions on a platform. Optionally filter by status or item_type.
19928
+ * @returns PaginatedItemSubscriptionListList
19929
+ * @throws ApiError
19930
+ */
19931
+ static platformsMySubscriptionsList({
19932
+ platformKey,
19933
+ itemType,
19934
+ page,
19935
+ pageSize,
19936
+ status
19937
+ }) {
19938
+ return request(OpenAPI, {
19939
+ method: 'GET',
19940
+ url: '/platforms/{platform_key}/my-subscriptions/',
19941
+ path: {
19942
+ 'platform_key': platformKey
19943
+ },
19944
+ query: {
19945
+ 'item_type': itemType,
19946
+ 'page': page,
19947
+ 'page_size': pageSize,
19948
+ 'status': status
19949
+ }
19950
+ });
19951
+ }
19952
+ }
19953
+
18977
19954
  class RecommendationsService {
18978
19955
  /**
18979
19956
  * API endpoint that returns a search api url prepopulated with context data
@@ -20680,6 +21657,7 @@
20680
21657
  exports.MediaService = MediaService;
20681
21658
  exports.NotificationsService = NotificationsService;
20682
21659
  exports.OpenAPI = OpenAPI;
21660
+ exports.PlatformsService = PlatformsService;
20683
21661
  exports.RecommendationsService = RecommendationsService;
20684
21662
  exports.ReportsService = ReportsService;
20685
21663
  exports.ScimService = ScimService;