diff --git a/api.ts b/api.ts index 1fa2004..2c33b25 100644 --- a/api.ts +++ b/api.ts @@ -3,7 +3,7 @@ /** * VRChat API Documentation * - * The version of the OpenAPI document: 1.16.8 + * The version of the OpenAPI document: 1.17.0 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -2319,6 +2319,21 @@ export interface Group { */ 'roles'?: Array | null; } +/** + * Group access type when the instance type is \"group\" + * @export + * @enum {string} + */ + +export const GroupAccessType = { + Public: 'public', + Plus: 'plus', + Member: 'member' +} as const; + +export type GroupAccessType = typeof GroupAccessType[keyof typeof GroupAccessType]; + + /** * * @export @@ -3394,11 +3409,11 @@ export interface Instance { */ 'name': string; /** - * A users unique ID, usually in the form of `usr_c1644b5b-3ca4-45b4-97c6-a2a0de70d469`. Legacy players can have old IDs in the form of `8JoV9XEdpo`. The ID can never be changed. + * A groupId if the instance type is \"group\", null if instance type is public, or a userId otherwise * @type {string} * @memberof Instance */ - 'ownerId'?: string; + 'ownerId'?: string | null; /** * * @type {boolean} @@ -3434,7 +3449,7 @@ export interface Instance { * @type {string} * @memberof Instance */ - 'shortName'?: string; + 'shortName'?: string | null; /** * The tags array on Instances usually contain the language tags of the people in the instance. * @type {Array} @@ -3494,7 +3509,7 @@ export interface Instance { * @type {boolean} * @memberof Instance */ - 'roleRestricted': boolean; + 'roleRestricted'?: boolean; /** * * @type {boolean} @@ -3519,6 +3534,36 @@ export interface Instance { * @memberof Instance */ 'users'?: Array; + /** + * + * @type {GroupAccessType} + * @memberof Instance + */ + 'groupAccessType'?: GroupAccessType; + /** + * + * @type {boolean} + * @memberof Instance + */ + 'hasCapacityForYou'?: boolean; + /** + * + * @type {string} + * @memberof Instance + */ + 'nonce'?: string; + /** + * + * @type {string} + * @memberof Instance + */ + 'closedAt'?: string | null; + /** + * + * @type {boolean} + * @memberof Instance + */ + 'hardClose'?: boolean | null; } /** * @@ -12898,6 +12943,51 @@ export class GroupsApi extends BaseAPI { */ export const InstancesApiAxiosParamCreator = function (configuration?: Configuration) { return { + /** + * Close an instance. You can only close an instance if the ownerId is yourself or if the instance owner is a group and you have the `group-instance-moderate` permission. + * @summary Close Instance + * @param {string} worldId Must be a valid world ID. + * @param {string} instanceId Must be a valid instance ID. + * @param {boolean} [hardClose] Whether to hard close the instance. Defaults to false. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + closeInstance: async (worldId: string, instanceId: string, hardClose?: boolean, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'worldId' is not null or undefined + assertParamExists('closeInstance', 'worldId', worldId) + // verify required parameter 'instanceId' is not null or undefined + assertParamExists('closeInstance', 'instanceId', instanceId) + const localVarPath = `/instances/{worldId}:{instanceId}` + .replace(`{${"worldId"}}`, encodeURIComponent(String(worldId))) + .replace(`{${"instanceId"}}`, encodeURIComponent(String(instanceId))); + // 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: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication authCookie required + + if (hardClose !== undefined) { + localVarQueryParameter['hardClose'] = hardClose; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * Returns an instance. Please read [Instances Tutorial](https://vrchatapi.github.io/tutorials/instances/) for more information on Instances. If an invalid instanceId is provided, this endpoint will simply return \"null\"! * @summary Get Instance @@ -13064,6 +13154,19 @@ export const InstancesApiAxiosParamCreator = function (configuration?: Configura export const InstancesApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = InstancesApiAxiosParamCreator(configuration) return { + /** + * Close an instance. You can only close an instance if the ownerId is yourself or if the instance owner is a group and you have the `group-instance-moderate` permission. + * @summary Close Instance + * @param {string} worldId Must be a valid world ID. + * @param {string} instanceId Must be a valid instance ID. + * @param {boolean} [hardClose] Whether to hard close the instance. Defaults to false. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async closeInstance(worldId: string, instanceId: string, hardClose?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.closeInstance(worldId, instanceId, hardClose, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * Returns an instance. Please read [Instances Tutorial](https://vrchatapi.github.io/tutorials/instances/) for more information on Instances. If an invalid instanceId is provided, this endpoint will simply return \"null\"! * @summary Get Instance @@ -13121,6 +13224,18 @@ export const InstancesApiFp = function(configuration?: Configuration) { export const InstancesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = InstancesApiFp(configuration) return { + /** + * Close an instance. You can only close an instance if the ownerId is yourself or if the instance owner is a group and you have the `group-instance-moderate` permission. + * @summary Close Instance + * @param {string} worldId Must be a valid world ID. + * @param {string} instanceId Must be a valid instance ID. + * @param {boolean} [hardClose] Whether to hard close the instance. Defaults to false. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + closeInstance(worldId: string, instanceId: string, hardClose?: boolean, options?: any): AxiosPromise { + return localVarFp.closeInstance(worldId, instanceId, hardClose, options).then((request) => request(axios, basePath)); + }, /** * Returns an instance. Please read [Instances Tutorial](https://vrchatapi.github.io/tutorials/instances/) for more information on Instances. If an invalid instanceId is provided, this endpoint will simply return \"null\"! * @summary Get Instance @@ -13174,6 +13289,20 @@ export const InstancesApiFactory = function (configuration?: Configuration, base * @extends {BaseAPI} */ export class InstancesApi extends BaseAPI { + /** + * Close an instance. You can only close an instance if the ownerId is yourself or if the instance owner is a group and you have the `group-instance-moderate` permission. + * @summary Close Instance + * @param {string} worldId Must be a valid world ID. + * @param {string} instanceId Must be a valid instance ID. + * @param {boolean} [hardClose] Whether to hard close the instance. Defaults to false. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof InstancesApi + */ + public closeInstance(worldId: string, instanceId: string, hardClose?: boolean, options?: AxiosRequestConfig) { + return InstancesApiFp(this.configuration).closeInstance(worldId, instanceId, hardClose, options).then((request) => request(this.axios, this.basePath)); + } + /** * Returns an instance. Please read [Instances Tutorial](https://vrchatapi.github.io/tutorials/instances/) for more information on Instances. If an invalid instanceId is provided, this endpoint will simply return \"null\"! * @summary Get Instance diff --git a/base.ts b/base.ts index 3f058fd..926a71e 100644 --- a/base.ts +++ b/base.ts @@ -3,7 +3,7 @@ /** * VRChat API Documentation * - * The version of the OpenAPI document: 1.16.8 + * The version of the OpenAPI document: 1.17.0 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/common.ts b/common.ts index 69fa2a8..b76eb35 100644 --- a/common.ts +++ b/common.ts @@ -3,7 +3,7 @@ /** * VRChat API Documentation * - * The version of the OpenAPI document: 1.16.8 + * The version of the OpenAPI document: 1.17.0 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/configuration.ts b/configuration.ts index 9df6282..fd8c4a1 100644 --- a/configuration.ts +++ b/configuration.ts @@ -3,7 +3,7 @@ /** * VRChat API Documentation * - * The version of the OpenAPI document: 1.16.8 + * The version of the OpenAPI document: 1.17.0 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/index.ts b/index.ts index 9f4dc85..ef5cf03 100644 --- a/index.ts +++ b/index.ts @@ -3,7 +3,7 @@ /** * VRChat API Documentation * - * The version of the OpenAPI document: 1.16.8 + * The version of the OpenAPI document: 1.17.0 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). diff --git a/package-lock.json b/package-lock.json index 2d6a9bb..ce2036f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "vrchat", - "version": "1.16.8", + "version": "1.17.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "vrchat", - "version": "1.16.8", + "version": "1.17.0", "license": "MIT", "dependencies": { "@types/tough-cookie": "^4.0.1", diff --git a/package.json b/package.json index 050f6c5..6a2f0c6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vrchat", - "version": "1.16.8", + "version": "1.17.0", "description": "🟡🔵 VRChat API Library for JavaScript and TypeScript", "author": "OpenAPI-Generator Contributors", "repository": {