pingram 1.0.36-alpha.1585 → 1.0.36-alpha.1587
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 +89 -1
- package/dist/generated/src/apis/AccountApi.js +210 -0
- package/dist/generated/src/apis/index.d.ts +1 -1
- package/dist/generated/src/models/BillingEmail.d.ts +32 -0
- package/dist/generated/src/models/BillingEmail.js +48 -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/UpdateBillingEmailRequest.d.ts +32 -0
- package/dist/generated/src/models/UpdateBillingEmailRequest.js +50 -0
- package/dist/generated/src/models/index.d.ts +3 -0
- package/dist/generated/src/models/index.js +3 -0
- 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)
|
|
@@ -186,11 +229,32 @@ export interface AccountApiInterface {
|
|
|
186
229
|
* Update account billing preferences such as auto upgrade.
|
|
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
|
*/
|
|
@@ -279,4 +359,12 @@ export declare class AccountApi extends runtime.BaseAPI implements AccountApiInt
|
|
|
279
359
|
* Update account billing preferences such as auto upgrade.
|
|
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
|
*/
|
|
@@ -659,5 +814,60 @@ class AccountApi extends runtime.BaseAPI {
|
|
|
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';
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
* GET/PATCH /account/billing-email response.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface BillingEmail
|
|
16
|
+
*/
|
|
17
|
+
export interface BillingEmail {
|
|
18
|
+
/**
|
|
19
|
+
* Address that receives invoices and receipts.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof BillingEmail
|
|
22
|
+
*/
|
|
23
|
+
email?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the BillingEmail interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfBillingEmail(value: object): value is BillingEmail;
|
|
29
|
+
export declare function BillingEmailFromJSON(json: any): BillingEmail;
|
|
30
|
+
export declare function BillingEmailFromJSONTyped(json: any, ignoreDiscriminator: boolean): BillingEmail;
|
|
31
|
+
export declare function BillingEmailToJSON(json: any): BillingEmail;
|
|
32
|
+
export declare function BillingEmailToJSONTyped(value?: BillingEmail | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,48 @@
|
|
|
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.instanceOfBillingEmail = instanceOfBillingEmail;
|
|
17
|
+
exports.BillingEmailFromJSON = BillingEmailFromJSON;
|
|
18
|
+
exports.BillingEmailFromJSONTyped = BillingEmailFromJSONTyped;
|
|
19
|
+
exports.BillingEmailToJSON = BillingEmailToJSON;
|
|
20
|
+
exports.BillingEmailToJSONTyped = BillingEmailToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the BillingEmail interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfBillingEmail(value) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
function BillingEmailFromJSON(json) {
|
|
28
|
+
return BillingEmailFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
function BillingEmailFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
email: json['email'] == null ? undefined : json['email']
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function BillingEmailToJSON(json) {
|
|
39
|
+
return BillingEmailToJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
function BillingEmailToJSONTyped(value, ignoreDiscriminator = false) {
|
|
42
|
+
if (value == null) {
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
email: value['email']
|
|
47
|
+
};
|
|
48
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
* POST /account/subscription/cancel request.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface CancelSubscriptionRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface CancelSubscriptionRequest {
|
|
18
|
+
/**
|
|
19
|
+
* Optional note about why you are canceling. Helps us improve the product.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof CancelSubscriptionRequest
|
|
22
|
+
*/
|
|
23
|
+
reason?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the CancelSubscriptionRequest interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfCancelSubscriptionRequest(value: object): value is CancelSubscriptionRequest;
|
|
29
|
+
export declare function CancelSubscriptionRequestFromJSON(json: any): CancelSubscriptionRequest;
|
|
30
|
+
export declare function CancelSubscriptionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CancelSubscriptionRequest;
|
|
31
|
+
export declare function CancelSubscriptionRequestToJSON(json: any): CancelSubscriptionRequest;
|
|
32
|
+
export declare function CancelSubscriptionRequestToJSONTyped(value?: CancelSubscriptionRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,48 @@
|
|
|
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.instanceOfCancelSubscriptionRequest = instanceOfCancelSubscriptionRequest;
|
|
17
|
+
exports.CancelSubscriptionRequestFromJSON = CancelSubscriptionRequestFromJSON;
|
|
18
|
+
exports.CancelSubscriptionRequestFromJSONTyped = CancelSubscriptionRequestFromJSONTyped;
|
|
19
|
+
exports.CancelSubscriptionRequestToJSON = CancelSubscriptionRequestToJSON;
|
|
20
|
+
exports.CancelSubscriptionRequestToJSONTyped = CancelSubscriptionRequestToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the CancelSubscriptionRequest interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfCancelSubscriptionRequest(value) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
function CancelSubscriptionRequestFromJSON(json) {
|
|
28
|
+
return CancelSubscriptionRequestFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
function CancelSubscriptionRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
reason: json['reason'] == null ? undefined : json['reason']
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function CancelSubscriptionRequestToJSON(json) {
|
|
39
|
+
return CancelSubscriptionRequestToJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
function CancelSubscriptionRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
42
|
+
if (value == null) {
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
reason: value['reason']
|
|
47
|
+
};
|
|
48
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
* PATCH /account/billing-email request.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface UpdateBillingEmailRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface UpdateBillingEmailRequest {
|
|
18
|
+
/**
|
|
19
|
+
* Address that receives invoices and receipts.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof UpdateBillingEmailRequest
|
|
22
|
+
*/
|
|
23
|
+
email: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the UpdateBillingEmailRequest interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfUpdateBillingEmailRequest(value: object): value is UpdateBillingEmailRequest;
|
|
29
|
+
export declare function UpdateBillingEmailRequestFromJSON(json: any): UpdateBillingEmailRequest;
|
|
30
|
+
export declare function UpdateBillingEmailRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateBillingEmailRequest;
|
|
31
|
+
export declare function UpdateBillingEmailRequestToJSON(json: any): UpdateBillingEmailRequest;
|
|
32
|
+
export declare function UpdateBillingEmailRequestToJSONTyped(value?: UpdateBillingEmailRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,50 @@
|
|
|
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.instanceOfUpdateBillingEmailRequest = instanceOfUpdateBillingEmailRequest;
|
|
17
|
+
exports.UpdateBillingEmailRequestFromJSON = UpdateBillingEmailRequestFromJSON;
|
|
18
|
+
exports.UpdateBillingEmailRequestFromJSONTyped = UpdateBillingEmailRequestFromJSONTyped;
|
|
19
|
+
exports.UpdateBillingEmailRequestToJSON = UpdateBillingEmailRequestToJSON;
|
|
20
|
+
exports.UpdateBillingEmailRequestToJSONTyped = UpdateBillingEmailRequestToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the UpdateBillingEmailRequest interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfUpdateBillingEmailRequest(value) {
|
|
25
|
+
if (!('email' in value) || value['email'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function UpdateBillingEmailRequestFromJSON(json) {
|
|
30
|
+
return UpdateBillingEmailRequestFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function UpdateBillingEmailRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
email: json['email']
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function UpdateBillingEmailRequestToJSON(json) {
|
|
41
|
+
return UpdateBillingEmailRequestToJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
function UpdateBillingEmailRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
|
+
if (value == null) {
|
|
45
|
+
return value;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
email: value['email']
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -11,6 +11,7 @@ export * from './AutoJoinGetResponse';
|
|
|
11
11
|
export * from './AutoJoinPostResponse';
|
|
12
12
|
export * from './AutoJoinRequestBody';
|
|
13
13
|
export * from './BeeTokenV2';
|
|
14
|
+
export * from './BillingEmail';
|
|
14
15
|
export * from './BillingPostRequestBody';
|
|
15
16
|
export * from './BillingPostResponseBody';
|
|
16
17
|
export * from './BindNumberRequest';
|
|
@@ -29,6 +30,7 @@ export * from './BroadcastMetricsResponse';
|
|
|
29
30
|
export * from './BroadcastResponse';
|
|
30
31
|
export * from './BroadcastResponseAudience';
|
|
31
32
|
export * from './CampaignWebhookResponse';
|
|
33
|
+
export * from './CancelSubscriptionRequest';
|
|
32
34
|
export * from './Chained';
|
|
33
35
|
export * from './ChangeEmailRequest';
|
|
34
36
|
export * from './ChangePhoneRequest';
|
|
@@ -274,6 +276,7 @@ export * from './TenDlcCampaignUpdateRequest';
|
|
|
274
276
|
export * from './Transfer';
|
|
275
277
|
export * from './UnbindNumberResponse';
|
|
276
278
|
export * from './UpdateAddressRequest';
|
|
279
|
+
export * from './UpdateBillingEmailRequest';
|
|
277
280
|
export * from './UpdateBroadcastRequest';
|
|
278
281
|
export * from './UpdateVoiceAgentRequest';
|
|
279
282
|
export * from './UpdateVoiceAgentResponse';
|
|
@@ -29,6 +29,7 @@ __exportStar(require("./AutoJoinGetResponse"), exports);
|
|
|
29
29
|
__exportStar(require("./AutoJoinPostResponse"), exports);
|
|
30
30
|
__exportStar(require("./AutoJoinRequestBody"), exports);
|
|
31
31
|
__exportStar(require("./BeeTokenV2"), exports);
|
|
32
|
+
__exportStar(require("./BillingEmail"), exports);
|
|
32
33
|
__exportStar(require("./BillingPostRequestBody"), exports);
|
|
33
34
|
__exportStar(require("./BillingPostResponseBody"), exports);
|
|
34
35
|
__exportStar(require("./BindNumberRequest"), exports);
|
|
@@ -47,6 +48,7 @@ __exportStar(require("./BroadcastMetricsResponse"), exports);
|
|
|
47
48
|
__exportStar(require("./BroadcastResponse"), exports);
|
|
48
49
|
__exportStar(require("./BroadcastResponseAudience"), exports);
|
|
49
50
|
__exportStar(require("./CampaignWebhookResponse"), exports);
|
|
51
|
+
__exportStar(require("./CancelSubscriptionRequest"), exports);
|
|
50
52
|
__exportStar(require("./Chained"), exports);
|
|
51
53
|
__exportStar(require("./ChangeEmailRequest"), exports);
|
|
52
54
|
__exportStar(require("./ChangePhoneRequest"), exports);
|
|
@@ -292,6 +294,7 @@ __exportStar(require("./TenDlcCampaignUpdateRequest"), exports);
|
|
|
292
294
|
__exportStar(require("./Transfer"), exports);
|
|
293
295
|
__exportStar(require("./UnbindNumberResponse"), exports);
|
|
294
296
|
__exportStar(require("./UpdateAddressRequest"), exports);
|
|
297
|
+
__exportStar(require("./UpdateBillingEmailRequest"), exports);
|
|
295
298
|
__exportStar(require("./UpdateBroadcastRequest"), exports);
|
|
296
299
|
__exportStar(require("./UpdateVoiceAgentRequest"), exports);
|
|
297
300
|
__exportStar(require("./UpdateVoiceAgentResponse"), exports);
|
package/package.json
CHANGED