@plolink/sdk 0.0.12 → 2.0.1

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.
@@ -39,8 +39,10 @@ type QuestionType = 'single_choice' | 'multiple_choice' | 'text' | 'scale' | 'ma
39
39
  interface QuestionDependency {
40
40
  /** 依赖的题目代码 */
41
41
  questionCode: string;
42
- /** 依赖的答案值 */
43
- expectedAnswer: string | string[];
42
+ /** 操作符类型 */
43
+ operator: 'equals' | 'not_equals' | 'in' | 'not_in';
44
+ /** 比较值(equals/not_equals: 原始值, in/not_in: 数组) */
45
+ value: string | number | boolean | (string | number | boolean)[];
44
46
  }
45
47
  /**
46
48
  * 题目选项
@@ -91,8 +93,8 @@ interface QuestionInfo {
91
93
  content: string;
92
94
  /** 题目元数据 */
93
95
  metadata: QuestionMetadata;
94
- /** 依赖条件(可为null) */
95
- dependsOn: QuestionDependency | null;
96
+ /** 依赖条件列表(可为null) */
97
+ dependsOn: QuestionDependency[] | null;
96
98
  /** 排序顺序 */
97
99
  sortOrder: number;
98
100
  }
@@ -39,8 +39,10 @@ type QuestionType = 'single_choice' | 'multiple_choice' | 'text' | 'scale' | 'ma
39
39
  interface QuestionDependency {
40
40
  /** 依赖的题目代码 */
41
41
  questionCode: string;
42
- /** 依赖的答案值 */
43
- expectedAnswer: string | string[];
42
+ /** 操作符类型 */
43
+ operator: 'equals' | 'not_equals' | 'in' | 'not_in';
44
+ /** 比较值(equals/not_equals: 原始值, in/not_in: 数组) */
45
+ value: string | number | boolean | (string | number | boolean)[];
44
46
  }
45
47
  /**
46
48
  * 题目选项
@@ -91,8 +93,8 @@ interface QuestionInfo {
91
93
  content: string;
92
94
  /** 题目元数据 */
93
95
  metadata: QuestionMetadata;
94
- /** 依赖条件(可为null) */
95
- dependsOn: QuestionDependency | null;
96
+ /** 依赖条件列表(可为null) */
97
+ dependsOn: QuestionDependency[] | null;
96
98
  /** 排序顺序 */
97
99
  sortOrder: number;
98
100
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plolink/sdk",
3
- "version": "0.0.12",
3
+ "version": "2.0.1",
4
4
  "description": "Plolink 开放平台官方 SDK",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",