orb-billing 6.0.2 → 6.2.0

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 (260) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/client.d.mts +5 -10
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +5 -10
  5. package/client.d.ts.map +1 -1
  6. package/client.js +140 -149
  7. package/client.js.map +1 -1
  8. package/client.mjs +138 -146
  9. package/client.mjs.map +1 -1
  10. package/core/api-promise.d.mts +2 -2
  11. package/core/api-promise.d.mts.map +1 -1
  12. package/core/api-promise.d.ts +2 -2
  13. package/core/api-promise.d.ts.map +1 -1
  14. package/core/api-promise.js.map +1 -1
  15. package/core/api-promise.mjs.map +1 -1
  16. package/core/pagination.d.mts +4 -4
  17. package/core/pagination.d.mts.map +1 -1
  18. package/core/pagination.d.ts +4 -4
  19. package/core/pagination.d.ts.map +1 -1
  20. package/core/pagination.js.map +1 -1
  21. package/core/pagination.mjs.map +1 -1
  22. package/core/resource.d.mts +3 -3
  23. package/core/resource.d.mts.map +1 -1
  24. package/core/resource.d.ts +3 -3
  25. package/core/resource.d.ts.map +1 -1
  26. package/core/resource.js.map +1 -1
  27. package/core/resource.mjs.map +1 -1
  28. package/index.d.mts +1 -1
  29. package/index.d.mts.map +1 -1
  30. package/index.d.ts +1 -1
  31. package/index.d.ts.map +1 -1
  32. package/index.js +1 -2
  33. package/index.js.map +1 -1
  34. package/index.mjs +1 -1
  35. package/index.mjs.map +1 -1
  36. package/internal/parse.d.mts +2 -2
  37. package/internal/parse.d.mts.map +1 -1
  38. package/internal/parse.d.ts +2 -2
  39. package/internal/parse.d.ts.map +1 -1
  40. package/internal/parse.js.map +1 -1
  41. package/internal/parse.mjs.map +1 -1
  42. package/internal/uploads.d.mts +4 -4
  43. package/internal/uploads.d.mts.map +1 -1
  44. package/internal/uploads.d.ts +4 -4
  45. package/internal/uploads.d.ts.map +1 -1
  46. package/internal/uploads.js.map +1 -1
  47. package/internal/uploads.mjs.map +1 -1
  48. package/internal/utils/log.d.mts +3 -3
  49. package/internal/utils/log.d.mts.map +1 -1
  50. package/internal/utils/log.d.ts +3 -3
  51. package/internal/utils/log.d.ts.map +1 -1
  52. package/internal/utils/log.js.map +1 -1
  53. package/internal/utils/log.mjs.map +1 -1
  54. package/package.json +4 -4
  55. package/resources/alerts.d.mts +18 -7
  56. package/resources/alerts.d.mts.map +1 -1
  57. package/resources/alerts.d.ts +18 -7
  58. package/resources/alerts.d.ts.map +1 -1
  59. package/resources/alerts.js +31 -14
  60. package/resources/alerts.js.map +1 -1
  61. package/resources/alerts.mjs +31 -14
  62. package/resources/alerts.mjs.map +1 -1
  63. package/resources/beta/beta.d.mts +2 -2
  64. package/resources/beta/beta.d.ts +2 -2
  65. package/resources/beta/beta.js +6 -6
  66. package/resources/beta/beta.js.map +1 -1
  67. package/resources/beta/beta.mjs +6 -6
  68. package/resources/beta/beta.mjs.map +1 -1
  69. package/resources/beta/external-plan-id.d.mts +2 -2
  70. package/resources/beta/external-plan-id.d.ts +2 -2
  71. package/resources/beta/external-plan-id.js +6 -6
  72. package/resources/beta/external-plan-id.js.map +1 -1
  73. package/resources/beta/external-plan-id.mjs +6 -6
  74. package/resources/beta/external-plan-id.mjs.map +1 -1
  75. package/resources/coupons/coupons.d.mts +2 -2
  76. package/resources/coupons/coupons.d.ts +2 -2
  77. package/resources/coupons/coupons.js +4 -4
  78. package/resources/coupons/coupons.mjs +4 -4
  79. package/resources/coupons/subscriptions.d.mts +1 -1
  80. package/resources/coupons/subscriptions.d.ts +1 -1
  81. package/resources/coupons/subscriptions.js +2 -2
  82. package/resources/coupons/subscriptions.mjs +2 -2
  83. package/resources/credit-blocks.d.mts +3 -3
  84. package/resources/credit-blocks.d.ts +3 -3
  85. package/resources/credit-blocks.js +6 -6
  86. package/resources/credit-blocks.mjs +6 -6
  87. package/resources/credit-notes.d.mts +1 -1
  88. package/resources/credit-notes.d.ts +1 -1
  89. package/resources/credit-notes.js +2 -2
  90. package/resources/credit-notes.mjs +2 -2
  91. package/resources/customers/balance-transactions.d.mts +2 -2
  92. package/resources/customers/balance-transactions.d.ts +2 -2
  93. package/resources/customers/balance-transactions.js +4 -4
  94. package/resources/customers/balance-transactions.mjs +4 -4
  95. package/resources/customers/costs.d.mts +2 -2
  96. package/resources/customers/costs.d.ts +2 -2
  97. package/resources/customers/costs.js +4 -4
  98. package/resources/customers/costs.mjs +4 -4
  99. package/resources/customers/credits/credits.d.mts +2 -2
  100. package/resources/customers/credits/credits.d.ts +2 -2
  101. package/resources/customers/credits/credits.js +4 -4
  102. package/resources/customers/credits/credits.mjs +4 -4
  103. package/resources/customers/credits/ledger.d.mts +4 -4
  104. package/resources/customers/credits/ledger.d.ts +4 -4
  105. package/resources/customers/credits/ledger.js +8 -8
  106. package/resources/customers/credits/ledger.mjs +8 -8
  107. package/resources/customers/credits/top-ups.d.mts +6 -6
  108. package/resources/customers/credits/top-ups.d.ts +6 -6
  109. package/resources/customers/credits/top-ups.js +14 -14
  110. package/resources/customers/credits/top-ups.js.map +1 -1
  111. package/resources/customers/credits/top-ups.mjs +14 -14
  112. package/resources/customers/credits/top-ups.mjs.map +1 -1
  113. package/resources/customers/customers.d.mts +65 -7
  114. package/resources/customers/customers.d.mts.map +1 -1
  115. package/resources/customers/customers.d.ts +65 -7
  116. package/resources/customers/customers.d.ts.map +1 -1
  117. package/resources/customers/customers.js +35 -12
  118. package/resources/customers/customers.js.map +1 -1
  119. package/resources/customers/customers.mjs +35 -12
  120. package/resources/customers/customers.mjs.map +1 -1
  121. package/resources/customers/index.d.mts +1 -1
  122. package/resources/customers/index.d.mts.map +1 -1
  123. package/resources/customers/index.d.ts +1 -1
  124. package/resources/customers/index.d.ts.map +1 -1
  125. package/resources/customers/index.js.map +1 -1
  126. package/resources/customers/index.mjs.map +1 -1
  127. package/resources/dimensional-price-groups/dimensional-price-groups.d.mts +2 -2
  128. package/resources/dimensional-price-groups/dimensional-price-groups.d.ts +2 -2
  129. package/resources/dimensional-price-groups/dimensional-price-groups.js +4 -4
  130. package/resources/dimensional-price-groups/dimensional-price-groups.mjs +4 -4
  131. package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.mts +2 -2
  132. package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts +2 -2
  133. package/resources/dimensional-price-groups/external-dimensional-price-group-id.js +4 -4
  134. package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs +4 -4
  135. package/resources/events/backfills.d.mts +3 -3
  136. package/resources/events/backfills.d.ts +3 -3
  137. package/resources/events/backfills.js +6 -6
  138. package/resources/events/backfills.mjs +6 -6
  139. package/resources/events/events.d.mts +2 -18
  140. package/resources/events/events.d.mts.map +1 -1
  141. package/resources/events/events.d.ts +2 -18
  142. package/resources/events/events.d.ts.map +1 -1
  143. package/resources/events/events.js +6 -6
  144. package/resources/events/events.js.map +1 -1
  145. package/resources/events/events.mjs +6 -6
  146. package/resources/events/events.mjs.map +1 -1
  147. package/resources/index.d.mts +1 -1
  148. package/resources/index.d.mts.map +1 -1
  149. package/resources/index.d.ts +1 -1
  150. package/resources/index.d.ts.map +1 -1
  151. package/resources/index.js.map +1 -1
  152. package/resources/index.mjs.map +1 -1
  153. package/resources/invoices.d.mts +81 -14
  154. package/resources/invoices.d.mts.map +1 -1
  155. package/resources/invoices.d.ts +81 -14
  156. package/resources/invoices.d.ts.map +1 -1
  157. package/resources/invoices.js +87 -17
  158. package/resources/invoices.js.map +1 -1
  159. package/resources/invoices.mjs +87 -17
  160. package/resources/invoices.mjs.map +1 -1
  161. package/resources/items.d.mts +3 -3
  162. package/resources/items.d.ts +3 -3
  163. package/resources/items.js +6 -6
  164. package/resources/items.mjs +6 -6
  165. package/resources/license-types.d.mts +1 -1
  166. package/resources/license-types.d.ts +1 -1
  167. package/resources/license-types.js +2 -2
  168. package/resources/license-types.mjs +2 -2
  169. package/resources/licenses/external-licenses.d.mts +1 -1
  170. package/resources/licenses/external-licenses.d.ts +1 -1
  171. package/resources/licenses/external-licenses.js +2 -2
  172. package/resources/licenses/external-licenses.mjs +2 -2
  173. package/resources/licenses/licenses.d.mts +3 -3
  174. package/resources/licenses/licenses.d.ts +3 -3
  175. package/resources/licenses/licenses.js +6 -6
  176. package/resources/licenses/licenses.mjs +6 -6
  177. package/resources/licenses/usage.d.mts +1 -1
  178. package/resources/licenses/usage.d.ts +1 -1
  179. package/resources/licenses/usage.js +2 -2
  180. package/resources/licenses/usage.mjs +2 -2
  181. package/resources/metrics.d.mts +2 -2
  182. package/resources/metrics.d.ts +2 -2
  183. package/resources/metrics.js +4 -4
  184. package/resources/metrics.mjs +4 -4
  185. package/resources/plans/external-plan-id.d.mts +2 -2
  186. package/resources/plans/external-plan-id.d.ts +2 -2
  187. package/resources/plans/external-plan-id.js +4 -4
  188. package/resources/plans/external-plan-id.mjs +4 -4
  189. package/resources/plans/migrations.d.mts +3 -3
  190. package/resources/plans/migrations.d.ts +3 -3
  191. package/resources/plans/migrations.js +8 -8
  192. package/resources/plans/migrations.js.map +1 -1
  193. package/resources/plans/migrations.mjs +8 -8
  194. package/resources/plans/migrations.mjs.map +1 -1
  195. package/resources/plans/plans.d.mts +2 -2
  196. package/resources/plans/plans.d.ts +2 -2
  197. package/resources/plans/plans.js +4 -4
  198. package/resources/plans/plans.mjs +4 -4
  199. package/resources/prices/external-price-id.d.mts +2 -2
  200. package/resources/prices/external-price-id.d.ts +2 -2
  201. package/resources/prices/external-price-id.js +4 -4
  202. package/resources/prices/external-price-id.mjs +4 -4
  203. package/resources/prices/prices.d.mts +3 -3
  204. package/resources/prices/prices.d.ts +3 -3
  205. package/resources/prices/prices.js +6 -6
  206. package/resources/prices/prices.mjs +6 -6
  207. package/resources/subscription-changes.d.mts +3 -3
  208. package/resources/subscription-changes.d.ts +3 -3
  209. package/resources/subscription-changes.js +6 -6
  210. package/resources/subscription-changes.mjs +6 -6
  211. package/resources/subscriptions.d.mts +15 -15
  212. package/resources/subscriptions.d.ts +15 -15
  213. package/resources/subscriptions.js +30 -30
  214. package/resources/subscriptions.mjs +30 -30
  215. package/src/client.ts +11 -8
  216. package/src/core/api-promise.ts +4 -7
  217. package/src/core/pagination.ts +5 -5
  218. package/src/core/resource.ts +3 -3
  219. package/src/index.ts +1 -1
  220. package/src/internal/parse.ts +2 -2
  221. package/src/internal/uploads.ts +5 -5
  222. package/src/internal/utils/log.ts +3 -3
  223. package/src/resources/alerts.ts +32 -14
  224. package/src/resources/beta/beta.ts +6 -6
  225. package/src/resources/beta/external-plan-id.ts +6 -6
  226. package/src/resources/coupons/coupons.ts +4 -4
  227. package/src/resources/coupons/subscriptions.ts +2 -2
  228. package/src/resources/credit-blocks.ts +6 -6
  229. package/src/resources/credit-notes.ts +2 -2
  230. package/src/resources/customers/balance-transactions.ts +4 -4
  231. package/src/resources/customers/costs.ts +4 -4
  232. package/src/resources/customers/credits/credits.ts +4 -4
  233. package/src/resources/customers/credits/ledger.ts +8 -8
  234. package/src/resources/customers/credits/top-ups.ts +14 -14
  235. package/src/resources/customers/customers.ts +105 -12
  236. package/src/resources/customers/index.ts +4 -0
  237. package/src/resources/dimensional-price-groups/dimensional-price-groups.ts +4 -4
  238. package/src/resources/dimensional-price-groups/external-dimensional-price-group-id.ts +4 -4
  239. package/src/resources/events/backfills.ts +6 -6
  240. package/src/resources/events/events.ts +6 -26
  241. package/src/resources/index.ts +4 -0
  242. package/src/resources/invoices.ts +96 -23
  243. package/src/resources/items.ts +6 -6
  244. package/src/resources/license-types.ts +2 -2
  245. package/src/resources/licenses/external-licenses.ts +2 -2
  246. package/src/resources/licenses/licenses.ts +6 -6
  247. package/src/resources/licenses/usage.ts +2 -2
  248. package/src/resources/metrics.ts +4 -4
  249. package/src/resources/plans/external-plan-id.ts +4 -4
  250. package/src/resources/plans/migrations.ts +8 -8
  251. package/src/resources/plans/plans.ts +4 -4
  252. package/src/resources/prices/external-price-id.ts +4 -4
  253. package/src/resources/prices/prices.ts +6 -6
  254. package/src/resources/subscription-changes.ts +6 -6
  255. package/src/resources/subscriptions.ts +30 -30
  256. package/src/version.ts +1 -1
  257. package/version.d.mts +1 -1
  258. package/version.d.ts +1 -1
  259. package/version.js +1 -1
  260. package/version.mjs +1 -1
@@ -289,7 +289,7 @@ export declare class Subscriptions extends APIResource {
289
289
  * );
290
290
  * ```
291
291
  */
292
- update(subscriptionId: string, body: SubscriptionUpdateParams, options?: RequestOptions): APIPromise<Subscription>;
292
+ update(subscriptionID: string, body: SubscriptionUpdateParams, options?: RequestOptions): APIPromise<Subscription>;
293
293
  /**
294
294
  * This endpoint returns a list of all subscriptions for an account as a
295
295
  * [paginated](/api-reference/pagination) list, ordered starting from the most
@@ -386,7 +386,7 @@ export declare class Subscriptions extends APIResource {
386
386
  * });
387
387
  * ```
388
388
  */
389
- cancel(subscriptionId: string, body: SubscriptionCancelParams, options?: RequestOptions): APIPromise<SubscriptionChangesAPI.MutatedSubscription>;
389
+ cancel(subscriptionID: string, body: SubscriptionCancelParams, options?: RequestOptions): APIPromise<SubscriptionChangesAPI.MutatedSubscription>;
390
390
  /**
391
391
  * This endpoint is used to fetch a [Subscription](/core-concepts##subscription)
392
392
  * given an identifier.
@@ -398,7 +398,7 @@ export declare class Subscriptions extends APIResource {
398
398
  * );
399
399
  * ```
400
400
  */
401
- fetch(subscriptionId: string, options?: RequestOptions): APIPromise<Subscription>;
401
+ fetch(subscriptionID: string, options?: RequestOptions): APIPromise<Subscription>;
402
402
  /**
403
403
  * This endpoint is used to fetch a day-by-day snapshot of a subscription's costs
404
404
  * in Orb, calculated by applying pricing information to the underlying usage (see
@@ -418,7 +418,7 @@ export declare class Subscriptions extends APIResource {
418
418
  * );
419
419
  * ```
420
420
  */
421
- fetchCosts(subscriptionId: string, query?: SubscriptionFetchCostsParams | null | undefined, options?: RequestOptions): APIPromise<SubscriptionFetchCostsResponse>;
421
+ fetchCosts(subscriptionID: string, query?: SubscriptionFetchCostsParams | null | undefined, options?: RequestOptions): APIPromise<SubscriptionFetchCostsResponse>;
422
422
  /**
423
423
  * This endpoint returns a [paginated](/api-reference/pagination) list of all plans
424
424
  * associated with a subscription along with their start and end dates. This list
@@ -435,7 +435,7 @@ export declare class Subscriptions extends APIResource {
435
435
  * }
436
436
  * ```
437
437
  */
438
- fetchSchedule(subscriptionId: string, query?: SubscriptionFetchScheduleParams | null | undefined, options?: RequestOptions): PagePromise<SubscriptionFetchScheduleResponsesPage, SubscriptionFetchScheduleResponse>;
438
+ fetchSchedule(subscriptionID: string, query?: SubscriptionFetchScheduleParams | null | undefined, options?: RequestOptions): PagePromise<SubscriptionFetchScheduleResponsesPage, SubscriptionFetchScheduleResponse>;
439
439
  /**
440
440
  * This endpoint is used to fetch a subscription's usage in Orb. Especially when
441
441
  * combined with optional query parameters, this endpoint is a powerful way to
@@ -638,7 +638,7 @@ export declare class Subscriptions extends APIResource {
638
638
  * await client.subscriptions.fetchUsage('subscription_id');
639
639
  * ```
640
640
  */
641
- fetchUsage(subscriptionId: string, query?: SubscriptionFetchUsageParams | null | undefined, options?: RequestOptions): APIPromise<SubscriptionUsage>;
641
+ fetchUsage(subscriptionID: string, query?: SubscriptionFetchUsageParams | null | undefined, options?: RequestOptions): APIPromise<SubscriptionUsage>;
642
642
  /**
643
643
  * This endpoint is used to add and edit subscription
644
644
  * [price intervals](/api-reference/price-interval/add-or-edit-price-intervals). By
@@ -721,7 +721,7 @@ export declare class Subscriptions extends APIResource {
721
721
  * );
722
722
  * ```
723
723
  */
724
- priceIntervals(subscriptionId: string, body: SubscriptionPriceIntervalsParams, options?: RequestOptions): APIPromise<SubscriptionChangesAPI.MutatedSubscription>;
724
+ priceIntervals(subscriptionID: string, body: SubscriptionPriceIntervalsParams, options?: RequestOptions): APIPromise<SubscriptionChangesAPI.MutatedSubscription>;
725
725
  /**
726
726
  * Redeem a coupon effective at a given time.
727
727
  *
@@ -734,7 +734,7 @@ export declare class Subscriptions extends APIResource {
734
734
  * );
735
735
  * ```
736
736
  */
737
- redeemCoupon(subscriptionId: string, body: SubscriptionRedeemCouponParams, options?: RequestOptions): APIPromise<SubscriptionChangesAPI.MutatedSubscription>;
737
+ redeemCoupon(subscriptionID: string, body: SubscriptionRedeemCouponParams, options?: RequestOptions): APIPromise<SubscriptionChangesAPI.MutatedSubscription>;
738
738
  /**
739
739
  * This endpoint can be used to change an existing subscription's plan. It returns
740
740
  * the serialized updated subscription object.
@@ -929,7 +929,7 @@ export declare class Subscriptions extends APIResource {
929
929
  * );
930
930
  * ```
931
931
  */
932
- schedulePlanChange(subscriptionId: string, body: SubscriptionSchedulePlanChangeParams, options?: RequestOptions): APIPromise<SubscriptionChangesAPI.MutatedSubscription>;
932
+ schedulePlanChange(subscriptionID: string, body: SubscriptionSchedulePlanChangeParams, options?: RequestOptions): APIPromise<SubscriptionChangesAPI.MutatedSubscription>;
933
933
  /**
934
934
  * Manually trigger a phase, effective the given date (or the current time, if not
935
935
  * specified).
@@ -942,7 +942,7 @@ export declare class Subscriptions extends APIResource {
942
942
  * );
943
943
  * ```
944
944
  */
945
- triggerPhase(subscriptionId: string, body: SubscriptionTriggerPhaseParams, options?: RequestOptions): APIPromise<SubscriptionChangesAPI.MutatedSubscription>;
945
+ triggerPhase(subscriptionID: string, body: SubscriptionTriggerPhaseParams, options?: RequestOptions): APIPromise<SubscriptionChangesAPI.MutatedSubscription>;
946
946
  /**
947
947
  * This endpoint can be used to unschedule any pending cancellations for a
948
948
  * subscription.
@@ -965,7 +965,7 @@ export declare class Subscriptions extends APIResource {
965
965
  * );
966
966
  * ```
967
967
  */
968
- unscheduleCancellation(subscriptionId: string, options?: RequestOptions): APIPromise<SubscriptionChangesAPI.MutatedSubscription>;
968
+ unscheduleCancellation(subscriptionID: string, options?: RequestOptions): APIPromise<SubscriptionChangesAPI.MutatedSubscription>;
969
969
  /**
970
970
  * This endpoint can be used to clear scheduled updates to the quantity for a fixed
971
971
  * fee.
@@ -982,7 +982,7 @@ export declare class Subscriptions extends APIResource {
982
982
  * );
983
983
  * ```
984
984
  */
985
- unscheduleFixedFeeQuantityUpdates(subscriptionId: string, body: SubscriptionUnscheduleFixedFeeQuantityUpdatesParams, options?: RequestOptions): APIPromise<SubscriptionChangesAPI.MutatedSubscription>;
985
+ unscheduleFixedFeeQuantityUpdates(subscriptionID: string, body: SubscriptionUnscheduleFixedFeeQuantityUpdatesParams, options?: RequestOptions): APIPromise<SubscriptionChangesAPI.MutatedSubscription>;
986
986
  /**
987
987
  * This endpoint can be used to unschedule any pending plan changes on an existing
988
988
  * subscription. When called, all upcoming plan changes will be unscheduled.
@@ -995,7 +995,7 @@ export declare class Subscriptions extends APIResource {
995
995
  * );
996
996
  * ```
997
997
  */
998
- unschedulePendingPlanChanges(subscriptionId: string, options?: RequestOptions): APIPromise<SubscriptionChangesAPI.MutatedSubscription>;
998
+ unschedulePendingPlanChanges(subscriptionID: string, options?: RequestOptions): APIPromise<SubscriptionChangesAPI.MutatedSubscription>;
999
999
  /**
1000
1000
  * This endpoint can be used to update the quantity for a fixed fee.
1001
1001
  *
@@ -1021,7 +1021,7 @@ export declare class Subscriptions extends APIResource {
1021
1021
  * );
1022
1022
  * ```
1023
1023
  */
1024
- updateFixedFeeQuantity(subscriptionId: string, body: SubscriptionUpdateFixedFeeQuantityParams, options?: RequestOptions): APIPromise<SubscriptionChangesAPI.MutatedSubscription>;
1024
+ updateFixedFeeQuantity(subscriptionID: string, body: SubscriptionUpdateFixedFeeQuantityParams, options?: RequestOptions): APIPromise<SubscriptionChangesAPI.MutatedSubscription>;
1025
1025
  /**
1026
1026
  * This endpoint is used to update the trial end date for a subscription. The new
1027
1027
  * trial end date must be within the time range of the current plan (i.e. the new
@@ -1051,7 +1051,7 @@ export declare class Subscriptions extends APIResource {
1051
1051
  * );
1052
1052
  * ```
1053
1053
  */
1054
- updateTrial(subscriptionId: string, body: SubscriptionUpdateTrialParams, options?: RequestOptions): APIPromise<SubscriptionChangesAPI.MutatedSubscription>;
1054
+ updateTrial(subscriptionID: string, body: SubscriptionUpdateTrialParams, options?: RequestOptions): APIPromise<SubscriptionChangesAPI.MutatedSubscription>;
1055
1055
  }
1056
1056
  export type SubscriptionsPage = Page<Subscription>;
1057
1057
  export type SubscriptionFetchScheduleResponsesPage = Page<SubscriptionFetchScheduleResponse>;
@@ -289,8 +289,8 @@ class Subscriptions extends resource_1.APIResource {
289
289
  * );
290
290
  * ```
291
291
  */
292
- update(subscriptionId, body, options) {
293
- return this._client.put((0, path_1.path) `/subscriptions/${subscriptionId}`, { body, ...options });
292
+ update(subscriptionID, body, options) {
293
+ return this._client.put((0, path_1.path) `/subscriptions/${subscriptionID}`, { body, ...options });
294
294
  }
295
295
  /**
296
296
  * This endpoint returns a list of all subscriptions for an account as a
@@ -390,8 +390,8 @@ class Subscriptions extends resource_1.APIResource {
390
390
  * });
391
391
  * ```
392
392
  */
393
- cancel(subscriptionId, body, options) {
394
- return this._client.post((0, path_1.path) `/subscriptions/${subscriptionId}/cancel`, { body, ...options });
393
+ cancel(subscriptionID, body, options) {
394
+ return this._client.post((0, path_1.path) `/subscriptions/${subscriptionID}/cancel`, { body, ...options });
395
395
  }
396
396
  /**
397
397
  * This endpoint is used to fetch a [Subscription](/core-concepts##subscription)
@@ -404,8 +404,8 @@ class Subscriptions extends resource_1.APIResource {
404
404
  * );
405
405
  * ```
406
406
  */
407
- fetch(subscriptionId, options) {
408
- return this._client.get((0, path_1.path) `/subscriptions/${subscriptionId}`, options);
407
+ fetch(subscriptionID, options) {
408
+ return this._client.get((0, path_1.path) `/subscriptions/${subscriptionID}`, options);
409
409
  }
410
410
  /**
411
411
  * This endpoint is used to fetch a day-by-day snapshot of a subscription's costs
@@ -426,8 +426,8 @@ class Subscriptions extends resource_1.APIResource {
426
426
  * );
427
427
  * ```
428
428
  */
429
- fetchCosts(subscriptionId, query = {}, options) {
430
- return this._client.get((0, path_1.path) `/subscriptions/${subscriptionId}/costs`, { query, ...options });
429
+ fetchCosts(subscriptionID, query = {}, options) {
430
+ return this._client.get((0, path_1.path) `/subscriptions/${subscriptionID}/costs`, { query, ...options });
431
431
  }
432
432
  /**
433
433
  * This endpoint returns a [paginated](/api-reference/pagination) list of all plans
@@ -445,8 +445,8 @@ class Subscriptions extends resource_1.APIResource {
445
445
  * }
446
446
  * ```
447
447
  */
448
- fetchSchedule(subscriptionId, query = {}, options) {
449
- return this._client.getAPIList((0, path_1.path) `/subscriptions/${subscriptionId}/schedule`, (pagination_1.Page), { query, ...options });
448
+ fetchSchedule(subscriptionID, query = {}, options) {
449
+ return this._client.getAPIList((0, path_1.path) `/subscriptions/${subscriptionID}/schedule`, (pagination_1.Page), { query, ...options });
450
450
  }
451
451
  /**
452
452
  * This endpoint is used to fetch a subscription's usage in Orb. Especially when
@@ -650,8 +650,8 @@ class Subscriptions extends resource_1.APIResource {
650
650
  * await client.subscriptions.fetchUsage('subscription_id');
651
651
  * ```
652
652
  */
653
- fetchUsage(subscriptionId, query = {}, options) {
654
- return this._client.get((0, path_1.path) `/subscriptions/${subscriptionId}/usage`, { query, ...options });
653
+ fetchUsage(subscriptionID, query = {}, options) {
654
+ return this._client.get((0, path_1.path) `/subscriptions/${subscriptionID}/usage`, { query, ...options });
655
655
  }
656
656
  /**
657
657
  * This endpoint is used to add and edit subscription
@@ -735,8 +735,8 @@ class Subscriptions extends resource_1.APIResource {
735
735
  * );
736
736
  * ```
737
737
  */
738
- priceIntervals(subscriptionId, body, options) {
739
- return this._client.post((0, path_1.path) `/subscriptions/${subscriptionId}/price_intervals`, { body, ...options });
738
+ priceIntervals(subscriptionID, body, options) {
739
+ return this._client.post((0, path_1.path) `/subscriptions/${subscriptionID}/price_intervals`, { body, ...options });
740
740
  }
741
741
  /**
742
742
  * Redeem a coupon effective at a given time.
@@ -750,8 +750,8 @@ class Subscriptions extends resource_1.APIResource {
750
750
  * );
751
751
  * ```
752
752
  */
753
- redeemCoupon(subscriptionId, body, options) {
754
- return this._client.post((0, path_1.path) `/subscriptions/${subscriptionId}/redeem_coupon`, { body, ...options });
753
+ redeemCoupon(subscriptionID, body, options) {
754
+ return this._client.post((0, path_1.path) `/subscriptions/${subscriptionID}/redeem_coupon`, { body, ...options });
755
755
  }
756
756
  /**
757
757
  * This endpoint can be used to change an existing subscription's plan. It returns
@@ -947,8 +947,8 @@ class Subscriptions extends resource_1.APIResource {
947
947
  * );
948
948
  * ```
949
949
  */
950
- schedulePlanChange(subscriptionId, body, options) {
951
- return this._client.post((0, path_1.path) `/subscriptions/${subscriptionId}/schedule_plan_change`, {
950
+ schedulePlanChange(subscriptionID, body, options) {
951
+ return this._client.post((0, path_1.path) `/subscriptions/${subscriptionID}/schedule_plan_change`, {
952
952
  body,
953
953
  ...options,
954
954
  });
@@ -965,8 +965,8 @@ class Subscriptions extends resource_1.APIResource {
965
965
  * );
966
966
  * ```
967
967
  */
968
- triggerPhase(subscriptionId, body, options) {
969
- return this._client.post((0, path_1.path) `/subscriptions/${subscriptionId}/trigger_phase`, { body, ...options });
968
+ triggerPhase(subscriptionID, body, options) {
969
+ return this._client.post((0, path_1.path) `/subscriptions/${subscriptionID}/trigger_phase`, { body, ...options });
970
970
  }
971
971
  /**
972
972
  * This endpoint can be used to unschedule any pending cancellations for a
@@ -990,8 +990,8 @@ class Subscriptions extends resource_1.APIResource {
990
990
  * );
991
991
  * ```
992
992
  */
993
- unscheduleCancellation(subscriptionId, options) {
994
- return this._client.post((0, path_1.path) `/subscriptions/${subscriptionId}/unschedule_cancellation`, options);
993
+ unscheduleCancellation(subscriptionID, options) {
994
+ return this._client.post((0, path_1.path) `/subscriptions/${subscriptionID}/unschedule_cancellation`, options);
995
995
  }
996
996
  /**
997
997
  * This endpoint can be used to clear scheduled updates to the quantity for a fixed
@@ -1009,8 +1009,8 @@ class Subscriptions extends resource_1.APIResource {
1009
1009
  * );
1010
1010
  * ```
1011
1011
  */
1012
- unscheduleFixedFeeQuantityUpdates(subscriptionId, body, options) {
1013
- return this._client.post((0, path_1.path) `/subscriptions/${subscriptionId}/unschedule_fixed_fee_quantity_updates`, {
1012
+ unscheduleFixedFeeQuantityUpdates(subscriptionID, body, options) {
1013
+ return this._client.post((0, path_1.path) `/subscriptions/${subscriptionID}/unschedule_fixed_fee_quantity_updates`, {
1014
1014
  body,
1015
1015
  ...options,
1016
1016
  });
@@ -1027,8 +1027,8 @@ class Subscriptions extends resource_1.APIResource {
1027
1027
  * );
1028
1028
  * ```
1029
1029
  */
1030
- unschedulePendingPlanChanges(subscriptionId, options) {
1031
- return this._client.post((0, path_1.path) `/subscriptions/${subscriptionId}/unschedule_pending_plan_changes`, options);
1030
+ unschedulePendingPlanChanges(subscriptionID, options) {
1031
+ return this._client.post((0, path_1.path) `/subscriptions/${subscriptionID}/unschedule_pending_plan_changes`, options);
1032
1032
  }
1033
1033
  /**
1034
1034
  * This endpoint can be used to update the quantity for a fixed fee.
@@ -1055,8 +1055,8 @@ class Subscriptions extends resource_1.APIResource {
1055
1055
  * );
1056
1056
  * ```
1057
1057
  */
1058
- updateFixedFeeQuantity(subscriptionId, body, options) {
1059
- return this._client.post((0, path_1.path) `/subscriptions/${subscriptionId}/update_fixed_fee_quantity`, {
1058
+ updateFixedFeeQuantity(subscriptionID, body, options) {
1059
+ return this._client.post((0, path_1.path) `/subscriptions/${subscriptionID}/update_fixed_fee_quantity`, {
1060
1060
  body,
1061
1061
  ...options,
1062
1062
  });
@@ -1090,8 +1090,8 @@ class Subscriptions extends resource_1.APIResource {
1090
1090
  * );
1091
1091
  * ```
1092
1092
  */
1093
- updateTrial(subscriptionId, body, options) {
1094
- return this._client.post((0, path_1.path) `/subscriptions/${subscriptionId}/update_trial`, { body, ...options });
1093
+ updateTrial(subscriptionID, body, options) {
1094
+ return this._client.post((0, path_1.path) `/subscriptions/${subscriptionID}/update_trial`, { body, ...options });
1095
1095
  }
1096
1096
  }
1097
1097
  exports.Subscriptions = Subscriptions;
@@ -286,8 +286,8 @@ export class Subscriptions extends APIResource {
286
286
  * );
287
287
  * ```
288
288
  */
289
- update(subscriptionId, body, options) {
290
- return this._client.put(path `/subscriptions/${subscriptionId}`, { body, ...options });
289
+ update(subscriptionID, body, options) {
290
+ return this._client.put(path `/subscriptions/${subscriptionID}`, { body, ...options });
291
291
  }
292
292
  /**
293
293
  * This endpoint returns a list of all subscriptions for an account as a
@@ -387,8 +387,8 @@ export class Subscriptions extends APIResource {
387
387
  * });
388
388
  * ```
389
389
  */
390
- cancel(subscriptionId, body, options) {
391
- return this._client.post(path `/subscriptions/${subscriptionId}/cancel`, { body, ...options });
390
+ cancel(subscriptionID, body, options) {
391
+ return this._client.post(path `/subscriptions/${subscriptionID}/cancel`, { body, ...options });
392
392
  }
393
393
  /**
394
394
  * This endpoint is used to fetch a [Subscription](/core-concepts##subscription)
@@ -401,8 +401,8 @@ export class Subscriptions extends APIResource {
401
401
  * );
402
402
  * ```
403
403
  */
404
- fetch(subscriptionId, options) {
405
- return this._client.get(path `/subscriptions/${subscriptionId}`, options);
404
+ fetch(subscriptionID, options) {
405
+ return this._client.get(path `/subscriptions/${subscriptionID}`, options);
406
406
  }
407
407
  /**
408
408
  * This endpoint is used to fetch a day-by-day snapshot of a subscription's costs
@@ -423,8 +423,8 @@ export class Subscriptions extends APIResource {
423
423
  * );
424
424
  * ```
425
425
  */
426
- fetchCosts(subscriptionId, query = {}, options) {
427
- return this._client.get(path `/subscriptions/${subscriptionId}/costs`, { query, ...options });
426
+ fetchCosts(subscriptionID, query = {}, options) {
427
+ return this._client.get(path `/subscriptions/${subscriptionID}/costs`, { query, ...options });
428
428
  }
429
429
  /**
430
430
  * This endpoint returns a [paginated](/api-reference/pagination) list of all plans
@@ -442,8 +442,8 @@ export class Subscriptions extends APIResource {
442
442
  * }
443
443
  * ```
444
444
  */
445
- fetchSchedule(subscriptionId, query = {}, options) {
446
- return this._client.getAPIList(path `/subscriptions/${subscriptionId}/schedule`, (Page), { query, ...options });
445
+ fetchSchedule(subscriptionID, query = {}, options) {
446
+ return this._client.getAPIList(path `/subscriptions/${subscriptionID}/schedule`, (Page), { query, ...options });
447
447
  }
448
448
  /**
449
449
  * This endpoint is used to fetch a subscription's usage in Orb. Especially when
@@ -647,8 +647,8 @@ export class Subscriptions extends APIResource {
647
647
  * await client.subscriptions.fetchUsage('subscription_id');
648
648
  * ```
649
649
  */
650
- fetchUsage(subscriptionId, query = {}, options) {
651
- return this._client.get(path `/subscriptions/${subscriptionId}/usage`, { query, ...options });
650
+ fetchUsage(subscriptionID, query = {}, options) {
651
+ return this._client.get(path `/subscriptions/${subscriptionID}/usage`, { query, ...options });
652
652
  }
653
653
  /**
654
654
  * This endpoint is used to add and edit subscription
@@ -732,8 +732,8 @@ export class Subscriptions extends APIResource {
732
732
  * );
733
733
  * ```
734
734
  */
735
- priceIntervals(subscriptionId, body, options) {
736
- return this._client.post(path `/subscriptions/${subscriptionId}/price_intervals`, { body, ...options });
735
+ priceIntervals(subscriptionID, body, options) {
736
+ return this._client.post(path `/subscriptions/${subscriptionID}/price_intervals`, { body, ...options });
737
737
  }
738
738
  /**
739
739
  * Redeem a coupon effective at a given time.
@@ -747,8 +747,8 @@ export class Subscriptions extends APIResource {
747
747
  * );
748
748
  * ```
749
749
  */
750
- redeemCoupon(subscriptionId, body, options) {
751
- return this._client.post(path `/subscriptions/${subscriptionId}/redeem_coupon`, { body, ...options });
750
+ redeemCoupon(subscriptionID, body, options) {
751
+ return this._client.post(path `/subscriptions/${subscriptionID}/redeem_coupon`, { body, ...options });
752
752
  }
753
753
  /**
754
754
  * This endpoint can be used to change an existing subscription's plan. It returns
@@ -944,8 +944,8 @@ export class Subscriptions extends APIResource {
944
944
  * );
945
945
  * ```
946
946
  */
947
- schedulePlanChange(subscriptionId, body, options) {
948
- return this._client.post(path `/subscriptions/${subscriptionId}/schedule_plan_change`, {
947
+ schedulePlanChange(subscriptionID, body, options) {
948
+ return this._client.post(path `/subscriptions/${subscriptionID}/schedule_plan_change`, {
949
949
  body,
950
950
  ...options,
951
951
  });
@@ -962,8 +962,8 @@ export class Subscriptions extends APIResource {
962
962
  * );
963
963
  * ```
964
964
  */
965
- triggerPhase(subscriptionId, body, options) {
966
- return this._client.post(path `/subscriptions/${subscriptionId}/trigger_phase`, { body, ...options });
965
+ triggerPhase(subscriptionID, body, options) {
966
+ return this._client.post(path `/subscriptions/${subscriptionID}/trigger_phase`, { body, ...options });
967
967
  }
968
968
  /**
969
969
  * This endpoint can be used to unschedule any pending cancellations for a
@@ -987,8 +987,8 @@ export class Subscriptions extends APIResource {
987
987
  * );
988
988
  * ```
989
989
  */
990
- unscheduleCancellation(subscriptionId, options) {
991
- return this._client.post(path `/subscriptions/${subscriptionId}/unschedule_cancellation`, options);
990
+ unscheduleCancellation(subscriptionID, options) {
991
+ return this._client.post(path `/subscriptions/${subscriptionID}/unschedule_cancellation`, options);
992
992
  }
993
993
  /**
994
994
  * This endpoint can be used to clear scheduled updates to the quantity for a fixed
@@ -1006,8 +1006,8 @@ export class Subscriptions extends APIResource {
1006
1006
  * );
1007
1007
  * ```
1008
1008
  */
1009
- unscheduleFixedFeeQuantityUpdates(subscriptionId, body, options) {
1010
- return this._client.post(path `/subscriptions/${subscriptionId}/unschedule_fixed_fee_quantity_updates`, {
1009
+ unscheduleFixedFeeQuantityUpdates(subscriptionID, body, options) {
1010
+ return this._client.post(path `/subscriptions/${subscriptionID}/unschedule_fixed_fee_quantity_updates`, {
1011
1011
  body,
1012
1012
  ...options,
1013
1013
  });
@@ -1024,8 +1024,8 @@ export class Subscriptions extends APIResource {
1024
1024
  * );
1025
1025
  * ```
1026
1026
  */
1027
- unschedulePendingPlanChanges(subscriptionId, options) {
1028
- return this._client.post(path `/subscriptions/${subscriptionId}/unschedule_pending_plan_changes`, options);
1027
+ unschedulePendingPlanChanges(subscriptionID, options) {
1028
+ return this._client.post(path `/subscriptions/${subscriptionID}/unschedule_pending_plan_changes`, options);
1029
1029
  }
1030
1030
  /**
1031
1031
  * This endpoint can be used to update the quantity for a fixed fee.
@@ -1052,8 +1052,8 @@ export class Subscriptions extends APIResource {
1052
1052
  * );
1053
1053
  * ```
1054
1054
  */
1055
- updateFixedFeeQuantity(subscriptionId, body, options) {
1056
- return this._client.post(path `/subscriptions/${subscriptionId}/update_fixed_fee_quantity`, {
1055
+ updateFixedFeeQuantity(subscriptionID, body, options) {
1056
+ return this._client.post(path `/subscriptions/${subscriptionID}/update_fixed_fee_quantity`, {
1057
1057
  body,
1058
1058
  ...options,
1059
1059
  });
@@ -1087,8 +1087,8 @@ export class Subscriptions extends APIResource {
1087
1087
  * );
1088
1088
  * ```
1089
1089
  */
1090
- updateTrial(subscriptionId, body, options) {
1091
- return this._client.post(path `/subscriptions/${subscriptionId}/update_trial`, { body, ...options });
1090
+ updateTrial(subscriptionID, body, options) {
1091
+ return this._client.post(path `/subscriptions/${subscriptionID}/update_trial`, { body, ...options });
1092
1092
  }
1093
1093
  }
1094
1094
  //# sourceMappingURL=subscriptions.mjs.map
package/src/client.ts CHANGED
@@ -167,6 +167,10 @@ import {
167
167
  AddressInput,
168
168
  Customer,
169
169
  CustomerCreateParams,
170
+ CustomerCreatePortalSessionByExternalIDParams,
171
+ CustomerCreatePortalSessionByExternalIDResponse,
172
+ CustomerCreatePortalSessionParams,
173
+ CustomerCreatePortalSessionResponse,
170
174
  CustomerHierarchyConfig,
171
175
  CustomerListParams,
172
176
  CustomerUpdateByExternalIDParams,
@@ -325,9 +329,9 @@ export interface ClientOptions {
325
329
  }
326
330
 
327
331
  /**
328
- * Base class for Orb API clients.
332
+ * API Client for interfacing with the Orb API.
329
333
  */
330
- export class BaseOrb {
334
+ export class Orb {
331
335
  apiKey: string;
332
336
  webhookSecret: string | null;
333
337
 
@@ -376,7 +380,7 @@ export class BaseOrb {
376
380
  };
377
381
 
378
382
  this.baseURL = options.baseURL!;
379
- this.timeout = options.timeout ?? BaseOrb.DEFAULT_TIMEOUT /* 1 minute */;
383
+ this.timeout = options.timeout ?? Orb.DEFAULT_TIMEOUT /* 1 minute */;
380
384
  this.logger = options.logger ?? console;
381
385
  const defaultLogLevel = 'warn';
382
386
  // Set default logLevel early so that we can log a warning in parseLogLevel.
@@ -995,12 +999,7 @@ export class BaseOrb {
995
999
  static DuplicateResourceCreation = Errors.DuplicateResourceCreation;
996
1000
 
997
1001
  static toFile = Uploads.toFile;
998
- }
999
1002
 
1000
- /**
1001
- * API Client for interfacing with the Orb API.
1002
- */
1003
- export class Orb extends BaseOrb {
1004
1003
  topLevel: API.TopLevel = new API.TopLevel(this);
1005
1004
  /**
1006
1005
  * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be subscribed to by a
@@ -1164,10 +1163,14 @@ export declare namespace Orb {
1164
1163
  type NewReportingConfiguration as NewReportingConfiguration,
1165
1164
  type NewSphereConfiguration as NewSphereConfiguration,
1166
1165
  type NewTaxJarConfiguration as NewTaxJarConfiguration,
1166
+ type CustomerCreatePortalSessionResponse as CustomerCreatePortalSessionResponse,
1167
+ type CustomerCreatePortalSessionByExternalIDResponse as CustomerCreatePortalSessionByExternalIDResponse,
1167
1168
  type CustomersPage as CustomersPage,
1168
1169
  type CustomerCreateParams as CustomerCreateParams,
1169
1170
  type CustomerUpdateParams as CustomerUpdateParams,
1170
1171
  type CustomerListParams as CustomerListParams,
1172
+ type CustomerCreatePortalSessionParams as CustomerCreatePortalSessionParams,
1173
+ type CustomerCreatePortalSessionByExternalIDParams as CustomerCreatePortalSessionByExternalIDParams,
1171
1174
  type CustomerUpdateByExternalIDParams as CustomerUpdateByExternalIDParams,
1172
1175
  };
1173
1176
 
@@ -1,6 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { type BaseOrb } from '../client';
3
+ import { type Orb } from '../client';
4
4
 
5
5
  import { type PromiseOrValue } from '../internal/types';
6
6
  import { APIResponseProps, defaultParseResponse } from '../internal/parse';
@@ -11,15 +11,12 @@ import { APIResponseProps, defaultParseResponse } from '../internal/parse';
11
11
  */
12
12
  export class APIPromise<T> extends Promise<T> {
13
13
  private parsedPromise: Promise<T> | undefined;
14
- #client: BaseOrb;
14
+ #client: Orb;
15
15
 
16
16
  constructor(
17
- client: BaseOrb,
17
+ client: Orb,
18
18
  private responsePromise: Promise<APIResponseProps>,
19
- private parseResponse: (
20
- client: BaseOrb,
21
- props: APIResponseProps,
22
- ) => PromiseOrValue<T> = defaultParseResponse,
19
+ private parseResponse: (client: Orb, props: APIResponseProps) => PromiseOrValue<T> = defaultParseResponse,
23
20
  ) {
24
21
  super((resolve) => {
25
22
  // this is maybe a bit weird but this has to be a no-op to not implicitly
@@ -3,7 +3,7 @@
3
3
  import { OrbError } from './error';
4
4
  import { FinalRequestOptions } from '../internal/request-options';
5
5
  import { defaultParseResponse } from '../internal/parse';
6
- import { type BaseOrb } from '../client';
6
+ import { type Orb } from '../client';
7
7
  import { APIPromise } from './api-promise';
8
8
  import { type APIResponseProps } from '../internal/parse';
9
9
  import { maybeObj } from '../internal/utils/values';
@@ -11,13 +11,13 @@ import { maybeObj } from '../internal/utils/values';
11
11
  export type PageRequestOptions = Pick<FinalRequestOptions, 'query' | 'headers' | 'body' | 'path' | 'method'>;
12
12
 
13
13
  export abstract class AbstractPage<Item> implements AsyncIterable<Item> {
14
- #client: BaseOrb;
14
+ #client: Orb;
15
15
  protected options: FinalRequestOptions;
16
16
 
17
17
  protected response: Response;
18
18
  protected body: unknown;
19
19
 
20
- constructor(client: BaseOrb, response: Response, body: unknown, options: FinalRequestOptions) {
20
+ constructor(client: Orb, response: Response, body: unknown, options: FinalRequestOptions) {
21
21
  this.#client = client;
22
22
  this.options = options;
23
23
  this.response = response;
@@ -80,7 +80,7 @@ export class PagePromise<
80
80
  implements AsyncIterable<Item>
81
81
  {
82
82
  constructor(
83
- client: BaseOrb,
83
+ client: Orb,
84
84
  request: Promise<APIResponseProps>,
85
85
  Page: new (...args: ConstructorParameters<typeof AbstractPage>) => PageClass,
86
86
  ) {
@@ -139,7 +139,7 @@ export class Page<Item> extends AbstractPage<Item> implements PageResponse<Item>
139
139
 
140
140
  pagination_metadata: PageResponse.PaginationMetadata;
141
141
 
142
- constructor(client: BaseOrb, response: Response, body: PageResponse<Item>, options: FinalRequestOptions) {
142
+ constructor(client: Orb, response: Response, body: PageResponse<Item>, options: FinalRequestOptions) {
143
143
  super(client, response, body, options);
144
144
 
145
145
  this.data = body.data || [];
@@ -1,11 +1,11 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- import { BaseOrb } from '../client';
3
+ import type { Orb } from '../client';
4
4
 
5
5
  export abstract class APIResource {
6
- protected _client: BaseOrb;
6
+ protected _client: Orb;
7
7
 
8
- constructor(client: BaseOrb) {
8
+ constructor(client: Orb) {
9
9
  this._client = client;
10
10
  }
11
11
  }
package/src/index.ts CHANGED
@@ -4,7 +4,7 @@ export { Orb as default } from './client';
4
4
 
5
5
  export { type Uploadable, toFile } from './core/uploads';
6
6
  export { APIPromise } from './core/api-promise';
7
- export { BaseOrb, Orb, type ClientOptions } from './client';
7
+ export { Orb, type ClientOptions } from './client';
8
8
  export { PagePromise } from './core/pagination';
9
9
  export {
10
10
  OrbError,
@@ -1,7 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import type { FinalRequestOptions } from './request-options';
4
- import { type BaseOrb } from '../client';
4
+ import { type Orb } from '../client';
5
5
  import { formatRequestDetails, loggerFor } from './utils/log';
6
6
 
7
7
  export type APIResponseProps = {
@@ -13,7 +13,7 @@ export type APIResponseProps = {
13
13
  startTime: number;
14
14
  };
15
15
 
16
- export async function defaultParseResponse<T>(client: BaseOrb, props: APIResponseProps): Promise<T> {
16
+ export async function defaultParseResponse<T>(client: Orb, props: APIResponseProps): Promise<T> {
17
17
  const { response, requestLogID, retryOfRequestLogID, startTime } = props;
18
18
  const body = await (async () => {
19
19
  // fetch refuses to read the body when the status code is 204.