@zhama/tego-plugin-sdk 1.40.1 → 1.40.3

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/dist/server.d.cts CHANGED
@@ -15,32 +15,32 @@ declare const accountInviteSchema: z.ZodEffects<z.ZodObject<{
15
15
  requestId: string;
16
16
  organizationName: string;
17
17
  email?: string | undefined;
18
- username?: string | undefined;
19
18
  phone?: string | undefined;
19
+ username?: string | undefined;
20
20
  userId?: string | undefined;
21
21
  fullName?: string | undefined;
22
22
  }, {
23
23
  requestId: string;
24
24
  organizationName: string;
25
25
  email?: string | undefined;
26
- username?: string | undefined;
27
26
  phone?: string | undefined;
27
+ username?: string | undefined;
28
28
  userId?: string | undefined;
29
29
  fullName?: string | undefined;
30
30
  }>, {
31
31
  requestId: string;
32
32
  organizationName: string;
33
33
  email?: string | undefined;
34
- username?: string | undefined;
35
34
  phone?: string | undefined;
35
+ username?: string | undefined;
36
36
  userId?: string | undefined;
37
37
  fullName?: string | undefined;
38
38
  }, {
39
39
  requestId: string;
40
40
  organizationName: string;
41
41
  email?: string | undefined;
42
- username?: string | undefined;
43
42
  phone?: string | undefined;
43
+ username?: string | undefined;
44
44
  userId?: string | undefined;
45
45
  fullName?: string | undefined;
46
46
  }>;
@@ -59,36 +59,36 @@ declare const accountProvisionSchema: z.ZodEffects<z.ZodObject<{
59
59
  requestId: string;
60
60
  organizationName: string;
61
61
  email?: string | undefined;
62
+ phone?: string | undefined;
62
63
  password?: string | undefined;
63
64
  username?: string | undefined;
64
- phone?: string | undefined;
65
65
  userId?: string | undefined;
66
66
  fullName?: string | undefined;
67
67
  }, {
68
68
  requestId: string;
69
69
  organizationName: string;
70
70
  email?: string | undefined;
71
+ phone?: string | undefined;
71
72
  password?: string | undefined;
72
73
  username?: string | undefined;
73
- phone?: string | undefined;
74
74
  userId?: string | undefined;
75
75
  fullName?: string | undefined;
76
76
  }>, {
77
77
  requestId: string;
78
78
  organizationName: string;
79
79
  email?: string | undefined;
80
+ phone?: string | undefined;
80
81
  password?: string | undefined;
81
82
  username?: string | undefined;
82
- phone?: string | undefined;
83
83
  userId?: string | undefined;
84
84
  fullName?: string | undefined;
85
85
  }, {
86
86
  requestId: string;
87
87
  organizationName: string;
88
88
  email?: string | undefined;
89
+ phone?: string | undefined;
89
90
  password?: string | undefined;
90
91
  username?: string | undefined;
91
- phone?: string | undefined;
92
92
  userId?: string | undefined;
93
93
  fullName?: string | undefined;
94
94
  }>;
@@ -445,13 +445,13 @@ declare const pluginCollectionEnsureSchema: z.ZodObject<{
445
445
  /** @deprecated Accepted for older clients; reads use ordinary knowledge ACL. */
446
446
  policyScope: z.ZodOptional<z.ZodString>;
447
447
  }, "strict", z.ZodTypeAny, {
448
- name: string;
449
448
  key: string;
449
+ name: string;
450
450
  accessMode?: "managed" | "private" | undefined;
451
451
  policyScope?: string | undefined;
452
452
  }, {
453
- name: string;
454
453
  key: string;
454
+ name: string;
455
455
  accessMode?: "managed" | "private" | undefined;
456
456
  policyScope?: string | undefined;
457
457
  }>;
@@ -462,23 +462,23 @@ declare const pluginCollectionPermissionsSchema: z.ZodObject<{
462
462
  subjectType: z.ZodEnum<["user", "team", "role", "tenant"]>;
463
463
  subjectId: z.ZodString;
464
464
  }, "strict", z.ZodTypeAny, {
465
- subjectType: "user" | "team" | "tenant" | "role";
465
+ subjectType: "tenant" | "user" | "team" | "role";
466
466
  subjectId: string;
467
467
  }, {
468
- subjectType: "user" | "team" | "tenant" | "role";
468
+ subjectType: "tenant" | "user" | "team" | "role";
469
469
  subjectId: string;
470
470
  }>, "many">;
471
471
  }, "strict", z.ZodTypeAny, {
472
472
  key: string;
473
473
  grants: {
474
- subjectType: "user" | "team" | "tenant" | "role";
474
+ subjectType: "tenant" | "user" | "team" | "role";
475
475
  subjectId: string;
476
476
  }[];
477
477
  syncRevision?: string | undefined;
478
478
  }, {
479
479
  key: string;
480
480
  grants: {
481
- subjectType: "user" | "team" | "tenant" | "role";
481
+ subjectType: "tenant" | "user" | "team" | "role";
482
482
  subjectId: string;
483
483
  }[];
484
484
  syncRevision?: string | undefined;
@@ -524,23 +524,23 @@ declare const pluginCollectionAccessSchema: z.ZodEffects<z.ZodObject<{
524
524
  /** Identity snapshot returned by access({enabled:false}); required to resume. */
525
525
  identityRevision: z.ZodOptional<z.ZodString>;
526
526
  }, "strict", z.ZodTypeAny, {
527
- enabled?: boolean | undefined;
528
527
  key?: string | undefined;
528
+ enabled?: boolean | undefined;
529
529
  syncRevision?: string | undefined;
530
530
  identityRevision?: string | undefined;
531
531
  }, {
532
- enabled?: boolean | undefined;
533
532
  key?: string | undefined;
533
+ enabled?: boolean | undefined;
534
534
  syncRevision?: string | undefined;
535
535
  identityRevision?: string | undefined;
536
536
  }>, {
537
- enabled?: boolean | undefined;
538
537
  key?: string | undefined;
538
+ enabled?: boolean | undefined;
539
539
  syncRevision?: string | undefined;
540
540
  identityRevision?: string | undefined;
541
541
  }, {
542
- enabled?: boolean | undefined;
543
542
  key?: string | undefined;
543
+ enabled?: boolean | undefined;
544
544
  syncRevision?: string | undefined;
545
545
  identityRevision?: string | undefined;
546
546
  }>;
@@ -553,31 +553,31 @@ declare const pluginCollectionImportSchema: z.ZodObject<{
553
553
  text: z.ZodString;
554
554
  metadata: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null>>>;
555
555
  }, "strict", z.ZodTypeAny, {
556
- text: string;
557
556
  title: string;
557
+ text: string;
558
558
  externalId: string;
559
559
  metadata?: Record<string, string | number | boolean | null> | undefined;
560
560
  }, {
561
- text: string;
562
561
  title: string;
562
+ text: string;
563
563
  externalId: string;
564
564
  metadata?: Record<string, string | number | boolean | null> | undefined;
565
565
  }>, "many">, {
566
- text: string;
567
566
  title: string;
567
+ text: string;
568
568
  externalId: string;
569
569
  metadata?: Record<string, string | number | boolean | null> | undefined;
570
570
  }[], {
571
- text: string;
572
571
  title: string;
572
+ text: string;
573
573
  externalId: string;
574
574
  metadata?: Record<string, string | number | boolean | null> | undefined;
575
575
  }[]>;
576
576
  }, "strict", z.ZodTypeAny, {
577
577
  key: string;
578
578
  documents: {
579
- text: string;
580
579
  title: string;
580
+ text: string;
581
581
  externalId: string;
582
582
  metadata?: Record<string, string | number | boolean | null> | undefined;
583
583
  }[];
@@ -585,8 +585,8 @@ declare const pluginCollectionImportSchema: z.ZodObject<{
585
585
  }, {
586
586
  key: string;
587
587
  documents: {
588
- text: string;
589
588
  title: string;
589
+ text: string;
590
590
  externalId: string;
591
591
  metadata?: Record<string, string | number | boolean | null> | undefined;
592
592
  }[];
@@ -688,8 +688,8 @@ declare const pluginCollectionDocumentContentSchema: z.ZodObject<{
688
688
  page: z.ZodDefault<z.ZodNumber>;
689
689
  pageSize: z.ZodDefault<z.ZodNumber>;
690
690
  }, "strict", z.ZodTypeAny, {
691
- page: number;
692
691
  key: string;
692
+ page: number;
693
693
  externalId: string;
694
694
  pageSize: number;
695
695
  }, {
@@ -705,13 +705,13 @@ declare const pluginCollectionSearchSchema: z.ZodObject<{
705
705
  /** Equality per key; an array matches any of its values. */
706
706
  filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, "many">]>>>;
707
707
  }, "strict", z.ZodTypeAny, {
708
- query: string;
709
708
  key: string;
709
+ query: string;
710
710
  topK: number;
711
711
  filter?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
712
712
  }, {
713
- query: string;
714
713
  key: string;
714
+ query: string;
715
715
  filter?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
716
716
  topK?: number | undefined;
717
717
  }>;
@@ -889,39 +889,39 @@ declare const pluginKnowledgeBaseInputSchema: z.ZodObject<{
889
889
  expiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
890
890
  }, "strict", z.ZodTypeAny, {
891
891
  permission: "view" | "manage" | "use" | "operate";
892
- subjectType: "user" | "team" | "tenant" | "role";
892
+ subjectType: "tenant" | "user" | "team" | "role";
893
893
  subjectId: string;
894
894
  expiresAt?: string | null | undefined;
895
895
  }, {
896
896
  permission: "view" | "manage" | "use" | "operate";
897
- subjectType: "user" | "team" | "tenant" | "role";
897
+ subjectType: "tenant" | "user" | "team" | "role";
898
898
  subjectId: string;
899
899
  expiresAt?: string | null | undefined;
900
900
  }>, "many">;
901
901
  idempotencyKey: z.ZodString;
902
902
  }, "strict", z.ZodTypeAny, {
903
- name: string;
904
903
  scope: {
905
904
  type: "team";
906
905
  teamId: string;
907
906
  };
907
+ name: string;
908
908
  grants: {
909
909
  permission: "view" | "manage" | "use" | "operate";
910
- subjectType: "user" | "team" | "tenant" | "role";
910
+ subjectType: "tenant" | "user" | "team" | "role";
911
911
  subjectId: string;
912
912
  expiresAt?: string | null | undefined;
913
913
  }[];
914
914
  idempotencyKey: string;
915
915
  description?: string | undefined;
916
916
  }, {
917
- name: string;
918
917
  scope: {
919
918
  type: "team";
920
919
  teamId: string;
921
920
  };
921
+ name: string;
922
922
  grants: {
923
923
  permission: "view" | "manage" | "use" | "operate";
924
- subjectType: "user" | "team" | "tenant" | "role";
924
+ subjectType: "tenant" | "user" | "team" | "role";
925
925
  subjectId: string;
926
926
  expiresAt?: string | null | undefined;
927
927
  }[];
package/dist/server.d.ts CHANGED
@@ -15,32 +15,32 @@ declare const accountInviteSchema: z.ZodEffects<z.ZodObject<{
15
15
  requestId: string;
16
16
  organizationName: string;
17
17
  email?: string | undefined;
18
- username?: string | undefined;
19
18
  phone?: string | undefined;
19
+ username?: string | undefined;
20
20
  userId?: string | undefined;
21
21
  fullName?: string | undefined;
22
22
  }, {
23
23
  requestId: string;
24
24
  organizationName: string;
25
25
  email?: string | undefined;
26
- username?: string | undefined;
27
26
  phone?: string | undefined;
27
+ username?: string | undefined;
28
28
  userId?: string | undefined;
29
29
  fullName?: string | undefined;
30
30
  }>, {
31
31
  requestId: string;
32
32
  organizationName: string;
33
33
  email?: string | undefined;
34
- username?: string | undefined;
35
34
  phone?: string | undefined;
35
+ username?: string | undefined;
36
36
  userId?: string | undefined;
37
37
  fullName?: string | undefined;
38
38
  }, {
39
39
  requestId: string;
40
40
  organizationName: string;
41
41
  email?: string | undefined;
42
- username?: string | undefined;
43
42
  phone?: string | undefined;
43
+ username?: string | undefined;
44
44
  userId?: string | undefined;
45
45
  fullName?: string | undefined;
46
46
  }>;
@@ -59,36 +59,36 @@ declare const accountProvisionSchema: z.ZodEffects<z.ZodObject<{
59
59
  requestId: string;
60
60
  organizationName: string;
61
61
  email?: string | undefined;
62
+ phone?: string | undefined;
62
63
  password?: string | undefined;
63
64
  username?: string | undefined;
64
- phone?: string | undefined;
65
65
  userId?: string | undefined;
66
66
  fullName?: string | undefined;
67
67
  }, {
68
68
  requestId: string;
69
69
  organizationName: string;
70
70
  email?: string | undefined;
71
+ phone?: string | undefined;
71
72
  password?: string | undefined;
72
73
  username?: string | undefined;
73
- phone?: string | undefined;
74
74
  userId?: string | undefined;
75
75
  fullName?: string | undefined;
76
76
  }>, {
77
77
  requestId: string;
78
78
  organizationName: string;
79
79
  email?: string | undefined;
80
+ phone?: string | undefined;
80
81
  password?: string | undefined;
81
82
  username?: string | undefined;
82
- phone?: string | undefined;
83
83
  userId?: string | undefined;
84
84
  fullName?: string | undefined;
85
85
  }, {
86
86
  requestId: string;
87
87
  organizationName: string;
88
88
  email?: string | undefined;
89
+ phone?: string | undefined;
89
90
  password?: string | undefined;
90
91
  username?: string | undefined;
91
- phone?: string | undefined;
92
92
  userId?: string | undefined;
93
93
  fullName?: string | undefined;
94
94
  }>;
@@ -445,13 +445,13 @@ declare const pluginCollectionEnsureSchema: z.ZodObject<{
445
445
  /** @deprecated Accepted for older clients; reads use ordinary knowledge ACL. */
446
446
  policyScope: z.ZodOptional<z.ZodString>;
447
447
  }, "strict", z.ZodTypeAny, {
448
- name: string;
449
448
  key: string;
449
+ name: string;
450
450
  accessMode?: "managed" | "private" | undefined;
451
451
  policyScope?: string | undefined;
452
452
  }, {
453
- name: string;
454
453
  key: string;
454
+ name: string;
455
455
  accessMode?: "managed" | "private" | undefined;
456
456
  policyScope?: string | undefined;
457
457
  }>;
@@ -462,23 +462,23 @@ declare const pluginCollectionPermissionsSchema: z.ZodObject<{
462
462
  subjectType: z.ZodEnum<["user", "team", "role", "tenant"]>;
463
463
  subjectId: z.ZodString;
464
464
  }, "strict", z.ZodTypeAny, {
465
- subjectType: "user" | "team" | "tenant" | "role";
465
+ subjectType: "tenant" | "user" | "team" | "role";
466
466
  subjectId: string;
467
467
  }, {
468
- subjectType: "user" | "team" | "tenant" | "role";
468
+ subjectType: "tenant" | "user" | "team" | "role";
469
469
  subjectId: string;
470
470
  }>, "many">;
471
471
  }, "strict", z.ZodTypeAny, {
472
472
  key: string;
473
473
  grants: {
474
- subjectType: "user" | "team" | "tenant" | "role";
474
+ subjectType: "tenant" | "user" | "team" | "role";
475
475
  subjectId: string;
476
476
  }[];
477
477
  syncRevision?: string | undefined;
478
478
  }, {
479
479
  key: string;
480
480
  grants: {
481
- subjectType: "user" | "team" | "tenant" | "role";
481
+ subjectType: "tenant" | "user" | "team" | "role";
482
482
  subjectId: string;
483
483
  }[];
484
484
  syncRevision?: string | undefined;
@@ -524,23 +524,23 @@ declare const pluginCollectionAccessSchema: z.ZodEffects<z.ZodObject<{
524
524
  /** Identity snapshot returned by access({enabled:false}); required to resume. */
525
525
  identityRevision: z.ZodOptional<z.ZodString>;
526
526
  }, "strict", z.ZodTypeAny, {
527
- enabled?: boolean | undefined;
528
527
  key?: string | undefined;
528
+ enabled?: boolean | undefined;
529
529
  syncRevision?: string | undefined;
530
530
  identityRevision?: string | undefined;
531
531
  }, {
532
- enabled?: boolean | undefined;
533
532
  key?: string | undefined;
533
+ enabled?: boolean | undefined;
534
534
  syncRevision?: string | undefined;
535
535
  identityRevision?: string | undefined;
536
536
  }>, {
537
- enabled?: boolean | undefined;
538
537
  key?: string | undefined;
538
+ enabled?: boolean | undefined;
539
539
  syncRevision?: string | undefined;
540
540
  identityRevision?: string | undefined;
541
541
  }, {
542
- enabled?: boolean | undefined;
543
542
  key?: string | undefined;
543
+ enabled?: boolean | undefined;
544
544
  syncRevision?: string | undefined;
545
545
  identityRevision?: string | undefined;
546
546
  }>;
@@ -553,31 +553,31 @@ declare const pluginCollectionImportSchema: z.ZodObject<{
553
553
  text: z.ZodString;
554
554
  metadata: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null>>>;
555
555
  }, "strict", z.ZodTypeAny, {
556
- text: string;
557
556
  title: string;
557
+ text: string;
558
558
  externalId: string;
559
559
  metadata?: Record<string, string | number | boolean | null> | undefined;
560
560
  }, {
561
- text: string;
562
561
  title: string;
562
+ text: string;
563
563
  externalId: string;
564
564
  metadata?: Record<string, string | number | boolean | null> | undefined;
565
565
  }>, "many">, {
566
- text: string;
567
566
  title: string;
567
+ text: string;
568
568
  externalId: string;
569
569
  metadata?: Record<string, string | number | boolean | null> | undefined;
570
570
  }[], {
571
- text: string;
572
571
  title: string;
572
+ text: string;
573
573
  externalId: string;
574
574
  metadata?: Record<string, string | number | boolean | null> | undefined;
575
575
  }[]>;
576
576
  }, "strict", z.ZodTypeAny, {
577
577
  key: string;
578
578
  documents: {
579
- text: string;
580
579
  title: string;
580
+ text: string;
581
581
  externalId: string;
582
582
  metadata?: Record<string, string | number | boolean | null> | undefined;
583
583
  }[];
@@ -585,8 +585,8 @@ declare const pluginCollectionImportSchema: z.ZodObject<{
585
585
  }, {
586
586
  key: string;
587
587
  documents: {
588
- text: string;
589
588
  title: string;
589
+ text: string;
590
590
  externalId: string;
591
591
  metadata?: Record<string, string | number | boolean | null> | undefined;
592
592
  }[];
@@ -688,8 +688,8 @@ declare const pluginCollectionDocumentContentSchema: z.ZodObject<{
688
688
  page: z.ZodDefault<z.ZodNumber>;
689
689
  pageSize: z.ZodDefault<z.ZodNumber>;
690
690
  }, "strict", z.ZodTypeAny, {
691
- page: number;
692
691
  key: string;
692
+ page: number;
693
693
  externalId: string;
694
694
  pageSize: number;
695
695
  }, {
@@ -705,13 +705,13 @@ declare const pluginCollectionSearchSchema: z.ZodObject<{
705
705
  /** Equality per key; an array matches any of its values. */
706
706
  filter: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, "many">]>>>;
707
707
  }, "strict", z.ZodTypeAny, {
708
- query: string;
709
708
  key: string;
709
+ query: string;
710
710
  topK: number;
711
711
  filter?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
712
712
  }, {
713
- query: string;
714
713
  key: string;
714
+ query: string;
715
715
  filter?: Record<string, string | number | boolean | (string | number | boolean | null)[] | null> | undefined;
716
716
  topK?: number | undefined;
717
717
  }>;
@@ -889,39 +889,39 @@ declare const pluginKnowledgeBaseInputSchema: z.ZodObject<{
889
889
  expiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
890
890
  }, "strict", z.ZodTypeAny, {
891
891
  permission: "view" | "manage" | "use" | "operate";
892
- subjectType: "user" | "team" | "tenant" | "role";
892
+ subjectType: "tenant" | "user" | "team" | "role";
893
893
  subjectId: string;
894
894
  expiresAt?: string | null | undefined;
895
895
  }, {
896
896
  permission: "view" | "manage" | "use" | "operate";
897
- subjectType: "user" | "team" | "tenant" | "role";
897
+ subjectType: "tenant" | "user" | "team" | "role";
898
898
  subjectId: string;
899
899
  expiresAt?: string | null | undefined;
900
900
  }>, "many">;
901
901
  idempotencyKey: z.ZodString;
902
902
  }, "strict", z.ZodTypeAny, {
903
- name: string;
904
903
  scope: {
905
904
  type: "team";
906
905
  teamId: string;
907
906
  };
907
+ name: string;
908
908
  grants: {
909
909
  permission: "view" | "manage" | "use" | "operate";
910
- subjectType: "user" | "team" | "tenant" | "role";
910
+ subjectType: "tenant" | "user" | "team" | "role";
911
911
  subjectId: string;
912
912
  expiresAt?: string | null | undefined;
913
913
  }[];
914
914
  idempotencyKey: string;
915
915
  description?: string | undefined;
916
916
  }, {
917
- name: string;
918
917
  scope: {
919
918
  type: "team";
920
919
  teamId: string;
921
920
  };
921
+ name: string;
922
922
  grants: {
923
923
  permission: "view" | "manage" | "use" | "operate";
924
- subjectType: "user" | "team" | "tenant" | "role";
924
+ subjectType: "tenant" | "user" | "team" | "role";
925
925
  subjectId: string;
926
926
  expiresAt?: string | null | undefined;
927
927
  }[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhama/tego-plugin-sdk",
3
- "version": "1.40.1",
3
+ "version": "1.40.3",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",