@revenexx/sdk 0.0.2
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/LICENSE +21 -0
- package/README.md +148 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/sdk.js +16340 -0
- package/dist/cjs/sdk.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/sdk.js +16250 -0
- package/dist/esm/sdk.js.map +1 -0
- package/dist/iife/sdk.js +20101 -0
- package/package.json +56 -0
- package/src/channel.ts +158 -0
- package/src/client.ts +950 -0
- package/src/enums/adapter.ts +4 -0
- package/src/enums/attribute-boolean-status.ts +7 -0
- package/src/enums/attribute-datetime-status.ts +7 -0
- package/src/enums/attribute-email-status.ts +7 -0
- package/src/enums/attribute-enum-status.ts +7 -0
- package/src/enums/attribute-float-status.ts +7 -0
- package/src/enums/attribute-integer-status.ts +7 -0
- package/src/enums/attribute-ip-status.ts +7 -0
- package/src/enums/attribute-line-status.ts +7 -0
- package/src/enums/attribute-longtext-status.ts +7 -0
- package/src/enums/attribute-mediumtext-status.ts +7 -0
- package/src/enums/attribute-point-status.ts +7 -0
- package/src/enums/attribute-polygon-status.ts +7 -0
- package/src/enums/attribute-relationship-status.ts +7 -0
- package/src/enums/attribute-string-status.ts +7 -0
- package/src/enums/attribute-text-status.ts +7 -0
- package/src/enums/attribute-url-status.ts +7 -0
- package/src/enums/attribute-varchar-status.ts +7 -0
- package/src/enums/build-runtime.ts +73 -0
- package/src/enums/code.ts +16 -0
- package/src/enums/collection.ts +4 -0
- package/src/enums/column-boolean-status.ts +7 -0
- package/src/enums/column-datetime-status.ts +7 -0
- package/src/enums/column-email-status.ts +7 -0
- package/src/enums/column-enum-status.ts +7 -0
- package/src/enums/column-float-status.ts +7 -0
- package/src/enums/column-integer-status.ts +7 -0
- package/src/enums/column-ip-status.ts +7 -0
- package/src/enums/column-line-status.ts +7 -0
- package/src/enums/column-longtext-status.ts +7 -0
- package/src/enums/column-mediumtext-status.ts +7 -0
- package/src/enums/column-point-status.ts +7 -0
- package/src/enums/column-polygon-status.ts +7 -0
- package/src/enums/column-relationship-status.ts +7 -0
- package/src/enums/column-string-status.ts +7 -0
- package/src/enums/column-text-status.ts +7 -0
- package/src/enums/column-url-status.ts +7 -0
- package/src/enums/column-varchar-status.ts +7 -0
- package/src/enums/compression.ts +5 -0
- package/src/enums/database-type.ts +4 -0
- package/src/enums/deployment-status.ts +8 -0
- package/src/enums/execution-status.ts +7 -0
- package/src/enums/execution-trigger.ts +5 -0
- package/src/enums/framework.ts +17 -0
- package/src/enums/gravity.ts +11 -0
- package/src/enums/health-antivirus-status.ts +5 -0
- package/src/enums/health-status-status.ts +4 -0
- package/src/enums/index-status.ts +7 -0
- package/src/enums/message-status.ts +7 -0
- package/src/enums/method.ts +9 -0
- package/src/enums/output.ts +9 -0
- package/src/enums/permissions.ts +22 -0
- package/src/enums/priority.ts +4 -0
- package/src/enums/range.ts +5 -0
- package/src/enums/runtime.ts +73 -0
- package/src/enums/runtimes.ts +73 -0
- package/src/enums/scopes.ts +57 -0
- package/src/enums/theme.ts +4 -0
- package/src/enums/timezone.ts +421 -0
- package/src/enums/type.ts +5 -0
- package/src/enums/use-cases.ts +9 -0
- package/src/id.ts +47 -0
- package/src/index.ts +92 -0
- package/src/models.ts +6013 -0
- package/src/operator.ts +308 -0
- package/src/permission.ts +57 -0
- package/src/query.ts +576 -0
- package/src/role.ts +100 -0
- package/src/service.ts +30 -0
- package/src/services/apps.ts +2473 -0
- package/src/services/avatars.ts +744 -0
- package/src/services/carts.ts +1057 -0
- package/src/services/channels.ts +227 -0
- package/src/services/customers.ts +729 -0
- package/src/services/greetings.ts +294 -0
- package/src/services/locale.ts +198 -0
- package/src/services/markets.ts +796 -0
- package/src/services/messaging.ts +3463 -0
- package/src/services/products.ts +3100 -0
- package/src/services/realtime.ts +537 -0
- package/src/services/search.ts +346 -0
- package/src/services/sites.ts +1847 -0
- package/src/services/storage.ts +1076 -0
- package/src/services/tokens.ts +314 -0
- package/types/channel.d.ts +74 -0
- package/types/client.d.ts +211 -0
- package/types/enums/adapter.d.ts +4 -0
- package/types/enums/attribute-boolean-status.d.ts +7 -0
- package/types/enums/attribute-datetime-status.d.ts +7 -0
- package/types/enums/attribute-email-status.d.ts +7 -0
- package/types/enums/attribute-enum-status.d.ts +7 -0
- package/types/enums/attribute-float-status.d.ts +7 -0
- package/types/enums/attribute-integer-status.d.ts +7 -0
- package/types/enums/attribute-ip-status.d.ts +7 -0
- package/types/enums/attribute-line-status.d.ts +7 -0
- package/types/enums/attribute-longtext-status.d.ts +7 -0
- package/types/enums/attribute-mediumtext-status.d.ts +7 -0
- package/types/enums/attribute-point-status.d.ts +7 -0
- package/types/enums/attribute-polygon-status.d.ts +7 -0
- package/types/enums/attribute-relationship-status.d.ts +7 -0
- package/types/enums/attribute-string-status.d.ts +7 -0
- package/types/enums/attribute-text-status.d.ts +7 -0
- package/types/enums/attribute-url-status.d.ts +7 -0
- package/types/enums/attribute-varchar-status.d.ts +7 -0
- package/types/enums/build-runtime.d.ts +73 -0
- package/types/enums/code.d.ts +16 -0
- package/types/enums/collection.d.ts +4 -0
- package/types/enums/column-boolean-status.d.ts +7 -0
- package/types/enums/column-datetime-status.d.ts +7 -0
- package/types/enums/column-email-status.d.ts +7 -0
- package/types/enums/column-enum-status.d.ts +7 -0
- package/types/enums/column-float-status.d.ts +7 -0
- package/types/enums/column-integer-status.d.ts +7 -0
- package/types/enums/column-ip-status.d.ts +7 -0
- package/types/enums/column-line-status.d.ts +7 -0
- package/types/enums/column-longtext-status.d.ts +7 -0
- package/types/enums/column-mediumtext-status.d.ts +7 -0
- package/types/enums/column-point-status.d.ts +7 -0
- package/types/enums/column-polygon-status.d.ts +7 -0
- package/types/enums/column-relationship-status.d.ts +7 -0
- package/types/enums/column-string-status.d.ts +7 -0
- package/types/enums/column-text-status.d.ts +7 -0
- package/types/enums/column-url-status.d.ts +7 -0
- package/types/enums/column-varchar-status.d.ts +7 -0
- package/types/enums/compression.d.ts +5 -0
- package/types/enums/database-type.d.ts +4 -0
- package/types/enums/deployment-status.d.ts +8 -0
- package/types/enums/execution-status.d.ts +7 -0
- package/types/enums/execution-trigger.d.ts +5 -0
- package/types/enums/framework.d.ts +17 -0
- package/types/enums/gravity.d.ts +11 -0
- package/types/enums/health-antivirus-status.d.ts +5 -0
- package/types/enums/health-status-status.d.ts +4 -0
- package/types/enums/index-status.d.ts +7 -0
- package/types/enums/message-status.d.ts +7 -0
- package/types/enums/method.d.ts +9 -0
- package/types/enums/output.d.ts +9 -0
- package/types/enums/permissions.d.ts +22 -0
- package/types/enums/priority.d.ts +4 -0
- package/types/enums/range.d.ts +5 -0
- package/types/enums/runtime.d.ts +73 -0
- package/types/enums/runtimes.d.ts +73 -0
- package/types/enums/scopes.d.ts +57 -0
- package/types/enums/theme.d.ts +4 -0
- package/types/enums/timezone.d.ts +421 -0
- package/types/enums/type.d.ts +5 -0
- package/types/enums/use-cases.d.ts +9 -0
- package/types/id.d.ts +20 -0
- package/types/index.d.ts +92 -0
- package/types/models.d.ts +5830 -0
- package/types/operator.d.ts +180 -0
- package/types/permission.d.ts +43 -0
- package/types/query.d.ts +442 -0
- package/types/role.d.ts +70 -0
- package/types/service.d.ts +11 -0
- package/types/services/apps.d.ts +932 -0
- package/types/services/avatars.d.ts +318 -0
- package/types/services/carts.d.ts +352 -0
- package/types/services/channels.d.ts +75 -0
- package/types/services/customers.d.ts +231 -0
- package/types/services/greetings.d.ts +101 -0
- package/types/services/locale.d.ts +64 -0
- package/types/services/markets.d.ts +274 -0
- package/types/services/messaging.d.ts +1324 -0
- package/types/services/products.d.ts +1014 -0
- package/types/services/realtime.d.ts +134 -0
- package/types/services/search.d.ts +131 -0
- package/types/services/sites.d.ts +689 -0
- package/types/services/storage.d.ts +421 -0
- package/types/services/tokens.d.ts +119 -0
|
@@ -0,0 +1,729 @@
|
|
|
1
|
+
import { Service } from '../service';
|
|
2
|
+
import { RevenexxException, Client, type Payload, UploadProgress } from '../client';
|
|
3
|
+
import type { Models } from '../models';
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export class Customers {
|
|
7
|
+
client: Client;
|
|
8
|
+
|
|
9
|
+
constructor(client: Client) {
|
|
10
|
+
this.client = client;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @throws {RevenexxException}
|
|
16
|
+
* @returns {Promise<{}>}
|
|
17
|
+
*/
|
|
18
|
+
customersAddressesList(): Promise<{}> {
|
|
19
|
+
|
|
20
|
+
const apiPath = '/v1/customers/addresses';
|
|
21
|
+
const payload: Payload = {};
|
|
22
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
23
|
+
|
|
24
|
+
const apiHeaders: { [header: string]: string } = {
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return this.client.call(
|
|
28
|
+
'get',
|
|
29
|
+
uri,
|
|
30
|
+
apiHeaders,
|
|
31
|
+
payload
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @throws {RevenexxException}
|
|
38
|
+
* @returns {Promise<Models.Address>}
|
|
39
|
+
*/
|
|
40
|
+
customersAddressesCreate(): Promise<Models.Address> {
|
|
41
|
+
|
|
42
|
+
const apiPath = '/v1/customers/addresses';
|
|
43
|
+
const payload: Payload = {};
|
|
44
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45
|
+
|
|
46
|
+
const apiHeaders: { [header: string]: string } = {
|
|
47
|
+
'content-type': 'application/json',
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return this.client.call(
|
|
51
|
+
'post',
|
|
52
|
+
uri,
|
|
53
|
+
apiHeaders,
|
|
54
|
+
payload
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @param {string} params.id -
|
|
61
|
+
* @throws {RevenexxException}
|
|
62
|
+
* @returns {Promise<{}>}
|
|
63
|
+
*/
|
|
64
|
+
customersAddressesDelete(params: { id: string }): Promise<{}>;
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @param {string} id -
|
|
68
|
+
* @throws {RevenexxException}
|
|
69
|
+
* @returns {Promise<{}>}
|
|
70
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
71
|
+
*/
|
|
72
|
+
customersAddressesDelete(id: string): Promise<{}>;
|
|
73
|
+
customersAddressesDelete(
|
|
74
|
+
paramsOrFirst: { id: string } | string
|
|
75
|
+
): Promise<{}> {
|
|
76
|
+
let params: { id: string };
|
|
77
|
+
|
|
78
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
79
|
+
params = (paramsOrFirst || {}) as { id: string };
|
|
80
|
+
} else {
|
|
81
|
+
params = {
|
|
82
|
+
id: paramsOrFirst as string
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const id = params.id;
|
|
87
|
+
|
|
88
|
+
if (typeof id === 'undefined') {
|
|
89
|
+
throw new RevenexxException('Missing required parameter: "id"');
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const apiPath = '/v1/customers/addresses/{id}'.replace('{id}', id);
|
|
93
|
+
const payload: Payload = {};
|
|
94
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
95
|
+
|
|
96
|
+
const apiHeaders: { [header: string]: string } = {
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return this.client.call(
|
|
100
|
+
'delete',
|
|
101
|
+
uri,
|
|
102
|
+
apiHeaders,
|
|
103
|
+
payload
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
*
|
|
109
|
+
* @param {string} params.id -
|
|
110
|
+
* @throws {RevenexxException}
|
|
111
|
+
* @returns {Promise<Models.Address>}
|
|
112
|
+
*/
|
|
113
|
+
customersAddressesGet(params: { id: string }): Promise<Models.Address>;
|
|
114
|
+
/**
|
|
115
|
+
*
|
|
116
|
+
* @param {string} id -
|
|
117
|
+
* @throws {RevenexxException}
|
|
118
|
+
* @returns {Promise<Models.Address>}
|
|
119
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
120
|
+
*/
|
|
121
|
+
customersAddressesGet(id: string): Promise<Models.Address>;
|
|
122
|
+
customersAddressesGet(
|
|
123
|
+
paramsOrFirst: { id: string } | string
|
|
124
|
+
): Promise<Models.Address> {
|
|
125
|
+
let params: { id: string };
|
|
126
|
+
|
|
127
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
128
|
+
params = (paramsOrFirst || {}) as { id: string };
|
|
129
|
+
} else {
|
|
130
|
+
params = {
|
|
131
|
+
id: paramsOrFirst as string
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
const id = params.id;
|
|
136
|
+
|
|
137
|
+
if (typeof id === 'undefined') {
|
|
138
|
+
throw new RevenexxException('Missing required parameter: "id"');
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
const apiPath = '/v1/customers/addresses/{id}'.replace('{id}', id);
|
|
142
|
+
const payload: Payload = {};
|
|
143
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
144
|
+
|
|
145
|
+
const apiHeaders: { [header: string]: string } = {
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
return this.client.call(
|
|
149
|
+
'get',
|
|
150
|
+
uri,
|
|
151
|
+
apiHeaders,
|
|
152
|
+
payload
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
*
|
|
158
|
+
* @param {string} params.id -
|
|
159
|
+
* @throws {RevenexxException}
|
|
160
|
+
* @returns {Promise<Models.Address>}
|
|
161
|
+
*/
|
|
162
|
+
customersAddressesUpdate(params: { id: string }): Promise<Models.Address>;
|
|
163
|
+
/**
|
|
164
|
+
*
|
|
165
|
+
* @param {string} id -
|
|
166
|
+
* @throws {RevenexxException}
|
|
167
|
+
* @returns {Promise<Models.Address>}
|
|
168
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
169
|
+
*/
|
|
170
|
+
customersAddressesUpdate(id: string): Promise<Models.Address>;
|
|
171
|
+
customersAddressesUpdate(
|
|
172
|
+
paramsOrFirst: { id: string } | string
|
|
173
|
+
): Promise<Models.Address> {
|
|
174
|
+
let params: { id: string };
|
|
175
|
+
|
|
176
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
177
|
+
params = (paramsOrFirst || {}) as { id: string };
|
|
178
|
+
} else {
|
|
179
|
+
params = {
|
|
180
|
+
id: paramsOrFirst as string
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
const id = params.id;
|
|
185
|
+
|
|
186
|
+
if (typeof id === 'undefined') {
|
|
187
|
+
throw new RevenexxException('Missing required parameter: "id"');
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
const apiPath = '/v1/customers/addresses/{id}'.replace('{id}', id);
|
|
191
|
+
const payload: Payload = {};
|
|
192
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
193
|
+
|
|
194
|
+
const apiHeaders: { [header: string]: string } = {
|
|
195
|
+
'content-type': 'application/json',
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
return this.client.call(
|
|
199
|
+
'put',
|
|
200
|
+
uri,
|
|
201
|
+
apiHeaders,
|
|
202
|
+
payload
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
*
|
|
208
|
+
* @throws {RevenexxException}
|
|
209
|
+
* @returns {Promise<Models.AuthLoginResponse>}
|
|
210
|
+
*/
|
|
211
|
+
customersAuthLogin(): Promise<Models.AuthLoginResponse> {
|
|
212
|
+
|
|
213
|
+
const apiPath = '/v1/customers/auth/login';
|
|
214
|
+
const payload: Payload = {};
|
|
215
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
216
|
+
|
|
217
|
+
const apiHeaders: { [header: string]: string } = {
|
|
218
|
+
'content-type': 'application/json',
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
return this.client.call(
|
|
222
|
+
'post',
|
|
223
|
+
uri,
|
|
224
|
+
apiHeaders,
|
|
225
|
+
payload
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
*
|
|
231
|
+
* @throws {RevenexxException}
|
|
232
|
+
* @returns {Promise<{}>}
|
|
233
|
+
*/
|
|
234
|
+
customersAuthLogout(): Promise<{}> {
|
|
235
|
+
|
|
236
|
+
const apiPath = '/v1/customers/auth/logout';
|
|
237
|
+
const payload: Payload = {};
|
|
238
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
239
|
+
|
|
240
|
+
const apiHeaders: { [header: string]: string } = {
|
|
241
|
+
'content-type': 'application/json',
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
return this.client.call(
|
|
245
|
+
'post',
|
|
246
|
+
uri,
|
|
247
|
+
apiHeaders,
|
|
248
|
+
payload
|
|
249
|
+
);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
*
|
|
254
|
+
* @throws {RevenexxException}
|
|
255
|
+
* @returns {Promise<Models.AuthMeResponse>}
|
|
256
|
+
*/
|
|
257
|
+
customersAuthMe(): Promise<Models.AuthMeResponse> {
|
|
258
|
+
|
|
259
|
+
const apiPath = '/v1/customers/auth/me';
|
|
260
|
+
const payload: Payload = {};
|
|
261
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
262
|
+
|
|
263
|
+
const apiHeaders: { [header: string]: string } = {
|
|
264
|
+
'content-type': 'application/json',
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
return this.client.call(
|
|
268
|
+
'post',
|
|
269
|
+
uri,
|
|
270
|
+
apiHeaders,
|
|
271
|
+
payload
|
|
272
|
+
);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
*
|
|
277
|
+
* @throws {RevenexxException}
|
|
278
|
+
* @returns {Promise<{}>}
|
|
279
|
+
*/
|
|
280
|
+
customersAuthRecovery(): Promise<{}> {
|
|
281
|
+
|
|
282
|
+
const apiPath = '/v1/customers/auth/recovery';
|
|
283
|
+
const payload: Payload = {};
|
|
284
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
285
|
+
|
|
286
|
+
const apiHeaders: { [header: string]: string } = {
|
|
287
|
+
'content-type': 'application/json',
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
return this.client.call(
|
|
291
|
+
'post',
|
|
292
|
+
uri,
|
|
293
|
+
apiHeaders,
|
|
294
|
+
payload
|
|
295
|
+
);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
*
|
|
300
|
+
* @throws {RevenexxException}
|
|
301
|
+
* @returns {Promise<{}>}
|
|
302
|
+
*/
|
|
303
|
+
customersAuthRecoveryConfirm(): Promise<{}> {
|
|
304
|
+
|
|
305
|
+
const apiPath = '/v1/customers/auth/recovery';
|
|
306
|
+
const payload: Payload = {};
|
|
307
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
308
|
+
|
|
309
|
+
const apiHeaders: { [header: string]: string } = {
|
|
310
|
+
'content-type': 'application/json',
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
return this.client.call(
|
|
314
|
+
'put',
|
|
315
|
+
uri,
|
|
316
|
+
apiHeaders,
|
|
317
|
+
payload
|
|
318
|
+
);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
*
|
|
323
|
+
* @throws {RevenexxException}
|
|
324
|
+
* @returns {Promise<Models.AuthRegisterResponse>}
|
|
325
|
+
*/
|
|
326
|
+
customersAuthRegister(): Promise<Models.AuthRegisterResponse> {
|
|
327
|
+
|
|
328
|
+
const apiPath = '/v1/customers/auth/register';
|
|
329
|
+
const payload: Payload = {};
|
|
330
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
331
|
+
|
|
332
|
+
const apiHeaders: { [header: string]: string } = {
|
|
333
|
+
'content-type': 'application/json',
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
return this.client.call(
|
|
337
|
+
'post',
|
|
338
|
+
uri,
|
|
339
|
+
apiHeaders,
|
|
340
|
+
payload
|
|
341
|
+
);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
*
|
|
346
|
+
* @throws {RevenexxException}
|
|
347
|
+
* @returns {Promise<{}>}
|
|
348
|
+
*/
|
|
349
|
+
customersContactsList(): Promise<{}> {
|
|
350
|
+
|
|
351
|
+
const apiPath = '/v1/customers/contacts';
|
|
352
|
+
const payload: Payload = {};
|
|
353
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
354
|
+
|
|
355
|
+
const apiHeaders: { [header: string]: string } = {
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
return this.client.call(
|
|
359
|
+
'get',
|
|
360
|
+
uri,
|
|
361
|
+
apiHeaders,
|
|
362
|
+
payload
|
|
363
|
+
);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
*
|
|
368
|
+
* @throws {RevenexxException}
|
|
369
|
+
* @returns {Promise<Models.Contact>}
|
|
370
|
+
*/
|
|
371
|
+
customersContactsCreate(): Promise<Models.Contact> {
|
|
372
|
+
|
|
373
|
+
const apiPath = '/v1/customers/contacts';
|
|
374
|
+
const payload: Payload = {};
|
|
375
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
376
|
+
|
|
377
|
+
const apiHeaders: { [header: string]: string } = {
|
|
378
|
+
'content-type': 'application/json',
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
return this.client.call(
|
|
382
|
+
'post',
|
|
383
|
+
uri,
|
|
384
|
+
apiHeaders,
|
|
385
|
+
payload
|
|
386
|
+
);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
*
|
|
391
|
+
* @param {string} params.id -
|
|
392
|
+
* @throws {RevenexxException}
|
|
393
|
+
* @returns {Promise<{}>}
|
|
394
|
+
*/
|
|
395
|
+
customersContactsDelete(params: { id: string }): Promise<{}>;
|
|
396
|
+
/**
|
|
397
|
+
*
|
|
398
|
+
* @param {string} id -
|
|
399
|
+
* @throws {RevenexxException}
|
|
400
|
+
* @returns {Promise<{}>}
|
|
401
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
402
|
+
*/
|
|
403
|
+
customersContactsDelete(id: string): Promise<{}>;
|
|
404
|
+
customersContactsDelete(
|
|
405
|
+
paramsOrFirst: { id: string } | string
|
|
406
|
+
): Promise<{}> {
|
|
407
|
+
let params: { id: string };
|
|
408
|
+
|
|
409
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
410
|
+
params = (paramsOrFirst || {}) as { id: string };
|
|
411
|
+
} else {
|
|
412
|
+
params = {
|
|
413
|
+
id: paramsOrFirst as string
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
const id = params.id;
|
|
418
|
+
|
|
419
|
+
if (typeof id === 'undefined') {
|
|
420
|
+
throw new RevenexxException('Missing required parameter: "id"');
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
const apiPath = '/v1/customers/contacts/{id}'.replace('{id}', id);
|
|
424
|
+
const payload: Payload = {};
|
|
425
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
426
|
+
|
|
427
|
+
const apiHeaders: { [header: string]: string } = {
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
return this.client.call(
|
|
431
|
+
'delete',
|
|
432
|
+
uri,
|
|
433
|
+
apiHeaders,
|
|
434
|
+
payload
|
|
435
|
+
);
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
*
|
|
440
|
+
* @param {string} params.id -
|
|
441
|
+
* @throws {RevenexxException}
|
|
442
|
+
* @returns {Promise<Models.Contact>}
|
|
443
|
+
*/
|
|
444
|
+
customersContactsGet(params: { id: string }): Promise<Models.Contact>;
|
|
445
|
+
/**
|
|
446
|
+
*
|
|
447
|
+
* @param {string} id -
|
|
448
|
+
* @throws {RevenexxException}
|
|
449
|
+
* @returns {Promise<Models.Contact>}
|
|
450
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
451
|
+
*/
|
|
452
|
+
customersContactsGet(id: string): Promise<Models.Contact>;
|
|
453
|
+
customersContactsGet(
|
|
454
|
+
paramsOrFirst: { id: string } | string
|
|
455
|
+
): Promise<Models.Contact> {
|
|
456
|
+
let params: { id: string };
|
|
457
|
+
|
|
458
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
459
|
+
params = (paramsOrFirst || {}) as { id: string };
|
|
460
|
+
} else {
|
|
461
|
+
params = {
|
|
462
|
+
id: paramsOrFirst as string
|
|
463
|
+
};
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
const id = params.id;
|
|
467
|
+
|
|
468
|
+
if (typeof id === 'undefined') {
|
|
469
|
+
throw new RevenexxException('Missing required parameter: "id"');
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
const apiPath = '/v1/customers/contacts/{id}'.replace('{id}', id);
|
|
473
|
+
const payload: Payload = {};
|
|
474
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
475
|
+
|
|
476
|
+
const apiHeaders: { [header: string]: string } = {
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
return this.client.call(
|
|
480
|
+
'get',
|
|
481
|
+
uri,
|
|
482
|
+
apiHeaders,
|
|
483
|
+
payload
|
|
484
|
+
);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
*
|
|
489
|
+
* @param {string} params.id -
|
|
490
|
+
* @throws {RevenexxException}
|
|
491
|
+
* @returns {Promise<Models.Contact>}
|
|
492
|
+
*/
|
|
493
|
+
customersContactsUpdate(params: { id: string }): Promise<Models.Contact>;
|
|
494
|
+
/**
|
|
495
|
+
*
|
|
496
|
+
* @param {string} id -
|
|
497
|
+
* @throws {RevenexxException}
|
|
498
|
+
* @returns {Promise<Models.Contact>}
|
|
499
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
500
|
+
*/
|
|
501
|
+
customersContactsUpdate(id: string): Promise<Models.Contact>;
|
|
502
|
+
customersContactsUpdate(
|
|
503
|
+
paramsOrFirst: { id: string } | string
|
|
504
|
+
): Promise<Models.Contact> {
|
|
505
|
+
let params: { id: string };
|
|
506
|
+
|
|
507
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
508
|
+
params = (paramsOrFirst || {}) as { id: string };
|
|
509
|
+
} else {
|
|
510
|
+
params = {
|
|
511
|
+
id: paramsOrFirst as string
|
|
512
|
+
};
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
const id = params.id;
|
|
516
|
+
|
|
517
|
+
if (typeof id === 'undefined') {
|
|
518
|
+
throw new RevenexxException('Missing required parameter: "id"');
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
const apiPath = '/v1/customers/contacts/{id}'.replace('{id}', id);
|
|
522
|
+
const payload: Payload = {};
|
|
523
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
524
|
+
|
|
525
|
+
const apiHeaders: { [header: string]: string } = {
|
|
526
|
+
'content-type': 'application/json',
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
return this.client.call(
|
|
530
|
+
'put',
|
|
531
|
+
uri,
|
|
532
|
+
apiHeaders,
|
|
533
|
+
payload
|
|
534
|
+
);
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
*
|
|
539
|
+
* @throws {RevenexxException}
|
|
540
|
+
* @returns {Promise<{}>}
|
|
541
|
+
*/
|
|
542
|
+
customersOrganizationsList(): Promise<{}> {
|
|
543
|
+
|
|
544
|
+
const apiPath = '/v1/customers/organizations';
|
|
545
|
+
const payload: Payload = {};
|
|
546
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
547
|
+
|
|
548
|
+
const apiHeaders: { [header: string]: string } = {
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
return this.client.call(
|
|
552
|
+
'get',
|
|
553
|
+
uri,
|
|
554
|
+
apiHeaders,
|
|
555
|
+
payload
|
|
556
|
+
);
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
/**
|
|
560
|
+
*
|
|
561
|
+
* @throws {RevenexxException}
|
|
562
|
+
* @returns {Promise<Models.Organization>}
|
|
563
|
+
*/
|
|
564
|
+
customersOrganizationsCreate(): Promise<Models.Organization> {
|
|
565
|
+
|
|
566
|
+
const apiPath = '/v1/customers/organizations';
|
|
567
|
+
const payload: Payload = {};
|
|
568
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
569
|
+
|
|
570
|
+
const apiHeaders: { [header: string]: string } = {
|
|
571
|
+
'content-type': 'application/json',
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
return this.client.call(
|
|
575
|
+
'post',
|
|
576
|
+
uri,
|
|
577
|
+
apiHeaders,
|
|
578
|
+
payload
|
|
579
|
+
);
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
/**
|
|
583
|
+
*
|
|
584
|
+
* @param {string} params.id -
|
|
585
|
+
* @throws {RevenexxException}
|
|
586
|
+
* @returns {Promise<{}>}
|
|
587
|
+
*/
|
|
588
|
+
customersOrganizationsDelete(params: { id: string }): Promise<{}>;
|
|
589
|
+
/**
|
|
590
|
+
*
|
|
591
|
+
* @param {string} id -
|
|
592
|
+
* @throws {RevenexxException}
|
|
593
|
+
* @returns {Promise<{}>}
|
|
594
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
595
|
+
*/
|
|
596
|
+
customersOrganizationsDelete(id: string): Promise<{}>;
|
|
597
|
+
customersOrganizationsDelete(
|
|
598
|
+
paramsOrFirst: { id: string } | string
|
|
599
|
+
): Promise<{}> {
|
|
600
|
+
let params: { id: string };
|
|
601
|
+
|
|
602
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
603
|
+
params = (paramsOrFirst || {}) as { id: string };
|
|
604
|
+
} else {
|
|
605
|
+
params = {
|
|
606
|
+
id: paramsOrFirst as string
|
|
607
|
+
};
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
const id = params.id;
|
|
611
|
+
|
|
612
|
+
if (typeof id === 'undefined') {
|
|
613
|
+
throw new RevenexxException('Missing required parameter: "id"');
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
const apiPath = '/v1/customers/organizations/{id}'.replace('{id}', id);
|
|
617
|
+
const payload: Payload = {};
|
|
618
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
619
|
+
|
|
620
|
+
const apiHeaders: { [header: string]: string } = {
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
return this.client.call(
|
|
624
|
+
'delete',
|
|
625
|
+
uri,
|
|
626
|
+
apiHeaders,
|
|
627
|
+
payload
|
|
628
|
+
);
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
/**
|
|
632
|
+
*
|
|
633
|
+
* @param {string} params.id -
|
|
634
|
+
* @throws {RevenexxException}
|
|
635
|
+
* @returns {Promise<Models.Organization>}
|
|
636
|
+
*/
|
|
637
|
+
customersOrganizationsGet(params: { id: string }): Promise<Models.Organization>;
|
|
638
|
+
/**
|
|
639
|
+
*
|
|
640
|
+
* @param {string} id -
|
|
641
|
+
* @throws {RevenexxException}
|
|
642
|
+
* @returns {Promise<Models.Organization>}
|
|
643
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
644
|
+
*/
|
|
645
|
+
customersOrganizationsGet(id: string): Promise<Models.Organization>;
|
|
646
|
+
customersOrganizationsGet(
|
|
647
|
+
paramsOrFirst: { id: string } | string
|
|
648
|
+
): Promise<Models.Organization> {
|
|
649
|
+
let params: { id: string };
|
|
650
|
+
|
|
651
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
652
|
+
params = (paramsOrFirst || {}) as { id: string };
|
|
653
|
+
} else {
|
|
654
|
+
params = {
|
|
655
|
+
id: paramsOrFirst as string
|
|
656
|
+
};
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
const id = params.id;
|
|
660
|
+
|
|
661
|
+
if (typeof id === 'undefined') {
|
|
662
|
+
throw new RevenexxException('Missing required parameter: "id"');
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
const apiPath = '/v1/customers/organizations/{id}'.replace('{id}', id);
|
|
666
|
+
const payload: Payload = {};
|
|
667
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
668
|
+
|
|
669
|
+
const apiHeaders: { [header: string]: string } = {
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
return this.client.call(
|
|
673
|
+
'get',
|
|
674
|
+
uri,
|
|
675
|
+
apiHeaders,
|
|
676
|
+
payload
|
|
677
|
+
);
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
/**
|
|
681
|
+
*
|
|
682
|
+
* @param {string} params.id -
|
|
683
|
+
* @throws {RevenexxException}
|
|
684
|
+
* @returns {Promise<Models.Organization>}
|
|
685
|
+
*/
|
|
686
|
+
customersOrganizationsUpdate(params: { id: string }): Promise<Models.Organization>;
|
|
687
|
+
/**
|
|
688
|
+
*
|
|
689
|
+
* @param {string} id -
|
|
690
|
+
* @throws {RevenexxException}
|
|
691
|
+
* @returns {Promise<Models.Organization>}
|
|
692
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
693
|
+
*/
|
|
694
|
+
customersOrganizationsUpdate(id: string): Promise<Models.Organization>;
|
|
695
|
+
customersOrganizationsUpdate(
|
|
696
|
+
paramsOrFirst: { id: string } | string
|
|
697
|
+
): Promise<Models.Organization> {
|
|
698
|
+
let params: { id: string };
|
|
699
|
+
|
|
700
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
701
|
+
params = (paramsOrFirst || {}) as { id: string };
|
|
702
|
+
} else {
|
|
703
|
+
params = {
|
|
704
|
+
id: paramsOrFirst as string
|
|
705
|
+
};
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
const id = params.id;
|
|
709
|
+
|
|
710
|
+
if (typeof id === 'undefined') {
|
|
711
|
+
throw new RevenexxException('Missing required parameter: "id"');
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
const apiPath = '/v1/customers/organizations/{id}'.replace('{id}', id);
|
|
715
|
+
const payload: Payload = {};
|
|
716
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
717
|
+
|
|
718
|
+
const apiHeaders: { [header: string]: string } = {
|
|
719
|
+
'content-type': 'application/json',
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
return this.client.call(
|
|
723
|
+
'put',
|
|
724
|
+
uri,
|
|
725
|
+
apiHeaders,
|
|
726
|
+
payload
|
|
727
|
+
);
|
|
728
|
+
}
|
|
729
|
+
}
|