@peers-app/peers-sdk 0.26.5 → 0.27.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/README.md +3 -1
- package/bin/peers-package.js +13 -0
- package/define/package.json +4 -0
- package/dist/contracts/__tests__/action-dispatch.test.js +56 -76
- package/dist/contracts/__tests__/also-implements.test.d.ts +1 -0
- package/dist/contracts/__tests__/also-implements.test.js +110 -0
- package/dist/contracts/__tests__/builder.test.js +45 -0
- package/dist/contracts/__tests__/contract-resolvers.test.js +134 -4
- package/dist/contracts/__tests__/frozen-contracts.test.d.ts +1 -0
- package/dist/contracts/__tests__/frozen-contracts.test.js +191 -0
- package/dist/contracts/__tests__/generic-tool-dispatch.test.js +13 -56
- package/dist/contracts/__tests__/host-contract-client.test.d.ts +1 -0
- package/dist/contracts/__tests__/host-contract-client.test.js +793 -0
- package/dist/contracts/__tests__/host-contract-transport.test.js +15 -0
- package/dist/contracts/__tests__/registry.test.js +68 -0
- package/dist/contracts/__tests__/target-dispatch.d.ts +11 -0
- package/dist/contracts/__tests__/target-dispatch.js +24 -0
- package/dist/contracts/__tests__/tool-catalog-service.test.js +37 -1
- package/dist/contracts/__tests__/tool-catalog.test.js +12 -3
- package/dist/contracts/__tests__/validate.test.js +177 -7
- package/dist/contracts/__tests__/workflow-context.test.js +0 -11
- package/dist/contracts/builder.d.ts +16 -2
- package/dist/contracts/builder.js +44 -3
- package/dist/contracts/contract-definition-schema.d.ts +251 -0
- package/dist/contracts/contract-definition-schema.js +48 -0
- package/dist/contracts/contract-provider-router.d.ts +2 -0
- package/dist/contracts/contract-provider-router.js +5 -2
- package/dist/contracts/contract-proxy.d.ts +52 -18
- package/dist/contracts/contract-proxy.js +144 -203
- package/dist/contracts/contract-resolvers.d.ts +6 -4
- package/dist/contracts/contract-resolvers.js +32 -9
- package/dist/contracts/frozen-contracts.d.ts +59 -0
- package/dist/contracts/frozen-contracts.js +86 -0
- package/dist/contracts/host-contract-client.d.ts +134 -0
- package/dist/contracts/host-contract-client.js +396 -0
- package/dist/contracts/host-contract-transport.d.ts +2 -0
- package/dist/contracts/host-contract-transport.js +8 -0
- package/dist/contracts/index.d.ts +6 -4
- package/dist/contracts/index.js +11 -5
- package/dist/contracts/registry.d.ts +31 -1
- package/dist/contracts/registry.js +100 -6
- package/dist/contracts/system/contract-catalog-contract.d.ts +61 -6
- package/dist/contracts/system/contract-catalog-contract.js +17 -5
- package/dist/contracts/tool-catalog-service.js +26 -6
- package/dist/contracts/tool-catalog.d.ts +1 -1
- package/dist/contracts/tool-catalog.js +4 -1
- package/dist/contracts/types.d.ts +32 -2
- package/dist/contracts/validate.d.ts +16 -1
- package/dist/contracts/validate.js +139 -25
- package/dist/data/change-tracking.d.ts +17 -5
- package/dist/data/change-tracking.js +22 -6
- package/dist/data/change-tracking.test.d.ts +1 -0
- package/dist/data/change-tracking.test.js +62 -0
- package/dist/data/group-members.d.ts +6 -1
- package/dist/data/group-members.js +12 -4
- package/dist/data/groups.d.ts +6 -1
- package/dist/data/groups.js +12 -4
- package/dist/data/orm/sql.data-source.d.ts +9 -0
- package/dist/data/orm/sql.data-source.js +47 -2
- package/dist/data/orm/sql.data-source.test.js +142 -0
- package/dist/data/orm/table-container.js +9 -9
- package/dist/data/orm/table-container.test.js +44 -0
- package/dist/data/orm/types.d.ts +41 -1
- package/dist/data/orm/types.js +159 -28
- package/dist/data/orm/types.test.js +129 -0
- package/dist/data/package-versions.d.ts +5 -1
- package/dist/data/package-versions.js +11 -4
- package/dist/data/packages.d.ts +7 -1
- package/dist/data/packages.js +13 -4
- package/dist/data/peer-types.d.ts +8 -62
- package/dist/data/persistent-vars.d.ts +4 -1
- package/dist/data/persistent-vars.js +7 -2
- package/dist/data/table-signing.test.d.ts +1 -0
- package/dist/data/table-signing.test.js +118 -0
- package/dist/data/tools.d.ts +29 -221
- package/dist/data/users.d.ts +1 -2
- package/dist/data/users.js +8 -5
- package/dist/define/also-implements.test.d.ts +1 -0
- package/dist/define/also-implements.test.js +123 -0
- package/dist/define/context.d.ts +77 -0
- package/dist/define/context.js +2 -0
- package/dist/define/contract-ref.d.ts +177 -0
- package/dist/define/contract-ref.js +67 -0
- package/dist/define/declare-contract.d.ts +167 -0
- package/dist/define/declare-contract.js +220 -0
- package/dist/define/declare-contract.test.d.ts +1 -0
- package/dist/define/declare-contract.test.js +573 -0
- package/dist/define/define-package.d.ts +203 -0
- package/dist/define/define-package.js +289 -0
- package/dist/define/define.test.d.ts +1 -0
- package/dist/define/define.test.js +1010 -0
- package/dist/define/empty-fields.d.ts +15 -0
- package/dist/define/empty-fields.js +134 -0
- package/dist/define/empty-fields.test.d.ts +1 -0
- package/dist/define/empty-fields.test.js +55 -0
- package/dist/define/events-observables.test.d.ts +1 -0
- package/dist/define/events-observables.test.js +1013 -0
- package/dist/define/events.d.ts +81 -0
- package/dist/define/events.js +81 -0
- package/dist/define/generated-field.d.ts +20 -0
- package/dist/define/generated-field.js +25 -0
- package/dist/define/index.d.ts +28 -0
- package/dist/define/index.js +62 -0
- package/dist/define/lazy-members.d.ts +8 -0
- package/dist/define/lazy-members.js +38 -0
- package/dist/define/manifest.d.ts +63 -0
- package/dist/define/manifest.js +653 -0
- package/dist/define/observables.d.ts +146 -0
- package/dist/define/observables.js +187 -0
- package/dist/define/serve-members.d.ts +21 -0
- package/dist/define/serve-members.js +152 -0
- package/dist/define/serve-members.test.d.ts +1 -0
- package/dist/define/serve-members.test.js +630 -0
- package/dist/define/serve.d.ts +22 -0
- package/dist/define/serve.js +58 -0
- package/dist/define/system-contracts.d.ts +41 -0
- package/dist/define/system-contracts.js +21 -0
- package/dist/define/table-handle.d.ts +13 -0
- package/dist/define/table-handle.js +36 -0
- package/dist/define/table.d.ts +128 -0
- package/dist/define/table.js +122 -0
- package/dist/define/tool.d.ts +129 -0
- package/dist/define/tool.js +91 -0
- package/dist/define/vars.d.ts +82 -0
- package/dist/define/vars.js +256 -0
- package/dist/define/vars.test.d.ts +1 -0
- package/dist/define/vars.test.js +39 -0
- package/dist/define/wire-value.d.ts +12 -0
- package/dist/define/wire-value.js +76 -0
- package/dist/define/worker-state.d.ts +15 -0
- package/dist/define/worker-state.js +45 -0
- package/dist/device/tx-encoding.test.js +10 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +5 -1
- package/dist/observable.d.ts +42 -2
- package/dist/observable.js +25 -7
- package/dist/package-build/build-package.d.ts +60 -0
- package/dist/package-build/build-package.js +312 -0
- package/dist/package-build/build-package.test.d.ts +1 -0
- package/dist/package-build/build-package.test.js +204 -0
- package/dist/package-build/cli.d.ts +7 -0
- package/dist/package-build/cli.js +218 -0
- package/dist/package-build/contract-add.d.ts +35 -0
- package/dist/package-build/contract-add.js +97 -0
- package/dist/package-build/contract-add.test.d.ts +1 -0
- package/dist/package-build/contract-add.test.js +467 -0
- package/dist/package-build/contract-source.d.ts +59 -0
- package/dist/package-build/contract-source.js +471 -0
- package/dist/package-build/freeze-contracts.d.ts +56 -0
- package/dist/package-build/freeze-contracts.js +198 -0
- package/dist/package-build/freeze-contracts.test.d.ts +1 -0
- package/dist/package-build/freeze-contracts.test.js +355 -0
- package/dist/package-installer/package-creator.d.ts +4 -0
- package/dist/package-installer/package-creator.js +57 -16
- package/dist/package-installer/package-creator.test.js +86 -0
- package/dist/package-loader/contract-members.d.ts +53 -0
- package/dist/package-loader/contract-members.js +31 -0
- package/dist/package-loader/contract-package-loader.js +5 -1
- package/dist/package-loader/contract-package-loader.test.js +11 -0
- package/dist/package-loader/host-authority-loading.test.js +9 -5
- package/dist/package-loader/index.d.ts +1 -0
- package/dist/package-loader/index.js +1 -0
- package/dist/package-loader/isolated-artifact.d.ts +80 -17
- package/dist/package-loader/isolated-artifact.js +257 -51
- package/dist/package-loader/isolated-artifact.test.js +294 -21
- package/dist/package-loader/isolated-runtime.d.ts +22 -7
- package/dist/package-loader/isolated-table-gateway.js +30 -11
- package/dist/package-loader/isolated-table-gateway.test.js +243 -0
- package/dist/package-loader/package-loader.d.ts +8 -1
- package/dist/package-loader/package-loader.js +39 -20
- package/dist/package-loader/package-loader.test.js +47 -0
- package/dist/peer-id.d.ts +25 -0
- package/dist/peer-id.js +99 -0
- package/dist/serial-json.compat.test.d.ts +1 -0
- package/dist/serial-json.compat.test.js +369 -0
- package/dist/serial-json.d.ts +41 -5
- package/dist/serial-json.js +216 -157
- package/dist/serial-json.oracle.d.ts +21 -0
- package/dist/serial-json.oracle.js +222 -0
- package/dist/serial-json.test.js +315 -0
- package/dist/testing/index.d.ts +4 -0
- package/dist/testing/index.js +8 -0
- package/dist/testing/mock-host-contract.d.ts +123 -0
- package/dist/testing/mock-host-contract.js +434 -0
- package/dist/testing/mock-host-contract.test.d.ts +1 -0
- package/dist/testing/mock-host-contract.test.js +782 -0
- package/dist/types/field-type.d.ts +35 -18
- package/dist/types/field-type.js +4 -1
- package/dist/types/zod-types.d.ts +9 -0
- package/dist/types/zod-types.js +8 -2
- package/dist/utils.d.ts +1 -25
- package/dist/utils.js +10 -90
- package/package.json +9 -2
- package/testing/package.json +4 -0
package/dist/data/tools.d.ts
CHANGED
|
@@ -18,45 +18,15 @@ export declare const ioSchema: z.ZodObject<{
|
|
|
18
18
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
19
19
|
isArray: z.ZodOptional<z.ZodBoolean>;
|
|
20
20
|
subType: z.ZodOptional<z.ZodString>;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
optional?: boolean | undefined;
|
|
25
|
-
description?: string | undefined;
|
|
26
|
-
defaultValue?: any;
|
|
27
|
-
isArray?: boolean | undefined;
|
|
28
|
-
subType?: string | undefined;
|
|
29
|
-
}, {
|
|
30
|
-
name: string;
|
|
31
|
-
type: import("../types/field-type").FieldType;
|
|
32
|
-
optional?: boolean | undefined;
|
|
33
|
-
description?: string | undefined;
|
|
34
|
-
defaultValue?: any;
|
|
35
|
-
isArray?: boolean | undefined;
|
|
36
|
-
subType?: string | undefined;
|
|
37
|
-
}>, "many">>;
|
|
21
|
+
fields: z.ZodOptional<z.ZodLazy<z.ZodArray<z.ZodType<import("../types/field-type").IField>>>>;
|
|
22
|
+
enumValues: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
23
|
+
}, "strip", z.ZodTypeAny, import("../types/field-type").IField, import("../types/field-type").IField>, "many">>;
|
|
38
24
|
}, "strip", z.ZodTypeAny, {
|
|
39
25
|
type: IOSchemaType;
|
|
40
|
-
fields:
|
|
41
|
-
name: string;
|
|
42
|
-
type: import("../types/field-type").FieldType;
|
|
43
|
-
optional?: boolean | undefined;
|
|
44
|
-
description?: string | undefined;
|
|
45
|
-
defaultValue?: any;
|
|
46
|
-
isArray?: boolean | undefined;
|
|
47
|
-
subType?: string | undefined;
|
|
48
|
-
}[];
|
|
26
|
+
fields: import("../types/field-type").IField[];
|
|
49
27
|
}, {
|
|
50
28
|
type: IOSchemaType;
|
|
51
|
-
fields?:
|
|
52
|
-
name: string;
|
|
53
|
-
type: import("../types/field-type").FieldType;
|
|
54
|
-
optional?: boolean | undefined;
|
|
55
|
-
description?: string | undefined;
|
|
56
|
-
defaultValue?: any;
|
|
57
|
-
isArray?: boolean | undefined;
|
|
58
|
-
subType?: string | undefined;
|
|
59
|
-
}[] | undefined;
|
|
29
|
+
fields?: import("../types/field-type").IField[] | undefined;
|
|
60
30
|
}>;
|
|
61
31
|
/** Field list plus complexity for a tool IO surface. */
|
|
62
32
|
export type IOSchema = z.infer<typeof ioSchema>;
|
|
@@ -82,45 +52,15 @@ export declare const toolSchema: z.ZodObject<{
|
|
|
82
52
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
83
53
|
isArray: z.ZodOptional<z.ZodBoolean>;
|
|
84
54
|
subType: z.ZodOptional<z.ZodString>;
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
optional?: boolean | undefined;
|
|
89
|
-
description?: string | undefined;
|
|
90
|
-
defaultValue?: any;
|
|
91
|
-
isArray?: boolean | undefined;
|
|
92
|
-
subType?: string | undefined;
|
|
93
|
-
}, {
|
|
94
|
-
name: string;
|
|
95
|
-
type: import("../types/field-type").FieldType;
|
|
96
|
-
optional?: boolean | undefined;
|
|
97
|
-
description?: string | undefined;
|
|
98
|
-
defaultValue?: any;
|
|
99
|
-
isArray?: boolean | undefined;
|
|
100
|
-
subType?: string | undefined;
|
|
101
|
-
}>, "many">>;
|
|
55
|
+
fields: z.ZodOptional<z.ZodLazy<z.ZodArray<z.ZodType<import("../types/field-type").IField>>>>;
|
|
56
|
+
enumValues: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
57
|
+
}, "strip", z.ZodTypeAny, import("../types/field-type").IField, import("../types/field-type").IField>, "many">>;
|
|
102
58
|
}, "strip", z.ZodTypeAny, {
|
|
103
59
|
type: IOSchemaType;
|
|
104
|
-
fields:
|
|
105
|
-
name: string;
|
|
106
|
-
type: import("../types/field-type").FieldType;
|
|
107
|
-
optional?: boolean | undefined;
|
|
108
|
-
description?: string | undefined;
|
|
109
|
-
defaultValue?: any;
|
|
110
|
-
isArray?: boolean | undefined;
|
|
111
|
-
subType?: string | undefined;
|
|
112
|
-
}[];
|
|
60
|
+
fields: import("../types/field-type").IField[];
|
|
113
61
|
}, {
|
|
114
62
|
type: IOSchemaType;
|
|
115
|
-
fields?:
|
|
116
|
-
name: string;
|
|
117
|
-
type: import("../types/field-type").FieldType;
|
|
118
|
-
optional?: boolean | undefined;
|
|
119
|
-
description?: string | undefined;
|
|
120
|
-
defaultValue?: any;
|
|
121
|
-
isArray?: boolean | undefined;
|
|
122
|
-
subType?: string | undefined;
|
|
123
|
-
}[] | undefined;
|
|
63
|
+
fields?: import("../types/field-type").IField[] | undefined;
|
|
124
64
|
}>;
|
|
125
65
|
outputSchema: z.ZodObject<{
|
|
126
66
|
type: z.ZodNativeEnum<typeof IOSchemaType>;
|
|
@@ -132,45 +72,15 @@ export declare const toolSchema: z.ZodObject<{
|
|
|
132
72
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
133
73
|
isArray: z.ZodOptional<z.ZodBoolean>;
|
|
134
74
|
subType: z.ZodOptional<z.ZodString>;
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
optional?: boolean | undefined;
|
|
139
|
-
description?: string | undefined;
|
|
140
|
-
defaultValue?: any;
|
|
141
|
-
isArray?: boolean | undefined;
|
|
142
|
-
subType?: string | undefined;
|
|
143
|
-
}, {
|
|
144
|
-
name: string;
|
|
145
|
-
type: import("../types/field-type").FieldType;
|
|
146
|
-
optional?: boolean | undefined;
|
|
147
|
-
description?: string | undefined;
|
|
148
|
-
defaultValue?: any;
|
|
149
|
-
isArray?: boolean | undefined;
|
|
150
|
-
subType?: string | undefined;
|
|
151
|
-
}>, "many">>;
|
|
75
|
+
fields: z.ZodOptional<z.ZodLazy<z.ZodArray<z.ZodType<import("../types/field-type").IField>>>>;
|
|
76
|
+
enumValues: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
77
|
+
}, "strip", z.ZodTypeAny, import("../types/field-type").IField, import("../types/field-type").IField>, "many">>;
|
|
152
78
|
}, "strip", z.ZodTypeAny, {
|
|
153
79
|
type: IOSchemaType;
|
|
154
|
-
fields:
|
|
155
|
-
name: string;
|
|
156
|
-
type: import("../types/field-type").FieldType;
|
|
157
|
-
optional?: boolean | undefined;
|
|
158
|
-
description?: string | undefined;
|
|
159
|
-
defaultValue?: any;
|
|
160
|
-
isArray?: boolean | undefined;
|
|
161
|
-
subType?: string | undefined;
|
|
162
|
-
}[];
|
|
80
|
+
fields: import("../types/field-type").IField[];
|
|
163
81
|
}, {
|
|
164
82
|
type: IOSchemaType;
|
|
165
|
-
fields?:
|
|
166
|
-
name: string;
|
|
167
|
-
type: import("../types/field-type").FieldType;
|
|
168
|
-
optional?: boolean | undefined;
|
|
169
|
-
description?: string | undefined;
|
|
170
|
-
defaultValue?: any;
|
|
171
|
-
isArray?: boolean | undefined;
|
|
172
|
-
subType?: string | undefined;
|
|
173
|
-
}[] | undefined;
|
|
83
|
+
fields?: import("../types/field-type").IField[] | undefined;
|
|
174
84
|
}>;
|
|
175
85
|
configSchema: z.ZodOptional<z.ZodObject<{
|
|
176
86
|
type: z.ZodNativeEnum<typeof IOSchemaType>;
|
|
@@ -182,45 +92,15 @@ export declare const toolSchema: z.ZodObject<{
|
|
|
182
92
|
optional: z.ZodOptional<z.ZodBoolean>;
|
|
183
93
|
isArray: z.ZodOptional<z.ZodBoolean>;
|
|
184
94
|
subType: z.ZodOptional<z.ZodString>;
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
optional?: boolean | undefined;
|
|
189
|
-
description?: string | undefined;
|
|
190
|
-
defaultValue?: any;
|
|
191
|
-
isArray?: boolean | undefined;
|
|
192
|
-
subType?: string | undefined;
|
|
193
|
-
}, {
|
|
194
|
-
name: string;
|
|
195
|
-
type: import("../types/field-type").FieldType;
|
|
196
|
-
optional?: boolean | undefined;
|
|
197
|
-
description?: string | undefined;
|
|
198
|
-
defaultValue?: any;
|
|
199
|
-
isArray?: boolean | undefined;
|
|
200
|
-
subType?: string | undefined;
|
|
201
|
-
}>, "many">>;
|
|
95
|
+
fields: z.ZodOptional<z.ZodLazy<z.ZodArray<z.ZodType<import("../types/field-type").IField>>>>;
|
|
96
|
+
enumValues: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
97
|
+
}, "strip", z.ZodTypeAny, import("../types/field-type").IField, import("../types/field-type").IField>, "many">>;
|
|
202
98
|
}, "strip", z.ZodTypeAny, {
|
|
203
99
|
type: IOSchemaType;
|
|
204
|
-
fields:
|
|
205
|
-
name: string;
|
|
206
|
-
type: import("../types/field-type").FieldType;
|
|
207
|
-
optional?: boolean | undefined;
|
|
208
|
-
description?: string | undefined;
|
|
209
|
-
defaultValue?: any;
|
|
210
|
-
isArray?: boolean | undefined;
|
|
211
|
-
subType?: string | undefined;
|
|
212
|
-
}[];
|
|
100
|
+
fields: import("../types/field-type").IField[];
|
|
213
101
|
}, {
|
|
214
102
|
type: IOSchemaType;
|
|
215
|
-
fields?:
|
|
216
|
-
name: string;
|
|
217
|
-
type: import("../types/field-type").FieldType;
|
|
218
|
-
optional?: boolean | undefined;
|
|
219
|
-
description?: string | undefined;
|
|
220
|
-
defaultValue?: any;
|
|
221
|
-
isArray?: boolean | undefined;
|
|
222
|
-
subType?: string | undefined;
|
|
223
|
-
}[] | undefined;
|
|
103
|
+
fields?: import("../types/field-type").IField[] | undefined;
|
|
224
104
|
}>>;
|
|
225
105
|
code: z.ZodDefault<z.ZodString>;
|
|
226
106
|
codeRepository: z.ZodOptional<z.ZodString>;
|
|
@@ -235,27 +115,11 @@ export declare const toolSchema: z.ZodObject<{
|
|
|
235
115
|
usageDescription: string;
|
|
236
116
|
inputSchema: {
|
|
237
117
|
type: IOSchemaType;
|
|
238
|
-
fields:
|
|
239
|
-
name: string;
|
|
240
|
-
type: import("../types/field-type").FieldType;
|
|
241
|
-
optional?: boolean | undefined;
|
|
242
|
-
description?: string | undefined;
|
|
243
|
-
defaultValue?: any;
|
|
244
|
-
isArray?: boolean | undefined;
|
|
245
|
-
subType?: string | undefined;
|
|
246
|
-
}[];
|
|
118
|
+
fields: import("../types/field-type").IField[];
|
|
247
119
|
};
|
|
248
120
|
outputSchema: {
|
|
249
121
|
type: IOSchemaType;
|
|
250
|
-
fields:
|
|
251
|
-
name: string;
|
|
252
|
-
type: import("../types/field-type").FieldType;
|
|
253
|
-
optional?: boolean | undefined;
|
|
254
|
-
description?: string | undefined;
|
|
255
|
-
defaultValue?: any;
|
|
256
|
-
isArray?: boolean | undefined;
|
|
257
|
-
subType?: string | undefined;
|
|
258
|
-
}[];
|
|
122
|
+
fields: import("../types/field-type").IField[];
|
|
259
123
|
};
|
|
260
124
|
toolId: string;
|
|
261
125
|
contractId?: string | undefined;
|
|
@@ -266,15 +130,7 @@ export declare const toolSchema: z.ZodObject<{
|
|
|
266
130
|
catalogReason?: string | undefined;
|
|
267
131
|
configSchema?: {
|
|
268
132
|
type: IOSchemaType;
|
|
269
|
-
fields:
|
|
270
|
-
name: string;
|
|
271
|
-
type: import("../types/field-type").FieldType;
|
|
272
|
-
optional?: boolean | undefined;
|
|
273
|
-
description?: string | undefined;
|
|
274
|
-
defaultValue?: any;
|
|
275
|
-
isArray?: boolean | undefined;
|
|
276
|
-
subType?: string | undefined;
|
|
277
|
-
}[];
|
|
133
|
+
fields: import("../types/field-type").IField[];
|
|
278
134
|
} | undefined;
|
|
279
135
|
isAssistantRunner?: boolean | undefined;
|
|
280
136
|
detailedDescription?: string | undefined;
|
|
@@ -288,27 +144,11 @@ export declare const toolSchema: z.ZodObject<{
|
|
|
288
144
|
usageDescription: string;
|
|
289
145
|
inputSchema: {
|
|
290
146
|
type: IOSchemaType;
|
|
291
|
-
fields?:
|
|
292
|
-
name: string;
|
|
293
|
-
type: import("../types/field-type").FieldType;
|
|
294
|
-
optional?: boolean | undefined;
|
|
295
|
-
description?: string | undefined;
|
|
296
|
-
defaultValue?: any;
|
|
297
|
-
isArray?: boolean | undefined;
|
|
298
|
-
subType?: string | undefined;
|
|
299
|
-
}[] | undefined;
|
|
147
|
+
fields?: import("../types/field-type").IField[] | undefined;
|
|
300
148
|
};
|
|
301
149
|
outputSchema: {
|
|
302
150
|
type: IOSchemaType;
|
|
303
|
-
fields?:
|
|
304
|
-
name: string;
|
|
305
|
-
type: import("../types/field-type").FieldType;
|
|
306
|
-
optional?: boolean | undefined;
|
|
307
|
-
description?: string | undefined;
|
|
308
|
-
defaultValue?: any;
|
|
309
|
-
isArray?: boolean | undefined;
|
|
310
|
-
subType?: string | undefined;
|
|
311
|
-
}[] | undefined;
|
|
151
|
+
fields?: import("../types/field-type").IField[] | undefined;
|
|
312
152
|
};
|
|
313
153
|
toolId: string;
|
|
314
154
|
code?: string | undefined;
|
|
@@ -320,15 +160,7 @@ export declare const toolSchema: z.ZodObject<{
|
|
|
320
160
|
catalogReason?: string | undefined;
|
|
321
161
|
configSchema?: {
|
|
322
162
|
type: IOSchemaType;
|
|
323
|
-
fields?:
|
|
324
|
-
name: string;
|
|
325
|
-
type: import("../types/field-type").FieldType;
|
|
326
|
-
optional?: boolean | undefined;
|
|
327
|
-
description?: string | undefined;
|
|
328
|
-
defaultValue?: any;
|
|
329
|
-
isArray?: boolean | undefined;
|
|
330
|
-
subType?: string | undefined;
|
|
331
|
-
}[] | undefined;
|
|
163
|
+
fields?: import("../types/field-type").IField[] | undefined;
|
|
332
164
|
} | undefined;
|
|
333
165
|
isAssistantRunner?: boolean | undefined;
|
|
334
166
|
detailedDescription?: string | undefined;
|
|
@@ -361,27 +193,11 @@ export declare function Tools(dataContext?: DataContext): import("..").Table<{
|
|
|
361
193
|
usageDescription: string;
|
|
362
194
|
inputSchema: {
|
|
363
195
|
type: IOSchemaType;
|
|
364
|
-
fields:
|
|
365
|
-
name: string;
|
|
366
|
-
type: import("../types/field-type").FieldType;
|
|
367
|
-
optional?: boolean | undefined;
|
|
368
|
-
description?: string | undefined;
|
|
369
|
-
defaultValue?: any;
|
|
370
|
-
isArray?: boolean | undefined;
|
|
371
|
-
subType?: string | undefined;
|
|
372
|
-
}[];
|
|
196
|
+
fields: import("../types/field-type").IField[];
|
|
373
197
|
};
|
|
374
198
|
outputSchema: {
|
|
375
199
|
type: IOSchemaType;
|
|
376
|
-
fields:
|
|
377
|
-
name: string;
|
|
378
|
-
type: import("../types/field-type").FieldType;
|
|
379
|
-
optional?: boolean | undefined;
|
|
380
|
-
description?: string | undefined;
|
|
381
|
-
defaultValue?: any;
|
|
382
|
-
isArray?: boolean | undefined;
|
|
383
|
-
subType?: string | undefined;
|
|
384
|
-
}[];
|
|
200
|
+
fields: import("../types/field-type").IField[];
|
|
385
201
|
};
|
|
386
202
|
toolId: string;
|
|
387
203
|
contractId?: string | undefined;
|
|
@@ -392,15 +208,7 @@ export declare function Tools(dataContext?: DataContext): import("..").Table<{
|
|
|
392
208
|
catalogReason?: string | undefined;
|
|
393
209
|
configSchema?: {
|
|
394
210
|
type: IOSchemaType;
|
|
395
|
-
fields:
|
|
396
|
-
name: string;
|
|
397
|
-
type: import("../types/field-type").FieldType;
|
|
398
|
-
optional?: boolean | undefined;
|
|
399
|
-
description?: string | undefined;
|
|
400
|
-
defaultValue?: any;
|
|
401
|
-
isArray?: boolean | undefined;
|
|
402
|
-
subType?: string | undefined;
|
|
403
|
-
}[];
|
|
211
|
+
fields: import("../types/field-type").IField[];
|
|
404
212
|
} | undefined;
|
|
405
213
|
isAssistantRunner?: boolean | undefined;
|
|
406
214
|
detailedDescription?: string | undefined;
|
package/dist/data/users.d.ts
CHANGED
|
@@ -84,8 +84,7 @@ export declare class UsersTable extends Table<IUser> {
|
|
|
84
84
|
*/
|
|
85
85
|
save(user: IUser, opts?: ISaveOptions): Promise<IUser>;
|
|
86
86
|
signAndSave(user: IUser, opts?: ISaveOptions): Promise<IUser>;
|
|
87
|
-
|
|
88
|
-
/** Enables signing for proxied `signAndSave` calls. */
|
|
87
|
+
/** Registers the signer for all SDK copies in this JavaScript realm. Replaces any prior signer. */
|
|
89
88
|
static enableUserSigning(fn: (user: IUser) => IUser): void;
|
|
90
89
|
/** @deprecated Forbidden on UsersTable; use save() */
|
|
91
90
|
insert(..._args: Parameters<Table<IUser>["insert"]>): never;
|
package/dist/data/users.js
CHANGED
|
@@ -102,6 +102,9 @@ let userRowChangeGuard = refuseIdentityChanges;
|
|
|
102
102
|
function setUserRowChangeGuard(guard) {
|
|
103
103
|
userRowChangeGuard = guard ?? refuseIdentityChanges;
|
|
104
104
|
}
|
|
105
|
+
// Symbol.for keeps signer registration shared by separately installed SDK copies.
|
|
106
|
+
const signingKey = Symbol.for("@peers-app/peers-sdk/user-signing");
|
|
107
|
+
const signingGlobals = globalThis;
|
|
105
108
|
/** User table with owner-signature enforcement outside the personal context. */
|
|
106
109
|
let UsersTable = (() => {
|
|
107
110
|
let _classSuper = table_1.Table;
|
|
@@ -170,20 +173,20 @@ let UsersTable = (() => {
|
|
|
170
173
|
return super.save(verdict.row, opts);
|
|
171
174
|
}
|
|
172
175
|
async signAndSave(user, opts) {
|
|
173
|
-
|
|
176
|
+
const sign = signingGlobals[signingKey];
|
|
177
|
+
if (!sign) {
|
|
174
178
|
throw new Error("User signing must be enabled to sign and save users. Call UsersTable.enableUserSigning(fn) to enable it.");
|
|
175
179
|
}
|
|
176
180
|
user = {
|
|
177
181
|
...user,
|
|
178
182
|
name: user.name.slice(0, devices_1.DISPLAY_NAME_MAX_LENGTH),
|
|
179
183
|
};
|
|
180
|
-
user =
|
|
184
|
+
user = sign.call(UsersTable, user);
|
|
181
185
|
return this.save(user, opts);
|
|
182
186
|
}
|
|
183
|
-
|
|
184
|
-
/** Enables signing for proxied `signAndSave` calls. */
|
|
187
|
+
/** Registers the signer for all SDK copies in this JavaScript realm. Replaces any prior signer. */
|
|
185
188
|
static enableUserSigning(fn) {
|
|
186
|
-
|
|
189
|
+
signingGlobals[signingKey] = fn;
|
|
187
190
|
}
|
|
188
191
|
/** @deprecated Forbidden on UsersTable; use save() */
|
|
189
192
|
insert(..._args) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const frozen_contracts_1 = require("../contracts/frozen-contracts");
|
|
4
|
+
const registry_1 = require("../contracts/registry");
|
|
5
|
+
const isolated_artifact_1 = require("../package-loader/isolated-artifact");
|
|
6
|
+
const peer_id_1 = require("../peer-id");
|
|
7
|
+
const index_1 = require("./index");
|
|
8
|
+
const manifest_1 = require("./manifest");
|
|
9
|
+
const packageId = (0, peer_id_1.newid)();
|
|
10
|
+
const contractId = (0, peer_id_1.newid)();
|
|
11
|
+
/** Notes vN: `add` takes a title, and each later version adds an optional field. */
|
|
12
|
+
function notes(version, extra = {}, alsoImplements) {
|
|
13
|
+
return (0, index_1.defineContract)({
|
|
14
|
+
contractId,
|
|
15
|
+
version,
|
|
16
|
+
name: "Notes",
|
|
17
|
+
tools: [
|
|
18
|
+
(0, index_1.defineTool)({
|
|
19
|
+
name: "add",
|
|
20
|
+
usageDescription: "Add a note.",
|
|
21
|
+
accessLevel: index_1.AccessLevel.Writer,
|
|
22
|
+
inputSchema: index_1.z.object({ title: index_1.z.string(), ...extra }),
|
|
23
|
+
outputSchema: index_1.z.object({ id: index_1.z.string() }),
|
|
24
|
+
handler: () => ({ id: "n1" }),
|
|
25
|
+
}),
|
|
26
|
+
],
|
|
27
|
+
...(alsoImplements ? { alsoImplements } : {}),
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
const pkg = (...contracts) => (0, index_1.definePackage)((builder) => {
|
|
31
|
+
builder.packageId = packageId;
|
|
32
|
+
builder.version = "2.0.0";
|
|
33
|
+
for (const contract of contracts)
|
|
34
|
+
builder.provides(contract);
|
|
35
|
+
});
|
|
36
|
+
/** What `frozen-contracts.json` holds after a stable release that provided `contracts`. */
|
|
37
|
+
function frozenAfter(...contracts) {
|
|
38
|
+
const manifest = (0, manifest_1.buildPackageManifest)(pkg(...contracts));
|
|
39
|
+
return (0, frozen_contracts_1.freezeContracts)(undefined, manifest.provides.map((contract) => (0, isolated_artifact_1.isolatedContractToDefinition)(contract, [])), "1.0.0").frozen;
|
|
40
|
+
}
|
|
41
|
+
describe("alsoImplements in /define", () => {
|
|
42
|
+
it("takes older versions by number and declarations, and refuses itself, repeats, and the rest", () => {
|
|
43
|
+
expect(notes(2, {}, [1]).alsoImplements).toEqual([1]);
|
|
44
|
+
expect(() => notes(2, {}, [2])).toThrow("can't also implement itself");
|
|
45
|
+
expect(() => notes(2, {}, [3])).toThrow("alsoImplements v3 must be older than v2");
|
|
46
|
+
expect(() => notes(3, {}, [1, 1])).toThrow(`also implements ${contractId}@1 twice`);
|
|
47
|
+
expect(() => notes(2, {}, [0])).toThrow("must be a positive integer");
|
|
48
|
+
expect(() => (0, index_1.defineContract)({ contractId, version: 2, name: "Notes", alsoImplements: [{}] })).toThrow("takes version numbers and declarations from declareContract");
|
|
49
|
+
// Its own older version by declaration would skip the shape its stable release froze.
|
|
50
|
+
const NotesV1 = (0, index_1.declareContract)({ contractId, version: 1, name: "Notes" });
|
|
51
|
+
expect(() => (0, index_1.defineContract)({ contractId, version: 2, name: "Notes", alsoImplements: [NotesV1] })).toThrow("takes its own contract's older versions by number, not by declaration");
|
|
52
|
+
});
|
|
53
|
+
it("carries an older version's frozen shape in the manifest, so the host can register it", () => {
|
|
54
|
+
const frozen = frozenAfter(notes(1));
|
|
55
|
+
const manifest = (0, manifest_1.buildPackageManifest)(pkg(notes(2, { tag: index_1.z.string().optional() }, [1])), {
|
|
56
|
+
frozen,
|
|
57
|
+
});
|
|
58
|
+
const [entry] = manifest.provides[0].alsoImplements ?? [];
|
|
59
|
+
expect(entry).toMatchObject({ contractId, version: 1, definition: { contractId, version: 1 } });
|
|
60
|
+
expect(entry.definition).not.toHaveProperty("frozenBy");
|
|
61
|
+
expect(() => (0, isolated_artifact_1.validateIsolatedPackageArtifact)({ manifest, providerSource: "void 0;" }, { strict: true })).not.toThrow();
|
|
62
|
+
// A cold start: the registry has never seen v1, and still routes it to v2.
|
|
63
|
+
const registry = new registry_1.ContractRegistry();
|
|
64
|
+
registry.registerBatch(packageId, manifest.provides.map((contract) => ({
|
|
65
|
+
definition: (0, isolated_artifact_1.isolatedContractToDefinition)(contract, []),
|
|
66
|
+
alsoImplements: contract.alsoImplements,
|
|
67
|
+
})));
|
|
68
|
+
expect(registry.getProviderPackageId(contractId, 1)).toBe(packageId);
|
|
69
|
+
expect(registry.getProviderImplementation(contractId, 1, packageId)).toEqual({
|
|
70
|
+
contractId,
|
|
71
|
+
version: 2,
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
it("needs the older version frozen, and refuses one the contract no longer satisfies", () => {
|
|
75
|
+
expect(() => (0, manifest_1.buildPackageManifest)(pkg(notes(2, {}, [1])))).toThrow("also implements v1, which frozen-contracts.json doesn't record");
|
|
76
|
+
const frozen = frozenAfter(notes(1));
|
|
77
|
+
// v1 callers may leave out an optional field, so v2 can't require one.
|
|
78
|
+
expect(() => (0, manifest_1.buildPackageManifest)(pkg(notes(2, { tag: index_1.z.string() }, [1])), { frozen })).toThrow(/doesn't satisfy Notes .*@1.*extra required input field 'tag'/);
|
|
79
|
+
expect(() => (0, manifest_1.buildPackageManifest)(pkg(notes(1), notes(2, {}, [1])), { frozen })).toThrow(`also implements ${contractId}@1, which the package provides with pkg.provides`);
|
|
80
|
+
});
|
|
81
|
+
it("takes another contract's declaration, and implementContract takes alsoImplements too", () => {
|
|
82
|
+
const otherId = (0, peer_id_1.newid)();
|
|
83
|
+
const Other = (0, index_1.declareContract)({
|
|
84
|
+
contractId: otherId,
|
|
85
|
+
version: 1,
|
|
86
|
+
name: "Other",
|
|
87
|
+
tools: [
|
|
88
|
+
(0, index_1.declareTool)({
|
|
89
|
+
name: "add",
|
|
90
|
+
usageDescription: "Add.",
|
|
91
|
+
accessLevel: index_1.AccessLevel.Writer,
|
|
92
|
+
inputSchema: index_1.z.object({ title: index_1.z.string() }),
|
|
93
|
+
outputSchema: index_1.z.object({ id: index_1.z.string() }),
|
|
94
|
+
}),
|
|
95
|
+
],
|
|
96
|
+
});
|
|
97
|
+
const manifest = (0, manifest_1.buildPackageManifest)(pkg(notes(2, {}, [Other])));
|
|
98
|
+
expect(manifest.provides[0].alsoImplements?.[0]).toMatchObject({
|
|
99
|
+
contractId: otherId,
|
|
100
|
+
version: 1,
|
|
101
|
+
definition: { name: "Other", tools: [expect.objectContaining({ name: "add" })] },
|
|
102
|
+
});
|
|
103
|
+
const NotesV2 = (0, index_1.declareContract)({
|
|
104
|
+
contractId,
|
|
105
|
+
version: 2,
|
|
106
|
+
name: "Notes",
|
|
107
|
+
tools: [
|
|
108
|
+
(0, index_1.declareTool)({
|
|
109
|
+
name: "add",
|
|
110
|
+
usageDescription: "Add a note.",
|
|
111
|
+
accessLevel: index_1.AccessLevel.Writer,
|
|
112
|
+
inputSchema: index_1.z.object({ title: index_1.z.string() }),
|
|
113
|
+
outputSchema: index_1.z.object({ id: index_1.z.string() }),
|
|
114
|
+
}),
|
|
115
|
+
],
|
|
116
|
+
});
|
|
117
|
+
const implemented = (0, index_1.implementContract)(NotesV2, {
|
|
118
|
+
tools: { add: () => ({ id: "n1" }) },
|
|
119
|
+
alsoImplements: [1],
|
|
120
|
+
});
|
|
121
|
+
expect(implemented.alsoImplements).toEqual([1]);
|
|
122
|
+
});
|
|
123
|
+
});
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { PersistentVarScope } from "../data/persistent-var-identity";
|
|
2
|
+
import type { IsolatedContractTableOperation } from "../package-loader/isolated-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* Ends a subscription or a watch. Unsubscribing from a consumed contract waits for the provider
|
|
5
|
+
* and rejects if it fails, so await it or catch the rejection.
|
|
6
|
+
*/
|
|
7
|
+
export type PackageUnsubscribe = () => unknown;
|
|
8
|
+
/** A consumed-event callback. `ctx` belongs to that delivery. */
|
|
9
|
+
export type PackageEventHandler = (payload: unknown, ctx: IPackageContext) => unknown;
|
|
10
|
+
/** Picks one provider of a consumed contract. */
|
|
11
|
+
export interface IPackageProviderOptions {
|
|
12
|
+
/** Package that serves the contract. Omit for the group's default provider. */
|
|
13
|
+
providerPackageId?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The host functions the Runtime gives one handler call (guest API 2 and 3).
|
|
17
|
+
*
|
|
18
|
+
* Every tool handler gets its own `ctx`, and host calls made through it act for that call's
|
|
19
|
+
* caller, even while other calls run. The table and contract handles in this module take a
|
|
20
|
+
* `ctx` and make these calls for you, and the package's variables (`deviceVar` and the rest),
|
|
21
|
+
* events, and observables need none; use these directly only for what those don't cover yet.
|
|
22
|
+
*/
|
|
23
|
+
export interface IPackageContext {
|
|
24
|
+
/** Run a tool on a contract this package consumes (or provides), as this call's caller. */
|
|
25
|
+
callConsumedTool(contractId: string, version: number, toolName: string, args?: unknown, options?: IPackageProviderOptions): Promise<unknown>;
|
|
26
|
+
/** Run a tool on another device. The remote device authorizes the call. */
|
|
27
|
+
callRemoteTool(contractId: string, version: number, deviceId: string, toolName: string, args?: unknown): Promise<unknown>;
|
|
28
|
+
/** Subscribe to an event on a consumed or provided contract. */
|
|
29
|
+
subscribeConsumedEvent(contractId: string, version: number, eventName: string, handler: PackageEventHandler): Promise<PackageUnsubscribe>;
|
|
30
|
+
/** Subscribe to `dataChanged` on a table another package exposes through a contract. */
|
|
31
|
+
subscribeConsumedTableEvent(contractId: string, version: number, tableName: string, eventName: "dataChanged", handler: PackageEventHandler): Promise<PackageUnsubscribe>;
|
|
32
|
+
/** Emit an event declared on one of this package's provided contracts. */
|
|
33
|
+
emitContractEvent(contractId: string, version: number, eventName: string, payload: unknown): Promise<unknown>;
|
|
34
|
+
/** Call a standard method on a table another package exposes through a contract. */
|
|
35
|
+
callConsumedTable(contractId: string, version: number, tableName: string, operation: IsolatedContractTableOperation, args?: unknown[]): Promise<unknown>;
|
|
36
|
+
/** Read one row from a consumed contract table. */
|
|
37
|
+
getConsumedTableRecord(contractId: string, version: number, tableName: string, recordId: string): Promise<unknown>;
|
|
38
|
+
/** Save one row to a consumed contract table. */
|
|
39
|
+
saveConsumedTableRecord(contractId: string, version: number, tableName: string, record: unknown): Promise<unknown>;
|
|
40
|
+
/** Read a consumed contract's observable. */
|
|
41
|
+
getConsumedObservable(contractId: string, version: number, observableName: string, options?: IPackageProviderOptions): Promise<unknown>;
|
|
42
|
+
/** Write a consumed contract's writable observable. */
|
|
43
|
+
setConsumedObservable(contractId: string, version: number, observableName: string, value: unknown, options?: IPackageProviderOptions): Promise<unknown>;
|
|
44
|
+
/** Call a standard method on one of this package's own tables, with its arguments. */
|
|
45
|
+
callOwnedTable(tableName: string, operation: IsolatedContractTableOperation, args?: unknown[]): Promise<unknown>;
|
|
46
|
+
/** Read one owned row by id. */
|
|
47
|
+
getOwnedTableRecord(tableName: string, recordId: string): Promise<unknown>;
|
|
48
|
+
/** Insert or replace one owned row. */
|
|
49
|
+
saveOwnedTableRecord(tableName: string, record: unknown): Promise<unknown>;
|
|
50
|
+
/** List owned rows (at most 500; use `callOwnedTable` to filter or page). */
|
|
51
|
+
listOwnedTableRecords(tableName: string): Promise<unknown>;
|
|
52
|
+
/** Delete one owned row by id. */
|
|
53
|
+
deleteOwnedTableRecord(tableName: string, recordId: string): Promise<unknown>;
|
|
54
|
+
/** Read a package-owned persistent variable. The host applies the package prefix. */
|
|
55
|
+
getOwnedPersistentVar(scope: PersistentVarScope, name: string): Promise<unknown>;
|
|
56
|
+
/** Replace a package-owned persistent variable. */
|
|
57
|
+
setOwnedPersistentVar(scope: PersistentVarScope, name: string, value: unknown): Promise<unknown>;
|
|
58
|
+
/**
|
|
59
|
+
* Call `handler` when a package-owned persistent variable changes, including through device
|
|
60
|
+
* sync, until the returned function is called or the worker stops. `handler` gets no value:
|
|
61
|
+
* read it again.
|
|
62
|
+
*/
|
|
63
|
+
watchOwnedPersistentVar(scope: PersistentVarScope, name: string, handler: () => unknown): Promise<PackageUnsubscribe>;
|
|
64
|
+
/**
|
|
65
|
+
* Set the value of an in-memory observable this package provides (one declared without a
|
|
66
|
+
* `persistentVar`). The host checks it against the observable's `valueType`, keeps it for
|
|
67
|
+
* readers, and pushes it to subscribers. Allowed at any time while the worker runs.
|
|
68
|
+
*/
|
|
69
|
+
publishOwnedObservable(contractId: string, version: number, observableName: string, value: unknown): Promise<unknown>;
|
|
70
|
+
/**
|
|
71
|
+
* Take guest API 2 consumers' writes to a writable in-memory observable this package
|
|
72
|
+
* provides. `handler` gets the value with no caller authority, stores and publishes it, and
|
|
73
|
+
* returns what it stored. A later call replaces the handler. Guest API 3 instead routes
|
|
74
|
+
* writes through the contract member handler under the caller's authority.
|
|
75
|
+
*/
|
|
76
|
+
onOwnedObservableSet(contractId: string, version: number, observableName: string, handler: (value: unknown) => unknown): void;
|
|
77
|
+
}
|