@tsg-dsp/tsg-sdk 0.0.0-stage → 0.20.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 (190) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +273 -2
  3. package/dist/.generated/control-plane.d.ts +7882 -0
  4. package/dist/.generated/sso-bridge.d.ts +3062 -0
  5. package/dist/.generated/wallet.d.ts +6350 -0
  6. package/dist/auth/auth.provider.d.ts +45 -0
  7. package/dist/auth/auth.provider.d.ts.map +1 -0
  8. package/dist/auth/auth.provider.js +158 -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 +1243 -0
  19. package/dist/browser.d.ts.map +1 -0
  20. package/dist/browser.js +215 -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 +107 -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 +81 -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 +17 -0
  43. package/dist/index.d.ts.map +1 -0
  44. package/dist/index.js +24 -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 +111 -0
  51. package/dist/metadata/metadata.sdk.d.ts.map +1 -0
  52. package/dist/metadata/metadata.sdk.js +142 -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 +147 -0
  81. package/dist/sso/sso.sdk.js.map +1 -0
  82. package/dist/transfers/index.d.ts +2 -0
  83. package/dist/transfers/index.d.ts.map +1 -0
  84. package/dist/transfers/index.js +2 -0
  85. package/dist/transfers/index.js.map +1 -0
  86. package/dist/transfers/transfers.sdk.d.ts +155 -0
  87. package/dist/transfers/transfers.sdk.d.ts.map +1 -0
  88. package/dist/transfers/transfers.sdk.js +186 -0
  89. package/dist/transfers/transfers.sdk.js.map +1 -0
  90. package/dist/tsg-sdk.d.ts +65 -0
  91. package/dist/tsg-sdk.d.ts.map +1 -0
  92. package/dist/tsg-sdk.js +128 -0
  93. package/dist/tsg-sdk.js.map +1 -0
  94. package/dist/utils/errors.d.ts +67 -0
  95. package/dist/utils/errors.d.ts.map +1 -0
  96. package/dist/utils/errors.js +79 -0
  97. package/dist/utils/errors.js.map +1 -0
  98. package/dist/utils/index.d.ts +4 -0
  99. package/dist/utils/index.d.ts.map +1 -0
  100. package/dist/utils/index.js +4 -0
  101. package/dist/utils/index.js.map +1 -0
  102. package/dist/utils/polling.d.ts +20 -0
  103. package/dist/utils/polling.d.ts.map +1 -0
  104. package/dist/utils/polling.js +35 -0
  105. package/dist/utils/polling.js.map +1 -0
  106. package/dist/utils/shape-validation.d.ts +59 -0
  107. package/dist/utils/shape-validation.d.ts.map +1 -0
  108. package/dist/utils/shape-validation.js +85 -0
  109. package/dist/utils/shape-validation.js.map +1 -0
  110. package/dist/utils/validate.d.ts +47 -0
  111. package/dist/utils/validate.d.ts.map +1 -0
  112. package/dist/utils/validate.js +68 -0
  113. package/dist/utils/validate.js.map +1 -0
  114. package/dist/vendor/common-dtos/abac.policy.d.ts +60 -0
  115. package/dist/vendor/common-dtos/abac.policy.js +2 -0
  116. package/dist/vendor/common-dtos/audit.types.d.ts +74 -0
  117. package/dist/vendor/common-dtos/audit.types.js +9 -0
  118. package/dist/vendor/common-dtos/credential-requirements.d.ts +19 -0
  119. package/dist/vendor/common-dtos/credential-requirements.dto.d.ts +47 -0
  120. package/dist/vendor/common-dtos/credential-requirements.dto.js +251 -0
  121. package/dist/vendor/common-dtos/credential-requirements.js +181 -0
  122. package/dist/vendor/common-dtos/dataplane.dto.d.ts +6 -0
  123. package/dist/vendor/common-dtos/dataplane.dto.js +29 -0
  124. package/dist/vendor/common-dtos/dcp.dto.d.ts +90 -0
  125. package/dist/vendor/common-dtos/dcp.dto.js +490 -0
  126. package/dist/vendor/common-dtos/dcql.dto.d.ts +89 -0
  127. package/dist/vendor/common-dtos/dcql.dto.js +450 -0
  128. package/dist/vendor/common-dtos/did.schemas.d.ts +40 -0
  129. package/dist/vendor/common-dtos/did.schemas.js +260 -0
  130. package/dist/vendor/common-dtos/index.d.ts +19 -0
  131. package/dist/vendor/common-dtos/index.js +19 -0
  132. package/dist/vendor/common-dtos/metadata.dto.d.ts +6 -0
  133. package/dist/vendor/common-dtos/metadata.dto.js +30 -0
  134. package/dist/vendor/common-dtos/negotiations.dto.d.ts +29 -0
  135. package/dist/vendor/common-dtos/negotiations.dto.js +205 -0
  136. package/dist/vendor/common-dtos/permissions.d.ts +237 -0
  137. package/dist/vendor/common-dtos/permissions.js +337 -0
  138. package/dist/vendor/common-dtos/presentation.request.dto.d.ts +9 -0
  139. package/dist/vendor/common-dtos/presentation.request.dto.js +55 -0
  140. package/dist/vendor/common-dtos/presentation.status.dto.d.ts +13 -0
  141. package/dist/vendor/common-dtos/presentation.status.dto.js +83 -0
  142. package/dist/vendor/common-dtos/presentationdefinition.dto.d.ts +75 -0
  143. package/dist/vendor/common-dtos/presentationdefinition.dto.js +448 -0
  144. package/dist/vendor/common-dtos/signatures.dto.d.ts +32 -0
  145. package/dist/vendor/common-dtos/signatures.dto.js +210 -0
  146. package/dist/vendor/common-dtos/transfer.dto.d.ts +17 -0
  147. package/dist/vendor/common-dtos/transfer.dto.js +102 -0
  148. package/dist/vendor/common-dtos/utils.swagger.d.ts +13 -0
  149. package/dist/vendor/common-dtos/utils.swagger.js +63 -0
  150. package/dist/vendor/control-plane-dtos/index.d.ts +5 -0
  151. package/dist/vendor/control-plane-dtos/index.js +5 -0
  152. package/dist/vendor/control-plane-dtos/registry/registry.dto.d.ts +5 -0
  153. package/dist/vendor/control-plane-dtos/registry/registry.dto.js +26 -0
  154. package/dist/vendor/control-plane-dtos/registry/registry.search.dto.d.ts +29 -0
  155. package/dist/vendor/control-plane-dtos/registry/registry.search.dto.js +127 -0
  156. package/dist/vendor/control-plane-dtos/ssi/verifiablePresentations.dto.d.ts +10 -0
  157. package/dist/vendor/control-plane-dtos/ssi/verifiablePresentations.dto.js +44 -0
  158. package/dist/vendor/control-plane-dtos/status/status.dto.d.ts +38 -0
  159. package/dist/vendor/control-plane-dtos/status/status.dto.js +173 -0
  160. package/dist/vendor/sso-bridge-dtos/clients.dto.d.ts +22 -0
  161. package/dist/vendor/sso-bridge-dtos/clients.dto.js +113 -0
  162. package/dist/vendor/sso-bridge-dtos/grants.d.ts +3 -0
  163. package/dist/vendor/sso-bridge-dtos/grants.js +2 -0
  164. package/dist/vendor/sso-bridge-dtos/index.d.ts +5 -0
  165. package/dist/vendor/sso-bridge-dtos/index.js +5 -0
  166. package/dist/vendor/sso-bridge-dtos/users.dto.d.ts +24 -0
  167. package/dist/vendor/sso-bridge-dtos/users.dto.js +90 -0
  168. package/dist/vendor/wallet-dtos/clients.dto.d.ts +22 -0
  169. package/dist/vendor/wallet-dtos/clients.dto.js +14 -0
  170. package/dist/vendor/wallet-dtos/credentials.dto.d.ts +32 -0
  171. package/dist/vendor/wallet-dtos/credentials.dto.js +47 -0
  172. package/dist/vendor/wallet-dtos/index.d.ts +7 -0
  173. package/dist/vendor/wallet-dtos/index.js +7 -0
  174. package/dist/vendor/wallet-dtos/issuance.dto.d.ts +238 -0
  175. package/dist/vendor/wallet-dtos/issuance.dto.js +1140 -0
  176. package/dist/vendor/wallet-dtos/scopes.dto.d.ts +25 -0
  177. package/dist/vendor/wallet-dtos/scopes.dto.js +152 -0
  178. package/dist/vendor/wallet-dtos/status.dto.d.ts +36 -0
  179. package/dist/vendor/wallet-dtos/status.dto.js +170 -0
  180. package/dist/vendor/wallet-dtos/utils/schema-converter.d.ts +14 -0
  181. package/dist/vendor/wallet-dtos/utils/schema-converter.js +43 -0
  182. package/dist/wallet/index.d.ts +2 -0
  183. package/dist/wallet/index.d.ts.map +1 -0
  184. package/dist/wallet/index.js +2 -0
  185. package/dist/wallet/index.js.map +1 -0
  186. package/dist/wallet/wallet.sdk.d.ts +285 -0
  187. package/dist/wallet/wallet.sdk.d.ts.map +1 -0
  188. package/dist/wallet/wallet.sdk.js +384 -0
  189. package/dist/wallet/wallet.sdk.js.map +1 -0
  190. package/package.json +78 -3
@@ -0,0 +1,83 @@
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 { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
11
+ import { IsBoolean, IsEnum, IsNumberString, IsOptional, IsString } from "class-validator";
12
+ export class CredentialStatusRequest {
13
+ statusListCredential;
14
+ statusListIndex;
15
+ optionalField;
16
+ }
17
+ __decorate([
18
+ ApiProperty({
19
+ example: "credential-identifier-123"
20
+ }),
21
+ IsString(),
22
+ __metadata("design:type", String)
23
+ ], CredentialStatusRequest.prototype, "statusListCredential", void 0);
24
+ __decorate([
25
+ ApiProperty({
26
+ example: "1"
27
+ }),
28
+ IsNumberString(),
29
+ __metadata("design:type", String)
30
+ ], CredentialStatusRequest.prototype, "statusListIndex", void 0);
31
+ __decorate([
32
+ ApiPropertyOptional({
33
+ example: "Additional optional data"
34
+ }),
35
+ IsOptional(),
36
+ IsString(),
37
+ __metadata("design:type", String)
38
+ ], CredentialStatusRequest.prototype, "optionalField", void 0);
39
+ export class VerifiedCredentialStatus {
40
+ statusListCredential;
41
+ statusListIndex;
42
+ statusPurpose;
43
+ status;
44
+ message;
45
+ }
46
+ __decorate([
47
+ ApiProperty({
48
+ example: "credential-identifier-123"
49
+ }),
50
+ IsString(),
51
+ __metadata("design:type", String)
52
+ ], VerifiedCredentialStatus.prototype, "statusListCredential", void 0);
53
+ __decorate([
54
+ ApiProperty({
55
+ example: "1"
56
+ }),
57
+ IsNumberString(),
58
+ __metadata("design:type", String)
59
+ ], VerifiedCredentialStatus.prototype, "statusListIndex", void 0);
60
+ __decorate([
61
+ ApiProperty({
62
+ example: "refresh",
63
+ enum: ["refresh", "revocation", "suspension", "message"]
64
+ }),
65
+ IsEnum(["refresh", "revocation", "suspension", "message"]),
66
+ __metadata("design:type", String)
67
+ ], VerifiedCredentialStatus.prototype, "statusPurpose", void 0);
68
+ __decorate([
69
+ ApiProperty({
70
+ example: true
71
+ }),
72
+ IsBoolean(),
73
+ __metadata("design:type", Boolean)
74
+ ], VerifiedCredentialStatus.prototype, "status", void 0);
75
+ __decorate([
76
+ ApiPropertyOptional({
77
+ example: "Optional verification message"
78
+ }),
79
+ IsOptional(),
80
+ IsString(),
81
+ __metadata("design:type", String)
82
+ ], VerifiedCredentialStatus.prototype, "message", void 0);
83
+ //# sourceMappingURL=presentation.status.dto.js.map
@@ -0,0 +1,75 @@
1
+ export declare class JwtVpClaimFormat {
2
+ alg: string[];
3
+ }
4
+ export declare class Format {
5
+ jwt_vp?: JwtVpClaimFormat;
6
+ }
7
+ export declare class PresentationDefinition {
8
+ id: string;
9
+ input_descriptors: InputDescriptor[];
10
+ name?: string;
11
+ purpose?: string;
12
+ format?: Format;
13
+ }
14
+ export declare class Constraint {
15
+ fields?: Field[];
16
+ limit_disclosure?: "required" | "preferred";
17
+ }
18
+ export declare class InputDescriptor {
19
+ id: string;
20
+ name?: string;
21
+ purpose?: string;
22
+ format?: Format;
23
+ constraints: Constraint;
24
+ }
25
+ export declare class FilterItems {
26
+ const?: number | string;
27
+ enum?: Array<number | string>;
28
+ exclusiveMinimum?: number | string;
29
+ exclusiveMaximum?: number | string;
30
+ format?: string;
31
+ minLength?: number;
32
+ maxLength?: number;
33
+ minimum?: number | string;
34
+ maximum?: number | string;
35
+ not?: FilterItems;
36
+ pattern?: string;
37
+ contains?: FilterItems;
38
+ required?: string[];
39
+ properties?: Record<string, Filter>;
40
+ allOf?: NestedFilter[];
41
+ items?: Record<string, Filter>;
42
+ }
43
+ export declare class NestedFilter extends FilterItems {
44
+ type?: string;
45
+ }
46
+ export declare class Filter extends FilterItems {
47
+ type: string;
48
+ }
49
+ export declare class Field {
50
+ path: string[];
51
+ id?: string;
52
+ purpose?: string;
53
+ name?: string;
54
+ filter?: Filter;
55
+ optional?: boolean;
56
+ }
57
+ export declare class PresentationSubmission {
58
+ id: string;
59
+ definition_id: string;
60
+ descriptor_map: DescriptorMap[];
61
+ }
62
+ export declare class PresentationResponse {
63
+ vp_token: string;
64
+ presentation_submission: PresentationSubmission;
65
+ }
66
+ export declare class DescriptorMap {
67
+ id: string;
68
+ format: string;
69
+ path: string;
70
+ path_nested?: DescriptorMap;
71
+ }
72
+ export declare class AuthorizationResponse extends PresentationResponse {
73
+ state: string;
74
+ }
75
+ //# sourceMappingURL=presentationdefinition.dto.d.ts.map
@@ -0,0 +1,448 @@
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 { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
11
+ import { Type } from "class-transformer";
12
+ import { IsArray, IsBoolean, IsEnum, IsObject, IsOptional, IsString, ValidateNested } from "class-validator";
13
+ export class JwtVpClaimFormat {
14
+ alg;
15
+ }
16
+ __decorate([
17
+ ApiProperty({ type: [String], example: ["Ed25519"] }),
18
+ IsArray(),
19
+ IsString({ each: true }),
20
+ __metadata("design:type", Array)
21
+ ], JwtVpClaimFormat.prototype, "alg", void 0);
22
+ export class Format {
23
+ jwt_vp;
24
+ }
25
+ __decorate([
26
+ ApiPropertyOptional({
27
+ type: () => JwtVpClaimFormat,
28
+ example: { alg: ["ES256"] }
29
+ }),
30
+ IsOptional(),
31
+ ValidateNested(),
32
+ Type(() => JwtVpClaimFormat),
33
+ __metadata("design:type", JwtVpClaimFormat)
34
+ ], Format.prototype, "jwt_vp", void 0);
35
+ export class PresentationDefinition {
36
+ id;
37
+ input_descriptors;
38
+ name;
39
+ purpose;
40
+ format;
41
+ }
42
+ __decorate([
43
+ ApiProperty({ example: "44d1f3d6-f65d-4a7c-84db-f92ba826305e" }),
44
+ IsString(),
45
+ __metadata("design:type", String)
46
+ ], PresentationDefinition.prototype, "id", void 0);
47
+ __decorate([
48
+ ApiProperty({ type: () => [InputDescriptor] }),
49
+ IsArray(),
50
+ ValidateNested({ each: true }),
51
+ Type(() => InputDescriptor),
52
+ __metadata("design:type", Array)
53
+ ], PresentationDefinition.prototype, "input_descriptors", void 0);
54
+ __decorate([
55
+ ApiPropertyOptional({ example: "Example Presentation Definition" }),
56
+ IsOptional(),
57
+ IsString(),
58
+ __metadata("design:type", String)
59
+ ], PresentationDefinition.prototype, "name", void 0);
60
+ __decorate([
61
+ ApiPropertyOptional({ example: "Example Purpose" }),
62
+ IsOptional(),
63
+ IsString(),
64
+ __metadata("design:type", String)
65
+ ], PresentationDefinition.prototype, "purpose", void 0);
66
+ __decorate([
67
+ ApiPropertyOptional({
68
+ type: () => Format,
69
+ example: { jwt_vp: { alg: ["ES256"] } }
70
+ }),
71
+ IsOptional(),
72
+ ValidateNested(),
73
+ Type(() => Format),
74
+ __metadata("design:type", Format)
75
+ ], PresentationDefinition.prototype, "format", void 0);
76
+ export class Constraint {
77
+ fields;
78
+ limit_disclosure;
79
+ }
80
+ __decorate([
81
+ ApiPropertyOptional({
82
+ type: () => [Field],
83
+ example: [
84
+ {
85
+ path: ["$.example"],
86
+ id: "example-field",
87
+ purpose: "Example purpose",
88
+ name: "Example Name",
89
+ filter: { type: "string", pattern: "^[A-Za-z]+$" },
90
+ optional: false
91
+ }
92
+ ]
93
+ }),
94
+ IsOptional(),
95
+ IsArray(),
96
+ ValidateNested({ each: true }),
97
+ Type(() => Field),
98
+ __metadata("design:type", Array)
99
+ ], Constraint.prototype, "fields", void 0);
100
+ __decorate([
101
+ ApiPropertyOptional({
102
+ enum: ["required", "preferred"],
103
+ example: "preferred"
104
+ }),
105
+ IsOptional(),
106
+ IsEnum(["required", "preferred"]),
107
+ __metadata("design:type", String)
108
+ ], Constraint.prototype, "limit_disclosure", void 0);
109
+ export class InputDescriptor {
110
+ id;
111
+ name;
112
+ purpose;
113
+ format;
114
+ constraints;
115
+ }
116
+ __decorate([
117
+ ApiProperty({ example: "44d1f3d6-f65d-4a7c-84db-f92ba826305e" }),
118
+ IsString(),
119
+ __metadata("design:type", String)
120
+ ], InputDescriptor.prototype, "id", void 0);
121
+ __decorate([
122
+ ApiPropertyOptional({ example: "Example Input Descriptor" }),
123
+ IsOptional(),
124
+ IsString(),
125
+ __metadata("design:type", String)
126
+ ], InputDescriptor.prototype, "name", void 0);
127
+ __decorate([
128
+ ApiPropertyOptional({ example: "Example Purpose" }),
129
+ IsOptional(),
130
+ IsString(),
131
+ __metadata("design:type", String)
132
+ ], InputDescriptor.prototype, "purpose", void 0);
133
+ __decorate([
134
+ ApiPropertyOptional({
135
+ type: () => Format,
136
+ example: { jwt_vp: { alg: ["ES256"] } }
137
+ }),
138
+ IsOptional(),
139
+ ValidateNested(),
140
+ Type(() => Format),
141
+ __metadata("design:type", Format)
142
+ ], InputDescriptor.prototype, "format", void 0);
143
+ __decorate([
144
+ ApiProperty({
145
+ type: () => Constraint,
146
+ example: { fields: [], limit_disclosure: "preferred" }
147
+ }),
148
+ ValidateNested(),
149
+ Type(() => Constraint),
150
+ __metadata("design:type", Constraint)
151
+ ], InputDescriptor.prototype, "constraints", void 0);
152
+ export class FilterItems {
153
+ const;
154
+ enum;
155
+ exclusiveMinimum;
156
+ exclusiveMaximum;
157
+ format;
158
+ minLength;
159
+ maxLength;
160
+ minimum;
161
+ maximum;
162
+ not;
163
+ pattern;
164
+ contains;
165
+ required;
166
+ properties;
167
+ allOf;
168
+ items;
169
+ }
170
+ __decorate([
171
+ ApiPropertyOptional({
172
+ oneOf: [{ type: "string" }, { type: "number" }],
173
+ example: "example-const"
174
+ }),
175
+ IsOptional(),
176
+ __metadata("design:type", Object)
177
+ ], FilterItems.prototype, "const", void 0);
178
+ __decorate([
179
+ ApiPropertyOptional({
180
+ type: "array",
181
+ items: { oneOf: [{ type: "string" }, { type: "number" }] },
182
+ example: [1, "two"]
183
+ }),
184
+ IsOptional(),
185
+ IsArray(),
186
+ __metadata("design:type", Array)
187
+ ], FilterItems.prototype, "enum", void 0);
188
+ __decorate([
189
+ ApiPropertyOptional({
190
+ oneOf: [{ type: "string" }, { type: "number" }],
191
+ example: 0
192
+ }),
193
+ IsOptional(),
194
+ __metadata("design:type", Object)
195
+ ], FilterItems.prototype, "exclusiveMinimum", void 0);
196
+ __decorate([
197
+ ApiPropertyOptional({
198
+ oneOf: [{ type: "string" }, { type: "number" }],
199
+ example: 100
200
+ }),
201
+ IsOptional(),
202
+ __metadata("design:type", Object)
203
+ ], FilterItems.prototype, "exclusiveMaximum", void 0);
204
+ __decorate([
205
+ ApiPropertyOptional({ example: "date-time" }),
206
+ IsOptional(),
207
+ IsString(),
208
+ __metadata("design:type", String)
209
+ ], FilterItems.prototype, "format", void 0);
210
+ __decorate([
211
+ ApiPropertyOptional({ example: 1 }),
212
+ IsOptional(),
213
+ __metadata("design:type", Number)
214
+ ], FilterItems.prototype, "minLength", void 0);
215
+ __decorate([
216
+ ApiPropertyOptional({ example: 255 }),
217
+ IsOptional(),
218
+ __metadata("design:type", Number)
219
+ ], FilterItems.prototype, "maxLength", void 0);
220
+ __decorate([
221
+ ApiPropertyOptional({
222
+ oneOf: [{ type: "string" }, { type: "number" }],
223
+ example: 0
224
+ }),
225
+ IsOptional(),
226
+ __metadata("design:type", Object)
227
+ ], FilterItems.prototype, "minimum", void 0);
228
+ __decorate([
229
+ ApiPropertyOptional({
230
+ oneOf: [{ type: "string" }, { type: "number" }],
231
+ example: 100
232
+ }),
233
+ IsOptional(),
234
+ __metadata("design:type", Object)
235
+ ], FilterItems.prototype, "maximum", void 0);
236
+ __decorate([
237
+ ApiPropertyOptional({ type: () => NestedFilter, example: null }),
238
+ IsOptional(),
239
+ ValidateNested(),
240
+ Type(() => NestedFilter),
241
+ __metadata("design:type", FilterItems)
242
+ ], FilterItems.prototype, "not", void 0);
243
+ __decorate([
244
+ ApiPropertyOptional({ example: "^[A-Za-z]+$" }),
245
+ IsOptional(),
246
+ IsString(),
247
+ __metadata("design:type", String)
248
+ ], FilterItems.prototype, "pattern", void 0);
249
+ __decorate([
250
+ ApiPropertyOptional({ type: () => NestedFilter, example: null }),
251
+ IsOptional(),
252
+ ValidateNested(),
253
+ Type(() => NestedFilter),
254
+ __metadata("design:type", FilterItems)
255
+ ], FilterItems.prototype, "contains", void 0);
256
+ __decorate([
257
+ ApiPropertyOptional({ type: [String], example: ["id"] }),
258
+ IsOptional(),
259
+ IsArray(),
260
+ IsString({ each: true }),
261
+ __metadata("design:type", Array)
262
+ ], FilterItems.prototype, "required", void 0);
263
+ __decorate([
264
+ ApiPropertyOptional({
265
+ type: "object",
266
+ additionalProperties: { $ref: "#/components/schemas/Filter" },
267
+ example: { id: { type: "string", pattern: "^did:web:" } }
268
+ }),
269
+ IsOptional(),
270
+ IsObject(),
271
+ __metadata("design:type", Object)
272
+ ], FilterItems.prototype, "properties", void 0);
273
+ __decorate([
274
+ ApiPropertyOptional({ type: () => [NestedFilter], example: [] }),
275
+ IsOptional(),
276
+ IsArray(),
277
+ ValidateNested({ each: true }),
278
+ Type(() => NestedFilter),
279
+ __metadata("design:type", Array)
280
+ ], FilterItems.prototype, "allOf", void 0);
281
+ __decorate([
282
+ ApiPropertyOptional({
283
+ type: "object",
284
+ additionalProperties: { $ref: "#/components/schemas/Filter" },
285
+ example: { property: { type: "string", format: "default" } }
286
+ }),
287
+ IsOptional(),
288
+ IsObject(),
289
+ __metadata("design:type", Object)
290
+ ], FilterItems.prototype, "items", void 0);
291
+ export class NestedFilter extends FilterItems {
292
+ type;
293
+ }
294
+ __decorate([
295
+ ApiPropertyOptional({ example: "object" }),
296
+ IsOptional(),
297
+ IsString(),
298
+ __metadata("design:type", String)
299
+ ], NestedFilter.prototype, "type", void 0);
300
+ export class Filter extends FilterItems {
301
+ type;
302
+ }
303
+ __decorate([
304
+ ApiProperty({ example: "string" }),
305
+ IsString(),
306
+ __metadata("design:type", String)
307
+ ], Filter.prototype, "type", void 0);
308
+ export class Field {
309
+ path;
310
+ id;
311
+ purpose;
312
+ name;
313
+ filter;
314
+ optional;
315
+ }
316
+ __decorate([
317
+ ApiProperty({ type: [String], example: ["$.example"] }),
318
+ IsArray(),
319
+ IsString({ each: true }),
320
+ __metadata("design:type", Array)
321
+ ], Field.prototype, "path", void 0);
322
+ __decorate([
323
+ ApiPropertyOptional({ example: "field-id" }),
324
+ IsOptional(),
325
+ IsString(),
326
+ __metadata("design:type", String)
327
+ ], Field.prototype, "id", void 0);
328
+ __decorate([
329
+ ApiPropertyOptional({ example: "Field purpose" }),
330
+ IsOptional(),
331
+ IsString(),
332
+ __metadata("design:type", String)
333
+ ], Field.prototype, "purpose", void 0);
334
+ __decorate([
335
+ ApiPropertyOptional({ example: "Field name" }),
336
+ IsOptional(),
337
+ IsString(),
338
+ __metadata("design:type", String)
339
+ ], Field.prototype, "name", void 0);
340
+ __decorate([
341
+ ApiPropertyOptional({
342
+ type: () => Filter,
343
+ example: { type: "string", pattern: "^[A-Za-z]+$" }
344
+ }),
345
+ IsOptional(),
346
+ ValidateNested(),
347
+ Type(() => Filter),
348
+ __metadata("design:type", Filter)
349
+ ], Field.prototype, "filter", void 0);
350
+ __decorate([
351
+ ApiPropertyOptional({ example: true }),
352
+ IsOptional(),
353
+ IsBoolean(),
354
+ __metadata("design:type", Boolean)
355
+ ], Field.prototype, "optional", void 0);
356
+ export class PresentationSubmission {
357
+ id;
358
+ definition_id;
359
+ descriptor_map;
360
+ }
361
+ __decorate([
362
+ ApiProperty({ example: "submission-id" }),
363
+ IsString(),
364
+ __metadata("design:type", String)
365
+ ], PresentationSubmission.prototype, "id", void 0);
366
+ __decorate([
367
+ ApiProperty({ example: "definition-id" }),
368
+ IsString(),
369
+ __metadata("design:type", String)
370
+ ], PresentationSubmission.prototype, "definition_id", void 0);
371
+ __decorate([
372
+ ApiProperty({
373
+ type: () => [DescriptorMap],
374
+ example: [
375
+ {
376
+ id: "desc1",
377
+ format: "jwt",
378
+ path: "$.credential"
379
+ }
380
+ ]
381
+ }),
382
+ IsArray(),
383
+ ValidateNested({ each: true }),
384
+ Type(() => DescriptorMap),
385
+ __metadata("design:type", Array)
386
+ ], PresentationSubmission.prototype, "descriptor_map", void 0);
387
+ export class PresentationResponse {
388
+ vp_token;
389
+ presentation_submission;
390
+ }
391
+ __decorate([
392
+ ApiProperty({ example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9" }),
393
+ IsString(),
394
+ __metadata("design:type", String)
395
+ ], PresentationResponse.prototype, "vp_token", void 0);
396
+ __decorate([
397
+ ApiProperty({
398
+ type: () => PresentationSubmission,
399
+ example: {
400
+ id: "submission-id",
401
+ definition_id: "definition-id",
402
+ descriptor_map: []
403
+ }
404
+ }),
405
+ ValidateNested(),
406
+ Type(() => PresentationSubmission),
407
+ __metadata("design:type", PresentationSubmission)
408
+ ], PresentationResponse.prototype, "presentation_submission", void 0);
409
+ export class DescriptorMap {
410
+ id;
411
+ format;
412
+ path;
413
+ path_nested;
414
+ }
415
+ __decorate([
416
+ ApiProperty({ example: "desc1" }),
417
+ IsString(),
418
+ __metadata("design:type", String)
419
+ ], DescriptorMap.prototype, "id", void 0);
420
+ __decorate([
421
+ ApiProperty({ example: "jwt" }),
422
+ IsString(),
423
+ __metadata("design:type", String)
424
+ ], DescriptorMap.prototype, "format", void 0);
425
+ __decorate([
426
+ ApiProperty({ example: "$.credential" }),
427
+ IsString(),
428
+ __metadata("design:type", String)
429
+ ], DescriptorMap.prototype, "path", void 0);
430
+ __decorate([
431
+ ApiPropertyOptional({
432
+ type: () => DescriptorMap,
433
+ example: { id: "desc-nested", format: "jwt", path: "$.nested" }
434
+ }),
435
+ IsOptional(),
436
+ ValidateNested(),
437
+ Type(() => DescriptorMap),
438
+ __metadata("design:type", DescriptorMap)
439
+ ], DescriptorMap.prototype, "path_nested", void 0);
440
+ export class AuthorizationResponse extends PresentationResponse {
441
+ state;
442
+ }
443
+ __decorate([
444
+ ApiProperty({ example: "state123" }),
445
+ IsString(),
446
+ __metadata("design:type", String)
447
+ ], AuthorizationResponse.prototype, "state", void 0);
448
+ //# sourceMappingURL=presentationdefinition.dto.js.map
@@ -0,0 +1,32 @@
1
+ import { DataIntegrityProof, OrArray } from "@tsg-dsp/common-dsp";
2
+ export declare class ProofDocument {
3
+ proof: OrArray<DataIntegrityProof>;
4
+ [key: string]: any;
5
+ }
6
+ export declare class SignRequest {
7
+ plainDocument: Record<string, any>;
8
+ keyId?: string;
9
+ normalization: "RDFC" | "JCS";
10
+ proofPurpose: string;
11
+ options: Partial<DataIntegrityProof>;
12
+ embeddedVerificationMethod: boolean;
13
+ }
14
+ export declare class ValidateRequest {
15
+ proofDocument?: ProofDocument;
16
+ }
17
+ export declare class SignedJwtResponse {
18
+ jwt: string;
19
+ }
20
+ export declare class ValidateJWTRequest {
21
+ jwt: string;
22
+ jti?: boolean;
23
+ }
24
+ export declare class SignRequestJwt {
25
+ body: Record<string, any>;
26
+ audience?: string;
27
+ keyId?: string;
28
+ expirationTime?: string;
29
+ subject?: string;
30
+ typ?: string;
31
+ }
32
+ //# sourceMappingURL=signatures.dto.d.ts.map