@routr/common 2.0.8-alpha.17 → 2.0.8-alpha.18
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 +2 -2
- package/dist/connect/api/client.js +8 -10
- package/dist/connect/api/types.d.ts +4 -4
- package/dist/connect/config.d.ts +5 -5
- package/dist/connect/grpc_client.d.ts +2 -2
- package/dist/connect/index.d.ts +1 -1
- package/dist/connect/index.js +1 -1
- 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 +2 -0
- package/dist/connect/mappers/assertions.js +31 -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 +21 -0
- package/dist/connect/mappers/trunk.d.ts +3 -0
- package/dist/connect/mappers/trunk.js +34 -0
- package/dist/connect/protos/acl.proto +11 -16
- package/dist/connect/protos/agents.proto +19 -23
- package/dist/connect/protos/credentials.proto +8 -10
- package/dist/connect/protos/domains.proto +16 -18
- package/dist/connect/protos/numbers.proto +15 -25
- package/dist/connect/protos/peers.proto +21 -33
- package/dist/connect/protos/trunks.proto +16 -24
- package/dist/connect/schemas/acl.d.ts +2 -0
- package/dist/connect/schemas/acl.js +4 -2
- package/dist/connect/schemas/agent.d.ts +2 -0
- package/dist/connect/schemas/agent.js +6 -4
- package/dist/connect/schemas/crendentials.d.ts +4 -0
- package/dist/connect/schemas/crendentials.js +7 -3
- package/dist/connect/schemas/domain.d.ts +2 -0
- package/dist/connect/schemas/domain.js +4 -2
- package/dist/connect/schemas/number.d.ts +4 -0
- package/dist/connect/schemas/number.js +7 -3
- package/dist/connect/schemas/peer.d.ts +2 -0
- package/dist/connect/schemas/peer.js +5 -3
- package/dist/connect/schemas/trunk.d.ts +3 -0
- package/dist/connect/schemas/trunk.js +20 -4
- package/dist/connect/types.d.ts +18 -6
- package/dist/helper.js +2 -2
- package/dist/types.d.ts +12 -20
- package/dist/types.js +9 -23
- package/package.json +2 -2
- package/dist/connect/converters.d.ts +0 -10
- package/dist/connect/converters.js +0 -178
|
@@ -45,8 +45,10 @@ service Domains {
|
|
|
45
45
|
message EgressPolicy {
|
|
46
46
|
// The pattern to match
|
|
47
47
|
string rule = 1;
|
|
48
|
+
// Reference to the number to use for egress
|
|
49
|
+
string number_ref = 2;
|
|
48
50
|
// The egress Number
|
|
49
|
-
fonoster.routr.connect.numbers.v2draft1.Number number =
|
|
51
|
+
fonoster.routr.connect.numbers.v2draft1.Number number = 3;
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
// The message for the Domain resource
|
|
@@ -73,36 +75,32 @@ message Domain {
|
|
|
73
75
|
|
|
74
76
|
// The request message for Domains.Create
|
|
75
77
|
message CreateDomainRequest {
|
|
76
|
-
// The API version of the Domain
|
|
77
|
-
string api_version = 1;
|
|
78
78
|
// The name of the Domain
|
|
79
|
-
string name =
|
|
79
|
+
string name = 1;
|
|
80
80
|
// The domain_uri of the Domain
|
|
81
|
-
string domain_uri =
|
|
82
|
-
//
|
|
83
|
-
|
|
81
|
+
string domain_uri = 2;
|
|
82
|
+
// Reference to the ACL to use for this Domain
|
|
83
|
+
string access_control_list_ref = 3;
|
|
84
84
|
// The egress_policy of the Domain
|
|
85
|
-
repeated EgressPolicy egress_policies =
|
|
85
|
+
repeated EgressPolicy egress_policies = 4;
|
|
86
86
|
// The extended attributes of the Domain
|
|
87
|
-
.google.protobuf.Struct extended =
|
|
87
|
+
.google.protobuf.Struct extended = 5;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
// The request message for Domains.Update
|
|
91
91
|
message UpdateDomainRequest {
|
|
92
|
-
// The API version of the Domain
|
|
93
|
-
string api_version = 1;
|
|
94
92
|
// The unique identifier of the Domain
|
|
95
|
-
string ref =
|
|
93
|
+
string ref = 1;
|
|
96
94
|
// The name of the Domain
|
|
97
|
-
string name =
|
|
95
|
+
string name = 2;
|
|
98
96
|
// The domain_uri of the Domain
|
|
99
|
-
string domain_uri =
|
|
100
|
-
//
|
|
101
|
-
|
|
97
|
+
string domain_uri = 3;
|
|
98
|
+
// Reference to the ACL to use for this Domain
|
|
99
|
+
string access_control_list_ref = 4;
|
|
102
100
|
// The egress_policy of the Domain
|
|
103
|
-
repeated EgressPolicy egress_policies =
|
|
101
|
+
repeated EgressPolicy egress_policies = 5;
|
|
104
102
|
// The extended attributes of the Domain
|
|
105
|
-
.google.protobuf.Struct extended =
|
|
103
|
+
.google.protobuf.Struct extended = 6;
|
|
106
104
|
}
|
|
107
105
|
|
|
108
106
|
// The request message for Domains.Get
|
|
@@ -98,46 +98,36 @@ message CreateNumberRequest {
|
|
|
98
98
|
string session_affinity_header = 8;
|
|
99
99
|
// Extra headers to send to the trunk
|
|
100
100
|
repeated ExtraHeader extra_headers = 9;
|
|
101
|
-
//
|
|
102
|
-
|
|
103
|
-
// The date when the Number was last updated
|
|
104
|
-
int32 updated_at = 11;
|
|
105
|
-
// The trunk this number is associated with
|
|
106
|
-
fonoster.routr.connect.trunks.v2draft1.Trunk trunk = 12;
|
|
101
|
+
// Reference to the trunk this number is associated with
|
|
102
|
+
string trunk_ref = 10;
|
|
107
103
|
// The extended attributes of the Number
|
|
108
|
-
.google.protobuf.Struct extended =
|
|
104
|
+
.google.protobuf.Struct extended = 11;
|
|
109
105
|
}
|
|
110
106
|
|
|
111
107
|
// The request message for Numbers.Update
|
|
112
108
|
message UpdateNumberRequest {
|
|
113
|
-
// The version of the Number
|
|
114
|
-
string api_version = 1;
|
|
115
109
|
// The unique identifier of the Number
|
|
116
|
-
string ref =
|
|
110
|
+
string ref = 1;
|
|
117
111
|
// The name of the Number
|
|
118
|
-
string name =
|
|
112
|
+
string name = 2;
|
|
119
113
|
// The tel_url of the Number
|
|
120
|
-
string tel_url =
|
|
114
|
+
string tel_url = 3;
|
|
121
115
|
// The aor_link of the Number
|
|
122
|
-
string aor_link =
|
|
116
|
+
string aor_link = 4;
|
|
123
117
|
// The city of the Number
|
|
124
|
-
string city =
|
|
118
|
+
string city = 5;
|
|
125
119
|
// The country of the Number
|
|
126
|
-
string country =
|
|
120
|
+
string country = 6;
|
|
127
121
|
// The country_iso_code of the Number
|
|
128
|
-
string country_iso_code =
|
|
122
|
+
string country_iso_code = 7;
|
|
129
123
|
// The header to use for session affinity
|
|
130
|
-
string session_affinity_header =
|
|
124
|
+
string session_affinity_header = 8;
|
|
131
125
|
// Extra headers to send to the trunk
|
|
132
|
-
repeated ExtraHeader extra_headers =
|
|
133
|
-
//
|
|
134
|
-
|
|
135
|
-
// The date when the Number was last updated
|
|
136
|
-
int32 updated_at = 12;
|
|
137
|
-
// The trunk this number is associated with
|
|
138
|
-
fonoster.routr.connect.trunks.v2draft1.Trunk trunk = 13;
|
|
126
|
+
repeated ExtraHeader extra_headers = 9;
|
|
127
|
+
// Reference to the trunk this number is associated with
|
|
128
|
+
string trunk_ref = 10;
|
|
139
129
|
// The extended attributes of the Number
|
|
140
|
-
.google.protobuf.Struct extended =
|
|
130
|
+
.google.protobuf.Struct extended = 11;
|
|
141
131
|
}
|
|
142
132
|
|
|
143
133
|
// The request message for Numbers.Get
|
|
@@ -71,56 +71,44 @@ message Peer {
|
|
|
71
71
|
|
|
72
72
|
// The request message for the Peers.Create method
|
|
73
73
|
message CreatePeerRequest {
|
|
74
|
-
// The API version of the Peer
|
|
75
|
-
string api_version = 1;
|
|
76
74
|
// The name of the Peer
|
|
77
|
-
string name =
|
|
75
|
+
string name = 1;
|
|
78
76
|
// The username of the Peer
|
|
79
|
-
string username =
|
|
77
|
+
string username = 2;
|
|
80
78
|
// The address of record of the Peer
|
|
81
|
-
string aor =
|
|
79
|
+
string aor = 3;
|
|
82
80
|
// The contact address of the Peer
|
|
83
|
-
string contact_addr =
|
|
81
|
+
string contact_addr = 4;
|
|
84
82
|
// The status of the Peer
|
|
85
|
-
bool enabled =
|
|
86
|
-
//
|
|
87
|
-
|
|
88
|
-
//
|
|
89
|
-
|
|
90
|
-
//The list of IP addresses that are allowed to access the Peer
|
|
91
|
-
fonoster.routr.connect.acl.v2draft1.AccessControlList access_control_list = 9;
|
|
92
|
-
// The credentials of the Peer
|
|
93
|
-
fonoster.routr.connect.credentials.v2draft1.Credentials credentials = 10;
|
|
83
|
+
bool enabled = 5;
|
|
84
|
+
// Reference to the ACL of the Peer
|
|
85
|
+
string access_control_list_ref = 6;
|
|
86
|
+
// Reference to the Credentials of the Peer
|
|
87
|
+
string credentials_ref = 7;
|
|
94
88
|
// The extended attributes of the Peer
|
|
95
|
-
.google.protobuf.Struct extended =
|
|
89
|
+
.google.protobuf.Struct extended = 8;
|
|
96
90
|
}
|
|
97
91
|
|
|
98
92
|
// The request message for the Peers.Update method
|
|
99
93
|
message UpdatePeerRequest {
|
|
100
|
-
// The API version of the Peer
|
|
101
|
-
string api_version = 1;
|
|
102
94
|
// The unique identifier of the Peer
|
|
103
|
-
string ref =
|
|
95
|
+
string ref = 1;
|
|
104
96
|
// The name of the Peer
|
|
105
|
-
string name =
|
|
97
|
+
string name = 2;
|
|
106
98
|
// The username of the Peer
|
|
107
|
-
string username =
|
|
99
|
+
string username = 3;
|
|
108
100
|
// The address of record of the Peer
|
|
109
|
-
string aor =
|
|
101
|
+
string aor = 4;
|
|
110
102
|
// The contact address of the Peer
|
|
111
|
-
string contact_addr =
|
|
103
|
+
string contact_addr = 5;
|
|
112
104
|
// The status of the Peer
|
|
113
|
-
bool enabled =
|
|
114
|
-
//
|
|
115
|
-
|
|
116
|
-
//
|
|
117
|
-
|
|
118
|
-
// The list of IP addresses that are allowed to access the Peer
|
|
119
|
-
fonoster.routr.connect.acl.v2draft1.AccessControlList access_control_list = 10;
|
|
120
|
-
// The credentials of the Peer
|
|
121
|
-
fonoster.routr.connect.credentials.v2draft1.Credentials credentials = 11;
|
|
105
|
+
bool enabled = 6;
|
|
106
|
+
// Reference to the ACL of the Peer
|
|
107
|
+
string access_control_list_ref = 7;
|
|
108
|
+
// Reference to the Credentials of the Peer
|
|
109
|
+
string credentials_ref = 8;
|
|
122
110
|
// The extended attributes of the Peer
|
|
123
|
-
.google.protobuf.Struct extended =
|
|
111
|
+
.google.protobuf.Struct extended = 9;
|
|
124
112
|
}
|
|
125
113
|
|
|
126
114
|
// The request message for the Peers.Get method
|
|
@@ -97,20 +97,16 @@ message CreateTrunkRequest {
|
|
|
97
97
|
bool send_register = 3;
|
|
98
98
|
// The URI for inbound requests
|
|
99
99
|
string inbound_uri = 4;
|
|
100
|
-
//
|
|
101
|
-
|
|
102
|
-
//
|
|
103
|
-
|
|
104
|
-
//
|
|
105
|
-
|
|
106
|
-
// The credentials to use when authenticating with the Trunk
|
|
107
|
-
fonoster.routr.connect.credentials.v2draft1.Credentials inbound_credentials = 8;
|
|
108
|
-
// The credentials to use when authenticating with the Provider
|
|
109
|
-
fonoster.routr.connect.credentials.v2draft1.Credentials outbound_credentials = 9;
|
|
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;
|
|
110
106
|
// The list of URIs for the Trunk
|
|
111
|
-
repeated TrunkURI uris =
|
|
107
|
+
repeated TrunkURI uris = 8;
|
|
112
108
|
// The extended attributes of the Trunk
|
|
113
|
-
.google.protobuf.Struct extended =
|
|
109
|
+
.google.protobuf.Struct extended = 9;
|
|
114
110
|
}
|
|
115
111
|
|
|
116
112
|
// The message for the Trunk.Update
|
|
@@ -125,20 +121,16 @@ message UpdateTrunkRequest {
|
|
|
125
121
|
bool send_register = 4;
|
|
126
122
|
// The URI for inbound requests
|
|
127
123
|
string inbound_uri = 5;
|
|
128
|
-
//
|
|
129
|
-
|
|
130
|
-
//
|
|
131
|
-
|
|
132
|
-
//
|
|
133
|
-
|
|
134
|
-
// The credentials to use when authenticating with the Trunk
|
|
135
|
-
fonoster.routr.connect.credentials.v2draft1.Credentials inbound_credentials = 9;
|
|
136
|
-
// The credentials to use when authenticating with the Provider
|
|
137
|
-
fonoster.routr.connect.credentials.v2draft1.Credentials outbound_credentials = 10;
|
|
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;
|
|
138
130
|
// The list of URIs for the Trunk
|
|
139
|
-
repeated TrunkURI uris =
|
|
131
|
+
repeated TrunkURI uris = 9;
|
|
140
132
|
// The extended attributes of the Trunk
|
|
141
|
-
.google.protobuf.Struct extended =
|
|
133
|
+
.google.protobuf.Struct extended = 10;
|
|
142
134
|
}
|
|
143
135
|
|
|
144
136
|
// The message for the Trunk.Get
|
|
@@ -25,7 +25,7 @@ exports.default = {
|
|
|
25
25
|
type: "object",
|
|
26
26
|
properties: {
|
|
27
27
|
apiVersion: {
|
|
28
|
-
enum: ["v2draft1", "v2
|
|
28
|
+
enum: ["v2draft1", "v2"]
|
|
29
29
|
},
|
|
30
30
|
kind: {
|
|
31
31
|
enum: ["AccessControlList", "accesscontrollist"]
|
|
@@ -40,7 +40,9 @@ exports.default = {
|
|
|
40
40
|
properties: {
|
|
41
41
|
name: {
|
|
42
42
|
description: "Resource's friendly name",
|
|
43
|
-
type: "string"
|
|
43
|
+
type: "string",
|
|
44
|
+
minLength: 3,
|
|
45
|
+
maxLength: 64
|
|
44
46
|
}
|
|
45
47
|
},
|
|
46
48
|
required: ["name"]
|
|
@@ -25,7 +25,7 @@ exports.default = {
|
|
|
25
25
|
type: "object",
|
|
26
26
|
properties: {
|
|
27
27
|
apiVersion: {
|
|
28
|
-
enum: ["v2draft1", "v2
|
|
28
|
+
enum: ["v2draft1", "v2"]
|
|
29
29
|
},
|
|
30
30
|
kind: {
|
|
31
31
|
enum: ["Agent", "agent"]
|
|
@@ -40,7 +40,9 @@ exports.default = {
|
|
|
40
40
|
properties: {
|
|
41
41
|
name: {
|
|
42
42
|
description: "Resource's friendly name",
|
|
43
|
-
type: "string"
|
|
43
|
+
type: "string",
|
|
44
|
+
minLength: 3,
|
|
45
|
+
maxLength: 64
|
|
44
46
|
}
|
|
45
47
|
},
|
|
46
48
|
required: ["name"]
|
|
@@ -53,7 +55,7 @@ exports.default = {
|
|
|
53
55
|
description: "The username for the Agent",
|
|
54
56
|
type: "string",
|
|
55
57
|
minLength: 3,
|
|
56
|
-
maxLength:
|
|
58
|
+
maxLength: 64,
|
|
57
59
|
readOnly: true
|
|
58
60
|
},
|
|
59
61
|
domainRef: {
|
|
@@ -69,7 +71,7 @@ exports.default = {
|
|
|
69
71
|
type: "boolean"
|
|
70
72
|
},
|
|
71
73
|
privacy: {
|
|
72
|
-
enum: ["Private", "None", "private", "none"]
|
|
74
|
+
enum: ["PRIVATE", "NONE", "Private", "None", "private", "none"]
|
|
73
75
|
}
|
|
74
76
|
},
|
|
75
77
|
required: ["username"]
|
|
@@ -21,6 +21,8 @@ declare const _default: {
|
|
|
21
21
|
name: {
|
|
22
22
|
description: string;
|
|
23
23
|
type: string;
|
|
24
|
+
minLength: number;
|
|
25
|
+
maxLength: number;
|
|
24
26
|
};
|
|
25
27
|
};
|
|
26
28
|
required: string[];
|
|
@@ -37,6 +39,8 @@ declare const _default: {
|
|
|
37
39
|
description: string;
|
|
38
40
|
type: string;
|
|
39
41
|
readOnly: boolean;
|
|
42
|
+
minLength: number;
|
|
43
|
+
maxLength: number;
|
|
40
44
|
};
|
|
41
45
|
password: {
|
|
42
46
|
description: string;
|
|
@@ -25,7 +25,7 @@ exports.default = {
|
|
|
25
25
|
type: "object",
|
|
26
26
|
properties: {
|
|
27
27
|
apiVersion: {
|
|
28
|
-
enum: ["v2draft1", "v2
|
|
28
|
+
enum: ["v2draft1", "v2"]
|
|
29
29
|
},
|
|
30
30
|
kind: {
|
|
31
31
|
enum: ["Credentials", "credentials"]
|
|
@@ -40,7 +40,9 @@ exports.default = {
|
|
|
40
40
|
properties: {
|
|
41
41
|
name: {
|
|
42
42
|
description: "Resource's friendly name",
|
|
43
|
-
type: "string"
|
|
43
|
+
type: "string",
|
|
44
|
+
minLength: 3,
|
|
45
|
+
maxLength: 64
|
|
44
46
|
}
|
|
45
47
|
},
|
|
46
48
|
required: ["name"]
|
|
@@ -56,7 +58,9 @@ exports.default = {
|
|
|
56
58
|
username: {
|
|
57
59
|
description: "Username",
|
|
58
60
|
type: "string",
|
|
59
|
-
readOnly: true
|
|
61
|
+
readOnly: true,
|
|
62
|
+
minLength: 3,
|
|
63
|
+
maxLength: 64
|
|
60
64
|
},
|
|
61
65
|
password: {
|
|
62
66
|
description: "Password",
|
|
@@ -25,7 +25,7 @@ exports.default = {
|
|
|
25
25
|
type: "object",
|
|
26
26
|
properties: {
|
|
27
27
|
apiVersion: {
|
|
28
|
-
enum: ["v2draft1", "v2
|
|
28
|
+
enum: ["v2draft1", "v2"]
|
|
29
29
|
},
|
|
30
30
|
kind: {
|
|
31
31
|
enum: ["Domain", "domain"]
|
|
@@ -40,7 +40,9 @@ exports.default = {
|
|
|
40
40
|
properties: {
|
|
41
41
|
name: {
|
|
42
42
|
description: "Resource's friendly name",
|
|
43
|
-
type: "string"
|
|
43
|
+
type: "string",
|
|
44
|
+
minLength: 3,
|
|
45
|
+
maxLength: 64
|
|
44
46
|
}
|
|
45
47
|
},
|
|
46
48
|
required: ["name"]
|
|
@@ -21,6 +21,8 @@ declare const _default: {
|
|
|
21
21
|
name: {
|
|
22
22
|
description: string;
|
|
23
23
|
type: string;
|
|
24
|
+
minLength: number;
|
|
25
|
+
maxLength: number;
|
|
24
26
|
};
|
|
25
27
|
};
|
|
26
28
|
required: string[];
|
|
@@ -44,6 +46,8 @@ declare const _default: {
|
|
|
44
46
|
aorLink: {
|
|
45
47
|
description: string;
|
|
46
48
|
type: string;
|
|
49
|
+
minLength: number;
|
|
50
|
+
maxLength: number;
|
|
47
51
|
};
|
|
48
52
|
sessionAffinityHeader: {
|
|
49
53
|
description: string;
|
|
@@ -25,7 +25,7 @@ exports.default = {
|
|
|
25
25
|
type: "object",
|
|
26
26
|
properties: {
|
|
27
27
|
apiVersion: {
|
|
28
|
-
enum: ["v2draft1", "v2
|
|
28
|
+
enum: ["v2draft1", "v2"]
|
|
29
29
|
},
|
|
30
30
|
kind: {
|
|
31
31
|
enum: ["Number", "number"]
|
|
@@ -40,7 +40,9 @@ exports.default = {
|
|
|
40
40
|
properties: {
|
|
41
41
|
name: {
|
|
42
42
|
description: "Resource's friendly name",
|
|
43
|
-
type: "string"
|
|
43
|
+
type: "string",
|
|
44
|
+
minLength: 3,
|
|
45
|
+
maxLength: 64
|
|
44
46
|
}
|
|
45
47
|
},
|
|
46
48
|
required: ["name"]
|
|
@@ -63,7 +65,9 @@ exports.default = {
|
|
|
63
65
|
},
|
|
64
66
|
aorLink: {
|
|
65
67
|
description: "AOR link",
|
|
66
|
-
type: "string"
|
|
68
|
+
type: "string",
|
|
69
|
+
minLength: 3,
|
|
70
|
+
maxLength: 255
|
|
67
71
|
},
|
|
68
72
|
sessionAffinityHeader: {
|
|
69
73
|
description: "Session affinity",
|
|
@@ -25,7 +25,7 @@ exports.default = {
|
|
|
25
25
|
type: "object",
|
|
26
26
|
properties: {
|
|
27
27
|
apiVersion: {
|
|
28
|
-
enum: ["v2draft1", "v2
|
|
28
|
+
enum: ["v2draft1", "v2"]
|
|
29
29
|
},
|
|
30
30
|
kind: {
|
|
31
31
|
enum: ["Peer", "peer"]
|
|
@@ -40,7 +40,9 @@ exports.default = {
|
|
|
40
40
|
properties: {
|
|
41
41
|
name: {
|
|
42
42
|
description: "Resource's friendly name",
|
|
43
|
-
type: "string"
|
|
43
|
+
type: "string",
|
|
44
|
+
minLength: 3,
|
|
45
|
+
maxLength: 64
|
|
44
46
|
}
|
|
45
47
|
},
|
|
46
48
|
required: ["name"]
|
|
@@ -53,7 +55,7 @@ exports.default = {
|
|
|
53
55
|
description: "The username for the Peer",
|
|
54
56
|
type: "string",
|
|
55
57
|
minLength: 3,
|
|
56
|
-
maxLength:
|
|
58
|
+
maxLength: 64,
|
|
57
59
|
readOnly: true
|
|
58
60
|
},
|
|
59
61
|
aor: {
|
|
@@ -21,6 +21,8 @@ declare const _default: {
|
|
|
21
21
|
name: {
|
|
22
22
|
description: string;
|
|
23
23
|
type: string;
|
|
24
|
+
minLength: number;
|
|
25
|
+
maxLength: number;
|
|
24
26
|
};
|
|
25
27
|
};
|
|
26
28
|
required: string[];
|
|
@@ -36,6 +38,7 @@ declare const _default: {
|
|
|
36
38
|
uri: {
|
|
37
39
|
description: string;
|
|
38
40
|
type: string;
|
|
41
|
+
maxLength: number;
|
|
39
42
|
};
|
|
40
43
|
accessControlListRef: {
|
|
41
44
|
description: string;
|
|
@@ -25,7 +25,7 @@ exports.default = {
|
|
|
25
25
|
type: "object",
|
|
26
26
|
properties: {
|
|
27
27
|
apiVersion: {
|
|
28
|
-
enum: ["v2draft1", "v2
|
|
28
|
+
enum: ["v2draft1", "v2"]
|
|
29
29
|
},
|
|
30
30
|
kind: {
|
|
31
31
|
enum: ["Trunk", "trunk"]
|
|
@@ -40,7 +40,9 @@ exports.default = {
|
|
|
40
40
|
properties: {
|
|
41
41
|
name: {
|
|
42
42
|
description: "Resource's friendly name",
|
|
43
|
-
type: "string"
|
|
43
|
+
type: "string",
|
|
44
|
+
minLength: 3,
|
|
45
|
+
maxLength: 64
|
|
44
46
|
}
|
|
45
47
|
},
|
|
46
48
|
required: ["name"]
|
|
@@ -55,7 +57,8 @@ exports.default = {
|
|
|
55
57
|
properties: {
|
|
56
58
|
uri: {
|
|
57
59
|
description: "URI of the inbound endpoint",
|
|
58
|
-
type: "string"
|
|
60
|
+
type: "string",
|
|
61
|
+
maxLength: 255
|
|
59
62
|
},
|
|
60
63
|
accessControlListRef: {
|
|
61
64
|
description: "Reference to the ACL to be used for inbound traffic",
|
|
@@ -100,7 +103,20 @@ exports.default = {
|
|
|
100
103
|
},
|
|
101
104
|
transport: {
|
|
102
105
|
description: "Transport of the URI",
|
|
103
|
-
enum: [
|
|
106
|
+
enum: [
|
|
107
|
+
"TCP",
|
|
108
|
+
"SCTP",
|
|
109
|
+
"UDP",
|
|
110
|
+
"TLS",
|
|
111
|
+
"WS",
|
|
112
|
+
"WSS",
|
|
113
|
+
"tcp",
|
|
114
|
+
"sctp",
|
|
115
|
+
"udp",
|
|
116
|
+
"tls",
|
|
117
|
+
"ws",
|
|
118
|
+
"wss"
|
|
119
|
+
]
|
|
104
120
|
},
|
|
105
121
|
user: {
|
|
106
122
|
description: "Username of the URI",
|
package/dist/connect/types.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { JsonObject } from "pb-util/build";
|
|
2
|
+
import { Privacy, Transport } from "../types";
|
|
2
3
|
export declare enum Kind {
|
|
3
4
|
AGENT = "agent",
|
|
4
5
|
PEER = "peer",
|
|
@@ -9,6 +10,7 @@ export declare enum Kind {
|
|
|
9
10
|
CREDENTIALS = "credentials",
|
|
10
11
|
ACL = "accesscontrollist"
|
|
11
12
|
}
|
|
13
|
+
export type KindWithoutUnknown = Exclude<Kind, Kind.UNKNOWN>;
|
|
12
14
|
export declare enum APIVersion {
|
|
13
15
|
V2DRAFT1 = "v2draft1",
|
|
14
16
|
V2 = "v2"
|
|
@@ -19,7 +21,7 @@ export interface BaseConnectModel {
|
|
|
19
21
|
name: string;
|
|
20
22
|
createdAt?: Date;
|
|
21
23
|
updatedAt?: Date;
|
|
22
|
-
extended?:
|
|
24
|
+
extended?: JsonObject;
|
|
23
25
|
}
|
|
24
26
|
export interface AccessControlList extends BaseConnectModel {
|
|
25
27
|
allow: string[];
|
|
@@ -27,18 +29,22 @@ export interface AccessControlList extends BaseConnectModel {
|
|
|
27
29
|
}
|
|
28
30
|
export interface Domain extends BaseConnectModel {
|
|
29
31
|
domainUri: string;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
accessControlListRef?: string;
|
|
33
|
+
accessControlList?: AccessControlList;
|
|
34
|
+
egressPolicies?: EgressPolicy[];
|
|
32
35
|
}
|
|
33
36
|
export interface EgressPolicy {
|
|
34
|
-
|
|
37
|
+
numberRef: string;
|
|
38
|
+
number?: INumber;
|
|
35
39
|
rule: string;
|
|
36
40
|
}
|
|
37
41
|
export interface Agent extends BaseConnectModel {
|
|
38
42
|
username: string;
|
|
39
43
|
privacy: Privacy;
|
|
40
44
|
enabled: boolean;
|
|
45
|
+
domainRef?: string;
|
|
41
46
|
domain?: Domain;
|
|
47
|
+
credentialsRef?: string;
|
|
42
48
|
credentials?: Credentials;
|
|
43
49
|
}
|
|
44
50
|
export interface Credentials extends BaseConnectModel {
|
|
@@ -50,19 +56,23 @@ export interface INumber extends BaseConnectModel {
|
|
|
50
56
|
aorLink: string;
|
|
51
57
|
city: string;
|
|
52
58
|
country: string;
|
|
53
|
-
|
|
59
|
+
countryISOCode: string;
|
|
54
60
|
sessionAffinityHeader: string;
|
|
55
61
|
extraHeaders: {
|
|
56
62
|
name: string;
|
|
57
63
|
value: string;
|
|
58
64
|
}[];
|
|
65
|
+
trunkRef?: string;
|
|
59
66
|
trunk?: Trunk;
|
|
60
67
|
}
|
|
61
68
|
export interface Trunk extends BaseConnectModel {
|
|
62
69
|
sendRegister: boolean;
|
|
63
70
|
inboundUri: string;
|
|
71
|
+
accessControlListRef?: string;
|
|
64
72
|
accessControlList?: AccessControlList;
|
|
73
|
+
inboundCredentialsRef?: string;
|
|
65
74
|
inboundCredentials?: Credentials;
|
|
75
|
+
outboundCredentialsRef?: string;
|
|
66
76
|
outboundCredentials?: Credentials;
|
|
67
77
|
uris: TrunkURI[];
|
|
68
78
|
}
|
|
@@ -80,7 +90,9 @@ export interface Peer extends BaseConnectModel {
|
|
|
80
90
|
aor: string;
|
|
81
91
|
contactAddr: string;
|
|
82
92
|
enabled: boolean;
|
|
93
|
+
accessControlListRef?: string;
|
|
83
94
|
accessControlList?: AccessControlList;
|
|
95
|
+
credentialsRef?: string;
|
|
84
96
|
credentials?: Credentials;
|
|
85
97
|
}
|
|
86
98
|
export type ConnectModel = Agent | Peer | INumber | Trunk | Domain | Credentials | AccessControlList;
|