@vertexvis/api-client-node 0.16.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.createExport = void 0;
13
+ const index_1 = require("../index");
14
+ /**
15
+ * Create an export.
16
+ *
17
+ * @param args - The {@link CreateExportReq}.
18
+ */
19
+ function createExport({ client, createExportReq, onMsg = console.log, verbose, }) {
20
+ return __awaiter(this, void 0, void 0, function* () {
21
+ const res = yield client.exports.createExport({
22
+ createExportRequest: createExportReq(),
23
+ });
24
+ const queuedId = res.data.data.id;
25
+ if (verbose)
26
+ onMsg(`Created export with queued-export ${queuedId}`);
27
+ const pollRes = yield (0, index_1.pollQueuedJob)({
28
+ id: queuedId,
29
+ getQueuedJob: (id) => client.exports.getQueuedExport({ id }),
30
+ polling: { intervalMs: index_1.PollIntervalMs, maxAttempts: index_1.MaxAttempts },
31
+ });
32
+ if ((0, index_1.isPollError)(pollRes.res))
33
+ (0, index_1.throwOnError)(pollRes);
34
+ if (verbose)
35
+ onMsg(`Completed export ${pollRes.res.data.id}`);
36
+ return pollRes.res;
37
+ });
38
+ }
39
+ exports.createExport = createExport;
@@ -1,3 +1,4 @@
1
+ export * from './exports';
1
2
  export * from './files';
2
3
  export * from './parts';
3
4
  export * from './scenes';
@@ -10,6 +10,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
10
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
+ __exportStar(require("./exports"), exports);
13
14
  __exportStar(require("./files"), exports);
14
15
  __exportStar(require("./parts"), exports);
15
16
  __exportStar(require("./scenes"), exports);
@@ -1 +1 @@
1
- export declare const version = "0.15.6";
1
+ export declare const version = "0.17.0";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.version = void 0;
4
- exports.version = '0.15.6';
4
+ exports.version = '0.17.0';
@@ -1,5 +1,5 @@
1
1
  import { AxiosInstance, AxiosRequestConfig } from 'axios';
2
- import { AccountsApi, ApplicationsApi, BatchesApi, Configuration, FilesApi, GeometrySetsApi, HitsApi, Oauth2Api, OAuth2Token, PartRevisionsApi, PartsApi, SceneAlterationsApi, SceneItemOverridesApi, SceneItemsApi, ScenesApi, SceneViewsApi, SceneViewStatesApi, StreamKeysApi, TranslationInspectionsApi, WebhookSubscriptionsApi } from '../index';
2
+ import { AccountsApi, ApplicationsApi, BatchesApi, Configuration, ExportsApi, FilesApi, GeometrySetsApi, HitsApi, Oauth2Api, OAuth2Token, PartRevisionsApi, PartsApi, SceneAlterationsApi, SceneItemOverridesApi, SceneItemsApi, ScenesApi, SceneViewsApi, SceneViewStatesApi, StreamKeysApi, TranslationInspectionsApi, WebhookSubscriptionsApi } from '../index';
3
3
  import { BasePath } from './index';
4
4
  /**
5
5
  * Static `build` function arguments.
@@ -72,6 +72,7 @@ export declare class VertexClient {
72
72
  accounts: AccountsApi;
73
73
  applications: ApplicationsApi;
74
74
  batches: BatchesApi;
75
+ exports: ExportsApi;
75
76
  files: FilesApi;
76
77
  geometrySets: GeometrySetsApi;
77
78
  hits: HitsApi;
@@ -79,6 +79,7 @@ class VertexClient {
79
79
  this.accounts = new index_1.AccountsApi(this.config, undefined, axiosInst);
80
80
  this.applications = new index_1.ApplicationsApi(this.config, undefined, axiosInst);
81
81
  this.batches = new index_1.BatchesApi(this.config, undefined, axiosInst);
82
+ this.exports = new index_1.ExportsApi(this.config, undefined, axiosInst);
82
83
  this.files = new index_1.FilesApi(this.config, undefined, axiosInst);
83
84
  this.geometrySets = new index_1.GeometrySetsApi(this.config, undefined, axiosInst);
84
85
  this.hits = new index_1.HitsApi(this.config, undefined, axiosInst);
package/dist/esm/api.d.ts CHANGED
@@ -511,6 +511,13 @@ export interface BoundingBox {
511
511
  */
512
512
  max: Vector3;
513
513
  }
514
+ /**
515
+ * Describes the options for configuring a CAD file export.
516
+ * @export
517
+ * @interface CADExportConfig
518
+ */
519
+ export interface CADExportConfig extends ExportConfig {
520
+ }
514
521
  /**
515
522
  * Fit camera in 3D space based on items in scene.
516
523
  * @export
@@ -814,6 +821,70 @@ export interface CreateBatchRequest {
814
821
  */
815
822
  'vertexvis/batch:operations': Array<BatchOperation>;
816
823
  }
824
+ /**
825
+ *
826
+ * @export
827
+ * @interface CreateExportRequest
828
+ */
829
+ export interface CreateExportRequest {
830
+ /**
831
+ *
832
+ * @type {CreateExportRequestData}
833
+ * @memberof CreateExportRequest
834
+ */
835
+ data: CreateExportRequestData;
836
+ }
837
+ /**
838
+ *
839
+ * @export
840
+ * @interface CreateExportRequestData
841
+ */
842
+ export interface CreateExportRequestData {
843
+ /**
844
+ * Resource object type.
845
+ * @type {string}
846
+ * @memberof CreateExportRequestData
847
+ */
848
+ type: string;
849
+ /**
850
+ *
851
+ * @type {CreateExportRequestDataAttributes}
852
+ * @memberof CreateExportRequestData
853
+ */
854
+ attributes: CreateExportRequestDataAttributes;
855
+ /**
856
+ *
857
+ * @type {CreateExportRequestDataRelationships}
858
+ * @memberof CreateExportRequestData
859
+ */
860
+ relationships: CreateExportRequestDataRelationships;
861
+ }
862
+ /**
863
+ *
864
+ * @export
865
+ * @interface CreateExportRequestDataAttributes
866
+ */
867
+ export interface CreateExportRequestDataAttributes {
868
+ /**
869
+ * Specifies the export format and options to configure the export.
870
+ * @type {CADExportConfig}
871
+ * @memberof CreateExportRequestDataAttributes
872
+ */
873
+ config: CADExportConfig;
874
+ }
875
+ /**
876
+ *
877
+ * @export
878
+ * @interface CreateExportRequestDataRelationships
879
+ */
880
+ export interface CreateExportRequestDataRelationships {
881
+ /**
882
+ *
883
+ * @type {ExportRelationship}
884
+ * @memberof CreateExportRequestDataRelationships
885
+ */
886
+ source: ExportRelationship;
887
+ }
817
888
  /**
818
889
  *
819
890
  * @export
@@ -1779,6 +1850,128 @@ export interface Dimensions {
1779
1850
  */
1780
1851
  width: number;
1781
1852
  }
1853
+ /**
1854
+ *
1855
+ * @export
1856
+ * @interface Export
1857
+ */
1858
+ export interface Export {
1859
+ /**
1860
+ *
1861
+ * @type {ExportData}
1862
+ * @memberof Export
1863
+ */
1864
+ data: ExportData;
1865
+ /**
1866
+ *
1867
+ * @type {{ [key: string]: Link; }}
1868
+ * @memberof Export
1869
+ */
1870
+ links?: {
1871
+ [key: string]: Link;
1872
+ };
1873
+ }
1874
+ /**
1875
+ * Describes the options for configuring a file export.
1876
+ * @export
1877
+ * @interface ExportConfig
1878
+ */
1879
+ export interface ExportConfig {
1880
+ /**
1881
+ *
1882
+ * @type {string}
1883
+ * @memberof ExportConfig
1884
+ */
1885
+ format: string;
1886
+ }
1887
+ /**
1888
+ *
1889
+ * @export
1890
+ * @interface ExportData
1891
+ */
1892
+ export interface ExportData {
1893
+ /**
1894
+ *
1895
+ * @type {string}
1896
+ * @memberof ExportData
1897
+ */
1898
+ type: string;
1899
+ /**
1900
+ * ID of the resource.
1901
+ * @type {string}
1902
+ * @memberof ExportData
1903
+ */
1904
+ id: string;
1905
+ /**
1906
+ *
1907
+ * @type {ExportDataAttributes}
1908
+ * @memberof ExportData
1909
+ */
1910
+ attributes: ExportDataAttributes;
1911
+ /**
1912
+ *
1913
+ * @type {{ [key: string]: Link; }}
1914
+ * @memberof ExportData
1915
+ */
1916
+ links?: {
1917
+ [key: string]: Link;
1918
+ };
1919
+ }
1920
+ /**
1921
+ *
1922
+ * @export
1923
+ * @interface ExportDataAttributes
1924
+ */
1925
+ export interface ExportDataAttributes {
1926
+ /**
1927
+ *
1928
+ * @type {string}
1929
+ * @memberof ExportDataAttributes
1930
+ */
1931
+ created: string;
1932
+ /**
1933
+ *
1934
+ * @type {string}
1935
+ * @memberof ExportDataAttributes
1936
+ */
1937
+ downloadUrl: string;
1938
+ }
1939
+ /**
1940
+ * Relationship to an `export`.
1941
+ * @export
1942
+ * @interface ExportRelationship
1943
+ */
1944
+ export interface ExportRelationship {
1945
+ /**
1946
+ *
1947
+ * @type {ExportRelationshipData}
1948
+ * @memberof ExportRelationship
1949
+ */
1950
+ data: ExportRelationshipData;
1951
+ }
1952
+ /**
1953
+ *
1954
+ * @export
1955
+ * @interface ExportRelationshipData
1956
+ */
1957
+ export interface ExportRelationshipData {
1958
+ /**
1959
+ * Resource object type.
1960
+ * @type {string}
1961
+ * @memberof ExportRelationshipData
1962
+ */
1963
+ type: ExportRelationshipDataTypeEnum;
1964
+ /**
1965
+ * ID of the resource.
1966
+ * @type {string}
1967
+ * @memberof ExportRelationshipData
1968
+ */
1969
+ id: string;
1970
+ }
1971
+ export declare const ExportRelationshipDataTypeEnum: {
1972
+ readonly Scene: "scene";
1973
+ };
1974
+ export declare type ExportRelationshipDataTypeEnum = typeof ExportRelationshipDataTypeEnum[keyof typeof ExportRelationshipDataTypeEnum];
1782
1975
  /**
1783
1976
  *
1784
1977
  * @export
@@ -5860,6 +6053,158 @@ export declare class BatchesApi extends BaseAPI {
5860
6053
  */
5861
6054
  getQueuedBatch(requestParameters: BatchesApiGetQueuedBatchRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<QueuedJob, any>>;
5862
6055
  }
6056
+ /**
6057
+ * ExportsApi - axios parameter creator
6058
+ * @export
6059
+ */
6060
+ export declare const ExportsApiAxiosParamCreator: (configuration?: Configuration | undefined) => {
6061
+ /**
6062
+ * Create an `export`. This API is asynchronous, returning the location of a `queued-export`. Check the status via the getQueuedExport API.
6063
+ * @param {CreateExportRequest} createExportRequest
6064
+ * @param {*} [options] Override http request option.
6065
+ * @throws {RequiredError}
6066
+ */
6067
+ createExport: (createExportRequest: CreateExportRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
6068
+ /**
6069
+ * Get an `export` by ID.
6070
+ * @param {string} id The &#x60;export&#x60; ID.
6071
+ * @param {*} [options] Override http request option.
6072
+ * @throws {RequiredError}
6073
+ */
6074
+ getExport: (id: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
6075
+ /**
6076
+ * Get a `queued-export`. The response is either the status if `running` or `error` or, upon completion, redirects to the created `export`.
6077
+ * @param {string} id The &#x60;queued-export&#x60; ID.
6078
+ * @param {*} [options] Override http request option.
6079
+ * @throws {RequiredError}
6080
+ */
6081
+ getQueuedExport: (id: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
6082
+ };
6083
+ /**
6084
+ * ExportsApi - functional programming interface
6085
+ * @export
6086
+ */
6087
+ export declare const ExportsApiFp: (configuration?: Configuration | undefined) => {
6088
+ /**
6089
+ * Create an `export`. This API is asynchronous, returning the location of a `queued-export`. Check the status via the getQueuedExport API.
6090
+ * @param {CreateExportRequest} createExportRequest
6091
+ * @param {*} [options] Override http request option.
6092
+ * @throws {RequiredError}
6093
+ */
6094
+ createExport(createExportRequest: CreateExportRequest, options?: AxiosRequestConfig<any> | undefined): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<QueuedJob>>;
6095
+ /**
6096
+ * Get an `export` by ID.
6097
+ * @param {string} id The &#x60;export&#x60; ID.
6098
+ * @param {*} [options] Override http request option.
6099
+ * @throws {RequiredError}
6100
+ */
6101
+ getExport(id: string, options?: AxiosRequestConfig<any> | undefined): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<Export>>;
6102
+ /**
6103
+ * Get a `queued-export`. The response is either the status if `running` or `error` or, upon completion, redirects to the created `export`.
6104
+ * @param {string} id The &#x60;queued-export&#x60; ID.
6105
+ * @param {*} [options] Override http request option.
6106
+ * @throws {RequiredError}
6107
+ */
6108
+ getQueuedExport(id: string, options?: AxiosRequestConfig<any> | undefined): Promise<(axios?: AxiosInstance | undefined, basePath?: string | undefined) => AxiosPromise<QueuedJob>>;
6109
+ };
6110
+ /**
6111
+ * ExportsApi - factory interface
6112
+ * @export
6113
+ */
6114
+ export declare const ExportsApiFactory: (configuration?: Configuration | undefined, basePath?: string | undefined, axios?: AxiosInstance | undefined) => {
6115
+ /**
6116
+ * Create an `export`. This API is asynchronous, returning the location of a `queued-export`. Check the status via the getQueuedExport API.
6117
+ * @param {CreateExportRequest} createExportRequest
6118
+ * @param {*} [options] Override http request option.
6119
+ * @throws {RequiredError}
6120
+ */
6121
+ createExport(createExportRequest: CreateExportRequest, options?: any): AxiosPromise<QueuedJob>;
6122
+ /**
6123
+ * Get an `export` by ID.
6124
+ * @param {string} id The &#x60;export&#x60; ID.
6125
+ * @param {*} [options] Override http request option.
6126
+ * @throws {RequiredError}
6127
+ */
6128
+ getExport(id: string, options?: any): AxiosPromise<Export>;
6129
+ /**
6130
+ * Get a `queued-export`. The response is either the status if `running` or `error` or, upon completion, redirects to the created `export`.
6131
+ * @param {string} id The &#x60;queued-export&#x60; ID.
6132
+ * @param {*} [options] Override http request option.
6133
+ * @throws {RequiredError}
6134
+ */
6135
+ getQueuedExport(id: string, options?: any): AxiosPromise<QueuedJob>;
6136
+ };
6137
+ /**
6138
+ * Request parameters for createExport operation in ExportsApi.
6139
+ * @export
6140
+ * @interface ExportsApiCreateExportRequest
6141
+ */
6142
+ export interface ExportsApiCreateExportRequest {
6143
+ /**
6144
+ *
6145
+ * @type {CreateExportRequest}
6146
+ * @memberof ExportsApiCreateExport
6147
+ */
6148
+ readonly createExportRequest: CreateExportRequest;
6149
+ }
6150
+ /**
6151
+ * Request parameters for getExport operation in ExportsApi.
6152
+ * @export
6153
+ * @interface ExportsApiGetExportRequest
6154
+ */
6155
+ export interface ExportsApiGetExportRequest {
6156
+ /**
6157
+ * The &#x60;export&#x60; ID.
6158
+ * @type {string}
6159
+ * @memberof ExportsApiGetExport
6160
+ */
6161
+ readonly id: string;
6162
+ }
6163
+ /**
6164
+ * Request parameters for getQueuedExport operation in ExportsApi.
6165
+ * @export
6166
+ * @interface ExportsApiGetQueuedExportRequest
6167
+ */
6168
+ export interface ExportsApiGetQueuedExportRequest {
6169
+ /**
6170
+ * The &#x60;queued-export&#x60; ID.
6171
+ * @type {string}
6172
+ * @memberof ExportsApiGetQueuedExport
6173
+ */
6174
+ readonly id: string;
6175
+ }
6176
+ /**
6177
+ * ExportsApi - object-oriented interface
6178
+ * @export
6179
+ * @class ExportsApi
6180
+ * @extends {BaseAPI}
6181
+ */
6182
+ export declare class ExportsApi extends BaseAPI {
6183
+ /**
6184
+ * Create an `export`. This API is asynchronous, returning the location of a `queued-export`. Check the status via the getQueuedExport API.
6185
+ * @param {ExportsApiCreateExportRequest} requestParameters Request parameters.
6186
+ * @param {*} [options] Override http request option.
6187
+ * @throws {RequiredError}
6188
+ * @memberof ExportsApi
6189
+ */
6190
+ createExport(requestParameters: ExportsApiCreateExportRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<QueuedJob, any>>;
6191
+ /**
6192
+ * Get an `export` by ID.
6193
+ * @param {ExportsApiGetExportRequest} requestParameters Request parameters.
6194
+ * @param {*} [options] Override http request option.
6195
+ * @throws {RequiredError}
6196
+ * @memberof ExportsApi
6197
+ */
6198
+ getExport(requestParameters: ExportsApiGetExportRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Export, any>>;
6199
+ /**
6200
+ * Get a `queued-export`. The response is either the status if `running` or `error` or, upon completion, redirects to the created `export`.
6201
+ * @param {ExportsApiGetQueuedExportRequest} requestParameters Request parameters.
6202
+ * @param {*} [options] Override http request option.
6203
+ * @throws {RequiredError}
6204
+ * @memberof ExportsApi
6205
+ */
6206
+ getQueuedExport(requestParameters: ExportsApiGetQueuedExportRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<QueuedJob, any>>;
6207
+ }
5863
6208
  /**
5864
6209
  * FilesApi - axios parameter creator
5865
6210
  * @export