@allthings/sdk 4.5.0 → 4.8.1
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/README.md +29 -7
- package/dist/cli.js +134 -106
- package/dist/lib.cjs.js +149 -106
- package/dist/lib.esm.js +94 -77
- package/dist/lib.umd.min.js +1 -1
- package/dist/src/rest/methods/app.d.ts +6 -0
- package/dist/src/rest/methods/booking.d.ts +15 -0
- package/dist/src/rest/methods/booking.test.d.ts +1 -0
- package/dist/src/rest/methods/ticket.d.ts +8 -0
- package/dist/src/rest/types.d.ts +5 -1
- package/dist/test/constants.d.ts +1 -0
- package/package.json +20 -30
package/dist/lib.cjs.js
CHANGED
|
@@ -2,20 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
5
|
+
var querystring = require('query-string');
|
|
6
|
+
var fetch = require('cross-fetch');
|
|
7
|
+
var Bottleneck = require('bottleneck');
|
|
8
|
+
var util = require('util');
|
|
9
|
+
var stream = require('stream');
|
|
10
|
+
var path = require('path');
|
|
11
|
+
var http = require('http');
|
|
12
|
+
var https = require('https');
|
|
13
|
+
var url = require('url');
|
|
14
|
+
var fs = require('fs');
|
|
15
|
+
|
|
16
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
17
|
+
|
|
18
|
+
var querystring__default = /*#__PURE__*/_interopDefaultLegacy(querystring);
|
|
19
|
+
var fetch__default = /*#__PURE__*/_interopDefaultLegacy(fetch);
|
|
20
|
+
var Bottleneck__default = /*#__PURE__*/_interopDefaultLegacy(Bottleneck);
|
|
21
|
+
var util__default = /*#__PURE__*/_interopDefaultLegacy(util);
|
|
22
|
+
var stream__default = /*#__PURE__*/_interopDefaultLegacy(stream);
|
|
23
|
+
var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
|
|
24
|
+
var http__default = /*#__PURE__*/_interopDefaultLegacy(http);
|
|
25
|
+
var https__default = /*#__PURE__*/_interopDefaultLegacy(https);
|
|
26
|
+
var url__default = /*#__PURE__*/_interopDefaultLegacy(url);
|
|
27
|
+
var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
|
|
28
|
+
|
|
29
|
+
const version = "4.8.1";
|
|
19
30
|
|
|
20
31
|
const REST_API_URL = 'https://api.allthings.me';
|
|
21
32
|
const OAUTH_URL = 'https://accounts.allthings.me';
|
|
@@ -38,9 +49,9 @@ const DEFAULT_API_WRAPPER_OPTIONS = {
|
|
|
38
49
|
};
|
|
39
50
|
const USER_AGENT = `Allthings Node SDK REST Client/${version}`;
|
|
40
51
|
|
|
41
|
-
const RESPONSE_TYPE = 'code';
|
|
42
|
-
const GRANT_TYPE = 'authorization_code';
|
|
43
|
-
const castToAuthorizationRequestParams = (params) => {
|
|
52
|
+
const RESPONSE_TYPE$1 = 'code';
|
|
53
|
+
const GRANT_TYPE$3 = 'authorization_code';
|
|
54
|
+
const castToAuthorizationRequestParams$1 = (params) => {
|
|
44
55
|
const { redirectUri, clientId, scope, state } = params;
|
|
45
56
|
if (!clientId) {
|
|
46
57
|
throw new Error('Missing required "clientId" parameter to perform authorization code grant redirect');
|
|
@@ -48,18 +59,18 @@ const castToAuthorizationRequestParams = (params) => {
|
|
|
48
59
|
if (!redirectUri) {
|
|
49
60
|
throw new Error('Missing required "redirectUri" parameter to perform authorization code grant redirect');
|
|
50
61
|
}
|
|
51
|
-
return Object.assign(Object.assign({ client_id: clientId, redirect_uri: redirectUri, response_type: RESPONSE_TYPE }, (scope ? { scope } : {})), (state ? { state } : {}));
|
|
62
|
+
return Object.assign(Object.assign({ client_id: clientId, redirect_uri: redirectUri, response_type: RESPONSE_TYPE$1 }, (scope ? { scope } : {})), (state ? { state } : {}));
|
|
52
63
|
};
|
|
53
|
-
const isEligibleForClientRedirect = (params) => {
|
|
64
|
+
const isEligibleForClientRedirect$1 = (params) => {
|
|
54
65
|
try {
|
|
55
|
-
return !!castToAuthorizationRequestParams(params);
|
|
66
|
+
return !!castToAuthorizationRequestParams$1(params);
|
|
56
67
|
}
|
|
57
68
|
catch (_a) {
|
|
58
69
|
return false;
|
|
59
70
|
}
|
|
60
71
|
};
|
|
61
|
-
const getRedirectUrl = (params) => `${params.oauthUrl}/oauth/authorize?${
|
|
62
|
-
const castToTokenRequestParams = (params) => {
|
|
72
|
+
const getRedirectUrl$1 = (params) => `${params.oauthUrl}/oauth/authorize?${querystring__default["default"].stringify(castToAuthorizationRequestParams$1(params))}`;
|
|
73
|
+
const castToTokenRequestParams$2 = (params) => {
|
|
63
74
|
const { authorizationCode, redirectUri, clientId, clientSecret } = params;
|
|
64
75
|
if (!clientId) {
|
|
65
76
|
throw new Error('Missing required "clientId" parameter to perform authorization code grant');
|
|
@@ -70,17 +81,17 @@ const castToTokenRequestParams = (params) => {
|
|
|
70
81
|
if (!authorizationCode) {
|
|
71
82
|
throw new Error('Missing required "authorizationCode" parameter to perform authorization code grant');
|
|
72
83
|
}
|
|
73
|
-
return Object.assign({ client_id: clientId, code: authorizationCode, grant_type: GRANT_TYPE, redirect_uri: redirectUri }, (clientSecret ? { client_secret: clientSecret } : {}));
|
|
84
|
+
return Object.assign({ client_id: clientId, code: authorizationCode, grant_type: GRANT_TYPE$3, redirect_uri: redirectUri }, (clientSecret ? { client_secret: clientSecret } : {}));
|
|
74
85
|
};
|
|
75
|
-
const isEligible = (params) => {
|
|
86
|
+
const isEligible$3 = (params) => {
|
|
76
87
|
try {
|
|
77
|
-
return !!castToTokenRequestParams(params);
|
|
88
|
+
return !!castToTokenRequestParams$2(params);
|
|
78
89
|
}
|
|
79
90
|
catch (_a) {
|
|
80
91
|
return false;
|
|
81
92
|
}
|
|
82
93
|
};
|
|
83
|
-
const requestToken = (tokenRequester, params) => tokenRequester(castToTokenRequestParams(params));
|
|
94
|
+
const requestToken$3 = (tokenRequester, params) => tokenRequester(castToTokenRequestParams$2(params));
|
|
84
95
|
|
|
85
96
|
function createTokenStore(initialToken) {
|
|
86
97
|
const token = new Map(Object.entries(initialToken || {}));
|
|
@@ -108,8 +119,8 @@ function makeLogger(name) {
|
|
|
108
119
|
const logger = makeLogger('OAuth Token Request');
|
|
109
120
|
const makeFetchTokenRequester = (url) => async (params) => {
|
|
110
121
|
try {
|
|
111
|
-
const response = await
|
|
112
|
-
body:
|
|
122
|
+
const response = await fetch__default["default"](url, {
|
|
123
|
+
body: querystring__default["default"].stringify(params),
|
|
113
124
|
cache: 'no-cache',
|
|
114
125
|
credentials: 'omit',
|
|
115
126
|
headers: {
|
|
@@ -140,7 +151,7 @@ const makeFetchTokenRequester = (url) => async (params) => {
|
|
|
140
151
|
}
|
|
141
152
|
};
|
|
142
153
|
|
|
143
|
-
const GRANT_TYPE$
|
|
154
|
+
const GRANT_TYPE$2 = 'refresh_token';
|
|
144
155
|
const castToTokenRequestParams$1 = (params) => {
|
|
145
156
|
const { clientId, clientSecret, refreshToken, scope } = params;
|
|
146
157
|
if (!clientId) {
|
|
@@ -149,9 +160,9 @@ const castToTokenRequestParams$1 = (params) => {
|
|
|
149
160
|
if (!refreshToken) {
|
|
150
161
|
throw new Error('Missing required "refreshToken" parameter to perform refresh token grant');
|
|
151
162
|
}
|
|
152
|
-
return Object.assign(Object.assign({ client_id: clientId, grant_type: GRANT_TYPE$
|
|
163
|
+
return Object.assign(Object.assign({ client_id: clientId, grant_type: GRANT_TYPE$2, refresh_token: refreshToken }, (clientSecret ? { client_secret: clientSecret } : {})), (scope ? { scope } : {}));
|
|
153
164
|
};
|
|
154
|
-
const isEligible$
|
|
165
|
+
const isEligible$2 = (params) => {
|
|
155
166
|
try {
|
|
156
167
|
return !!castToTokenRequestParams$1(params);
|
|
157
168
|
}
|
|
@@ -159,7 +170,7 @@ const isEligible$1 = (params) => {
|
|
|
159
170
|
return false;
|
|
160
171
|
}
|
|
161
172
|
};
|
|
162
|
-
const requestToken$
|
|
173
|
+
const requestToken$2 = (tokenRequester, params) => tokenRequester(castToTokenRequestParams$1(params));
|
|
163
174
|
|
|
164
175
|
async function requestAndSaveToStore(requester, tokenStore) {
|
|
165
176
|
const response = await requester();
|
|
@@ -197,7 +208,7 @@ async function get(request, method, query, returnRawResultObject) {
|
|
|
197
208
|
return request('get', method, { query }, returnRawResultObject);
|
|
198
209
|
}
|
|
199
210
|
|
|
200
|
-
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
211
|
+
var __rest$4 = (undefined && undefined.__rest) || function (s, e) {
|
|
201
212
|
var t = {};
|
|
202
213
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
203
214
|
t[p] = s[p];
|
|
@@ -222,10 +233,12 @@ var EnumUserType;
|
|
|
222
233
|
EnumUserType["demoPublic"] = "demo_public";
|
|
223
234
|
EnumUserType["partner"] = "partner";
|
|
224
235
|
})(EnumUserType || (EnumUserType = {}));
|
|
236
|
+
exports.EnumCommunicationPreferenceChannel = void 0;
|
|
225
237
|
(function (EnumCommunicationPreferenceChannel) {
|
|
226
238
|
EnumCommunicationPreferenceChannel["push"] = "push";
|
|
227
239
|
EnumCommunicationPreferenceChannel["email"] = "email";
|
|
228
240
|
})(exports.EnumCommunicationPreferenceChannel || (exports.EnumCommunicationPreferenceChannel = {}));
|
|
241
|
+
exports.EnumUserPermissionRole = void 0;
|
|
229
242
|
(function (EnumUserPermissionRole) {
|
|
230
243
|
EnumUserPermissionRole["appAdmin"] = "app-admin";
|
|
231
244
|
EnumUserPermissionRole["appOwner"] = "app-owner";
|
|
@@ -249,6 +262,7 @@ var EnumUserType;
|
|
|
249
262
|
EnumUserPermissionRole["setup"] = "setup";
|
|
250
263
|
EnumUserPermissionRole["tenantManager"] = "tenant-manager";
|
|
251
264
|
})(exports.EnumUserPermissionRole || (exports.EnumUserPermissionRole = {}));
|
|
265
|
+
exports.EnumUserPermissionObjectType = void 0;
|
|
252
266
|
(function (EnumUserPermissionObjectType) {
|
|
253
267
|
EnumUserPermissionObjectType["app"] = "App";
|
|
254
268
|
EnumUserPermissionObjectType["group"] = "Group";
|
|
@@ -256,7 +270,7 @@ var EnumUserType;
|
|
|
256
270
|
EnumUserPermissionObjectType["unit"] = "Unit";
|
|
257
271
|
})(exports.EnumUserPermissionObjectType || (exports.EnumUserPermissionObjectType = {}));
|
|
258
272
|
const remapUserResult = (user) => {
|
|
259
|
-
const { tenantIDs: tenantIds } = user, result = __rest(user, ["tenantIDs"]);
|
|
273
|
+
const { tenantIDs: tenantIds } = user, result = __rest$4(user, ["tenantIDs"]);
|
|
260
274
|
return Object.assign(Object.assign({}, result), { tenantIds });
|
|
261
275
|
};
|
|
262
276
|
const remapEmbeddedUser = (embedded) => embedded.users ? embedded.users.map(remapUserResult) : [];
|
|
@@ -278,12 +292,12 @@ async function userGetById(client, userId) {
|
|
|
278
292
|
return remapUserResult(await client.get(`/v1/users/${userId}`));
|
|
279
293
|
}
|
|
280
294
|
async function userUpdateById(client, userId, data) {
|
|
281
|
-
const { tenantIds: tenantIDs } = data, rest = __rest(data, ["tenantIds"]);
|
|
295
|
+
const { tenantIds: tenantIDs } = data, rest = __rest$4(data, ["tenantIds"]);
|
|
282
296
|
return remapUserResult(await client.patch(`/v1/users/${userId}`, Object.assign(Object.assign({}, rest), { tenantIDs })));
|
|
283
297
|
}
|
|
284
298
|
async function userCreatePermission(client, userId, data) {
|
|
285
|
-
const { objectId: objectID } = data, rest = __rest(data, ["objectId"]);
|
|
286
|
-
const _a = await client.post(`/v1/users/${userId}/permissions`, Object.assign(Object.assign({}, rest), { objectID })), { objectID: resultObjectId } = _a, result = __rest(_a, ["objectID"]);
|
|
299
|
+
const { objectId: objectID } = data, rest = __rest$4(data, ["objectId"]);
|
|
300
|
+
const _a = await client.post(`/v1/users/${userId}/permissions`, Object.assign(Object.assign({}, rest), { objectID })), { objectID: resultObjectId } = _a, result = __rest$4(_a, ["objectID"]);
|
|
287
301
|
return Object.assign(Object.assign({}, result), { objectId: resultObjectId });
|
|
288
302
|
}
|
|
289
303
|
async function userCreatePermissionBatch(client, userId, permissions) {
|
|
@@ -303,7 +317,7 @@ async function userCreatePermissionBatch(client, userId, permissions) {
|
|
|
303
317
|
async function userGetPermissions(client, userId) {
|
|
304
318
|
const { _embedded: { items: permissions }, } = await client.get(`/v1/users/${userId}/roles?limit=-1`);
|
|
305
319
|
return permissions.map((_a) => {
|
|
306
|
-
var { objectID: objectId } = _a, result = __rest(_a, ["objectID"]);
|
|
320
|
+
var { objectID: objectId } = _a, result = __rest$4(_a, ["objectID"]);
|
|
307
321
|
return (Object.assign(Object.assign({}, result), { objectId }));
|
|
308
322
|
});
|
|
309
323
|
}
|
|
@@ -353,6 +367,16 @@ async function appCreate(client, userId, data) {
|
|
|
353
367
|
async function appGetById(client, appId) {
|
|
354
368
|
return client.get(`/v1/apps/${appId}`);
|
|
355
369
|
}
|
|
370
|
+
async function activeUnitsGetByAppId(client, appId) {
|
|
371
|
+
return client.get(`/v1/apps/${appId}/active-units`);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
async function bookingGetById(client, bookingId) {
|
|
375
|
+
return client.get(`/v1/bookings/${bookingId}`);
|
|
376
|
+
}
|
|
377
|
+
async function bookingUpdateById(client, bookingId, data) {
|
|
378
|
+
return client.patch(`/v1/bookings/${bookingId}`, data);
|
|
379
|
+
}
|
|
356
380
|
|
|
357
381
|
async function bucketGet(client, bucketId) {
|
|
358
382
|
return client.get(`/v1/buckets/${bucketId}`);
|
|
@@ -441,7 +465,7 @@ async function fileDelete(client, fileId) {
|
|
|
441
465
|
return (await client.delete(`/v1/files/${fileId}`)) === '';
|
|
442
466
|
}
|
|
443
467
|
|
|
444
|
-
var __rest$
|
|
468
|
+
var __rest$3 = (undefined && undefined.__rest) || function (s, e) {
|
|
445
469
|
var t = {};
|
|
446
470
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
447
471
|
t[p] = s[p];
|
|
@@ -453,11 +477,11 @@ var __rest$1 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
453
477
|
return t;
|
|
454
478
|
};
|
|
455
479
|
async function groupCreate(client, propertyId, data) {
|
|
456
|
-
const { propertyManagerId } = data, rest = __rest$
|
|
480
|
+
const { propertyManagerId } = data, rest = __rest$3(data, ["propertyManagerId"]);
|
|
457
481
|
return client.post(`/v1/properties/${propertyId}/groups`, Object.assign(Object.assign({}, rest), { propertyManagerID: propertyManagerId }));
|
|
458
482
|
}
|
|
459
483
|
async function groupGetById(client, groupId) {
|
|
460
|
-
const _a = await client.get(`/v1/groups/${groupId}`), { propertyManagerID: propertyManagerId } = _a, result = __rest$
|
|
484
|
+
const _a = await client.get(`/v1/groups/${groupId}`), { propertyManagerID: propertyManagerId } = _a, result = __rest$3(_a, ["propertyManagerID"]);
|
|
461
485
|
return Object.assign(Object.assign({}, result), { propertyManagerId });
|
|
462
486
|
}
|
|
463
487
|
async function groupUpdateById(client, groupId, data) {
|
|
@@ -596,7 +620,7 @@ async function getProperties(client, page = 1, limit = -1, filter = {}) {
|
|
|
596
620
|
return { _embedded: { items: properties }, total };
|
|
597
621
|
}
|
|
598
622
|
|
|
599
|
-
var __rest$
|
|
623
|
+
var __rest$1 = (undefined && undefined.__rest) || function (s, e) {
|
|
600
624
|
var t = {};
|
|
601
625
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
602
626
|
t[p] = s[p];
|
|
@@ -608,11 +632,11 @@ var __rest$3 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
608
632
|
return t;
|
|
609
633
|
};
|
|
610
634
|
const remapRegistationCodeResult = (registrationCode) => {
|
|
611
|
-
const { tenantID: externalId } = registrationCode, result = __rest$
|
|
635
|
+
const { tenantID: externalId } = registrationCode, result = __rest$1(registrationCode, ["tenantID"]);
|
|
612
636
|
return Object.assign(Object.assign({}, result), { externalId });
|
|
613
637
|
};
|
|
614
638
|
async function registrationCodeCreate(client, code, utilisationPeriods, options = { permanent: false }) {
|
|
615
|
-
const { externalId } = options, moreOptions = __rest$
|
|
639
|
+
const { externalId } = options, moreOptions = __rest$1(options, ["externalId"]);
|
|
616
640
|
return remapRegistationCodeResult(await client.post('/v1/registration-codes', Object.assign(Object.assign({ code, utilisationPeriods: typeof utilisationPeriods === 'string'
|
|
617
641
|
? [utilisationPeriods]
|
|
618
642
|
: utilisationPeriods }, (externalId ? { tenantID: externalId } : {})), moreOptions)));
|
|
@@ -664,6 +688,7 @@ async function ticketCreateOnServiceProvider(client, serviceProviderId, payload)
|
|
|
664
688
|
: [] }));
|
|
665
689
|
}
|
|
666
690
|
|
|
691
|
+
exports.EnumUnitObjectType = void 0;
|
|
667
692
|
(function (EnumUnitObjectType) {
|
|
668
693
|
EnumUnitObjectType["adjoiningRoom"] = "adjoining-room";
|
|
669
694
|
EnumUnitObjectType["advertisingSpace"] = "advertising-space";
|
|
@@ -736,6 +761,7 @@ async function ticketCreateOnServiceProvider(client, serviceProviderId, payload)
|
|
|
736
761
|
EnumUnitObjectType["visitorParkingSpace"] = "visitor-parking-space";
|
|
737
762
|
EnumUnitObjectType["workshop"] = "workshop";
|
|
738
763
|
})(exports.EnumUnitObjectType || (exports.EnumUnitObjectType = {}));
|
|
764
|
+
exports.EnumUnitType = void 0;
|
|
739
765
|
(function (EnumUnitType) {
|
|
740
766
|
EnumUnitType["rented"] = "rented";
|
|
741
767
|
EnumUnitType["owned"] = "owned";
|
|
@@ -758,6 +784,7 @@ async function getUnits(client, page = 1, limit = -1, filter = {}) {
|
|
|
758
784
|
return { _embedded: { items: units }, total };
|
|
759
785
|
}
|
|
760
786
|
|
|
787
|
+
exports.EnumUserRelationType = void 0;
|
|
761
788
|
(function (EnumUserRelationType) {
|
|
762
789
|
EnumUserRelationType["isResponsible"] = "is-responsible";
|
|
763
790
|
})(exports.EnumUserRelationType || (exports.EnumUserRelationType = {}));
|
|
@@ -780,7 +807,7 @@ async function userRelationsGetByUser(client, userId) {
|
|
|
780
807
|
return client.get(`/v1/users/${userId}/user-relations`);
|
|
781
808
|
}
|
|
782
809
|
|
|
783
|
-
var __rest
|
|
810
|
+
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
784
811
|
var t = {};
|
|
785
812
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
786
813
|
t[p] = s[p];
|
|
@@ -791,21 +818,22 @@ var __rest$4 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
791
818
|
}
|
|
792
819
|
return t;
|
|
793
820
|
};
|
|
821
|
+
exports.EnumUtilisationPeriodType = void 0;
|
|
794
822
|
(function (EnumUtilisationPeriodType) {
|
|
795
823
|
EnumUtilisationPeriodType["tenant"] = "tenant";
|
|
796
824
|
EnumUtilisationPeriodType["ownership"] = "ownership";
|
|
797
825
|
EnumUtilisationPeriodType["vacant"] = "vacant";
|
|
798
826
|
})(exports.EnumUtilisationPeriodType || (exports.EnumUtilisationPeriodType = {}));
|
|
799
827
|
async function utilisationPeriodCreate(client, unitId, data) {
|
|
800
|
-
const _a = await client.post(`/v1/units/${unitId}/utilisation-periods`, data), { tenantIDs: tenantIds, _embedded } = _a, result = __rest
|
|
828
|
+
const _a = await client.post(`/v1/units/${unitId}/utilisation-periods`, data), { tenantIDs: tenantIds, _embedded } = _a, result = __rest(_a, ["tenantIDs", "_embedded"]);
|
|
801
829
|
return Object.assign(Object.assign({}, result), { invitations: _embedded.invitations.map(remapRegistationCodeResult), tenantIds, users: remapEmbeddedUser(_embedded) });
|
|
802
830
|
}
|
|
803
831
|
async function utilisationPeriodGetById(client, utilisationPeriodId) {
|
|
804
|
-
const _a = await client.get(`/v1/utilisation-periods/${utilisationPeriodId}`), { tenantIDs: tenantIds, _embedded } = _a, result = __rest
|
|
832
|
+
const _a = await client.get(`/v1/utilisation-periods/${utilisationPeriodId}`), { tenantIDs: tenantIds, _embedded } = _a, result = __rest(_a, ["tenantIDs", "_embedded"]);
|
|
805
833
|
return Object.assign(Object.assign({}, result), { invitations: _embedded.invitations.map(remapRegistationCodeResult), tenantIds, users: remapEmbeddedUser(_embedded) });
|
|
806
834
|
}
|
|
807
835
|
async function utilisationPeriodUpdateById(client, utilisationPeriodId, data) {
|
|
808
|
-
const _a = await client.patch(`/v1/utilisation-periods/${utilisationPeriodId}`, data), { tenantIDs: tenantIds, _embedded } = _a, result = __rest
|
|
836
|
+
const _a = await client.patch(`/v1/utilisation-periods/${utilisationPeriodId}`, data), { tenantIDs: tenantIds, _embedded } = _a, result = __rest(_a, ["tenantIDs", "_embedded"]);
|
|
809
837
|
return Object.assign(Object.assign({}, result), { invitations: _embedded.invitations.map(remapRegistationCodeResult), tenantIds, users: remapEmbeddedUser(_embedded) });
|
|
810
838
|
}
|
|
811
839
|
async function utilisationPeriodDelete(client, utilisationPeriodId) {
|
|
@@ -835,7 +863,7 @@ async function put(request, method, body, returnRawResultObject) {
|
|
|
835
863
|
return request('put', method, { body }, returnRawResultObject);
|
|
836
864
|
}
|
|
837
865
|
|
|
838
|
-
var Stream =
|
|
866
|
+
var Stream$1 = stream__default["default"].Stream;
|
|
839
867
|
|
|
840
868
|
|
|
841
869
|
var delayed_stream = DelayedStream;
|
|
@@ -849,7 +877,7 @@ function DelayedStream() {
|
|
|
849
877
|
this._released = false;
|
|
850
878
|
this._bufferedEvents = [];
|
|
851
879
|
}
|
|
852
|
-
|
|
880
|
+
util__default["default"].inherits(DelayedStream, Stream$1);
|
|
853
881
|
|
|
854
882
|
DelayedStream.create = function(source, options) {
|
|
855
883
|
var delayedStream = new this();
|
|
@@ -909,7 +937,7 @@ DelayedStream.prototype.release = function() {
|
|
|
909
937
|
};
|
|
910
938
|
|
|
911
939
|
DelayedStream.prototype.pipe = function() {
|
|
912
|
-
var r = Stream.prototype.pipe.apply(this, arguments);
|
|
940
|
+
var r = Stream$1.prototype.pipe.apply(this, arguments);
|
|
913
941
|
this.resume();
|
|
914
942
|
return r;
|
|
915
943
|
};
|
|
@@ -943,7 +971,7 @@ DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() {
|
|
|
943
971
|
this.emit('error', new Error(message));
|
|
944
972
|
};
|
|
945
973
|
|
|
946
|
-
var Stream
|
|
974
|
+
var Stream = stream__default["default"].Stream;
|
|
947
975
|
|
|
948
976
|
|
|
949
977
|
var combined_stream = CombinedStream;
|
|
@@ -960,7 +988,7 @@ function CombinedStream() {
|
|
|
960
988
|
this._insideLoop = false;
|
|
961
989
|
this._pendingNext = false;
|
|
962
990
|
}
|
|
963
|
-
|
|
991
|
+
util__default["default"].inherits(CombinedStream, Stream);
|
|
964
992
|
|
|
965
993
|
CombinedStream.create = function(options) {
|
|
966
994
|
var combinedStream = new this();
|
|
@@ -1006,7 +1034,7 @@ CombinedStream.prototype.append = function(stream) {
|
|
|
1006
1034
|
};
|
|
1007
1035
|
|
|
1008
1036
|
CombinedStream.prototype.pipe = function(dest, options) {
|
|
1009
|
-
Stream
|
|
1037
|
+
Stream.prototype.pipe.call(this, dest, options);
|
|
1010
1038
|
this.resume();
|
|
1011
1039
|
return dest;
|
|
1012
1040
|
};
|
|
@@ -10842,7 +10870,7 @@ var mimeTypes = createCommonjsModule(function (module, exports) {
|
|
|
10842
10870
|
*/
|
|
10843
10871
|
|
|
10844
10872
|
|
|
10845
|
-
var extname =
|
|
10873
|
+
var extname = path__default["default"].extname;
|
|
10846
10874
|
|
|
10847
10875
|
/**
|
|
10848
10876
|
* Module variables.
|
|
@@ -11016,13 +11044,13 @@ function populateMaps (extensions, types) {
|
|
|
11016
11044
|
});
|
|
11017
11045
|
}
|
|
11018
11046
|
});
|
|
11019
|
-
|
|
11020
|
-
|
|
11021
|
-
|
|
11022
|
-
|
|
11023
|
-
|
|
11024
|
-
|
|
11025
|
-
|
|
11047
|
+
mimeTypes.charset;
|
|
11048
|
+
mimeTypes.charsets;
|
|
11049
|
+
mimeTypes.contentType;
|
|
11050
|
+
mimeTypes.extension;
|
|
11051
|
+
mimeTypes.extensions;
|
|
11052
|
+
mimeTypes.lookup;
|
|
11053
|
+
mimeTypes.types;
|
|
11026
11054
|
|
|
11027
11055
|
var defer_1 = defer;
|
|
11028
11056
|
|
|
@@ -11396,7 +11424,7 @@ var populate = function(dst, src) {
|
|
|
11396
11424
|
return dst;
|
|
11397
11425
|
};
|
|
11398
11426
|
|
|
11399
|
-
var parseUrl =
|
|
11427
|
+
var parseUrl = url__default["default"].parse;
|
|
11400
11428
|
|
|
11401
11429
|
|
|
11402
11430
|
|
|
@@ -11406,7 +11434,7 @@ var parseUrl = url.parse;
|
|
|
11406
11434
|
var form_data = FormData;
|
|
11407
11435
|
|
|
11408
11436
|
// make it a Stream
|
|
11409
|
-
|
|
11437
|
+
util__default["default"].inherits(FormData, combined_stream);
|
|
11410
11438
|
|
|
11411
11439
|
/**
|
|
11412
11440
|
* Create readable "multipart/form-data" streams.
|
|
@@ -11453,7 +11481,7 @@ FormData.prototype.append = function(field, value, options) {
|
|
|
11453
11481
|
}
|
|
11454
11482
|
|
|
11455
11483
|
// https://github.com/felixge/node-form-data/issues/38
|
|
11456
|
-
if (
|
|
11484
|
+
if (util__default["default"].isArray(value)) {
|
|
11457
11485
|
// Please convert your array into string
|
|
11458
11486
|
// the way web server expects it
|
|
11459
11487
|
this._error(new Error('Arrays are not supported.'));
|
|
@@ -11525,7 +11553,7 @@ FormData.prototype._lengthRetriever = function(value, callback) {
|
|
|
11525
11553
|
// not that fast snoopy
|
|
11526
11554
|
} else {
|
|
11527
11555
|
// still need to fetch file size from fs
|
|
11528
|
-
|
|
11556
|
+
fs__default["default"].stat(value.path, function(err, stat) {
|
|
11529
11557
|
|
|
11530
11558
|
var fileSize;
|
|
11531
11559
|
|
|
@@ -11615,15 +11643,15 @@ FormData.prototype._getContentDisposition = function(value, options) {
|
|
|
11615
11643
|
|
|
11616
11644
|
if (typeof options.filepath === 'string') {
|
|
11617
11645
|
// custom filepath for relative paths
|
|
11618
|
-
filename =
|
|
11646
|
+
filename = path__default["default"].normalize(options.filepath).replace(/\\/g, '/');
|
|
11619
11647
|
} else if (options.filename || value.name || value.path) {
|
|
11620
11648
|
// custom filename take precedence
|
|
11621
11649
|
// formidable and the browser add a name property
|
|
11622
11650
|
// fs- and request- streams have path property
|
|
11623
|
-
filename =
|
|
11651
|
+
filename = path__default["default"].basename(options.filename || value.name || value.path);
|
|
11624
11652
|
} else if (value.readable && value.hasOwnProperty('httpVersion')) {
|
|
11625
11653
|
// or try http response
|
|
11626
|
-
filename =
|
|
11654
|
+
filename = path__default["default"].basename(value.client._httpMessage.path || '');
|
|
11627
11655
|
}
|
|
11628
11656
|
|
|
11629
11657
|
if (filename) {
|
|
@@ -11698,6 +11726,10 @@ FormData.prototype.getHeaders = function(userHeaders) {
|
|
|
11698
11726
|
return formHeaders;
|
|
11699
11727
|
};
|
|
11700
11728
|
|
|
11729
|
+
FormData.prototype.setBoundary = function(boundary) {
|
|
11730
|
+
this._boundary = boundary;
|
|
11731
|
+
};
|
|
11732
|
+
|
|
11701
11733
|
FormData.prototype.getBoundary = function() {
|
|
11702
11734
|
if (!this._boundary) {
|
|
11703
11735
|
this._generateBoundary();
|
|
@@ -11838,9 +11870,9 @@ FormData.prototype.submit = function(params, cb) {
|
|
|
11838
11870
|
|
|
11839
11871
|
// https if specified, fallback to http in any other case
|
|
11840
11872
|
if (options.protocol == 'https:') {
|
|
11841
|
-
request =
|
|
11873
|
+
request = https__default["default"].request(options);
|
|
11842
11874
|
} else {
|
|
11843
|
-
request =
|
|
11875
|
+
request = http__default["default"].request(options);
|
|
11844
11876
|
}
|
|
11845
11877
|
|
|
11846
11878
|
// get content length and fire away
|
|
@@ -11886,7 +11918,7 @@ FormData.prototype.toString = function () {
|
|
|
11886
11918
|
return '[object FormData]';
|
|
11887
11919
|
};
|
|
11888
11920
|
|
|
11889
|
-
const GRANT_TYPE$
|
|
11921
|
+
const GRANT_TYPE$1 = 'client_credentials';
|
|
11890
11922
|
const castClientOptionsToRequestParams = (clientOptions) => {
|
|
11891
11923
|
const { scope, clientId, clientSecret } = clientOptions;
|
|
11892
11924
|
if (!clientId) {
|
|
@@ -11895,9 +11927,9 @@ const castClientOptionsToRequestParams = (clientOptions) => {
|
|
|
11895
11927
|
if (!clientSecret) {
|
|
11896
11928
|
throw new Error('Missing required "clientSecret" parameter to perform client credentials grant');
|
|
11897
11929
|
}
|
|
11898
|
-
return Object.assign({ client_id: clientId, client_secret: clientSecret, grant_type: GRANT_TYPE$
|
|
11930
|
+
return Object.assign({ client_id: clientId, client_secret: clientSecret, grant_type: GRANT_TYPE$1 }, (scope ? { scope } : {}));
|
|
11899
11931
|
};
|
|
11900
|
-
const isEligible$
|
|
11932
|
+
const isEligible$1 = (clientOptions) => {
|
|
11901
11933
|
try {
|
|
11902
11934
|
return !!castClientOptionsToRequestParams(clientOptions);
|
|
11903
11935
|
}
|
|
@@ -11905,28 +11937,28 @@ const isEligible$2 = (clientOptions) => {
|
|
|
11905
11937
|
return false;
|
|
11906
11938
|
}
|
|
11907
11939
|
};
|
|
11908
|
-
const requestToken$
|
|
11940
|
+
const requestToken$1 = (oauthTokenRequest, clientOptions) => oauthTokenRequest(castClientOptionsToRequestParams(clientOptions));
|
|
11909
11941
|
|
|
11910
|
-
const RESPONSE_TYPE
|
|
11911
|
-
const castToAuthorizationRequestParams
|
|
11942
|
+
const RESPONSE_TYPE = 'token';
|
|
11943
|
+
const castToAuthorizationRequestParams = (params) => {
|
|
11912
11944
|
const { clientId, scope, state, redirectUri } = params;
|
|
11913
11945
|
if (!clientId) {
|
|
11914
11946
|
throw new Error('Missing required "clientId" parameter to perform implicit grant');
|
|
11915
11947
|
}
|
|
11916
|
-
return Object.assign(Object.assign({ client_id: clientId, redirect_uri: redirectUri || window.location.href, response_type: RESPONSE_TYPE
|
|
11948
|
+
return Object.assign(Object.assign({ client_id: clientId, redirect_uri: redirectUri || window.location.href, response_type: RESPONSE_TYPE }, (scope ? { scope } : {})), (state ? { state } : {}));
|
|
11917
11949
|
};
|
|
11918
|
-
const isEligibleForClientRedirect
|
|
11950
|
+
const isEligibleForClientRedirect = (params) => {
|
|
11919
11951
|
try {
|
|
11920
|
-
return !!castToAuthorizationRequestParams
|
|
11952
|
+
return !!castToAuthorizationRequestParams(params);
|
|
11921
11953
|
}
|
|
11922
11954
|
catch (_a) {
|
|
11923
11955
|
return false;
|
|
11924
11956
|
}
|
|
11925
11957
|
};
|
|
11926
|
-
const getRedirectUrl
|
|
11958
|
+
const getRedirectUrl = (params) => `${params.oauthUrl}/oauth/authorize?${querystring__default["default"].stringify(castToAuthorizationRequestParams(params))}`;
|
|
11927
11959
|
|
|
11928
|
-
const GRANT_TYPE
|
|
11929
|
-
const castToTokenRequestParams
|
|
11960
|
+
const GRANT_TYPE = 'password';
|
|
11961
|
+
const castToTokenRequestParams = (params) => {
|
|
11930
11962
|
const { username, password, scope, clientId, clientSecret } = params;
|
|
11931
11963
|
if (!clientId) {
|
|
11932
11964
|
throw new Error('Missing required "clientId" parameter to perform password grant');
|
|
@@ -11937,51 +11969,51 @@ const castToTokenRequestParams$2 = (params) => {
|
|
|
11937
11969
|
if (!password) {
|
|
11938
11970
|
throw new Error('Missing required "password" parameter to perform password grant');
|
|
11939
11971
|
}
|
|
11940
|
-
return Object.assign(Object.assign({ client_id: clientId, grant_type: GRANT_TYPE
|
|
11972
|
+
return Object.assign(Object.assign({ client_id: clientId, grant_type: GRANT_TYPE, password,
|
|
11941
11973
|
username }, (scope ? { scope } : {})), (clientSecret ? { client_secret: clientSecret } : {}));
|
|
11942
11974
|
};
|
|
11943
|
-
const isEligible
|
|
11975
|
+
const isEligible = (params) => {
|
|
11944
11976
|
try {
|
|
11945
|
-
return !!castToTokenRequestParams
|
|
11977
|
+
return !!castToTokenRequestParams(params);
|
|
11946
11978
|
}
|
|
11947
11979
|
catch (_a) {
|
|
11948
11980
|
return false;
|
|
11949
11981
|
}
|
|
11950
11982
|
};
|
|
11951
|
-
const requestToken
|
|
11983
|
+
const requestToken = (tokenRequester, params) => tokenRequester(castToTokenRequestParams(params));
|
|
11952
11984
|
|
|
11953
11985
|
async function maybeUpdateToken(oauthTokenStore, tokenFetcher, options, mustRefresh = false) {
|
|
11954
11986
|
if (!mustRefresh && oauthTokenStore.get('accessToken')) {
|
|
11955
11987
|
return;
|
|
11956
11988
|
}
|
|
11957
11989
|
const refreshOptions = Object.assign(Object.assign({}, options), { refreshToken: oauthTokenStore.get('refreshToken') });
|
|
11958
|
-
if (isEligible$
|
|
11959
|
-
return oauthTokenStore.set(await requestToken$
|
|
11990
|
+
if (isEligible$2(refreshOptions)) {
|
|
11991
|
+
return oauthTokenStore.set(await requestToken$2(tokenFetcher, refreshOptions));
|
|
11960
11992
|
}
|
|
11961
|
-
if (isEligible
|
|
11962
|
-
return oauthTokenStore.set(await requestToken
|
|
11993
|
+
if (isEligible(options)) {
|
|
11994
|
+
return oauthTokenStore.set(await requestToken(tokenFetcher, options));
|
|
11963
11995
|
}
|
|
11964
11996
|
if (typeof window !== 'undefined' && options.implicit) {
|
|
11965
|
-
const parsedLocationHash =
|
|
11997
|
+
const parsedLocationHash = querystring__default["default"].parse(window.location.hash);
|
|
11966
11998
|
const accessToken = parsedLocationHash && parsedLocationHash.access_token;
|
|
11967
11999
|
if (accessToken) {
|
|
11968
12000
|
window.history.replaceState({}, '', window.location.href.split('#')[0]);
|
|
11969
12001
|
return oauthTokenStore.set({ accessToken });
|
|
11970
12002
|
}
|
|
11971
|
-
if (isEligibleForClientRedirect
|
|
11972
|
-
window.location.href = getRedirectUrl
|
|
12003
|
+
if (isEligibleForClientRedirect(options)) {
|
|
12004
|
+
window.location.href = getRedirectUrl(options);
|
|
11973
12005
|
return;
|
|
11974
12006
|
}
|
|
11975
12007
|
}
|
|
11976
|
-
if (!mustRefresh && isEligible(options)) {
|
|
11977
|
-
return oauthTokenStore.set(await requestToken(tokenFetcher, options));
|
|
12008
|
+
if (!mustRefresh && isEligible$3(options)) {
|
|
12009
|
+
return oauthTokenStore.set(await requestToken$3(tokenFetcher, options));
|
|
11978
12010
|
}
|
|
11979
12011
|
if (options.authorizationRedirect &&
|
|
11980
|
-
isEligibleForClientRedirect(options)) {
|
|
11981
|
-
return options.authorizationRedirect(getRedirectUrl(options));
|
|
12012
|
+
isEligibleForClientRedirect$1(options)) {
|
|
12013
|
+
return options.authorizationRedirect(getRedirectUrl$1(options));
|
|
11982
12014
|
}
|
|
11983
|
-
if (isEligible$
|
|
11984
|
-
return oauthTokenStore.set(await requestToken$
|
|
12015
|
+
if (isEligible$1(options)) {
|
|
12016
|
+
return oauthTokenStore.set(await requestToken$1(tokenFetcher, options));
|
|
11985
12017
|
}
|
|
11986
12018
|
return;
|
|
11987
12019
|
}
|
|
@@ -12001,7 +12033,7 @@ const RETRYABLE_STATUS_CODES = [
|
|
|
12001
12033
|
504,
|
|
12002
12034
|
];
|
|
12003
12035
|
const TOKEN_REFRESH_STATUS_CODES = [401];
|
|
12004
|
-
const queue = new
|
|
12036
|
+
const queue = new Bottleneck__default["default"]({
|
|
12005
12037
|
maxConcurrent: QUEUE_CONCURRENCY,
|
|
12006
12038
|
minTime: QUEUE_DELAY,
|
|
12007
12039
|
reservoir: QUEUE_RESERVOIR,
|
|
@@ -12070,7 +12102,7 @@ function makeApiRequest(oauthTokenStore, oauthTokenRequester, options, httpMetho
|
|
|
12070
12102
|
const method = httpMethod.toUpperCase();
|
|
12071
12103
|
const payloadQuery = payload && payload.query
|
|
12072
12104
|
? (apiMethod.includes('?') ? '&' : '?') +
|
|
12073
|
-
|
|
12105
|
+
querystring__default["default"].stringify(payload.query)
|
|
12074
12106
|
: '';
|
|
12075
12107
|
const url = `${options.apiUrl}/api${apiMethod}${payloadQuery}`;
|
|
12076
12108
|
const body = payload && payload.body;
|
|
@@ -12089,7 +12121,7 @@ function makeApiRequest(oauthTokenStore, oauthTokenRequester, options, httpMetho
|
|
|
12089
12121
|
const requestBody = {
|
|
12090
12122
|
body: hasForm ? formData : JSON.stringify(body),
|
|
12091
12123
|
};
|
|
12092
|
-
const response = await
|
|
12124
|
+
const response = await fetch__default["default"](url, Object.assign({ cache: 'no-cache', credentials: 'omit', headers,
|
|
12093
12125
|
method, mode: 'cors' }, (hasForm || body ? requestBody : {})));
|
|
12094
12126
|
const result = await makeResultFromResponse(response);
|
|
12095
12127
|
responseLogger.log(method, url, result instanceof Error
|
|
@@ -12123,6 +12155,7 @@ async function request(oauthTokenStore, oauthTokenRequester, options, httpMethod
|
|
|
12123
12155
|
const API_METHODS = [
|
|
12124
12156
|
agentCreate,
|
|
12125
12157
|
agentCreatePermissions,
|
|
12158
|
+
activeUnitsGetByAppId,
|
|
12126
12159
|
appCreate,
|
|
12127
12160
|
appGetById,
|
|
12128
12161
|
bucketCreate,
|
|
@@ -12185,6 +12218,8 @@ const API_METHODS = [
|
|
|
12185
12218
|
utilisationPeriodCheckInUser,
|
|
12186
12219
|
utilisationPeriodCheckOutUser,
|
|
12187
12220
|
utilisationPeriodAddRegistrationCode,
|
|
12221
|
+
bookingUpdateById,
|
|
12222
|
+
bookingGetById,
|
|
12188
12223
|
];
|
|
12189
12224
|
function restClient(userOptions = DEFAULT_API_WRAPPER_OPTIONS) {
|
|
12190
12225
|
const options = Object.assign(Object.assign({}, DEFAULT_API_WRAPPER_OPTIONS), userOptions);
|
|
@@ -12213,11 +12248,11 @@ function restClient(userOptions = DEFAULT_API_WRAPPER_OPTIONS) {
|
|
|
12213
12248
|
const put$1 = partial(put, request$1);
|
|
12214
12249
|
const oauth = {
|
|
12215
12250
|
authorizationCode: {
|
|
12216
|
-
getUri: (state = options.state || pseudoRandomString()) => partial(getRedirectUrl, Object.assign(Object.assign({}, options), { state }))(),
|
|
12217
|
-
requestToken: (authorizationCode) => requestAndSaveToStore(partial(requestToken, tokenRequester, Object.assign(Object.assign({}, options), { authorizationCode: authorizationCode || options.authorizationCode })), tokenStore),
|
|
12251
|
+
getUri: (state = options.state || pseudoRandomString()) => partial(getRedirectUrl$1, Object.assign(Object.assign({}, options), { state }))(),
|
|
12252
|
+
requestToken: (authorizationCode) => requestAndSaveToStore(partial(requestToken$3, tokenRequester, Object.assign(Object.assign({}, options), { authorizationCode: authorizationCode || options.authorizationCode })), tokenStore),
|
|
12218
12253
|
},
|
|
12219
12254
|
generateState: pseudoRandomString,
|
|
12220
|
-
refreshToken: (refreshToken) => requestAndSaveToStore(partial(requestToken$
|
|
12255
|
+
refreshToken: (refreshToken) => requestAndSaveToStore(partial(requestToken$2, tokenRequester, Object.assign(Object.assign({}, options), { refreshToken: refreshToken || tokenStore.get('refreshToken') })), tokenStore),
|
|
12221
12256
|
};
|
|
12222
12257
|
const client = API_METHODS.reduce((methods, method) => (Object.assign(Object.assign({}, methods), { [method.name]: (...args) => method(client, ...args) })), {
|
|
12223
12258
|
delete: del$1,
|
|
@@ -12231,6 +12266,7 @@ function restClient(userOptions = DEFAULT_API_WRAPPER_OPTIONS) {
|
|
|
12231
12266
|
return client;
|
|
12232
12267
|
}
|
|
12233
12268
|
|
|
12269
|
+
exports.EnumResource = void 0;
|
|
12234
12270
|
(function (EnumResource) {
|
|
12235
12271
|
EnumResource["group"] = "group";
|
|
12236
12272
|
EnumResource["property"] = "property";
|
|
@@ -12240,6 +12276,7 @@ function restClient(userOptions = DEFAULT_API_WRAPPER_OPTIONS) {
|
|
|
12240
12276
|
EnumResource["user"] = "user";
|
|
12241
12277
|
EnumResource["utilisationPeriod"] = "utilisationPeriod";
|
|
12242
12278
|
})(exports.EnumResource || (exports.EnumResource = {}));
|
|
12279
|
+
exports.EnumCountryCode = void 0;
|
|
12243
12280
|
(function (EnumCountryCode) {
|
|
12244
12281
|
EnumCountryCode["CH"] = "CH";
|
|
12245
12282
|
EnumCountryCode["DE"] = "DE";
|
|
@@ -12249,6 +12286,7 @@ function restClient(userOptions = DEFAULT_API_WRAPPER_OPTIONS) {
|
|
|
12249
12286
|
EnumCountryCode["PT"] = "PT";
|
|
12250
12287
|
EnumCountryCode["US"] = "US";
|
|
12251
12288
|
})(exports.EnumCountryCode || (exports.EnumCountryCode = {}));
|
|
12289
|
+
exports.EnumLocale = void 0;
|
|
12252
12290
|
(function (EnumLocale) {
|
|
12253
12291
|
EnumLocale["ch_de"] = "ch_DE";
|
|
12254
12292
|
EnumLocale["ch_fr"] = "ch_FR";
|
|
@@ -12259,6 +12297,7 @@ function restClient(userOptions = DEFAULT_API_WRAPPER_OPTIONS) {
|
|
|
12259
12297
|
EnumLocale["pt_PT"] = "pt_PT";
|
|
12260
12298
|
EnumLocale["en_US"] = "en_US";
|
|
12261
12299
|
})(exports.EnumLocale || (exports.EnumLocale = {}));
|
|
12300
|
+
exports.EnumTimezone = void 0;
|
|
12262
12301
|
(function (EnumTimezone) {
|
|
12263
12302
|
EnumTimezone["EuropeBerlin"] = "Europe/Berlin";
|
|
12264
12303
|
EnumTimezone["EuropeLondon"] = "Europe/London";
|
|
@@ -12266,13 +12305,16 @@ function restClient(userOptions = DEFAULT_API_WRAPPER_OPTIONS) {
|
|
|
12266
12305
|
EnumTimezone["EuropeZurich"] = "Europe/Zurich";
|
|
12267
12306
|
EnumTimezone["UTC"] = "UTC";
|
|
12268
12307
|
})(exports.EnumTimezone || (exports.EnumTimezone = {}));
|
|
12308
|
+
exports.EnumServiceProviderType = void 0;
|
|
12269
12309
|
(function (EnumServiceProviderType) {
|
|
12270
12310
|
EnumServiceProviderType["propertyManager"] = "property-manager";
|
|
12271
12311
|
EnumServiceProviderType["craftspeople"] = "craftspeople";
|
|
12272
12312
|
})(exports.EnumServiceProviderType || (exports.EnumServiceProviderType = {}));
|
|
12313
|
+
exports.EnumCommunicationMethodType = void 0;
|
|
12273
12314
|
(function (EnumCommunicationMethodType) {
|
|
12274
12315
|
EnumCommunicationMethodType["email"] = "email";
|
|
12275
12316
|
})(exports.EnumCommunicationMethodType || (exports.EnumCommunicationMethodType = {}));
|
|
12317
|
+
exports.EnumInputChannel = void 0;
|
|
12276
12318
|
(function (EnumInputChannel) {
|
|
12277
12319
|
EnumInputChannel["APP"] = "app";
|
|
12278
12320
|
EnumInputChannel["COCKPIT"] = "cockpit";
|
|
@@ -12281,6 +12323,7 @@ function restClient(userOptions = DEFAULT_API_WRAPPER_OPTIONS) {
|
|
|
12281
12323
|
EnumInputChannel["PHONE"] = "phone";
|
|
12282
12324
|
EnumInputChannel["WHATS_APP"] = "whats_app";
|
|
12283
12325
|
})(exports.EnumInputChannel || (exports.EnumInputChannel = {}));
|
|
12326
|
+
exports.EnumLookupUserType = void 0;
|
|
12284
12327
|
(function (EnumLookupUserType) {
|
|
12285
12328
|
EnumLookupUserType["agent"] = "agent";
|
|
12286
12329
|
EnumLookupUserType["tenant"] = "tenant";
|