@seatmap-fyi/api-client 0.0.0-stage → 0.1.0-alpha.10

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.
@@ -0,0 +1,738 @@
1
+ import axios from "axios";
2
+ export var Capability;
3
+ (function (Capability) {
4
+ Capability["MAPS_READ"] = "maps:read";
5
+ Capability["MAPS_WRITE"] = "maps:write";
6
+ Capability["MAPS_PUBLISH"] = "maps:publish";
7
+ Capability["COMMERCE_WRITE"] = "commerce:write";
8
+ Capability["ACCESS_ADMIN"] = "access:admin";
9
+ Capability["MAP_VIEW"] = "map:view";
10
+ })(Capability || (Capability = {}));
11
+ export var AccountContextDtoKind;
12
+ (function (AccountContextDtoKind) {
13
+ AccountContextDtoKind["integration"] = "integration";
14
+ AccountContextDtoKind["authoring"] = "authoring";
15
+ })(AccountContextDtoKind || (AccountContextDtoKind = {}));
16
+ export var EmbedContextDtoKind;
17
+ (function (EmbedContextDtoKind) {
18
+ EmbedContextDtoKind["embed"] = "embed";
19
+ })(EmbedContextDtoKind || (EmbedContextDtoKind = {}));
20
+ export var EmbedContextDtoCapabilitiesItem;
21
+ (function (EmbedContextDtoCapabilitiesItem) {
22
+ EmbedContextDtoCapabilitiesItem["map:view"] = "map:view";
23
+ })(EmbedContextDtoCapabilitiesItem || (EmbedContextDtoCapabilitiesItem = {}));
24
+ export var MapPreviewState;
25
+ (function (MapPreviewState) {
26
+ MapPreviewState["pending"] = "pending";
27
+ MapPreviewState["ready"] = "ready";
28
+ MapPreviewState["empty"] = "empty";
29
+ MapPreviewState["unavailable"] = "unavailable";
30
+ })(MapPreviewState || (MapPreviewState = {}));
31
+ export var MapLifecycle;
32
+ (function (MapLifecycle) {
33
+ MapLifecycle["active"] = "active";
34
+ MapLifecycle["archived"] = "archived";
35
+ MapLifecycle["trashed"] = "trashed";
36
+ MapLifecycle["deleted"] = "deleted";
37
+ })(MapLifecycle || (MapLifecycle = {}));
38
+ export var MapEditorStateDtoVersion;
39
+ (function (MapEditorStateDtoVersion) {
40
+ MapEditorStateDtoVersion[MapEditorStateDtoVersion["NUMBER_1"] = 1] = "NUMBER_1";
41
+ })(MapEditorStateDtoVersion || (MapEditorStateDtoVersion = {}));
42
+ export var MutationStatus;
43
+ (function (MutationStatus) {
44
+ MutationStatus["completed"] = "completed";
45
+ MutationStatus["notCurrentlyKnown"] = "notCurrentlyKnown";
46
+ })(MutationStatus || (MutationStatus = {}));
47
+ export var MapOperation;
48
+ (function (MapOperation) {
49
+ MapOperation["create"] = "create";
50
+ MapOperation["adopt"] = "adopt";
51
+ MapOperation["save"] = "save";
52
+ MapOperation["rename"] = "rename";
53
+ MapOperation["copy"] = "copy";
54
+ MapOperation["archive"] = "archive";
55
+ MapOperation["restore"] = "restore";
56
+ MapOperation["trash"] = "trash";
57
+ MapOperation["restoreTrash"] = "restoreTrash";
58
+ MapOperation["restoreRevision"] = "restoreRevision";
59
+ })(MapOperation || (MapOperation = {}));
60
+ export var PrepareArtworkUploadDtoMimeType;
61
+ (function (PrepareArtworkUploadDtoMimeType) {
62
+ PrepareArtworkUploadDtoMimeType["image/png"] = "image/png";
63
+ PrepareArtworkUploadDtoMimeType["image/jpeg"] = "image/jpeg";
64
+ PrepareArtworkUploadDtoMimeType["image/webp"] = "image/webp";
65
+ PrepareArtworkUploadDtoMimeType["image/svg+xml"] = "image/svg+xml";
66
+ })(PrepareArtworkUploadDtoMimeType || (PrepareArtworkUploadDtoMimeType = {}));
67
+ export var ArtworkUploadState;
68
+ (function (ArtworkUploadState) {
69
+ ArtworkUploadState["prepared"] = "prepared";
70
+ ArtworkUploadState["receiving"] = "receiving";
71
+ ArtworkUploadState["uploaded"] = "uploaded";
72
+ ArtworkUploadState["validating"] = "validating";
73
+ ArtworkUploadState["ready"] = "ready";
74
+ ArtworkUploadState["review-required"] = "review-required";
75
+ ArtworkUploadState["failed"] = "failed";
76
+ ArtworkUploadState["cancelled"] = "cancelled";
77
+ })(ArtworkUploadState || (ArtworkUploadState = {}));
78
+ export var ArtworkFailureCode;
79
+ (function (ArtworkFailureCode) {
80
+ ArtworkFailureCode["ARTWORK_DIGEST"] = "ARTWORK_DIGEST";
81
+ ArtworkFailureCode["ARTWORK_SVG_ACTIVE"] = "ARTWORK_SVG_ACTIVE";
82
+ ArtworkFailureCode["ARTWORK_SVG_INVALID"] = "ARTWORK_SVG_INVALID";
83
+ ArtworkFailureCode["ARTWORK_SVG_COMPLEX"] = "ARTWORK_SVG_COMPLEX";
84
+ ArtworkFailureCode["ARTWORK_FILE_LIMIT"] = "ARTWORK_FILE_LIMIT";
85
+ ArtworkFailureCode["ARTWORK_TYPE"] = "ARTWORK_TYPE";
86
+ ArtworkFailureCode["ARTWORK_PIXEL_LIMIT"] = "ARTWORK_PIXEL_LIMIT";
87
+ ArtworkFailureCode["ARTWORK_DECODE"] = "ARTWORK_DECODE";
88
+ ArtworkFailureCode["ARTWORK_TRANSFER"] = "ARTWORK_TRANSFER";
89
+ ArtworkFailureCode["ARTWORK_EXPIRED"] = "ARTWORK_EXPIRED";
90
+ ArtworkFailureCode["ARTWORK_VALIDATION_FAILED"] = "ARTWORK_VALIDATION_FAILED";
91
+ })(ArtworkFailureCode || (ArtworkFailureCode = {}));
92
+ export var ArtworkState;
93
+ (function (ArtworkState) {
94
+ ArtworkState["pending"] = "pending";
95
+ ArtworkState["ready"] = "ready";
96
+ ArtworkState["review-required"] = "review-required";
97
+ ArtworkState["failed"] = "failed";
98
+ ArtworkState["deleting"] = "deleting";
99
+ ArtworkState["deleted"] = "deleted";
100
+ })(ArtworkState || (ArtworkState = {}));
101
+ export var ListMapsLifecycle;
102
+ (function (ListMapsLifecycle) {
103
+ ListMapsLifecycle["active"] = "active";
104
+ ListMapsLifecycle["archived"] = "archived";
105
+ ListMapsLifecycle["trashed"] = "trashed";
106
+ ListMapsLifecycle["deleted"] = "deleted";
107
+ })(ListMapsLifecycle || (ListMapsLifecycle = {}));
108
+ export var ListMapsSort;
109
+ (function (ListMapsSort) {
110
+ ListMapsSort["created-oldest"] = "created-oldest";
111
+ ListMapsSort["recently-edited"] = "recently-edited";
112
+ ListMapsSort["name-asc"] = "name-asc";
113
+ ListMapsSort["most-seats"] = "most-seats";
114
+ })(ListMapsSort || (ListMapsSort = {}));
115
+ import { prepareRequestOptions } from "./transport.js";
116
+ export class HealthClient {
117
+ configuration;
118
+ basePath;
119
+ operations;
120
+ constructor(configuration, basePath, axiosInstance = axios) {
121
+ this.configuration = configuration;
122
+ this.basePath = basePath;
123
+ this.operations = getSeatmapApi(axiosInstance);
124
+ }
125
+ async getLiveness(options) {
126
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
127
+ return this.operations.getLiveness(requestOptions);
128
+ }
129
+ }
130
+ export class AuthenticationClient {
131
+ configuration;
132
+ basePath;
133
+ operations;
134
+ constructor(configuration, basePath, axiosInstance = axios) {
135
+ this.configuration = configuration;
136
+ this.basePath = basePath;
137
+ this.operations = getSeatmapApi(axiosInstance);
138
+ }
139
+ async getIntegrationContext(options) {
140
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
141
+ return this.operations.getIntegrationContext(requestOptions);
142
+ }
143
+ async startLogin(params, options) {
144
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
145
+ return this.operations.startLogin(params, requestOptions);
146
+ }
147
+ async completeLogin(options) {
148
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
149
+ return this.operations.completeLogin(requestOptions);
150
+ }
151
+ async logoutProvider(options) {
152
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
153
+ return this.operations.logoutProvider(requestOptions);
154
+ }
155
+ async getAuthoringSession(options) {
156
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
157
+ return this.operations.getAuthoringSession(requestOptions);
158
+ }
159
+ async revokeAuthoringSession(options) {
160
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "DELETE");
161
+ return this.operations.revokeAuthoringSession(requestOptions);
162
+ }
163
+ async getEmbedContext(mapId, options) {
164
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
165
+ return this.operations.getEmbedContext(mapId, requestOptions);
166
+ }
167
+ startLoginHref(params) {
168
+ return new URL(this.operations.getStartLoginUrl(params), this.basePath ?? this.configuration.basePath).href;
169
+ }
170
+ logoutProviderHref() {
171
+ return new URL(this.operations.getLogoutProviderUrl(), this.basePath ?? this.configuration.basePath).href;
172
+ }
173
+ }
174
+ export class MapsClient {
175
+ configuration;
176
+ basePath;
177
+ operations;
178
+ constructor(configuration, basePath, axiosInstance = axios) {
179
+ this.configuration = configuration;
180
+ this.basePath = basePath;
181
+ this.operations = getSeatmapApi(axiosInstance);
182
+ }
183
+ async listMaps(workspaceId, params, options) {
184
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
185
+ return this.operations.listMaps(workspaceId, params, requestOptions);
186
+ }
187
+ async createMap(workspaceId, createMapDto, options) {
188
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "POST", createMapDto);
189
+ return this.operations.createMap(workspaceId, requestOptions.data instanceof ArrayBuffer
190
+ ? requestOptions.data
191
+ : createMapDto, requestOptions);
192
+ }
193
+ async getMapPreview(workspaceId, mapId, params, options) {
194
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
195
+ return this.operations.getMapPreview(workspaceId, mapId, params, requestOptions);
196
+ }
197
+ async getMutationStatus(workspaceId, operationId, options) {
198
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
199
+ return this.operations.getMutationStatus(workspaceId, operationId, requestOptions);
200
+ }
201
+ async resolveMapLink(workspaceId, editorCode, options) {
202
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
203
+ return this.operations.resolveMapLink(workspaceId, editorCode, requestOptions);
204
+ }
205
+ async getMapLink(workspaceId, mapId, options) {
206
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
207
+ return this.operations.getMapLink(workspaceId, mapId, requestOptions);
208
+ }
209
+ async getMap(workspaceId, mapId, options) {
210
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
211
+ return this.operations.getMap(workspaceId, mapId, requestOptions);
212
+ }
213
+ async saveMap(workspaceId, mapId, saveMapDto, options) {
214
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "PUT", saveMapDto);
215
+ return this.operations.saveMap(workspaceId, mapId, requestOptions.data instanceof ArrayBuffer
216
+ ? requestOptions.data
217
+ : saveMapDto, requestOptions);
218
+ }
219
+ async changeMap(workspaceId, mapId, mapActionDto, options) {
220
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "POST", mapActionDto);
221
+ return this.operations.changeMap(workspaceId, mapId, requestOptions.data instanceof ArrayBuffer
222
+ ? requestOptions.data
223
+ : mapActionDto, requestOptions);
224
+ }
225
+ async listMapRevisions(workspaceId, mapId, options) {
226
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
227
+ return this.operations.listMapRevisions(workspaceId, mapId, requestOptions);
228
+ }
229
+ async getMapRevision(workspaceId, mapId, revision, options) {
230
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
231
+ return this.operations.getMapRevision(workspaceId, mapId, revision, requestOptions);
232
+ }
233
+ }
234
+ export class ArtworkClient {
235
+ configuration;
236
+ basePath;
237
+ operations;
238
+ constructor(configuration, basePath, axiosInstance = axios) {
239
+ this.configuration = configuration;
240
+ this.basePath = basePath;
241
+ this.operations = getSeatmapApi(axiosInstance);
242
+ }
243
+ async getArtworkLimits(workspaceId, options) {
244
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
245
+ return this.operations.getArtworkLimits(workspaceId, requestOptions);
246
+ }
247
+ async prepareArtworkUpload(workspaceId, prepareArtworkUploadDto, options) {
248
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "POST", prepareArtworkUploadDto);
249
+ return this.operations.prepareArtworkUpload(workspaceId, requestOptions.data instanceof ArrayBuffer
250
+ ? requestOptions.data
251
+ : prepareArtworkUploadDto, requestOptions);
252
+ }
253
+ async getArtworkUpload(workspaceId, uploadId, options) {
254
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
255
+ return this.operations.getArtworkUpload(workspaceId, uploadId, requestOptions);
256
+ }
257
+ async uploadArtworkContent(workspaceId, uploadId, uploadArtworkContentBody, options) {
258
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "PUT", uploadArtworkContentBody);
259
+ return this.operations.uploadArtworkContent(workspaceId, uploadId, requestOptions.data instanceof ArrayBuffer
260
+ ? requestOptions.data
261
+ : uploadArtworkContentBody, requestOptions);
262
+ }
263
+ async completeArtworkUpload(workspaceId, uploadId, options) {
264
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "POST");
265
+ return this.operations.completeArtworkUpload(workspaceId, uploadId, requestOptions);
266
+ }
267
+ async cancelArtworkUpload(workspaceId, uploadId, options) {
268
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "POST");
269
+ return this.operations.cancelArtworkUpload(workspaceId, uploadId, requestOptions);
270
+ }
271
+ async retryArtworkUpload(workspaceId, uploadId, retryArtworkUploadDto, options) {
272
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "POST", retryArtworkUploadDto);
273
+ return this.operations.retryArtworkUpload(workspaceId, uploadId, requestOptions.data instanceof ArrayBuffer
274
+ ? requestOptions.data
275
+ : retryArtworkUploadDto, requestOptions);
276
+ }
277
+ async getArtworkResources(workspaceId, artworkBatchDto, options) {
278
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "POST", artworkBatchDto);
279
+ return this.operations.getArtworkResources(workspaceId, requestOptions.data instanceof ArrayBuffer
280
+ ? requestOptions.data
281
+ : artworkBatchDto, requestOptions);
282
+ }
283
+ }
284
+ const getSeatmapApi = (axiosInstance = axios) => {
285
+ const getLiveness = (options) => {
286
+ return axiosInstance.get(`/health`, options);
287
+ };
288
+ const getGetLivenessUrl = () => {
289
+ return axiosInstance
290
+ .create({
291
+ baseURL: "",
292
+ params: null,
293
+ })
294
+ .getUri({
295
+ url: `/health`,
296
+ baseURL: "",
297
+ });
298
+ };
299
+ const getIntegrationContext = (options) => {
300
+ return axiosInstance.get(`/auth/integration`, options);
301
+ };
302
+ const getGetIntegrationContextUrl = () => {
303
+ return axiosInstance
304
+ .create({
305
+ baseURL: "",
306
+ params: null,
307
+ })
308
+ .getUri({
309
+ url: `/auth/integration`,
310
+ baseURL: "",
311
+ });
312
+ };
313
+ const startLogin = (params, options) => {
314
+ return axiosInstance.get(`/auth/login`, {
315
+ ...options,
316
+ params: { ...params, ...options?.params },
317
+ });
318
+ };
319
+ const getStartLoginUrl = (params) => {
320
+ return axiosInstance
321
+ .create({
322
+ baseURL: "",
323
+ params: null,
324
+ })
325
+ .getUri({
326
+ url: `/auth/login`,
327
+ baseURL: "",
328
+ params,
329
+ });
330
+ };
331
+ const completeLogin = (options) => {
332
+ return axiosInstance.get(`/auth/callback`, options);
333
+ };
334
+ const getCompleteLoginUrl = () => {
335
+ return axiosInstance
336
+ .create({
337
+ baseURL: "",
338
+ params: null,
339
+ })
340
+ .getUri({
341
+ url: `/auth/callback`,
342
+ baseURL: "",
343
+ });
344
+ };
345
+ const logoutProvider = (options) => {
346
+ return axiosInstance.get(`/auth/logout/provider`, options);
347
+ };
348
+ const getLogoutProviderUrl = () => {
349
+ return axiosInstance
350
+ .create({
351
+ baseURL: "",
352
+ params: null,
353
+ })
354
+ .getUri({
355
+ url: `/auth/logout/provider`,
356
+ baseURL: "",
357
+ });
358
+ };
359
+ const getAuthoringSession = (options) => {
360
+ return axiosInstance.get(`/auth/authoring/session`, options);
361
+ };
362
+ const getGetAuthoringSessionUrl = () => {
363
+ return axiosInstance
364
+ .create({
365
+ baseURL: "",
366
+ params: null,
367
+ })
368
+ .getUri({
369
+ url: `/auth/authoring/session`,
370
+ baseURL: "",
371
+ });
372
+ };
373
+ const revokeAuthoringSession = (options) => {
374
+ return axiosInstance.delete(`/auth/authoring/session`, options);
375
+ };
376
+ const getRevokeAuthoringSessionUrl = () => {
377
+ return axiosInstance
378
+ .create({
379
+ baseURL: "",
380
+ params: null,
381
+ })
382
+ .getUri({
383
+ url: `/auth/authoring/session`,
384
+ baseURL: "",
385
+ });
386
+ };
387
+ const getEmbedContext = (mapId, options) => {
388
+ return axiosInstance.get(`/auth/embed/${encodeURIComponent(mapId)}`, options);
389
+ };
390
+ const getGetEmbedContextUrl = (mapId) => {
391
+ return axiosInstance
392
+ .create({
393
+ baseURL: "",
394
+ params: null,
395
+ })
396
+ .getUri({
397
+ url: `/auth/embed/${encodeURIComponent(mapId)}`,
398
+ baseURL: "",
399
+ });
400
+ };
401
+ const listMaps = (workspaceId, params, options) => {
402
+ return axiosInstance.get(`/workspaces/${encodeURIComponent(workspaceId)}/maps`, {
403
+ ...options,
404
+ params: { ...params, ...options?.params },
405
+ });
406
+ };
407
+ const getListMapsUrl = (workspaceId, params) => {
408
+ return axiosInstance
409
+ .create({
410
+ baseURL: "",
411
+ params: null,
412
+ })
413
+ .getUri({
414
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps`,
415
+ baseURL: "",
416
+ params,
417
+ });
418
+ };
419
+ const createMap = (workspaceId, createMapDto, options) => {
420
+ return axiosInstance.post(`/workspaces/${encodeURIComponent(workspaceId)}/maps`, createMapDto, options);
421
+ };
422
+ const getCreateMapUrl = (workspaceId) => {
423
+ return axiosInstance
424
+ .create({
425
+ baseURL: "",
426
+ params: null,
427
+ })
428
+ .getUri({
429
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps`,
430
+ baseURL: "",
431
+ });
432
+ };
433
+ const getMapPreview = (workspaceId, mapId, params, options) => {
434
+ return axiosInstance.get(`/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/preview`, {
435
+ responseType: "blob",
436
+ ...options,
437
+ params: { ...params, ...options?.params },
438
+ });
439
+ };
440
+ const getGetMapPreviewUrl = (workspaceId, mapId, params) => {
441
+ return axiosInstance
442
+ .create({
443
+ baseURL: "",
444
+ params: null,
445
+ })
446
+ .getUri({
447
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/preview`,
448
+ baseURL: "",
449
+ params,
450
+ });
451
+ };
452
+ const getMutationStatus = (workspaceId, operationId, options) => {
453
+ return axiosInstance.get(`/workspaces/${encodeURIComponent(workspaceId)}/maps/operations/${encodeURIComponent(operationId)}`, options);
454
+ };
455
+ const getGetMutationStatusUrl = (workspaceId, operationId) => {
456
+ return axiosInstance
457
+ .create({
458
+ baseURL: "",
459
+ params: null,
460
+ })
461
+ .getUri({
462
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps/operations/${encodeURIComponent(operationId)}`,
463
+ baseURL: "",
464
+ });
465
+ };
466
+ /**
467
+ * @summary Resolve a permanent map code within an authorized workspace
468
+ */
469
+ const resolveMapLink = (workspaceId, editorCode, options) => {
470
+ return axiosInstance.get(`/workspaces/${encodeURIComponent(workspaceId)}/maps/links/${encodeURIComponent(editorCode)}`, options);
471
+ };
472
+ const getResolveMapLinkUrl = (workspaceId, editorCode) => {
473
+ return axiosInstance
474
+ .create({
475
+ baseURL: "",
476
+ params: null,
477
+ })
478
+ .getUri({
479
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps/links/${encodeURIComponent(editorCode)}`,
480
+ baseURL: "",
481
+ });
482
+ };
483
+ /**
484
+ * @summary Get a map's permanent editor link
485
+ */
486
+ const getMapLink = (workspaceId, mapId, options) => {
487
+ return axiosInstance.get(`/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/link`, options);
488
+ };
489
+ const getGetMapLinkUrl = (workspaceId, mapId) => {
490
+ return axiosInstance
491
+ .create({
492
+ baseURL: "",
493
+ params: null,
494
+ })
495
+ .getUri({
496
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/link`,
497
+ baseURL: "",
498
+ });
499
+ };
500
+ const getMap = (workspaceId, mapId, options) => {
501
+ return axiosInstance.get(`/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}`, options);
502
+ };
503
+ const getGetMapUrl = (workspaceId, mapId) => {
504
+ return axiosInstance
505
+ .create({
506
+ baseURL: "",
507
+ params: null,
508
+ })
509
+ .getUri({
510
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}`,
511
+ baseURL: "",
512
+ });
513
+ };
514
+ const saveMap = (workspaceId, mapId, saveMapDto, options) => {
515
+ return axiosInstance.put(`/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/draft`, saveMapDto, options);
516
+ };
517
+ const getSaveMapUrl = (workspaceId, mapId) => {
518
+ return axiosInstance
519
+ .create({
520
+ baseURL: "",
521
+ params: null,
522
+ })
523
+ .getUri({
524
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/draft`,
525
+ baseURL: "",
526
+ });
527
+ };
528
+ const changeMap = (workspaceId, mapId, mapActionDto, options) => {
529
+ return axiosInstance.post(`/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/actions`, mapActionDto, options);
530
+ };
531
+ const getChangeMapUrl = (workspaceId, mapId) => {
532
+ return axiosInstance
533
+ .create({
534
+ baseURL: "",
535
+ params: null,
536
+ })
537
+ .getUri({
538
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/actions`,
539
+ baseURL: "",
540
+ });
541
+ };
542
+ const listMapRevisions = (workspaceId, mapId, options) => {
543
+ return axiosInstance.get(`/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/revisions`, options);
544
+ };
545
+ const getListMapRevisionsUrl = (workspaceId, mapId) => {
546
+ return axiosInstance
547
+ .create({
548
+ baseURL: "",
549
+ params: null,
550
+ })
551
+ .getUri({
552
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/revisions`,
553
+ baseURL: "",
554
+ });
555
+ };
556
+ const getMapRevision = (workspaceId, mapId, revision, options) => {
557
+ return axiosInstance.get(`/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/revisions/${encodeURIComponent(revision)}`, options);
558
+ };
559
+ const getGetMapRevisionUrl = (workspaceId, mapId, revision) => {
560
+ return axiosInstance
561
+ .create({
562
+ baseURL: "",
563
+ params: null,
564
+ })
565
+ .getUri({
566
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/revisions/${encodeURIComponent(revision)}`,
567
+ baseURL: "",
568
+ });
569
+ };
570
+ const getArtworkLimits = (workspaceId, options) => {
571
+ return axiosInstance.get(`/workspaces/${encodeURIComponent(workspaceId)}/artwork/limits`, options);
572
+ };
573
+ const getGetArtworkLimitsUrl = (workspaceId) => {
574
+ return axiosInstance
575
+ .create({
576
+ baseURL: "",
577
+ params: null,
578
+ })
579
+ .getUri({
580
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/artwork/limits`,
581
+ baseURL: "",
582
+ });
583
+ };
584
+ const prepareArtworkUpload = (workspaceId, prepareArtworkUploadDto, options) => {
585
+ return axiosInstance.post(`/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads`, prepareArtworkUploadDto, options);
586
+ };
587
+ const getPrepareArtworkUploadUrl = (workspaceId) => {
588
+ return axiosInstance
589
+ .create({
590
+ baseURL: "",
591
+ params: null,
592
+ })
593
+ .getUri({
594
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads`,
595
+ baseURL: "",
596
+ });
597
+ };
598
+ const getArtworkUpload = (workspaceId, uploadId, options) => {
599
+ return axiosInstance.get(`/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads/${encodeURIComponent(uploadId)}`, options);
600
+ };
601
+ const getGetArtworkUploadUrl = (workspaceId, uploadId) => {
602
+ return axiosInstance
603
+ .create({
604
+ baseURL: "",
605
+ params: null,
606
+ })
607
+ .getUri({
608
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads/${encodeURIComponent(uploadId)}`,
609
+ baseURL: "",
610
+ });
611
+ };
612
+ const uploadArtworkContent = (workspaceId, uploadId, uploadArtworkContentBody, options) => {
613
+ return axiosInstance.put(`/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads/${encodeURIComponent(uploadId)}/content`, uploadArtworkContentBody, options);
614
+ };
615
+ const getUploadArtworkContentUrl = (workspaceId, uploadId) => {
616
+ return axiosInstance
617
+ .create({
618
+ baseURL: "",
619
+ params: null,
620
+ })
621
+ .getUri({
622
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads/${encodeURIComponent(uploadId)}/content`,
623
+ baseURL: "",
624
+ });
625
+ };
626
+ const completeArtworkUpload = (workspaceId, uploadId, options) => {
627
+ return axiosInstance.post(`/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads/${encodeURIComponent(uploadId)}/complete`, undefined, options);
628
+ };
629
+ const getCompleteArtworkUploadUrl = (workspaceId, uploadId) => {
630
+ return axiosInstance
631
+ .create({
632
+ baseURL: "",
633
+ params: null,
634
+ })
635
+ .getUri({
636
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads/${encodeURIComponent(uploadId)}/complete`,
637
+ baseURL: "",
638
+ });
639
+ };
640
+ const cancelArtworkUpload = (workspaceId, uploadId, options) => {
641
+ return axiosInstance.post(`/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads/${encodeURIComponent(uploadId)}/cancel`, undefined, options);
642
+ };
643
+ const getCancelArtworkUploadUrl = (workspaceId, uploadId) => {
644
+ return axiosInstance
645
+ .create({
646
+ baseURL: "",
647
+ params: null,
648
+ })
649
+ .getUri({
650
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads/${encodeURIComponent(uploadId)}/cancel`,
651
+ baseURL: "",
652
+ });
653
+ };
654
+ const retryArtworkUpload = (workspaceId, uploadId, retryArtworkUploadDto, options) => {
655
+ return axiosInstance.post(`/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads/${encodeURIComponent(uploadId)}/retry`, retryArtworkUploadDto, options);
656
+ };
657
+ const getRetryArtworkUploadUrl = (workspaceId, uploadId) => {
658
+ return axiosInstance
659
+ .create({
660
+ baseURL: "",
661
+ params: null,
662
+ })
663
+ .getUri({
664
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads/${encodeURIComponent(uploadId)}/retry`,
665
+ baseURL: "",
666
+ });
667
+ };
668
+ const getArtworkResources = (workspaceId, artworkBatchDto, options) => {
669
+ return axiosInstance.post(`/workspaces/${encodeURIComponent(workspaceId)}/artwork/resources`, artworkBatchDto, options);
670
+ };
671
+ const getGetArtworkResourcesUrl = (workspaceId) => {
672
+ return axiosInstance
673
+ .create({
674
+ baseURL: "",
675
+ params: null,
676
+ })
677
+ .getUri({
678
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/artwork/resources`,
679
+ baseURL: "",
680
+ });
681
+ };
682
+ return {
683
+ getLiveness,
684
+ getIntegrationContext,
685
+ startLogin,
686
+ completeLogin,
687
+ logoutProvider,
688
+ getAuthoringSession,
689
+ revokeAuthoringSession,
690
+ getEmbedContext,
691
+ listMaps,
692
+ createMap,
693
+ getMapPreview,
694
+ getMutationStatus,
695
+ resolveMapLink,
696
+ getMapLink,
697
+ getMap,
698
+ saveMap,
699
+ changeMap,
700
+ listMapRevisions,
701
+ getMapRevision,
702
+ getArtworkLimits,
703
+ prepareArtworkUpload,
704
+ getArtworkUpload,
705
+ uploadArtworkContent,
706
+ completeArtworkUpload,
707
+ cancelArtworkUpload,
708
+ retryArtworkUpload,
709
+ getArtworkResources,
710
+ getGetLivenessUrl,
711
+ getGetIntegrationContextUrl,
712
+ getStartLoginUrl,
713
+ getCompleteLoginUrl,
714
+ getLogoutProviderUrl,
715
+ getGetAuthoringSessionUrl,
716
+ getRevokeAuthoringSessionUrl,
717
+ getGetEmbedContextUrl,
718
+ getListMapsUrl,
719
+ getCreateMapUrl,
720
+ getGetMapPreviewUrl,
721
+ getGetMutationStatusUrl,
722
+ getResolveMapLinkUrl,
723
+ getGetMapLinkUrl,
724
+ getGetMapUrl,
725
+ getSaveMapUrl,
726
+ getChangeMapUrl,
727
+ getListMapRevisionsUrl,
728
+ getGetMapRevisionUrl,
729
+ getGetArtworkLimitsUrl,
730
+ getPrepareArtworkUploadUrl,
731
+ getGetArtworkUploadUrl,
732
+ getUploadArtworkContentUrl,
733
+ getCompleteArtworkUploadUrl,
734
+ getCancelArtworkUploadUrl,
735
+ getRetryArtworkUploadUrl,
736
+ getGetArtworkResourcesUrl,
737
+ };
738
+ };