pingram 1.0.36 → 1.0.37-alpha.1602
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.
- package/dist/generated/src/apis/AccountApi.d.ts +93 -5
- package/dist/generated/src/apis/AccountApi.js +212 -2
- package/dist/generated/src/apis/index.d.ts +1 -1
- package/dist/generated/src/models/AccountGetResponse.d.ts +7 -0
- package/dist/generated/src/models/AccountGetResponse.js +7 -2
- package/dist/generated/src/models/AccountGetResponseBillingAlerts.d.ts +44 -0
- package/dist/generated/src/models/AccountGetResponseBillingAlerts.js +58 -0
- package/dist/generated/src/models/AccountPatchRequest.d.ts +7 -0
- package/dist/generated/src/models/AccountPatchRequest.js +7 -2
- package/dist/generated/src/models/BillingEmail.d.ts +32 -0
- package/dist/generated/src/models/BillingEmail.js +48 -0
- package/dist/generated/src/models/BillingPostResponseBody.d.ts +7 -0
- package/dist/generated/src/models/BillingPostResponseBody.js +5 -0
- package/dist/generated/src/models/CancelSubscriptionRequest.d.ts +32 -0
- package/dist/generated/src/models/CancelSubscriptionRequest.js +48 -0
- package/dist/generated/src/models/PhoneVerifyStartResponse.d.ts +6 -0
- package/dist/generated/src/models/PhoneVerifyStartResponse.js +6 -2
- package/dist/generated/src/models/SenderPostBodySms.d.ts +2 -1
- package/dist/generated/src/models/SenderPostBodySmsAutoReply.d.ts +3 -2
- package/dist/generated/src/models/SlackConnectInviteResponse.d.ts +38 -0
- package/dist/generated/src/models/SlackConnectInviteResponse.js +54 -0
- package/dist/generated/src/models/UpdateBillingEmailRequest.d.ts +32 -0
- package/dist/generated/src/models/UpdateBillingEmailRequest.js +50 -0
- package/dist/generated/src/models/WebhookEndpoint.d.ts +2 -1
- package/dist/generated/src/models/WebhookEndpoint.js +1 -0
- package/dist/generated/src/models/WebhookEndpointUpsertRequest.d.ts +2 -1
- package/dist/generated/src/models/WebhookEndpointUpsertRequest.js +1 -0
- package/dist/generated/src/models/WebhookEndpointsResponseEndpointsInner.d.ts +2 -1
- package/dist/generated/src/models/WebhookEndpointsResponseEndpointsInner.js +1 -0
- package/dist/generated/src/models/WebhookEvent.d.ts +53 -1
- package/dist/generated/src/models/WebhookEvent.js +25 -2
- package/dist/generated/src/models/WebhookEventUsageValue.d.ts +38 -0
- package/dist/generated/src/models/WebhookEventUsageValue.js +54 -0
- package/dist/generated/src/models/index.d.ts +6 -0
- package/dist/generated/src/models/index.js +6 -0
- package/dist/src/client.js +1 -1
- package/package.json +1 -1
|
@@ -10,7 +10,10 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { AccountGetResponse, AccountPatchRequest, BillingPostRequestBody, BillingPostResponseBody, GetUsageHistoryResponse, GetUsageResponse, ListInvoicesResponse, SupabaseConfigureRequest, SupabaseConfigureResponse, SupabaseOAuthRequest, SupabaseOAuthResponse, SupabaseProjectsResponse, SupabaseStatusResponse } from '../models/index';
|
|
13
|
+
import type { AccountGetResponse, AccountPatchRequest, BillingEmail, BillingPostRequestBody, BillingPostResponseBody, CancelSubscriptionRequest, GetUsageHistoryResponse, GetUsageResponse, ListInvoicesResponse, SupabaseConfigureRequest, SupabaseConfigureResponse, SupabaseOAuthRequest, SupabaseOAuthResponse, SupabaseProjectsResponse, SupabaseStatusResponse, UpdateBillingEmailRequest } from '../models/index';
|
|
14
|
+
export interface CancelSubscriptionOperationRequest {
|
|
15
|
+
cancelSubscriptionRequest: CancelSubscriptionRequest;
|
|
16
|
+
}
|
|
14
17
|
export interface ConfigureSupabaseSMTPRequest {
|
|
15
18
|
supabaseConfigureRequest: SupabaseConfigureRequest;
|
|
16
19
|
}
|
|
@@ -35,6 +38,9 @@ export interface SupabaseOAuthOperationRequest {
|
|
|
35
38
|
export interface UpdateAccountSettingsRequest {
|
|
36
39
|
accountPatchRequest: AccountPatchRequest;
|
|
37
40
|
}
|
|
41
|
+
export interface UpdateBillingEmailOperationRequest {
|
|
42
|
+
updateBillingEmailRequest: UpdateBillingEmailRequest;
|
|
43
|
+
}
|
|
38
44
|
/**
|
|
39
45
|
* AccountApi - interface
|
|
40
46
|
*
|
|
@@ -42,6 +48,19 @@ export interface UpdateAccountSettingsRequest {
|
|
|
42
48
|
* @interface AccountApiInterface
|
|
43
49
|
*/
|
|
44
50
|
export interface AccountApiInterface {
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @summary Cancel the paid plan at the end of the current billing cycle. Access continues until then.
|
|
54
|
+
* @param {CancelSubscriptionRequest} cancelSubscriptionRequest
|
|
55
|
+
* @param {*} [options] Override http request option.
|
|
56
|
+
* @throws {RequiredError}
|
|
57
|
+
* @memberof AccountApiInterface
|
|
58
|
+
*/
|
|
59
|
+
cancelSubscriptionRaw(requestParameters: CancelSubscriptionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountGetResponse>>;
|
|
60
|
+
/**
|
|
61
|
+
* Cancel the paid plan at the end of the current billing cycle. Access continues until then.
|
|
62
|
+
*/
|
|
63
|
+
cancelSubscription(cancelSubscriptionRequest: CancelSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountGetResponse>;
|
|
45
64
|
/**
|
|
46
65
|
*
|
|
47
66
|
* @summary Configure SMTP settings for a Supabase project
|
|
@@ -67,6 +86,18 @@ export interface AccountApiInterface {
|
|
|
67
86
|
* Get account information for the authenticated account
|
|
68
87
|
*/
|
|
69
88
|
getAccountDetails(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountGetResponse>;
|
|
89
|
+
/**
|
|
90
|
+
*
|
|
91
|
+
* @summary Get the email address that receives invoices for this account.
|
|
92
|
+
* @param {*} [options] Override http request option.
|
|
93
|
+
* @throws {RequiredError}
|
|
94
|
+
* @memberof AccountApiInterface
|
|
95
|
+
*/
|
|
96
|
+
getBillingEmailRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BillingEmail>>;
|
|
97
|
+
/**
|
|
98
|
+
* Get the email address that receives invoices for this account.
|
|
99
|
+
*/
|
|
100
|
+
getBillingEmail(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillingEmail>;
|
|
70
101
|
/**
|
|
71
102
|
*
|
|
72
103
|
* @summary Get Supabase integration status for the account
|
|
@@ -148,6 +179,18 @@ export interface AccountApiInterface {
|
|
|
148
179
|
* Get or create Stripe customer and optionally create checkout session
|
|
149
180
|
*/
|
|
150
181
|
prepareCheckoutSession(billingPostRequestBody: BillingPostRequestBody, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillingPostResponseBody>;
|
|
182
|
+
/**
|
|
183
|
+
*
|
|
184
|
+
* @summary Keep the current paid plan and undo a cancellation scheduled for the end of the billing cycle.
|
|
185
|
+
* @param {*} [options] Override http request option.
|
|
186
|
+
* @throws {RequiredError}
|
|
187
|
+
* @memberof AccountApiInterface
|
|
188
|
+
*/
|
|
189
|
+
resumeSubscriptionRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountGetResponse>>;
|
|
190
|
+
/**
|
|
191
|
+
* Keep the current paid plan and undo a cancellation scheduled for the end of the billing cycle.
|
|
192
|
+
*/
|
|
193
|
+
resumeSubscription(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountGetResponse>;
|
|
151
194
|
/**
|
|
152
195
|
*
|
|
153
196
|
* @summary Revoke Supabase integration (removes stored tokens and project info)
|
|
@@ -175,7 +218,7 @@ export interface AccountApiInterface {
|
|
|
175
218
|
supabaseOAuth(supabaseOAuthRequest: SupabaseOAuthRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SupabaseOAuthResponse>;
|
|
176
219
|
/**
|
|
177
220
|
*
|
|
178
|
-
* @summary Update account billing preferences such as auto upgrade.
|
|
221
|
+
* @summary Update account billing preferences such as auto upgrade and usage email alerts.
|
|
179
222
|
* @param {AccountPatchRequest} accountPatchRequest
|
|
180
223
|
* @param {*} [options] Override http request option.
|
|
181
224
|
* @throws {RequiredError}
|
|
@@ -183,14 +226,35 @@ export interface AccountApiInterface {
|
|
|
183
226
|
*/
|
|
184
227
|
updateAccountSettingsRaw(requestParameters: UpdateAccountSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountGetResponse>>;
|
|
185
228
|
/**
|
|
186
|
-
* Update account billing preferences such as auto upgrade.
|
|
229
|
+
* Update account billing preferences such as auto upgrade and usage email alerts.
|
|
187
230
|
*/
|
|
188
231
|
updateAccountSettings(accountPatchRequest: AccountPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountGetResponse>;
|
|
232
|
+
/**
|
|
233
|
+
*
|
|
234
|
+
* @summary Update the email address that receives invoices for this account.
|
|
235
|
+
* @param {UpdateBillingEmailRequest} updateBillingEmailRequest
|
|
236
|
+
* @param {*} [options] Override http request option.
|
|
237
|
+
* @throws {RequiredError}
|
|
238
|
+
* @memberof AccountApiInterface
|
|
239
|
+
*/
|
|
240
|
+
updateBillingEmailRaw(requestParameters: UpdateBillingEmailOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BillingEmail>>;
|
|
241
|
+
/**
|
|
242
|
+
* Update the email address that receives invoices for this account.
|
|
243
|
+
*/
|
|
244
|
+
updateBillingEmail(updateBillingEmailRequest: UpdateBillingEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillingEmail>;
|
|
189
245
|
}
|
|
190
246
|
/**
|
|
191
247
|
*
|
|
192
248
|
*/
|
|
193
249
|
export declare class AccountApi extends runtime.BaseAPI implements AccountApiInterface {
|
|
250
|
+
/**
|
|
251
|
+
* Cancel the paid plan at the end of the current billing cycle. Access continues until then.
|
|
252
|
+
*/
|
|
253
|
+
cancelSubscriptionRaw(requestParameters: CancelSubscriptionOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountGetResponse>>;
|
|
254
|
+
/**
|
|
255
|
+
* Cancel the paid plan at the end of the current billing cycle. Access continues until then.
|
|
256
|
+
*/
|
|
257
|
+
cancelSubscription(cancelSubscriptionRequest: CancelSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountGetResponse>;
|
|
194
258
|
/**
|
|
195
259
|
* Configure SMTP settings for a Supabase project
|
|
196
260
|
*/
|
|
@@ -207,6 +271,14 @@ export declare class AccountApi extends runtime.BaseAPI implements AccountApiInt
|
|
|
207
271
|
* Get account information for the authenticated account
|
|
208
272
|
*/
|
|
209
273
|
getAccountDetails(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountGetResponse>;
|
|
274
|
+
/**
|
|
275
|
+
* Get the email address that receives invoices for this account.
|
|
276
|
+
*/
|
|
277
|
+
getBillingEmailRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BillingEmail>>;
|
|
278
|
+
/**
|
|
279
|
+
* Get the email address that receives invoices for this account.
|
|
280
|
+
*/
|
|
281
|
+
getBillingEmail(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillingEmail>;
|
|
210
282
|
/**
|
|
211
283
|
* Get Supabase integration status for the account
|
|
212
284
|
*/
|
|
@@ -255,6 +327,14 @@ export declare class AccountApi extends runtime.BaseAPI implements AccountApiInt
|
|
|
255
327
|
* Get or create Stripe customer and optionally create checkout session
|
|
256
328
|
*/
|
|
257
329
|
prepareCheckoutSession(billingPostRequestBody: BillingPostRequestBody, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillingPostResponseBody>;
|
|
330
|
+
/**
|
|
331
|
+
* Keep the current paid plan and undo a cancellation scheduled for the end of the billing cycle.
|
|
332
|
+
*/
|
|
333
|
+
resumeSubscriptionRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountGetResponse>>;
|
|
334
|
+
/**
|
|
335
|
+
* Keep the current paid plan and undo a cancellation scheduled for the end of the billing cycle.
|
|
336
|
+
*/
|
|
337
|
+
resumeSubscription(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountGetResponse>;
|
|
258
338
|
/**
|
|
259
339
|
* Revoke Supabase integration (removes stored tokens and project info)
|
|
260
340
|
*/
|
|
@@ -272,11 +352,19 @@ export declare class AccountApi extends runtime.BaseAPI implements AccountApiInt
|
|
|
272
352
|
*/
|
|
273
353
|
supabaseOAuth(supabaseOAuthRequest: SupabaseOAuthRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SupabaseOAuthResponse>;
|
|
274
354
|
/**
|
|
275
|
-
* Update account billing preferences such as auto upgrade.
|
|
355
|
+
* Update account billing preferences such as auto upgrade and usage email alerts.
|
|
276
356
|
*/
|
|
277
357
|
updateAccountSettingsRaw(requestParameters: UpdateAccountSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountGetResponse>>;
|
|
278
358
|
/**
|
|
279
|
-
* Update account billing preferences such as auto upgrade.
|
|
359
|
+
* Update account billing preferences such as auto upgrade and usage email alerts.
|
|
280
360
|
*/
|
|
281
361
|
updateAccountSettings(accountPatchRequest: AccountPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountGetResponse>;
|
|
362
|
+
/**
|
|
363
|
+
* Update the email address that receives invoices for this account.
|
|
364
|
+
*/
|
|
365
|
+
updateBillingEmailRaw(requestParameters: UpdateBillingEmailOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BillingEmail>>;
|
|
366
|
+
/**
|
|
367
|
+
* Update the email address that receives invoices for this account.
|
|
368
|
+
*/
|
|
369
|
+
updateBillingEmail(updateBillingEmailRequest: UpdateBillingEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillingEmail>;
|
|
282
370
|
}
|
|
@@ -53,6 +53,61 @@ const index_1 = require("../models/index");
|
|
|
53
53
|
*
|
|
54
54
|
*/
|
|
55
55
|
class AccountApi extends runtime.BaseAPI {
|
|
56
|
+
/**
|
|
57
|
+
* Cancel the paid plan at the end of the current billing cycle. Access continues until then.
|
|
58
|
+
*/
|
|
59
|
+
async cancelSubscriptionRaw(requestParameters, initOverrides) {
|
|
60
|
+
if (requestParameters['cancelSubscriptionRequest'] == null) {
|
|
61
|
+
throw new runtime.RequiredError('cancelSubscriptionRequest', 'Required parameter "cancelSubscriptionRequest" was null or undefined when calling cancelSubscription().');
|
|
62
|
+
}
|
|
63
|
+
const queryParameters = {};
|
|
64
|
+
const headerParameters = {};
|
|
65
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
66
|
+
if (this.configuration &&
|
|
67
|
+
(this.configuration.username !== undefined ||
|
|
68
|
+
this.configuration.password !== undefined)) {
|
|
69
|
+
headerParameters['Authorization'] =
|
|
70
|
+
'Basic ' +
|
|
71
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
72
|
+
}
|
|
73
|
+
if (this.configuration &&
|
|
74
|
+
(this.configuration.username !== undefined ||
|
|
75
|
+
this.configuration.password !== undefined)) {
|
|
76
|
+
headerParameters['Authorization'] =
|
|
77
|
+
'Basic ' +
|
|
78
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
79
|
+
}
|
|
80
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
81
|
+
const token = this.configuration.accessToken;
|
|
82
|
+
const tokenString = await token('apiKey', []);
|
|
83
|
+
if (tokenString) {
|
|
84
|
+
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
if (this.configuration &&
|
|
88
|
+
(this.configuration.username !== undefined ||
|
|
89
|
+
this.configuration.password !== undefined)) {
|
|
90
|
+
headerParameters['Authorization'] =
|
|
91
|
+
'Basic ' +
|
|
92
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
93
|
+
}
|
|
94
|
+
let urlPath = `/account/subscription/cancel`;
|
|
95
|
+
const response = await this.request({
|
|
96
|
+
path: urlPath,
|
|
97
|
+
method: 'POST',
|
|
98
|
+
headers: headerParameters,
|
|
99
|
+
query: queryParameters,
|
|
100
|
+
body: (0, index_1.CancelSubscriptionRequestToJSON)(requestParameters['cancelSubscriptionRequest'])
|
|
101
|
+
}, initOverrides);
|
|
102
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AccountGetResponseFromJSON)(jsonValue));
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Cancel the paid plan at the end of the current billing cycle. Access continues until then.
|
|
106
|
+
*/
|
|
107
|
+
async cancelSubscription(cancelSubscriptionRequest, initOverrides) {
|
|
108
|
+
const response = await this.cancelSubscriptionRaw({ cancelSubscriptionRequest: cancelSubscriptionRequest }, initOverrides);
|
|
109
|
+
return await response.value();
|
|
110
|
+
}
|
|
56
111
|
/**
|
|
57
112
|
* Configure SMTP settings for a Supabase project
|
|
58
113
|
*/
|
|
@@ -158,6 +213,56 @@ class AccountApi extends runtime.BaseAPI {
|
|
|
158
213
|
const response = await this.getAccountDetailsRaw(initOverrides);
|
|
159
214
|
return await response.value();
|
|
160
215
|
}
|
|
216
|
+
/**
|
|
217
|
+
* Get the email address that receives invoices for this account.
|
|
218
|
+
*/
|
|
219
|
+
async getBillingEmailRaw(initOverrides) {
|
|
220
|
+
const queryParameters = {};
|
|
221
|
+
const headerParameters = {};
|
|
222
|
+
if (this.configuration &&
|
|
223
|
+
(this.configuration.username !== undefined ||
|
|
224
|
+
this.configuration.password !== undefined)) {
|
|
225
|
+
headerParameters['Authorization'] =
|
|
226
|
+
'Basic ' +
|
|
227
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
228
|
+
}
|
|
229
|
+
if (this.configuration &&
|
|
230
|
+
(this.configuration.username !== undefined ||
|
|
231
|
+
this.configuration.password !== undefined)) {
|
|
232
|
+
headerParameters['Authorization'] =
|
|
233
|
+
'Basic ' +
|
|
234
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
235
|
+
}
|
|
236
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
237
|
+
const token = this.configuration.accessToken;
|
|
238
|
+
const tokenString = await token('apiKey', []);
|
|
239
|
+
if (tokenString) {
|
|
240
|
+
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
if (this.configuration &&
|
|
244
|
+
(this.configuration.username !== undefined ||
|
|
245
|
+
this.configuration.password !== undefined)) {
|
|
246
|
+
headerParameters['Authorization'] =
|
|
247
|
+
'Basic ' +
|
|
248
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
249
|
+
}
|
|
250
|
+
let urlPath = `/account/billing-email`;
|
|
251
|
+
const response = await this.request({
|
|
252
|
+
path: urlPath,
|
|
253
|
+
method: 'GET',
|
|
254
|
+
headers: headerParameters,
|
|
255
|
+
query: queryParameters
|
|
256
|
+
}, initOverrides);
|
|
257
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BillingEmailFromJSON)(jsonValue));
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Get the email address that receives invoices for this account.
|
|
261
|
+
*/
|
|
262
|
+
async getBillingEmail(initOverrides) {
|
|
263
|
+
const response = await this.getBillingEmailRaw(initOverrides);
|
|
264
|
+
return await response.value();
|
|
265
|
+
}
|
|
161
266
|
/**
|
|
162
267
|
* Get Supabase integration status for the account
|
|
163
268
|
*/
|
|
@@ -499,6 +604,56 @@ class AccountApi extends runtime.BaseAPI {
|
|
|
499
604
|
const response = await this.prepareCheckoutSessionRaw({ billingPostRequestBody: billingPostRequestBody }, initOverrides);
|
|
500
605
|
return await response.value();
|
|
501
606
|
}
|
|
607
|
+
/**
|
|
608
|
+
* Keep the current paid plan and undo a cancellation scheduled for the end of the billing cycle.
|
|
609
|
+
*/
|
|
610
|
+
async resumeSubscriptionRaw(initOverrides) {
|
|
611
|
+
const queryParameters = {};
|
|
612
|
+
const headerParameters = {};
|
|
613
|
+
if (this.configuration &&
|
|
614
|
+
(this.configuration.username !== undefined ||
|
|
615
|
+
this.configuration.password !== undefined)) {
|
|
616
|
+
headerParameters['Authorization'] =
|
|
617
|
+
'Basic ' +
|
|
618
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
619
|
+
}
|
|
620
|
+
if (this.configuration &&
|
|
621
|
+
(this.configuration.username !== undefined ||
|
|
622
|
+
this.configuration.password !== undefined)) {
|
|
623
|
+
headerParameters['Authorization'] =
|
|
624
|
+
'Basic ' +
|
|
625
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
626
|
+
}
|
|
627
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
628
|
+
const token = this.configuration.accessToken;
|
|
629
|
+
const tokenString = await token('apiKey', []);
|
|
630
|
+
if (tokenString) {
|
|
631
|
+
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
if (this.configuration &&
|
|
635
|
+
(this.configuration.username !== undefined ||
|
|
636
|
+
this.configuration.password !== undefined)) {
|
|
637
|
+
headerParameters['Authorization'] =
|
|
638
|
+
'Basic ' +
|
|
639
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
640
|
+
}
|
|
641
|
+
let urlPath = `/account/subscription/resume`;
|
|
642
|
+
const response = await this.request({
|
|
643
|
+
path: urlPath,
|
|
644
|
+
method: 'POST',
|
|
645
|
+
headers: headerParameters,
|
|
646
|
+
query: queryParameters
|
|
647
|
+
}, initOverrides);
|
|
648
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AccountGetResponseFromJSON)(jsonValue));
|
|
649
|
+
}
|
|
650
|
+
/**
|
|
651
|
+
* Keep the current paid plan and undo a cancellation scheduled for the end of the billing cycle.
|
|
652
|
+
*/
|
|
653
|
+
async resumeSubscription(initOverrides) {
|
|
654
|
+
const response = await this.resumeSubscriptionRaw(initOverrides);
|
|
655
|
+
return await response.value();
|
|
656
|
+
}
|
|
502
657
|
/**
|
|
503
658
|
* Revoke Supabase integration (removes stored tokens and project info)
|
|
504
659
|
*/
|
|
@@ -605,7 +760,7 @@ class AccountApi extends runtime.BaseAPI {
|
|
|
605
760
|
return await response.value();
|
|
606
761
|
}
|
|
607
762
|
/**
|
|
608
|
-
* Update account billing preferences such as auto upgrade.
|
|
763
|
+
* Update account billing preferences such as auto upgrade and usage email alerts.
|
|
609
764
|
*/
|
|
610
765
|
async updateAccountSettingsRaw(requestParameters, initOverrides) {
|
|
611
766
|
if (requestParameters['accountPatchRequest'] == null) {
|
|
@@ -653,11 +808,66 @@ class AccountApi extends runtime.BaseAPI {
|
|
|
653
808
|
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AccountGetResponseFromJSON)(jsonValue));
|
|
654
809
|
}
|
|
655
810
|
/**
|
|
656
|
-
* Update account billing preferences such as auto upgrade.
|
|
811
|
+
* Update account billing preferences such as auto upgrade and usage email alerts.
|
|
657
812
|
*/
|
|
658
813
|
async updateAccountSettings(accountPatchRequest, initOverrides) {
|
|
659
814
|
const response = await this.updateAccountSettingsRaw({ accountPatchRequest: accountPatchRequest }, initOverrides);
|
|
660
815
|
return await response.value();
|
|
661
816
|
}
|
|
817
|
+
/**
|
|
818
|
+
* Update the email address that receives invoices for this account.
|
|
819
|
+
*/
|
|
820
|
+
async updateBillingEmailRaw(requestParameters, initOverrides) {
|
|
821
|
+
if (requestParameters['updateBillingEmailRequest'] == null) {
|
|
822
|
+
throw new runtime.RequiredError('updateBillingEmailRequest', 'Required parameter "updateBillingEmailRequest" was null or undefined when calling updateBillingEmail().');
|
|
823
|
+
}
|
|
824
|
+
const queryParameters = {};
|
|
825
|
+
const headerParameters = {};
|
|
826
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
827
|
+
if (this.configuration &&
|
|
828
|
+
(this.configuration.username !== undefined ||
|
|
829
|
+
this.configuration.password !== undefined)) {
|
|
830
|
+
headerParameters['Authorization'] =
|
|
831
|
+
'Basic ' +
|
|
832
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
833
|
+
}
|
|
834
|
+
if (this.configuration &&
|
|
835
|
+
(this.configuration.username !== undefined ||
|
|
836
|
+
this.configuration.password !== undefined)) {
|
|
837
|
+
headerParameters['Authorization'] =
|
|
838
|
+
'Basic ' +
|
|
839
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
840
|
+
}
|
|
841
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
842
|
+
const token = this.configuration.accessToken;
|
|
843
|
+
const tokenString = await token('apiKey', []);
|
|
844
|
+
if (tokenString) {
|
|
845
|
+
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
if (this.configuration &&
|
|
849
|
+
(this.configuration.username !== undefined ||
|
|
850
|
+
this.configuration.password !== undefined)) {
|
|
851
|
+
headerParameters['Authorization'] =
|
|
852
|
+
'Basic ' +
|
|
853
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
854
|
+
}
|
|
855
|
+
let urlPath = `/account/billing-email`;
|
|
856
|
+
const response = await this.request({
|
|
857
|
+
path: urlPath,
|
|
858
|
+
method: 'PATCH',
|
|
859
|
+
headers: headerParameters,
|
|
860
|
+
query: queryParameters,
|
|
861
|
+
body: (0, index_1.UpdateBillingEmailRequestToJSON)(requestParameters['updateBillingEmailRequest'])
|
|
862
|
+
}, initOverrides);
|
|
863
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BillingEmailFromJSON)(jsonValue));
|
|
864
|
+
}
|
|
865
|
+
/**
|
|
866
|
+
* Update the email address that receives invoices for this account.
|
|
867
|
+
*/
|
|
868
|
+
async updateBillingEmail(updateBillingEmailRequest, initOverrides) {
|
|
869
|
+
const response = await this.updateBillingEmailRaw({ updateBillingEmailRequest: updateBillingEmailRequest }, initOverrides);
|
|
870
|
+
return await response.value();
|
|
871
|
+
}
|
|
662
872
|
}
|
|
663
873
|
exports.AccountApi = AccountApi;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Explicit barrel (patched by tools/sdk-codegen/patch-node-apis-barrel.ts).
|
|
3
3
|
* Multiple `SendRequest` types from bare `send` APIs are re-exported under stable names.
|
|
4
4
|
*/
|
|
5
|
-
export type { ConfigureSupabaseSMTPRequest, GetUsageHistoryRequest, ListInvoicesRequest, PrepareCheckoutSessionRequest, SupabaseOAuthOperationRequest, UpdateAccountSettingsRequest, AccountApiInterface } from './AccountApi';
|
|
5
|
+
export type { CancelSubscriptionOperationRequest, ConfigureSupabaseSMTPRequest, GetUsageHistoryRequest, ListInvoicesRequest, PrepareCheckoutSessionRequest, SupabaseOAuthOperationRequest, UpdateAccountSettingsRequest, UpdateBillingEmailOperationRequest, AccountApiInterface } from './AccountApi';
|
|
6
6
|
export { AccountApi } from './AccountApi';
|
|
7
7
|
export type { CreateAccountOperationRequest, AccountsApiInterface } from './AccountsApi';
|
|
8
8
|
export { AccountsApi } from './AccountsApi';
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { AccountGetResponseBillingAlerts } from './AccountGetResponseBillingAlerts';
|
|
12
13
|
/**
|
|
13
14
|
* GET /account response: public plan fields for the authenticated account.
|
|
14
15
|
* @export
|
|
@@ -123,6 +124,12 @@ export interface AccountGetResponse {
|
|
|
123
124
|
* @memberof AccountGetResponse
|
|
124
125
|
*/
|
|
125
126
|
autoUpgrade?: boolean;
|
|
127
|
+
/**
|
|
128
|
+
*
|
|
129
|
+
* @type {AccountGetResponseBillingAlerts}
|
|
130
|
+
* @memberof AccountGetResponse
|
|
131
|
+
*/
|
|
132
|
+
billingAlerts?: AccountGetResponseBillingAlerts;
|
|
126
133
|
}
|
|
127
134
|
/**
|
|
128
135
|
* @export
|
|
@@ -19,6 +19,7 @@ exports.AccountGetResponseFromJSON = AccountGetResponseFromJSON;
|
|
|
19
19
|
exports.AccountGetResponseFromJSONTyped = AccountGetResponseFromJSONTyped;
|
|
20
20
|
exports.AccountGetResponseToJSON = AccountGetResponseToJSON;
|
|
21
21
|
exports.AccountGetResponseToJSONTyped = AccountGetResponseToJSONTyped;
|
|
22
|
+
const AccountGetResponseBillingAlerts_1 = require("./AccountGetResponseBillingAlerts");
|
|
22
23
|
/**
|
|
23
24
|
* @export
|
|
24
25
|
* @enum {string}
|
|
@@ -119,7 +120,10 @@ function AccountGetResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
119
120
|
pendingDowngradeAccountType: json['pendingDowngradeAccountType'] == null
|
|
120
121
|
? undefined
|
|
121
122
|
: json['pendingDowngradeAccountType'],
|
|
122
|
-
autoUpgrade: json['autoUpgrade'] == null ? undefined : json['autoUpgrade']
|
|
123
|
+
autoUpgrade: json['autoUpgrade'] == null ? undefined : json['autoUpgrade'],
|
|
124
|
+
billingAlerts: json['billingAlerts'] == null
|
|
125
|
+
? undefined
|
|
126
|
+
: (0, AccountGetResponseBillingAlerts_1.AccountGetResponseBillingAlertsFromJSON)(json['billingAlerts'])
|
|
123
127
|
};
|
|
124
128
|
}
|
|
125
129
|
function AccountGetResponseToJSON(json) {
|
|
@@ -147,6 +151,7 @@ function AccountGetResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
147
151
|
pendingDowngradeEffectiveDate: value['pendingDowngradeEffectiveDate'],
|
|
148
152
|
pendingDowngradeCostCap: value['pendingDowngradeCostCap'],
|
|
149
153
|
pendingDowngradeAccountType: value['pendingDowngradeAccountType'],
|
|
150
|
-
autoUpgrade: value['autoUpgrade']
|
|
154
|
+
autoUpgrade: value['autoUpgrade'],
|
|
155
|
+
billingAlerts: (0, AccountGetResponseBillingAlerts_1.AccountGetResponseBillingAlertsToJSON)(value['billingAlerts'])
|
|
151
156
|
};
|
|
152
157
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pingram
|
|
3
|
+
* Internal API for notification delivery and management
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Email alerts for monthly usage. New accounts start enabled for the creator at 80% and 100%.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface AccountGetResponseBillingAlerts
|
|
16
|
+
*/
|
|
17
|
+
export interface AccountGetResponseBillingAlerts {
|
|
18
|
+
/**
|
|
19
|
+
* When false, saved addresses and thresholds are kept but no email is sent.
|
|
20
|
+
* @type {boolean}
|
|
21
|
+
* @memberof AccountGetResponseBillingAlerts
|
|
22
|
+
*/
|
|
23
|
+
enabled: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Addresses that receive threshold emails. At most three.
|
|
26
|
+
* @type {Array<string>}
|
|
27
|
+
* @memberof AccountGetResponseBillingAlerts
|
|
28
|
+
*/
|
|
29
|
+
emails: Array<string>;
|
|
30
|
+
/**
|
|
31
|
+
* Percents to email, from 5 to 100 in steps of 5. At most two. At least one is required while enabled.
|
|
32
|
+
* @type {Array<number>}
|
|
33
|
+
* @memberof AccountGetResponseBillingAlerts
|
|
34
|
+
*/
|
|
35
|
+
thresholds: Array<number>;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the AccountGetResponseBillingAlerts interface.
|
|
39
|
+
*/
|
|
40
|
+
export declare function instanceOfAccountGetResponseBillingAlerts(value: object): value is AccountGetResponseBillingAlerts;
|
|
41
|
+
export declare function AccountGetResponseBillingAlertsFromJSON(json: any): AccountGetResponseBillingAlerts;
|
|
42
|
+
export declare function AccountGetResponseBillingAlertsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountGetResponseBillingAlerts;
|
|
43
|
+
export declare function AccountGetResponseBillingAlertsToJSON(json: any): AccountGetResponseBillingAlerts;
|
|
44
|
+
export declare function AccountGetResponseBillingAlertsToJSONTyped(value?: AccountGetResponseBillingAlerts | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Pingram
|
|
6
|
+
* Internal API for notification delivery and management
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfAccountGetResponseBillingAlerts = instanceOfAccountGetResponseBillingAlerts;
|
|
17
|
+
exports.AccountGetResponseBillingAlertsFromJSON = AccountGetResponseBillingAlertsFromJSON;
|
|
18
|
+
exports.AccountGetResponseBillingAlertsFromJSONTyped = AccountGetResponseBillingAlertsFromJSONTyped;
|
|
19
|
+
exports.AccountGetResponseBillingAlertsToJSON = AccountGetResponseBillingAlertsToJSON;
|
|
20
|
+
exports.AccountGetResponseBillingAlertsToJSONTyped = AccountGetResponseBillingAlertsToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the AccountGetResponseBillingAlerts interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfAccountGetResponseBillingAlerts(value) {
|
|
25
|
+
if (!('enabled' in value) || value['enabled'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('emails' in value) || value['emails'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('thresholds' in value) || value['thresholds'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
function AccountGetResponseBillingAlertsFromJSON(json) {
|
|
34
|
+
return AccountGetResponseBillingAlertsFromJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
function AccountGetResponseBillingAlertsFromJSONTyped(json, ignoreDiscriminator) {
|
|
37
|
+
if (json == null) {
|
|
38
|
+
return json;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
enabled: json['enabled'],
|
|
42
|
+
emails: json['emails'],
|
|
43
|
+
thresholds: json['thresholds']
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function AccountGetResponseBillingAlertsToJSON(json) {
|
|
47
|
+
return AccountGetResponseBillingAlertsToJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
function AccountGetResponseBillingAlertsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
50
|
+
if (value == null) {
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
enabled: value['enabled'],
|
|
55
|
+
emails: value['emails'],
|
|
56
|
+
thresholds: value['thresholds']
|
|
57
|
+
};
|
|
58
|
+
}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { AccountGetResponseBillingAlerts } from './AccountGetResponseBillingAlerts';
|
|
12
13
|
/**
|
|
13
14
|
* PATCH /account request: billing preferences.
|
|
14
15
|
* @export
|
|
@@ -21,6 +22,12 @@ export interface AccountPatchRequest {
|
|
|
21
22
|
* @memberof AccountPatchRequest
|
|
22
23
|
*/
|
|
23
24
|
autoUpgrade?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {AccountGetResponseBillingAlerts}
|
|
28
|
+
* @memberof AccountPatchRequest
|
|
29
|
+
*/
|
|
30
|
+
billingAlerts?: AccountGetResponseBillingAlerts;
|
|
24
31
|
}
|
|
25
32
|
/**
|
|
26
33
|
* Check if a given object implements the AccountPatchRequest interface.
|
|
@@ -18,6 +18,7 @@ exports.AccountPatchRequestFromJSON = AccountPatchRequestFromJSON;
|
|
|
18
18
|
exports.AccountPatchRequestFromJSONTyped = AccountPatchRequestFromJSONTyped;
|
|
19
19
|
exports.AccountPatchRequestToJSON = AccountPatchRequestToJSON;
|
|
20
20
|
exports.AccountPatchRequestToJSONTyped = AccountPatchRequestToJSONTyped;
|
|
21
|
+
const AccountGetResponseBillingAlerts_1 = require("./AccountGetResponseBillingAlerts");
|
|
21
22
|
/**
|
|
22
23
|
* Check if a given object implements the AccountPatchRequest interface.
|
|
23
24
|
*/
|
|
@@ -32,7 +33,10 @@ function AccountPatchRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
32
33
|
return json;
|
|
33
34
|
}
|
|
34
35
|
return {
|
|
35
|
-
autoUpgrade: json['autoUpgrade'] == null ? undefined : json['autoUpgrade']
|
|
36
|
+
autoUpgrade: json['autoUpgrade'] == null ? undefined : json['autoUpgrade'],
|
|
37
|
+
billingAlerts: json['billingAlerts'] == null
|
|
38
|
+
? undefined
|
|
39
|
+
: (0, AccountGetResponseBillingAlerts_1.AccountGetResponseBillingAlertsFromJSON)(json['billingAlerts'])
|
|
36
40
|
};
|
|
37
41
|
}
|
|
38
42
|
function AccountPatchRequestToJSON(json) {
|
|
@@ -43,6 +47,7 @@ function AccountPatchRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
43
47
|
return value;
|
|
44
48
|
}
|
|
45
49
|
return {
|
|
46
|
-
autoUpgrade: value['autoUpgrade']
|
|
50
|
+
autoUpgrade: value['autoUpgrade'],
|
|
51
|
+
billingAlerts: (0, AccountGetResponseBillingAlerts_1.AccountGetResponseBillingAlertsToJSON)(value['billingAlerts'])
|
|
47
52
|
};
|
|
48
53
|
}
|