pingram 1.0.29 → 1.0.30-alpha.1462
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 +25 -1
- package/dist/generated/src/apis/AccountApi.js +55 -0
- package/dist/generated/src/apis/index.d.ts +1 -1
- package/dist/generated/src/models/AccountGetResponse.d.ts +6 -0
- package/dist/generated/src/models/AccountGetResponse.js +4 -2
- package/dist/generated/src/models/AccountPatchRequest.d.ts +32 -0
- package/dist/generated/src/models/AccountPatchRequest.js +48 -0
- package/dist/generated/src/models/BillingPostResponseBody.d.ts +6 -0
- package/dist/generated/src/models/BillingPostResponseBody.js +2 -0
- package/dist/generated/src/models/index.d.ts +1 -0
- package/dist/generated/src/models/index.js +1 -0
- package/dist/src/client.js +1 -1
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { AccountGetResponse, BillingPostRequestBody, BillingPostResponseBody, GetUsageHistoryResponse, GetUsageResponse, ListInvoicesResponse, SupabaseConfigureRequest, SupabaseConfigureResponse, SupabaseOAuthRequest, SupabaseOAuthResponse, SupabaseProjectsResponse, SupabaseStatusResponse } from '../models/index';
|
|
13
|
+
import type { AccountGetResponse, AccountPatchRequest, BillingPostRequestBody, BillingPostResponseBody, GetUsageHistoryResponse, GetUsageResponse, ListInvoicesResponse, SupabaseConfigureRequest, SupabaseConfigureResponse, SupabaseOAuthRequest, SupabaseOAuthResponse, SupabaseProjectsResponse, SupabaseStatusResponse } from '../models/index';
|
|
14
14
|
export interface ConfigureSupabaseSMTPRequest {
|
|
15
15
|
supabaseConfigureRequest: SupabaseConfigureRequest;
|
|
16
16
|
}
|
|
@@ -31,6 +31,9 @@ export interface PrepareCheckoutSessionRequest {
|
|
|
31
31
|
export interface SupabaseOAuthOperationRequest {
|
|
32
32
|
supabaseOAuthRequest: SupabaseOAuthRequest;
|
|
33
33
|
}
|
|
34
|
+
export interface UpdateAccountSettingsRequest {
|
|
35
|
+
accountPatchRequest: AccountPatchRequest;
|
|
36
|
+
}
|
|
34
37
|
/**
|
|
35
38
|
* AccountApi - interface
|
|
36
39
|
*
|
|
@@ -168,6 +171,19 @@ export interface AccountApiInterface {
|
|
|
168
171
|
* Exchange Supabase OAuth authorization code for tokens
|
|
169
172
|
*/
|
|
170
173
|
supabaseOAuth(supabaseOAuthRequest: SupabaseOAuthRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SupabaseOAuthResponse>;
|
|
174
|
+
/**
|
|
175
|
+
*
|
|
176
|
+
* @summary Update account billing preferences. Only account owners can change these settings.
|
|
177
|
+
* @param {AccountPatchRequest} accountPatchRequest
|
|
178
|
+
* @param {*} [options] Override http request option.
|
|
179
|
+
* @throws {RequiredError}
|
|
180
|
+
* @memberof AccountApiInterface
|
|
181
|
+
*/
|
|
182
|
+
updateAccountSettingsRaw(requestParameters: UpdateAccountSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountGetResponse>>;
|
|
183
|
+
/**
|
|
184
|
+
* Update account billing preferences. Only account owners can change these settings.
|
|
185
|
+
*/
|
|
186
|
+
updateAccountSettings(accountPatchRequest: AccountPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountGetResponse>;
|
|
171
187
|
}
|
|
172
188
|
/**
|
|
173
189
|
*
|
|
@@ -253,4 +269,12 @@ export declare class AccountApi extends runtime.BaseAPI implements AccountApiInt
|
|
|
253
269
|
* Exchange Supabase OAuth authorization code for tokens
|
|
254
270
|
*/
|
|
255
271
|
supabaseOAuth(supabaseOAuthRequest: SupabaseOAuthRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SupabaseOAuthResponse>;
|
|
272
|
+
/**
|
|
273
|
+
* Update account billing preferences. Only account owners can change these settings.
|
|
274
|
+
*/
|
|
275
|
+
updateAccountSettingsRaw(requestParameters: UpdateAccountSettingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccountGetResponse>>;
|
|
276
|
+
/**
|
|
277
|
+
* Update account billing preferences. Only account owners can change these settings.
|
|
278
|
+
*/
|
|
279
|
+
updateAccountSettings(accountPatchRequest: AccountPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountGetResponse>;
|
|
256
280
|
}
|
|
@@ -601,5 +601,60 @@ class AccountApi extends runtime.BaseAPI {
|
|
|
601
601
|
const response = await this.supabaseOAuthRaw({ supabaseOAuthRequest: supabaseOAuthRequest }, initOverrides);
|
|
602
602
|
return await response.value();
|
|
603
603
|
}
|
|
604
|
+
/**
|
|
605
|
+
* Update account billing preferences. Only account owners can change these settings.
|
|
606
|
+
*/
|
|
607
|
+
async updateAccountSettingsRaw(requestParameters, initOverrides) {
|
|
608
|
+
if (requestParameters['accountPatchRequest'] == null) {
|
|
609
|
+
throw new runtime.RequiredError('accountPatchRequest', 'Required parameter "accountPatchRequest" was null or undefined when calling updateAccountSettings().');
|
|
610
|
+
}
|
|
611
|
+
const queryParameters = {};
|
|
612
|
+
const headerParameters = {};
|
|
613
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
614
|
+
if (this.configuration &&
|
|
615
|
+
(this.configuration.username !== undefined ||
|
|
616
|
+
this.configuration.password !== undefined)) {
|
|
617
|
+
headerParameters['Authorization'] =
|
|
618
|
+
'Basic ' +
|
|
619
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
620
|
+
}
|
|
621
|
+
if (this.configuration &&
|
|
622
|
+
(this.configuration.username !== undefined ||
|
|
623
|
+
this.configuration.password !== undefined)) {
|
|
624
|
+
headerParameters['Authorization'] =
|
|
625
|
+
'Basic ' +
|
|
626
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
627
|
+
}
|
|
628
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
629
|
+
const token = this.configuration.accessToken;
|
|
630
|
+
const tokenString = await token('apiKey', []);
|
|
631
|
+
if (tokenString) {
|
|
632
|
+
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
if (this.configuration &&
|
|
636
|
+
(this.configuration.username !== undefined ||
|
|
637
|
+
this.configuration.password !== undefined)) {
|
|
638
|
+
headerParameters['Authorization'] =
|
|
639
|
+
'Basic ' +
|
|
640
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
641
|
+
}
|
|
642
|
+
let urlPath = `/account`;
|
|
643
|
+
const response = await this.request({
|
|
644
|
+
path: urlPath,
|
|
645
|
+
method: 'PATCH',
|
|
646
|
+
headers: headerParameters,
|
|
647
|
+
query: queryParameters,
|
|
648
|
+
body: (0, index_1.AccountPatchRequestToJSON)(requestParameters['accountPatchRequest'])
|
|
649
|
+
}, initOverrides);
|
|
650
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AccountGetResponseFromJSON)(jsonValue));
|
|
651
|
+
}
|
|
652
|
+
/**
|
|
653
|
+
* Update account billing preferences. Only account owners can change these settings.
|
|
654
|
+
*/
|
|
655
|
+
async updateAccountSettings(accountPatchRequest, initOverrides) {
|
|
656
|
+
const response = await this.updateAccountSettingsRaw({ accountPatchRequest: accountPatchRequest }, initOverrides);
|
|
657
|
+
return await response.value();
|
|
658
|
+
}
|
|
604
659
|
}
|
|
605
660
|
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, AccountApiInterface } from './AccountApi';
|
|
5
|
+
export type { ConfigureSupabaseSMTPRequest, GetUsageHistoryRequest, ListInvoicesRequest, PrepareCheckoutSessionRequest, SupabaseOAuthOperationRequest, UpdateAccountSettingsRequest, AccountApiInterface } from './AccountApi';
|
|
6
6
|
export { AccountApi } from './AccountApi';
|
|
7
7
|
export type { CreateAccountOperationRequest, AccountsApiInterface } from './AccountsApi';
|
|
8
8
|
export { AccountsApi } from './AccountsApi';
|
|
@@ -117,6 +117,12 @@ export interface AccountGetResponse {
|
|
|
117
117
|
* @memberof AccountGetResponse
|
|
118
118
|
*/
|
|
119
119
|
pendingDowngradeAccountType?: AccountGetResponsePendingDowngradeAccountTypeEnum;
|
|
120
|
+
/**
|
|
121
|
+
* When true, paid accounts move up one budget tier at 90% of the monthly budget.
|
|
122
|
+
* @type {boolean}
|
|
123
|
+
* @memberof AccountGetResponse
|
|
124
|
+
*/
|
|
125
|
+
autoUpgrade?: boolean;
|
|
120
126
|
}
|
|
121
127
|
/**
|
|
122
128
|
* @export
|
|
@@ -118,7 +118,8 @@ function AccountGetResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
118
118
|
: json['pendingDowngradeCostCap'],
|
|
119
119
|
pendingDowngradeAccountType: json['pendingDowngradeAccountType'] == null
|
|
120
120
|
? undefined
|
|
121
|
-
: json['pendingDowngradeAccountType']
|
|
121
|
+
: json['pendingDowngradeAccountType'],
|
|
122
|
+
autoUpgrade: json['autoUpgrade'] == null ? undefined : json['autoUpgrade']
|
|
122
123
|
};
|
|
123
124
|
}
|
|
124
125
|
function AccountGetResponseToJSON(json) {
|
|
@@ -145,6 +146,7 @@ function AccountGetResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
145
146
|
subscriptionStatus: value['subscriptionStatus'],
|
|
146
147
|
pendingDowngradeEffectiveDate: value['pendingDowngradeEffectiveDate'],
|
|
147
148
|
pendingDowngradeCostCap: value['pendingDowngradeCostCap'],
|
|
148
|
-
pendingDowngradeAccountType: value['pendingDowngradeAccountType']
|
|
149
|
+
pendingDowngradeAccountType: value['pendingDowngradeAccountType'],
|
|
150
|
+
autoUpgrade: value['autoUpgrade']
|
|
149
151
|
};
|
|
150
152
|
}
|
|
@@ -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 request: billing preferences.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface AccountPatchRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface AccountPatchRequest {
|
|
18
|
+
/**
|
|
19
|
+
* When true, automatically move up one budget tier at 90% of the monthly budget.
|
|
20
|
+
* @type {boolean}
|
|
21
|
+
* @memberof AccountPatchRequest
|
|
22
|
+
*/
|
|
23
|
+
autoUpgrade?: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the AccountPatchRequest interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfAccountPatchRequest(value: object): value is AccountPatchRequest;
|
|
29
|
+
export declare function AccountPatchRequestFromJSON(json: any): AccountPatchRequest;
|
|
30
|
+
export declare function AccountPatchRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountPatchRequest;
|
|
31
|
+
export declare function AccountPatchRequestToJSON(json: any): AccountPatchRequest;
|
|
32
|
+
export declare function AccountPatchRequestToJSONTyped(value?: AccountPatchRequest | 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.instanceOfAccountPatchRequest = instanceOfAccountPatchRequest;
|
|
17
|
+
exports.AccountPatchRequestFromJSON = AccountPatchRequestFromJSON;
|
|
18
|
+
exports.AccountPatchRequestFromJSONTyped = AccountPatchRequestFromJSONTyped;
|
|
19
|
+
exports.AccountPatchRequestToJSON = AccountPatchRequestToJSON;
|
|
20
|
+
exports.AccountPatchRequestToJSONTyped = AccountPatchRequestToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the AccountPatchRequest interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfAccountPatchRequest(value) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
function AccountPatchRequestFromJSON(json) {
|
|
28
|
+
return AccountPatchRequestFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
function AccountPatchRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
autoUpgrade: json['autoUpgrade'] == null ? undefined : json['autoUpgrade']
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function AccountPatchRequestToJSON(json) {
|
|
39
|
+
return AccountPatchRequestToJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
function AccountPatchRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
42
|
+
if (value == null) {
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
autoUpgrade: value['autoUpgrade']
|
|
47
|
+
};
|
|
48
|
+
}
|
|
@@ -117,6 +117,12 @@ export interface BillingPostResponseBody {
|
|
|
117
117
|
* @memberof BillingPostResponseBody
|
|
118
118
|
*/
|
|
119
119
|
pendingDowngradeAccountType?: BillingPostResponseBodyPendingDowngradeAccountTypeEnum;
|
|
120
|
+
/**
|
|
121
|
+
* When true, paid accounts move up one budget tier at 90% of the monthly budget.
|
|
122
|
+
* @type {boolean}
|
|
123
|
+
* @memberof BillingPostResponseBody
|
|
124
|
+
*/
|
|
125
|
+
autoUpgrade?: boolean;
|
|
120
126
|
/**
|
|
121
127
|
*
|
|
122
128
|
* @type {string}
|
|
@@ -119,6 +119,7 @@ function BillingPostResponseBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
119
119
|
pendingDowngradeAccountType: json['pendingDowngradeAccountType'] == null
|
|
120
120
|
? undefined
|
|
121
121
|
: json['pendingDowngradeAccountType'],
|
|
122
|
+
autoUpgrade: json['autoUpgrade'] == null ? undefined : json['autoUpgrade'],
|
|
122
123
|
sessionId: json['sessionId'] == null ? undefined : json['sessionId'],
|
|
123
124
|
url: json['url'] == null ? undefined : json['url']
|
|
124
125
|
};
|
|
@@ -148,6 +149,7 @@ function BillingPostResponseBodyToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
148
149
|
pendingDowngradeEffectiveDate: value['pendingDowngradeEffectiveDate'],
|
|
149
150
|
pendingDowngradeCostCap: value['pendingDowngradeCostCap'],
|
|
150
151
|
pendingDowngradeAccountType: value['pendingDowngradeAccountType'],
|
|
152
|
+
autoUpgrade: value['autoUpgrade'],
|
|
151
153
|
sessionId: value['sessionId'],
|
|
152
154
|
url: value['url']
|
|
153
155
|
};
|
|
@@ -3,6 +3,7 @@ export * from './AcceptInviteResponse';
|
|
|
3
3
|
export * from './AccountAddressesResponse';
|
|
4
4
|
export * from './AccountAddressesResponseAddressesInner';
|
|
5
5
|
export * from './AccountGetResponse';
|
|
6
|
+
export * from './AccountPatchRequest';
|
|
6
7
|
export * from './AddressResponse';
|
|
7
8
|
export * from './ApiErrorBody';
|
|
8
9
|
export * from './ApiErrorResponse';
|
|
@@ -21,6 +21,7 @@ __exportStar(require("./AcceptInviteResponse"), exports);
|
|
|
21
21
|
__exportStar(require("./AccountAddressesResponse"), exports);
|
|
22
22
|
__exportStar(require("./AccountAddressesResponseAddressesInner"), exports);
|
|
23
23
|
__exportStar(require("./AccountGetResponse"), exports);
|
|
24
|
+
__exportStar(require("./AccountPatchRequest"), exports);
|
|
24
25
|
__exportStar(require("./AddressResponse"), exports);
|
|
25
26
|
__exportStar(require("./ApiErrorBody"), exports);
|
|
26
27
|
__exportStar(require("./ApiErrorResponse"), exports);
|
package/dist/src/client.js
CHANGED
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
8
8
|
exports.Pingram = void 0;
|
|
9
9
|
const src_1 = require("../generated/src");
|
|
10
10
|
// SDK version for User-Agent header (injected at codegen time)
|
|
11
|
-
const SDK_VERSION = '1.0.
|
|
11
|
+
const SDK_VERSION = '1.0.30';
|
|
12
12
|
const USER_AGENT = `pingram-node/${SDK_VERSION}`;
|
|
13
13
|
const src_2 = require("../generated/src");
|
|
14
14
|
const src_3 = require("../generated/src");
|
package/package.json
CHANGED