@routr/common 2.0.8-alpha.13 → 2.0.8-alpha.15
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/api/client.d.ts +3 -0
- package/dist/connect/api/client.js +154 -0
- package/dist/connect/api/index.d.ts +2 -0
- package/dist/connect/api/index.js +36 -0
- package/dist/connect/api/types.d.ts +55 -0
- package/dist/connect/api/types.js +2 -0
- package/dist/connect/config.d.ts +109 -0
- package/dist/connect/config.js +2 -0
- package/dist/connect/converters.d.ts +10 -0
- package/dist/connect/converters.js +176 -0
- package/dist/connect/grpc_client.d.ts +8 -1
- package/dist/connect/grpc_client.js +44 -6
- package/dist/connect/index.d.ts +3 -1
- package/dist/connect/index.js +3 -1
- package/dist/connect/protos/acl.proto +117 -0
- package/dist/connect/protos/agents.proto +154 -0
- package/dist/connect/protos/credentials.proto +116 -0
- package/dist/connect/protos/domains.proto +150 -0
- package/dist/connect/protos/numbers.proto +184 -0
- package/dist/connect/protos/peers.proto +166 -0
- package/dist/connect/protos/trunks.proto +186 -0
- package/dist/connect/schemas/acl.d.ts +61 -0
- package/dist/connect/schemas/acl.js +80 -0
- package/dist/connect/schemas/agent.d.ts +60 -0
- package/dist/connect/schemas/agent.js +79 -0
- package/dist/connect/schemas/crendentials.d.ts +55 -0
- package/dist/connect/schemas/crendentials.js +74 -0
- package/dist/connect/schemas/domain.d.ts +73 -0
- package/dist/connect/schemas/domain.js +92 -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 +78 -0
- package/dist/connect/schemas/number.js +97 -0
- package/dist/connect/schemas/peer.d.ts +68 -0
- package/dist/connect/schemas/peer.js +87 -0
- package/dist/connect/schemas/trunk.d.ts +116 -0
- package/dist/connect/schemas/trunk.js +135 -0
- package/dist/connect/schemas/validators.d.ts +2 -0
- package/dist/connect/schemas/validators.js +43 -0
- package/dist/connect/types.d.ts +74 -25
- package/dist/connect/types.js +7 -30
- package/dist/errors.d.ts +35 -1
- package/dist/errors.js +51 -5
- package/dist/helper.d.ts +1 -0
- package/dist/helper.js +11 -3
- package/dist/index.d.ts +5 -4
- package/dist/index.js +5 -5
- package/dist/protos/common.proto +0 -2
- package/dist/protos/location.proto +3 -2
- package/dist/service.d.ts +2 -2
- package/dist/service.js +1 -1
- package/dist/types.d.ts +2 -0
- package/package.json +3 -3
- package/dist/connect/data_api.d.ts +0 -11
- package/dist/connect/data_api.js +0 -91
- package/dist/protos/resources.proto +0 -108
|
@@ -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
|
+
required: string[];
|
|
27
|
+
};
|
|
28
|
+
spec: {
|
|
29
|
+
description: string;
|
|
30
|
+
type: string;
|
|
31
|
+
properties: {
|
|
32
|
+
username: {
|
|
33
|
+
description: string;
|
|
34
|
+
type: string;
|
|
35
|
+
minLength: number;
|
|
36
|
+
maxLength: number;
|
|
37
|
+
readOnly: boolean;
|
|
38
|
+
};
|
|
39
|
+
domainRef: {
|
|
40
|
+
description: string;
|
|
41
|
+
type: string;
|
|
42
|
+
};
|
|
43
|
+
credentialsRef: {
|
|
44
|
+
description: string;
|
|
45
|
+
type: string;
|
|
46
|
+
};
|
|
47
|
+
enabled: {
|
|
48
|
+
description: string;
|
|
49
|
+
type: string;
|
|
50
|
+
};
|
|
51
|
+
privacy: {
|
|
52
|
+
enum: string[];
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
required: string[];
|
|
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: "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
|
+
required: ["name"]
|
|
47
|
+
},
|
|
48
|
+
spec: {
|
|
49
|
+
description: "Operations spec for an Agent",
|
|
50
|
+
type: "object",
|
|
51
|
+
properties: {
|
|
52
|
+
username: {
|
|
53
|
+
description: "The username for the Agent",
|
|
54
|
+
type: "string",
|
|
55
|
+
minLength: 3,
|
|
56
|
+
maxLength: 60,
|
|
57
|
+
readOnly: true
|
|
58
|
+
},
|
|
59
|
+
domainRef: {
|
|
60
|
+
description: "The domain the Agent belongs to",
|
|
61
|
+
type: "string"
|
|
62
|
+
},
|
|
63
|
+
credentialsRef: {
|
|
64
|
+
description: "The credential the Agent uses to authenticate",
|
|
65
|
+
type: "string"
|
|
66
|
+
},
|
|
67
|
+
enabled: {
|
|
68
|
+
description: "Whether the Agent is enabled (reserved for future use)",
|
|
69
|
+
type: "boolean"
|
|
70
|
+
},
|
|
71
|
+
privacy: {
|
|
72
|
+
enum: ["Private", "None", "private", "none"]
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
required: ["username"]
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
required: ["apiVersion", "kind", "metadata", "spec"]
|
|
79
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
required: string[];
|
|
27
|
+
};
|
|
28
|
+
spec: {
|
|
29
|
+
description: string;
|
|
30
|
+
type: string;
|
|
31
|
+
properties: {
|
|
32
|
+
credentials: {
|
|
33
|
+
description: string;
|
|
34
|
+
type: string;
|
|
35
|
+
properties: {
|
|
36
|
+
username: {
|
|
37
|
+
description: string;
|
|
38
|
+
type: string;
|
|
39
|
+
readOnly: boolean;
|
|
40
|
+
};
|
|
41
|
+
password: {
|
|
42
|
+
description: string;
|
|
43
|
+
type: string;
|
|
44
|
+
writeOnly: boolean;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
required: string[];
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
required: string[];
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
required: string[];
|
|
54
|
+
};
|
|
55
|
+
export default _default;
|
|
@@ -0,0 +1,74 @@
|
|
|
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
|
+
required: ["name"]
|
|
47
|
+
},
|
|
48
|
+
spec: {
|
|
49
|
+
description: "Operations spec for Credentials",
|
|
50
|
+
type: "object",
|
|
51
|
+
properties: {
|
|
52
|
+
credentials: {
|
|
53
|
+
description: "Credential configuration",
|
|
54
|
+
type: "object",
|
|
55
|
+
properties: {
|
|
56
|
+
username: {
|
|
57
|
+
description: "Username",
|
|
58
|
+
type: "string",
|
|
59
|
+
readOnly: true
|
|
60
|
+
},
|
|
61
|
+
password: {
|
|
62
|
+
description: "Password",
|
|
63
|
+
type: "string",
|
|
64
|
+
writeOnly: true
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
required: ["username", "password"]
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
required: ["credentials"]
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
required: ["apiVersion", "kind", "ref", "metadata", "spec"]
|
|
74
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
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
|
+
required: string[];
|
|
27
|
+
};
|
|
28
|
+
spec: {
|
|
29
|
+
description: string;
|
|
30
|
+
type: string;
|
|
31
|
+
properties: {
|
|
32
|
+
context: {
|
|
33
|
+
description: string;
|
|
34
|
+
type: string;
|
|
35
|
+
properties: {
|
|
36
|
+
domainUri: {
|
|
37
|
+
description: string;
|
|
38
|
+
type: string;
|
|
39
|
+
minLength: number;
|
|
40
|
+
maxLength: number;
|
|
41
|
+
};
|
|
42
|
+
accessControlListRef: {
|
|
43
|
+
description: string;
|
|
44
|
+
type: string;
|
|
45
|
+
};
|
|
46
|
+
egressPolicies: {
|
|
47
|
+
description: string;
|
|
48
|
+
type: string;
|
|
49
|
+
items: {
|
|
50
|
+
type: string;
|
|
51
|
+
properties: {
|
|
52
|
+
rule: {
|
|
53
|
+
description: string;
|
|
54
|
+
type: string;
|
|
55
|
+
minLength: number;
|
|
56
|
+
};
|
|
57
|
+
numberRef: {
|
|
58
|
+
description: string;
|
|
59
|
+
type: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
required: string[];
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
required: string[];
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
required: string[];
|
|
72
|
+
};
|
|
73
|
+
export default _default;
|
|
@@ -0,0 +1,92 @@
|
|
|
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
|
+
required: ["name"]
|
|
47
|
+
},
|
|
48
|
+
spec: {
|
|
49
|
+
description: "Operations spec for an Domain",
|
|
50
|
+
type: "object",
|
|
51
|
+
properties: {
|
|
52
|
+
context: {
|
|
53
|
+
description: "The username for the Domain",
|
|
54
|
+
type: "object",
|
|
55
|
+
properties: {
|
|
56
|
+
domainUri: {
|
|
57
|
+
description: "The URI of the Domain",
|
|
58
|
+
type: "string",
|
|
59
|
+
minLength: 3,
|
|
60
|
+
maxLength: 255
|
|
61
|
+
},
|
|
62
|
+
accessControlListRef: {
|
|
63
|
+
description: "The reference to the AccessControlList",
|
|
64
|
+
type: "string"
|
|
65
|
+
},
|
|
66
|
+
egressPolicies: {
|
|
67
|
+
description: "The egress policy for the Domain",
|
|
68
|
+
type: "array",
|
|
69
|
+
items: {
|
|
70
|
+
type: "object",
|
|
71
|
+
properties: {
|
|
72
|
+
rule: {
|
|
73
|
+
description: "The rule for the egress policy",
|
|
74
|
+
type: "string",
|
|
75
|
+
minLength: 1
|
|
76
|
+
},
|
|
77
|
+
numberRef: {
|
|
78
|
+
description: "The reference to the number",
|
|
79
|
+
type: "string"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
required: ["rule", "numberRef"]
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
required: ["domainUri"]
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
required: ["apiVersion", "kind", "ref", "metadata", "spec"]
|
|
92
|
+
};
|
|
@@ -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,78 @@
|
|
|
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
|
+
required: string[];
|
|
27
|
+
};
|
|
28
|
+
spec: {
|
|
29
|
+
description: string;
|
|
30
|
+
type: string;
|
|
31
|
+
properties: {
|
|
32
|
+
trunkRef: {
|
|
33
|
+
description: string;
|
|
34
|
+
type: string;
|
|
35
|
+
};
|
|
36
|
+
location: {
|
|
37
|
+
description: string;
|
|
38
|
+
type: string;
|
|
39
|
+
properties: {
|
|
40
|
+
telUrl: {
|
|
41
|
+
description: string;
|
|
42
|
+
type: string;
|
|
43
|
+
};
|
|
44
|
+
aorLink: {
|
|
45
|
+
description: string;
|
|
46
|
+
type: string;
|
|
47
|
+
};
|
|
48
|
+
sessionAffinityHeader: {
|
|
49
|
+
description: string;
|
|
50
|
+
type: string;
|
|
51
|
+
};
|
|
52
|
+
extraHeaders: {
|
|
53
|
+
description: string;
|
|
54
|
+
type: string;
|
|
55
|
+
items: {
|
|
56
|
+
type: string;
|
|
57
|
+
properties: {
|
|
58
|
+
name: {
|
|
59
|
+
description: string;
|
|
60
|
+
type: string;
|
|
61
|
+
};
|
|
62
|
+
value: {
|
|
63
|
+
description: string;
|
|
64
|
+
type: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
required: string[];
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
required: string[];
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
required: string[];
|
|
77
|
+
};
|
|
78
|
+
export default _default;
|
|
@@ -0,0 +1,97 @@
|
|
|
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
|
+
required: ["name"]
|
|
47
|
+
},
|
|
48
|
+
spec: {
|
|
49
|
+
description: "Operations spec for Numbers",
|
|
50
|
+
type: "object",
|
|
51
|
+
properties: {
|
|
52
|
+
trunkRef: {
|
|
53
|
+
description: "Reference to the trunk",
|
|
54
|
+
type: "string"
|
|
55
|
+
},
|
|
56
|
+
location: {
|
|
57
|
+
description: "Location of the number",
|
|
58
|
+
type: "object",
|
|
59
|
+
properties: {
|
|
60
|
+
telUrl: {
|
|
61
|
+
description: "Tel URL",
|
|
62
|
+
type: "string"
|
|
63
|
+
},
|
|
64
|
+
aorLink: {
|
|
65
|
+
description: "AOR link",
|
|
66
|
+
type: "string"
|
|
67
|
+
},
|
|
68
|
+
sessionAffinityHeader: {
|
|
69
|
+
description: "Session affinity",
|
|
70
|
+
type: "string"
|
|
71
|
+
},
|
|
72
|
+
extraHeaders: {
|
|
73
|
+
description: "Properties",
|
|
74
|
+
type: "array",
|
|
75
|
+
items: {
|
|
76
|
+
type: "object",
|
|
77
|
+
properties: {
|
|
78
|
+
name: {
|
|
79
|
+
description: "Name of the header",
|
|
80
|
+
type: "string"
|
|
81
|
+
},
|
|
82
|
+
value: {
|
|
83
|
+
description: "Value of the header",
|
|
84
|
+
type: "string"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
required: ["telUrl"]
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
required: ["location"]
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
required: ["apiVersion", "kind", "ref", "metadata", "spec"]
|
|
97
|
+
};
|