pingram 1.0.11 → 1.0.12-alpha.1194

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.
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { OrganizationUsage, OrganizationUsageHistory } from '../models/index';
13
+ import type { CreateOrganizationResponse, OrganizationUsage, OrganizationUsageHistory } from '../models/index';
14
14
  export interface GetUsageHistoryRequest {
15
15
  startDate: string;
16
16
  endDate: string;
@@ -22,6 +22,18 @@ export interface GetUsageHistoryRequest {
22
22
  * @interface OrganizationApiInterface
23
23
  */
24
24
  export interface OrganizationApiInterface {
25
+ /**
26
+ *
27
+ * @summary Create organization after SMS verification bypass
28
+ * @param {*} [options] Override http request option.
29
+ * @throws {RequiredError}
30
+ * @memberof OrganizationApiInterface
31
+ */
32
+ createRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateOrganizationResponse>>;
33
+ /**
34
+ * Create organization after SMS verification bypass
35
+ */
36
+ create(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateOrganizationResponse>;
25
37
  /**
26
38
  *
27
39
  * @summary Get usage for the authenticated account\'s organization (new billing model).
@@ -53,6 +65,14 @@ export interface OrganizationApiInterface {
53
65
  *
54
66
  */
55
67
  export declare class OrganizationApi extends runtime.BaseAPI implements OrganizationApiInterface {
68
+ /**
69
+ * Create organization after SMS verification bypass
70
+ */
71
+ createRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateOrganizationResponse>>;
72
+ /**
73
+ * Create organization after SMS verification bypass
74
+ */
75
+ create(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateOrganizationResponse>;
56
76
  /**
57
77
  * Get usage for the authenticated account\'s organization (new billing model).
58
78
  */
@@ -53,6 +53,56 @@ const index_1 = require("../models/index");
53
53
  *
54
54
  */
55
55
  class OrganizationApi extends runtime.BaseAPI {
56
+ /**
57
+ * Create organization after SMS verification bypass
58
+ */
59
+ async createRaw(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 = `/organizations`;
91
+ const response = await this.request({
92
+ path: urlPath,
93
+ method: 'POST',
94
+ headers: headerParameters,
95
+ query: queryParameters
96
+ }, initOverrides);
97
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CreateOrganizationResponseFromJSON)(jsonValue));
98
+ }
99
+ /**
100
+ * Create organization after SMS verification bypass
101
+ */
102
+ async create(initOverrides) {
103
+ const response = await this.createRaw(initOverrides);
104
+ return await response.value();
105
+ }
56
106
  /**
57
107
  * Get usage for the authenticated account\'s organization (new billing model).
58
108
  */
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Pingram
3
+ * Internal API for notification delivery and management
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface CreateOrganizationResponse
16
+ */
17
+ export interface CreateOrganizationResponse {
18
+ /**
19
+ *
20
+ * @type {boolean}
21
+ * @memberof CreateOrganizationResponse
22
+ */
23
+ success: boolean;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof CreateOrganizationResponse
28
+ */
29
+ accountId: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof CreateOrganizationResponse
34
+ */
35
+ organizationId: string;
36
+ }
37
+ /**
38
+ * Check if a given object implements the CreateOrganizationResponse interface.
39
+ */
40
+ export declare function instanceOfCreateOrganizationResponse(value: object): value is CreateOrganizationResponse;
41
+ export declare function CreateOrganizationResponseFromJSON(json: any): CreateOrganizationResponse;
42
+ export declare function CreateOrganizationResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateOrganizationResponse;
43
+ export declare function CreateOrganizationResponseToJSON(json: any): CreateOrganizationResponse;
44
+ export declare function CreateOrganizationResponseToJSONTyped(value?: CreateOrganizationResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Pingram
6
+ * Internal API for notification delivery and management
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfCreateOrganizationResponse = instanceOfCreateOrganizationResponse;
17
+ exports.CreateOrganizationResponseFromJSON = CreateOrganizationResponseFromJSON;
18
+ exports.CreateOrganizationResponseFromJSONTyped = CreateOrganizationResponseFromJSONTyped;
19
+ exports.CreateOrganizationResponseToJSON = CreateOrganizationResponseToJSON;
20
+ exports.CreateOrganizationResponseToJSONTyped = CreateOrganizationResponseToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the CreateOrganizationResponse interface.
23
+ */
24
+ function instanceOfCreateOrganizationResponse(value) {
25
+ if (!('success' in value) || value['success'] === undefined)
26
+ return false;
27
+ if (!('accountId' in value) || value['accountId'] === undefined)
28
+ return false;
29
+ if (!('organizationId' in value) || value['organizationId'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ function CreateOrganizationResponseFromJSON(json) {
34
+ return CreateOrganizationResponseFromJSONTyped(json, false);
35
+ }
36
+ function CreateOrganizationResponseFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ success: json['success'],
42
+ accountId: json['accountId'],
43
+ organizationId: json['organizationId']
44
+ };
45
+ }
46
+ function CreateOrganizationResponseToJSON(json) {
47
+ return CreateOrganizationResponseToJSONTyped(json, false);
48
+ }
49
+ function CreateOrganizationResponseToJSONTyped(value, ignoreDiscriminator = false) {
50
+ if (value == null) {
51
+ return value;
52
+ }
53
+ return {
54
+ success: value['success'],
55
+ accountId: value['accountId'],
56
+ organizationId: value['organizationId']
57
+ };
58
+ }
@@ -24,6 +24,7 @@ export * from './CreateAccountResponse';
24
24
  export * from './CreateAddressRequest';
25
25
  export * from './CreateKeyRequest';
26
26
  export * from './CreateKeyResponse';
27
+ export * from './CreateOrganizationResponse';
27
28
  export * from './DeleteKeyResponse';
28
29
  export * from './DeleteUserResponse';
29
30
  export * from './EmailAuthTokenPostRequest';
@@ -42,6 +42,7 @@ __exportStar(require("./CreateAccountResponse"), exports);
42
42
  __exportStar(require("./CreateAddressRequest"), exports);
43
43
  __exportStar(require("./CreateKeyRequest"), exports);
44
44
  __exportStar(require("./CreateKeyResponse"), exports);
45
+ __exportStar(require("./CreateOrganizationResponse"), exports);
45
46
  __exportStar(require("./DeleteKeyResponse"), exports);
46
47
  __exportStar(require("./DeleteUserResponse"), exports);
47
48
  __exportStar(require("./EmailAuthTokenPostRequest"), exports);
@@ -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';
11
+ const SDK_VERSION = '1.0.12';
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pingram",
3
- "version": "1.0.11",
3
+ "version": "1.0.12-alpha.1194",
4
4
  "description": "Official Node.js SDK for Pingram - Send notifications via Email, SMS, Push, In-App, and more",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -57,7 +57,8 @@
57
57
  "node-fetch": "^2.7.0"
58
58
  },
59
59
  "overrides": {
60
- "minimatch": ">=10.2.3"
60
+ "minimatch": ">=10.2.3",
61
+ "shell-quote": "1.8.4"
61
62
  },
62
63
  "files": [
63
64
  "dist/**/*",