@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,294 @@
|
|
|
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 Greetings {
|
|
7
|
+
client: Client;
|
|
8
|
+
|
|
9
|
+
constructor(client: Client) {
|
|
10
|
+
this.client = client;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @throws {RevenexxException}
|
|
16
|
+
* @returns {Promise<{}>}
|
|
17
|
+
*/
|
|
18
|
+
greetingsDigest(): Promise<{}> {
|
|
19
|
+
|
|
20
|
+
const apiPath = '/v1/digest';
|
|
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<{}>}
|
|
39
|
+
*/
|
|
40
|
+
greetingsList(): Promise<{}> {
|
|
41
|
+
|
|
42
|
+
const apiPath = '/v1/greetings';
|
|
43
|
+
const payload: Payload = {};
|
|
44
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
45
|
+
|
|
46
|
+
const apiHeaders: { [header: string]: string } = {
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return this.client.call(
|
|
50
|
+
'get',
|
|
51
|
+
uri,
|
|
52
|
+
apiHeaders,
|
|
53
|
+
payload
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
* @param {string} params.name - Who to greet
|
|
60
|
+
* @param {string} params.locale - BCP-47 locale
|
|
61
|
+
* @throws {RevenexxException}
|
|
62
|
+
* @returns {Promise<{}>}
|
|
63
|
+
*/
|
|
64
|
+
greetingsCreate(params: { name: string, locale?: string }): Promise<{}>;
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @param {string} name - Who to greet
|
|
68
|
+
* @param {string} locale - BCP-47 locale
|
|
69
|
+
* @throws {RevenexxException}
|
|
70
|
+
* @returns {Promise<{}>}
|
|
71
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
72
|
+
*/
|
|
73
|
+
greetingsCreate(name: string, locale?: string): Promise<{}>;
|
|
74
|
+
greetingsCreate(
|
|
75
|
+
paramsOrFirst: { name: string, locale?: string } | string,
|
|
76
|
+
...rest: [(string)?]
|
|
77
|
+
): Promise<{}> {
|
|
78
|
+
let params: { name: string, locale?: string };
|
|
79
|
+
|
|
80
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
81
|
+
params = (paramsOrFirst || {}) as { name: string, locale?: string };
|
|
82
|
+
} else {
|
|
83
|
+
params = {
|
|
84
|
+
name: paramsOrFirst as string,
|
|
85
|
+
locale: rest[0] as string
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const name = params.name;
|
|
90
|
+
const locale = params.locale;
|
|
91
|
+
|
|
92
|
+
if (typeof name === 'undefined') {
|
|
93
|
+
throw new RevenexxException('Missing required parameter: "name"');
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
const apiPath = '/v1/greetings';
|
|
97
|
+
const payload: Payload = {};
|
|
98
|
+
if (typeof locale !== 'undefined') {
|
|
99
|
+
payload['locale'] = locale;
|
|
100
|
+
}
|
|
101
|
+
if (typeof name !== 'undefined') {
|
|
102
|
+
payload['name'] = name;
|
|
103
|
+
}
|
|
104
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
105
|
+
|
|
106
|
+
const apiHeaders: { [header: string]: string } = {
|
|
107
|
+
'content-type': 'application/json',
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return this.client.call(
|
|
111
|
+
'post',
|
|
112
|
+
uri,
|
|
113
|
+
apiHeaders,
|
|
114
|
+
payload
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
*
|
|
120
|
+
* @param {string} params.id -
|
|
121
|
+
* @throws {RevenexxException}
|
|
122
|
+
* @returns {Promise<{}>}
|
|
123
|
+
*/
|
|
124
|
+
greetingsDelete(params: { id: string }): Promise<{}>;
|
|
125
|
+
/**
|
|
126
|
+
*
|
|
127
|
+
* @param {string} id -
|
|
128
|
+
* @throws {RevenexxException}
|
|
129
|
+
* @returns {Promise<{}>}
|
|
130
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
131
|
+
*/
|
|
132
|
+
greetingsDelete(id: string): Promise<{}>;
|
|
133
|
+
greetingsDelete(
|
|
134
|
+
paramsOrFirst: { id: string } | string
|
|
135
|
+
): Promise<{}> {
|
|
136
|
+
let params: { id: string };
|
|
137
|
+
|
|
138
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
139
|
+
params = (paramsOrFirst || {}) as { id: string };
|
|
140
|
+
} else {
|
|
141
|
+
params = {
|
|
142
|
+
id: paramsOrFirst as string
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
const id = params.id;
|
|
147
|
+
|
|
148
|
+
if (typeof id === 'undefined') {
|
|
149
|
+
throw new RevenexxException('Missing required parameter: "id"');
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const apiPath = '/v1/greetings/{id}'.replace('{id}', id);
|
|
153
|
+
const payload: Payload = {};
|
|
154
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
155
|
+
|
|
156
|
+
const apiHeaders: { [header: string]: string } = {
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
return this.client.call(
|
|
160
|
+
'delete',
|
|
161
|
+
uri,
|
|
162
|
+
apiHeaders,
|
|
163
|
+
payload
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
*
|
|
169
|
+
* @param {string} params.id -
|
|
170
|
+
* @throws {RevenexxException}
|
|
171
|
+
* @returns {Promise<Models.Greeting>}
|
|
172
|
+
*/
|
|
173
|
+
greetingsGet(params: { id: string }): Promise<Models.Greeting>;
|
|
174
|
+
/**
|
|
175
|
+
*
|
|
176
|
+
* @param {string} id -
|
|
177
|
+
* @throws {RevenexxException}
|
|
178
|
+
* @returns {Promise<Models.Greeting>}
|
|
179
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
180
|
+
*/
|
|
181
|
+
greetingsGet(id: string): Promise<Models.Greeting>;
|
|
182
|
+
greetingsGet(
|
|
183
|
+
paramsOrFirst: { id: string } | string
|
|
184
|
+
): Promise<Models.Greeting> {
|
|
185
|
+
let params: { id: string };
|
|
186
|
+
|
|
187
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
188
|
+
params = (paramsOrFirst || {}) as { id: string };
|
|
189
|
+
} else {
|
|
190
|
+
params = {
|
|
191
|
+
id: paramsOrFirst as string
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
const id = params.id;
|
|
196
|
+
|
|
197
|
+
if (typeof id === 'undefined') {
|
|
198
|
+
throw new RevenexxException('Missing required parameter: "id"');
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
const apiPath = '/v1/greetings/{id}'.replace('{id}', id);
|
|
202
|
+
const payload: Payload = {};
|
|
203
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
204
|
+
|
|
205
|
+
const apiHeaders: { [header: string]: string } = {
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
return this.client.call(
|
|
209
|
+
'get',
|
|
210
|
+
uri,
|
|
211
|
+
apiHeaders,
|
|
212
|
+
payload
|
|
213
|
+
);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
*
|
|
218
|
+
* @param {string} params.id -
|
|
219
|
+
* @param {string} params.locale -
|
|
220
|
+
* @param {string} params.message -
|
|
221
|
+
* @param {object} params.metadata -
|
|
222
|
+
* @param {string} params.name -
|
|
223
|
+
* @throws {RevenexxException}
|
|
224
|
+
* @returns {Promise<Models.Greeting>}
|
|
225
|
+
*/
|
|
226
|
+
greetingsUpdate(params: { id: string, locale?: string, message?: string, metadata?: object, name?: string }): Promise<Models.Greeting>;
|
|
227
|
+
/**
|
|
228
|
+
*
|
|
229
|
+
* @param {string} id -
|
|
230
|
+
* @param {string} locale -
|
|
231
|
+
* @param {string} message -
|
|
232
|
+
* @param {object} metadata -
|
|
233
|
+
* @param {string} name -
|
|
234
|
+
* @throws {RevenexxException}
|
|
235
|
+
* @returns {Promise<Models.Greeting>}
|
|
236
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
237
|
+
*/
|
|
238
|
+
greetingsUpdate(id: string, locale?: string, message?: string, metadata?: object, name?: string): Promise<Models.Greeting>;
|
|
239
|
+
greetingsUpdate(
|
|
240
|
+
paramsOrFirst: { id: string, locale?: string, message?: string, metadata?: object, name?: string } | string,
|
|
241
|
+
...rest: [(string)?, (string)?, (object)?, (string)?]
|
|
242
|
+
): Promise<Models.Greeting> {
|
|
243
|
+
let params: { id: string, locale?: string, message?: string, metadata?: object, name?: string };
|
|
244
|
+
|
|
245
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
246
|
+
params = (paramsOrFirst || {}) as { id: string, locale?: string, message?: string, metadata?: object, name?: string };
|
|
247
|
+
} else {
|
|
248
|
+
params = {
|
|
249
|
+
id: paramsOrFirst as string,
|
|
250
|
+
locale: rest[0] as string,
|
|
251
|
+
message: rest[1] as string,
|
|
252
|
+
metadata: rest[2] as object,
|
|
253
|
+
name: rest[3] as string
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
const id = params.id;
|
|
258
|
+
const locale = params.locale;
|
|
259
|
+
const message = params.message;
|
|
260
|
+
const metadata = params.metadata;
|
|
261
|
+
const name = params.name;
|
|
262
|
+
|
|
263
|
+
if (typeof id === 'undefined') {
|
|
264
|
+
throw new RevenexxException('Missing required parameter: "id"');
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
const apiPath = '/v1/greetings/{id}'.replace('{id}', id);
|
|
268
|
+
const payload: Payload = {};
|
|
269
|
+
if (typeof locale !== 'undefined') {
|
|
270
|
+
payload['locale'] = locale;
|
|
271
|
+
}
|
|
272
|
+
if (typeof message !== 'undefined') {
|
|
273
|
+
payload['message'] = message;
|
|
274
|
+
}
|
|
275
|
+
if (typeof metadata !== 'undefined') {
|
|
276
|
+
payload['metadata'] = metadata;
|
|
277
|
+
}
|
|
278
|
+
if (typeof name !== 'undefined') {
|
|
279
|
+
payload['name'] = name;
|
|
280
|
+
}
|
|
281
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
282
|
+
|
|
283
|
+
const apiHeaders: { [header: string]: string } = {
|
|
284
|
+
'content-type': 'application/json',
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
return this.client.call(
|
|
288
|
+
'put',
|
|
289
|
+
uri,
|
|
290
|
+
apiHeaders,
|
|
291
|
+
payload
|
|
292
|
+
);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
@@ -0,0 +1,198 @@
|
|
|
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 Locale {
|
|
7
|
+
client: Client;
|
|
8
|
+
|
|
9
|
+
constructor(client: Client) {
|
|
10
|
+
this.client = client;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.
|
|
15
|
+
*
|
|
16
|
+
* ([IP Geolocation by DB-IP](https://db-ip.com))
|
|
17
|
+
*
|
|
18
|
+
* @throws {RevenexxException}
|
|
19
|
+
* @returns {Promise<Models.Locale>}
|
|
20
|
+
*/
|
|
21
|
+
localeGet(): Promise<Models.Locale> {
|
|
22
|
+
|
|
23
|
+
const apiPath = '/v1/locale';
|
|
24
|
+
const payload: Payload = {};
|
|
25
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
26
|
+
|
|
27
|
+
const apiHeaders: { [header: string]: string } = {
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return this.client.call(
|
|
31
|
+
'get',
|
|
32
|
+
uri,
|
|
33
|
+
apiHeaders,
|
|
34
|
+
payload
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* List of all locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).
|
|
40
|
+
*
|
|
41
|
+
* @throws {RevenexxException}
|
|
42
|
+
* @returns {Promise<Models.LocaleCodeList>}
|
|
43
|
+
*/
|
|
44
|
+
localeListCodes(): Promise<Models.LocaleCodeList> {
|
|
45
|
+
|
|
46
|
+
const apiPath = '/v1/locale/codes';
|
|
47
|
+
const payload: Payload = {};
|
|
48
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
49
|
+
|
|
50
|
+
const apiHeaders: { [header: string]: string } = {
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return this.client.call(
|
|
54
|
+
'get',
|
|
55
|
+
uri,
|
|
56
|
+
apiHeaders,
|
|
57
|
+
payload
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* List of all continents. You can use the locale header to get the data in a supported language.
|
|
63
|
+
*
|
|
64
|
+
* @throws {RevenexxException}
|
|
65
|
+
* @returns {Promise<Models.ContinentList>}
|
|
66
|
+
*/
|
|
67
|
+
localeListContinents(): Promise<Models.ContinentList> {
|
|
68
|
+
|
|
69
|
+
const apiPath = '/v1/locale/continents';
|
|
70
|
+
const payload: Payload = {};
|
|
71
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
72
|
+
|
|
73
|
+
const apiHeaders: { [header: string]: string } = {
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return this.client.call(
|
|
77
|
+
'get',
|
|
78
|
+
uri,
|
|
79
|
+
apiHeaders,
|
|
80
|
+
payload
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* List of all countries. You can use the locale header to get the data in a supported language.
|
|
86
|
+
*
|
|
87
|
+
* @throws {RevenexxException}
|
|
88
|
+
* @returns {Promise<Models.CountryList>}
|
|
89
|
+
*/
|
|
90
|
+
localeListCountries(): Promise<Models.CountryList> {
|
|
91
|
+
|
|
92
|
+
const apiPath = '/v1/locale/countries';
|
|
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
|
+
'get',
|
|
101
|
+
uri,
|
|
102
|
+
apiHeaders,
|
|
103
|
+
payload
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.
|
|
109
|
+
*
|
|
110
|
+
* @throws {RevenexxException}
|
|
111
|
+
* @returns {Promise<Models.CountryList>}
|
|
112
|
+
*/
|
|
113
|
+
localeListCountriesEU(): Promise<Models.CountryList> {
|
|
114
|
+
|
|
115
|
+
const apiPath = '/v1/locale/countries/eu';
|
|
116
|
+
const payload: Payload = {};
|
|
117
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
118
|
+
|
|
119
|
+
const apiHeaders: { [header: string]: string } = {
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return this.client.call(
|
|
123
|
+
'get',
|
|
124
|
+
uri,
|
|
125
|
+
apiHeaders,
|
|
126
|
+
payload
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* List of all countries phone codes. You can use the locale header to get the data in a supported language.
|
|
132
|
+
*
|
|
133
|
+
* @throws {RevenexxException}
|
|
134
|
+
* @returns {Promise<Models.PhoneList>}
|
|
135
|
+
*/
|
|
136
|
+
localeListCountriesPhones(): Promise<Models.PhoneList> {
|
|
137
|
+
|
|
138
|
+
const apiPath = '/v1/locale/countries/phones';
|
|
139
|
+
const payload: Payload = {};
|
|
140
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
141
|
+
|
|
142
|
+
const apiHeaders: { [header: string]: string } = {
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
return this.client.call(
|
|
146
|
+
'get',
|
|
147
|
+
uri,
|
|
148
|
+
apiHeaders,
|
|
149
|
+
payload
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.
|
|
155
|
+
*
|
|
156
|
+
* @throws {RevenexxException}
|
|
157
|
+
* @returns {Promise<Models.CurrencyList>}
|
|
158
|
+
*/
|
|
159
|
+
localeListCurrencies(): Promise<Models.CurrencyList> {
|
|
160
|
+
|
|
161
|
+
const apiPath = '/v1/locale/currencies';
|
|
162
|
+
const payload: Payload = {};
|
|
163
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
164
|
+
|
|
165
|
+
const apiHeaders: { [header: string]: string } = {
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
return this.client.call(
|
|
169
|
+
'get',
|
|
170
|
+
uri,
|
|
171
|
+
apiHeaders,
|
|
172
|
+
payload
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.
|
|
178
|
+
*
|
|
179
|
+
* @throws {RevenexxException}
|
|
180
|
+
* @returns {Promise<Models.LanguageList>}
|
|
181
|
+
*/
|
|
182
|
+
localeListLanguages(): Promise<Models.LanguageList> {
|
|
183
|
+
|
|
184
|
+
const apiPath = '/v1/locale/languages';
|
|
185
|
+
const payload: Payload = {};
|
|
186
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
187
|
+
|
|
188
|
+
const apiHeaders: { [header: string]: string } = {
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
return this.client.call(
|
|
192
|
+
'get',
|
|
193
|
+
uri,
|
|
194
|
+
apiHeaders,
|
|
195
|
+
payload
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
}
|