diff --git a/api.ts b/api.ts index c804292..c62b81c 100644 --- a/api.ts +++ b/api.ts @@ -2338,6 +2338,51 @@ export interface CreateSceneItemRequestDataRelationships { */ referenceTree?: SceneItemRelationship; } +/** + * A reference to a scene to be created for a thread. + * @export + * @interface CreateSceneReference + */ +export interface CreateSceneReference { + /** + * + * @type {string} + * @memberof CreateSceneReference + */ + type: CreateSceneReferenceTypeEnum; + /** + * ID of the resource. + * @type {string} + * @memberof CreateSceneReference + */ + sceneId: string; + /** + * + * @type {Vector3} + * @memberof CreateSceneReference + */ + position?: Vector3; + /** + * + * @type {WithSceneViewId | WithSceneViewStateId} + * @memberof CreateSceneReference + */ + withSceneViewState?: WithSceneViewId | WithSceneViewStateId; + /** + * ID of the resource. + * @type {string} + * @memberof CreateSceneReference + */ + sceneItemId?: string; +} + +export const CreateSceneReferenceTypeEnum = { + SceneReference: 'scene-reference', +} as const; + +export type CreateSceneReferenceTypeEnum = + (typeof CreateSceneReferenceTypeEnum)[keyof typeof CreateSceneReferenceTypeEnum]; + /** * * @export @@ -2808,6 +2853,12 @@ export interface CreateThreadRequestDataAttributes { * @memberof CreateThreadRequestDataAttributes */ body?: string; + /** + * + * @type {CreateSceneReference} + * @memberof CreateThreadRequestDataAttributes + */ + reference?: CreateSceneReference; } /** * @@ -7390,6 +7441,51 @@ export interface SceneOperation { | ClearRepOp >; } +/** + * A reference to a scene for a thread. + * @export + * @interface SceneReference + */ +export interface SceneReference { + /** + * + * @type {string} + * @memberof SceneReference + */ + type: SceneReferenceTypeEnum; + /** + * ID of the resource. + * @type {string} + * @memberof SceneReference + */ + sceneId: string; + /** + * + * @type {Vector3} + * @memberof SceneReference + */ + position?: Vector3; + /** + * ID of the resource. + * @type {string} + * @memberof SceneReference + */ + sceneViewStateId?: string; + /** + * ID of the resource. + * @type {string} + * @memberof SceneReference + */ + sceneItemId?: string; +} + +export const SceneReferenceTypeEnum = { + SceneReference: 'scene-reference', +} as const; + +export type SceneReferenceTypeEnum = + (typeof SceneReferenceTypeEnum)[keyof typeof SceneReferenceTypeEnum]; + /** * Relationship to a `scene`. * @export @@ -8346,6 +8442,12 @@ export interface ThreadDataAttributes { * @memberof ThreadDataAttributes */ replyCount?: number; + /** + * + * @type {SceneReference} + * @memberof ThreadDataAttributes + */ + reference?: SceneReference; } /** * @@ -8793,6 +8895,51 @@ export const UpdateItemToDefaultRenditionOperationTypeEnum = { export type UpdateItemToDefaultRenditionOperationTypeEnum = (typeof UpdateItemToDefaultRenditionOperationTypeEnum)[keyof typeof UpdateItemToDefaultRenditionOperationTypeEnum]; +/** + * + * @export + * @interface UpdatePartRequest + */ +export interface UpdatePartRequest { + /** + * + * @type {UpdatePartRequestData} + * @memberof UpdatePartRequest + */ + data: UpdatePartRequestData; +} +/** + * + * @export + * @interface UpdatePartRequestData + */ +export interface UpdatePartRequestData { + /** + * Resource object type. + * @type {string} + * @memberof UpdatePartRequestData + */ + type: string; + /** + * + * @type {UpdatePartRequestDataAttributes} + * @memberof UpdatePartRequestData + */ + attributes: UpdatePartRequestDataAttributes; +} +/** + * + * @export + * @interface UpdatePartRequestDataAttributes + */ +export interface UpdatePartRequestDataAttributes { + /** + * Name to be used for the root part. + * @type {string} + * @memberof UpdatePartRequestDataAttributes + */ + name?: string; +} /** * * @export @@ -10385,6 +10532,59 @@ export interface WebhookSubscriptionList { */ links: { [key: string]: Link }; } +/** + * A sceneViewId to be associated as a reference. + * @export + * @interface WithSceneViewId + */ +export interface WithSceneViewId { + /** + * + * @type {string} + * @memberof WithSceneViewId + */ + type: WithSceneViewIdTypeEnum; + /** + * ID of the resource. + * @type {string} + * @memberof WithSceneViewId + */ + sceneViewId: string; +} + +export const WithSceneViewIdTypeEnum = { + SceneViewId: 'scene-view-id', +} as const; + +export type WithSceneViewIdTypeEnum = + (typeof WithSceneViewIdTypeEnum)[keyof typeof WithSceneViewIdTypeEnum]; + +/** + * A sceneViewStateId to be associated as a reference. + * @export + * @interface WithSceneViewStateId + */ +export interface WithSceneViewStateId { + /** + * + * @type {string} + * @memberof WithSceneViewStateId + */ + type: WithSceneViewStateIdTypeEnum; + /** + * ID of the resource. + * @type {string} + * @memberof WithSceneViewStateId + */ + sceneViewStateId: string; +} + +export const WithSceneViewStateIdTypeEnum = { + SceneViewStateId: 'scene-view-state-id', +} as const; + +export type WithSceneViewStateIdTypeEnum = + (typeof WithSceneViewStateIdTypeEnum)[keyof typeof WithSceneViewStateIdTypeEnum]; /** * AccountsApi - axios parameter creator @@ -19962,6 +20162,70 @@ export const PartsApiAxiosParamCreator = function ( ...options.headers, }; + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Update a `part` by ID + * @param {string} id The `part` ID. + * @param {UpdatePartRequest} updatePartRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatePart: async ( + id: string, + updatePartRequest: UpdatePartRequest, + options: AxiosRequestConfig = {} + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('updatePart', 'id', id); + // verify required parameter 'updatePartRequest' is not null or undefined + assertParamExists('updatePart', 'updatePartRequest', updatePartRequest); + const localVarPath = `/parts/{id}`.replace( + `{${'id'}}`, + encodeURIComponent(String(id)) + ); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: 'PATCH', + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication OAuth2 required + // oauth required + await setOAuthToObject( + localVarHeaderParameter, + 'OAuth2', + [], + configuration + ); + + localVarHeaderParameter['Content-Type'] = 'application/vnd.api+json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions?.headers ?? {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + localVarRequestOptions.data = serializeDataIfNeeded( + updatePartRequest, + localVarRequestOptions, + configuration + ); + return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, @@ -20102,6 +20366,32 @@ export const PartsApiFp = function (configuration?: Configuration) { configuration ); }, + /** + * Update a `part` by ID + * @param {string} id The `part` ID. + * @param {UpdatePartRequest} updatePartRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async updatePart( + id: string, + updatePartRequest: UpdatePartRequest, + options?: AxiosRequestConfig + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = await localVarAxiosParamCreator.updatePart( + id, + updatePartRequest, + options + ); + return createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration + ); + }, }; }; @@ -20190,6 +20480,22 @@ export const PartsApiFactory = function ( .getQueuedPartDeletion(id, options) .then((request) => request(axios, basePath)); }, + /** + * Update a `part` by ID + * @param {string} id The `part` ID. + * @param {UpdatePartRequest} updatePartRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updatePart( + id: string, + updatePartRequest: UpdatePartRequest, + options?: any + ): AxiosPromise { + return localVarFp + .updatePart(id, updatePartRequest, options) + .then((request) => request(axios, basePath)); + }, }; }; @@ -20291,6 +20597,27 @@ export interface PartsApiGetQueuedPartDeletionRequest { readonly id: string; } +/** + * Request parameters for updatePart operation in PartsApi. + * @export + * @interface PartsApiUpdatePartRequest + */ +export interface PartsApiUpdatePartRequest { + /** + * The `part` ID. + * @type {string} + * @memberof PartsApiUpdatePart + */ + readonly id: string; + + /** + * + * @type {UpdatePartRequest} + * @memberof PartsApiUpdatePart + */ + readonly updatePartRequest: UpdatePartRequest; +} + /** * PartsApi - object-oriented interface * @export @@ -20383,6 +20710,26 @@ export class PartsApi extends BaseAPI { .getQueuedPartDeletion(requestParameters.id, options) .then((request) => request(this.axios, this.basePath)); } + + /** + * Update a `part` by ID + * @param {PartsApiUpdatePartRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof PartsApi + */ + public updatePart( + requestParameters: PartsApiUpdatePartRequest, + options?: AxiosRequestConfig + ) { + return PartsApiFp(this.configuration) + .updatePart( + requestParameters.id, + requestParameters.updatePartRequest, + options + ) + .then((request) => request(this.axios, this.basePath)); + } } /** @@ -29765,6 +30112,59 @@ export const ThreadsApiAxiosParamCreator = function ( options: localVarRequestOptions, }; }, + /** + * Get a `thread`s `user`s. + * @param {string} id The `thread` ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getThreadParticipants: async ( + id: string, + options: AxiosRequestConfig = {} + ): Promise => { + // verify required parameter 'id' is not null or undefined + assertParamExists('getThreadParticipants', 'id', id); + const localVarPath = `/threads/{id}/users`.replace( + `{${'id'}}`, + encodeURIComponent(String(id)) + ); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { + method: 'GET', + ...baseOptions, + ...options, + }; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication OAuth2 required + // oauth required + await setOAuthToObject( + localVarHeaderParameter, + 'OAuth2', + [], + configuration + ); + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions?.headers ?? {}; + localVarRequestOptions.headers = { + ...localVarHeaderParameter, + ...headersFromBaseOptions, + ...options.headers, + }; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * Get a page of `thread`s. * @param {string} [fieldsThread] Comma-separated list of fields to return in response. An empty value returns no fields. Due to its potential size, metadata is only returned if explicitly requested. @@ -29907,6 +30307,27 @@ export const ThreadsApiFp = function (configuration?: Configuration) { configuration ); }, + /** + * Get a `thread`s `user`s. + * @param {string} id The `thread` ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getThreadParticipants( + id: string, + options?: AxiosRequestConfig + ): Promise< + (axios?: AxiosInstance, basePath?: string) => AxiosPromise + > { + const localVarAxiosArgs = + await localVarAxiosParamCreator.getThreadParticipants(id, options); + return createRequestFunction( + localVarAxiosArgs, + globalAxios, + BASE_PATH, + configuration + ); + }, /** * Get a page of `thread`s. * @param {string} [fieldsThread] Comma-separated list of fields to return in response. An empty value returns no fields. Due to its potential size, metadata is only returned if explicitly requested. @@ -29990,6 +30411,17 @@ export const ThreadsApiFactory = function ( .getThread(id, fieldsThread, include, options) .then((request) => request(axios, basePath)); }, + /** + * Get a `thread`s `user`s. + * @param {string} id The `thread` ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getThreadParticipants(id: string, options?: any): AxiosPromise { + return localVarFp + .getThreadParticipants(id, options) + .then((request) => request(axios, basePath)); + }, /** * Get a page of `thread`s. * @param {string} [fieldsThread] Comma-separated list of fields to return in response. An empty value returns no fields. Due to its potential size, metadata is only returned if explicitly requested. @@ -30071,6 +30503,20 @@ export interface ThreadsApiGetThreadRequest { readonly include?: string; } +/** + * Request parameters for getThreadParticipants operation in ThreadsApi. + * @export + * @interface ThreadsApiGetThreadParticipantsRequest + */ +export interface ThreadsApiGetThreadParticipantsRequest { + /** + * The `thread` ID. + * @type {string} + * @memberof ThreadsApiGetThreadParticipants + */ + readonly id: string; +} + /** * Request parameters for getThreads operation in ThreadsApi. * @export @@ -30161,6 +30607,22 @@ export class ThreadsApi extends BaseAPI { .then((request) => request(this.axios, this.basePath)); } + /** + * Get a `thread`s `user`s. + * @param {ThreadsApiGetThreadParticipantsRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ThreadsApi + */ + public getThreadParticipants( + requestParameters: ThreadsApiGetThreadParticipantsRequest, + options?: AxiosRequestConfig + ) { + return ThreadsApiFp(this.configuration) + .getThreadParticipants(requestParameters.id, options) + .then((request) => request(this.axios, this.basePath)); + } + /** * Get a page of `thread`s. * @param {ThreadsApiGetThreadsRequest} requestParameters Request parameters. diff --git a/client/version.ts b/client/version.ts index 3916e0a..ff66c86 100644 --- a/client/version.ts +++ b/client/version.ts @@ -1 +1 @@ -export const version = '0.32.0'; +export const version = '0.33.0'; diff --git a/package.json b/package.json index cfa7a5c..712a88a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@vertexvis/api-client-node", - "version": "0.32.0", + "version": "0.33.0", "description": "The Vertex REST API client for Node.js.", "license": "MIT", "author": "Vertex Developers (https://developer.vertexvis.com)", diff --git a/spec.yml b/spec.yml index 80a8c4d..feb81a7 100644 --- a/spec.yml +++ b/spec.yml @@ -1298,6 +1298,65 @@ paths: - OAuth2: [] tags: - threads + /threads/{id}/users: + get: + description: Get a `thread`s `user`s. + operationId: getThreadParticipants + parameters: + - description: The `thread` ID. + explode: false + in: path + name: id + required: true + schema: + $ref: '#/components/schemas/Uuid' + style: simple + responses: + '200': + content: + application/vnd.api+json: + schema: + $ref: '#/components/schemas/UserList' + description: OK + '400': + content: + application/vnd.api+json: + example: + errors: + - status: '400' + code: BadRequest + title: Invalid, missing, or out-of-range request parameters. + schema: + $ref: '#/components/schemas/Failure' + description: Bad Request + '401': + content: + application/vnd.api+json: + example: + errors: + - status: '401' + code: Unauthorized + title: Invalid or missing credentials. + schema: + $ref: '#/components/schemas/Failure' + description: Unauthorized + '415': + content: + application/vnd.api+json: + example: + errors: + - status: '415' + code: UnsupportedMediaType + title: + The provided media type is not supported. Update the Content-Type + header to application/vnd.api+json and try again. + schema: + $ref: '#/components/schemas/Failure' + description: Unsupported Media Type + security: + - OAuth2: [] + tags: + - threads /threads: get: description: Get a page of `thread`s. @@ -4256,6 +4315,64 @@ paths: - OAuth2: [] tags: - parts + patch: + description: Update a `part` by ID + operationId: updatePart + parameters: + - description: The `part` ID. + explode: false + in: path + name: id + required: true + schema: + $ref: '#/components/schemas/Uuid' + style: simple + requestBody: + content: + application/vnd.api+json: + schema: + $ref: '#/components/schemas/UpdatePartRequest' + required: true + responses: + '202': + description: No Content + '400': + content: + application/vnd.api+json: + example: + errors: + - status: '400' + code: BadRequest + title: Invalid, missing, or out-of-range request parameters. + schema: + $ref: '#/components/schemas/Failure' + description: Bad Request + '401': + content: + application/vnd.api+json: + example: + errors: + - status: '401' + code: Unauthorized + title: Invalid or missing credentials. + schema: + $ref: '#/components/schemas/Failure' + description: Unauthorized + '404': + content: + application/vnd.api+json: + example: + errors: + - status: '404' + code: NotFound + title: The requested resource was not found. + schema: + $ref: '#/components/schemas/Failure' + description: Not Found + security: + - OAuth2: [] + tags: + - parts /queued-part-deletions/{id}: get: description: Get a `queued-part-deletion` by ID. @@ -10956,6 +11073,21 @@ components: required: - data type: object + UserList: + additionalProperties: false + properties: + data: + items: + $ref: '#/components/schemas/UserData' + type: array + links: + additionalProperties: + $ref: '#/components/schemas/Link' + type: object + required: + - data + - links + type: object ThreadList: additionalProperties: false properties: @@ -11449,6 +11581,14 @@ components: required: - data type: object + UpdatePartRequest: + additionalProperties: false + properties: + data: + $ref: '#/components/schemas/UpdatePartRequest_data' + required: + - data + type: object ModelView: additionalProperties: false properties: @@ -12097,21 +12237,6 @@ components: required: - data type: object - UserList: - additionalProperties: false - properties: - data: - items: - $ref: '#/components/schemas/UserData' - type: array - links: - additionalProperties: - $ref: '#/components/schemas/Link' - type: object - required: - - data - - links - type: object CreateUserRequest: additionalProperties: false properties: @@ -12539,6 +12664,38 @@ components: - open - resolved type: string + CreateSceneReference: + additionalProperties: false + description: A reference to a scene to be created for a thread. + properties: + type: + enum: + - scene-reference + type: string + sceneId: + description: ID of the resource. + example: f79d4760-0b71-44e4-ad0b-22743fdd4ca3 + format: uuid + maxLength: 36 + type: string + position: + $ref: '#/components/schemas/Vector3' + withSceneViewState: + discriminator: + propertyName: type + oneOf: + - $ref: '#/components/schemas/WithSceneViewId' + - $ref: '#/components/schemas/WithSceneViewStateId' + sceneItemId: + description: ID of the resource. + example: f79d4760-0b71-44e4-ad0b-22743fdd4ca3 + format: uuid + maxLength: 36 + type: string + required: + - sceneId + - type + type: object ThreadData: additionalProperties: false properties: @@ -14209,6 +14366,74 @@ components: required: - data type: object + WithSceneViewId: + additionalProperties: false + description: A sceneViewId to be associated as a reference. + properties: + type: + enum: + - scene-view-id + type: string + sceneViewId: + description: ID of the resource. + example: f79d4760-0b71-44e4-ad0b-22743fdd4ca3 + format: uuid + maxLength: 36 + type: string + required: + - sceneViewId + - type + type: object + WithSceneViewStateId: + additionalProperties: false + description: A sceneViewStateId to be associated as a reference. + properties: + type: + enum: + - scene-view-state-id + type: string + sceneViewStateId: + description: ID of the resource. + example: f79d4760-0b71-44e4-ad0b-22743fdd4ca3 + format: uuid + maxLength: 36 + type: string + required: + - sceneViewStateId + - type + type: object + SceneReference: + additionalProperties: false + description: A reference to a scene for a thread. + properties: + type: + enum: + - scene-reference + type: string + sceneId: + description: ID of the resource. + example: f79d4760-0b71-44e4-ad0b-22743fdd4ca3 + format: uuid + maxLength: 36 + type: string + position: + $ref: '#/components/schemas/Vector3' + sceneViewStateId: + description: ID of the resource. + example: f79d4760-0b71-44e4-ad0b-22743fdd4ca3 + format: uuid + maxLength: 36 + type: string + sceneItemId: + description: ID of the resource. + example: f79d4760-0b71-44e4-ad0b-22743fdd4ca3 + format: uuid + maxLength: 36 + type: string + required: + - sceneId + - type + type: object CollaborationContextRelationship: additionalProperties: false properties: @@ -15357,6 +15582,11 @@ components: type: string body: type: string + reference: + discriminator: + propertyName: type + oneOf: + - $ref: '#/components/schemas/CreateSceneReference' required: - status - type @@ -15966,6 +16196,27 @@ components: - attributes - type type: object + UpdatePartRequest_data_attributes: + properties: + name: + description: Name to be used for the root part. + example: 1/2in. Flat Washer + maxLength: 255 + type: string + type: object + UpdatePartRequest_data: + properties: + type: + description: Resource object type. + example: part + maxLength: 32 + type: string + attributes: + $ref: '#/components/schemas/UpdatePartRequest_data_attributes' + required: + - attributes + - type + type: object UpsertPropertyEntriesRequest_data_attributes: properties: entries: @@ -16963,6 +17214,11 @@ components: replyCount: format: int32 type: integer + reference: + discriminator: + propertyName: type + oneOf: + - $ref: '#/components/schemas/SceneReference' required: - createdAt - modifiedAt