pingram 1.0.22 → 1.0.23-alpha.1362

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.
Files changed (29) hide show
  1. package/dist/generated/src/apis/AccountsApi.d.ts +70 -0
  2. package/dist/generated/src/apis/AccountsApi.js +162 -0
  3. package/dist/generated/src/apis/index.d.ts +2 -0
  4. package/dist/generated/src/apis/index.js +3 -1
  5. package/dist/generated/src/models/AccountGetResponse.d.ts +15 -0
  6. package/dist/generated/src/models/AccountGetResponse.js +15 -3
  7. package/dist/generated/src/models/BillingPostResponseBody.d.ts +15 -0
  8. package/dist/generated/src/models/BillingPostResponseBody.js +13 -1
  9. package/dist/generated/src/models/CreateAccountRequest.d.ts +17 -6
  10. package/dist/generated/src/models/CreateAccountRequest.js +11 -2
  11. package/dist/generated/src/models/CreateAccountRequestPlan.d.ts +52 -0
  12. package/dist/generated/src/models/CreateAccountRequestPlan.js +71 -0
  13. package/dist/generated/src/models/CreateAccountResponse.d.ts +35 -4
  14. package/dist/generated/src/models/CreateAccountResponse.js +36 -6
  15. package/dist/generated/src/models/FirstAccountRequest.d.ts +34 -0
  16. package/dist/generated/src/models/FirstAccountRequest.js +48 -0
  17. package/dist/generated/src/models/FirstAccountResponse.d.ts +38 -0
  18. package/dist/generated/src/models/FirstAccountResponse.js +54 -0
  19. package/dist/generated/src/models/ListAccountsResponse.d.ts +33 -0
  20. package/dist/generated/src/models/ListAccountsResponse.js +51 -0
  21. package/dist/generated/src/models/ListAccountsResponseAccountsInner.d.ts +79 -0
  22. package/dist/generated/src/models/ListAccountsResponseAccountsInner.js +88 -0
  23. package/dist/generated/src/models/PhoneVerifyConfirmResponse.d.ts +6 -0
  24. package/dist/generated/src/models/PhoneVerifyConfirmResponse.js +4 -2
  25. package/dist/generated/src/models/index.d.ts +5 -0
  26. package/dist/generated/src/models/index.js +5 -0
  27. package/dist/src/client.d.ts +2 -0
  28. package/dist/src/client.js +48 -45
  29. package/package.json +1 -1
@@ -0,0 +1,70 @@
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 { CreateAccountRequest, CreateAccountResponse, ListAccountsResponse } from '../models/index';
14
+ export interface CreateAccountOperationRequest {
15
+ createAccountRequest: CreateAccountRequest;
16
+ }
17
+ /**
18
+ * AccountsApi - interface
19
+ *
20
+ * @export
21
+ * @interface AccountsApiInterface
22
+ */
23
+ export interface AccountsApiInterface {
24
+ /**
25
+ *
26
+ * @summary Create an additional account for the authenticated user
27
+ * @param {CreateAccountRequest} createAccountRequest
28
+ * @param {*} [options] Override http request option.
29
+ * @throws {RequiredError}
30
+ * @memberof AccountsApiInterface
31
+ */
32
+ createAccountRaw(requestParameters: CreateAccountOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateAccountResponse>>;
33
+ /**
34
+ * Create an additional account for the authenticated user
35
+ */
36
+ createAccount(createAccountRequest: CreateAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateAccountResponse>;
37
+ /**
38
+ *
39
+ * @summary List accounts the authenticated user can access
40
+ * @param {*} [options] Override http request option.
41
+ * @throws {RequiredError}
42
+ * @memberof AccountsApiInterface
43
+ */
44
+ listAccountsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListAccountsResponse>>;
45
+ /**
46
+ * List accounts the authenticated user can access
47
+ */
48
+ listAccounts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListAccountsResponse>;
49
+ }
50
+ /**
51
+ *
52
+ */
53
+ export declare class AccountsApi extends runtime.BaseAPI implements AccountsApiInterface {
54
+ /**
55
+ * Create an additional account for the authenticated user
56
+ */
57
+ createAccountRaw(requestParameters: CreateAccountOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateAccountResponse>>;
58
+ /**
59
+ * Create an additional account for the authenticated user
60
+ */
61
+ createAccount(createAccountRequest: CreateAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateAccountResponse>;
62
+ /**
63
+ * List accounts the authenticated user can access
64
+ */
65
+ listAccountsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListAccountsResponse>>;
66
+ /**
67
+ * List accounts the authenticated user can access
68
+ */
69
+ listAccounts(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListAccountsResponse>;
70
+ }
@@ -0,0 +1,162 @@
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.AccountsApi = void 0;
50
+ const runtime = __importStar(require("../runtime"));
51
+ const index_1 = require("../models/index");
52
+ /**
53
+ *
54
+ */
55
+ class AccountsApi extends runtime.BaseAPI {
56
+ /**
57
+ * Create an additional account for the authenticated user
58
+ */
59
+ async createAccountRaw(requestParameters, initOverrides) {
60
+ if (requestParameters['createAccountRequest'] == null) {
61
+ throw new runtime.RequiredError('createAccountRequest', 'Required parameter "createAccountRequest" was null or undefined when calling createAccount().');
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 = `/accounts`;
95
+ const response = await this.request({
96
+ path: urlPath,
97
+ method: 'POST',
98
+ headers: headerParameters,
99
+ query: queryParameters,
100
+ body: (0, index_1.CreateAccountRequestToJSON)(requestParameters['createAccountRequest'])
101
+ }, initOverrides);
102
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CreateAccountResponseFromJSON)(jsonValue));
103
+ }
104
+ /**
105
+ * Create an additional account for the authenticated user
106
+ */
107
+ async createAccount(createAccountRequest, initOverrides) {
108
+ const response = await this.createAccountRaw({ createAccountRequest: createAccountRequest }, initOverrides);
109
+ return await response.value();
110
+ }
111
+ /**
112
+ * List accounts the authenticated user can access
113
+ */
114
+ async listAccountsRaw(initOverrides) {
115
+ const queryParameters = {};
116
+ const headerParameters = {};
117
+ if (this.configuration &&
118
+ (this.configuration.username !== undefined ||
119
+ this.configuration.password !== undefined)) {
120
+ headerParameters['Authorization'] =
121
+ 'Basic ' +
122
+ btoa(this.configuration.username + ':' + this.configuration.password);
123
+ }
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 && this.configuration.accessToken) {
132
+ const token = this.configuration.accessToken;
133
+ const tokenString = await token('apiKey', []);
134
+ if (tokenString) {
135
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
136
+ }
137
+ }
138
+ if (this.configuration &&
139
+ (this.configuration.username !== undefined ||
140
+ this.configuration.password !== undefined)) {
141
+ headerParameters['Authorization'] =
142
+ 'Basic ' +
143
+ btoa(this.configuration.username + ':' + this.configuration.password);
144
+ }
145
+ let urlPath = `/accounts`;
146
+ const response = await this.request({
147
+ path: urlPath,
148
+ method: 'GET',
149
+ headers: headerParameters,
150
+ query: queryParameters
151
+ }, initOverrides);
152
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ListAccountsResponseFromJSON)(jsonValue));
153
+ }
154
+ /**
155
+ * List accounts the authenticated user can access
156
+ */
157
+ async listAccounts(initOverrides) {
158
+ const response = await this.listAccountsRaw(initOverrides);
159
+ return await response.value();
160
+ }
161
+ }
162
+ exports.AccountsApi = AccountsApi;
@@ -4,6 +4,8 @@
4
4
  */
5
5
  export type { ConfigureSupabaseSMTPRequest, GetUsageHistoryRequest, ListInvoicesRequest, PrepareCheckoutSessionRequest, SupabaseOAuthOperationRequest, AccountApiInterface } from './AccountApi';
6
6
  export { AccountApi } from './AccountApi';
7
+ export type { CreateAccountOperationRequest, AccountsApiInterface } from './AccountsApi';
8
+ export { AccountsApi } from './AccountsApi';
7
9
  export type { CreateAddressOperationRequest, DeleteAddressRequest, UpdateAddressOperationRequest, AddressesApiInterface } from './AddressesApi';
8
10
  export { AddressesApi } from './AddressesApi';
9
11
  export type { CreateComponentRequest, DeleteComponentRequest, GetComponentRequest, ListComponentsRequest, PatchComponentRequest, ComponentsApiInterface } from './ComponentsApi';
@@ -6,9 +6,11 @@
6
6
  * Multiple `SendRequest` types from bare `send` APIs are re-exported under stable names.
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.WebhooksApi = exports.VoiceApi = exports.UsersApi = exports.UserApi = exports.TypesApi = exports.TemplatesApi = exports.SmsApi = exports.SenderApi = exports.ProfileApi = exports.NumbersApi = exports.MembersApi = exports.LogsApi = exports.KeysApi = exports.InsightsApi = exports.HealthApi = exports.EnvironmentsApi = exports.EmailApi = exports.EditorApi = exports.DomainsApi = exports.DefaultApi = exports.ComponentsApi = exports.AddressesApi = exports.AccountApi = void 0;
9
+ exports.WebhooksApi = exports.VoiceApi = exports.UsersApi = exports.UserApi = exports.TypesApi = exports.TemplatesApi = exports.SmsApi = exports.SenderApi = exports.ProfileApi = exports.NumbersApi = exports.MembersApi = exports.LogsApi = exports.KeysApi = exports.InsightsApi = exports.HealthApi = exports.EnvironmentsApi = exports.EmailApi = exports.EditorApi = exports.DomainsApi = exports.DefaultApi = exports.ComponentsApi = exports.AddressesApi = exports.AccountsApi = exports.AccountApi = void 0;
10
10
  var AccountApi_1 = require("./AccountApi");
11
11
  Object.defineProperty(exports, "AccountApi", { enumerable: true, get: function () { return AccountApi_1.AccountApi; } });
12
+ var AccountsApi_1 = require("./AccountsApi");
13
+ Object.defineProperty(exports, "AccountsApi", { enumerable: true, get: function () { return AccountsApi_1.AccountsApi; } });
12
14
  var AddressesApi_1 = require("./AddressesApi");
13
15
  Object.defineProperty(exports, "AddressesApi", { enumerable: true, get: function () { return AddressesApi_1.AddressesApi; } });
14
16
  var ComponentsApi_1 = require("./ComponentsApi");
@@ -93,6 +93,12 @@ export interface AccountGetResponse {
93
93
  * @memberof AccountGetResponse
94
94
  */
95
95
  updatedAt: string;
96
+ /**
97
+ *
98
+ * @type {string}
99
+ * @memberof AccountGetResponse
100
+ */
101
+ status?: AccountGetResponseStatusEnum;
96
102
  }
97
103
  /**
98
104
  * @export
@@ -110,6 +116,15 @@ export declare enum AccountGetResponseBillingVersionEnum {
110
116
  NUMBER_1 = 1,
111
117
  NUMBER_3 = 3
112
118
  }
119
+ /**
120
+ * @export
121
+ * @enum {string}
122
+ */
123
+ export declare enum AccountGetResponseStatusEnum {
124
+ VERIFIED = "verified",
125
+ UNVERIFIED = "unverified",
126
+ BLOCKED = "blocked"
127
+ }
113
128
  /**
114
129
  * Check if a given object implements the AccountGetResponse interface.
115
130
  */
@@ -13,7 +13,7 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.AccountGetResponseBillingVersionEnum = exports.AccountGetResponseAccountTypeEnum = void 0;
16
+ exports.AccountGetResponseStatusEnum = exports.AccountGetResponseBillingVersionEnum = exports.AccountGetResponseAccountTypeEnum = void 0;
17
17
  exports.instanceOfAccountGetResponse = instanceOfAccountGetResponse;
18
18
  exports.AccountGetResponseFromJSON = AccountGetResponseFromJSON;
19
19
  exports.AccountGetResponseFromJSONTyped = AccountGetResponseFromJSONTyped;
@@ -37,6 +37,16 @@ var AccountGetResponseBillingVersionEnum;
37
37
  AccountGetResponseBillingVersionEnum[AccountGetResponseBillingVersionEnum["NUMBER_1"] = 1] = "NUMBER_1";
38
38
  AccountGetResponseBillingVersionEnum[AccountGetResponseBillingVersionEnum["NUMBER_3"] = 3] = "NUMBER_3";
39
39
  })(AccountGetResponseBillingVersionEnum || (exports.AccountGetResponseBillingVersionEnum = AccountGetResponseBillingVersionEnum = {}));
40
+ /**
41
+ * @export
42
+ * @enum {string}
43
+ */
44
+ var AccountGetResponseStatusEnum;
45
+ (function (AccountGetResponseStatusEnum) {
46
+ AccountGetResponseStatusEnum["VERIFIED"] = "verified";
47
+ AccountGetResponseStatusEnum["UNVERIFIED"] = "unverified";
48
+ AccountGetResponseStatusEnum["BLOCKED"] = "blocked";
49
+ })(AccountGetResponseStatusEnum || (exports.AccountGetResponseStatusEnum = AccountGetResponseStatusEnum = {}));
40
50
  /**
41
51
  * Check if a given object implements the AccountGetResponse interface.
42
52
  */
@@ -79,7 +89,8 @@ function AccountGetResponseFromJSONTyped(json, ignoreDiscriminator) {
79
89
  anniversaryDate: json['anniversaryDate'],
80
90
  allowOverage: json['allowOverage'],
81
91
  createdAt: json['createdAt'],
82
- updatedAt: json['updatedAt']
92
+ updatedAt: json['updatedAt'],
93
+ status: json['status'] == null ? undefined : json['status']
83
94
  };
84
95
  }
85
96
  function AccountGetResponseToJSON(json) {
@@ -102,6 +113,7 @@ function AccountGetResponseToJSONTyped(value, ignoreDiscriminator = false) {
102
113
  anniversaryDate: value['anniversaryDate'],
103
114
  allowOverage: value['allowOverage'],
104
115
  createdAt: value['createdAt'],
105
- updatedAt: value['updatedAt']
116
+ updatedAt: value['updatedAt'],
117
+ status: value['status']
106
118
  };
107
119
  }
@@ -93,6 +93,12 @@ export interface BillingPostResponseBody {
93
93
  * @memberof BillingPostResponseBody
94
94
  */
95
95
  updatedAt: string;
96
+ /**
97
+ *
98
+ * @type {string}
99
+ * @memberof BillingPostResponseBody
100
+ */
101
+ status?: BillingPostResponseBodyStatusEnum;
96
102
  /**
97
103
  *
98
104
  * @type {string}
@@ -122,6 +128,15 @@ export declare enum BillingPostResponseBodyBillingVersionEnum {
122
128
  NUMBER_1 = 1,
123
129
  NUMBER_3 = 3
124
130
  }
131
+ /**
132
+ * @export
133
+ * @enum {string}
134
+ */
135
+ export declare enum BillingPostResponseBodyStatusEnum {
136
+ VERIFIED = "verified",
137
+ UNVERIFIED = "unverified",
138
+ BLOCKED = "blocked"
139
+ }
125
140
  /**
126
141
  * Check if a given object implements the BillingPostResponseBody interface.
127
142
  */
@@ -13,7 +13,7 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.BillingPostResponseBodyBillingVersionEnum = exports.BillingPostResponseBodyAccountTypeEnum = void 0;
16
+ exports.BillingPostResponseBodyStatusEnum = exports.BillingPostResponseBodyBillingVersionEnum = exports.BillingPostResponseBodyAccountTypeEnum = void 0;
17
17
  exports.instanceOfBillingPostResponseBody = instanceOfBillingPostResponseBody;
18
18
  exports.BillingPostResponseBodyFromJSON = BillingPostResponseBodyFromJSON;
19
19
  exports.BillingPostResponseBodyFromJSONTyped = BillingPostResponseBodyFromJSONTyped;
@@ -37,6 +37,16 @@ var BillingPostResponseBodyBillingVersionEnum;
37
37
  BillingPostResponseBodyBillingVersionEnum[BillingPostResponseBodyBillingVersionEnum["NUMBER_1"] = 1] = "NUMBER_1";
38
38
  BillingPostResponseBodyBillingVersionEnum[BillingPostResponseBodyBillingVersionEnum["NUMBER_3"] = 3] = "NUMBER_3";
39
39
  })(BillingPostResponseBodyBillingVersionEnum || (exports.BillingPostResponseBodyBillingVersionEnum = BillingPostResponseBodyBillingVersionEnum = {}));
40
+ /**
41
+ * @export
42
+ * @enum {string}
43
+ */
44
+ var BillingPostResponseBodyStatusEnum;
45
+ (function (BillingPostResponseBodyStatusEnum) {
46
+ BillingPostResponseBodyStatusEnum["VERIFIED"] = "verified";
47
+ BillingPostResponseBodyStatusEnum["UNVERIFIED"] = "unverified";
48
+ BillingPostResponseBodyStatusEnum["BLOCKED"] = "blocked";
49
+ })(BillingPostResponseBodyStatusEnum || (exports.BillingPostResponseBodyStatusEnum = BillingPostResponseBodyStatusEnum = {}));
40
50
  /**
41
51
  * Check if a given object implements the BillingPostResponseBody interface.
42
52
  */
@@ -80,6 +90,7 @@ function BillingPostResponseBodyFromJSONTyped(json, ignoreDiscriminator) {
80
90
  allowOverage: json['allowOverage'],
81
91
  createdAt: json['createdAt'],
82
92
  updatedAt: json['updatedAt'],
93
+ status: json['status'] == null ? undefined : json['status'],
83
94
  sessionId: json['sessionId'] == null ? undefined : json['sessionId'],
84
95
  url: json['url'] == null ? undefined : json['url']
85
96
  };
@@ -105,6 +116,7 @@ function BillingPostResponseBodyToJSONTyped(value, ignoreDiscriminator = false)
105
116
  allowOverage: value['allowOverage'],
106
117
  createdAt: value['createdAt'],
107
118
  updatedAt: value['updatedAt'],
119
+ status: value['status'],
108
120
  sessionId: value['sessionId'],
109
121
  url: value['url']
110
122
  };
@@ -9,20 +9,31 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { CreateAccountRequestPlan } from './CreateAccountRequestPlan';
12
13
  /**
13
- *
14
+ * Request body for POST /accounts (create additional account).
14
15
  * @export
15
16
  * @interface CreateAccountRequest
16
17
  */
17
18
  export interface CreateAccountRequest {
18
19
  /**
19
- * First-touch PostHog props from the client; attached to signup events.
20
- * @type {{ [key: string]: string; }}
20
+ *
21
+ * @type {string}
22
+ * @memberof CreateAccountRequest
23
+ */
24
+ name: string;
25
+ /**
26
+ *
27
+ * @type {CreateAccountRequestPlan}
28
+ * @memberof CreateAccountRequest
29
+ */
30
+ plan?: CreateAccountRequestPlan;
31
+ /**
32
+ * Emails to add or invite to the new account. Existing members of any account the caller belongs to are added directly; everyone else is invited.
33
+ * @type {Array<string>}
21
34
  * @memberof CreateAccountRequest
22
35
  */
23
- attribution?: {
24
- [key: string]: string;
25
- };
36
+ memberEmails?: Array<string>;
26
37
  }
27
38
  /**
28
39
  * Check if a given object implements the CreateAccountRequest interface.
@@ -18,10 +18,13 @@ exports.CreateAccountRequestFromJSON = CreateAccountRequestFromJSON;
18
18
  exports.CreateAccountRequestFromJSONTyped = CreateAccountRequestFromJSONTyped;
19
19
  exports.CreateAccountRequestToJSON = CreateAccountRequestToJSON;
20
20
  exports.CreateAccountRequestToJSONTyped = CreateAccountRequestToJSONTyped;
21
+ const CreateAccountRequestPlan_1 = require("./CreateAccountRequestPlan");
21
22
  /**
22
23
  * Check if a given object implements the CreateAccountRequest interface.
23
24
  */
24
25
  function instanceOfCreateAccountRequest(value) {
26
+ if (!('name' in value) || value['name'] === undefined)
27
+ return false;
25
28
  return true;
26
29
  }
27
30
  function CreateAccountRequestFromJSON(json) {
@@ -32,7 +35,11 @@ function CreateAccountRequestFromJSONTyped(json, ignoreDiscriminator) {
32
35
  return json;
33
36
  }
34
37
  return {
35
- attribution: json['attribution'] == null ? undefined : json['attribution']
38
+ name: json['name'],
39
+ plan: json['plan'] == null
40
+ ? undefined
41
+ : (0, CreateAccountRequestPlan_1.CreateAccountRequestPlanFromJSON)(json['plan']),
42
+ memberEmails: json['memberEmails'] == null ? undefined : json['memberEmails']
36
43
  };
37
44
  }
38
45
  function CreateAccountRequestToJSON(json) {
@@ -43,6 +50,8 @@ function CreateAccountRequestToJSONTyped(value, ignoreDiscriminator = false) {
43
50
  return value;
44
51
  }
45
52
  return {
46
- attribution: value['attribution']
53
+ name: value['name'],
54
+ plan: (0, CreateAccountRequestPlan_1.CreateAccountRequestPlanToJSON)(value['plan']),
55
+ memberEmails: value['memberEmails']
47
56
  };
48
57
  }
@@ -0,0 +1,52 @@
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
+ * Billing to copy onto a new additional account.
14
+ * @export
15
+ * @interface CreateAccountRequestPlan
16
+ */
17
+ export interface CreateAccountRequestPlan {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof CreateAccountRequestPlan
22
+ */
23
+ tier: CreateAccountRequestPlanTierEnum;
24
+ /**
25
+ * Account whose saved payment method is copied onto the new account. The caller must be an owner of this account.
26
+ * @type {string}
27
+ * @memberof CreateAccountRequestPlan
28
+ */
29
+ sourceBillingAccountId: string;
30
+ }
31
+ /**
32
+ * @export
33
+ * @enum {string}
34
+ */
35
+ export declare enum CreateAccountRequestPlanTierEnum {
36
+ BUDGET_20 = "budget_20",
37
+ BUDGET_50 = "budget_50",
38
+ BUDGET_100 = "budget_100",
39
+ BUDGET_250 = "budget_250",
40
+ BUDGET_500 = "budget_500",
41
+ BUDGET_1000 = "budget_1000",
42
+ BUDGET_2000 = "budget_2000",
43
+ BUDGET_5000 = "budget_5000"
44
+ }
45
+ /**
46
+ * Check if a given object implements the CreateAccountRequestPlan interface.
47
+ */
48
+ export declare function instanceOfCreateAccountRequestPlan(value: object): value is CreateAccountRequestPlan;
49
+ export declare function CreateAccountRequestPlanFromJSON(json: any): CreateAccountRequestPlan;
50
+ export declare function CreateAccountRequestPlanFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateAccountRequestPlan;
51
+ export declare function CreateAccountRequestPlanToJSON(json: any): CreateAccountRequestPlan;
52
+ export declare function CreateAccountRequestPlanToJSONTyped(value?: CreateAccountRequestPlan | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,71 @@
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.CreateAccountRequestPlanTierEnum = void 0;
17
+ exports.instanceOfCreateAccountRequestPlan = instanceOfCreateAccountRequestPlan;
18
+ exports.CreateAccountRequestPlanFromJSON = CreateAccountRequestPlanFromJSON;
19
+ exports.CreateAccountRequestPlanFromJSONTyped = CreateAccountRequestPlanFromJSONTyped;
20
+ exports.CreateAccountRequestPlanToJSON = CreateAccountRequestPlanToJSON;
21
+ exports.CreateAccountRequestPlanToJSONTyped = CreateAccountRequestPlanToJSONTyped;
22
+ /**
23
+ * @export
24
+ * @enum {string}
25
+ */
26
+ var CreateAccountRequestPlanTierEnum;
27
+ (function (CreateAccountRequestPlanTierEnum) {
28
+ CreateAccountRequestPlanTierEnum["BUDGET_20"] = "budget_20";
29
+ CreateAccountRequestPlanTierEnum["BUDGET_50"] = "budget_50";
30
+ CreateAccountRequestPlanTierEnum["BUDGET_100"] = "budget_100";
31
+ CreateAccountRequestPlanTierEnum["BUDGET_250"] = "budget_250";
32
+ CreateAccountRequestPlanTierEnum["BUDGET_500"] = "budget_500";
33
+ CreateAccountRequestPlanTierEnum["BUDGET_1000"] = "budget_1000";
34
+ CreateAccountRequestPlanTierEnum["BUDGET_2000"] = "budget_2000";
35
+ CreateAccountRequestPlanTierEnum["BUDGET_5000"] = "budget_5000";
36
+ })(CreateAccountRequestPlanTierEnum || (exports.CreateAccountRequestPlanTierEnum = CreateAccountRequestPlanTierEnum = {}));
37
+ /**
38
+ * Check if a given object implements the CreateAccountRequestPlan interface.
39
+ */
40
+ function instanceOfCreateAccountRequestPlan(value) {
41
+ if (!('tier' in value) || value['tier'] === undefined)
42
+ return false;
43
+ if (!('sourceBillingAccountId' in value) ||
44
+ value['sourceBillingAccountId'] === undefined)
45
+ return false;
46
+ return true;
47
+ }
48
+ function CreateAccountRequestPlanFromJSON(json) {
49
+ return CreateAccountRequestPlanFromJSONTyped(json, false);
50
+ }
51
+ function CreateAccountRequestPlanFromJSONTyped(json, ignoreDiscriminator) {
52
+ if (json == null) {
53
+ return json;
54
+ }
55
+ return {
56
+ tier: json['tier'],
57
+ sourceBillingAccountId: json['sourceBillingAccountId']
58
+ };
59
+ }
60
+ function CreateAccountRequestPlanToJSON(json) {
61
+ return CreateAccountRequestPlanToJSONTyped(json, false);
62
+ }
63
+ function CreateAccountRequestPlanToJSONTyped(value, ignoreDiscriminator = false) {
64
+ if (value == null) {
65
+ return value;
66
+ }
67
+ return {
68
+ tier: value['tier'],
69
+ sourceBillingAccountId: value['sourceBillingAccountId']
70
+ };
71
+ }
@@ -10,23 +10,54 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  /**
13
- *
13
+ * Response for POST /accounts
14
14
  * @export
15
15
  * @interface CreateAccountResponse
16
16
  */
17
17
  export interface CreateAccountResponse {
18
18
  /**
19
19
  *
20
- * @type {boolean}
20
+ * @type {string}
21
21
  * @memberof CreateAccountResponse
22
22
  */
23
- success: boolean;
23
+ accountId: string;
24
24
  /**
25
25
  *
26
26
  * @type {string}
27
27
  * @memberof CreateAccountResponse
28
28
  */
29
- accountId: string;
29
+ name: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof CreateAccountResponse
34
+ */
35
+ status: CreateAccountResponseStatusEnum;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof CreateAccountResponse
40
+ */
41
+ subscriptionStatus?: CreateAccountResponseSubscriptionStatusEnum | null;
42
+ }
43
+ /**
44
+ * @export
45
+ * @enum {string}
46
+ */
47
+ export declare enum CreateAccountResponseStatusEnum {
48
+ VERIFIED = "verified",
49
+ UNVERIFIED = "unverified",
50
+ BLOCKED = "blocked"
51
+ }
52
+ /**
53
+ * @export
54
+ * @enum {string}
55
+ */
56
+ export declare enum CreateAccountResponseSubscriptionStatusEnum {
57
+ ACTIVE = "active",
58
+ CANCELED = "canceled",
59
+ PAST_DUE = "past_due",
60
+ PAUSED = "paused"
30
61
  }
31
62
  /**
32
63
  * Check if a given object implements the CreateAccountResponse interface.