@cpzxrobot/sdk 1.3.134 → 1.3.135

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/aiform_gateway.ts CHANGED
@@ -567,7 +567,11 @@ export class AiformGateway extends Object {
567
567
  * @param searchParams 搜索条件(可选)
568
568
  * @returns Promise 包含表头列表
569
569
  */
570
- list: async (factoryId: number, structType: string, searchParams?: object): Promise<AiformStructListResponse> => {
570
+ list: async (factoryId: number, structType: string, params?: {
571
+ searchParams?: object,
572
+ pageNum?: number,
573
+ pageSize?: number,
574
+ }): Promise<AiformStructListResponse> => {
571
575
  const axios = await this.context.ready;
572
576
 
573
577
  if (!factoryId) {
@@ -577,10 +581,14 @@ export class AiformGateway extends Object {
577
581
  throw new Error('结构化类型不能为空');
578
582
  }
579
583
 
584
+ const { searchParams, pageNum = 1, pageSize = 10 } = params || {};
585
+
580
586
  return axios.post(`/api/v2/form/pigfarm/list`,searchParams, {
581
587
  params: {
582
588
  factoryId,
583
- structType
589
+ structType,
590
+ pageNum,
591
+ pageSize,
584
592
  }
585
593
  }).then((res) => {
586
594
  if (res.data.code !== 200) {
@@ -479,7 +479,7 @@ class AiformGateway extends Object {
479
479
  * @param searchParams 搜索条件(可选)
480
480
  * @returns Promise 包含表头列表
481
481
  */
482
- list: (factoryId, structType, searchParams) => __awaiter(this, void 0, void 0, function* () {
482
+ list: (factoryId, structType, params) => __awaiter(this, void 0, void 0, function* () {
483
483
  const axios = yield this.context.ready;
484
484
  if (!factoryId) {
485
485
  throw new Error('工厂ID不能为空');
@@ -487,10 +487,13 @@ class AiformGateway extends Object {
487
487
  if (!structType) {
488
488
  throw new Error('结构化类型不能为空');
489
489
  }
490
+ const { searchParams, pageNum = 1, pageSize = 10 } = params || {};
490
491
  return axios.post(`/api/v2/form/pigfarm/list`, searchParams, {
491
492
  params: {
492
493
  factoryId,
493
- structType
494
+ structType,
495
+ pageNum,
496
+ pageSize,
494
497
  }
495
498
  }).then((res) => {
496
499
  if (res.data.code !== 200) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cpzxrobot/sdk",
3
- "version": "1.3.134",
3
+ "version": "1.3.135",
4
4
  "description": "提供给上海正芯数智APP第三方H5应用使用的SDK",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {