pingram 1.0.2-alpha.873 → 1.0.2-alpha.875
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 +21 -1
- package/dist/generated/src/apis/AccountApi.js +50 -0
- package/dist/generated/src/apis/OrganizationApi.d.ts +72 -0
- package/dist/generated/src/apis/OrganizationApi.js +169 -0
- package/dist/generated/src/apis/index.d.ts +1 -0
- package/dist/generated/src/apis/index.js +1 -0
- package/dist/generated/src/models/AccountGetResponse.d.ts +6 -60
- package/dist/generated/src/models/AccountGetResponse.js +5 -47
- package/dist/generated/src/models/BillingPostRequestBody.d.ts +8 -2
- package/dist/generated/src/models/BillingPostRequestBody.js +4 -4
- package/dist/generated/src/models/BillingPostResponseBody.d.ts +84 -16
- package/dist/generated/src/models/BillingPostResponseBody.js +72 -23
- package/dist/generated/src/models/GetUsageHistoryQuery.d.ts +38 -0
- package/dist/generated/src/models/GetUsageHistoryQuery.js +54 -0
- package/dist/generated/src/models/LogsGetResponseLogsInner.d.ts +48 -0
- package/dist/generated/src/models/LogsGetResponseLogsInner.js +26 -0
- package/dist/generated/src/models/Organization.d.ts +204 -0
- package/dist/generated/src/models/Organization.js +171 -0
- package/dist/generated/src/models/OrganizationUsage.d.ts +70 -0
- package/dist/generated/src/models/OrganizationUsage.js +75 -0
- package/dist/generated/src/models/OrganizationUsageHistory.d.ts +33 -0
- package/dist/generated/src/models/OrganizationUsageHistory.js +51 -0
- package/dist/generated/src/models/OrganizationUsageHistoryItemsInner.d.ts +64 -0
- package/dist/generated/src/models/OrganizationUsageHistoryItemsInner.js +70 -0
- package/dist/generated/src/models/index.d.ts +5 -2
- package/dist/generated/src/models/index.js +5 -2
- package/dist/src/client.d.ts +2 -0
- package/dist/src/client.js +17 -14
- package/package.json +1 -1
- package/dist/generated/src/models/AccountGetResponsePendingDowngradeUsageLimit.d.ts +0 -68
- package/dist/generated/src/models/AccountGetResponsePendingDowngradeUsageLimit.js +0 -60
- package/dist/generated/src/models/BillingPostResponseBodyPendingDowngradeUsageLimit.d.ts +0 -68
- package/dist/generated/src/models/BillingPostResponseBodyPendingDowngradeUsageLimit.js +0 -60
|
@@ -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, CreateAccountRequestBody, CreateAccountResponse, SupabaseConfigureRequest, SupabaseConfigureResponse, SupabaseOAuthRequest, SupabaseOAuthResponse, SupabaseProjectsResponse, SupabaseStatusResponse } from '../models/index';
|
|
13
|
+
import type { AccountGetResponse, BillingPostRequestBody, BillingPostResponseBody, CreateAccountRequestBody, CreateAccountResponse, Organization, SupabaseConfigureRequest, SupabaseConfigureResponse, SupabaseOAuthRequest, SupabaseOAuthResponse, SupabaseProjectsResponse, SupabaseStatusResponse } from '../models/index';
|
|
14
14
|
export interface ConfigureSupabaseSMTPRequest {
|
|
15
15
|
supabaseConfigureRequest: SupabaseConfigureRequest;
|
|
16
16
|
}
|
|
@@ -55,6 +55,18 @@ export interface AccountApiInterface {
|
|
|
55
55
|
* Get account information for the authenticated user
|
|
56
56
|
*/
|
|
57
57
|
getAccountDetails(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountGetResponse>;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @summary Get organization for the authenticated account (new billing model).
|
|
61
|
+
* @param {*} [options] Override http request option.
|
|
62
|
+
* @throws {RequiredError}
|
|
63
|
+
* @memberof AccountApiInterface
|
|
64
|
+
*/
|
|
65
|
+
getOrganizationRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Organization>>;
|
|
66
|
+
/**
|
|
67
|
+
* Get organization for the authenticated account (new billing model).
|
|
68
|
+
*/
|
|
69
|
+
getOrganization(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Organization>;
|
|
58
70
|
/**
|
|
59
71
|
*
|
|
60
72
|
* @summary Get Supabase integration status for the account
|
|
@@ -151,6 +163,14 @@ export declare class AccountApi extends runtime.BaseAPI implements AccountApiInt
|
|
|
151
163
|
* Get account information for the authenticated user
|
|
152
164
|
*/
|
|
153
165
|
getAccountDetails(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccountGetResponse>;
|
|
166
|
+
/**
|
|
167
|
+
* Get organization for the authenticated account (new billing model).
|
|
168
|
+
*/
|
|
169
|
+
getOrganizationRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Organization>>;
|
|
170
|
+
/**
|
|
171
|
+
* Get organization for the authenticated account (new billing model).
|
|
172
|
+
*/
|
|
173
|
+
getOrganization(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Organization>;
|
|
154
174
|
/**
|
|
155
175
|
* Get Supabase integration status for the account
|
|
156
176
|
*/
|
|
@@ -158,6 +158,56 @@ class AccountApi extends runtime.BaseAPI {
|
|
|
158
158
|
const response = await this.getAccountDetailsRaw(initOverrides);
|
|
159
159
|
return await response.value();
|
|
160
160
|
}
|
|
161
|
+
/**
|
|
162
|
+
* Get organization for the authenticated account (new billing model).
|
|
163
|
+
*/
|
|
164
|
+
async getOrganizationRaw(initOverrides) {
|
|
165
|
+
const queryParameters = {};
|
|
166
|
+
const headerParameters = {};
|
|
167
|
+
if (this.configuration &&
|
|
168
|
+
(this.configuration.username !== undefined ||
|
|
169
|
+
this.configuration.password !== undefined)) {
|
|
170
|
+
headerParameters['Authorization'] =
|
|
171
|
+
'Basic ' +
|
|
172
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
173
|
+
}
|
|
174
|
+
if (this.configuration &&
|
|
175
|
+
(this.configuration.username !== undefined ||
|
|
176
|
+
this.configuration.password !== undefined)) {
|
|
177
|
+
headerParameters['Authorization'] =
|
|
178
|
+
'Basic ' +
|
|
179
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
180
|
+
}
|
|
181
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
182
|
+
const token = this.configuration.accessToken;
|
|
183
|
+
const tokenString = await token('apiKey', []);
|
|
184
|
+
if (tokenString) {
|
|
185
|
+
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
if (this.configuration &&
|
|
189
|
+
(this.configuration.username !== undefined ||
|
|
190
|
+
this.configuration.password !== undefined)) {
|
|
191
|
+
headerParameters['Authorization'] =
|
|
192
|
+
'Basic ' +
|
|
193
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
194
|
+
}
|
|
195
|
+
let urlPath = `/account/organization`;
|
|
196
|
+
const response = await this.request({
|
|
197
|
+
path: urlPath,
|
|
198
|
+
method: 'GET',
|
|
199
|
+
headers: headerParameters,
|
|
200
|
+
query: queryParameters
|
|
201
|
+
}, initOverrides);
|
|
202
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OrganizationFromJSON)(jsonValue));
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Get organization for the authenticated account (new billing model).
|
|
206
|
+
*/
|
|
207
|
+
async getOrganization(initOverrides) {
|
|
208
|
+
const response = await this.getOrganizationRaw(initOverrides);
|
|
209
|
+
return await response.value();
|
|
210
|
+
}
|
|
161
211
|
/**
|
|
162
212
|
* Get Supabase integration status for the account
|
|
163
213
|
*/
|
|
@@ -0,0 +1,72 @@
|
|
|
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
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { OrganizationUsage, OrganizationUsageHistory } from '../models/index';
|
|
14
|
+
export interface GetUsageHistoryRequest {
|
|
15
|
+
startDate: string;
|
|
16
|
+
endDate: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* OrganizationApi - interface
|
|
20
|
+
*
|
|
21
|
+
* @export
|
|
22
|
+
* @interface OrganizationApiInterface
|
|
23
|
+
*/
|
|
24
|
+
export interface OrganizationApiInterface {
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @summary Get usage for the authenticated account\'s organization (new billing model).
|
|
28
|
+
* @param {*} [options] Override http request option.
|
|
29
|
+
* @throws {RequiredError}
|
|
30
|
+
* @memberof OrganizationApiInterface
|
|
31
|
+
*/
|
|
32
|
+
getUsageRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrganizationUsage>>;
|
|
33
|
+
/**
|
|
34
|
+
* Get usage for the authenticated account\'s organization (new billing model).
|
|
35
|
+
*/
|
|
36
|
+
getUsage(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrganizationUsage>;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @summary Get historical usage for the authenticated account\'s organization over a date range.
|
|
40
|
+
* @param {string} startDate Start date (YYYY-MM-DD) for the range
|
|
41
|
+
* @param {string} endDate End date (YYYY-MM-DD) for the range
|
|
42
|
+
* @param {*} [options] Override http request option.
|
|
43
|
+
* @throws {RequiredError}
|
|
44
|
+
* @memberof OrganizationApiInterface
|
|
45
|
+
*/
|
|
46
|
+
getUsageHistoryRaw(requestParameters: GetUsageHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrganizationUsageHistory>>;
|
|
47
|
+
/**
|
|
48
|
+
* Get historical usage for the authenticated account\'s organization over a date range.
|
|
49
|
+
*/
|
|
50
|
+
getUsageHistory(startDate: string, endDate: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrganizationUsageHistory>;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
55
|
+
export declare class OrganizationApi extends runtime.BaseAPI implements OrganizationApiInterface {
|
|
56
|
+
/**
|
|
57
|
+
* Get usage for the authenticated account\'s organization (new billing model).
|
|
58
|
+
*/
|
|
59
|
+
getUsageRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrganizationUsage>>;
|
|
60
|
+
/**
|
|
61
|
+
* Get usage for the authenticated account\'s organization (new billing model).
|
|
62
|
+
*/
|
|
63
|
+
getUsage(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrganizationUsage>;
|
|
64
|
+
/**
|
|
65
|
+
* Get historical usage for the authenticated account\'s organization over a date range.
|
|
66
|
+
*/
|
|
67
|
+
getUsageHistoryRaw(requestParameters: GetUsageHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<OrganizationUsageHistory>>;
|
|
68
|
+
/**
|
|
69
|
+
* Get historical usage for the authenticated account\'s organization over a date range.
|
|
70
|
+
*/
|
|
71
|
+
getUsageHistory(startDate: string, endDate: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<OrganizationUsageHistory>;
|
|
72
|
+
}
|
|
@@ -0,0 +1,169 @@
|
|
|
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
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(o, k2, desc);
|
|
22
|
+
}) : (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
o[k2] = m[k];
|
|
25
|
+
}));
|
|
26
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
27
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
28
|
+
}) : function(o, v) {
|
|
29
|
+
o["default"] = v;
|
|
30
|
+
});
|
|
31
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
32
|
+
var ownKeys = function(o) {
|
|
33
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
34
|
+
var ar = [];
|
|
35
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
36
|
+
return ar;
|
|
37
|
+
};
|
|
38
|
+
return ownKeys(o);
|
|
39
|
+
};
|
|
40
|
+
return function (mod) {
|
|
41
|
+
if (mod && mod.__esModule) return mod;
|
|
42
|
+
var result = {};
|
|
43
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
44
|
+
__setModuleDefault(result, mod);
|
|
45
|
+
return result;
|
|
46
|
+
};
|
|
47
|
+
})();
|
|
48
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
|
+
exports.OrganizationApi = void 0;
|
|
50
|
+
const runtime = __importStar(require("../runtime"));
|
|
51
|
+
const index_1 = require("../models/index");
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
55
|
+
class OrganizationApi extends runtime.BaseAPI {
|
|
56
|
+
/**
|
|
57
|
+
* Get usage for the authenticated account\'s organization (new billing model).
|
|
58
|
+
*/
|
|
59
|
+
async getUsageRaw(initOverrides) {
|
|
60
|
+
const queryParameters = {};
|
|
61
|
+
const headerParameters = {};
|
|
62
|
+
if (this.configuration &&
|
|
63
|
+
(this.configuration.username !== undefined ||
|
|
64
|
+
this.configuration.password !== undefined)) {
|
|
65
|
+
headerParameters['Authorization'] =
|
|
66
|
+
'Basic ' +
|
|
67
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
68
|
+
}
|
|
69
|
+
if (this.configuration &&
|
|
70
|
+
(this.configuration.username !== undefined ||
|
|
71
|
+
this.configuration.password !== undefined)) {
|
|
72
|
+
headerParameters['Authorization'] =
|
|
73
|
+
'Basic ' +
|
|
74
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
75
|
+
}
|
|
76
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
77
|
+
const token = this.configuration.accessToken;
|
|
78
|
+
const tokenString = await token('apiKey', []);
|
|
79
|
+
if (tokenString) {
|
|
80
|
+
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
if (this.configuration &&
|
|
84
|
+
(this.configuration.username !== undefined ||
|
|
85
|
+
this.configuration.password !== undefined)) {
|
|
86
|
+
headerParameters['Authorization'] =
|
|
87
|
+
'Basic ' +
|
|
88
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
89
|
+
}
|
|
90
|
+
let urlPath = `/organization/usage`;
|
|
91
|
+
const response = await this.request({
|
|
92
|
+
path: urlPath,
|
|
93
|
+
method: 'GET',
|
|
94
|
+
headers: headerParameters,
|
|
95
|
+
query: queryParameters
|
|
96
|
+
}, initOverrides);
|
|
97
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OrganizationUsageFromJSON)(jsonValue));
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Get usage for the authenticated account\'s organization (new billing model).
|
|
101
|
+
*/
|
|
102
|
+
async getUsage(initOverrides) {
|
|
103
|
+
const response = await this.getUsageRaw(initOverrides);
|
|
104
|
+
return await response.value();
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Get historical usage for the authenticated account\'s organization over a date range.
|
|
108
|
+
*/
|
|
109
|
+
async getUsageHistoryRaw(requestParameters, initOverrides) {
|
|
110
|
+
if (requestParameters['startDate'] == null) {
|
|
111
|
+
throw new runtime.RequiredError('startDate', 'Required parameter "startDate" was null or undefined when calling getUsageHistory().');
|
|
112
|
+
}
|
|
113
|
+
if (requestParameters['endDate'] == null) {
|
|
114
|
+
throw new runtime.RequiredError('endDate', 'Required parameter "endDate" was null or undefined when calling getUsageHistory().');
|
|
115
|
+
}
|
|
116
|
+
const queryParameters = {};
|
|
117
|
+
if (requestParameters['startDate'] != null) {
|
|
118
|
+
queryParameters['startDate'] = requestParameters['startDate'];
|
|
119
|
+
}
|
|
120
|
+
if (requestParameters['endDate'] != null) {
|
|
121
|
+
queryParameters['endDate'] = requestParameters['endDate'];
|
|
122
|
+
}
|
|
123
|
+
const headerParameters = {};
|
|
124
|
+
if (this.configuration &&
|
|
125
|
+
(this.configuration.username !== undefined ||
|
|
126
|
+
this.configuration.password !== undefined)) {
|
|
127
|
+
headerParameters['Authorization'] =
|
|
128
|
+
'Basic ' +
|
|
129
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
130
|
+
}
|
|
131
|
+
if (this.configuration &&
|
|
132
|
+
(this.configuration.username !== undefined ||
|
|
133
|
+
this.configuration.password !== undefined)) {
|
|
134
|
+
headerParameters['Authorization'] =
|
|
135
|
+
'Basic ' +
|
|
136
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
137
|
+
}
|
|
138
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
139
|
+
const token = this.configuration.accessToken;
|
|
140
|
+
const tokenString = await token('apiKey', []);
|
|
141
|
+
if (tokenString) {
|
|
142
|
+
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
if (this.configuration &&
|
|
146
|
+
(this.configuration.username !== undefined ||
|
|
147
|
+
this.configuration.password !== undefined)) {
|
|
148
|
+
headerParameters['Authorization'] =
|
|
149
|
+
'Basic ' +
|
|
150
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
151
|
+
}
|
|
152
|
+
let urlPath = `/organization/usage/history`;
|
|
153
|
+
const response = await this.request({
|
|
154
|
+
path: urlPath,
|
|
155
|
+
method: 'GET',
|
|
156
|
+
headers: headerParameters,
|
|
157
|
+
query: queryParameters
|
|
158
|
+
}, initOverrides);
|
|
159
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.OrganizationUsageHistoryFromJSON)(jsonValue));
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Get historical usage for the authenticated account\'s organization over a date range.
|
|
163
|
+
*/
|
|
164
|
+
async getUsageHistory(startDate, endDate, initOverrides) {
|
|
165
|
+
const response = await this.getUsageHistoryRaw({ startDate: startDate, endDate: endDate }, initOverrides);
|
|
166
|
+
return await response.value();
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
exports.OrganizationApi = OrganizationApi;
|
|
@@ -28,6 +28,7 @@ __exportStar(require("./InsightsApi"), exports);
|
|
|
28
28
|
__exportStar(require("./KeysApi"), exports);
|
|
29
29
|
__exportStar(require("./LogsApi"), exports);
|
|
30
30
|
__exportStar(require("./MembersApi"), exports);
|
|
31
|
+
__exportStar(require("./OrganizationApi"), exports);
|
|
31
32
|
__exportStar(require("./SenderApi"), exports);
|
|
32
33
|
__exportStar(require("./TemplatesApi"), exports);
|
|
33
34
|
__exportStar(require("./TypesApi"), exports);
|
|
@@ -9,9 +9,8 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import type { AccountGetResponsePendingDowngradeUsageLimit } from './AccountGetResponsePendingDowngradeUsageLimit';
|
|
13
12
|
/**
|
|
14
|
-
*
|
|
13
|
+
* GET /account response: basic account info (billing fields are on Organization).
|
|
15
14
|
* @export
|
|
16
15
|
* @interface AccountGetResponse
|
|
17
16
|
*/
|
|
@@ -23,65 +22,29 @@ export interface AccountGetResponse {
|
|
|
23
22
|
*/
|
|
24
23
|
accountId: string;
|
|
25
24
|
/**
|
|
26
|
-
*
|
|
27
|
-
* @type {string}
|
|
28
|
-
* @memberof AccountGetResponse
|
|
29
|
-
*/
|
|
30
|
-
name: string;
|
|
31
|
-
/**
|
|
32
|
-
*
|
|
33
|
-
* @type {string}
|
|
34
|
-
* @memberof AccountGetResponse
|
|
35
|
-
*/
|
|
36
|
-
accountType: AccountGetResponseAccountTypeEnum;
|
|
37
|
-
/**
|
|
38
|
-
*
|
|
39
|
-
* @type {string}
|
|
40
|
-
* @memberof AccountGetResponse
|
|
41
|
-
*/
|
|
42
|
-
createdAt: string;
|
|
43
|
-
/**
|
|
44
|
-
*
|
|
25
|
+
* Optional organization ID; legacy accounts may not have one.
|
|
45
26
|
* @type {string}
|
|
46
27
|
* @memberof AccountGetResponse
|
|
47
28
|
*/
|
|
48
|
-
|
|
29
|
+
organizationId?: string;
|
|
49
30
|
/**
|
|
50
31
|
*
|
|
51
32
|
* @type {string}
|
|
52
33
|
* @memberof AccountGetResponse
|
|
53
34
|
*/
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
*
|
|
57
|
-
* @type {string}
|
|
58
|
-
* @memberof AccountGetResponse
|
|
59
|
-
*/
|
|
60
|
-
subscriptionStatus?: AccountGetResponseSubscriptionStatusEnum | null;
|
|
61
|
-
/**
|
|
62
|
-
*
|
|
63
|
-
* @type {string}
|
|
64
|
-
* @memberof AccountGetResponse
|
|
65
|
-
*/
|
|
66
|
-
anniversaryDate?: string;
|
|
35
|
+
name: string;
|
|
67
36
|
/**
|
|
68
37
|
*
|
|
69
38
|
* @type {string}
|
|
70
39
|
* @memberof AccountGetResponse
|
|
71
40
|
*/
|
|
72
|
-
|
|
41
|
+
accountType: AccountGetResponseAccountTypeEnum;
|
|
73
42
|
/**
|
|
74
43
|
*
|
|
75
44
|
* @type {string}
|
|
76
45
|
* @memberof AccountGetResponse
|
|
77
46
|
*/
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
*
|
|
81
|
-
* @type {AccountGetResponsePendingDowngradeUsageLimit}
|
|
82
|
-
* @memberof AccountGetResponse
|
|
83
|
-
*/
|
|
84
|
-
pendingDowngradeUsageLimit?: AccountGetResponsePendingDowngradeUsageLimit;
|
|
47
|
+
createdAt: string;
|
|
85
48
|
}
|
|
86
49
|
/**
|
|
87
50
|
* @export
|
|
@@ -91,23 +54,6 @@ export declare enum AccountGetResponseAccountTypeEnum {
|
|
|
91
54
|
FREE = "free",
|
|
92
55
|
PAID = "paid"
|
|
93
56
|
}
|
|
94
|
-
/**
|
|
95
|
-
* @export
|
|
96
|
-
* @enum {string}
|
|
97
|
-
*/
|
|
98
|
-
export declare enum AccountGetResponseSubscriptionStatusEnum {
|
|
99
|
-
ACTIVE = "active",
|
|
100
|
-
CANCELED = "canceled",
|
|
101
|
-
PAST_DUE = "past_due",
|
|
102
|
-
PAUSED = "paused"
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* @export
|
|
106
|
-
* @enum {string}
|
|
107
|
-
*/
|
|
108
|
-
export declare enum AccountGetResponsePendingDowngradeAccountTypeEnum {
|
|
109
|
-
FREE = "free"
|
|
110
|
-
}
|
|
111
57
|
/**
|
|
112
58
|
* Check if a given object implements the AccountGetResponse interface.
|
|
113
59
|
*/
|
|
@@ -13,13 +13,12 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.
|
|
16
|
+
exports.AccountGetResponseAccountTypeEnum = void 0;
|
|
17
17
|
exports.instanceOfAccountGetResponse = instanceOfAccountGetResponse;
|
|
18
18
|
exports.AccountGetResponseFromJSON = AccountGetResponseFromJSON;
|
|
19
19
|
exports.AccountGetResponseFromJSONTyped = AccountGetResponseFromJSONTyped;
|
|
20
20
|
exports.AccountGetResponseToJSON = AccountGetResponseToJSON;
|
|
21
21
|
exports.AccountGetResponseToJSONTyped = AccountGetResponseToJSONTyped;
|
|
22
|
-
const AccountGetResponsePendingDowngradeUsageLimit_1 = require("./AccountGetResponsePendingDowngradeUsageLimit");
|
|
23
22
|
/**
|
|
24
23
|
* @export
|
|
25
24
|
* @enum {string}
|
|
@@ -29,25 +28,6 @@ var AccountGetResponseAccountTypeEnum;
|
|
|
29
28
|
AccountGetResponseAccountTypeEnum["FREE"] = "free";
|
|
30
29
|
AccountGetResponseAccountTypeEnum["PAID"] = "paid";
|
|
31
30
|
})(AccountGetResponseAccountTypeEnum || (exports.AccountGetResponseAccountTypeEnum = AccountGetResponseAccountTypeEnum = {}));
|
|
32
|
-
/**
|
|
33
|
-
* @export
|
|
34
|
-
* @enum {string}
|
|
35
|
-
*/
|
|
36
|
-
var AccountGetResponseSubscriptionStatusEnum;
|
|
37
|
-
(function (AccountGetResponseSubscriptionStatusEnum) {
|
|
38
|
-
AccountGetResponseSubscriptionStatusEnum["ACTIVE"] = "active";
|
|
39
|
-
AccountGetResponseSubscriptionStatusEnum["CANCELED"] = "canceled";
|
|
40
|
-
AccountGetResponseSubscriptionStatusEnum["PAST_DUE"] = "past_due";
|
|
41
|
-
AccountGetResponseSubscriptionStatusEnum["PAUSED"] = "paused";
|
|
42
|
-
})(AccountGetResponseSubscriptionStatusEnum || (exports.AccountGetResponseSubscriptionStatusEnum = AccountGetResponseSubscriptionStatusEnum = {}));
|
|
43
|
-
/**
|
|
44
|
-
* @export
|
|
45
|
-
* @enum {string}
|
|
46
|
-
*/
|
|
47
|
-
var AccountGetResponsePendingDowngradeAccountTypeEnum;
|
|
48
|
-
(function (AccountGetResponsePendingDowngradeAccountTypeEnum) {
|
|
49
|
-
AccountGetResponsePendingDowngradeAccountTypeEnum["FREE"] = "free";
|
|
50
|
-
})(AccountGetResponsePendingDowngradeAccountTypeEnum || (exports.AccountGetResponsePendingDowngradeAccountTypeEnum = AccountGetResponsePendingDowngradeAccountTypeEnum = {}));
|
|
51
31
|
/**
|
|
52
32
|
* Check if a given object implements the AccountGetResponse interface.
|
|
53
33
|
*/
|
|
@@ -71,26 +51,10 @@ function AccountGetResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
71
51
|
}
|
|
72
52
|
return {
|
|
73
53
|
accountId: json['accountId'],
|
|
54
|
+
organizationId: json['organizationId'] == null ? undefined : json['organizationId'],
|
|
74
55
|
name: json['name'],
|
|
75
56
|
accountType: json['accountType'],
|
|
76
|
-
createdAt: json['createdAt']
|
|
77
|
-
stripeCustomerId: json['stripeCustomerId'] == null ? undefined : json['stripeCustomerId'],
|
|
78
|
-
stripeSubscriptionId: json['stripeSubscriptionId'] == null
|
|
79
|
-
? undefined
|
|
80
|
-
: json['stripeSubscriptionId'],
|
|
81
|
-
subscriptionStatus: json['subscriptionStatus'] == null
|
|
82
|
-
? undefined
|
|
83
|
-
: json['subscriptionStatus'],
|
|
84
|
-
anniversaryDate: json['anniversaryDate'] == null ? undefined : json['anniversaryDate'],
|
|
85
|
-
pendingDowngradeEffectiveDate: json['pendingDowngradeEffectiveDate'] == null
|
|
86
|
-
? undefined
|
|
87
|
-
: json['pendingDowngradeEffectiveDate'],
|
|
88
|
-
pendingDowngradeAccountType: json['pendingDowngradeAccountType'] == null
|
|
89
|
-
? undefined
|
|
90
|
-
: json['pendingDowngradeAccountType'],
|
|
91
|
-
pendingDowngradeUsageLimit: json['pendingDowngradeUsageLimit'] == null
|
|
92
|
-
? undefined
|
|
93
|
-
: (0, AccountGetResponsePendingDowngradeUsageLimit_1.AccountGetResponsePendingDowngradeUsageLimitFromJSON)(json['pendingDowngradeUsageLimit'])
|
|
57
|
+
createdAt: json['createdAt']
|
|
94
58
|
};
|
|
95
59
|
}
|
|
96
60
|
function AccountGetResponseToJSON(json) {
|
|
@@ -102,15 +66,9 @@ function AccountGetResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
102
66
|
}
|
|
103
67
|
return {
|
|
104
68
|
accountId: value['accountId'],
|
|
69
|
+
organizationId: value['organizationId'],
|
|
105
70
|
name: value['name'],
|
|
106
71
|
accountType: value['accountType'],
|
|
107
|
-
createdAt: value['createdAt']
|
|
108
|
-
stripeCustomerId: value['stripeCustomerId'],
|
|
109
|
-
stripeSubscriptionId: value['stripeSubscriptionId'],
|
|
110
|
-
subscriptionStatus: value['subscriptionStatus'],
|
|
111
|
-
anniversaryDate: value['anniversaryDate'],
|
|
112
|
-
pendingDowngradeEffectiveDate: value['pendingDowngradeEffectiveDate'],
|
|
113
|
-
pendingDowngradeAccountType: value['pendingDowngradeAccountType'],
|
|
114
|
-
pendingDowngradeUsageLimit: (0, AccountGetResponsePendingDowngradeUsageLimit_1.AccountGetResponsePendingDowngradeUsageLimitToJSON)(value['pendingDowngradeUsageLimit'])
|
|
72
|
+
createdAt: value['createdAt']
|
|
115
73
|
};
|
|
116
74
|
}
|
|
@@ -16,11 +16,17 @@
|
|
|
16
16
|
*/
|
|
17
17
|
export interface BillingPostRequestBody {
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* Price ID for the message tier (EMAIL, INAPP_WEB, WEB_PUSH, PUSH, SLACK)
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof BillingPostRequestBody
|
|
22
|
+
*/
|
|
23
|
+
messagePriceId?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Price ID for the budget tier (SMS, CALL)
|
|
20
26
|
* @type {string}
|
|
21
27
|
* @memberof BillingPostRequestBody
|
|
22
28
|
*/
|
|
23
|
-
|
|
29
|
+
budgetPriceId?: string;
|
|
24
30
|
/**
|
|
25
31
|
*
|
|
26
32
|
* @type {string}
|
|
@@ -22,8 +22,6 @@ exports.BillingPostRequestBodyToJSONTyped = BillingPostRequestBodyToJSONTyped;
|
|
|
22
22
|
* Check if a given object implements the BillingPostRequestBody interface.
|
|
23
23
|
*/
|
|
24
24
|
function instanceOfBillingPostRequestBody(value) {
|
|
25
|
-
if (!('priceId' in value) || value['priceId'] === undefined)
|
|
26
|
-
return false;
|
|
27
25
|
if (!('successUrl' in value) || value['successUrl'] === undefined)
|
|
28
26
|
return false;
|
|
29
27
|
if (!('cancelUrl' in value) || value['cancelUrl'] === undefined)
|
|
@@ -38,7 +36,8 @@ function BillingPostRequestBodyFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
38
36
|
return json;
|
|
39
37
|
}
|
|
40
38
|
return {
|
|
41
|
-
|
|
39
|
+
messagePriceId: json['messagePriceId'] == null ? undefined : json['messagePriceId'],
|
|
40
|
+
budgetPriceId: json['budgetPriceId'] == null ? undefined : json['budgetPriceId'],
|
|
42
41
|
successUrl: json['successUrl'],
|
|
43
42
|
cancelUrl: json['cancelUrl']
|
|
44
43
|
};
|
|
@@ -51,7 +50,8 @@ function BillingPostRequestBodyToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
51
50
|
return value;
|
|
52
51
|
}
|
|
53
52
|
return {
|
|
54
|
-
|
|
53
|
+
messagePriceId: value['messagePriceId'],
|
|
54
|
+
budgetPriceId: value['budgetPriceId'],
|
|
55
55
|
successUrl: value['successUrl'],
|
|
56
56
|
cancelUrl: value['cancelUrl']
|
|
57
57
|
};
|