@vertexvis/api-client-node 0.23.2 → 0.24.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.
- package/dist/cjs/api.d.ts +673 -2
- package/dist/cjs/api.js +329 -3
- package/dist/cjs/client/helpers/parts.d.ts +3 -1
- package/dist/cjs/client/helpers/parts.js +13 -4
- package/dist/cjs/client/utils.d.ts +2 -1
- package/dist/cjs/client/utils.js +4 -2
- package/dist/cjs/client/version.d.ts +1 -1
- package/dist/cjs/client/version.js +1 -1
- package/dist/esm/api.d.ts +673 -2
- package/dist/esm/api.js +318 -0
- package/dist/esm/client/helpers/parts.d.ts +3 -1
- package/dist/esm/client/helpers/parts.js +13 -4
- package/dist/esm/client/utils.d.ts +2 -1
- package/dist/esm/client/utils.js +4 -2
- package/dist/esm/client/version.d.ts +1 -1
- package/dist/esm/client/version.js +1 -1
- package/package.json +1 -1
package/dist/esm/api.js
CHANGED
|
@@ -75,12 +75,30 @@ export const GeometrySetRelationshipDataTypeEnum = {
|
|
|
75
75
|
export const PartDataRelationshipsPartRevisionsTypeEnum = {
|
|
76
76
|
PartRevision: 'part-revision',
|
|
77
77
|
};
|
|
78
|
+
export const PartInstanceRelationshipDataTypeEnum = {
|
|
79
|
+
PartInstance: 'part-instance',
|
|
80
|
+
};
|
|
78
81
|
export const PartRelationshipDataTypeEnum = {
|
|
79
82
|
Part: 'part',
|
|
80
83
|
};
|
|
81
84
|
export const PartRenditionRelationshipDataTypeEnum = {
|
|
82
85
|
PartRendition: 'part-rendition',
|
|
83
86
|
};
|
|
87
|
+
export const PropertyDateTypeTypeEnum = {
|
|
88
|
+
Date: 'date',
|
|
89
|
+
};
|
|
90
|
+
export const PropertyDoubleTypeTypeEnum = {
|
|
91
|
+
Double: 'double',
|
|
92
|
+
};
|
|
93
|
+
export const PropertyLongTypeTypeEnum = {
|
|
94
|
+
Long: 'long',
|
|
95
|
+
};
|
|
96
|
+
export const PropertySetRelationshipDataTypeEnum = {
|
|
97
|
+
PropertySet: 'property-set',
|
|
98
|
+
};
|
|
99
|
+
export const PropertyStringTypeTypeEnum = {
|
|
100
|
+
String: 'string',
|
|
101
|
+
};
|
|
84
102
|
/**
|
|
85
103
|
* Resource object type.
|
|
86
104
|
* @export
|
|
@@ -3172,6 +3190,119 @@ export class PartRenditionsApi extends BaseAPI {
|
|
|
3172
3190
|
.then((request) => request(this.axios, this.basePath));
|
|
3173
3191
|
}
|
|
3174
3192
|
}
|
|
3193
|
+
/**
|
|
3194
|
+
* PartRevisionInstancesApi - axios parameter creator
|
|
3195
|
+
* @export
|
|
3196
|
+
*/
|
|
3197
|
+
export const PartRevisionInstancesApiAxiosParamCreator = function (configuration) {
|
|
3198
|
+
return {
|
|
3199
|
+
/**
|
|
3200
|
+
* Gets a page of \'part-revision\' instances. An instance is an occurence of a revision that is a child of a parent revision. The returned data will have the ordinal used for ordering and the transform matrix for each occurrence.
|
|
3201
|
+
* @param {string} [filterParent] Parent ID to filter on.
|
|
3202
|
+
* @param {string} [pageCursor] The cursor for the next page of items.
|
|
3203
|
+
* @param {number} [pageSize] The number of items to return.
|
|
3204
|
+
* @param {*} [options] Override http request option.
|
|
3205
|
+
* @throws {RequiredError}
|
|
3206
|
+
*/
|
|
3207
|
+
getPartRevisionInstanceList: (filterParent, pageCursor, pageSize, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
3208
|
+
var _a;
|
|
3209
|
+
const localVarPath = `/part-revision-instances`;
|
|
3210
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3211
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3212
|
+
let baseOptions;
|
|
3213
|
+
if (configuration) {
|
|
3214
|
+
baseOptions = configuration.baseOptions;
|
|
3215
|
+
}
|
|
3216
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
3217
|
+
const localVarHeaderParameter = {};
|
|
3218
|
+
const localVarQueryParameter = {};
|
|
3219
|
+
// authentication OAuth2 required
|
|
3220
|
+
// oauth required
|
|
3221
|
+
yield setOAuthToObject(localVarHeaderParameter, 'OAuth2', [], configuration);
|
|
3222
|
+
if (filterParent !== undefined) {
|
|
3223
|
+
localVarQueryParameter['filter[parent]'] = filterParent;
|
|
3224
|
+
}
|
|
3225
|
+
if (pageCursor !== undefined) {
|
|
3226
|
+
localVarQueryParameter['page[cursor]'] = pageCursor;
|
|
3227
|
+
}
|
|
3228
|
+
if (pageSize !== undefined) {
|
|
3229
|
+
localVarQueryParameter['page[size]'] = pageSize;
|
|
3230
|
+
}
|
|
3231
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3232
|
+
let headersFromBaseOptions = (_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) !== null && _a !== void 0 ? _a : {};
|
|
3233
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3234
|
+
return {
|
|
3235
|
+
url: toPathString(localVarUrlObj),
|
|
3236
|
+
options: localVarRequestOptions,
|
|
3237
|
+
};
|
|
3238
|
+
}),
|
|
3239
|
+
};
|
|
3240
|
+
};
|
|
3241
|
+
/**
|
|
3242
|
+
* PartRevisionInstancesApi - functional programming interface
|
|
3243
|
+
* @export
|
|
3244
|
+
*/
|
|
3245
|
+
export const PartRevisionInstancesApiFp = function (configuration) {
|
|
3246
|
+
const localVarAxiosParamCreator = PartRevisionInstancesApiAxiosParamCreator(configuration);
|
|
3247
|
+
return {
|
|
3248
|
+
/**
|
|
3249
|
+
* Gets a page of \'part-revision\' instances. An instance is an occurence of a revision that is a child of a parent revision. The returned data will have the ordinal used for ordering and the transform matrix for each occurrence.
|
|
3250
|
+
* @param {string} [filterParent] Parent ID to filter on.
|
|
3251
|
+
* @param {string} [pageCursor] The cursor for the next page of items.
|
|
3252
|
+
* @param {number} [pageSize] The number of items to return.
|
|
3253
|
+
* @param {*} [options] Override http request option.
|
|
3254
|
+
* @throws {RequiredError}
|
|
3255
|
+
*/
|
|
3256
|
+
getPartRevisionInstanceList(filterParent, pageCursor, pageSize, options) {
|
|
3257
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3258
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getPartRevisionInstanceList(filterParent, pageCursor, pageSize, options);
|
|
3259
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
3260
|
+
});
|
|
3261
|
+
},
|
|
3262
|
+
};
|
|
3263
|
+
};
|
|
3264
|
+
/**
|
|
3265
|
+
* PartRevisionInstancesApi - factory interface
|
|
3266
|
+
* @export
|
|
3267
|
+
*/
|
|
3268
|
+
export const PartRevisionInstancesApiFactory = function (configuration, basePath, axios) {
|
|
3269
|
+
const localVarFp = PartRevisionInstancesApiFp(configuration);
|
|
3270
|
+
return {
|
|
3271
|
+
/**
|
|
3272
|
+
* Gets a page of \'part-revision\' instances. An instance is an occurence of a revision that is a child of a parent revision. The returned data will have the ordinal used for ordering and the transform matrix for each occurrence.
|
|
3273
|
+
* @param {string} [filterParent] Parent ID to filter on.
|
|
3274
|
+
* @param {string} [pageCursor] The cursor for the next page of items.
|
|
3275
|
+
* @param {number} [pageSize] The number of items to return.
|
|
3276
|
+
* @param {*} [options] Override http request option.
|
|
3277
|
+
* @throws {RequiredError}
|
|
3278
|
+
*/
|
|
3279
|
+
getPartRevisionInstanceList(filterParent, pageCursor, pageSize, options) {
|
|
3280
|
+
return localVarFp
|
|
3281
|
+
.getPartRevisionInstanceList(filterParent, pageCursor, pageSize, options)
|
|
3282
|
+
.then((request) => request(axios, basePath));
|
|
3283
|
+
},
|
|
3284
|
+
};
|
|
3285
|
+
};
|
|
3286
|
+
/**
|
|
3287
|
+
* PartRevisionInstancesApi - object-oriented interface
|
|
3288
|
+
* @export
|
|
3289
|
+
* @class PartRevisionInstancesApi
|
|
3290
|
+
* @extends {BaseAPI}
|
|
3291
|
+
*/
|
|
3292
|
+
export class PartRevisionInstancesApi extends BaseAPI {
|
|
3293
|
+
/**
|
|
3294
|
+
* Gets a page of \'part-revision\' instances. An instance is an occurence of a revision that is a child of a parent revision. The returned data will have the ordinal used for ordering and the transform matrix for each occurrence.
|
|
3295
|
+
* @param {PartRevisionInstancesApiGetPartRevisionInstanceListRequest} requestParameters Request parameters.
|
|
3296
|
+
* @param {*} [options] Override http request option.
|
|
3297
|
+
* @throws {RequiredError}
|
|
3298
|
+
* @memberof PartRevisionInstancesApi
|
|
3299
|
+
*/
|
|
3300
|
+
getPartRevisionInstanceList(requestParameters = {}, options) {
|
|
3301
|
+
return PartRevisionInstancesApiFp(this.configuration)
|
|
3302
|
+
.getPartRevisionInstanceList(requestParameters.filterParent, requestParameters.pageCursor, requestParameters.pageSize, options)
|
|
3303
|
+
.then((request) => request(this.axios, this.basePath));
|
|
3304
|
+
}
|
|
3305
|
+
}
|
|
3175
3306
|
/**
|
|
3176
3307
|
* PartRevisionsApi - axios parameter creator
|
|
3177
3308
|
* @export
|
|
@@ -4209,6 +4340,193 @@ export class PmiApi extends BaseAPI {
|
|
|
4209
4340
|
.then((request) => request(this.axios, this.basePath));
|
|
4210
4341
|
}
|
|
4211
4342
|
}
|
|
4343
|
+
/**
|
|
4344
|
+
* PropertyEntriesApi - axios parameter creator
|
|
4345
|
+
* @export
|
|
4346
|
+
*/
|
|
4347
|
+
export const PropertyEntriesApiAxiosParamCreator = function (configuration) {
|
|
4348
|
+
return {
|
|
4349
|
+
/**
|
|
4350
|
+
* Get `property-entries` by a resource ID **Preview:** This is a preview API and is subject to change.
|
|
4351
|
+
* @param {string} [pageCursor] The cursor for the next page of items.
|
|
4352
|
+
* @param {number} [pageSize] The number of items to return.
|
|
4353
|
+
* @param {string} [filterResourceId] A resource ID to filter on
|
|
4354
|
+
* @param {string} [filterResourceType] The provided type for the resource ids
|
|
4355
|
+
* @param {*} [options] Override http request option.
|
|
4356
|
+
* @throws {RequiredError}
|
|
4357
|
+
*/
|
|
4358
|
+
getPropertyEntries: (pageCursor, pageSize, filterResourceId, filterResourceType, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
4359
|
+
var _a;
|
|
4360
|
+
const localVarPath = `/property-entries`;
|
|
4361
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4362
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4363
|
+
let baseOptions;
|
|
4364
|
+
if (configuration) {
|
|
4365
|
+
baseOptions = configuration.baseOptions;
|
|
4366
|
+
}
|
|
4367
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
4368
|
+
const localVarHeaderParameter = {};
|
|
4369
|
+
const localVarQueryParameter = {};
|
|
4370
|
+
// authentication OAuth2 required
|
|
4371
|
+
// oauth required
|
|
4372
|
+
yield setOAuthToObject(localVarHeaderParameter, 'OAuth2', [], configuration);
|
|
4373
|
+
if (pageCursor !== undefined) {
|
|
4374
|
+
localVarQueryParameter['page[cursor]'] = pageCursor;
|
|
4375
|
+
}
|
|
4376
|
+
if (pageSize !== undefined) {
|
|
4377
|
+
localVarQueryParameter['page[size]'] = pageSize;
|
|
4378
|
+
}
|
|
4379
|
+
if (filterResourceId !== undefined) {
|
|
4380
|
+
localVarQueryParameter['filter[resourceId]'] = filterResourceId;
|
|
4381
|
+
}
|
|
4382
|
+
if (filterResourceType !== undefined) {
|
|
4383
|
+
localVarQueryParameter['filter[resourceType]'] = filterResourceType;
|
|
4384
|
+
}
|
|
4385
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4386
|
+
let headersFromBaseOptions = (_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) !== null && _a !== void 0 ? _a : {};
|
|
4387
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4388
|
+
return {
|
|
4389
|
+
url: toPathString(localVarUrlObj),
|
|
4390
|
+
options: localVarRequestOptions,
|
|
4391
|
+
};
|
|
4392
|
+
}),
|
|
4393
|
+
/**
|
|
4394
|
+
* Upsert property-entries for a provided resource. **Preview:** This is a preview API and is subject to change.
|
|
4395
|
+
* @param {UpsertPropertyEntriesRequest} upsertPropertyEntriesRequest
|
|
4396
|
+
* @param {*} [options] Override http request option.
|
|
4397
|
+
* @throws {RequiredError}
|
|
4398
|
+
*/
|
|
4399
|
+
upsertPropertyEntries: (upsertPropertyEntriesRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
4400
|
+
var _b;
|
|
4401
|
+
// verify required parameter 'upsertPropertyEntriesRequest' is not null or undefined
|
|
4402
|
+
assertParamExists('upsertPropertyEntries', 'upsertPropertyEntriesRequest', upsertPropertyEntriesRequest);
|
|
4403
|
+
const localVarPath = `/property-entries`;
|
|
4404
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4405
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4406
|
+
let baseOptions;
|
|
4407
|
+
if (configuration) {
|
|
4408
|
+
baseOptions = configuration.baseOptions;
|
|
4409
|
+
}
|
|
4410
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
|
|
4411
|
+
const localVarHeaderParameter = {};
|
|
4412
|
+
const localVarQueryParameter = {};
|
|
4413
|
+
// authentication OAuth2 required
|
|
4414
|
+
// oauth required
|
|
4415
|
+
yield setOAuthToObject(localVarHeaderParameter, 'OAuth2', [], configuration);
|
|
4416
|
+
localVarHeaderParameter['Content-Type'] = 'application/vnd.api+json';
|
|
4417
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4418
|
+
let headersFromBaseOptions = (_b = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) !== null && _b !== void 0 ? _b : {};
|
|
4419
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4420
|
+
localVarRequestOptions.data = serializeDataIfNeeded(upsertPropertyEntriesRequest, localVarRequestOptions, configuration);
|
|
4421
|
+
return {
|
|
4422
|
+
url: toPathString(localVarUrlObj),
|
|
4423
|
+
options: localVarRequestOptions,
|
|
4424
|
+
};
|
|
4425
|
+
}),
|
|
4426
|
+
};
|
|
4427
|
+
};
|
|
4428
|
+
/**
|
|
4429
|
+
* PropertyEntriesApi - functional programming interface
|
|
4430
|
+
* @export
|
|
4431
|
+
*/
|
|
4432
|
+
export const PropertyEntriesApiFp = function (configuration) {
|
|
4433
|
+
const localVarAxiosParamCreator = PropertyEntriesApiAxiosParamCreator(configuration);
|
|
4434
|
+
return {
|
|
4435
|
+
/**
|
|
4436
|
+
* Get `property-entries` by a resource ID **Preview:** This is a preview API and is subject to change.
|
|
4437
|
+
* @param {string} [pageCursor] The cursor for the next page of items.
|
|
4438
|
+
* @param {number} [pageSize] The number of items to return.
|
|
4439
|
+
* @param {string} [filterResourceId] A resource ID to filter on
|
|
4440
|
+
* @param {string} [filterResourceType] The provided type for the resource ids
|
|
4441
|
+
* @param {*} [options] Override http request option.
|
|
4442
|
+
* @throws {RequiredError}
|
|
4443
|
+
*/
|
|
4444
|
+
getPropertyEntries(pageCursor, pageSize, filterResourceId, filterResourceType, options) {
|
|
4445
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4446
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getPropertyEntries(pageCursor, pageSize, filterResourceId, filterResourceType, options);
|
|
4447
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
4448
|
+
});
|
|
4449
|
+
},
|
|
4450
|
+
/**
|
|
4451
|
+
* Upsert property-entries for a provided resource. **Preview:** This is a preview API and is subject to change.
|
|
4452
|
+
* @param {UpsertPropertyEntriesRequest} upsertPropertyEntriesRequest
|
|
4453
|
+
* @param {*} [options] Override http request option.
|
|
4454
|
+
* @throws {RequiredError}
|
|
4455
|
+
*/
|
|
4456
|
+
upsertPropertyEntries(upsertPropertyEntriesRequest, options) {
|
|
4457
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
4458
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.upsertPropertyEntries(upsertPropertyEntriesRequest, options);
|
|
4459
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
4460
|
+
});
|
|
4461
|
+
},
|
|
4462
|
+
};
|
|
4463
|
+
};
|
|
4464
|
+
/**
|
|
4465
|
+
* PropertyEntriesApi - factory interface
|
|
4466
|
+
* @export
|
|
4467
|
+
*/
|
|
4468
|
+
export const PropertyEntriesApiFactory = function (configuration, basePath, axios) {
|
|
4469
|
+
const localVarFp = PropertyEntriesApiFp(configuration);
|
|
4470
|
+
return {
|
|
4471
|
+
/**
|
|
4472
|
+
* Get `property-entries` by a resource ID **Preview:** This is a preview API and is subject to change.
|
|
4473
|
+
* @param {string} [pageCursor] The cursor for the next page of items.
|
|
4474
|
+
* @param {number} [pageSize] The number of items to return.
|
|
4475
|
+
* @param {string} [filterResourceId] A resource ID to filter on
|
|
4476
|
+
* @param {string} [filterResourceType] The provided type for the resource ids
|
|
4477
|
+
* @param {*} [options] Override http request option.
|
|
4478
|
+
* @throws {RequiredError}
|
|
4479
|
+
*/
|
|
4480
|
+
getPropertyEntries(pageCursor, pageSize, filterResourceId, filterResourceType, options) {
|
|
4481
|
+
return localVarFp
|
|
4482
|
+
.getPropertyEntries(pageCursor, pageSize, filterResourceId, filterResourceType, options)
|
|
4483
|
+
.then((request) => request(axios, basePath));
|
|
4484
|
+
},
|
|
4485
|
+
/**
|
|
4486
|
+
* Upsert property-entries for a provided resource. **Preview:** This is a preview API and is subject to change.
|
|
4487
|
+
* @param {UpsertPropertyEntriesRequest} upsertPropertyEntriesRequest
|
|
4488
|
+
* @param {*} [options] Override http request option.
|
|
4489
|
+
* @throws {RequiredError}
|
|
4490
|
+
*/
|
|
4491
|
+
upsertPropertyEntries(upsertPropertyEntriesRequest, options) {
|
|
4492
|
+
return localVarFp
|
|
4493
|
+
.upsertPropertyEntries(upsertPropertyEntriesRequest, options)
|
|
4494
|
+
.then((request) => request(axios, basePath));
|
|
4495
|
+
},
|
|
4496
|
+
};
|
|
4497
|
+
};
|
|
4498
|
+
/**
|
|
4499
|
+
* PropertyEntriesApi - object-oriented interface
|
|
4500
|
+
* @export
|
|
4501
|
+
* @class PropertyEntriesApi
|
|
4502
|
+
* @extends {BaseAPI}
|
|
4503
|
+
*/
|
|
4504
|
+
export class PropertyEntriesApi extends BaseAPI {
|
|
4505
|
+
/**
|
|
4506
|
+
* Get `property-entries` by a resource ID **Preview:** This is a preview API and is subject to change.
|
|
4507
|
+
* @param {PropertyEntriesApiGetPropertyEntriesRequest} requestParameters Request parameters.
|
|
4508
|
+
* @param {*} [options] Override http request option.
|
|
4509
|
+
* @throws {RequiredError}
|
|
4510
|
+
* @memberof PropertyEntriesApi
|
|
4511
|
+
*/
|
|
4512
|
+
getPropertyEntries(requestParameters = {}, options) {
|
|
4513
|
+
return PropertyEntriesApiFp(this.configuration)
|
|
4514
|
+
.getPropertyEntries(requestParameters.pageCursor, requestParameters.pageSize, requestParameters.filterResourceId, requestParameters.filterResourceType, options)
|
|
4515
|
+
.then((request) => request(this.axios, this.basePath));
|
|
4516
|
+
}
|
|
4517
|
+
/**
|
|
4518
|
+
* Upsert property-entries for a provided resource. **Preview:** This is a preview API and is subject to change.
|
|
4519
|
+
* @param {PropertyEntriesApiUpsertPropertyEntriesRequest} requestParameters Request parameters.
|
|
4520
|
+
* @param {*} [options] Override http request option.
|
|
4521
|
+
* @throws {RequiredError}
|
|
4522
|
+
* @memberof PropertyEntriesApi
|
|
4523
|
+
*/
|
|
4524
|
+
upsertPropertyEntries(requestParameters, options) {
|
|
4525
|
+
return PropertyEntriesApiFp(this.configuration)
|
|
4526
|
+
.upsertPropertyEntries(requestParameters.upsertPropertyEntriesRequest, options)
|
|
4527
|
+
.then((request) => request(this.axios, this.basePath));
|
|
4528
|
+
}
|
|
4529
|
+
}
|
|
4212
4530
|
/**
|
|
4213
4531
|
* SceneAlterationsApi - axios parameter creator
|
|
4214
4532
|
* @export
|
|
@@ -33,6 +33,8 @@ export interface GetPartRevisionBySuppliedIdReq extends BaseReq {
|
|
|
33
33
|
readonly suppliedPartId: string;
|
|
34
34
|
/** A supplied part revision ID. */
|
|
35
35
|
readonly suppliedRevisionId: string;
|
|
36
|
+
/** An optional supplied part revision iteration ID. */
|
|
37
|
+
readonly suppliedIterationId?: string;
|
|
36
38
|
}
|
|
37
39
|
/**
|
|
38
40
|
* Create part and file resources if they don't already exist.
|
|
@@ -59,7 +61,7 @@ export declare function deleteAllParts({ client, pageSize, exceptions, }: Delete
|
|
|
59
61
|
*
|
|
60
62
|
* @param args - The {@link GetPartRevisionBySuppliedIdReq}.
|
|
61
63
|
*/
|
|
62
|
-
export declare function getPartRevisionBySuppliedId({ client, suppliedPartId, suppliedRevisionId, }: GetPartRevisionBySuppliedIdReq): Promise<PartRevisionData | undefined>;
|
|
64
|
+
export declare function getPartRevisionBySuppliedId({ client, suppliedPartId, suppliedRevisionId, suppliedIterationId, }: GetPartRevisionBySuppliedIdReq): Promise<PartRevisionData | undefined>;
|
|
63
65
|
/**
|
|
64
66
|
* Render a part revision.
|
|
65
67
|
*
|
|
@@ -33,18 +33,27 @@ export function createPartFromFile(_a) {
|
|
|
33
33
|
const createPartRequest = createPartReq(file.id);
|
|
34
34
|
const suppliedPartId = createPartRequest.data.attributes.suppliedId;
|
|
35
35
|
const suppliedRevisionId = createPartRequest.data.attributes.suppliedRevisionId;
|
|
36
|
+
const suppliedIterationId = createPartRequest.data.attributes.suppliedIterationId;
|
|
36
37
|
if (suppliedPartId && suppliedRevisionId) {
|
|
37
38
|
const existingPartRev = yield getPartRevisionBySuppliedId({
|
|
38
39
|
client,
|
|
39
40
|
suppliedPartId,
|
|
40
41
|
suppliedRevisionId,
|
|
42
|
+
suppliedIterationId,
|
|
41
43
|
verbose,
|
|
42
44
|
onMsg,
|
|
43
45
|
});
|
|
44
46
|
if (existingPartRev) {
|
|
45
47
|
if (verbose) {
|
|
46
|
-
|
|
47
|
-
`'${
|
|
48
|
+
if (suppliedIterationId) {
|
|
49
|
+
onMsg(`part-revision with suppliedId '${suppliedPartId}', suppliedRevisionId ` +
|
|
50
|
+
`'${suppliedRevisionId}' and suppliedIterationId ` +
|
|
51
|
+
`'${suppliedIterationId}' already exists, using it, ${existingPartRev.id}`);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
onMsg(`part-revision with suppliedId '${suppliedPartId}' and suppliedRevisionId ` +
|
|
55
|
+
`'${suppliedRevisionId}' already exists, using it, ${existingPartRev.id}`);
|
|
56
|
+
}
|
|
48
57
|
}
|
|
49
58
|
return {
|
|
50
59
|
partRevision: existingPartRev,
|
|
@@ -115,7 +124,7 @@ export function deleteAllParts({ client, pageSize = 100, exceptions = new Set(),
|
|
|
115
124
|
*
|
|
116
125
|
* @param args - The {@link GetPartRevisionBySuppliedIdReq}.
|
|
117
126
|
*/
|
|
118
|
-
export function getPartRevisionBySuppliedId({ client, suppliedPartId, suppliedRevisionId, }) {
|
|
127
|
+
export function getPartRevisionBySuppliedId({ client, suppliedPartId, suppliedRevisionId, suppliedIterationId, }) {
|
|
119
128
|
return __awaiter(this, void 0, void 0, function* () {
|
|
120
129
|
const existingPart = yield getBySuppliedId(() => client.parts.getParts({
|
|
121
130
|
pageSize: 1,
|
|
@@ -126,7 +135,7 @@ export function getPartRevisionBySuppliedId({ client, suppliedPartId, suppliedRe
|
|
|
126
135
|
id: existingPart.id,
|
|
127
136
|
pageSize: 1,
|
|
128
137
|
filterSuppliedId: encodeIfNotEncoded(suppliedRevisionId),
|
|
129
|
-
}), suppliedRevisionId);
|
|
138
|
+
}), suppliedRevisionId, suppliedIterationId);
|
|
130
139
|
if (existingPartRev)
|
|
131
140
|
return existingPartRev;
|
|
132
141
|
}
|
|
@@ -75,10 +75,11 @@ export declare function envVar(key: string): string;
|
|
|
75
75
|
export declare function getBySuppliedId<T extends {
|
|
76
76
|
attributes: {
|
|
77
77
|
suppliedId?: string;
|
|
78
|
+
suppliedIterationId?: string;
|
|
78
79
|
};
|
|
79
80
|
}, TRes extends {
|
|
80
81
|
data: T[];
|
|
81
|
-
}>(getter: () => Promise<AxiosResponse<TRes>>, suppliedId?: string): Promise<T | undefined>;
|
|
82
|
+
}>(getter: () => Promise<AxiosResponse<TRes>>, suppliedId?: string, suppliedIterationId?: string): Promise<T | undefined>;
|
|
82
83
|
/**
|
|
83
84
|
* Get an Error message produced by {@link VertexClient}.
|
|
84
85
|
*
|
package/dist/esm/client/utils.js
CHANGED
|
@@ -92,15 +92,17 @@ export function envVar(key) {
|
|
|
92
92
|
* @param suppliedId - ID to match.
|
|
93
93
|
* @returns Item if and only if it matches ID.
|
|
94
94
|
*/
|
|
95
|
-
export function getBySuppliedId(getter, suppliedId) {
|
|
95
|
+
export function getBySuppliedId(getter, suppliedId, suppliedIterationId) {
|
|
96
96
|
return __awaiter(this, void 0, void 0, function* () {
|
|
97
97
|
if (!suppliedId)
|
|
98
98
|
return undefined;
|
|
99
99
|
const res = yield getter();
|
|
100
100
|
if (res.data.data.length > 0) {
|
|
101
101
|
const item = head(res.data.data);
|
|
102
|
-
if (item.attributes.suppliedId === suppliedId
|
|
102
|
+
if (item.attributes.suppliedId === suppliedId &&
|
|
103
|
+
item.attributes.suppliedIterationId === suppliedIterationId) {
|
|
103
104
|
return item;
|
|
105
|
+
}
|
|
104
106
|
}
|
|
105
107
|
return undefined;
|
|
106
108
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.
|
|
1
|
+
export declare const version = "0.24.0";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '0.
|
|
1
|
+
export const version = '0.24.0';
|
package/package.json
CHANGED