@routr/common 2.0.8-alpha.4 → 2.0.8-alpha.40
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/assertions.js +2 -2
- package/dist/auth.d.ts +43 -4
- package/dist/auth.js +63 -1
- package/dist/connect/api/client.d.ts +3 -0
- package/dist/connect/api/client.js +158 -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 +51 -0
- package/dist/connect/api/types.js +2 -0
- package/dist/connect/assertions.d.ts +37 -0
- package/dist/connect/assertions.js +112 -0
- package/dist/connect/client.d.ts +8 -0
- package/dist/connect/client.js +94 -0
- package/dist/connect/config.d.ts +113 -0
- package/dist/connect/config.js +2 -0
- package/dist/connect/connect_error.d.ts +21 -0
- package/dist/connect/connect_error.js +44 -0
- package/dist/connect/index.d.ts +7 -2
- package/dist/connect/index.js +8 -3
- package/dist/connect/mappers/acl.d.ts +3 -0
- package/dist/connect/mappers/acl.js +19 -0
- package/dist/connect/mappers/agent.d.ts +3 -0
- package/dist/connect/mappers/agent.js +42 -0
- package/dist/connect/mappers/assertions.d.ts +3 -0
- package/dist/connect/mappers/assertions.js +43 -0
- package/dist/connect/mappers/credentials.d.ts +3 -0
- package/dist/connect/mappers/credentials.js +18 -0
- package/dist/connect/mappers/domain.d.ts +3 -0
- package/dist/connect/mappers/domain.js +19 -0
- package/dist/connect/mappers/index.d.ts +7 -0
- package/dist/connect/mappers/index.js +41 -0
- package/dist/connect/mappers/number.d.ts +3 -0
- package/dist/connect/mappers/number.js +26 -0
- package/dist/connect/mappers/peer.d.ts +3 -0
- package/dist/connect/mappers/peer.js +26 -0
- package/dist/connect/mappers/trunk.d.ts +3 -0
- package/dist/connect/mappers/trunk.js +34 -0
- package/dist/connect/protos/acl.proto +112 -0
- package/dist/connect/protos/agents.proto +153 -0
- package/dist/connect/protos/credentials.proto +114 -0
- package/dist/connect/protos/domains.proto +146 -0
- package/dist/connect/protos/numbers.proto +166 -0
- package/dist/connect/protos/peers.proto +174 -0
- package/dist/connect/protos/trunks.proto +178 -0
- package/dist/connect/schemas/acl.d.ts +66 -0
- package/dist/connect/schemas/acl.js +85 -0
- package/dist/connect/schemas/agent.d.ts +61 -0
- package/dist/connect/schemas/agent.js +80 -0
- package/dist/connect/schemas/crendentials.d.ts +59 -0
- package/dist/connect/schemas/crendentials.js +78 -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 +81 -0
- package/dist/connect/schemas/number.js +100 -0
- package/dist/connect/schemas/peer.d.ts +84 -0
- package/dist/connect/schemas/peer.js +103 -0
- package/dist/connect/schemas/trunk.d.ts +125 -0
- package/dist/connect/schemas/trunk.js +157 -0
- package/dist/connect/schemas/validators.d.ts +2 -0
- package/dist/connect/schemas/validators.js +43 -0
- package/dist/connect/types.d.ts +91 -23
- package/dist/connect/types.js +17 -37
- package/dist/connect/validations.d.ts +43 -0
- package/dist/connect/validations.js +272 -0
- package/dist/envs.d.ts +2 -0
- package/dist/envs.js +23 -0
- package/dist/errors.d.ts +35 -1
- package/dist/errors.js +52 -6
- package/dist/healthcheck.d.ts +1 -0
- package/dist/healthcheck.js +24 -0
- package/dist/helper.d.ts +17 -4
- package/dist/helper.js +82 -8
- package/dist/index.d.ts +8 -4
- package/dist/index.js +9 -8
- package/dist/ip_utils.js +1 -1
- package/dist/protos/common.proto +1 -3
- package/dist/protos/location.proto +23 -8
- package/dist/protos/processor.proto +3 -2
- package/dist/protos/requester.proto +1 -1
- package/dist/protos/sipmessage.proto +8 -1
- package/dist/protos/verifier.proto +39 -0
- package/dist/requester/grpc_client.js +1 -1
- package/dist/requester/index.js +1 -1
- package/dist/service.d.ts +2 -2
- package/dist/service.js +26 -4
- package/dist/tracer.js +1 -1
- package/dist/types.d.ts +120 -88
- package/dist/types.js +79 -69
- package/dist/verifier/grpc_client.d.ts +1 -0
- package/dist/{connect → verifier}/grpc_client.js +4 -4
- package/dist/verifier/index.d.ts +2 -0
- package/dist/verifier/index.js +36 -0
- package/dist/verifier/types.d.ts +10 -0
- package/dist/verifier/types.js +2 -0
- package/dist/verifier/verifier.d.ts +3 -0
- package/dist/verifier/verifier.js +64 -0
- package/package.json +17 -7
- package/dist/connect/data_api.d.ts +0 -11
- package/dist/connect/data_api.js +0 -91
- package/dist/connect/grpc_client.d.ts +0 -1
- package/dist/protos/resources.proto +0 -108
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
|
|
3
|
+
* http://github.com/fonoster/routr
|
|
4
|
+
*
|
|
5
|
+
* This file is part of Routr
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the MIT License (the "License")
|
|
8
|
+
* you may not use this file except in compliance with
|
|
9
|
+
* the License. You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* https://opensource.org/licenses/MIT
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
19
|
+
syntax = "proto3";
|
|
20
|
+
|
|
21
|
+
package fonoster.routr.connect.peers.v2draft1;
|
|
22
|
+
|
|
23
|
+
import "google/protobuf/struct.proto";
|
|
24
|
+
import "google/protobuf/empty.proto";
|
|
25
|
+
import "acl.proto";
|
|
26
|
+
import "credentials.proto";
|
|
27
|
+
|
|
28
|
+
// The Peer service definition
|
|
29
|
+
service Peers {
|
|
30
|
+
// Creates a new Peer
|
|
31
|
+
rpc Create (CreatePeerRequest) returns (Peer) {}
|
|
32
|
+
// Updates an existing Peer
|
|
33
|
+
rpc Update (UpdatePeerRequest) returns (Peer) {}
|
|
34
|
+
// Gets an existing Peer
|
|
35
|
+
rpc Get (GetPeerRequest) returns (Peer) {}
|
|
36
|
+
// Deletes an existing Peer
|
|
37
|
+
rpc Delete (DeletePeerRequest) returns (.google.protobuf.Empty) {}
|
|
38
|
+
// Lists all Peers
|
|
39
|
+
rpc List (ListPeersRequest) returns (ListPeersResponse) {}
|
|
40
|
+
// Find Agents by field name and value
|
|
41
|
+
rpc FindBy (FindByRequest) returns (FindByResponse) {}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
enum LoadBalancingAlgorithm {
|
|
45
|
+
// Value for situations where the load balancing algorithm is not specified
|
|
46
|
+
// Such as having an aor starting with "sip:"
|
|
47
|
+
UNSPECIFIED = 0;
|
|
48
|
+
// The round robin load balancing algorithm
|
|
49
|
+
ROUND_ROBIN = 1;
|
|
50
|
+
// The least sessions load balancing algorithm
|
|
51
|
+
LEAST_SESSIONS = 2;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// The message for the Peer resource
|
|
55
|
+
message Peer {
|
|
56
|
+
// The API version of the Peer
|
|
57
|
+
string api_version = 1;
|
|
58
|
+
// The unique identifier of the Peer
|
|
59
|
+
string ref = 2;
|
|
60
|
+
// The name of the Peer
|
|
61
|
+
string name = 3;
|
|
62
|
+
// The username of the Peer
|
|
63
|
+
string username = 4;
|
|
64
|
+
// The address of record of the Peer
|
|
65
|
+
string aor = 5;
|
|
66
|
+
// The contact address of the Peer
|
|
67
|
+
string contact_addr = 6;
|
|
68
|
+
// The load balancing algorithm of the Peer
|
|
69
|
+
LoadBalancingAlgorithm balancing_algorithm = 7;
|
|
70
|
+
// The session affinity of the Peer
|
|
71
|
+
bool with_session_affinity = 8;
|
|
72
|
+
// The status of the Peer
|
|
73
|
+
bool enabled = 9;
|
|
74
|
+
// The date and time when the Peer was created
|
|
75
|
+
int32 created_at = 10;
|
|
76
|
+
// The date and time when the Peer was last updated
|
|
77
|
+
int32 updated_at = 11;
|
|
78
|
+
// The list of IP addresses that are allowed to access the Peer
|
|
79
|
+
fonoster.routr.connect.acl.v2draft1.AccessControlList access_control_list = 12;
|
|
80
|
+
// The credentials of the Peer
|
|
81
|
+
fonoster.routr.connect.credentials.v2draft1.Credentials credentials = 13;
|
|
82
|
+
// The extended attributes of the Peer
|
|
83
|
+
.google.protobuf.Struct extended = 14;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// The request message for the Peers.Create method
|
|
87
|
+
message CreatePeerRequest {
|
|
88
|
+
// The name of the Peer
|
|
89
|
+
string name = 1;
|
|
90
|
+
// The username of the Peer
|
|
91
|
+
string username = 2;
|
|
92
|
+
// The address of record of the Peer
|
|
93
|
+
string aor = 3;
|
|
94
|
+
// The contact address of the Peer
|
|
95
|
+
string contact_addr = 4;
|
|
96
|
+
// The load balancing algorithm of the Peer
|
|
97
|
+
LoadBalancingAlgorithm balancing_algorithm = 5;
|
|
98
|
+
// The session affinity of the Peer
|
|
99
|
+
bool with_session_affinity = 6;
|
|
100
|
+
// Reference to the ACL of the Peer
|
|
101
|
+
string access_control_list_ref = 7;
|
|
102
|
+
// Reference to the Credentials of the Peer
|
|
103
|
+
string credentials_ref = 8;
|
|
104
|
+
// The status of the Peer
|
|
105
|
+
bool enabled = 9;
|
|
106
|
+
// The extended attributes of the Peer
|
|
107
|
+
.google.protobuf.Struct extended = 10;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// The request message for the Peers.Update method
|
|
111
|
+
message UpdatePeerRequest {
|
|
112
|
+
// The unique identifier of the Peer
|
|
113
|
+
string ref = 1;
|
|
114
|
+
// The name of the Peer
|
|
115
|
+
string name = 2;
|
|
116
|
+
// The address of record of the Peer
|
|
117
|
+
string aor = 3;
|
|
118
|
+
// The contact address of the Peer
|
|
119
|
+
string contact_addr = 4;
|
|
120
|
+
// The load balancing algorithm of the Peer
|
|
121
|
+
LoadBalancingAlgorithm balancing_algorithm = 5;
|
|
122
|
+
// The session affinity of the Peer
|
|
123
|
+
bool with_session_affinity = 6;
|
|
124
|
+
// Reference to the ACL of the Peer
|
|
125
|
+
string access_control_list_ref = 7;
|
|
126
|
+
// Reference to the Credentials of the Peer
|
|
127
|
+
string credentials_ref = 8;
|
|
128
|
+
// The status of the Peer
|
|
129
|
+
bool enabled = 9;
|
|
130
|
+
// The extended attributes of the Peer
|
|
131
|
+
.google.protobuf.Struct extended = 10;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// The request message for the Peers.Get method
|
|
135
|
+
message GetPeerRequest {
|
|
136
|
+
// The unique identifier of the Peer
|
|
137
|
+
string ref = 1;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// The request message for the Peers.Delete method
|
|
141
|
+
message DeletePeerRequest {
|
|
142
|
+
// The unique identifier of the Peer
|
|
143
|
+
string ref = 1;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// The request message for the Peers.FindBy method
|
|
147
|
+
message FindByRequest {
|
|
148
|
+
// The field name to search
|
|
149
|
+
string fieldName = 1;
|
|
150
|
+
// The value to search
|
|
151
|
+
string fieldValue = 2;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// The response message for the Peers.FindBy method
|
|
155
|
+
message FindByResponse {
|
|
156
|
+
// The list of Peers items
|
|
157
|
+
repeated Peer items = 1;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
message ListPeersRequest {
|
|
161
|
+
// The maximum number of items in the list
|
|
162
|
+
int32 page_size = 1;
|
|
163
|
+
|
|
164
|
+
// The next_page_token value returned from the previous request, if any
|
|
165
|
+
string page_token = 2;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
message ListPeersResponse {
|
|
169
|
+
// List of Peers items
|
|
170
|
+
repeated Peer items = 1;
|
|
171
|
+
|
|
172
|
+
// Token to retrieve the next page of results, or empty if there are no more results in the list
|
|
173
|
+
string next_page_token = 2;
|
|
174
|
+
}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
|
|
3
|
+
* http://github.com/fonoster/routr
|
|
4
|
+
*
|
|
5
|
+
* This file is part of Routr
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the MIT License (the "License")
|
|
8
|
+
* you may not use this file except in compliance with
|
|
9
|
+
* the License. You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* https://opensource.org/licenses/MIT
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
19
|
+
syntax = "proto3";
|
|
20
|
+
|
|
21
|
+
package fonoster.routr.connect.trunks.v2draft1;
|
|
22
|
+
|
|
23
|
+
import "google/protobuf/struct.proto";
|
|
24
|
+
import "google/protobuf/empty.proto";
|
|
25
|
+
import "acl.proto";
|
|
26
|
+
import "credentials.proto";
|
|
27
|
+
|
|
28
|
+
// The Trunks service definition
|
|
29
|
+
service Trunks {
|
|
30
|
+
// Create a new Trunk
|
|
31
|
+
rpc Create (CreateTrunkRequest) returns (Trunk) {}
|
|
32
|
+
// Update an existing Trunk
|
|
33
|
+
rpc Update (UpdateTrunkRequest) returns (Trunk) {}
|
|
34
|
+
// Get a Trunk by reference
|
|
35
|
+
rpc Get (GetTrunkRequest) returns (Trunk) {}
|
|
36
|
+
// Delete a Trunk by reference
|
|
37
|
+
rpc Delete (DeleteTrunkRequest) returns (.google.protobuf.Empty) {}
|
|
38
|
+
// List all Trunks
|
|
39
|
+
rpc List (ListTrunkRequest) returns (ListTrunksResponse) {}
|
|
40
|
+
// Find Trunks by field name and value
|
|
41
|
+
rpc FindBy (FindByRequest) returns (FindByResponse) {}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// The message for the Trunk URIs
|
|
45
|
+
message TrunkURI {
|
|
46
|
+
// The host name or IP address of the Trunk
|
|
47
|
+
string host = 1;
|
|
48
|
+
// The port number of the Trunk
|
|
49
|
+
int32 port = 2;
|
|
50
|
+
// The transport protocol of the Trunk
|
|
51
|
+
string transport = 3;
|
|
52
|
+
// The username to use when authenticating with the Trunk
|
|
53
|
+
string user = 4;
|
|
54
|
+
// The weight of the Trunk
|
|
55
|
+
int32 weight = 5;
|
|
56
|
+
// The priority of the Trunk
|
|
57
|
+
int32 priority = 6;
|
|
58
|
+
// The flag to enable or disable the Trunk
|
|
59
|
+
bool enabled = 7;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// The message for the Trunk resource
|
|
63
|
+
message Trunk {
|
|
64
|
+
// The API version of the Trunk
|
|
65
|
+
string api_version = 2;
|
|
66
|
+
// The reference of the Trunk
|
|
67
|
+
string ref = 1;
|
|
68
|
+
// The name of the Trunk
|
|
69
|
+
string name = 3;
|
|
70
|
+
// A flag to indicate if we should send a REGISTER request to the Trunk
|
|
71
|
+
bool send_register = 4;
|
|
72
|
+
// The URI for inbound requests
|
|
73
|
+
string inbound_uri = 5;
|
|
74
|
+
// The date and time when the Trunk was created
|
|
75
|
+
int32 created_at = 6;
|
|
76
|
+
// The date and time when the Trunk was last updated
|
|
77
|
+
int32 updated_at = 7;
|
|
78
|
+
// The list of IP addresses that are allowed to access the Trunks
|
|
79
|
+
fonoster.routr.connect.acl.v2draft1.AccessControlList access_control_list = 8;
|
|
80
|
+
// The credentials to use when authenticating with the Trunk
|
|
81
|
+
fonoster.routr.connect.credentials.v2draft1.Credentials inbound_credentials = 9;
|
|
82
|
+
// The credentials to use when authenticating with the Provider
|
|
83
|
+
fonoster.routr.connect.credentials.v2draft1.Credentials outbound_credentials = 10;
|
|
84
|
+
// The list of URIs for the Trunk
|
|
85
|
+
repeated TrunkURI uris = 11;
|
|
86
|
+
// The extended attributes of the Trunk
|
|
87
|
+
.google.protobuf.Struct extended = 12;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// The message for the Trunk.Create
|
|
91
|
+
message CreateTrunkRequest {
|
|
92
|
+
// The API version of the Trunk
|
|
93
|
+
string api_version = 1;
|
|
94
|
+
// The name of the Trunk
|
|
95
|
+
string name = 2;
|
|
96
|
+
// A flag to indicate if we should send a REGISTER request to the Trunk
|
|
97
|
+
bool send_register = 3;
|
|
98
|
+
// The URI for inbound requests
|
|
99
|
+
string inbound_uri = 4;
|
|
100
|
+
// Reference to the AccessControlList
|
|
101
|
+
string access_control_list_ref = 5;
|
|
102
|
+
// Reference to the inbound Credentials
|
|
103
|
+
string inbound_credentials_ref = 6;
|
|
104
|
+
// Reference to the outbound Credentials
|
|
105
|
+
string outbound_credentials_ref = 7;
|
|
106
|
+
// The list of URIs for the Trunk
|
|
107
|
+
repeated TrunkURI uris = 8;
|
|
108
|
+
// The extended attributes of the Trunk
|
|
109
|
+
.google.protobuf.Struct extended = 9;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// The message for the Trunk.Update
|
|
113
|
+
message UpdateTrunkRequest {
|
|
114
|
+
// The API version of the Trunk
|
|
115
|
+
string api_version = 1;
|
|
116
|
+
// The reference of the Trunk
|
|
117
|
+
string ref = 2;
|
|
118
|
+
// The name of the Trunk
|
|
119
|
+
string name = 3;
|
|
120
|
+
// A flag to indicate if we should send a REGISTER request to the Trunk
|
|
121
|
+
bool send_register = 4;
|
|
122
|
+
// The URI for inbound requests
|
|
123
|
+
string inbound_uri = 5;
|
|
124
|
+
// Reference to the AccessControlList
|
|
125
|
+
string access_control_list_ref = 6;
|
|
126
|
+
// Reference to the inbound Credentials
|
|
127
|
+
string inbound_credentials_ref = 7;
|
|
128
|
+
// Reference to the outbound Credentials
|
|
129
|
+
string outbound_credentials_ref = 8;
|
|
130
|
+
// The list of URIs for the Trunk
|
|
131
|
+
repeated TrunkURI uris = 9;
|
|
132
|
+
// The extended attributes of the Trunk
|
|
133
|
+
.google.protobuf.Struct extended = 10;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// The message for the Trunk.Get
|
|
137
|
+
message GetTrunkRequest {
|
|
138
|
+
// The reference of the Trunk
|
|
139
|
+
string ref = 1;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// The message for the Trunk.Delete
|
|
143
|
+
message DeleteTrunkRequest {
|
|
144
|
+
// The reference of the Trunk
|
|
145
|
+
string ref = 1;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// The message for the Trunk.FindBy
|
|
149
|
+
message FindByRequest {
|
|
150
|
+
// The field name to search
|
|
151
|
+
string field_name = 1;
|
|
152
|
+
// The value to search
|
|
153
|
+
string field_value = 2;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// The response message for the Trunks.FindBy method
|
|
157
|
+
message FindByResponse {
|
|
158
|
+
// The list of Trunks items
|
|
159
|
+
repeated Trunk items = 1;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// The message for the Trunk.List
|
|
163
|
+
message ListTrunkRequest {
|
|
164
|
+
// The maximum number of items in the list
|
|
165
|
+
int32 page_size = 1;
|
|
166
|
+
|
|
167
|
+
// The next_page_token value returned from the previous request, if any
|
|
168
|
+
string page_token = 2;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// The message for the Trunk.List response
|
|
172
|
+
message ListTrunksResponse {
|
|
173
|
+
// List of Trunks
|
|
174
|
+
repeated Trunk items = 1;
|
|
175
|
+
|
|
176
|
+
// Token to retrieve the next page of results, or empty if there are no more results in the list
|
|
177
|
+
string next_page_token = 2;
|
|
178
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
maxLength: number;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
required: string[];
|
|
28
|
+
};
|
|
29
|
+
spec: {
|
|
30
|
+
description: string;
|
|
31
|
+
type: string;
|
|
32
|
+
properties: {
|
|
33
|
+
accessControlList: {
|
|
34
|
+
description: string;
|
|
35
|
+
type: string;
|
|
36
|
+
properties: {
|
|
37
|
+
allow: {
|
|
38
|
+
description: string;
|
|
39
|
+
type: string;
|
|
40
|
+
items: {
|
|
41
|
+
type: string;
|
|
42
|
+
minLength: number;
|
|
43
|
+
maxLength: number;
|
|
44
|
+
};
|
|
45
|
+
minItems: number;
|
|
46
|
+
uniqueItems: boolean;
|
|
47
|
+
};
|
|
48
|
+
deny: {
|
|
49
|
+
description: string;
|
|
50
|
+
type: string;
|
|
51
|
+
items: {
|
|
52
|
+
type: string;
|
|
53
|
+
minLength: number;
|
|
54
|
+
maxLength: number;
|
|
55
|
+
};
|
|
56
|
+
minItems: number;
|
|
57
|
+
uniqueItems: boolean;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
required: string[];
|
|
65
|
+
};
|
|
66
|
+
export default _default;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (C) 2023 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"]
|
|
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
|
+
maxLength: 60
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
required: ["name"]
|
|
48
|
+
},
|
|
49
|
+
spec: {
|
|
50
|
+
description: "Operations spec for ACL",
|
|
51
|
+
type: "object",
|
|
52
|
+
properties: {
|
|
53
|
+
accessControlList: {
|
|
54
|
+
description: "An object with deny and allow list of access control rules",
|
|
55
|
+
type: "object",
|
|
56
|
+
properties: {
|
|
57
|
+
allow: {
|
|
58
|
+
description: "Allowed list of access control rules",
|
|
59
|
+
type: "array",
|
|
60
|
+
items: {
|
|
61
|
+
type: "string",
|
|
62
|
+
minLength: 7,
|
|
63
|
+
maxLength: 18
|
|
64
|
+
},
|
|
65
|
+
minItems: 1,
|
|
66
|
+
uniqueItems: true
|
|
67
|
+
},
|
|
68
|
+
deny: {
|
|
69
|
+
description: "Denied list of access control rules",
|
|
70
|
+
type: "array",
|
|
71
|
+
items: {
|
|
72
|
+
type: "string",
|
|
73
|
+
minLength: 7,
|
|
74
|
+
maxLength: 18
|
|
75
|
+
},
|
|
76
|
+
minItems: 1,
|
|
77
|
+
uniqueItems: true
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
required: ["apiVersion", "kind", "ref", "metadata", "spec"]
|
|
85
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
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
|
+
maxLength: number;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
required: string[];
|
|
28
|
+
};
|
|
29
|
+
spec: {
|
|
30
|
+
description: string;
|
|
31
|
+
type: string;
|
|
32
|
+
properties: {
|
|
33
|
+
username: {
|
|
34
|
+
description: string;
|
|
35
|
+
type: string;
|
|
36
|
+
minLength: number;
|
|
37
|
+
maxLength: number;
|
|
38
|
+
readOnly: boolean;
|
|
39
|
+
};
|
|
40
|
+
domainRef: {
|
|
41
|
+
description: string;
|
|
42
|
+
type: string;
|
|
43
|
+
};
|
|
44
|
+
credentialsRef: {
|
|
45
|
+
description: string;
|
|
46
|
+
type: string;
|
|
47
|
+
};
|
|
48
|
+
enabled: {
|
|
49
|
+
description: string;
|
|
50
|
+
type: string;
|
|
51
|
+
};
|
|
52
|
+
privacy: {
|
|
53
|
+
enum: string[];
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
required: string[];
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
required: string[];
|
|
60
|
+
};
|
|
61
|
+
export default _default;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/*
|
|
4
|
+
* Copyright (C) 2023 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"]
|
|
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
|
+
maxLength: 60
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
required: ["name"]
|
|
48
|
+
},
|
|
49
|
+
spec: {
|
|
50
|
+
description: "Operations spec for an Agent",
|
|
51
|
+
type: "object",
|
|
52
|
+
properties: {
|
|
53
|
+
username: {
|
|
54
|
+
description: "The username for the Agent",
|
|
55
|
+
type: "string",
|
|
56
|
+
minLength: 4,
|
|
57
|
+
maxLength: 60,
|
|
58
|
+
readOnly: true
|
|
59
|
+
},
|
|
60
|
+
domainRef: {
|
|
61
|
+
description: "The domain the Agent belongs to",
|
|
62
|
+
type: "string"
|
|
63
|
+
},
|
|
64
|
+
credentialsRef: {
|
|
65
|
+
description: "The credential the Agent uses to authenticate",
|
|
66
|
+
type: "string"
|
|
67
|
+
},
|
|
68
|
+
enabled: {
|
|
69
|
+
description: "Whether the Agent is enabled (reserved for future use)",
|
|
70
|
+
type: "boolean"
|
|
71
|
+
},
|
|
72
|
+
privacy: {
|
|
73
|
+
enum: ["PRIVATE", "NONE", "Private", "None", "private", "none"]
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
required: ["username"]
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
required: ["apiVersion", "kind", "metadata", "spec"]
|
|
80
|
+
};
|
|
@@ -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
|
+
maxLength: number;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
required: string[];
|
|
28
|
+
};
|
|
29
|
+
spec: {
|
|
30
|
+
description: string;
|
|
31
|
+
type: string;
|
|
32
|
+
properties: {
|
|
33
|
+
credentials: {
|
|
34
|
+
description: string;
|
|
35
|
+
type: string;
|
|
36
|
+
properties: {
|
|
37
|
+
username: {
|
|
38
|
+
description: string;
|
|
39
|
+
type: string;
|
|
40
|
+
readOnly: boolean;
|
|
41
|
+
minLength: number;
|
|
42
|
+
maxLength: number;
|
|
43
|
+
};
|
|
44
|
+
password: {
|
|
45
|
+
description: string;
|
|
46
|
+
type: string;
|
|
47
|
+
writeOnly: boolean;
|
|
48
|
+
maxLength: number;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
required: string[];
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
required: string[];
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
required: string[];
|
|
58
|
+
};
|
|
59
|
+
export default _default;
|