@sprucelabs/mercury-client 41.0.385 → 42.0.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/build/.spruce/errors/errors.types.d.ts +50 -50
- package/build/.spruce/errors/errors.types.js +0 -2
- package/build/.spruce/errors/mercuryClient/connectionFailed.schema.js +5 -5
- package/build/.spruce/errors/mercuryClient/invalidEventSignature.schema.js +5 -5
- package/build/.spruce/errors/mercuryClient/invalidPayload.schema.js +3 -3
- package/build/.spruce/errors/mercuryClient/invalidProtocol.schema.js +3 -3
- package/build/.spruce/errors/mercuryClient/missingTestCacheDir.schema.js +1 -1
- package/build/.spruce/errors/mercuryClient/mustCreateEvent.schema.js +3 -3
- package/build/.spruce/errors/mercuryClient/mustHandleLocally.schema.js +3 -3
- package/build/.spruce/errors/mercuryClient/notConnected.schema.js +5 -5
- package/build/.spruce/errors/mercuryClient/timeout.schema.js +9 -9
- package/build/.spruce/errors/mercuryClient/unauthorizedAccess.schema.js +9 -9
- package/build/.spruce/errors/mercuryClient/unauthorizedTarget.schema.js +11 -11
- package/build/.spruce/errors/mercuryClient/unexpectedPayload.schema.js +3 -3
- package/build/.spruce/errors/mercuryClient/unknownError.schema.js +1 -1
- package/build/.spruce/errors/options.types.d.ts +2 -2
- package/build/.spruce/schemas/fields/fields.types.d.ts +1 -1
- package/build/.spruce/schemas/schemas.types.js +0 -2
- package/build/clients/MercuryClientFactory.js +11 -10
- package/build/clients/MercurySocketIoClient.d.ts +3 -1
- package/build/clients/MercurySocketIoClient.js +79 -81
- package/build/clients/MercuryTestClient.d.ts +1 -1
- package/build/clients/MercuryTestClient.js +50 -41
- package/build/clients/MutableContractClient.js +7 -6
- package/build/errors/SpruceError.d.ts +1 -1
- package/build/errors/SpruceError.js +7 -5
- package/build/esm/.spruce/errors/errors.types.d.ts +50 -50
- package/build/esm/.spruce/errors/errors.types.js +0 -2
- package/build/esm/.spruce/errors/options.types.d.ts +2 -2
- package/build/esm/clients/MercurySocketIoClient.d.ts +3 -1
- package/build/esm/clients/MercurySocketIoClient.js +11 -2
- package/build/esm/clients/MercuryTestClient.d.ts +1 -1
- package/build/esm/clients/MercuryTestClient.js +18 -9
- package/build/esm/clients/MutableContractClient.js +3 -1
- package/build/esm/errors/SpruceError.d.ts +1 -1
- package/build/esm/errors/SpruceError.js +5 -2
- package/build/tests/AbstractClientTest.js +12 -18
- package/build/tests/constants.js +9 -10
- package/package.json +115 -129
|
@@ -13,7 +13,7 @@ export declare namespace SpruceErrors.MercuryClient {
|
|
|
13
13
|
}
|
|
14
14
|
export declare namespace SpruceErrors.MercuryClient {
|
|
15
15
|
interface UnexpectedPayload {
|
|
16
|
-
|
|
16
|
+
eventName: string;
|
|
17
17
|
}
|
|
18
18
|
interface UnexpectedPayloadSchema extends SpruceSchema.Schema {
|
|
19
19
|
id: 'unexpectedPayload';
|
|
@@ -21,7 +21,7 @@ export declare namespace SpruceErrors.MercuryClient {
|
|
|
21
21
|
name: 'Unexpected payload';
|
|
22
22
|
fields: {
|
|
23
23
|
/** . */
|
|
24
|
-
|
|
24
|
+
eventName: {
|
|
25
25
|
type: 'text';
|
|
26
26
|
isRequired: true;
|
|
27
27
|
options: undefined;
|
|
@@ -32,11 +32,11 @@ export declare namespace SpruceErrors.MercuryClient {
|
|
|
32
32
|
}
|
|
33
33
|
export declare namespace SpruceErrors.MercuryClient {
|
|
34
34
|
interface UnauthorizedTarget {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
locationId?: string | undefined | null;
|
|
36
|
+
personId?: string | undefined | null;
|
|
37
|
+
organizationId?: string | undefined | null;
|
|
38
|
+
skillId?: string | undefined | null;
|
|
39
|
+
roleId?: string | undefined | null;
|
|
40
40
|
}
|
|
41
41
|
interface UnauthorizedTargetSchema extends SpruceSchema.Schema {
|
|
42
42
|
id: 'unauthorizedTarget';
|
|
@@ -44,27 +44,27 @@ export declare namespace SpruceErrors.MercuryClient {
|
|
|
44
44
|
name: '';
|
|
45
45
|
fields: {
|
|
46
46
|
/** . */
|
|
47
|
-
|
|
47
|
+
locationId: {
|
|
48
48
|
type: 'id';
|
|
49
49
|
options: undefined;
|
|
50
50
|
};
|
|
51
51
|
/** . */
|
|
52
|
-
|
|
52
|
+
personId: {
|
|
53
53
|
type: 'id';
|
|
54
54
|
options: undefined;
|
|
55
55
|
};
|
|
56
56
|
/** . */
|
|
57
|
-
|
|
57
|
+
organizationId: {
|
|
58
58
|
type: 'id';
|
|
59
59
|
options: undefined;
|
|
60
60
|
};
|
|
61
61
|
/** . */
|
|
62
|
-
|
|
62
|
+
skillId: {
|
|
63
63
|
type: 'id';
|
|
64
64
|
options: undefined;
|
|
65
65
|
};
|
|
66
66
|
/** . */
|
|
67
|
-
|
|
67
|
+
roleId: {
|
|
68
68
|
type: 'id';
|
|
69
69
|
options: undefined;
|
|
70
70
|
};
|
|
@@ -74,10 +74,10 @@ export declare namespace SpruceErrors.MercuryClient {
|
|
|
74
74
|
}
|
|
75
75
|
export declare namespace SpruceErrors.MercuryClient {
|
|
76
76
|
interface UnauthorizedAccess {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
fqen: string;
|
|
78
|
+
action: 'emit';
|
|
79
|
+
target: SpruceErrors.MercuryClient.UnauthorizedTarget;
|
|
80
|
+
permissionContractId: string;
|
|
81
81
|
}
|
|
82
82
|
interface UnauthorizedAccessSchema extends SpruceSchema.Schema {
|
|
83
83
|
id: 'unauthorizedAccess';
|
|
@@ -85,24 +85,24 @@ export declare namespace SpruceErrors.MercuryClient {
|
|
|
85
85
|
name: 'Unauthorized Access';
|
|
86
86
|
fields: {
|
|
87
87
|
/** . */
|
|
88
|
-
|
|
88
|
+
fqen: {
|
|
89
89
|
type: 'text';
|
|
90
90
|
isRequired: true;
|
|
91
91
|
options: undefined;
|
|
92
92
|
};
|
|
93
93
|
/** . */
|
|
94
|
-
|
|
94
|
+
action: {
|
|
95
95
|
type: 'select';
|
|
96
96
|
isRequired: true;
|
|
97
97
|
options: {
|
|
98
98
|
choices: [{
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
value: 'emit';
|
|
100
|
+
label: 'emit';
|
|
101
101
|
}];
|
|
102
102
|
};
|
|
103
103
|
};
|
|
104
104
|
/** . */
|
|
105
|
-
|
|
105
|
+
target: {
|
|
106
106
|
type: 'schema';
|
|
107
107
|
isRequired: true;
|
|
108
108
|
options: {
|
|
@@ -110,7 +110,7 @@ export declare namespace SpruceErrors.MercuryClient {
|
|
|
110
110
|
};
|
|
111
111
|
};
|
|
112
112
|
/** . */
|
|
113
|
-
|
|
113
|
+
permissionContractId: {
|
|
114
114
|
type: 'id';
|
|
115
115
|
isRequired: true;
|
|
116
116
|
options: undefined;
|
|
@@ -121,10 +121,10 @@ export declare namespace SpruceErrors.MercuryClient {
|
|
|
121
121
|
}
|
|
122
122
|
export declare namespace SpruceErrors.MercuryClient {
|
|
123
123
|
interface Timeout {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
124
|
+
eventName: string;
|
|
125
|
+
timeoutMs: number;
|
|
126
|
+
isConnected?: boolean | undefined | null;
|
|
127
|
+
totalRetries?: number | undefined | null;
|
|
128
128
|
}
|
|
129
129
|
interface TimeoutSchema extends SpruceSchema.Schema {
|
|
130
130
|
id: 'timeout';
|
|
@@ -132,24 +132,24 @@ export declare namespace SpruceErrors.MercuryClient {
|
|
|
132
132
|
name: 'Timeout';
|
|
133
133
|
fields: {
|
|
134
134
|
/** . */
|
|
135
|
-
|
|
135
|
+
eventName: {
|
|
136
136
|
type: 'text';
|
|
137
137
|
isRequired: true;
|
|
138
138
|
options: undefined;
|
|
139
139
|
};
|
|
140
140
|
/** . */
|
|
141
|
-
|
|
141
|
+
timeoutMs: {
|
|
142
142
|
type: 'number';
|
|
143
143
|
isRequired: true;
|
|
144
144
|
options: undefined;
|
|
145
145
|
};
|
|
146
146
|
/** . */
|
|
147
|
-
|
|
147
|
+
isConnected: {
|
|
148
148
|
type: 'boolean';
|
|
149
149
|
options: undefined;
|
|
150
150
|
};
|
|
151
151
|
/** . */
|
|
152
|
-
|
|
152
|
+
totalRetries: {
|
|
153
153
|
type: 'number';
|
|
154
154
|
options: undefined;
|
|
155
155
|
};
|
|
@@ -159,8 +159,8 @@ export declare namespace SpruceErrors.MercuryClient {
|
|
|
159
159
|
}
|
|
160
160
|
export declare namespace SpruceErrors.MercuryClient {
|
|
161
161
|
interface NotConnected {
|
|
162
|
-
|
|
163
|
-
|
|
162
|
+
action: string;
|
|
163
|
+
fqen: string;
|
|
164
164
|
}
|
|
165
165
|
interface NotConnectedSchema extends SpruceSchema.Schema {
|
|
166
166
|
id: 'notConnected';
|
|
@@ -168,13 +168,13 @@ export declare namespace SpruceErrors.MercuryClient {
|
|
|
168
168
|
name: 'Not connected';
|
|
169
169
|
fields: {
|
|
170
170
|
/** . */
|
|
171
|
-
|
|
171
|
+
action: {
|
|
172
172
|
type: 'text';
|
|
173
173
|
isRequired: true;
|
|
174
174
|
options: undefined;
|
|
175
175
|
};
|
|
176
176
|
/** . */
|
|
177
|
-
|
|
177
|
+
fqen: {
|
|
178
178
|
type: 'id';
|
|
179
179
|
isRequired: true;
|
|
180
180
|
options: undefined;
|
|
@@ -185,7 +185,7 @@ export declare namespace SpruceErrors.MercuryClient {
|
|
|
185
185
|
}
|
|
186
186
|
export declare namespace SpruceErrors.MercuryClient {
|
|
187
187
|
interface MustHandleLocally {
|
|
188
|
-
|
|
188
|
+
fqen: string;
|
|
189
189
|
}
|
|
190
190
|
interface MustHandleLocallySchema extends SpruceSchema.Schema {
|
|
191
191
|
id: 'mustHandleLocally';
|
|
@@ -193,7 +193,7 @@ export declare namespace SpruceErrors.MercuryClient {
|
|
|
193
193
|
name: 'Must handle locally';
|
|
194
194
|
fields: {
|
|
195
195
|
/** . */
|
|
196
|
-
|
|
196
|
+
fqen: {
|
|
197
197
|
type: 'text';
|
|
198
198
|
isRequired: true;
|
|
199
199
|
options: undefined;
|
|
@@ -204,7 +204,7 @@ export declare namespace SpruceErrors.MercuryClient {
|
|
|
204
204
|
}
|
|
205
205
|
export declare namespace SpruceErrors.MercuryClient {
|
|
206
206
|
interface MustCreateEvent {
|
|
207
|
-
|
|
207
|
+
fqen: string;
|
|
208
208
|
}
|
|
209
209
|
interface MustCreateEventSchema extends SpruceSchema.Schema {
|
|
210
210
|
id: 'mustCreateEvent';
|
|
@@ -212,7 +212,7 @@ export declare namespace SpruceErrors.MercuryClient {
|
|
|
212
212
|
name: 'must create event';
|
|
213
213
|
fields: {
|
|
214
214
|
/** . */
|
|
215
|
-
|
|
215
|
+
fqen: {
|
|
216
216
|
type: 'text';
|
|
217
217
|
isRequired: true;
|
|
218
218
|
options: undefined;
|
|
@@ -234,7 +234,7 @@ export declare namespace SpruceErrors.MercuryClient {
|
|
|
234
234
|
}
|
|
235
235
|
export declare namespace SpruceErrors.MercuryClient {
|
|
236
236
|
interface InvalidProtocol {
|
|
237
|
-
|
|
237
|
+
uri: string;
|
|
238
238
|
}
|
|
239
239
|
interface InvalidProtocolSchema extends SpruceSchema.Schema {
|
|
240
240
|
id: 'invalidProtocol';
|
|
@@ -242,7 +242,7 @@ export declare namespace SpruceErrors.MercuryClient {
|
|
|
242
242
|
name: 'Invalid protocol';
|
|
243
243
|
fields: {
|
|
244
244
|
/** . */
|
|
245
|
-
|
|
245
|
+
uri: {
|
|
246
246
|
type: 'text';
|
|
247
247
|
isRequired: true;
|
|
248
248
|
options: undefined;
|
|
@@ -253,7 +253,7 @@ export declare namespace SpruceErrors.MercuryClient {
|
|
|
253
253
|
}
|
|
254
254
|
export declare namespace SpruceErrors.MercuryClient {
|
|
255
255
|
interface InvalidPayload {
|
|
256
|
-
|
|
256
|
+
eventName: string;
|
|
257
257
|
}
|
|
258
258
|
interface InvalidPayloadSchema extends SpruceSchema.Schema {
|
|
259
259
|
id: 'invalidPayload';
|
|
@@ -261,7 +261,7 @@ export declare namespace SpruceErrors.MercuryClient {
|
|
|
261
261
|
name: 'Invalid payload';
|
|
262
262
|
fields: {
|
|
263
263
|
/** . */
|
|
264
|
-
|
|
264
|
+
eventName: {
|
|
265
265
|
type: 'text';
|
|
266
266
|
isRequired: true;
|
|
267
267
|
options: undefined;
|
|
@@ -272,8 +272,8 @@ export declare namespace SpruceErrors.MercuryClient {
|
|
|
272
272
|
}
|
|
273
273
|
export declare namespace SpruceErrors.MercuryClient {
|
|
274
274
|
interface InvalidEventSignature {
|
|
275
|
-
|
|
276
|
-
|
|
275
|
+
fqen: string;
|
|
276
|
+
instructions: string;
|
|
277
277
|
}
|
|
278
278
|
interface InvalidEventSignatureSchema extends SpruceSchema.Schema {
|
|
279
279
|
id: 'invalidEventSignature';
|
|
@@ -281,13 +281,13 @@ export declare namespace SpruceErrors.MercuryClient {
|
|
|
281
281
|
name: 'Invalid event contract';
|
|
282
282
|
fields: {
|
|
283
283
|
/** . */
|
|
284
|
-
|
|
284
|
+
fqen: {
|
|
285
285
|
type: 'text';
|
|
286
286
|
isRequired: true;
|
|
287
287
|
options: undefined;
|
|
288
288
|
};
|
|
289
289
|
/** . */
|
|
290
|
-
|
|
290
|
+
instructions: {
|
|
291
291
|
type: 'text';
|
|
292
292
|
isRequired: true;
|
|
293
293
|
options: undefined;
|
|
@@ -298,8 +298,8 @@ export declare namespace SpruceErrors.MercuryClient {
|
|
|
298
298
|
}
|
|
299
299
|
export declare namespace SpruceErrors.MercuryClient {
|
|
300
300
|
interface ConnectionFailed {
|
|
301
|
-
|
|
302
|
-
|
|
301
|
+
host: string;
|
|
302
|
+
statusCode: number;
|
|
303
303
|
}
|
|
304
304
|
interface ConnectionFailedSchema extends SpruceSchema.Schema {
|
|
305
305
|
id: 'connectionFailed';
|
|
@@ -307,13 +307,13 @@ export declare namespace SpruceErrors.MercuryClient {
|
|
|
307
307
|
name: 'Connection failed';
|
|
308
308
|
fields: {
|
|
309
309
|
/** . */
|
|
310
|
-
|
|
310
|
+
host: {
|
|
311
311
|
type: 'text';
|
|
312
312
|
isRequired: true;
|
|
313
313
|
options: undefined;
|
|
314
314
|
};
|
|
315
315
|
/** . */
|
|
316
|
-
|
|
316
|
+
statusCode: {
|
|
317
317
|
type: 'number';
|
|
318
318
|
isRequired: true;
|
|
319
319
|
options: undefined;
|
|
@@ -7,18 +7,18 @@ const connectionFailedSchema = {
|
|
|
7
7
|
name: 'Connection failed',
|
|
8
8
|
fields: {
|
|
9
9
|
/** . */
|
|
10
|
-
|
|
10
|
+
host: {
|
|
11
11
|
type: 'text',
|
|
12
12
|
isRequired: true,
|
|
13
|
-
options: undefined
|
|
13
|
+
options: undefined,
|
|
14
14
|
},
|
|
15
15
|
/** . */
|
|
16
|
-
|
|
16
|
+
statusCode: {
|
|
17
17
|
type: 'number',
|
|
18
18
|
isRequired: true,
|
|
19
|
-
options: undefined
|
|
19
|
+
options: undefined,
|
|
20
20
|
},
|
|
21
|
-
}
|
|
21
|
+
},
|
|
22
22
|
};
|
|
23
23
|
schema_1.SchemaRegistry.getInstance().trackSchema(connectionFailedSchema);
|
|
24
24
|
exports.default = connectionFailedSchema;
|
|
@@ -7,18 +7,18 @@ const invalidEventSignatureSchema = {
|
|
|
7
7
|
name: 'Invalid event contract',
|
|
8
8
|
fields: {
|
|
9
9
|
/** . */
|
|
10
|
-
|
|
10
|
+
fqen: {
|
|
11
11
|
type: 'text',
|
|
12
12
|
isRequired: true,
|
|
13
|
-
options: undefined
|
|
13
|
+
options: undefined,
|
|
14
14
|
},
|
|
15
15
|
/** . */
|
|
16
|
-
|
|
16
|
+
instructions: {
|
|
17
17
|
type: 'text',
|
|
18
18
|
isRequired: true,
|
|
19
|
-
options: undefined
|
|
19
|
+
options: undefined,
|
|
20
20
|
},
|
|
21
|
-
}
|
|
21
|
+
},
|
|
22
22
|
};
|
|
23
23
|
schema_1.SchemaRegistry.getInstance().trackSchema(invalidEventSignatureSchema);
|
|
24
24
|
exports.default = invalidEventSignatureSchema;
|
|
@@ -7,12 +7,12 @@ const invalidPayloadSchema = {
|
|
|
7
7
|
name: 'Invalid payload',
|
|
8
8
|
fields: {
|
|
9
9
|
/** . */
|
|
10
|
-
|
|
10
|
+
eventName: {
|
|
11
11
|
type: 'text',
|
|
12
12
|
isRequired: true,
|
|
13
|
-
options: undefined
|
|
13
|
+
options: undefined,
|
|
14
14
|
},
|
|
15
|
-
}
|
|
15
|
+
},
|
|
16
16
|
};
|
|
17
17
|
schema_1.SchemaRegistry.getInstance().trackSchema(invalidPayloadSchema);
|
|
18
18
|
exports.default = invalidPayloadSchema;
|
|
@@ -7,12 +7,12 @@ const invalidProtocolSchema = {
|
|
|
7
7
|
name: 'Invalid protocol',
|
|
8
8
|
fields: {
|
|
9
9
|
/** . */
|
|
10
|
-
|
|
10
|
+
uri: {
|
|
11
11
|
type: 'text',
|
|
12
12
|
isRequired: true,
|
|
13
|
-
options: undefined
|
|
13
|
+
options: undefined,
|
|
14
14
|
},
|
|
15
|
-
}
|
|
15
|
+
},
|
|
16
16
|
};
|
|
17
17
|
schema_1.SchemaRegistry.getInstance().trackSchema(invalidProtocolSchema);
|
|
18
18
|
exports.default = invalidProtocolSchema;
|
|
@@ -5,7 +5,7 @@ const missingTestCacheDirSchema = {
|
|
|
5
5
|
id: 'missingTestCacheDir',
|
|
6
6
|
namespace: 'MercuryClient',
|
|
7
7
|
name: 'Missing test cache dir',
|
|
8
|
-
fields: {}
|
|
8
|
+
fields: {},
|
|
9
9
|
};
|
|
10
10
|
schema_1.SchemaRegistry.getInstance().trackSchema(missingTestCacheDirSchema);
|
|
11
11
|
exports.default = missingTestCacheDirSchema;
|
|
@@ -7,12 +7,12 @@ const mustCreateEventSchema = {
|
|
|
7
7
|
name: 'must create event',
|
|
8
8
|
fields: {
|
|
9
9
|
/** . */
|
|
10
|
-
|
|
10
|
+
fqen: {
|
|
11
11
|
type: 'text',
|
|
12
12
|
isRequired: true,
|
|
13
|
-
options: undefined
|
|
13
|
+
options: undefined,
|
|
14
14
|
},
|
|
15
|
-
}
|
|
15
|
+
},
|
|
16
16
|
};
|
|
17
17
|
schema_1.SchemaRegistry.getInstance().trackSchema(mustCreateEventSchema);
|
|
18
18
|
exports.default = mustCreateEventSchema;
|
|
@@ -7,12 +7,12 @@ const mustHandleLocallySchema = {
|
|
|
7
7
|
name: 'Must handle locally',
|
|
8
8
|
fields: {
|
|
9
9
|
/** . */
|
|
10
|
-
|
|
10
|
+
fqen: {
|
|
11
11
|
type: 'text',
|
|
12
12
|
isRequired: true,
|
|
13
|
-
options: undefined
|
|
13
|
+
options: undefined,
|
|
14
14
|
},
|
|
15
|
-
}
|
|
15
|
+
},
|
|
16
16
|
};
|
|
17
17
|
schema_1.SchemaRegistry.getInstance().trackSchema(mustHandleLocallySchema);
|
|
18
18
|
exports.default = mustHandleLocallySchema;
|
|
@@ -7,18 +7,18 @@ const notConnectedSchema = {
|
|
|
7
7
|
name: 'Not connected',
|
|
8
8
|
fields: {
|
|
9
9
|
/** . */
|
|
10
|
-
|
|
10
|
+
action: {
|
|
11
11
|
type: 'text',
|
|
12
12
|
isRequired: true,
|
|
13
|
-
options: undefined
|
|
13
|
+
options: undefined,
|
|
14
14
|
},
|
|
15
15
|
/** . */
|
|
16
|
-
|
|
16
|
+
fqen: {
|
|
17
17
|
type: 'id',
|
|
18
18
|
isRequired: true,
|
|
19
|
-
options: undefined
|
|
19
|
+
options: undefined,
|
|
20
20
|
},
|
|
21
|
-
}
|
|
21
|
+
},
|
|
22
22
|
};
|
|
23
23
|
schema_1.SchemaRegistry.getInstance().trackSchema(notConnectedSchema);
|
|
24
24
|
exports.default = notConnectedSchema;
|
|
@@ -7,28 +7,28 @@ const timeoutSchema = {
|
|
|
7
7
|
name: 'Timeout',
|
|
8
8
|
fields: {
|
|
9
9
|
/** . */
|
|
10
|
-
|
|
10
|
+
eventName: {
|
|
11
11
|
type: 'text',
|
|
12
12
|
isRequired: true,
|
|
13
|
-
options: undefined
|
|
13
|
+
options: undefined,
|
|
14
14
|
},
|
|
15
15
|
/** . */
|
|
16
|
-
|
|
16
|
+
timeoutMs: {
|
|
17
17
|
type: 'number',
|
|
18
18
|
isRequired: true,
|
|
19
|
-
options: undefined
|
|
19
|
+
options: undefined,
|
|
20
20
|
},
|
|
21
21
|
/** . */
|
|
22
|
-
|
|
22
|
+
isConnected: {
|
|
23
23
|
type: 'boolean',
|
|
24
|
-
options: undefined
|
|
24
|
+
options: undefined,
|
|
25
25
|
},
|
|
26
26
|
/** . */
|
|
27
|
-
|
|
27
|
+
totalRetries: {
|
|
28
28
|
type: 'number',
|
|
29
|
-
options: undefined
|
|
29
|
+
options: undefined,
|
|
30
30
|
},
|
|
31
|
-
}
|
|
31
|
+
},
|
|
32
32
|
};
|
|
33
33
|
schema_1.SchemaRegistry.getInstance().trackSchema(timeoutSchema);
|
|
34
34
|
exports.default = timeoutSchema;
|
|
@@ -11,30 +11,30 @@ const unauthorizedAccessSchema = {
|
|
|
11
11
|
name: 'Unauthorized Access',
|
|
12
12
|
fields: {
|
|
13
13
|
/** . */
|
|
14
|
-
|
|
14
|
+
fqen: {
|
|
15
15
|
type: 'text',
|
|
16
16
|
isRequired: true,
|
|
17
|
-
options: undefined
|
|
17
|
+
options: undefined,
|
|
18
18
|
},
|
|
19
19
|
/** . */
|
|
20
|
-
|
|
20
|
+
action: {
|
|
21
21
|
type: 'select',
|
|
22
22
|
isRequired: true,
|
|
23
|
-
options: { choices: [{
|
|
23
|
+
options: { choices: [{ value: 'emit', label: 'emit' }] },
|
|
24
24
|
},
|
|
25
25
|
/** . */
|
|
26
|
-
|
|
26
|
+
target: {
|
|
27
27
|
type: 'schema',
|
|
28
28
|
isRequired: true,
|
|
29
|
-
options: { schema: unauthorizedTarget_schema_1.default
|
|
29
|
+
options: { schema: unauthorizedTarget_schema_1.default },
|
|
30
30
|
},
|
|
31
31
|
/** . */
|
|
32
|
-
|
|
32
|
+
permissionContractId: {
|
|
33
33
|
type: 'id',
|
|
34
34
|
isRequired: true,
|
|
35
|
-
options: undefined
|
|
35
|
+
options: undefined,
|
|
36
36
|
},
|
|
37
|
-
}
|
|
37
|
+
},
|
|
38
38
|
};
|
|
39
39
|
schema_1.SchemaRegistry.getInstance().trackSchema(unauthorizedAccessSchema);
|
|
40
40
|
exports.default = unauthorizedAccessSchema;
|
|
@@ -7,31 +7,31 @@ const unauthorizedTargetSchema = {
|
|
|
7
7
|
name: '',
|
|
8
8
|
fields: {
|
|
9
9
|
/** . */
|
|
10
|
-
|
|
10
|
+
locationId: {
|
|
11
11
|
type: 'id',
|
|
12
|
-
options: undefined
|
|
12
|
+
options: undefined,
|
|
13
13
|
},
|
|
14
14
|
/** . */
|
|
15
|
-
|
|
15
|
+
personId: {
|
|
16
16
|
type: 'id',
|
|
17
|
-
options: undefined
|
|
17
|
+
options: undefined,
|
|
18
18
|
},
|
|
19
19
|
/** . */
|
|
20
|
-
|
|
20
|
+
organizationId: {
|
|
21
21
|
type: 'id',
|
|
22
|
-
options: undefined
|
|
22
|
+
options: undefined,
|
|
23
23
|
},
|
|
24
24
|
/** . */
|
|
25
|
-
|
|
25
|
+
skillId: {
|
|
26
26
|
type: 'id',
|
|
27
|
-
options: undefined
|
|
27
|
+
options: undefined,
|
|
28
28
|
},
|
|
29
29
|
/** . */
|
|
30
|
-
|
|
30
|
+
roleId: {
|
|
31
31
|
type: 'id',
|
|
32
|
-
options: undefined
|
|
32
|
+
options: undefined,
|
|
33
33
|
},
|
|
34
|
-
}
|
|
34
|
+
},
|
|
35
35
|
};
|
|
36
36
|
schema_1.SchemaRegistry.getInstance().trackSchema(unauthorizedTargetSchema);
|
|
37
37
|
exports.default = unauthorizedTargetSchema;
|
|
@@ -7,12 +7,12 @@ const unexpectedPayloadSchema = {
|
|
|
7
7
|
name: 'Unexpected payload',
|
|
8
8
|
fields: {
|
|
9
9
|
/** . */
|
|
10
|
-
|
|
10
|
+
eventName: {
|
|
11
11
|
type: 'text',
|
|
12
12
|
isRequired: true,
|
|
13
|
-
options: undefined
|
|
13
|
+
options: undefined,
|
|
14
14
|
},
|
|
15
|
-
}
|
|
15
|
+
},
|
|
16
16
|
};
|
|
17
17
|
schema_1.SchemaRegistry.getInstance().trackSchema(unexpectedPayloadSchema);
|
|
18
18
|
exports.default = unexpectedPayloadSchema;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ErrorOptions as ISpruceErrorOptions } from '@sprucelabs/error';
|
|
2
|
+
import { SpruceErrors } from './errors.types';
|
|
3
3
|
export interface UnknownErrorErrorOptions extends SpruceErrors.MercuryClient.UnknownError, ISpruceErrorOptions {
|
|
4
4
|
code: 'UNKNOWN_ERROR';
|
|
5
5
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { FieldDefinitions, FieldDefinitionMap, FieldValueTypeGeneratorMap, FieldMap } from '@sprucelabs/schema';
|
|
1
|
+
export { FieldDefinitions, FieldDefinitionMap, FieldValueTypeGeneratorMap, FieldMap, } from '@sprucelabs/schema';
|