@seatmap-fyi/api-client 0.1.0-alpha.7 → 0.1.0-alpha.9
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.d.ts +129 -1
- package/dist/generated.js +258 -0
- package/dist/transport.js +8 -0
- package/package.json +1 -1
package/dist/generated.d.ts
CHANGED
|
@@ -68,6 +68,7 @@ export interface AccountContextDto {
|
|
|
68
68
|
export interface AuthoringSessionContextDto {
|
|
69
69
|
userId: string;
|
|
70
70
|
workspaceId: string;
|
|
71
|
+
workspaceName: string;
|
|
71
72
|
readContract: string;
|
|
72
73
|
writeContract: string;
|
|
73
74
|
session: AccountContextDto;
|
|
@@ -86,6 +87,16 @@ export interface EmbedContextDto {
|
|
|
86
87
|
capabilities: EmbedContextDtoCapabilitiesItem[];
|
|
87
88
|
expiresAt: string;
|
|
88
89
|
}
|
|
90
|
+
export declare enum MapPreviewState {
|
|
91
|
+
pending = "pending",
|
|
92
|
+
ready = "ready",
|
|
93
|
+
empty = "empty",
|
|
94
|
+
unavailable = "unavailable"
|
|
95
|
+
}
|
|
96
|
+
export interface MapPreviewDto {
|
|
97
|
+
state: MapPreviewState;
|
|
98
|
+
revision: number;
|
|
99
|
+
}
|
|
89
100
|
export declare enum MapLifecycle {
|
|
90
101
|
active = "active",
|
|
91
102
|
archived = "archived",
|
|
@@ -93,6 +104,7 @@ export declare enum MapLifecycle {
|
|
|
93
104
|
deleted = "deleted"
|
|
94
105
|
}
|
|
95
106
|
export interface MapSummaryDto {
|
|
107
|
+
preview: MapPreviewDto;
|
|
96
108
|
/**
|
|
97
109
|
* Permanent editor identifier: ten lowercase letters in three hyphen-separated groups, such as abc-defg-hjk. This code does not grant access.
|
|
98
110
|
*/
|
|
@@ -2272,6 +2284,93 @@ export interface MapContentDto {
|
|
|
2272
2284
|
physical: PhysicalDocumentV1Dto;
|
|
2273
2285
|
referencePresentation?: ReferencePresentationDto;
|
|
2274
2286
|
}
|
|
2287
|
+
export interface ArtworkLimitsDto {
|
|
2288
|
+
fileBytes: number;
|
|
2289
|
+
rasterPixels: number;
|
|
2290
|
+
mapBytes: number;
|
|
2291
|
+
references: number;
|
|
2292
|
+
concurrentUploads: number;
|
|
2293
|
+
uploadsPerHour: number;
|
|
2294
|
+
configured: boolean;
|
|
2295
|
+
}
|
|
2296
|
+
export declare enum PrepareArtworkUploadDtoMimeType {
|
|
2297
|
+
"image/png" = "image/png",
|
|
2298
|
+
"image/jpeg" = "image/jpeg",
|
|
2299
|
+
"image/webp" = "image/webp",
|
|
2300
|
+
"image/svg+xml" = "image/svg+xml"
|
|
2301
|
+
}
|
|
2302
|
+
export interface PrepareArtworkUploadDto {
|
|
2303
|
+
uploadId: string;
|
|
2304
|
+
assetId: string;
|
|
2305
|
+
mapId: string;
|
|
2306
|
+
mimeType: PrepareArtworkUploadDtoMimeType;
|
|
2307
|
+
/**
|
|
2308
|
+
* @minimum 1
|
|
2309
|
+
* @maximum 10485760
|
|
2310
|
+
*/
|
|
2311
|
+
byteLength: number;
|
|
2312
|
+
sha256: string;
|
|
2313
|
+
}
|
|
2314
|
+
export declare enum ArtworkUploadState {
|
|
2315
|
+
prepared = "prepared",
|
|
2316
|
+
receiving = "receiving",
|
|
2317
|
+
uploaded = "uploaded",
|
|
2318
|
+
validating = "validating",
|
|
2319
|
+
ready = "ready",
|
|
2320
|
+
"review-required" = "review-required",
|
|
2321
|
+
failed = "failed",
|
|
2322
|
+
cancelled = "cancelled"
|
|
2323
|
+
}
|
|
2324
|
+
export declare enum ArtworkFailureCode {
|
|
2325
|
+
ARTWORK_DIGEST = "ARTWORK_DIGEST",
|
|
2326
|
+
ARTWORK_SVG_ACTIVE = "ARTWORK_SVG_ACTIVE",
|
|
2327
|
+
ARTWORK_SVG_INVALID = "ARTWORK_SVG_INVALID",
|
|
2328
|
+
ARTWORK_SVG_COMPLEX = "ARTWORK_SVG_COMPLEX",
|
|
2329
|
+
ARTWORK_FILE_LIMIT = "ARTWORK_FILE_LIMIT",
|
|
2330
|
+
ARTWORK_TYPE = "ARTWORK_TYPE",
|
|
2331
|
+
ARTWORK_PIXEL_LIMIT = "ARTWORK_PIXEL_LIMIT",
|
|
2332
|
+
ARTWORK_DECODE = "ARTWORK_DECODE",
|
|
2333
|
+
ARTWORK_TRANSFER = "ARTWORK_TRANSFER",
|
|
2334
|
+
ARTWORK_EXPIRED = "ARTWORK_EXPIRED",
|
|
2335
|
+
ARTWORK_VALIDATION_FAILED = "ARTWORK_VALIDATION_FAILED"
|
|
2336
|
+
}
|
|
2337
|
+
export interface ArtworkUploadDto {
|
|
2338
|
+
uploadId: string;
|
|
2339
|
+
assetId: string;
|
|
2340
|
+
state: ArtworkUploadState;
|
|
2341
|
+
expiresAt: string;
|
|
2342
|
+
errorCode?: ArtworkFailureCode;
|
|
2343
|
+
}
|
|
2344
|
+
export interface RetryArtworkUploadDto {
|
|
2345
|
+
uploadId: string;
|
|
2346
|
+
}
|
|
2347
|
+
export interface ArtworkBatchDto {
|
|
2348
|
+
/**
|
|
2349
|
+
* @minItems 1
|
|
2350
|
+
* @maxItems 50
|
|
2351
|
+
* @items.pattern ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
|
|
2352
|
+
*/
|
|
2353
|
+
assetIds: string[];
|
|
2354
|
+
}
|
|
2355
|
+
export declare enum ArtworkState {
|
|
2356
|
+
pending = "pending",
|
|
2357
|
+
ready = "ready",
|
|
2358
|
+
"review-required" = "review-required",
|
|
2359
|
+
failed = "failed",
|
|
2360
|
+
deleting = "deleting",
|
|
2361
|
+
deleted = "deleted"
|
|
2362
|
+
}
|
|
2363
|
+
export interface ArtworkResourceDto {
|
|
2364
|
+
assetId: string;
|
|
2365
|
+
state: ArtworkState;
|
|
2366
|
+
url?: string;
|
|
2367
|
+
expiresAt?: string;
|
|
2368
|
+
sha256?: string;
|
|
2369
|
+
mimeType?: string;
|
|
2370
|
+
byteLength?: number;
|
|
2371
|
+
width?: number;
|
|
2372
|
+
height?: number;
|
|
2373
|
+
}
|
|
2275
2374
|
export type StartLoginParams = {
|
|
2276
2375
|
/**
|
|
2277
2376
|
* Registered frontend return destination.
|
|
@@ -2285,8 +2384,9 @@ export type ListMapsParams = {
|
|
|
2285
2384
|
* @maxLength 120
|
|
2286
2385
|
*/
|
|
2287
2386
|
search?: string;
|
|
2387
|
+
sort?: ListMapsSort;
|
|
2288
2388
|
/**
|
|
2289
|
-
* @maxLength
|
|
2389
|
+
* @maxLength 2048
|
|
2290
2390
|
*/
|
|
2291
2391
|
cursor?: string;
|
|
2292
2392
|
/**
|
|
@@ -2301,6 +2401,19 @@ export declare enum ListMapsLifecycle {
|
|
|
2301
2401
|
trashed = "trashed",
|
|
2302
2402
|
deleted = "deleted"
|
|
2303
2403
|
}
|
|
2404
|
+
export declare enum ListMapsSort {
|
|
2405
|
+
"created-oldest" = "created-oldest",
|
|
2406
|
+
"recently-edited" = "recently-edited",
|
|
2407
|
+
"name-asc" = "name-asc",
|
|
2408
|
+
"most-seats" = "most-seats"
|
|
2409
|
+
}
|
|
2410
|
+
export type GetMapPreviewParams = {
|
|
2411
|
+
/**
|
|
2412
|
+
* @maximum 9007199254740991
|
|
2413
|
+
* @exclusiveMinimum 0
|
|
2414
|
+
*/
|
|
2415
|
+
revision: number;
|
|
2416
|
+
};
|
|
2304
2417
|
import type { Configuration } from "./configuration.js";
|
|
2305
2418
|
export declare class HealthClient {
|
|
2306
2419
|
private readonly configuration;
|
|
@@ -2331,6 +2444,7 @@ export declare class MapsClient {
|
|
|
2331
2444
|
constructor(configuration: Configuration, basePath?: string | undefined, axiosInstance?: AxiosInstance);
|
|
2332
2445
|
listMaps(workspaceId: string, params?: ListMapsParams, options?: AxiosRequestConfig): Promise<AxiosResponse<MapListDto>>;
|
|
2333
2446
|
createMap(workspaceId: string, createMapDto: CreateMapDto, options?: AxiosRequestConfig): Promise<AxiosResponse<MapAcknowledgementDto>>;
|
|
2447
|
+
getMapPreview(workspaceId: string, mapId: string, params: GetMapPreviewParams, options?: AxiosRequestConfig): Promise<AxiosResponse<Blob>>;
|
|
2334
2448
|
getMutationStatus(workspaceId: string, operationId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<MutationStatusDto>>;
|
|
2335
2449
|
resolveMapLink(workspaceId: string, editorCode: string, options?: AxiosRequestConfig): Promise<AxiosResponse<MapLinkDto>>;
|
|
2336
2450
|
getMapLink(workspaceId: string, mapId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<MapLinkDto>>;
|
|
@@ -2340,3 +2454,17 @@ export declare class MapsClient {
|
|
|
2340
2454
|
listMapRevisions(workspaceId: string, mapId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<MapRevisionDto[]>>;
|
|
2341
2455
|
getMapRevision(workspaceId: string, mapId: string, revision: number, options?: AxiosRequestConfig): Promise<AxiosResponse<MapContentDto>>;
|
|
2342
2456
|
}
|
|
2457
|
+
export declare class ArtworkClient {
|
|
2458
|
+
private readonly configuration;
|
|
2459
|
+
private readonly basePath?;
|
|
2460
|
+
private readonly operations;
|
|
2461
|
+
constructor(configuration: Configuration, basePath?: string | undefined, axiosInstance?: AxiosInstance);
|
|
2462
|
+
getArtworkLimits(workspaceId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ArtworkLimitsDto>>;
|
|
2463
|
+
prepareArtworkUpload(workspaceId: string, prepareArtworkUploadDto: PrepareArtworkUploadDto, options?: AxiosRequestConfig): Promise<AxiosResponse<ArtworkUploadDto>>;
|
|
2464
|
+
getArtworkUpload(workspaceId: string, uploadId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ArtworkUploadDto>>;
|
|
2465
|
+
uploadArtworkContent(workspaceId: string, uploadId: string, uploadArtworkContentBody: Blob, options?: AxiosRequestConfig): Promise<AxiosResponse<ArtworkUploadDto>>;
|
|
2466
|
+
completeArtworkUpload(workspaceId: string, uploadId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ArtworkUploadDto>>;
|
|
2467
|
+
cancelArtworkUpload(workspaceId: string, uploadId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ArtworkUploadDto>>;
|
|
2468
|
+
retryArtworkUpload(workspaceId: string, uploadId: string, retryArtworkUploadDto: RetryArtworkUploadDto, options?: AxiosRequestConfig): Promise<AxiosResponse<ArtworkUploadDto>>;
|
|
2469
|
+
getArtworkResources(workspaceId: string, artworkBatchDto: ArtworkBatchDto, options?: AxiosRequestConfig): Promise<AxiosResponse<ArtworkResourceDto[]>>;
|
|
2470
|
+
}
|
package/dist/generated.js
CHANGED
|
@@ -21,6 +21,13 @@ export var EmbedContextDtoCapabilitiesItem;
|
|
|
21
21
|
(function (EmbedContextDtoCapabilitiesItem) {
|
|
22
22
|
EmbedContextDtoCapabilitiesItem["map:view"] = "map:view";
|
|
23
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 = {}));
|
|
24
31
|
export var MapLifecycle;
|
|
25
32
|
(function (MapLifecycle) {
|
|
26
33
|
MapLifecycle["active"] = "active";
|
|
@@ -46,6 +53,47 @@ export var MapOperation;
|
|
|
46
53
|
MapOperation["restoreTrash"] = "restoreTrash";
|
|
47
54
|
MapOperation["restoreRevision"] = "restoreRevision";
|
|
48
55
|
})(MapOperation || (MapOperation = {}));
|
|
56
|
+
export var PrepareArtworkUploadDtoMimeType;
|
|
57
|
+
(function (PrepareArtworkUploadDtoMimeType) {
|
|
58
|
+
PrepareArtworkUploadDtoMimeType["image/png"] = "image/png";
|
|
59
|
+
PrepareArtworkUploadDtoMimeType["image/jpeg"] = "image/jpeg";
|
|
60
|
+
PrepareArtworkUploadDtoMimeType["image/webp"] = "image/webp";
|
|
61
|
+
PrepareArtworkUploadDtoMimeType["image/svg+xml"] = "image/svg+xml";
|
|
62
|
+
})(PrepareArtworkUploadDtoMimeType || (PrepareArtworkUploadDtoMimeType = {}));
|
|
63
|
+
export var ArtworkUploadState;
|
|
64
|
+
(function (ArtworkUploadState) {
|
|
65
|
+
ArtworkUploadState["prepared"] = "prepared";
|
|
66
|
+
ArtworkUploadState["receiving"] = "receiving";
|
|
67
|
+
ArtworkUploadState["uploaded"] = "uploaded";
|
|
68
|
+
ArtworkUploadState["validating"] = "validating";
|
|
69
|
+
ArtworkUploadState["ready"] = "ready";
|
|
70
|
+
ArtworkUploadState["review-required"] = "review-required";
|
|
71
|
+
ArtworkUploadState["failed"] = "failed";
|
|
72
|
+
ArtworkUploadState["cancelled"] = "cancelled";
|
|
73
|
+
})(ArtworkUploadState || (ArtworkUploadState = {}));
|
|
74
|
+
export var ArtworkFailureCode;
|
|
75
|
+
(function (ArtworkFailureCode) {
|
|
76
|
+
ArtworkFailureCode["ARTWORK_DIGEST"] = "ARTWORK_DIGEST";
|
|
77
|
+
ArtworkFailureCode["ARTWORK_SVG_ACTIVE"] = "ARTWORK_SVG_ACTIVE";
|
|
78
|
+
ArtworkFailureCode["ARTWORK_SVG_INVALID"] = "ARTWORK_SVG_INVALID";
|
|
79
|
+
ArtworkFailureCode["ARTWORK_SVG_COMPLEX"] = "ARTWORK_SVG_COMPLEX";
|
|
80
|
+
ArtworkFailureCode["ARTWORK_FILE_LIMIT"] = "ARTWORK_FILE_LIMIT";
|
|
81
|
+
ArtworkFailureCode["ARTWORK_TYPE"] = "ARTWORK_TYPE";
|
|
82
|
+
ArtworkFailureCode["ARTWORK_PIXEL_LIMIT"] = "ARTWORK_PIXEL_LIMIT";
|
|
83
|
+
ArtworkFailureCode["ARTWORK_DECODE"] = "ARTWORK_DECODE";
|
|
84
|
+
ArtworkFailureCode["ARTWORK_TRANSFER"] = "ARTWORK_TRANSFER";
|
|
85
|
+
ArtworkFailureCode["ARTWORK_EXPIRED"] = "ARTWORK_EXPIRED";
|
|
86
|
+
ArtworkFailureCode["ARTWORK_VALIDATION_FAILED"] = "ARTWORK_VALIDATION_FAILED";
|
|
87
|
+
})(ArtworkFailureCode || (ArtworkFailureCode = {}));
|
|
88
|
+
export var ArtworkState;
|
|
89
|
+
(function (ArtworkState) {
|
|
90
|
+
ArtworkState["pending"] = "pending";
|
|
91
|
+
ArtworkState["ready"] = "ready";
|
|
92
|
+
ArtworkState["review-required"] = "review-required";
|
|
93
|
+
ArtworkState["failed"] = "failed";
|
|
94
|
+
ArtworkState["deleting"] = "deleting";
|
|
95
|
+
ArtworkState["deleted"] = "deleted";
|
|
96
|
+
})(ArtworkState || (ArtworkState = {}));
|
|
49
97
|
export var ListMapsLifecycle;
|
|
50
98
|
(function (ListMapsLifecycle) {
|
|
51
99
|
ListMapsLifecycle["active"] = "active";
|
|
@@ -53,6 +101,13 @@ export var ListMapsLifecycle;
|
|
|
53
101
|
ListMapsLifecycle["trashed"] = "trashed";
|
|
54
102
|
ListMapsLifecycle["deleted"] = "deleted";
|
|
55
103
|
})(ListMapsLifecycle || (ListMapsLifecycle = {}));
|
|
104
|
+
export var ListMapsSort;
|
|
105
|
+
(function (ListMapsSort) {
|
|
106
|
+
ListMapsSort["created-oldest"] = "created-oldest";
|
|
107
|
+
ListMapsSort["recently-edited"] = "recently-edited";
|
|
108
|
+
ListMapsSort["name-asc"] = "name-asc";
|
|
109
|
+
ListMapsSort["most-seats"] = "most-seats";
|
|
110
|
+
})(ListMapsSort || (ListMapsSort = {}));
|
|
56
111
|
import { prepareRequestOptions } from "./transport.js";
|
|
57
112
|
export class HealthClient {
|
|
58
113
|
configuration;
|
|
@@ -131,6 +186,10 @@ export class MapsClient {
|
|
|
131
186
|
? requestOptions.data
|
|
132
187
|
: createMapDto, requestOptions);
|
|
133
188
|
}
|
|
189
|
+
async getMapPreview(workspaceId, mapId, params, options) {
|
|
190
|
+
const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
|
|
191
|
+
return this.operations.getMapPreview(workspaceId, mapId, params, requestOptions);
|
|
192
|
+
}
|
|
134
193
|
async getMutationStatus(workspaceId, operationId, options) {
|
|
135
194
|
const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
|
|
136
195
|
return this.operations.getMutationStatus(workspaceId, operationId, requestOptions);
|
|
@@ -168,6 +227,56 @@ export class MapsClient {
|
|
|
168
227
|
return this.operations.getMapRevision(workspaceId, mapId, revision, requestOptions);
|
|
169
228
|
}
|
|
170
229
|
}
|
|
230
|
+
export class ArtworkClient {
|
|
231
|
+
configuration;
|
|
232
|
+
basePath;
|
|
233
|
+
operations;
|
|
234
|
+
constructor(configuration, basePath, axiosInstance = axios) {
|
|
235
|
+
this.configuration = configuration;
|
|
236
|
+
this.basePath = basePath;
|
|
237
|
+
this.operations = getSeatmapApi(axiosInstance);
|
|
238
|
+
}
|
|
239
|
+
async getArtworkLimits(workspaceId, options) {
|
|
240
|
+
const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
|
|
241
|
+
return this.operations.getArtworkLimits(workspaceId, requestOptions);
|
|
242
|
+
}
|
|
243
|
+
async prepareArtworkUpload(workspaceId, prepareArtworkUploadDto, options) {
|
|
244
|
+
const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "POST", prepareArtworkUploadDto);
|
|
245
|
+
return this.operations.prepareArtworkUpload(workspaceId, requestOptions.data instanceof ArrayBuffer
|
|
246
|
+
? requestOptions.data
|
|
247
|
+
: prepareArtworkUploadDto, requestOptions);
|
|
248
|
+
}
|
|
249
|
+
async getArtworkUpload(workspaceId, uploadId, options) {
|
|
250
|
+
const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
|
|
251
|
+
return this.operations.getArtworkUpload(workspaceId, uploadId, requestOptions);
|
|
252
|
+
}
|
|
253
|
+
async uploadArtworkContent(workspaceId, uploadId, uploadArtworkContentBody, options) {
|
|
254
|
+
const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "PUT", uploadArtworkContentBody);
|
|
255
|
+
return this.operations.uploadArtworkContent(workspaceId, uploadId, requestOptions.data instanceof ArrayBuffer
|
|
256
|
+
? requestOptions.data
|
|
257
|
+
: uploadArtworkContentBody, requestOptions);
|
|
258
|
+
}
|
|
259
|
+
async completeArtworkUpload(workspaceId, uploadId, options) {
|
|
260
|
+
const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "POST");
|
|
261
|
+
return this.operations.completeArtworkUpload(workspaceId, uploadId, requestOptions);
|
|
262
|
+
}
|
|
263
|
+
async cancelArtworkUpload(workspaceId, uploadId, options) {
|
|
264
|
+
const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "POST");
|
|
265
|
+
return this.operations.cancelArtworkUpload(workspaceId, uploadId, requestOptions);
|
|
266
|
+
}
|
|
267
|
+
async retryArtworkUpload(workspaceId, uploadId, retryArtworkUploadDto, options) {
|
|
268
|
+
const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "POST", retryArtworkUploadDto);
|
|
269
|
+
return this.operations.retryArtworkUpload(workspaceId, uploadId, requestOptions.data instanceof ArrayBuffer
|
|
270
|
+
? requestOptions.data
|
|
271
|
+
: retryArtworkUploadDto, requestOptions);
|
|
272
|
+
}
|
|
273
|
+
async getArtworkResources(workspaceId, artworkBatchDto, options) {
|
|
274
|
+
const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "POST", artworkBatchDto);
|
|
275
|
+
return this.operations.getArtworkResources(workspaceId, requestOptions.data instanceof ArrayBuffer
|
|
276
|
+
? requestOptions.data
|
|
277
|
+
: artworkBatchDto, requestOptions);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
171
280
|
const getSeatmapApi = (axiosInstance = axios) => {
|
|
172
281
|
const getLiveness = (options) => {
|
|
173
282
|
return axiosInstance.get(`/health`, options);
|
|
@@ -317,6 +426,25 @@ const getSeatmapApi = (axiosInstance = axios) => {
|
|
|
317
426
|
baseURL: "",
|
|
318
427
|
});
|
|
319
428
|
};
|
|
429
|
+
const getMapPreview = (workspaceId, mapId, params, options) => {
|
|
430
|
+
return axiosInstance.get(`/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/preview`, {
|
|
431
|
+
responseType: "blob",
|
|
432
|
+
...options,
|
|
433
|
+
params: { ...params, ...options?.params },
|
|
434
|
+
});
|
|
435
|
+
};
|
|
436
|
+
const getGetMapPreviewUrl = (workspaceId, mapId, params) => {
|
|
437
|
+
return axiosInstance
|
|
438
|
+
.create({
|
|
439
|
+
baseURL: "",
|
|
440
|
+
params: null,
|
|
441
|
+
})
|
|
442
|
+
.getUri({
|
|
443
|
+
url: `/workspaces/${encodeURIComponent(workspaceId)}/maps/${encodeURIComponent(mapId)}/preview`,
|
|
444
|
+
baseURL: "",
|
|
445
|
+
params,
|
|
446
|
+
});
|
|
447
|
+
};
|
|
320
448
|
const getMutationStatus = (workspaceId, operationId, options) => {
|
|
321
449
|
return axiosInstance.get(`/workspaces/${encodeURIComponent(workspaceId)}/maps/operations/${encodeURIComponent(operationId)}`, options);
|
|
322
450
|
};
|
|
@@ -435,6 +563,118 @@ const getSeatmapApi = (axiosInstance = axios) => {
|
|
|
435
563
|
baseURL: "",
|
|
436
564
|
});
|
|
437
565
|
};
|
|
566
|
+
const getArtworkLimits = (workspaceId, options) => {
|
|
567
|
+
return axiosInstance.get(`/workspaces/${encodeURIComponent(workspaceId)}/artwork/limits`, options);
|
|
568
|
+
};
|
|
569
|
+
const getGetArtworkLimitsUrl = (workspaceId) => {
|
|
570
|
+
return axiosInstance
|
|
571
|
+
.create({
|
|
572
|
+
baseURL: "",
|
|
573
|
+
params: null,
|
|
574
|
+
})
|
|
575
|
+
.getUri({
|
|
576
|
+
url: `/workspaces/${encodeURIComponent(workspaceId)}/artwork/limits`,
|
|
577
|
+
baseURL: "",
|
|
578
|
+
});
|
|
579
|
+
};
|
|
580
|
+
const prepareArtworkUpload = (workspaceId, prepareArtworkUploadDto, options) => {
|
|
581
|
+
return axiosInstance.post(`/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads`, prepareArtworkUploadDto, options);
|
|
582
|
+
};
|
|
583
|
+
const getPrepareArtworkUploadUrl = (workspaceId) => {
|
|
584
|
+
return axiosInstance
|
|
585
|
+
.create({
|
|
586
|
+
baseURL: "",
|
|
587
|
+
params: null,
|
|
588
|
+
})
|
|
589
|
+
.getUri({
|
|
590
|
+
url: `/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads`,
|
|
591
|
+
baseURL: "",
|
|
592
|
+
});
|
|
593
|
+
};
|
|
594
|
+
const getArtworkUpload = (workspaceId, uploadId, options) => {
|
|
595
|
+
return axiosInstance.get(`/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads/${encodeURIComponent(uploadId)}`, options);
|
|
596
|
+
};
|
|
597
|
+
const getGetArtworkUploadUrl = (workspaceId, uploadId) => {
|
|
598
|
+
return axiosInstance
|
|
599
|
+
.create({
|
|
600
|
+
baseURL: "",
|
|
601
|
+
params: null,
|
|
602
|
+
})
|
|
603
|
+
.getUri({
|
|
604
|
+
url: `/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads/${encodeURIComponent(uploadId)}`,
|
|
605
|
+
baseURL: "",
|
|
606
|
+
});
|
|
607
|
+
};
|
|
608
|
+
const uploadArtworkContent = (workspaceId, uploadId, uploadArtworkContentBody, options) => {
|
|
609
|
+
return axiosInstance.put(`/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads/${encodeURIComponent(uploadId)}/content`, uploadArtworkContentBody, options);
|
|
610
|
+
};
|
|
611
|
+
const getUploadArtworkContentUrl = (workspaceId, uploadId) => {
|
|
612
|
+
return axiosInstance
|
|
613
|
+
.create({
|
|
614
|
+
baseURL: "",
|
|
615
|
+
params: null,
|
|
616
|
+
})
|
|
617
|
+
.getUri({
|
|
618
|
+
url: `/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads/${encodeURIComponent(uploadId)}/content`,
|
|
619
|
+
baseURL: "",
|
|
620
|
+
});
|
|
621
|
+
};
|
|
622
|
+
const completeArtworkUpload = (workspaceId, uploadId, options) => {
|
|
623
|
+
return axiosInstance.post(`/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads/${encodeURIComponent(uploadId)}/complete`, undefined, options);
|
|
624
|
+
};
|
|
625
|
+
const getCompleteArtworkUploadUrl = (workspaceId, uploadId) => {
|
|
626
|
+
return axiosInstance
|
|
627
|
+
.create({
|
|
628
|
+
baseURL: "",
|
|
629
|
+
params: null,
|
|
630
|
+
})
|
|
631
|
+
.getUri({
|
|
632
|
+
url: `/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads/${encodeURIComponent(uploadId)}/complete`,
|
|
633
|
+
baseURL: "",
|
|
634
|
+
});
|
|
635
|
+
};
|
|
636
|
+
const cancelArtworkUpload = (workspaceId, uploadId, options) => {
|
|
637
|
+
return axiosInstance.post(`/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads/${encodeURIComponent(uploadId)}/cancel`, undefined, options);
|
|
638
|
+
};
|
|
639
|
+
const getCancelArtworkUploadUrl = (workspaceId, uploadId) => {
|
|
640
|
+
return axiosInstance
|
|
641
|
+
.create({
|
|
642
|
+
baseURL: "",
|
|
643
|
+
params: null,
|
|
644
|
+
})
|
|
645
|
+
.getUri({
|
|
646
|
+
url: `/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads/${encodeURIComponent(uploadId)}/cancel`,
|
|
647
|
+
baseURL: "",
|
|
648
|
+
});
|
|
649
|
+
};
|
|
650
|
+
const retryArtworkUpload = (workspaceId, uploadId, retryArtworkUploadDto, options) => {
|
|
651
|
+
return axiosInstance.post(`/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads/${encodeURIComponent(uploadId)}/retry`, retryArtworkUploadDto, options);
|
|
652
|
+
};
|
|
653
|
+
const getRetryArtworkUploadUrl = (workspaceId, uploadId) => {
|
|
654
|
+
return axiosInstance
|
|
655
|
+
.create({
|
|
656
|
+
baseURL: "",
|
|
657
|
+
params: null,
|
|
658
|
+
})
|
|
659
|
+
.getUri({
|
|
660
|
+
url: `/workspaces/${encodeURIComponent(workspaceId)}/artwork/uploads/${encodeURIComponent(uploadId)}/retry`,
|
|
661
|
+
baseURL: "",
|
|
662
|
+
});
|
|
663
|
+
};
|
|
664
|
+
const getArtworkResources = (workspaceId, artworkBatchDto, options) => {
|
|
665
|
+
return axiosInstance.post(`/workspaces/${encodeURIComponent(workspaceId)}/artwork/resources`, artworkBatchDto, options);
|
|
666
|
+
};
|
|
667
|
+
const getGetArtworkResourcesUrl = (workspaceId) => {
|
|
668
|
+
return axiosInstance
|
|
669
|
+
.create({
|
|
670
|
+
baseURL: "",
|
|
671
|
+
params: null,
|
|
672
|
+
})
|
|
673
|
+
.getUri({
|
|
674
|
+
url: `/workspaces/${encodeURIComponent(workspaceId)}/artwork/resources`,
|
|
675
|
+
baseURL: "",
|
|
676
|
+
});
|
|
677
|
+
};
|
|
438
678
|
return {
|
|
439
679
|
getLiveness,
|
|
440
680
|
getIntegrationContext,
|
|
@@ -446,6 +686,7 @@ const getSeatmapApi = (axiosInstance = axios) => {
|
|
|
446
686
|
getEmbedContext,
|
|
447
687
|
listMaps,
|
|
448
688
|
createMap,
|
|
689
|
+
getMapPreview,
|
|
449
690
|
getMutationStatus,
|
|
450
691
|
resolveMapLink,
|
|
451
692
|
getMapLink,
|
|
@@ -454,6 +695,14 @@ const getSeatmapApi = (axiosInstance = axios) => {
|
|
|
454
695
|
changeMap,
|
|
455
696
|
listMapRevisions,
|
|
456
697
|
getMapRevision,
|
|
698
|
+
getArtworkLimits,
|
|
699
|
+
prepareArtworkUpload,
|
|
700
|
+
getArtworkUpload,
|
|
701
|
+
uploadArtworkContent,
|
|
702
|
+
completeArtworkUpload,
|
|
703
|
+
cancelArtworkUpload,
|
|
704
|
+
retryArtworkUpload,
|
|
705
|
+
getArtworkResources,
|
|
457
706
|
getGetLivenessUrl,
|
|
458
707
|
getGetIntegrationContextUrl,
|
|
459
708
|
getStartLoginUrl,
|
|
@@ -464,6 +713,7 @@ const getSeatmapApi = (axiosInstance = axios) => {
|
|
|
464
713
|
getGetEmbedContextUrl,
|
|
465
714
|
getListMapsUrl,
|
|
466
715
|
getCreateMapUrl,
|
|
716
|
+
getGetMapPreviewUrl,
|
|
467
717
|
getGetMutationStatusUrl,
|
|
468
718
|
getResolveMapLinkUrl,
|
|
469
719
|
getGetMapLinkUrl,
|
|
@@ -472,5 +722,13 @@ const getSeatmapApi = (axiosInstance = axios) => {
|
|
|
472
722
|
getChangeMapUrl,
|
|
473
723
|
getListMapRevisionsUrl,
|
|
474
724
|
getGetMapRevisionUrl,
|
|
725
|
+
getGetArtworkLimitsUrl,
|
|
726
|
+
getPrepareArtworkUploadUrl,
|
|
727
|
+
getGetArtworkUploadUrl,
|
|
728
|
+
getUploadArtworkContentUrl,
|
|
729
|
+
getCompleteArtworkUploadUrl,
|
|
730
|
+
getCancelArtworkUploadUrl,
|
|
731
|
+
getRetryArtworkUploadUrl,
|
|
732
|
+
getGetArtworkResourcesUrl,
|
|
475
733
|
};
|
|
476
734
|
};
|
package/dist/transport.js
CHANGED
|
@@ -22,12 +22,20 @@ export async function prepareRequestOptions(configuration, basePath, options, me
|
|
|
22
22
|
if (configuredBasePath !== undefined) {
|
|
23
23
|
prepared.baseURL = configuredBasePath;
|
|
24
24
|
}
|
|
25
|
+
if (body === undefined &&
|
|
26
|
+
!["GET", "HEAD", "OPTIONS"].includes(method) &&
|
|
27
|
+
!Object.keys(headers).some((name) => name.toLowerCase() === "content-type")) {
|
|
28
|
+
headers["Content-Type"] = "application/json";
|
|
29
|
+
}
|
|
25
30
|
prepared.headers = headers;
|
|
26
31
|
if (prepared.validateStatus === undefined) {
|
|
27
32
|
prepared.validateStatus = (status) => (status >= 200 && status < 300) || status === 304;
|
|
28
33
|
}
|
|
29
34
|
if (!configuration.compressRequests ||
|
|
30
35
|
body === undefined ||
|
|
36
|
+
(typeof Blob !== "undefined" && body instanceof Blob) ||
|
|
37
|
+
body instanceof ArrayBuffer ||
|
|
38
|
+
ArrayBuffer.isView(body) ||
|
|
31
39
|
Object.keys(headers).some((name) => name.toLowerCase() === "content-encoding")) {
|
|
32
40
|
return prepared;
|
|
33
41
|
}
|