@truvity/sdk 0.38.2 → 0.40.13

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 (955) hide show
  1. package/Client.d.ts +5 -0
  2. package/Client.d.ts.map +1 -1
  3. package/Client.js +10 -4
  4. package/Client.js.map +1 -1
  5. package/ExtendedClient.d.ts +2 -1
  6. package/ExtendedClient.d.ts.map +1 -1
  7. package/ExtendedClient.js +6 -0
  8. package/ExtendedClient.js.map +1 -1
  9. package/api/resources/apiKeys/client/Client.d.ts +2 -0
  10. package/api/resources/apiKeys/client/Client.d.ts.map +1 -1
  11. package/api/resources/apiKeys/client/Client.js +45 -27
  12. package/api/resources/apiKeys/client/Client.js.map +1 -1
  13. package/api/resources/apiKeys/client/requests/ApiKeyHistoryRequest.d.ts +1 -3
  14. package/api/resources/apiKeys/client/requests/ApiKeyHistoryRequest.d.ts.map +1 -1
  15. package/api/resources/apiKeys/client/requests/ApiKeyHistoryRequest.js.map +1 -1
  16. package/api/resources/apiKeys/client/requests/ApiKeyLatestRequest.d.ts +1 -3
  17. package/api/resources/apiKeys/client/requests/ApiKeyLatestRequest.d.ts.map +1 -1
  18. package/api/resources/apiKeys/client/requests/ApiKeyLatestRequest.js.map +1 -1
  19. package/api/resources/apiKeys/client/requests/ApiKeyRevisionRequest.d.ts +1 -3
  20. package/api/resources/apiKeys/client/requests/ApiKeyRevisionRequest.d.ts.map +1 -1
  21. package/api/resources/apiKeys/client/requests/ApiKeyRevisionRequest.js.map +1 -1
  22. package/api/resources/credentials/client/Client.d.ts +23 -1
  23. package/api/resources/credentials/client/Client.d.ts.map +1 -1
  24. package/api/resources/credentials/client/Client.js +178 -41
  25. package/api/resources/credentials/client/Client.js.map +1 -1
  26. package/api/resources/credentials/client/requests/CredentialDownloadRequest.d.ts +5 -3
  27. package/api/resources/credentials/client/requests/CredentialDownloadRequest.d.ts.map +1 -1
  28. package/api/resources/credentials/client/requests/CredentialDownloadRequest.js.map +1 -1
  29. package/api/resources/credentials/client/requests/CredentialHistoryRequest.d.ts +1 -3
  30. package/api/resources/credentials/client/requests/CredentialHistoryRequest.d.ts.map +1 -1
  31. package/api/resources/credentials/client/requests/CredentialHistoryRequest.js.map +1 -1
  32. package/api/resources/credentials/client/requests/CredentialImportRequest.d.ts +2 -6
  33. package/api/resources/credentials/client/requests/CredentialImportRequest.d.ts.map +1 -1
  34. package/api/resources/credentials/client/requests/CredentialImportRequest.js.map +1 -1
  35. package/api/resources/credentials/client/requests/CredentialLatestRequest.d.ts +1 -3
  36. package/api/resources/credentials/client/requests/CredentialLatestRequest.d.ts.map +1 -1
  37. package/api/resources/credentials/client/requests/CredentialLatestRequest.js.map +1 -1
  38. package/api/resources/credentials/client/requests/CredentialRevisionRequest.d.ts +1 -3
  39. package/api/resources/credentials/client/requests/CredentialRevisionRequest.d.ts.map +1 -1
  40. package/api/resources/credentials/client/requests/CredentialRevisionRequest.js.map +1 -1
  41. package/api/resources/credentials/client/requests/CredentialVerifyRequest.d.ts +10 -0
  42. package/api/resources/credentials/client/requests/CredentialVerifyRequest.d.ts.map +1 -0
  43. package/api/{types/DraftFieldDateTimeValue.js → resources/credentials/client/requests/CredentialVerifyRequest.js} +1 -1
  44. package/api/resources/credentials/client/requests/CredentialVerifyRequest.js.map +1 -0
  45. package/api/resources/credentials/client/requests/GetCredentialClaimValuesRequest.d.ts +10 -0
  46. package/api/resources/credentials/client/requests/GetCredentialClaimValuesRequest.d.ts.map +1 -0
  47. package/api/resources/credentials/client/requests/GetCredentialClaimValuesRequest.js +6 -0
  48. package/api/resources/credentials/client/requests/GetCredentialClaimValuesRequest.js.map +1 -0
  49. package/api/resources/credentials/client/requests/index.d.ts +2 -0
  50. package/api/resources/credentials/client/requests/index.d.ts.map +1 -1
  51. package/api/resources/credentials/client/requests/index.js.map +1 -1
  52. package/api/resources/desk/client/Client.d.ts +15 -7
  53. package/api/resources/desk/client/Client.d.ts.map +1 -1
  54. package/api/resources/desk/client/Client.js +58 -40
  55. package/api/resources/desk/client/Client.js.map +1 -1
  56. package/api/resources/desk/client/requests/DidCommMessageRecvRequest.d.ts +13 -0
  57. package/api/resources/desk/client/requests/DidCommMessageRecvRequest.d.ts.map +1 -0
  58. package/api/resources/desk/client/requests/DidCommMessageRecvRequest.js +6 -0
  59. package/api/resources/desk/client/requests/DidCommMessageRecvRequest.js.map +1 -0
  60. package/api/resources/desk/client/requests/PublishedJsonLdVocabFetchRequest.d.ts +10 -0
  61. package/api/resources/desk/client/requests/PublishedJsonLdVocabFetchRequest.d.ts.map +1 -0
  62. package/api/resources/desk/client/requests/PublishedJsonLdVocabFetchRequest.js +6 -0
  63. package/api/resources/desk/client/requests/PublishedJsonLdVocabFetchRequest.js.map +1 -0
  64. package/api/resources/desk/client/requests/PublishedJsonSchemaFetchRequest.d.ts +10 -0
  65. package/api/resources/desk/client/requests/PublishedJsonSchemaFetchRequest.d.ts.map +1 -0
  66. package/api/resources/desk/client/requests/PublishedJsonSchemaFetchRequest.js +6 -0
  67. package/api/resources/desk/client/requests/PublishedJsonSchemaFetchRequest.js.map +1 -0
  68. package/api/resources/desk/client/requests/PublishedMetaSchemaFetchRequest.d.ts +10 -0
  69. package/api/resources/desk/client/requests/PublishedMetaSchemaFetchRequest.d.ts.map +1 -0
  70. package/api/resources/desk/client/requests/PublishedMetaSchemaFetchRequest.js +6 -0
  71. package/api/resources/desk/client/requests/PublishedMetaSchemaFetchRequest.js.map +1 -0
  72. package/api/resources/desk/client/requests/PublishedVcdmJsonSchemaFetchRequest.d.ts +10 -0
  73. package/api/resources/desk/client/requests/PublishedVcdmJsonSchemaFetchRequest.d.ts.map +1 -0
  74. package/api/resources/desk/client/requests/PublishedVcdmJsonSchemaFetchRequest.js +6 -0
  75. package/api/resources/desk/client/requests/PublishedVcdmJsonSchemaFetchRequest.js.map +1 -0
  76. package/api/resources/desk/client/requests/index.d.ts +5 -0
  77. package/api/resources/desk/client/requests/index.d.ts.map +1 -1
  78. package/api/resources/desk/client/requests/index.js.map +1 -1
  79. package/api/resources/didcommMessages/client/Client.d.ts +2 -0
  80. package/api/resources/didcommMessages/client/Client.d.ts.map +1 -1
  81. package/api/resources/didcommMessages/client/Client.js +45 -27
  82. package/api/resources/didcommMessages/client/Client.js.map +1 -1
  83. package/api/resources/didcommMessages/client/requests/DidcommMessageHistoryRequest.d.ts +1 -3
  84. package/api/resources/didcommMessages/client/requests/DidcommMessageHistoryRequest.d.ts.map +1 -1
  85. package/api/resources/didcommMessages/client/requests/DidcommMessageHistoryRequest.js.map +1 -1
  86. package/api/resources/didcommMessages/client/requests/DidcommMessageLatestRequest.d.ts +1 -3
  87. package/api/resources/didcommMessages/client/requests/DidcommMessageLatestRequest.d.ts.map +1 -1
  88. package/api/resources/didcommMessages/client/requests/DidcommMessageLatestRequest.js.map +1 -1
  89. package/api/resources/didcommMessages/client/requests/DidcommMessageRevisionRequest.d.ts +1 -3
  90. package/api/resources/didcommMessages/client/requests/DidcommMessageRevisionRequest.d.ts.map +1 -1
  91. package/api/resources/didcommMessages/client/requests/DidcommMessageRevisionRequest.js.map +1 -1
  92. package/api/resources/dids/client/Client.d.ts +2 -0
  93. package/api/resources/dids/client/Client.d.ts.map +1 -1
  94. package/api/resources/dids/client/Client.js +5 -3
  95. package/api/resources/dids/client/Client.js.map +1 -1
  96. package/api/resources/drafts/client/Client.d.ts +9 -7
  97. package/api/resources/drafts/client/Client.d.ts.map +1 -1
  98. package/api/resources/drafts/client/Client.js +67 -43
  99. package/api/resources/drafts/client/Client.js.map +1 -1
  100. package/api/resources/drafts/client/requests/DraftCreateRequest.d.ts +7 -7
  101. package/api/resources/drafts/client/requests/DraftCreateRequest.js.map +1 -1
  102. package/api/resources/drafts/client/requests/DraftExportRequest.d.ts +8 -0
  103. package/api/resources/drafts/client/requests/DraftExportRequest.d.ts.map +1 -1
  104. package/api/resources/drafts/client/requests/DraftExportRequest.js.map +1 -1
  105. package/api/resources/drafts/client/requests/DraftHistoryRequest.d.ts +1 -3
  106. package/api/resources/drafts/client/requests/DraftHistoryRequest.d.ts.map +1 -1
  107. package/api/resources/drafts/client/requests/DraftHistoryRequest.js.map +1 -1
  108. package/api/resources/drafts/client/requests/DraftLatestRequest.d.ts +1 -3
  109. package/api/resources/drafts/client/requests/DraftLatestRequest.d.ts.map +1 -1
  110. package/api/resources/drafts/client/requests/DraftLatestRequest.js.map +1 -1
  111. package/api/resources/drafts/client/requests/DraftRevisionRequest.d.ts +1 -3
  112. package/api/resources/drafts/client/requests/DraftRevisionRequest.d.ts.map +1 -1
  113. package/api/resources/drafts/client/requests/DraftRevisionRequest.js.map +1 -1
  114. package/api/resources/files/client/Client.d.ts +2 -0
  115. package/api/resources/files/client/Client.d.ts.map +1 -1
  116. package/api/resources/files/client/Client.js +55 -34
  117. package/api/resources/files/client/Client.js.map +1 -1
  118. package/api/resources/files/client/requests/FileCreateRequest.d.ts +1 -3
  119. package/api/resources/files/client/requests/FileCreateRequest.d.ts.map +1 -1
  120. package/api/resources/files/client/requests/FileCreateRequest.js.map +1 -1
  121. package/api/resources/files/client/requests/FileDownloadRequest.d.ts +5 -3
  122. package/api/resources/files/client/requests/FileDownloadRequest.d.ts.map +1 -1
  123. package/api/resources/files/client/requests/FileDownloadRequest.js.map +1 -1
  124. package/api/resources/files/client/requests/FileHistoryRequest.d.ts +1 -3
  125. package/api/resources/files/client/requests/FileHistoryRequest.d.ts.map +1 -1
  126. package/api/resources/files/client/requests/FileHistoryRequest.js.map +1 -1
  127. package/api/resources/files/client/requests/FileLatestRequest.d.ts +1 -3
  128. package/api/resources/files/client/requests/FileLatestRequest.d.ts.map +1 -1
  129. package/api/resources/files/client/requests/FileLatestRequest.js.map +1 -1
  130. package/api/resources/files/client/requests/FileRevisionRequest.d.ts +1 -3
  131. package/api/resources/files/client/requests/FileRevisionRequest.d.ts.map +1 -1
  132. package/api/resources/files/client/requests/FileRevisionRequest.js.map +1 -1
  133. package/api/resources/gdpr/client/Client.d.ts +2 -0
  134. package/api/resources/gdpr/client/Client.d.ts.map +1 -1
  135. package/api/resources/gdpr/client/Client.js +5 -3
  136. package/api/resources/gdpr/client/Client.js.map +1 -1
  137. package/api/resources/index.d.ts +2 -0
  138. package/api/resources/index.d.ts.map +1 -1
  139. package/api/resources/index.js +3 -1
  140. package/api/resources/index.js.map +1 -1
  141. package/api/resources/keys/client/Client.d.ts +2 -0
  142. package/api/resources/keys/client/Client.d.ts.map +1 -1
  143. package/api/resources/keys/client/Client.js +65 -42
  144. package/api/resources/keys/client/Client.js.map +1 -1
  145. package/api/resources/keys/client/requests/CredentialSignRequest.d.ts +8 -6
  146. package/api/resources/keys/client/requests/CredentialSignRequest.d.ts.map +1 -1
  147. package/api/resources/keys/client/requests/CredentialSignRequest.js.map +1 -1
  148. package/api/resources/keys/client/requests/DidCommMessageSignRequest.d.ts +8 -6
  149. package/api/resources/keys/client/requests/DidCommMessageSignRequest.d.ts.map +1 -1
  150. package/api/resources/keys/client/requests/DidCommMessageSignRequest.js.map +1 -1
  151. package/api/resources/keys/client/requests/KeyHistoryRequest.d.ts +1 -3
  152. package/api/resources/keys/client/requests/KeyHistoryRequest.d.ts.map +1 -1
  153. package/api/resources/keys/client/requests/KeyHistoryRequest.js.map +1 -1
  154. package/api/resources/keys/client/requests/KeyLatestRequest.d.ts +1 -3
  155. package/api/resources/keys/client/requests/KeyLatestRequest.d.ts.map +1 -1
  156. package/api/resources/keys/client/requests/KeyLatestRequest.js.map +1 -1
  157. package/api/resources/keys/client/requests/KeyRevisionRequest.d.ts +1 -3
  158. package/api/resources/keys/client/requests/KeyRevisionRequest.d.ts.map +1 -1
  159. package/api/resources/keys/client/requests/KeyRevisionRequest.js.map +1 -1
  160. package/api/resources/keys/client/requests/PresentationSignRequest.d.ts +8 -6
  161. package/api/resources/keys/client/requests/PresentationSignRequest.d.ts.map +1 -1
  162. package/api/resources/keys/client/requests/PresentationSignRequest.js.map +1 -1
  163. package/api/resources/presentations/client/Client.d.ts +5 -1
  164. package/api/resources/presentations/client/Client.d.ts.map +1 -1
  165. package/api/resources/presentations/client/Client.js +80 -51
  166. package/api/resources/presentations/client/Client.js.map +1 -1
  167. package/api/resources/presentations/client/requests/PresentationDownloadRequest.d.ts +5 -3
  168. package/api/resources/presentations/client/requests/PresentationDownloadRequest.d.ts.map +1 -1
  169. package/api/resources/presentations/client/requests/PresentationDownloadRequest.js.map +1 -1
  170. package/api/resources/presentations/client/requests/PresentationExportRequest.d.ts +10 -0
  171. package/api/resources/presentations/client/requests/PresentationExportRequest.d.ts.map +1 -1
  172. package/api/resources/presentations/client/requests/PresentationExportRequest.js.map +1 -1
  173. package/api/resources/presentations/client/requests/PresentationHistoryRequest.d.ts +1 -3
  174. package/api/resources/presentations/client/requests/PresentationHistoryRequest.d.ts.map +1 -1
  175. package/api/resources/presentations/client/requests/PresentationHistoryRequest.js.map +1 -1
  176. package/api/resources/presentations/client/requests/PresentationImportRequest.d.ts +1 -3
  177. package/api/resources/presentations/client/requests/PresentationImportRequest.d.ts.map +1 -1
  178. package/api/resources/presentations/client/requests/PresentationImportRequest.js.map +1 -1
  179. package/api/resources/presentations/client/requests/PresentationIssueRequest.d.ts +2 -0
  180. package/api/resources/presentations/client/requests/PresentationIssueRequest.d.ts.map +1 -1
  181. package/api/resources/presentations/client/requests/PresentationIssueRequest.js.map +1 -1
  182. package/api/resources/presentations/client/requests/PresentationLatestRequest.d.ts +1 -3
  183. package/api/resources/presentations/client/requests/PresentationLatestRequest.d.ts.map +1 -1
  184. package/api/resources/presentations/client/requests/PresentationLatestRequest.js.map +1 -1
  185. package/api/resources/presentations/client/requests/PresentationRevisionRequest.d.ts +1 -3
  186. package/api/resources/presentations/client/requests/PresentationRevisionRequest.d.ts.map +1 -1
  187. package/api/resources/presentations/client/requests/PresentationRevisionRequest.js.map +1 -1
  188. package/api/resources/presentations/client/requests/PresentationVerifyRequest.d.ts +10 -0
  189. package/api/resources/presentations/client/requests/PresentationVerifyRequest.d.ts.map +1 -0
  190. package/api/resources/presentations/client/requests/PresentationVerifyRequest.js +6 -0
  191. package/api/resources/presentations/client/requests/PresentationVerifyRequest.js.map +1 -0
  192. package/api/resources/presentations/client/requests/index.d.ts +1 -0
  193. package/api/resources/presentations/client/requests/index.d.ts.map +1 -1
  194. package/api/resources/presentations/client/requests/index.js.map +1 -1
  195. package/api/resources/presentations/types/PresentationExportRequestCompositionType.d.ts +8 -0
  196. package/api/resources/presentations/types/PresentationExportRequestCompositionType.d.ts.map +1 -0
  197. package/api/resources/presentations/types/PresentationExportRequestCompositionType.js +10 -0
  198. package/api/resources/presentations/types/PresentationExportRequestCompositionType.js.map +1 -0
  199. package/api/resources/presentations/types/PresentationIssueRequestCompositionType.d.ts +8 -0
  200. package/api/resources/presentations/types/PresentationIssueRequestCompositionType.d.ts.map +1 -0
  201. package/api/resources/presentations/types/PresentationIssueRequestCompositionType.js +10 -0
  202. package/api/resources/presentations/types/PresentationIssueRequestCompositionType.js.map +1 -0
  203. package/api/resources/presentations/types/index.d.ts +2 -0
  204. package/api/resources/presentations/types/index.d.ts.map +1 -1
  205. package/api/resources/presentations/types/index.js +2 -0
  206. package/api/resources/presentations/types/index.js.map +1 -1
  207. package/api/resources/publishedSchemas/client/Client.d.ts +201 -0
  208. package/api/resources/publishedSchemas/client/Client.d.ts.map +1 -0
  209. package/api/resources/publishedSchemas/client/Client.js +986 -0
  210. package/api/resources/publishedSchemas/client/Client.js.map +1 -0
  211. package/api/resources/publishedSchemas/client/index.d.ts +3 -0
  212. package/api/resources/publishedSchemas/client/index.d.ts.map +1 -0
  213. package/api/resources/publishedSchemas/client/index.js +18 -0
  214. package/api/resources/publishedSchemas/client/index.js.map +1 -0
  215. package/api/resources/publishedSchemas/client/requests/PublishedSchemaDeleteRequest.d.ts +47 -0
  216. package/api/resources/publishedSchemas/client/requests/PublishedSchemaDeleteRequest.d.ts.map +1 -0
  217. package/api/resources/publishedSchemas/client/requests/PublishedSchemaDeleteRequest.js +6 -0
  218. package/api/resources/publishedSchemas/client/requests/PublishedSchemaDeleteRequest.js.map +1 -0
  219. package/api/resources/publishedSchemas/client/requests/PublishedSchemaLatestRequest.d.ts +12 -0
  220. package/api/resources/publishedSchemas/client/requests/PublishedSchemaLatestRequest.d.ts.map +1 -0
  221. package/api/resources/publishedSchemas/client/requests/PublishedSchemaLatestRequest.js +6 -0
  222. package/api/resources/publishedSchemas/client/requests/PublishedSchemaLatestRequest.js.map +1 -0
  223. package/api/resources/publishedSchemas/client/requests/PublishedSchemaRestoreRequest.d.ts +47 -0
  224. package/api/resources/publishedSchemas/client/requests/PublishedSchemaRestoreRequest.d.ts.map +1 -0
  225. package/api/resources/publishedSchemas/client/requests/PublishedSchemaRestoreRequest.js +6 -0
  226. package/api/resources/publishedSchemas/client/requests/PublishedSchemaRestoreRequest.js.map +1 -0
  227. package/api/resources/publishedSchemas/client/requests/PublishedSchemaRevisionRequest.d.ts +12 -0
  228. package/api/resources/publishedSchemas/client/requests/PublishedSchemaRevisionRequest.d.ts.map +1 -0
  229. package/api/resources/publishedSchemas/client/requests/PublishedSchemaRevisionRequest.js +6 -0
  230. package/api/resources/publishedSchemas/client/requests/PublishedSchemaRevisionRequest.js.map +1 -0
  231. package/api/resources/publishedSchemas/client/requests/PublishedSchemaSearchRequest.d.ts +15 -0
  232. package/api/resources/publishedSchemas/client/requests/PublishedSchemaSearchRequest.d.ts.map +1 -0
  233. package/api/resources/publishedSchemas/client/requests/PublishedSchemaSearchRequest.js +6 -0
  234. package/api/resources/publishedSchemas/client/requests/PublishedSchemaSearchRequest.js.map +1 -0
  235. package/api/resources/publishedSchemas/client/requests/PublishedSchemaUpdateAnnotationsRequest.d.ts +52 -0
  236. package/api/resources/publishedSchemas/client/requests/PublishedSchemaUpdateAnnotationsRequest.d.ts.map +1 -0
  237. package/api/resources/publishedSchemas/client/requests/PublishedSchemaUpdateAnnotationsRequest.js +6 -0
  238. package/api/resources/publishedSchemas/client/requests/PublishedSchemaUpdateAnnotationsRequest.js.map +1 -0
  239. package/api/resources/publishedSchemas/client/requests/PublishedSchemaUpdateLabelsRequest.d.ts +52 -0
  240. package/api/resources/publishedSchemas/client/requests/PublishedSchemaUpdateLabelsRequest.d.ts.map +1 -0
  241. package/api/resources/publishedSchemas/client/requests/PublishedSchemaUpdateLabelsRequest.js +6 -0
  242. package/api/resources/publishedSchemas/client/requests/PublishedSchemaUpdateLabelsRequest.js.map +1 -0
  243. package/api/resources/publishedSchemas/client/requests/index.d.ts +8 -0
  244. package/api/resources/publishedSchemas/client/requests/index.d.ts.map +1 -0
  245. package/api/resources/publishedSchemas/client/requests/index.js +3 -0
  246. package/api/resources/publishedSchemas/client/requests/index.js.map +1 -0
  247. package/api/resources/publishedSchemas/index.d.ts +2 -0
  248. package/api/resources/publishedSchemas/index.d.ts.map +1 -0
  249. package/api/resources/publishedSchemas/index.js +18 -0
  250. package/api/resources/publishedSchemas/index.js.map +1 -0
  251. package/api/resources/schemas/client/Client.d.ts +42 -11
  252. package/api/resources/schemas/client/Client.d.ts.map +1 -1
  253. package/api/resources/schemas/client/Client.js +212 -47
  254. package/api/resources/schemas/client/Client.js.map +1 -1
  255. package/api/resources/schemas/client/requests/SchemaHistoryRequest.d.ts +1 -3
  256. package/api/resources/schemas/client/requests/SchemaHistoryRequest.d.ts.map +1 -1
  257. package/api/resources/schemas/client/requests/SchemaHistoryRequest.js.map +1 -1
  258. package/api/resources/schemas/client/requests/SchemaImportRequest.d.ts +25 -0
  259. package/api/resources/schemas/client/requests/SchemaImportRequest.d.ts.map +1 -0
  260. package/api/{types/DraftFieldFileValue.js → resources/schemas/client/requests/SchemaImportRequest.js} +1 -1
  261. package/api/resources/schemas/client/requests/SchemaImportRequest.js.map +1 -0
  262. package/api/resources/schemas/client/requests/SchemaLatestRequest.d.ts +1 -3
  263. package/api/resources/schemas/client/requests/SchemaLatestRequest.d.ts.map +1 -1
  264. package/api/resources/schemas/client/requests/SchemaLatestRequest.js.map +1 -1
  265. package/api/resources/schemas/client/requests/SchemaPublishRequest.d.ts +2 -4
  266. package/api/resources/schemas/client/requests/SchemaPublishRequest.d.ts.map +1 -1
  267. package/api/resources/schemas/client/requests/SchemaPublishRequest.js.map +1 -1
  268. package/api/resources/schemas/client/requests/SchemaRevisionRequest.d.ts +1 -3
  269. package/api/resources/schemas/client/requests/SchemaRevisionRequest.d.ts.map +1 -1
  270. package/api/resources/schemas/client/requests/SchemaRevisionRequest.js.map +1 -1
  271. package/api/resources/schemas/client/requests/SchemaUpdateRequest.d.ts +1 -6
  272. package/api/resources/schemas/client/requests/SchemaUpdateRequest.d.ts.map +1 -1
  273. package/api/resources/schemas/client/requests/SchemaUpdateRequest.js.map +1 -1
  274. package/api/resources/schemas/client/requests/index.d.ts +1 -0
  275. package/api/resources/schemas/client/requests/index.d.ts.map +1 -1
  276. package/api/resources/schemas/client/requests/index.js.map +1 -1
  277. package/api/types/ArrayClaimValue.d.ts +12 -0
  278. package/api/types/ArrayClaimValue.d.ts.map +1 -0
  279. package/api/types/{DraftFieldDateValue.js → ArrayClaimValue.js} +1 -1
  280. package/api/types/ArrayClaimValue.js.map +1 -0
  281. package/api/types/BooleanClaimValue.d.ts +11 -0
  282. package/api/types/BooleanClaimValue.d.ts.map +1 -0
  283. package/api/types/{DraftFieldLinkValue.js → BooleanClaimValue.js} +1 -1
  284. package/api/types/BooleanClaimValue.js.map +1 -0
  285. package/api/types/ClaimsSchema.d.ts +6 -2
  286. package/api/types/ClaimsSchema.d.ts.map +1 -1
  287. package/api/types/ClaimsSchema.js.map +1 -1
  288. package/api/types/ClaimsSchemaFieldLinkValue.d.ts +2 -1
  289. package/api/types/ClaimsSchemaFieldLinkValue.d.ts.map +1 -1
  290. package/api/types/ClaimsSchemaFieldLinkValue.js.map +1 -1
  291. package/api/types/ClaimsSchemaFieldLinkValueLinkType.d.ts +11 -0
  292. package/api/types/ClaimsSchemaFieldLinkValueLinkType.d.ts.map +1 -0
  293. package/api/types/ClaimsSchemaFieldLinkValueLinkType.js +10 -0
  294. package/api/types/ClaimsSchemaFieldLinkValueLinkType.js.map +1 -0
  295. package/api/types/ClaimsSchemaFieldStructOptionalValue.d.ts +27 -0
  296. package/api/types/ClaimsSchemaFieldStructOptionalValue.d.ts.map +1 -0
  297. package/api/types/ClaimsSchemaFieldStructOptionalValue.js +6 -0
  298. package/api/types/ClaimsSchemaFieldStructOptionalValue.js.map +1 -0
  299. package/api/types/ClaimsSchemaFieldStructOptionalValueFieldsItem.d.ts +35 -0
  300. package/api/types/ClaimsSchemaFieldStructOptionalValueFieldsItem.d.ts.map +1 -0
  301. package/api/types/ClaimsSchemaFieldStructOptionalValueFieldsItem.js +6 -0
  302. package/api/types/ClaimsSchemaFieldStructOptionalValueFieldsItem.js.map +1 -0
  303. package/api/types/ClaimsSchemaFieldStructValue.d.ts +7 -1
  304. package/api/types/ClaimsSchemaFieldStructValue.d.ts.map +1 -1
  305. package/api/types/ClaimsSchemaFieldStructValue.js.map +1 -1
  306. package/api/types/ClaimsSchemaOptional.d.ts +20 -0
  307. package/api/types/ClaimsSchemaOptional.d.ts.map +1 -0
  308. package/api/types/ClaimsSchemaOptional.js +6 -0
  309. package/api/types/ClaimsSchemaOptional.js.map +1 -0
  310. package/api/types/ClaimsSchemaOptionalFieldsItem.d.ts +35 -0
  311. package/api/types/ClaimsSchemaOptionalFieldsItem.d.ts.map +1 -0
  312. package/api/types/ClaimsSchemaOptionalFieldsItem.js +6 -0
  313. package/api/types/ClaimsSchemaOptionalFieldsItem.js.map +1 -0
  314. package/api/types/CredentialClaimLinkedCredentialValue.d.ts +13 -0
  315. package/api/types/CredentialClaimLinkedCredentialValue.d.ts.map +1 -0
  316. package/api/types/CredentialClaimLinkedCredentialValue.js +6 -0
  317. package/api/types/CredentialClaimLinkedCredentialValue.js.map +1 -0
  318. package/api/types/CredentialClaimLinkedFileValue.d.ts +13 -0
  319. package/api/types/CredentialClaimLinkedFileValue.d.ts.map +1 -0
  320. package/api/types/CredentialClaimLinkedFileValue.js +6 -0
  321. package/api/types/CredentialClaimLinkedFileValue.js.map +1 -0
  322. package/api/types/CredentialClaimValue.d.ts +38 -0
  323. package/api/types/CredentialClaimValue.d.ts.map +1 -0
  324. package/api/types/CredentialClaimValue.js +6 -0
  325. package/api/types/CredentialClaimValue.js.map +1 -0
  326. package/api/types/CredentialClaimValues.d.ts +9 -0
  327. package/api/types/CredentialClaimValues.d.ts.map +1 -0
  328. package/api/types/CredentialClaimValues.js +6 -0
  329. package/api/types/CredentialClaimValues.js.map +1 -0
  330. package/api/types/CredentialSchema.d.ts +7 -2
  331. package/api/types/CredentialSchema.d.ts.map +1 -1
  332. package/api/types/CredentialSchema.js.map +1 -1
  333. package/api/types/CredentialSchemaCreate.d.ts +1 -1
  334. package/api/types/CredentialSchemaCreate.d.ts.map +1 -1
  335. package/api/types/CredentialSchemaCreate.js.map +1 -1
  336. package/api/types/CredentialSchemaUpdate.d.ts +1 -1
  337. package/api/types/CredentialSchemaUpdate.d.ts.map +1 -1
  338. package/api/types/CredentialSchemaUpdate.js.map +1 -1
  339. package/api/types/DateClaimValue.d.ts +11 -0
  340. package/api/types/DateClaimValue.d.ts.map +1 -0
  341. package/api/types/{DraftEnumValue.js → DateClaimValue.js} +1 -1
  342. package/api/types/DateClaimValue.js.map +1 -0
  343. package/api/types/DateTimeClaimValue.d.ts +11 -0
  344. package/api/types/DateTimeClaimValue.d.ts.map +1 -0
  345. package/api/types/DateTimeClaimValue.js +6 -0
  346. package/api/types/DateTimeClaimValue.js.map +1 -0
  347. package/api/types/Draft.d.ts +8 -4
  348. package/api/types/Draft.d.ts.map +1 -1
  349. package/api/types/Draft.js.map +1 -1
  350. package/api/types/DraftCreate.d.ts +7 -3
  351. package/api/types/DraftCreate.d.ts.map +1 -1
  352. package/api/types/DraftCreate.js.map +1 -1
  353. package/api/types/DraftCreateMetaSchema.d.ts +12 -0
  354. package/api/types/DraftCreateMetaSchema.d.ts.map +1 -0
  355. package/api/types/DraftCreateMetaSchema.js +6 -0
  356. package/api/types/DraftCreateMetaSchema.js.map +1 -0
  357. package/api/types/DraftUpdate.d.ts +2 -2
  358. package/api/types/DraftUpdate.d.ts.map +1 -1
  359. package/api/types/DraftUpdate.js.map +1 -1
  360. package/api/types/ErrorDetail.d.ts +1 -0
  361. package/api/types/ErrorDetail.d.ts.map +1 -1
  362. package/api/types/ErrorDetail.js.map +1 -1
  363. package/api/types/FileClaimValue.d.ts +12 -0
  364. package/api/types/FileClaimValue.d.ts.map +1 -0
  365. package/api/types/FileClaimValue.js +6 -0
  366. package/api/types/FileClaimValue.js.map +1 -0
  367. package/api/types/LinkClaimValue.d.ts +12 -0
  368. package/api/types/LinkClaimValue.d.ts.map +1 -0
  369. package/api/types/LinkClaimValue.js +6 -0
  370. package/api/types/LinkClaimValue.js.map +1 -0
  371. package/api/types/ListPublishedCredentialSchema.d.ts +12 -0
  372. package/api/types/ListPublishedCredentialSchema.d.ts.map +1 -0
  373. package/api/types/ListPublishedCredentialSchema.js +6 -0
  374. package/api/types/ListPublishedCredentialSchema.js.map +1 -0
  375. package/api/types/MetaSchema.d.ts +16 -0
  376. package/api/types/MetaSchema.d.ts.map +1 -0
  377. package/api/types/{DraftSchema.js → MetaSchema.js} +1 -1
  378. package/api/types/MetaSchema.js.map +1 -0
  379. package/api/types/NumberClaimValue.d.ts +11 -0
  380. package/api/types/NumberClaimValue.d.ts.map +1 -0
  381. package/api/types/NumberClaimValue.js +6 -0
  382. package/api/types/NumberClaimValue.js.map +1 -0
  383. package/api/types/ProblemInternalServerError.d.ts +1 -1
  384. package/api/types/ProblemInternalServerError.d.ts.map +1 -1
  385. package/api/types/ProblemInternalServerError.js.map +1 -1
  386. package/api/types/ProblemInternalServerErrorType.d.ts +11 -0
  387. package/api/types/ProblemInternalServerErrorType.d.ts.map +1 -0
  388. package/api/types/ProblemInternalServerErrorType.js +10 -0
  389. package/api/types/ProblemInternalServerErrorType.js.map +1 -0
  390. package/api/types/PublishedCredentialSchema.d.ts +12 -0
  391. package/api/types/PublishedCredentialSchema.d.ts.map +1 -1
  392. package/api/types/PublishedCredentialSchema.js.map +1 -1
  393. package/api/types/PublishedSchemaBaseFilter.d.ts +27 -0
  394. package/api/types/PublishedSchemaBaseFilter.d.ts.map +1 -0
  395. package/api/types/PublishedSchemaBaseFilter.js +6 -0
  396. package/api/types/PublishedSchemaBaseFilter.js.map +1 -0
  397. package/api/types/PublishedSchemaBaseFilterAnnotationsItem.d.ts +20 -0
  398. package/api/types/PublishedSchemaBaseFilterAnnotationsItem.d.ts.map +1 -0
  399. package/api/types/PublishedSchemaBaseFilterAnnotationsItem.js +6 -0
  400. package/api/types/PublishedSchemaBaseFilterAnnotationsItem.js.map +1 -0
  401. package/api/types/PublishedSchemaBaseFilterCreatedAt.d.ts +26 -0
  402. package/api/types/PublishedSchemaBaseFilterCreatedAt.d.ts.map +1 -0
  403. package/api/types/PublishedSchemaBaseFilterCreatedAt.js +6 -0
  404. package/api/types/PublishedSchemaBaseFilterCreatedAt.js.map +1 -0
  405. package/api/types/PublishedSchemaBaseFilterDeletedAt.d.ts +32 -0
  406. package/api/types/PublishedSchemaBaseFilterDeletedAt.d.ts.map +1 -0
  407. package/api/types/PublishedSchemaBaseFilterDeletedAt.js +6 -0
  408. package/api/types/PublishedSchemaBaseFilterDeletedAt.js.map +1 -0
  409. package/api/types/{SchemaFilterPublicationEtag.d.ts → PublishedSchemaBaseFilterEtag.d.ts} +6 -3
  410. package/api/types/PublishedSchemaBaseFilterEtag.d.ts.map +1 -0
  411. package/api/types/PublishedSchemaBaseFilterEtag.js +6 -0
  412. package/api/types/PublishedSchemaBaseFilterEtag.js.map +1 -0
  413. package/api/types/PublishedSchemaBaseFilterId.d.ts +23 -0
  414. package/api/types/PublishedSchemaBaseFilterId.d.ts.map +1 -0
  415. package/api/types/PublishedSchemaBaseFilterId.js +6 -0
  416. package/api/types/PublishedSchemaBaseFilterId.js.map +1 -0
  417. package/api/types/PublishedSchemaBaseFilterLabelsItem.d.ts +20 -0
  418. package/api/types/PublishedSchemaBaseFilterLabelsItem.d.ts.map +1 -0
  419. package/api/types/PublishedSchemaBaseFilterLabelsItem.js +6 -0
  420. package/api/types/PublishedSchemaBaseFilterLabelsItem.js.map +1 -0
  421. package/api/types/PublishedSchemaBaseFilterModifiedAt.d.ts +26 -0
  422. package/api/types/PublishedSchemaBaseFilterModifiedAt.d.ts.map +1 -0
  423. package/api/types/PublishedSchemaBaseFilterModifiedAt.js +6 -0
  424. package/api/types/PublishedSchemaBaseFilterModifiedAt.js.map +1 -0
  425. package/api/types/PublishedSchemaBaseFilterRevision.d.ts +38 -0
  426. package/api/types/PublishedSchemaBaseFilterRevision.d.ts.map +1 -0
  427. package/api/types/{CredentialSchemaPublicationOutput.js → PublishedSchemaBaseFilterRevision.js} +1 -1
  428. package/api/types/PublishedSchemaBaseFilterRevision.js.map +1 -0
  429. package/api/types/PublishedSchemaFilter.d.ts +9 -0
  430. package/api/types/PublishedSchemaFilter.d.ts.map +1 -0
  431. package/api/types/PublishedSchemaFilter.js +6 -0
  432. package/api/types/PublishedSchemaFilter.js.map +1 -0
  433. package/api/types/PublishedSchemaFilterData.d.ts +14 -0
  434. package/api/types/PublishedSchemaFilterData.d.ts.map +1 -0
  435. package/api/types/PublishedSchemaFilterData.js +6 -0
  436. package/api/types/PublishedSchemaFilterData.js.map +1 -0
  437. package/api/types/PublishedSchemaFilterDataDigestMultibase.d.ts +20 -0
  438. package/api/types/PublishedSchemaFilterDataDigestMultibase.d.ts.map +1 -0
  439. package/api/types/PublishedSchemaFilterDataDigestMultibase.js +6 -0
  440. package/api/types/PublishedSchemaFilterDataDigestMultibase.js.map +1 -0
  441. package/api/types/{SchemaFilterPublicationPublishedAt.d.ts → PublishedSchemaFilterDataPublishedAt.d.ts} +3 -3
  442. package/api/types/PublishedSchemaFilterDataPublishedAt.d.ts.map +1 -0
  443. package/api/types/PublishedSchemaFilterDataPublishedAt.js +6 -0
  444. package/api/types/PublishedSchemaFilterDataPublishedAt.js.map +1 -0
  445. package/api/types/{SchemaFilterPublicationSlug.d.ts → PublishedSchemaFilterDataSlug.d.ts} +3 -3
  446. package/api/types/PublishedSchemaFilterDataSlug.d.ts.map +1 -0
  447. package/api/types/PublishedSchemaFilterDataSlug.js +6 -0
  448. package/api/types/PublishedSchemaFilterDataSlug.js.map +1 -0
  449. package/api/types/{SchemaFilterPublicationVersion.d.ts → PublishedSchemaFilterDataVersion.d.ts} +3 -3
  450. package/api/types/PublishedSchemaFilterDataVersion.d.ts.map +1 -0
  451. package/api/types/PublishedSchemaFilterDataVersion.js +6 -0
  452. package/api/types/PublishedSchemaFilterDataVersion.js.map +1 -0
  453. package/api/types/PublishedSchemaSort.d.ts +14 -0
  454. package/api/types/PublishedSchemaSort.d.ts.map +1 -0
  455. package/api/types/PublishedSchemaSort.js +6 -0
  456. package/api/types/PublishedSchemaSort.js.map +1 -0
  457. package/api/types/PublishedSchemaSortField.d.ts +20 -0
  458. package/api/types/PublishedSchemaSortField.d.ts.map +1 -0
  459. package/api/types/PublishedSchemaSortField.js +19 -0
  460. package/api/types/PublishedSchemaSortField.js.map +1 -0
  461. package/api/types/PublishedSchemaSortOrder.d.ts +12 -0
  462. package/api/types/PublishedSchemaSortOrder.d.ts.map +1 -0
  463. package/api/types/PublishedSchemaSortOrder.js +11 -0
  464. package/api/types/PublishedSchemaSortOrder.js.map +1 -0
  465. package/api/types/ResourcePublishedCredentialSchema.d.ts +30 -0
  466. package/api/types/ResourcePublishedCredentialSchema.d.ts.map +1 -0
  467. package/api/types/ResourcePublishedCredentialSchema.js +6 -0
  468. package/api/types/ResourcePublishedCredentialSchema.js.map +1 -0
  469. package/api/types/SchemaFilterData.d.ts +1 -1
  470. package/api/types/SchemaFilterData.d.ts.map +1 -1
  471. package/api/types/SchemaFilterData.js.map +1 -1
  472. package/api/types/SchemaFilterDataDigestMultibase.d.ts +20 -0
  473. package/api/types/SchemaFilterDataDigestMultibase.d.ts.map +1 -0
  474. package/api/types/SchemaFilterDataDigestMultibase.js +6 -0
  475. package/api/types/SchemaFilterDataDigestMultibase.js.map +1 -0
  476. package/api/types/SchemaImportDataRequest.d.ts +15 -0
  477. package/api/types/SchemaImportDataRequest.d.ts.map +1 -0
  478. package/api/types/{DraftFieldBooleanValue.js → SchemaImportDataRequest.js} +1 -1
  479. package/api/types/SchemaImportDataRequest.js.map +1 -0
  480. package/api/types/SchemaSortField.d.ts +2 -6
  481. package/api/types/SchemaSortField.d.ts.map +1 -1
  482. package/api/types/SchemaSortField.js +1 -5
  483. package/api/types/SchemaSortField.js.map +1 -1
  484. package/api/types/StringClaimValue.d.ts +11 -0
  485. package/api/types/StringClaimValue.d.ts.map +1 -0
  486. package/api/types/StringClaimValue.js +6 -0
  487. package/api/types/StringClaimValue.js.map +1 -0
  488. package/api/types/StructClaimValue.d.ts +12 -0
  489. package/api/types/StructClaimValue.d.ts.map +1 -0
  490. package/api/types/StructClaimValue.js +6 -0
  491. package/api/types/StructClaimValue.js.map +1 -0
  492. package/api/types/index.d.ts +43 -19
  493. package/api/types/index.d.ts.map +1 -1
  494. package/api/types/index.js +43 -19
  495. package/api/types/index.js.map +1 -1
  496. package/core/fetcher/Fetcher.d.ts +1 -1
  497. package/core/fetcher/Fetcher.d.ts.map +1 -1
  498. package/core/fetcher/Fetcher.js.map +1 -1
  499. package/core/fetcher/index.d.ts +1 -1
  500. package/core/fetcher/index.d.ts.map +1 -1
  501. package/core/fetcher/index.js.map +1 -1
  502. package/core/schemas/utils/maybeSkipValidation.js +1 -1
  503. package/core/schemas/utils/maybeSkipValidation.js.map +1 -1
  504. package/core/url/join.d.ts.map +1 -1
  505. package/core/url/join.js +23 -3
  506. package/core/url/join.js.map +1 -1
  507. package/documents/credential/claims.d.ts +11 -7
  508. package/documents/credential/claims.d.ts.map +1 -1
  509. package/documents/credential/claims.js +187 -38
  510. package/documents/credential/claims.js.map +1 -1
  511. package/documents/credential/claims.spec.js +484 -165
  512. package/documents/credential/claims.spec.js.map +1 -1
  513. package/documents/credential/testdata/udt.d.ts +50 -0
  514. package/documents/credential/testdata/udt.d.ts.map +1 -1
  515. package/documents/credential/testdata/udt.js +226 -6
  516. package/documents/credential/testdata/udt.js.map +1 -1
  517. package/documents/credential/types.d.ts +3 -3
  518. package/documents/credential/types.d.ts.map +1 -1
  519. package/documents/credential/types.js.map +1 -1
  520. package/documents/credential.d.ts +11 -5
  521. package/documents/credential.d.ts.map +1 -1
  522. package/documents/credential.js +151 -32
  523. package/documents/credential.js.map +1 -1
  524. package/documents/decorators.d.ts +40 -7
  525. package/documents/decorators.d.ts.map +1 -1
  526. package/documents/decorators.js +105 -20
  527. package/documents/decorators.js.map +1 -1
  528. package/documents/models.d.ts +5 -5
  529. package/documents/models.d.ts.map +1 -1
  530. package/documents/models.js +20 -16
  531. package/documents/models.js.map +1 -1
  532. package/documents/models.spec.js +1 -5
  533. package/documents/models.spec.js.map +1 -1
  534. package/documents/presentation.d.ts.map +1 -1
  535. package/documents/presentation.js +1 -0
  536. package/documents/presentation.js.map +1 -1
  537. package/documents/types.d.ts +8 -2
  538. package/documents/types.d.ts.map +1 -1
  539. package/documents/types.js +8 -1
  540. package/documents/types.js.map +1 -1
  541. package/documents/utils/error.d.ts +2 -0
  542. package/documents/utils/error.d.ts.map +1 -1
  543. package/documents/utils/error.js +2 -0
  544. package/documents/utils/error.js.map +1 -1
  545. package/documents/utils/error.spec.js +1 -1
  546. package/documents/utils/error.spec.js.map +1 -1
  547. package/package.json +7 -3
  548. package/reference.md +1499 -166
  549. package/serialization/resources/index.d.ts +2 -0
  550. package/serialization/resources/index.d.ts.map +1 -1
  551. package/serialization/resources/index.js +3 -1
  552. package/serialization/resources/index.js.map +1 -1
  553. package/serialization/resources/presentations/client/requests/PresentationExportRequest.d.ts +2 -0
  554. package/serialization/resources/presentations/client/requests/PresentationExportRequest.d.ts.map +1 -1
  555. package/serialization/resources/presentations/client/requests/PresentationExportRequest.js +2 -0
  556. package/serialization/resources/presentations/client/requests/PresentationExportRequest.js.map +1 -1
  557. package/serialization/resources/presentations/client/requests/PresentationIssueRequest.d.ts +2 -0
  558. package/serialization/resources/presentations/client/requests/PresentationIssueRequest.d.ts.map +1 -1
  559. package/serialization/resources/presentations/client/requests/PresentationIssueRequest.js +2 -0
  560. package/serialization/resources/presentations/client/requests/PresentationIssueRequest.js.map +1 -1
  561. package/serialization/resources/presentations/types/PresentationExportRequestCompositionType.d.ts +11 -0
  562. package/serialization/resources/presentations/types/PresentationExportRequestCompositionType.d.ts.map +1 -0
  563. package/serialization/resources/presentations/types/PresentationExportRequestCompositionType.js +42 -0
  564. package/serialization/resources/presentations/types/PresentationExportRequestCompositionType.js.map +1 -0
  565. package/serialization/resources/presentations/types/PresentationIssueRequestCompositionType.d.ts +11 -0
  566. package/serialization/resources/presentations/types/PresentationIssueRequestCompositionType.d.ts.map +1 -0
  567. package/serialization/resources/presentations/types/PresentationIssueRequestCompositionType.js +42 -0
  568. package/serialization/resources/presentations/types/PresentationIssueRequestCompositionType.js.map +1 -0
  569. package/serialization/resources/presentations/types/index.d.ts +2 -0
  570. package/serialization/resources/presentations/types/index.d.ts.map +1 -1
  571. package/serialization/resources/presentations/types/index.js +2 -0
  572. package/serialization/resources/presentations/types/index.js.map +1 -1
  573. package/serialization/resources/publishedSchemas/client/index.d.ts +2 -0
  574. package/serialization/resources/publishedSchemas/client/index.d.ts.map +1 -0
  575. package/serialization/resources/publishedSchemas/client/index.js +18 -0
  576. package/serialization/resources/publishedSchemas/client/index.js.map +1 -0
  577. package/serialization/resources/publishedSchemas/client/requests/PublishedSchemaSearchRequest.d.ts +16 -0
  578. package/serialization/resources/publishedSchemas/client/requests/PublishedSchemaSearchRequest.d.ts.map +1 -0
  579. package/serialization/{types/DraftFieldDateTimeValue.js → resources/publishedSchemas/client/requests/PublishedSchemaSearchRequest.js} +8 -9
  580. package/serialization/resources/publishedSchemas/client/requests/PublishedSchemaSearchRequest.js.map +1 -0
  581. package/serialization/resources/publishedSchemas/client/requests/PublishedSchemaUpdateAnnotationsRequest.d.ts +13 -0
  582. package/serialization/resources/publishedSchemas/client/requests/PublishedSchemaUpdateAnnotationsRequest.d.ts.map +1 -0
  583. package/serialization/resources/publishedSchemas/client/requests/PublishedSchemaUpdateAnnotationsRequest.js +44 -0
  584. package/serialization/resources/publishedSchemas/client/requests/PublishedSchemaUpdateAnnotationsRequest.js.map +1 -0
  585. package/serialization/resources/publishedSchemas/client/requests/PublishedSchemaUpdateLabelsRequest.d.ts +13 -0
  586. package/serialization/resources/publishedSchemas/client/requests/PublishedSchemaUpdateLabelsRequest.d.ts.map +1 -0
  587. package/serialization/resources/publishedSchemas/client/requests/PublishedSchemaUpdateLabelsRequest.js +44 -0
  588. package/serialization/resources/publishedSchemas/client/requests/PublishedSchemaUpdateLabelsRequest.js.map +1 -0
  589. package/serialization/resources/publishedSchemas/client/requests/index.d.ts +4 -0
  590. package/serialization/resources/publishedSchemas/client/requests/index.d.ts.map +1 -0
  591. package/serialization/resources/publishedSchemas/client/requests/index.js +10 -0
  592. package/serialization/resources/publishedSchemas/client/requests/index.js.map +1 -0
  593. package/serialization/resources/publishedSchemas/index.d.ts +2 -0
  594. package/serialization/resources/publishedSchemas/index.d.ts.map +1 -0
  595. package/serialization/resources/publishedSchemas/index.js +18 -0
  596. package/serialization/resources/publishedSchemas/index.js.map +1 -0
  597. package/serialization/resources/schemas/client/requests/SchemaImportRequest.d.ts +16 -0
  598. package/serialization/resources/schemas/client/requests/SchemaImportRequest.d.ts.map +1 -0
  599. package/serialization/{types/DraftFieldBooleanValue.js → resources/schemas/client/requests/SchemaImportRequest.js} +8 -9
  600. package/serialization/resources/schemas/client/requests/SchemaImportRequest.js.map +1 -0
  601. package/serialization/resources/schemas/client/requests/SchemaPublishRequest.d.ts +1 -1
  602. package/serialization/resources/schemas/client/requests/SchemaPublishRequest.d.ts.map +1 -1
  603. package/serialization/resources/schemas/client/requests/SchemaPublishRequest.js +1 -1
  604. package/serialization/resources/schemas/client/requests/SchemaPublishRequest.js.map +1 -1
  605. package/serialization/resources/schemas/client/requests/index.d.ts +1 -0
  606. package/serialization/resources/schemas/client/requests/index.d.ts.map +1 -1
  607. package/serialization/resources/schemas/client/requests/index.js +3 -1
  608. package/serialization/resources/schemas/client/requests/index.js.map +1 -1
  609. package/serialization/types/ArrayClaimValue.d.ts +13 -0
  610. package/serialization/types/ArrayClaimValue.d.ts.map +1 -0
  611. package/serialization/types/{DraftFieldFileValue.js → ArrayClaimValue.js} +5 -7
  612. package/serialization/types/ArrayClaimValue.js.map +1 -0
  613. package/serialization/types/BooleanClaimValue.d.ts +13 -0
  614. package/serialization/types/BooleanClaimValue.d.ts.map +1 -0
  615. package/serialization/types/{CredentialSchemaPublicationOutput.js → BooleanClaimValue.js} +4 -8
  616. package/serialization/types/BooleanClaimValue.js.map +1 -0
  617. package/serialization/types/ClaimsSchema.d.ts +2 -0
  618. package/serialization/types/ClaimsSchema.d.ts.map +1 -1
  619. package/serialization/types/ClaimsSchema.js +2 -0
  620. package/serialization/types/ClaimsSchema.js.map +1 -1
  621. package/serialization/types/ClaimsSchemaFieldLinkValue.d.ts +2 -1
  622. package/serialization/types/ClaimsSchemaFieldLinkValue.d.ts.map +1 -1
  623. package/serialization/types/ClaimsSchemaFieldLinkValue.js +2 -1
  624. package/serialization/types/ClaimsSchemaFieldLinkValue.js.map +1 -1
  625. package/serialization/types/ClaimsSchemaFieldLinkValueLinkType.d.ts +11 -0
  626. package/serialization/types/ClaimsSchemaFieldLinkValueLinkType.d.ts.map +1 -0
  627. package/serialization/types/ClaimsSchemaFieldLinkValueLinkType.js +42 -0
  628. package/serialization/types/ClaimsSchemaFieldLinkValueLinkType.js.map +1 -0
  629. package/serialization/types/ClaimsSchemaFieldStructOptionalValue.d.ts +21 -0
  630. package/serialization/types/ClaimsSchemaFieldStructOptionalValue.d.ts.map +1 -0
  631. package/serialization/types/{DraftFieldStructValue.js → ClaimsSchemaFieldStructOptionalValue.js} +10 -6
  632. package/serialization/types/ClaimsSchemaFieldStructOptionalValue.js.map +1 -0
  633. package/serialization/types/ClaimsSchemaFieldStructOptionalValueFieldsItem.d.ts +42 -0
  634. package/serialization/types/ClaimsSchemaFieldStructOptionalValueFieldsItem.d.ts.map +1 -0
  635. package/serialization/types/ClaimsSchemaFieldStructOptionalValueFieldsItem.js +64 -0
  636. package/serialization/types/ClaimsSchemaFieldStructOptionalValueFieldsItem.js.map +1 -0
  637. package/serialization/types/ClaimsSchemaFieldStructValue.d.ts +3 -0
  638. package/serialization/types/ClaimsSchemaFieldStructValue.d.ts.map +1 -1
  639. package/serialization/types/ClaimsSchemaFieldStructValue.js +3 -0
  640. package/serialization/types/ClaimsSchemaFieldStructValue.js.map +1 -1
  641. package/serialization/types/ClaimsSchemaOptional.d.ts +18 -0
  642. package/serialization/types/ClaimsSchemaOptional.d.ts.map +1 -0
  643. package/serialization/types/ClaimsSchemaOptional.js +49 -0
  644. package/serialization/types/ClaimsSchemaOptional.js.map +1 -0
  645. package/serialization/types/ClaimsSchemaOptionalFieldsItem.d.ts +42 -0
  646. package/serialization/types/ClaimsSchemaOptionalFieldsItem.d.ts.map +1 -0
  647. package/serialization/types/{DraftFieldStructValueFieldsItem.js → ClaimsSchemaOptionalFieldsItem.js} +18 -18
  648. package/serialization/types/ClaimsSchemaOptionalFieldsItem.js.map +1 -0
  649. package/serialization/types/CredentialClaimLinkedCredentialValue.d.ts +14 -0
  650. package/serialization/types/CredentialClaimLinkedCredentialValue.d.ts.map +1 -0
  651. package/serialization/types/{DraftFieldDateValue.js → CredentialClaimLinkedCredentialValue.js} +5 -8
  652. package/serialization/types/CredentialClaimLinkedCredentialValue.js.map +1 -0
  653. package/serialization/types/CredentialClaimLinkedFileValue.d.ts +14 -0
  654. package/serialization/types/CredentialClaimLinkedFileValue.d.ts.map +1 -0
  655. package/serialization/types/CredentialClaimLinkedFileValue.js +45 -0
  656. package/serialization/types/CredentialClaimLinkedFileValue.js.map +1 -0
  657. package/serialization/types/CredentialClaimValue.d.ts +45 -0
  658. package/serialization/types/CredentialClaimValue.d.ts.map +1 -0
  659. package/serialization/types/{DraftSchemaFieldsItem.js → CredentialClaimValue.js} +19 -18
  660. package/serialization/types/CredentialClaimValue.js.map +1 -0
  661. package/serialization/types/CredentialClaimValues.d.ts +11 -0
  662. package/serialization/types/CredentialClaimValues.d.ts.map +1 -0
  663. package/serialization/types/CredentialClaimValues.js +43 -0
  664. package/serialization/types/CredentialClaimValues.js.map +1 -0
  665. package/serialization/types/CredentialSchema.d.ts +3 -4
  666. package/serialization/types/CredentialSchema.d.ts.map +1 -1
  667. package/serialization/types/CredentialSchema.js +3 -4
  668. package/serialization/types/CredentialSchema.js.map +1 -1
  669. package/serialization/types/CredentialSchemaCreate.d.ts +2 -2
  670. package/serialization/types/CredentialSchemaCreate.d.ts.map +1 -1
  671. package/serialization/types/CredentialSchemaCreate.js +2 -2
  672. package/serialization/types/CredentialSchemaCreate.js.map +1 -1
  673. package/serialization/types/CredentialSchemaUpdate.d.ts +2 -2
  674. package/serialization/types/CredentialSchemaUpdate.d.ts.map +1 -1
  675. package/serialization/types/CredentialSchemaUpdate.js +2 -2
  676. package/serialization/types/CredentialSchemaUpdate.js.map +1 -1
  677. package/serialization/types/{DraftEnumValue.d.ts → DateClaimValue.d.ts} +3 -4
  678. package/serialization/types/DateClaimValue.d.ts.map +1 -0
  679. package/serialization/types/{DraftEnumValue.js → DateClaimValue.js} +3 -4
  680. package/serialization/types/DateClaimValue.js.map +1 -0
  681. package/serialization/types/DateTimeClaimValue.d.ts +13 -0
  682. package/serialization/types/DateTimeClaimValue.d.ts.map +1 -0
  683. package/serialization/types/DateTimeClaimValue.js +44 -0
  684. package/serialization/types/DateTimeClaimValue.js.map +1 -0
  685. package/serialization/types/Draft.d.ts +4 -3
  686. package/serialization/types/Draft.d.ts.map +1 -1
  687. package/serialization/types/Draft.js +5 -3
  688. package/serialization/types/Draft.js.map +1 -1
  689. package/serialization/types/DraftCreate.d.ts +5 -3
  690. package/serialization/types/DraftCreate.d.ts.map +1 -1
  691. package/serialization/types/DraftCreate.js +6 -3
  692. package/serialization/types/DraftCreate.js.map +1 -1
  693. package/serialization/types/DraftCreateMetaSchema.d.ts +12 -0
  694. package/serialization/types/DraftCreateMetaSchema.d.ts.map +1 -0
  695. package/serialization/types/DraftCreateMetaSchema.js +43 -0
  696. package/serialization/types/DraftCreateMetaSchema.js.map +1 -0
  697. package/serialization/types/DraftUpdate.d.ts +1 -1
  698. package/serialization/types/DraftUpdate.d.ts.map +1 -1
  699. package/serialization/types/DraftUpdate.js +2 -1
  700. package/serialization/types/DraftUpdate.js.map +1 -1
  701. package/serialization/types/FileClaimValue.d.ts +14 -0
  702. package/serialization/types/FileClaimValue.d.ts.map +1 -0
  703. package/serialization/types/FileClaimValue.js +45 -0
  704. package/serialization/types/FileClaimValue.js.map +1 -0
  705. package/serialization/types/LinkClaimValue.d.ts +14 -0
  706. package/serialization/types/LinkClaimValue.d.ts.map +1 -0
  707. package/serialization/types/LinkClaimValue.js +45 -0
  708. package/serialization/types/LinkClaimValue.js.map +1 -0
  709. package/serialization/types/ListPublishedCredentialSchema.d.ts +14 -0
  710. package/serialization/types/ListPublishedCredentialSchema.d.ts.map +1 -0
  711. package/serialization/types/ListPublishedCredentialSchema.js +45 -0
  712. package/serialization/types/ListPublishedCredentialSchema.js.map +1 -0
  713. package/serialization/types/MetaSchema.d.ts +16 -0
  714. package/serialization/types/MetaSchema.d.ts.map +1 -0
  715. package/serialization/types/MetaSchema.js +47 -0
  716. package/serialization/types/MetaSchema.js.map +1 -0
  717. package/serialization/types/NumberClaimValue.d.ts +13 -0
  718. package/serialization/types/NumberClaimValue.d.ts.map +1 -0
  719. package/serialization/types/NumberClaimValue.js +44 -0
  720. package/serialization/types/NumberClaimValue.js.map +1 -0
  721. package/serialization/types/ProblemInternalServerError.d.ts +2 -1
  722. package/serialization/types/ProblemInternalServerError.d.ts.map +1 -1
  723. package/serialization/types/ProblemInternalServerError.js +2 -1
  724. package/serialization/types/ProblemInternalServerError.js.map +1 -1
  725. package/serialization/types/ProblemInternalServerErrorType.d.ts +11 -0
  726. package/serialization/types/ProblemInternalServerErrorType.d.ts.map +1 -0
  727. package/serialization/types/ProblemInternalServerErrorType.js +42 -0
  728. package/serialization/types/ProblemInternalServerErrorType.js.map +1 -0
  729. package/serialization/types/PublishedCredentialSchema.d.ts +4 -0
  730. package/serialization/types/PublishedCredentialSchema.d.ts.map +1 -1
  731. package/serialization/types/PublishedCredentialSchema.js +4 -0
  732. package/serialization/types/PublishedCredentialSchema.js.map +1 -1
  733. package/serialization/types/PublishedSchemaBaseFilter.d.ts +30 -0
  734. package/serialization/types/PublishedSchemaBaseFilter.d.ts.map +1 -0
  735. package/serialization/types/PublishedSchemaBaseFilter.js +61 -0
  736. package/serialization/types/PublishedSchemaBaseFilter.js.map +1 -0
  737. package/serialization/types/PublishedSchemaBaseFilterAnnotationsItem.d.ts +27 -0
  738. package/serialization/types/PublishedSchemaBaseFilterAnnotationsItem.d.ts.map +1 -0
  739. package/serialization/types/PublishedSchemaBaseFilterAnnotationsItem.js +56 -0
  740. package/serialization/types/PublishedSchemaBaseFilterAnnotationsItem.js.map +1 -0
  741. package/serialization/types/{SchemaFilterPublicationPublishedAt.d.ts → PublishedSchemaBaseFilterCreatedAt.d.ts} +4 -4
  742. package/serialization/types/{SchemaFilterPublicationPublishedAt.d.ts.map → PublishedSchemaBaseFilterCreatedAt.d.ts.map} +1 -1
  743. package/serialization/types/{SchemaFilterPublicationPublishedAt.js → PublishedSchemaBaseFilterCreatedAt.js} +3 -3
  744. package/serialization/types/{SchemaFilterPublicationPublishedAt.js.map → PublishedSchemaBaseFilterCreatedAt.js.map} +1 -1
  745. package/serialization/types/PublishedSchemaBaseFilterDeletedAt.d.ts +39 -0
  746. package/serialization/types/PublishedSchemaBaseFilterDeletedAt.d.ts.map +1 -0
  747. package/serialization/types/PublishedSchemaBaseFilterDeletedAt.js +62 -0
  748. package/serialization/types/PublishedSchemaBaseFilterDeletedAt.js.map +1 -0
  749. package/serialization/types/{SchemaFilterPublicationEtag.d.ts → PublishedSchemaBaseFilterEtag.d.ts} +4 -4
  750. package/serialization/types/PublishedSchemaBaseFilterEtag.d.ts.map +1 -0
  751. package/serialization/types/{SchemaFilterPublicationEtag.js → PublishedSchemaBaseFilterEtag.js} +3 -3
  752. package/serialization/types/PublishedSchemaBaseFilterEtag.js.map +1 -0
  753. package/serialization/types/PublishedSchemaBaseFilterId.d.ts +27 -0
  754. package/serialization/types/PublishedSchemaBaseFilterId.d.ts.map +1 -0
  755. package/serialization/types/{SchemaFilterPublicationUrl.js → PublishedSchemaBaseFilterId.js} +11 -11
  756. package/serialization/types/PublishedSchemaBaseFilterId.js.map +1 -0
  757. package/serialization/types/PublishedSchemaBaseFilterLabelsItem.d.ts +27 -0
  758. package/serialization/types/PublishedSchemaBaseFilterLabelsItem.d.ts.map +1 -0
  759. package/serialization/types/PublishedSchemaBaseFilterLabelsItem.js +56 -0
  760. package/serialization/types/PublishedSchemaBaseFilterLabelsItem.js.map +1 -0
  761. package/serialization/types/PublishedSchemaBaseFilterModifiedAt.d.ts +31 -0
  762. package/serialization/types/PublishedSchemaBaseFilterModifiedAt.d.ts.map +1 -0
  763. package/serialization/types/PublishedSchemaBaseFilterModifiedAt.js +58 -0
  764. package/serialization/types/PublishedSchemaBaseFilterModifiedAt.js.map +1 -0
  765. package/serialization/types/PublishedSchemaBaseFilterRevision.d.ts +47 -0
  766. package/serialization/types/PublishedSchemaBaseFilterRevision.d.ts.map +1 -0
  767. package/serialization/types/PublishedSchemaBaseFilterRevision.js +66 -0
  768. package/serialization/types/PublishedSchemaBaseFilterRevision.js.map +1 -0
  769. package/serialization/types/PublishedSchemaFilter.d.ts +12 -0
  770. package/serialization/types/PublishedSchemaFilter.d.ts.map +1 -0
  771. package/serialization/types/PublishedSchemaFilter.js +9 -0
  772. package/serialization/types/PublishedSchemaFilter.js.map +1 -0
  773. package/serialization/types/PublishedSchemaFilterData.d.ts +20 -0
  774. package/serialization/types/PublishedSchemaFilterData.d.ts.map +1 -0
  775. package/serialization/types/PublishedSchemaFilterData.js +51 -0
  776. package/serialization/types/PublishedSchemaFilterData.js.map +1 -0
  777. package/serialization/types/PublishedSchemaFilterDataDigestMultibase.d.ts +27 -0
  778. package/serialization/types/PublishedSchemaFilterDataDigestMultibase.d.ts.map +1 -0
  779. package/serialization/types/PublishedSchemaFilterDataDigestMultibase.js +56 -0
  780. package/serialization/types/PublishedSchemaFilterDataDigestMultibase.js.map +1 -0
  781. package/serialization/types/PublishedSchemaFilterDataPublishedAt.d.ts +31 -0
  782. package/serialization/types/PublishedSchemaFilterDataPublishedAt.d.ts.map +1 -0
  783. package/serialization/types/PublishedSchemaFilterDataPublishedAt.js +58 -0
  784. package/serialization/types/PublishedSchemaFilterDataPublishedAt.js.map +1 -0
  785. package/serialization/types/{SchemaFilterPublicationSlug.d.ts → PublishedSchemaFilterDataSlug.d.ts} +4 -4
  786. package/serialization/types/PublishedSchemaFilterDataSlug.d.ts.map +1 -0
  787. package/serialization/types/{SchemaFilterPublicationSlug.js → PublishedSchemaFilterDataSlug.js} +3 -3
  788. package/serialization/types/PublishedSchemaFilterDataSlug.js.map +1 -0
  789. package/serialization/types/{SchemaFilterPublicationVersion.d.ts → PublishedSchemaFilterDataVersion.d.ts} +4 -4
  790. package/serialization/types/PublishedSchemaFilterDataVersion.d.ts.map +1 -0
  791. package/serialization/types/{SchemaFilterPublicationVersion.js → PublishedSchemaFilterDataVersion.js} +3 -3
  792. package/serialization/types/PublishedSchemaFilterDataVersion.js.map +1 -0
  793. package/serialization/types/PublishedSchemaSort.d.ts +16 -0
  794. package/serialization/types/PublishedSchemaSort.d.ts.map +1 -0
  795. package/serialization/types/PublishedSchemaSort.js +47 -0
  796. package/serialization/types/PublishedSchemaSort.js.map +1 -0
  797. package/serialization/types/PublishedSchemaSortField.d.ts +11 -0
  798. package/serialization/types/PublishedSchemaSortField.d.ts.map +1 -0
  799. package/serialization/types/PublishedSchemaSortField.js +53 -0
  800. package/serialization/types/PublishedSchemaSortField.js.map +1 -0
  801. package/serialization/types/PublishedSchemaSortOrder.d.ts +11 -0
  802. package/serialization/types/PublishedSchemaSortOrder.d.ts.map +1 -0
  803. package/serialization/types/PublishedSchemaSortOrder.js +42 -0
  804. package/serialization/types/PublishedSchemaSortOrder.js.map +1 -0
  805. package/serialization/types/ResourcePublishedCredentialSchema.d.ts +24 -0
  806. package/serialization/types/ResourcePublishedCredentialSchema.d.ts.map +1 -0
  807. package/serialization/types/ResourcePublishedCredentialSchema.js +55 -0
  808. package/serialization/types/ResourcePublishedCredentialSchema.js.map +1 -0
  809. package/serialization/types/SchemaFilterData.d.ts +2 -2
  810. package/serialization/types/SchemaFilterData.d.ts.map +1 -1
  811. package/serialization/types/SchemaFilterData.js +2 -2
  812. package/serialization/types/SchemaFilterData.js.map +1 -1
  813. package/serialization/types/SchemaFilterDataDigestMultibase.d.ts +27 -0
  814. package/serialization/types/SchemaFilterDataDigestMultibase.d.ts.map +1 -0
  815. package/serialization/types/SchemaFilterDataDigestMultibase.js +56 -0
  816. package/serialization/types/SchemaFilterDataDigestMultibase.js.map +1 -0
  817. package/serialization/types/SchemaImportDataRequest.d.ts +16 -0
  818. package/serialization/types/SchemaImportDataRequest.d.ts.map +1 -0
  819. package/serialization/types/SchemaImportDataRequest.js +47 -0
  820. package/serialization/types/SchemaImportDataRequest.js.map +1 -0
  821. package/serialization/types/SchemaSortField.d.ts +1 -1
  822. package/serialization/types/SchemaSortField.d.ts.map +1 -1
  823. package/serialization/types/SchemaSortField.js +1 -5
  824. package/serialization/types/SchemaSortField.js.map +1 -1
  825. package/serialization/types/StringClaimValue.d.ts +13 -0
  826. package/serialization/types/StringClaimValue.d.ts.map +1 -0
  827. package/serialization/types/StringClaimValue.js +44 -0
  828. package/serialization/types/StringClaimValue.js.map +1 -0
  829. package/serialization/types/StructClaimValue.d.ts +13 -0
  830. package/serialization/types/StructClaimValue.d.ts.map +1 -0
  831. package/serialization/types/StructClaimValue.js +45 -0
  832. package/serialization/types/StructClaimValue.js.map +1 -0
  833. package/serialization/types/index.d.ts +43 -19
  834. package/serialization/types/index.d.ts.map +1 -1
  835. package/serialization/types/index.js +43 -19
  836. package/serialization/types/index.js.map +1 -1
  837. package/api/types/CredentialSchemaPublicationOutput.d.ts +0 -27
  838. package/api/types/CredentialSchemaPublicationOutput.d.ts.map +0 -1
  839. package/api/types/CredentialSchemaPublicationOutput.js.map +0 -1
  840. package/api/types/DraftEnumValue.d.ts +0 -13
  841. package/api/types/DraftEnumValue.d.ts.map +0 -1
  842. package/api/types/DraftEnumValue.js.map +0 -1
  843. package/api/types/DraftFieldBooleanValue.d.ts +0 -18
  844. package/api/types/DraftFieldBooleanValue.d.ts.map +0 -1
  845. package/api/types/DraftFieldBooleanValue.js.map +0 -1
  846. package/api/types/DraftFieldDateTimeValue.d.ts +0 -18
  847. package/api/types/DraftFieldDateTimeValue.d.ts.map +0 -1
  848. package/api/types/DraftFieldDateTimeValue.js.map +0 -1
  849. package/api/types/DraftFieldDateValue.d.ts +0 -18
  850. package/api/types/DraftFieldDateValue.d.ts.map +0 -1
  851. package/api/types/DraftFieldDateValue.js.map +0 -1
  852. package/api/types/DraftFieldFileValue.d.ts +0 -16
  853. package/api/types/DraftFieldFileValue.d.ts.map +0 -1
  854. package/api/types/DraftFieldFileValue.js.map +0 -1
  855. package/api/types/DraftFieldLinkValue.d.ts +0 -18
  856. package/api/types/DraftFieldLinkValue.d.ts.map +0 -1
  857. package/api/types/DraftFieldLinkValue.js.map +0 -1
  858. package/api/types/DraftFieldNumberValue.d.ts +0 -18
  859. package/api/types/DraftFieldNumberValue.d.ts.map +0 -1
  860. package/api/types/DraftFieldNumberValue.js +0 -6
  861. package/api/types/DraftFieldNumberValue.js.map +0 -1
  862. package/api/types/DraftFieldStringValue.d.ts +0 -21
  863. package/api/types/DraftFieldStringValue.d.ts.map +0 -1
  864. package/api/types/DraftFieldStringValue.js +0 -6
  865. package/api/types/DraftFieldStringValue.js.map +0 -1
  866. package/api/types/DraftFieldStructValue.d.ts +0 -23
  867. package/api/types/DraftFieldStructValue.d.ts.map +0 -1
  868. package/api/types/DraftFieldStructValue.js +0 -6
  869. package/api/types/DraftFieldStructValue.js.map +0 -1
  870. package/api/types/DraftFieldStructValueFieldsItem.d.ts +0 -35
  871. package/api/types/DraftFieldStructValueFieldsItem.d.ts.map +0 -1
  872. package/api/types/DraftFieldStructValueFieldsItem.js +0 -6
  873. package/api/types/DraftFieldStructValueFieldsItem.js.map +0 -1
  874. package/api/types/DraftSchema.d.ts +0 -49
  875. package/api/types/DraftSchema.d.ts.map +0 -1
  876. package/api/types/DraftSchema.js.map +0 -1
  877. package/api/types/DraftSchemaFieldsItem.d.ts +0 -35
  878. package/api/types/DraftSchemaFieldsItem.d.ts.map +0 -1
  879. package/api/types/DraftSchemaFieldsItem.js +0 -6
  880. package/api/types/DraftSchemaFieldsItem.js.map +0 -1
  881. package/api/types/SchemaFilterPublication.d.ts +0 -15
  882. package/api/types/SchemaFilterPublication.d.ts.map +0 -1
  883. package/api/types/SchemaFilterPublication.js +0 -6
  884. package/api/types/SchemaFilterPublication.js.map +0 -1
  885. package/api/types/SchemaFilterPublicationEtag.d.ts.map +0 -1
  886. package/api/types/SchemaFilterPublicationEtag.js +0 -6
  887. package/api/types/SchemaFilterPublicationEtag.js.map +0 -1
  888. package/api/types/SchemaFilterPublicationPublishedAt.d.ts.map +0 -1
  889. package/api/types/SchemaFilterPublicationPublishedAt.js +0 -6
  890. package/api/types/SchemaFilterPublicationPublishedAt.js.map +0 -1
  891. package/api/types/SchemaFilterPublicationSlug.d.ts.map +0 -1
  892. package/api/types/SchemaFilterPublicationSlug.js +0 -6
  893. package/api/types/SchemaFilterPublicationSlug.js.map +0 -1
  894. package/api/types/SchemaFilterPublicationUrl.d.ts +0 -20
  895. package/api/types/SchemaFilterPublicationUrl.d.ts.map +0 -1
  896. package/api/types/SchemaFilterPublicationUrl.js +0 -6
  897. package/api/types/SchemaFilterPublicationUrl.js.map +0 -1
  898. package/api/types/SchemaFilterPublicationVersion.d.ts.map +0 -1
  899. package/api/types/SchemaFilterPublicationVersion.js +0 -6
  900. package/api/types/SchemaFilterPublicationVersion.js.map +0 -1
  901. package/serialization/types/CredentialSchemaPublicationOutput.d.ts +0 -17
  902. package/serialization/types/CredentialSchemaPublicationOutput.d.ts.map +0 -1
  903. package/serialization/types/CredentialSchemaPublicationOutput.js.map +0 -1
  904. package/serialization/types/DraftEnumValue.d.ts.map +0 -1
  905. package/serialization/types/DraftEnumValue.js.map +0 -1
  906. package/serialization/types/DraftFieldBooleanValue.d.ts +0 -17
  907. package/serialization/types/DraftFieldBooleanValue.d.ts.map +0 -1
  908. package/serialization/types/DraftFieldBooleanValue.js.map +0 -1
  909. package/serialization/types/DraftFieldDateTimeValue.d.ts +0 -17
  910. package/serialization/types/DraftFieldDateTimeValue.d.ts.map +0 -1
  911. package/serialization/types/DraftFieldDateTimeValue.js.map +0 -1
  912. package/serialization/types/DraftFieldDateValue.d.ts +0 -17
  913. package/serialization/types/DraftFieldDateValue.d.ts.map +0 -1
  914. package/serialization/types/DraftFieldDateValue.js.map +0 -1
  915. package/serialization/types/DraftFieldFileValue.d.ts +0 -16
  916. package/serialization/types/DraftFieldFileValue.d.ts.map +0 -1
  917. package/serialization/types/DraftFieldFileValue.js.map +0 -1
  918. package/serialization/types/DraftFieldLinkValue.d.ts +0 -17
  919. package/serialization/types/DraftFieldLinkValue.d.ts.map +0 -1
  920. package/serialization/types/DraftFieldLinkValue.js +0 -48
  921. package/serialization/types/DraftFieldLinkValue.js.map +0 -1
  922. package/serialization/types/DraftFieldNumberValue.d.ts +0 -17
  923. package/serialization/types/DraftFieldNumberValue.d.ts.map +0 -1
  924. package/serialization/types/DraftFieldNumberValue.js +0 -48
  925. package/serialization/types/DraftFieldNumberValue.js.map +0 -1
  926. package/serialization/types/DraftFieldStringValue.d.ts +0 -19
  927. package/serialization/types/DraftFieldStringValue.d.ts.map +0 -1
  928. package/serialization/types/DraftFieldStringValue.js +0 -50
  929. package/serialization/types/DraftFieldStringValue.js.map +0 -1
  930. package/serialization/types/DraftFieldStructValue.d.ts +0 -19
  931. package/serialization/types/DraftFieldStructValue.d.ts.map +0 -1
  932. package/serialization/types/DraftFieldStructValue.js.map +0 -1
  933. package/serialization/types/DraftFieldStructValueFieldsItem.d.ts +0 -42
  934. package/serialization/types/DraftFieldStructValueFieldsItem.d.ts.map +0 -1
  935. package/serialization/types/DraftFieldStructValueFieldsItem.js.map +0 -1
  936. package/serialization/types/DraftSchema.d.ts +0 -17
  937. package/serialization/types/DraftSchema.d.ts.map +0 -1
  938. package/serialization/types/DraftSchema.js +0 -48
  939. package/serialization/types/DraftSchema.js.map +0 -1
  940. package/serialization/types/DraftSchemaFieldsItem.d.ts +0 -42
  941. package/serialization/types/DraftSchemaFieldsItem.d.ts.map +0 -1
  942. package/serialization/types/DraftSchemaFieldsItem.js.map +0 -1
  943. package/serialization/types/SchemaFilterPublication.d.ts +0 -22
  944. package/serialization/types/SchemaFilterPublication.d.ts.map +0 -1
  945. package/serialization/types/SchemaFilterPublication.js +0 -53
  946. package/serialization/types/SchemaFilterPublication.js.map +0 -1
  947. package/serialization/types/SchemaFilterPublicationEtag.d.ts.map +0 -1
  948. package/serialization/types/SchemaFilterPublicationEtag.js.map +0 -1
  949. package/serialization/types/SchemaFilterPublicationSlug.d.ts.map +0 -1
  950. package/serialization/types/SchemaFilterPublicationSlug.js.map +0 -1
  951. package/serialization/types/SchemaFilterPublicationUrl.d.ts +0 -27
  952. package/serialization/types/SchemaFilterPublicationUrl.d.ts.map +0 -1
  953. package/serialization/types/SchemaFilterPublicationUrl.js.map +0 -1
  954. package/serialization/types/SchemaFilterPublicationVersion.d.ts.map +0 -1
  955. package/serialization/types/SchemaFilterPublicationVersion.js.map +0 -1
@@ -4,6 +4,10 @@ import { CredentialFlavor } from './credential/flavor';
4
4
  import { Claims, UpdatePayloadWithClaims } from './credential/types';
5
5
  import { VerifiableCredentialWithClaims } from './credential/verifiable/with-claims';
6
6
  import { ApiClient, BlobInput, Ctor, UpdatePayload, UpdatePayloadWithIssueClaims } from './types';
7
+ export type SchemaPublicationResult = {
8
+ published: boolean;
9
+ error?: string;
10
+ };
7
11
  export type CredentialEnvelope<T extends Claims> = {
8
12
  isVerifiable: false;
9
13
  credential: DraftCredentialWithClaims<T>;
@@ -18,14 +22,16 @@ export declare class VcDecorator<T extends Claims> {
18
22
  private claimsModel;
19
23
  readonly flavor: CredentialFlavor;
20
24
  private claims;
25
+ private vcSchemaMetadata;
21
26
  constructor(client: ApiClient, claimsModel: Ctor<T>);
22
27
  protected createCredentialFlavor(): CredentialFlavor;
23
- getIri(): string;
24
- getCredentialTerm(): string;
25
- canMap(input: ResourceDraft | ResourceCredential): boolean;
26
- map(input: ResourceDraft): DraftCredentialWithClaims<T>;
27
- map(input: ResourceCredential): VerifiableCredentialWithClaims<T>;
28
+ publishSchema(): Promise<SchemaPublicationResult>;
29
+ getCredentialTerm(): Promise<string>;
30
+ canMap(input: ResourceDraft | ResourceCredential): Promise<boolean>;
31
+ map(input: ResourceDraft): Promise<DraftCredentialWithClaims<T>>;
32
+ map(input: ResourceCredential): Promise<VerifiableCredentialWithClaims<T>>;
28
33
  private importBlob;
34
+ private convertUDTToDraftCreate;
29
35
  create(request?: UpdatePayloadWithClaims<T>): Promise<DraftCredentialWithClaims<T>>;
30
36
  issue(privateKeyId: string, request: UpdatePayloadWithIssueClaims<T>): Promise<VerifiableCredentialWithClaims<T>>;
31
37
  loadAsDraft(id: string, revision?: number): Promise<DraftCredentialWithClaims<T>>;
@@ -1 +1 @@
1
- {"version":3,"file":"credential.d.ts","sourceRoot":"","sources":["../../src/documents/credential.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,kBAAkB,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAE1E,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAA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CAAC,8BAA8B,CAAC,CAAC,CAAC,CAAC;IAKvC,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC;IAQjF,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAAC,CAAC,CAAC;IAQ3F,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;IA2BjE,gBAAgB,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAAC,CAAC,CAAC;CAK/G"}
@@ -1,4 +1,13 @@
1
1
  "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ 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;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
2
11
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
12
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
13
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -8,9 +17,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
17
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
18
  });
10
19
  };
20
+ var __importDefault = (this && this.__importDefault) || function (mod) {
21
+ return (mod && mod.__esModule) ? mod : { "default": mod };
22
+ };
11
23
  Object.defineProperty(exports, "__esModule", { value: true });
12
24
  exports.VcDecorator = void 0;
25
+ const mem_1 = __importDefault(require("mem"));
13
26
  const api_1 = require("../api");
27
+ const errors_1 = require("../errors");
14
28
  const claims_1 = require("./credential/claims");
15
29
  const with_claims_1 = require("./credential/draft/with-claims");
16
30
  const flavor_1 = require("./credential/flavor");
@@ -27,40 +41,86 @@ class VcDecorator {
27
41
  this.claimsModel = claimsModel;
28
42
  this.flavor = this.createCredentialFlavor();
29
43
  this.claims = new claims_1.UdtClaims(this.client, this.claimsModel);
44
+ this.vcSchemaMetadata = (0, decorators_1.getVcSchemaMetadataOrThrow)(claimsModel);
30
45
  }
31
46
  createCredentialFlavor() {
32
47
  return new flavor_1.CredentialFlavor();
33
48
  }
34
- getIri() {
35
- const vcContextMetadata = (0, decorators_1.getContextJsonLdMetadata)(this.claimsModel);
36
- if (!vcContextMetadata)
37
- throw new error_1.DocumentedError(error_1.ErrorCode.VcContextAnnotationMissing, "Can't find IRI information. Make sure you have defined the claims model with the @VcContext decorator.");
38
- return `${vcContextMetadata.namespace}#${vcContextMetadata.name}`;
49
+ publishSchema() {
50
+ return __awaiter(this, void 0, void 0, function* () {
51
+ if (this.vcSchemaMetadata.slug == null) {
52
+ return { published: false, error: 'A schema requires a slug to be published as stable' };
53
+ }
54
+ if (this.vcSchemaMetadata.owner != null && this.vcSchemaMetadata.owner !== (yield this.client.tenantId())) {
55
+ return { published: false, error: 'A schema with a different owner cannot be published' };
56
+ }
57
+ try {
58
+ const credentialSchema = yield this.client.schemas.schemaCreate({
59
+ data: {
60
+ schema: this.claims.getClaimsSchema(),
61
+ },
62
+ });
63
+ yield this.client.schemas.schemaPublish(credentialSchema.id, {
64
+ slug: this.vcSchemaMetadata.slug,
65
+ version: this.vcSchemaMetadata.version,
66
+ });
67
+ return { published: true };
68
+ }
69
+ catch (error) {
70
+ if (error instanceof errors_1.TruvityError) {
71
+ return { published: false, error: error.message };
72
+ }
73
+ throw error;
74
+ }
75
+ });
39
76
  }
40
77
  getCredentialTerm() {
41
- const vcContextMetadata = (0, decorators_1.getContextJsonLdMetadata)(this.claimsModel);
42
- if (!vcContextMetadata)
43
- throw new error_1.DocumentedError(error_1.ErrorCode.VcContextAnnotationMissing, "Can't find credential term information. Make sure you have defined the claims model with the @VcContext decorator");
44
- return `${vcContextMetadata.name}Credential`;
78
+ return __awaiter(this, void 0, void 0, function* () {
79
+ let publishedCredentialSchema;
80
+ if (this.vcSchemaMetadata.owner == null) {
81
+ const result = yield this.client.schemas.schemaImport({
82
+ data: {
83
+ schema: this.claims.getClaimsSchema(),
84
+ version: this.vcSchemaMetadata.version,
85
+ slug: this.vcSchemaMetadata.slug,
86
+ },
87
+ });
88
+ publishedCredentialSchema = result.data;
89
+ }
90
+ else if (this.vcSchemaMetadata.slug != null) {
91
+ publishedCredentialSchema = yield this.client.desk.publishedMetaSchemaFetch(this.vcSchemaMetadata.owner, this.vcSchemaMetadata.slug, this.vcSchemaMetadata.version);
92
+ }
93
+ else {
94
+ throw new error_1.DocumentedError(error_1.ErrorCode.VcSchemaMissingSlug, 'A VcSchema annotation with an owner value requires a slug value');
95
+ }
96
+ if (publishedCredentialSchema.schema.jsonLdTermName != null) {
97
+ return `${publishedCredentialSchema.schema.jsonLdTermName}Credential`;
98
+ }
99
+ return `${publishedCredentialSchema.slug}v${publishedCredentialSchema.version}Credential`;
100
+ });
45
101
  }
46
102
  canMap(input) {
47
- return input.data.type.includes(this.getCredentialTerm());
103
+ return __awaiter(this, void 0, void 0, function* () {
104
+ return input.data.type.includes(yield this.getCredentialTerm());
105
+ });
48
106
  }
49
107
  map(input) {
50
- if ((0, types_1.isResourceCredential)(input)) {
51
- // ResourceCredential
52
- if (!this.canMap(input)) {
53
- throw new error_1.DocumentedError(error_1.ErrorCode.IncompatibleUDT, `The received ResourceCredential is incompatible with the current VcDecorator instance claims model`);
54
- }
55
- return new with_claims_2.VerifiableCredentialWithClaims(this.client, this.flavor, this.claimsModel, input);
56
- }
57
- else {
58
- // ResourceDraft
59
- if (!this.canMap(input)) {
60
- throw new error_1.DocumentedError(error_1.ErrorCode.IncompatibleUDT, `The received ResourceDraft is incompatible with the current VcDecorator instance claims model`);
61
- }
62
- return new with_claims_1.DraftCredentialWithClaims(this.client, this.flavor, this.claimsModel, input.data, input);
63
- }
108
+ return __awaiter(this, void 0, void 0, function* () {
109
+ if ((0, types_1.isResourceCredential)(input)) {
110
+ // ResourceCredential
111
+ if (!(yield this.canMap(input))) {
112
+ throw new error_1.DocumentedError(error_1.ErrorCode.IncompatibleUDT, `The received ResourceCredential is incompatible with the current VcDecorator instance claims model`);
113
+ }
114
+ return new with_claims_2.VerifiableCredentialWithClaims(this.client, this.flavor, this.claimsModel, input);
115
+ }
116
+ else {
117
+ // ResourceDraft
118
+ if (!(yield this.canMap(input))) {
119
+ throw new error_1.DocumentedError(error_1.ErrorCode.IncompatibleUDT, `The received ResourceDraft is incompatible with the current VcDecorator instance claims model`);
120
+ }
121
+ return new with_claims_1.DraftCredentialWithClaims(this.client, this.flavor, this.claimsModel, input.data, input);
122
+ }
123
+ });
64
124
  }
65
125
  importBlob(blob, request) {
66
126
  return __awaiter(this, void 0, void 0, function* () {
@@ -89,16 +149,68 @@ class VcDecorator {
89
149
  };
90
150
  });
91
151
  }
152
+ convertUDTToDraftCreate(object) {
153
+ return __awaiter(this, void 0, void 0, function* () {
154
+ let metaSchema;
155
+ let jsonLdVocabs = this.vcSchemaMetadata.jsonLdVocabs;
156
+ let vcJsonSchemas = this.vcSchemaMetadata.vcJsonSchemas;
157
+ if (this.vcSchemaMetadata.owner == null) {
158
+ const claimsSchema = this.claims.getClaimsSchema();
159
+ metaSchema = {
160
+ schema: claimsSchema,
161
+ slug: this.vcSchemaMetadata.slug,
162
+ version: this.vcSchemaMetadata.version,
163
+ };
164
+ if ((jsonLdVocabs === null || jsonLdVocabs === void 0 ? void 0 : jsonLdVocabs.includes(decorators_1.VcSchema.jsonLdVocabUrl)) ||
165
+ (vcJsonSchemas === null || vcJsonSchemas === void 0 ? void 0 : vcJsonSchemas.includes(decorators_1.VcSchema.vcdmJsonSchemaUrl))) {
166
+ const result = yield this.client.schemas.schemaImport({
167
+ data: {
168
+ schema: claimsSchema,
169
+ slug: this.vcSchemaMetadata.slug,
170
+ version: this.vcSchemaMetadata.version,
171
+ },
172
+ });
173
+ jsonLdVocabs =
174
+ jsonLdVocabs == null
175
+ ? undefined
176
+ : jsonLdVocabs.map((x) => (decorators_1.VcSchema.jsonLdVocabUrl === x ? result.data.jsonLdVocabUrl : x));
177
+ vcJsonSchemas =
178
+ vcJsonSchemas == null
179
+ ? undefined
180
+ : vcJsonSchemas.map((x) => decorators_1.VcSchema.vcdmJsonSchemaUrl === x ? result.data.vcdmJsonSchemaUrl : x);
181
+ }
182
+ }
183
+ else if (this.vcSchemaMetadata.slug != null) {
184
+ const deskBaseURL = (yield this.client.dids.didDocumentSelfGet()).id.split(':')[2];
185
+ metaSchema = `https://${deskBaseURL}/tenants/${this.vcSchemaMetadata.owner}/meta-schema/${this.vcSchemaMetadata.slug}/v${this.vcSchemaMetadata.version}`;
186
+ if ((jsonLdVocabs === null || jsonLdVocabs === void 0 ? void 0 : jsonLdVocabs.includes(decorators_1.VcSchema.jsonLdVocabUrl)) ||
187
+ (vcJsonSchemas === null || vcJsonSchemas === void 0 ? void 0 : vcJsonSchemas.includes(decorators_1.VcSchema.vcdmJsonSchemaUrl))) {
188
+ const result = yield this.client.desk.publishedMetaSchemaFetch(this.vcSchemaMetadata.owner, this.vcSchemaMetadata.slug, this.vcSchemaMetadata.version);
189
+ jsonLdVocabs =
190
+ jsonLdVocabs == null
191
+ ? undefined
192
+ : jsonLdVocabs.map((x) => (decorators_1.VcSchema.jsonLdVocabUrl === x ? result.jsonLdVocabUrl : x));
193
+ vcJsonSchemas =
194
+ vcJsonSchemas == null
195
+ ? undefined
196
+ : vcJsonSchemas.map((x) => (decorators_1.VcSchema.vcdmJsonSchemaUrl === x ? result.vcdmJsonSchemaUrl : x));
197
+ }
198
+ }
199
+ else {
200
+ throw new error_1.DocumentedError(error_1.ErrorCode.VcSchemaMissingSlug, 'A VcSchema annotation with an owner value requires a slug value');
201
+ }
202
+ return {
203
+ metaSchema,
204
+ jsonLdVocabs,
205
+ vcdmJsonSchemas: vcJsonSchemas,
206
+ values: object != null ? this.claims.marshalValues(object) : undefined,
207
+ };
208
+ });
209
+ }
92
210
  create(request) {
93
211
  return __awaiter(this, void 0, void 0, function* () {
94
- const values = (request === null || request === void 0 ? void 0 : request.claims) ? this.claims.marshalValues(request.claims) : undefined;
95
- const schema = this.claims.getDraftSchema();
96
212
  const { id, etag, revision, data } = yield this.client.drafts.draftCreate({
97
- data: {
98
- schema,
99
- values,
100
- meta: (0, converters_1.draftMetadataToApiDraftMeta)(request === null || request === void 0 ? void 0 : request.metadata),
101
- },
213
+ data: yield this.convertUDTToDraftCreate((request === null || request === void 0 ? void 0 : request.claims) || null),
102
214
  annotations: request === null || request === void 0 ? void 0 : request.annotations,
103
215
  labels: request === null || request === void 0 ? void 0 : request.labels,
104
216
  idempotencyKey: (0, idempotency_1.generateKey)('create'),
@@ -108,7 +220,8 @@ class VcDecorator {
108
220
  }
109
221
  issue(privateKeyId, request) {
110
222
  return __awaiter(this, void 0, void 0, function* () {
111
- return (yield this.create(request)).issue(privateKeyId);
223
+ const result = yield this.create(request);
224
+ return result.issue(privateKeyId);
112
225
  });
113
226
  }
114
227
  loadAsDraft(id, revision) {
@@ -165,4 +278,10 @@ class VcDecorator {
165
278
  }
166
279
  }
167
280
  exports.VcDecorator = VcDecorator;
281
+ __decorate([
282
+ mem_1.default.decorator(),
283
+ __metadata("design:type", Function),
284
+ __metadata("design:paramtypes", []),
285
+ __metadata("design:returntype", Promise)
286
+ ], VcDecorator.prototype, "getCredentialTerm", null);
168
287
  //# sourceMappingURL=credential.js.map
@@ -1 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AAC;gBACb,IAAI,KAAK,YAAY,mBAAa,EAAE,CAAC;oBACjC,eAAe,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;gBAC3D,CAAC;;oBAAM,MAAM,KAAK,CAAC;YACvB,CAAC;YAED,IAAI,CAAC,eAAe,EAAE,CAAC;gBACnB,IAAI,CAAC,oBAAoB;oBAAE,MAAM,IAAI,KAAK,CAAC,qBAAqB,EAAE,uBAAuB,CAAC,CAAC;gBAE3F,OAAO;oBACH,YAAY,EAAE,IAAI;oBAClB,UAAU,EAAE,oBAAoB;iBACnC,CAAC;YACN,CAAC;iBAAM,CAAC;gBACJ,OAAO;oBACH,YAAY,EAAE,KAAK;oBACnB,UAAU,EAAE,eAAe;iBAC9B,CAAC;YACN,CAAC;QACL,CAAC;KAAA;IAEK,gBAAgB,CAAC,IAAe,EAAE,OAAuB;;YAC3D,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YAExD,OAAO,IAAI,4CAA8B,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;QACtG,CAAC;KAAA;CACJ;AAzKD,kCAyKC","sourcesContent":["import { NotFoundError, ResourceCredential, ResourceDraft } from '../api';\nimport { UdtClaims } from './credential/claims';\nimport { DraftCredentialWithClaims } from './credential/draft/with-claims';\nimport { CredentialFlavor } from './credential/flavor';\nimport { Claims, UpdatePayloadWithClaims } from './credential/types';\nimport { VerifiableCredentialWithClaims } from './credential/verifiable/with-claims';\nimport { getContextJsonLdMetadata } from './decorators';\nimport { verifiableCredentialDataSchema } from './schemas';\nimport {\n ApiClient,\n BlobInput,\n CredentialDescriptor,\n Ctor,\n isResourceCredential,\n UpdatePayload,\n UpdatePayloadWithIssueClaims,\n} from './types';\nimport { draftMetadataToApiDraftMeta, strictlyConvertToApiType } from './utils/converters';\nimport { DocumentedError, ErrorCode } from './utils/error';\nimport { generateKey } from './utils/idempotency';\n\nexport type CredentialEnvelope<T extends Claims> = {\n isVerifiable: false;\n credential: DraftCredentialWithClaims<T>;\n};\n\nexport type VerifiableCredentialEnvelope<T extends Claims> = {\n isVerifiable: true;\n credential: VerifiableCredentialWithClaims<T>;\n};\n\nexport type LoadedCredential<T extends Claims> = CredentialEnvelope<T> | VerifiableCredentialEnvelope<T>;\n\nexport class VcDecorator<T extends Claims> {\n readonly flavor = this.createCredentialFlavor();\n private claims = new UdtClaims(this.client, this.claimsModel);\n\n constructor(\n private client: ApiClient,\n private claimsModel: Ctor<T>,\n ) {}\n\n protected createCredentialFlavor(): CredentialFlavor {\n return new CredentialFlavor();\n }\n\n getIri(): string {\n const vcContextMetadata = getContextJsonLdMetadata(this.claimsModel);\n\n if (!vcContextMetadata)\n throw new DocumentedError(\n ErrorCode.VcContextAnnotationMissing,\n \"Can't find IRI information. Make sure you have defined the claims model with the @VcContext decorator.\",\n );\n\n return `${vcContextMetadata.namespace}#${vcContextMetadata.name}`;\n }\n\n getCredentialTerm(): string {\n const vcContextMetadata = getContextJsonLdMetadata(this.claimsModel);\n\n if (!vcContextMetadata)\n throw new DocumentedError(\n ErrorCode.VcContextAnnotationMissing,\n \"Can't find credential term information. Make sure you have defined the claims model with the @VcContext decorator\",\n );\n\n return `${vcContextMetadata.name}Credential`;\n }\n\n canMap(input: ResourceDraft | ResourceCredential): boolean {\n return input.data.type.includes(this.getCredentialTerm());\n }\n\n map(input: ResourceDraft): DraftCredentialWithClaims<T>;\n map(input: ResourceCredential): VerifiableCredentialWithClaims<T>;\n map(input: ResourceDraft | ResourceCredential): VerifiableCredentialWithClaims<T> | DraftCredentialWithClaims<T> {\n if (isResourceCredential(input)) {\n // ResourceCredential\n if (!this.canMap(input)) {\n throw new DocumentedError(\n ErrorCode.IncompatibleUDT,\n `The received ResourceCredential is incompatible with the current VcDecorator instance claims model`,\n );\n }\n\n return new VerifiableCredentialWithClaims(this.client, this.flavor, this.claimsModel, input);\n } else {\n // ResourceDraft\n if (!this.canMap(input)) {\n throw new DocumentedError(\n ErrorCode.IncompatibleUDT,\n `The received ResourceDraft is incompatible with the current VcDecorator instance claims model`,\n );\n }\n\n return new DraftCredentialWithClaims(this.client, this.flavor, this.claimsModel, input.data, input);\n }\n }\n\n private async importBlob(blob: BlobInput, request?: UpdatePayload): Promise<CredentialDescriptor> {\n const idempotencyKey = generateKey('importBlob');\n const { blobId, uploadUri } = await this.client.credentials.credentialUpload({\n idempotencyKey,\n });\n\n await fetch(uploadUri, {\n method: 'PUT',\n body: blob,\n });\n\n const resourceCredential = await this.client.credentials.credentialImport({\n annotations: request?.annotations,\n labels: request?.labels,\n blobId,\n idempotencyKey,\n });\n\n return {\n data: strictlyConvertToApiType(verifiableCredentialDataSchema, {\n id: resourceCredential.data.id,\n digestMultibase: resourceCredential.data.digestMultibase,\n }),\n id: resourceCredential.id,\n etag: resourceCredential.etag,\n revision: resourceCredential.revision,\n };\n }\n\n async create(request?: UpdatePayloadWithClaims<T>): Promise<DraftCredentialWithClaims<T>> {\n const values = request?.claims ? this.claims.marshalValues(request.claims) : undefined;\n const schema = this.claims.getDraftSchema();\n\n const { id, etag, revision, data } = await this.client.drafts.draftCreate({\n data: {\n schema,\n values,\n meta: draftMetadataToApiDraftMeta(request?.metadata),\n },\n annotations: request?.annotations,\n labels: request?.labels,\n idempotencyKey: generateKey('create'),\n });\n\n return new DraftCredentialWithClaims(this.client, this.flavor, this.claimsModel, data, { id, etag, revision });\n }\n\n async issue(\n privateKeyId: string,\n request: UpdatePayloadWithIssueClaims<T>,\n ): Promise<VerifiableCredentialWithClaims<T>> {\n return (await this.create(request)).issue(privateKeyId);\n }\n\n async loadAsDraft(id: string, revision?: number): Promise<DraftCredentialWithClaims<T>> {\n const resourceDraft = revision\n ? await this.client.drafts.draftRevision(id, revision)\n : await this.client.drafts.draftLatest(id);\n\n return this.map(resourceDraft);\n }\n\n async loadAsCredential(id: string, revision?: number): Promise<VerifiableCredentialWithClaims<T>> {\n const resourceCredential = revision\n ? await this.client.credentials.credentialRevision(id, revision)\n : await this.client.credentials.credentialLatest(id);\n\n return this.map(resourceCredential);\n }\n\n async load(id: string, revision?: number): Promise<LoadedCredential<T>> {\n let verifiableCredential: VerifiableCredentialWithClaims<T> | undefined;\n let draftCredential: DraftCredentialWithClaims<T> | undefined;\n\n try {\n verifiableCredential = await this.loadAsCredential(id, revision);\n } catch (error) {\n if (error instanceof NotFoundError) {\n draftCredential = await this.loadAsDraft(id, revision);\n } else throw error;\n }\n\n if (!draftCredential) {\n if (!verifiableCredential) throw new Error(`Resource with id '${id}' could not be found.`);\n\n return {\n isVerifiable: true,\n credential: verifiableCredential,\n };\n } else {\n return {\n isVerifiable: false,\n credential: draftCredential,\n };\n }\n }\n\n async importCredential(blob: BlobInput, request?: UpdatePayload): Promise<VerifiableCredentialWithClaims<T>> {\n const credential = await this.importBlob(blob, request);\n\n return new VerifiableCredentialWithClaims(this.client, this.flavor, this.claimsModel, credential);\n }\n}\n"]}
1
+ {"version":3,"file":"credential.js","sourceRoot":"","sources":["../../src/documents/credential.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAsB;AACtB,gCAOgB;AAChB,sCAAyC;AACzC,gDAAgD;AAChD,gEAA2E;AAC3E,gDAAuD;AAEvD,qEAAqF;AACrF,6CAAsF;AACtF,uCAA2D;AAC3D,mCASiB;AACjB,mDAA8D;AAC9D,yCAA2D;AAC3D,qDAAkD;AAmBlD,MAAa,WAAW;IAKpB,YACY,MAAiB,EACjB,WAAoB;QADpB,WAAM,GAAN,MAAM,CAAW;QACjB,gBAAW,GAAX,WAAW,CAAS;QANvB,WAAM,GAAG,IAAI,CAAC,sBAAsB,EAAE,CAAC;QACxC,WAAM,GAAG,IAAI,kBAAS,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;QAO1D,IAAI,CAAC,gBAAgB,GAAG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AAA;CACJ;AA5QD,kCA4QC;AAjOS;IADL,aAAG,CAAC,SAAS,EAAE;;;;oDA4Bf","sourcesContent":["import mem from 'mem';\nimport {\n DraftCreate,\n DraftCreateMetaSchema,\n NotFoundError,\n PublishedCredentialSchema,\n ResourceCredential,\n ResourceDraft,\n} from '../api';\nimport { TruvityError } from '../errors';\nimport { UdtClaims } from './credential/claims';\nimport { DraftCredentialWithClaims } from './credential/draft/with-claims';\nimport { CredentialFlavor } from './credential/flavor';\nimport { Claims, UpdatePayloadWithClaims } from './credential/types';\nimport { VerifiableCredentialWithClaims } from './credential/verifiable/with-claims';\nimport { getVcSchemaMetadataOrThrow, VcSchema, VcSchemaMetadata } from './decorators';\nimport { verifiableCredentialDataSchema } from './schemas';\nimport {\n ApiClient,\n BlobInput,\n CredentialDescriptor,\n Ctor,\n isResourceCredential,\n UpdatePayload,\n UpdatePayloadWithIssueClaims,\n UserUpdateClaims,\n} from './types';\nimport { strictlyConvertToApiType } from './utils/converters';\nimport { DocumentedError, ErrorCode } from './utils/error';\nimport { generateKey } from './utils/idempotency';\n\nexport type SchemaPublicationResult = {\n published: boolean;\n error?: string;\n};\n\nexport type CredentialEnvelope<T extends Claims> = {\n isVerifiable: false;\n credential: DraftCredentialWithClaims<T>;\n};\n\nexport type VerifiableCredentialEnvelope<T extends Claims> = {\n isVerifiable: true;\n credential: VerifiableCredentialWithClaims<T>;\n};\n\nexport type LoadedCredential<T extends Claims> = CredentialEnvelope<T> | VerifiableCredentialEnvelope<T>;\n\nexport class VcDecorator<T extends Claims> {\n readonly flavor = this.createCredentialFlavor();\n private claims = new UdtClaims(this.client, this.claimsModel);\n private vcSchemaMetadata: VcSchemaMetadata;\n\n constructor(\n private client: ApiClient,\n private claimsModel: Ctor<T>,\n ) {\n this.vcSchemaMetadata = getVcSchemaMetadataOrThrow(claimsModel);\n }\n\n protected createCredentialFlavor(): CredentialFlavor {\n return new CredentialFlavor();\n }\n\n async publishSchema(): Promise<SchemaPublicationResult> {\n if (this.vcSchemaMetadata.slug == null) {\n return { published: false, error: 'A schema requires a slug to be published as stable' };\n }\n if (this.vcSchemaMetadata.owner != null && this.vcSchemaMetadata.owner !== (await this.client.tenantId())) {\n return { published: false, error: 'A schema with a different owner cannot be published' };\n }\n try {\n const credentialSchema = await this.client.schemas.schemaCreate({\n data: {\n schema: this.claims.getClaimsSchema(),\n },\n });\n await this.client.schemas.schemaPublish(credentialSchema.id, {\n slug: this.vcSchemaMetadata.slug,\n version: this.vcSchemaMetadata.version,\n });\n return { published: true };\n } catch (error) {\n if (error instanceof TruvityError) {\n return { published: false, error: error.message };\n }\n throw error;\n }\n }\n\n @mem.decorator()\n async getCredentialTerm(): Promise<string> {\n let publishedCredentialSchema: PublishedCredentialSchema;\n if (this.vcSchemaMetadata.owner == null) {\n const result = await this.client.schemas.schemaImport({\n data: {\n schema: this.claims.getClaimsSchema(),\n version: this.vcSchemaMetadata.version,\n slug: this.vcSchemaMetadata.slug,\n },\n });\n publishedCredentialSchema = result.data;\n } else if (this.vcSchemaMetadata.slug != null) {\n publishedCredentialSchema = await this.client.desk.publishedMetaSchemaFetch(\n this.vcSchemaMetadata.owner,\n this.vcSchemaMetadata.slug,\n this.vcSchemaMetadata.version,\n );\n } else {\n throw new DocumentedError(\n ErrorCode.VcSchemaMissingSlug,\n 'A VcSchema annotation with an owner value requires a slug value',\n );\n }\n if (publishedCredentialSchema.schema.jsonLdTermName != null) {\n return `${publishedCredentialSchema.schema.jsonLdTermName}Credential`;\n }\n return `${publishedCredentialSchema.slug}v${publishedCredentialSchema.version}Credential`;\n }\n\n async canMap(input: ResourceDraft | ResourceCredential): Promise<boolean> {\n return input.data.type.includes(await this.getCredentialTerm());\n }\n\n async map(input: ResourceDraft): Promise<DraftCredentialWithClaims<T>>;\n async map(input: ResourceCredential): Promise<VerifiableCredentialWithClaims<T>>;\n async map(\n input: ResourceDraft | ResourceCredential,\n ): Promise<VerifiableCredentialWithClaims<T> | DraftCredentialWithClaims<T>> {\n if (isResourceCredential(input)) {\n // ResourceCredential\n if (!(await this.canMap(input))) {\n throw new DocumentedError(\n ErrorCode.IncompatibleUDT,\n `The received ResourceCredential is incompatible with the current VcDecorator instance claims model`,\n );\n }\n\n return new VerifiableCredentialWithClaims(this.client, this.flavor, this.claimsModel, input);\n } else {\n // ResourceDraft\n if (!(await this.canMap(input))) {\n throw new DocumentedError(\n ErrorCode.IncompatibleUDT,\n `The received ResourceDraft is incompatible with the current VcDecorator instance claims model`,\n );\n }\n\n return new DraftCredentialWithClaims(this.client, this.flavor, this.claimsModel, input.data, input);\n }\n }\n\n private async importBlob(blob: BlobInput, request?: UpdatePayload): Promise<CredentialDescriptor> {\n const idempotencyKey = generateKey('importBlob');\n const { blobId, uploadUri } = await this.client.credentials.credentialUpload({\n idempotencyKey,\n });\n\n await fetch(uploadUri, {\n method: 'PUT',\n body: blob,\n });\n\n const resourceCredential = await this.client.credentials.credentialImport({\n annotations: request?.annotations,\n labels: request?.labels,\n blobId,\n idempotencyKey,\n });\n\n return {\n data: strictlyConvertToApiType(verifiableCredentialDataSchema, {\n id: resourceCredential.data.id,\n digestMultibase: resourceCredential.data.digestMultibase,\n }),\n id: resourceCredential.id,\n etag: resourceCredential.etag,\n revision: resourceCredential.revision,\n };\n }\n\n private async convertUDTToDraftCreate(object: UserUpdateClaims<T> | null): Promise<DraftCreate> {\n let metaSchema: DraftCreateMetaSchema;\n let jsonLdVocabs = this.vcSchemaMetadata.jsonLdVocabs;\n let vcJsonSchemas = this.vcSchemaMetadata.vcJsonSchemas;\n if (this.vcSchemaMetadata.owner == null) {\n const claimsSchema = this.claims.getClaimsSchema();\n metaSchema = {\n schema: claimsSchema,\n slug: this.vcSchemaMetadata.slug,\n version: this.vcSchemaMetadata.version,\n };\n if (\n jsonLdVocabs?.includes(VcSchema.jsonLdVocabUrl) ||\n vcJsonSchemas?.includes(VcSchema.vcdmJsonSchemaUrl)\n ) {\n const result = await this.client.schemas.schemaImport({\n data: {\n schema: claimsSchema,\n slug: this.vcSchemaMetadata.slug,\n version: this.vcSchemaMetadata.version,\n },\n });\n jsonLdVocabs =\n jsonLdVocabs == null\n ? undefined\n : jsonLdVocabs.map((x) => (VcSchema.jsonLdVocabUrl === x ? result.data.jsonLdVocabUrl : x));\n vcJsonSchemas =\n vcJsonSchemas == null\n ? undefined\n : vcJsonSchemas.map((x) =>\n VcSchema.vcdmJsonSchemaUrl === x ? result.data.vcdmJsonSchemaUrl : x,\n );\n }\n } else if (this.vcSchemaMetadata.slug != null) {\n const deskBaseURL = (await this.client.dids.didDocumentSelfGet()).id.split(':')[2];\n metaSchema = `https://${deskBaseURL}/tenants/${this.vcSchemaMetadata.owner}/meta-schema/${this.vcSchemaMetadata.slug}/v${this.vcSchemaMetadata.version}`;\n if (\n jsonLdVocabs?.includes(VcSchema.jsonLdVocabUrl) ||\n vcJsonSchemas?.includes(VcSchema.vcdmJsonSchemaUrl)\n ) {\n const result = await this.client.desk.publishedMetaSchemaFetch(\n this.vcSchemaMetadata.owner,\n this.vcSchemaMetadata.slug,\n this.vcSchemaMetadata.version,\n );\n jsonLdVocabs =\n jsonLdVocabs == null\n ? undefined\n : jsonLdVocabs.map((x) => (VcSchema.jsonLdVocabUrl === x ? result.jsonLdVocabUrl : x));\n vcJsonSchemas =\n vcJsonSchemas == null\n ? undefined\n : vcJsonSchemas.map((x) => (VcSchema.vcdmJsonSchemaUrl === x ? result.vcdmJsonSchemaUrl : x));\n }\n } else {\n throw new DocumentedError(\n ErrorCode.VcSchemaMissingSlug,\n 'A VcSchema annotation with an owner value requires a slug value',\n );\n }\n return {\n metaSchema,\n jsonLdVocabs,\n vcdmJsonSchemas: vcJsonSchemas,\n values: object != null ? this.claims.marshalValues(object) : undefined,\n };\n }\n\n async create(request?: UpdatePayloadWithClaims<T>): Promise<DraftCredentialWithClaims<T>> {\n const { id, etag, revision, data } = await this.client.drafts.draftCreate({\n data: await this.convertUDTToDraftCreate(request?.claims || null),\n annotations: request?.annotations,\n labels: request?.labels,\n idempotencyKey: generateKey('create'),\n });\n\n return new DraftCredentialWithClaims(this.client, this.flavor, this.claimsModel, data, { id, etag, revision });\n }\n\n async issue(\n privateKeyId: string,\n request: UpdatePayloadWithIssueClaims<T>,\n ): Promise<VerifiableCredentialWithClaims<T>> {\n const result = await this.create(request);\n return result.issue(privateKeyId);\n }\n\n async loadAsDraft(id: string, revision?: number): Promise<DraftCredentialWithClaims<T>> {\n const resourceDraft = revision\n ? await this.client.drafts.draftRevision(id, revision)\n : await this.client.drafts.draftLatest(id);\n\n return this.map(resourceDraft);\n }\n\n async loadAsCredential(id: string, revision?: number): Promise<VerifiableCredentialWithClaims<T>> {\n const resourceCredential = revision\n ? await this.client.credentials.credentialRevision(id, revision)\n : await this.client.credentials.credentialLatest(id);\n\n return this.map(resourceCredential);\n }\n\n async load(id: string, revision?: number): Promise<LoadedCredential<T>> {\n let verifiableCredential: VerifiableCredentialWithClaims<T> | undefined;\n let draftCredential: DraftCredentialWithClaims<T> | undefined;\n\n try {\n verifiableCredential = await this.loadAsCredential(id, revision);\n } catch (error) {\n if (error instanceof NotFoundError) {\n draftCredential = await this.loadAsDraft(id, revision);\n } else throw error;\n }\n\n if (!draftCredential) {\n if (!verifiableCredential) throw new Error(`Resource with id '${id}' could not be found.`);\n\n return {\n isVerifiable: true,\n credential: verifiableCredential,\n };\n } else {\n return {\n isVerifiable: false,\n credential: draftCredential,\n };\n }\n }\n\n async importCredential(blob: BlobInput, request?: UpdatePayload): Promise<VerifiableCredentialWithClaims<T>> {\n const credential = await this.importBlob(blob, request);\n\n return new VerifiableCredentialWithClaims(this.client, this.flavor, this.claimsModel, credential);\n }\n}\n"]}
@@ -1,10 +1,12 @@
1
1
  import 'reflect-metadata';
2
- import { DraftEnumValue } from '../api';
2
+ import { ClaimsSchemaEnumValue } from '../api';
3
3
  import type { Ctor } from './types';
4
4
  export declare const DECORATOR_PREFIX = "credential-claim";
5
5
  export declare const CLAIMS_LIST = "credential-claim:list";
6
- export declare const CLAIM_DATA_TYPE = "credential-claim:data-type";
7
6
  export declare const CLAIM_JSON_LD_CONTEXT = "credential-claim:ld-context";
7
+ export declare const CLAIM_VC_SCHEMA_OPTIONS = "credential-claim:vc-schema-options";
8
+ export declare const CLAIM_VC_EXTERNAL_SCHEMA = "credential-claim:vc-external-schema";
9
+ export declare const CLAIM_VC_SCHEMA_JSON_LD_TERM_NAME = "credential-claim:vc-schema-json-ld-term-name";
8
10
  export declare const CLAIM_JSON_LD_TYPE = "credential-claim:ld-type";
9
11
  export declare const CLAIM_LINKED_FILE = "credential-claim:linked-file";
10
12
  type VcContextOptions = {
@@ -12,6 +14,20 @@ type VcContextOptions = {
12
14
  namespace: string;
13
15
  vcType?: string[];
14
16
  };
17
+ type VcSchemaOptions = {
18
+ slug?: string;
19
+ version?: number;
20
+ owner?: string;
21
+ };
22
+ export type VcSchemaMetadata = {
23
+ slug?: string;
24
+ version: number;
25
+ owner?: string;
26
+ vcJsonSchemas?: string[];
27
+ jsonLdVocabs?: string[];
28
+ jsonLdBaseIri?: string;
29
+ jsonLdTermName?: string;
30
+ };
15
31
  type VcContextMetadata = VcContextOptions;
16
32
  export type ClaimDescriptor = {
17
33
  name: string;
@@ -19,26 +35,43 @@ export type ClaimDescriptor = {
19
35
  title?: string;
20
36
  isArray?: boolean;
21
37
  notEmpty?: boolean;
22
- enumValuesDescriptor?: DraftEnumValue[];
38
+ enumValuesDescriptor?: ClaimsSchemaEnumValue[];
39
+ jsonLdIri?: string;
40
+ jsonLdType?: string;
23
41
  };
24
42
  type ClaimsListMetadata = ClaimDescriptor[];
43
+ type VcExternalSchemaOptions = {
44
+ jsonLdVocabs?: string[];
45
+ vcJsonSchemas?: string[];
46
+ };
25
47
  type VcClaimOptions = {
26
48
  title?: string;
27
49
  dataType?: Ctor<any>;
28
50
  notEmpty?: boolean;
51
+ jsonLdIri?: string;
52
+ jsonLdType?: string;
29
53
  };
30
- export declare const VcClaimWithOptions: ({ title, dataType, notEmpty }?: VcClaimOptions) => PropertyDecorator;
54
+ export declare const VcClaimWithOptions: ({ title, dataType, notEmpty, jsonLdIri, jsonLdType }?: VcClaimOptions) => PropertyDecorator;
31
55
  export declare const VcClaim: PropertyDecorator;
32
56
  export declare const VcNotEmptyClaim: PropertyDecorator;
57
+ export declare const VcClaimJsonLdIri: (jsonLdIri: string) => PropertyDecorator;
58
+ export declare const VcClaimJsonLdType: (jsonLdType: string) => PropertyDecorator;
33
59
  export declare const VcClaimTitle: (title: string) => PropertyDecorator;
34
60
  export declare const VcArrayClaim: (dataType: Ctor<any>) => PropertyDecorator;
35
- export declare const VcStringEnumClaim: (value: DraftEnumValue[]) => PropertyDecorator;
61
+ export declare const VcStringEnumClaim: (value: ClaimsSchemaEnumValue[]) => PropertyDecorator;
62
+ export declare const VcExternalSchema: (options: VcExternalSchemaOptions) => ClassDecorator;
36
63
  export declare const VcContext: (options: VcContextOptions) => ClassDecorator;
37
64
  export declare const VcClaimType: (jsonLdType: string) => PropertyDecorator;
65
+ export declare const VcSchema: {
66
+ (options?: VcSchemaOptions): ClassDecorator;
67
+ jsonLdVocabUrl: string;
68
+ vcdmJsonSchemaUrl: string;
69
+ };
70
+ export declare const VcSchemaJsonLdTermName: (value: string) => ClassDecorator;
38
71
  export declare const getTsDataTypeMetadata: (target: Ctor<any>, propertyKey: string) => Ctor<any> | undefined;
39
- export declare const getClaimDataTypeMetadata: (target: Ctor<any>, propertyKey: string) => Ctor<any> | undefined;
40
- export declare const getClaimJsonLdTypeMetadata: (target: Ctor<any>, propertyKey: string) => string | undefined;
41
72
  export declare const getContextJsonLdMetadata: (target: Ctor<any>) => VcContextMetadata | undefined;
73
+ export declare const getVcSchemaMetadata: (target: Ctor<any>) => VcSchemaMetadata | undefined;
74
+ export declare const getVcSchemaMetadataOrThrow: (target: Ctor<any>) => VcSchemaMetadata;
42
75
  export declare const getRegisteredClaimsList: (target: Ctor<any>) => ClaimsListMetadata;
43
76
  export {};
44
77
  //# sourceMappingURL=decorators.d.ts.map
@@ -1 +1 @@
1
- {"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