@multiagency/sdk 0.3.1

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 (78) hide show
  1. package/CHANGES.md +21 -0
  2. package/LICENSE +21 -0
  3. package/README.md +142 -0
  4. package/THIRD-PARTY-NOTICES +127 -0
  5. package/bin/release-server.d.mts +29 -0
  6. package/bin/release-server.mjs +143 -0
  7. package/dist/compensation-contract.d.ts +370 -0
  8. package/dist/compensation-contract.js +51 -0
  9. package/dist/contract/agent-connection.d.ts +86 -0
  10. package/dist/contract/agent-connection.js +36 -0
  11. package/dist/contract/app-access.d.ts +141 -0
  12. package/dist/contract/app-access.js +57 -0
  13. package/dist/contract/app-client.d.ts +140 -0
  14. package/dist/contract/app-client.js +61 -0
  15. package/dist/contract/app-consent.d.ts +68 -0
  16. package/dist/contract/app-consent.js +91 -0
  17. package/dist/contract/assets.d.ts +6 -0
  18. package/dist/contract/assets.js +6 -0
  19. package/dist/contract/client.d.ts +347 -0
  20. package/dist/contract/client.js +81 -0
  21. package/dist/contract/gateway.d.ts +74 -0
  22. package/dist/contract/gateway.js +47 -0
  23. package/dist/contract/index.d.ts +26 -0
  24. package/dist/contract/index.js +25 -0
  25. package/dist/contract/inputs.d.ts +230 -0
  26. package/dist/contract/inputs.js +99 -0
  27. package/dist/contract/intents-account.d.ts +5 -0
  28. package/dist/contract/intents-account.js +8 -0
  29. package/dist/contract/orpc-client.js +2037 -0
  30. package/dist/contract/owner-capabilities.d.ts +81 -0
  31. package/dist/contract/owner-capabilities.js +33 -0
  32. package/dist/contract/owner-client.d.ts +99 -0
  33. package/dist/contract/owner-client.js +146 -0
  34. package/dist/contract/owner-contract.d.ts +1156 -0
  35. package/dist/contract/owner-contract.js +37 -0
  36. package/dist/contract/owner-inputs.d.ts +166 -0
  37. package/dist/contract/owner-inputs.js +1 -0
  38. package/dist/contract/owner-outputs.d.ts +5749 -0
  39. package/dist/contract/owner-outputs.js +751 -0
  40. package/dist/contract/package-version.d.ts +5 -0
  41. package/dist/contract/package-version.js +2 -0
  42. package/dist/contract/payee-entry.d.ts +10 -0
  43. package/dist/contract/payee-entry.js +10 -0
  44. package/dist/contract/payee.d.ts +326 -0
  45. package/dist/contract/payee.js +32 -0
  46. package/dist/contract/permissions.d.ts +20 -0
  47. package/dist/contract/permissions.js +64 -0
  48. package/dist/contract/proposals.d.ts +178 -0
  49. package/dist/contract/proposals.js +27 -0
  50. package/dist/contract/run-log-schema.d.ts +888 -0
  51. package/dist/contract/run-log-schema.js +150 -0
  52. package/dist/contract/run-progress-schema.d.ts +104 -0
  53. package/dist/contract/run-progress-schema.js +20 -0
  54. package/dist/payee-contract.d.ts +9 -0
  55. package/dist/payee-contract.js +15 -0
  56. package/package.json +58 -0
  57. package/provenance.json +61 -0
  58. package/schemas/agentConnection.json +76 -0
  59. package/schemas/agentConnectionIssue.json +22 -0
  60. package/schemas/agentConnectionList.json +88 -0
  61. package/schemas/agentConnectionStarted.json +90 -0
  62. package/schemas/compensationSend.json +40 -0
  63. package/schemas/errorBody.json +16 -0
  64. package/schemas/fileResult.json +67 -0
  65. package/schemas/invoicesView.json +130 -0
  66. package/schemas/ownerCompensationView.json +556 -0
  67. package/schemas/payeeCompensationView.json +546 -0
  68. package/schemas/payeeWorkOrderRequest.json +31 -0
  69. package/schemas/publicWorkOrder.json +94 -0
  70. package/schemas/reportCommand.json +82 -0
  71. package/schemas/requestRecord.json +149 -0
  72. package/schemas/session.json +20 -0
  73. package/schemas/workOrderList.json +43 -0
  74. package/schemas/workOrderRequestResult.json +20 -0
  75. package/skills/app-server/SKILL.md +190 -0
  76. package/skills/getting-started/SKILL.md +90 -0
  77. package/skills/owner-workflows/SKILL.md +157 -0
  78. package/skills/payee-workflows/SKILL.md +200 -0
@@ -0,0 +1,546 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "account": {
6
+ "type": "string"
7
+ },
8
+ "agreements": {
9
+ "type": "array",
10
+ "items": {
11
+ "type": "object",
12
+ "properties": {
13
+ "id": {
14
+ "type": "string",
15
+ "format": "uuid",
16
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
17
+ },
18
+ "version": {
19
+ "type": "integer",
20
+ "exclusiveMinimum": 0,
21
+ "maximum": 9007199254740991
22
+ },
23
+ "terms": {
24
+ "type": "object",
25
+ "properties": {
26
+ "payee": {
27
+ "type": "string",
28
+ "pattern": "^(?=.{2,64}$)([a-z\\d]+[-_])*[a-z\\d]+(\\.([a-z\\d]+[-_])*[a-z\\d]+)*$"
29
+ },
30
+ "title": {
31
+ "type": "string",
32
+ "minLength": 1,
33
+ "maxLength": 160
34
+ },
35
+ "document": {
36
+ "type": "string",
37
+ "maxLength": 1000,
38
+ "format": "uri"
39
+ },
40
+ "signedOn": {
41
+ "type": "string",
42
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
43
+ },
44
+ "start": {
45
+ "type": "string",
46
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
47
+ },
48
+ "end": {
49
+ "type": "string",
50
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
51
+ },
52
+ "ceiling": {
53
+ "type": "string",
54
+ "pattern": "^[1-9][0-9]{0,17}$"
55
+ },
56
+ "openingApproved": {
57
+ "type": "string",
58
+ "pattern": "^(0|[1-9][0-9]{0,17})$"
59
+ },
60
+ "scope": {
61
+ "type": "string",
62
+ "maxLength": 2000
63
+ }
64
+ },
65
+ "required": [
66
+ "payee",
67
+ "title",
68
+ "document",
69
+ "signedOn",
70
+ "start",
71
+ "end",
72
+ "ceiling",
73
+ "openingApproved",
74
+ "scope"
75
+ ],
76
+ "additionalProperties": false
77
+ },
78
+ "recordedBy": {
79
+ "type": "string"
80
+ },
81
+ "at": {
82
+ "type": "string"
83
+ },
84
+ "approved": {
85
+ "type": "string",
86
+ "pattern": "^\\d+$"
87
+ },
88
+ "remaining": {
89
+ "type": "string",
90
+ "pattern": "^\\d+$"
91
+ }
92
+ },
93
+ "required": [
94
+ "id",
95
+ "version",
96
+ "terms",
97
+ "recordedBy",
98
+ "at",
99
+ "approved",
100
+ "remaining"
101
+ ],
102
+ "additionalProperties": false
103
+ }
104
+ },
105
+ "requests": {
106
+ "type": "array",
107
+ "items": {
108
+ "type": "object",
109
+ "properties": {
110
+ "id": {
111
+ "type": "string",
112
+ "format": "uuid",
113
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
114
+ },
115
+ "version": {
116
+ "type": "integer",
117
+ "exclusiveMinimum": 0,
118
+ "maximum": 9007199254740991
119
+ },
120
+ "payee": {
121
+ "type": "string",
122
+ "pattern": "^(?=.{2,64}$)([a-z\\d]+[-_])*[a-z\\d]+(\\.([a-z\\d]+[-_])*[a-z\\d]+)*$"
123
+ },
124
+ "agreementVersion": {
125
+ "type": "integer",
126
+ "exclusiveMinimum": 0,
127
+ "maximum": 9007199254740991
128
+ },
129
+ "report": {
130
+ "type": "object",
131
+ "properties": {
132
+ "agreementId": {
133
+ "type": "string",
134
+ "format": "uuid",
135
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
136
+ },
137
+ "amount": {
138
+ "type": "string",
139
+ "pattern": "^[1-9][0-9]{0,17}$"
140
+ },
141
+ "start": {
142
+ "type": "string",
143
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
144
+ },
145
+ "end": {
146
+ "type": "string",
147
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
148
+ },
149
+ "contributions": {
150
+ "type": "string",
151
+ "minLength": 1,
152
+ "maxLength": 4000
153
+ },
154
+ "assessment": {
155
+ "type": "string",
156
+ "minLength": 1,
157
+ "maxLength": 2000
158
+ },
159
+ "evidence": {
160
+ "maxItems": 12,
161
+ "type": "array",
162
+ "items": {
163
+ "type": "string",
164
+ "maxLength": 1000,
165
+ "format": "uri"
166
+ }
167
+ }
168
+ },
169
+ "required": [
170
+ "agreementId",
171
+ "start",
172
+ "end",
173
+ "contributions",
174
+ "assessment",
175
+ "evidence"
176
+ ],
177
+ "additionalProperties": false
178
+ },
179
+ "state": {
180
+ "type": "string",
181
+ "enum": [
182
+ "draft",
183
+ "submitted",
184
+ "changes_requested",
185
+ "approved",
186
+ "declined"
187
+ ]
188
+ },
189
+ "approvedAmount": {
190
+ "type": "string",
191
+ "pattern": "^[1-9][0-9]{0,17}$"
192
+ },
193
+ "feedback": {
194
+ "type": "string"
195
+ },
196
+ "reviewedBy": {
197
+ "type": [
198
+ "string",
199
+ "null"
200
+ ]
201
+ },
202
+ "at": {
203
+ "type": "string"
204
+ },
205
+ "payment": {
206
+ "default": null,
207
+ "anyOf": [
208
+ {
209
+ "type": "object",
210
+ "properties": {
211
+ "mode": {
212
+ "type": "string",
213
+ "enum": [
214
+ "shared",
215
+ "isolated"
216
+ ]
217
+ },
218
+ "id": {
219
+ "type": "string",
220
+ "format": "uuid",
221
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
222
+ },
223
+ "until": {
224
+ "type": "string",
225
+ "format": "date-time",
226
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
227
+ }
228
+ },
229
+ "required": [
230
+ "mode",
231
+ "id"
232
+ ],
233
+ "additionalProperties": false
234
+ },
235
+ {
236
+ "type": "null"
237
+ }
238
+ ]
239
+ }
240
+ },
241
+ "required": [
242
+ "id",
243
+ "version",
244
+ "payee",
245
+ "agreementVersion",
246
+ "report",
247
+ "state",
248
+ "feedback",
249
+ "reviewedBy",
250
+ "at",
251
+ "payment"
252
+ ],
253
+ "additionalProperties": false
254
+ }
255
+ },
256
+ "history": {
257
+ "type": "array",
258
+ "items": {
259
+ "type": "object",
260
+ "properties": {
261
+ "sequence": {
262
+ "type": "number"
263
+ },
264
+ "actor": {
265
+ "type": "string"
266
+ },
267
+ "record": {
268
+ "anyOf": [
269
+ {
270
+ "type": "object",
271
+ "properties": {
272
+ "id": {
273
+ "type": "string",
274
+ "format": "uuid",
275
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
276
+ },
277
+ "version": {
278
+ "type": "integer",
279
+ "exclusiveMinimum": 0,
280
+ "maximum": 9007199254740991
281
+ },
282
+ "payee": {
283
+ "type": "string",
284
+ "pattern": "^(?=.{2,64}$)([a-z\\d]+[-_])*[a-z\\d]+(\\.([a-z\\d]+[-_])*[a-z\\d]+)*$"
285
+ },
286
+ "agreementVersion": {
287
+ "type": "integer",
288
+ "exclusiveMinimum": 0,
289
+ "maximum": 9007199254740991
290
+ },
291
+ "report": {
292
+ "type": "object",
293
+ "properties": {
294
+ "agreementId": {
295
+ "type": "string",
296
+ "format": "uuid",
297
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
298
+ },
299
+ "amount": {
300
+ "type": "string",
301
+ "pattern": "^[1-9][0-9]{0,17}$"
302
+ },
303
+ "start": {
304
+ "type": "string",
305
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
306
+ },
307
+ "end": {
308
+ "type": "string",
309
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
310
+ },
311
+ "contributions": {
312
+ "type": "string",
313
+ "minLength": 1,
314
+ "maxLength": 4000
315
+ },
316
+ "assessment": {
317
+ "type": "string",
318
+ "minLength": 1,
319
+ "maxLength": 2000
320
+ },
321
+ "evidence": {
322
+ "maxItems": 12,
323
+ "type": "array",
324
+ "items": {
325
+ "type": "string",
326
+ "maxLength": 1000,
327
+ "format": "uri"
328
+ }
329
+ }
330
+ },
331
+ "required": [
332
+ "agreementId",
333
+ "start",
334
+ "end",
335
+ "contributions",
336
+ "assessment",
337
+ "evidence"
338
+ ],
339
+ "additionalProperties": false
340
+ },
341
+ "state": {
342
+ "type": "string",
343
+ "enum": [
344
+ "draft",
345
+ "submitted",
346
+ "changes_requested",
347
+ "approved",
348
+ "declined"
349
+ ]
350
+ },
351
+ "approvedAmount": {
352
+ "type": "string",
353
+ "pattern": "^[1-9][0-9]{0,17}$"
354
+ },
355
+ "feedback": {
356
+ "type": "string"
357
+ },
358
+ "reviewedBy": {
359
+ "type": [
360
+ "string",
361
+ "null"
362
+ ]
363
+ },
364
+ "at": {
365
+ "type": "string"
366
+ },
367
+ "payment": {
368
+ "default": null,
369
+ "anyOf": [
370
+ {
371
+ "type": "object",
372
+ "properties": {
373
+ "mode": {
374
+ "type": "string",
375
+ "enum": [
376
+ "shared",
377
+ "isolated"
378
+ ]
379
+ },
380
+ "id": {
381
+ "type": "string",
382
+ "format": "uuid",
383
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
384
+ },
385
+ "until": {
386
+ "type": "string",
387
+ "format": "date-time",
388
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
389
+ }
390
+ },
391
+ "required": [
392
+ "mode",
393
+ "id"
394
+ ],
395
+ "additionalProperties": false
396
+ },
397
+ {
398
+ "type": "null"
399
+ }
400
+ ]
401
+ }
402
+ },
403
+ "required": [
404
+ "id",
405
+ "version",
406
+ "payee",
407
+ "agreementVersion",
408
+ "report",
409
+ "state",
410
+ "feedback",
411
+ "reviewedBy",
412
+ "at",
413
+ "payment"
414
+ ],
415
+ "additionalProperties": false
416
+ },
417
+ {
418
+ "type": "object",
419
+ "properties": {
420
+ "id": {
421
+ "type": "string",
422
+ "format": "uuid",
423
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
424
+ },
425
+ "version": {
426
+ "type": "integer",
427
+ "exclusiveMinimum": 0,
428
+ "maximum": 9007199254740991
429
+ },
430
+ "terms": {
431
+ "type": "object",
432
+ "properties": {
433
+ "payee": {
434
+ "type": "string",
435
+ "pattern": "^(?=.{2,64}$)([a-z\\d]+[-_])*[a-z\\d]+(\\.([a-z\\d]+[-_])*[a-z\\d]+)*$"
436
+ },
437
+ "title": {
438
+ "type": "string",
439
+ "minLength": 1,
440
+ "maxLength": 160
441
+ },
442
+ "document": {
443
+ "type": "string",
444
+ "maxLength": 1000,
445
+ "format": "uri"
446
+ },
447
+ "signedOn": {
448
+ "type": "string",
449
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
450
+ },
451
+ "start": {
452
+ "type": "string",
453
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
454
+ },
455
+ "end": {
456
+ "type": "string",
457
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
458
+ },
459
+ "ceiling": {
460
+ "type": "string",
461
+ "pattern": "^[1-9][0-9]{0,17}$"
462
+ },
463
+ "openingApproved": {
464
+ "type": "string",
465
+ "pattern": "^(0|[1-9][0-9]{0,17})$"
466
+ },
467
+ "scope": {
468
+ "type": "string",
469
+ "maxLength": 2000
470
+ }
471
+ },
472
+ "required": [
473
+ "payee",
474
+ "title",
475
+ "document",
476
+ "signedOn",
477
+ "start",
478
+ "end",
479
+ "ceiling",
480
+ "openingApproved",
481
+ "scope"
482
+ ],
483
+ "additionalProperties": false
484
+ },
485
+ "recordedBy": {
486
+ "type": "string"
487
+ },
488
+ "at": {
489
+ "type": "string"
490
+ }
491
+ },
492
+ "required": [
493
+ "id",
494
+ "version",
495
+ "terms",
496
+ "recordedBy",
497
+ "at"
498
+ ],
499
+ "additionalProperties": false
500
+ }
501
+ ]
502
+ }
503
+ },
504
+ "required": [
505
+ "sequence",
506
+ "actor",
507
+ "record"
508
+ ],
509
+ "additionalProperties": false
510
+ }
511
+ },
512
+ "payments": {
513
+ "type": "array",
514
+ "items": {
515
+ "type": "object",
516
+ "properties": {
517
+ "requestId": {
518
+ "type": "string",
519
+ "format": "uuid",
520
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
521
+ },
522
+ "id": {
523
+ "type": "string"
524
+ },
525
+ "status": {
526
+ "type": "string"
527
+ }
528
+ },
529
+ "required": [
530
+ "requestId",
531
+ "id",
532
+ "status"
533
+ ],
534
+ "additionalProperties": false
535
+ }
536
+ }
537
+ },
538
+ "required": [
539
+ "account",
540
+ "agreements",
541
+ "requests",
542
+ "history",
543
+ "payments"
544
+ ],
545
+ "additionalProperties": false
546
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "submission": {
6
+ "type": "string",
7
+ "format": "uuid",
8
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
9
+ },
10
+ "amount": {
11
+ "type": "string"
12
+ },
13
+ "note": {
14
+ "type": "string",
15
+ "minLength": 1,
16
+ "maxLength": 200
17
+ },
18
+ "until": {
19
+ "type": "string",
20
+ "format": "date-time",
21
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
22
+ }
23
+ },
24
+ "required": [
25
+ "submission",
26
+ "amount",
27
+ "note",
28
+ "until"
29
+ ],
30
+ "additionalProperties": false
31
+ }
@@ -0,0 +1,94 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "id": {
6
+ "type": "string",
7
+ "format": "uuid",
8
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
9
+ },
10
+ "amount": {
11
+ "type": "string"
12
+ },
13
+ "note": {
14
+ "type": "string"
15
+ },
16
+ "until": {
17
+ "type": "string"
18
+ },
19
+ "createdAt": {
20
+ "type": "string"
21
+ },
22
+ "invoice": {
23
+ "anyOf": [
24
+ {
25
+ "type": "object",
26
+ "properties": {
27
+ "id": {
28
+ "type": "string"
29
+ },
30
+ "amount": {
31
+ "type": [
32
+ "string",
33
+ "null"
34
+ ]
35
+ },
36
+ "note": {
37
+ "type": "string"
38
+ },
39
+ "filedAt": {
40
+ "type": "string"
41
+ },
42
+ "status": {
43
+ "type": "string",
44
+ "enum": [
45
+ "needs_agreement",
46
+ "refused",
47
+ "busy",
48
+ "prepared",
49
+ "waiting",
50
+ "paying",
51
+ "paid",
52
+ "failed",
53
+ "unknown",
54
+ "needs_review"
55
+ ]
56
+ },
57
+ "revisionConflict": {
58
+ "type": "boolean"
59
+ }
60
+ },
61
+ "required": [
62
+ "id",
63
+ "amount",
64
+ "note",
65
+ "filedAt",
66
+ "status",
67
+ "revisionConflict"
68
+ ],
69
+ "additionalProperties": false
70
+ },
71
+ {
72
+ "type": "null"
73
+ }
74
+ ]
75
+ },
76
+ "ready": {
77
+ "type": "boolean"
78
+ },
79
+ "unavailable": {
80
+ "type": "boolean"
81
+ }
82
+ },
83
+ "required": [
84
+ "id",
85
+ "amount",
86
+ "note",
87
+ "until",
88
+ "createdAt",
89
+ "invoice",
90
+ "ready",
91
+ "unavailable"
92
+ ],
93
+ "additionalProperties": false
94
+ }