@routr/common 2.0.8-alpha.13 → 2.0.8-alpha.14
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/connect/schemas/acl.d.ts +60 -0
- package/dist/connect/schemas/acl.js +79 -0
- package/dist/connect/schemas/agent.d.ts +59 -0
- package/dist/connect/schemas/agent.js +78 -0
- package/dist/connect/schemas/crendentials.d.ts +54 -0
- package/dist/connect/schemas/crendentials.js +73 -0
- package/dist/connect/schemas/domain.d.ts +72 -0
- package/dist/connect/schemas/domain.js +91 -0
- package/dist/connect/schemas/index.d.ts +1 -0
- package/dist/connect/schemas/index.js +35 -0
- package/dist/connect/schemas/number.d.ts +77 -0
- package/dist/connect/schemas/number.js +96 -0
- package/dist/connect/schemas/peer.d.ts +67 -0
- package/dist/connect/schemas/peer.js +86 -0
- package/dist/connect/schemas/trunk.d.ts +113 -0
- package/dist/connect/schemas/trunk.js +132 -0
- package/dist/connect/schemas/validators.d.ts +2 -0
- package/dist/connect/schemas/validators.js +43 -0
- package/dist/connect/types.d.ts +2 -2
- package/dist/connect/types.js +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- package/package.json +2 -2
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
$id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
type: string;
|
|
6
|
+
properties: {
|
|
7
|
+
apiVersion: {
|
|
8
|
+
enum: string[];
|
|
9
|
+
};
|
|
10
|
+
kind: {
|
|
11
|
+
enum: string[];
|
|
12
|
+
};
|
|
13
|
+
ref: {
|
|
14
|
+
description: string;
|
|
15
|
+
type: string;
|
|
16
|
+
};
|
|
17
|
+
metadata: {
|
|
18
|
+
description: string;
|
|
19
|
+
type: string;
|
|
20
|
+
properties: {
|
|
21
|
+
name: {
|
|
22
|
+
description: string;
|
|
23
|
+
type: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
spec: {
|
|
28
|
+
description: string;
|
|
29
|
+
type: string;
|
|
30
|
+
properties: {
|
|
31
|
+
accessControlList: {
|
|
32
|
+
description: string;
|
|
33
|
+
type: string;
|
|
34
|
+
properties: {
|
|
35
|
+
allow: {
|
|
36
|
+
description: string;
|
|
37
|
+
type: string;
|
|
38
|
+
items: {
|
|
39
|
+
type: string;
|
|
40
|
+
};
|
|
41
|
+
minItems: number;
|
|
42
|
+
uniqueItems: boolean;
|
|
43
|
+
};
|
|
44
|
+
deny: {
|
|
45
|
+
description: string;
|
|
46
|
+
type: string;
|
|
47
|
+
items: {
|
|
48
|
+
type: string;
|
|
49
|
+
};
|
|
50
|
+
minItems: number;
|
|
51
|
+
uniqueItems: boolean;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
required: string[];
|
|
59
|
+
};
|
|
60
|
+
export default _default;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (C) 2022 by Fonoster Inc (https://fonoster.com)
|
|
5
|
+
* http://github.com/fonoster
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Routr.
|
|
8
|
+
*
|
|
9
|
+
* Licensed under the MIT License (the "License");
|
|
10
|
+
* you may not use this file except in compliance with
|
|
11
|
+
* the License. You may obtain a copy of the License at
|
|
12
|
+
*
|
|
13
|
+
* https://opensource.org/licenses/MIT
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
|
+
*/
|
|
21
|
+
exports.default = {
|
|
22
|
+
$id: "https://json-schema.org/draft/2020-12/schema",
|
|
23
|
+
title: "Location Service configuration",
|
|
24
|
+
description: "Access Control List for Domains and Trunks",
|
|
25
|
+
type: "object",
|
|
26
|
+
properties: {
|
|
27
|
+
apiVersion: {
|
|
28
|
+
enum: ["v2draft1", "v2.0", "v2"]
|
|
29
|
+
},
|
|
30
|
+
kind: {
|
|
31
|
+
enum: ["AccessControlList", "accesscontrolList"]
|
|
32
|
+
},
|
|
33
|
+
ref: {
|
|
34
|
+
description: "Unique identifier for this resource",
|
|
35
|
+
type: "string"
|
|
36
|
+
},
|
|
37
|
+
metadata: {
|
|
38
|
+
description: "Resource metadata",
|
|
39
|
+
type: "object",
|
|
40
|
+
properties: {
|
|
41
|
+
name: {
|
|
42
|
+
description: "Resource's friendly name",
|
|
43
|
+
type: "string"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
spec: {
|
|
48
|
+
description: "Operations spec for ACL",
|
|
49
|
+
type: "object",
|
|
50
|
+
properties: {
|
|
51
|
+
accessControlList: {
|
|
52
|
+
description: "An object with deny and allow list of access control rules",
|
|
53
|
+
type: "object",
|
|
54
|
+
properties: {
|
|
55
|
+
allow: {
|
|
56
|
+
description: "Allowed list of access control rules",
|
|
57
|
+
type: "array",
|
|
58
|
+
items: {
|
|
59
|
+
type: "string"
|
|
60
|
+
},
|
|
61
|
+
minItems: 1,
|
|
62
|
+
uniqueItems: true
|
|
63
|
+
},
|
|
64
|
+
deny: {
|
|
65
|
+
description: "Denied list of access control rules",
|
|
66
|
+
type: "array",
|
|
67
|
+
items: {
|
|
68
|
+
type: "string"
|
|
69
|
+
},
|
|
70
|
+
minItems: 1,
|
|
71
|
+
uniqueItems: true
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
required: ["apiVersion", "kind", "ref", "metadata", "spec"]
|
|
79
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
$id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
type: string;
|
|
6
|
+
properties: {
|
|
7
|
+
apiVersion: {
|
|
8
|
+
enum: string[];
|
|
9
|
+
};
|
|
10
|
+
kind: {
|
|
11
|
+
enum: string[];
|
|
12
|
+
};
|
|
13
|
+
ref: {
|
|
14
|
+
description: string;
|
|
15
|
+
type: string;
|
|
16
|
+
};
|
|
17
|
+
metadata: {
|
|
18
|
+
description: string;
|
|
19
|
+
type: string;
|
|
20
|
+
properties: {
|
|
21
|
+
name: {
|
|
22
|
+
description: string;
|
|
23
|
+
type: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
spec: {
|
|
28
|
+
description: string;
|
|
29
|
+
type: string;
|
|
30
|
+
properties: {
|
|
31
|
+
username: {
|
|
32
|
+
description: string;
|
|
33
|
+
type: string;
|
|
34
|
+
minLength: number;
|
|
35
|
+
maxLength: number;
|
|
36
|
+
readOnly: boolean;
|
|
37
|
+
};
|
|
38
|
+
domainRef: {
|
|
39
|
+
description: string;
|
|
40
|
+
type: string;
|
|
41
|
+
};
|
|
42
|
+
credentialsRef: {
|
|
43
|
+
description: string;
|
|
44
|
+
type: string;
|
|
45
|
+
};
|
|
46
|
+
enabled: {
|
|
47
|
+
description: string;
|
|
48
|
+
type: string;
|
|
49
|
+
};
|
|
50
|
+
privacy: {
|
|
51
|
+
enum: string[];
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
required: string[];
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
required: string[];
|
|
58
|
+
};
|
|
59
|
+
export default _default;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (C) 2022 by Fonoster Inc (https://fonoster.com)
|
|
5
|
+
* http://github.com/fonoster
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Routr.
|
|
8
|
+
*
|
|
9
|
+
* Licensed under the MIT License (the "License");
|
|
10
|
+
* you may not use this file except in compliance with
|
|
11
|
+
* the License. You may obtain a copy of the License at
|
|
12
|
+
*
|
|
13
|
+
* https://opensource.org/licenses/MIT
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
|
+
*/
|
|
21
|
+
exports.default = {
|
|
22
|
+
$id: "https://json-schema.org/draft/2020-12/schema",
|
|
23
|
+
title: "Agent validation schema",
|
|
24
|
+
description: "The spec defined for Agent validation",
|
|
25
|
+
type: "object",
|
|
26
|
+
properties: {
|
|
27
|
+
apiVersion: {
|
|
28
|
+
enum: ["v2draft1", "v2.0", "v2"]
|
|
29
|
+
},
|
|
30
|
+
kind: {
|
|
31
|
+
enum: ["Agent", "agent"]
|
|
32
|
+
},
|
|
33
|
+
ref: {
|
|
34
|
+
description: "Reference to the resource",
|
|
35
|
+
type: "string"
|
|
36
|
+
},
|
|
37
|
+
metadata: {
|
|
38
|
+
description: "Resource metadata",
|
|
39
|
+
type: "object",
|
|
40
|
+
properties: {
|
|
41
|
+
name: {
|
|
42
|
+
description: "Resource's friendly name",
|
|
43
|
+
type: "string"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
spec: {
|
|
48
|
+
description: "Operations spec for an Agent",
|
|
49
|
+
type: "object",
|
|
50
|
+
properties: {
|
|
51
|
+
username: {
|
|
52
|
+
description: "The username for the Agent",
|
|
53
|
+
type: "string",
|
|
54
|
+
minLength: 3,
|
|
55
|
+
maxLength: 60,
|
|
56
|
+
readOnly: true
|
|
57
|
+
},
|
|
58
|
+
domainRef: {
|
|
59
|
+
description: "The domain the Agent belongs to",
|
|
60
|
+
type: "string"
|
|
61
|
+
},
|
|
62
|
+
credentialsRef: {
|
|
63
|
+
description: "The credential the Agent uses to authenticate",
|
|
64
|
+
type: "string"
|
|
65
|
+
},
|
|
66
|
+
enabled: {
|
|
67
|
+
description: "Whether the Agent is enabled",
|
|
68
|
+
type: "boolean"
|
|
69
|
+
},
|
|
70
|
+
privacy: {
|
|
71
|
+
enum: ["Private", "None", "private", "none"]
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
required: ["username", "domainRef", "credentialsRef"]
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
required: ["apiVersion", "kind", "ref", "metadata", "spec"]
|
|
78
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
$id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
type: string;
|
|
6
|
+
properties: {
|
|
7
|
+
apiVersion: {
|
|
8
|
+
enum: string[];
|
|
9
|
+
};
|
|
10
|
+
kind: {
|
|
11
|
+
enum: string[];
|
|
12
|
+
};
|
|
13
|
+
ref: {
|
|
14
|
+
description: string;
|
|
15
|
+
type: string;
|
|
16
|
+
};
|
|
17
|
+
metadata: {
|
|
18
|
+
description: string;
|
|
19
|
+
type: string;
|
|
20
|
+
properties: {
|
|
21
|
+
name: {
|
|
22
|
+
description: string;
|
|
23
|
+
type: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
spec: {
|
|
28
|
+
description: string;
|
|
29
|
+
type: string;
|
|
30
|
+
properties: {
|
|
31
|
+
credentials: {
|
|
32
|
+
description: string;
|
|
33
|
+
type: string;
|
|
34
|
+
properties: {
|
|
35
|
+
username: {
|
|
36
|
+
description: string;
|
|
37
|
+
type: string;
|
|
38
|
+
readOnly: boolean;
|
|
39
|
+
};
|
|
40
|
+
password: {
|
|
41
|
+
description: string;
|
|
42
|
+
type: string;
|
|
43
|
+
writeOnly: boolean;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
required: string[];
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
required: string[];
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
required: string[];
|
|
53
|
+
};
|
|
54
|
+
export default _default;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (C) 2022 by Fonoster Inc (https://fonoster.com)
|
|
5
|
+
* http://github.com/fonoster
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Routr.
|
|
8
|
+
*
|
|
9
|
+
* Licensed under the MIT License (the "License");
|
|
10
|
+
* you may not use this file except in compliance with
|
|
11
|
+
* the License. You may obtain a copy of the License at
|
|
12
|
+
*
|
|
13
|
+
* https://opensource.org/licenses/MIT
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
|
+
*/
|
|
21
|
+
exports.default = {
|
|
22
|
+
$id: "https://json-schema.org/draft/2020-12/schema",
|
|
23
|
+
title: "Credentials Schema",
|
|
24
|
+
description: "Credentials resource for Agents and Trunks",
|
|
25
|
+
type: "object",
|
|
26
|
+
properties: {
|
|
27
|
+
apiVersion: {
|
|
28
|
+
enum: ["v2draft1", "v2.0", "v2"]
|
|
29
|
+
},
|
|
30
|
+
kind: {
|
|
31
|
+
enum: ["Credentials", "credentials"]
|
|
32
|
+
},
|
|
33
|
+
ref: {
|
|
34
|
+
description: "Reference to the resource",
|
|
35
|
+
type: "string"
|
|
36
|
+
},
|
|
37
|
+
metadata: {
|
|
38
|
+
description: "Resource metadata",
|
|
39
|
+
type: "object",
|
|
40
|
+
properties: {
|
|
41
|
+
name: {
|
|
42
|
+
description: "Resource's friendly name",
|
|
43
|
+
type: "string"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
spec: {
|
|
48
|
+
description: "Operations spec for Credentials",
|
|
49
|
+
type: "object",
|
|
50
|
+
properties: {
|
|
51
|
+
credentials: {
|
|
52
|
+
description: "Credential configuration",
|
|
53
|
+
type: "object",
|
|
54
|
+
properties: {
|
|
55
|
+
username: {
|
|
56
|
+
description: "Username",
|
|
57
|
+
type: "string",
|
|
58
|
+
readOnly: true
|
|
59
|
+
},
|
|
60
|
+
password: {
|
|
61
|
+
description: "Password",
|
|
62
|
+
type: "string",
|
|
63
|
+
writeOnly: true
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
required: ["username", "password"]
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
required: ["credentials"]
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
required: ["apiVersion", "kind", "ref", "metadata", "spec"]
|
|
73
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
$id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
type: string;
|
|
6
|
+
properties: {
|
|
7
|
+
apiVersion: {
|
|
8
|
+
enum: string[];
|
|
9
|
+
};
|
|
10
|
+
kind: {
|
|
11
|
+
enum: string[];
|
|
12
|
+
};
|
|
13
|
+
ref: {
|
|
14
|
+
description: string;
|
|
15
|
+
type: string;
|
|
16
|
+
};
|
|
17
|
+
metadata: {
|
|
18
|
+
description: string;
|
|
19
|
+
type: string;
|
|
20
|
+
properties: {
|
|
21
|
+
name: {
|
|
22
|
+
description: string;
|
|
23
|
+
type: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
spec: {
|
|
28
|
+
description: string;
|
|
29
|
+
type: string;
|
|
30
|
+
properties: {
|
|
31
|
+
context: {
|
|
32
|
+
description: string;
|
|
33
|
+
type: string;
|
|
34
|
+
properties: {
|
|
35
|
+
domainUri: {
|
|
36
|
+
description: string;
|
|
37
|
+
type: string;
|
|
38
|
+
minLength: number;
|
|
39
|
+
maxLength: number;
|
|
40
|
+
};
|
|
41
|
+
accessControlListRef: {
|
|
42
|
+
description: string;
|
|
43
|
+
type: string;
|
|
44
|
+
};
|
|
45
|
+
egressPolicy: {
|
|
46
|
+
description: string;
|
|
47
|
+
type: string;
|
|
48
|
+
items: {
|
|
49
|
+
type: string;
|
|
50
|
+
properties: {
|
|
51
|
+
rule: {
|
|
52
|
+
description: string;
|
|
53
|
+
type: string;
|
|
54
|
+
minLength: number;
|
|
55
|
+
};
|
|
56
|
+
numberRef: {
|
|
57
|
+
description: string;
|
|
58
|
+
type: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
required: string[];
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
required: string[];
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
required: string[];
|
|
71
|
+
};
|
|
72
|
+
export default _default;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (C) 2022 by Fonoster Inc (https://fonoster.com)
|
|
5
|
+
* http://github.com/fonoster
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Routr.
|
|
8
|
+
*
|
|
9
|
+
* Licensed under the MIT License (the "License");
|
|
10
|
+
* you may not use this file except in compliance with
|
|
11
|
+
* the License. You may obtain a copy of the License at
|
|
12
|
+
*
|
|
13
|
+
* https://opensource.org/licenses/MIT
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
|
+
*/
|
|
21
|
+
exports.default = {
|
|
22
|
+
$id: "https://json-schema.org/draft/2020-12/schema",
|
|
23
|
+
title: "Domain validation schema",
|
|
24
|
+
description: "The spec defined for Domain validation",
|
|
25
|
+
type: "object",
|
|
26
|
+
properties: {
|
|
27
|
+
apiVersion: {
|
|
28
|
+
enum: ["v2draft1", "v2.0", "v2"]
|
|
29
|
+
},
|
|
30
|
+
kind: {
|
|
31
|
+
enum: ["Domain", "domain"]
|
|
32
|
+
},
|
|
33
|
+
ref: {
|
|
34
|
+
description: "Reference to the resource",
|
|
35
|
+
type: "string"
|
|
36
|
+
},
|
|
37
|
+
metadata: {
|
|
38
|
+
description: "Resource metadata",
|
|
39
|
+
type: "object",
|
|
40
|
+
properties: {
|
|
41
|
+
name: {
|
|
42
|
+
description: "Resource's friendly name",
|
|
43
|
+
type: "string"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
spec: {
|
|
48
|
+
description: "Operations spec for an Domain",
|
|
49
|
+
type: "object",
|
|
50
|
+
properties: {
|
|
51
|
+
context: {
|
|
52
|
+
description: "The username for the Domain",
|
|
53
|
+
type: "object",
|
|
54
|
+
properties: {
|
|
55
|
+
domainUri: {
|
|
56
|
+
description: "The URI of the Domain",
|
|
57
|
+
type: "string",
|
|
58
|
+
minLength: 3,
|
|
59
|
+
maxLength: 255
|
|
60
|
+
},
|
|
61
|
+
accessControlListRef: {
|
|
62
|
+
description: "The reference to the AccessControlList",
|
|
63
|
+
type: "string"
|
|
64
|
+
},
|
|
65
|
+
egressPolicy: {
|
|
66
|
+
description: "The egress policy for the Domain",
|
|
67
|
+
type: "array",
|
|
68
|
+
items: {
|
|
69
|
+
type: "object",
|
|
70
|
+
properties: {
|
|
71
|
+
rule: {
|
|
72
|
+
description: "The rule for the egress policy",
|
|
73
|
+
type: "string",
|
|
74
|
+
minLength: 1
|
|
75
|
+
},
|
|
76
|
+
numberRef: {
|
|
77
|
+
description: "The reference to the number",
|
|
78
|
+
type: "string"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
required: ["rule", "numberRef"]
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
required: ["domainUri"]
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
required: ["apiVersion", "kind", "ref", "metadata", "spec"]
|
|
91
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./validators";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
/*
|
|
18
|
+
* Copyright (C) 2022 by Fonoster Inc (https://fonoster.com)
|
|
19
|
+
* http://github.com/fonoster
|
|
20
|
+
*
|
|
21
|
+
* This file is part of Routr.
|
|
22
|
+
*
|
|
23
|
+
* Licensed under the MIT License (the "License");
|
|
24
|
+
* you may not use this file except in compliance with
|
|
25
|
+
* the License. You may obtain a copy of the License at
|
|
26
|
+
*
|
|
27
|
+
* https://opensource.org/licenses/MIT
|
|
28
|
+
*
|
|
29
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
30
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
31
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
32
|
+
* See the License for the specific language governing permissions and
|
|
33
|
+
* limitations under the License.
|
|
34
|
+
*/
|
|
35
|
+
__exportStar(require("./validators"), exports);
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
$id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
type: string;
|
|
6
|
+
properties: {
|
|
7
|
+
apiVersion: {
|
|
8
|
+
enum: string[];
|
|
9
|
+
};
|
|
10
|
+
kind: {
|
|
11
|
+
enum: string[];
|
|
12
|
+
};
|
|
13
|
+
ref: {
|
|
14
|
+
description: string;
|
|
15
|
+
type: string;
|
|
16
|
+
};
|
|
17
|
+
metadata: {
|
|
18
|
+
description: string;
|
|
19
|
+
type: string;
|
|
20
|
+
properties: {
|
|
21
|
+
name: {
|
|
22
|
+
description: string;
|
|
23
|
+
type: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
spec: {
|
|
28
|
+
description: string;
|
|
29
|
+
type: string;
|
|
30
|
+
properties: {
|
|
31
|
+
trunkRef: {
|
|
32
|
+
description: string;
|
|
33
|
+
type: string;
|
|
34
|
+
};
|
|
35
|
+
location: {
|
|
36
|
+
description: string;
|
|
37
|
+
type: string;
|
|
38
|
+
properties: {
|
|
39
|
+
telUrl: {
|
|
40
|
+
description: string;
|
|
41
|
+
type: string;
|
|
42
|
+
};
|
|
43
|
+
aorLink: {
|
|
44
|
+
description: string;
|
|
45
|
+
type: string;
|
|
46
|
+
};
|
|
47
|
+
sessionAffinityHeader: {
|
|
48
|
+
description: string;
|
|
49
|
+
type: string;
|
|
50
|
+
};
|
|
51
|
+
extraHeaders: {
|
|
52
|
+
description: string;
|
|
53
|
+
type: string;
|
|
54
|
+
items: {
|
|
55
|
+
type: string;
|
|
56
|
+
properties: {
|
|
57
|
+
name: {
|
|
58
|
+
description: string;
|
|
59
|
+
type: string;
|
|
60
|
+
};
|
|
61
|
+
value: {
|
|
62
|
+
description: string;
|
|
63
|
+
type: string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
required: string[];
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
required: string[];
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
required: string[];
|
|
76
|
+
};
|
|
77
|
+
export default _default;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (C) 2022 by Fonoster Inc (https://fonoster.com)
|
|
5
|
+
* http://github.com/fonoster
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Routr.
|
|
8
|
+
*
|
|
9
|
+
* Licensed under the MIT License (the "License");
|
|
10
|
+
* you may not use this file except in compliance with
|
|
11
|
+
* the License. You may obtain a copy of the License at
|
|
12
|
+
*
|
|
13
|
+
* https://opensource.org/licenses/MIT
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
|
+
*/
|
|
21
|
+
exports.default = {
|
|
22
|
+
$id: "https://json-schema.org/draft/2020-12/schema",
|
|
23
|
+
title: "Number Schema",
|
|
24
|
+
description: "A JSON Schema for validating numbers.",
|
|
25
|
+
type: "object",
|
|
26
|
+
properties: {
|
|
27
|
+
apiVersion: {
|
|
28
|
+
enum: ["v2draft1", "v2.0", "v2"]
|
|
29
|
+
},
|
|
30
|
+
kind: {
|
|
31
|
+
enum: ["Number", "number"]
|
|
32
|
+
},
|
|
33
|
+
ref: {
|
|
34
|
+
description: "Reference to the resource",
|
|
35
|
+
type: "string"
|
|
36
|
+
},
|
|
37
|
+
metadata: {
|
|
38
|
+
description: "Resource metadata",
|
|
39
|
+
type: "object",
|
|
40
|
+
properties: {
|
|
41
|
+
name: {
|
|
42
|
+
description: "Resource's friendly name",
|
|
43
|
+
type: "string"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
spec: {
|
|
48
|
+
description: "Operations spec for Numbers",
|
|
49
|
+
type: "object",
|
|
50
|
+
properties: {
|
|
51
|
+
trunkRef: {
|
|
52
|
+
description: "Reference to the trunk",
|
|
53
|
+
type: "string"
|
|
54
|
+
},
|
|
55
|
+
location: {
|
|
56
|
+
description: "Location of the number",
|
|
57
|
+
type: "object",
|
|
58
|
+
properties: {
|
|
59
|
+
telUrl: {
|
|
60
|
+
description: "Tel URL",
|
|
61
|
+
type: "string"
|
|
62
|
+
},
|
|
63
|
+
aorLink: {
|
|
64
|
+
description: "AOR link",
|
|
65
|
+
type: "string"
|
|
66
|
+
},
|
|
67
|
+
sessionAffinityHeader: {
|
|
68
|
+
description: "Session affinity",
|
|
69
|
+
type: "string"
|
|
70
|
+
},
|
|
71
|
+
extraHeaders: {
|
|
72
|
+
description: "Properties",
|
|
73
|
+
type: "array",
|
|
74
|
+
items: {
|
|
75
|
+
type: "object",
|
|
76
|
+
properties: {
|
|
77
|
+
name: {
|
|
78
|
+
description: "Name of the header",
|
|
79
|
+
type: "string"
|
|
80
|
+
},
|
|
81
|
+
value: {
|
|
82
|
+
description: "Value of the header",
|
|
83
|
+
type: "string"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
required: ["telUrl", "aorLink"]
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
required: ["trunkRef", "location"]
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
required: ["apiVersion", "kind", "ref", "metadata", "spec"]
|
|
96
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
$id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
type: string;
|
|
6
|
+
properties: {
|
|
7
|
+
apiVersion: {
|
|
8
|
+
enum: string[];
|
|
9
|
+
};
|
|
10
|
+
kind: {
|
|
11
|
+
enum: string[];
|
|
12
|
+
};
|
|
13
|
+
ref: {
|
|
14
|
+
description: string;
|
|
15
|
+
type: string;
|
|
16
|
+
};
|
|
17
|
+
metadata: {
|
|
18
|
+
description: string;
|
|
19
|
+
type: string;
|
|
20
|
+
properties: {
|
|
21
|
+
name: {
|
|
22
|
+
description: string;
|
|
23
|
+
type: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
spec: {
|
|
28
|
+
description: string;
|
|
29
|
+
type: string;
|
|
30
|
+
properties: {
|
|
31
|
+
username: {
|
|
32
|
+
description: string;
|
|
33
|
+
type: string;
|
|
34
|
+
minLength: number;
|
|
35
|
+
maxLength: number;
|
|
36
|
+
readOnly: boolean;
|
|
37
|
+
};
|
|
38
|
+
aor: {
|
|
39
|
+
description: string;
|
|
40
|
+
type: string;
|
|
41
|
+
minLength: number;
|
|
42
|
+
maxLength: number;
|
|
43
|
+
};
|
|
44
|
+
contactAddr: {
|
|
45
|
+
description: string;
|
|
46
|
+
type: string;
|
|
47
|
+
maxLength: number;
|
|
48
|
+
};
|
|
49
|
+
credentialsRef: {
|
|
50
|
+
description: string;
|
|
51
|
+
type: string;
|
|
52
|
+
};
|
|
53
|
+
accessControlListRef: {
|
|
54
|
+
description: string;
|
|
55
|
+
type: string;
|
|
56
|
+
};
|
|
57
|
+
enabled: {
|
|
58
|
+
description: string;
|
|
59
|
+
type: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
required: string[];
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
required: string[];
|
|
66
|
+
};
|
|
67
|
+
export default _default;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (C) 2022 by Fonoster Inc (https://fonoster.com)
|
|
5
|
+
* http://github.com/fonoster
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Routr.
|
|
8
|
+
*
|
|
9
|
+
* Licensed under the MIT License (the "License");
|
|
10
|
+
* you may not use this file except in compliance with
|
|
11
|
+
* the License. You may obtain a copy of the License at
|
|
12
|
+
*
|
|
13
|
+
* https://opensource.org/licenses/MIT
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
|
+
*/
|
|
21
|
+
exports.default = {
|
|
22
|
+
$id: "https://json-schema.org/draft/2020-12/schema",
|
|
23
|
+
title: "Agent validation schema",
|
|
24
|
+
description: "The spec defined for Peer validation",
|
|
25
|
+
type: "object",
|
|
26
|
+
properties: {
|
|
27
|
+
apiVersion: {
|
|
28
|
+
enum: ["v2draft1", "v2.0", "v2"]
|
|
29
|
+
},
|
|
30
|
+
kind: {
|
|
31
|
+
enum: ["Peer", "peer"]
|
|
32
|
+
},
|
|
33
|
+
ref: {
|
|
34
|
+
description: "Reference to the resource",
|
|
35
|
+
type: "string"
|
|
36
|
+
},
|
|
37
|
+
metadata: {
|
|
38
|
+
description: "Resource metadata",
|
|
39
|
+
type: "object",
|
|
40
|
+
properties: {
|
|
41
|
+
name: {
|
|
42
|
+
description: "Resource's friendly name",
|
|
43
|
+
type: "string"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
spec: {
|
|
48
|
+
description: "Operations spec for an Peer",
|
|
49
|
+
type: "object",
|
|
50
|
+
properties: {
|
|
51
|
+
username: {
|
|
52
|
+
description: "The username for the Peer",
|
|
53
|
+
type: "string",
|
|
54
|
+
minLength: 3,
|
|
55
|
+
maxLength: 60,
|
|
56
|
+
readOnly: true
|
|
57
|
+
},
|
|
58
|
+
aor: {
|
|
59
|
+
description: "Address of the Peer (acceptable schemas are sip, backend.)",
|
|
60
|
+
type: "string",
|
|
61
|
+
minLength: 3,
|
|
62
|
+
maxLength: 255
|
|
63
|
+
},
|
|
64
|
+
contactAddr: {
|
|
65
|
+
description: "Contact address of the Peer",
|
|
66
|
+
type: "string",
|
|
67
|
+
maxLength: 255
|
|
68
|
+
},
|
|
69
|
+
credentialsRef: {
|
|
70
|
+
description: "The credential the Peer uses to authenticate",
|
|
71
|
+
type: "string"
|
|
72
|
+
},
|
|
73
|
+
accessControlListRef: {
|
|
74
|
+
description: "The ACL the Peer uses to control access to the Peer (Reserved for future use)",
|
|
75
|
+
type: "string"
|
|
76
|
+
},
|
|
77
|
+
enabled: {
|
|
78
|
+
description: "Whether the Peer is enabled",
|
|
79
|
+
type: "boolean"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
required: ["username", "aor"]
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
required: ["apiVersion", "kind", "ref", "metadata", "spec"]
|
|
86
|
+
};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
$id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
type: string;
|
|
6
|
+
properties: {
|
|
7
|
+
apiVersion: {
|
|
8
|
+
enum: string[];
|
|
9
|
+
};
|
|
10
|
+
kind: {
|
|
11
|
+
enum: string[];
|
|
12
|
+
};
|
|
13
|
+
ref: {
|
|
14
|
+
description: string;
|
|
15
|
+
type: string;
|
|
16
|
+
};
|
|
17
|
+
metadata: {
|
|
18
|
+
description: string;
|
|
19
|
+
type: string;
|
|
20
|
+
properties: {
|
|
21
|
+
name: {
|
|
22
|
+
description: string;
|
|
23
|
+
type: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
spec: {
|
|
28
|
+
description: string;
|
|
29
|
+
type: string;
|
|
30
|
+
properties: {
|
|
31
|
+
inbound: {
|
|
32
|
+
description: string;
|
|
33
|
+
type: string;
|
|
34
|
+
properties: {
|
|
35
|
+
uri: {
|
|
36
|
+
description: string;
|
|
37
|
+
type: string;
|
|
38
|
+
};
|
|
39
|
+
accessControlListRef: {
|
|
40
|
+
description: string;
|
|
41
|
+
type: string;
|
|
42
|
+
};
|
|
43
|
+
credentialsRef: {
|
|
44
|
+
description: string;
|
|
45
|
+
type: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
required: string[];
|
|
49
|
+
};
|
|
50
|
+
outbound: {
|
|
51
|
+
description: string;
|
|
52
|
+
type: string;
|
|
53
|
+
properties: {
|
|
54
|
+
sendRegister: {
|
|
55
|
+
description: string;
|
|
56
|
+
type: string;
|
|
57
|
+
};
|
|
58
|
+
credentialsRef: {
|
|
59
|
+
description: string;
|
|
60
|
+
type: string;
|
|
61
|
+
};
|
|
62
|
+
uris: {
|
|
63
|
+
description: string;
|
|
64
|
+
type: string;
|
|
65
|
+
items: {
|
|
66
|
+
type: string;
|
|
67
|
+
properties: {
|
|
68
|
+
uri: {
|
|
69
|
+
description: string;
|
|
70
|
+
type: string;
|
|
71
|
+
properties: {
|
|
72
|
+
host: {
|
|
73
|
+
description: string;
|
|
74
|
+
type: string;
|
|
75
|
+
};
|
|
76
|
+
port: {
|
|
77
|
+
description: string;
|
|
78
|
+
type: string;
|
|
79
|
+
};
|
|
80
|
+
transport: {
|
|
81
|
+
description: string;
|
|
82
|
+
enum: string[];
|
|
83
|
+
};
|
|
84
|
+
user: {
|
|
85
|
+
description: string;
|
|
86
|
+
type: string;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
weight: {
|
|
91
|
+
description: string;
|
|
92
|
+
type: string;
|
|
93
|
+
};
|
|
94
|
+
priority: {
|
|
95
|
+
description: string;
|
|
96
|
+
type: string;
|
|
97
|
+
};
|
|
98
|
+
enabled: {
|
|
99
|
+
description: string;
|
|
100
|
+
type: string;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
required: string[];
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
required: string[];
|
|
112
|
+
};
|
|
113
|
+
export default _default;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (C) 2022 by Fonoster Inc (https://fonoster.com)
|
|
5
|
+
* http://github.com/fonoster
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Routr.
|
|
8
|
+
*
|
|
9
|
+
* Licensed under the MIT License (the "License");
|
|
10
|
+
* you may not use this file except in compliance with
|
|
11
|
+
* the License. You may obtain a copy of the License at
|
|
12
|
+
*
|
|
13
|
+
* https://opensource.org/licenses/MIT
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
|
+
*/
|
|
21
|
+
exports.default = {
|
|
22
|
+
$id: "https://json-schema.org/draft/2020-12/schema",
|
|
23
|
+
title: "Agent validation schema",
|
|
24
|
+
description: "The spec defined for Peer validation",
|
|
25
|
+
type: "object",
|
|
26
|
+
properties: {
|
|
27
|
+
apiVersion: {
|
|
28
|
+
enum: ["v2draft1", "v2.0", "v2"]
|
|
29
|
+
},
|
|
30
|
+
kind: {
|
|
31
|
+
enum: ["Trunk", "trunk"]
|
|
32
|
+
},
|
|
33
|
+
ref: {
|
|
34
|
+
description: "Reference to the resource",
|
|
35
|
+
type: "string"
|
|
36
|
+
},
|
|
37
|
+
metadata: {
|
|
38
|
+
description: "Resource metadata",
|
|
39
|
+
type: "object",
|
|
40
|
+
properties: {
|
|
41
|
+
name: {
|
|
42
|
+
description: "Resource's friendly name",
|
|
43
|
+
type: "string"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
spec: {
|
|
48
|
+
description: "Operations spec for an Trunk",
|
|
49
|
+
type: "object",
|
|
50
|
+
properties: {
|
|
51
|
+
inbound: {
|
|
52
|
+
description: "Inbound configuration",
|
|
53
|
+
type: "object",
|
|
54
|
+
properties: {
|
|
55
|
+
uri: {
|
|
56
|
+
description: "URI of the inbound endpoint",
|
|
57
|
+
type: "string"
|
|
58
|
+
},
|
|
59
|
+
accessControlListRef: {
|
|
60
|
+
description: "Reference to the ACL to be used for inbound traffic",
|
|
61
|
+
type: "string"
|
|
62
|
+
},
|
|
63
|
+
credentialsRef: {
|
|
64
|
+
description: "Reference to the credentials to be used for inbound traffic",
|
|
65
|
+
type: "string"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
required: ["uri"]
|
|
69
|
+
},
|
|
70
|
+
outbound: {
|
|
71
|
+
description: "Outbound configuration",
|
|
72
|
+
type: "object",
|
|
73
|
+
properties: {
|
|
74
|
+
sendRegister: {
|
|
75
|
+
description: "Whether to send register messages",
|
|
76
|
+
type: "boolean"
|
|
77
|
+
},
|
|
78
|
+
credentialsRef: {
|
|
79
|
+
description: "Reference to the credentials to be used for outbound traffic",
|
|
80
|
+
type: "string"
|
|
81
|
+
},
|
|
82
|
+
uris: {
|
|
83
|
+
description: "List of URIs to be used for outbound traffic",
|
|
84
|
+
type: "array",
|
|
85
|
+
items: {
|
|
86
|
+
type: "object",
|
|
87
|
+
properties: {
|
|
88
|
+
uri: {
|
|
89
|
+
description: "URI to be used for outbound traffic",
|
|
90
|
+
type: "object",
|
|
91
|
+
properties: {
|
|
92
|
+
host: {
|
|
93
|
+
description: "Hostname of the URI",
|
|
94
|
+
type: "string"
|
|
95
|
+
},
|
|
96
|
+
port: {
|
|
97
|
+
description: "Port of the URI",
|
|
98
|
+
type: "integer"
|
|
99
|
+
},
|
|
100
|
+
transport: {
|
|
101
|
+
description: "Transport of the URI",
|
|
102
|
+
enum: ["tcp", "sctp", "udp", "tls", "ws", "wss"]
|
|
103
|
+
},
|
|
104
|
+
user: {
|
|
105
|
+
description: "Username of the URI",
|
|
106
|
+
type: "string"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
weight: {
|
|
111
|
+
description: "Weight of the URI",
|
|
112
|
+
type: "integer"
|
|
113
|
+
},
|
|
114
|
+
priority: {
|
|
115
|
+
description: "Priority of the URI",
|
|
116
|
+
type: "integer"
|
|
117
|
+
},
|
|
118
|
+
enabled: {
|
|
119
|
+
description: "Whether the URI is enabled",
|
|
120
|
+
type: "boolean"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
required: ["uris"]
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
required: ["apiVersion", "kind", "ref", "metadata", "spec"]
|
|
132
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.schemaValidators = void 0;
|
|
7
|
+
/*
|
|
8
|
+
* Copyright (C) 2022 by Fonoster Inc (https://fonoster.com)
|
|
9
|
+
* http://github.com/fonoster
|
|
10
|
+
*
|
|
11
|
+
* This file is part of Routr.
|
|
12
|
+
*
|
|
13
|
+
* Licensed under the MIT License (the "License");
|
|
14
|
+
* you may not use this file except in compliance with
|
|
15
|
+
* the License. You may obtain a copy of the License at
|
|
16
|
+
*
|
|
17
|
+
* https://opensource.org/licenses/MIT
|
|
18
|
+
*
|
|
19
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
20
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
21
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
22
|
+
* See the License for the specific language governing permissions and
|
|
23
|
+
* limitations under the License.
|
|
24
|
+
*/
|
|
25
|
+
const types_1 = require("../types");
|
|
26
|
+
const ajv_1 = __importDefault(require("ajv"));
|
|
27
|
+
const acl_1 = __importDefault(require("./acl"));
|
|
28
|
+
const agent_1 = __importDefault(require("./agent"));
|
|
29
|
+
const crendentials_1 = __importDefault(require("./crendentials"));
|
|
30
|
+
const domain_1 = __importDefault(require("./domain"));
|
|
31
|
+
const number_1 = __importDefault(require("./number"));
|
|
32
|
+
const peer_1 = __importDefault(require("./peer"));
|
|
33
|
+
const trunk_1 = __importDefault(require("./trunk"));
|
|
34
|
+
const validator = (schema) => new ajv_1.default().compile(schema);
|
|
35
|
+
const schemaValidators = new Map();
|
|
36
|
+
exports.schemaValidators = schemaValidators;
|
|
37
|
+
schemaValidators.set(types_1.Kind.ACL, validator(acl_1.default));
|
|
38
|
+
schemaValidators.set(types_1.Kind.AGENT, validator(agent_1.default));
|
|
39
|
+
schemaValidators.set(types_1.Kind.CREDENTIALS, validator(crendentials_1.default));
|
|
40
|
+
schemaValidators.set(types_1.Kind.DOMAIN, validator(domain_1.default));
|
|
41
|
+
schemaValidators.set(types_1.Kind.NUMBER, validator(number_1.default));
|
|
42
|
+
schemaValidators.set(types_1.Kind.PEER, validator(peer_1.default));
|
|
43
|
+
schemaValidators.set(types_1.Kind.TRUNK, validator(trunk_1.default));
|
package/dist/connect/types.d.ts
CHANGED
|
@@ -5,13 +5,13 @@ export declare enum Kind {
|
|
|
5
5
|
TRUNK = "trunk",
|
|
6
6
|
DOMAIN = "domain",
|
|
7
7
|
UNKNOWN = "unknown",
|
|
8
|
-
|
|
8
|
+
CREDENTIALS = "credentials",
|
|
9
9
|
ACL = "accesscontrollist"
|
|
10
10
|
}
|
|
11
11
|
export declare enum FindCriteria {
|
|
12
12
|
FIND_AGENT_BY_USERNAME = "find_agent_by_username",
|
|
13
13
|
FIND_PEER_BY_USERNAME = "find_peer_by_username",
|
|
14
|
-
|
|
14
|
+
FIND_CREDENTIALS_BY_REFERENCE = "find_credentials_by_reference",
|
|
15
15
|
FIND_DOMAIN_BY_DOMAINURI = "find_domain_by_domainuri",
|
|
16
16
|
FIND_NUMBER_BY_TELURL = "find_number_by_telurl",
|
|
17
17
|
FIND_TRUNKS_WITH_SEND_REGISTER = "find_trunks_with_send_register",
|
package/dist/connect/types.js
CHANGED
|
@@ -27,14 +27,14 @@ var Kind;
|
|
|
27
27
|
Kind["TRUNK"] = "trunk";
|
|
28
28
|
Kind["DOMAIN"] = "domain";
|
|
29
29
|
Kind["UNKNOWN"] = "unknown";
|
|
30
|
-
Kind["
|
|
30
|
+
Kind["CREDENTIALS"] = "credentials";
|
|
31
31
|
Kind["ACL"] = "accesscontrollist";
|
|
32
32
|
})(Kind = exports.Kind || (exports.Kind = {}));
|
|
33
33
|
var FindCriteria;
|
|
34
34
|
(function (FindCriteria) {
|
|
35
35
|
FindCriteria["FIND_AGENT_BY_USERNAME"] = "find_agent_by_username";
|
|
36
36
|
FindCriteria["FIND_PEER_BY_USERNAME"] = "find_peer_by_username";
|
|
37
|
-
FindCriteria["
|
|
37
|
+
FindCriteria["FIND_CREDENTIALS_BY_REFERENCE"] = "find_credentials_by_reference";
|
|
38
38
|
FindCriteria["FIND_DOMAIN_BY_DOMAINURI"] = "find_domain_by_domainuri";
|
|
39
39
|
FindCriteria["FIND_NUMBER_BY_TELURL"] = "find_number_by_telurl";
|
|
40
40
|
FindCriteria["FIND_TRUNKS_WITH_SEND_REGISTER"] = "find_trunks_with_send_register";
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.Auth = exports.CommonRequester = exports.CommonConnect = exports.Assertions = exports.Tracer = exports.IpUtils = exports.Helper = exports.CommonTypes = exports.Redis = exports.LOCATION_OBJECT_PROTO = exports.PROCESSOR_OBJECT_PROTO = exports.Method = exports.Transport = exports.ServiceUnavailableError = exports.getObjectProto = exports.createService = void 0;
|
|
26
|
+
exports.ConnectSchemas = exports.Auth = exports.CommonRequester = exports.CommonConnect = exports.Assertions = exports.Tracer = exports.IpUtils = exports.Helper = exports.CommonTypes = exports.Redis = exports.LOCATION_OBJECT_PROTO = exports.PROCESSOR_OBJECT_PROTO = exports.Method = exports.Transport = exports.ServiceUnavailableError = exports.getObjectProto = exports.createService = void 0;
|
|
27
27
|
/*
|
|
28
28
|
* Copyright (C) 2022 by Fonoster Inc (https://fonoster.com)
|
|
29
29
|
* http://github.com/fonoster/routr
|
|
@@ -61,3 +61,4 @@ exports.Assertions = __importStar(require("./assertions"));
|
|
|
61
61
|
exports.CommonConnect = __importStar(require("./connect"));
|
|
62
62
|
exports.CommonRequester = __importStar(require("./requester"));
|
|
63
63
|
exports.Auth = __importStar(require("./auth"));
|
|
64
|
+
exports.ConnectSchemas = __importStar(require("./connect/schemas"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@routr/common",
|
|
3
|
-
"version": "2.0.8-alpha.
|
|
3
|
+
"version": "2.0.8-alpha.14",
|
|
4
4
|
"description": "Common package",
|
|
5
5
|
"author": "Pedro Sanders <psanders@fonoster.com>",
|
|
6
6
|
"homepage": "https://github.com/fonoster/routr#readme",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/js-yaml": "^4.0.5"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "e91abb1fd9bc49ede80dd7fc8a13f97362f4c1f1"
|
|
54
54
|
}
|