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