// This file is auto-generated, don't edit it /** */ import Util, * as $Util from '@alicloud/tea-util'; import GatewayClient from '@alicloud/gateway-dingtalk'; import OpenApi, * as $OpenApi from '@alicloud/openapi-client'; import OpenApiUtil from '@alicloud/openapi-util'; import * as $tea from '@alicloud/tea-typescript'; export class CreateGroupBlackboardHeaders extends $tea.Model { commonHeaders?: { [key: string]: string }; xAcsDingtalkAccessToken?: string; static names(): { [key: string]: string } { return { commonHeaders: 'commonHeaders', xAcsDingtalkAccessToken: 'x-acs-dingtalk-access-token', }; } static types(): { [key: string]: any } { return { commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, xAcsDingtalkAccessToken: 'string', }; } constructor(map?: { [key: string]: any }) { super(map); } } export class CreateGroupBlackboardRequest extends $tea.Model { /** * @remarks * This parameter is required. * * @example * 这是一条群公告 */ content?: string; /** * @remarks * This parameter is required. * * @example * cid123456 */ openConversationId?: string; /** * @example * false */ sendDing?: boolean; /** * @example * false */ sticky?: boolean; /** * @remarks * This parameter is required. * * @example * xxx */ uniqueId?: string; /** * @remarks * This parameter is required. * * @example * 001 */ userId?: string; static names(): { [key: string]: string } { return { content: 'content', openConversationId: 'openConversationId', sendDing: 'sendDing', sticky: 'sticky', uniqueId: 'uniqueId', userId: 'userId', }; } static types(): { [key: string]: any } { return { content: 'string', openConversationId: 'string', sendDing: 'boolean', sticky: 'boolean', uniqueId: 'string', userId: 'string', }; } constructor(map?: { [key: string]: any }) { super(map); } } export class CreateGroupBlackboardResponseBody extends $tea.Model { /** * @example * 123456 */ dataId?: string; /** * @remarks * This parameter is required. * * @example * true */ success?: boolean; static names(): { [key: string]: string } { return { dataId: 'dataId', success: 'success', }; } static types(): { [key: string]: any } { return { dataId: 'string', success: 'boolean', }; } constructor(map?: { [key: string]: any }) { super(map); } } export class CreateGroupBlackboardResponse extends $tea.Model { headers?: { [key: string]: string }; statusCode?: number; body?: CreateGroupBlackboardResponseBody; static names(): { [key: string]: string } { return { headers: 'headers', statusCode: 'statusCode', body: 'body', }; } static types(): { [key: string]: any } { return { headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, statusCode: 'number', body: CreateGroupBlackboardResponseBody, }; } constructor(map?: { [key: string]: any }) { super(map); } } export class CreateGroupBlackboardNewHeaders extends $tea.Model { commonHeaders?: { [key: string]: string }; xAcsDingtalkAccessToken?: string; static names(): { [key: string]: string } { return { commonHeaders: 'commonHeaders', xAcsDingtalkAccessToken: 'x-acs-dingtalk-access-token', }; } static types(): { [key: string]: any } { return { commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, xAcsDingtalkAccessToken: 'string', }; } constructor(map?: { [key: string]: any }) { super(map); } } export class CreateGroupBlackboardNewRequest extends $tea.Model { content?: string; openConversationId?: string; sendDing?: boolean; sticky?: boolean; uniqueId?: string; userId?: string; static names(): { [key: string]: string } { return { content: 'content', openConversationId: 'openConversationId', sendDing: 'sendDing', sticky: 'sticky', uniqueId: 'uniqueId', userId: 'userId', }; } static types(): { [key: string]: any } { return { content: 'string', openConversationId: 'string', sendDing: 'boolean', sticky: 'boolean', uniqueId: 'string', userId: 'string', }; } constructor(map?: { [key: string]: any }) { super(map); } } export class CreateGroupBlackboardNewResponseBody extends $tea.Model { dataId?: string; success?: boolean; static names(): { [key: string]: string } { return { dataId: 'dataId', success: 'success', }; } static types(): { [key: string]: any } { return { dataId: 'string', success: 'boolean', }; } constructor(map?: { [key: string]: any }) { super(map); } } export class CreateGroupBlackboardNewResponse extends $tea.Model { headers?: { [key: string]: string }; statusCode?: number; body?: CreateGroupBlackboardNewResponseBody; static names(): { [key: string]: string } { return { headers: 'headers', statusCode: 'statusCode', body: 'body', }; } static types(): { [key: string]: any } { return { headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, statusCode: 'number', body: CreateGroupBlackboardNewResponseBody, }; } constructor(map?: { [key: string]: any }) { super(map); } } export class DeleteGroupBlackboardHeaders extends $tea.Model { commonHeaders?: { [key: string]: string }; xAcsDingtalkAccessToken?: string; static names(): { [key: string]: string } { return { commonHeaders: 'commonHeaders', xAcsDingtalkAccessToken: 'x-acs-dingtalk-access-token', }; } static types(): { [key: string]: any } { return { commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, xAcsDingtalkAccessToken: 'string', }; } constructor(map?: { [key: string]: any }) { super(map); } } export class DeleteGroupBlackboardRequest extends $tea.Model { /** * @remarks * This parameter is required. * * @example * e3b4f5 */ dataId?: string; /** * @remarks * This parameter is required. * * @example * cid123456 */ openConversationId?: string; /** * @remarks * This parameter is required. * * @example * 001 */ userId?: string; static names(): { [key: string]: string } { return { dataId: 'dataId', openConversationId: 'openConversationId', userId: 'userId', }; } static types(): { [key: string]: any } { return { dataId: 'string', openConversationId: 'string', userId: 'string', }; } constructor(map?: { [key: string]: any }) { super(map); } } export class DeleteGroupBlackboardResponseBody extends $tea.Model { /** * @example * true */ isDeleted?: boolean; /** * @remarks * This parameter is required. * * @example * true */ success?: boolean; static names(): { [key: string]: string } { return { isDeleted: 'isDeleted', success: 'success', }; } static types(): { [key: string]: any } { return { isDeleted: 'boolean', success: 'boolean', }; } constructor(map?: { [key: string]: any }) { super(map); } } export class DeleteGroupBlackboardResponse extends $tea.Model { headers?: { [key: string]: string }; statusCode?: number; body?: DeleteGroupBlackboardResponseBody; static names(): { [key: string]: string } { return { headers: 'headers', statusCode: 'statusCode', body: 'body', }; } static types(): { [key: string]: any } { return { headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, statusCode: 'number', body: DeleteGroupBlackboardResponseBody, }; } constructor(map?: { [key: string]: any }) { super(map); } } export class DeleteGroupBlackboardNewHeaders extends $tea.Model { commonHeaders?: { [key: string]: string }; xAcsDingtalkAccessToken?: string; static names(): { [key: string]: string } { return { commonHeaders: 'commonHeaders', xAcsDingtalkAccessToken: 'x-acs-dingtalk-access-token', }; } static types(): { [key: string]: any } { return { commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, xAcsDingtalkAccessToken: 'string', }; } constructor(map?: { [key: string]: any }) { super(map); } } export class DeleteGroupBlackboardNewRequest extends $tea.Model { dataId?: string; openConversationId?: string; userId?: string; static names(): { [key: string]: string } { return { dataId: 'dataId', openConversationId: 'openConversationId', userId: 'userId', }; } static types(): { [key: string]: any } { return { dataId: 'string', openConversationId: 'string', userId: 'string', }; } constructor(map?: { [key: string]: any }) { super(map); } } export class DeleteGroupBlackboardNewResponseBody extends $tea.Model { isDeleted?: boolean; success?: boolean; static names(): { [key: string]: string } { return { isDeleted: 'isDeleted', success: 'success', }; } static types(): { [key: string]: any } { return { isDeleted: 'boolean', success: 'boolean', }; } constructor(map?: { [key: string]: any }) { super(map); } } export class DeleteGroupBlackboardNewResponse extends $tea.Model { headers?: { [key: string]: string }; statusCode?: number; body?: DeleteGroupBlackboardNewResponseBody; static names(): { [key: string]: string } { return { headers: 'headers', statusCode: 'statusCode', body: 'body', }; } static types(): { [key: string]: any } { return { headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, statusCode: 'number', body: DeleteGroupBlackboardNewResponseBody, }; } constructor(map?: { [key: string]: any }) { super(map); } } export class EditGroupBlackboardHeaders extends $tea.Model { commonHeaders?: { [key: string]: string }; xAcsDingtalkAccessToken?: string; static names(): { [key: string]: string } { return { commonHeaders: 'commonHeaders', xAcsDingtalkAccessToken: 'x-acs-dingtalk-access-token', }; } static types(): { [key: string]: any } { return { commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, xAcsDingtalkAccessToken: 'string', }; } constructor(map?: { [key: string]: any }) { super(map); } } export class EditGroupBlackboardRequest extends $tea.Model { content?: string; dataId?: string; openConversationId?: string; sticky?: boolean; userId?: string; static names(): { [key: string]: string } { return { content: 'content', dataId: 'dataId', openConversationId: 'openConversationId', sticky: 'sticky', userId: 'userId', }; } static types(): { [key: string]: any } { return { content: 'string', dataId: 'string', openConversationId: 'string', sticky: 'boolean', userId: 'string', }; } constructor(map?: { [key: string]: any }) { super(map); } } export class EditGroupBlackboardResponseBody extends $tea.Model { dataId?: string; success?: boolean; static names(): { [key: string]: string } { return { dataId: 'dataId', success: 'success', }; } static types(): { [key: string]: any } { return { dataId: 'string', success: 'boolean', }; } constructor(map?: { [key: string]: any }) { super(map); } } export class EditGroupBlackboardResponse extends $tea.Model { headers?: { [key: string]: string }; statusCode?: number; body?: EditGroupBlackboardResponseBody; static names(): { [key: string]: string } { return { headers: 'headers', statusCode: 'statusCode', body: 'body', }; } static types(): { [key: string]: any } { return { headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, statusCode: 'number', body: EditGroupBlackboardResponseBody, }; } constructor(map?: { [key: string]: any }) { super(map); } } export class GetGroupBlackboardHeaders extends $tea.Model { commonHeaders?: { [key: string]: string }; xAcsDingtalkAccessToken?: string; static names(): { [key: string]: string } { return { commonHeaders: 'commonHeaders', xAcsDingtalkAccessToken: 'x-acs-dingtalk-access-token', }; } static types(): { [key: string]: any } { return { commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, xAcsDingtalkAccessToken: 'string', }; } constructor(map?: { [key: string]: any }) { super(map); } } export class GetGroupBlackboardRequest extends $tea.Model { dataId?: string; openConversationId?: string; userId?: string; static names(): { [key: string]: string } { return { dataId: 'dataId', openConversationId: 'openConversationId', userId: 'userId', }; } static types(): { [key: string]: any } { return { dataId: 'string', openConversationId: 'string', userId: 'string', }; } constructor(map?: { [key: string]: any }) { super(map); } } export class GetGroupBlackboardResponseBody extends $tea.Model { result?: GetGroupBlackboardResponseBodyResult; success?: boolean; static names(): { [key: string]: string } { return { result: 'result', success: 'success', }; } static types(): { [key: string]: any } { return { result: GetGroupBlackboardResponseBodyResult, success: 'boolean', }; } constructor(map?: { [key: string]: any }) { super(map); } } export class GetGroupBlackboardResponse extends $tea.Model { headers?: { [key: string]: string }; statusCode?: number; body?: GetGroupBlackboardResponseBody; static names(): { [key: string]: string } { return { headers: 'headers', statusCode: 'statusCode', body: 'body', }; } static types(): { [key: string]: any } { return { headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, statusCode: 'number', body: GetGroupBlackboardResponseBody, }; } constructor(map?: { [key: string]: any }) { super(map); } } export class ListGroupBlackboardHeaders extends $tea.Model { commonHeaders?: { [key: string]: string }; xAcsDingtalkAccessToken?: string; static names(): { [key: string]: string } { return { commonHeaders: 'commonHeaders', xAcsDingtalkAccessToken: 'x-acs-dingtalk-access-token', }; } static types(): { [key: string]: any } { return { commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, xAcsDingtalkAccessToken: 'string', }; } constructor(map?: { [key: string]: any }) { super(map); } } export class ListGroupBlackboardRequest extends $tea.Model { nextPageCursor?: string; openConversationId?: string; pageSize?: number; userId?: string; static names(): { [key: string]: string } { return { nextPageCursor: 'nextPageCursor', openConversationId: 'openConversationId', pageSize: 'pageSize', userId: 'userId', }; } static types(): { [key: string]: any } { return { nextPageCursor: 'string', openConversationId: 'string', pageSize: 'number', userId: 'string', }; } constructor(map?: { [key: string]: any }) { super(map); } } export class ListGroupBlackboardResponseBody extends $tea.Model { blackboardList?: ListGroupBlackboardResponseBodyBlackboardList[]; hasMore?: boolean; nextPageCursor?: string; success?: boolean; static names(): { [key: string]: string } { return { blackboardList: 'blackboardList', hasMore: 'hasMore', nextPageCursor: 'nextPageCursor', success: 'success', }; } static types(): { [key: string]: any } { return { blackboardList: { 'type': 'array', 'itemType': ListGroupBlackboardResponseBodyBlackboardList }, hasMore: 'boolean', nextPageCursor: 'string', success: 'boolean', }; } constructor(map?: { [key: string]: any }) { super(map); } } export class ListGroupBlackboardResponse extends $tea.Model { headers?: { [key: string]: string }; statusCode?: number; body?: ListGroupBlackboardResponseBody; static names(): { [key: string]: string } { return { headers: 'headers', statusCode: 'statusCode', body: 'body', }; } static types(): { [key: string]: any } { return { headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' }, statusCode: 'number', body: ListGroupBlackboardResponseBody, }; } constructor(map?: { [key: string]: any }) { super(map); } } export class GetGroupBlackboardResponseBodyResult extends $tea.Model { content?: string; dataId?: string; gmtCreate?: number; gmtModified?: number; readCount?: number; sticky?: boolean; title?: string; userId?: string; userName?: string; static names(): { [key: string]: string } { return { content: 'content', dataId: 'dataId', gmtCreate: 'gmtCreate', gmtModified: 'gmtModified', readCount: 'readCount', sticky: 'sticky', title: 'title', userId: 'userId', userName: 'userName', }; } static types(): { [key: string]: any } { return { content: 'string', dataId: 'string', gmtCreate: 'number', gmtModified: 'number', readCount: 'number', sticky: 'boolean', title: 'string', userId: 'string', userName: 'string', }; } constructor(map?: { [key: string]: any }) { super(map); } } export class ListGroupBlackboardResponseBodyBlackboardList extends $tea.Model { content?: string; dataId?: string; gmtCreate?: number; gmtModified?: number; readCount?: number; sticky?: boolean; title?: string; userId?: string; userName?: string; static names(): { [key: string]: string } { return { content: 'content', dataId: 'dataId', gmtCreate: 'gmtCreate', gmtModified: 'gmtModified', readCount: 'readCount', sticky: 'sticky', title: 'title', userId: 'userId', userName: 'userName', }; } static types(): { [key: string]: any } { return { content: 'string', dataId: 'string', gmtCreate: 'number', gmtModified: 'number', readCount: 'number', sticky: 'boolean', title: 'string', userId: 'string', userName: 'string', }; } constructor(map?: { [key: string]: any }) { super(map); } } export default class Client extends OpenApi { constructor(config: $OpenApi.Config) { super(config); let gatewayClient = new GatewayClient(); this._spi = gatewayClient; this._endpointRule = ""; if (Util.empty(this._endpoint)) { this._endpoint = "api.dingtalk.com"; } } /** * 创建群公告 * * @param request - CreateGroupBlackboardRequest * @param headers - CreateGroupBlackboardHeaders * @param runtime - runtime options for this request RuntimeOptions * @returns CreateGroupBlackboardResponse */ async createGroupBlackboardWithOptions(request: CreateGroupBlackboardRequest, headers: CreateGroupBlackboardHeaders, runtime: $Util.RuntimeOptions): Promise { Util.validateModel(request); let body : {[key: string ]: any} = { }; if (!Util.isUnset(request.content)) { body["content"] = request.content; } if (!Util.isUnset(request.openConversationId)) { body["openConversationId"] = request.openConversationId; } if (!Util.isUnset(request.sendDing)) { body["sendDing"] = request.sendDing; } if (!Util.isUnset(request.sticky)) { body["sticky"] = request.sticky; } if (!Util.isUnset(request.uniqueId)) { body["uniqueId"] = request.uniqueId; } if (!Util.isUnset(request.userId)) { body["userId"] = request.userId; } let realHeaders : {[key: string ]: string} = { }; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.xAcsDingtalkAccessToken)) { realHeaders["x-acs-dingtalk-access-token"] = Util.toJSONString(headers.xAcsDingtalkAccessToken); } let req = new $OpenApi.OpenApiRequest({ headers: realHeaders, body: OpenApiUtil.parseToMap(body), }); let params = new $OpenApi.Params({ action: "CreateGroupBlackboard", version: "groupBlackboard_1.0", protocol: "HTTP", pathname: `/v1.0/groupBlackboard/blackboards`, method: "POST", authType: "AK", style: "ROA", reqBodyType: "none", bodyType: "json", }); return $tea.cast(await this.execute(params, req, runtime), new CreateGroupBlackboardResponse({})); } /** * 创建群公告 * * @param request - CreateGroupBlackboardRequest * @returns CreateGroupBlackboardResponse */ async createGroupBlackboard(request: CreateGroupBlackboardRequest): Promise { let runtime = new $Util.RuntimeOptions({ }); let headers = new CreateGroupBlackboardHeaders({ }); return await this.createGroupBlackboardWithOptions(request, headers, runtime); } /** * 创建群公告 * * @param request - CreateGroupBlackboardNewRequest * @param headers - CreateGroupBlackboardNewHeaders * @param runtime - runtime options for this request RuntimeOptions * @returns CreateGroupBlackboardNewResponse */ async createGroupBlackboardNewWithOptions(request: CreateGroupBlackboardNewRequest, headers: CreateGroupBlackboardNewHeaders, runtime: $Util.RuntimeOptions): Promise { Util.validateModel(request); let body : {[key: string ]: any} = { }; if (!Util.isUnset(request.content)) { body["content"] = request.content; } if (!Util.isUnset(request.openConversationId)) { body["openConversationId"] = request.openConversationId; } if (!Util.isUnset(request.sendDing)) { body["sendDing"] = request.sendDing; } if (!Util.isUnset(request.sticky)) { body["sticky"] = request.sticky; } if (!Util.isUnset(request.uniqueId)) { body["uniqueId"] = request.uniqueId; } if (!Util.isUnset(request.userId)) { body["userId"] = request.userId; } let realHeaders : {[key: string ]: string} = { }; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.xAcsDingtalkAccessToken)) { realHeaders["x-acs-dingtalk-access-token"] = Util.toJSONString(headers.xAcsDingtalkAccessToken); } let req = new $OpenApi.OpenApiRequest({ headers: realHeaders, body: OpenApiUtil.parseToMap(body), }); let params = new $OpenApi.Params({ action: "CreateGroupBlackboardNew", version: "groupBlackboard_1.0", protocol: "HTTP", pathname: `/v1.0/groupBlackboard/blackboards/create`, method: "POST", authType: "AK", style: "ROA", reqBodyType: "none", bodyType: "json", }); return $tea.cast(await this.execute(params, req, runtime), new CreateGroupBlackboardNewResponse({})); } /** * 创建群公告 * * @param request - CreateGroupBlackboardNewRequest * @returns CreateGroupBlackboardNewResponse */ async createGroupBlackboardNew(request: CreateGroupBlackboardNewRequest): Promise { let runtime = new $Util.RuntimeOptions({ }); let headers = new CreateGroupBlackboardNewHeaders({ }); return await this.createGroupBlackboardNewWithOptions(request, headers, runtime); } /** * 删除群公告 * * @param request - DeleteGroupBlackboardRequest * @param headers - DeleteGroupBlackboardHeaders * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteGroupBlackboardResponse */ async deleteGroupBlackboardWithOptions(request: DeleteGroupBlackboardRequest, headers: DeleteGroupBlackboardHeaders, runtime: $Util.RuntimeOptions): Promise { Util.validateModel(request); let body : {[key: string ]: any} = { }; if (!Util.isUnset(request.dataId)) { body["dataId"] = request.dataId; } if (!Util.isUnset(request.openConversationId)) { body["openConversationId"] = request.openConversationId; } if (!Util.isUnset(request.userId)) { body["userId"] = request.userId; } let realHeaders : {[key: string ]: string} = { }; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.xAcsDingtalkAccessToken)) { realHeaders["x-acs-dingtalk-access-token"] = Util.toJSONString(headers.xAcsDingtalkAccessToken); } let req = new $OpenApi.OpenApiRequest({ headers: realHeaders, body: OpenApiUtil.parseToMap(body), }); let params = new $OpenApi.Params({ action: "DeleteGroupBlackboard", version: "groupBlackboard_1.0", protocol: "HTTP", pathname: `/v1.0/groupBlackboard/blackboards/remove`, method: "POST", authType: "AK", style: "ROA", reqBodyType: "none", bodyType: "json", }); return $tea.cast(await this.execute(params, req, runtime), new DeleteGroupBlackboardResponse({})); } /** * 删除群公告 * * @param request - DeleteGroupBlackboardRequest * @returns DeleteGroupBlackboardResponse */ async deleteGroupBlackboard(request: DeleteGroupBlackboardRequest): Promise { let runtime = new $Util.RuntimeOptions({ }); let headers = new DeleteGroupBlackboardHeaders({ }); return await this.deleteGroupBlackboardWithOptions(request, headers, runtime); } /** * 删除群公告 * * @param request - DeleteGroupBlackboardNewRequest * @param headers - DeleteGroupBlackboardNewHeaders * @param runtime - runtime options for this request RuntimeOptions * @returns DeleteGroupBlackboardNewResponse */ async deleteGroupBlackboardNewWithOptions(request: DeleteGroupBlackboardNewRequest, headers: DeleteGroupBlackboardNewHeaders, runtime: $Util.RuntimeOptions): Promise { Util.validateModel(request); let body : {[key: string ]: any} = { }; if (!Util.isUnset(request.dataId)) { body["dataId"] = request.dataId; } if (!Util.isUnset(request.openConversationId)) { body["openConversationId"] = request.openConversationId; } if (!Util.isUnset(request.userId)) { body["userId"] = request.userId; } let realHeaders : {[key: string ]: string} = { }; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.xAcsDingtalkAccessToken)) { realHeaders["x-acs-dingtalk-access-token"] = Util.toJSONString(headers.xAcsDingtalkAccessToken); } let req = new $OpenApi.OpenApiRequest({ headers: realHeaders, body: OpenApiUtil.parseToMap(body), }); let params = new $OpenApi.Params({ action: "DeleteGroupBlackboardNew", version: "groupBlackboard_1.0", protocol: "HTTP", pathname: `/v1.0/groupBlackboard/blackboards/delete`, method: "POST", authType: "AK", style: "ROA", reqBodyType: "none", bodyType: "json", }); return $tea.cast(await this.execute(params, req, runtime), new DeleteGroupBlackboardNewResponse({})); } /** * 删除群公告 * * @param request - DeleteGroupBlackboardNewRequest * @returns DeleteGroupBlackboardNewResponse */ async deleteGroupBlackboardNew(request: DeleteGroupBlackboardNewRequest): Promise { let runtime = new $Util.RuntimeOptions({ }); let headers = new DeleteGroupBlackboardNewHeaders({ }); return await this.deleteGroupBlackboardNewWithOptions(request, headers, runtime); } /** * 编辑群公告 * * @param request - EditGroupBlackboardRequest * @param headers - EditGroupBlackboardHeaders * @param runtime - runtime options for this request RuntimeOptions * @returns EditGroupBlackboardResponse */ async editGroupBlackboardWithOptions(request: EditGroupBlackboardRequest, headers: EditGroupBlackboardHeaders, runtime: $Util.RuntimeOptions): Promise { Util.validateModel(request); let body : {[key: string ]: any} = { }; if (!Util.isUnset(request.content)) { body["content"] = request.content; } if (!Util.isUnset(request.dataId)) { body["dataId"] = request.dataId; } if (!Util.isUnset(request.openConversationId)) { body["openConversationId"] = request.openConversationId; } if (!Util.isUnset(request.sticky)) { body["sticky"] = request.sticky; } if (!Util.isUnset(request.userId)) { body["userId"] = request.userId; } let realHeaders : {[key: string ]: string} = { }; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.xAcsDingtalkAccessToken)) { realHeaders["x-acs-dingtalk-access-token"] = Util.toJSONString(headers.xAcsDingtalkAccessToken); } let req = new $OpenApi.OpenApiRequest({ headers: realHeaders, body: OpenApiUtil.parseToMap(body), }); let params = new $OpenApi.Params({ action: "EditGroupBlackboard", version: "groupBlackboard_1.0", protocol: "HTTP", pathname: `/v1.0/groupBlackboard/blackboards/edit`, method: "POST", authType: "AK", style: "ROA", reqBodyType: "none", bodyType: "json", }); return $tea.cast(await this.execute(params, req, runtime), new EditGroupBlackboardResponse({})); } /** * 编辑群公告 * * @param request - EditGroupBlackboardRequest * @returns EditGroupBlackboardResponse */ async editGroupBlackboard(request: EditGroupBlackboardRequest): Promise { let runtime = new $Util.RuntimeOptions({ }); let headers = new EditGroupBlackboardHeaders({ }); return await this.editGroupBlackboardWithOptions(request, headers, runtime); } /** * 查询群公告详情 * * @param request - GetGroupBlackboardRequest * @param headers - GetGroupBlackboardHeaders * @param runtime - runtime options for this request RuntimeOptions * @returns GetGroupBlackboardResponse */ async getGroupBlackboardWithOptions(request: GetGroupBlackboardRequest, headers: GetGroupBlackboardHeaders, runtime: $Util.RuntimeOptions): Promise { Util.validateModel(request); let body : {[key: string ]: any} = { }; if (!Util.isUnset(request.dataId)) { body["dataId"] = request.dataId; } if (!Util.isUnset(request.openConversationId)) { body["openConversationId"] = request.openConversationId; } if (!Util.isUnset(request.userId)) { body["userId"] = request.userId; } let realHeaders : {[key: string ]: string} = { }; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.xAcsDingtalkAccessToken)) { realHeaders["x-acs-dingtalk-access-token"] = Util.toJSONString(headers.xAcsDingtalkAccessToken); } let req = new $OpenApi.OpenApiRequest({ headers: realHeaders, body: OpenApiUtil.parseToMap(body), }); let params = new $OpenApi.Params({ action: "GetGroupBlackboard", version: "groupBlackboard_1.0", protocol: "HTTP", pathname: `/v1.0/groupBlackboard/blackboards/get`, method: "POST", authType: "AK", style: "ROA", reqBodyType: "none", bodyType: "json", }); return $tea.cast(await this.execute(params, req, runtime), new GetGroupBlackboardResponse({})); } /** * 查询群公告详情 * * @param request - GetGroupBlackboardRequest * @returns GetGroupBlackboardResponse */ async getGroupBlackboard(request: GetGroupBlackboardRequest): Promise { let runtime = new $Util.RuntimeOptions({ }); let headers = new GetGroupBlackboardHeaders({ }); return await this.getGroupBlackboardWithOptions(request, headers, runtime); } /** * 查询群公告列表 * * @param request - ListGroupBlackboardRequest * @param headers - ListGroupBlackboardHeaders * @param runtime - runtime options for this request RuntimeOptions * @returns ListGroupBlackboardResponse */ async listGroupBlackboardWithOptions(request: ListGroupBlackboardRequest, headers: ListGroupBlackboardHeaders, runtime: $Util.RuntimeOptions): Promise { Util.validateModel(request); let body : {[key: string ]: any} = { }; if (!Util.isUnset(request.nextPageCursor)) { body["nextPageCursor"] = request.nextPageCursor; } if (!Util.isUnset(request.openConversationId)) { body["openConversationId"] = request.openConversationId; } if (!Util.isUnset(request.pageSize)) { body["pageSize"] = request.pageSize; } if (!Util.isUnset(request.userId)) { body["userId"] = request.userId; } let realHeaders : {[key: string ]: string} = { }; if (!Util.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!Util.isUnset(headers.xAcsDingtalkAccessToken)) { realHeaders["x-acs-dingtalk-access-token"] = Util.toJSONString(headers.xAcsDingtalkAccessToken); } let req = new $OpenApi.OpenApiRequest({ headers: realHeaders, body: OpenApiUtil.parseToMap(body), }); let params = new $OpenApi.Params({ action: "ListGroupBlackboard", version: "groupBlackboard_1.0", protocol: "HTTP", pathname: `/v1.0/groupBlackboard/blackboards/list`, method: "POST", authType: "AK", style: "ROA", reqBodyType: "none", bodyType: "json", }); return $tea.cast(await this.execute(params, req, runtime), new ListGroupBlackboardResponse({})); } /** * 查询群公告列表 * * @param request - ListGroupBlackboardRequest * @returns ListGroupBlackboardResponse */ async listGroupBlackboard(request: ListGroupBlackboardRequest): Promise { let runtime = new $Util.RuntimeOptions({ }); let headers = new ListGroupBlackboardHeaders({ }); return await this.listGroupBlackboardWithOptions(request, headers, runtime); } }