diff --git a/api.ts b/api.ts index 69299a8..b73a697 100644 --- a/api.ts +++ b/api.ts @@ -3,7 +3,7 @@ /** * VRChat API Documentation * - * The version of the OpenAPI document: 1.17.1 + * The version of the OpenAPI document: 1.17.2 * Contact: vrchatapi.lpv0t@aries.fyi * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). @@ -1097,6 +1097,49 @@ export interface CreateGroupInviteRequest { */ 'confirmOverrideBlock'?: boolean; } +/** + * + * @export + * @interface CreateGroupPostRequest + */ +export interface CreateGroupPostRequest { + /** + * Post title + * @type {string} + * @memberof CreateGroupPostRequest + */ + 'title': string; + /** + * Post text + * @type {string} + * @memberof CreateGroupPostRequest + */ + 'text': string; + /** + * + * @type {string} + * @memberof CreateGroupPostRequest + */ + 'imageId'?: string; + /** + * Send notification to group members. + * @type {boolean} + * @memberof CreateGroupPostRequest + */ + 'sendNotification': boolean; + /** + * + * @type {Array} + * @memberof CreateGroupPostRequest + */ + 'roleIds'?: Array; + /** + * + * @type {GroupPostVisibility} + * @memberof CreateGroupPostRequest + */ + 'visibility': GroupPostVisibility; +} /** * * @export @@ -3039,6 +3082,99 @@ export interface GroupPermission { */ 'allowedToAdd'?: boolean; } +/** + * + * @export + * @interface GroupPost + */ +export interface GroupPost { + /** + * + * @type {string} + * @memberof GroupPost + */ + 'id'?: string; + /** + * + * @type {string} + * @memberof GroupPost + */ + 'groupId'?: 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. + * @type {string} + * @memberof GroupPost + */ + 'authorId'?: 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. + * @type {string} + * @memberof GroupPost + */ + 'editorId'?: string; + /** + * + * @type {GroupPostVisibility} + * @memberof GroupPost + */ + 'visibility'?: GroupPostVisibility; + /** + * + * @type {Array} + * @memberof GroupPost + */ + 'roleId'?: Array; + /** + * + * @type {string} + * @memberof GroupPost + */ + 'title'?: string; + /** + * + * @type {string} + * @memberof GroupPost + */ + 'text'?: string; + /** + * + * @type {string} + * @memberof GroupPost + */ + 'imageId'?: string; + /** + * + * @type {string} + * @memberof GroupPost + */ + 'imageUrl'?: string | null; + /** + * + * @type {string} + * @memberof GroupPost + */ + 'createdAt'?: string; + /** + * + * @type {string} + * @memberof GroupPost + */ + 'updatedAt'?: string; +} +/** + * + * @export + * @enum {string} + */ + +export const GroupPostVisibility = { + Group: 'group', + Public: 'public' +} as const; + +export type GroupPostVisibility = typeof GroupPostVisibility[keyof typeof GroupPostVisibility]; + + /** * * @export @@ -10099,6 +10235,48 @@ export const GroupsApiAxiosParamCreator = function (configuration?: Configuratio options: localVarRequestOptions, }; }, + /** + * Create a post in a Group. + * @summary Create a post in a Group + * @param {string} groupId Must be a valid group ID. + * @param {CreateGroupPostRequest} createGroupPostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + addGroupPost: async (groupId: string, createGroupPostRequest: CreateGroupPostRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'groupId' is not null or undefined + assertParamExists('addGroupPost', 'groupId', groupId) + // verify required parameter 'createGroupPostRequest' is not null or undefined + assertParamExists('addGroupPost', 'createGroupPostRequest', createGroupPostRequest) + const localVarPath = `/groups/{groupId}/posts` + .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))); + // 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: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication authCookie required + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(createGroupPostRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, /** * Bans a user from a Group. * @summary Ban Group Member @@ -10570,6 +10748,46 @@ export const GroupsApiAxiosParamCreator = function (configuration?: Configuratio + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Delete a Group post + * @summary Delete a Group post + * @param {string} groupId Must be a valid group ID. + * @param {string} notificationId Must be a valid notification ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteGroupPost: async (groupId: string, notificationId: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'groupId' is not null or undefined + assertParamExists('deleteGroupPost', 'groupId', groupId) + // verify required parameter 'notificationId' is not null or undefined + assertParamExists('deleteGroupPost', 'notificationId', notificationId) + const localVarPath = `/groups/{groupId}/posts/{notificationId}` + .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))) + .replace(`{${"notificationId"}}`, encodeURIComponent(String(notificationId))); + // 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 + + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -11057,6 +11275,57 @@ export const GroupsApiAxiosParamCreator = function (configuration?: Configuratio + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get posts from a Group + * @summary Get posts from a Group + * @param {string} groupId Must be a valid group ID. + * @param {number} [n] The number of objects to return. + * @param {number} [offset] A zero-based offset from the default object sorting from where search results start. + * @param {boolean} [publicOnly] See public posts only. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getGroupPost: async (groupId: string, n?: number, offset?: number, publicOnly?: boolean, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'groupId' is not null or undefined + assertParamExists('getGroupPost', 'groupId', groupId) + const localVarPath = `/groups/{groupId}/posts` + .replace(`{${"groupId"}}`, encodeURIComponent(String(groupId))); + // 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 authCookie required + + if (n !== undefined) { + localVarQueryParameter['n'] = n; + } + + if (offset !== undefined) { + localVarQueryParameter['offset'] = offset; + } + + if (publicOnly !== undefined) { + localVarQueryParameter['publicOnly'] = publicOnly; + } + + + setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; @@ -11643,6 +11912,18 @@ export const GroupsApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.addGroupMemberRole(groupId, userId, groupRoleId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * Create a post in a Group. + * @summary Create a post in a Group + * @param {string} groupId Must be a valid group ID. + * @param {CreateGroupPostRequest} createGroupPostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async addGroupPost(groupId: string, createGroupPostRequest: CreateGroupPostRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addGroupPost(groupId, createGroupPostRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * Bans a user from a Group. * @summary Ban Group Member @@ -11784,6 +12065,18 @@ export const GroupsApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.deleteGroupInvite(groupId, userId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * Delete a Group post + * @summary Delete a Group post + * @param {string} groupId Must be a valid group ID. + * @param {string} notificationId Must be a valid notification ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteGroupPost(groupId: string, notificationId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteGroupPost(groupId, notificationId, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * Deletes a Group Role by ID and returns the remaining roles. * @summary Delete Group Role @@ -11923,6 +12216,20 @@ export const GroupsApiFp = function(configuration?: Configuration) { const localVarAxiosArgs = await localVarAxiosParamCreator.getGroupPermissions(groupId, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, + /** + * Get posts from a Group + * @summary Get posts from a Group + * @param {string} groupId Must be a valid group ID. + * @param {number} [n] The number of objects to return. + * @param {number} [offset] A zero-based offset from the default object sorting from where search results start. + * @param {boolean} [publicOnly] See public posts only. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getGroupPost(groupId: string, n?: number, offset?: number, publicOnly?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getGroupPost(groupId, n, offset, publicOnly, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, /** * Returns a list of members that have requested to join the Group. * @summary Get Group Join Requests @@ -12117,6 +12424,17 @@ export const GroupsApiFactory = function (configuration?: Configuration, basePat addGroupMemberRole(groupId: string, userId: string, groupRoleId: string, options?: any): AxiosPromise> { return localVarFp.addGroupMemberRole(groupId, userId, groupRoleId, options).then((request) => request(axios, basePath)); }, + /** + * Create a post in a Group. + * @summary Create a post in a Group + * @param {string} groupId Must be a valid group ID. + * @param {CreateGroupPostRequest} createGroupPostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + addGroupPost(groupId: string, createGroupPostRequest: CreateGroupPostRequest, options?: any): AxiosPromise { + return localVarFp.addGroupPost(groupId, createGroupPostRequest, options).then((request) => request(axios, basePath)); + }, /** * Bans a user from a Group. * @summary Ban Group Member @@ -12246,6 +12564,17 @@ export const GroupsApiFactory = function (configuration?: Configuration, basePat deleteGroupInvite(groupId: string, userId: string, options?: any): AxiosPromise { return localVarFp.deleteGroupInvite(groupId, userId, options).then((request) => request(axios, basePath)); }, + /** + * Delete a Group post + * @summary Delete a Group post + * @param {string} groupId Must be a valid group ID. + * @param {string} notificationId Must be a valid notification ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteGroupPost(groupId: string, notificationId: string, options?: any): AxiosPromise { + return localVarFp.deleteGroupPost(groupId, notificationId, options).then((request) => request(axios, basePath)); + }, /** * Deletes a Group Role by ID and returns the remaining roles. * @summary Delete Group Role @@ -12374,6 +12703,19 @@ export const GroupsApiFactory = function (configuration?: Configuration, basePat getGroupPermissions(groupId: string, options?: any): AxiosPromise> { return localVarFp.getGroupPermissions(groupId, options).then((request) => request(axios, basePath)); }, + /** + * Get posts from a Group + * @summary Get posts from a Group + * @param {string} groupId Must be a valid group ID. + * @param {number} [n] The number of objects to return. + * @param {number} [offset] A zero-based offset from the default object sorting from where search results start. + * @param {boolean} [publicOnly] See public posts only. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getGroupPost(groupId: string, n?: number, offset?: number, publicOnly?: boolean, options?: any): AxiosPromise { + return localVarFp.getGroupPost(groupId, n, offset, publicOnly, options).then((request) => request(axios, basePath)); + }, /** * Returns a list of members that have requested to join the Group. * @summary Get Group Join Requests @@ -12559,6 +12901,19 @@ export class GroupsApi extends BaseAPI { return GroupsApiFp(this.configuration).addGroupMemberRole(groupId, userId, groupRoleId, options).then((request) => request(this.axios, this.basePath)); } + /** + * Create a post in a Group. + * @summary Create a post in a Group + * @param {string} groupId Must be a valid group ID. + * @param {CreateGroupPostRequest} createGroupPostRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GroupsApi + */ + public addGroupPost(groupId: string, createGroupPostRequest: CreateGroupPostRequest, options?: AxiosRequestConfig) { + return GroupsApiFp(this.configuration).addGroupPost(groupId, createGroupPostRequest, options).then((request) => request(this.axios, this.basePath)); + } + /** * Bans a user from a Group. * @summary Ban Group Member @@ -12712,6 +13067,19 @@ export class GroupsApi extends BaseAPI { return GroupsApiFp(this.configuration).deleteGroupInvite(groupId, userId, options).then((request) => request(this.axios, this.basePath)); } + /** + * Delete a Group post + * @summary Delete a Group post + * @param {string} groupId Must be a valid group ID. + * @param {string} notificationId Must be a valid notification ID. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GroupsApi + */ + public deleteGroupPost(groupId: string, notificationId: string, options?: AxiosRequestConfig) { + return GroupsApiFp(this.configuration).deleteGroupPost(groupId, notificationId, options).then((request) => request(this.axios, this.basePath)); + } + /** * Deletes a Group Role by ID and returns the remaining roles. * @summary Delete Group Role @@ -12862,6 +13230,21 @@ export class GroupsApi extends BaseAPI { return GroupsApiFp(this.configuration).getGroupPermissions(groupId, options).then((request) => request(this.axios, this.basePath)); } + /** + * Get posts from a Group + * @summary Get posts from a Group + * @param {string} groupId Must be a valid group ID. + * @param {number} [n] The number of objects to return. + * @param {number} [offset] A zero-based offset from the default object sorting from where search results start. + * @param {boolean} [publicOnly] See public posts only. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof GroupsApi + */ + public getGroupPost(groupId: string, n?: number, offset?: number, publicOnly?: boolean, options?: AxiosRequestConfig) { + return GroupsApiFp(this.configuration).getGroupPost(groupId, n, offset, publicOnly, options).then((request) => request(this.axios, this.basePath)); + } + /** * Returns a list of members that have requested to join the Group. * @summary Get Group Join Requests diff --git a/base.ts b/base.ts index 19466d5..2741ad4 100644 --- a/base.ts +++ b/base.ts @@ -3,7 +3,7 @@ /** * VRChat API Documentation * - * The version of the OpenAPI document: 1.17.1 + * The version of the OpenAPI document: 1.17.2 * 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 430fc47..14733b2 100644 --- a/common.ts +++ b/common.ts @@ -3,7 +3,7 @@ /** * VRChat API Documentation * - * The version of the OpenAPI document: 1.17.1 + * The version of the OpenAPI document: 1.17.2 * 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 9f20db4..86dc712 100644 --- a/configuration.ts +++ b/configuration.ts @@ -3,7 +3,7 @@ /** * VRChat API Documentation * - * The version of the OpenAPI document: 1.17.1 + * The version of the OpenAPI document: 1.17.2 * 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 bb4ab49..a5f3d5b 100644 --- a/index.ts +++ b/index.ts @@ -3,7 +3,7 @@ /** * VRChat API Documentation * - * The version of the OpenAPI document: 1.17.1 + * The version of the OpenAPI document: 1.17.2 * 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 b44c4d3..8b4b643 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "vrchat", - "version": "1.17.1", + "version": "1.17.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "vrchat", - "version": "1.17.1", + "version": "1.17.2", "license": "MIT", "dependencies": { "@types/tough-cookie": "^4.0.1", @@ -56,9 +56,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", - "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "funding": [ { "type": "individual", @@ -171,9 +171,9 @@ } }, "follow-redirects": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", - "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==" + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==" }, "is-redirect": { "version": "1.0.0", diff --git a/package.json b/package.json index 4b7a6f7..e8c520b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vrchat", - "version": "1.17.1", + "version": "1.17.2", "description": "🟡🔵 VRChat API Library for JavaScript and TypeScript", "author": "OpenAPI-Generator Contributors", "repository": {