@sprucelabs/mercury-client 42.0.557 → 42.0.558
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/esm/.spruce/errors/errors.types.d.ts +324 -0
- package/build/esm/.spruce/errors/errors.types.js +1 -0
- package/build/esm/.spruce/errors/mercuryClient/connectionFailed.schema.d.ts +3 -0
- package/build/esm/.spruce/errors/mercuryClient/connectionFailed.schema.js +25 -0
- package/build/esm/.spruce/errors/mercuryClient/invalidEventSignature.schema.d.ts +3 -0
- package/build/esm/.spruce/errors/mercuryClient/invalidEventSignature.schema.js +25 -0
- package/build/esm/.spruce/errors/mercuryClient/invalidPayload.schema.d.ts +3 -0
- package/build/esm/.spruce/errors/mercuryClient/invalidPayload.schema.js +19 -0
- package/build/esm/.spruce/errors/mercuryClient/invalidProtocol.schema.d.ts +3 -0
- package/build/esm/.spruce/errors/mercuryClient/invalidProtocol.schema.js +19 -0
- package/build/esm/.spruce/errors/mercuryClient/missingTestCacheDir.schema.d.ts +3 -0
- package/build/esm/.spruce/errors/mercuryClient/missingTestCacheDir.schema.js +12 -0
- package/build/esm/.spruce/errors/mercuryClient/mustCreateEvent.schema.d.ts +3 -0
- package/build/esm/.spruce/errors/mercuryClient/mustCreateEvent.schema.js +19 -0
- package/build/esm/.spruce/errors/mercuryClient/mustHandleLocally.schema.d.ts +3 -0
- package/build/esm/.spruce/errors/mercuryClient/mustHandleLocally.schema.js +19 -0
- package/build/esm/.spruce/errors/mercuryClient/notConnected.schema.d.ts +3 -0
- package/build/esm/.spruce/errors/mercuryClient/notConnected.schema.js +25 -0
- package/build/esm/.spruce/errors/mercuryClient/timeout.schema.d.ts +3 -0
- package/build/esm/.spruce/errors/mercuryClient/timeout.schema.js +35 -0
- package/build/esm/.spruce/errors/mercuryClient/unauthorizedAccess.schema.d.ts +3 -0
- package/build/esm/.spruce/errors/mercuryClient/unauthorizedAccess.schema.js +41 -0
- package/build/esm/.spruce/errors/mercuryClient/unauthorizedTarget.schema.d.ts +3 -0
- package/build/esm/.spruce/errors/mercuryClient/unauthorizedTarget.schema.js +38 -0
- package/build/esm/.spruce/errors/mercuryClient/unexpectedPayload.schema.d.ts +3 -0
- package/build/esm/.spruce/errors/mercuryClient/unexpectedPayload.schema.js +19 -0
- package/build/esm/.spruce/errors/mercuryClient/unknownError.schema.d.ts +3 -0
- package/build/esm/.spruce/errors/mercuryClient/unknownError.schema.js +12 -0
- package/build/esm/.spruce/errors/options.types.d.ts +40 -0
- package/build/esm/.spruce/errors/options.types.js +1 -0
- package/build/esm/.spruce/event-cache.json +1 -0
- package/build/esm/.spruce/schemas/fields/fieldClassMap.d.ts +2 -0
- package/build/esm/.spruce/schemas/fields/fieldClassMap.js +5 -0
- package/build/esm/.spruce/schemas/fields/fields.types.d.ts +1 -0
- package/build/esm/.spruce/schemas/fields/fields.types.js +3 -0
- package/build/esm/.spruce/schemas/schemas.types.d.ts +1 -0
- package/build/esm/.spruce/schemas/schemas.types.js +3 -0
- package/build/esm/.spruce/settings.json +26 -0
- package/build/esm/clients/MercuryClientFactory.d.ts +26 -0
- package/build/esm/clients/MercuryClientFactory.js +96 -0
- package/build/esm/clients/MercurySocketIoClient.d.ts +89 -0
- package/build/esm/clients/MercurySocketIoClient.js +605 -0
- package/build/esm/clients/MercuryTestClient.d.ts +57 -0
- package/build/esm/clients/MercuryTestClient.js +389 -0
- package/build/esm/clients/MutableContractClient.d.ts +10 -0
- package/build/esm/clients/MutableContractClient.js +43 -0
- package/build/esm/clients/statusChangePayloadSchema.d.ts +103 -0
- package/build/esm/clients/statusChangePayloadSchema.js +45 -0
- package/build/esm/constants.d.ts +1 -0
- package/build/esm/constants.js +1 -0
- package/build/esm/errors/SpruceError.d.ts +5 -0
- package/build/esm/errors/SpruceError.js +66 -0
- package/build/esm/errors/connectionFailed.builder.d.ts +16 -0
- package/build/esm/errors/connectionFailed.builder.js +16 -0
- package/build/esm/errors/invalidEventSignature.builder.d.ts +15 -0
- package/build/esm/errors/invalidEventSignature.builder.js +15 -0
- package/build/esm/errors/invalidPayload.builder.d.ts +12 -0
- package/build/esm/errors/invalidPayload.builder.js +12 -0
- package/build/esm/errors/invalidProtocol.builder.d.ts +12 -0
- package/build/esm/errors/invalidProtocol.builder.js +12 -0
- package/build/esm/errors/missingTestCacheDir.builder.d.ts +7 -0
- package/build/esm/errors/missingTestCacheDir.builder.js +7 -0
- package/build/esm/errors/mustCreateEvent.builder.d.ts +11 -0
- package/build/esm/errors/mustCreateEvent.builder.js +11 -0
- package/build/esm/errors/mustHandleLocally.builder.d.ts +11 -0
- package/build/esm/errors/mustHandleLocally.builder.js +11 -0
- package/build/esm/errors/notConnected.builder.d.ts +16 -0
- package/build/esm/errors/notConnected.builder.js +16 -0
- package/build/esm/errors/timeout.builder.d.ts +22 -0
- package/build/esm/errors/timeout.builder.js +22 -0
- package/build/esm/errors/unauthorizedAccess.builder.d.ts +57 -0
- package/build/esm/errors/unauthorizedAccess.builder.js +39 -0
- package/build/esm/errors/unexpectedPayload.builder.d.ts +12 -0
- package/build/esm/errors/unexpectedPayload.builder.js +12 -0
- package/build/esm/errors/unknownError.builder.d.ts +6 -0
- package/build/esm/errors/unknownError.builder.js +6 -0
- package/build/esm/index.d.ts +6 -0
- package/build/esm/index.js +6 -0
- package/build/esm/tests/AbstractClientTest.d.ts +31 -0
- package/build/esm/tests/AbstractClientTest.js +212 -0
- package/build/esm/tests/constants.d.ts +9 -0
- package/build/esm/tests/constants.js +11 -0
- package/build/esm/types/client.types.d.ts +30 -0
- package/build/esm/types/client.types.js +1 -0
- package/build/esm/utilities/socketIoEventUtil.utility.d.ts +5 -0
- package/build/esm/utilities/socketIoEventUtil.utility.js +9 -0
- package/package.json +12 -12
- package/build/__tests__/behavioral/AuthenticatingAndReauthenticating.test.d.ts +0 -21
- package/build/__tests__/behavioral/AuthenticatingAndReauthenticating.test.js +0 -287
- package/build/__tests__/behavioral/AuthenticatingAndReauthenticating.test.js.map +0 -1
- package/build/__tests__/behavioral/DisablingPermissionChecksWhenEmittingLocally.test.d.ts +0 -7
- package/build/__tests__/behavioral/DisablingPermissionChecksWhenEmittingLocally.test.js +0 -49
- package/build/__tests__/behavioral/DisablingPermissionChecksWhenEmittingLocally.test.js.map +0 -1
- package/build/__tests__/behavioral/EmittingAndFlatteningResponses.test.d.ts +0 -52
- package/build/__tests__/behavioral/EmittingAndFlatteningResponses.test.js +0 -123
- package/build/__tests__/behavioral/EmittingAndFlatteningResponses.test.js.map +0 -1
- package/build/__tests__/behavioral/EmittingConnectionChangeInTests.test.d.ts +0 -9
- package/build/__tests__/behavioral/EmittingConnectionChangeInTests.test.js +0 -103
- package/build/__tests__/behavioral/EmittingConnectionChangeInTests.test.js.map +0 -1
- package/build/__tests__/behavioral/LocallyHandlingAuthenticateDelaysConnect.test.d.ts +0 -7
- package/build/__tests__/behavioral/LocallyHandlingAuthenticateDelaysConnect.test.js +0 -91
- package/build/__tests__/behavioral/LocallyHandlingAuthenticateDelaysConnect.test.js.map +0 -1
- package/build/__tests__/behavioral/MercuryClientFactory.test.d.ts +0 -7
- package/build/__tests__/behavioral/MercuryClientFactory.test.js +0 -85
- package/build/__tests__/behavioral/MercuryClientFactory.test.js.map +0 -1
- package/build/__tests__/behavioral/ProxyingEvents.test.d.ts +0 -11
- package/build/__tests__/behavioral/ProxyingEvents.test.js +0 -99
- package/build/__tests__/behavioral/ProxyingEvents.test.js.map +0 -1
- package/build/__tests__/behavioral/ReconnectingAutomatically.test.d.ts +0 -33
- package/build/__tests__/behavioral/ReconnectingAutomatically.test.js +0 -390
- package/build/__tests__/behavioral/ReconnectingAutomatically.test.js.map +0 -1
- package/build/__tests__/behavioral/RequiringLocalListeners.test.d.ts +0 -7
- package/build/__tests__/behavioral/RequiringLocalListeners.test.js +0 -65
- package/build/__tests__/behavioral/RequiringLocalListeners.test.js.map +0 -1
- package/build/__tests__/behavioral/SettingNamespacesThatMustBeHandledLocally.test.d.ts +0 -9
- package/build/__tests__/behavioral/SettingNamespacesThatMustBeHandledLocally.test.js +0 -66
- package/build/__tests__/behavioral/SettingNamespacesThatMustBeHandledLocally.test.js.map +0 -1
- package/build/__tests__/behavioral/SimulatingEventsForTesting.test.d.ts +0 -51
- package/build/__tests__/behavioral/SimulatingEventsForTesting.test.js +0 -821
- package/build/__tests__/behavioral/SimulatingEventsForTesting.test.js.map +0 -1
- package/build/__tests__/behavioral/TestClientSpeedTests.test.d.ts +0 -7
- package/build/__tests__/behavioral/TestClientSpeedTests.test.js +0 -44
- package/build/__tests__/behavioral/TestClientSpeedTests.test.js.map +0 -1
- package/build/__tests__/behavioral/TestingWithDefaultContracts.test.d.ts +0 -7
- package/build/__tests__/behavioral/TestingWithDefaultContracts.test.js +0 -56
- package/build/__tests__/behavioral/TestingWithDefaultContracts.test.js.map +0 -1
- package/build/__tests__/behavioral/TurningOffAListener.test.d.ts +0 -16
- package/build/__tests__/behavioral/TurningOffAListener.test.js +0 -126
- package/build/__tests__/behavioral/TurningOffAListener.test.js.map +0 -1
- package/build/__tests__/behavioral/UsingMercuryClient.test.d.ts +0 -45
- package/build/__tests__/behavioral/UsingMercuryClient.test.js +0 -662
- package/build/__tests__/behavioral/UsingMercuryClient.test.js.map +0 -1
- /package/build/{.spruce → esm/.spruce}/errors/errors.types.js.map +0 -0
- /package/build/{.spruce → esm/.spruce}/errors/mercuryClient/connectionFailed.schema.js.map +0 -0
- /package/build/{.spruce → esm/.spruce}/errors/mercuryClient/invalidEventSignature.schema.js.map +0 -0
- /package/build/{.spruce → esm/.spruce}/errors/mercuryClient/invalidPayload.schema.js.map +0 -0
- /package/build/{.spruce → esm/.spruce}/errors/mercuryClient/invalidProtocol.schema.js.map +0 -0
- /package/build/{.spruce → esm/.spruce}/errors/mercuryClient/missingTestCacheDir.schema.js.map +0 -0
- /package/build/{.spruce → esm/.spruce}/errors/mercuryClient/mustCreateEvent.schema.js.map +0 -0
- /package/build/{.spruce → esm/.spruce}/errors/mercuryClient/mustHandleLocally.schema.js.map +0 -0
- /package/build/{.spruce → esm/.spruce}/errors/mercuryClient/notConnected.schema.js.map +0 -0
- /package/build/{.spruce → esm/.spruce}/errors/mercuryClient/timeout.schema.js.map +0 -0
- /package/build/{.spruce → esm/.spruce}/errors/mercuryClient/unauthorizedAccess.schema.js.map +0 -0
- /package/build/{.spruce → esm/.spruce}/errors/mercuryClient/unauthorizedTarget.schema.js.map +0 -0
- /package/build/{.spruce → esm/.spruce}/errors/mercuryClient/unexpectedPayload.schema.js.map +0 -0
- /package/build/{.spruce → esm/.spruce}/errors/mercuryClient/unknownError.schema.js.map +0 -0
- /package/build/{.spruce → esm/.spruce}/errors/options.types.js.map +0 -0
- /package/build/{.spruce → esm/.spruce}/schemas/fields/fieldClassMap.js.map +0 -0
- /package/build/{.spruce → esm/.spruce}/schemas/fields/fields.types.js.map +0 -0
- /package/build/{.spruce → esm/.spruce}/schemas/schemas.types.js.map +0 -0
- /package/build/{clients → esm/clients}/MercuryClientFactory.js.map +0 -0
- /package/build/{clients → esm/clients}/MercurySocketIoClient.js.map +0 -0
- /package/build/{clients → esm/clients}/MercuryTestClient.js.map +0 -0
- /package/build/{clients → esm/clients}/MutableContractClient.js.map +0 -0
- /package/build/{clients → esm/clients}/statusChangePayloadSchema.js.map +0 -0
- /package/build/{constants.js.map → esm/constants.js.map} +0 -0
- /package/build/{errors → esm/errors}/SpruceError.js.map +0 -0
- /package/build/{errors → esm/errors}/connectionFailed.builder.js.map +0 -0
- /package/build/{errors → esm/errors}/invalidEventSignature.builder.js.map +0 -0
- /package/build/{errors → esm/errors}/invalidPayload.builder.js.map +0 -0
- /package/build/{errors → esm/errors}/invalidProtocol.builder.js.map +0 -0
- /package/build/{errors → esm/errors}/missingTestCacheDir.builder.js.map +0 -0
- /package/build/{errors → esm/errors}/mustCreateEvent.builder.js.map +0 -0
- /package/build/{errors → esm/errors}/mustHandleLocally.builder.js.map +0 -0
- /package/build/{errors → esm/errors}/notConnected.builder.js.map +0 -0
- /package/build/{errors → esm/errors}/timeout.builder.js.map +0 -0
- /package/build/{errors → esm/errors}/unauthorizedAccess.builder.js.map +0 -0
- /package/build/{errors → esm/errors}/unexpectedPayload.builder.js.map +0 -0
- /package/build/{errors → esm/errors}/unknownError.builder.js.map +0 -0
- /package/build/{index.js.map → esm/index.js.map} +0 -0
- /package/build/{tests → esm/tests}/AbstractClientTest.js.map +0 -0
- /package/build/{tests → esm/tests}/constants.js.map +0 -0
- /package/build/{types → esm/types}/client.types.js.map +0 -0
- /package/build/{utilities → esm/utilities}/socketIoEventUtil.utility.js.map +0 -0
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
import { default as SchemaEntity } from '@sprucelabs/schema';
|
|
2
|
+
import * as SpruceSchema from '@sprucelabs/schema';
|
|
3
|
+
export declare namespace SpruceErrors.MercuryClient {
|
|
4
|
+
interface UnknownError {
|
|
5
|
+
}
|
|
6
|
+
interface UnknownErrorSchema extends SpruceSchema.Schema {
|
|
7
|
+
id: 'unknownError';
|
|
8
|
+
namespace: 'MercuryClient';
|
|
9
|
+
name: 'Unknown error';
|
|
10
|
+
fields: {};
|
|
11
|
+
}
|
|
12
|
+
type UnknownErrorEntity = SchemaEntity<SpruceErrors.MercuryClient.UnknownErrorSchema>;
|
|
13
|
+
}
|
|
14
|
+
export declare namespace SpruceErrors.MercuryClient {
|
|
15
|
+
interface UnexpectedPayload {
|
|
16
|
+
'eventName': string;
|
|
17
|
+
}
|
|
18
|
+
interface UnexpectedPayloadSchema extends SpruceSchema.Schema {
|
|
19
|
+
id: 'unexpectedPayload';
|
|
20
|
+
namespace: 'MercuryClient';
|
|
21
|
+
name: 'Unexpected payload';
|
|
22
|
+
fields: {
|
|
23
|
+
/** . */
|
|
24
|
+
'eventName': {
|
|
25
|
+
type: 'text';
|
|
26
|
+
isRequired: true;
|
|
27
|
+
options: undefined;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
type UnexpectedPayloadEntity = SchemaEntity<SpruceErrors.MercuryClient.UnexpectedPayloadSchema>;
|
|
32
|
+
}
|
|
33
|
+
export declare namespace SpruceErrors.MercuryClient {
|
|
34
|
+
interface UnauthorizedTarget {
|
|
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
|
+
}
|
|
41
|
+
interface UnauthorizedTargetSchema extends SpruceSchema.Schema {
|
|
42
|
+
id: 'unauthorizedTarget';
|
|
43
|
+
namespace: 'MercuryClient';
|
|
44
|
+
name: '';
|
|
45
|
+
fields: {
|
|
46
|
+
/** . */
|
|
47
|
+
'locationId': {
|
|
48
|
+
type: 'id';
|
|
49
|
+
options: undefined;
|
|
50
|
+
};
|
|
51
|
+
/** . */
|
|
52
|
+
'personId': {
|
|
53
|
+
type: 'id';
|
|
54
|
+
options: undefined;
|
|
55
|
+
};
|
|
56
|
+
/** . */
|
|
57
|
+
'organizationId': {
|
|
58
|
+
type: 'id';
|
|
59
|
+
options: undefined;
|
|
60
|
+
};
|
|
61
|
+
/** . */
|
|
62
|
+
'skillId': {
|
|
63
|
+
type: 'id';
|
|
64
|
+
options: undefined;
|
|
65
|
+
};
|
|
66
|
+
/** . */
|
|
67
|
+
'roleId': {
|
|
68
|
+
type: 'id';
|
|
69
|
+
options: undefined;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
type UnauthorizedTargetEntity = SchemaEntity<SpruceErrors.MercuryClient.UnauthorizedTargetSchema>;
|
|
74
|
+
}
|
|
75
|
+
export declare namespace SpruceErrors.MercuryClient {
|
|
76
|
+
interface UnauthorizedAccess {
|
|
77
|
+
'fqen': string;
|
|
78
|
+
'action': ("emit");
|
|
79
|
+
'target': SpruceErrors.MercuryClient.UnauthorizedTarget;
|
|
80
|
+
'permissionContractId': string;
|
|
81
|
+
}
|
|
82
|
+
interface UnauthorizedAccessSchema extends SpruceSchema.Schema {
|
|
83
|
+
id: 'unauthorizedAccess';
|
|
84
|
+
namespace: 'MercuryClient';
|
|
85
|
+
name: 'Unauthorized Access';
|
|
86
|
+
fields: {
|
|
87
|
+
/** . */
|
|
88
|
+
'fqen': {
|
|
89
|
+
type: 'text';
|
|
90
|
+
isRequired: true;
|
|
91
|
+
options: undefined;
|
|
92
|
+
};
|
|
93
|
+
/** . */
|
|
94
|
+
'action': {
|
|
95
|
+
type: 'select';
|
|
96
|
+
isRequired: true;
|
|
97
|
+
options: {
|
|
98
|
+
choices: [{
|
|
99
|
+
"value": "emit";
|
|
100
|
+
"label": "emit";
|
|
101
|
+
}];
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
/** . */
|
|
105
|
+
'target': {
|
|
106
|
+
type: 'schema';
|
|
107
|
+
isRequired: true;
|
|
108
|
+
options: {
|
|
109
|
+
schema: SpruceErrors.MercuryClient.UnauthorizedTargetSchema;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
/** . */
|
|
113
|
+
'permissionContractId': {
|
|
114
|
+
type: 'id';
|
|
115
|
+
isRequired: true;
|
|
116
|
+
options: undefined;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
type UnauthorizedAccessEntity = SchemaEntity<SpruceErrors.MercuryClient.UnauthorizedAccessSchema>;
|
|
121
|
+
}
|
|
122
|
+
export declare namespace SpruceErrors.MercuryClient {
|
|
123
|
+
interface Timeout {
|
|
124
|
+
'eventName': string;
|
|
125
|
+
'timeoutMs': number;
|
|
126
|
+
'isConnected'?: boolean | undefined | null;
|
|
127
|
+
'totalRetries'?: number | undefined | null;
|
|
128
|
+
}
|
|
129
|
+
interface TimeoutSchema extends SpruceSchema.Schema {
|
|
130
|
+
id: 'timeout';
|
|
131
|
+
namespace: 'MercuryClient';
|
|
132
|
+
name: 'Timeout';
|
|
133
|
+
fields: {
|
|
134
|
+
/** . */
|
|
135
|
+
'eventName': {
|
|
136
|
+
type: 'text';
|
|
137
|
+
isRequired: true;
|
|
138
|
+
options: undefined;
|
|
139
|
+
};
|
|
140
|
+
/** . */
|
|
141
|
+
'timeoutMs': {
|
|
142
|
+
type: 'number';
|
|
143
|
+
isRequired: true;
|
|
144
|
+
options: undefined;
|
|
145
|
+
};
|
|
146
|
+
/** . */
|
|
147
|
+
'isConnected': {
|
|
148
|
+
type: 'boolean';
|
|
149
|
+
options: undefined;
|
|
150
|
+
};
|
|
151
|
+
/** . */
|
|
152
|
+
'totalRetries': {
|
|
153
|
+
type: 'number';
|
|
154
|
+
options: undefined;
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
type TimeoutEntity = SchemaEntity<SpruceErrors.MercuryClient.TimeoutSchema>;
|
|
159
|
+
}
|
|
160
|
+
export declare namespace SpruceErrors.MercuryClient {
|
|
161
|
+
interface NotConnected {
|
|
162
|
+
'action': string;
|
|
163
|
+
'fqen': string;
|
|
164
|
+
}
|
|
165
|
+
interface NotConnectedSchema extends SpruceSchema.Schema {
|
|
166
|
+
id: 'notConnected';
|
|
167
|
+
namespace: 'MercuryClient';
|
|
168
|
+
name: 'Not connected';
|
|
169
|
+
fields: {
|
|
170
|
+
/** . */
|
|
171
|
+
'action': {
|
|
172
|
+
type: 'text';
|
|
173
|
+
isRequired: true;
|
|
174
|
+
options: undefined;
|
|
175
|
+
};
|
|
176
|
+
/** . */
|
|
177
|
+
'fqen': {
|
|
178
|
+
type: 'id';
|
|
179
|
+
isRequired: true;
|
|
180
|
+
options: undefined;
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
type NotConnectedEntity = SchemaEntity<SpruceErrors.MercuryClient.NotConnectedSchema>;
|
|
185
|
+
}
|
|
186
|
+
export declare namespace SpruceErrors.MercuryClient {
|
|
187
|
+
interface MustHandleLocally {
|
|
188
|
+
'fqen': string;
|
|
189
|
+
}
|
|
190
|
+
interface MustHandleLocallySchema extends SpruceSchema.Schema {
|
|
191
|
+
id: 'mustHandleLocally';
|
|
192
|
+
namespace: 'MercuryClient';
|
|
193
|
+
name: 'Must handle locally';
|
|
194
|
+
fields: {
|
|
195
|
+
/** . */
|
|
196
|
+
'fqen': {
|
|
197
|
+
type: 'text';
|
|
198
|
+
isRequired: true;
|
|
199
|
+
options: undefined;
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
type MustHandleLocallyEntity = SchemaEntity<SpruceErrors.MercuryClient.MustHandleLocallySchema>;
|
|
204
|
+
}
|
|
205
|
+
export declare namespace SpruceErrors.MercuryClient {
|
|
206
|
+
interface MustCreateEvent {
|
|
207
|
+
'fqen': string;
|
|
208
|
+
}
|
|
209
|
+
interface MustCreateEventSchema extends SpruceSchema.Schema {
|
|
210
|
+
id: 'mustCreateEvent';
|
|
211
|
+
namespace: 'MercuryClient';
|
|
212
|
+
name: 'must create event';
|
|
213
|
+
fields: {
|
|
214
|
+
/** . */
|
|
215
|
+
'fqen': {
|
|
216
|
+
type: 'text';
|
|
217
|
+
isRequired: true;
|
|
218
|
+
options: undefined;
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
type MustCreateEventEntity = SchemaEntity<SpruceErrors.MercuryClient.MustCreateEventSchema>;
|
|
223
|
+
}
|
|
224
|
+
export declare namespace SpruceErrors.MercuryClient {
|
|
225
|
+
interface MissingTestCacheDir {
|
|
226
|
+
}
|
|
227
|
+
interface MissingTestCacheDirSchema extends SpruceSchema.Schema {
|
|
228
|
+
id: 'missingTestCacheDir';
|
|
229
|
+
namespace: 'MercuryClient';
|
|
230
|
+
name: 'Missing test cache dir';
|
|
231
|
+
fields: {};
|
|
232
|
+
}
|
|
233
|
+
type MissingTestCacheDirEntity = SchemaEntity<SpruceErrors.MercuryClient.MissingTestCacheDirSchema>;
|
|
234
|
+
}
|
|
235
|
+
export declare namespace SpruceErrors.MercuryClient {
|
|
236
|
+
interface InvalidProtocol {
|
|
237
|
+
'uri': string;
|
|
238
|
+
}
|
|
239
|
+
interface InvalidProtocolSchema extends SpruceSchema.Schema {
|
|
240
|
+
id: 'invalidProtocol';
|
|
241
|
+
namespace: 'MercuryClient';
|
|
242
|
+
name: 'Invalid protocol';
|
|
243
|
+
fields: {
|
|
244
|
+
/** . */
|
|
245
|
+
'uri': {
|
|
246
|
+
type: 'text';
|
|
247
|
+
isRequired: true;
|
|
248
|
+
options: undefined;
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
type InvalidProtocolEntity = SchemaEntity<SpruceErrors.MercuryClient.InvalidProtocolSchema>;
|
|
253
|
+
}
|
|
254
|
+
export declare namespace SpruceErrors.MercuryClient {
|
|
255
|
+
interface InvalidPayload {
|
|
256
|
+
'eventName': string;
|
|
257
|
+
}
|
|
258
|
+
interface InvalidPayloadSchema extends SpruceSchema.Schema {
|
|
259
|
+
id: 'invalidPayload';
|
|
260
|
+
namespace: 'MercuryClient';
|
|
261
|
+
name: 'Invalid payload';
|
|
262
|
+
fields: {
|
|
263
|
+
/** . */
|
|
264
|
+
'eventName': {
|
|
265
|
+
type: 'text';
|
|
266
|
+
isRequired: true;
|
|
267
|
+
options: undefined;
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
type InvalidPayloadEntity = SchemaEntity<SpruceErrors.MercuryClient.InvalidPayloadSchema>;
|
|
272
|
+
}
|
|
273
|
+
export declare namespace SpruceErrors.MercuryClient {
|
|
274
|
+
interface InvalidEventSignature {
|
|
275
|
+
'fqen': string;
|
|
276
|
+
'instructions': string;
|
|
277
|
+
}
|
|
278
|
+
interface InvalidEventSignatureSchema extends SpruceSchema.Schema {
|
|
279
|
+
id: 'invalidEventSignature';
|
|
280
|
+
namespace: 'MercuryClient';
|
|
281
|
+
name: 'Invalid event contract';
|
|
282
|
+
fields: {
|
|
283
|
+
/** . */
|
|
284
|
+
'fqen': {
|
|
285
|
+
type: 'text';
|
|
286
|
+
isRequired: true;
|
|
287
|
+
options: undefined;
|
|
288
|
+
};
|
|
289
|
+
/** . */
|
|
290
|
+
'instructions': {
|
|
291
|
+
type: 'text';
|
|
292
|
+
isRequired: true;
|
|
293
|
+
options: undefined;
|
|
294
|
+
};
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
type InvalidEventSignatureEntity = SchemaEntity<SpruceErrors.MercuryClient.InvalidEventSignatureSchema>;
|
|
298
|
+
}
|
|
299
|
+
export declare namespace SpruceErrors.MercuryClient {
|
|
300
|
+
interface ConnectionFailed {
|
|
301
|
+
'host': string;
|
|
302
|
+
'statusCode': number;
|
|
303
|
+
}
|
|
304
|
+
interface ConnectionFailedSchema extends SpruceSchema.Schema {
|
|
305
|
+
id: 'connectionFailed';
|
|
306
|
+
namespace: 'MercuryClient';
|
|
307
|
+
name: 'Connection failed';
|
|
308
|
+
fields: {
|
|
309
|
+
/** . */
|
|
310
|
+
'host': {
|
|
311
|
+
type: 'text';
|
|
312
|
+
isRequired: true;
|
|
313
|
+
options: undefined;
|
|
314
|
+
};
|
|
315
|
+
/** . */
|
|
316
|
+
'statusCode': {
|
|
317
|
+
type: 'number';
|
|
318
|
+
isRequired: true;
|
|
319
|
+
options: undefined;
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
type ConnectionFailedEntity = SchemaEntity<SpruceErrors.MercuryClient.ConnectionFailedSchema>;
|
|
324
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_1 = require('@sprucelabs/schema');
|
|
4
|
+
const connectionFailedSchema = {
|
|
5
|
+
id: 'connectionFailed',
|
|
6
|
+
namespace: 'MercuryClient',
|
|
7
|
+
name: 'Connection failed',
|
|
8
|
+
fields: {
|
|
9
|
+
/** . */
|
|
10
|
+
'host': {
|
|
11
|
+
type: 'text',
|
|
12
|
+
isRequired: true,
|
|
13
|
+
options: undefined
|
|
14
|
+
},
|
|
15
|
+
/** . */
|
|
16
|
+
'statusCode': {
|
|
17
|
+
type: 'number',
|
|
18
|
+
isRequired: true,
|
|
19
|
+
options: undefined
|
|
20
|
+
},
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
schema_1.SchemaRegistry.getInstance().trackSchema(connectionFailedSchema);
|
|
24
|
+
exports.default = connectionFailedSchema;
|
|
25
|
+
//# sourceMappingURL=connectionFailed.schema.js.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_1 = require('@sprucelabs/schema');
|
|
4
|
+
const invalidEventSignatureSchema = {
|
|
5
|
+
id: 'invalidEventSignature',
|
|
6
|
+
namespace: 'MercuryClient',
|
|
7
|
+
name: 'Invalid event contract',
|
|
8
|
+
fields: {
|
|
9
|
+
/** . */
|
|
10
|
+
'fqen': {
|
|
11
|
+
type: 'text',
|
|
12
|
+
isRequired: true,
|
|
13
|
+
options: undefined
|
|
14
|
+
},
|
|
15
|
+
/** . */
|
|
16
|
+
'instructions': {
|
|
17
|
+
type: 'text',
|
|
18
|
+
isRequired: true,
|
|
19
|
+
options: undefined
|
|
20
|
+
},
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
schema_1.SchemaRegistry.getInstance().trackSchema(invalidEventSignatureSchema);
|
|
24
|
+
exports.default = invalidEventSignatureSchema;
|
|
25
|
+
//# sourceMappingURL=invalidEventSignature.schema.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_1 = require('@sprucelabs/schema');
|
|
4
|
+
const invalidPayloadSchema = {
|
|
5
|
+
id: 'invalidPayload',
|
|
6
|
+
namespace: 'MercuryClient',
|
|
7
|
+
name: 'Invalid payload',
|
|
8
|
+
fields: {
|
|
9
|
+
/** . */
|
|
10
|
+
'eventName': {
|
|
11
|
+
type: 'text',
|
|
12
|
+
isRequired: true,
|
|
13
|
+
options: undefined
|
|
14
|
+
},
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
schema_1.SchemaRegistry.getInstance().trackSchema(invalidPayloadSchema);
|
|
18
|
+
exports.default = invalidPayloadSchema;
|
|
19
|
+
//# sourceMappingURL=invalidPayload.schema.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_1 = require('@sprucelabs/schema');
|
|
4
|
+
const invalidProtocolSchema = {
|
|
5
|
+
id: 'invalidProtocol',
|
|
6
|
+
namespace: 'MercuryClient',
|
|
7
|
+
name: 'Invalid protocol',
|
|
8
|
+
fields: {
|
|
9
|
+
/** . */
|
|
10
|
+
'uri': {
|
|
11
|
+
type: 'text',
|
|
12
|
+
isRequired: true,
|
|
13
|
+
options: undefined
|
|
14
|
+
},
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
schema_1.SchemaRegistry.getInstance().trackSchema(invalidProtocolSchema);
|
|
18
|
+
exports.default = invalidProtocolSchema;
|
|
19
|
+
//# sourceMappingURL=invalidProtocol.schema.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_1 = require('@sprucelabs/schema');
|
|
4
|
+
const missingTestCacheDirSchema = {
|
|
5
|
+
id: 'missingTestCacheDir',
|
|
6
|
+
namespace: 'MercuryClient',
|
|
7
|
+
name: 'Missing test cache dir',
|
|
8
|
+
fields: {}
|
|
9
|
+
};
|
|
10
|
+
schema_1.SchemaRegistry.getInstance().trackSchema(missingTestCacheDirSchema);
|
|
11
|
+
exports.default = missingTestCacheDirSchema;
|
|
12
|
+
//# sourceMappingURL=missingTestCacheDir.schema.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_1 = require('@sprucelabs/schema');
|
|
4
|
+
const mustCreateEventSchema = {
|
|
5
|
+
id: 'mustCreateEvent',
|
|
6
|
+
namespace: 'MercuryClient',
|
|
7
|
+
name: 'must create event',
|
|
8
|
+
fields: {
|
|
9
|
+
/** . */
|
|
10
|
+
'fqen': {
|
|
11
|
+
type: 'text',
|
|
12
|
+
isRequired: true,
|
|
13
|
+
options: undefined
|
|
14
|
+
},
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
schema_1.SchemaRegistry.getInstance().trackSchema(mustCreateEventSchema);
|
|
18
|
+
exports.default = mustCreateEventSchema;
|
|
19
|
+
//# sourceMappingURL=mustCreateEvent.schema.js.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_1 = require('@sprucelabs/schema');
|
|
4
|
+
const mustHandleLocallySchema = {
|
|
5
|
+
id: 'mustHandleLocally',
|
|
6
|
+
namespace: 'MercuryClient',
|
|
7
|
+
name: 'Must handle locally',
|
|
8
|
+
fields: {
|
|
9
|
+
/** . */
|
|
10
|
+
'fqen': {
|
|
11
|
+
type: 'text',
|
|
12
|
+
isRequired: true,
|
|
13
|
+
options: undefined
|
|
14
|
+
},
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
schema_1.SchemaRegistry.getInstance().trackSchema(mustHandleLocallySchema);
|
|
18
|
+
exports.default = mustHandleLocallySchema;
|
|
19
|
+
//# sourceMappingURL=mustHandleLocally.schema.js.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_1 = require('@sprucelabs/schema');
|
|
4
|
+
const notConnectedSchema = {
|
|
5
|
+
id: 'notConnected',
|
|
6
|
+
namespace: 'MercuryClient',
|
|
7
|
+
name: 'Not connected',
|
|
8
|
+
fields: {
|
|
9
|
+
/** . */
|
|
10
|
+
'action': {
|
|
11
|
+
type: 'text',
|
|
12
|
+
isRequired: true,
|
|
13
|
+
options: undefined
|
|
14
|
+
},
|
|
15
|
+
/** . */
|
|
16
|
+
'fqen': {
|
|
17
|
+
type: 'id',
|
|
18
|
+
isRequired: true,
|
|
19
|
+
options: undefined
|
|
20
|
+
},
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
schema_1.SchemaRegistry.getInstance().trackSchema(notConnectedSchema);
|
|
24
|
+
exports.default = notConnectedSchema;
|
|
25
|
+
//# sourceMappingURL=notConnected.schema.js.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_1 = require('@sprucelabs/schema');
|
|
4
|
+
const timeoutSchema = {
|
|
5
|
+
id: 'timeout',
|
|
6
|
+
namespace: 'MercuryClient',
|
|
7
|
+
name: 'Timeout',
|
|
8
|
+
fields: {
|
|
9
|
+
/** . */
|
|
10
|
+
'eventName': {
|
|
11
|
+
type: 'text',
|
|
12
|
+
isRequired: true,
|
|
13
|
+
options: undefined
|
|
14
|
+
},
|
|
15
|
+
/** . */
|
|
16
|
+
'timeoutMs': {
|
|
17
|
+
type: 'number',
|
|
18
|
+
isRequired: true,
|
|
19
|
+
options: undefined
|
|
20
|
+
},
|
|
21
|
+
/** . */
|
|
22
|
+
'isConnected': {
|
|
23
|
+
type: 'boolean',
|
|
24
|
+
options: undefined
|
|
25
|
+
},
|
|
26
|
+
/** . */
|
|
27
|
+
'totalRetries': {
|
|
28
|
+
type: 'number',
|
|
29
|
+
options: undefined
|
|
30
|
+
},
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
schema_1.SchemaRegistry.getInstance().trackSchema(timeoutSchema);
|
|
34
|
+
exports.default = timeoutSchema;
|
|
35
|
+
//# sourceMappingURL=timeout.schema.js.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const schema_1 = require('@sprucelabs/schema');
|
|
7
|
+
const unauthorizedTarget_schema_1 = __importDefault(require('./unauthorizedTarget.schema.js'));
|
|
8
|
+
const unauthorizedAccessSchema = {
|
|
9
|
+
id: 'unauthorizedAccess',
|
|
10
|
+
namespace: 'MercuryClient',
|
|
11
|
+
name: 'Unauthorized Access',
|
|
12
|
+
fields: {
|
|
13
|
+
/** . */
|
|
14
|
+
'fqen': {
|
|
15
|
+
type: 'text',
|
|
16
|
+
isRequired: true,
|
|
17
|
+
options: undefined
|
|
18
|
+
},
|
|
19
|
+
/** . */
|
|
20
|
+
'action': {
|
|
21
|
+
type: 'select',
|
|
22
|
+
isRequired: true,
|
|
23
|
+
options: { choices: [{ "value": "emit", "label": "emit" }], }
|
|
24
|
+
},
|
|
25
|
+
/** . */
|
|
26
|
+
'target': {
|
|
27
|
+
type: 'schema',
|
|
28
|
+
isRequired: true,
|
|
29
|
+
options: { schema: unauthorizedTarget_schema_1.default, }
|
|
30
|
+
},
|
|
31
|
+
/** . */
|
|
32
|
+
'permissionContractId': {
|
|
33
|
+
type: 'id',
|
|
34
|
+
isRequired: true,
|
|
35
|
+
options: undefined
|
|
36
|
+
},
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
schema_1.SchemaRegistry.getInstance().trackSchema(unauthorizedAccessSchema);
|
|
40
|
+
exports.default = unauthorizedAccessSchema;
|
|
41
|
+
//# sourceMappingURL=unauthorizedAccess.schema.js.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_1 = require('@sprucelabs/schema');
|
|
4
|
+
const unauthorizedTargetSchema = {
|
|
5
|
+
id: 'unauthorizedTarget',
|
|
6
|
+
namespace: 'MercuryClient',
|
|
7
|
+
name: '',
|
|
8
|
+
fields: {
|
|
9
|
+
/** . */
|
|
10
|
+
'locationId': {
|
|
11
|
+
type: 'id',
|
|
12
|
+
options: undefined
|
|
13
|
+
},
|
|
14
|
+
/** . */
|
|
15
|
+
'personId': {
|
|
16
|
+
type: 'id',
|
|
17
|
+
options: undefined
|
|
18
|
+
},
|
|
19
|
+
/** . */
|
|
20
|
+
'organizationId': {
|
|
21
|
+
type: 'id',
|
|
22
|
+
options: undefined
|
|
23
|
+
},
|
|
24
|
+
/** . */
|
|
25
|
+
'skillId': {
|
|
26
|
+
type: 'id',
|
|
27
|
+
options: undefined
|
|
28
|
+
},
|
|
29
|
+
/** . */
|
|
30
|
+
'roleId': {
|
|
31
|
+
type: 'id',
|
|
32
|
+
options: undefined
|
|
33
|
+
},
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
schema_1.SchemaRegistry.getInstance().trackSchema(unauthorizedTargetSchema);
|
|
37
|
+
exports.default = unauthorizedTargetSchema;
|
|
38
|
+
//# sourceMappingURL=unauthorizedTarget.schema.js.map
|