@fusebase/fusebase-gate-sdk 2.2.2-sdk.37 → 2.2.2-sdk.39

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.
@@ -5,10 +5,21 @@
5
5
  * Domain: billing
6
6
  */
7
7
  import type { Client } from "../runtime/transport";
8
- import type { orgIdInPathRequired, StripeCheckoutLinkRequestContract, StripeCheckoutLinkResponseContract, StripeModeMutationResponseContract, StripeModeUpdateRequestContract, StripeOauthLookupRequestContract, StripeOauthLookupResponseContract, StripePaymentStateRequestContract, StripePaymentStateResponseContract, StripeProductCreateRequestContract, StripeProductDeleteRequestContract, StripeProductDeleteResponseContract, StripeProductFindRequestContract, StripeProductLookupResponseContract, StripeProductMutationResponseContract } from "../types";
8
+ import type { orgIdInPathRequired, StripeCheckoutLinkRequestContract, StripeCheckoutLinkResponseContract, StripeModeMutationResponseContract, StripeModeUpdateRequestContract, StripeOauthLookupRequestContract, StripeOauthLookupResponseContract, StripePaymentStateRequestContract, StripePaymentStateResponseContract, StripeProductCreateRequestContract, StripeProductDeleteRequestContract, StripeProductDeleteResponseContract, StripeProductFindRequestContract, StripeProductLookupResponseContract, StripeProductMutationResponseContract, StripeSubscriptionCancelRequestContract, StripeSubscriptionCancelResponseContract } from "../types";
9
9
  export declare class BillingApi {
10
10
  private client;
11
11
  constructor(client: Client);
12
+ /**
13
+ * Cancel Stripe subscription
14
+ * Cancels a Stripe subscription for the supplied buyer and Stripe product identity. When cancelAtPeriodEnd is omitted or true, cancellation is scheduled for the end of the billing period. Set cancelAtPeriodEnd=false for immediate cancellation.
15
+ */
16
+ cancelStripeSubscription(params: {
17
+ path: {
18
+ orgId: orgIdInPathRequired;
19
+ };
20
+ headers?: Record<string, string>;
21
+ body: StripeSubscriptionCancelRequestContract;
22
+ }): Promise<StripeSubscriptionCancelResponseContract>;
12
23
  /**
13
24
  * Create Stripe product
14
25
  * Creates a Stripe payment or subscription product/link for the organization.
@@ -11,6 +11,21 @@ class BillingApi {
11
11
  constructor(client) {
12
12
  this.client = client;
13
13
  }
14
+ /**
15
+ * Cancel Stripe subscription
16
+ * Cancels a Stripe subscription for the supplied buyer and Stripe product identity. When cancelAtPeriodEnd is omitted or true, cancellation is scheduled for the end of the billing period. Set cancelAtPeriodEnd=false for immediate cancellation.
17
+ */
18
+ async cancelStripeSubscription(params) {
19
+ return this.client.request({
20
+ method: "POST",
21
+ path: "/:orgId/billing/stripe/subscription/cancel",
22
+ pathParams: params.path,
23
+ headers: params.headers,
24
+ body: params.body,
25
+ opId: "cancelStripeSubscription",
26
+ expectedContentType: "application/json",
27
+ });
28
+ }
14
29
  /**
15
30
  * Create Stripe product
16
31
  * Creates a Stripe payment or subscription product/link for the organization.
@@ -88,6 +88,25 @@ export interface StripeCheckoutLinkRequestContract {
88
88
  export interface StripeCheckoutLinkResponseContract {
89
89
  url?: string | null;
90
90
  }
91
+ /**
92
+ * Cancels a Stripe subscription for a buyer and product identity.
93
+ * When cancelAtPeriodEnd is omitted or true, cancellation is scheduled for the end
94
+ * of the current billing period. Set false for immediate cancellation.
95
+ */
96
+ export interface StripeSubscriptionCancelRequestContract {
97
+ stripeAccountId: string;
98
+ kind: string;
99
+ kindId: string;
100
+ buyerId: number;
101
+ cancelAtPeriodEnd?: boolean;
102
+ }
103
+ export interface StripeSubscriptionCancelResponseContract {
104
+ ok: boolean;
105
+ subscriptionId: string | null;
106
+ stripeStatus: string | null;
107
+ cancelAtPeriodEnd: boolean;
108
+ currentPeriodEnd: number | null;
109
+ }
91
110
  export interface StripePaymentStateRequestContract {
92
111
  stripeAccountId: string;
93
112
  mode: StripeModeContract;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusebase/fusebase-gate-sdk",
3
- "version": "2.2.2-sdk.37",
3
+ "version": "2.2.2-sdk.39",
4
4
  "description": "TypeScript SDK for Fusebase Gate APIs - Generated from contract introspection",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -0,0 +1,9 @@
1
+ # Release Notes 2.2.2-sdk.39
2
+
3
+ - Current ref: `HEAD`
4
+ - Previous tag: `v2.2.2-sdk.39`
5
+ - Generated at: 2026-04-12T04:11:55.580Z
6
+
7
+ ## Included Drafts
8
+
9
+ - None
@@ -1,8 +1,8 @@
1
- # Release Notes 2.2.2-sdk.37
1
+ # Release Notes 2.2.2-sdk.39
2
2
 
3
3
  - Current ref: `HEAD`
4
- - Previous tag: `v2.2.2-sdk.37`
5
- - Generated at: 2026-04-10T04:37:47.877Z
4
+ - Previous tag: `v2.2.2-sdk.39`
5
+ - Generated at: 2026-04-12T04:11:55.580Z
6
6
 
7
7
  ## Included Drafts
8
8
 
@@ -1,9 +0,0 @@
1
- # Release Notes 2.2.2-sdk.37
2
-
3
- - Current ref: `HEAD`
4
- - Previous tag: `v2.2.2-sdk.37`
5
- - Generated at: 2026-04-10T04:37:47.877Z
6
-
7
- ## Included Drafts
8
-
9
- - None