@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.
Files changed (53) hide show
  1. package/dist/auth.d.ts +2 -2
  2. package/dist/connect/api/client.js +8 -10
  3. package/dist/connect/api/types.d.ts +4 -4
  4. package/dist/connect/config.d.ts +5 -5
  5. package/dist/connect/grpc_client.d.ts +2 -2
  6. package/dist/connect/index.d.ts +1 -1
  7. package/dist/connect/index.js +1 -1
  8. package/dist/connect/mappers/acl.d.ts +3 -0
  9. package/dist/connect/mappers/acl.js +19 -0
  10. package/dist/connect/mappers/agent.d.ts +3 -0
  11. package/dist/connect/mappers/agent.js +42 -0
  12. package/dist/connect/mappers/assertions.d.ts +2 -0
  13. package/dist/connect/mappers/assertions.js +31 -0
  14. package/dist/connect/mappers/credentials.d.ts +3 -0
  15. package/dist/connect/mappers/credentials.js +18 -0
  16. package/dist/connect/mappers/domain.d.ts +3 -0
  17. package/dist/connect/mappers/domain.js +19 -0
  18. package/dist/connect/mappers/index.d.ts +7 -0
  19. package/dist/connect/mappers/index.js +41 -0
  20. package/dist/connect/mappers/number.d.ts +3 -0
  21. package/dist/connect/mappers/number.js +26 -0
  22. package/dist/connect/mappers/peer.d.ts +3 -0
  23. package/dist/connect/mappers/peer.js +21 -0
  24. package/dist/connect/mappers/trunk.d.ts +3 -0
  25. package/dist/connect/mappers/trunk.js +34 -0
  26. package/dist/connect/protos/acl.proto +11 -16
  27. package/dist/connect/protos/agents.proto +19 -23
  28. package/dist/connect/protos/credentials.proto +8 -10
  29. package/dist/connect/protos/domains.proto +16 -18
  30. package/dist/connect/protos/numbers.proto +15 -25
  31. package/dist/connect/protos/peers.proto +21 -33
  32. package/dist/connect/protos/trunks.proto +16 -24
  33. package/dist/connect/schemas/acl.d.ts +2 -0
  34. package/dist/connect/schemas/acl.js +4 -2
  35. package/dist/connect/schemas/agent.d.ts +2 -0
  36. package/dist/connect/schemas/agent.js +6 -4
  37. package/dist/connect/schemas/crendentials.d.ts +4 -0
  38. package/dist/connect/schemas/crendentials.js +7 -3
  39. package/dist/connect/schemas/domain.d.ts +2 -0
  40. package/dist/connect/schemas/domain.js +4 -2
  41. package/dist/connect/schemas/number.d.ts +4 -0
  42. package/dist/connect/schemas/number.js +7 -3
  43. package/dist/connect/schemas/peer.d.ts +2 -0
  44. package/dist/connect/schemas/peer.js +5 -3
  45. package/dist/connect/schemas/trunk.d.ts +3 -0
  46. package/dist/connect/schemas/trunk.js +20 -4
  47. package/dist/connect/types.d.ts +18 -6
  48. package/dist/helper.js +2 -2
  49. package/dist/types.d.ts +12 -20
  50. package/dist/types.js +9 -23
  51. package/package.json +2 -2
  52. package/dist/connect/converters.d.ts +0 -10
  53. 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 = 2;
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 = 2;
79
+ string name = 1;
80
80
  // The domain_uri of the Domain
81
- string domain_uri = 3;
82
- // The list of IP addresses that are allowed to access the Domain
83
- fonoster.routr.connect.acl.v2draft1.AccessControlList access_control_list = 4;
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 = 5;
85
+ repeated EgressPolicy egress_policies = 4;
86
86
  // The extended attributes of the Domain
87
- .google.protobuf.Struct extended = 6;
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 = 2;
93
+ string ref = 1;
96
94
  // The name of the Domain
97
- string name = 3;
95
+ string name = 2;
98
96
  // The domain_uri of the Domain
99
- string domain_uri = 4;
100
- // The list of IP addresses that are allowed to access the Domain
101
- fonoster.routr.connect.acl.v2draft1.AccessControlList access_control_list = 5;
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 = 6;
101
+ repeated EgressPolicy egress_policies = 5;
104
102
  // The extended attributes of the Domain
105
- .google.protobuf.Struct extended = 7;
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
- // The date when the Number was created
102
- int32 created_at = 10;
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 = 13;
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 = 2;
110
+ string ref = 1;
117
111
  // The name of the Number
118
- string name = 3;
112
+ string name = 2;
119
113
  // The tel_url of the Number
120
- string tel_url = 4;
114
+ string tel_url = 3;
121
115
  // The aor_link of the Number
122
- string aor_link = 5;
116
+ string aor_link = 4;
123
117
  // The city of the Number
124
- string city = 6;
118
+ string city = 5;
125
119
  // The country of the Number
126
- string country = 7;
120
+ string country = 6;
127
121
  // The country_iso_code of the Number
128
- string country_iso_code = 8;
122
+ string country_iso_code = 7;
129
123
  // The header to use for session affinity
130
- string session_affinity_header = 9;
124
+ string session_affinity_header = 8;
131
125
  // Extra headers to send to the trunk
132
- repeated ExtraHeader extra_headers = 10;
133
- // The date when the Number was created
134
- int32 created_at = 11;
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 = 14;
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 = 2;
75
+ string name = 1;
78
76
  // The username of the Peer
79
- string username = 3;
77
+ string username = 2;
80
78
  // The address of record of the Peer
81
- string aor = 4;
79
+ string aor = 3;
82
80
  // The contact address of the Peer
83
- string contact_addr = 5;
81
+ string contact_addr = 4;
84
82
  // The status of the Peer
85
- bool enabled = 6;
86
- // The date and time when the Peer was created
87
- int32 created_at = 7;
88
- // The date and time when the Peer was last updated
89
- int32 updated_at = 8;
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 = 11;
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 = 2;
95
+ string ref = 1;
104
96
  // The name of the Peer
105
- string name = 3;
97
+ string name = 2;
106
98
  // The username of the Peer
107
- string username = 4;
99
+ string username = 3;
108
100
  // The address of record of the Peer
109
- string aor = 5;
101
+ string aor = 4;
110
102
  // The contact address of the Peer
111
- string contact_addr = 6;
103
+ string contact_addr = 5;
112
104
  // The status of the Peer
113
- bool enabled = 7;
114
- // The date and time when the Peer was created
115
- int32 created_at = 8;
116
- // The date and time when the Peer was last updated
117
- int32 updated_at = 9;
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 = 12;
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
- // The date and time when the Trunk was created
101
- int32 created_at = 5;
102
- // The date and time when the Trunk was last updated
103
- int32 updated_at = 6;
104
- // The list of IP addresses that are allowed to access the Trunks
105
- fonoster.routr.connect.acl.v2draft1.AccessControlList access_control_list = 7;
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 = 10;
107
+ repeated TrunkURI uris = 8;
112
108
  // The extended attributes of the Trunk
113
- .google.protobuf.Struct extended = 11;
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
- // The date and time when the Trunk was created
129
- int32 created_at = 6;
130
- // The date and time when the Trunk was last updated
131
- int32 updated_at = 7;
132
- // // The list of IP addresses that are allowed to access the Trunks
133
- fonoster.routr.connect.acl.v2draft1.AccessControlList access_control_list = 8;
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 = 11;
131
+ repeated TrunkURI uris = 9;
140
132
  // The extended attributes of the Trunk
141
- .google.protobuf.Struct extended = 12;
133
+ .google.protobuf.Struct extended = 10;
142
134
  }
143
135
 
144
136
  // The message for the Trunk.Get
@@ -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[];
@@ -25,7 +25,7 @@ exports.default = {
25
25
  type: "object",
26
26
  properties: {
27
27
  apiVersion: {
28
- enum: ["v2draft1", "v2.0", "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"]
@@ -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[];
@@ -25,7 +25,7 @@ exports.default = {
25
25
  type: "object",
26
26
  properties: {
27
27
  apiVersion: {
28
- enum: ["v2draft1", "v2.0", "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: 60,
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.0", "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",
@@ -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[];
@@ -25,7 +25,7 @@ exports.default = {
25
25
  type: "object",
26
26
  properties: {
27
27
  apiVersion: {
28
- enum: ["v2draft1", "v2.0", "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.0", "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",
@@ -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[];
@@ -25,7 +25,7 @@ exports.default = {
25
25
  type: "object",
26
26
  properties: {
27
27
  apiVersion: {
28
- enum: ["v2draft1", "v2.0", "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: 60,
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.0", "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: ["tcp", "sctp", "udp", "tls", "ws", "wss"]
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",
@@ -1,4 +1,5 @@
1
- import { JsonData, Privacy, Transport } from "../types";
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?: JsonData;
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
- accessControlList: AccessControlList;
31
- egressPolicies: EgressPolicy[];
32
+ accessControlListRef?: string;
33
+ accessControlList?: AccessControlList;
34
+ egressPolicies?: EgressPolicy[];
32
35
  }
33
36
  export interface EgressPolicy {
34
- number: INumber;
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
- countryIsoCode: string;
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;