pingram 1.0.6-alpha.1102 → 1.0.6-alpha.1104

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.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,164 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ const fs = __importStar(require("fs"));
40
+ const path = __importStar(require("path"));
41
+ const package_json_1 = __importDefault(require("./package.json"));
42
+ const jsyaml = __importStar(require("js-yaml"));
43
+ const Mustache = __importStar(require("mustache"));
44
+ /**
45
+ * Convert string to camelCase (e.g., "Account" -> "account")
46
+ */
47
+ function toCamelCase(str) {
48
+ return str.charAt(0).toLowerCase() + str.slice(1);
49
+ }
50
+ /**
51
+ * Convert string to PascalCase (e.g., "account" -> "Account")
52
+ */
53
+ function toPascalCase(str) {
54
+ return str.charAt(0).toUpperCase() + str.slice(1);
55
+ }
56
+ /**
57
+ * Extract API tags from OpenAPI spec
58
+ * Tags determine how operations are grouped (e.g., "Users", "Logs")
59
+ */
60
+ function extractApisFromOpenAPI(openapiPath) {
61
+ /* eslint-disable-next-line */
62
+ const content = fs.readFileSync(openapiPath, 'utf-8');
63
+ const spec = jsyaml.load(content);
64
+ // Collect all unique tags from spec.tags and operations
65
+ const tagSet = new Set();
66
+ if (spec.tags) {
67
+ spec.tags.forEach((tag) => tagSet.add(tag.name));
68
+ }
69
+ if (spec.paths) {
70
+ Object.values(spec.paths).forEach((pathItem) => {
71
+ if (!pathItem)
72
+ return;
73
+ const operations = [
74
+ pathItem.get,
75
+ pathItem.put,
76
+ pathItem.post,
77
+ pathItem.delete,
78
+ pathItem.options,
79
+ pathItem.head,
80
+ pathItem.patch,
81
+ pathItem.trace
82
+ ];
83
+ operations.forEach((operation) => {
84
+ if (operation?.tags) {
85
+ operation.tags.forEach((tag) => tagSet.add(tag));
86
+ }
87
+ });
88
+ });
89
+ }
90
+ // Convert tags to structured API info with proper naming
91
+ return Array.from(tagSet)
92
+ .sort()
93
+ .map((tag) => ({
94
+ name: tag,
95
+ className: `${toPascalCase(tag)}Api`, // e.g., "UsersApi"
96
+ propertyName: toCamelCase(tag) // e.g., "users"
97
+ }));
98
+ }
99
+ /**
100
+ * Extract operations without tags (top-level methods like client.send())
101
+ */
102
+ function extractTopLevelOperations(openapiPath) {
103
+ /* eslint-disable-next-line */
104
+ const content = fs.readFileSync(openapiPath, 'utf-8');
105
+ const spec = jsyaml.load(content);
106
+ const topLevelOps = [];
107
+ if (spec.paths) {
108
+ Object.values(spec.paths).forEach((pathItem) => {
109
+ if (!pathItem)
110
+ return;
111
+ const operations = [
112
+ pathItem.get,
113
+ pathItem.put,
114
+ pathItem.post,
115
+ pathItem.delete,
116
+ pathItem.options,
117
+ pathItem.head,
118
+ pathItem.patch,
119
+ pathItem.trace
120
+ ];
121
+ operations.forEach((operation) => {
122
+ // Operations with no tags become top-level methods
123
+ if (operation?.operationId &&
124
+ (!operation.tags || operation.tags.length === 0)) {
125
+ topLevelOps.push({ operationId: operation.operationId });
126
+ }
127
+ });
128
+ });
129
+ }
130
+ return topLevelOps;
131
+ }
132
+ /**
133
+ * Generate Pingram wrapper from OpenAPI spec
134
+ *
135
+ * This script:
136
+ * 1. Parses the OpenAPI spec to extract API groupings
137
+ * 2. Transforms tag names into proper TypeScript naming (camelCase/PascalCase)
138
+ * 3. Renders the Mustache template with structured data
139
+ * 4. Formats the output with Prettier
140
+ */
141
+ async function generateClient() {
142
+ const sdkDir = __dirname;
143
+ const openapiPath = path.join(sdkDir, '../../codegen/openapi.yaml');
144
+ const templatePath = path.join(sdkDir, 'templates/client-wrapper.mustache');
145
+ const outputPath = path.join(sdkDir, 'src/client.ts');
146
+ // Extract and transform API metadata from OpenAPI spec
147
+ const apis = extractApisFromOpenAPI(openapiPath);
148
+ const topLevelOps = extractTopLevelOperations(openapiPath);
149
+ // Prepare template data with all APIs and top-level methods
150
+ const templateData = {
151
+ apis,
152
+ hasDefaultApi: topLevelOps.length > 0,
153
+ topLevelOperations: topLevelOps,
154
+ version: package_json_1.default.version
155
+ };
156
+ // Render Mustache template and write output
157
+ /* eslint-disable-next-line */
158
+ const templateContent = fs.readFileSync(templatePath, 'utf-8');
159
+ const clientCode = Mustache.render(templateContent, templateData);
160
+ /* eslint-disable-next-line */
161
+ fs.writeFileSync(outputPath, clientCode);
162
+ // Note: Prettier formatting is handled by the parent generate.ts script
163
+ }
164
+ generateClient();
@@ -0,0 +1,74 @@
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 { AcceptInviteRequest, AcceptInviteResponse, ChangeEmailRequest, SuccessResponse } from '../models/index';
14
+ export interface AcceptInviteOperationRequest {
15
+ acceptInviteRequest: AcceptInviteRequest;
16
+ }
17
+ export interface ChangeEmailOperationRequest {
18
+ changeEmailRequest: ChangeEmailRequest;
19
+ }
20
+ /**
21
+ * ProfileApi - interface
22
+ *
23
+ * @export
24
+ * @interface ProfileApiInterface
25
+ */
26
+ export interface ProfileApiInterface {
27
+ /**
28
+ *
29
+ * @summary Accept a team invitation using a token
30
+ * @param {AcceptInviteRequest} acceptInviteRequest
31
+ * @param {*} [options] Override http request option.
32
+ * @throws {RequiredError}
33
+ * @memberof ProfileApiInterface
34
+ */
35
+ acceptInviteRaw(requestParameters: AcceptInviteOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AcceptInviteResponse>>;
36
+ /**
37
+ * Accept a team invitation using a token
38
+ */
39
+ acceptInvite(acceptInviteRequest: AcceptInviteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AcceptInviteResponse>;
40
+ /**
41
+ *
42
+ * @summary Change the email address of the authenticated user
43
+ * @param {ChangeEmailRequest} changeEmailRequest
44
+ * @param {*} [options] Override http request option.
45
+ * @throws {RequiredError}
46
+ * @memberof ProfileApiInterface
47
+ */
48
+ changeEmailRaw(requestParameters: ChangeEmailOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SuccessResponse>>;
49
+ /**
50
+ * Change the email address of the authenticated user
51
+ */
52
+ changeEmail(changeEmailRequest: ChangeEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SuccessResponse>;
53
+ }
54
+ /**
55
+ *
56
+ */
57
+ export declare class ProfileApi extends runtime.BaseAPI implements ProfileApiInterface {
58
+ /**
59
+ * Accept a team invitation using a token
60
+ */
61
+ acceptInviteRaw(requestParameters: AcceptInviteOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AcceptInviteResponse>>;
62
+ /**
63
+ * Accept a team invitation using a token
64
+ */
65
+ acceptInvite(acceptInviteRequest: AcceptInviteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AcceptInviteResponse>;
66
+ /**
67
+ * Change the email address of the authenticated user
68
+ */
69
+ changeEmailRaw(requestParameters: ChangeEmailOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SuccessResponse>>;
70
+ /**
71
+ * Change the email address of the authenticated user
72
+ */
73
+ changeEmail(changeEmailRequest: ChangeEmailRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SuccessResponse>;
74
+ }
@@ -0,0 +1,139 @@
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.ProfileApi = void 0;
50
+ const runtime = __importStar(require("../runtime"));
51
+ const index_1 = require("../models/index");
52
+ /**
53
+ *
54
+ */
55
+ class ProfileApi extends runtime.BaseAPI {
56
+ /**
57
+ * Accept a team invitation using a token
58
+ */
59
+ async acceptInviteRaw(requestParameters, initOverrides) {
60
+ if (requestParameters['acceptInviteRequest'] == null) {
61
+ throw new runtime.RequiredError('acceptInviteRequest', 'Required parameter "acceptInviteRequest" was null or undefined when calling acceptInvite().');
62
+ }
63
+ const queryParameters = {};
64
+ const headerParameters = {};
65
+ headerParameters['Content-Type'] = 'application/json';
66
+ let urlPath = `/profile/accept_invite`;
67
+ const response = await this.request({
68
+ path: urlPath,
69
+ method: 'POST',
70
+ headers: headerParameters,
71
+ query: queryParameters,
72
+ body: (0, index_1.AcceptInviteRequestToJSON)(requestParameters['acceptInviteRequest'])
73
+ }, initOverrides);
74
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AcceptInviteResponseFromJSON)(jsonValue));
75
+ }
76
+ /**
77
+ * Accept a team invitation using a token
78
+ */
79
+ async acceptInvite(acceptInviteRequest, initOverrides) {
80
+ const response = await this.acceptInviteRaw({ acceptInviteRequest: acceptInviteRequest }, initOverrides);
81
+ return await response.value();
82
+ }
83
+ /**
84
+ * Change the email address of the authenticated user
85
+ */
86
+ async changeEmailRaw(requestParameters, initOverrides) {
87
+ if (requestParameters['changeEmailRequest'] == null) {
88
+ throw new runtime.RequiredError('changeEmailRequest', 'Required parameter "changeEmailRequest" was null or undefined when calling changeEmail().');
89
+ }
90
+ const queryParameters = {};
91
+ const headerParameters = {};
92
+ headerParameters['Content-Type'] = 'application/json';
93
+ if (this.configuration &&
94
+ (this.configuration.username !== undefined ||
95
+ this.configuration.password !== undefined)) {
96
+ headerParameters['Authorization'] =
97
+ 'Basic ' +
98
+ btoa(this.configuration.username + ':' + this.configuration.password);
99
+ }
100
+ if (this.configuration &&
101
+ (this.configuration.username !== undefined ||
102
+ this.configuration.password !== undefined)) {
103
+ headerParameters['Authorization'] =
104
+ 'Basic ' +
105
+ btoa(this.configuration.username + ':' + this.configuration.password);
106
+ }
107
+ if (this.configuration && this.configuration.accessToken) {
108
+ const token = this.configuration.accessToken;
109
+ const tokenString = await token('apiKey', []);
110
+ if (tokenString) {
111
+ headerParameters['Authorization'] = `Bearer ${tokenString}`;
112
+ }
113
+ }
114
+ if (this.configuration &&
115
+ (this.configuration.username !== undefined ||
116
+ this.configuration.password !== undefined)) {
117
+ headerParameters['Authorization'] =
118
+ 'Basic ' +
119
+ btoa(this.configuration.username + ':' + this.configuration.password);
120
+ }
121
+ let urlPath = `/profile/change-email`;
122
+ const response = await this.request({
123
+ path: urlPath,
124
+ method: 'POST',
125
+ headers: headerParameters,
126
+ query: queryParameters,
127
+ body: (0, index_1.ChangeEmailRequestToJSON)(requestParameters['changeEmailRequest'])
128
+ }, initOverrides);
129
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SuccessResponseFromJSON)(jsonValue));
130
+ }
131
+ /**
132
+ * Change the email address of the authenticated user
133
+ */
134
+ async changeEmail(changeEmailRequest, initOverrides) {
135
+ const response = await this.changeEmailRaw({ changeEmailRequest: changeEmailRequest }, initOverrides);
136
+ return await response.value();
137
+ }
138
+ }
139
+ exports.ProfileApi = ProfileApi;
@@ -12,6 +12,7 @@ export * from './LogsApi';
12
12
  export * from './MembersApi';
13
13
  export * from './NumbersApi';
14
14
  export * from './OrganizationApi';
15
+ export * from './ProfileApi';
15
16
  export * from './PushSettingsApi';
16
17
  export * from './SenderApi';
17
18
  export * from './TemplatesApi';
@@ -30,6 +30,7 @@ __exportStar(require("./LogsApi"), exports);
30
30
  __exportStar(require("./MembersApi"), exports);
31
31
  __exportStar(require("./NumbersApi"), exports);
32
32
  __exportStar(require("./OrganizationApi"), exports);
33
+ __exportStar(require("./ProfileApi"), exports);
33
34
  __exportStar(require("./PushSettingsApi"), exports);
34
35
  __exportStar(require("./SenderApi"), exports);
35
36
  __exportStar(require("./TemplatesApi"), exports);
@@ -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
+ *
14
+ * @export
15
+ * @interface AcceptInviteRequest
16
+ */
17
+ export interface AcceptInviteRequest {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof AcceptInviteRequest
22
+ */
23
+ token: string;
24
+ }
25
+ /**
26
+ * Check if a given object implements the AcceptInviteRequest interface.
27
+ */
28
+ export declare function instanceOfAcceptInviteRequest(value: object): value is AcceptInviteRequest;
29
+ export declare function AcceptInviteRequestFromJSON(json: any): AcceptInviteRequest;
30
+ export declare function AcceptInviteRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AcceptInviteRequest;
31
+ export declare function AcceptInviteRequestToJSON(json: any): AcceptInviteRequest;
32
+ export declare function AcceptInviteRequestToJSONTyped(value?: AcceptInviteRequest | 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.instanceOfAcceptInviteRequest = instanceOfAcceptInviteRequest;
17
+ exports.AcceptInviteRequestFromJSON = AcceptInviteRequestFromJSON;
18
+ exports.AcceptInviteRequestFromJSONTyped = AcceptInviteRequestFromJSONTyped;
19
+ exports.AcceptInviteRequestToJSON = AcceptInviteRequestToJSON;
20
+ exports.AcceptInviteRequestToJSONTyped = AcceptInviteRequestToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the AcceptInviteRequest interface.
23
+ */
24
+ function instanceOfAcceptInviteRequest(value) {
25
+ if (!('token' in value) || value['token'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ function AcceptInviteRequestFromJSON(json) {
30
+ return AcceptInviteRequestFromJSONTyped(json, false);
31
+ }
32
+ function AcceptInviteRequestFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ token: json['token']
38
+ };
39
+ }
40
+ function AcceptInviteRequestToJSON(json) {
41
+ return AcceptInviteRequestToJSONTyped(json, false);
42
+ }
43
+ function AcceptInviteRequestToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ token: value['token']
49
+ };
50
+ }
@@ -0,0 +1,50 @@
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 AcceptInviteResponse
16
+ */
17
+ export interface AcceptInviteResponse {
18
+ /**
19
+ *
20
+ * @type {boolean}
21
+ * @memberof AcceptInviteResponse
22
+ */
23
+ success: boolean;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof AcceptInviteResponse
28
+ */
29
+ accountId: string;
30
+ /**
31
+ *
32
+ * @type {boolean}
33
+ * @memberof AcceptInviteResponse
34
+ */
35
+ userExists: boolean;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof AcceptInviteResponse
40
+ */
41
+ inviteeEmail?: string;
42
+ }
43
+ /**
44
+ * Check if a given object implements the AcceptInviteResponse interface.
45
+ */
46
+ export declare function instanceOfAcceptInviteResponse(value: object): value is AcceptInviteResponse;
47
+ export declare function AcceptInviteResponseFromJSON(json: any): AcceptInviteResponse;
48
+ export declare function AcceptInviteResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AcceptInviteResponse;
49
+ export declare function AcceptInviteResponseToJSON(json: any): AcceptInviteResponse;
50
+ export declare function AcceptInviteResponseToJSONTyped(value?: AcceptInviteResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,60 @@
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.instanceOfAcceptInviteResponse = instanceOfAcceptInviteResponse;
17
+ exports.AcceptInviteResponseFromJSON = AcceptInviteResponseFromJSON;
18
+ exports.AcceptInviteResponseFromJSONTyped = AcceptInviteResponseFromJSONTyped;
19
+ exports.AcceptInviteResponseToJSON = AcceptInviteResponseToJSON;
20
+ exports.AcceptInviteResponseToJSONTyped = AcceptInviteResponseToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the AcceptInviteResponse interface.
23
+ */
24
+ function instanceOfAcceptInviteResponse(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 (!('userExists' in value) || value['userExists'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ function AcceptInviteResponseFromJSON(json) {
34
+ return AcceptInviteResponseFromJSONTyped(json, false);
35
+ }
36
+ function AcceptInviteResponseFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ success: json['success'],
42
+ accountId: json['accountId'],
43
+ userExists: json['userExists'],
44
+ inviteeEmail: json['inviteeEmail'] == null ? undefined : json['inviteeEmail']
45
+ };
46
+ }
47
+ function AcceptInviteResponseToJSON(json) {
48
+ return AcceptInviteResponseToJSONTyped(json, false);
49
+ }
50
+ function AcceptInviteResponseToJSONTyped(value, ignoreDiscriminator = false) {
51
+ if (value == null) {
52
+ return value;
53
+ }
54
+ return {
55
+ success: value['success'],
56
+ accountId: value['accountId'],
57
+ userExists: value['userExists'],
58
+ inviteeEmail: value['inviteeEmail']
59
+ };
60
+ }
@@ -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
+ *
14
+ * @export
15
+ * @interface ChangeEmailRequest
16
+ */
17
+ export interface ChangeEmailRequest {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof ChangeEmailRequest
22
+ */
23
+ newEmail: string;
24
+ }
25
+ /**
26
+ * Check if a given object implements the ChangeEmailRequest interface.
27
+ */
28
+ export declare function instanceOfChangeEmailRequest(value: object): value is ChangeEmailRequest;
29
+ export declare function ChangeEmailRequestFromJSON(json: any): ChangeEmailRequest;
30
+ export declare function ChangeEmailRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChangeEmailRequest;
31
+ export declare function ChangeEmailRequestToJSON(json: any): ChangeEmailRequest;
32
+ export declare function ChangeEmailRequestToJSONTyped(value?: ChangeEmailRequest | 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.instanceOfChangeEmailRequest = instanceOfChangeEmailRequest;
17
+ exports.ChangeEmailRequestFromJSON = ChangeEmailRequestFromJSON;
18
+ exports.ChangeEmailRequestFromJSONTyped = ChangeEmailRequestFromJSONTyped;
19
+ exports.ChangeEmailRequestToJSON = ChangeEmailRequestToJSON;
20
+ exports.ChangeEmailRequestToJSONTyped = ChangeEmailRequestToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the ChangeEmailRequest interface.
23
+ */
24
+ function instanceOfChangeEmailRequest(value) {
25
+ if (!('newEmail' in value) || value['newEmail'] === undefined)
26
+ return false;
27
+ return true;
28
+ }
29
+ function ChangeEmailRequestFromJSON(json) {
30
+ return ChangeEmailRequestFromJSONTyped(json, false);
31
+ }
32
+ function ChangeEmailRequestFromJSONTyped(json, ignoreDiscriminator) {
33
+ if (json == null) {
34
+ return json;
35
+ }
36
+ return {
37
+ newEmail: json['newEmail']
38
+ };
39
+ }
40
+ function ChangeEmailRequestToJSON(json) {
41
+ return ChangeEmailRequestToJSONTyped(json, false);
42
+ }
43
+ function ChangeEmailRequestToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ newEmail: value['newEmail']
49
+ };
50
+ }
@@ -1,4 +1,6 @@
1
1
  export * from './APNConfig';
2
+ export * from './AcceptInviteRequest';
3
+ export * from './AcceptInviteResponse';
2
4
  export * from './AccountAddressesResponse';
3
5
  export * from './AccountAddressesResponseAddressesInner';
4
6
  export * from './AccountGetResponse';
@@ -9,6 +11,7 @@ export * from './AutoJoinRequestBody';
9
11
  export * from './BeeTokenV2';
10
12
  export * from './BillingPostRequestBody';
11
13
  export * from './BillingPostResponseBody';
14
+ export * from './ChangeEmailRequest';
12
15
  export * from './ChannelsEnum';
13
16
  export * from './CreateAccountRequestBody';
14
17
  export * from './CreateAccountResponse';
@@ -17,6 +17,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  /* tslint:disable */
18
18
  /* eslint-disable */
19
19
  __exportStar(require("./APNConfig"), exports);
20
+ __exportStar(require("./AcceptInviteRequest"), exports);
21
+ __exportStar(require("./AcceptInviteResponse"), exports);
20
22
  __exportStar(require("./AccountAddressesResponse"), exports);
21
23
  __exportStar(require("./AccountAddressesResponseAddressesInner"), exports);
22
24
  __exportStar(require("./AccountGetResponse"), exports);
@@ -27,6 +29,7 @@ __exportStar(require("./AutoJoinRequestBody"), exports);
27
29
  __exportStar(require("./BeeTokenV2"), exports);
28
30
  __exportStar(require("./BillingPostRequestBody"), exports);
29
31
  __exportStar(require("./BillingPostResponseBody"), exports);
32
+ __exportStar(require("./ChangeEmailRequest"), exports);
30
33
  __exportStar(require("./ChannelsEnum"), exports);
31
34
  __exportStar(require("./CreateAccountRequestBody"), exports);
32
35
  __exportStar(require("./CreateAccountResponse"), exports);
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "pingram",
3
+ "version": "1.0.6-alpha.1104",
4
+ "description": "Official Node.js SDK for Pingram - Send notifications via Email, SMS, Push, In-App, and more",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "scripts": {
9
+ "build": "tsc",
10
+ "clean": "rm -rf dist",
11
+ "prepublishOnly": "npm run build"
12
+ },
13
+ "keywords": [
14
+ "pingram",
15
+ "notificationapi",
16
+ "notification",
17
+ "sdk",
18
+ "typescript",
19
+ "email",
20
+ "sms",
21
+ "push",
22
+ "in-app",
23
+ "slack",
24
+ "api"
25
+ ],
26
+ "author": "Pingram",
27
+ "license": "MIT",
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "git+https://github.com/notificationapi-com/serverless.git",
31
+ "directory": "sdks/node"
32
+ },
33
+ "homepage": "https://www.pingram.io/docs/reference/node",
34
+ "devDependencies": {
35
+ "@openapitools/openapi-generator-cli": "^2.25.2",
36
+ "@types/js-yaml": "^3.12.5",
37
+ "@types/mustache": "^4.2.5",
38
+ "@types/node": "^20.11.30",
39
+ "js-yaml": "^3.14.2",
40
+ "mustache": "^4.2.0",
41
+ "openapi-types": "^12.1.0",
42
+ "prettier": "^3.2.5",
43
+ "ts-node": "^10.9.2",
44
+ "typescript": "^5.4.3"
45
+ },
46
+ "dependencies": {
47
+ "node-fetch": "^2.7.0"
48
+ },
49
+ "overrides": {
50
+ "minimatch": ">=10.2.3"
51
+ },
52
+ "files": [
53
+ "dist/**/*",
54
+ "README.md",
55
+ "package.json"
56
+ ],
57
+ "publishConfig": {
58
+ "access": "public"
59
+ }
60
+ }
@@ -16,6 +16,7 @@ import { LogsApi } from '../generated/src';
16
16
  import { MembersApi } from '../generated/src';
17
17
  import { NumbersApi } from '../generated/src';
18
18
  import { OrganizationApi } from '../generated/src';
19
+ import { ProfileApi } from '../generated/src';
19
20
  import { PushSettingsApi } from '../generated/src';
20
21
  import { SenderApi } from '../generated/src';
21
22
  import { TemplatesApi } from '../generated/src';
@@ -116,6 +117,7 @@ export declare class Pingram {
116
117
  members: MembersApi;
117
118
  numbers: NumbersApi;
118
119
  organization: OrganizationApi;
120
+ profile: ProfileApi;
119
121
  pushSettings: PushSettingsApi;
120
122
  sender: SenderApi;
121
123
  templates: TemplatesApi;
@@ -31,6 +31,7 @@ const src_19 = require("../generated/src");
31
31
  const src_20 = require("../generated/src");
32
32
  const src_21 = require("../generated/src");
33
33
  const src_22 = require("../generated/src");
34
+ const src_23 = require("../generated/src");
34
35
  const testing_1 = require("./testing");
35
36
  /**
36
37
  * Get the base URL for a given region
@@ -123,14 +124,15 @@ class Pingram {
123
124
  this.members = new src_12.MembersApi(this.config);
124
125
  this.numbers = new src_13.NumbersApi(this.config);
125
126
  this.organization = new src_14.OrganizationApi(this.config);
126
- this.pushSettings = new src_15.PushSettingsApi(this.config);
127
- this.sender = new src_16.SenderApi(this.config);
128
- this.templates = new src_17.TemplatesApi(this.config);
129
- this.types = new src_18.TypesApi(this.config);
130
- this.user = new src_19.UserApi(this.config);
131
- this.users = new src_20.UsersApi(this.config);
132
- this.webhooks = new src_21.WebhooksApi(this.config);
133
- this.defaultApi = new src_22.DefaultApi(this.config);
127
+ this.profile = new src_15.ProfileApi(this.config);
128
+ this.pushSettings = new src_16.PushSettingsApi(this.config);
129
+ this.sender = new src_17.SenderApi(this.config);
130
+ this.templates = new src_18.TemplatesApi(this.config);
131
+ this.types = new src_19.TypesApi(this.config);
132
+ this.user = new src_20.UserApi(this.config);
133
+ this.users = new src_21.UsersApi(this.config);
134
+ this.webhooks = new src_22.WebhooksApi(this.config);
135
+ this.defaultApi = new src_23.DefaultApi(this.config);
134
136
  }
135
137
  /**
136
138
  * Update the base URL (overrides region)
@@ -153,14 +155,15 @@ class Pingram {
153
155
  this.members = new src_12.MembersApi(this.config);
154
156
  this.numbers = new src_13.NumbersApi(this.config);
155
157
  this.organization = new src_14.OrganizationApi(this.config);
156
- this.pushSettings = new src_15.PushSettingsApi(this.config);
157
- this.sender = new src_16.SenderApi(this.config);
158
- this.templates = new src_17.TemplatesApi(this.config);
159
- this.types = new src_18.TypesApi(this.config);
160
- this.user = new src_19.UserApi(this.config);
161
- this.users = new src_20.UsersApi(this.config);
162
- this.webhooks = new src_21.WebhooksApi(this.config);
163
- this.defaultApi = new src_22.DefaultApi(this.config);
158
+ this.profile = new src_15.ProfileApi(this.config);
159
+ this.pushSettings = new src_16.PushSettingsApi(this.config);
160
+ this.sender = new src_17.SenderApi(this.config);
161
+ this.templates = new src_18.TemplatesApi(this.config);
162
+ this.types = new src_19.TypesApi(this.config);
163
+ this.user = new src_20.UserApi(this.config);
164
+ this.users = new src_21.UsersApi(this.config);
165
+ this.webhooks = new src_22.WebhooksApi(this.config);
166
+ this.defaultApi = new src_23.DefaultApi(this.config);
164
167
  }
165
168
  /**
166
169
  * send
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pingram",
3
- "version": "1.0.6-alpha.1102",
3
+ "version": "1.0.6-alpha.1104",
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",