lansenger-sdk-ts 1.0.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.
- package/LICENSE +21 -0
- package/README.fr.md +501 -0
- package/README.md +504 -0
- package/README.zhHans.md +501 -0
- package/README.zhHant.md +501 -0
- package/README.zhHantHK.md +501 -0
- package/dist/accountMessages.d.ts +12 -0
- package/dist/accountMessages.js +41 -0
- package/dist/auth.d.ts +13 -0
- package/dist/auth.js +70 -0
- package/dist/calendars.d.ts +84 -0
- package/dist/calendars.js +278 -0
- package/dist/callbacks.d.ts +384 -0
- package/dist/callbacks.js +712 -0
- package/dist/chats.d.ts +22 -0
- package/dist/chats.js +88 -0
- package/dist/client.d.ts +439 -0
- package/dist/client.js +712 -0
- package/dist/config.d.ts +14 -0
- package/dist/config.js +42 -0
- package/dist/constants.d.ts +30 -0
- package/dist/constants.js +187 -0
- package/dist/contacts.d.ts +38 -0
- package/dist/contacts.js +161 -0
- package/dist/departments.d.ts +18 -0
- package/dist/departments.js +69 -0
- package/dist/exceptions.d.ts +20 -0
- package/dist/exceptions.js +42 -0
- package/dist/groupMessages.d.ts +11 -0
- package/dist/groupMessages.js +39 -0
- package/dist/groups.d.ts +66 -0
- package/dist/groups.js +218 -0
- package/dist/http.d.ts +7 -0
- package/dist/http.js +67 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +189 -0
- package/dist/media.d.ts +16 -0
- package/dist/media.js +178 -0
- package/dist/models.d.ts +925 -0
- package/dist/models.js +991 -0
- package/dist/oauth.d.ts +17 -0
- package/dist/oauth.js +107 -0
- package/dist/persistence.d.ts +26 -0
- package/dist/persistence.js +210 -0
- package/dist/reminders.d.ts +10 -0
- package/dist/reminders.js +31 -0
- package/dist/streaming.d.ts +9 -0
- package/dist/streaming.js +40 -0
- package/dist/todos.d.ts +75 -0
- package/dist/todos.js +282 -0
- package/dist/urlHelpers.d.ts +7 -0
- package/dist/urlHelpers.js +22 -0
- package/dist/userMessages.d.ts +8 -0
- package/dist/userMessages.js +34 -0
- package/dist/users.d.ts +6 -0
- package/dist/users.js +32 -0
- package/package.json +33 -0
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
type AnyDict = Record<string, any>;
|
|
2
|
+
export declare const CALLBACK_EVENT_TYPES: Record<string, string>;
|
|
3
|
+
export declare class CallbackEvent {
|
|
4
|
+
event_id: number;
|
|
5
|
+
event_type: string;
|
|
6
|
+
category: string;
|
|
7
|
+
data: AnyDict | CallbackEventData;
|
|
8
|
+
app_id: string;
|
|
9
|
+
org_id: string;
|
|
10
|
+
constructor(init: {
|
|
11
|
+
event_id?: number;
|
|
12
|
+
event_type?: string;
|
|
13
|
+
category?: string;
|
|
14
|
+
data?: AnyDict | CallbackEventData;
|
|
15
|
+
app_id?: string;
|
|
16
|
+
org_id?: string;
|
|
17
|
+
});
|
|
18
|
+
toDict(): AnyDict;
|
|
19
|
+
}
|
|
20
|
+
export declare class AccountSubscribeData {
|
|
21
|
+
staff_id: string;
|
|
22
|
+
create_time: string;
|
|
23
|
+
constructor(init: {
|
|
24
|
+
staff_id?: string;
|
|
25
|
+
create_time?: string;
|
|
26
|
+
});
|
|
27
|
+
toDict(): AnyDict;
|
|
28
|
+
}
|
|
29
|
+
export declare class AccountUnsubscribeData {
|
|
30
|
+
staff_id: string;
|
|
31
|
+
create_time: string;
|
|
32
|
+
constructor(init: {
|
|
33
|
+
staff_id?: string;
|
|
34
|
+
create_time?: string;
|
|
35
|
+
});
|
|
36
|
+
toDict(): AnyDict;
|
|
37
|
+
}
|
|
38
|
+
export declare class StaffInfoData {
|
|
39
|
+
staff_id: string;
|
|
40
|
+
name: string;
|
|
41
|
+
mobile: string;
|
|
42
|
+
state: string;
|
|
43
|
+
sex: string;
|
|
44
|
+
email: string;
|
|
45
|
+
employee_id: string;
|
|
46
|
+
avatar_id: string;
|
|
47
|
+
timestamp: string;
|
|
48
|
+
constructor(init: {
|
|
49
|
+
staff_id?: string;
|
|
50
|
+
name?: string;
|
|
51
|
+
mobile?: string;
|
|
52
|
+
state?: string;
|
|
53
|
+
sex?: string;
|
|
54
|
+
email?: string;
|
|
55
|
+
employee_id?: string;
|
|
56
|
+
avatar_id?: string;
|
|
57
|
+
timestamp?: string;
|
|
58
|
+
});
|
|
59
|
+
toDict(): AnyDict;
|
|
60
|
+
}
|
|
61
|
+
export declare class StaffModifyData {
|
|
62
|
+
staff_id: string;
|
|
63
|
+
timestamp: string;
|
|
64
|
+
constructor(init: {
|
|
65
|
+
staff_id?: string;
|
|
66
|
+
timestamp?: string;
|
|
67
|
+
});
|
|
68
|
+
toDict(): AnyDict;
|
|
69
|
+
}
|
|
70
|
+
export declare class StaffCreateData {
|
|
71
|
+
staff_id: string;
|
|
72
|
+
timestamp: string;
|
|
73
|
+
constructor(init: {
|
|
74
|
+
staff_id?: string;
|
|
75
|
+
timestamp?: string;
|
|
76
|
+
});
|
|
77
|
+
toDict(): AnyDict;
|
|
78
|
+
}
|
|
79
|
+
export declare class StaffDeleteData {
|
|
80
|
+
staff_id: string;
|
|
81
|
+
timestamp: string;
|
|
82
|
+
constructor(init: {
|
|
83
|
+
staff_id?: string;
|
|
84
|
+
timestamp?: string;
|
|
85
|
+
});
|
|
86
|
+
toDict(): AnyDict;
|
|
87
|
+
}
|
|
88
|
+
export declare class TelephoneTrackCallerData {
|
|
89
|
+
staff_id: string;
|
|
90
|
+
country_code: string;
|
|
91
|
+
number: string;
|
|
92
|
+
constructor(init: {
|
|
93
|
+
staff_id?: string;
|
|
94
|
+
country_code?: string;
|
|
95
|
+
number?: string;
|
|
96
|
+
});
|
|
97
|
+
toDict(): AnyDict;
|
|
98
|
+
}
|
|
99
|
+
export declare class TelephoneTrackData {
|
|
100
|
+
transaction_id: string;
|
|
101
|
+
attach: string;
|
|
102
|
+
caller: TelephoneTrackCallerData;
|
|
103
|
+
callee: TelephoneTrackCallerData;
|
|
104
|
+
confirm_type: number;
|
|
105
|
+
timestamp: string;
|
|
106
|
+
constructor(init: {
|
|
107
|
+
transaction_id?: string;
|
|
108
|
+
attach?: string;
|
|
109
|
+
caller?: TelephoneTrackCallerData;
|
|
110
|
+
callee?: TelephoneTrackCallerData;
|
|
111
|
+
confirm_type?: number;
|
|
112
|
+
timestamp?: string;
|
|
113
|
+
});
|
|
114
|
+
toDict(): AnyDict;
|
|
115
|
+
}
|
|
116
|
+
export declare class DeptCreateData {
|
|
117
|
+
dept_id: string;
|
|
118
|
+
timestamp: string;
|
|
119
|
+
constructor(init: {
|
|
120
|
+
dept_id?: string;
|
|
121
|
+
timestamp?: string;
|
|
122
|
+
});
|
|
123
|
+
toDict(): AnyDict;
|
|
124
|
+
}
|
|
125
|
+
export declare class DeptModifyData {
|
|
126
|
+
dept_id: string;
|
|
127
|
+
timestamp: string;
|
|
128
|
+
constructor(init: {
|
|
129
|
+
dept_id?: string;
|
|
130
|
+
timestamp?: string;
|
|
131
|
+
});
|
|
132
|
+
toDict(): AnyDict;
|
|
133
|
+
}
|
|
134
|
+
export declare class DeptDeleteData {
|
|
135
|
+
dept_id: string;
|
|
136
|
+
timestamp: string;
|
|
137
|
+
constructor(init: {
|
|
138
|
+
dept_id?: string;
|
|
139
|
+
timestamp?: string;
|
|
140
|
+
});
|
|
141
|
+
toDict(): AnyDict;
|
|
142
|
+
}
|
|
143
|
+
export declare class AppInstallData {
|
|
144
|
+
org_id: string;
|
|
145
|
+
org_name: string;
|
|
146
|
+
timestamp: string;
|
|
147
|
+
constructor(init: {
|
|
148
|
+
org_id?: string;
|
|
149
|
+
org_name?: string;
|
|
150
|
+
timestamp?: string;
|
|
151
|
+
});
|
|
152
|
+
toDict(): AnyDict;
|
|
153
|
+
}
|
|
154
|
+
export declare class AppUninstallData {
|
|
155
|
+
org_id: string;
|
|
156
|
+
org_name: string;
|
|
157
|
+
timestamp: string;
|
|
158
|
+
constructor(init: {
|
|
159
|
+
org_id?: string;
|
|
160
|
+
org_name?: string;
|
|
161
|
+
timestamp?: string;
|
|
162
|
+
});
|
|
163
|
+
toDict(): AnyDict;
|
|
164
|
+
}
|
|
165
|
+
export declare class UaCertCreateData {
|
|
166
|
+
staff_id: string;
|
|
167
|
+
device_id: string;
|
|
168
|
+
ua_cert: string;
|
|
169
|
+
timestamp: string;
|
|
170
|
+
constructor(init: {
|
|
171
|
+
staff_id?: string;
|
|
172
|
+
device_id?: string;
|
|
173
|
+
ua_cert?: string;
|
|
174
|
+
timestamp?: string;
|
|
175
|
+
});
|
|
176
|
+
toDict(): AnyDict;
|
|
177
|
+
}
|
|
178
|
+
export declare class UaCertDeleteData {
|
|
179
|
+
staff_id: string;
|
|
180
|
+
device_id: string;
|
|
181
|
+
timestamp: string;
|
|
182
|
+
constructor(init: {
|
|
183
|
+
staff_id?: string;
|
|
184
|
+
device_id?: string;
|
|
185
|
+
timestamp?: string;
|
|
186
|
+
});
|
|
187
|
+
toDict(): AnyDict;
|
|
188
|
+
}
|
|
189
|
+
export declare class ReportLocationData {
|
|
190
|
+
location_info: Record<string, string>;
|
|
191
|
+
constructor(init: {
|
|
192
|
+
location_info?: Record<string, string>;
|
|
193
|
+
});
|
|
194
|
+
toDict(): AnyDict;
|
|
195
|
+
}
|
|
196
|
+
export declare class UserLogoutData {
|
|
197
|
+
staff_id: string;
|
|
198
|
+
device_id: string;
|
|
199
|
+
timestamp: string;
|
|
200
|
+
constructor(init: {
|
|
201
|
+
staff_id?: string;
|
|
202
|
+
device_id?: string;
|
|
203
|
+
timestamp?: string;
|
|
204
|
+
});
|
|
205
|
+
toDict(): AnyDict;
|
|
206
|
+
}
|
|
207
|
+
export declare class DataScopeData {
|
|
208
|
+
dept_ids: string[];
|
|
209
|
+
timestamp: string;
|
|
210
|
+
constructor(init: {
|
|
211
|
+
dept_ids?: string[];
|
|
212
|
+
timestamp?: string;
|
|
213
|
+
});
|
|
214
|
+
toDict(): AnyDict;
|
|
215
|
+
}
|
|
216
|
+
export declare class BotPrivateMessageData {
|
|
217
|
+
from_id: string;
|
|
218
|
+
entry_id: string;
|
|
219
|
+
msg_type: string;
|
|
220
|
+
msg_data: AnyDict;
|
|
221
|
+
constructor(init: {
|
|
222
|
+
from_id?: string;
|
|
223
|
+
entry_id?: string;
|
|
224
|
+
msg_type?: string;
|
|
225
|
+
msg_data?: AnyDict;
|
|
226
|
+
});
|
|
227
|
+
toDict(): AnyDict;
|
|
228
|
+
}
|
|
229
|
+
export declare class BotGroupMessageData {
|
|
230
|
+
from_id: string;
|
|
231
|
+
entry_id: string;
|
|
232
|
+
msg_type: string;
|
|
233
|
+
msg_data: AnyDict;
|
|
234
|
+
group_id: string;
|
|
235
|
+
from_type: number;
|
|
236
|
+
group_name: string;
|
|
237
|
+
bot_creator: string;
|
|
238
|
+
msg_id: string;
|
|
239
|
+
bot_id: string;
|
|
240
|
+
is_at_me: boolean;
|
|
241
|
+
is_at_all: boolean;
|
|
242
|
+
constructor(init: {
|
|
243
|
+
from_id?: string;
|
|
244
|
+
entry_id?: string;
|
|
245
|
+
msg_type?: string;
|
|
246
|
+
msg_data?: AnyDict;
|
|
247
|
+
group_id?: string;
|
|
248
|
+
from_type?: number;
|
|
249
|
+
group_name?: string;
|
|
250
|
+
bot_creator?: string;
|
|
251
|
+
msg_id?: string;
|
|
252
|
+
bot_id?: string;
|
|
253
|
+
is_at_me?: boolean;
|
|
254
|
+
is_at_all?: boolean;
|
|
255
|
+
});
|
|
256
|
+
toDict(): AnyDict;
|
|
257
|
+
}
|
|
258
|
+
export declare class WbVisibleConfigData {
|
|
259
|
+
entry_id: string;
|
|
260
|
+
department_ids: string[];
|
|
261
|
+
staff_ids: string[];
|
|
262
|
+
timestamp: string;
|
|
263
|
+
is_test_mode_on: boolean;
|
|
264
|
+
constructor(init: {
|
|
265
|
+
entry_id?: string;
|
|
266
|
+
department_ids?: string[];
|
|
267
|
+
staff_ids?: string[];
|
|
268
|
+
timestamp?: string;
|
|
269
|
+
is_test_mode_on?: boolean;
|
|
270
|
+
});
|
|
271
|
+
toDict(): AnyDict;
|
|
272
|
+
}
|
|
273
|
+
export declare class GroupCreateApproveData {
|
|
274
|
+
apply_request_id: string;
|
|
275
|
+
group_id: string;
|
|
276
|
+
timestamp: string;
|
|
277
|
+
constructor(init: {
|
|
278
|
+
apply_request_id?: string;
|
|
279
|
+
group_id?: string;
|
|
280
|
+
timestamp?: string;
|
|
281
|
+
});
|
|
282
|
+
toDict(): AnyDict;
|
|
283
|
+
}
|
|
284
|
+
export declare class ScheduleModifyData {
|
|
285
|
+
primary_schedule_id: string;
|
|
286
|
+
schedule_id: string;
|
|
287
|
+
summary: string;
|
|
288
|
+
description: string;
|
|
289
|
+
operation_type: string;
|
|
290
|
+
current_time: number;
|
|
291
|
+
repeat_type: string;
|
|
292
|
+
expire_date_type: string;
|
|
293
|
+
all_day: string;
|
|
294
|
+
rule: string;
|
|
295
|
+
rule_start_time: number;
|
|
296
|
+
rule_end_time: number;
|
|
297
|
+
start_time: AnyDict;
|
|
298
|
+
end_time: AnyDict;
|
|
299
|
+
operator: string;
|
|
300
|
+
attendees: AnyDict[];
|
|
301
|
+
timestamp: string;
|
|
302
|
+
constructor(init: {
|
|
303
|
+
primary_schedule_id?: string;
|
|
304
|
+
schedule_id?: string;
|
|
305
|
+
summary?: string;
|
|
306
|
+
description?: string;
|
|
307
|
+
operation_type?: string;
|
|
308
|
+
current_time?: number;
|
|
309
|
+
repeat_type?: string;
|
|
310
|
+
expire_date_type?: string;
|
|
311
|
+
all_day?: string;
|
|
312
|
+
rule?: string;
|
|
313
|
+
rule_start_time?: number;
|
|
314
|
+
rule_end_time?: number;
|
|
315
|
+
start_time?: AnyDict;
|
|
316
|
+
end_time?: AnyDict;
|
|
317
|
+
operator?: string;
|
|
318
|
+
attendees?: AnyDict[];
|
|
319
|
+
timestamp?: string;
|
|
320
|
+
});
|
|
321
|
+
toDict(): AnyDict;
|
|
322
|
+
}
|
|
323
|
+
export declare class ScheduleDeleteData {
|
|
324
|
+
primary_schedule_id: string;
|
|
325
|
+
schedule_id: string;
|
|
326
|
+
summary: string;
|
|
327
|
+
description: string;
|
|
328
|
+
operation_type: string;
|
|
329
|
+
current_time: number;
|
|
330
|
+
repeat_type: string;
|
|
331
|
+
expire_date_type: string;
|
|
332
|
+
all_day: string;
|
|
333
|
+
rule: string;
|
|
334
|
+
rule_start_time: number;
|
|
335
|
+
rule_end_time: number;
|
|
336
|
+
start_time: AnyDict;
|
|
337
|
+
end_time: AnyDict;
|
|
338
|
+
operator: string;
|
|
339
|
+
timestamp: string;
|
|
340
|
+
constructor(init: {
|
|
341
|
+
primary_schedule_id?: string;
|
|
342
|
+
schedule_id?: string;
|
|
343
|
+
summary?: string;
|
|
344
|
+
description?: string;
|
|
345
|
+
operation_type?: string;
|
|
346
|
+
current_time?: number;
|
|
347
|
+
repeat_type?: string;
|
|
348
|
+
expire_date_type?: string;
|
|
349
|
+
all_day?: string;
|
|
350
|
+
rule?: string;
|
|
351
|
+
rule_start_time?: number;
|
|
352
|
+
rule_end_time?: number;
|
|
353
|
+
start_time?: AnyDict;
|
|
354
|
+
end_time?: AnyDict;
|
|
355
|
+
operator?: string;
|
|
356
|
+
timestamp?: string;
|
|
357
|
+
});
|
|
358
|
+
toDict(): AnyDict;
|
|
359
|
+
}
|
|
360
|
+
export declare class TagMemberData {
|
|
361
|
+
tag_id: string;
|
|
362
|
+
timestamp: string;
|
|
363
|
+
constructor(init: {
|
|
364
|
+
tag_id?: string;
|
|
365
|
+
timestamp?: string;
|
|
366
|
+
});
|
|
367
|
+
toDict(): AnyDict;
|
|
368
|
+
}
|
|
369
|
+
export type CallbackEventData = AccountSubscribeData | AccountUnsubscribeData | StaffInfoData | StaffModifyData | StaffCreateData | StaffDeleteData | TelephoneTrackData | DeptCreateData | DeptModifyData | DeptDeleteData | AppInstallData | AppUninstallData | UaCertCreateData | UaCertDeleteData | ReportLocationData | UserLogoutData | DataScopeData | BotPrivateMessageData | BotGroupMessageData | WbVisibleConfigData | GroupCreateApproveData | ScheduleModifyData | ScheduleDeleteData | TagMemberData;
|
|
370
|
+
export declare const EVENT_DATA_PARSERS: Record<string, any>;
|
|
371
|
+
export declare const FIELD_MAPS: Record<string, Record<string, string>>;
|
|
372
|
+
export declare function parseCallbackPayload(input: string, options?: {
|
|
373
|
+
encodingKey?: string;
|
|
374
|
+
verifySignature?: boolean;
|
|
375
|
+
timestamp?: string;
|
|
376
|
+
nonce?: string;
|
|
377
|
+
signature?: string;
|
|
378
|
+
callbackToken?: string;
|
|
379
|
+
knownAppId?: string;
|
|
380
|
+
}): CallbackEvent[];
|
|
381
|
+
export declare function verifyCallbackSignature(timestamp: string, nonce: string, signature: string, encodingKey: string, dataEncrypt?: string, callbackToken?: string): boolean;
|
|
382
|
+
export declare function decryptCallbackPayload(encryptedData: string, encodingKey: string, knownAppId?: string): AnyDict;
|
|
383
|
+
export declare function getCallbackEventTypes(): Record<string, string>;
|
|
384
|
+
export {};
|