@sphereon/ssi-sdk.pd-manager 0.34.1-feature.SSISDK.57.uni.client.205 → 0.34.1-feature.SSISDK.58.host.nonce.endpoint.145

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/dist/index.cjs CHANGED
@@ -6,6 +6,9 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
8
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
9
+ var __commonJS = (cb, mod) => function __require() {
10
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
11
+ };
9
12
  var __export = (target, all) => {
10
13
  for (var name in all)
11
14
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -28,1043 +31,1047 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
31
  ));
29
32
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
33
 
31
- // src/index.ts
32
- var index_exports = {};
33
- __export(index_exports, {
34
- PDManager: () => PDManager,
35
- pdManagerMethods: () => pdManagerMethods,
36
- schema: () => plugin_schema_default
37
- });
38
- module.exports = __toCommonJS(index_exports);
39
-
40
34
  // plugin.schema.json
41
- var plugin_schema_default = {
42
- IPDManager: {
43
- components: {
44
- schemas: {
45
- DeleteDefinitionItemArgs: {
46
- type: "object",
47
- properties: {
48
- itemId: {
49
- type: "string"
50
- }
51
- },
52
- required: ["itemId"],
53
- additionalProperties: false
54
- },
55
- DeleteDefinitionItemsArgs: {
56
- $ref: "#/components/schemas/GetDefinitionItemsArgs"
57
- },
58
- GetDefinitionItemsArgs: {
59
- type: "object",
60
- properties: {
61
- filter: {
62
- $ref: "#/components/schemas/FindDefinitionArgs"
63
- },
64
- opts: {
65
- $ref: "#/components/schemas/FetchOptions"
66
- }
67
- },
68
- additionalProperties: false
69
- },
70
- FindDefinitionArgs: {
71
- type: "array",
72
- items: {
73
- $ref: "#/components/schemas/PresentationDefinitionItemFilter"
74
- }
75
- },
76
- PresentationDefinitionItemFilter: {
77
- $ref: '#/components/schemas/Partial<Omit<PresentationDefinitionItem,("definitionPayload"|"dcqlPayload")>>'
78
- },
79
- 'Partial<Omit<PresentationDefinitionItem,("definitionPayload"|"dcqlPayload")>>': {
80
- type: "object",
81
- properties: {
82
- id: {
83
- type: "string"
84
- },
85
- definitionId: {
86
- type: "string"
87
- },
88
- tenantId: {
89
- type: "string"
90
- },
91
- version: {
92
- type: "string"
93
- },
94
- name: {
95
- type: "string"
96
- },
97
- purpose: {
98
- type: "string"
99
- },
100
- createdAt: {
101
- type: "string",
102
- format: "date-time"
103
- },
104
- lastUpdatedAt: {
105
- type: "string",
106
- format: "date-time"
107
- }
108
- },
109
- additionalProperties: false
110
- },
111
- FetchOptions: {
112
- type: "object",
113
- properties: {
114
- showVersionHistory: {
115
- type: "boolean"
116
- }
117
- },
118
- additionalProperties: false
119
- },
120
- GetDefinitionItemArgs: {
121
- type: "object",
122
- properties: {
123
- itemId: {
124
- type: "string"
125
- }
126
- },
127
- required: ["itemId"],
128
- additionalProperties: false
129
- },
130
- PresentationDefinitionItem: {
131
- type: "object",
132
- properties: {
133
- id: {
134
- type: "string"
135
- },
136
- definitionId: {
137
- type: "string"
138
- },
139
- tenantId: {
140
- type: "string"
141
- },
142
- version: {
143
- type: "string"
144
- },
145
- name: {
146
- type: "string"
147
- },
148
- purpose: {
149
- type: "string"
150
- },
151
- definitionPayload: {
152
- $ref: "#/components/schemas/IPresentationDefinition"
153
- },
154
- dcqlPayload: {
155
- $ref: "#/components/schemas/DcqlQueryREST"
156
- },
157
- createdAt: {
158
- type: "string",
159
- format: "date-time"
160
- },
161
- lastUpdatedAt: {
162
- type: "string",
163
- format: "date-time"
164
- }
165
- },
166
- required: ["id", "definitionId", "version", "definitionPayload", "createdAt", "lastUpdatedAt"],
167
- additionalProperties: false
168
- },
169
- IPresentationDefinition: {
170
- anyOf: [
171
- {
172
- $ref: "#/components/schemas/PresentationDefinitionV1"
173
- },
174
- {
175
- $ref: "#/components/schemas/PresentationDefinitionV2"
176
- }
177
- ]
178
- },
179
- PresentationDefinitionV1: {
180
- type: "object",
181
- properties: {
182
- id: {
183
- type: "string"
184
- },
185
- name: {
186
- type: "string"
187
- },
188
- purpose: {
189
- type: "string"
190
- },
191
- format: {
192
- $ref: "#/components/schemas/Format"
193
- },
194
- submission_requirements: {
195
- type: "array",
196
- items: {
197
- $ref: "#/components/schemas/SubmissionRequirement"
198
- }
199
- },
200
- input_descriptors: {
201
- type: "array",
202
- items: {
203
- $ref: "#/components/schemas/InputDescriptorV1"
204
- }
205
- }
206
- },
207
- required: ["id", "input_descriptors"],
208
- additionalProperties: false
209
- },
210
- Format: {
211
- type: "object",
212
- properties: {
213
- jwt: {
214
- $ref: "#/components/schemas/JwtObject"
215
- },
216
- jwt_vc: {
217
- $ref: "#/components/schemas/JwtObject"
218
- },
219
- jwt_vc_json: {
220
- $ref: "#/components/schemas/JwtObject"
221
- },
222
- jwt_vp: {
223
- $ref: "#/components/schemas/JwtObject"
224
- },
225
- jwt_vp_json: {
226
- $ref: "#/components/schemas/JwtObject"
227
- },
228
- ldp: {
229
- $ref: "#/components/schemas/LdpObject"
230
- },
231
- ldp_vc: {
232
- $ref: "#/components/schemas/LdpObject"
233
- },
234
- ldp_vp: {
235
- $ref: "#/components/schemas/LdpObject"
236
- },
237
- di: {
238
- $ref: "#/components/schemas/DiObject"
239
- },
240
- di_vc: {
241
- $ref: "#/components/schemas/DiObject"
242
- },
243
- di_vp: {
244
- $ref: "#/components/schemas/DiObject"
245
- },
246
- "dc+sd-jwt": {
247
- $ref: "#/components/schemas/SdJwtObject"
248
- },
249
- mso_mdoc: {
250
- $ref: "#/components/schemas/MsoMdocObject"
251
- }
252
- },
253
- additionalProperties: false
254
- },
255
- JwtObject: {
256
- type: "object",
257
- properties: {
258
- alg: {
259
- type: "array",
260
- items: {
261
- type: "string"
262
- }
263
- }
264
- },
265
- required: ["alg"],
266
- additionalProperties: false
267
- },
268
- LdpObject: {
269
- type: "object",
270
- properties: {
271
- proof_type: {
35
+ var require_plugin_schema = __commonJS({
36
+ "plugin.schema.json"(exports, module2) {
37
+ module2.exports = {
38
+ IPDManager: {
39
+ components: {
40
+ schemas: {
41
+ DeleteDefinitionItemArgs: {
42
+ type: "object",
43
+ properties: {
44
+ itemId: {
45
+ type: "string"
46
+ }
47
+ },
48
+ required: ["itemId"],
49
+ additionalProperties: false
50
+ },
51
+ DeleteDefinitionItemsArgs: {
52
+ $ref: "#/components/schemas/GetDefinitionItemsArgs"
53
+ },
54
+ GetDefinitionItemsArgs: {
55
+ type: "object",
56
+ properties: {
57
+ filter: {
58
+ $ref: "#/components/schemas/FindDefinitionArgs"
59
+ },
60
+ opts: {
61
+ $ref: "#/components/schemas/FetchOptions"
62
+ }
63
+ },
64
+ additionalProperties: false
65
+ },
66
+ FindDefinitionArgs: {
272
67
  type: "array",
273
68
  items: {
274
- type: "string"
69
+ $ref: "#/components/schemas/PresentationDefinitionItemFilter"
275
70
  }
276
- }
277
- },
278
- required: ["proof_type"],
279
- additionalProperties: false
280
- },
281
- DiObject: {
282
- type: "object",
283
- properties: {
284
- proof_type: {
285
- type: "array",
286
- items: {
287
- type: "string"
288
- }
289
- },
290
- cryptosuite: {
291
- type: "array",
292
- items: {
293
- type: "string"
294
- }
295
- }
296
- },
297
- required: ["proof_type", "cryptosuite"],
298
- additionalProperties: false
299
- },
300
- SdJwtObject: {
301
- type: "object",
302
- properties: {
303
- "sd-jwt_alg_values": {
304
- type: "array",
305
- items: {
306
- type: "string"
307
- }
308
- },
309
- "kb-jwt_alg_values": {
310
- type: "array",
311
- items: {
312
- type: "string"
313
- }
314
- }
315
- },
316
- additionalProperties: false
317
- },
318
- MsoMdocObject: {
319
- type: "object",
320
- properties: {
321
- alg: {
322
- type: "array",
323
- items: {
324
- type: "string"
325
- }
326
- }
327
- },
328
- required: ["alg"],
329
- additionalProperties: false
330
- },
331
- SubmissionRequirement: {
332
- type: "object",
333
- properties: {
334
- name: {
335
- type: "string"
336
- },
337
- purpose: {
338
- type: "string"
339
- },
340
- rule: {
341
- $ref: "#/components/schemas/Rules"
342
- },
343
- count: {
344
- type: "number"
345
- },
346
- min: {
347
- type: "number"
348
- },
349
- max: {
350
- type: "number"
351
- },
352
- from: {
353
- type: "string"
354
- },
355
- from_nested: {
356
- type: "array",
357
- items: {
358
- $ref: "#/components/schemas/SubmissionRequirement"
359
- }
360
- }
361
- },
362
- required: ["rule"],
363
- additionalProperties: false
364
- },
365
- Rules: {
366
- type: "string",
367
- enum: ["all", "pick"]
368
- },
369
- InputDescriptorV1: {
370
- type: "object",
371
- properties: {
372
- id: {
373
- type: "string"
374
- },
375
- name: {
376
- type: "string"
377
- },
378
- purpose: {
379
- type: "string"
380
- },
381
- group: {
382
- type: "array",
383
- items: {
384
- type: "string"
385
- }
386
- },
387
- schema: {
388
- type: "array",
389
- items: {
390
- $ref: "#/components/schemas/Schema"
391
- }
392
- },
393
- issuance: {
394
- type: "array",
395
- items: {
396
- $ref: "#/components/schemas/Issuance"
397
- }
398
- },
399
- constraints: {
400
- $ref: "#/components/schemas/ConstraintsV1"
401
- }
402
- },
403
- required: ["id", "schema"],
404
- additionalProperties: false
405
- },
406
- Schema: {
407
- type: "object",
408
- properties: {
409
- uri: {
410
- type: "string"
411
- },
412
- required: {
413
- type: "boolean"
414
- }
415
- },
416
- required: ["uri"],
417
- additionalProperties: false
418
- },
419
- Issuance: {
420
- type: "object",
421
- properties: {
422
- manifest: {
423
- type: "string"
424
- }
425
- },
426
- additionalProperties: {}
427
- },
428
- ConstraintsV1: {
429
- type: "object",
430
- properties: {
431
- limit_disclosure: {
432
- $ref: "#/components/schemas/Optionality"
433
- },
434
- statuses: {
435
- $ref: "#/components/schemas/Statuses"
436
- },
437
- fields: {
438
- type: "array",
439
- items: {
440
- $ref: "#/components/schemas/FieldV1"
441
- }
442
- },
443
- subject_is_issuer: {
444
- $ref: "#/components/schemas/Optionality"
445
- },
446
- is_holder: {
447
- type: "array",
448
- items: {
449
- $ref: "#/components/schemas/HolderSubject"
450
- }
451
- },
452
- same_subject: {
453
- type: "array",
454
- items: {
455
- $ref: "#/components/schemas/HolderSubject"
456
- }
457
- }
458
- },
459
- additionalProperties: false
460
- },
461
- Optionality: {
462
- type: "string",
463
- enum: ["required", "preferred"]
464
- },
465
- Statuses: {
466
- type: "object",
467
- properties: {
468
- active: {
469
- $ref: "#/components/schemas/PdStatus"
470
- },
471
- suspended: {
472
- $ref: "#/components/schemas/PdStatus"
473
- },
474
- revoked: {
475
- $ref: "#/components/schemas/PdStatus"
476
- }
477
- },
478
- additionalProperties: false
479
- },
480
- PdStatus: {
481
- type: "object",
482
- properties: {
483
- directive: {
484
- $ref: "#/components/schemas/Directives"
485
- }
486
- },
487
- additionalProperties: false
488
- },
489
- Directives: {
490
- type: "string",
491
- enum: ["required", "allowed", "disallowed"]
492
- },
493
- FieldV1: {
494
- type: "object",
495
- properties: {
496
- id: {
497
- type: "string"
498
- },
499
- path: {
500
- type: "array",
501
- items: {
502
- type: "string"
503
- }
504
- },
505
- purpose: {
506
- type: "string"
507
- },
508
- filter: {
509
- $ref: "#/components/schemas/FilterV1"
510
- },
511
- predicate: {
512
- $ref: "#/components/schemas/Optionality"
513
- }
514
- },
515
- required: ["path"],
516
- additionalProperties: false
517
- },
518
- FilterV1: {
519
- type: "object",
520
- properties: {
521
- const: {
522
- $ref: "#/components/schemas/OneOfNumberStringBoolean"
523
- },
524
- enum: {
525
- type: "array",
526
- items: {
527
- $ref: "#/components/schemas/OneOfNumberStringBoolean"
528
- }
529
- },
530
- exclusiveMinimum: {
531
- $ref: "#/components/schemas/OneOfNumberString"
532
- },
533
- exclusiveMaximum: {
534
- $ref: "#/components/schemas/OneOfNumberString"
535
- },
536
- format: {
537
- type: "string"
538
- },
539
- minLength: {
540
- type: "number"
541
71
  },
542
- maxLength: {
543
- type: "number"
544
- },
545
- minimum: {
546
- $ref: "#/components/schemas/OneOfNumberString"
547
- },
548
- maximum: {
549
- $ref: "#/components/schemas/OneOfNumberString"
550
- },
551
- not: {
72
+ PresentationDefinitionItemFilter: {
73
+ $ref: '#/components/schemas/Partial<Omit<PresentationDefinitionItem,("definitionPayload"|"dcqlPayload")>>'
74
+ },
75
+ 'Partial<Omit<PresentationDefinitionItem,("definitionPayload"|"dcqlPayload")>>': {
76
+ type: "object",
77
+ properties: {
78
+ id: {
79
+ type: "string"
80
+ },
81
+ definitionId: {
82
+ type: "string"
83
+ },
84
+ tenantId: {
85
+ type: "string"
86
+ },
87
+ version: {
88
+ type: "string"
89
+ },
90
+ name: {
91
+ type: "string"
92
+ },
93
+ purpose: {
94
+ type: "string"
95
+ },
96
+ createdAt: {
97
+ type: "string",
98
+ format: "date-time"
99
+ },
100
+ lastUpdatedAt: {
101
+ type: "string",
102
+ format: "date-time"
103
+ }
104
+ },
105
+ additionalProperties: false
106
+ },
107
+ FetchOptions: {
108
+ type: "object",
109
+ properties: {
110
+ showVersionHistory: {
111
+ type: "boolean"
112
+ }
113
+ },
114
+ additionalProperties: false
115
+ },
116
+ GetDefinitionItemArgs: {
117
+ type: "object",
118
+ properties: {
119
+ itemId: {
120
+ type: "string"
121
+ }
122
+ },
123
+ required: ["itemId"],
124
+ additionalProperties: false
125
+ },
126
+ PresentationDefinitionItem: {
127
+ type: "object",
128
+ properties: {
129
+ id: {
130
+ type: "string"
131
+ },
132
+ definitionId: {
133
+ type: "string"
134
+ },
135
+ tenantId: {
136
+ type: "string"
137
+ },
138
+ version: {
139
+ type: "string"
140
+ },
141
+ name: {
142
+ type: "string"
143
+ },
144
+ purpose: {
145
+ type: "string"
146
+ },
147
+ definitionPayload: {
148
+ $ref: "#/components/schemas/IPresentationDefinition"
149
+ },
150
+ dcqlPayload: {
151
+ $ref: "#/components/schemas/DcqlQueryREST"
152
+ },
153
+ createdAt: {
154
+ type: "string",
155
+ format: "date-time"
156
+ },
157
+ lastUpdatedAt: {
158
+ type: "string",
159
+ format: "date-time"
160
+ }
161
+ },
162
+ required: ["id", "definitionId", "version", "definitionPayload", "createdAt", "lastUpdatedAt"],
163
+ additionalProperties: false
164
+ },
165
+ IPresentationDefinition: {
166
+ anyOf: [
167
+ {
168
+ $ref: "#/components/schemas/PresentationDefinitionV1"
169
+ },
170
+ {
171
+ $ref: "#/components/schemas/PresentationDefinitionV2"
172
+ }
173
+ ]
174
+ },
175
+ PresentationDefinitionV1: {
176
+ type: "object",
177
+ properties: {
178
+ id: {
179
+ type: "string"
180
+ },
181
+ name: {
182
+ type: "string"
183
+ },
184
+ purpose: {
185
+ type: "string"
186
+ },
187
+ format: {
188
+ $ref: "#/components/schemas/Format"
189
+ },
190
+ submission_requirements: {
191
+ type: "array",
192
+ items: {
193
+ $ref: "#/components/schemas/SubmissionRequirement"
194
+ }
195
+ },
196
+ input_descriptors: {
197
+ type: "array",
198
+ items: {
199
+ $ref: "#/components/schemas/InputDescriptorV1"
200
+ }
201
+ }
202
+ },
203
+ required: ["id", "input_descriptors"],
204
+ additionalProperties: false
205
+ },
206
+ Format: {
207
+ type: "object",
208
+ properties: {
209
+ jwt: {
210
+ $ref: "#/components/schemas/JwtObject"
211
+ },
212
+ jwt_vc: {
213
+ $ref: "#/components/schemas/JwtObject"
214
+ },
215
+ jwt_vc_json: {
216
+ $ref: "#/components/schemas/JwtObject"
217
+ },
218
+ jwt_vp: {
219
+ $ref: "#/components/schemas/JwtObject"
220
+ },
221
+ jwt_vp_json: {
222
+ $ref: "#/components/schemas/JwtObject"
223
+ },
224
+ ldp: {
225
+ $ref: "#/components/schemas/LdpObject"
226
+ },
227
+ ldp_vc: {
228
+ $ref: "#/components/schemas/LdpObject"
229
+ },
230
+ ldp_vp: {
231
+ $ref: "#/components/schemas/LdpObject"
232
+ },
233
+ di: {
234
+ $ref: "#/components/schemas/DiObject"
235
+ },
236
+ di_vc: {
237
+ $ref: "#/components/schemas/DiObject"
238
+ },
239
+ di_vp: {
240
+ $ref: "#/components/schemas/DiObject"
241
+ },
242
+ "dc+sd-jwt": {
243
+ $ref: "#/components/schemas/SdJwtObject"
244
+ },
245
+ mso_mdoc: {
246
+ $ref: "#/components/schemas/MsoMdocObject"
247
+ }
248
+ },
249
+ additionalProperties: false
250
+ },
251
+ JwtObject: {
252
+ type: "object",
253
+ properties: {
254
+ alg: {
255
+ type: "array",
256
+ items: {
257
+ type: "string"
258
+ }
259
+ }
260
+ },
261
+ required: ["alg"],
262
+ additionalProperties: false
263
+ },
264
+ LdpObject: {
265
+ type: "object",
266
+ properties: {
267
+ proof_type: {
268
+ type: "array",
269
+ items: {
270
+ type: "string"
271
+ }
272
+ }
273
+ },
274
+ required: ["proof_type"],
275
+ additionalProperties: false
276
+ },
277
+ DiObject: {
278
+ type: "object",
279
+ properties: {
280
+ proof_type: {
281
+ type: "array",
282
+ items: {
283
+ type: "string"
284
+ }
285
+ },
286
+ cryptosuite: {
287
+ type: "array",
288
+ items: {
289
+ type: "string"
290
+ }
291
+ }
292
+ },
293
+ required: ["proof_type", "cryptosuite"],
294
+ additionalProperties: false
295
+ },
296
+ SdJwtObject: {
297
+ type: "object",
298
+ properties: {
299
+ "sd-jwt_alg_values": {
300
+ type: "array",
301
+ items: {
302
+ type: "string"
303
+ }
304
+ },
305
+ "kb-jwt_alg_values": {
306
+ type: "array",
307
+ items: {
308
+ type: "string"
309
+ }
310
+ }
311
+ },
312
+ additionalProperties: false
313
+ },
314
+ MsoMdocObject: {
315
+ type: "object",
316
+ properties: {
317
+ alg: {
318
+ type: "array",
319
+ items: {
320
+ type: "string"
321
+ }
322
+ }
323
+ },
324
+ required: ["alg"],
325
+ additionalProperties: false
326
+ },
327
+ SubmissionRequirement: {
328
+ type: "object",
329
+ properties: {
330
+ name: {
331
+ type: "string"
332
+ },
333
+ purpose: {
334
+ type: "string"
335
+ },
336
+ rule: {
337
+ $ref: "#/components/schemas/Rules"
338
+ },
339
+ count: {
340
+ type: "number"
341
+ },
342
+ min: {
343
+ type: "number"
344
+ },
345
+ max: {
346
+ type: "number"
347
+ },
348
+ from: {
349
+ type: "string"
350
+ },
351
+ from_nested: {
352
+ type: "array",
353
+ items: {
354
+ $ref: "#/components/schemas/SubmissionRequirement"
355
+ }
356
+ }
357
+ },
358
+ required: ["rule"],
359
+ additionalProperties: false
360
+ },
361
+ Rules: {
362
+ type: "string",
363
+ enum: ["all", "pick"]
364
+ },
365
+ InputDescriptorV1: {
366
+ type: "object",
367
+ properties: {
368
+ id: {
369
+ type: "string"
370
+ },
371
+ name: {
372
+ type: "string"
373
+ },
374
+ purpose: {
375
+ type: "string"
376
+ },
377
+ group: {
378
+ type: "array",
379
+ items: {
380
+ type: "string"
381
+ }
382
+ },
383
+ schema: {
384
+ type: "array",
385
+ items: {
386
+ $ref: "#/components/schemas/Schema"
387
+ }
388
+ },
389
+ issuance: {
390
+ type: "array",
391
+ items: {
392
+ $ref: "#/components/schemas/Issuance"
393
+ }
394
+ },
395
+ constraints: {
396
+ $ref: "#/components/schemas/ConstraintsV1"
397
+ }
398
+ },
399
+ required: ["id", "schema"],
400
+ additionalProperties: false
401
+ },
402
+ Schema: {
403
+ type: "object",
404
+ properties: {
405
+ uri: {
406
+ type: "string"
407
+ },
408
+ required: {
409
+ type: "boolean"
410
+ }
411
+ },
412
+ required: ["uri"],
413
+ additionalProperties: false
414
+ },
415
+ Issuance: {
416
+ type: "object",
417
+ properties: {
418
+ manifest: {
419
+ type: "string"
420
+ }
421
+ },
422
+ additionalProperties: {}
423
+ },
424
+ ConstraintsV1: {
425
+ type: "object",
426
+ properties: {
427
+ limit_disclosure: {
428
+ $ref: "#/components/schemas/Optionality"
429
+ },
430
+ statuses: {
431
+ $ref: "#/components/schemas/Statuses"
432
+ },
433
+ fields: {
434
+ type: "array",
435
+ items: {
436
+ $ref: "#/components/schemas/FieldV1"
437
+ }
438
+ },
439
+ subject_is_issuer: {
440
+ $ref: "#/components/schemas/Optionality"
441
+ },
442
+ is_holder: {
443
+ type: "array",
444
+ items: {
445
+ $ref: "#/components/schemas/HolderSubject"
446
+ }
447
+ },
448
+ same_subject: {
449
+ type: "array",
450
+ items: {
451
+ $ref: "#/components/schemas/HolderSubject"
452
+ }
453
+ }
454
+ },
455
+ additionalProperties: false
456
+ },
457
+ Optionality: {
458
+ type: "string",
459
+ enum: ["required", "preferred"]
460
+ },
461
+ Statuses: {
462
+ type: "object",
463
+ properties: {
464
+ active: {
465
+ $ref: "#/components/schemas/PdStatus"
466
+ },
467
+ suspended: {
468
+ $ref: "#/components/schemas/PdStatus"
469
+ },
470
+ revoked: {
471
+ $ref: "#/components/schemas/PdStatus"
472
+ }
473
+ },
474
+ additionalProperties: false
475
+ },
476
+ PdStatus: {
477
+ type: "object",
478
+ properties: {
479
+ directive: {
480
+ $ref: "#/components/schemas/Directives"
481
+ }
482
+ },
483
+ additionalProperties: false
484
+ },
485
+ Directives: {
486
+ type: "string",
487
+ enum: ["required", "allowed", "disallowed"]
488
+ },
489
+ FieldV1: {
490
+ type: "object",
491
+ properties: {
492
+ id: {
493
+ type: "string"
494
+ },
495
+ path: {
496
+ type: "array",
497
+ items: {
498
+ type: "string"
499
+ }
500
+ },
501
+ purpose: {
502
+ type: "string"
503
+ },
504
+ filter: {
505
+ $ref: "#/components/schemas/FilterV1"
506
+ },
507
+ predicate: {
508
+ $ref: "#/components/schemas/Optionality"
509
+ }
510
+ },
511
+ required: ["path"],
512
+ additionalProperties: false
513
+ },
514
+ FilterV1: {
515
+ type: "object",
516
+ properties: {
517
+ const: {
518
+ $ref: "#/components/schemas/OneOfNumberStringBoolean"
519
+ },
520
+ enum: {
521
+ type: "array",
522
+ items: {
523
+ $ref: "#/components/schemas/OneOfNumberStringBoolean"
524
+ }
525
+ },
526
+ exclusiveMinimum: {
527
+ $ref: "#/components/schemas/OneOfNumberString"
528
+ },
529
+ exclusiveMaximum: {
530
+ $ref: "#/components/schemas/OneOfNumberString"
531
+ },
532
+ format: {
533
+ type: "string"
534
+ },
535
+ minLength: {
536
+ type: "number"
537
+ },
538
+ maxLength: {
539
+ type: "number"
540
+ },
541
+ minimum: {
542
+ $ref: "#/components/schemas/OneOfNumberString"
543
+ },
544
+ maximum: {
545
+ $ref: "#/components/schemas/OneOfNumberString"
546
+ },
547
+ not: {
548
+ type: "object"
549
+ },
550
+ pattern: {
551
+ type: "string"
552
+ },
553
+ type: {
554
+ type: "string"
555
+ }
556
+ },
557
+ additionalProperties: false
558
+ },
559
+ OneOfNumberStringBoolean: {
560
+ type: ["boolean", "number", "string"]
561
+ },
562
+ OneOfNumberString: {
563
+ type: ["number", "string"]
564
+ },
565
+ HolderSubject: {
566
+ type: "object",
567
+ properties: {
568
+ field_id: {
569
+ type: "array",
570
+ items: {
571
+ type: "string"
572
+ }
573
+ },
574
+ directive: {
575
+ $ref: "#/components/schemas/Optionality"
576
+ }
577
+ },
578
+ required: ["field_id", "directive"],
579
+ additionalProperties: false
580
+ },
581
+ PresentationDefinitionV2: {
582
+ type: "object",
583
+ properties: {
584
+ id: {
585
+ type: "string"
586
+ },
587
+ name: {
588
+ type: "string"
589
+ },
590
+ purpose: {
591
+ type: "string"
592
+ },
593
+ format: {
594
+ $ref: "#/components/schemas/Format"
595
+ },
596
+ submission_requirements: {
597
+ type: "array",
598
+ items: {
599
+ $ref: "#/components/schemas/SubmissionRequirement"
600
+ }
601
+ },
602
+ input_descriptors: {
603
+ type: "array",
604
+ items: {
605
+ $ref: "#/components/schemas/InputDescriptorV2"
606
+ }
607
+ },
608
+ frame: {
609
+ type: "object"
610
+ }
611
+ },
612
+ required: ["id", "input_descriptors"],
613
+ additionalProperties: false
614
+ },
615
+ InputDescriptorV2: {
616
+ type: "object",
617
+ properties: {
618
+ id: {
619
+ type: "string"
620
+ },
621
+ name: {
622
+ type: "string"
623
+ },
624
+ purpose: {
625
+ type: "string"
626
+ },
627
+ format: {
628
+ $ref: "#/components/schemas/Format"
629
+ },
630
+ group: {
631
+ type: "array",
632
+ items: {
633
+ type: "string"
634
+ }
635
+ },
636
+ issuance: {
637
+ type: "array",
638
+ items: {
639
+ $ref: "#/components/schemas/Issuance"
640
+ }
641
+ },
642
+ constraints: {
643
+ $ref: "#/components/schemas/ConstraintsV2"
644
+ }
645
+ },
646
+ required: ["id", "constraints"],
647
+ additionalProperties: false
648
+ },
649
+ ConstraintsV2: {
650
+ type: "object",
651
+ properties: {
652
+ limit_disclosure: {
653
+ $ref: "#/components/schemas/Optionality"
654
+ },
655
+ statuses: {
656
+ $ref: "#/components/schemas/Statuses"
657
+ },
658
+ fields: {
659
+ type: "array",
660
+ items: {
661
+ $ref: "#/components/schemas/FieldV2"
662
+ }
663
+ },
664
+ subject_is_issuer: {
665
+ $ref: "#/components/schemas/Optionality"
666
+ },
667
+ is_holder: {
668
+ type: "array",
669
+ items: {
670
+ $ref: "#/components/schemas/HolderSubject"
671
+ }
672
+ },
673
+ same_subject: {
674
+ type: "array",
675
+ items: {
676
+ $ref: "#/components/schemas/HolderSubject"
677
+ }
678
+ }
679
+ },
680
+ additionalProperties: false
681
+ },
682
+ FieldV2: {
683
+ type: "object",
684
+ properties: {
685
+ id: {
686
+ type: "string"
687
+ },
688
+ path: {
689
+ type: "array",
690
+ items: {
691
+ type: "string"
692
+ }
693
+ },
694
+ purpose: {
695
+ type: "string"
696
+ },
697
+ filter: {
698
+ $ref: "#/components/schemas/FilterV2"
699
+ },
700
+ predicate: {
701
+ $ref: "#/components/schemas/Optionality"
702
+ },
703
+ intent_to_retain: {
704
+ type: "boolean"
705
+ },
706
+ name: {
707
+ type: "string"
708
+ },
709
+ optional: {
710
+ type: "boolean"
711
+ }
712
+ },
713
+ required: ["path"],
714
+ additionalProperties: false
715
+ },
716
+ FilterV2: {
717
+ type: "object",
718
+ properties: {
719
+ const: {
720
+ $ref: "#/components/schemas/OneOfNumberStringBoolean"
721
+ },
722
+ enum: {
723
+ type: "array",
724
+ items: {
725
+ $ref: "#/components/schemas/OneOfNumberStringBoolean"
726
+ }
727
+ },
728
+ exclusiveMinimum: {
729
+ $ref: "#/components/schemas/OneOfNumberString"
730
+ },
731
+ exclusiveMaximum: {
732
+ $ref: "#/components/schemas/OneOfNumberString"
733
+ },
734
+ format: {
735
+ type: "string"
736
+ },
737
+ formatMaximum: {
738
+ type: "string"
739
+ },
740
+ formatMinimum: {
741
+ type: "string"
742
+ },
743
+ formatExclusiveMaximum: {
744
+ type: "string"
745
+ },
746
+ formatExclusiveMinimum: {
747
+ type: "string"
748
+ },
749
+ minLength: {
750
+ type: "number"
751
+ },
752
+ maxLength: {
753
+ type: "number"
754
+ },
755
+ minimum: {
756
+ $ref: "#/components/schemas/OneOfNumberString"
757
+ },
758
+ maximum: {
759
+ $ref: "#/components/schemas/OneOfNumberString"
760
+ },
761
+ not: {
762
+ type: "object"
763
+ },
764
+ pattern: {
765
+ type: "string"
766
+ },
767
+ type: {
768
+ type: "string"
769
+ },
770
+ contains: {
771
+ $ref: "#/components/schemas/FilterV2"
772
+ },
773
+ items: {
774
+ $ref: "#/components/schemas/FilterV2Items"
775
+ }
776
+ },
777
+ additionalProperties: false
778
+ },
779
+ FilterV2Items: {
780
+ type: "object",
781
+ properties: {
782
+ const: {
783
+ $ref: "#/components/schemas/OneOfNumberStringBoolean"
784
+ },
785
+ enum: {
786
+ type: "array",
787
+ items: {
788
+ $ref: "#/components/schemas/OneOfNumberStringBoolean"
789
+ }
790
+ },
791
+ exclusiveMinimum: {
792
+ $ref: "#/components/schemas/OneOfNumberString"
793
+ },
794
+ exclusiveMaximum: {
795
+ $ref: "#/components/schemas/OneOfNumberString"
796
+ },
797
+ format: {
798
+ type: "string"
799
+ },
800
+ formatMaximum: {
801
+ type: "string"
802
+ },
803
+ formatMinimum: {
804
+ type: "string"
805
+ },
806
+ formatExclusiveMaximum: {
807
+ type: "string"
808
+ },
809
+ formatExclusiveMinimum: {
810
+ type: "string"
811
+ },
812
+ minLength: {
813
+ type: "number"
814
+ },
815
+ maxLength: {
816
+ type: "number"
817
+ },
818
+ minimum: {
819
+ $ref: "#/components/schemas/OneOfNumberString"
820
+ },
821
+ maximum: {
822
+ $ref: "#/components/schemas/OneOfNumberString"
823
+ },
824
+ not: {
825
+ type: "object"
826
+ },
827
+ pattern: {
828
+ type: "string"
829
+ },
830
+ type: {
831
+ type: "string"
832
+ },
833
+ contains: {
834
+ $ref: "#/components/schemas/FilterV2"
835
+ },
836
+ items: {
837
+ $ref: "#/components/schemas/FilterV2Items"
838
+ }
839
+ },
840
+ additionalProperties: false
841
+ },
842
+ DcqlQueryREST: {
843
+ type: "object",
844
+ properties: {
845
+ credentials: {
846
+ type: "array",
847
+ items: {
848
+ $ref: "#/components/schemas/DcqlCredentialQuery"
849
+ }
850
+ }
851
+ },
852
+ required: ["credentials"],
853
+ additionalProperties: false
854
+ },
855
+ DcqlCredentialQuery: {
856
+ type: "object",
857
+ properties: {
858
+ id: {
859
+ type: "string"
860
+ },
861
+ format: {
862
+ type: "string"
863
+ },
864
+ alg: {
865
+ type: "array",
866
+ items: {
867
+ type: "string"
868
+ }
869
+ },
870
+ claims: {
871
+ type: "array",
872
+ items: {
873
+ $ref: "#/components/schemas/DcqlClaim"
874
+ }
875
+ },
876
+ meta: {
877
+ $ref: "#/components/schemas/Record<string,any>"
878
+ }
879
+ },
880
+ required: ["id", "format", "claims"],
881
+ additionalProperties: false
882
+ },
883
+ DcqlClaim: {
884
+ type: "object",
885
+ properties: {
886
+ namespace: {
887
+ type: "string"
888
+ },
889
+ claim_name: {
890
+ type: "string"
891
+ },
892
+ filter: {
893
+ $ref: "#/components/schemas/DcqlFilter"
894
+ }
895
+ },
896
+ required: ["namespace", "claim_name"],
897
+ additionalProperties: false
898
+ },
899
+ DcqlFilter: {
900
+ type: "object",
901
+ properties: {
902
+ type: {
903
+ type: "string",
904
+ enum: ["string", "number", "boolean"]
905
+ },
906
+ pattern: {
907
+ type: "string"
908
+ },
909
+ minimum: {
910
+ type: "number"
911
+ },
912
+ maximum: {
913
+ type: "number"
914
+ }
915
+ },
916
+ required: ["type"],
917
+ additionalProperties: false
918
+ },
919
+ "Record<string,any>": {
552
920
  type: "object"
553
921
  },
554
- pattern: {
555
- type: "string"
556
- },
557
- type: {
558
- type: "string"
559
- }
560
- },
561
- additionalProperties: false
562
- },
563
- OneOfNumberStringBoolean: {
564
- type: ["boolean", "number", "string"]
565
- },
566
- OneOfNumberString: {
567
- type: ["number", "string"]
568
- },
569
- HolderSubject: {
570
- type: "object",
571
- properties: {
572
- field_id: {
573
- type: "array",
574
- items: {
575
- type: "string"
576
- }
577
- },
578
- directive: {
579
- $ref: "#/components/schemas/Optionality"
580
- }
581
- },
582
- required: ["field_id", "directive"],
583
- additionalProperties: false
584
- },
585
- PresentationDefinitionV2: {
586
- type: "object",
587
- properties: {
588
- id: {
589
- type: "string"
590
- },
591
- name: {
592
- type: "string"
593
- },
594
- purpose: {
595
- type: "string"
596
- },
597
- format: {
598
- $ref: "#/components/schemas/Format"
599
- },
600
- submission_requirements: {
601
- type: "array",
602
- items: {
603
- $ref: "#/components/schemas/SubmissionRequirement"
604
- }
605
- },
606
- input_descriptors: {
607
- type: "array",
608
- items: {
609
- $ref: "#/components/schemas/InputDescriptorV2"
610
- }
922
+ HasDefinitionItemArgs: {
923
+ $ref: "#/components/schemas/GetDefinitionItemArgs"
924
+ },
925
+ HasDefinitionItemsArgs: {
926
+ $ref: "#/components/schemas/GetDefinitionItemsArgs"
927
+ },
928
+ PersistDefinitionArgs: {
929
+ type: "object",
930
+ properties: {
931
+ definitionItem: {
932
+ $ref: "#/components/schemas/PersistPresentationDefinitionItem"
933
+ },
934
+ opts: {
935
+ $ref: "#/components/schemas/PersistOptions"
936
+ }
937
+ },
938
+ required: ["definitionItem"],
939
+ additionalProperties: false
940
+ },
941
+ PersistPresentationDefinitionItem: {
942
+ type: "object",
943
+ additionalProperties: false,
944
+ properties: {
945
+ id: {
946
+ type: "string"
947
+ },
948
+ definitionId: {
949
+ type: "string"
950
+ },
951
+ version: {
952
+ type: "string"
953
+ },
954
+ tenantId: {
955
+ type: "string"
956
+ },
957
+ name: {
958
+ type: "string"
959
+ },
960
+ purpose: {
961
+ type: "string"
962
+ },
963
+ definitionPayload: {
964
+ $ref: "#/components/schemas/IPresentationDefinition"
965
+ },
966
+ dcqlPayload: {
967
+ $ref: "#/components/schemas/DcqlQueryREST"
968
+ }
969
+ },
970
+ required: ["definitionPayload"]
971
+ },
972
+ PersistOptions: {
973
+ type: "object",
974
+ properties: {
975
+ versionControlMode: {
976
+ $ref: "#/components/schemas/VersionControlMode"
977
+ },
978
+ versionIncrementReleaseType: {
979
+ $ref: "#/components/schemas/ReleaseType"
980
+ }
981
+ },
982
+ additionalProperties: false
983
+ },
984
+ VersionControlMode: {
985
+ type: "string",
986
+ enum: ["AutoIncrement", "Manual", "Overwrite", "OverwriteLatest"]
611
987
  },
612
- frame: {
613
- type: "object"
988
+ ReleaseType: {
989
+ type: "string",
990
+ enum: ["major", "premajor", "minor", "preminor", "patch", "prepatch", "prerelease", "release"]
614
991
  }
615
992
  },
616
- required: ["id", "input_descriptors"],
617
- additionalProperties: false
618
- },
619
- InputDescriptorV2: {
620
- type: "object",
621
- properties: {
622
- id: {
623
- type: "string"
624
- },
625
- name: {
626
- type: "string"
627
- },
628
- purpose: {
629
- type: "string"
630
- },
631
- format: {
632
- $ref: "#/components/schemas/Format"
633
- },
634
- group: {
635
- type: "array",
636
- items: {
637
- type: "string"
993
+ methods: {
994
+ pdmDeleteDefinition: {
995
+ description: "Delete a single presentation definition records by primary key",
996
+ arguments: {
997
+ $ref: "#/components/schemas/DeleteDefinitionItemArgs"
998
+ },
999
+ returnType: {
1000
+ type: "boolean"
638
1001
  }
639
1002
  },
640
- issuance: {
641
- type: "array",
642
- items: {
643
- $ref: "#/components/schemas/Issuance"
1003
+ pdmDeleteDefinitions: {
1004
+ description: "Delete multiple presentation definitions records using filters",
1005
+ arguments: {
1006
+ $ref: "#/components/schemas/DeleteDefinitionItemsArgs"
1007
+ },
1008
+ returnType: {
1009
+ type: "number"
644
1010
  }
645
1011
  },
646
- constraints: {
647
- $ref: "#/components/schemas/ConstraintsV2"
648
- }
649
- },
650
- required: ["id", "constraints"],
651
- additionalProperties: false
652
- },
653
- ConstraintsV2: {
654
- type: "object",
655
- properties: {
656
- limit_disclosure: {
657
- $ref: "#/components/schemas/Optionality"
658
- },
659
- statuses: {
660
- $ref: "#/components/schemas/Statuses"
661
- },
662
- fields: {
663
- type: "array",
664
- items: {
665
- $ref: "#/components/schemas/FieldV2"
1012
+ pdmGetDefinition: {
1013
+ description: "Get a single presentation definition records by primary key",
1014
+ arguments: {
1015
+ $ref: "#/components/schemas/GetDefinitionItemArgs"
1016
+ },
1017
+ returnType: {
1018
+ $ref: "#/components/schemas/PresentationDefinitionItem"
666
1019
  }
667
1020
  },
668
- subject_is_issuer: {
669
- $ref: "#/components/schemas/Optionality"
670
- },
671
- is_holder: {
672
- type: "array",
673
- items: {
674
- $ref: "#/components/schemas/HolderSubject"
675
- }
676
- },
677
- same_subject: {
678
- type: "array",
679
- items: {
680
- $ref: "#/components/schemas/HolderSubject"
681
- }
682
- }
683
- },
684
- additionalProperties: false
685
- },
686
- FieldV2: {
687
- type: "object",
688
- properties: {
689
- id: {
690
- type: "string"
691
- },
692
- path: {
693
- type: "array",
694
- items: {
695
- type: "string"
696
- }
697
- },
698
- purpose: {
699
- type: "string"
700
- },
701
- filter: {
702
- $ref: "#/components/schemas/FilterV2"
703
- },
704
- predicate: {
705
- $ref: "#/components/schemas/Optionality"
706
- },
707
- intent_to_retain: {
708
- type: "boolean"
709
- },
710
- name: {
711
- type: "string"
712
- },
713
- optional: {
714
- type: "boolean"
715
- }
716
- },
717
- required: ["path"],
718
- additionalProperties: false
719
- },
720
- FilterV2: {
721
- type: "object",
722
- properties: {
723
- const: {
724
- $ref: "#/components/schemas/OneOfNumberStringBoolean"
725
- },
726
- enum: {
727
- type: "array",
728
- items: {
729
- $ref: "#/components/schemas/OneOfNumberStringBoolean"
730
- }
731
- },
732
- exclusiveMinimum: {
733
- $ref: "#/components/schemas/OneOfNumberString"
734
- },
735
- exclusiveMaximum: {
736
- $ref: "#/components/schemas/OneOfNumberString"
737
- },
738
- format: {
739
- type: "string"
740
- },
741
- formatMaximum: {
742
- type: "string"
743
- },
744
- formatMinimum: {
745
- type: "string"
746
- },
747
- formatExclusiveMaximum: {
748
- type: "string"
749
- },
750
- formatExclusiveMinimum: {
751
- type: "string"
752
- },
753
- minLength: {
754
- type: "number"
755
- },
756
- maxLength: {
757
- type: "number"
758
- },
759
- minimum: {
760
- $ref: "#/components/schemas/OneOfNumberString"
761
- },
762
- maximum: {
763
- $ref: "#/components/schemas/OneOfNumberString"
764
- },
765
- not: {
766
- type: "object"
767
- },
768
- pattern: {
769
- type: "string"
770
- },
771
- type: {
772
- type: "string"
773
- },
774
- contains: {
775
- $ref: "#/components/schemas/FilterV2"
776
- },
777
- items: {
778
- $ref: "#/components/schemas/FilterV2Items"
779
- }
780
- },
781
- additionalProperties: false
782
- },
783
- FilterV2Items: {
784
- type: "object",
785
- properties: {
786
- const: {
787
- $ref: "#/components/schemas/OneOfNumberStringBoolean"
788
- },
789
- enum: {
790
- type: "array",
791
- items: {
792
- $ref: "#/components/schemas/OneOfNumberStringBoolean"
1021
+ pdmGetDefinitions: {
1022
+ description: "Find one or more presentation definition records using filters",
1023
+ arguments: {
1024
+ $ref: "#/components/schemas/GetDefinitionItemsArgs"
1025
+ },
1026
+ returnType: {
1027
+ type: "array",
1028
+ items: {
1029
+ $ref: "#/components/schemas/PresentationDefinitionItem"
1030
+ }
793
1031
  }
794
1032
  },
795
- exclusiveMinimum: {
796
- $ref: "#/components/schemas/OneOfNumberString"
797
- },
798
- exclusiveMaximum: {
799
- $ref: "#/components/schemas/OneOfNumberString"
800
- },
801
- format: {
802
- type: "string"
803
- },
804
- formatMaximum: {
805
- type: "string"
806
- },
807
- formatMinimum: {
808
- type: "string"
809
- },
810
- formatExclusiveMaximum: {
811
- type: "string"
812
- },
813
- formatExclusiveMinimum: {
814
- type: "string"
815
- },
816
- minLength: {
817
- type: "number"
818
- },
819
- maxLength: {
820
- type: "number"
821
- },
822
- minimum: {
823
- $ref: "#/components/schemas/OneOfNumberString"
824
- },
825
- maximum: {
826
- $ref: "#/components/schemas/OneOfNumberString"
827
- },
828
- not: {
829
- type: "object"
830
- },
831
- pattern: {
832
- type: "string"
833
- },
834
- type: {
835
- type: "string"
836
- },
837
- contains: {
838
- $ref: "#/components/schemas/FilterV2"
839
- },
840
- items: {
841
- $ref: "#/components/schemas/FilterV2Items"
842
- }
843
- },
844
- additionalProperties: false
845
- },
846
- DcqlQueryREST: {
847
- type: "object",
848
- properties: {
849
- credentials: {
850
- type: "array",
851
- items: {
852
- $ref: "#/components/schemas/DcqlCredentialQuery"
1033
+ pdmHasDefinition: {
1034
+ description: "Checks whether a presentation definition record exists by primary key",
1035
+ arguments: {
1036
+ $ref: "#/components/schemas/HasDefinitionItemArgs"
1037
+ },
1038
+ returnType: {
1039
+ type: "boolean"
853
1040
  }
854
- }
855
- },
856
- required: ["credentials"],
857
- additionalProperties: false
858
- },
859
- DcqlCredentialQuery: {
860
- type: "object",
861
- properties: {
862
- id: {
863
- type: "string"
864
- },
865
- format: {
866
- type: "string"
867
1041
  },
868
- alg: {
869
- type: "array",
870
- items: {
871
- type: "string"
1042
+ pdmHasDefinitions: {
1043
+ description: "Checks whether one or more presentation definition records exist using filters",
1044
+ arguments: {
1045
+ $ref: "#/components/schemas/HasDefinitionItemsArgs"
1046
+ },
1047
+ returnType: {
1048
+ type: "boolean"
872
1049
  }
873
1050
  },
874
- claims: {
875
- type: "array",
876
- items: {
877
- $ref: "#/components/schemas/DcqlClaim"
1051
+ pdmPersistDefinition: {
1052
+ description: "Check in a presentation definition. It has version control logic which will add or update presentation definition records and has settings for automatic version numbering.",
1053
+ arguments: {
1054
+ $ref: "#/components/schemas/PersistDefinitionArgs"
1055
+ },
1056
+ returnType: {
1057
+ $ref: "#/components/schemas/PresentationDefinitionItem"
878
1058
  }
879
- },
880
- meta: {
881
- $ref: "#/components/schemas/Record<string,any>"
882
- }
883
- },
884
- required: ["id", "format", "claims"],
885
- additionalProperties: false
886
- },
887
- DcqlClaim: {
888
- type: "object",
889
- properties: {
890
- namespace: {
891
- type: "string"
892
- },
893
- claim_name: {
894
- type: "string"
895
- },
896
- filter: {
897
- $ref: "#/components/schemas/DcqlFilter"
898
1059
  }
899
- },
900
- required: ["namespace", "claim_name"],
901
- additionalProperties: false
902
- },
903
- DcqlFilter: {
904
- type: "object",
905
- properties: {
906
- type: {
907
- type: "string",
908
- enum: ["string", "number", "boolean"]
909
- },
910
- pattern: {
911
- type: "string"
912
- },
913
- minimum: {
914
- type: "number"
915
- },
916
- maximum: {
917
- type: "number"
918
- }
919
- },
920
- required: ["type"],
921
- additionalProperties: false
922
- },
923
- "Record<string,any>": {
924
- type: "object"
925
- },
926
- HasDefinitionItemArgs: {
927
- $ref: "#/components/schemas/GetDefinitionItemArgs"
928
- },
929
- HasDefinitionItemsArgs: {
930
- $ref: "#/components/schemas/GetDefinitionItemsArgs"
931
- },
932
- PersistDefinitionArgs: {
933
- type: "object",
934
- properties: {
935
- definitionItem: {
936
- $ref: "#/components/schemas/PersistPresentationDefinitionItem"
937
- },
938
- opts: {
939
- $ref: "#/components/schemas/PersistOptions"
940
- }
941
- },
942
- required: ["definitionItem"],
943
- additionalProperties: false
944
- },
945
- PersistPresentationDefinitionItem: {
946
- type: "object",
947
- additionalProperties: false,
948
- properties: {
949
- id: {
950
- type: "string"
951
- },
952
- definitionId: {
953
- type: "string"
954
- },
955
- version: {
956
- type: "string"
957
- },
958
- tenantId: {
959
- type: "string"
960
- },
961
- name: {
962
- type: "string"
963
- },
964
- purpose: {
965
- type: "string"
966
- },
967
- definitionPayload: {
968
- $ref: "#/components/schemas/IPresentationDefinition"
969
- },
970
- dcqlPayload: {
971
- $ref: "#/components/schemas/DcqlQueryREST"
972
- }
973
- },
974
- required: ["definitionPayload"]
975
- },
976
- PersistOptions: {
977
- type: "object",
978
- properties: {
979
- versionControlMode: {
980
- $ref: "#/components/schemas/VersionControlMode"
981
- },
982
- versionIncrementReleaseType: {
983
- $ref: "#/components/schemas/ReleaseType"
984
- }
985
- },
986
- additionalProperties: false
987
- },
988
- VersionControlMode: {
989
- type: "string",
990
- enum: ["AutoIncrement", "Manual", "Overwrite", "OverwriteLatest"]
991
- },
992
- ReleaseType: {
993
- type: "string",
994
- enum: ["major", "premajor", "minor", "preminor", "patch", "prepatch", "prerelease", "release"]
995
- }
996
- },
997
- methods: {
998
- pdmDeleteDefinition: {
999
- description: "Delete a single presentation definition records by primary key",
1000
- arguments: {
1001
- $ref: "#/components/schemas/DeleteDefinitionItemArgs"
1002
- },
1003
- returnType: {
1004
- type: "boolean"
1005
- }
1006
- },
1007
- pdmDeleteDefinitions: {
1008
- description: "Delete multiple presentation definitions records using filters",
1009
- arguments: {
1010
- $ref: "#/components/schemas/DeleteDefinitionItemsArgs"
1011
- },
1012
- returnType: {
1013
- type: "number"
1014
- }
1015
- },
1016
- pdmGetDefinition: {
1017
- description: "Get a single presentation definition records by primary key",
1018
- arguments: {
1019
- $ref: "#/components/schemas/GetDefinitionItemArgs"
1020
- },
1021
- returnType: {
1022
- $ref: "#/components/schemas/PresentationDefinitionItem"
1023
- }
1024
- },
1025
- pdmGetDefinitions: {
1026
- description: "Find one or more presentation definition records using filters",
1027
- arguments: {
1028
- $ref: "#/components/schemas/GetDefinitionItemsArgs"
1029
- },
1030
- returnType: {
1031
- type: "array",
1032
- items: {
1033
- $ref: "#/components/schemas/PresentationDefinitionItem"
1034
- }
1035
- }
1036
- },
1037
- pdmHasDefinition: {
1038
- description: "Checks whether a presentation definition record exists by primary key",
1039
- arguments: {
1040
- $ref: "#/components/schemas/HasDefinitionItemArgs"
1041
- },
1042
- returnType: {
1043
- type: "boolean"
1044
- }
1045
- },
1046
- pdmHasDefinitions: {
1047
- description: "Checks whether one or more presentation definition records exist using filters",
1048
- arguments: {
1049
- $ref: "#/components/schemas/HasDefinitionItemsArgs"
1050
- },
1051
- returnType: {
1052
- type: "boolean"
1053
- }
1054
- },
1055
- pdmPersistDefinition: {
1056
- description: "Check in a presentation definition. It has version control logic which will add or update presentation definition records and has settings for automatic version numbering.",
1057
- arguments: {
1058
- $ref: "#/components/schemas/PersistDefinitionArgs"
1059
- },
1060
- returnType: {
1061
- $ref: "#/components/schemas/PresentationDefinitionItem"
1062
1060
  }
1063
1061
  }
1064
1062
  }
1065
- }
1063
+ };
1066
1064
  }
1067
- };
1065
+ });
1066
+
1067
+ // src/index.ts
1068
+ var index_exports = {};
1069
+ __export(index_exports, {
1070
+ PDManager: () => PDManager,
1071
+ pdManagerMethods: () => pdManagerMethods,
1072
+ schema: () => schema
1073
+ });
1074
+ module.exports = __toCommonJS(index_exports);
1068
1075
 
1069
1076
  // src/agent/PDManager.ts
1070
1077
  var import_ssi_sdk = require("@sphereon/ssi-sdk.data-store");
@@ -1082,7 +1089,7 @@ var PDManager = class {
1082
1089
  static {
1083
1090
  __name(this, "PDManager");
1084
1091
  }
1085
- schema = plugin_schema_default.IPDManager;
1092
+ schema = schema.IPDManager;
1086
1093
  methods = {
1087
1094
  pdmPersistDefinition: this.pdmPersistDefinition.bind(this),
1088
1095
  pdmHasDefinition: this.pdmHasDefinition.bind(this),
@@ -1126,10 +1133,10 @@ var PDManager = class {
1126
1133
  let definitions = [];
1127
1134
  if (opts == void 0 || opts.showVersionHistory !== true) {
1128
1135
  const groupedByDefinitionId = allDefinitions.reduce((acc, entity) => {
1129
- if (!acc[entity.queryId]) {
1130
- acc[entity.queryId] = [];
1136
+ if (!acc[entity.definitionId]) {
1137
+ acc[entity.definitionId] = [];
1131
1138
  }
1132
- acc[entity.queryId].push(entity);
1139
+ acc[entity.definitionId].push(entity);
1133
1140
  return acc;
1134
1141
  }, {});
1135
1142
  definitions = Object.values(groupedByDefinitionId).map((entities) => entities.reduce((highestVersionItem, baseItem) => {
@@ -1157,7 +1164,7 @@ var PDManager = class {
1157
1164
  versionControlMode: "AutoIncrement"
1158
1165
  };
1159
1166
  const { version, tenantId } = definitionItem;
1160
- const definitionId = definitionItem.queryId;
1167
+ const definitionId = definitionItem.definitionId;
1161
1168
  let { id } = definitionItem;
1162
1169
  if (id !== void 0 && versionControlMode !== "Overwrite") {
1163
1170
  id = void 0;
@@ -1170,7 +1177,7 @@ var PDManager = class {
1170
1177
  filter: [
1171
1178
  {
1172
1179
  id,
1173
- queryId: definitionId,
1180
+ definitionId,
1174
1181
  tenantId,
1175
1182
  version
1176
1183
  }
@@ -1180,7 +1187,7 @@ var PDManager = class {
1180
1187
  const allDefinitions = await this.store.getDefinitions({
1181
1188
  filter: [
1182
1189
  {
1183
- queryId: definitionId,
1190
+ definitionId,
1184
1191
  tenantId
1185
1192
  }
1186
1193
  ]
@@ -1208,38 +1215,44 @@ var PDManager = class {
1208
1215
  }
1209
1216
  async handleOverwriteMode(existingItem, definitionItem, version) {
1210
1217
  if (existingItem) {
1211
- existingItem.queryId = definitionItem.queryId;
1218
+ existingItem.definitionId = definitionItem.definitionId;
1212
1219
  existingItem.version = version ?? existingItem.version ?? "1";
1213
1220
  existingItem.tenantId = definitionItem.tenantId;
1214
- existingItem.name = definitionItem.name;
1215
- existingItem.purpose = definitionItem.purpose;
1216
- existingItem.query = definitionItem.query;
1221
+ existingItem.name = definitionItem.dcqlPayload?.name ?? definitionItem.definitionPayload?.name ?? definitionItem.name;
1222
+ existingItem.purpose = definitionItem.dcqlPayload?.defaultPurpose ?? definitionItem.definitionPayload?.purpose ?? definitionItem.purpose;
1223
+ existingItem.dcqlPayload = definitionItem.dcqlPayload;
1224
+ existingItem.definitionPayload = definitionItem.definitionPayload;
1217
1225
  return await this.store.updateDefinition(existingItem);
1218
1226
  } else {
1219
1227
  const newDefinitionItem = {
1220
- ...definitionItem
1228
+ ...definitionItem,
1229
+ name: definitionItem.name ?? definitionItem.dcqlPayload?.name ?? definitionItem.definitionPayload?.name,
1230
+ purpose: definitionItem.purpose ?? definitionItem.dcqlPayload?.defaultPurpose ?? definitionItem.definitionPayload?.purpose
1221
1231
  };
1222
1232
  return await this.store.addDefinition(newDefinitionItem);
1223
1233
  }
1224
1234
  }
1225
1235
  async handleOverwriteLatestMode(latestVersionItem, definitionItem) {
1226
1236
  if (latestVersionItem) {
1227
- latestVersionItem.queryId = definitionItem.queryId;
1237
+ latestVersionItem.definitionId = definitionItem.definitionId;
1228
1238
  latestVersionItem.tenantId = definitionItem.tenantId;
1229
- latestVersionItem.name = definitionItem.name;
1230
- latestVersionItem.purpose = definitionItem.purpose;
1231
- latestVersionItem.query = definitionItem.query;
1239
+ latestVersionItem.name = definitionItem.dcqlPayload?.name ?? definitionItem.definitionPayload?.name ?? definitionItem.name;
1240
+ latestVersionItem.purpose = definitionItem.dcqlPayload?.defaultPurpose ?? definitionItem.definitionPayload?.purpose ?? definitionItem.purpose;
1241
+ latestVersionItem.definitionPayload = definitionItem.definitionPayload;
1242
+ latestVersionItem.dcqlPayload = definitionItem.dcqlPayload;
1232
1243
  return await this.store.updateDefinition(latestVersionItem);
1233
1244
  } else {
1234
1245
  const newDefinitionItem = {
1235
- ...definitionItem
1246
+ ...definitionItem,
1247
+ name: definitionItem.name ?? definitionItem.dcqlPayload?.name ?? definitionItem.definitionPayload?.name,
1248
+ purpose: definitionItem.purpose ?? definitionItem.dcqlPayload?.defaultPurpose ?? definitionItem.definitionPayload?.purpose
1236
1249
  };
1237
1250
  return await this.store.addDefinition(newDefinitionItem);
1238
1251
  }
1239
1252
  }
1240
1253
  async handleManualMode(existingItem, definitionItem, tenantId, version) {
1241
1254
  if (existingItem && !(0, import_ssi_sdk.isPresentationDefinitionEqual)(existingItem, definitionItem)) {
1242
- throw Error(`Cannot update definition ${definitionItem.queryId} for tenant ${tenantId} version ${version} because definition exists and manual version control is enabled.`);
1255
+ throw Error(`Cannot update definition ${definitionItem.definitionId} for tenant ${tenantId} version ${version} because definition exists and manual version control is enabled.`);
1243
1256
  } else {
1244
1257
  return await this.store.addDefinition(definitionItem);
1245
1258
  }
@@ -1272,7 +1285,9 @@ var PDManager = class {
1272
1285
  }
1273
1286
  const newDefinitionItem = {
1274
1287
  ...definitionItem,
1275
- version: resultVersion
1288
+ version: resultVersion,
1289
+ name: definitionItem.name ?? definitionItem.dcqlPayload?.name ?? definitionItem.definitionPayload?.name,
1290
+ purpose: definitionItem.purpose ?? definitionItem.dcqlPayload?.defaultPurpose ?? definitionItem.definitionPayload?.purpose
1276
1291
  };
1277
1292
  return await this.store.addDefinition(newDefinitionItem);
1278
1293
  }
@@ -1286,4 +1301,7 @@ var PDManager = class {
1286
1301
  return normalizedBaseVersion;
1287
1302
  }
1288
1303
  };
1304
+
1305
+ // src/index.ts
1306
+ var schema = require_plugin_schema();
1289
1307
  //# sourceMappingURL=index.cjs.map