@seatmap-fyi/api-client 0.1.0-alpha.8 → 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.
@@ -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
  */
@@ -2372,8 +2384,9 @@ export type ListMapsParams = {
2372
2384
  * @maxLength 120
2373
2385
  */
2374
2386
  search?: string;
2387
+ sort?: ListMapsSort;
2375
2388
  /**
2376
- * @maxLength 200
2389
+ * @maxLength 2048
2377
2390
  */
2378
2391
  cursor?: string;
2379
2392
  /**
@@ -2388,6 +2401,19 @@ export declare enum ListMapsLifecycle {
2388
2401
  trashed = "trashed",
2389
2402
  deleted = "deleted"
2390
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
+ };
2391
2417
  import type { Configuration } from "./configuration.js";
2392
2418
  export declare class HealthClient {
2393
2419
  private readonly configuration;
@@ -2418,6 +2444,7 @@ export declare class MapsClient {
2418
2444
  constructor(configuration: Configuration, basePath?: string | undefined, axiosInstance?: AxiosInstance);
2419
2445
  listMaps(workspaceId: string, params?: ListMapsParams, options?: AxiosRequestConfig): Promise<AxiosResponse<MapListDto>>;
2420
2446
  createMap(workspaceId: string, createMapDto: CreateMapDto, options?: AxiosRequestConfig): Promise<AxiosResponse<MapAcknowledgementDto>>;
2447
+ getMapPreview(workspaceId: string, mapId: string, params: GetMapPreviewParams, options?: AxiosRequestConfig): Promise<AxiosResponse<Blob>>;
2421
2448
  getMutationStatus(workspaceId: string, operationId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<MutationStatusDto>>;
2422
2449
  resolveMapLink(workspaceId: string, editorCode: string, options?: AxiosRequestConfig): Promise<AxiosResponse<MapLinkDto>>;
2423
2450
  getMapLink(workspaceId: string, mapId: string, options?: AxiosRequestConfig): Promise<AxiosResponse<MapLinkDto>>;
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";
@@ -94,6 +101,13 @@ export var ListMapsLifecycle;
94
101
  ListMapsLifecycle["trashed"] = "trashed";
95
102
  ListMapsLifecycle["deleted"] = "deleted";
96
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 = {}));
97
111
  import { prepareRequestOptions } from "./transport.js";
98
112
  export class HealthClient {
99
113
  configuration;
@@ -172,6 +186,10 @@ export class MapsClient {
172
186
  ? requestOptions.data
173
187
  : createMapDto, requestOptions);
174
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
+ }
175
193
  async getMutationStatus(workspaceId, operationId, options) {
176
194
  const requestOptions = await prepareRequestOptions(this.configuration, this.basePath, options, "GET");
177
195
  return this.operations.getMutationStatus(workspaceId, operationId, requestOptions);
@@ -408,6 +426,25 @@ const getSeatmapApi = (axiosInstance = axios) => {
408
426
  baseURL: "",
409
427
  });
410
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
+ };
411
448
  const getMutationStatus = (workspaceId, operationId, options) => {
412
449
  return axiosInstance.get(`/workspaces/${encodeURIComponent(workspaceId)}/maps/operations/${encodeURIComponent(operationId)}`, options);
413
450
  };
@@ -649,6 +686,7 @@ const getSeatmapApi = (axiosInstance = axios) => {
649
686
  getEmbedContext,
650
687
  listMaps,
651
688
  createMap,
689
+ getMapPreview,
652
690
  getMutationStatus,
653
691
  resolveMapLink,
654
692
  getMapLink,
@@ -675,6 +713,7 @@ const getSeatmapApi = (axiosInstance = axios) => {
675
713
  getGetEmbedContextUrl,
676
714
  getListMapsUrl,
677
715
  getCreateMapUrl,
716
+ getGetMapPreviewUrl,
678
717
  getGetMutationStatusUrl,
679
718
  getResolveMapLinkUrl,
680
719
  getGetMapLinkUrl,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seatmap-fyi/api-client",
3
- "version": "0.1.0-alpha.8",
3
+ "version": "0.1.0-alpha.9",
4
4
  "license": "UNLICENSED",
5
5
  "type": "module",
6
6
  "sideEffects": false,