-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
141 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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). | ||
|
@@ -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 | ||
|
@@ -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<string>} | ||
|
@@ -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<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; | ||
} | ||
/** | ||
* | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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). | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters