@hackfed/schemas 0.7.0 → 0.8.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
CHANGED
|
@@ -13,7 +13,7 @@ export declare const TelephonyDirectoryExchangeSchema: z.ZodObject<{
|
|
|
13
13
|
}>>;
|
|
14
14
|
endpoint: z.ZodString;
|
|
15
15
|
id: z.ZodString;
|
|
16
|
-
|
|
16
|
+
prefix: z.ZodE164;
|
|
17
17
|
protocol: z.ZodEnum<{
|
|
18
18
|
iax2: "iax2";
|
|
19
19
|
}>;
|
|
@@ -27,14 +27,14 @@ export declare const TelephonyDirectoryOrgSchema: z.ZodObject<{
|
|
|
27
27
|
}>>;
|
|
28
28
|
endpoint: z.ZodString;
|
|
29
29
|
id: z.ZodString;
|
|
30
|
-
|
|
30
|
+
prefix: z.ZodE164;
|
|
31
31
|
protocol: z.ZodEnum<{
|
|
32
32
|
iax2: "iax2";
|
|
33
33
|
}>;
|
|
34
34
|
}, z.core.$strip>>;
|
|
35
35
|
name: z.ZodString;
|
|
36
36
|
orgId: z.ZodString;
|
|
37
|
-
|
|
37
|
+
phonebook: z.ZodOptional<z.ZodObject<{
|
|
38
38
|
format: z.ZodEnum<{
|
|
39
39
|
hackfed: "hackfed";
|
|
40
40
|
}>;
|
|
@@ -51,14 +51,14 @@ export declare const TelephonyDirectorySchema: z.ZodObject<{
|
|
|
51
51
|
}>>;
|
|
52
52
|
endpoint: z.ZodString;
|
|
53
53
|
id: z.ZodString;
|
|
54
|
-
|
|
54
|
+
prefix: z.ZodE164;
|
|
55
55
|
protocol: z.ZodEnum<{
|
|
56
56
|
iax2: "iax2";
|
|
57
57
|
}>;
|
|
58
58
|
}, z.core.$strip>>;
|
|
59
59
|
name: z.ZodString;
|
|
60
60
|
orgId: z.ZodString;
|
|
61
|
-
|
|
61
|
+
phonebook: z.ZodOptional<z.ZodObject<{
|
|
62
62
|
format: z.ZodEnum<{
|
|
63
63
|
hackfed: "hackfed";
|
|
64
64
|
}>;
|
|
@@ -20,9 +20,7 @@ export const TelephonyDirectoryExchangeSchema = z
|
|
|
20
20
|
.string()
|
|
21
21
|
.describe('Network address and port of the exchange (e.g., [IPv6]:port or IPv4:port)'),
|
|
22
22
|
id: z.string().describe('Unique exchange identifier within the organization'),
|
|
23
|
-
|
|
24
|
-
.array(z.e164().describe('Telephony number prefix (e.g., country or area code)'))
|
|
25
|
-
.describe('Telephony number prefixes allocated to the organization for this exchange'),
|
|
23
|
+
prefix: z.e164().describe('Telephony number prefix allocated to this exchange'),
|
|
26
24
|
protocol: z.enum(['iax2']).describe('Telephony protocol used by the exchange'),
|
|
27
25
|
})
|
|
28
26
|
.meta({
|
|
@@ -37,7 +35,7 @@ export const TelephonyDirectoryOrgSchema = z
|
|
|
37
35
|
.describe('List of telephony exchanges for the organization'),
|
|
38
36
|
name: z.string().describe('Name of the organization'),
|
|
39
37
|
orgId: OrganizationIdSchema.describe('Unique identifier for the organization'),
|
|
40
|
-
|
|
38
|
+
phonebook: TelephonyDirectoryPhonebookSchema.optional().describe('Public phonebook for the organization'),
|
|
41
39
|
})
|
|
42
40
|
.meta({
|
|
43
41
|
description: 'Information about an organization participating in Hackfed Telephony Network.',
|
|
@@ -42,22 +42,17 @@ export declare const OrganizationSchema: z.ZodObject<{
|
|
|
42
42
|
ulaw: "ulaw";
|
|
43
43
|
}>>;
|
|
44
44
|
id: z.ZodString;
|
|
45
|
+
prefix: z.ZodE164;
|
|
45
46
|
protocol: z.ZodEnum<{
|
|
46
47
|
iax2: "iax2";
|
|
47
48
|
}>;
|
|
48
49
|
}, z.core.$strict>>>;
|
|
49
|
-
phonebook: z.ZodOptional<z.
|
|
50
|
+
phonebook: z.ZodOptional<z.ZodObject<{
|
|
50
51
|
format: z.ZodEnum<{
|
|
51
52
|
hackfed: "hackfed";
|
|
52
53
|
}>;
|
|
53
54
|
url: z.ZodURL;
|
|
54
|
-
}, z.core.$strict
|
|
55
|
-
prefixes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
56
|
-
description: z.ZodOptional<z.ZodString>;
|
|
57
|
-
exchange: z.ZodString;
|
|
58
|
-
id: z.ZodString;
|
|
59
|
-
prefix: z.ZodE164;
|
|
60
|
-
}, z.core.$strict>>>;
|
|
55
|
+
}, z.core.$strict>>;
|
|
61
56
|
}, z.core.$strict>>;
|
|
62
57
|
}, z.core.$strip>>;
|
|
63
58
|
}, z.core.$strict>;
|
|
@@ -7,16 +7,11 @@ export declare const TelephonyServiceExchangeSchema: z.ZodObject<{
|
|
|
7
7
|
ulaw: "ulaw";
|
|
8
8
|
}>>;
|
|
9
9
|
id: z.ZodString;
|
|
10
|
+
prefix: z.ZodE164;
|
|
10
11
|
protocol: z.ZodEnum<{
|
|
11
12
|
iax2: "iax2";
|
|
12
13
|
}>;
|
|
13
14
|
}, z.core.$strict>;
|
|
14
|
-
export declare const TelephonyServicePrefixSchema: z.ZodObject<{
|
|
15
|
-
description: z.ZodOptional<z.ZodString>;
|
|
16
|
-
exchange: z.ZodString;
|
|
17
|
-
id: z.ZodString;
|
|
18
|
-
prefix: z.ZodE164;
|
|
19
|
-
}, z.core.$strict>;
|
|
20
15
|
export declare const TelephonyServicePhonebookSchema: z.ZodObject<{
|
|
21
16
|
format: z.ZodEnum<{
|
|
22
17
|
hackfed: "hackfed";
|
|
@@ -32,24 +27,18 @@ export declare const TelephonyServiceSchema: z.ZodObject<{
|
|
|
32
27
|
ulaw: "ulaw";
|
|
33
28
|
}>>;
|
|
34
29
|
id: z.ZodString;
|
|
30
|
+
prefix: z.ZodE164;
|
|
35
31
|
protocol: z.ZodEnum<{
|
|
36
32
|
iax2: "iax2";
|
|
37
33
|
}>;
|
|
38
34
|
}, z.core.$strict>>>;
|
|
39
|
-
phonebook: z.ZodOptional<z.
|
|
35
|
+
phonebook: z.ZodOptional<z.ZodObject<{
|
|
40
36
|
format: z.ZodEnum<{
|
|
41
37
|
hackfed: "hackfed";
|
|
42
38
|
}>;
|
|
43
39
|
url: z.ZodURL;
|
|
44
|
-
}, z.core.$strict
|
|
45
|
-
prefixes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
46
|
-
description: z.ZodOptional<z.ZodString>;
|
|
47
|
-
exchange: z.ZodString;
|
|
48
|
-
id: z.ZodString;
|
|
49
|
-
prefix: z.ZodE164;
|
|
50
|
-
}, z.core.$strict>>>;
|
|
40
|
+
}, z.core.$strict>>;
|
|
51
41
|
}, z.core.$strict>;
|
|
52
42
|
export type TelephonyService = z.infer<typeof TelephonyServiceSchema>;
|
|
53
43
|
export type TelephonyServiceExchange = z.infer<typeof TelephonyServiceExchangeSchema>;
|
|
54
|
-
export type TelephonyServicePrefix = z.infer<typeof TelephonyServicePrefixSchema>;
|
|
55
44
|
export type TelephonyServicePhonebook = z.infer<typeof TelephonyServicePhonebookSchema>;
|
|
@@ -9,15 +9,8 @@ export const TelephonyServiceExchangeSchema = z
|
|
|
9
9
|
.min(1)
|
|
10
10
|
.describe('Supported audio codecs'),
|
|
11
11
|
id: z.string().describe('Unique identifier for the exchange'),
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
.strict();
|
|
15
|
-
export const TelephonyServicePrefixSchema = z
|
|
16
|
-
.object({
|
|
17
|
-
description: z.string().describe('Human-readable description of the prefix').optional(),
|
|
18
|
-
exchange: z.string().describe('Reference to the exchange ID handling this prefix'),
|
|
19
|
-
id: z.string().describe('Unique identifier for the prefix'),
|
|
20
|
-
prefix: z.e164().describe('Numeric prefix for phone numbers'),
|
|
12
|
+
prefix: z.e164().describe('Numeric prefix used to route calls to this exchange'),
|
|
13
|
+
protocol: z.enum(['iax2']).describe('Telephony protocol used by the exchange')
|
|
21
14
|
})
|
|
22
15
|
.strict();
|
|
23
16
|
export const TelephonyServicePhonebookSchema = z
|
|
@@ -29,11 +22,7 @@ export const TelephonyServicePhonebookSchema = z
|
|
|
29
22
|
export const TelephonyServiceSchema = z
|
|
30
23
|
.object({
|
|
31
24
|
exchanges: z.array(TelephonyServiceExchangeSchema).describe('List of telephony exchanges').optional(),
|
|
32
|
-
phonebook:
|
|
33
|
-
prefixes: z
|
|
34
|
-
.array(TelephonyServicePrefixSchema)
|
|
35
|
-
.describe('Telephony number prefixes allocated to the organization')
|
|
36
|
-
.optional(),
|
|
25
|
+
phonebook: TelephonyServicePhonebookSchema.describe('Phonebook').optional(),
|
|
37
26
|
})
|
|
38
27
|
.strict()
|
|
39
28
|
.meta({
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hackfed/schemas",
|
|
3
|
-
"
|
|
3
|
+
"description": "Resource Definition Schemas for Hackfed",
|
|
4
|
+
"version": "0.8.0",
|
|
4
5
|
"license": "MIT",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"repository": {
|
|
@@ -16,7 +17,7 @@
|
|
|
16
17
|
"files": [
|
|
17
18
|
"dist",
|
|
18
19
|
"LICENSE",
|
|
19
|
-
"README"
|
|
20
|
+
"README.md"
|
|
20
21
|
],
|
|
21
22
|
"devDependencies": {
|
|
22
23
|
"@bksp/style-guide": "^1.2.6",
|