pingram 1.0.23 → 1.0.24
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/UserApi.d.ts +1 -51
- package/dist/generated/src/apis/UserApi.js +0 -111
- package/dist/generated/src/apis/index.d.ts +1 -1
- package/dist/generated/src/models/index.d.ts +0 -1
- package/dist/generated/src/models/index.js +0 -1
- package/dist/src/client.js +1 -1
- package/package.json +1 -1
- package/dist/generated/src/models/SlackOauthRequest.d.ts +0 -38
- package/dist/generated/src/models/SlackOauthRequest.js +0 -54
|
@@ -10,14 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { GetAccountMetadataResponse, GetInappNotificationsResponse, InAppNotificationPatchRequest, InAppNotificationUnreadClearRequest, InappUnreadCountResponse, PostUserRequest,
|
|
14
|
-
export interface GenerateSlackOauthPathRequest {
|
|
15
|
-
userId: string;
|
|
16
|
-
slackOauthRequest: SlackOauthRequest;
|
|
17
|
-
}
|
|
18
|
-
export interface GetAvailableSlackChannelsRequest {
|
|
19
|
-
userId: string;
|
|
20
|
-
}
|
|
13
|
+
import type { GetAccountMetadataResponse, GetInappNotificationsResponse, InAppNotificationPatchRequest, InAppNotificationUnreadClearRequest, InappUnreadCountResponse, PostUserRequest, SuccessResponse, User } from '../models/index';
|
|
21
14
|
export interface GetInAppNotificationsRequest {
|
|
22
15
|
before?: string;
|
|
23
16
|
count?: number;
|
|
@@ -42,20 +35,6 @@ export interface UpdateInAppNotificationStatusRequest {
|
|
|
42
35
|
* @interface UserApiInterface
|
|
43
36
|
*/
|
|
44
37
|
export interface UserApiInterface {
|
|
45
|
-
/**
|
|
46
|
-
*
|
|
47
|
-
* @summary Complete Slack OAuth flow and store access token for user
|
|
48
|
-
* @param {string} userId User ID
|
|
49
|
-
* @param {SlackOauthRequest} slackOauthRequest
|
|
50
|
-
* @param {*} [options] Override http request option.
|
|
51
|
-
* @throws {RequiredError}
|
|
52
|
-
* @memberof UserApiInterface
|
|
53
|
-
*/
|
|
54
|
-
generateSlackOauthPathRaw(requestParameters: GenerateSlackOauthPathRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
55
|
-
/**
|
|
56
|
-
* Complete Slack OAuth flow and store access token for user
|
|
57
|
-
*/
|
|
58
|
-
generateSlackOauthPath(userId: string, slackOauthRequest: SlackOauthRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
59
38
|
/**
|
|
60
39
|
*
|
|
61
40
|
* @summary Get account-level metadata including logo, VAPID key, and web push status
|
|
@@ -68,19 +47,6 @@ export interface UserApiInterface {
|
|
|
68
47
|
* Get account-level metadata including logo, VAPID key, and web push status
|
|
69
48
|
*/
|
|
70
49
|
getAccountMetadata(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetAccountMetadataResponse>;
|
|
71
|
-
/**
|
|
72
|
-
*
|
|
73
|
-
* @summary Get list of Slack channels and users for the authenticated user
|
|
74
|
-
* @param {string} userId User ID
|
|
75
|
-
* @param {*} [options] Override http request option.
|
|
76
|
-
* @throws {RequiredError}
|
|
77
|
-
* @memberof UserApiInterface
|
|
78
|
-
*/
|
|
79
|
-
getAvailableSlackChannelsRaw(requestParameters: GetAvailableSlackChannelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
80
|
-
/**
|
|
81
|
-
* Get list of Slack channels and users for the authenticated user
|
|
82
|
-
*/
|
|
83
|
-
getAvailableSlackChannels(userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
84
50
|
/**
|
|
85
51
|
*
|
|
86
52
|
* @summary Get in-app notifications for a user
|
|
@@ -165,14 +131,6 @@ export interface UserApiInterface {
|
|
|
165
131
|
*
|
|
166
132
|
*/
|
|
167
133
|
export declare class UserApi extends runtime.BaseAPI implements UserApiInterface {
|
|
168
|
-
/**
|
|
169
|
-
* Complete Slack OAuth flow and store access token for user
|
|
170
|
-
*/
|
|
171
|
-
generateSlackOauthPathRaw(requestParameters: GenerateSlackOauthPathRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
172
|
-
/**
|
|
173
|
-
* Complete Slack OAuth flow and store access token for user
|
|
174
|
-
*/
|
|
175
|
-
generateSlackOauthPath(userId: string, slackOauthRequest: SlackOauthRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
176
134
|
/**
|
|
177
135
|
* Get account-level metadata including logo, VAPID key, and web push status
|
|
178
136
|
*/
|
|
@@ -181,14 +139,6 @@ export declare class UserApi extends runtime.BaseAPI implements UserApiInterface
|
|
|
181
139
|
* Get account-level metadata including logo, VAPID key, and web push status
|
|
182
140
|
*/
|
|
183
141
|
getAccountMetadata(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetAccountMetadataResponse>;
|
|
184
|
-
/**
|
|
185
|
-
* Get list of Slack channels and users for the authenticated user
|
|
186
|
-
*/
|
|
187
|
-
getAvailableSlackChannelsRaw(requestParameters: GetAvailableSlackChannelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
188
|
-
/**
|
|
189
|
-
* Get list of Slack channels and users for the authenticated user
|
|
190
|
-
*/
|
|
191
|
-
getAvailableSlackChannels(userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
192
142
|
/**
|
|
193
143
|
* Get in-app notifications for a user
|
|
194
144
|
*/
|
|
@@ -53,64 +53,6 @@ const index_1 = require("../models/index");
|
|
|
53
53
|
*
|
|
54
54
|
*/
|
|
55
55
|
class UserApi extends runtime.BaseAPI {
|
|
56
|
-
/**
|
|
57
|
-
* Complete Slack OAuth flow and store access token for user
|
|
58
|
-
*/
|
|
59
|
-
async generateSlackOauthPathRaw(requestParameters, initOverrides) {
|
|
60
|
-
if (requestParameters['userId'] == null) {
|
|
61
|
-
throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling generateSlackOauthPath().');
|
|
62
|
-
}
|
|
63
|
-
if (requestParameters['slackOauthRequest'] == null) {
|
|
64
|
-
throw new runtime.RequiredError('slackOauthRequest', 'Required parameter "slackOauthRequest" was null or undefined when calling generateSlackOauthPath().');
|
|
65
|
-
}
|
|
66
|
-
const queryParameters = {};
|
|
67
|
-
const headerParameters = {};
|
|
68
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
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 &&
|
|
77
|
-
(this.configuration.username !== undefined ||
|
|
78
|
-
this.configuration.password !== undefined)) {
|
|
79
|
-
headerParameters['Authorization'] =
|
|
80
|
-
'Basic ' +
|
|
81
|
-
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
82
|
-
}
|
|
83
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
84
|
-
const token = this.configuration.accessToken;
|
|
85
|
-
const tokenString = await token('apiKey', []);
|
|
86
|
-
if (tokenString) {
|
|
87
|
-
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
if (this.configuration &&
|
|
91
|
-
(this.configuration.username !== undefined ||
|
|
92
|
-
this.configuration.password !== undefined)) {
|
|
93
|
-
headerParameters['Authorization'] =
|
|
94
|
-
'Basic ' +
|
|
95
|
-
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
96
|
-
}
|
|
97
|
-
let urlPath = `/users/{userId}/slack-oauth`;
|
|
98
|
-
urlPath = urlPath.replace(`{${'userId'}}`, encodeURIComponent(String(requestParameters['userId'])));
|
|
99
|
-
const response = await this.request({
|
|
100
|
-
path: urlPath,
|
|
101
|
-
method: 'POST',
|
|
102
|
-
headers: headerParameters,
|
|
103
|
-
query: queryParameters,
|
|
104
|
-
body: (0, index_1.SlackOauthRequestToJSON)(requestParameters['slackOauthRequest'])
|
|
105
|
-
}, initOverrides);
|
|
106
|
-
return new runtime.VoidApiResponse(response);
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Complete Slack OAuth flow and store access token for user
|
|
110
|
-
*/
|
|
111
|
-
async generateSlackOauthPath(userId, slackOauthRequest, initOverrides) {
|
|
112
|
-
await this.generateSlackOauthPathRaw({ userId: userId, slackOauthRequest: slackOauthRequest }, initOverrides);
|
|
113
|
-
}
|
|
114
56
|
/**
|
|
115
57
|
* Get account-level metadata including logo, VAPID key, and web push status
|
|
116
58
|
*/
|
|
@@ -161,59 +103,6 @@ class UserApi extends runtime.BaseAPI {
|
|
|
161
103
|
const response = await this.getAccountMetadataRaw(initOverrides);
|
|
162
104
|
return await response.value();
|
|
163
105
|
}
|
|
164
|
-
/**
|
|
165
|
-
* Get list of Slack channels and users for the authenticated user
|
|
166
|
-
*/
|
|
167
|
-
async getAvailableSlackChannelsRaw(requestParameters, initOverrides) {
|
|
168
|
-
if (requestParameters['userId'] == null) {
|
|
169
|
-
throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling getAvailableSlackChannels().');
|
|
170
|
-
}
|
|
171
|
-
const queryParameters = {};
|
|
172
|
-
const headerParameters = {};
|
|
173
|
-
if (this.configuration &&
|
|
174
|
-
(this.configuration.username !== undefined ||
|
|
175
|
-
this.configuration.password !== undefined)) {
|
|
176
|
-
headerParameters['Authorization'] =
|
|
177
|
-
'Basic ' +
|
|
178
|
-
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
179
|
-
}
|
|
180
|
-
if (this.configuration &&
|
|
181
|
-
(this.configuration.username !== undefined ||
|
|
182
|
-
this.configuration.password !== undefined)) {
|
|
183
|
-
headerParameters['Authorization'] =
|
|
184
|
-
'Basic ' +
|
|
185
|
-
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
186
|
-
}
|
|
187
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
188
|
-
const token = this.configuration.accessToken;
|
|
189
|
-
const tokenString = await token('apiKey', []);
|
|
190
|
-
if (tokenString) {
|
|
191
|
-
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
if (this.configuration &&
|
|
195
|
-
(this.configuration.username !== undefined ||
|
|
196
|
-
this.configuration.password !== undefined)) {
|
|
197
|
-
headerParameters['Authorization'] =
|
|
198
|
-
'Basic ' +
|
|
199
|
-
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
200
|
-
}
|
|
201
|
-
let urlPath = `/users/{userId}/slack-channels`;
|
|
202
|
-
urlPath = urlPath.replace(`{${'userId'}}`, encodeURIComponent(String(requestParameters['userId'])));
|
|
203
|
-
const response = await this.request({
|
|
204
|
-
path: urlPath,
|
|
205
|
-
method: 'GET',
|
|
206
|
-
headers: headerParameters,
|
|
207
|
-
query: queryParameters
|
|
208
|
-
}, initOverrides);
|
|
209
|
-
return new runtime.VoidApiResponse(response);
|
|
210
|
-
}
|
|
211
|
-
/**
|
|
212
|
-
* Get list of Slack channels and users for the authenticated user
|
|
213
|
-
*/
|
|
214
|
-
async getAvailableSlackChannels(userId, initOverrides) {
|
|
215
|
-
await this.getAvailableSlackChannelsRaw({ userId: userId }, initOverrides);
|
|
216
|
-
}
|
|
217
106
|
/**
|
|
218
107
|
* Get in-app notifications for a user
|
|
219
108
|
*/
|
|
@@ -42,7 +42,7 @@ export type { CreateTemplateRequest, DeleteTemplateRequest, GetTemplateRequest,
|
|
|
42
42
|
export { TemplatesApi } from './TemplatesApi';
|
|
43
43
|
export type { CreateNotificationTypeRequest, DeleteNotificationTypeRequest, GetNotificationTypeRequest, UpdateNotificationTypeRequest, TypesApiInterface } from './TypesApi';
|
|
44
44
|
export { TypesApi } from './TypesApi';
|
|
45
|
-
export type {
|
|
45
|
+
export type { GetInAppNotificationsRequest, GetUserRequest, IdentifyRequest, MarkInAppNotificationsAsSeenRequest, UpdateInAppNotificationStatusRequest, UserApiInterface } from './UserApi';
|
|
46
46
|
export { UserApi } from './UserApi';
|
|
47
47
|
export type { DeleteUserRequest, ListUsersRequest, RemoveUserFromSuppressionRequest, UsersApiInterface } from './UsersApi';
|
|
48
48
|
export { UsersApi } from './UsersApi';
|
|
@@ -236,7 +236,6 @@ export * from './SenderPostBodyWebPush';
|
|
|
236
236
|
export * from './SenderPostResponse';
|
|
237
237
|
export * from './SetDefaultTemplateRequest';
|
|
238
238
|
export * from './SlackInteractivityResponse';
|
|
239
|
-
export * from './SlackOauthRequest';
|
|
240
239
|
export * from './SuccessResponse';
|
|
241
240
|
export * from './SupabaseConfigureRequest';
|
|
242
241
|
export * from './SupabaseConfigureResponse';
|
|
@@ -254,7 +254,6 @@ __exportStar(require("./SenderPostBodyWebPush"), exports);
|
|
|
254
254
|
__exportStar(require("./SenderPostResponse"), exports);
|
|
255
255
|
__exportStar(require("./SetDefaultTemplateRequest"), exports);
|
|
256
256
|
__exportStar(require("./SlackInteractivityResponse"), exports);
|
|
257
|
-
__exportStar(require("./SlackOauthRequest"), exports);
|
|
258
257
|
__exportStar(require("./SuccessResponse"), exports);
|
|
259
258
|
__exportStar(require("./SupabaseConfigureRequest"), exports);
|
|
260
259
|
__exportStar(require("./SupabaseConfigureResponse"), exports);
|
package/dist/src/client.js
CHANGED
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
8
8
|
exports.Pingram = void 0;
|
|
9
9
|
const src_1 = require("../generated/src");
|
|
10
10
|
// SDK version for User-Agent header (injected at codegen time)
|
|
11
|
-
const SDK_VERSION = '1.0.
|
|
11
|
+
const SDK_VERSION = '1.0.24';
|
|
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,38 +0,0 @@
|
|
|
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 SlackOauthRequest
|
|
16
|
-
*/
|
|
17
|
-
export interface SlackOauthRequest {
|
|
18
|
-
/**
|
|
19
|
-
*
|
|
20
|
-
* @type {string}
|
|
21
|
-
* @memberof SlackOauthRequest
|
|
22
|
-
*/
|
|
23
|
-
code: string;
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
* @type {string}
|
|
27
|
-
* @memberof SlackOauthRequest
|
|
28
|
-
*/
|
|
29
|
-
redirect_uri: string;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Check if a given object implements the SlackOauthRequest interface.
|
|
33
|
-
*/
|
|
34
|
-
export declare function instanceOfSlackOauthRequest(value: object): value is SlackOauthRequest;
|
|
35
|
-
export declare function SlackOauthRequestFromJSON(json: any): SlackOauthRequest;
|
|
36
|
-
export declare function SlackOauthRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SlackOauthRequest;
|
|
37
|
-
export declare function SlackOauthRequestToJSON(json: any): SlackOauthRequest;
|
|
38
|
-
export declare function SlackOauthRequestToJSONTyped(value?: SlackOauthRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -1,54 +0,0 @@
|
|
|
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.instanceOfSlackOauthRequest = instanceOfSlackOauthRequest;
|
|
17
|
-
exports.SlackOauthRequestFromJSON = SlackOauthRequestFromJSON;
|
|
18
|
-
exports.SlackOauthRequestFromJSONTyped = SlackOauthRequestFromJSONTyped;
|
|
19
|
-
exports.SlackOauthRequestToJSON = SlackOauthRequestToJSON;
|
|
20
|
-
exports.SlackOauthRequestToJSONTyped = SlackOauthRequestToJSONTyped;
|
|
21
|
-
/**
|
|
22
|
-
* Check if a given object implements the SlackOauthRequest interface.
|
|
23
|
-
*/
|
|
24
|
-
function instanceOfSlackOauthRequest(value) {
|
|
25
|
-
if (!('code' in value) || value['code'] === undefined)
|
|
26
|
-
return false;
|
|
27
|
-
if (!('redirect_uri' in value) || value['redirect_uri'] === undefined)
|
|
28
|
-
return false;
|
|
29
|
-
return true;
|
|
30
|
-
}
|
|
31
|
-
function SlackOauthRequestFromJSON(json) {
|
|
32
|
-
return SlackOauthRequestFromJSONTyped(json, false);
|
|
33
|
-
}
|
|
34
|
-
function SlackOauthRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
-
if (json == null) {
|
|
36
|
-
return json;
|
|
37
|
-
}
|
|
38
|
-
return {
|
|
39
|
-
code: json['code'],
|
|
40
|
-
redirect_uri: json['redirect_uri']
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
function SlackOauthRequestToJSON(json) {
|
|
44
|
-
return SlackOauthRequestToJSONTyped(json, false);
|
|
45
|
-
}
|
|
46
|
-
function SlackOauthRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
47
|
-
if (value == null) {
|
|
48
|
-
return value;
|
|
49
|
-
}
|
|
50
|
-
return {
|
|
51
|
-
code: value['code'],
|
|
52
|
-
redirect_uri: value['redirect_uri']
|
|
53
|
-
};
|
|
54
|
-
}
|