@powerhousedao/renown-package 1.1.0-staging.1 → 1.2.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/dist/document-models/renown-credential/gen/schema/zod.js +8 -8
- package/dist/document-models/renown-credential/module.d.ts +1 -1
- package/dist/document-models/renown-credential/module.d.ts.map +1 -1
- package/dist/document-models/renown-credential/module.js +1 -1
- package/dist/document-models/renown-user/module.d.ts +1 -1
- package/dist/document-models/renown-user/module.d.ts.map +1 -1
- package/dist/document-models/renown-user/module.js +1 -1
- package/dist/document-models/renown-user/tests/profile.test.js +1 -5
- package/package.json +1 -1
|
@@ -74,9 +74,9 @@ export function InitInputSchema() {
|
|
|
74
74
|
credentialSchema: z.lazy(() => CredentialSchemaInputSchema()),
|
|
75
75
|
credentialStatus: z.lazy(() => CredentialStatusInputSchema().nullish()),
|
|
76
76
|
credentialSubject: z.lazy(() => CredentialSubjectInputSchema()),
|
|
77
|
-
expirationDate: z.
|
|
77
|
+
expirationDate: z.iso.datetime().nullish(),
|
|
78
78
|
id: z.string(),
|
|
79
|
-
issuanceDate: z.
|
|
79
|
+
issuanceDate: z.iso.datetime(),
|
|
80
80
|
issuer: z.lazy(() => IssuerInputSchema()),
|
|
81
81
|
proof: z.lazy(() => ProofInputSchema()),
|
|
82
82
|
type: z.array(z.string()),
|
|
@@ -106,7 +106,7 @@ export function IssuerInputSchema() {
|
|
|
106
106
|
export function ProofSchema() {
|
|
107
107
|
return z.object({
|
|
108
108
|
__typename: z.literal("Proof").optional(),
|
|
109
|
-
created: z.
|
|
109
|
+
created: z.iso.datetime(),
|
|
110
110
|
eip712: z.lazy(() => Eip712Schema()),
|
|
111
111
|
ethereumAddress: z
|
|
112
112
|
.string()
|
|
@@ -121,7 +121,7 @@ export function ProofSchema() {
|
|
|
121
121
|
}
|
|
122
122
|
export function ProofInputSchema() {
|
|
123
123
|
return z.object({
|
|
124
|
-
created: z.
|
|
124
|
+
created: z.iso.datetime(),
|
|
125
125
|
eip712: z.lazy(() => Eip712InputSchema()),
|
|
126
126
|
ethereumAddress: z
|
|
127
127
|
.string()
|
|
@@ -141,20 +141,20 @@ export function RenownCredentialStateSchema() {
|
|
|
141
141
|
credentialSchema: z.lazy(() => CredentialSchemaSchema()),
|
|
142
142
|
credentialStatus: z.lazy(() => CredentialStatusSchema().nullish()),
|
|
143
143
|
credentialSubject: z.lazy(() => CredentialSubjectSchema()),
|
|
144
|
-
expirationDate: z.
|
|
144
|
+
expirationDate: z.iso.datetime().nullish(),
|
|
145
145
|
id: z.string(),
|
|
146
|
-
issuanceDate: z.
|
|
146
|
+
issuanceDate: z.iso.datetime(),
|
|
147
147
|
issuer: z.lazy(() => IssuerSchema()),
|
|
148
148
|
proof: z.lazy(() => ProofSchema()),
|
|
149
149
|
revocationReason: z.string().nullish(),
|
|
150
150
|
revoked: z.boolean(),
|
|
151
|
-
revokedAt: z.
|
|
151
|
+
revokedAt: z.iso.datetime().nullish(),
|
|
152
152
|
type: z.array(z.string()),
|
|
153
153
|
});
|
|
154
154
|
}
|
|
155
155
|
export function RevokeInputSchema() {
|
|
156
156
|
return z.object({
|
|
157
157
|
reason: z.string().nullish(),
|
|
158
|
-
revokedAt: z.
|
|
158
|
+
revokedAt: z.iso.datetime(),
|
|
159
159
|
});
|
|
160
160
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DocumentModelModule } from "document-model";
|
|
2
2
|
import type { RenownCredentialPHState } from "@powerhousedao/renown-package/document-models/renown-credential";
|
|
3
|
-
/** Document model module for the
|
|
3
|
+
/** Document model module for the RenownCredential document type */
|
|
4
4
|
export declare const RenownCredential: DocumentModelModule<RenownCredentialPHState>;
|
|
5
5
|
//# sourceMappingURL=module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../document-models/renown-credential/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAG1D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iEAAiE,CAAC;AAQ/G,
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../document-models/renown-credential/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAG1D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iEAAiE,CAAC;AAQ/G,mEAAmE;AACnE,eAAO,MAAM,gBAAgB,EAAE,mBAAmB,CAAC,uBAAuB,CAMzE,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createState } from "document-model";
|
|
2
2
|
import { defaultBaseState } from "document-model/core";
|
|
3
3
|
import { actions, documentModel, reducer, utils, } from "@powerhousedao/renown-package/document-models/renown-credential";
|
|
4
|
-
/** Document model module for the
|
|
4
|
+
/** Document model module for the RenownCredential document type */
|
|
5
5
|
export const RenownCredential = {
|
|
6
6
|
version: 1,
|
|
7
7
|
reducer,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DocumentModelModule } from "document-model";
|
|
2
2
|
import type { RenownUserPHState } from "@powerhousedao/renown-package/document-models/renown-user";
|
|
3
|
-
/** Document model module for the
|
|
3
|
+
/** Document model module for the RenownUser document type */
|
|
4
4
|
export declare const RenownUser: DocumentModelModule<RenownUserPHState>;
|
|
5
5
|
//# sourceMappingURL=module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../document-models/renown-user/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAG1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2DAA2D,CAAC;AAQnG,
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../document-models/renown-user/module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAG1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2DAA2D,CAAC;AAQnG,6DAA6D;AAC7D,eAAO,MAAM,UAAU,EAAE,mBAAmB,CAAC,iBAAiB,CAM7D,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createState } from "document-model";
|
|
2
2
|
import { defaultBaseState } from "document-model/core";
|
|
3
3
|
import { actions, documentModel, reducer, utils, } from "@powerhousedao/renown-package/document-models/renown-user";
|
|
4
|
-
/** Document model module for the
|
|
4
|
+
/** Document model module for the RenownUser document type */
|
|
5
5
|
export const RenownUser = {
|
|
6
6
|
version: 1,
|
|
7
7
|
reducer,
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { generateMock } from "@powerhousedao/codegen";
|
|
2
2
|
import { describe, expect, it } from "vitest";
|
|
3
|
-
import { reducer } from "
|
|
4
|
-
import { utils } from "../gen/utils.js";
|
|
5
|
-
import { isRenownUserDocument } from "../gen/document-schema.js";
|
|
6
|
-
import { setUsername, setEthAddress, setUserImage, } from "../gen/profile/creators.js";
|
|
7
|
-
import { SetUsernameInputSchema, SetEthAddressInputSchema, SetUserImageInputSchema, } from "../gen/schema/zod.js";
|
|
3
|
+
import { reducer, utils, isRenownUserDocument, setUsername, setEthAddress, setUserImage, SetUsernameInputSchema, SetEthAddressInputSchema, SetUserImageInputSchema, } from "@powerhousedao/renown-package/document-models/renown-user";
|
|
8
4
|
describe("ProfileOperations", () => {
|
|
9
5
|
it("should handle setUsername operation", () => {
|
|
10
6
|
const document = utils.createDocument();
|
package/package.json
CHANGED