@oxy.so/contracts 6.10.0 → 6.12.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.
@@ -0,0 +1,82 @@
1
+ /**
2
+ * An organization's identity key (ADR 0061): its DID `#key-1`, created in
3
+ * Commons by an owner or admin, and the key Peable derives the organization's
4
+ * FairCoin receive addresses from.
5
+ *
6
+ * - `GET /accounts/:id/identity-key` the current key and its history
7
+ * - `POST /accounts/:id/identity-key/challenge` a one-use challenge for one change
8
+ * - `POST /accounts/:id/identity-key` apply it with the signatures
9
+ *
10
+ * No private key or phrase crosses this contract.
11
+ */
12
+ import { z } from 'zod';
13
+ export { ORGANIZATION_KEY_OPERATIONS, ORGANIZATION_KEY_PROOF_ACTIONS, ORGANIZATION_KEY_PROOF_ACTION_VALUES, ORGANIZATION_KEY_ERROR_CODES, organizationKeyPayload, organizationKeyProofClaims, } from './client/organizationIdentityKey';
14
+ export type { OrganizationKeyOperation, OrganizationKeyProofAction, OrganizationKeyErrorCode, } from './client/organizationIdentityKey';
15
+ /** `POST /accounts/:id/identity-key/challenge` */
16
+ export declare const organizationKeyChallengeRequestSchema: z.ZodObject<{
17
+ operation: z.ZodEnum<{
18
+ replace: "replace";
19
+ create: "create";
20
+ }>;
21
+ publicKey: z.ZodString;
22
+ }, z.core.$strict>;
23
+ export type OrganizationKeyChallengeRequest = z.infer<typeof organizationKeyChallengeRequestSchema>;
24
+ /**
25
+ * The challenge and every claim the signers sign
26
+ * (`organizationKeyProofClaims(challenge, signerPublicKey)`).
27
+ */
28
+ export declare const organizationKeyChallengeSchema: z.ZodObject<{
29
+ operation: z.ZodEnum<{
30
+ replace: "replace";
31
+ create: "create";
32
+ }>;
33
+ action: z.ZodEnum<{
34
+ organization_key_create: "organization_key_create";
35
+ organization_key_replace: "organization_key_replace";
36
+ }>;
37
+ accountId: z.ZodString;
38
+ actorId: z.ZodString;
39
+ actorPublicKey: z.ZodString;
40
+ publicKey: z.ZodString;
41
+ previousPublicKey: z.ZodNullable<z.ZodString>;
42
+ payloadDigest: z.ZodString;
43
+ audience: z.ZodLiteral<"oxy-api/identity">;
44
+ challenge: z.ZodString;
45
+ expiresAt: z.ZodNumber;
46
+ }, z.core.$strict>;
47
+ export type OrganizationKeyChallenge = z.infer<typeof organizationKeyChallengeSchema>;
48
+ /** `POST /accounts/:id/identity-key` */
49
+ export declare const organizationKeyApplyRequestSchema: z.ZodObject<{
50
+ operation: z.ZodEnum<{
51
+ replace: "replace";
52
+ create: "create";
53
+ }>;
54
+ publicKey: z.ZodString;
55
+ challenge: z.ZodString;
56
+ expiresAt: z.ZodNumber;
57
+ actorSignature: z.ZodString;
58
+ keySignature: z.ZodString;
59
+ previousKeySignature: z.ZodOptional<z.ZodString>;
60
+ }, z.core.$strict>;
61
+ export type OrganizationKeyApplyRequest = z.infer<typeof organizationKeyApplyRequestSchema>;
62
+ /**
63
+ * `GET /accounts/:id/identity-key`, and the answer of a change: the current
64
+ * key (`null` for an organization without one) and every key it has had,
65
+ * oldest first. A retired key is never used again by any account.
66
+ */
67
+ export declare const organizationIdentityKeyStateSchema: z.ZodObject<{
68
+ accountId: z.ZodString;
69
+ publicKey: z.ZodNullable<z.ZodString>;
70
+ keys: z.ZodArray<z.ZodObject<{
71
+ publicKey: z.ZodString;
72
+ method: z.ZodEnum<{
73
+ replace: "replace";
74
+ create: "create";
75
+ }>;
76
+ linkedByUserId: z.ZodNullable<z.ZodString>;
77
+ previousKeyProven: z.ZodBoolean;
78
+ linkedAt: z.ZodString;
79
+ retiredAt: z.ZodNullable<z.ZodString>;
80
+ }, z.core.$strict>>;
81
+ }, z.core.$strict>;
82
+ export type OrganizationIdentityKeyState = z.infer<typeof organizationIdentityKeyStateSchema>;
@@ -221,6 +221,15 @@ export declare const userResponseSchema: z.ZodObject<{
221
221
  }, z.core.$strict>>;
222
222
  }, z.core.$loose>;
223
223
  export type UserResponse = z.infer<typeof userResponseSchema>;
224
+ export declare const pronounsSchema: z.ZodEnum<{
225
+ unspecified: "unspecified";
226
+ he_him: "he_him";
227
+ she_her: "she_her";
228
+ they_them: "they_them";
229
+ he_they: "he_they";
230
+ she_they: "she_they";
231
+ it_its: "it_its";
232
+ }>;
224
233
  export declare const userProfileUpdateSchema: z.ZodObject<{
225
234
  name: z.ZodOptional<z.ZodObject<{
226
235
  first: z.ZodOptional<z.ZodString>;
@@ -232,6 +241,15 @@ export declare const userProfileUpdateSchema: z.ZodObject<{
232
241
  avatar: z.ZodOptional<z.ZodString>;
233
242
  color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
234
243
  bio: z.ZodOptional<z.ZodString>;
244
+ pronouns: z.ZodOptional<z.ZodEnum<{
245
+ unspecified: "unspecified";
246
+ he_him: "he_him";
247
+ she_her: "she_her";
248
+ they_them: "they_them";
249
+ he_they: "he_they";
250
+ she_they: "she_they";
251
+ it_its: "it_its";
252
+ }>>;
235
253
  description: z.ZodOptional<z.ZodString>;
236
254
  phone: z.ZodOptional<z.ZodString>;
237
255
  address: z.ZodOptional<z.ZodString>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxy.so/contracts",
3
- "version": "6.10.0",
3
+ "version": "6.12.0",
4
4
  "description": "OxyHQ API contracts — single source of truth for request/response Zod schemas and inferred types, shared by the backend and the client SDKs",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",