@procivis/react-native-one-core 1.26999.0 → 1.33398.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +66 -17
- package/android/build.gradle +19 -7
- package/android/src/main/java/ch/procivis/one/core/Deserialize.kt +5 -1
- package/android/src/main/java/ch/procivis/one/core/DeserializeSpecific.kt +10 -3
- package/android/src/main/java/ch/procivis/one/core/ProcivisOneCoreModule.kt +158 -73
- package/android/src/main/java/ch/procivis/one/core/SerializeSpecific.kt +7 -1
- package/android/src/main/java/ch/procivis/one/core/Util.kt +42 -10
- package/core-sdk.json +6 -6
- package/dist/index.d.ts +3 -8
- package/dist/index.js +22 -22
- package/dist/src/cache.d.ts +12 -0
- package/dist/src/cache.js +14 -0
- package/dist/src/config.d.ts +29 -4
- package/dist/src/config.js +19 -0
- package/dist/src/core.d.ts +18 -6
- package/dist/src/core.js +1 -0
- package/dist/src/credential.d.ts +14 -1
- package/dist/src/credential.js +5 -0
- package/dist/src/did.d.ts +9 -5
- package/dist/src/error.d.ts +10 -17
- package/dist/src/error.js +5 -14
- package/dist/src/history.d.ts +0 -1
- package/dist/src/history.js +0 -1
- package/dist/src/key.d.ts +3 -0
- package/dist/src/proof.d.ts +13 -1
- package/dist/src/proof.js +5 -0
- package/dist/src/proofSchema.d.ts +2 -0
- package/dist/src/trust.d.ts +85 -19
- package/dist/src/trust.js +28 -7
- package/ios/Deserialize.swift +162 -21
- package/ios/ProcivisOneCoreModule.m +46 -4
- package/ios/ProcivisOneCoreModule.swift +179 -82
- package/ios/Serialize.swift +72 -15
- package/ios/Util.swift +20 -24
- package/package.json +2 -2
package/dist/src/trust.js
CHANGED
|
@@ -1,18 +1,39 @@
|
|
|
1
|
-
export var TrustAnchorRoleEnum;
|
|
2
|
-
(function (TrustAnchorRoleEnum) {
|
|
3
|
-
TrustAnchorRoleEnum["PUBLISHER"] = "PUBLISHER";
|
|
4
|
-
TrustAnchorRoleEnum["CLIENT"] = "CLIENT";
|
|
5
|
-
})(TrustAnchorRoleEnum || (TrustAnchorRoleEnum = {}));
|
|
6
1
|
export var SortableTrustAnchorColumnEnum;
|
|
7
2
|
(function (SortableTrustAnchorColumnEnum) {
|
|
8
3
|
SortableTrustAnchorColumnEnum["NAME"] = "NAME";
|
|
9
4
|
SortableTrustAnchorColumnEnum["CREATED_DATE"] = "CREATED_DATE";
|
|
10
5
|
SortableTrustAnchorColumnEnum["TYPE"] = "TYPE";
|
|
11
|
-
SortableTrustAnchorColumnEnum["ROLE"] = "ROLE";
|
|
12
|
-
SortableTrustAnchorColumnEnum["PRIORITY"] = "PRIORITY";
|
|
13
6
|
})(SortableTrustAnchorColumnEnum || (SortableTrustAnchorColumnEnum = {}));
|
|
14
7
|
export var ExactTrustAnchorFilterColumnEnum;
|
|
15
8
|
(function (ExactTrustAnchorFilterColumnEnum) {
|
|
16
9
|
ExactTrustAnchorFilterColumnEnum["NAME"] = "NAME";
|
|
17
10
|
ExactTrustAnchorFilterColumnEnum["TYPE"] = "TYPE";
|
|
18
11
|
})(ExactTrustAnchorFilterColumnEnum || (ExactTrustAnchorFilterColumnEnum = {}));
|
|
12
|
+
export var TrustEntityRoleEnum;
|
|
13
|
+
(function (TrustEntityRoleEnum) {
|
|
14
|
+
TrustEntityRoleEnum["ISSUER"] = "ISSUER";
|
|
15
|
+
TrustEntityRoleEnum["VERIFIER"] = "VERIFIER";
|
|
16
|
+
TrustEntityRoleEnum["BOTH"] = "BOTH";
|
|
17
|
+
})(TrustEntityRoleEnum || (TrustEntityRoleEnum = {}));
|
|
18
|
+
export var TrustEntityStateEnum;
|
|
19
|
+
(function (TrustEntityStateEnum) {
|
|
20
|
+
TrustEntityStateEnum["ACTIVE"] = "ACTIVE";
|
|
21
|
+
TrustEntityStateEnum["REMOVED"] = "REMOVED";
|
|
22
|
+
TrustEntityStateEnum["WITHDRAWN"] = "WITHDRAWN";
|
|
23
|
+
TrustEntityStateEnum["REMOVED_AND_WITHDRAWN"] = "REMOVED_AND_WITHDRAWN";
|
|
24
|
+
})(TrustEntityStateEnum || (TrustEntityStateEnum = {}));
|
|
25
|
+
export var SortableTrustEntityColumnEnum;
|
|
26
|
+
(function (SortableTrustEntityColumnEnum) {
|
|
27
|
+
SortableTrustEntityColumnEnum["NAME"] = "NAME";
|
|
28
|
+
SortableTrustEntityColumnEnum["ROLE"] = "ROLE";
|
|
29
|
+
})(SortableTrustEntityColumnEnum || (SortableTrustEntityColumnEnum = {}));
|
|
30
|
+
export var ExactTrustEntityFilterColumnEnum;
|
|
31
|
+
(function (ExactTrustEntityFilterColumnEnum) {
|
|
32
|
+
ExactTrustEntityFilterColumnEnum["NAME"] = "NAME";
|
|
33
|
+
})(ExactTrustEntityFilterColumnEnum || (ExactTrustEntityFilterColumnEnum = {}));
|
|
34
|
+
export var TrustEntityUpdateActionEnum;
|
|
35
|
+
(function (TrustEntityUpdateActionEnum) {
|
|
36
|
+
TrustEntityUpdateActionEnum["ACTIVATE"] = "ACTIVATE";
|
|
37
|
+
TrustEntityUpdateActionEnum["WITHDRAW"] = "WITHDRAW";
|
|
38
|
+
TrustEntityUpdateActionEnum["REMOVE"] = "REMOVE";
|
|
39
|
+
})(TrustEntityUpdateActionEnum || (TrustEntityUpdateActionEnum = {}));
|
package/ios/Deserialize.swift
CHANGED
|
@@ -95,6 +95,14 @@ func deserializeIds(_ ids: NSArray) throws -> [String] {
|
|
|
95
95
|
return result
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
+
func deserializeCacheTypes(types: NSArray?) throws -> [CacheTypeBindingDto]? {
|
|
99
|
+
return try opt(types, enumList)
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
func deserializeBypassCache(bypassCache: NSArray?) throws -> [BypassCacheBindingDto]? {
|
|
103
|
+
return try opt(bypassCache, enumList)
|
|
104
|
+
}
|
|
105
|
+
|
|
98
106
|
func deserializePresentationSubmitCredentialRequest(_ input: NSDictionary) throws -> PresentationSubmitCredentialRequestBindingDto {
|
|
99
107
|
let claims: NSArray = try safeCast(input.value(forKey: "submitClaims"));
|
|
100
108
|
var submitClaims: [String] = [];
|
|
@@ -149,7 +157,10 @@ func deserializeDidListQuery(_ query: NSDictionary) throws -> DidListQueryBindin
|
|
|
149
157
|
deactivated: query.value(forKey: "deactivated") as? Bool,
|
|
150
158
|
exact: try opt(query.value(forKey: "exact") as? NSArray, { columns in try enumList(columns) } ),
|
|
151
159
|
keyAlgorithms: try opt(query.value(forKey: "keyAlgorithms") as? NSArray, deserializeIds),
|
|
152
|
-
keyRoles: try opt(query.value(forKey: "keyRoles") as? NSArray, { roles in try enumList(roles) })
|
|
160
|
+
keyRoles: try opt(query.value(forKey: "keyRoles") as? NSArray, { roles in try enumList(roles) }),
|
|
161
|
+
keyStorages: try opt(query.value(forKey: "keyStorages") as? NSArray, deserializeIds),
|
|
162
|
+
keyIds: try opt(query.value(forKey: "keyIds") as? NSArray, deserializeIds),
|
|
163
|
+
didMethods: try opt(query.value(forKey: "didMethods") as? NSArray, deserializeIds)
|
|
153
164
|
)
|
|
154
165
|
}
|
|
155
166
|
|
|
@@ -159,18 +170,18 @@ func deserializeHistoryListQuery(_ query: NSDictionary) throws -> HistoryListQue
|
|
|
159
170
|
pageSize: try safeCast(query.value(forKey: "pageSize")),
|
|
160
171
|
organisationId: try safeCast(query.value(forKey: "organisationId")),
|
|
161
172
|
entityId: query.value(forKey: "entityId") as? String,
|
|
162
|
-
action: try opt(query.value(forKey: "action") as? String, deserializeEnum),
|
|
163
173
|
entityTypes: try opt(query.value(forKey: "entityTypes") as? NSArray, enumList),
|
|
174
|
+
action: try opt(query.value(forKey: "action") as? String, deserializeEnum),
|
|
164
175
|
createdDateFrom: query.value(forKey: "createdDateFrom") as? String,
|
|
165
176
|
createdDateTo: query.value(forKey: "createdDateTo") as? String,
|
|
166
177
|
didId: query.value(forKey: "didId") as? String,
|
|
167
178
|
credentialId: query.value(forKey: "credentialId") as? String,
|
|
168
179
|
credentialSchemaId: query.value(forKey: "credentialSchemaId") as? String,
|
|
180
|
+
proofSchemaId: query.value(forKey: "proofSchemaId") as? String,
|
|
169
181
|
search: try deserializeHistorySearch(
|
|
170
182
|
text: query.value(forKey: "searchText") as? String,
|
|
171
183
|
type: query.value(forKey: "searchType") as? String
|
|
172
|
-
)
|
|
173
|
-
proofSchemaId: query.value(forKey: "proofSchemaId") as? String
|
|
184
|
+
)
|
|
174
185
|
)
|
|
175
186
|
}
|
|
176
187
|
|
|
@@ -218,8 +229,8 @@ func deserializeImportProofSchema(_ schema: NSDictionary) throws -> ImportProofS
|
|
|
218
229
|
lastModified: try safeCast(schema.value(forKey: "lastModified")),
|
|
219
230
|
name: try safeCast(schema.value(forKey: "name")),
|
|
220
231
|
organisationId: try safeCast(schema.value(forKey: "organisationId")),
|
|
221
|
-
importedSourceUrl: try safeCast(schema.value(forKey: "importedSourceUrl")),
|
|
222
232
|
expireDuration: try safeCast(schema.value(forKey: "expireDuration")),
|
|
233
|
+
importedSourceUrl: try safeCast(schema.value(forKey: "importedSourceUrl")),
|
|
223
234
|
proofInputSchemas: try proofInputSchemas.map { try deserializeImportProofSchemaInputSchema(try safeCast($0)) }
|
|
224
235
|
)
|
|
225
236
|
}
|
|
@@ -267,6 +278,7 @@ func deserializeImportProofSchemaClaimSchema(_ request: NSDictionary) throws ->
|
|
|
267
278
|
|
|
268
279
|
return ImportProofSchemaClaimSchemaBindingDto(
|
|
269
280
|
id: try safeCast(request.value(forKey: "id")),
|
|
281
|
+
requested: try safeCast(request.value(forKey: "requested")),
|
|
270
282
|
required: try safeCast(request.value(forKey: "required")),
|
|
271
283
|
key: try safeCast(request.value(forKey: "key")),
|
|
272
284
|
dataType: try safeCast(request.value(forKey: "dataType")),
|
|
@@ -310,10 +322,10 @@ func deserializeImportCredentialSchemaRequestSchema(_ request: NSDictionary) thr
|
|
|
310
322
|
format: try safeCast(request.value(forKey: "format")),
|
|
311
323
|
revocationMethod: try safeCast(request.value(forKey: "revocationMethod")),
|
|
312
324
|
organisationId: try safeCast(request.value(forKey: "organisationId")),
|
|
313
|
-
importedSourceUrl: try safeCast(request.value(forKey: "importedSourceUrl")),
|
|
314
325
|
claims: try claims.map { try deserializeImportCredentialSchemaRequestClaim(try safeCast($0)) },
|
|
315
326
|
walletStorageType: try opt(request.value(forKey: "walletStorageType") as? String, deserializeEnum),
|
|
316
327
|
schemaId: try safeCast(request.value(forKey: "schemaId")),
|
|
328
|
+
importedSourceUrl: try safeCast(request.value(forKey: "importedSourceUrl")),
|
|
317
329
|
schemaType: deserializeCredentialSchemaTypeBindingEnum(try safeCast(request.value(forKey: "schemaType"))),
|
|
318
330
|
layoutType: try opt(request.value(forKey: "layoutType") as? String, deserializeEnum),
|
|
319
331
|
layoutProperties: try opt((request.value(forKey: "layoutProperties") as? NSDictionary), deserializeImportCredentialSchemaRequestLayoutProperties),
|
|
@@ -330,8 +342,8 @@ func deserializeImportCredentialSchemaRequestClaim(_ request: NSDictionary) thro
|
|
|
330
342
|
lastModified: try safeCast(request.value(forKey: "lastModified")),
|
|
331
343
|
required: try safeCast(request.value(forKey: "required")),
|
|
332
344
|
key: try safeCast(request.value(forKey: "key")),
|
|
333
|
-
array: request.value(forKey: "array") as? Bool,
|
|
334
345
|
datatype: try safeCast(request.value(forKey: "datatype")),
|
|
346
|
+
array: request.value(forKey: "array") as? Bool,
|
|
335
347
|
claims: try claims?.map { try deserializeImportCredentialSchemaRequestClaim(try safeCast($0)) }
|
|
336
348
|
)
|
|
337
349
|
}
|
|
@@ -393,6 +405,25 @@ func deserializeCreateProofRequest(_ request: NSDictionary) throws -> CreateProo
|
|
|
393
405
|
)
|
|
394
406
|
}
|
|
395
407
|
|
|
408
|
+
func deserializeShareProofRequest(_ request: NSDictionary) throws -> ShareProofRequestBindingDto {
|
|
409
|
+
return ShareProofRequestBindingDto(
|
|
410
|
+
params: try opt((request.value(forKey: "params") as? NSDictionary), deserializeShareProofRequestParams)
|
|
411
|
+
)
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
func deserializeShareProofRequestParams(_ request: NSDictionary) throws -> ShareProofRequestParamsBindingDto {
|
|
415
|
+
return ShareProofRequestParamsBindingDto(
|
|
416
|
+
clientIdSchema: try opt(request.value(forKey: "clientIdSchema") as? String, deserializeEnum)
|
|
417
|
+
)
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
func deserializeKeyCheckCertificateRequest(_ request: NSDictionary) throws -> KeyCheckCertificateRequestBindingDto {
|
|
422
|
+
return KeyCheckCertificateRequestBindingDto(
|
|
423
|
+
certificate: (request.value(forKey: "certificate") as? String)!
|
|
424
|
+
)
|
|
425
|
+
}
|
|
426
|
+
|
|
396
427
|
func deserializeScanToVerifyRequest(_ request: NSDictionary) throws -> ScanToVerifyRequestBindingDto {
|
|
397
428
|
return ScanToVerifyRequestBindingDto(
|
|
398
429
|
credential: try safeCast(request.value(forKey: "credential")),
|
|
@@ -405,10 +436,8 @@ func deserializeCreateTrustAnchorRequest(_ request: NSDictionary) throws -> Crea
|
|
|
405
436
|
return CreateTrustAnchorRequestBindingDto(
|
|
406
437
|
name: try safeCast(request.value(forKey: "name")),
|
|
407
438
|
type: try safeCast(request.value(forKey: "type")),
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
priority: request.value(forKey: "priority") as? UInt32,
|
|
411
|
-
organisationId: try safeCast(request.value(forKey: "organisationId"))
|
|
439
|
+
isPublisher: request.value(forKey: "isPublisher") as? Bool,
|
|
440
|
+
publisherReference: request.value(forKey: "publisherReference") as? String
|
|
412
441
|
)
|
|
413
442
|
}
|
|
414
443
|
|
|
@@ -419,9 +448,62 @@ func deserializeTrustAnchorListQuery(_ query: NSDictionary) throws -> ListTrustA
|
|
|
419
448
|
sort: try opt(query.value(forKey: "sort") as? String, deserializeEnum),
|
|
420
449
|
sortDirection: try opt(query.value(forKey: "sortDirection") as? String, deserializeEnum),
|
|
421
450
|
name: query.value(forKey: "name") as? String,
|
|
422
|
-
|
|
451
|
+
isPublisher: query.value(forKey: "isPublisher") as? Bool,
|
|
423
452
|
type: query.value(forKey: "type") as? String,
|
|
424
|
-
|
|
453
|
+
exact: try opt(query.value(forKey: "exact") as? NSArray, { columns in try enumList(columns) } )
|
|
454
|
+
)
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
func deserializeCreateTrustEntityRequest(_ request: NSDictionary) throws -> CreateTrustEntityRequestBindingDto {
|
|
458
|
+
return CreateTrustEntityRequestBindingDto(
|
|
459
|
+
name: try safeCast(request.value(forKey: "name")),
|
|
460
|
+
logo: request.value(forKey: "logo") as? String,
|
|
461
|
+
website: request.value(forKey: "website") as? String,
|
|
462
|
+
termsUrl: request.value(forKey: "termsUrl") as? String,
|
|
463
|
+
privacyUrl: request.value(forKey: "privacyUrl") as? String,
|
|
464
|
+
role: try deserializeEnum(try safeCast(request.value(forKey: "role"))),
|
|
465
|
+
trustAnchorId: try safeCast(request.value(forKey: "trustAnchorId")),
|
|
466
|
+
didId: try safeCast(request.value(forKey: "didId"))
|
|
467
|
+
)
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
func deserializeCreateRemoteTrustEntityRequest(_ request: NSDictionary) throws -> CreateRemoteTrustEntityRequestBindingDto {
|
|
471
|
+
return CreateRemoteTrustEntityRequestBindingDto(
|
|
472
|
+
didId: try safeCast(request.value(forKey: "didId")),
|
|
473
|
+
trustAnchorId: request.value(forKey: "trustAnchorId") as? String,
|
|
474
|
+
name: try safeCast(request.value(forKey: "name")),
|
|
475
|
+
logo: request.value(forKey: "logo") as? String,
|
|
476
|
+
termsUrl: request.value(forKey: "termsUrl") as? String,
|
|
477
|
+
privacyUrl: request.value(forKey: "privacyUrl") as? String,
|
|
478
|
+
website: request.value(forKey: "website") as? String,
|
|
479
|
+
role: try deserializeEnum(try safeCast(request.value(forKey: "role")))
|
|
480
|
+
)
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
func deserializeUpdateRemoteTrustEntityRequest(_ request: NSDictionary) throws -> UpdateRemoteTrustEntityFromDidRequestBindingDto {
|
|
484
|
+
return UpdateRemoteTrustEntityFromDidRequestBindingDto(
|
|
485
|
+
didId: try safeCast(request.value(forKey: "didId")),
|
|
486
|
+
action: try opt(request.value(forKey: "action") as? String, deserializeEnum),
|
|
487
|
+
name: try safeCast(request.value(forKey: "name")),
|
|
488
|
+
logo: try optionalString(request, key: "logo"),
|
|
489
|
+
website: try optionalString(request, key: "website"),
|
|
490
|
+
termsUrl: try optionalString(request, key: "termsUrl"),
|
|
491
|
+
privacyUrl: try optionalString(request, key: "privacyUrl"),
|
|
492
|
+
role: try opt(request.value(forKey: "role") as? String, deserializeEnum)
|
|
493
|
+
)
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
func deserializeTrustEntityListQuery(_ query: NSDictionary) throws -> ListTrustEntitiesFiltersBindings {
|
|
497
|
+
return ListTrustEntitiesFiltersBindings(
|
|
498
|
+
page: try safeCast(query.value(forKey: "page")),
|
|
499
|
+
pageSize: try safeCast(query.value(forKey: "pageSize")),
|
|
500
|
+
sort: try opt(query.value(forKey: "sort") as? String, deserializeEnum),
|
|
501
|
+
sortDirection: try opt(query.value(forKey: "sortDirection") as? String, deserializeEnum),
|
|
502
|
+
name: query.value(forKey: "name") as? String,
|
|
503
|
+
role: try opt(query.value(forKey: "role") as? String, deserializeEnum),
|
|
504
|
+
trustAnchor: query.value(forKey: "trustAnchor") as? String,
|
|
505
|
+
didId: query.value(forKey: "didId") as? String,
|
|
506
|
+
organisationId: query.value(forKey: "organisationId") as? String,
|
|
425
507
|
exact: try opt(query.value(forKey: "exact") as? NSArray, { columns in try enumList(columns) } )
|
|
426
508
|
)
|
|
427
509
|
}
|
|
@@ -494,7 +576,7 @@ extension HistorySearchEnumBindingEnum: CaseIterable {
|
|
|
494
576
|
|
|
495
577
|
extension HistoryActionBindingEnum: CaseIterable {
|
|
496
578
|
public static var allCases: [HistoryActionBindingEnum] {
|
|
497
|
-
return [.accepted, .created, .deactivated, .deleted, .errored, .issued, .offered, .
|
|
579
|
+
return [.accepted, .created, .deactivated, .deleted, .errored, .issued, .offered, .rejected, .requested, .revoked, .pending, .suspended, .restored, .shared, .imported, .claimsRemoved]
|
|
498
580
|
}
|
|
499
581
|
}
|
|
500
582
|
|
|
@@ -577,21 +659,21 @@ extension ProofStateBindingEnum: CaseIterable {
|
|
|
577
659
|
}
|
|
578
660
|
}
|
|
579
661
|
|
|
580
|
-
extension
|
|
581
|
-
public static var allCases: [
|
|
582
|
-
return [.
|
|
662
|
+
extension ShareProofRequestClientIdSchemaTypeBindingDto: CaseIterable {
|
|
663
|
+
public static var allCases: [ShareProofRequestClientIdSchemaTypeBindingDto] {
|
|
664
|
+
return [.redirectUri, .verifierAttestation]
|
|
583
665
|
}
|
|
584
666
|
}
|
|
585
667
|
|
|
586
|
-
extension
|
|
587
|
-
public static var allCases: [
|
|
588
|
-
return [.
|
|
668
|
+
extension ScanToVerifyBarcodeTypeBindingEnum: CaseIterable {
|
|
669
|
+
public static var allCases: [ScanToVerifyBarcodeTypeBindingEnum] {
|
|
670
|
+
return [.mrz, .pdf417]
|
|
589
671
|
}
|
|
590
672
|
}
|
|
591
673
|
|
|
592
674
|
extension SortableTrustAnchorColumnBindings: CaseIterable {
|
|
593
675
|
public static var allCases: [SortableTrustAnchorColumnBindings] {
|
|
594
|
-
return [.name, .createdDate, .type
|
|
676
|
+
return [.name, .createdDate, .type]
|
|
595
677
|
}
|
|
596
678
|
}
|
|
597
679
|
|
|
@@ -607,6 +689,48 @@ extension SearchTypeBindingEnum: CaseIterable {
|
|
|
607
689
|
}
|
|
608
690
|
}
|
|
609
691
|
|
|
692
|
+
extension TrustEntityRoleBindingEnum: CaseIterable {
|
|
693
|
+
public static var allCases: [TrustEntityRoleBindingEnum] {
|
|
694
|
+
return [.issuer, .verifier, .both]
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
extension TrustEntityStateBindingEnum: CaseIterable {
|
|
699
|
+
public static var allCases: [TrustEntityStateBindingEnum] {
|
|
700
|
+
return [.active, .removed, .withdrawn, .removedAndWithdrawn]
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
extension SortableTrustEntityColumnBindings: CaseIterable {
|
|
705
|
+
public static var allCases: [SortableTrustEntityColumnBindings] {
|
|
706
|
+
return [.name, .role]
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
extension ExactTrustEntityFilterColumnBindings: CaseIterable {
|
|
711
|
+
public static var allCases: [ExactTrustEntityFilterColumnBindings] {
|
|
712
|
+
return [.name]
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
extension TrustEntityUpdateActionBindingEnum: CaseIterable {
|
|
717
|
+
public static var allCases: [TrustEntityUpdateActionBindingEnum] {
|
|
718
|
+
return [.activate, .remove, .withdraw]
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
extension CacheTypeBindingDto: CaseIterable {
|
|
723
|
+
public static var allCases: [CacheTypeBindingDto] {
|
|
724
|
+
return [.didDocument, .jsonLdContext, .jsonSchema, .statusListCredential, .trustList, .vctMetadata]
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
extension BypassCacheBindingDto: CaseIterable {
|
|
729
|
+
public static var allCases: [BypassCacheBindingDto] {
|
|
730
|
+
return [.didDocument, .statusListCredential]
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
|
|
610
734
|
private func deserializeEnum<T: CaseIterable>(_ input: String) throws -> T {
|
|
611
735
|
if let entry = T.allCases.first(where: { value in
|
|
612
736
|
serializeEnumValue(value: value) == input
|
|
@@ -624,6 +748,23 @@ private func opt<F, T>(_ input: F?, _ deserialize: @escaping (_ input: F) throws
|
|
|
624
748
|
return nil
|
|
625
749
|
}
|
|
626
750
|
|
|
751
|
+
private func optionalString(_ input: NSDictionary, key: String) throws -> OptionalString? {
|
|
752
|
+
var isThere: Bool = false;
|
|
753
|
+
input.keyEnumerator().forEach { k in
|
|
754
|
+
if (k as! String == key) {
|
|
755
|
+
isThere = true;
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
if (!isThere) {
|
|
759
|
+
return nil;
|
|
760
|
+
}
|
|
761
|
+
let value = input[key] as? String;
|
|
762
|
+
if value == nil {
|
|
763
|
+
return OptionalString.none;
|
|
764
|
+
}
|
|
765
|
+
return OptionalString.some(value: value!);
|
|
766
|
+
}
|
|
767
|
+
|
|
627
768
|
func safeCast<T>(_ input: Any?) throws -> T {
|
|
628
769
|
if let result = input as? T {
|
|
629
770
|
return result
|
|
@@ -14,10 +14,8 @@
|
|
|
14
14
|
return NO;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
RCT_EXTERN_METHOD(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
RCT_EXTERN_METHOD(initializeVerifier:(RCTPromiseResolveBlock)resolve
|
|
17
|
+
RCT_EXTERN_METHOD(initialize:(NSString *)configJson
|
|
18
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
21
19
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
22
20
|
|
|
23
21
|
RCT_EXTERN_METHOD(getVersion:(RCTPromiseResolveBlock)resolve
|
|
@@ -51,6 +49,7 @@ RCT_EXTERN_METHOD(handleInvitation:(NSString *)url
|
|
|
51
49
|
RCT_EXTERN_METHOD(holderAcceptCredential:(NSString *)interactionId
|
|
52
50
|
didId:(NSString *)didId
|
|
53
51
|
keyId:(NSString *)keyId
|
|
52
|
+
txCode:(NSString *)txCode
|
|
54
53
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
55
54
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
56
55
|
|
|
@@ -133,7 +132,13 @@ RCT_EXTERN_METHOD(deleteProofClaims:(NSString *)proofId
|
|
|
133
132
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
134
133
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
135
134
|
|
|
135
|
+
RCT_EXTERN_METHOD(checkCertificate:(NSString *)keyId
|
|
136
|
+
certificate:(NSDictionary *)certificate
|
|
137
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
138
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
139
|
+
|
|
136
140
|
RCT_EXTERN_METHOD(shareProof:(NSString *)proofId
|
|
141
|
+
request:(NSDictionary *)request
|
|
137
142
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
138
143
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
139
144
|
|
|
@@ -163,6 +168,7 @@ RCT_EXTERN_METHOD(proposeProof:(NSString *)exchange
|
|
|
163
168
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
164
169
|
|
|
165
170
|
RCT_EXTERN_METHOD(checkRevocation:(NSArray *)credentialIds
|
|
171
|
+
bypassCache:(NSArray *)bypassCache
|
|
166
172
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
167
173
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
168
174
|
|
|
@@ -186,6 +192,38 @@ RCT_EXTERN_METHOD(getTrustAnchors:(NSDictionary *)query
|
|
|
186
192
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
187
193
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
188
194
|
|
|
195
|
+
RCT_EXTERN_METHOD(deleteTrustAnchor:(NSString *)trustAnchorId
|
|
196
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
197
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
198
|
+
|
|
199
|
+
RCT_EXTERN_METHOD(createTrustEntity:(NSDictionary *)request
|
|
200
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
201
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
202
|
+
|
|
203
|
+
RCT_EXTERN_METHOD(getTrustEntity:(NSString *)trustEntityId
|
|
204
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
205
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
206
|
+
|
|
207
|
+
RCT_EXTERN_METHOD(getTrustEntities:(NSDictionary *)query
|
|
208
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
209
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
210
|
+
|
|
211
|
+
RCT_EXTERN_METHOD(getTrustEntityByDid:(NSString *)didId
|
|
212
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
213
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
214
|
+
|
|
215
|
+
RCT_EXTERN_METHOD(createRemoteTrustEntity:(NSDictionary *)request
|
|
216
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
217
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
218
|
+
|
|
219
|
+
RCT_EXTERN_METHOD(getRemoteTrustEntity:(NSString *)trustEntityId
|
|
220
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
221
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
222
|
+
|
|
223
|
+
RCT_EXTERN_METHOD(updateRemoteTrustEntity:(NSDictionary *)request
|
|
224
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
225
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
226
|
+
|
|
189
227
|
RCT_EXTERN_METHOD(createBackup:(NSString *)password
|
|
190
228
|
outputPath:(NSString *)outputPath
|
|
191
229
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
@@ -213,4 +251,8 @@ RCT_EXTERN_METHOD(uninitialize:(BOOL *)deleteData
|
|
|
213
251
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
214
252
|
rejecter:(RCTPromiseRejectBlock)reject)
|
|
215
253
|
|
|
254
|
+
RCT_EXTERN_METHOD(deleteCache:(NSArray *)types
|
|
255
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
256
|
+
rejecter:(RCTPromiseRejectBlock)reject)
|
|
257
|
+
|
|
216
258
|
@end
|