@tsg-dsp/tsg-sdk 0.0.0-stage → 0.21.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 (222) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +362 -2
  3. package/dist/.generated/control-plane.d.ts +7825 -0
  4. package/dist/.generated/sso-bridge.d.ts +3999 -0
  5. package/dist/.generated/wallet.d.ts +6248 -0
  6. package/dist/auth/auth.provider.d.ts +49 -0
  7. package/dist/auth/auth.provider.d.ts.map +1 -0
  8. package/dist/auth/auth.provider.js +166 -0
  9. package/dist/auth/auth.provider.js.map +1 -0
  10. package/dist/auth/auth.types.d.ts +27 -0
  11. package/dist/auth/auth.types.d.ts.map +1 -0
  12. package/dist/auth/auth.types.js +2 -0
  13. package/dist/auth/auth.types.js.map +1 -0
  14. package/dist/auth/index.d.ts +3 -0
  15. package/dist/auth/index.d.ts.map +1 -0
  16. package/dist/auth/index.js +3 -0
  17. package/dist/auth/index.js.map +1 -0
  18. package/dist/browser.d.ts +1245 -0
  19. package/dist/browser.d.ts.map +1 -0
  20. package/dist/browser.js +228 -0
  21. package/dist/browser.js.map +1 -0
  22. package/dist/catalog/catalog.sdk.d.ts +149 -0
  23. package/dist/catalog/catalog.sdk.d.ts.map +1 -0
  24. package/dist/catalog/catalog.sdk.js +155 -0
  25. package/dist/catalog/catalog.sdk.js.map +1 -0
  26. package/dist/catalog/index.d.ts +2 -0
  27. package/dist/catalog/index.d.ts.map +1 -0
  28. package/dist/catalog/index.js +2 -0
  29. package/dist/catalog/index.js.map +1 -0
  30. package/dist/client.d.ts +43 -0
  31. package/dist/client.d.ts.map +1 -0
  32. package/dist/client.js +109 -0
  33. package/dist/client.js.map +1 -0
  34. package/dist/config/index.d.ts +2 -0
  35. package/dist/config/index.d.ts.map +1 -0
  36. package/dist/config/index.js +2 -0
  37. package/dist/config/index.js.map +1 -0
  38. package/dist/config/sdk.config.d.ts +97 -0
  39. package/dist/config/sdk.config.d.ts.map +1 -0
  40. package/dist/config/sdk.config.js +2 -0
  41. package/dist/config/sdk.config.js.map +1 -0
  42. package/dist/index.d.ts +18 -0
  43. package/dist/index.d.ts.map +1 -0
  44. package/dist/index.js +25 -0
  45. package/dist/index.js.map +1 -0
  46. package/dist/metadata/index.d.ts +2 -0
  47. package/dist/metadata/index.d.ts.map +1 -0
  48. package/dist/metadata/index.js +2 -0
  49. package/dist/metadata/index.js.map +1 -0
  50. package/dist/metadata/metadata.sdk.d.ts +114 -0
  51. package/dist/metadata/metadata.sdk.d.ts.map +1 -0
  52. package/dist/metadata/metadata.sdk.js +145 -0
  53. package/dist/metadata/metadata.sdk.js.map +1 -0
  54. package/dist/negotiations/index.d.ts +2 -0
  55. package/dist/negotiations/index.d.ts.map +1 -0
  56. package/dist/negotiations/index.js +2 -0
  57. package/dist/negotiations/index.js.map +1 -0
  58. package/dist/negotiations/negotiations.sdk.d.ts +113 -0
  59. package/dist/negotiations/negotiations.sdk.d.ts.map +1 -0
  60. package/dist/negotiations/negotiations.sdk.js +146 -0
  61. package/dist/negotiations/negotiations.sdk.js.map +1 -0
  62. package/dist/requirements/index.d.ts +2 -0
  63. package/dist/requirements/index.d.ts.map +1 -0
  64. package/dist/requirements/index.js +2 -0
  65. package/dist/requirements/index.js.map +1 -0
  66. package/dist/requirements/requirements.sdk.d.ts +52 -0
  67. package/dist/requirements/requirements.sdk.d.ts.map +1 -0
  68. package/dist/requirements/requirements.sdk.js +123 -0
  69. package/dist/requirements/requirements.sdk.js.map +1 -0
  70. package/dist/sso/index.d.ts +3 -0
  71. package/dist/sso/index.d.ts.map +1 -0
  72. package/dist/sso/index.js +3 -0
  73. package/dist/sso/index.js.map +1 -0
  74. package/dist/sso/sso-management.sdk.d.ts +96 -0
  75. package/dist/sso/sso-management.sdk.d.ts.map +1 -0
  76. package/dist/sso/sso-management.sdk.js +152 -0
  77. package/dist/sso/sso-management.sdk.js.map +1 -0
  78. package/dist/sso/sso.sdk.d.ts +75 -0
  79. package/dist/sso/sso.sdk.d.ts.map +1 -0
  80. package/dist/sso/sso.sdk.js +149 -0
  81. package/dist/sso/sso.sdk.js.map +1 -0
  82. package/dist/tenants/tenant-management.sdk.d.ts +48 -0
  83. package/dist/tenants/tenant-management.sdk.d.ts.map +1 -0
  84. package/dist/tenants/tenant-management.sdk.js +107 -0
  85. package/dist/tenants/tenant-management.sdk.js.map +1 -0
  86. package/dist/transfers/index.d.ts +2 -0
  87. package/dist/transfers/index.d.ts.map +1 -0
  88. package/dist/transfers/index.js +2 -0
  89. package/dist/transfers/index.js.map +1 -0
  90. package/dist/transfers/transfers.sdk.d.ts +174 -0
  91. package/dist/transfers/transfers.sdk.d.ts.map +1 -0
  92. package/dist/transfers/transfers.sdk.js +200 -0
  93. package/dist/transfers/transfers.sdk.js.map +1 -0
  94. package/dist/tsg-sdk.d.ts +68 -0
  95. package/dist/tsg-sdk.d.ts.map +1 -0
  96. package/dist/tsg-sdk.js +145 -0
  97. package/dist/tsg-sdk.js.map +1 -0
  98. package/dist/utils/errors.d.ts +67 -0
  99. package/dist/utils/errors.d.ts.map +1 -0
  100. package/dist/utils/errors.js +79 -0
  101. package/dist/utils/errors.js.map +1 -0
  102. package/dist/utils/index.d.ts +5 -0
  103. package/dist/utils/index.d.ts.map +1 -0
  104. package/dist/utils/index.js +5 -0
  105. package/dist/utils/index.js.map +1 -0
  106. package/dist/utils/polling.d.ts +20 -0
  107. package/dist/utils/polling.d.ts.map +1 -0
  108. package/dist/utils/polling.js +35 -0
  109. package/dist/utils/polling.js.map +1 -0
  110. package/dist/utils/reason.d.ts +16 -0
  111. package/dist/utils/reason.d.ts.map +1 -0
  112. package/dist/utils/reason.js +34 -0
  113. package/dist/utils/reason.js.map +1 -0
  114. package/dist/utils/shape-validation.d.ts +59 -0
  115. package/dist/utils/shape-validation.d.ts.map +1 -0
  116. package/dist/utils/shape-validation.js +85 -0
  117. package/dist/utils/shape-validation.js.map +1 -0
  118. package/dist/utils/validate.d.ts +47 -0
  119. package/dist/utils/validate.d.ts.map +1 -0
  120. package/dist/utils/validate.js +68 -0
  121. package/dist/utils/validate.js.map +1 -0
  122. package/dist/vendor/common-dtos/abac.policy.d.ts +69 -0
  123. package/dist/vendor/common-dtos/abac.policy.js +5 -0
  124. package/dist/vendor/common-dtos/audit.types.d.ts +74 -0
  125. package/dist/vendor/common-dtos/audit.types.js +8 -0
  126. package/dist/vendor/common-dtos/credential-requirements.d.ts +18 -0
  127. package/dist/vendor/common-dtos/credential-requirements.dto.d.ts +46 -0
  128. package/dist/vendor/common-dtos/credential-requirements.dto.js +250 -0
  129. package/dist/vendor/common-dtos/credential-requirements.js +180 -0
  130. package/dist/vendor/common-dtos/dataplane.dto.d.ts +5 -0
  131. package/dist/vendor/common-dtos/dataplane.dto.js +28 -0
  132. package/dist/vendor/common-dtos/dcp.dto.d.ts +89 -0
  133. package/dist/vendor/common-dtos/dcp.dto.js +489 -0
  134. package/dist/vendor/common-dtos/dcql.dto.d.ts +88 -0
  135. package/dist/vendor/common-dtos/dcql.dto.js +449 -0
  136. package/dist/vendor/common-dtos/did.schemas.d.ts +39 -0
  137. package/dist/vendor/common-dtos/did.schemas.js +259 -0
  138. package/dist/vendor/common-dtos/index.d.ts +19 -0
  139. package/dist/vendor/common-dtos/index.js +19 -0
  140. package/dist/vendor/common-dtos/metadata.dto.d.ts +5 -0
  141. package/dist/vendor/common-dtos/metadata.dto.js +29 -0
  142. package/dist/vendor/common-dtos/negotiations.dto.d.ts +28 -0
  143. package/dist/vendor/common-dtos/negotiations.dto.js +204 -0
  144. package/dist/vendor/common-dtos/permission-resources.d.ts +3 -0
  145. package/dist/vendor/common-dtos/permission-resources.js +18 -0
  146. package/dist/vendor/common-dtos/permissions.d.ts +242 -0
  147. package/dist/vendor/common-dtos/permissions.js +409 -0
  148. package/dist/vendor/common-dtos/presentation.request.dto.d.ts +8 -0
  149. package/dist/vendor/common-dtos/presentation.request.dto.js +54 -0
  150. package/dist/vendor/common-dtos/presentation.status.dto.d.ts +12 -0
  151. package/dist/vendor/common-dtos/presentation.status.dto.js +82 -0
  152. package/dist/vendor/common-dtos/presentationdefinition.dto.d.ts +74 -0
  153. package/dist/vendor/common-dtos/presentationdefinition.dto.js +447 -0
  154. package/dist/vendor/common-dtos/signatures.dto.d.ts +31 -0
  155. package/dist/vendor/common-dtos/signatures.dto.js +209 -0
  156. package/dist/vendor/common-dtos/transfer.dto.d.ts +16 -0
  157. package/dist/vendor/common-dtos/transfer.dto.js +101 -0
  158. package/dist/vendor/common-dtos/utils.swagger.d.ts +12 -0
  159. package/dist/vendor/common-dtos/utils.swagger.js +62 -0
  160. package/dist/vendor/control-plane-dtos/index.d.ts +4 -0
  161. package/dist/vendor/control-plane-dtos/index.js +4 -0
  162. package/dist/vendor/control-plane-dtos/registry/registry.dto.d.ts +4 -0
  163. package/dist/vendor/control-plane-dtos/registry/registry.dto.js +25 -0
  164. package/dist/vendor/control-plane-dtos/registry/registry.search.dto.d.ts +28 -0
  165. package/dist/vendor/control-plane-dtos/registry/registry.search.dto.js +126 -0
  166. package/dist/vendor/control-plane-dtos/ssi/verifiablePresentations.dto.d.ts +9 -0
  167. package/dist/vendor/control-plane-dtos/ssi/verifiablePresentations.dto.js +43 -0
  168. package/dist/vendor/control-plane-dtos/status/status.dto.d.ts +37 -0
  169. package/dist/vendor/control-plane-dtos/status/status.dto.js +172 -0
  170. package/dist/vendor/sso-bridge-dtos/clients.dto.d.ts +25 -0
  171. package/dist/vendor/sso-bridge-dtos/clients.dto.js +147 -0
  172. package/dist/vendor/sso-bridge-dtos/grants.d.ts +4 -0
  173. package/dist/vendor/sso-bridge-dtos/grants.js +7 -0
  174. package/dist/vendor/sso-bridge-dtos/index.d.ts +5 -0
  175. package/dist/vendor/sso-bridge-dtos/index.js +5 -0
  176. package/dist/vendor/sso-bridge-dtos/tenant.dto.d.ts +70 -0
  177. package/dist/vendor/sso-bridge-dtos/tenant.dto.js +1 -0
  178. package/dist/vendor/sso-bridge-dtos/users.dto.d.ts +42 -0
  179. package/dist/vendor/sso-bridge-dtos/users.dto.js +173 -0
  180. package/dist/vendor/tenant-dtos/authorization.dto.d.ts +46 -0
  181. package/dist/vendor/tenant-dtos/authorization.dto.js +5 -0
  182. package/dist/vendor/tenant-dtos/consumer.dto.d.ts +29 -0
  183. package/dist/vendor/tenant-dtos/consumer.dto.js +1 -0
  184. package/dist/vendor/tenant-dtos/fixtures.d.ts +15 -0
  185. package/dist/vendor/tenant-dtos/fixtures.js +48 -0
  186. package/dist/vendor/tenant-dtos/index.d.ts +8 -0
  187. package/dist/vendor/tenant-dtos/index.js +8 -0
  188. package/dist/vendor/tenant-dtos/management.dto.d.ts +137 -0
  189. package/dist/vendor/tenant-dtos/management.dto.js +1 -0
  190. package/dist/vendor/tenant-dtos/membership.dto.d.ts +22 -0
  191. package/dist/vendor/tenant-dtos/membership.dto.js +7 -0
  192. package/dist/vendor/tenant-dtos/principal.dto.d.ts +13 -0
  193. package/dist/vendor/tenant-dtos/principal.dto.js +6 -0
  194. package/dist/vendor/tenant-dtos/provisioning.dto.d.ts +47 -0
  195. package/dist/vendor/tenant-dtos/provisioning.dto.js +1 -0
  196. package/dist/vendor/tenant-dtos/service-binding.dto.d.ts +9 -0
  197. package/dist/vendor/tenant-dtos/service-binding.dto.js +1 -0
  198. package/dist/vendor/tenant-dtos/tenant.dto.d.ts +15 -0
  199. package/dist/vendor/tenant-dtos/tenant.dto.js +1 -0
  200. package/dist/vendor/wallet-dtos/clients.dto.d.ts +21 -0
  201. package/dist/vendor/wallet-dtos/clients.dto.js +13 -0
  202. package/dist/vendor/wallet-dtos/credentials.dto.d.ts +31 -0
  203. package/dist/vendor/wallet-dtos/credentials.dto.js +46 -0
  204. package/dist/vendor/wallet-dtos/index.d.ts +6 -0
  205. package/dist/vendor/wallet-dtos/index.js +6 -0
  206. package/dist/vendor/wallet-dtos/issuance.dto.d.ts +237 -0
  207. package/dist/vendor/wallet-dtos/issuance.dto.js +1139 -0
  208. package/dist/vendor/wallet-dtos/scopes.dto.d.ts +24 -0
  209. package/dist/vendor/wallet-dtos/scopes.dto.js +151 -0
  210. package/dist/vendor/wallet-dtos/status.dto.d.ts +35 -0
  211. package/dist/vendor/wallet-dtos/status.dto.js +169 -0
  212. package/dist/vendor/wallet-dtos/utils/schema-converter.d.ts +13 -0
  213. package/dist/vendor/wallet-dtos/utils/schema-converter.js +42 -0
  214. package/dist/wallet/index.d.ts +2 -0
  215. package/dist/wallet/index.d.ts.map +1 -0
  216. package/dist/wallet/index.js +2 -0
  217. package/dist/wallet/index.js.map +1 -0
  218. package/dist/wallet/wallet.sdk.d.ts +285 -0
  219. package/dist/wallet/wallet.sdk.d.ts.map +1 -0
  220. package/dist/wallet/wallet.sdk.js +384 -0
  221. package/dist/wallet/wallet.sdk.js.map +1 -0
  222. package/package.json +79 -3
@@ -0,0 +1,89 @@
1
+ import { PresentationDefinition, PresentationSubmission } from "./presentationdefinition.dto.js";
2
+ export declare enum PresentationQueryMode {
3
+ PRESENTATION_DEFINITION = "presentation-definition",
4
+ SCOPE = "scope"
5
+ }
6
+ export declare class VerificationRequest {
7
+ presentationDefinition?: PresentationDefinition;
8
+ scope?: string[];
9
+ queryMode?: PresentationQueryMode;
10
+ holderIdToken: string;
11
+ }
12
+ export declare class PresentationQueryMessage {
13
+ "@context": string[];
14
+ type: "PresentationQueryMessage";
15
+ presentationDefinition?: PresentationDefinition;
16
+ scope?: string[];
17
+ }
18
+ export declare class PresentationResponseMessage {
19
+ "@context": string[];
20
+ type: "PresentationResponseMessage";
21
+ presentation: (string | object)[];
22
+ presentationSubmission?: PresentationSubmission;
23
+ }
24
+ export declare class CredentialRequestCredential {
25
+ id: string;
26
+ }
27
+ export declare class CredentialRequestMessage {
28
+ "@context": string[];
29
+ type: "CredentialRequestMessage";
30
+ holderPid: string;
31
+ credentials: CredentialRequestCredential[];
32
+ }
33
+ export declare class CredentialContainer {
34
+ payload: string;
35
+ credentialType: string;
36
+ format: string;
37
+ }
38
+ export declare class CredentialMessage {
39
+ "@context": string[];
40
+ type: "CredentialMessage";
41
+ issuerPid: string;
42
+ holderPid: string;
43
+ status: "ISSUED" | "REJECTED";
44
+ rejectionReason?: string;
45
+ credentials?: CredentialContainer[];
46
+ }
47
+ export declare class CredentialObject {
48
+ id: string;
49
+ type: "CredentialObject";
50
+ credentialType: string;
51
+ credentialSchema?: string;
52
+ offerReason?: string;
53
+ bindingMethods: string[];
54
+ profile: string;
55
+ issuancePolicy?: PresentationDefinition;
56
+ }
57
+ /**
58
+ * A credential offer may contain a sparse CredentialObject. In that case the
59
+ * holder resolves its remaining properties using the issuer's metadata.
60
+ */
61
+ export declare class CredentialOfferObject {
62
+ id: string;
63
+ type?: "CredentialObject";
64
+ credentialType?: string;
65
+ credentialSchema?: string;
66
+ bindingMethods?: string[];
67
+ profile?: string;
68
+ offerReason?: string;
69
+ issuancePolicy?: PresentationDefinition;
70
+ }
71
+ export declare class CredentialOfferMessage {
72
+ "@context": string[];
73
+ type: "CredentialOfferMessage";
74
+ issuer: string;
75
+ credentials: CredentialOfferObject[];
76
+ }
77
+ export declare class IssuerMetadata {
78
+ "@context": string[];
79
+ type: "IssuerMetadata";
80
+ issuer: string;
81
+ credentialsSupported: CredentialObject[];
82
+ }
83
+ export declare class CredentialStatus {
84
+ "@context": string[];
85
+ type: "CredentialStatus";
86
+ issuerPid: string;
87
+ holderPid: string;
88
+ status: "RECEIVED" | "REJECTED" | "ISSUED";
89
+ }
@@ -0,0 +1,489 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ import { ApiExtraModels, ApiProperty, ApiPropertyOptional, ApiSchema, getSchemaPath } from "@nestjs/swagger";
11
+ import { VerifiablePresentation } from "@tsg-dsp/common-dsp";
12
+ import { Type } from "class-transformer";
13
+ import { ArrayContains, ArrayMinSize, Equals, IsArray, IsEnum, IsIn, IsOptional, IsString, ValidateNested } from "class-validator";
14
+ import { PresentationDefinition, PresentationSubmission } from "./presentationdefinition.dto.js";
15
+ export var PresentationQueryMode;
16
+ (function (PresentationQueryMode) {
17
+ PresentationQueryMode["PRESENTATION_DEFINITION"] = "presentation-definition";
18
+ PresentationQueryMode["SCOPE"] = "scope";
19
+ })(PresentationQueryMode || (PresentationQueryMode = {}));
20
+ export class VerificationRequest {
21
+ presentationDefinition;
22
+ scope;
23
+ queryMode;
24
+ holderIdToken;
25
+ }
26
+ __decorate([
27
+ ApiProperty({ type: () => PresentationDefinition }),
28
+ IsOptional(),
29
+ ValidateNested(),
30
+ Type(() => PresentationDefinition),
31
+ __metadata("design:type", PresentationDefinition)
32
+ ], VerificationRequest.prototype, "presentationDefinition", void 0);
33
+ __decorate([
34
+ ApiProperty({ type: "string" }),
35
+ IsOptional(),
36
+ IsString({ each: true }),
37
+ __metadata("design:type", Array)
38
+ ], VerificationRequest.prototype, "scope", void 0);
39
+ __decorate([
40
+ ApiPropertyOptional({
41
+ enum: PresentationQueryMode,
42
+ default: PresentationQueryMode.PRESENTATION_DEFINITION
43
+ }),
44
+ IsOptional(),
45
+ IsEnum(PresentationQueryMode),
46
+ __metadata("design:type", String)
47
+ ], VerificationRequest.prototype, "queryMode", void 0);
48
+ __decorate([
49
+ ApiProperty(),
50
+ IsString(),
51
+ __metadata("design:type", String)
52
+ ], VerificationRequest.prototype, "holderIdToken", void 0);
53
+ export class PresentationQueryMessage {
54
+ "@context";
55
+ type;
56
+ presentationDefinition;
57
+ scope;
58
+ }
59
+ __decorate([
60
+ ApiProperty(),
61
+ IsString({ each: true }),
62
+ ArrayMinSize(1),
63
+ ArrayContains(["https://w3id.org/dspace-dcp/v1.0/dcp.jsonld"]),
64
+ __metadata("design:type", Array)
65
+ ], PresentationQueryMessage.prototype, "@context", void 0);
66
+ __decorate([
67
+ ApiProperty({ example: "PresentationQueryMessage" }),
68
+ IsString(),
69
+ Equals("PresentationQueryMessage"),
70
+ __metadata("design:type", String)
71
+ ], PresentationQueryMessage.prototype, "type", void 0);
72
+ __decorate([
73
+ ApiPropertyOptional({ type: () => PresentationDefinition }),
74
+ IsOptional(),
75
+ ValidateNested(),
76
+ Type(() => PresentationDefinition),
77
+ __metadata("design:type", PresentationDefinition)
78
+ ], PresentationQueryMessage.prototype, "presentationDefinition", void 0);
79
+ __decorate([
80
+ ApiPropertyOptional({
81
+ type: [String],
82
+ example: ["https://example.com/credential-1"]
83
+ }),
84
+ IsOptional(),
85
+ IsArray(),
86
+ IsString({ each: true }),
87
+ __metadata("design:type", Array)
88
+ ], PresentationQueryMessage.prototype, "scope", void 0);
89
+ let PresentationResponseMessage = class PresentationResponseMessage {
90
+ "@context";
91
+ type;
92
+ presentation;
93
+ presentationSubmission;
94
+ };
95
+ __decorate([
96
+ ApiProperty({ example: ["https://w3id.org/dspace-dcp/v1.0/dcp.jsonld"] }),
97
+ IsString({ each: true }),
98
+ ArrayMinSize(1),
99
+ ArrayContains(["https://w3id.org/dspace-dcp/v1.0/dcp.jsonld"]),
100
+ __metadata("design:type", Array)
101
+ ], PresentationResponseMessage.prototype, "@context", void 0);
102
+ __decorate([
103
+ ApiProperty({ example: "PresentationResponseMessage" }),
104
+ IsString(),
105
+ Equals("PresentationResponseMessage"),
106
+ __metadata("design:type", String)
107
+ ], PresentationResponseMessage.prototype, "type", void 0);
108
+ __decorate([
109
+ ApiProperty({
110
+ type: "array",
111
+ items: {
112
+ oneOf: [
113
+ { type: "string" },
114
+ { $ref: getSchemaPath(VerifiablePresentation) }
115
+ ]
116
+ }
117
+ }),
118
+ IsArray(),
119
+ __metadata("design:type", Array)
120
+ ], PresentationResponseMessage.prototype, "presentation", void 0);
121
+ __decorate([
122
+ ApiPropertyOptional({
123
+ type: () => PresentationSubmission,
124
+ example: {
125
+ id: "submission-id",
126
+ definition_id: "definition-id",
127
+ descriptor_map: []
128
+ }
129
+ }),
130
+ IsOptional(),
131
+ ValidateNested(),
132
+ Type(() => PresentationSubmission),
133
+ __metadata("design:type", PresentationSubmission)
134
+ ], PresentationResponseMessage.prototype, "presentationSubmission", void 0);
135
+ PresentationResponseMessage = __decorate([
136
+ ApiExtraModels(VerifiablePresentation)
137
+ ], PresentationResponseMessage);
138
+ export { PresentationResponseMessage };
139
+ export class CredentialRequestCredential {
140
+ id;
141
+ }
142
+ __decorate([
143
+ ApiProperty(),
144
+ IsString(),
145
+ __metadata("design:type", String)
146
+ ], CredentialRequestCredential.prototype, "id", void 0);
147
+ export class CredentialRequestMessage {
148
+ "@context";
149
+ type;
150
+ holderPid;
151
+ credentials;
152
+ }
153
+ __decorate([
154
+ ApiProperty({ example: ["https://w3id.org/dspace-dcp/v1.0/dcp.jsonld"] }),
155
+ IsString({ each: true }),
156
+ ArrayMinSize(1),
157
+ ArrayContains(["https://w3id.org/dspace-dcp/v1.0/dcp.jsonld"]),
158
+ __metadata("design:type", Array)
159
+ ], CredentialRequestMessage.prototype, "@context", void 0);
160
+ __decorate([
161
+ ApiProperty({ example: "CredentialRequestMessage" }),
162
+ IsString(),
163
+ Equals("CredentialRequestMessage"),
164
+ __metadata("design:type", String)
165
+ ], CredentialRequestMessage.prototype, "type", void 0);
166
+ __decorate([
167
+ ApiProperty(),
168
+ IsString(),
169
+ __metadata("design:type", String)
170
+ ], CredentialRequestMessage.prototype, "holderPid", void 0);
171
+ __decorate([
172
+ ApiProperty({ type: [CredentialRequestCredential] }),
173
+ IsArray(),
174
+ ValidateNested({ each: true }),
175
+ Type(() => CredentialRequestCredential),
176
+ ArrayMinSize(1),
177
+ __metadata("design:type", Array)
178
+ ], CredentialRequestMessage.prototype, "credentials", void 0);
179
+ export class CredentialContainer {
180
+ payload;
181
+ credentialType;
182
+ format;
183
+ }
184
+ __decorate([
185
+ ApiProperty(),
186
+ IsString(),
187
+ __metadata("design:type", String)
188
+ ], CredentialContainer.prototype, "payload", void 0);
189
+ __decorate([
190
+ ApiProperty(),
191
+ IsString(),
192
+ __metadata("design:type", String)
193
+ ], CredentialContainer.prototype, "credentialType", void 0);
194
+ __decorate([
195
+ ApiProperty(),
196
+ IsString(),
197
+ __metadata("design:type", String)
198
+ ], CredentialContainer.prototype, "format", void 0);
199
+ export class CredentialMessage {
200
+ "@context";
201
+ type;
202
+ issuerPid;
203
+ holderPid;
204
+ status;
205
+ rejectionReason;
206
+ credentials;
207
+ }
208
+ __decorate([
209
+ ApiProperty({ example: ["https://w3id.org/dspace-dcp/v1.0/dcp.jsonld"] }),
210
+ IsString({ each: true }),
211
+ ArrayMinSize(1),
212
+ ArrayContains(["https://w3id.org/dspace-dcp/v1.0/dcp.jsonld"]),
213
+ __metadata("design:type", Array)
214
+ ], CredentialMessage.prototype, "@context", void 0);
215
+ __decorate([
216
+ ApiProperty({ example: "CredentialMessage" }),
217
+ IsString(),
218
+ Equals("CredentialMessage"),
219
+ __metadata("design:type", String)
220
+ ], CredentialMessage.prototype, "type", void 0);
221
+ __decorate([
222
+ ApiProperty(),
223
+ IsString(),
224
+ __metadata("design:type", String)
225
+ ], CredentialMessage.prototype, "issuerPid", void 0);
226
+ __decorate([
227
+ ApiProperty(),
228
+ IsString(),
229
+ __metadata("design:type", String)
230
+ ], CredentialMessage.prototype, "holderPid", void 0);
231
+ __decorate([
232
+ ApiProperty({ enum: ["ISSUED", "REJECTED"] }),
233
+ IsString(),
234
+ IsIn(["ISSUED", "REJECTED"]),
235
+ __metadata("design:type", String)
236
+ ], CredentialMessage.prototype, "status", void 0);
237
+ __decorate([
238
+ ApiPropertyOptional(),
239
+ IsOptional(),
240
+ IsString(),
241
+ __metadata("design:type", String)
242
+ ], CredentialMessage.prototype, "rejectionReason", void 0);
243
+ __decorate([
244
+ ApiPropertyOptional({ type: [CredentialContainer] }),
245
+ IsArray(),
246
+ IsOptional(),
247
+ ValidateNested({ each: true }),
248
+ Type(() => CredentialContainer),
249
+ __metadata("design:type", Array)
250
+ ], CredentialMessage.prototype, "credentials", void 0);
251
+ export class CredentialObject {
252
+ id;
253
+ type;
254
+ credentialType;
255
+ credentialSchema;
256
+ offerReason;
257
+ bindingMethods;
258
+ profile;
259
+ issuancePolicy;
260
+ }
261
+ __decorate([
262
+ ApiProperty({
263
+ example: "db8a34c7-aa42-4aae-bb57-69cd805ef01a",
264
+ description: "Unique identifier for the credential object"
265
+ }),
266
+ IsString(),
267
+ __metadata("design:type", String)
268
+ ], CredentialObject.prototype, "id", void 0);
269
+ __decorate([
270
+ ApiProperty({
271
+ example: "CredentialObject",
272
+ description: "Type identifier"
273
+ }),
274
+ IsString(),
275
+ Equals("CredentialObject"),
276
+ __metadata("design:type", String)
277
+ ], CredentialObject.prototype, "type", void 0);
278
+ __decorate([
279
+ ApiProperty({
280
+ type: String,
281
+ description: "Credential type being offered"
282
+ }),
283
+ IsString(),
284
+ __metadata("design:type", String)
285
+ ], CredentialObject.prototype, "credentialType", void 0);
286
+ __decorate([
287
+ ApiPropertyOptional({ type: String }),
288
+ IsOptional(),
289
+ IsString(),
290
+ __metadata("design:type", String)
291
+ ], CredentialObject.prototype, "credentialSchema", void 0);
292
+ __decorate([
293
+ ApiPropertyOptional({
294
+ description: "Reason for offering this credential (e.g. 'reissue', 'proof-key-revocation'). Only present on credential offers, not in issuer metadata."
295
+ }),
296
+ IsString(),
297
+ IsOptional(),
298
+ __metadata("design:type", String)
299
+ ], CredentialObject.prototype, "offerReason", void 0);
300
+ __decorate([
301
+ ApiProperty({
302
+ type: [String],
303
+ description: "Supported binding methods"
304
+ }),
305
+ IsArray(),
306
+ IsString({ each: true }),
307
+ __metadata("design:type", Array)
308
+ ], CredentialObject.prototype, "bindingMethods", void 0);
309
+ __decorate([
310
+ ApiProperty({
311
+ type: String,
312
+ description: "Supported cryptographic methods"
313
+ }),
314
+ IsString(),
315
+ __metadata("design:type", String)
316
+ ], CredentialObject.prototype, "profile", void 0);
317
+ __decorate([
318
+ ApiPropertyOptional({
319
+ type: () => PresentationDefinition,
320
+ description: "Issuance policy definition"
321
+ }),
322
+ ValidateNested(),
323
+ Type(() => PresentationDefinition),
324
+ IsOptional(),
325
+ __metadata("design:type", PresentationDefinition)
326
+ ], CredentialObject.prototype, "issuancePolicy", void 0);
327
+ /**
328
+ * A credential offer may contain a sparse CredentialObject. In that case the
329
+ * holder resolves its remaining properties using the issuer's metadata.
330
+ */
331
+ export class CredentialOfferObject {
332
+ id;
333
+ type;
334
+ credentialType;
335
+ credentialSchema;
336
+ bindingMethods;
337
+ profile;
338
+ offerReason;
339
+ issuancePolicy;
340
+ }
341
+ __decorate([
342
+ ApiProperty(),
343
+ IsString(),
344
+ __metadata("design:type", String)
345
+ ], CredentialOfferObject.prototype, "id", void 0);
346
+ __decorate([
347
+ ApiProperty({ example: "CredentialObject" }),
348
+ IsOptional(),
349
+ IsString(),
350
+ Equals("CredentialObject"),
351
+ __metadata("design:type", String)
352
+ ], CredentialOfferObject.prototype, "type", void 0);
353
+ __decorate([
354
+ ApiPropertyOptional({ type: String }),
355
+ IsOptional(),
356
+ IsString(),
357
+ __metadata("design:type", String)
358
+ ], CredentialOfferObject.prototype, "credentialType", void 0);
359
+ __decorate([
360
+ ApiPropertyOptional({ type: String }),
361
+ IsOptional(),
362
+ IsString(),
363
+ __metadata("design:type", String)
364
+ ], CredentialOfferObject.prototype, "credentialSchema", void 0);
365
+ __decorate([
366
+ ApiPropertyOptional({ type: [String] }),
367
+ IsOptional(),
368
+ IsArray(),
369
+ IsString({ each: true }),
370
+ __metadata("design:type", Array)
371
+ ], CredentialOfferObject.prototype, "bindingMethods", void 0);
372
+ __decorate([
373
+ ApiPropertyOptional({ type: String }),
374
+ IsOptional(),
375
+ IsString(),
376
+ __metadata("design:type", String)
377
+ ], CredentialOfferObject.prototype, "profile", void 0);
378
+ __decorate([
379
+ ApiPropertyOptional(),
380
+ IsOptional(),
381
+ IsString(),
382
+ __metadata("design:type", String)
383
+ ], CredentialOfferObject.prototype, "offerReason", void 0);
384
+ __decorate([
385
+ ApiPropertyOptional({ type: () => PresentationDefinition }),
386
+ IsOptional(),
387
+ __metadata("design:type", PresentationDefinition)
388
+ ], CredentialOfferObject.prototype, "issuancePolicy", void 0);
389
+ export class CredentialOfferMessage {
390
+ "@context";
391
+ type;
392
+ issuer;
393
+ credentials;
394
+ }
395
+ __decorate([
396
+ ApiProperty({ example: ["https://w3id.org/dspace-dcp/v1.0/dcp.jsonld"] }),
397
+ IsString({ each: true }),
398
+ ArrayMinSize(1),
399
+ ArrayContains(["https://w3id.org/dspace-dcp/v1.0/dcp.jsonld"]),
400
+ __metadata("design:type", Array)
401
+ ], CredentialOfferMessage.prototype, "@context", void 0);
402
+ __decorate([
403
+ ApiProperty({ example: "CredentialOfferMessage" }),
404
+ IsString(),
405
+ Equals("CredentialOfferMessage"),
406
+ __metadata("design:type", String)
407
+ ], CredentialOfferMessage.prototype, "type", void 0);
408
+ __decorate([
409
+ ApiProperty(),
410
+ IsString(),
411
+ __metadata("design:type", String)
412
+ ], CredentialOfferMessage.prototype, "issuer", void 0);
413
+ __decorate([
414
+ ApiProperty({ type: [CredentialOfferObject] }),
415
+ IsArray(),
416
+ ValidateNested({ each: true }),
417
+ Type(() => CredentialOfferObject),
418
+ __metadata("design:type", Array)
419
+ ], CredentialOfferMessage.prototype, "credentials", void 0);
420
+ export class IssuerMetadata {
421
+ "@context";
422
+ type;
423
+ issuer;
424
+ credentialsSupported;
425
+ }
426
+ __decorate([
427
+ ApiProperty({ example: ["https://w3id.org/dspace-dcp/v1.0/dcp.jsonld"] }),
428
+ IsString({ each: true }),
429
+ ArrayMinSize(1),
430
+ ArrayContains(["https://w3id.org/dspace-dcp/v1.0/dcp.jsonld"]),
431
+ __metadata("design:type", Array)
432
+ ], IssuerMetadata.prototype, "@context", void 0);
433
+ __decorate([
434
+ ApiProperty({ example: "IssuerMetadata" }),
435
+ IsString(),
436
+ Equals("IssuerMetadata"),
437
+ __metadata("design:type", String)
438
+ ], IssuerMetadata.prototype, "type", void 0);
439
+ __decorate([
440
+ ApiProperty(),
441
+ IsString(),
442
+ __metadata("design:type", String)
443
+ ], IssuerMetadata.prototype, "issuer", void 0);
444
+ __decorate([
445
+ ApiProperty({ type: [CredentialObject] }),
446
+ IsArray(),
447
+ ValidateNested({ each: true }),
448
+ Type(() => CredentialObject),
449
+ __metadata("design:type", Array)
450
+ ], IssuerMetadata.prototype, "credentialsSupported", void 0);
451
+ let CredentialStatus = class CredentialStatus {
452
+ "@context";
453
+ type;
454
+ issuerPid;
455
+ holderPid;
456
+ status;
457
+ };
458
+ __decorate([
459
+ ApiProperty({ example: ["https://w3id.org/dspace-dcp/v1.0/dcp.jsonld"] }),
460
+ IsString({ each: true }),
461
+ ArrayMinSize(1),
462
+ ArrayContains(["https://w3id.org/dspace-dcp/v1.0/dcp.jsonld"]),
463
+ __metadata("design:type", Array)
464
+ ], CredentialStatus.prototype, "@context", void 0);
465
+ __decorate([
466
+ ApiProperty({ example: "CredentialStatus" }),
467
+ IsString(),
468
+ Equals("CredentialStatus"),
469
+ __metadata("design:type", String)
470
+ ], CredentialStatus.prototype, "type", void 0);
471
+ __decorate([
472
+ ApiProperty(),
473
+ IsString(),
474
+ __metadata("design:type", String)
475
+ ], CredentialStatus.prototype, "issuerPid", void 0);
476
+ __decorate([
477
+ ApiProperty(),
478
+ IsString(),
479
+ __metadata("design:type", String)
480
+ ], CredentialStatus.prototype, "holderPid", void 0);
481
+ __decorate([
482
+ ApiProperty({ enum: ["RECEIVED", "REJECTED", "ISSUED"] }),
483
+ IsString(),
484
+ __metadata("design:type", String)
485
+ ], CredentialStatus.prototype, "status", void 0);
486
+ CredentialStatus = __decorate([
487
+ ApiSchema({ name: "DCPCredentialStatus" })
488
+ ], CredentialStatus);
489
+ export { CredentialStatus };
@@ -0,0 +1,88 @@
1
+ /**
2
+ * DCQL Claims Path Pointer - points to specific claims within a credential
3
+ * Supports JSON path syntax with strings, numbers, and null for array selection
4
+ */
5
+ export declare class ClaimsPathPointer {
6
+ path: (string | number | null)[];
7
+ }
8
+ /**
9
+ * Claims Query - specifies individual claims to request from a credential
10
+ */
11
+ export declare class ClaimsQuery {
12
+ id?: string;
13
+ path: (string | number | null)[];
14
+ values?: (string | number | boolean)[];
15
+ }
16
+ /**
17
+ * Trusted Authorities Query - specifies trusted issuers or trust frameworks
18
+ */
19
+ export declare class TrustedAuthoritiesQuery {
20
+ type: string;
21
+ values: string[];
22
+ }
23
+ /**
24
+ * Meta parameters for credential queries - format-specific metadata
25
+ */
26
+ export declare class CredentialMeta {
27
+ vct_values?: string[];
28
+ type_values?: string[][];
29
+ doctype_value?: string;
30
+ [key: string]: unknown;
31
+ }
32
+ /**
33
+ * Credential Query - specifies requirements for a single credential
34
+ */
35
+ export declare class CredentialQuery {
36
+ id: string;
37
+ format: string;
38
+ multiple?: boolean;
39
+ meta: CredentialMeta;
40
+ trusted_authorities?: TrustedAuthoritiesQuery[];
41
+ require_cryptographic_holder_binding?: boolean;
42
+ claims?: ClaimsQuery[];
43
+ claim_sets?: string[][];
44
+ }
45
+ /**
46
+ * Credential Set Query - specifies alternative credential combinations
47
+ */
48
+ export declare class CredentialSetQuery {
49
+ options: string[][];
50
+ required?: boolean;
51
+ }
52
+ /**
53
+ * Digital Credentials Query Language (DCQL) main query object
54
+ */
55
+ export declare class DcqlQuery {
56
+ credentials: CredentialQuery[];
57
+ credential_sets?: CredentialSetQuery[];
58
+ }
59
+ /**
60
+ * Enhanced Authorization Request with DCQL support
61
+ */
62
+ export declare class OID4VPAuthorizationRequest {
63
+ response_type: string;
64
+ response_mode: string;
65
+ client_id: string;
66
+ redirect_uri?: string;
67
+ response_uri?: string;
68
+ dcql_query: DcqlQuery;
69
+ nonce: string;
70
+ state?: string;
71
+ client_metadata?: Record<string, unknown>;
72
+ transaction_data?: string[];
73
+ verifier_info?: Record<string, unknown>[];
74
+ request_uri_method?: string;
75
+ }
76
+ /**
77
+ * VP Token structure according to OID4VP 1.0-final
78
+ */
79
+ export declare class VpToken {
80
+ [credentialId: string]: string[];
81
+ }
82
+ /**
83
+ * Enhanced Authorization Response with VP Token
84
+ */
85
+ export declare class OID4VPAuthorizationResponse {
86
+ vp_token: VpToken;
87
+ state: string;
88
+ }