@notificationapi/node 0.0.2-alpha.6 → 0.0.2-alpha.8
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/MembersApi.d.ts +180 -0
- package/dist/generated/src/apis/MembersApi.js +408 -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/AutoJoinGetResponse.d.ts +38 -0
- package/dist/generated/src/models/AutoJoinGetResponse.js +54 -0
- package/dist/generated/src/models/AutoJoinPostResponse.d.ts +38 -0
- package/dist/generated/src/models/AutoJoinPostResponse.js +54 -0
- package/dist/generated/src/models/AutoJoinRequestBody.d.ts +32 -0
- package/dist/generated/src/models/AutoJoinRequestBody.js +50 -0
- package/dist/generated/src/models/ChannelsEnum.d.ts +30 -0
- package/dist/generated/src/models/ChannelsEnum.js +58 -0
- package/dist/generated/src/models/EmailComponentResponseReferencedByInner.d.ts +3 -15
- package/dist/generated/src/models/EmailComponentResponseReferencedByInner.js +3 -17
- package/dist/generated/src/models/Environment.d.ts +3 -15
- package/dist/generated/src/models/Environment.js +3 -17
- package/dist/generated/src/models/EnvironmentPatchRequest.d.ts +3 -15
- package/dist/generated/src/models/EnvironmentPatchRequest.js +7 -17
- package/dist/generated/src/models/GetEnvironmentsResponseInner.d.ts +3 -15
- package/dist/generated/src/models/GetEnvironmentsResponseInner.js +3 -17
- package/dist/generated/src/models/GetInappNotificationsResponseNotificationsInnerTemplate.d.ts +3 -15
- package/dist/generated/src/models/GetInappNotificationsResponseNotificationsInnerTemplate.js +3 -17
- package/dist/generated/src/models/GetInappNotificationsResponseNotificationsInnerTemplateAnyOf.d.ts +3 -15
- package/dist/generated/src/models/GetInappNotificationsResponseNotificationsInnerTemplateAnyOf.js +3 -17
- package/dist/generated/src/models/GetMembersResponseInner.d.ts +56 -0
- package/dist/generated/src/models/GetMembersResponseInner.js +62 -0
- package/dist/generated/src/models/GetNotificationsResponseInner.d.ts +3 -15
- package/dist/generated/src/models/GetNotificationsResponseInner.js +3 -17
- package/dist/generated/src/models/GetNotificationsResponseInnerTemplatesInner.d.ts +3 -15
- package/dist/generated/src/models/GetNotificationsResponseInnerTemplatesInner.js +3 -17
- package/dist/generated/src/models/GetTemplatesResponse.d.ts +3 -15
- package/dist/generated/src/models/GetTemplatesResponse.js +3 -17
- package/dist/generated/src/models/InvitePostResponse.d.ts +38 -0
- package/dist/generated/src/models/InvitePostResponse.js +50 -0
- package/dist/generated/src/models/MemberInviteRequest.d.ts +38 -0
- package/dist/generated/src/models/MemberInviteRequest.js +52 -0
- package/dist/generated/src/models/MemberUpdateRequest.d.ts +32 -0
- package/dist/generated/src/models/MemberUpdateRequest.js +50 -0
- package/dist/generated/src/models/Notification.d.ts +3 -15
- package/dist/generated/src/models/Notification.js +3 -17
- package/dist/generated/src/models/NotificationPatchRequest.d.ts +3 -15
- package/dist/generated/src/models/NotificationPatchRequest.js +7 -17
- package/dist/generated/src/models/SenderPostBody.d.ts +3 -15
- package/dist/generated/src/models/SenderPostBody.js +7 -17
- package/dist/generated/src/models/Template.d.ts +3 -15
- package/dist/generated/src/models/Template.js +3 -17
- package/dist/generated/src/models/index.d.ts +8 -0
- package/dist/generated/src/models/index.js +8 -0
- package/dist/src/client.d.ts +16 -1
- package/dist/src/client.js +28 -20
- package/dist/src/testing.js +3 -1
- package/package.json +1 -1
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NotificationAPI
|
|
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 { AutoJoinGetResponse, AutoJoinPostResponse, AutoJoinRequestBody, GetMembersResponseInner, InvitePostResponse, MemberInviteRequest, MemberUpdateRequest, SuccessResponse } from '../models/index';
|
|
14
|
+
export interface GetAutoJoinRequest {
|
|
15
|
+
envId: string;
|
|
16
|
+
}
|
|
17
|
+
export interface InviteMemberRequest {
|
|
18
|
+
envId: string;
|
|
19
|
+
memberInviteRequest: MemberInviteRequest;
|
|
20
|
+
}
|
|
21
|
+
export interface ListMembersRequest {
|
|
22
|
+
envId: string;
|
|
23
|
+
}
|
|
24
|
+
export interface RemoveMemberRequest {
|
|
25
|
+
envId: string;
|
|
26
|
+
userId: string;
|
|
27
|
+
}
|
|
28
|
+
export interface SetAutoJoinRequest {
|
|
29
|
+
envId: string;
|
|
30
|
+
autoJoinRequestBody: AutoJoinRequestBody;
|
|
31
|
+
}
|
|
32
|
+
export interface UpdateRequest {
|
|
33
|
+
envId: string;
|
|
34
|
+
userId: string;
|
|
35
|
+
memberUpdateRequest: MemberUpdateRequest;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* MembersApi - interface
|
|
39
|
+
*
|
|
40
|
+
* @export
|
|
41
|
+
* @interface MembersApiInterface
|
|
42
|
+
*/
|
|
43
|
+
export interface MembersApiInterface {
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @summary Get auto-join domains for the account
|
|
47
|
+
* @param {string} envId Environment ID
|
|
48
|
+
* @param {*} [options] Override http request option.
|
|
49
|
+
* @throws {RequiredError}
|
|
50
|
+
* @memberof MembersApiInterface
|
|
51
|
+
*/
|
|
52
|
+
getAutoJoinRaw(requestParameters: GetAutoJoinRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AutoJoinGetResponse>>;
|
|
53
|
+
/**
|
|
54
|
+
* Get auto-join domains for the account
|
|
55
|
+
*/
|
|
56
|
+
getAutoJoin(envId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AutoJoinGetResponse>;
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
* @summary Invite a new member to the account
|
|
60
|
+
* @param {string} envId Environment ID
|
|
61
|
+
* @param {MemberInviteRequest} memberInviteRequest
|
|
62
|
+
* @param {*} [options] Override http request option.
|
|
63
|
+
* @throws {RequiredError}
|
|
64
|
+
* @memberof MembersApiInterface
|
|
65
|
+
*/
|
|
66
|
+
inviteMemberRaw(requestParameters: InviteMemberRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InvitePostResponse>>;
|
|
67
|
+
/**
|
|
68
|
+
* Invite a new member to the account
|
|
69
|
+
*/
|
|
70
|
+
inviteMember(envId: string, memberInviteRequest: MemberInviteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InvitePostResponse>;
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
* @summary Get a list of team members in the account
|
|
74
|
+
* @param {string} envId Environment ID
|
|
75
|
+
* @param {*} [options] Override http request option.
|
|
76
|
+
* @throws {RequiredError}
|
|
77
|
+
* @memberof MembersApiInterface
|
|
78
|
+
*/
|
|
79
|
+
listMembersRaw(requestParameters: ListMembersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<GetMembersResponseInner>>>;
|
|
80
|
+
/**
|
|
81
|
+
* Get a list of team members in the account
|
|
82
|
+
*/
|
|
83
|
+
listMembers(envId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<GetMembersResponseInner>>;
|
|
84
|
+
/**
|
|
85
|
+
*
|
|
86
|
+
* @summary Remove a member from the account
|
|
87
|
+
* @param {string} envId Environment ID
|
|
88
|
+
* @param {string} userId User ID or email address (URL encoded)
|
|
89
|
+
* @param {*} [options] Override http request option.
|
|
90
|
+
* @throws {RequiredError}
|
|
91
|
+
* @memberof MembersApiInterface
|
|
92
|
+
*/
|
|
93
|
+
removeMemberRaw(requestParameters: RemoveMemberRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SuccessResponse>>;
|
|
94
|
+
/**
|
|
95
|
+
* Remove a member from the account
|
|
96
|
+
*/
|
|
97
|
+
removeMember(envId: string, userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SuccessResponse>;
|
|
98
|
+
/**
|
|
99
|
+
*
|
|
100
|
+
* @summary Set auto-join domains for the account
|
|
101
|
+
* @param {string} envId Environment ID
|
|
102
|
+
* @param {AutoJoinRequestBody} autoJoinRequestBody
|
|
103
|
+
* @param {*} [options] Override http request option.
|
|
104
|
+
* @throws {RequiredError}
|
|
105
|
+
* @memberof MembersApiInterface
|
|
106
|
+
*/
|
|
107
|
+
setAutoJoinRaw(requestParameters: SetAutoJoinRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AutoJoinPostResponse>>;
|
|
108
|
+
/**
|
|
109
|
+
* Set auto-join domains for the account
|
|
110
|
+
*/
|
|
111
|
+
setAutoJoin(envId: string, autoJoinRequestBody: AutoJoinRequestBody, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AutoJoinPostResponse>;
|
|
112
|
+
/**
|
|
113
|
+
*
|
|
114
|
+
* @summary Updates a specified member. The role update operation is restricted to administrators only.
|
|
115
|
+
* @param {string} envId Environment ID
|
|
116
|
+
* @param {string} userId User ID to update
|
|
117
|
+
* @param {MemberUpdateRequest} memberUpdateRequest
|
|
118
|
+
* @param {*} [options] Override http request option.
|
|
119
|
+
* @throws {RequiredError}
|
|
120
|
+
* @memberof MembersApiInterface
|
|
121
|
+
*/
|
|
122
|
+
updateRaw(requestParameters: UpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SuccessResponse>>;
|
|
123
|
+
/**
|
|
124
|
+
* Updates a specified member. The role update operation is restricted to administrators only.
|
|
125
|
+
*/
|
|
126
|
+
update(envId: string, userId: string, memberUpdateRequest: MemberUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SuccessResponse>;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
*
|
|
130
|
+
*/
|
|
131
|
+
export declare class MembersApi extends runtime.BaseAPI implements MembersApiInterface {
|
|
132
|
+
/**
|
|
133
|
+
* Get auto-join domains for the account
|
|
134
|
+
*/
|
|
135
|
+
getAutoJoinRaw(requestParameters: GetAutoJoinRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AutoJoinGetResponse>>;
|
|
136
|
+
/**
|
|
137
|
+
* Get auto-join domains for the account
|
|
138
|
+
*/
|
|
139
|
+
getAutoJoin(envId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AutoJoinGetResponse>;
|
|
140
|
+
/**
|
|
141
|
+
* Invite a new member to the account
|
|
142
|
+
*/
|
|
143
|
+
inviteMemberRaw(requestParameters: InviteMemberRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InvitePostResponse>>;
|
|
144
|
+
/**
|
|
145
|
+
* Invite a new member to the account
|
|
146
|
+
*/
|
|
147
|
+
inviteMember(envId: string, memberInviteRequest: MemberInviteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InvitePostResponse>;
|
|
148
|
+
/**
|
|
149
|
+
* Get a list of team members in the account
|
|
150
|
+
*/
|
|
151
|
+
listMembersRaw(requestParameters: ListMembersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<GetMembersResponseInner>>>;
|
|
152
|
+
/**
|
|
153
|
+
* Get a list of team members in the account
|
|
154
|
+
*/
|
|
155
|
+
listMembers(envId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<GetMembersResponseInner>>;
|
|
156
|
+
/**
|
|
157
|
+
* Remove a member from the account
|
|
158
|
+
*/
|
|
159
|
+
removeMemberRaw(requestParameters: RemoveMemberRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SuccessResponse>>;
|
|
160
|
+
/**
|
|
161
|
+
* Remove a member from the account
|
|
162
|
+
*/
|
|
163
|
+
removeMember(envId: string, userId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SuccessResponse>;
|
|
164
|
+
/**
|
|
165
|
+
* Set auto-join domains for the account
|
|
166
|
+
*/
|
|
167
|
+
setAutoJoinRaw(requestParameters: SetAutoJoinRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AutoJoinPostResponse>>;
|
|
168
|
+
/**
|
|
169
|
+
* Set auto-join domains for the account
|
|
170
|
+
*/
|
|
171
|
+
setAutoJoin(envId: string, autoJoinRequestBody: AutoJoinRequestBody, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AutoJoinPostResponse>;
|
|
172
|
+
/**
|
|
173
|
+
* Updates a specified member. The role update operation is restricted to administrators only.
|
|
174
|
+
*/
|
|
175
|
+
updateRaw(requestParameters: UpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SuccessResponse>>;
|
|
176
|
+
/**
|
|
177
|
+
* Updates a specified member. The role update operation is restricted to administrators only.
|
|
178
|
+
*/
|
|
179
|
+
update(envId: string, userId: string, memberUpdateRequest: MemberUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SuccessResponse>;
|
|
180
|
+
}
|
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* NotificationAPI
|
|
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.MembersApi = void 0;
|
|
50
|
+
const runtime = __importStar(require("../runtime"));
|
|
51
|
+
const index_1 = require("../models/index");
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
55
|
+
class MembersApi extends runtime.BaseAPI {
|
|
56
|
+
/**
|
|
57
|
+
* Get auto-join domains for the account
|
|
58
|
+
*/
|
|
59
|
+
async getAutoJoinRaw(requestParameters, initOverrides) {
|
|
60
|
+
if (requestParameters['envId'] == null) {
|
|
61
|
+
throw new runtime.RequiredError('envId', 'Required parameter "envId" was null or undefined when calling getAutoJoin().');
|
|
62
|
+
}
|
|
63
|
+
const queryParameters = {};
|
|
64
|
+
const headerParameters = {};
|
|
65
|
+
if (this.configuration &&
|
|
66
|
+
(this.configuration.username !== undefined ||
|
|
67
|
+
this.configuration.password !== undefined)) {
|
|
68
|
+
headerParameters['Authorization'] =
|
|
69
|
+
'Basic ' +
|
|
70
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
71
|
+
}
|
|
72
|
+
if (this.configuration &&
|
|
73
|
+
(this.configuration.username !== undefined ||
|
|
74
|
+
this.configuration.password !== undefined)) {
|
|
75
|
+
headerParameters['Authorization'] =
|
|
76
|
+
'Basic ' +
|
|
77
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
78
|
+
}
|
|
79
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
80
|
+
const token = this.configuration.accessToken;
|
|
81
|
+
const tokenString = await token('apiKey', []);
|
|
82
|
+
if (tokenString) {
|
|
83
|
+
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
if (this.configuration &&
|
|
87
|
+
(this.configuration.username !== undefined ||
|
|
88
|
+
this.configuration.password !== undefined)) {
|
|
89
|
+
headerParameters['Authorization'] =
|
|
90
|
+
'Basic ' +
|
|
91
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
92
|
+
}
|
|
93
|
+
let urlPath = `/members/autojoin`;
|
|
94
|
+
urlPath = urlPath.replace(`{${'envId'}}`, encodeURIComponent(String(requestParameters['envId'])));
|
|
95
|
+
const response = await this.request({
|
|
96
|
+
path: urlPath,
|
|
97
|
+
method: 'GET',
|
|
98
|
+
headers: headerParameters,
|
|
99
|
+
query: queryParameters
|
|
100
|
+
}, initOverrides);
|
|
101
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AutoJoinGetResponseFromJSON)(jsonValue));
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Get auto-join domains for the account
|
|
105
|
+
*/
|
|
106
|
+
async getAutoJoin(envId, initOverrides) {
|
|
107
|
+
const response = await this.getAutoJoinRaw({ envId: envId }, initOverrides);
|
|
108
|
+
return await response.value();
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Invite a new member to the account
|
|
112
|
+
*/
|
|
113
|
+
async inviteMemberRaw(requestParameters, initOverrides) {
|
|
114
|
+
if (requestParameters['envId'] == null) {
|
|
115
|
+
throw new runtime.RequiredError('envId', 'Required parameter "envId" was null or undefined when calling inviteMember().');
|
|
116
|
+
}
|
|
117
|
+
if (requestParameters['memberInviteRequest'] == null) {
|
|
118
|
+
throw new runtime.RequiredError('memberInviteRequest', 'Required parameter "memberInviteRequest" was null or undefined when calling inviteMember().');
|
|
119
|
+
}
|
|
120
|
+
const queryParameters = {};
|
|
121
|
+
const headerParameters = {};
|
|
122
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
123
|
+
if (this.configuration &&
|
|
124
|
+
(this.configuration.username !== undefined ||
|
|
125
|
+
this.configuration.password !== undefined)) {
|
|
126
|
+
headerParameters['Authorization'] =
|
|
127
|
+
'Basic ' +
|
|
128
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
129
|
+
}
|
|
130
|
+
if (this.configuration &&
|
|
131
|
+
(this.configuration.username !== undefined ||
|
|
132
|
+
this.configuration.password !== undefined)) {
|
|
133
|
+
headerParameters['Authorization'] =
|
|
134
|
+
'Basic ' +
|
|
135
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
136
|
+
}
|
|
137
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
138
|
+
const token = this.configuration.accessToken;
|
|
139
|
+
const tokenString = await token('apiKey', []);
|
|
140
|
+
if (tokenString) {
|
|
141
|
+
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
if (this.configuration &&
|
|
145
|
+
(this.configuration.username !== undefined ||
|
|
146
|
+
this.configuration.password !== undefined)) {
|
|
147
|
+
headerParameters['Authorization'] =
|
|
148
|
+
'Basic ' +
|
|
149
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
150
|
+
}
|
|
151
|
+
let urlPath = `/members`;
|
|
152
|
+
urlPath = urlPath.replace(`{${'envId'}}`, encodeURIComponent(String(requestParameters['envId'])));
|
|
153
|
+
const response = await this.request({
|
|
154
|
+
path: urlPath,
|
|
155
|
+
method: 'POST',
|
|
156
|
+
headers: headerParameters,
|
|
157
|
+
query: queryParameters,
|
|
158
|
+
body: (0, index_1.MemberInviteRequestToJSON)(requestParameters['memberInviteRequest'])
|
|
159
|
+
}, initOverrides);
|
|
160
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.InvitePostResponseFromJSON)(jsonValue));
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Invite a new member to the account
|
|
164
|
+
*/
|
|
165
|
+
async inviteMember(envId, memberInviteRequest, initOverrides) {
|
|
166
|
+
const response = await this.inviteMemberRaw({ envId: envId, memberInviteRequest: memberInviteRequest }, initOverrides);
|
|
167
|
+
return await response.value();
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Get a list of team members in the account
|
|
171
|
+
*/
|
|
172
|
+
async listMembersRaw(requestParameters, initOverrides) {
|
|
173
|
+
if (requestParameters['envId'] == null) {
|
|
174
|
+
throw new runtime.RequiredError('envId', 'Required parameter "envId" was null or undefined when calling listMembers().');
|
|
175
|
+
}
|
|
176
|
+
const queryParameters = {};
|
|
177
|
+
const headerParameters = {};
|
|
178
|
+
if (this.configuration &&
|
|
179
|
+
(this.configuration.username !== undefined ||
|
|
180
|
+
this.configuration.password !== undefined)) {
|
|
181
|
+
headerParameters['Authorization'] =
|
|
182
|
+
'Basic ' +
|
|
183
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
184
|
+
}
|
|
185
|
+
if (this.configuration &&
|
|
186
|
+
(this.configuration.username !== undefined ||
|
|
187
|
+
this.configuration.password !== undefined)) {
|
|
188
|
+
headerParameters['Authorization'] =
|
|
189
|
+
'Basic ' +
|
|
190
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
191
|
+
}
|
|
192
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
193
|
+
const token = this.configuration.accessToken;
|
|
194
|
+
const tokenString = await token('apiKey', []);
|
|
195
|
+
if (tokenString) {
|
|
196
|
+
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
if (this.configuration &&
|
|
200
|
+
(this.configuration.username !== undefined ||
|
|
201
|
+
this.configuration.password !== undefined)) {
|
|
202
|
+
headerParameters['Authorization'] =
|
|
203
|
+
'Basic ' +
|
|
204
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
205
|
+
}
|
|
206
|
+
let urlPath = `/members`;
|
|
207
|
+
urlPath = urlPath.replace(`{${'envId'}}`, encodeURIComponent(String(requestParameters['envId'])));
|
|
208
|
+
const response = await this.request({
|
|
209
|
+
path: urlPath,
|
|
210
|
+
method: 'GET',
|
|
211
|
+
headers: headerParameters,
|
|
212
|
+
query: queryParameters
|
|
213
|
+
}, initOverrides);
|
|
214
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.GetMembersResponseInnerFromJSON));
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Get a list of team members in the account
|
|
218
|
+
*/
|
|
219
|
+
async listMembers(envId, initOverrides) {
|
|
220
|
+
const response = await this.listMembersRaw({ envId: envId }, initOverrides);
|
|
221
|
+
return await response.value();
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Remove a member from the account
|
|
225
|
+
*/
|
|
226
|
+
async removeMemberRaw(requestParameters, initOverrides) {
|
|
227
|
+
if (requestParameters['envId'] == null) {
|
|
228
|
+
throw new runtime.RequiredError('envId', 'Required parameter "envId" was null or undefined when calling removeMember().');
|
|
229
|
+
}
|
|
230
|
+
if (requestParameters['userId'] == null) {
|
|
231
|
+
throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling removeMember().');
|
|
232
|
+
}
|
|
233
|
+
const queryParameters = {};
|
|
234
|
+
const headerParameters = {};
|
|
235
|
+
if (this.configuration &&
|
|
236
|
+
(this.configuration.username !== undefined ||
|
|
237
|
+
this.configuration.password !== undefined)) {
|
|
238
|
+
headerParameters['Authorization'] =
|
|
239
|
+
'Basic ' +
|
|
240
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
241
|
+
}
|
|
242
|
+
if (this.configuration &&
|
|
243
|
+
(this.configuration.username !== undefined ||
|
|
244
|
+
this.configuration.password !== undefined)) {
|
|
245
|
+
headerParameters['Authorization'] =
|
|
246
|
+
'Basic ' +
|
|
247
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
248
|
+
}
|
|
249
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
250
|
+
const token = this.configuration.accessToken;
|
|
251
|
+
const tokenString = await token('apiKey', []);
|
|
252
|
+
if (tokenString) {
|
|
253
|
+
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
if (this.configuration &&
|
|
257
|
+
(this.configuration.username !== undefined ||
|
|
258
|
+
this.configuration.password !== undefined)) {
|
|
259
|
+
headerParameters['Authorization'] =
|
|
260
|
+
'Basic ' +
|
|
261
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
262
|
+
}
|
|
263
|
+
let urlPath = `/members/{userId}`;
|
|
264
|
+
urlPath = urlPath.replace(`{${'envId'}}`, encodeURIComponent(String(requestParameters['envId'])));
|
|
265
|
+
urlPath = urlPath.replace(`{${'userId'}}`, encodeURIComponent(String(requestParameters['userId'])));
|
|
266
|
+
const response = await this.request({
|
|
267
|
+
path: urlPath,
|
|
268
|
+
method: 'DELETE',
|
|
269
|
+
headers: headerParameters,
|
|
270
|
+
query: queryParameters
|
|
271
|
+
}, initOverrides);
|
|
272
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SuccessResponseFromJSON)(jsonValue));
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Remove a member from the account
|
|
276
|
+
*/
|
|
277
|
+
async removeMember(envId, userId, initOverrides) {
|
|
278
|
+
const response = await this.removeMemberRaw({ envId: envId, userId: userId }, initOverrides);
|
|
279
|
+
return await response.value();
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Set auto-join domains for the account
|
|
283
|
+
*/
|
|
284
|
+
async setAutoJoinRaw(requestParameters, initOverrides) {
|
|
285
|
+
if (requestParameters['envId'] == null) {
|
|
286
|
+
throw new runtime.RequiredError('envId', 'Required parameter "envId" was null or undefined when calling setAutoJoin().');
|
|
287
|
+
}
|
|
288
|
+
if (requestParameters['autoJoinRequestBody'] == null) {
|
|
289
|
+
throw new runtime.RequiredError('autoJoinRequestBody', 'Required parameter "autoJoinRequestBody" was null or undefined when calling setAutoJoin().');
|
|
290
|
+
}
|
|
291
|
+
const queryParameters = {};
|
|
292
|
+
const headerParameters = {};
|
|
293
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
294
|
+
if (this.configuration &&
|
|
295
|
+
(this.configuration.username !== undefined ||
|
|
296
|
+
this.configuration.password !== undefined)) {
|
|
297
|
+
headerParameters['Authorization'] =
|
|
298
|
+
'Basic ' +
|
|
299
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
300
|
+
}
|
|
301
|
+
if (this.configuration &&
|
|
302
|
+
(this.configuration.username !== undefined ||
|
|
303
|
+
this.configuration.password !== undefined)) {
|
|
304
|
+
headerParameters['Authorization'] =
|
|
305
|
+
'Basic ' +
|
|
306
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
307
|
+
}
|
|
308
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
309
|
+
const token = this.configuration.accessToken;
|
|
310
|
+
const tokenString = await token('apiKey', []);
|
|
311
|
+
if (tokenString) {
|
|
312
|
+
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
if (this.configuration &&
|
|
316
|
+
(this.configuration.username !== undefined ||
|
|
317
|
+
this.configuration.password !== undefined)) {
|
|
318
|
+
headerParameters['Authorization'] =
|
|
319
|
+
'Basic ' +
|
|
320
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
321
|
+
}
|
|
322
|
+
let urlPath = `/members/autojoin`;
|
|
323
|
+
urlPath = urlPath.replace(`{${'envId'}}`, encodeURIComponent(String(requestParameters['envId'])));
|
|
324
|
+
const response = await this.request({
|
|
325
|
+
path: urlPath,
|
|
326
|
+
method: 'POST',
|
|
327
|
+
headers: headerParameters,
|
|
328
|
+
query: queryParameters,
|
|
329
|
+
body: (0, index_1.AutoJoinRequestBodyToJSON)(requestParameters['autoJoinRequestBody'])
|
|
330
|
+
}, initOverrides);
|
|
331
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.AutoJoinPostResponseFromJSON)(jsonValue));
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* Set auto-join domains for the account
|
|
335
|
+
*/
|
|
336
|
+
async setAutoJoin(envId, autoJoinRequestBody, initOverrides) {
|
|
337
|
+
const response = await this.setAutoJoinRaw({ envId: envId, autoJoinRequestBody: autoJoinRequestBody }, initOverrides);
|
|
338
|
+
return await response.value();
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Updates a specified member. The role update operation is restricted to administrators only.
|
|
342
|
+
*/
|
|
343
|
+
async updateRaw(requestParameters, initOverrides) {
|
|
344
|
+
if (requestParameters['envId'] == null) {
|
|
345
|
+
throw new runtime.RequiredError('envId', 'Required parameter "envId" was null or undefined when calling update().');
|
|
346
|
+
}
|
|
347
|
+
if (requestParameters['userId'] == null) {
|
|
348
|
+
throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling update().');
|
|
349
|
+
}
|
|
350
|
+
if (requestParameters['memberUpdateRequest'] == null) {
|
|
351
|
+
throw new runtime.RequiredError('memberUpdateRequest', 'Required parameter "memberUpdateRequest" was null or undefined when calling update().');
|
|
352
|
+
}
|
|
353
|
+
const queryParameters = {};
|
|
354
|
+
const headerParameters = {};
|
|
355
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
356
|
+
if (this.configuration &&
|
|
357
|
+
(this.configuration.username !== undefined ||
|
|
358
|
+
this.configuration.password !== undefined)) {
|
|
359
|
+
headerParameters['Authorization'] =
|
|
360
|
+
'Basic ' +
|
|
361
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
362
|
+
}
|
|
363
|
+
if (this.configuration &&
|
|
364
|
+
(this.configuration.username !== undefined ||
|
|
365
|
+
this.configuration.password !== undefined)) {
|
|
366
|
+
headerParameters['Authorization'] =
|
|
367
|
+
'Basic ' +
|
|
368
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
369
|
+
}
|
|
370
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
371
|
+
const token = this.configuration.accessToken;
|
|
372
|
+
const tokenString = await token('apiKey', []);
|
|
373
|
+
if (tokenString) {
|
|
374
|
+
headerParameters['Authorization'] = `Bearer ${tokenString}`;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
if (this.configuration &&
|
|
378
|
+
(this.configuration.username !== undefined ||
|
|
379
|
+
this.configuration.password !== undefined)) {
|
|
380
|
+
headerParameters['Authorization'] =
|
|
381
|
+
'Basic ' +
|
|
382
|
+
btoa(this.configuration.username + ':' + this.configuration.password);
|
|
383
|
+
}
|
|
384
|
+
let urlPath = `/members/{userId}`;
|
|
385
|
+
urlPath = urlPath.replace(`{${'envId'}}`, encodeURIComponent(String(requestParameters['envId'])));
|
|
386
|
+
urlPath = urlPath.replace(`{${'userId'}}`, encodeURIComponent(String(requestParameters['userId'])));
|
|
387
|
+
const response = await this.request({
|
|
388
|
+
path: urlPath,
|
|
389
|
+
method: 'PATCH',
|
|
390
|
+
headers: headerParameters,
|
|
391
|
+
query: queryParameters,
|
|
392
|
+
body: (0, index_1.MemberUpdateRequestToJSON)(requestParameters['memberUpdateRequest'])
|
|
393
|
+
}, initOverrides);
|
|
394
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SuccessResponseFromJSON)(jsonValue));
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* Updates a specified member. The role update operation is restricted to administrators only.
|
|
398
|
+
*/
|
|
399
|
+
async update(envId, userId, memberUpdateRequest, initOverrides) {
|
|
400
|
+
const response = await this.updateRaw({
|
|
401
|
+
envId: envId,
|
|
402
|
+
userId: userId,
|
|
403
|
+
memberUpdateRequest: memberUpdateRequest
|
|
404
|
+
}, initOverrides);
|
|
405
|
+
return await response.value();
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
exports.MembersApi = MembersApi;
|
|
@@ -26,6 +26,7 @@ __exportStar(require("./HealthApi"), exports);
|
|
|
26
26
|
__exportStar(require("./InsightsApi"), exports);
|
|
27
27
|
__exportStar(require("./KeysApi"), exports);
|
|
28
28
|
__exportStar(require("./LogsApi"), exports);
|
|
29
|
+
__exportStar(require("./MembersApi"), exports);
|
|
29
30
|
__exportStar(require("./SenderApi"), exports);
|
|
30
31
|
__exportStar(require("./TemplatesApi"), exports);
|
|
31
32
|
__exportStar(require("./TypesApi"), exports);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NotificationAPI
|
|
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 AutoJoinGetResponse
|
|
16
|
+
*/
|
|
17
|
+
export interface AutoJoinGetResponse {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof AutoJoinGetResponse
|
|
22
|
+
*/
|
|
23
|
+
accountId: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {Array<string>}
|
|
27
|
+
* @memberof AutoJoinGetResponse
|
|
28
|
+
*/
|
|
29
|
+
domains: Array<string>;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the AutoJoinGetResponse interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfAutoJoinGetResponse(value: object): value is AutoJoinGetResponse;
|
|
35
|
+
export declare function AutoJoinGetResponseFromJSON(json: any): AutoJoinGetResponse;
|
|
36
|
+
export declare function AutoJoinGetResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AutoJoinGetResponse;
|
|
37
|
+
export declare function AutoJoinGetResponseToJSON(json: any): AutoJoinGetResponse;
|
|
38
|
+
export declare function AutoJoinGetResponseToJSONTyped(value?: AutoJoinGetResponse | null, ignoreDiscriminator?: boolean): any;
|