@sprucelabs/mercury-types 47.0.8 → 47.0.10

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.
Files changed (28) hide show
  1. package/build/.spruce/errors/mercury/invalidEventContract.schema.js +1 -1
  2. package/build/.spruce/errors/options.types.d.ts +2 -2
  3. package/build/.spruce/schemas/fields/fields.types.d.ts +1 -1
  4. package/build/.spruce/schemas/mercury/v2020_12_25/eventContract.schema.js +6 -6
  5. package/build/.spruce/schemas/mercury/v2020_12_25/eventSignature.schema.js +18 -18
  6. package/build/.spruce/schemas/mercury/v2020_12_25/eventSignaturesByName.schema.js +1 -1
  7. package/build/.spruce/schemas/mercury/v2020_12_25/feedOptions.schema.js +9 -9
  8. package/build/.spruce/schemas/mercury/v2020_12_25/permission.schema.js +13 -13
  9. package/build/.spruce/schemas/mercury/v2020_12_25/permissionContract.schema.js +12 -12
  10. package/build/.spruce/schemas/mercury/v2020_12_25/permissionDefaults.schema.js +17 -17
  11. package/build/.spruce/schemas/mercury/v2020_12_25/permissionReference.schema.js +6 -8
  12. package/build/.spruce/schemas/mercury/v2020_12_25/statusFlags.schema.js +12 -12
  13. package/build/.spruce/schemas/schemas.types.d.ts +88 -87
  14. package/build/.spruce/schemas/schemas.types.js +4 -0
  15. package/build/errors/SpruceError.js +2 -2
  16. package/build/esm/.spruce/errors/options.types.d.ts +2 -2
  17. package/build/esm/.spruce/schemas/mercury/v2020_12_25/eventContract.schema.js +6 -6
  18. package/build/esm/.spruce/schemas/mercury/v2020_12_25/eventSignature.schema.js +18 -18
  19. package/build/esm/.spruce/schemas/mercury/v2020_12_25/eventSignaturesByName.schema.js +1 -1
  20. package/build/esm/.spruce/schemas/mercury/v2020_12_25/feedOptions.schema.js +9 -9
  21. package/build/esm/.spruce/schemas/mercury/v2020_12_25/permission.schema.js +13 -13
  22. package/build/esm/.spruce/schemas/mercury/v2020_12_25/permissionContract.schema.js +12 -12
  23. package/build/esm/.spruce/schemas/mercury/v2020_12_25/permissionDefaults.schema.js +17 -17
  24. package/build/esm/.spruce/schemas/mercury/v2020_12_25/permissionReference.schema.js +6 -8
  25. package/build/esm/.spruce/schemas/mercury/v2020_12_25/statusFlags.schema.js +12 -12
  26. package/build/esm/.spruce/schemas/schemas.types.d.ts +88 -87
  27. package/build/esm/.spruce/schemas/schemas.types.js +4 -0
  28. package/package.json +10 -12
@@ -4,7 +4,10 @@ import * as SpruceSchema from '@sprucelabs/schema';
4
4
  import * as MercuryTypes from '../../';
5
5
  declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schemas.types' {
6
6
  namespace SpruceSchemas.Mercury.v2020_12_25 {
7
- type EventSignaturesByName = Record<string, SpruceSchemas.Mercury.v2020_12_25.EventSignature>;
7
+ interface EventSignaturesByName {
8
+ /** . */
9
+ [eventName: string]: SpruceSchemas.Mercury.v2020_12_25.EventSignature;
10
+ }
8
11
  interface EventSignaturesByNameSchema extends SpruceSchema.Schema {
9
12
  id: 'eventSignaturesByName';
10
13
  version: 'v2020_12_25';
@@ -26,25 +29,25 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
26
29
  namespace SpruceSchemas.Mercury.v2020_12_25 {
27
30
  /** A Mercury Event Contract. */
28
31
  interface EventContract {
29
- id?: string | undefined | null;
30
- eventSignatures: SpruceSchemas.Mercury.v2020_12_25.EventSignaturesByName;
32
+ 'id'?: string | undefined | null;
33
+ 'eventSignatures': SpruceSchemas.Mercury.v2020_12_25.EventSignaturesByName;
31
34
  }
32
35
  interface EventContractSchema extends SpruceSchema.Schema {
33
36
  id: 'eventContract';
34
37
  version: 'v2020_12_25';
35
38
  namespace: 'Mercury';
36
39
  name: 'Event contract';
37
- importsWhenRemote: ["import '@sprucelabs/mercury-types'"];
40
+ importsWhenRemote: ['import \'@sprucelabs/mercury-types\''];
38
41
  moduleToImportFromWhenRemote: '@sprucelabs/mercury-types';
39
42
  description: 'A Mercury Event Contract.';
40
43
  fields: {
41
44
  /** . */
42
- id: {
45
+ 'id': {
43
46
  type: 'id';
44
47
  options: undefined;
45
48
  };
46
49
  /** . */
47
- eventSignatures: {
50
+ 'eventSignatures': {
48
51
  type: 'schema';
49
52
  isRequired: true;
50
53
  options: {
@@ -59,32 +62,32 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
59
62
  namespace SpruceSchemas.Mercury.v2020_12_25 {
60
63
  /** A Mercury Permission Contract */
61
64
  interface PermissionContract {
62
- id: string;
65
+ 'id': string;
63
66
  /** Name. Human readable name for this contract */
64
- name: string;
67
+ 'name': string;
65
68
  /** Description. */
66
- description?: string | undefined | null;
69
+ 'description'?: string | undefined | null;
67
70
  /** Require all permissions. */
68
- requireAllPermissions?: boolean | undefined | null;
69
- permissions: SpruceSchemas.Mercury.v2020_12_25.Permission[];
71
+ 'requireAllPermissions'?: boolean | undefined | null;
72
+ 'permissions': SpruceSchemas.Mercury.v2020_12_25.Permission[];
70
73
  }
71
74
  interface PermissionContractSchema extends SpruceSchema.Schema {
72
75
  id: 'permissionContract';
73
76
  version: 'v2020_12_25';
74
77
  namespace: 'Mercury';
75
78
  name: 'Permission contract';
76
- importsWhenRemote: ["import '@sprucelabs/mercury-types'"];
79
+ importsWhenRemote: ['import \'@sprucelabs/mercury-types\''];
77
80
  moduleToImportFromWhenRemote: '@sprucelabs/mercury-types';
78
81
  description: 'A Mercury Permission Contract';
79
82
  fields: {
80
83
  /** . */
81
- id: {
84
+ 'id': {
82
85
  type: 'text';
83
86
  isRequired: true;
84
87
  options: undefined;
85
88
  };
86
89
  /** Name. Human readable name for this contract */
87
- name: {
90
+ 'name': {
88
91
  label: 'Name';
89
92
  type: 'text';
90
93
  isRequired: true;
@@ -92,20 +95,20 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
92
95
  options: undefined;
93
96
  };
94
97
  /** Description. */
95
- description: {
98
+ 'description': {
96
99
  label: 'Description';
97
100
  type: 'text';
98
101
  options: undefined;
99
102
  };
100
103
  /** Require all permissions. */
101
- requireAllPermissions: {
104
+ 'requireAllPermissions': {
102
105
  label: 'Require all permissions';
103
106
  type: 'boolean';
104
107
  defaultValue: false;
105
108
  options: undefined;
106
109
  };
107
110
  /** . */
108
- permissions: {
111
+ 'permissions': {
109
112
  type: 'schema';
110
113
  isRequired: true;
111
114
  isArray: true;
@@ -122,15 +125,15 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
122
125
  namespace SpruceSchemas.Mercury.v2020_12_25 {
123
126
  interface StatusFlags {
124
127
  /** . What is the fallback if no status is set? */
125
- default?: boolean | undefined | null;
128
+ 'default'?: boolean | undefined | null;
126
129
  /** Clocked in. Is the person clocked in and ready to rock? */
127
- clockedIn?: boolean | undefined | null;
130
+ 'clockedIn'?: boolean | undefined | null;
128
131
  /** Clocked out. When someone is not working (off the clock). */
129
- clockedOut?: boolean | undefined | null;
132
+ 'clockedOut'?: boolean | undefined | null;
130
133
  /** On premises. Are they at work (maybe working, maybe visiting). */
131
- onPrem?: boolean | undefined | null;
134
+ 'onPrem'?: boolean | undefined | null;
132
135
  /** Off premises. They aren't at the office or shop. */
133
- offPrem?: boolean | undefined | null;
136
+ 'offPrem'?: boolean | undefined | null;
134
137
  }
135
138
  interface StatusFlagsSchema extends SpruceSchema.Schema {
136
139
  id: 'statusFlags';
@@ -140,37 +143,37 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
140
143
  moduleToImportFromWhenRemote: '@sprucelabs/mercury-types';
141
144
  fields: {
142
145
  /** . What is the fallback if no status is set? */
143
- default: {
146
+ 'default': {
144
147
  type: 'boolean';
145
148
  hint: 'What is the fallback if no status is set?';
146
149
  options: undefined;
147
150
  };
148
151
  /** Clocked in. Is the person clocked in and ready to rock? */
149
- clockedIn: {
152
+ 'clockedIn': {
150
153
  label: 'Clocked in';
151
154
  type: 'boolean';
152
155
  hint: 'Is the person clocked in and ready to rock?';
153
156
  options: undefined;
154
157
  };
155
158
  /** Clocked out. When someone is not working (off the clock). */
156
- clockedOut: {
159
+ 'clockedOut': {
157
160
  label: 'Clocked out';
158
161
  type: 'boolean';
159
162
  hint: 'When someone is not working (off the clock).';
160
163
  options: undefined;
161
164
  };
162
165
  /** On premises. Are they at work (maybe working, maybe visiting). */
163
- onPrem: {
166
+ 'onPrem': {
164
167
  label: 'On premises';
165
168
  type: 'boolean';
166
169
  hint: 'Are they at work (maybe working, maybe visiting).';
167
170
  options: undefined;
168
171
  };
169
172
  /** Off premises. They aren't at the office or shop. */
170
- offPrem: {
173
+ 'offPrem': {
171
174
  label: 'Off premises';
172
175
  type: 'boolean';
173
- hint: "They aren't at the office or shop.";
176
+ hint: 'They aren\'t at the office or shop.';
174
177
  options: undefined;
175
178
  };
176
179
  };
@@ -180,21 +183,21 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
180
183
  }
181
184
  namespace SpruceSchemas.Mercury.v2020_12_25 {
182
185
  interface PermissionDefaults {
183
- skill?: boolean | undefined | null;
186
+ 'skill'?: boolean | undefined | null;
184
187
  /** Owner. */
185
- owner?: SpruceSchemas.Mercury.v2020_12_25.StatusFlags | undefined | null;
188
+ 'owner'?: SpruceSchemas.Mercury.v2020_12_25.StatusFlags | undefined | null;
186
189
  /** Group manager. */
187
- groupManager?: SpruceSchemas.Mercury.v2020_12_25.StatusFlags | undefined | null;
190
+ 'groupManager'?: SpruceSchemas.Mercury.v2020_12_25.StatusFlags | undefined | null;
188
191
  /** Manager. */
189
- manager?: SpruceSchemas.Mercury.v2020_12_25.StatusFlags | undefined | null;
192
+ 'manager'?: SpruceSchemas.Mercury.v2020_12_25.StatusFlags | undefined | null;
190
193
  /** Teammate. */
191
- teammate?: SpruceSchemas.Mercury.v2020_12_25.StatusFlags | undefined | null;
194
+ 'teammate'?: SpruceSchemas.Mercury.v2020_12_25.StatusFlags | undefined | null;
192
195
  /** Anonymous. */
193
- anonymous?: SpruceSchemas.Mercury.v2020_12_25.StatusFlags | undefined | null;
196
+ 'anonymous'?: SpruceSchemas.Mercury.v2020_12_25.StatusFlags | undefined | null;
194
197
  /** Logged in. */
195
- loggedIn?: SpruceSchemas.Mercury.v2020_12_25.StatusFlags | undefined | null;
198
+ 'loggedIn'?: SpruceSchemas.Mercury.v2020_12_25.StatusFlags | undefined | null;
196
199
  /** Guest. */
197
- guest?: SpruceSchemas.Mercury.v2020_12_25.StatusFlags | undefined | null;
200
+ 'guest'?: SpruceSchemas.Mercury.v2020_12_25.StatusFlags | undefined | null;
198
201
  }
199
202
  interface PermissionDefaultsSchema extends SpruceSchema.Schema {
200
203
  id: 'permissionDefaults';
@@ -204,12 +207,12 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
204
207
  moduleToImportFromWhenRemote: '@sprucelabs/mercury-types';
205
208
  fields: {
206
209
  /** . */
207
- skill: {
210
+ 'skill': {
208
211
  type: 'boolean';
209
212
  options: undefined;
210
213
  };
211
214
  /** Owner. */
212
- owner: {
215
+ 'owner': {
213
216
  label: 'Owner';
214
217
  type: 'schema';
215
218
  options: {
@@ -217,7 +220,7 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
217
220
  };
218
221
  };
219
222
  /** Group manager. */
220
- groupManager: {
223
+ 'groupManager': {
221
224
  label: 'Group manager';
222
225
  type: 'schema';
223
226
  options: {
@@ -225,7 +228,7 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
225
228
  };
226
229
  };
227
230
  /** Manager. */
228
- manager: {
231
+ 'manager': {
229
232
  label: 'Manager';
230
233
  type: 'schema';
231
234
  options: {
@@ -233,7 +236,7 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
233
236
  };
234
237
  };
235
238
  /** Teammate. */
236
- teammate: {
239
+ 'teammate': {
237
240
  label: 'Teammate';
238
241
  type: 'schema';
239
242
  options: {
@@ -241,7 +244,7 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
241
244
  };
242
245
  };
243
246
  /** Anonymous. */
244
- anonymous: {
247
+ 'anonymous': {
245
248
  label: 'Anonymous';
246
249
  type: 'schema';
247
250
  options: {
@@ -249,7 +252,7 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
249
252
  };
250
253
  };
251
254
  /** Logged in. */
252
- loggedIn: {
255
+ 'loggedIn': {
253
256
  label: 'Logged in';
254
257
  type: 'schema';
255
258
  options: {
@@ -257,7 +260,7 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
257
260
  };
258
261
  };
259
262
  /** Guest. */
260
- guest: {
263
+ 'guest': {
261
264
  label: 'Guest';
262
265
  type: 'schema';
263
266
  options: {
@@ -272,15 +275,15 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
272
275
  namespace SpruceSchemas.Mercury.v2020_12_25 {
273
276
  interface Permission {
274
277
  /** id. Hyphen separated id for this permission, e.g. can-unlock-doors */
275
- id: string;
278
+ 'id': string;
276
279
  /** Name. Human readable name for this permission */
277
- name: string;
280
+ 'name': string;
278
281
  /** Description. */
279
- description?: string | undefined | null;
282
+ 'description'?: string | undefined | null;
280
283
  /** Require all statuses. */
281
- requireAllStatuses?: boolean | undefined | null;
282
- defaults?: SpruceSchemas.Mercury.v2020_12_25.PermissionDefaults | undefined | null;
283
- can?: SpruceSchemas.Mercury.v2020_12_25.StatusFlags | undefined | null;
284
+ 'requireAllStatuses'?: boolean | undefined | null;
285
+ 'defaults'?: SpruceSchemas.Mercury.v2020_12_25.PermissionDefaults | undefined | null;
286
+ 'can'?: SpruceSchemas.Mercury.v2020_12_25.StatusFlags | undefined | null;
284
287
  }
285
288
  interface PermissionSchema extends SpruceSchema.Schema {
286
289
  id: 'permission';
@@ -290,7 +293,7 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
290
293
  moduleToImportFromWhenRemote: '@sprucelabs/mercury-types';
291
294
  fields: {
292
295
  /** id. Hyphen separated id for this permission, e.g. can-unlock-doors */
293
- id: {
296
+ 'id': {
294
297
  label: 'id';
295
298
  type: 'text';
296
299
  isRequired: true;
@@ -298,7 +301,7 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
298
301
  options: undefined;
299
302
  };
300
303
  /** Name. Human readable name for this permission */
301
- name: {
304
+ 'name': {
302
305
  label: 'Name';
303
306
  type: 'text';
304
307
  isRequired: true;
@@ -306,27 +309,27 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
306
309
  options: undefined;
307
310
  };
308
311
  /** Description. */
309
- description: {
312
+ 'description': {
310
313
  label: 'Description';
311
314
  type: 'text';
312
315
  options: undefined;
313
316
  };
314
317
  /** Require all statuses. */
315
- requireAllStatuses: {
318
+ 'requireAllStatuses': {
316
319
  label: 'Require all statuses';
317
320
  type: 'boolean';
318
321
  defaultValue: false;
319
322
  options: undefined;
320
323
  };
321
324
  /** . */
322
- defaults: {
325
+ 'defaults': {
323
326
  type: 'schema';
324
327
  options: {
325
328
  schema: SpruceSchemas.Mercury.v2020_12_25.PermissionDefaultsSchema;
326
329
  };
327
330
  };
328
331
  /** . */
329
- can: {
332
+ 'can': {
330
333
  type: 'schema';
331
334
  options: {
332
335
  schema: SpruceSchemas.Mercury.v2020_12_25.StatusFlagsSchema;
@@ -339,22 +342,20 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
339
342
  }
340
343
  namespace SpruceSchemas.Mercury.v2020_12_25 {
341
344
  interface PermissionReference<ContractId extends MercuryTypes.PermissionContractId = MercuryTypes.PermissionContractId> {
342
- contractId: ContractId;
343
- permissionIdsAny?: MercuryTypes.PermissionId<ContractId>[] | undefined | null;
345
+ 'contractId': (ContractId);
346
+ 'permissionIdsAny'?: (MercuryTypes.PermissionId<ContractId>)[] | undefined | null;
344
347
  }
345
348
  interface PermissionReferenceSchema extends SpruceSchema.Schema {
346
349
  id: 'permissionReference';
347
350
  version: 'v2020_12_25';
348
351
  namespace: 'Mercury';
349
352
  name: '';
350
- importsWhenRemote: [
351
- "import * as MercuryTypes from '@sprucelabs/mercury-types'"
352
- ];
353
+ importsWhenRemote: ['import * as MercuryTypes from \'@sprucelabs/mercury-types\''];
353
354
  moduleToImportFromWhenRemote: '@sprucelabs/mercury-types';
354
355
  typeSuffix: '<ContractId extends MercuryTypes.PermissionContractId = MercuryTypes.PermissionContractId>';
355
356
  fields: {
356
357
  /** . */
357
- contractId: {
358
+ 'contractId': {
358
359
  type: 'raw';
359
360
  isRequired: true;
360
361
  options: {
@@ -362,7 +363,7 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
362
363
  };
363
364
  };
364
365
  /** . */
365
- permissionIdsAny: {
366
+ 'permissionIdsAny': {
366
367
  type: 'raw';
367
368
  isArray: true;
368
369
  options: {
@@ -377,10 +378,10 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
377
378
  namespace SpruceSchemas.Mercury.v2020_12_25 {
378
379
  interface FeedOptions {
379
380
  /** . A handlebarsjs template used to render the chat bubbles in the feed. You will have both the entire target and payload available to you in the template. See http://developer.spruce.bot for more details. */
380
- template?: string | undefined | null;
381
- pathsToLinks?: string[] | undefined | null;
382
- pathsToChoices?: string[] | undefined | null;
383
- pathToContext?: string | undefined | null;
381
+ 'template'?: string | undefined | null;
382
+ 'pathsToLinks'?: string[] | undefined | null;
383
+ 'pathsToChoices'?: string[] | undefined | null;
384
+ 'pathToContext'?: string | undefined | null;
384
385
  }
385
386
  interface FeedOptionsSchema extends SpruceSchema.Schema {
386
387
  id: 'feedOptions';
@@ -390,27 +391,27 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
390
391
  moduleToImportFromWhenRemote: '@sprucelabs/mercury-types';
391
392
  fields: {
392
393
  /** . A handlebarsjs template used to render the chat bubbles in the feed. You will have both the entire target and payload available to you in the template. See http://developer.spruce.bot for more details. */
393
- template: {
394
+ 'template': {
394
395
  type: 'text';
395
396
  hint: 'A handlebarsjs template used to render the chat bubbles in the feed. You will have both the entire target and payload available to you in the template. See http://developer.spruce.bot for more details.';
396
397
  options: undefined;
397
398
  };
398
399
  /** . */
399
- pathsToLinks: {
400
+ 'pathsToLinks': {
400
401
  type: 'text';
401
402
  isArray: true;
402
403
  minArrayLength: 0;
403
404
  options: undefined;
404
405
  };
405
406
  /** . */
406
- pathsToChoices: {
407
+ 'pathsToChoices': {
407
408
  type: 'text';
408
409
  isArray: true;
409
410
  minArrayLength: 0;
410
411
  options: undefined;
411
412
  };
412
413
  /** . */
413
- pathToContext: {
414
+ 'pathToContext': {
414
415
  type: 'text';
415
416
  options: undefined;
416
417
  };
@@ -421,14 +422,14 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
421
422
  }
422
423
  namespace SpruceSchemas.Mercury.v2020_12_25 {
423
424
  interface EventSignature {
424
- isGlobal?: boolean | undefined | null;
425
- responsePayloadSchema?: SpruceSchema.Schema | undefined | null;
426
- emitPayloadSchema?: SpruceSchema.Schema | undefined | null;
427
- feed?: SpruceSchemas.Mercury.v2020_12_25.FeedOptions | undefined | null;
428
- listenPermissions?: SpruceSchemas.Mercury.v2020_12_25.PermissionReference | undefined | null;
429
- emitPermissions?: SpruceSchemas.Mercury.v2020_12_25.PermissionReference | undefined | null;
430
- listenPermissionContract?: SpruceSchemas.Mercury.v2020_12_25.PermissionContract | undefined | null;
431
- emitPermissionContract?: SpruceSchemas.Mercury.v2020_12_25.PermissionContract | undefined | null;
425
+ 'isGlobal'?: boolean | undefined | null;
426
+ 'responsePayloadSchema'?: (SpruceSchema.Schema) | undefined | null;
427
+ 'emitPayloadSchema'?: (SpruceSchema.Schema) | undefined | null;
428
+ 'feed'?: SpruceSchemas.Mercury.v2020_12_25.FeedOptions | undefined | null;
429
+ 'listenPermissions'?: SpruceSchemas.Mercury.v2020_12_25.PermissionReference | undefined | null;
430
+ 'emitPermissions'?: SpruceSchemas.Mercury.v2020_12_25.PermissionReference | undefined | null;
431
+ 'listenPermissionContract'?: SpruceSchemas.Mercury.v2020_12_25.PermissionContract | undefined | null;
432
+ 'emitPermissionContract'?: SpruceSchemas.Mercury.v2020_12_25.PermissionContract | undefined | null;
432
433
  }
433
434
  interface EventSignatureSchema extends SpruceSchema.Schema {
434
435
  id: 'eventSignature';
@@ -438,55 +439,55 @@ declare module '@sprucelabs/spruce-core-schemas/build/.spruce/schemas/core.schem
438
439
  moduleToImportFromWhenRemote: '@sprucelabs/mercury-types';
439
440
  fields: {
440
441
  /** . */
441
- isGlobal: {
442
+ 'isGlobal': {
442
443
  type: 'boolean';
443
444
  defaultValue: false;
444
445
  options: undefined;
445
446
  };
446
447
  /** . */
447
- responsePayloadSchema: {
448
+ 'responsePayloadSchema': {
448
449
  type: 'raw';
449
450
  options: {
450
451
  valueType: `SpruceSchema.Schema`;
451
452
  };
452
453
  };
453
454
  /** . */
454
- emitPayloadSchema: {
455
+ 'emitPayloadSchema': {
455
456
  type: 'raw';
456
457
  options: {
457
458
  valueType: `SpruceSchema.Schema`;
458
459
  };
459
460
  };
460
461
  /** . */
461
- feed: {
462
+ 'feed': {
462
463
  type: 'schema';
463
464
  options: {
464
465
  schema: SpruceSchemas.Mercury.v2020_12_25.FeedOptionsSchema;
465
466
  };
466
467
  };
467
468
  /** . */
468
- listenPermissions: {
469
+ 'listenPermissions': {
469
470
  type: 'schema';
470
471
  options: {
471
472
  schema: SpruceSchemas.Mercury.v2020_12_25.PermissionReferenceSchema;
472
473
  };
473
474
  };
474
475
  /** . */
475
- emitPermissions: {
476
+ 'emitPermissions': {
476
477
  type: 'schema';
477
478
  options: {
478
479
  schema: SpruceSchemas.Mercury.v2020_12_25.PermissionReferenceSchema;
479
480
  };
480
481
  };
481
482
  /** . */
482
- listenPermissionContract: {
483
+ 'listenPermissionContract': {
483
484
  type: 'schema';
484
485
  options: {
485
486
  schema: SpruceSchemas.Mercury.v2020_12_25.PermissionContractSchema;
486
487
  };
487
488
  };
488
489
  /** . */
489
- emitPermissionContract: {
490
+ 'emitPermissionContract': {
490
491
  type: 'schema';
491
492
  options: {
492
493
  schema: SpruceSchemas.Mercury.v2020_12_25.PermissionContractSchema;
@@ -1,2 +1,6 @@
1
1
  "use strict";
2
+ /* eslint-disable @typescript-eslint/no-namespace */
3
+ /* eslint-disable no-redeclare */
4
+ /* eslint-disable @typescript-eslint/no-unused-vars */
5
+ /* eslint-disable import/order */
2
6
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -10,10 +10,10 @@ class SpruceError extends error_1.default {
10
10
  friendlyMessage() {
11
11
  const { options } = this;
12
12
  let message;
13
- switch (options?.code) {
13
+ switch (options === null || options === void 0 ? void 0 : options.code) {
14
14
  case 'INVALID_EVENT_CONTRACT': {
15
15
  message = `Yikes! This event contract is not valid!`;
16
- const { originalError } = options ?? {};
16
+ const { originalError } = options !== null && options !== void 0 ? options : {};
17
17
  if (originalError instanceof schema_1.SchemaError &&
18
18
  originalError.options.code === 'VALIDATION_FAILED') {
19
19
  message = '\n\n' + originalError.message;
@@ -1,5 +1,5 @@
1
- import { ErrorOptions as ISpruceErrorOptions } from '@sprucelabs/error';
2
- import { SpruceErrors } from './errors.types';
1
+ import { SpruceErrors } from "./errors.types";
2
+ import { ErrorOptions as ISpruceErrorOptions } from "@sprucelabs/error";
3
3
  export interface InvalidEventContractErrorOptions extends SpruceErrors.Mercury.InvalidEventContract, ISpruceErrorOptions {
4
4
  code: 'INVALID_EVENT_CONTRACT';
5
5
  }
@@ -5,22 +5,22 @@ const eventContractSchema = {
5
5
  version: 'v2020_12_25',
6
6
  namespace: 'Mercury',
7
7
  name: 'Event contract',
8
- importsWhenRemote: ["import '@sprucelabs/mercury-types'"],
8
+ importsWhenRemote: ['import \'@sprucelabs/mercury-types\'',],
9
9
  moduleToImportFromWhenRemote: '@sprucelabs/mercury-types',
10
10
  description: 'A Mercury Event Contract.',
11
11
  fields: {
12
12
  /** . */
13
- id: {
13
+ 'id': {
14
14
  type: 'id',
15
- options: undefined,
15
+ options: undefined
16
16
  },
17
17
  /** . */
18
- eventSignatures: {
18
+ 'eventSignatures': {
19
19
  type: 'schema',
20
20
  isRequired: true,
21
- options: { schema: eventSignaturesByNameSchema_v2020_12_25 },
21
+ options: { schema: eventSignaturesByNameSchema_v2020_12_25, }
22
22
  },
23
- },
23
+ }
24
24
  };
25
25
  SchemaRegistry.getInstance().trackSchema(eventContractSchema);
26
26
  export default eventContractSchema;
@@ -1,7 +1,7 @@
1
1
  import { SchemaRegistry } from '@sprucelabs/schema';
2
2
  import feedOptionsSchema_v2020_12_25 from './feedOptions.schema.js';
3
- import permissionContractSchema_v2020_12_25 from './permissionContract.schema.js';
4
3
  import permissionReferenceSchema_v2020_12_25 from './permissionReference.schema.js';
4
+ import permissionContractSchema_v2020_12_25 from './permissionContract.schema.js';
5
5
  const eventSignatureSchema = {
6
6
  id: 'eventSignature',
7
7
  version: 'v2020_12_25',
@@ -10,47 +10,47 @@ const eventSignatureSchema = {
10
10
  moduleToImportFromWhenRemote: '@sprucelabs/mercury-types',
11
11
  fields: {
12
12
  /** . */
13
- isGlobal: {
13
+ 'isGlobal': {
14
14
  type: 'boolean',
15
15
  defaultValue: false,
16
- options: undefined,
16
+ options: undefined
17
17
  },
18
18
  /** . */
19
- responsePayloadSchema: {
19
+ 'responsePayloadSchema': {
20
20
  type: 'raw',
21
- options: { valueType: `SpruceSchema.Schema` },
21
+ options: { valueType: `SpruceSchema.Schema`, }
22
22
  },
23
23
  /** . */
24
- emitPayloadSchema: {
24
+ 'emitPayloadSchema': {
25
25
  type: 'raw',
26
- options: { valueType: `SpruceSchema.Schema` },
26
+ options: { valueType: `SpruceSchema.Schema`, }
27
27
  },
28
28
  /** . */
29
- feed: {
29
+ 'feed': {
30
30
  type: 'schema',
31
- options: { schema: feedOptionsSchema_v2020_12_25 },
31
+ options: { schema: feedOptionsSchema_v2020_12_25, }
32
32
  },
33
33
  /** . */
34
- listenPermissions: {
34
+ 'listenPermissions': {
35
35
  type: 'schema',
36
- options: { schema: permissionReferenceSchema_v2020_12_25 },
36
+ options: { schema: permissionReferenceSchema_v2020_12_25, }
37
37
  },
38
38
  /** . */
39
- emitPermissions: {
39
+ 'emitPermissions': {
40
40
  type: 'schema',
41
- options: { schema: permissionReferenceSchema_v2020_12_25 },
41
+ options: { schema: permissionReferenceSchema_v2020_12_25, }
42
42
  },
43
43
  /** . */
44
- listenPermissionContract: {
44
+ 'listenPermissionContract': {
45
45
  type: 'schema',
46
- options: { schema: permissionContractSchema_v2020_12_25 },
46
+ options: { schema: permissionContractSchema_v2020_12_25, }
47
47
  },
48
48
  /** . */
49
- emitPermissionContract: {
49
+ 'emitPermissionContract': {
50
50
  type: 'schema',
51
- options: { schema: permissionContractSchema_v2020_12_25 },
51
+ options: { schema: permissionContractSchema_v2020_12_25, }
52
52
  },
53
- },
53
+ }
54
54
  };
55
55
  SchemaRegistry.getInstance().trackSchema(eventSignatureSchema);
56
56
  export default eventSignatureSchema;
@@ -10,7 +10,7 @@ const eventSignaturesByNameSchema = {
10
10
  type: 'schema',
11
11
  keyName: 'eventName',
12
12
  isRequired: true,
13
- options: { schema: eventSignatureSchema_v2020_12_25 },
13
+ options: { schema: eventSignatureSchema_v2020_12_25, }
14
14
  },
15
15
  };
16
16
  SchemaRegistry.getInstance().trackSchema(eventSignaturesByNameSchema);