@seatmap-fyi/api-client 0.1.0-alpha.3 → 0.1.0-alpha.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/generated.js CHANGED
@@ -1,3 +1,4 @@
1
+ import axios from "axios";
1
2
  export var Capability;
2
3
  (function (Capability) {
3
4
  Capability["MAPS_READ"] = "maps:read";
@@ -20,6 +21,13 @@ export var EmbedContextDtoCapabilitiesItem;
20
21
  (function (EmbedContextDtoCapabilitiesItem) {
21
22
  EmbedContextDtoCapabilitiesItem["map:view"] = "map:view";
22
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 = {}));
23
31
  export var MapLifecycle;
24
32
  (function (MapLifecycle) {
25
33
  MapLifecycle["active"] = "active";
@@ -27,6 +35,21 @@ export var MapLifecycle;
27
35
  MapLifecycle["trashed"] = "trashed";
28
36
  MapLifecycle["deleted"] = "deleted";
29
37
  })(MapLifecycle || (MapLifecycle = {}));
38
+ export var PlanReadKind;
39
+ (function (PlanReadKind) {
40
+ PlanReadKind["miss"] = "miss";
41
+ PlanReadKind["rows"] = "rows";
42
+ PlanReadKind["shape"] = "shape";
43
+ })(PlanReadKind || (PlanReadKind = {}));
44
+ export var PlanReviewVerdict;
45
+ (function (PlanReviewVerdict) {
46
+ PlanReviewVerdict["matched"] = "matched";
47
+ PlanReviewVerdict["insufficient-evidence"] = "insufficient-evidence";
48
+ })(PlanReviewVerdict || (PlanReviewVerdict = {}));
49
+ export var MapEditorStateDtoVersion;
50
+ (function (MapEditorStateDtoVersion) {
51
+ MapEditorStateDtoVersion[MapEditorStateDtoVersion["NUMBER_1"] = 1] = "NUMBER_1";
52
+ })(MapEditorStateDtoVersion || (MapEditorStateDtoVersion = {}));
30
53
  export var MutationStatus;
31
54
  (function (MutationStatus) {
32
55
  MutationStatus["completed"] = "completed";
@@ -44,7 +67,69 @@ export var MapOperation;
44
67
  MapOperation["trash"] = "trash";
45
68
  MapOperation["restoreTrash"] = "restoreTrash";
46
69
  MapOperation["restoreRevision"] = "restoreRevision";
70
+ MapOperation["replaceDraft"] = "replaceDraft";
47
71
  })(MapOperation || (MapOperation = {}));
72
+ export var ReleaseCaptureKind;
73
+ (function (ReleaseCaptureKind) {
74
+ ReleaseCaptureKind["buyer-preview-desktop"] = "buyer-preview-desktop";
75
+ ReleaseCaptureKind["buyer-preview-mobile"] = "buyer-preview-mobile";
76
+ ReleaseCaptureKind["buyer-preview-interaction-desktop"] = "buyer-preview-interaction-desktop";
77
+ ReleaseCaptureKind["buyer-preview-interaction-mobile"] = "buyer-preview-interaction-mobile";
78
+ ReleaseCaptureKind["buyer-preview-venue3d-desktop"] = "buyer-preview-venue3d-desktop";
79
+ ReleaseCaptureKind["buyer-preview-venue3d-mobile"] = "buyer-preview-venue3d-mobile";
80
+ })(ReleaseCaptureKind || (ReleaseCaptureKind = {}));
81
+ export var ReleaseDecision;
82
+ (function (ReleaseDecision) {
83
+ ReleaseDecision["approve"] = "approve";
84
+ ReleaseDecision["reject"] = "reject";
85
+ })(ReleaseDecision || (ReleaseDecision = {}));
86
+ export var PrepareArtworkUploadDtoMimeType;
87
+ (function (PrepareArtworkUploadDtoMimeType) {
88
+ PrepareArtworkUploadDtoMimeType["image/png"] = "image/png";
89
+ PrepareArtworkUploadDtoMimeType["image/jpeg"] = "image/jpeg";
90
+ PrepareArtworkUploadDtoMimeType["image/webp"] = "image/webp";
91
+ PrepareArtworkUploadDtoMimeType["image/svg+xml"] = "image/svg+xml";
92
+ })(PrepareArtworkUploadDtoMimeType || (PrepareArtworkUploadDtoMimeType = {}));
93
+ export var ArtworkUploadState;
94
+ (function (ArtworkUploadState) {
95
+ ArtworkUploadState["prepared"] = "prepared";
96
+ ArtworkUploadState["receiving"] = "receiving";
97
+ ArtworkUploadState["uploaded"] = "uploaded";
98
+ ArtworkUploadState["validating"] = "validating";
99
+ ArtworkUploadState["ready"] = "ready";
100
+ ArtworkUploadState["review-required"] = "review-required";
101
+ ArtworkUploadState["failed"] = "failed";
102
+ ArtworkUploadState["cancelled"] = "cancelled";
103
+ })(ArtworkUploadState || (ArtworkUploadState = {}));
104
+ export var ArtworkFailureCode;
105
+ (function (ArtworkFailureCode) {
106
+ ArtworkFailureCode["ARTWORK_DIGEST"] = "ARTWORK_DIGEST";
107
+ ArtworkFailureCode["ARTWORK_SVG_ACTIVE"] = "ARTWORK_SVG_ACTIVE";
108
+ ArtworkFailureCode["ARTWORK_SVG_INVALID"] = "ARTWORK_SVG_INVALID";
109
+ ArtworkFailureCode["ARTWORK_SVG_COMPLEX"] = "ARTWORK_SVG_COMPLEX";
110
+ ArtworkFailureCode["ARTWORK_FILE_LIMIT"] = "ARTWORK_FILE_LIMIT";
111
+ ArtworkFailureCode["ARTWORK_TYPE"] = "ARTWORK_TYPE";
112
+ ArtworkFailureCode["ARTWORK_PIXEL_LIMIT"] = "ARTWORK_PIXEL_LIMIT";
113
+ ArtworkFailureCode["ARTWORK_DECODE"] = "ARTWORK_DECODE";
114
+ ArtworkFailureCode["ARTWORK_TRANSFER"] = "ARTWORK_TRANSFER";
115
+ ArtworkFailureCode["ARTWORK_EXPIRED"] = "ARTWORK_EXPIRED";
116
+ ArtworkFailureCode["ARTWORK_VALIDATION_FAILED"] = "ARTWORK_VALIDATION_FAILED";
117
+ })(ArtworkFailureCode || (ArtworkFailureCode = {}));
118
+ export var ArtworkState;
119
+ (function (ArtworkState) {
120
+ ArtworkState["pending"] = "pending";
121
+ ArtworkState["ready"] = "ready";
122
+ ArtworkState["review-required"] = "review-required";
123
+ ArtworkState["failed"] = "failed";
124
+ ArtworkState["deleting"] = "deleting";
125
+ ArtworkState["deleted"] = "deleted";
126
+ })(ArtworkState || (ArtworkState = {}));
127
+ export var ListMapsPublication;
128
+ (function (ListMapsPublication) {
129
+ ListMapsPublication["all"] = "all";
130
+ ListMapsPublication["published"] = "published";
131
+ ListMapsPublication["drafts"] = "drafts";
132
+ })(ListMapsPublication || (ListMapsPublication = {}));
48
133
  export var ListMapsLifecycle;
49
134
  (function (ListMapsLifecycle) {
50
135
  ListMapsLifecycle["active"] = "active";
@@ -52,348 +137,903 @@ export var ListMapsLifecycle;
52
137
  ListMapsLifecycle["trashed"] = "trashed";
53
138
  ListMapsLifecycle["deleted"] = "deleted";
54
139
  })(ListMapsLifecycle || (ListMapsLifecycle = {}));
55
- import { createApiFetcher } from "./transport.js";
140
+ export var ListMapsSort;
141
+ (function (ListMapsSort) {
142
+ ListMapsSort["created-oldest"] = "created-oldest";
143
+ ListMapsSort["recently-edited"] = "recently-edited";
144
+ ListMapsSort["name-asc"] = "name-asc";
145
+ ListMapsSort["most-seats"] = "most-seats";
146
+ })(ListMapsSort || (ListMapsSort = {}));
147
+ import { prepareRequestOptions } from "./transport.js";
56
148
  export class HealthClient {
57
- fetchApi;
58
- constructor(configuration) {
59
- this.fetchApi = createApiFetcher(configuration);
149
+ configuration;
150
+ basePath;
151
+ operations;
152
+ constructor(configuration, basePath, axiosInstance = axios) {
153
+ this.configuration = configuration;
154
+ this.basePath = basePath;
155
+ this.operations = getSeatmapApi(axiosInstance);
60
156
  }
61
- getLiveness(options) {
62
- return getLiveness(options, this.fetchApi);
157
+ async getLiveness(options) {
158
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
159
+ return this.operations.getLiveness(requestOptions);
63
160
  }
64
161
  }
65
162
  export class AuthenticationClient {
66
- fetchApi;
163
+ configuration;
67
164
  basePath;
68
- constructor(configuration) {
69
- this.basePath = configuration.basePath;
70
- this.fetchApi = createApiFetcher(configuration);
165
+ operations;
166
+ constructor(configuration, basePath, axiosInstance = axios) {
167
+ this.configuration = configuration;
168
+ this.basePath = basePath;
169
+ this.operations = getSeatmapApi(axiosInstance);
71
170
  }
72
- getIntegrationContext(options) {
73
- return getIntegrationContext(options, this.fetchApi);
171
+ async getIntegrationContext(options) {
172
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
173
+ return this.operations.getIntegrationContext(requestOptions);
74
174
  }
75
- startLogin(params, options) {
76
- return startLogin(params, options, this.fetchApi);
175
+ async startLogin(params, options) {
176
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
177
+ return this.operations.startLogin(params, requestOptions);
77
178
  }
78
- completeLogin(options) {
79
- return completeLogin(options, this.fetchApi);
179
+ async completeLogin(options) {
180
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
181
+ return this.operations.completeLogin(requestOptions);
80
182
  }
81
- logoutProvider(options) {
82
- return logoutProvider(options, this.fetchApi);
183
+ async logoutProvider(options) {
184
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
185
+ return this.operations.logoutProvider(requestOptions);
83
186
  }
84
- getAuthoringSession(options) {
85
- return getAuthoringSession(options, this.fetchApi);
187
+ async getAuthoringSession(options) {
188
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
189
+ return this.operations.getAuthoringSession(requestOptions);
86
190
  }
87
- revokeAuthoringSession(options) {
88
- return revokeAuthoringSession(options, this.fetchApi);
191
+ async revokeAuthoringSession(options) {
192
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "DELETE");
193
+ return this.operations.revokeAuthoringSession(requestOptions);
89
194
  }
90
- getEmbedContext(mapId, options) {
91
- return getEmbedContext(mapId, options, this.fetchApi);
195
+ async getEmbedContext(mapId, options) {
196
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
197
+ return this.operations.getEmbedContext(mapId, requestOptions);
92
198
  }
93
199
  startLoginHref(params) {
94
- return new URL(getStartLoginUrl(params), this.basePath).href;
200
+ return new URL(this.operations.getStartLoginUrl(params), this.basePath ?? this.configuration.basePath).href;
95
201
  }
96
202
  logoutProviderHref() {
97
- return new URL(getLogoutProviderUrl(), this.basePath).href;
203
+ return new URL(this.operations.getLogoutProviderUrl(), this.basePath ?? this.configuration.basePath).href;
98
204
  }
99
205
  }
100
206
  export class MapsClient {
101
- fetchApi;
102
- constructor(configuration) {
103
- this.fetchApi = createApiFetcher(configuration);
207
+ configuration;
208
+ basePath;
209
+ operations;
210
+ constructor(configuration, basePath, axiosInstance = axios) {
211
+ this.configuration = configuration;
212
+ this.basePath = basePath;
213
+ this.operations = getSeatmapApi(axiosInstance);
214
+ }
215
+ async listMaps(workspaceId, params, options) {
216
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
217
+ return this.operations.listMaps(workspaceId, params, requestOptions);
218
+ }
219
+ async createMap(workspaceId, createMapDto, options) {
220
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "POST", createMapDto);
221
+ return this.operations.createMap(workspaceId, requestOptions.data instanceof ArrayBuffer ? requestOptions.data : createMapDto, requestOptions);
222
+ }
223
+ async readReferencePlanBlock(workspaceId, mapId, readPlanBlockDto, options) {
224
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "POST", readPlanBlockDto);
225
+ return this.operations.readReferencePlanBlock(workspaceId, mapId, requestOptions.data instanceof ArrayBuffer ? requestOptions.data : readPlanBlockDto, requestOptions);
226
+ }
227
+ async readReferencePlanCurve(workspaceId, mapId, readPlanCurveDto, options) {
228
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "POST", readPlanCurveDto);
229
+ return this.operations.readReferencePlanCurve(workspaceId, mapId, requestOptions.data instanceof ArrayBuffer ? requestOptions.data : readPlanCurveDto, requestOptions);
230
+ }
231
+ async findReferencePlanSections(workspaceId, mapId, reviewPlanDto, options) {
232
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "POST", reviewPlanDto);
233
+ return this.operations.findReferencePlanSections(workspaceId, mapId, requestOptions.data instanceof ArrayBuffer ? requestOptions.data : reviewPlanDto, requestOptions);
234
+ }
235
+ async readWholeReferencePlan(workspaceId, mapId, reviewPlanDto, options) {
236
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "POST", reviewPlanDto);
237
+ return this.operations.readWholeReferencePlan(workspaceId, mapId, requestOptions.data instanceof ArrayBuffer ? requestOptions.data : reviewPlanDto, requestOptions);
238
+ }
239
+ async reviewReferencePlan(workspaceId, mapId, reviewPlanDto, options) {
240
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "POST", reviewPlanDto);
241
+ return this.operations.reviewReferencePlan(workspaceId, mapId, requestOptions.data instanceof ArrayBuffer ? requestOptions.data : reviewPlanDto, requestOptions);
242
+ }
243
+ async getMapPreview(workspaceId, mapId, params, options) {
244
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
245
+ return this.operations.getMapPreview(workspaceId, mapId, params, requestOptions);
246
+ }
247
+ async getMutationStatus(workspaceId, operationId, options) {
248
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
249
+ return this.operations.getMutationStatus(workspaceId, operationId, requestOptions);
250
+ }
251
+ async resolveMapLink(workspaceId, editorCode, options) {
252
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
253
+ return this.operations.resolveMapLink(workspaceId, editorCode, requestOptions);
254
+ }
255
+ async getMapLink(workspaceId, mapId, options) {
256
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
257
+ return this.operations.getMapLink(workspaceId, mapId, requestOptions);
258
+ }
259
+ async getMap(workspaceId, mapId, options) {
260
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
261
+ return this.operations.getMap(workspaceId, mapId, requestOptions);
262
+ }
263
+ async saveMap(workspaceId, mapId, saveMapDto, options) {
264
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "PUT", saveMapDto);
265
+ return this.operations.saveMap(workspaceId, mapId, requestOptions.data instanceof ArrayBuffer ? requestOptions.data : saveMapDto, requestOptions);
266
+ }
267
+ async changeMap(workspaceId, mapId, mapActionDto, options) {
268
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "POST", mapActionDto);
269
+ return this.operations.changeMap(workspaceId, mapId, requestOptions.data instanceof ArrayBuffer ? requestOptions.data : mapActionDto, requestOptions);
270
+ }
271
+ async listMapRevisions(workspaceId, mapId, options) {
272
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
273
+ return this.operations.listMapRevisions(workspaceId, mapId, requestOptions);
274
+ }
275
+ async prepareMapReleaseReview(workspaceId, mapId, prepareMapReleaseReviewDto, options) {
276
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "POST", prepareMapReleaseReviewDto);
277
+ return this.operations.prepareMapReleaseReview(workspaceId, mapId, requestOptions.data instanceof ArrayBuffer ? requestOptions.data : prepareMapReleaseReviewDto, requestOptions);
104
278
  }
105
- listMaps(workspaceId, params, options) {
106
- return listMaps(workspaceId, params, options, this.fetchApi);
279
+ async decideMapRelease(workspaceId, mapId, reviewId, decideMapReleaseDto, options) {
280
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "POST", decideMapReleaseDto);
281
+ return this.operations.decideMapRelease(workspaceId, mapId, reviewId, requestOptions.data instanceof ArrayBuffer ? requestOptions.data : decideMapReleaseDto, requestOptions);
107
282
  }
108
- createMap(workspaceId, createMapDto, options) {
109
- return createMap(workspaceId, createMapDto, options, this.fetchApi);
283
+ async getMapReleaseCapture(workspaceId, mapId, reviewId, floor, kind, options) {
284
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
285
+ return this.operations.getMapReleaseCapture(workspaceId, mapId, reviewId, floor, kind, requestOptions);
110
286
  }
111
- getMutationStatus(workspaceId, operationId, options) {
112
- return getMutationStatus(workspaceId, operationId, options, this.fetchApi);
287
+ async listMapPublications(workspaceId, mapId, options) {
288
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
289
+ return this.operations.listMapPublications(workspaceId, mapId, requestOptions);
113
290
  }
114
- getMap(workspaceId, mapId, options) {
115
- return getMap(workspaceId, mapId, options, this.fetchApi);
291
+ async pinMapEventPublication(workspaceId, mapId, revision, pinEventPublicationDto, options) {
292
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "POST", pinEventPublicationDto);
293
+ return this.operations.pinMapEventPublication(workspaceId, mapId, revision, requestOptions.data instanceof ArrayBuffer ? requestOptions.data : pinEventPublicationDto, requestOptions);
116
294
  }
117
- saveMap(workspaceId, mapId, saveMapDto, options) {
118
- return saveMap(workspaceId, mapId, saveMapDto, options, this.fetchApi);
295
+ async getMapEventHandoff(workspaceId, mapId, revision, options) {
296
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
297
+ return this.operations.getMapEventHandoff(workspaceId, mapId, revision, requestOptions);
119
298
  }
120
- changeMap(workspaceId, mapId, mapActionDto, options) {
121
- return changeMap(workspaceId, mapId, mapActionDto, options, this.fetchApi);
299
+ async getPinnedEventPublication(workspaceId, eventId, options) {
300
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
301
+ return this.operations.getPinnedEventPublication(workspaceId, eventId, requestOptions);
122
302
  }
123
- listMapRevisions(workspaceId, mapId, options) {
124
- return listMapRevisions(workspaceId, mapId, options, this.fetchApi);
303
+ async getMapPublication(workspaceId, mapId, revision, options) {
304
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
305
+ return this.operations.getMapPublication(workspaceId, mapId, revision, requestOptions);
125
306
  }
126
- getMapRevision(workspaceId, mapId, revision, options) {
127
- return getMapRevision(workspaceId, mapId, revision, options, this.fetchApi);
307
+ async getMapPublicationContent(workspaceId, mapId, revision, options) {
308
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
309
+ return this.operations.getMapPublicationContent(workspaceId, mapId, revision, requestOptions);
310
+ }
311
+ async getMapRevision(workspaceId, mapId, revision, options) {
312
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
313
+ return this.operations.getMapRevision(workspaceId, mapId, revision, requestOptions);
128
314
  }
129
315
  }
130
- const getGetLivenessUrl = () => {
131
- return `/health/live`;
132
- };
133
- const getLiveness = async (options, fetchFn) => {
134
- const res = await (fetchFn ?? fetch)(getGetLivenessUrl(), {
135
- ...options,
136
- method: "GET",
137
- });
138
- const body = [204, 205, 304].includes(res.status) ? null : await res.text();
139
- const data = body ? JSON.parse(body) : {};
140
- return data;
141
- };
142
- const getGetIntegrationContextUrl = () => {
143
- return `/v1/auth/integration`;
144
- };
145
- const getIntegrationContext = async (options, fetchFn) => {
146
- const res = await (fetchFn ?? fetch)(getGetIntegrationContextUrl(), {
147
- ...options,
148
- method: "GET",
149
- });
150
- const body = [204, 205, 304].includes(res.status) ? null : await res.text();
151
- const data = body ? JSON.parse(body) : {};
152
- return data;
153
- };
154
- const getStartLoginUrl = (params) => {
155
- const normalizedParams = new URLSearchParams();
156
- Object.entries(params || {}).forEach(([key, value]) => {
157
- if (value !== undefined) {
158
- normalizedParams.append(key, value === null ? "null" : String(value));
159
- }
160
- });
161
- const stringifiedParams = normalizedParams.toString();
162
- return stringifiedParams.length > 0
163
- ? `/v1/auth/login?${stringifiedParams}`
164
- : `/v1/auth/login`;
165
- };
166
- const startLogin = async (params, options, fetchFn) => {
167
- const res = await (fetchFn ?? fetch)(getStartLoginUrl(params), {
168
- ...options,
169
- method: "GET",
170
- });
171
- const body = [204, 205, 304].includes(res.status) ? null : await res.text();
172
- const data = body ? JSON.parse(body) : {};
173
- return data;
174
- };
175
- const getCompleteLoginUrl = () => {
176
- return `/v1/auth/callback`;
177
- };
178
- const completeLogin = async (options, fetchFn) => {
179
- const res = await (fetchFn ?? fetch)(getCompleteLoginUrl(), {
180
- ...options,
181
- method: "GET",
182
- });
183
- const body = [204, 205, 304].includes(res.status) ? null : await res.text();
184
- const data = body ? JSON.parse(body) : {};
185
- return data;
186
- };
187
- const getLogoutProviderUrl = () => {
188
- return `/v1/auth/logout/provider`;
189
- };
190
- const logoutProvider = async (options, fetchFn) => {
191
- const res = await (fetchFn ?? fetch)(getLogoutProviderUrl(), {
192
- ...options,
193
- method: "GET",
194
- });
195
- const body = [204, 205, 304].includes(res.status) ? null : await res.text();
196
- const data = body ? JSON.parse(body) : {};
197
- return data;
198
- };
199
- const getGetAuthoringSessionUrl = () => {
200
- return `/v1/auth/authoring/session`;
201
- };
202
- const getAuthoringSession = async (options, fetchFn) => {
203
- const res = await (fetchFn ?? fetch)(getGetAuthoringSessionUrl(), {
204
- ...options,
205
- method: "GET",
206
- });
207
- const body = [204, 205, 304].includes(res.status) ? null : await res.text();
208
- const data = body ? JSON.parse(body) : {};
209
- return data;
210
- };
211
- const getRevokeAuthoringSessionUrl = () => {
212
- return `/v1/auth/authoring/session`;
213
- };
214
- const revokeAuthoringSession = async (options, fetchFn) => {
215
- const res = await (fetchFn ?? fetch)(getRevokeAuthoringSessionUrl(), {
216
- ...options,
217
- method: "DELETE",
218
- });
219
- const body = [204, 205, 304].includes(res.status) ? null : await res.text();
220
- const data = body ? JSON.parse(body) : undefined;
221
- return data;
222
- };
223
- const getGetEmbedContextUrl = (mapId) => {
224
- return `/v1/auth/embed/${encodeURIComponent(String(mapId))}`;
225
- };
226
- const getEmbedContext = async (mapId, options, fetchFn) => {
227
- const res = await (fetchFn ?? fetch)(getGetEmbedContextUrl(mapId), {
228
- ...options,
229
- method: "GET",
230
- });
231
- const body = [204, 205, 304].includes(res.status) ? null : await res.text();
232
- const data = body ? JSON.parse(body) : {};
233
- return data;
234
- };
235
- const getListMapsUrl = (workspaceId, params) => {
236
- const normalizedParams = new URLSearchParams();
237
- Object.entries(params || {}).forEach(([key, value]) => {
238
- if (value !== undefined) {
239
- normalizedParams.append(key, value === null ? "null" : String(value));
240
- }
241
- });
242
- const stringifiedParams = normalizedParams.toString();
243
- return stringifiedParams.length > 0
244
- ? `/v1/workspaces/${encodeURIComponent(String(workspaceId))}/maps?${stringifiedParams}`
245
- : `/v1/workspaces/${encodeURIComponent(String(workspaceId))}/maps`;
246
- };
247
- const listMaps = async (workspaceId, params, options, fetchFn) => {
248
- const res = await (fetchFn ?? fetch)(getListMapsUrl(workspaceId, params), {
249
- ...options,
250
- method: "GET",
251
- });
252
- const body = [204, 205, 304].includes(res.status) ? null : await res.text();
253
- const data = body ? JSON.parse(body) : {};
254
- return data;
255
- };
256
- const getCreateMapUrl = (workspaceId) => {
257
- return `/v1/workspaces/${encodeURIComponent(String(workspaceId))}/maps`;
258
- };
259
- const createMap = async (workspaceId, createMapDto, options, fetchFn) => {
260
- const getHeaders = (h) => {
261
- if (!h)
262
- return {};
263
- if (h instanceof Headers)
264
- return Object.fromEntries(h.entries());
265
- if (Symbol.iterator in h) {
266
- return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
267
- }
268
- const headers = {};
269
- for (const [name, value] of Object.entries(h)) {
270
- if (value !== undefined)
271
- headers[name] = value;
272
- }
273
- return headers;
274
- };
275
- const res = await (fetchFn ?? fetch)(getCreateMapUrl(workspaceId), {
276
- ...options,
277
- method: "POST",
278
- headers: {
279
- "Content-Type": "application/json",
280
- ...getHeaders(options?.headers),
281
- },
282
- body: JSON.stringify(createMapDto),
283
- });
284
- const body = [204, 205, 304].includes(res.status) ? null : await res.text();
285
- const data = body ? JSON.parse(body) : {};
286
- return data;
287
- };
288
- const getGetMutationStatusUrl = (workspaceId, operationId) => {
289
- return `/v1/workspaces/${encodeURIComponent(String(workspaceId))}/maps/operations/${encodeURIComponent(String(operationId))}`;
290
- };
291
- const getMutationStatus = async (workspaceId, operationId, options, fetchFn) => {
292
- const res = await (fetchFn ?? fetch)(getGetMutationStatusUrl(workspaceId, operationId), {
293
- ...options,
294
- method: "GET",
295
- });
296
- const body = [204, 205, 304].includes(res.status) ? null : await res.text();
297
- const data = body ? JSON.parse(body) : {};
298
- return data;
299
- };
300
- const getGetMapUrl = (workspaceId, mapId) => {
301
- return `/v1/workspaces/${encodeURIComponent(String(workspaceId))}/maps/${encodeURIComponent(String(mapId))}`;
302
- };
303
- const getMap = async (workspaceId, mapId, options, fetchFn) => {
304
- const res = await (fetchFn ?? fetch)(getGetMapUrl(workspaceId, mapId), {
305
- ...options,
306
- method: "GET",
307
- });
308
- const body = [204, 205, 304].includes(res.status) ? null : await res.text();
309
- const data = body ? JSON.parse(body) : {};
310
- return data;
311
- };
312
- const getSaveMapUrl = (workspaceId, mapId) => {
313
- return `/v1/workspaces/${encodeURIComponent(String(workspaceId))}/maps/${encodeURIComponent(String(mapId))}/draft`;
314
- };
315
- const saveMap = async (workspaceId, mapId, saveMapDto, options, fetchFn) => {
316
- const getHeaders = (h) => {
317
- if (!h)
318
- return {};
319
- if (h instanceof Headers)
320
- return Object.fromEntries(h.entries());
321
- if (Symbol.iterator in h) {
322
- return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
323
- }
324
- const headers = {};
325
- for (const [name, value] of Object.entries(h)) {
326
- if (value !== undefined)
327
- headers[name] = value;
328
- }
329
- return headers;
330
- };
331
- const res = await (fetchFn ?? fetch)(getSaveMapUrl(workspaceId, mapId), {
332
- ...options,
333
- method: "PUT",
334
- headers: {
335
- "Content-Type": "application/json",
336
- ...getHeaders(options?.headers),
337
- },
338
- body: JSON.stringify(saveMapDto),
339
- });
340
- const body = [204, 205, 304].includes(res.status) ? null : await res.text();
341
- const data = body ? JSON.parse(body) : {};
342
- return data;
343
- };
344
- const getChangeMapUrl = (workspaceId, mapId) => {
345
- return `/v1/workspaces/${encodeURIComponent(String(workspaceId))}/maps/${encodeURIComponent(String(mapId))}/actions`;
346
- };
347
- const changeMap = async (workspaceId, mapId, mapActionDto, options, fetchFn) => {
348
- const getHeaders = (h) => {
349
- if (!h)
350
- return {};
351
- if (h instanceof Headers)
352
- return Object.fromEntries(h.entries());
353
- if (Symbol.iterator in h) {
354
- return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
355
- }
356
- const headers = {};
357
- for (const [name, value] of Object.entries(h)) {
358
- if (value !== undefined)
359
- headers[name] = value;
360
- }
361
- return headers;
362
- };
363
- const res = await (fetchFn ?? fetch)(getChangeMapUrl(workspaceId, mapId), {
364
- ...options,
365
- method: "POST",
366
- headers: {
367
- "Content-Type": "application/json",
368
- ...getHeaders(options?.headers),
369
- },
370
- body: JSON.stringify(mapActionDto),
371
- });
372
- const body = [204, 205, 304].includes(res.status) ? null : await res.text();
373
- const data = body ? JSON.parse(body) : {};
374
- return data;
375
- };
376
- const getListMapRevisionsUrl = (workspaceId, mapId) => {
377
- return `/v1/workspaces/${encodeURIComponent(String(workspaceId))}/maps/${encodeURIComponent(String(mapId))}/revisions`;
378
- };
379
- const listMapRevisions = async (workspaceId, mapId, options, fetchFn) => {
380
- const res = await (fetchFn ?? fetch)(getListMapRevisionsUrl(workspaceId, mapId), {
381
- ...options,
382
- method: "GET",
383
- });
384
- const body = [204, 205, 304].includes(res.status) ? null : await res.text();
385
- const data = body ? JSON.parse(body) : {};
386
- return data;
387
- };
388
- const getGetMapRevisionUrl = (workspaceId, mapId, revision) => {
389
- return `/v1/workspaces/${encodeURIComponent(String(workspaceId))}/maps/${encodeURIComponent(String(mapId))}/revisions/${encodeURIComponent(String(revision))}`;
390
- };
391
- const getMapRevision = async (workspaceId, mapId, revision, options, fetchFn) => {
392
- const res = await (fetchFn ?? fetch)(getGetMapRevisionUrl(workspaceId, mapId, revision), {
393
- ...options,
394
- method: "GET",
395
- });
396
- const body = [204, 205, 304].includes(res.status) ? null : await res.text();
397
- const data = body ? JSON.parse(body) : {};
398
- return data;
316
+ export class ArtworkClient {
317
+ configuration;
318
+ basePath;
319
+ operations;
320
+ constructor(configuration, basePath, axiosInstance = axios) {
321
+ this.configuration = configuration;
322
+ this.basePath = basePath;
323
+ this.operations = getSeatmapApi(axiosInstance);
324
+ }
325
+ async getArtworkLimits(workspaceId, options) {
326
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
327
+ return this.operations.getArtworkLimits(workspaceId, requestOptions);
328
+ }
329
+ async prepareArtworkUpload(workspaceId, prepareArtworkUploadDto, options) {
330
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "POST", prepareArtworkUploadDto);
331
+ return this.operations.prepareArtworkUpload(workspaceId, requestOptions.data instanceof ArrayBuffer ? requestOptions.data : prepareArtworkUploadDto, requestOptions);
332
+ }
333
+ async getArtworkUpload(workspaceId, uploadId, options) {
334
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
335
+ return this.operations.getArtworkUpload(workspaceId, uploadId, requestOptions);
336
+ }
337
+ async uploadArtworkContent(workspaceId, uploadId, uploadArtworkContentBody, options) {
338
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "PUT", uploadArtworkContentBody);
339
+ return this.operations.uploadArtworkContent(workspaceId, uploadId, requestOptions.data instanceof ArrayBuffer ? requestOptions.data : uploadArtworkContentBody, requestOptions);
340
+ }
341
+ async completeArtworkUpload(workspaceId, uploadId, options) {
342
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "POST");
343
+ return this.operations.completeArtworkUpload(workspaceId, uploadId, requestOptions);
344
+ }
345
+ async cancelArtworkUpload(workspaceId, uploadId, options) {
346
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "POST");
347
+ return this.operations.cancelArtworkUpload(workspaceId, uploadId, requestOptions);
348
+ }
349
+ async retryArtworkUpload(workspaceId, uploadId, retryArtworkUploadDto, options) {
350
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "POST", retryArtworkUploadDto);
351
+ return this.operations.retryArtworkUpload(workspaceId, uploadId, requestOptions.data instanceof ArrayBuffer ? requestOptions.data : retryArtworkUploadDto, requestOptions);
352
+ }
353
+ async getArtworkResources(workspaceId, artworkBatchDto, options) {
354
+ const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "POST", artworkBatchDto);
355
+ return this.operations.getArtworkResources(workspaceId, requestOptions.data instanceof ArrayBuffer ? requestOptions.data : artworkBatchDto, requestOptions);
356
+ }
357
+ }
358
+ const getSeatmapApi = (axiosInstance = axios) => {
359
+ const getLiveness = (options) => {
360
+ return axiosInstance.get(`/health`, options);
361
+ };
362
+ const getGetLivenessUrl = () => {
363
+ return axiosInstance
364
+ .create({
365
+ baseURL: "",
366
+ params: null,
367
+ })
368
+ .getUri({
369
+ url: `/health`,
370
+ baseURL: "",
371
+ });
372
+ };
373
+ const getIntegrationContext = (options) => {
374
+ return axiosInstance.get(`/auth/integration`, options);
375
+ };
376
+ const getGetIntegrationContextUrl = () => {
377
+ return axiosInstance
378
+ .create({
379
+ baseURL: "",
380
+ params: null,
381
+ })
382
+ .getUri({
383
+ url: `/auth/integration`,
384
+ baseURL: "",
385
+ });
386
+ };
387
+ const startLogin = (params, options) => {
388
+ return axiosInstance.get(`/auth/login`, {
389
+ ...options,
390
+ params: { ...params, ...options?.params },
391
+ });
392
+ };
393
+ const getStartLoginUrl = (params) => {
394
+ return axiosInstance
395
+ .create({
396
+ baseURL: "",
397
+ params: null,
398
+ })
399
+ .getUri({
400
+ url: `/auth/login`,
401
+ baseURL: "",
402
+ params,
403
+ });
404
+ };
405
+ const completeLogin = (options) => {
406
+ return axiosInstance.get(`/auth/callback`, options);
407
+ };
408
+ const getCompleteLoginUrl = () => {
409
+ return axiosInstance
410
+ .create({
411
+ baseURL: "",
412
+ params: null,
413
+ })
414
+ .getUri({
415
+ url: `/auth/callback`,
416
+ baseURL: "",
417
+ });
418
+ };
419
+ const logoutProvider = (options) => {
420
+ return axiosInstance.get(`/auth/logout/provider`, options);
421
+ };
422
+ const getLogoutProviderUrl = () => {
423
+ return axiosInstance
424
+ .create({
425
+ baseURL: "",
426
+ params: null,
427
+ })
428
+ .getUri({
429
+ url: `/auth/logout/provider`,
430
+ baseURL: "",
431
+ });
432
+ };
433
+ const getAuthoringSession = (options) => {
434
+ return axiosInstance.get(`/auth/authoring/session`, options);
435
+ };
436
+ const getGetAuthoringSessionUrl = () => {
437
+ return axiosInstance
438
+ .create({
439
+ baseURL: "",
440
+ params: null,
441
+ })
442
+ .getUri({
443
+ url: `/auth/authoring/session`,
444
+ baseURL: "",
445
+ });
446
+ };
447
+ const revokeAuthoringSession = (options) => {
448
+ return axiosInstance.delete(`/auth/authoring/session`, options);
449
+ };
450
+ const getRevokeAuthoringSessionUrl = () => {
451
+ return axiosInstance
452
+ .create({
453
+ baseURL: "",
454
+ params: null,
455
+ })
456
+ .getUri({
457
+ url: `/auth/authoring/session`,
458
+ baseURL: "",
459
+ });
460
+ };
461
+ const getEmbedContext = (mapId, options) => {
462
+ return axiosInstance.get(`/auth/embed/${encodeURIComponent(mapId)}`, options);
463
+ };
464
+ const getGetEmbedContextUrl = (mapId) => {
465
+ return axiosInstance
466
+ .create({
467
+ baseURL: "",
468
+ params: null,
469
+ })
470
+ .getUri({
471
+ url: `/auth/embed/${encodeURIComponent(mapId)}`,
472
+ baseURL: "",
473
+ });
474
+ };
475
+ const listMaps = (workspaceId, params, options) => {
476
+ return axiosInstance.get(`/workspaces/${encodeURIComponent(workspaceId)}/maps`, {
477
+ ...options,
478
+ params: { ...params, ...options?.params },
479
+ });
480
+ };
481
+ const getListMapsUrl = (workspaceId, params) => {
482
+ return axiosInstance
483
+ .create({
484
+ baseURL: "",
485
+ params: null,
486
+ })
487
+ .getUri({
488
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps`,
489
+ baseURL: "",
490
+ params,
491
+ });
492
+ };
493
+ const createMap = (workspaceId, createMapDto, options) => {
494
+ return axiosInstance.post(`/workspaces/${encodeURIComponent(workspaceId)}/maps`, createMapDto, options);
495
+ };
496
+ const getCreateMapUrl = (workspaceId) => {
497
+ return axiosInstance
498
+ .create({
499
+ baseURL: "",
500
+ params: null,
501
+ })
502
+ .getUri({
503
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps`,
504
+ baseURL: "",
505
+ });
506
+ };
507
+ const readReferencePlanBlock = (workspaceId, mapId, readPlanBlockDto, options) => {
508
+ return axiosInstance.post(`/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/reference-plan/read-block`, readPlanBlockDto, options);
509
+ };
510
+ const getReadReferencePlanBlockUrl = (workspaceId, mapId) => {
511
+ return axiosInstance
512
+ .create({
513
+ baseURL: "",
514
+ params: null,
515
+ })
516
+ .getUri({
517
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/reference-plan/read-block`,
518
+ baseURL: "",
519
+ });
520
+ };
521
+ const readReferencePlanCurve = (workspaceId, mapId, readPlanCurveDto, options) => {
522
+ return axiosInstance.post(`/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/reference-plan/read-curved-row`, readPlanCurveDto, options);
523
+ };
524
+ const getReadReferencePlanCurveUrl = (workspaceId, mapId) => {
525
+ return axiosInstance
526
+ .create({
527
+ baseURL: "",
528
+ params: null,
529
+ })
530
+ .getUri({
531
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/reference-plan/read-curved-row`,
532
+ baseURL: "",
533
+ });
534
+ };
535
+ const findReferencePlanSections = (workspaceId, mapId, reviewPlanDto, options) => {
536
+ return axiosInstance.post(`/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/reference-plan/find-sections`, reviewPlanDto, options);
537
+ };
538
+ const getFindReferencePlanSectionsUrl = (workspaceId, mapId) => {
539
+ return axiosInstance
540
+ .create({
541
+ baseURL: "",
542
+ params: null,
543
+ })
544
+ .getUri({
545
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/reference-plan/find-sections`,
546
+ baseURL: "",
547
+ });
548
+ };
549
+ const readWholeReferencePlan = (workspaceId, mapId, reviewPlanDto, options) => {
550
+ return axiosInstance.post(`/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/reference-plan/read-all`, reviewPlanDto, options);
551
+ };
552
+ const getReadWholeReferencePlanUrl = (workspaceId, mapId) => {
553
+ return axiosInstance
554
+ .create({
555
+ baseURL: "",
556
+ params: null,
557
+ })
558
+ .getUri({
559
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/reference-plan/read-all`,
560
+ baseURL: "",
561
+ });
562
+ };
563
+ const reviewReferencePlan = (workspaceId, mapId, reviewPlanDto, options) => {
564
+ return axiosInstance.post(`/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/reference-plan/review`, reviewPlanDto, options);
565
+ };
566
+ const getReviewReferencePlanUrl = (workspaceId, mapId) => {
567
+ return axiosInstance
568
+ .create({
569
+ baseURL: "",
570
+ params: null,
571
+ })
572
+ .getUri({
573
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/reference-plan/review`,
574
+ baseURL: "",
575
+ });
576
+ };
577
+ const getMapPreview = (workspaceId, mapId, params, options) => {
578
+ return axiosInstance.get(`/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/preview`, {
579
+ responseType: "blob",
580
+ ...options,
581
+ params: { ...params, ...options?.params },
582
+ });
583
+ };
584
+ const getGetMapPreviewUrl = (workspaceId, mapId, params) => {
585
+ return axiosInstance
586
+ .create({
587
+ baseURL: "",
588
+ params: null,
589
+ })
590
+ .getUri({
591
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/preview`,
592
+ baseURL: "",
593
+ params,
594
+ });
595
+ };
596
+ const getMutationStatus = (workspaceId, operationId, options) => {
597
+ return axiosInstance.get(`/workspaces/${encodeURIComponent(workspaceId)}/maps/operations/${encodeURIComponent(operationId)}`, options);
598
+ };
599
+ const getGetMutationStatusUrl = (workspaceId, operationId) => {
600
+ return axiosInstance
601
+ .create({
602
+ baseURL: "",
603
+ params: null,
604
+ })
605
+ .getUri({
606
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps/operations/${encodeURIComponent(operationId)}`,
607
+ baseURL: "",
608
+ });
609
+ };
610
+ /**
611
+ * @summary Resolve a permanent map code within an authorized workspace
612
+ */
613
+ const resolveMapLink = (workspaceId, editorCode, options) => {
614
+ return axiosInstance.get(`/workspaces/${encodeURIComponent(workspaceId)}/maps/links/${encodeURIComponent(editorCode)}`, options);
615
+ };
616
+ const getResolveMapLinkUrl = (workspaceId, editorCode) => {
617
+ return axiosInstance
618
+ .create({
619
+ baseURL: "",
620
+ params: null,
621
+ })
622
+ .getUri({
623
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps/links/${encodeURIComponent(editorCode)}`,
624
+ baseURL: "",
625
+ });
626
+ };
627
+ /**
628
+ * @summary Get a map's permanent editor link
629
+ */
630
+ const getMapLink = (workspaceId, mapId, options) => {
631
+ return axiosInstance.get(`/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/link`, options);
632
+ };
633
+ const getGetMapLinkUrl = (workspaceId, mapId) => {
634
+ return axiosInstance
635
+ .create({
636
+ baseURL: "",
637
+ params: null,
638
+ })
639
+ .getUri({
640
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/link`,
641
+ baseURL: "",
642
+ });
643
+ };
644
+ const getMap = (workspaceId, mapId, options) => {
645
+ return axiosInstance.get(`/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}`, options);
646
+ };
647
+ const getGetMapUrl = (workspaceId, mapId) => {
648
+ return axiosInstance
649
+ .create({
650
+ baseURL: "",
651
+ params: null,
652
+ })
653
+ .getUri({
654
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}`,
655
+ baseURL: "",
656
+ });
657
+ };
658
+ const saveMap = (workspaceId, mapId, saveMapDto, options) => {
659
+ return axiosInstance.put(`/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/draft`, saveMapDto, options);
660
+ };
661
+ const getSaveMapUrl = (workspaceId, mapId) => {
662
+ return axiosInstance
663
+ .create({
664
+ baseURL: "",
665
+ params: null,
666
+ })
667
+ .getUri({
668
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/draft`,
669
+ baseURL: "",
670
+ });
671
+ };
672
+ const changeMap = (workspaceId, mapId, mapActionDto, options) => {
673
+ return axiosInstance.post(`/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/actions`, mapActionDto, options);
674
+ };
675
+ const getChangeMapUrl = (workspaceId, mapId) => {
676
+ return axiosInstance
677
+ .create({
678
+ baseURL: "",
679
+ params: null,
680
+ })
681
+ .getUri({
682
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/actions`,
683
+ baseURL: "",
684
+ });
685
+ };
686
+ const listMapRevisions = (workspaceId, mapId, options) => {
687
+ return axiosInstance.get(`/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/revisions`, options);
688
+ };
689
+ const getListMapRevisionsUrl = (workspaceId, mapId) => {
690
+ return axiosInstance
691
+ .create({
692
+ baseURL: "",
693
+ params: null,
694
+ })
695
+ .getUri({
696
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/revisions`,
697
+ baseURL: "",
698
+ });
699
+ };
700
+ const prepareMapReleaseReview = (workspaceId, mapId, prepareMapReleaseReviewDto, options) => {
701
+ return axiosInstance.post(`/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/release-review`, prepareMapReleaseReviewDto, options);
702
+ };
703
+ const getPrepareMapReleaseReviewUrl = (workspaceId, mapId) => {
704
+ return axiosInstance
705
+ .create({
706
+ baseURL: "",
707
+ params: null,
708
+ })
709
+ .getUri({
710
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/release-review`,
711
+ baseURL: "",
712
+ });
713
+ };
714
+ const decideMapRelease = (workspaceId, mapId, reviewId, decideMapReleaseDto, options) => {
715
+ return axiosInstance.post(`/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/release-review/${encodeURIComponent(reviewId)}/decision`, decideMapReleaseDto, options);
716
+ };
717
+ const getDecideMapReleaseUrl = (workspaceId, mapId, reviewId) => {
718
+ return axiosInstance
719
+ .create({
720
+ baseURL: "",
721
+ params: null,
722
+ })
723
+ .getUri({
724
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/release-review/${encodeURIComponent(reviewId)}/decision`,
725
+ baseURL: "",
726
+ });
727
+ };
728
+ const getMapReleaseCapture = (workspaceId, mapId, reviewId, floor, kind, options) => {
729
+ return axiosInstance.get(`/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/release-review/${encodeURIComponent(reviewId)}/captures/${encodeURIComponent(floor)}/${encodeURIComponent(kind)}`, {
730
+ responseType: "blob",
731
+ ...options,
732
+ });
733
+ };
734
+ const getGetMapReleaseCaptureUrl = (workspaceId, mapId, reviewId, floor, kind) => {
735
+ return axiosInstance
736
+ .create({
737
+ baseURL: "",
738
+ params: null,
739
+ })
740
+ .getUri({
741
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/release-review/${encodeURIComponent(reviewId)}/captures/${encodeURIComponent(floor)}/${encodeURIComponent(kind)}`,
742
+ baseURL: "",
743
+ });
744
+ };
745
+ const listMapPublications = (workspaceId, mapId, options) => {
746
+ return axiosInstance.get(`/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/publications`, options);
747
+ };
748
+ const getListMapPublicationsUrl = (workspaceId, mapId) => {
749
+ return axiosInstance
750
+ .create({
751
+ baseURL: "",
752
+ params: null,
753
+ })
754
+ .getUri({
755
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/publications`,
756
+ baseURL: "",
757
+ });
758
+ };
759
+ const pinMapEventPublication = (workspaceId, mapId, revision, pinEventPublicationDto, options) => {
760
+ return axiosInstance.post(`/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/publications/${encodeURIComponent(revision)}/event-handoff`, pinEventPublicationDto, options);
761
+ };
762
+ const getPinMapEventPublicationUrl = (workspaceId, mapId, revision) => {
763
+ return axiosInstance
764
+ .create({
765
+ baseURL: "",
766
+ params: null,
767
+ })
768
+ .getUri({
769
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/publications/${encodeURIComponent(revision)}/event-handoff`,
770
+ baseURL: "",
771
+ });
772
+ };
773
+ const getMapEventHandoff = (workspaceId, mapId, revision, options) => {
774
+ return axiosInstance.get(`/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/publications/${encodeURIComponent(revision)}/event-handoff`, options);
775
+ };
776
+ const getGetMapEventHandoffUrl = (workspaceId, mapId, revision) => {
777
+ return axiosInstance
778
+ .create({
779
+ baseURL: "",
780
+ params: null,
781
+ })
782
+ .getUri({
783
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/publications/${encodeURIComponent(revision)}/event-handoff`,
784
+ baseURL: "",
785
+ });
786
+ };
787
+ const getPinnedEventPublication = (workspaceId, eventId, options) => {
788
+ return axiosInstance.get(`/workspaces/${encodeURIComponent(workspaceId)}/maps/events/${encodeURIComponent(eventId)}/publication`, options);
789
+ };
790
+ const getGetPinnedEventPublicationUrl = (workspaceId, eventId) => {
791
+ return axiosInstance
792
+ .create({
793
+ baseURL: "",
794
+ params: null,
795
+ })
796
+ .getUri({
797
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps/events/${encodeURIComponent(eventId)}/publication`,
798
+ baseURL: "",
799
+ });
800
+ };
801
+ const getMapPublication = (workspaceId, mapId, revision, options) => {
802
+ return axiosInstance.get(`/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/publications/${encodeURIComponent(revision)}`, options);
803
+ };
804
+ const getGetMapPublicationUrl = (workspaceId, mapId, revision) => {
805
+ return axiosInstance
806
+ .create({
807
+ baseURL: "",
808
+ params: null,
809
+ })
810
+ .getUri({
811
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/publications/${encodeURIComponent(revision)}`,
812
+ baseURL: "",
813
+ });
814
+ };
815
+ const getMapPublicationContent = (workspaceId, mapId, revision, options) => {
816
+ return axiosInstance.get(`/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/publications/${encodeURIComponent(revision)}/content`, options);
817
+ };
818
+ const getGetMapPublicationContentUrl = (workspaceId, mapId, revision) => {
819
+ return axiosInstance
820
+ .create({
821
+ baseURL: "",
822
+ params: null,
823
+ })
824
+ .getUri({
825
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/publications/${encodeURIComponent(revision)}/content`,
826
+ baseURL: "",
827
+ });
828
+ };
829
+ const getMapRevision = (workspaceId, mapId, revision, options) => {
830
+ return axiosInstance.get(`/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/revisions/${encodeURIComponent(revision)}`, options);
831
+ };
832
+ const getGetMapRevisionUrl = (workspaceId, mapId, revision) => {
833
+ return axiosInstance
834
+ .create({
835
+ baseURL: "",
836
+ params: null,
837
+ })
838
+ .getUri({
839
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/revisions/${encodeURIComponent(revision)}`,
840
+ baseURL: "",
841
+ });
842
+ };
843
+ const getArtworkLimits = (workspaceId, options) => {
844
+ return axiosInstance.get(`/workspaces/${encodeURIComponent(workspaceId)}/artwork/limits`, options);
845
+ };
846
+ const getGetArtworkLimitsUrl = (workspaceId) => {
847
+ return axiosInstance
848
+ .create({
849
+ baseURL: "",
850
+ params: null,
851
+ })
852
+ .getUri({
853
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/artwork/limits`,
854
+ baseURL: "",
855
+ });
856
+ };
857
+ const prepareArtworkUpload = (workspaceId, prepareArtworkUploadDto, options) => {
858
+ return axiosInstance.post(`/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads`, prepareArtworkUploadDto, options);
859
+ };
860
+ const getPrepareArtworkUploadUrl = (workspaceId) => {
861
+ return axiosInstance
862
+ .create({
863
+ baseURL: "",
864
+ params: null,
865
+ })
866
+ .getUri({
867
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads`,
868
+ baseURL: "",
869
+ });
870
+ };
871
+ const getArtworkUpload = (workspaceId, uploadId, options) => {
872
+ return axiosInstance.get(`/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads/${encodeURIComponent(uploadId)}`, options);
873
+ };
874
+ const getGetArtworkUploadUrl = (workspaceId, uploadId) => {
875
+ return axiosInstance
876
+ .create({
877
+ baseURL: "",
878
+ params: null,
879
+ })
880
+ .getUri({
881
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads/${encodeURIComponent(uploadId)}`,
882
+ baseURL: "",
883
+ });
884
+ };
885
+ const uploadArtworkContent = (workspaceId, uploadId, uploadArtworkContentBody, options) => {
886
+ return axiosInstance.put(`/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads/${encodeURIComponent(uploadId)}/content`, uploadArtworkContentBody, options);
887
+ };
888
+ const getUploadArtworkContentUrl = (workspaceId, uploadId) => {
889
+ return axiosInstance
890
+ .create({
891
+ baseURL: "",
892
+ params: null,
893
+ })
894
+ .getUri({
895
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads/${encodeURIComponent(uploadId)}/content`,
896
+ baseURL: "",
897
+ });
898
+ };
899
+ const completeArtworkUpload = (workspaceId, uploadId, options) => {
900
+ return axiosInstance.post(`/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads/${encodeURIComponent(uploadId)}/complete`, undefined, options);
901
+ };
902
+ const getCompleteArtworkUploadUrl = (workspaceId, uploadId) => {
903
+ return axiosInstance
904
+ .create({
905
+ baseURL: "",
906
+ params: null,
907
+ })
908
+ .getUri({
909
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads/${encodeURIComponent(uploadId)}/complete`,
910
+ baseURL: "",
911
+ });
912
+ };
913
+ const cancelArtworkUpload = (workspaceId, uploadId, options) => {
914
+ return axiosInstance.post(`/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads/${encodeURIComponent(uploadId)}/cancel`, undefined, options);
915
+ };
916
+ const getCancelArtworkUploadUrl = (workspaceId, uploadId) => {
917
+ return axiosInstance
918
+ .create({
919
+ baseURL: "",
920
+ params: null,
921
+ })
922
+ .getUri({
923
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads/${encodeURIComponent(uploadId)}/cancel`,
924
+ baseURL: "",
925
+ });
926
+ };
927
+ const retryArtworkUpload = (workspaceId, uploadId, retryArtworkUploadDto, options) => {
928
+ return axiosInstance.post(`/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads/${encodeURIComponent(uploadId)}/retry`, retryArtworkUploadDto, options);
929
+ };
930
+ const getRetryArtworkUploadUrl = (workspaceId, uploadId) => {
931
+ return axiosInstance
932
+ .create({
933
+ baseURL: "",
934
+ params: null,
935
+ })
936
+ .getUri({
937
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads/${encodeURIComponent(uploadId)}/retry`,
938
+ baseURL: "",
939
+ });
940
+ };
941
+ const getArtworkResources = (workspaceId, artworkBatchDto, options) => {
942
+ return axiosInstance.post(`/workspaces/${encodeURIComponent(workspaceId)}/artwork/resources`, artworkBatchDto, options);
943
+ };
944
+ const getGetArtworkResourcesUrl = (workspaceId) => {
945
+ return axiosInstance
946
+ .create({
947
+ baseURL: "",
948
+ params: null,
949
+ })
950
+ .getUri({
951
+ url: `/workspaces/${encodeURIComponent(workspaceId)}/artwork/resources`,
952
+ baseURL: "",
953
+ });
954
+ };
955
+ return {
956
+ getLiveness,
957
+ getIntegrationContext,
958
+ startLogin,
959
+ completeLogin,
960
+ logoutProvider,
961
+ getAuthoringSession,
962
+ revokeAuthoringSession,
963
+ getEmbedContext,
964
+ listMaps,
965
+ createMap,
966
+ readReferencePlanBlock,
967
+ readReferencePlanCurve,
968
+ findReferencePlanSections,
969
+ readWholeReferencePlan,
970
+ reviewReferencePlan,
971
+ getMapPreview,
972
+ getMutationStatus,
973
+ resolveMapLink,
974
+ getMapLink,
975
+ getMap,
976
+ saveMap,
977
+ changeMap,
978
+ listMapRevisions,
979
+ prepareMapReleaseReview,
980
+ decideMapRelease,
981
+ getMapReleaseCapture,
982
+ listMapPublications,
983
+ pinMapEventPublication,
984
+ getMapEventHandoff,
985
+ getPinnedEventPublication,
986
+ getMapPublication,
987
+ getMapPublicationContent,
988
+ getMapRevision,
989
+ getArtworkLimits,
990
+ prepareArtworkUpload,
991
+ getArtworkUpload,
992
+ uploadArtworkContent,
993
+ completeArtworkUpload,
994
+ cancelArtworkUpload,
995
+ retryArtworkUpload,
996
+ getArtworkResources,
997
+ getGetLivenessUrl,
998
+ getGetIntegrationContextUrl,
999
+ getStartLoginUrl,
1000
+ getCompleteLoginUrl,
1001
+ getLogoutProviderUrl,
1002
+ getGetAuthoringSessionUrl,
1003
+ getRevokeAuthoringSessionUrl,
1004
+ getGetEmbedContextUrl,
1005
+ getListMapsUrl,
1006
+ getCreateMapUrl,
1007
+ getReadReferencePlanBlockUrl,
1008
+ getReadReferencePlanCurveUrl,
1009
+ getFindReferencePlanSectionsUrl,
1010
+ getReadWholeReferencePlanUrl,
1011
+ getReviewReferencePlanUrl,
1012
+ getGetMapPreviewUrl,
1013
+ getGetMutationStatusUrl,
1014
+ getResolveMapLinkUrl,
1015
+ getGetMapLinkUrl,
1016
+ getGetMapUrl,
1017
+ getSaveMapUrl,
1018
+ getChangeMapUrl,
1019
+ getListMapRevisionsUrl,
1020
+ getPrepareMapReleaseReviewUrl,
1021
+ getDecideMapReleaseUrl,
1022
+ getGetMapReleaseCaptureUrl,
1023
+ getListMapPublicationsUrl,
1024
+ getPinMapEventPublicationUrl,
1025
+ getGetMapEventHandoffUrl,
1026
+ getGetPinnedEventPublicationUrl,
1027
+ getGetMapPublicationUrl,
1028
+ getGetMapPublicationContentUrl,
1029
+ getGetMapRevisionUrl,
1030
+ getGetArtworkLimitsUrl,
1031
+ getPrepareArtworkUploadUrl,
1032
+ getGetArtworkUploadUrl,
1033
+ getUploadArtworkContentUrl,
1034
+ getCompleteArtworkUploadUrl,
1035
+ getCancelArtworkUploadUrl,
1036
+ getRetryArtworkUploadUrl,
1037
+ getGetArtworkResourcesUrl,
1038
+ };
399
1039
  };