@routr/common 2.0.8-alpha.2 → 2.0.8-alpha.20
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/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/client.d.ts +8 -0
- package/dist/connect/{grpc_client.js → client.js} +44 -6
- 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 +4 -2
- package/dist/connect/index.js +4 -2
- 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 +25 -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 +155 -0
- package/dist/connect/protos/credentials.proto +114 -0
- package/dist/connect/protos/domains.proto +148 -0
- package/dist/connect/protos/numbers.proto +174 -0
- package/dist/connect/protos/peers.proto +173 -0
- package/dist/connect/protos/trunks.proto +178 -0
- package/dist/connect/schemas/acl.d.ts +63 -0
- package/dist/connect/schemas/acl.js +82 -0
- package/dist/connect/schemas/agent.d.ts +62 -0
- package/dist/connect/schemas/agent.js +81 -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 +75 -0
- package/dist/connect/schemas/domain.js +94 -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 +82 -0
- package/dist/connect/schemas/number.js +101 -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 +119 -0
- package/dist/connect/schemas/trunk.js +151 -0
- package/dist/connect/schemas/validators.d.ts +2 -0
- package/dist/connect/schemas/validators.js +43 -0
- package/dist/connect/types.d.ts +89 -23
- package/dist/connect/types.js +17 -37
- package/dist/errors.d.ts +35 -1
- package/dist/errors.js +51 -5
- package/dist/helper.d.ts +17 -4
- package/dist/helper.js +81 -7
- package/dist/index.d.ts +5 -4
- package/dist/index.js +5 -7
- package/dist/protos/common.proto +0 -2
- package/dist/protos/location.proto +22 -7
- package/dist/protos/sipmessage.proto +2 -0
- package/dist/service.d.ts +2 -2
- package/dist/service.js +1 -1
- package/dist/types.d.ts +52 -30
- package/dist/types.js +18 -11
- package/package.json +11 -5
- 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,178 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2022 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,63 @@
|
|
|
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
|
+
minLength: number;
|
|
25
|
+
maxLength: number;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
required: string[];
|
|
29
|
+
};
|
|
30
|
+
spec: {
|
|
31
|
+
description: string;
|
|
32
|
+
type: string;
|
|
33
|
+
properties: {
|
|
34
|
+
accessControlList: {
|
|
35
|
+
description: string;
|
|
36
|
+
type: string;
|
|
37
|
+
properties: {
|
|
38
|
+
allow: {
|
|
39
|
+
description: string;
|
|
40
|
+
type: string;
|
|
41
|
+
items: {
|
|
42
|
+
type: string;
|
|
43
|
+
};
|
|
44
|
+
minItems: number;
|
|
45
|
+
uniqueItems: boolean;
|
|
46
|
+
};
|
|
47
|
+
deny: {
|
|
48
|
+
description: string;
|
|
49
|
+
type: string;
|
|
50
|
+
items: {
|
|
51
|
+
type: string;
|
|
52
|
+
};
|
|
53
|
+
minItems: number;
|
|
54
|
+
uniqueItems: boolean;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
required: string[];
|
|
62
|
+
};
|
|
63
|
+
export default _default;
|
|
@@ -0,0 +1,82 @@
|
|
|
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"]
|
|
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
|
+
minLength: 3,
|
|
45
|
+
maxLength: 64
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
required: ["name"]
|
|
49
|
+
},
|
|
50
|
+
spec: {
|
|
51
|
+
description: "Operations spec for ACL",
|
|
52
|
+
type: "object",
|
|
53
|
+
properties: {
|
|
54
|
+
accessControlList: {
|
|
55
|
+
description: "An object with deny and allow list of access control rules",
|
|
56
|
+
type: "object",
|
|
57
|
+
properties: {
|
|
58
|
+
allow: {
|
|
59
|
+
description: "Allowed list of access control rules",
|
|
60
|
+
type: "array",
|
|
61
|
+
items: {
|
|
62
|
+
type: "string"
|
|
63
|
+
},
|
|
64
|
+
minItems: 1,
|
|
65
|
+
uniqueItems: true
|
|
66
|
+
},
|
|
67
|
+
deny: {
|
|
68
|
+
description: "Denied list of access control rules",
|
|
69
|
+
type: "array",
|
|
70
|
+
items: {
|
|
71
|
+
type: "string"
|
|
72
|
+
},
|
|
73
|
+
minItems: 1,
|
|
74
|
+
uniqueItems: true
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
required: ["apiVersion", "kind", "ref", "metadata", "spec"]
|
|
82
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
minLength: number;
|
|
25
|
+
maxLength: number;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
required: string[];
|
|
29
|
+
};
|
|
30
|
+
spec: {
|
|
31
|
+
description: string;
|
|
32
|
+
type: string;
|
|
33
|
+
properties: {
|
|
34
|
+
username: {
|
|
35
|
+
description: string;
|
|
36
|
+
type: string;
|
|
37
|
+
minLength: number;
|
|
38
|
+
maxLength: number;
|
|
39
|
+
readOnly: boolean;
|
|
40
|
+
};
|
|
41
|
+
domainRef: {
|
|
42
|
+
description: string;
|
|
43
|
+
type: string;
|
|
44
|
+
};
|
|
45
|
+
credentialsRef: {
|
|
46
|
+
description: string;
|
|
47
|
+
type: string;
|
|
48
|
+
};
|
|
49
|
+
enabled: {
|
|
50
|
+
description: string;
|
|
51
|
+
type: string;
|
|
52
|
+
};
|
|
53
|
+
privacy: {
|
|
54
|
+
enum: string[];
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
required: string[];
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
required: string[];
|
|
61
|
+
};
|
|
62
|
+
export default _default;
|
|
@@ -0,0 +1,81 @@
|
|
|
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"]
|
|
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
|
+
minLength: 3,
|
|
45
|
+
maxLength: 64
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
required: ["name"]
|
|
49
|
+
},
|
|
50
|
+
spec: {
|
|
51
|
+
description: "Operations spec for an Agent",
|
|
52
|
+
type: "object",
|
|
53
|
+
properties: {
|
|
54
|
+
username: {
|
|
55
|
+
description: "The username for the Agent",
|
|
56
|
+
type: "string",
|
|
57
|
+
minLength: 3,
|
|
58
|
+
maxLength: 64,
|
|
59
|
+
readOnly: true
|
|
60
|
+
},
|
|
61
|
+
domainRef: {
|
|
62
|
+
description: "The domain the Agent belongs to",
|
|
63
|
+
type: "string"
|
|
64
|
+
},
|
|
65
|
+
credentialsRef: {
|
|
66
|
+
description: "The credential the Agent uses to authenticate",
|
|
67
|
+
type: "string"
|
|
68
|
+
},
|
|
69
|
+
enabled: {
|
|
70
|
+
description: "Whether the Agent is enabled (reserved for future use)",
|
|
71
|
+
type: "boolean"
|
|
72
|
+
},
|
|
73
|
+
privacy: {
|
|
74
|
+
enum: ["PRIVATE", "NONE", "Private", "None", "private", "none"]
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
required: ["username"]
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
required: ["apiVersion", "kind", "metadata", "spec"]
|
|
81
|
+
};
|
|
@@ -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
|
+
minLength: number;
|
|
25
|
+
maxLength: number;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
required: string[];
|
|
29
|
+
};
|
|
30
|
+
spec: {
|
|
31
|
+
description: string;
|
|
32
|
+
type: string;
|
|
33
|
+
properties: {
|
|
34
|
+
credentials: {
|
|
35
|
+
description: string;
|
|
36
|
+
type: string;
|
|
37
|
+
properties: {
|
|
38
|
+
username: {
|
|
39
|
+
description: string;
|
|
40
|
+
type: string;
|
|
41
|
+
readOnly: boolean;
|
|
42
|
+
minLength: number;
|
|
43
|
+
maxLength: number;
|
|
44
|
+
};
|
|
45
|
+
password: {
|
|
46
|
+
description: string;
|
|
47
|
+
type: string;
|
|
48
|
+
writeOnly: boolean;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
required: 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: "Credentials Schema",
|
|
24
|
+
description: "Credentials resource for Agents and Trunks",
|
|
25
|
+
type: "object",
|
|
26
|
+
properties: {
|
|
27
|
+
apiVersion: {
|
|
28
|
+
enum: ["v2draft1", "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
|
+
minLength: 3,
|
|
45
|
+
maxLength: 64
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
required: ["name"]
|
|
49
|
+
},
|
|
50
|
+
spec: {
|
|
51
|
+
description: "Operations spec for Credentials",
|
|
52
|
+
type: "object",
|
|
53
|
+
properties: {
|
|
54
|
+
credentials: {
|
|
55
|
+
description: "Credential configuration",
|
|
56
|
+
type: "object",
|
|
57
|
+
properties: {
|
|
58
|
+
username: {
|
|
59
|
+
description: "Username",
|
|
60
|
+
type: "string",
|
|
61
|
+
readOnly: true,
|
|
62
|
+
minLength: 3,
|
|
63
|
+
maxLength: 64
|
|
64
|
+
},
|
|
65
|
+
password: {
|
|
66
|
+
description: "Password",
|
|
67
|
+
type: "string",
|
|
68
|
+
writeOnly: true
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
required: ["username", "password"]
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
required: ["credentials"]
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
required: ["apiVersion", "kind", "ref", "metadata", "spec"]
|
|
78
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
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
|
+
minLength: number;
|
|
25
|
+
maxLength: number;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
required: string[];
|
|
29
|
+
};
|
|
30
|
+
spec: {
|
|
31
|
+
description: string;
|
|
32
|
+
type: string;
|
|
33
|
+
properties: {
|
|
34
|
+
context: {
|
|
35
|
+
description: string;
|
|
36
|
+
type: string;
|
|
37
|
+
properties: {
|
|
38
|
+
domainUri: {
|
|
39
|
+
description: string;
|
|
40
|
+
type: string;
|
|
41
|
+
minLength: number;
|
|
42
|
+
maxLength: number;
|
|
43
|
+
};
|
|
44
|
+
accessControlListRef: {
|
|
45
|
+
description: string;
|
|
46
|
+
type: string;
|
|
47
|
+
};
|
|
48
|
+
egressPolicies: {
|
|
49
|
+
description: string;
|
|
50
|
+
type: string;
|
|
51
|
+
items: {
|
|
52
|
+
type: string;
|
|
53
|
+
properties: {
|
|
54
|
+
rule: {
|
|
55
|
+
description: string;
|
|
56
|
+
type: string;
|
|
57
|
+
minLength: number;
|
|
58
|
+
};
|
|
59
|
+
numberRef: {
|
|
60
|
+
description: string;
|
|
61
|
+
type: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
required: string[];
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
required: string[];
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
required: string[];
|
|
74
|
+
};
|
|
75
|
+
export default _default;
|