@fusebase/fusebase-gate-sdk 2.2.2-sdk.11 → 2.2.2-sdk.13

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.
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Billing API
3
+ *
4
+ * Generated from contract introspection
5
+ * Domain: billing
6
+ */
7
+ import type { Client } from "../runtime/transport";
8
+ import type { orgIdInPathRequired, StripeCheckoutLinkRequestContract, StripeCheckoutLinkResponseContract, StripeOauthLookupRequestContract, StripeOauthLookupResponseContract, StripePaymentStateRequestContract, StripePaymentStateResponseContract, StripeProductCreateRequestContract, StripeProductDeleteRequestContract, StripeProductDeleteResponseContract, StripeProductFindRequestContract, StripeProductLookupResponseContract, StripeProductMutationResponseContract } from "../types";
9
+ export declare class BillingApi {
10
+ private client;
11
+ constructor(client: Client);
12
+ /**
13
+ * Create Stripe product
14
+ * Creates a Stripe payment or subscription product/link for the organization.
15
+ */
16
+ createStripeProduct(params: {
17
+ path: {
18
+ orgId: orgIdInPathRequired;
19
+ };
20
+ headers?: Record<string, string>;
21
+ body: StripeProductCreateRequestContract;
22
+ }): Promise<StripeProductMutationResponseContract>;
23
+ /**
24
+ * Delete Stripe product
25
+ * Marks a Stripe product/link as deleted for the supplied kind and kindId.
26
+ */
27
+ deleteStripeProduct(params: {
28
+ path: {
29
+ orgId: orgIdInPathRequired;
30
+ };
31
+ headers?: Record<string, string>;
32
+ body: StripeProductDeleteRequestContract;
33
+ }): Promise<StripeProductDeleteResponseContract>;
34
+ /**
35
+ * Find Stripe product
36
+ * Returns the Stripe product/link matching the supplied filters, or null when nothing matches.
37
+ */
38
+ findStripeProduct(params: {
39
+ path: {
40
+ orgId: orgIdInPathRequired;
41
+ };
42
+ headers?: Record<string, string>;
43
+ body?: StripeProductFindRequestContract;
44
+ }): Promise<StripeProductLookupResponseContract>;
45
+ /**
46
+ * Get Stripe OAuth connection
47
+ * Returns the Stripe OAuth connection for the organization, or null when no connected Stripe account matches the lookup.
48
+ */
49
+ getStripeOauth(params: {
50
+ path: {
51
+ orgId: orgIdInPathRequired;
52
+ };
53
+ headers?: Record<string, string>;
54
+ body?: StripeOauthLookupRequestContract;
55
+ }): Promise<StripeOauthLookupResponseContract>;
56
+ /**
57
+ * Get Stripe payment link
58
+ * Creates or retrieves the Stripe checkout URL that the buyer should be redirected to for payment.
59
+ */
60
+ getStripePaymentLink(params: {
61
+ path: {
62
+ orgId: orgIdInPathRequired;
63
+ };
64
+ headers?: Record<string, string>;
65
+ body: StripeCheckoutLinkRequestContract;
66
+ }): Promise<StripeCheckoutLinkResponseContract>;
67
+ /**
68
+ * Get Stripe payment state
69
+ * Returns the latest webhook-backed payment state for the supplied buyer and Stripe product identity.
70
+ */
71
+ getStripePaymentState(params: {
72
+ path: {
73
+ orgId: orgIdInPathRequired;
74
+ };
75
+ headers?: Record<string, string>;
76
+ body: StripePaymentStateRequestContract;
77
+ }): Promise<StripePaymentStateResponseContract>;
78
+ /**
79
+ * Update Stripe product
80
+ * Replaces a Stripe product by marking the existing record deleted for the same kind and kindId, then creating a new one.
81
+ */
82
+ updateStripeProduct(params: {
83
+ path: {
84
+ orgId: orgIdInPathRequired;
85
+ };
86
+ headers?: Record<string, string>;
87
+ body: StripeProductCreateRequestContract;
88
+ }): Promise<StripeProductMutationResponseContract>;
89
+ }
@@ -0,0 +1,120 @@
1
+ "use strict";
2
+ /**
3
+ * Billing API
4
+ *
5
+ * Generated from contract introspection
6
+ * Domain: billing
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.BillingApi = void 0;
10
+ class BillingApi {
11
+ constructor(client) {
12
+ this.client = client;
13
+ }
14
+ /**
15
+ * Create Stripe product
16
+ * Creates a Stripe payment or subscription product/link for the organization.
17
+ */
18
+ async createStripeProduct(params) {
19
+ return this.client.request({
20
+ method: "POST",
21
+ path: "/:orgId/billing/stripe/products",
22
+ pathParams: params.path,
23
+ headers: params.headers,
24
+ body: params.body,
25
+ opId: "createStripeProduct",
26
+ expectedContentType: "application/json",
27
+ });
28
+ }
29
+ /**
30
+ * Delete Stripe product
31
+ * Marks a Stripe product/link as deleted for the supplied kind and kindId.
32
+ */
33
+ async deleteStripeProduct(params) {
34
+ return this.client.request({
35
+ method: "DELETE",
36
+ path: "/:orgId/billing/stripe/products",
37
+ pathParams: params.path,
38
+ headers: params.headers,
39
+ body: params.body,
40
+ opId: "deleteStripeProduct",
41
+ expectedContentType: "application/json",
42
+ });
43
+ }
44
+ /**
45
+ * Find Stripe product
46
+ * Returns the Stripe product/link matching the supplied filters, or null when nothing matches.
47
+ */
48
+ async findStripeProduct(params) {
49
+ return this.client.request({
50
+ method: "POST",
51
+ path: "/:orgId/billing/stripe/products/find",
52
+ pathParams: params.path,
53
+ headers: params.headers,
54
+ body: params.body,
55
+ opId: "findStripeProduct",
56
+ expectedContentType: "application/json",
57
+ });
58
+ }
59
+ /**
60
+ * Get Stripe OAuth connection
61
+ * Returns the Stripe OAuth connection for the organization, or null when no connected Stripe account matches the lookup.
62
+ */
63
+ async getStripeOauth(params) {
64
+ return this.client.request({
65
+ method: "POST",
66
+ path: "/:orgId/billing/stripe/oauth/find",
67
+ pathParams: params.path,
68
+ headers: params.headers,
69
+ body: params.body,
70
+ opId: "getStripeOauth",
71
+ expectedContentType: "application/json",
72
+ });
73
+ }
74
+ /**
75
+ * Get Stripe payment link
76
+ * Creates or retrieves the Stripe checkout URL that the buyer should be redirected to for payment.
77
+ */
78
+ async getStripePaymentLink(params) {
79
+ return this.client.request({
80
+ method: "POST",
81
+ path: "/:orgId/billing/stripe/payment-link",
82
+ pathParams: params.path,
83
+ headers: params.headers,
84
+ body: params.body,
85
+ opId: "getStripePaymentLink",
86
+ expectedContentType: "application/json",
87
+ });
88
+ }
89
+ /**
90
+ * Get Stripe payment state
91
+ * Returns the latest webhook-backed payment state for the supplied buyer and Stripe product identity.
92
+ */
93
+ async getStripePaymentState(params) {
94
+ return this.client.request({
95
+ method: "POST",
96
+ path: "/:orgId/billing/stripe/payment-state",
97
+ pathParams: params.path,
98
+ headers: params.headers,
99
+ body: params.body,
100
+ opId: "getStripePaymentState",
101
+ expectedContentType: "application/json",
102
+ });
103
+ }
104
+ /**
105
+ * Update Stripe product
106
+ * Replaces a Stripe product by marking the existing record deleted for the same kind and kindId, then creating a new one.
107
+ */
108
+ async updateStripeProduct(params) {
109
+ return this.client.request({
110
+ method: "PUT",
111
+ path: "/:orgId/billing/stripe/products",
112
+ pathParams: params.path,
113
+ headers: params.headers,
114
+ body: params.body,
115
+ opId: "updateStripeProduct",
116
+ expectedContentType: "application/json",
117
+ });
118
+ }
119
+ }
120
+ exports.BillingApi = BillingApi;
package/dist/index.d.ts CHANGED
@@ -6,6 +6,7 @@
6
6
  export * from "./runtime";
7
7
  export * from "./types";
8
8
  export { AccessApi } from "./apis/AccessApi";
9
+ export { BillingApi } from "./apis/BillingApi";
9
10
  export { EmailsApi } from "./apis/EmailsApi";
10
11
  export { HealthApi } from "./apis/HealthApi";
11
12
  export { NotesApi } from "./apis/NotesApi";
package/dist/index.js CHANGED
@@ -19,11 +19,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
19
19
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
20
20
  };
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.WorkspacesApi = exports.TokensApi = exports.SystemApi = exports.PortalsApi = exports.OrgUsersApi = exports.NotesApi = exports.HealthApi = exports.EmailsApi = exports.AccessApi = void 0;
22
+ exports.WorkspacesApi = exports.TokensApi = exports.SystemApi = exports.PortalsApi = exports.OrgUsersApi = exports.NotesApi = exports.HealthApi = exports.EmailsApi = exports.BillingApi = exports.AccessApi = void 0;
23
23
  __exportStar(require("./runtime"), exports);
24
24
  __exportStar(require("./types"), exports);
25
25
  var AccessApi_1 = require("./apis/AccessApi");
26
26
  Object.defineProperty(exports, "AccessApi", { enumerable: true, get: function () { return AccessApi_1.AccessApi; } });
27
+ var BillingApi_1 = require("./apis/BillingApi");
28
+ Object.defineProperty(exports, "BillingApi", { enumerable: true, get: function () { return BillingApi_1.BillingApi; } });
27
29
  var EmailsApi_1 = require("./apis/EmailsApi");
28
30
  Object.defineProperty(exports, "EmailsApi", { enumerable: true, get: function () { return EmailsApi_1.EmailsApi; } });
29
31
  var HealthApi_1 = require("./apis/HealthApi");
@@ -0,0 +1,102 @@
1
+ export type StripeModeContract = "payment" | "subscription";
2
+ export type StripeIntervalContract = "day" | "week" | "month" | "year";
3
+ export interface StripeOauthLookupRequestContract {
4
+ stripeAccountId?: string | null;
5
+ }
6
+ export interface StripeOauthContract {
7
+ orgId?: string;
8
+ userId?: number;
9
+ stripeAccountId?: string;
10
+ }
11
+ export interface StripeOauthLookupResponseContract {
12
+ oauth: StripeOauthContract | null;
13
+ }
14
+ export interface StripeProductContract {
15
+ id?: number;
16
+ orgId?: string;
17
+ userId?: number;
18
+ stripeAccountId?: string;
19
+ mode?: StripeModeContract;
20
+ amountCents?: number;
21
+ currency?: string;
22
+ title?: string;
23
+ productId?: string | null;
24
+ priceId?: string | null;
25
+ interval?: StripeIntervalContract;
26
+ intervalCount?: number | null;
27
+ kind?: string;
28
+ kindId?: string;
29
+ deleted?: boolean;
30
+ createdAt?: number;
31
+ updatedAt?: number;
32
+ }
33
+ /**
34
+ * For mode=subscription, interval and intervalCount are required.
35
+ * For mode=payment, interval and intervalCount must be omitted.
36
+ */
37
+ export interface StripeProductCreateRequestContract {
38
+ stripeAccountId: string;
39
+ mode: StripeModeContract;
40
+ amountCents: number;
41
+ currency: string;
42
+ title: string;
43
+ kind: string;
44
+ kindId: string;
45
+ interval?: StripeIntervalContract;
46
+ intervalCount?: number;
47
+ }
48
+ export interface StripeProductFindRequestContract {
49
+ stripeAccountId?: string | null;
50
+ kind?: string | null;
51
+ kindId?: string | null;
52
+ mode?: StripeModeContract | null;
53
+ }
54
+ export interface StripeProductLookupResponseContract {
55
+ product: StripeProductContract | null;
56
+ }
57
+ export interface StripeProductMutationResponseContract {
58
+ product: StripeProductContract;
59
+ }
60
+ export interface StripeProductDeleteRequestContract {
61
+ kind: string;
62
+ kindId: string;
63
+ stripeAccountId?: string | null;
64
+ }
65
+ export interface StripeProductDeleteResponseContract {
66
+ deleted: boolean;
67
+ kind: string;
68
+ kindId: string;
69
+ stripeAccountId?: string | null;
70
+ }
71
+ export interface StripeCheckoutLinkRequestContract {
72
+ stripeAccountId: string;
73
+ kind: string;
74
+ kindId: string;
75
+ buyerId: number;
76
+ successUrl: string;
77
+ cancelUrl: string;
78
+ customerEmail?: string | null;
79
+ }
80
+ export interface StripeCheckoutLinkResponseContract {
81
+ url?: string | null;
82
+ }
83
+ export interface StripePaymentStateRequestContract {
84
+ stripeAccountId: string;
85
+ mode: StripeModeContract;
86
+ kind: string;
87
+ kindId: string;
88
+ buyerId: number;
89
+ }
90
+ export interface StripePaymentStateResponseContract {
91
+ active?: boolean | null;
92
+ }
93
+ export declare const StripeModeContract: {
94
+ readonly Payment: "payment";
95
+ readonly Subscription: "subscription";
96
+ };
97
+ export declare const StripeIntervalContract: {
98
+ readonly Day: "day";
99
+ readonly Week: "week";
100
+ readonly Month: "month";
101
+ readonly Year: "year";
102
+ };
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StripeIntervalContract = exports.StripeModeContract = void 0;
4
+ exports.StripeModeContract = {
5
+ Payment: "payment",
6
+ Subscription: "subscription"
7
+ };
8
+ exports.StripeIntervalContract = {
9
+ Day: "day",
10
+ Week: "week",
11
+ Month: "month",
12
+ Year: "year"
13
+ };
@@ -5,6 +5,7 @@
5
5
  * Generated by SDK codegen
6
6
  */
7
7
  export type { AuthenticatedUserSummaryContract, MyOrgAccessResponseContract } from "./access/access";
8
+ export * from "./billing/billing";
8
9
  export type { OrgEmailSendRequestContract, OrgEmailSendResponseContract } from "./email/email";
9
10
  export * from "./note/note";
10
11
  export type { OrgInviteContract, OrgMagicLinkContract, OrgPortalContract, OrgPortalListResponseContract, OrgUserAddRequestContract, OrgUserAddResponseContract, OrgUserContract, OrgUserListResponseContract, OrgWorkspaceContract, OrgWorkspaceInviteContract, OrgWorkspaceListResponseContract, OrgWorkspaceMemberContract } from "./org-user/org-user";
@@ -20,6 +20,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
20
20
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
21
21
  };
22
22
  Object.defineProperty(exports, "__esModule", { value: true });
23
+ __exportStar(require("./billing/billing"), exports);
23
24
  __exportStar(require("./note/note"), exports);
24
25
  __exportStar(require("./shared/common"), exports);
25
26
  __exportStar(require("./shared/enums"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusebase/fusebase-gate-sdk",
3
- "version": "2.2.2-sdk.11",
3
+ "version": "2.2.2-sdk.13",
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.13
2
+
3
+ - Current ref: `HEAD`
4
+ - Previous tag: `v2.2.2-sdk.13`
5
+ - Generated at: 2026-04-03T11:02:03.220Z
6
+
7
+ ## Included Drafts
8
+
9
+ - None
@@ -1,8 +1,8 @@
1
- # Release Notes 2.2.2-sdk.11
1
+ # Release Notes 2.2.2-sdk.13
2
2
 
3
3
  - Current ref: `HEAD`
4
- - Previous tag: `v2.2.2-sdk.11`
5
- - Generated at: 2026-04-02T04:43:34.869Z
4
+ - Previous tag: `v2.2.2-sdk.13`
5
+ - Generated at: 2026-04-03T11:02:03.220Z
6
6
 
7
7
  ## Included Drafts
8
8
 
@@ -1,9 +0,0 @@
1
- # Release Notes 2.2.2-sdk.11
2
-
3
- - Current ref: `HEAD`
4
- - Previous tag: `v2.2.2-sdk.11`
5
- - Generated at: 2026-04-02T04:43:34.869Z
6
-
7
- ## Included Drafts
8
-
9
- - None