@satorijs/adapter-lark 3.8.6 → 3.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/lib/bot.d.ts +1 -1
  2. package/lib/content.d.ts +433 -0
  3. package/lib/http.d.ts +1 -1
  4. package/lib/index.cjs +2787 -1714
  5. package/lib/index.cjs.map +6 -0
  6. package/lib/index.d.ts +4 -2
  7. package/lib/internal.d.ts +38 -0
  8. package/lib/message.d.ts +2 -0
  9. package/lib/types/acs.d.ts +177 -0
  10. package/lib/types/admin.d.ts +270 -0
  11. package/lib/types/aily.d.ts +221 -0
  12. package/lib/types/apaas.d.ts +499 -0
  13. package/lib/types/api.d.ts +1 -14
  14. package/lib/types/application.d.ts +406 -0
  15. package/lib/types/approval.d.ts +779 -0
  16. package/lib/types/attendance.d.ts +957 -0
  17. package/lib/types/auth.d.ts +86 -0
  18. package/lib/types/authen.d.ts +191 -0
  19. package/lib/types/baike.d.ts +239 -0
  20. package/lib/types/bitable.d.ts +691 -0
  21. package/lib/types/board.d.ts +19 -0
  22. package/lib/types/calendar.d.ts +653 -0
  23. package/lib/types/cardkit.d.ts +139 -0
  24. package/lib/types/compensation.d.ts +54 -0
  25. package/lib/types/contact.d.ts +1137 -0
  26. package/lib/types/corehr.d.ts +4383 -0
  27. package/lib/types/docs.d.ts +23 -0
  28. package/lib/types/document_ai.d.ts +257 -0
  29. package/lib/types/docx.d.ts +380 -0
  30. package/lib/types/drive.d.ts +1045 -0
  31. package/lib/types/ehr.d.ts +32 -0
  32. package/lib/types/event.d.ts +9 -18
  33. package/lib/types/guild.d.ts +59 -0
  34. package/lib/types/helpdesk.d.ts +738 -0
  35. package/lib/types/hire.d.ts +3150 -0
  36. package/lib/types/human_authentication.d.ts +27 -0
  37. package/lib/types/im.d.ts +1300 -0
  38. package/lib/types/index.d.ts +16432 -34
  39. package/lib/types/lingo.d.ts +254 -0
  40. package/lib/types/mail.d.ts +680 -0
  41. package/lib/types/mdm.d.ts +42 -0
  42. package/lib/types/message/asset.d.ts +40 -0
  43. package/lib/types/minutes.d.ts +31 -0
  44. package/lib/types/moments.d.ts +18 -0
  45. package/lib/types/okr.d.ts +205 -0
  46. package/lib/types/optical_char_recognition.d.ts +17 -0
  47. package/lib/types/passport.d.ts +45 -0
  48. package/lib/types/payroll.d.ts +50 -0
  49. package/lib/types/performance.d.ts +413 -0
  50. package/lib/types/personal_settings.d.ts +87 -0
  51. package/lib/types/report.d.ts +57 -0
  52. package/lib/types/search.d.ts +216 -0
  53. package/lib/types/security_and_compliance.d.ts +24 -0
  54. package/lib/types/sheets.d.ts +326 -0
  55. package/lib/types/speech_to_text.d.ts +39 -0
  56. package/lib/types/task.d.ts +1153 -0
  57. package/lib/types/tenant.d.ts +23 -0
  58. package/lib/types/translation.d.ts +37 -0
  59. package/lib/types/user.d.ts +78 -0
  60. package/lib/types/utils.d.ts +9 -0
  61. package/lib/types/vc.d.ts +948 -0
  62. package/lib/types/verification.d.ts +14 -0
  63. package/lib/types/wiki.d.ts +240 -0
  64. package/lib/types/workplace.d.ts +43 -0
  65. package/lib/utils.d.ts +143 -7
  66. package/package.json +6 -4
  67. package/src/bot.ts +19 -3
  68. package/src/{types/message/content.ts → content.ts} +1 -0
  69. package/src/http.ts +1 -3
  70. package/src/index.ts +4 -2
  71. package/src/internal.ts +144 -0
  72. package/src/message.ts +13 -11
  73. package/src/types/acs.ts +236 -0
  74. package/src/types/admin.ts +328 -0
  75. package/src/types/aily.ts +288 -0
  76. package/src/types/apaas.ts +646 -0
  77. package/src/types/application.ts +520 -0
  78. package/src/types/approval.ts +924 -0
  79. package/src/types/attendance.ts +1153 -0
  80. package/src/types/auth.ts +114 -0
  81. package/src/types/authen.ts +220 -0
  82. package/src/types/baike.ts +306 -0
  83. package/src/types/bitable.ts +879 -0
  84. package/src/types/board.ts +31 -0
  85. package/src/types/calendar.ts +817 -0
  86. package/src/types/cardkit.ts +182 -0
  87. package/src/types/compensation.ts +79 -0
  88. package/src/types/contact.ts +1411 -0
  89. package/src/types/corehr.ts +5288 -0
  90. package/src/types/docs.ts +33 -0
  91. package/src/types/document_ai.ts +352 -0
  92. package/src/types/docx.ts +471 -0
  93. package/src/types/drive.ts +1312 -0
  94. package/src/types/ehr.ts +43 -0
  95. package/src/types/event.ts +15 -21
  96. package/src/types/helpdesk.ts +916 -0
  97. package/src/types/hire.ts +3918 -0
  98. package/src/types/human_authentication.ts +38 -0
  99. package/src/types/im.ts +1605 -0
  100. package/src/types/index.ts +17754 -39
  101. package/src/types/lingo.ts +321 -0
  102. package/src/types/mail.ts +851 -0
  103. package/src/types/mdm.ts +57 -0
  104. package/src/types/minutes.ts +46 -0
  105. package/src/types/moments.ts +28 -0
  106. package/src/types/okr.ts +261 -0
  107. package/src/types/optical_char_recognition.ts +27 -0
  108. package/src/types/passport.ts +61 -0
  109. package/src/types/payroll.ts +69 -0
  110. package/src/types/performance.ts +524 -0
  111. package/src/types/personal_settings.ts +116 -0
  112. package/src/types/report.ts +77 -0
  113. package/src/types/search.ts +268 -0
  114. package/src/types/security_and_compliance.ts +33 -0
  115. package/src/types/sheets.ts +425 -0
  116. package/src/types/speech_to_text.ts +54 -0
  117. package/src/types/task.ts +1464 -0
  118. package/src/types/tenant.ts +36 -0
  119. package/src/types/translation.ts +52 -0
  120. package/src/types/vc.ts +1197 -0
  121. package/src/types/verification.ts +23 -0
  122. package/src/types/wiki.ts +313 -0
  123. package/src/types/workplace.ts +59 -0
  124. package/src/utils.ts +160 -8
  125. package/src/types/api.ts +0 -30848
  126. package/src/types/internal.ts +0 -84
  127. package/src/types/message/index.ts +0 -97
@@ -0,0 +1,144 @@
1
+ import { Dict, HTTP, makeArray } from '@satorijs/core'
2
+ import { LarkBot } from './bot'
3
+
4
+ export interface Internal {}
5
+
6
+ export interface BaseResponse {
7
+ /** error code. would be 0 if success, and non-0 if failed. */
8
+ code: number
9
+ /** error message. would be 'success' if success. */
10
+ msg: string
11
+ }
12
+
13
+ export type Paginated<T = any, ItemsKey extends string = 'items', TokenKey extends string = 'page_token'> =
14
+ & Promise<
15
+ & { [K in ItemsKey]: T[] }
16
+ & { [K in TokenKey]?: string }
17
+ & { has_more: boolean }
18
+ >
19
+ & AsyncIterableIterator<T>
20
+
21
+ export interface Pagination {
22
+ page_size?: number
23
+ page_token?: string
24
+ }
25
+
26
+ export interface InternalRoute {
27
+ name: string
28
+ pagination?: {
29
+ argIndex: number
30
+ itemsKey?: string
31
+ tokenKey?: string
32
+ }
33
+ multipart?: boolean
34
+ type?: 'raw-json' | 'binary'
35
+ }
36
+
37
+ export class Internal {
38
+ constructor(private bot: LarkBot) {}
39
+
40
+ private _assertResponse(response: HTTP.Response<BaseResponse>) {
41
+ if (!response.data.code) return
42
+ this.bot.logger.debug('response: %o', response.data)
43
+ const error = new HTTP.Error(`request failed`)
44
+ error.response = response
45
+ throw error
46
+ }
47
+
48
+ private _buildData(arg: object, options: InternalRoute) {
49
+ if (options.multipart) {
50
+ const form = new FormData()
51
+ for (const [key, value] of Object.entries(arg)) {
52
+ if (value instanceof File) {
53
+ form.append(key, value, value.name)
54
+ } else {
55
+ form.append(key, value)
56
+ }
57
+ }
58
+ return form
59
+ } else {
60
+ return arg
61
+ }
62
+ }
63
+
64
+ static define(routes: Dict<Partial<Record<HTTP.Method, string | InternalRoute>>>) {
65
+ for (const path in routes) {
66
+ for (const key in routes[path]) {
67
+ const method = key as HTTP.Method
68
+ for (let route of makeArray(routes[path][method])) {
69
+ if (typeof route === 'string') {
70
+ route = { name: route }
71
+ }
72
+
73
+ const impl = async function (this: Internal, ...args: any[]) {
74
+ const raw = args.join(', ')
75
+ const url = path.replace(/\{([^}]+)\}/g, () => {
76
+ if (!args.length) throw new Error(`too few arguments for ${path}, received ${raw}`)
77
+ return args.shift()
78
+ })
79
+ const config: HTTP.RequestConfig = {}
80
+ if (args.length === 1) {
81
+ if (method === 'GET' || method === 'DELETE') {
82
+ config.params = args[0]
83
+ } else {
84
+ config.data = this._buildData(args[0], route)
85
+ }
86
+ } else if (args.length === 2 && method !== 'GET' && method !== 'DELETE') {
87
+ config.data = this._buildData(args[0], route)
88
+ config.params = args[1]
89
+ } else if (args.length > 1) {
90
+ throw new Error(`too many arguments for ${path}, received ${raw}`)
91
+ }
92
+ if (route.type === 'binary') {
93
+ config.responseType = 'arraybuffer'
94
+ }
95
+ const response = await this.bot.http(method, url, config)
96
+ this._assertResponse(response)
97
+ if (route.type === 'raw-json' || route.type === 'binary') {
98
+ return response.data
99
+ } else {
100
+ return response.data.data
101
+ }
102
+ }
103
+
104
+ Internal.prototype[route.name] = function (this: Internal, ...args: any[]) {
105
+ let promise: Promise<any> | undefined
106
+ const result = {} as Paginated
107
+ for (const key of ['then', 'catch', 'finally']) {
108
+ result[key] = (...args2: any[]) => {
109
+ return (promise ??= impl.apply(this, args))[key](...args2)
110
+ }
111
+ }
112
+
113
+ if (route.pagination) {
114
+ const { argIndex, itemsKey = 'items', tokenKey = 'page_token' } = route.pagination
115
+ const iterArgs = [...args]
116
+ iterArgs[argIndex] = { ...args[argIndex] }
117
+ let pagination: { data: any[]; next?: any } | undefined
118
+ result.next = async function () {
119
+ pagination ??= await this[Symbol.for('satori.pagination')]()
120
+ if (pagination.data.length) return { done: false, value: pagination.data.shift() }
121
+ if (!pagination.next) return { done: true, value: undefined }
122
+ pagination = await this[Symbol.for('satori.pagination')]()
123
+ return this.next()
124
+ }
125
+ result[Symbol.asyncIterator] = function () {
126
+ return this
127
+ }
128
+ result[Symbol.for('satori.pagination')] = async () => {
129
+ const data = await impl.apply(this, iterArgs)
130
+ iterArgs[argIndex].page_token = data[tokenKey]
131
+ return {
132
+ data: data[itemsKey],
133
+ next: data.has_more ? iterArgs : undefined,
134
+ }
135
+ }
136
+ }
137
+
138
+ return result
139
+ }
140
+ }
141
+ }
142
+ }
143
+ }
144
+ }
package/src/message.ts CHANGED
@@ -1,9 +1,12 @@
1
1
  import { Context, Dict, h, MessageEncoder } from '@satorijs/core'
2
2
  import { LarkBot } from './bot'
3
- import { CreateImFileForm, Lark, MessageContent } from './types'
4
- import { extractIdType } from './utils'
3
+ import { CreateImFileForm, Message } from './types'
4
+ import { EventPayload, extractIdType } from './utils'
5
+ import { MessageContent } from './content'
5
6
 
6
7
  export class LarkMessageEncoder<C extends Context = Context> extends MessageEncoder<C, LarkBot<C>> {
8
+ declare referrer?: EventPayload
9
+
7
10
  private quote: Dict | undefined
8
11
  private textContent = ''
9
12
  private richContent: MessageContent.RichText.Paragraph[] = []
@@ -15,21 +18,20 @@ export class LarkMessageEncoder<C extends Context = Context> extends MessageEnco
15
18
 
16
19
  async post(data?: any) {
17
20
  try {
18
- let resp: Lark.Message
21
+ let resp: Message
19
22
  let quote = this.quote
20
- if (!quote) {
21
- const payload = this.options?.session?.lark
22
- if (payload?.type === 'im.message.receive_v1' && payload.event.message.thread_id) {
23
+ if (!quote && this.referrer) {
24
+ if (this.referrer.type === 'im.message.receive_v1' && this.referrer.event.message.thread_id) {
23
25
  quote = {
24
- id: payload.event.message.message_id,
26
+ id: this.referrer.event.message.message_id,
25
27
  replyInThread: true,
26
28
  }
27
- } else if (payload?.type === 'card.action.trigger') {
29
+ } else if (this.referrer.type === 'card.action.trigger') {
28
30
  // cannot determine whether the card is in thread or not
29
- const { items: [message] } = await this.bot.internal.getImMessage(payload.event.context.open_message_id)
31
+ const { items: [message] } = await this.bot.internal.getImMessage(this.referrer.event.context.open_message_id)
30
32
  if (message?.thread_id) {
31
33
  quote = {
32
- id: payload.event.context.open_message_id,
34
+ id: this.referrer.event.context.open_message_id,
33
35
  replyInThread: true,
34
36
  }
35
37
  }
@@ -156,7 +158,7 @@ export class LarkMessageEncoder<C extends Context = Context> extends MessageEnco
156
158
  } else {
157
159
  const ext = filename.split('.').pop()
158
160
  if (['doc', 'xls', 'ppt', 'pdf'].includes(ext)) {
159
- file_type = ext
161
+ file_type = ext as any
160
162
  } else {
161
163
  file_type = 'stream'
162
164
  }
@@ -0,0 +1,236 @@
1
+ import { AccessRecord, Device, Feature, Rule, User, UserExternal } from '.'
2
+ import { Internal, Pagination } from '../internal'
3
+
4
+ declare module '../internal' {
5
+ interface Internal {
6
+ /**
7
+ * 修改用户部分信息
8
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/user/patch
9
+ */
10
+ patchAcsUser(user_id: string, body: PatchAcsUserRequest, query?: PatchAcsUserQuery): Promise<void>
11
+ /**
12
+ * 获取单个用户信息
13
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/user/get
14
+ */
15
+ getAcsUser(user_id: string, query?: GetAcsUserQuery): Promise<GetAcsUserResponse>
16
+ /**
17
+ * 获取用户列表
18
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/user/list
19
+ */
20
+ listAcsUser(query?: ListAcsUserQuery): Paginated<User>
21
+ /**
22
+ * 上传人脸图片
23
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/user-face/update
24
+ */
25
+ updateAcsUserFace(user_id: string, form: UpdateAcsUserFaceForm, query?: UpdateAcsUserFaceQuery): Promise<void>
26
+ /**
27
+ * 下载人脸图片
28
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/user-face/get
29
+ */
30
+ getAcsUserFace(user_id: string, query?: GetAcsUserFaceQuery): Promise<ArrayBuffer>
31
+ /**
32
+ * 设备绑定权限组
33
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/rule_external/device_bind
34
+ */
35
+ deviceBindAcsRuleExternal(body: DeviceBindAcsRuleExternalRequest): Promise<void>
36
+ /**
37
+ * 获取权限组信息
38
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/rule_external/get
39
+ */
40
+ getAcsRuleExternal(query?: GetAcsRuleExternalQuery): Promise<GetAcsRuleExternalResponse>
41
+ /**
42
+ * 删除权限组
43
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/rule_external/delete
44
+ */
45
+ deleteAcsRuleExternal(query?: DeleteAcsRuleExternalQuery): Promise<void>
46
+ /**
47
+ * 创建或更新权限组
48
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/rule_external/create
49
+ */
50
+ createAcsRuleExternal(body: CreateAcsRuleExternalRequest, query?: CreateAcsRuleExternalQuery): Promise<CreateAcsRuleExternalResponse>
51
+ /**
52
+ * 删除访客
53
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/visitor/delete
54
+ */
55
+ deleteAcsVisitor(visitor_id: string, query?: DeleteAcsVisitorQuery): Promise<void>
56
+ /**
57
+ * 添加访客
58
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/visitor/create
59
+ */
60
+ createAcsVisitor(body: CreateAcsVisitorRequest, query?: CreateAcsVisitorQuery): Promise<CreateAcsVisitorResponse>
61
+ /**
62
+ * 获取门禁设备列表
63
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/device/list
64
+ */
65
+ listAcsDevice(): Promise<ListAcsDeviceResponse>
66
+ /**
67
+ * 获取门禁记录列表
68
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/access_record/list
69
+ */
70
+ listAcsAccessRecord(query?: ListAcsAccessRecordQuery): Paginated<AccessRecord>
71
+ /**
72
+ * 下载开门时的人脸识别图片
73
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/access_record-access_photo/get
74
+ */
75
+ getAcsAccessRecordAccessPhoto(access_record_id: string): Promise<ArrayBuffer>
76
+ }
77
+ }
78
+
79
+ export interface PatchAcsUserRequest {
80
+ /** 用户特征 */
81
+ feature?: Feature
82
+ }
83
+
84
+ export interface PatchAcsUserQuery {
85
+ /** 此次调用中使用的用户ID的类型 */
86
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
87
+ }
88
+
89
+ export interface GetAcsUserQuery {
90
+ /** 此次调用中使用的用户ID的类型 */
91
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
92
+ }
93
+
94
+ export interface ListAcsUserQuery extends Pagination {
95
+ /** 此次调用中使用的用户ID的类型 */
96
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
97
+ }
98
+
99
+ export interface UpdateAcsUserFaceForm {
100
+ /** 人脸图片内容 */
101
+ files: Blob
102
+ /** 文件类型,可选的类型有jpg,png */
103
+ file_type: string
104
+ /** 带后缀的文件名 */
105
+ file_name: string
106
+ }
107
+
108
+ export interface UpdateAcsUserFaceQuery {
109
+ /** 此次调用中使用的用户ID的类型 */
110
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
111
+ }
112
+
113
+ export interface GetAcsUserFaceQuery {
114
+ /** 裁剪图 */
115
+ is_cropped?: boolean
116
+ /** 此次调用中使用的用户ID的类型 */
117
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
118
+ }
119
+
120
+ export interface DeviceBindAcsRuleExternalRequest {
121
+ /** 设备id */
122
+ device_id: string
123
+ /** 权限组id列表 */
124
+ rule_ids: string[]
125
+ }
126
+
127
+ export interface GetAcsRuleExternalQuery {
128
+ /** 设备id */
129
+ device_id?: string
130
+ /** 此次调用中使用的用户ID的类型 */
131
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
132
+ }
133
+
134
+ export interface DeleteAcsRuleExternalQuery {
135
+ /** 权限组id */
136
+ rule_id: string
137
+ }
138
+
139
+ export interface CreateAcsRuleExternalRequest {
140
+ /** 权限组信息 */
141
+ rule: Rule
142
+ }
143
+
144
+ export interface CreateAcsRuleExternalQuery {
145
+ /** 权限组id-为空创建,不为空则更新 */
146
+ rule_id?: string
147
+ /** 此次调用中使用的用户ID的类型 */
148
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
149
+ }
150
+
151
+ export interface DeleteAcsVisitorQuery {
152
+ /** 此次调用中使用的用户ID的类型 */
153
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
154
+ }
155
+
156
+ export interface CreateAcsVisitorRequest {
157
+ /** 访客信息 */
158
+ user: UserExternal
159
+ }
160
+
161
+ export interface CreateAcsVisitorQuery {
162
+ /** 此次调用中使用的用户ID的类型 */
163
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
164
+ }
165
+
166
+ export interface ListAcsAccessRecordQuery extends Pagination {
167
+ /** 记录开始时间,单位秒 */
168
+ from: number
169
+ /** 记录结束时间,单位秒,时间跨度不能超过30天 */
170
+ to: number
171
+ /** 门禁设备 ID */
172
+ device_id?: string
173
+ /** 此次调用中使用的用户ID的类型 */
174
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
175
+ }
176
+
177
+ export interface GetAcsUserResponse {
178
+ /** 门禁用户信息 */
179
+ user?: User
180
+ }
181
+
182
+ export interface GetAcsRuleExternalResponse {
183
+ /** 设备权限组信息 */
184
+ rules: Rule[]
185
+ }
186
+
187
+ export interface CreateAcsRuleExternalResponse {
188
+ /** 权限组id */
189
+ rule_id: string
190
+ }
191
+
192
+ export interface CreateAcsVisitorResponse {
193
+ /** 访客的id */
194
+ visitor_id: string
195
+ }
196
+
197
+ export interface ListAcsDeviceResponse {
198
+ items?: Device[]
199
+ }
200
+
201
+ Internal.define({
202
+ '/acs/v1/users/{user_id}': {
203
+ PATCH: 'patchAcsUser',
204
+ GET: 'getAcsUser',
205
+ },
206
+ '/acs/v1/users': {
207
+ GET: { name: 'listAcsUser', pagination: { argIndex: 0 } },
208
+ },
209
+ '/acs/v1/users/{user_id}/face': {
210
+ PUT: { name: 'updateAcsUserFace', multipart: true },
211
+ GET: { name: 'getAcsUserFace', type: 'binary' },
212
+ },
213
+ '/acs/v1/rule_external/device_bind': {
214
+ POST: 'deviceBindAcsRuleExternal',
215
+ },
216
+ '/acs/v1/rule_external': {
217
+ GET: 'getAcsRuleExternal',
218
+ DELETE: 'deleteAcsRuleExternal',
219
+ POST: 'createAcsRuleExternal',
220
+ },
221
+ '/acs/v1/visitors/{visitor_id}': {
222
+ DELETE: 'deleteAcsVisitor',
223
+ },
224
+ '/acs/v1/visitors': {
225
+ POST: 'createAcsVisitor',
226
+ },
227
+ '/acs/v1/devices': {
228
+ GET: 'listAcsDevice',
229
+ },
230
+ '/acs/v1/access_records': {
231
+ GET: { name: 'listAcsAccessRecord', pagination: { argIndex: 0 } },
232
+ },
233
+ '/acs/v1/access_records/{access_record_id}/access_photo': {
234
+ GET: { name: 'getAcsAccessRecordAccessPhoto', type: 'binary' },
235
+ },
236
+ })