apaas-oapi-client 0.1.4 → 0.1.8

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/src/index.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import dayjs from 'dayjs';
2
2
  import axios, { AxiosInstance } from 'axios';
3
3
  import { LoggerLevel } from './logger';
4
- import { functionLimiter } from './limiter';
4
+ const { functionLimiter } = require('./limiter');
5
5
 
6
6
  /**
7
7
  * Client 初始化配置
@@ -66,7 +66,7 @@ class Client {
66
66
  baseURL: 'https://ae-openapi.feishu.cn',
67
67
  headers: { 'Content-Type': 'application/json' }
68
68
  });
69
- this.log(LoggerLevel.info, 'client initialized');
69
+ this.log(LoggerLevel.info, '[client] initialized');
70
70
  }
71
71
 
72
72
  /**
@@ -75,7 +75,7 @@ class Client {
75
75
  */
76
76
  setLoggerLevel(level: LoggerLevel) {
77
77
  this.loggerLevel = level;
78
- this.log(LoggerLevel.info, `logger level set to ${LoggerLevel[level]}`);
78
+ this.log(LoggerLevel.info, `[logger] logger level set to ${LoggerLevel[level]}`);
79
79
  }
80
80
 
81
81
  /**
@@ -96,7 +96,7 @@ class Client {
96
96
  */
97
97
  async init() {
98
98
  await this.ensureTokenValid();
99
- this.log(LoggerLevel.info, 'client ready');
99
+ this.log(LoggerLevel.info, '[client] ready');
100
100
  }
101
101
 
102
102
  /**
@@ -110,13 +110,13 @@ class Client {
110
110
  });
111
111
 
112
112
  if (res.data.code !== '0') {
113
- this.log(LoggerLevel.error, `[获取认证] 获取 accessToken 失败: ${res.data.msg}`);
113
+ this.log(LoggerLevel.error, `[fetch token] 获取 accessToken 失败: ${res.data.msg}`);
114
114
  throw new Error(`获取 accessToken 失败: ${res.data.msg}`);
115
115
  }
116
116
 
117
117
  this.accessToken = res.data.data.accessToken;
118
118
  this.expireTime = res.data.data.expireTime;
119
- this.log(LoggerLevel.info, '[获取认证] accessToken refreshed');
119
+ this.log(LoggerLevel.info, '[client] token refreshed');
120
120
  }
121
121
 
122
122
  /**
@@ -124,20 +124,20 @@ class Client {
124
124
  */
125
125
  private async ensureTokenValid() {
126
126
  if (this.disableTokenCache) {
127
- this.log(LoggerLevel.debug, '[获取认证] token cache disabled, refreshing token');
127
+ this.log(LoggerLevel.debug, '[client] token cache disabled, refreshing token');
128
128
  await this.getAccessToken();
129
129
  return;
130
130
  }
131
131
 
132
132
  if (!this.accessToken || !this.expireTime) {
133
- this.log(LoggerLevel.debug, '[获取认证] no token cached, fetching new token');
133
+ this.log(LoggerLevel.debug, '[client] no token cached, fetching new token');
134
134
  await this.getAccessToken();
135
135
  return;
136
136
  }
137
137
 
138
138
  const now = dayjs().valueOf();
139
139
  if (now + 60 * 1000 > this.expireTime) {
140
- this.log(LoggerLevel.debug, '[获取认证] token expired, refreshing');
140
+ this.log(LoggerLevel.debug, '[client] token expired, refreshing');
141
141
  await this.getAccessToken();
142
142
  }
143
143
  }
@@ -153,7 +153,7 @@ class Client {
153
153
  * 获取当前 namespace
154
154
  */
155
155
  get currentNamespace() {
156
- this.log(LoggerLevel.debug, `[获取命名空间] 当前命名空间: ${this.namespace}`);
156
+ this.log(LoggerLevel.debug, `🏷️ [获取命名空间] 当前命名空间: ${this.namespace}`);
157
157
  return this.namespace;
158
158
  }
159
159
 
@@ -161,6 +161,50 @@ class Client {
161
161
  * 对象模块
162
162
  */
163
163
  public object = {
164
+ metadata: {
165
+ /**
166
+ * 获取指定对象下指定字段的元数据
167
+ * @param params 请求参数 { object_name, field_name }
168
+ * @returns 接口返回结果
169
+ */
170
+ field: async (params: { object_name: string; field_name: string }): Promise<any> => {
171
+ const { object_name, field_name } = params;
172
+ await this.ensureTokenValid();
173
+ const url = `/api/data/v1/namespaces/${this.namespace}/meta/objects/${object_name}/fields/${field_name}`;
174
+
175
+ this.log(LoggerLevel.debug, `[对象字段查询] 📄 开始获取字段元数据 object_name=${object_name}, field_name=${field_name}`);
176
+
177
+ const res = await this.axiosInstance.get(url, {
178
+ headers: { Authorization: `${this.accessToken}` }
179
+ });
180
+
181
+ this.log(LoggerLevel.debug, `[对象字段查询] 📄 调用完成,返回状态=${res.data.code}`);
182
+ this.log(LoggerLevel.trace, `[对象字段查询] 📄 调用完成,返回信息=${JSON.stringify(res.data)}`);
183
+ return res.data;
184
+ },
185
+
186
+ /**
187
+ * 获取指定对象的所有字段信息
188
+ * @param params 请求参数 { object_name }
189
+ * @returns 接口返回结果
190
+ */
191
+ fields: async (params: { object_name: string }): Promise<any> => {
192
+ const { object_name } = params;
193
+ await this.ensureTokenValid();
194
+ const url = `/api/data/v1/namespaces/${this.namespace}/meta/objects/${object_name}`;
195
+
196
+ this.log(LoggerLevel.debug, `[对象字段查询] 📄 开始获取对象字段元数据 object_name=${object_name}`);
197
+
198
+ const res = await this.axiosInstance.get(url, {
199
+ headers: { Authorization: `${this.accessToken}` }
200
+ });
201
+
202
+ this.log(LoggerLevel.debug, `[对象字段查询] 📄 调用完成,返回状态=${res.data.code}`);
203
+ this.log(LoggerLevel.trace, `[对象字段查询] 📄 调用完成,返回信息=${JSON.stringify(res.data)}`);
204
+ return res.data;
205
+ }
206
+ },
207
+
164
208
  search: {
165
209
  /**
166
210
  * 单条记录查询
@@ -178,7 +222,9 @@ class Client {
178
222
 
179
223
  const response = await this.axiosInstance.post(url, { select }, { headers: { Authorization: `${this.accessToken}` } });
180
224
 
181
- this.log(LoggerLevel.info, `[单条查询记录] 🔍 record_id: ${record_id} 查询完成,返回 code: ${response.data.code}`);
225
+ this.log(LoggerLevel.debug, `[单条查询记录] 🔍 查询 record_id: ${record_id} 调用完成,返回状态: ${response.data.code}`);
226
+ this.log(LoggerLevel.trace, `[单条查询记录] 🔍 查询 record_id: ${record_id} 调用完成,返回信息: ${JSON.stringify(response.data)}`);
227
+
182
228
  return response.data;
183
229
  });
184
230
 
@@ -200,7 +246,9 @@ class Client {
200
246
  headers: { Authorization: `${this.accessToken}` }
201
247
  });
202
248
 
203
- this.log(LoggerLevel.debug, `[批量查询记录] 🔍 records_query 调用完成,object_name: ${object_name}`);
249
+ this.log(LoggerLevel.info, `[批量查询记录] 🔍 接口调用完成`);
250
+ this.log(LoggerLevel.debug, `[批量查询记录] 🔍 调用完成,返回状态: ${res.data.code},返回数据总数${res.data?.data?.total || 'unknown'}`);
251
+ this.log(LoggerLevel.trace, `[批量查询记录] 🔍 调用完成,返回信息: ${JSON.stringify(res.data)}`);
204
252
  return res.data;
205
253
  },
206
254
 
@@ -239,7 +287,9 @@ class Client {
239
287
 
240
288
  nextPageToken = res.data.next_page_token;
241
289
 
290
+ this.log(LoggerLevel.debug, `[批量查询记录] 🔍 第 ${page} 页查询,nextPageToken: ${nextPageToken || ''}`);
242
291
  this.log(LoggerLevel.debug, `[批量查询记录] 🔍 第 ${page} 页查询完成,items.length: ${res.data.items.length}`);
292
+ this.log(LoggerLevel.trace, `[批量查询记录] 🔍 第 ${page} 页查询结果: ${JSON.stringify(res.data.items)}`);
243
293
  return res;
244
294
  });
245
295
  } while (nextPageToken);
@@ -248,6 +298,113 @@ class Client {
248
298
  }
249
299
  },
250
300
 
301
+ create: {
302
+ /**
303
+ * 单条记录创建
304
+ * @param params 请求参数 { object_name, record }
305
+ * @returns 接口返回结果
306
+ */
307
+ record: async (params: { object_name: string; record: any }): Promise<any> => {
308
+ const { object_name, record } = params;
309
+ const url = `/v1/data/namespaces/${this.namespace}/objects/${object_name}/records`;
310
+
311
+ this.log(LoggerLevel.info, `[单条创建记录] ➕ 开始向对象 ${object_name} 创建记录`);
312
+
313
+ const res = await functionLimiter(async () => {
314
+ await this.ensureTokenValid();
315
+
316
+ const response = await this.axiosInstance.post(
317
+ url,
318
+ { record },
319
+ {
320
+ headers: { Authorization: `${this.accessToken}` }
321
+ }
322
+ );
323
+
324
+ this.log(LoggerLevel.info, `[单条创建记录] ➕ 向对象 ${object_name} 内创建记录,调用完成`);
325
+ this.log(LoggerLevel.debug, `[单条创建记录] ➕ 向对象 ${object_name} 内创建数据,调用完成,返回状态: ${response.data.code}`);
326
+ this.log(LoggerLevel.trace, `[单条创建记录] ➕ 向对象 ${object_name} 内创建数据,调用完成,返回信息: ${JSON.stringify(response.data)}`);
327
+
328
+ return response.data;
329
+ });
330
+
331
+ return res;
332
+ },
333
+
334
+ /**
335
+ * 批量创建记录
336
+ * @param params 请求参数 { object_name, records }
337
+ * @returns 接口返回结果
338
+ */
339
+ records: async (params: { object_name: string; records: any[] }): Promise<any> => {
340
+ const { object_name, records } = params;
341
+ await this.ensureTokenValid();
342
+
343
+ const url = `/v1/data/namespaces/${this.namespace}/objects/${object_name}/records_batch`;
344
+
345
+ const res = await this.axiosInstance.post(
346
+ url,
347
+ { records },
348
+ {
349
+ headers: { Authorization: `${this.accessToken}` }
350
+ }
351
+ );
352
+
353
+ this.log(LoggerLevel.info, `[批量创建记录] ➕ 开始向对象 ${object_name} 批量创建记录`);
354
+ this.log(LoggerLevel.debug, `[批量创建记录] ➕ 向对象 ${object_name} 批量创建记录,调用完成,返回状态: ${res.data.code}`);
355
+ this.log(LoggerLevel.trace, `[批量创建记录] ➕ 向对象 ${object_name} 批量创建记录,调用完成,返回信息: ${JSON.stringify(res.data)}`);
356
+ return res.data;
357
+ },
358
+
359
+ /**
360
+ * 分批创建所有记录
361
+ * @param params 请求参数 { object_name, records }
362
+ * @returns { total, items }
363
+ */
364
+ recordsWithIterator: async (params: { object_name: string; records: any[] }): Promise<{ total: number; items: any[] }> => {
365
+ const { object_name, records } = params;
366
+
367
+ let results: any[] = [];
368
+ let total = records.length;
369
+ const chunkSize = 100;
370
+ let page = 0;
371
+
372
+ const chunks: any[][] = [];
373
+ for (let i = 0; i < records.length; i += chunkSize) {
374
+ chunks.push(records.slice(i, i + chunkSize));
375
+ }
376
+
377
+ this.log(LoggerLevel.debug, `[批量创建记录] ➕ 总共 ${records.length} 条记录,拆分为 ${chunks.length} 组,每组最多 ${chunkSize} 条`);
378
+ this.log(LoggerLevel.trace, `[批量创建记录] ➕ 总共 ${records.length} 条记录,拆分为 ${chunks.length} 组,每组最多 ${chunkSize} 条`);
379
+
380
+ for (const [index, chunk] of chunks.entries()) {
381
+ page += 1;
382
+
383
+ this.log(LoggerLevel.debug, `[批量创建记录] ➕ 开始创建第 ${index + 1} 组,共 ${chunk.length} 条`);
384
+ this.log(LoggerLevel.trace, `[批量创建记录] ➕ 开始创建第 ${index + 1} 组,共 ${chunk.length} 条`);
385
+
386
+ const pageRes = await functionLimiter(async () => {
387
+ const res = await this.object.create.records({
388
+ object_name,
389
+ records: chunk
390
+ });
391
+
392
+ if (res.data && Array.isArray(res.data.items)) {
393
+ results = results.concat(res.data.items);
394
+ }
395
+
396
+ this.log(LoggerLevel.info, `[批量创建记录] ➕ 创建第 ${page} 页数据,调用完成,创建数量: ${res.data.items.length}`);
397
+ this.log(LoggerLevel.debug, `[批量创建记录] ➕ 创建第 ${page} 页页数据,调用完成,返回状态: ${res.data.code}`);
398
+ this.log(LoggerLevel.trace, `[批量创建记录] ➕ 创建第 ${page} 页页数据,调用结果: ${JSON.stringify(res.data.items)}`);
399
+
400
+ return res;
401
+ });
402
+ }
403
+
404
+ return { total, items: results };
405
+ }
406
+ },
407
+
251
408
  update: {
252
409
  /**
253
410
  * 单条更新
@@ -265,7 +422,9 @@ class Client {
265
422
 
266
423
  const response = await this.axiosInstance.patch(url, { record }, { headers: { Authorization: `${this.accessToken}` } });
267
424
 
268
- this.log(LoggerLevel.info, `[单条更新记录] 💾 record_id: ${record_id} 更新完成,返回 code: ${response.data.code}`);
425
+ this.log(LoggerLevel.info, `[单条更新记录] 💾 更新 record_id: ${record_id} 调用完成`);
426
+ this.log(LoggerLevel.debug, `[单条更新记录] 💾 更新 record_id: ${record_id} 调用完成,返回状态: ${response.data.code}`);
427
+ this.log(LoggerLevel.trace, `[单条更新记录] 💾 更新 record_id: ${record_id} 调用完成,返回信息: ${JSON.stringify(response.data)}`);
269
428
  return response.data;
270
429
  });
271
430
 
@@ -287,18 +446,21 @@ class Client {
287
446
  chunks.push(records.slice(i, i + chunkSize));
288
447
  }
289
448
 
290
- this.log(LoggerLevel.info, `[批量更新记录] 💾 总共 ${records.length} 条记录,拆分为 ${chunks.length} 组,每组最多 ${chunkSize} 条`);
449
+ this.log(LoggerLevel.debug, `[批量更新记录] 💾 总共 ${records.length} 条记录,拆分为 ${chunks.length} 组,每组最多 ${chunkSize} 条`);
450
+ this.log(LoggerLevel.trace, `[批量更新记录] 💾 总共 ${records.length} 条记录,拆分为 ${chunks.length} 组,每组最多 ${chunkSize} 条`);
291
451
 
292
452
  const results: any[] = [];
293
453
  for (const [index, chunk] of chunks.entries()) {
294
- this.log(LoggerLevel.info, `[批量更新记录] 💾 开始更新第 ${index + 1} 组,共 ${chunk.length} 条`);
454
+ this.log(LoggerLevel.debug, `[批量更新记录] 💾 开始更新第 ${index + 1} 组,共 ${chunk.length} 条`);
455
+ this.log(LoggerLevel.trace, `[批量更新记录] 💾 开始更新第 ${index + 1} 组,共 ${chunk.length} 条`);
295
456
 
296
457
  const res = await functionLimiter(async () => {
297
458
  await this.ensureTokenValid();
298
459
 
299
460
  const response = await this.axiosInstance.patch(url, { records: chunk }, { headers: { Authorization: `${this.accessToken}` } });
300
461
 
301
- this.log(LoggerLevel.info, `[批量更新记录] 💾 ${index + 1} 组更新完成,返回 code: ${response.data.code}`);
462
+ this.log(LoggerLevel.debug, `[批量更新记录] 💾 更新第 ${index + 1} 组调用完成,返回状态: ${JSON.stringify(response.data)}`);
463
+ this.log(LoggerLevel.trace, `[批量更新记录] 💾 更新第 ${index + 1} 组调用完成,返回信息: ${response.data}`);
302
464
  return response.data;
303
465
  });
304
466
 
@@ -319,7 +481,7 @@ class Client {
319
481
  const { object_name, record_id } = params;
320
482
  const url = `/v1/data/namespaces/${this.namespace}/objects/${object_name}/records/${record_id}`;
321
483
 
322
- this.log(LoggerLevel.info, `[单条删除记录] 🗑️ 开始删除 record_id: ${record_id}`);
484
+ this.log(LoggerLevel.trace, `[单条删除记录] 🗑️ 开始删除 record_id: ${record_id}`);
323
485
 
324
486
  const res = await functionLimiter(async () => {
325
487
  await this.ensureTokenValid();
@@ -328,7 +490,7 @@ class Client {
328
490
  headers: { Authorization: `${this.accessToken}` }
329
491
  });
330
492
 
331
- this.log(LoggerLevel.info, `[单条删除记录] 🗑️ record_id: ${record_id} 删除完成,返回 code: ${response.data.code}`);
493
+ this.log(LoggerLevel.info, `[单条删除记录] 🗑️ 删除 record_id: ${record_id} 调用完成,返回信息: ${JSON.stringify(response.data)}`);
332
494
  return response.data;
333
495
  });
334
496
 
@@ -350,7 +512,7 @@ class Client {
350
512
  chunks.push(ids.slice(i, i + chunkSize));
351
513
  }
352
514
 
353
- this.log(LoggerLevel.info, `[批量删除记录] 🗑️ 总共 ${ids.length} 条记录,拆分为 ${chunks.length} 组,每组最多 ${chunkSize} 条`);
515
+ this.log(LoggerLevel.debug, `[批量删除记录] 🗑️ 总共 ${ids.length} 条记录,拆分为 ${chunks.length} 组,每组最多 ${chunkSize} 条`);
354
516
 
355
517
  const results: any[] = [];
356
518
  for (const [index, chunk] of chunks.entries()) {
@@ -364,7 +526,8 @@ class Client {
364
526
  data: { ids: chunk }
365
527
  });
366
528
 
367
- this.log(LoggerLevel.info, `[批量删除记录] 🗑️ 第 ${index + 1} 组删除完成,返回 code: ${response.data.code}`);
529
+ this.log(LoggerLevel.debug, `[批量删除记录] 🗑️ 第 ${index + 1} 组删除完成,返回状态: ${response.data.code}`);
530
+ this.log(LoggerLevel.trace, `[批量删除记录] 🗑️ 第 ${index + 1} 组删除完成,返回信息: ${JSON.stringify(response.data)}`);
368
531
  return response.data;
369
532
  });
370
533
 
@@ -375,6 +538,135 @@ class Client {
375
538
  }
376
539
  }
377
540
  };
541
+
542
+ /**
543
+ * 部门 ID 交换模块
544
+ */
545
+ public department = {
546
+ /**
547
+ * 单个部门 ID 交换
548
+ * @param params 请求参数
549
+ * @returns 单个部门映射结果
550
+ */
551
+ exchange: async (params: { department_id_type: 'department_id' | 'external_department_id' | 'external_open_department_id'; department_id: string }): Promise<any> => {
552
+ const { department_id_type, department_id } = params;
553
+ // department_id_type 可选值:
554
+ // - 'department_id' (如 "1758534140403815")
555
+ // - 'external_department_id' (外部平台 department_id,无固定格式)
556
+ // - 'external_open_department_id' (以 'oc_' 开头的 open_department_id)
557
+
558
+ const url = '/api/integration/v2/feishu/getDepartments';
559
+
560
+ this.log(LoggerLevel.info, `[部门ID交换] 🔄 开始交换单个部门 ID: ${department_id}`);
561
+
562
+ const res = await functionLimiter(async () => {
563
+ await this.ensureTokenValid();
564
+
565
+ const response = await this.axiosInstance.post(
566
+ url,
567
+ {
568
+ department_id_type,
569
+ department_ids: [department_id]
570
+ },
571
+ {
572
+ headers: { Authorization: `${this.accessToken}` }
573
+ }
574
+ );
575
+
576
+ this.log(LoggerLevel.debug, `[部门ID交换] 🔄 交换部门 ID: ${department_id} 调用完成,返回状态: ${response.data.code}`);
577
+ this.log(LoggerLevel.debug, `[部门ID交换] 🔄 交换部门 ID: ${department_id} 调用完成,返回信息: ${JSON.stringify(response.data)}`);
578
+ return response.data.data[0]; // 返回第一个元素
579
+ });
580
+
581
+ return res;
582
+ },
583
+
584
+ /**
585
+ * 批量部门 ID 交换
586
+ * @param params 请求参数
587
+ * @returns 所有子请求的返回结果数组
588
+ */
589
+ batchExchange: async (params: { department_id_type: 'department_id' | 'external_department_id' | 'external_open_department_id'; department_ids: string[] }): Promise<any[]> => {
590
+ const { department_id_type, department_ids } = params;
591
+ // department_id_type 可选值:
592
+ // - 'department_id' (如 "1758534140403815")
593
+ // - 'external_department_id' (外部平台 department_id,无固定格式)
594
+ // - 'external_open_department_id' (以 'oc_' 开头的 open_department_id)
595
+
596
+ const url = '/api/integration/v2/feishu/getDepartments';
597
+
598
+ const chunkSize = 100;
599
+ const chunks: string[][] = [];
600
+ for (let i = 0; i < department_ids.length; i += chunkSize) {
601
+ chunks.push(department_ids.slice(i, i + chunkSize));
602
+ }
603
+
604
+ this.log(LoggerLevel.info, `[批量部门ID交换] 🔄 总共 ${department_ids.length} 个部门 ID,拆分为 ${chunks.length} 组,每组最多 ${chunkSize} 个`);
605
+
606
+ const results: any[] = [];
607
+ for (const [index, chunk] of chunks.entries()) {
608
+ this.log(LoggerLevel.info, `[批量部门ID交换] 🔄 开始交换第 ${index + 1} 组,共 ${chunk.length} 个`);
609
+
610
+ const res = await functionLimiter(async () => {
611
+ await this.ensureTokenValid();
612
+
613
+ const response = await this.axiosInstance.post(
614
+ url,
615
+ {
616
+ department_id_type,
617
+ department_ids: chunk
618
+ },
619
+ {
620
+ headers: { Authorization: `${this.accessToken}` }
621
+ }
622
+ );
623
+
624
+ this.log(LoggerLevel.debug, `[批量部门ID交换] 🔄 交换第 ${index + 1} 组调用完成,返回状态: ${response.data.code}`);
625
+ this.log(LoggerLevel.trace, `[批量部门ID交换] 🔄 交换第 ${index + 1} 组调用完成,返回信息: ${JSON.stringify(response.data)}`);
626
+ return response.data.data;
627
+ });
628
+
629
+ results.push(...res);
630
+ }
631
+
632
+ return results;
633
+ }
634
+ };
635
+
636
+ /**
637
+ * 云函数模块
638
+ */
639
+ public function = {
640
+ /**
641
+ * 调用云函数
642
+ * @param params 请求参数 { name: string; params: any }
643
+ * @returns 接口返回结果
644
+ */
645
+ invoke: async (params: { name: string; params: any }): Promise<any> => {
646
+ const { name, params: functionParams } = params;
647
+ await this.ensureTokenValid();
648
+
649
+ const url = `/api/cloudfunction/v1/namespaces/${this.namespace}/invoke/${name}`;
650
+
651
+ this.log(LoggerLevel.info, `[调用云函数] ☁️ 云函数 ${name} 开始调用`);
652
+
653
+ const res = await this.axiosInstance.post(
654
+ url,
655
+ { params: functionParams },
656
+ {
657
+ headers: {
658
+ Authorization: `${this.accessToken}`,
659
+ 'Content-Type': 'application/json'
660
+ }
661
+ }
662
+ );
663
+
664
+ this.log(LoggerLevel.debug, `[调用云函数] ☁️ 云函数 ${name} 调用完成,返回状态: code=${res.data.code}`);
665
+ this.log(LoggerLevel.trace, `[调用云函数] ☁️ 云函数 ${name} 调用完成,返回信息: code=${JSON.stringify(res.data)}`);
666
+
667
+ return res.data;
668
+ }
669
+ };
378
670
  }
379
671
 
380
672
  export const apaas = {
package/CHANGELOG.md DELETED
@@ -1,19 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- ## [0.1.0] - 2025-06-30
6
- ### Added
7
- - 🎉 初始化 aPaaS OpenAPI Node.js SDK
8
- - ✅ 获取 accessToken
9
- - ✅ records 查询(支持分页迭代)
10
- - ✅ record 单条查询
11
- - ✅ record 单条更新、批量更新
12
- - ✅ record 单条删除、批量删除
13
- - ✅ 内置 Bottleneck 限流器
14
- - ✅ 自定义日志等级
15
-
16
- ---
17
-
18
- ## [Unreleased]
19
- - ✨ 新功能开发中...