@hackfed/schemas 0.2.0 → 0.4.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.
@@ -28,6 +28,12 @@ export declare const DirectoryOrgSchema: z.ZodObject<{
28
28
  }, z.core.$strict>>;
29
29
  name: z.ZodString;
30
30
  orgId: z.ZodString;
31
+ phonebooks: z.ZodArray<z.ZodObject<{
32
+ format: z.ZodEnum<{
33
+ hackfed: "hackfed";
34
+ }>;
35
+ url: z.ZodURL;
36
+ }, z.core.$strict>>;
31
37
  }, z.core.$strict>;
32
38
  export declare const TelephonyDirectorySchema: z.ZodObject<{
33
39
  orgs: z.ZodArray<z.ZodObject<{
@@ -46,6 +52,12 @@ export declare const TelephonyDirectorySchema: z.ZodObject<{
46
52
  }, z.core.$strict>>;
47
53
  name: z.ZodString;
48
54
  orgId: z.ZodString;
55
+ phonebooks: z.ZodArray<z.ZodObject<{
56
+ format: z.ZodEnum<{
57
+ hackfed: "hackfed";
58
+ }>;
59
+ url: z.ZodURL;
60
+ }, z.core.$strict>>;
49
61
  }, z.core.$strict>>;
50
62
  }, z.core.$strip>;
51
63
  export type TelephonyDirectory = z.infer<typeof TelephonyDirectorySchema>;
@@ -68,5 +80,11 @@ export declare const __schemas: z.ZodObject<{
68
80
  }, z.core.$strict>>;
69
81
  name: z.ZodString;
70
82
  orgId: z.ZodString;
83
+ phonebooks: z.ZodArray<z.ZodObject<{
84
+ format: z.ZodEnum<{
85
+ hackfed: "hackfed";
86
+ }>;
87
+ url: z.ZodURL;
88
+ }, z.core.$strict>>;
71
89
  }, z.core.$strict>>;
72
90
  }, z.core.$strip>[];
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { OrganizationIdSchema } from '../base/organization-id';
3
+ import { PhonebookSchema } from '../service/telephony';
3
4
  export const DirectoryExchangeSchema = z
4
5
  .object({
5
6
  codecs: z
@@ -18,11 +19,12 @@ export const DirectoryExchangeSchema = z
18
19
  .strict();
19
20
  export const DirectoryOrgSchema = z
20
21
  .object({
21
- exchanges: z
22
- .array(DirectoryExchangeSchema)
22
+ exchanges: DirectoryExchangeSchema
23
+ .array()
23
24
  .describe('List of telephony exchanges for the organization'),
24
25
  name: z.string().describe('Name of the organization'),
25
26
  orgId: OrganizationIdSchema.describe('Unique identifier for the organization'),
27
+ phonebooks: PhonebookSchema.array().describe('Public phonebook URLs for the organization'),
26
28
  })
27
29
  .strict();
28
30
  export const TelephonyDirectorySchema = z
@@ -27,7 +27,7 @@ export declare const OrganizationSchema: z.ZodObject<{
27
27
  }, z.core.$strict>>;
28
28
  nebula: z.ZodOptional<z.ZodArray<z.ZodObject<{
29
29
  address: z.ZodString;
30
- certificates: z.ZodOptional<z.ZodArray<z.ZodString>>;
30
+ certificates: z.ZodArray<z.ZodString>;
31
31
  lighthouse: z.ZodOptional<z.ZodObject<{
32
32
  enabled: z.ZodBoolean;
33
33
  endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -91,7 +91,7 @@ export declare const __schemas: z.ZodObject<{
91
91
  }, z.core.$strict>>;
92
92
  nebula: z.ZodOptional<z.ZodArray<z.ZodObject<{
93
93
  address: z.ZodString;
94
- certificates: z.ZodOptional<z.ZodArray<z.ZodString>>;
94
+ certificates: z.ZodArray<z.ZodString>;
95
95
  lighthouse: z.ZodOptional<z.ZodObject<{
96
96
  enabled: z.ZodBoolean;
97
97
  endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  export declare const NebulaNodeSchema: z.ZodObject<{
3
3
  address: z.ZodString;
4
- certificates: z.ZodOptional<z.ZodArray<z.ZodString>>;
4
+ certificates: z.ZodArray<z.ZodString>;
5
5
  lighthouse: z.ZodOptional<z.ZodObject<{
6
6
  enabled: z.ZodBoolean;
7
7
  endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -9,7 +9,7 @@ export declare const NebulaNodeSchema: z.ZodObject<{
9
9
  }, z.core.$strict>;
10
10
  export declare const NebulaServiceSchema: z.ZodArray<z.ZodObject<{
11
11
  address: z.ZodString;
12
- certificates: z.ZodOptional<z.ZodArray<z.ZodString>>;
12
+ certificates: z.ZodArray<z.ZodString>;
13
13
  lighthouse: z.ZodOptional<z.ZodObject<{
14
14
  enabled: z.ZodBoolean;
15
15
  endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -19,7 +19,7 @@ export type NebulaService = z.infer<typeof NebulaServiceSchema>;
19
19
  export type NebulaNode = z.infer<typeof NebulaNodeSchema>;
20
20
  export declare const __schemas: z.ZodArray<z.ZodObject<{
21
21
  address: z.ZodString;
22
- certificates: z.ZodOptional<z.ZodArray<z.ZodString>>;
22
+ certificates: z.ZodArray<z.ZodString>;
23
23
  lighthouse: z.ZodOptional<z.ZodObject<{
24
24
  enabled: z.ZodBoolean;
25
25
  endpoints: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -9,8 +9,7 @@ export const NebulaNodeSchema = z
9
9
  .regex(/^[a-f0-9]{64}$/)
10
10
  .describe('SHA-256 certificate fingerprint in hexadecimal'))
11
11
  .min(1)
12
- .describe('List of certificate fingerprints for the node')
13
- .optional(),
12
+ .describe('List of certificate fingerprints for the node'),
14
13
  lighthouse: z
15
14
  .object({
16
15
  enabled: z.boolean().describe('Whether this node acts as a lighthouse'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hackfed/schemas",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {