@powerhousedao/renown-package 0.0.30 → 0.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/document-models/index.d.ts +1 -0
- package/dist/document-models/index.d.ts.map +1 -0
- package/dist/document-models/index.js +1 -0
- package/dist/document-models/renown-credential/gen/actions.d.ts +1 -0
- package/dist/document-models/renown-credential/gen/actions.d.ts.map +1 -0
- package/dist/document-models/renown-credential/gen/creators.d.ts +1 -0
- package/dist/document-models/renown-credential/gen/creators.d.ts.map +1 -0
- package/dist/document-models/renown-credential/gen/document-model.d.ts +3 -2
- package/dist/document-models/renown-credential/gen/document-model.d.ts.map +1 -0
- package/dist/document-models/renown-credential/gen/document-model.js +3 -59
- package/dist/document-models/renown-credential/gen/index.d.ts +1 -2
- package/dist/document-models/renown-credential/gen/index.d.ts.map +1 -0
- package/dist/document-models/renown-credential/gen/index.js +0 -1
- package/dist/document-models/renown-credential/gen/manager/actions.d.ts +3 -14
- package/dist/document-models/renown-credential/gen/manager/actions.d.ts.map +1 -0
- package/dist/document-models/renown-credential/gen/manager/actions.js +1 -1
- package/dist/document-models/renown-credential/gen/manager/creators.d.ts +3 -5
- package/dist/document-models/renown-credential/gen/manager/creators.d.ts.map +1 -0
- package/dist/document-models/renown-credential/gen/manager/creators.js +3 -5
- package/dist/document-models/renown-credential/gen/manager/error.d.ts +2 -16
- package/dist/document-models/renown-credential/gen/manager/error.d.ts.map +1 -0
- package/dist/document-models/renown-credential/gen/manager/error.js +0 -19
- package/dist/document-models/renown-credential/gen/manager/operations.d.ts +2 -4
- package/dist/document-models/renown-credential/gen/manager/operations.d.ts.map +1 -0
- package/dist/document-models/renown-credential/gen/manager/operations.js +3 -1
- package/dist/document-models/renown-credential/gen/ph-factories.d.ts +7 -10
- package/dist/document-models/renown-credential/gen/ph-factories.d.ts.map +1 -0
- package/dist/document-models/renown-credential/gen/ph-factories.js +23 -13
- package/dist/document-models/renown-credential/gen/reducer.d.ts +3 -2
- package/dist/document-models/renown-credential/gen/reducer.d.ts.map +1 -0
- package/dist/document-models/renown-credential/gen/reducer.js +1 -16
- package/dist/document-models/renown-credential/gen/schema/index.d.ts +1 -0
- package/dist/document-models/renown-credential/gen/schema/index.d.ts.map +1 -0
- package/dist/document-models/renown-credential/gen/schema/types.d.ts +83 -115
- package/dist/document-models/renown-credential/gen/schema/types.d.ts.map +1 -0
- package/dist/document-models/renown-credential/gen/schema/zod.d.ts +15 -4
- package/dist/document-models/renown-credential/gen/schema/zod.d.ts.map +1 -0
- package/dist/document-models/renown-credential/gen/schema/zod.js +129 -33
- package/dist/document-models/renown-credential/gen/types.d.ts +10 -6
- package/dist/document-models/renown-credential/gen/types.d.ts.map +1 -0
- package/dist/document-models/renown-credential/gen/types.js +1 -0
- package/dist/document-models/renown-credential/gen/utils.d.ts +10 -19
- package/dist/document-models/renown-credential/gen/utils.d.ts.map +1 -0
- package/dist/document-models/renown-credential/gen/utils.js +48 -43
- package/dist/document-models/renown-credential/index.d.ts +13 -9
- package/dist/document-models/renown-credential/index.d.ts.map +1 -0
- package/dist/document-models/renown-credential/index.js +4 -3
- package/dist/document-models/renown-credential/src/reducers/manager.d.ts +1 -0
- package/dist/document-models/renown-credential/src/reducers/manager.d.ts.map +1 -0
- package/dist/document-models/renown-credential/src/reducers/manager.js +46 -108
- package/dist/document-models/renown-credential/src/tests/document-model.test.d.ts +1 -0
- package/dist/document-models/renown-credential/src/tests/document-model.test.d.ts.map +1 -0
- package/dist/document-models/renown-credential/src/tests/document-model.test.js +1 -1
- package/dist/document-models/renown-credential/src/tests/manager.test.d.ts +1 -0
- package/dist/document-models/renown-credential/src/tests/manager.test.d.ts.map +1 -0
- package/dist/document-models/renown-credential/src/utils.d.ts +1 -0
- package/dist/document-models/renown-credential/src/utils.d.ts.map +1 -0
- package/dist/document-models/renown-user/gen/actions.d.ts +1 -0
- package/dist/document-models/renown-user/gen/actions.d.ts.map +1 -0
- package/dist/document-models/renown-user/gen/creators.d.ts +1 -0
- package/dist/document-models/renown-user/gen/creators.d.ts.map +1 -0
- package/dist/document-models/renown-user/gen/document-model.d.ts +3 -2
- package/dist/document-models/renown-user/gen/document-model.d.ts.map +1 -0
- package/dist/document-models/renown-user/gen/index.d.ts +1 -2
- package/dist/document-models/renown-user/gen/index.d.ts.map +1 -0
- package/dist/document-models/renown-user/gen/index.js +0 -1
- package/dist/document-models/renown-user/gen/ph-factories.d.ts +7 -10
- package/dist/document-models/renown-user/gen/ph-factories.d.ts.map +1 -0
- package/dist/document-models/renown-user/gen/ph-factories.js +1 -4
- package/dist/document-models/renown-user/gen/profile/actions.d.ts +1 -0
- package/dist/document-models/renown-user/gen/profile/actions.d.ts.map +1 -0
- package/dist/document-models/renown-user/gen/profile/actions.js +1 -1
- package/dist/document-models/renown-user/gen/profile/creators.d.ts +1 -0
- package/dist/document-models/renown-user/gen/profile/creators.d.ts.map +1 -0
- package/dist/document-models/renown-user/gen/profile/creators.js +2 -1
- package/dist/document-models/renown-user/gen/profile/error.d.ts +1 -0
- package/dist/document-models/renown-user/gen/profile/error.d.ts.map +1 -0
- package/dist/document-models/renown-user/gen/profile/operations.d.ts +1 -0
- package/dist/document-models/renown-user/gen/profile/operations.d.ts.map +1 -0
- package/dist/document-models/renown-user/gen/profile/operations.js +3 -1
- package/dist/document-models/renown-user/gen/reducer.d.ts +3 -2
- package/dist/document-models/renown-user/gen/reducer.d.ts.map +1 -0
- package/dist/document-models/renown-user/gen/reducer.js +1 -4
- package/dist/document-models/renown-user/gen/schema/index.d.ts +1 -0
- package/dist/document-models/renown-user/gen/schema/index.d.ts.map +1 -0
- package/dist/document-models/renown-user/gen/schema/types.d.ts +1 -0
- package/dist/document-models/renown-user/gen/schema/types.d.ts.map +1 -0
- package/dist/document-models/renown-user/gen/schema/zod.d.ts +1 -0
- package/dist/document-models/renown-user/gen/schema/zod.d.ts.map +1 -0
- package/dist/document-models/renown-user/gen/types.d.ts +10 -6
- package/dist/document-models/renown-user/gen/types.d.ts.map +1 -0
- package/dist/document-models/renown-user/gen/types.js +1 -0
- package/dist/document-models/renown-user/gen/utils.d.ts +10 -19
- package/dist/document-models/renown-user/gen/utils.d.ts.map +1 -0
- package/dist/document-models/renown-user/gen/utils.js +26 -34
- package/dist/document-models/renown-user/index.d.ts +14 -7
- package/dist/document-models/renown-user/index.d.ts.map +1 -0
- package/dist/document-models/renown-user/index.js +4 -3
- package/dist/document-models/renown-user/src/reducers/profile.d.ts +1 -0
- package/dist/document-models/renown-user/src/reducers/profile.d.ts.map +1 -0
- package/dist/document-models/renown-user/src/tests/document-model.test.d.ts +1 -0
- package/dist/document-models/renown-user/src/tests/document-model.test.d.ts.map +1 -0
- package/dist/document-models/renown-user/src/tests/document-model.test.js +1 -1
- package/dist/document-models/renown-user/src/tests/profile.test.d.ts +1 -0
- package/dist/document-models/renown-user/src/tests/profile.test.d.ts.map +1 -0
- package/dist/document-models/renown-user/src/utils.d.ts +1 -0
- package/dist/document-models/renown-user/src/utils.d.ts.map +1 -0
- package/dist/editors/hooks/useRenownCredentialDocument.d.ts +1 -0
- package/dist/editors/hooks/useRenownCredentialDocument.d.ts.map +1 -0
- package/dist/editors/hooks/useRenownUserDocument.d.ts +1 -0
- package/dist/editors/hooks/useRenownUserDocument.d.ts.map +1 -0
- package/dist/editors/index.d.ts +1 -0
- package/dist/editors/index.d.ts.map +1 -0
- package/dist/editors/index.js +1 -0
- package/dist/editors/renown-credential-editor/editor.d.ts +1 -0
- package/dist/editors/renown-credential-editor/editor.d.ts.map +1 -0
- package/dist/editors/renown-credential-editor/editor.js +7 -71
- package/dist/editors/renown-credential-editor/index.d.ts +1 -0
- package/dist/editors/renown-credential-editor/index.d.ts.map +1 -0
- package/dist/editors/renown-credential-editor/index.js +1 -3
- package/dist/editors/renown-user-editor/editor.d.ts +1 -0
- package/dist/editors/renown-user-editor/editor.d.ts.map +1 -0
- package/dist/editors/renown-user-editor/editor.js +1 -1
- package/dist/editors/renown-user-editor/index.d.ts +1 -0
- package/dist/editors/renown-user-editor/index.d.ts.map +1 -0
- package/dist/editors/renown-user-editor/index.js +1 -3
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -0
- package/dist/processors/factory.d.ts +4 -2
- package/dist/processors/factory.d.ts.map +1 -0
- package/dist/processors/factory.js +4 -0
- package/dist/processors/index.d.ts +2 -0
- package/dist/processors/index.d.ts.map +1 -0
- package/dist/processors/index.js +2 -0
- package/dist/processors/renown-credential/factory.d.ts +8 -0
- package/dist/processors/renown-credential/factory.d.ts.map +1 -0
- package/dist/processors/renown-credential/factory.js +25 -0
- package/dist/processors/renown-credential/index.d.ts +8 -2
- package/dist/processors/renown-credential/index.d.ts.map +1 -0
- package/dist/processors/renown-credential/index.js +77 -69
- package/dist/processors/renown-credential/migrations.d.ts +2 -1
- package/dist/processors/renown-credential/migrations.d.ts.map +1 -0
- package/dist/processors/renown-credential/migrations.js +53 -21
- package/dist/processors/renown-credential/schema.d.ts +19 -12
- package/dist/processors/renown-credential/schema.d.ts.map +1 -0
- package/dist/processors/renown-user/factory.d.ts +2 -1
- package/dist/processors/renown-user/factory.d.ts.map +1 -0
- package/dist/processors/renown-user/factory.js +4 -1
- package/dist/processors/renown-user/index.d.ts +3 -2
- package/dist/processors/renown-user/index.d.ts.map +1 -0
- package/dist/processors/renown-user/index.js +3 -1
- package/dist/processors/renown-user/migrations.d.ts +2 -1
- package/dist/processors/renown-user/migrations.d.ts.map +1 -0
- package/dist/processors/renown-user/migrations.js +1 -0
- package/dist/processors/renown-user/schema.d.ts +1 -0
- package/dist/processors/renown-user/schema.d.ts.map +1 -0
- package/dist/style.css +132 -17100
- package/dist/subgraphs/index.d.ts +1 -0
- package/dist/subgraphs/index.d.ts.map +1 -0
- package/dist/subgraphs/index.js +1 -0
- package/dist/subgraphs/renown-credential/index.d.ts +3 -2
- package/dist/subgraphs/renown-credential/index.d.ts.map +1 -0
- package/dist/subgraphs/renown-credential/index.js +2 -2
- package/dist/subgraphs/renown-credential/resolvers.d.ts +3 -2
- package/dist/subgraphs/renown-credential/resolvers.d.ts.map +1 -0
- package/dist/subgraphs/renown-credential/resolvers.js +0 -36
- package/dist/subgraphs/renown-credential/schema.d.ts +1 -0
- package/dist/subgraphs/renown-credential/schema.d.ts.map +1 -0
- package/dist/subgraphs/renown-credential/schema.js +96 -47
- package/dist/subgraphs/renown-read-model/index.d.ts +3 -2
- package/dist/subgraphs/renown-read-model/index.d.ts.map +1 -0
- package/dist/subgraphs/renown-read-model/index.js +2 -2
- package/dist/subgraphs/renown-read-model/resolvers.d.ts +3 -2
- package/dist/subgraphs/renown-read-model/resolvers.d.ts.map +1 -0
- package/dist/subgraphs/renown-read-model/resolvers.js +35 -35
- package/dist/subgraphs/renown-read-model/schema.d.ts +1 -0
- package/dist/subgraphs/renown-read-model/schema.d.ts.map +1 -0
- package/dist/subgraphs/renown-read-model/schema.js +20 -18
- package/dist/subgraphs/renown-user/index.d.ts +3 -2
- package/dist/subgraphs/renown-user/index.d.ts.map +1 -0
- package/dist/subgraphs/renown-user/index.js +2 -2
- package/dist/subgraphs/renown-user/resolvers.d.ts +3 -2
- package/dist/subgraphs/renown-user/resolvers.d.ts.map +1 -0
- package/dist/subgraphs/renown-user/schema.d.ts +1 -0
- package/dist/subgraphs/renown-user/schema.d.ts.map +1 -0
- package/dist/vite.config.d.ts +3 -0
- package/dist/vite.config.d.ts.map +1 -0
- package/dist/vite.config.js +13 -0
- package/dist/vitest.config.d.ts +1 -0
- package/dist/vitest.config.d.ts.map +1 -0
- package/package.json +52 -39
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../document-models/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC;AACV,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,MAAM,IAAI,gBAAgB,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../document-models/renown-credential/gen/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAE1E,cAAc,sBAAsB,CAAC;AAErC,MAAM,MAAM,sBAAsB,GAAG,6BAA6B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"creators.d.ts","sourceRoot":"","sources":["../../../../document-models/renown-credential/gen/creators.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const documentModel:
|
|
1
|
+
import type { DocumentModelGlobalState } from "document-model";
|
|
2
|
+
export declare const documentModel: DocumentModelGlobalState;
|
|
3
|
+
//# sourceMappingURL=document-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document-model.d.ts","sourceRoot":"","sources":["../../../../document-models/renown-credential/gen/document-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAE/D,eAAO,MAAM,aAAa,EAAE,wBAgH3B,CAAC"}
|
|
@@ -58,7 +58,7 @@ export const documentModel = {
|
|
|
58
58
|
examples: [],
|
|
59
59
|
id: "366dfd44-377f-42d7-949d-a8d82b6a909d",
|
|
60
60
|
name: "INIT",
|
|
61
|
-
reducer: "//
|
|
61
|
+
reducer: "// Store the EIP-712 signed verifiable credential fields\nstate.context = action.input.context;\nstate.id = action.input.id;\nstate.type = action.input.type;\n\n// Store issuer\nstate.issuer = {\n id: action.input.issuer.id,\n ethereumAddress: action.input.issuer.ethereumAddress,\n};\n\n// Store dates\nstate.issuanceDate = action.input.issuanceDate;\nstate.expirationDate = action.input.expirationDate || null;\n\n// Store credential subject\nstate.credentialSubject = {\n id: action.input.credentialSubject.id || null,\n app: action.input.credentialSubject.app,\n};\n\n// Store credential status (optional)\nif (action.input.credentialStatus) {\n state.credentialStatus = {\n id: action.input.credentialStatus.id,\n type: action.input.credentialStatus.type,\n };\n} else {\n state.credentialStatus = null;\n}\n\n// Store credential schema\nstate.credentialSchema = {\n id: action.input.credentialSchema.id,\n type: action.input.credentialSchema.type,\n};\n\n// Store proof (EIP-712 signature)\nstate.proof = {\n verificationMethod: action.input.proof.verificationMethod,\n ethereumAddress: action.input.proof.ethereumAddress,\n created: action.input.proof.created,\n proofPurpose: action.input.proof.proofPurpose,\n type: action.input.proof.type,\n proofValue: action.input.proof.proofValue,\n eip712: {\n domain: {\n version: action.input.proof.eip712.domain.version,\n chainId: action.input.proof.eip712.domain.chainId,\n },\n primaryType: action.input.proof.eip712.primaryType,\n },\n};\n\n// Initialize revocation tracking\nstate.revoked = false;\nstate.revokedAt = null;\nstate.revocationReason = null;",
|
|
62
62
|
schema: "input InitInput {\n jwt: String!\n}",
|
|
63
63
|
scope: "global",
|
|
64
64
|
template: "",
|
|
@@ -82,70 +82,14 @@ export const documentModel = {
|
|
|
82
82
|
scope: "global",
|
|
83
83
|
template: "",
|
|
84
84
|
},
|
|
85
|
-
{
|
|
86
|
-
description: "Updates the credential subject claims",
|
|
87
|
-
errors: [
|
|
88
|
-
{
|
|
89
|
-
code: "INVALID_CLAIMS",
|
|
90
|
-
description: "The subject claims must be valid JSON",
|
|
91
|
-
id: "invalid-claims-error-2",
|
|
92
|
-
name: "InvalidClaimsError",
|
|
93
|
-
template: "",
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
code: "CREDENTIAL_REVOKED",
|
|
97
|
-
description: "Cannot update a revoked credential",
|
|
98
|
-
id: "credential-revoked-error",
|
|
99
|
-
name: "CredentialRevokedError",
|
|
100
|
-
template: "",
|
|
101
|
-
},
|
|
102
|
-
],
|
|
103
|
-
examples: [],
|
|
104
|
-
id: "update-credential-subject-op",
|
|
105
|
-
name: "UPDATE_CREDENTIAL_SUBJECT",
|
|
106
|
-
reducer: 'if (state.revoked) {\n throw new CredentialRevokedError("Cannot update a revoked credential");\n}\n\n// Validate credentialSubject is valid JSON\ntry {\n JSON.parse(action.input.credentialSubject);\n} catch (e) {\n throw new InvalidClaimsError("Credential subject must be valid JSON");\n}\n\nstate.credentialSubject = action.input.credentialSubject;\n\n// Clear JWT as credential content has changed\nstate.jwt = null;',
|
|
107
|
-
schema: "input UpdateCredentialSubjectInput {\n credentialSubject: String!\n}",
|
|
108
|
-
scope: "global",
|
|
109
|
-
template: "Updates the credential subject claims",
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
description: "Sets the signed JWT representation of the credential",
|
|
113
|
-
errors: [],
|
|
114
|
-
examples: [],
|
|
115
|
-
id: "set-jwt-op",
|
|
116
|
-
name: "SET_JWT",
|
|
117
|
-
reducer: "state.jwt = action.input.jwt;",
|
|
118
|
-
schema: "input SetJwtInput {\n jwt: String!\n}",
|
|
119
|
-
scope: "global",
|
|
120
|
-
template: "Sets the signed JWT representation of the credential",
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
description: "Sets the credential status for revocation support (StatusList2021)",
|
|
124
|
-
errors: [
|
|
125
|
-
{
|
|
126
|
-
code: "INVALID_STATUS_PURPOSE",
|
|
127
|
-
description: "Status purpose must be either 'revocation' or 'suspension'",
|
|
128
|
-
id: "invalid-status-purpose-error",
|
|
129
|
-
name: "InvalidStatusPurposeError",
|
|
130
|
-
template: "",
|
|
131
|
-
},
|
|
132
|
-
],
|
|
133
|
-
examples: [],
|
|
134
|
-
id: "set-credential-status-op",
|
|
135
|
-
name: "SET_CREDENTIAL_STATUS",
|
|
136
|
-
reducer: '// Validate statusPurpose\nif (action.input.statusPurpose !== "revocation" && action.input.statusPurpose !== "suspension") {\n throw new InvalidStatusPurposeError("Status purpose must be \'revocation\' or \'suspension\'");\n}\n\nstate.credentialStatus = {\n id: action.input.statusId,\n type: action.input.statusType,\n statusPurpose: action.input.statusPurpose,\n statusListIndex: action.input.statusListIndex,\n statusListCredential: action.input.statusListCredential\n};',
|
|
137
|
-
schema: "input SetCredentialStatusInput {\n statusId: String!\n statusType: String!\n statusPurpose: String!\n statusListIndex: String!\n statusListCredential: String!\n}",
|
|
138
|
-
scope: "global",
|
|
139
|
-
template: "Sets the credential status for revocation support (StatusList2021)",
|
|
140
|
-
},
|
|
141
85
|
],
|
|
142
86
|
},
|
|
143
87
|
],
|
|
144
88
|
state: {
|
|
145
89
|
global: {
|
|
146
90
|
examples: [],
|
|
147
|
-
initialValue: '"{\\
|
|
148
|
-
schema: 'type CredentialStatus {\n id: String!\n type: String!\n
|
|
91
|
+
initialValue: '"{\\"context\\": [], \\"id\\": \\"\\", \\"type\\": [], \\"issuer\\": {\\"id\\": \\"\\", \\"ethereumAddress\\": \\"0x0000000000000000000000000000000000000000\\"}, \\"issuanceDate\\": \\"\\", \\"expirationDate\\": null, \\"credentialSubject\\": {\\"id\\": null, \\"app\\": \\"\\"}, \\"credentialStatus\\": null, \\"credentialSchema\\": {\\"id\\": \\"\\", \\"type\\": \\"\\"}, \\"proof\\": {\\"verificationMethod\\": \\"\\", \\"ethereumAddress\\": \\"0x0000000000000000000000000000000000000000\\", \\"created\\": \\"\\", \\"proofPurpose\\": \\"\\", \\"type\\": \\"\\", \\"proofValue\\": \\"\\", \\"eip712\\": {\\"domain\\": {\\"version\\": \\"\\", \\"chainId\\": 0}, \\"primaryType\\": \\"VerifiableCredential\\"}}, \\"revoked\\": false, \\"revokedAt\\": null, \\"revocationReason\\": null}"',
|
|
92
|
+
schema: 'type Issuer {\n id: String!\n ethereumAddress: EthereumAddress!\n}\n\ntype CredentialSubject {\n id: String\n app: String!\n}\n\ntype CredentialStatus {\n id: String!\n type: String!\n}\n\ntype CredentialSchema {\n id: String!\n type: String!\n}\n\ntype EIP712Domain {\n version: String!\n chainId: Int!\n}\n\ntype EIP712 {\n domain: EIP712Domain!\n primaryType: String!\n}\n\ntype Proof {\n verificationMethod: String!\n ethereumAddress: EthereumAddress!\n created: DateTime!\n proofPurpose: String!\n type: String!\n proofValue: String!\n eip712: EIP712!\n}\n\ntype RenownCredentialState {\n "W3C VC Fields - EIP-712 Signed Verifiable Credential"\n context: [String!]!\n id: String!\n type: [String!]!\n issuer: Issuer!\n issuanceDate: DateTime!\n expirationDate: DateTime\n credentialSubject: CredentialSubject!\n credentialStatus: CredentialStatus\n credentialSchema: CredentialSchema!\n proof: Proof!\n\n "Revocation tracking"\n revoked: Boolean!\n revokedAt: DateTime\n revocationReason: String\n}\n\n\n\n# manager\n\ninput IssuerInput {\n id: String!\n ethereumAddress: EthereumAddress!\n}\n\ninput CredentialSubjectInput {\n id: String\n app: String!\n}\n\ninput CredentialStatusInput {\n id: String!\n type: String!\n}\n\ninput CredentialSchemaInput {\n id: String!\n type: String!\n}\n\ninput EIP712DomainInput {\n version: String!\n chainId: Int!\n}\n\ninput EIP712Input {\n domain: EIP712DomainInput!\n primaryType: String!\n}\n\ninput ProofInput {\n verificationMethod: String!\n ethereumAddress: EthereumAddress!\n created: DateTime!\n proofPurpose: String!\n type: String!\n proofValue: String!\n eip712: EIP712Input!\n}\n\ninput InitInput {\n context: [String!]!\n id: String!\n type: [String!]!\n issuer: IssuerInput!\n issuanceDate: DateTime!\n expirationDate: DateTime\n credentialSubject: CredentialSubjectInput!\n credentialStatus: CredentialStatusInput\n credentialSchema: CredentialSchemaInput!\n proof: ProofInput!\n}\n\ninput RevokeInput {\n revokedAt: DateTime!\n reason: String\n}',
|
|
149
93
|
},
|
|
150
94
|
local: {
|
|
151
95
|
examples: [],
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export * from "./actions.js";
|
|
2
2
|
export * from "./document-model.js";
|
|
3
|
-
export * from "./object.js";
|
|
4
3
|
export * from "./types.js";
|
|
5
4
|
export * as actions from "./creators.js";
|
|
6
|
-
export type { RenownCredentialPHState } from "./ph-factories.js";
|
|
7
5
|
export { createRenownCredentialDocument, createState, defaultPHState, defaultGlobalState, defaultLocalState, } from "./ph-factories.js";
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../document-models/renown-credential/gen/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,OAAO,KAAK,OAAO,MAAM,eAAe,CAAC;AACzC,OAAO,EACL,8BAA8B,EAC9B,WAAW,EACX,cAAc,EACd,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,mBAAmB,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export * from "./actions.js";
|
|
2
2
|
export * from "./document-model.js";
|
|
3
|
-
export * from "./object.js";
|
|
4
3
|
export * from "./types.js";
|
|
5
4
|
export * as actions from "./creators.js";
|
|
6
5
|
export { createRenownCredentialDocument, createState, defaultPHState, defaultGlobalState, defaultLocalState, } from "./ph-factories.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Action } from "document-model";
|
|
2
|
-
import type { InitInput, RevokeInput
|
|
2
|
+
import type { InitInput, RevokeInput } from "../types.js";
|
|
3
3
|
export type InitAction = Action & {
|
|
4
4
|
type: "INIT";
|
|
5
5
|
input: InitInput;
|
|
@@ -8,16 +8,5 @@ export type RevokeAction = Action & {
|
|
|
8
8
|
type: "REVOKE";
|
|
9
9
|
input: RevokeInput;
|
|
10
10
|
};
|
|
11
|
-
export type
|
|
12
|
-
|
|
13
|
-
input: UpdateCredentialSubjectInput;
|
|
14
|
-
};
|
|
15
|
-
export type SetJwtAction = Action & {
|
|
16
|
-
type: "SET_JWT";
|
|
17
|
-
input: SetJwtInput;
|
|
18
|
-
};
|
|
19
|
-
export type SetCredentialStatusAction = Action & {
|
|
20
|
-
type: "SET_CREDENTIAL_STATUS";
|
|
21
|
-
input: SetCredentialStatusInput;
|
|
22
|
-
};
|
|
23
|
-
export type RenownCredentialManagerAction = InitAction | RevokeAction | UpdateCredentialSubjectAction | SetJwtAction | SetCredentialStatusAction;
|
|
11
|
+
export type RenownCredentialManagerAction = InitAction | RevokeAction;
|
|
12
|
+
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../../document-models/renown-credential/gen/manager/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1D,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,SAAS,CAAA;CAAE,CAAC;AACrE,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,WAAW,CAAA;CAAE,CAAC;AAE3E,MAAM,MAAM,6BAA6B,GAAG,UAAU,GAAG,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import {} from "document-model";
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { type InitInput, type RevokeInput
|
|
2
|
-
import { type InitAction, type RevokeAction
|
|
1
|
+
import { type InitInput, type RevokeInput } from "../types.js";
|
|
2
|
+
import { type InitAction, type RevokeAction } from "./actions.js";
|
|
3
3
|
export declare const init: (input: InitInput) => InitAction;
|
|
4
4
|
export declare const revoke: (input: RevokeInput) => RevokeAction;
|
|
5
|
-
|
|
6
|
-
export declare const setJwt: (input: SetJwtInput) => SetJwtAction;
|
|
7
|
-
export declare const setCredentialStatus: (input: SetCredentialStatusInput) => SetCredentialStatusAction;
|
|
5
|
+
//# sourceMappingURL=creators.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"creators.d.ts","sourceRoot":"","sources":["../../../../../document-models/renown-credential/gen/manager/creators.ts"],"names":[],"mappings":"AACA,OAAO,EAAK,KAAK,SAAS,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAElE,eAAO,MAAM,IAAI,GAAI,OAAO,SAAS,eAOlC,CAAC;AAEJ,eAAO,MAAM,MAAM,GAAI,OAAO,WAAW,iBAOtC,CAAC"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { createAction } from "document-model";
|
|
2
|
-
import { z
|
|
1
|
+
import { createAction } from "document-model/core";
|
|
2
|
+
import { z } from "../types.js";
|
|
3
|
+
import {} from "./actions.js";
|
|
3
4
|
export const init = (input) => createAction("INIT", { ...input }, undefined, z.InitInputSchema, "global");
|
|
4
5
|
export const revoke = (input) => createAction("REVOKE", { ...input }, undefined, z.RevokeInputSchema, "global");
|
|
5
|
-
export const updateCredentialSubject = (input) => createAction("UPDATE_CREDENTIAL_SUBJECT", { ...input }, undefined, z.UpdateCredentialSubjectInputSchema, "global");
|
|
6
|
-
export const setJwt = (input) => createAction("SET_JWT", { ...input }, undefined, z.SetJwtInputSchema, "global");
|
|
7
|
-
export const setCredentialStatus = (input) => createAction("SET_CREDENTIAL_STATUS", { ...input }, undefined, z.SetCredentialStatusInputSchema, "global");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type ErrorCode = "MissingContextError" | "InvalidJwtPayloadError" | "JwtVerificationError" | "InvalidClaimsError" | "MissingTypeError" | "AlreadyRevokedError"
|
|
1
|
+
export type ErrorCode = "MissingContextError" | "InvalidJwtPayloadError" | "JwtVerificationError" | "InvalidClaimsError" | "MissingTypeError" | "AlreadyRevokedError";
|
|
2
2
|
export interface ReducerError {
|
|
3
3
|
errorCode: ErrorCode;
|
|
4
4
|
}
|
|
@@ -26,14 +26,6 @@ export declare class AlreadyRevokedError extends Error implements ReducerError {
|
|
|
26
26
|
errorCode: ErrorCode;
|
|
27
27
|
constructor(message?: string);
|
|
28
28
|
}
|
|
29
|
-
export declare class CredentialRevokedError extends Error implements ReducerError {
|
|
30
|
-
errorCode: ErrorCode;
|
|
31
|
-
constructor(message?: string);
|
|
32
|
-
}
|
|
33
|
-
export declare class InvalidStatusPurposeError extends Error implements ReducerError {
|
|
34
|
-
errorCode: ErrorCode;
|
|
35
|
-
constructor(message?: string);
|
|
36
|
-
}
|
|
37
29
|
export declare const errors: {
|
|
38
30
|
Init: {
|
|
39
31
|
MissingContextError: typeof MissingContextError;
|
|
@@ -45,11 +37,5 @@ export declare const errors: {
|
|
|
45
37
|
Revoke: {
|
|
46
38
|
AlreadyRevokedError: typeof AlreadyRevokedError;
|
|
47
39
|
};
|
|
48
|
-
UpdateCredentialSubject: {
|
|
49
|
-
InvalidClaimsError: typeof InvalidClaimsError;
|
|
50
|
-
CredentialRevokedError: typeof CredentialRevokedError;
|
|
51
|
-
};
|
|
52
|
-
SetCredentialStatus: {
|
|
53
|
-
InvalidStatusPurposeError: typeof InvalidStatusPurposeError;
|
|
54
|
-
};
|
|
55
40
|
};
|
|
41
|
+
//# sourceMappingURL=error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../../../document-models/renown-credential/gen/manager/error.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GACjB,qBAAqB,GACrB,wBAAwB,GACxB,sBAAsB,GACtB,oBAAoB,GACpB,kBAAkB,GAClB,qBAAqB,CAAC;AAE1B,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,SAAS,CAAC;CACtB;AAED,qBAAa,mBAAoB,SAAQ,KAAM,YAAW,YAAY;IACpE,SAAS,EAA4B,SAAS,CAAC;gBACnC,OAAO,SAAwB;CAG5C;AAED,qBAAa,sBAAuB,SAAQ,KAAM,YAAW,YAAY;IACvE,SAAS,EAA+B,SAAS,CAAC;gBACtC,OAAO,SAA2B;CAG/C;AAED,qBAAa,oBAAqB,SAAQ,KAAM,YAAW,YAAY;IACrE,SAAS,EAA6B,SAAS,CAAC;gBACpC,OAAO,SAAyB;CAG7C;AAED,qBAAa,kBAAmB,SAAQ,KAAM,YAAW,YAAY;IACnE,SAAS,EAA2B,SAAS,CAAC;gBAClC,OAAO,SAAuB;CAG3C;AAED,qBAAa,gBAAiB,SAAQ,KAAM,YAAW,YAAY;IACjE,SAAS,EAAyB,SAAS,CAAC;gBAChC,OAAO,SAAqB;CAGzC;AAED,qBAAa,mBAAoB,SAAQ,KAAM,YAAW,YAAY;IACpE,SAAS,EAA4B,SAAS,CAAC;gBACnC,OAAO,SAAwB;CAG5C;AAED,eAAO,MAAM,MAAM;;;;;;;;;;;CAWlB,CAAC"}
|
|
@@ -34,18 +34,6 @@ export class AlreadyRevokedError extends Error {
|
|
|
34
34
|
super(message);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
export class CredentialRevokedError extends Error {
|
|
38
|
-
errorCode = "CredentialRevokedError";
|
|
39
|
-
constructor(message = "CredentialRevokedError") {
|
|
40
|
-
super(message);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
export class InvalidStatusPurposeError extends Error {
|
|
44
|
-
errorCode = "InvalidStatusPurposeError";
|
|
45
|
-
constructor(message = "InvalidStatusPurposeError") {
|
|
46
|
-
super(message);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
37
|
export const errors = {
|
|
50
38
|
Init: {
|
|
51
39
|
MissingContextError,
|
|
@@ -57,11 +45,4 @@ export const errors = {
|
|
|
57
45
|
Revoke: {
|
|
58
46
|
AlreadyRevokedError,
|
|
59
47
|
},
|
|
60
|
-
UpdateCredentialSubject: {
|
|
61
|
-
InvalidClaimsError,
|
|
62
|
-
CredentialRevokedError,
|
|
63
|
-
},
|
|
64
|
-
SetCredentialStatus: {
|
|
65
|
-
InvalidStatusPurposeError,
|
|
66
|
-
},
|
|
67
48
|
};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { type SignalDispatch } from "document-model";
|
|
2
|
-
import { type InitAction, type RevokeAction
|
|
2
|
+
import { type InitAction, type RevokeAction } from "./actions.js";
|
|
3
3
|
import { type RenownCredentialState } from "../types.js";
|
|
4
4
|
export interface RenownCredentialManagerOperations {
|
|
5
5
|
initOperation: (state: RenownCredentialState, action: InitAction, dispatch?: SignalDispatch) => void;
|
|
6
6
|
revokeOperation: (state: RenownCredentialState, action: RevokeAction, dispatch?: SignalDispatch) => void;
|
|
7
|
-
updateCredentialSubjectOperation: (state: RenownCredentialState, action: UpdateCredentialSubjectAction, dispatch?: SignalDispatch) => void;
|
|
8
|
-
setJwtOperation: (state: RenownCredentialState, action: SetJwtAction, dispatch?: SignalDispatch) => void;
|
|
9
|
-
setCredentialStatusOperation: (state: RenownCredentialState, action: SetCredentialStatusAction, dispatch?: SignalDispatch) => void;
|
|
10
7
|
}
|
|
8
|
+
//# sourceMappingURL=operations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../../../document-models/renown-credential/gen/manager/operations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEzD,MAAM,WAAW,iCAAiC;IAChD,aAAa,EAAE,CACb,KAAK,EAAE,qBAAqB,EAC5B,MAAM,EAAE,UAAU,EAClB,QAAQ,CAAC,EAAE,cAAc,KACtB,IAAI,CAAC;IACV,eAAe,EAAE,CACf,KAAK,EAAE,qBAAqB,EAC5B,MAAM,EAAE,YAAY,EACpB,QAAQ,CAAC,EAAE,cAAc,KACtB,IAAI,CAAC;CACX"}
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Factory methods for creating RenownCredentialDocument instances
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
import type { RenownCredentialDocument, RenownCredentialLocalState,
|
|
6
|
-
export
|
|
7
|
-
global: RenownCredentialState;
|
|
8
|
-
local: RenownCredentialLocalState;
|
|
9
|
-
};
|
|
10
|
-
export declare function defaultGlobalState(): RenownCredentialState;
|
|
4
|
+
import type { PHAuthState, PHDocumentState, PHBaseState } from "document-model";
|
|
5
|
+
import type { RenownCredentialDocument, RenownCredentialLocalState, RenownCredentialGlobalState, RenownCredentialPHState } from "./types.js";
|
|
6
|
+
export declare function defaultGlobalState(): RenownCredentialGlobalState;
|
|
11
7
|
export declare function defaultLocalState(): RenownCredentialLocalState;
|
|
12
8
|
export declare function defaultPHState(): RenownCredentialPHState;
|
|
13
|
-
export declare function createGlobalState(state?: Partial<
|
|
9
|
+
export declare function createGlobalState(state?: Partial<RenownCredentialGlobalState>): RenownCredentialGlobalState;
|
|
14
10
|
export declare function createLocalState(state?: Partial<RenownCredentialLocalState>): RenownCredentialLocalState;
|
|
15
|
-
export declare function createState(baseState?: Partial<PHBaseState>, globalState?: Partial<
|
|
11
|
+
export declare function createState(baseState?: Partial<PHBaseState>, globalState?: Partial<RenownCredentialGlobalState>, localState?: Partial<RenownCredentialLocalState>): RenownCredentialPHState;
|
|
16
12
|
/**
|
|
17
13
|
* Creates a RenownCredentialDocument with custom global and local state
|
|
18
14
|
* This properly handles the PHBaseState requirements while allowing
|
|
@@ -21,6 +17,7 @@ export declare function createState(baseState?: Partial<PHBaseState>, globalStat
|
|
|
21
17
|
export declare function createRenownCredentialDocument(state?: Partial<{
|
|
22
18
|
auth?: Partial<PHAuthState>;
|
|
23
19
|
document?: Partial<PHDocumentState>;
|
|
24
|
-
global?: Partial<
|
|
20
|
+
global?: Partial<RenownCredentialGlobalState>;
|
|
25
21
|
local?: Partial<RenownCredentialLocalState>;
|
|
26
22
|
}>): RenownCredentialDocument;
|
|
23
|
+
//# sourceMappingURL=ph-factories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ph-factories.d.ts","sourceRoot":"","sources":["../../../../document-models/renown-credential/gen/ph-factories.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAEhF,OAAO,KAAK,EACV,wBAAwB,EACxB,0BAA0B,EAC1B,2BAA2B,EAC3B,uBAAuB,EACxB,MAAM,YAAY,CAAC;AAGpB,wBAAgB,kBAAkB,IAAI,2BAA2B,CA8BhE;AAED,wBAAgB,iBAAiB,IAAI,0BAA0B,CAE9D;AAED,wBAAgB,cAAc,IAAI,uBAAuB,CAMxD;AAED,wBAAgB,iBAAiB,CAC/B,KAAK,CAAC,EAAE,OAAO,CAAC,2BAA2B,CAAC,GAC3C,2BAA2B,CAK7B;AAED,wBAAgB,gBAAgB,CAC9B,KAAK,CAAC,EAAE,OAAO,CAAC,0BAA0B,CAAC,GAC1C,0BAA0B,CAK5B;AAED,wBAAgB,WAAW,CACzB,SAAS,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,EAChC,WAAW,CAAC,EAAE,OAAO,CAAC,2BAA2B,CAAC,EAClD,UAAU,CAAC,EAAE,OAAO,CAAC,0BAA0B,CAAC,GAC/C,uBAAuB,CAMzB;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAC5C,KAAK,CAAC,EAAE,OAAO,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IACpC,MAAM,CAAC,EAAE,OAAO,CAAC,2BAA2B,CAAC,CAAC;IAC9C,KAAK,CAAC,EAAE,OAAO,CAAC,0BAA0B,CAAC,CAAC;CAC7C,CAAC,GACD,wBAAwB,CAY1B"}
|
|
@@ -1,21 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
* Factory methods for creating RenownCredentialDocument instances
|
|
3
|
-
*/
|
|
4
|
-
import { createBaseState, defaultBaseState, } from "document-model";
|
|
1
|
+
import { createBaseState, defaultBaseState } from "document-model/core";
|
|
5
2
|
import { createDocument } from "./utils.js";
|
|
6
3
|
export function defaultGlobalState() {
|
|
7
4
|
return {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
context: [],
|
|
6
|
+
id: "",
|
|
7
|
+
type: [],
|
|
8
|
+
issuer: {
|
|
9
|
+
id: "",
|
|
10
|
+
ethereumAddress: "0x0000000000000000000000000000000000000000",
|
|
11
|
+
},
|
|
12
|
+
issuanceDate: "",
|
|
15
13
|
expirationDate: null,
|
|
14
|
+
credentialSubject: { id: null, app: "" },
|
|
16
15
|
credentialStatus: null,
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
credentialSchema: { id: "", type: "" },
|
|
17
|
+
proof: {
|
|
18
|
+
verificationMethod: "",
|
|
19
|
+
ethereumAddress: "0x0000000000000000000000000000000000000000",
|
|
20
|
+
created: "",
|
|
21
|
+
proofPurpose: "",
|
|
22
|
+
type: "",
|
|
23
|
+
proofValue: "",
|
|
24
|
+
eip712: {
|
|
25
|
+
domain: { version: "", chainId: 0 },
|
|
26
|
+
primaryType: "VerifiableCredential",
|
|
27
|
+
},
|
|
28
|
+
},
|
|
19
29
|
revoked: false,
|
|
20
30
|
revokedAt: null,
|
|
21
31
|
revocationReason: null,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { StateReducer } from "document-model";
|
|
2
|
+
import type { RenownCredentialPHState } from "./types.js";
|
|
3
3
|
export declare const stateReducer: StateReducer<RenownCredentialPHState>;
|
|
4
4
|
export declare const reducer: import("document-model").Reducer<RenownCredentialPHState>;
|
|
5
|
+
//# sourceMappingURL=reducer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../../document-models/renown-credential/gen/reducer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAK1D,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,uBAAuB,CA+B9D,CAAC;AAEF,eAAO,MAAM,OAAO,2DAAuD,CAAC"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
3
|
-
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
|
4
|
-
import { isDocumentAction, createReducer, } from "document-model";
|
|
1
|
+
import { isDocumentAction, createReducer } from "document-model/core";
|
|
5
2
|
import { z } from "./types.js";
|
|
6
3
|
import { reducer as ManagerReducer } from "../src/reducers/manager.js";
|
|
7
4
|
export const stateReducer = (state, action, dispatch) => {
|
|
@@ -17,18 +14,6 @@ export const stateReducer = (state, action, dispatch) => {
|
|
|
17
14
|
z.RevokeInputSchema().parse(action.input);
|
|
18
15
|
ManagerReducer.revokeOperation(state[action.scope], action, dispatch);
|
|
19
16
|
break;
|
|
20
|
-
case "UPDATE_CREDENTIAL_SUBJECT":
|
|
21
|
-
z.UpdateCredentialSubjectInputSchema().parse(action.input);
|
|
22
|
-
ManagerReducer.updateCredentialSubjectOperation(state[action.scope], action, dispatch);
|
|
23
|
-
break;
|
|
24
|
-
case "SET_JWT":
|
|
25
|
-
z.SetJwtInputSchema().parse(action.input);
|
|
26
|
-
ManagerReducer.setJwtOperation(state[action.scope], action, dispatch);
|
|
27
|
-
break;
|
|
28
|
-
case "SET_CREDENTIAL_STATUS":
|
|
29
|
-
z.SetCredentialStatusInputSchema().parse(action.input);
|
|
30
|
-
ManagerReducer.setCredentialStatusOperation(state[action.scope], action, dispatch);
|
|
31
|
-
break;
|
|
32
17
|
default:
|
|
33
18
|
return state;
|
|
34
19
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../document-models/renown-credential/gen/schema/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC"}
|