Skip to content

Commit

Permalink
Upgrade Node SDK to spec 1.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
VRCCat committed Apr 15, 2024
1 parent 0012d27 commit ea7140d
Show file tree
Hide file tree
Showing 7 changed files with 141 additions and 12 deletions.
139 changes: 134 additions & 5 deletions api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down Expand Up @@ -2319,6 +2319,21 @@ export interface Group {
*/
'roles'?: Array<GroupRole> | 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
Expand Down Expand Up @@ -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}
Expand Down Expand Up @@ -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<string>}
Expand Down Expand Up @@ -3494,7 +3509,7 @@ export interface Instance {
* @type {boolean}
* @memberof Instance
*/
'roleRestricted': boolean;
'roleRestricted'?: boolean;
/**
*
* @type {boolean}
Expand All @@ -3519,6 +3534,36 @@ export interface Instance {
* @memberof Instance
*/
'users'?: Array<LimitedUser>;
/**
*
* @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;
}
/**
*
Expand Down Expand Up @@ -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<RequestArgs> => {
// 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
Expand Down Expand Up @@ -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<Instance>> {
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
Expand Down Expand Up @@ -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<Instance> {
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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down

0 comments on commit ea7140d

Please sign in to comment.