@routr/common 2.0.8-alpha.9 → 2.0.9

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 (103) hide show
  1. package/dist/assertions.js +2 -2
  2. package/dist/auth.d.ts +18 -11
  3. package/dist/auth.js +34 -12
  4. package/dist/connect/api/client.d.ts +3 -0
  5. package/dist/connect/api/client.js +158 -0
  6. package/dist/connect/api/index.d.ts +2 -0
  7. package/dist/connect/api/index.js +36 -0
  8. package/dist/connect/api/types.d.ts +51 -0
  9. package/dist/connect/api/types.js +2 -0
  10. package/dist/connect/assertions.d.ts +37 -0
  11. package/dist/connect/assertions.js +112 -0
  12. package/dist/connect/client.d.ts +8 -0
  13. package/dist/connect/client.js +94 -0
  14. package/dist/connect/config.d.ts +113 -0
  15. package/dist/connect/config.js +2 -0
  16. package/dist/connect/connect_error.d.ts +21 -0
  17. package/dist/connect/connect_error.js +44 -0
  18. package/dist/connect/index.d.ts +7 -2
  19. package/dist/connect/index.js +8 -3
  20. package/dist/connect/mappers/acl.d.ts +3 -0
  21. package/dist/connect/mappers/acl.js +19 -0
  22. package/dist/connect/mappers/agent.d.ts +3 -0
  23. package/dist/connect/mappers/agent.js +42 -0
  24. package/dist/connect/mappers/assertions.d.ts +3 -0
  25. package/dist/connect/mappers/assertions.js +43 -0
  26. package/dist/connect/mappers/credentials.d.ts +3 -0
  27. package/dist/connect/mappers/credentials.js +18 -0
  28. package/dist/connect/mappers/domain.d.ts +3 -0
  29. package/dist/connect/mappers/domain.js +19 -0
  30. package/dist/connect/mappers/index.d.ts +7 -0
  31. package/dist/connect/mappers/index.js +41 -0
  32. package/dist/connect/mappers/number.d.ts +3 -0
  33. package/dist/connect/mappers/number.js +26 -0
  34. package/dist/connect/mappers/peer.d.ts +3 -0
  35. package/dist/connect/mappers/peer.js +26 -0
  36. package/dist/connect/mappers/trunk.d.ts +3 -0
  37. package/dist/connect/mappers/trunk.js +34 -0
  38. package/dist/connect/protos/acl.proto +112 -0
  39. package/dist/connect/protos/agents.proto +153 -0
  40. package/dist/connect/protos/credentials.proto +114 -0
  41. package/dist/connect/protos/domains.proto +146 -0
  42. package/dist/connect/protos/numbers.proto +166 -0
  43. package/dist/connect/protos/peers.proto +174 -0
  44. package/dist/connect/protos/trunks.proto +178 -0
  45. package/dist/connect/schemas/acl.d.ts +66 -0
  46. package/dist/connect/schemas/acl.js +85 -0
  47. package/dist/connect/schemas/agent.d.ts +61 -0
  48. package/dist/connect/schemas/agent.js +80 -0
  49. package/dist/connect/schemas/crendentials.d.ts +59 -0
  50. package/dist/connect/schemas/crendentials.js +78 -0
  51. package/dist/connect/schemas/domain.d.ts +72 -0
  52. package/dist/connect/schemas/domain.js +91 -0
  53. package/dist/connect/schemas/index.d.ts +1 -0
  54. package/dist/connect/schemas/index.js +35 -0
  55. package/dist/connect/schemas/number.d.ts +81 -0
  56. package/dist/connect/schemas/number.js +100 -0
  57. package/dist/connect/schemas/peer.d.ts +84 -0
  58. package/dist/connect/schemas/peer.js +103 -0
  59. package/dist/connect/schemas/trunk.d.ts +125 -0
  60. package/dist/connect/schemas/trunk.js +157 -0
  61. package/dist/connect/schemas/validators.d.ts +2 -0
  62. package/dist/connect/schemas/validators.js +43 -0
  63. package/dist/connect/types.d.ts +89 -23
  64. package/dist/connect/types.js +7 -29
  65. package/dist/connect/validations.d.ts +43 -0
  66. package/dist/connect/validations.js +272 -0
  67. package/dist/envs.d.ts +2 -0
  68. package/dist/envs.js +23 -0
  69. package/dist/errors.d.ts +35 -1
  70. package/dist/errors.js +52 -6
  71. package/dist/healthcheck.d.ts +1 -0
  72. package/dist/healthcheck.js +24 -0
  73. package/dist/helper.d.ts +13 -0
  74. package/dist/helper.js +78 -4
  75. package/dist/index.d.ts +8 -4
  76. package/dist/index.js +9 -6
  77. package/dist/ip_utils.js +1 -1
  78. package/dist/protos/common.proto +2 -4
  79. package/dist/protos/location.proto +21 -8
  80. package/dist/protos/processor.proto +8 -6
  81. package/dist/protos/requester.proto +6 -6
  82. package/dist/protos/sipmessage.proto +9 -2
  83. package/dist/protos/verifier.proto +39 -0
  84. package/dist/requester/grpc_client.js +1 -1
  85. package/dist/requester/index.js +1 -1
  86. package/dist/service.d.ts +2 -2
  87. package/dist/service.js +27 -5
  88. package/dist/tracer.js +1 -1
  89. package/dist/types.d.ts +119 -87
  90. package/dist/types.js +79 -69
  91. package/dist/verifier/grpc_client.d.ts +1 -0
  92. package/dist/{connect → verifier}/grpc_client.js +4 -4
  93. package/dist/verifier/index.d.ts +2 -0
  94. package/dist/verifier/index.js +36 -0
  95. package/dist/verifier/types.d.ts +10 -0
  96. package/dist/verifier/types.js +2 -0
  97. package/dist/verifier/verifier.d.ts +3 -0
  98. package/dist/verifier/verifier.js +64 -0
  99. package/package.json +17 -7
  100. package/dist/connect/data_api.d.ts +0 -11
  101. package/dist/connect/data_api.js +0 -91
  102. package/dist/connect/grpc_client.d.ts +0 -1
  103. package/dist/protos/resources.proto +0 -108
@@ -0,0 +1,153 @@
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.agents.v2beta1;
22
+
23
+ import "google/protobuf/struct.proto";
24
+ import "google/protobuf/empty.proto";
25
+ import "domains.proto";
26
+ import "credentials.proto";
27
+
28
+ // The Agents service definition
29
+ service Agents {
30
+ // Creates a new Agent
31
+ rpc Create (CreateAgentRequest) returns (Agent) {}
32
+ // Updates an existing Agent
33
+ rpc Update (UpdateAgentRequest) returns (Agent) {}
34
+ // Gets an existing Agent
35
+ rpc Get (GetAgentRequest) returns (Agent) {}
36
+ // Deletes an existing Agent
37
+ rpc Delete (DeleteAgentRequest) returns (.google.protobuf.Empty) {}
38
+ // Lists all Agents
39
+ rpc List (ListAgentsRequest) returns (ListAgentsResponse) {}
40
+ // Find Agents by field name and value
41
+ rpc FindBy (FindByRequest) returns (FindByResponse) {}
42
+ }
43
+
44
+ enum Privacy {
45
+ PRIVATE = 0;
46
+ NONE = 1;
47
+ }
48
+
49
+ // The message for the Agent resource
50
+ message Agent {
51
+ // The API version of the Agent
52
+ string api_version = 1;
53
+ // The unique identifier of the Agent
54
+ string ref = 2;
55
+ // The name of the Agent
56
+ string name = 3;
57
+ // The username of the Agent
58
+ string username = 4;
59
+ // The password of the Agent
60
+ Privacy privacy = 5;
61
+ // The enabled status of the Agent
62
+ bool enabled = 6;
63
+ // The created_at timestamp of the Agent
64
+ int32 created_at = 7;
65
+ // The updated_at timestamp of the Agent
66
+ int32 updated_at = 8;
67
+ // The domain of the Agent
68
+ fonoster.routr.connect.domains.v2beta1.Domain domain = 9;
69
+ // The credentials of the Agent
70
+ fonoster.routr.connect.credentials.v2beta1.Credentials credentials = 10;
71
+ // The extended attributes of the Agent
72
+ .google.protobuf.Struct extended = 11;
73
+ }
74
+
75
+ // The request message for the Agents.Create method
76
+ message CreateAgentRequest {
77
+ // The name of the Agent
78
+ string name = 1;
79
+ // The username of the Agent
80
+ string username = 2;
81
+ // The password of the Agent
82
+ Privacy privacy = 3;
83
+ // The enabled status of the Agent
84
+ bool enabled = 4;
85
+ // Reference to the Domain of the Agent
86
+ string domain_ref = 5;
87
+ // Reference to the Credentials of the Agent
88
+ string credentials_ref = 6;
89
+ // The extended attributes of the Agent
90
+ .google.protobuf.Struct extended = 7;
91
+ }
92
+
93
+ // The request message for the Agents.Update method
94
+ message UpdateAgentRequest {
95
+ // The unique identifier of the Agent
96
+ string ref = 1;
97
+ // The name of the Agent
98
+ string name = 2;
99
+ // The privacy settings of the Agent
100
+ Privacy privacy = 3;
101
+ // The enabled status of the Agent
102
+ bool enabled = 4;
103
+ // Reference to the Domain of the Agent
104
+ string domain_ref = 5;
105
+ // Reference to the Credentials of the Agent
106
+ string credentials_ref = 6;
107
+ // The extended attributes of the Agent
108
+ .google.protobuf.Struct extended = 7;
109
+ }
110
+
111
+ // The request message for the Agents.Get method
112
+ message GetAgentRequest {
113
+ // The unique identifier of the Agent
114
+ string ref = 1;
115
+ }
116
+
117
+ // The request message for the Agents.Delete method
118
+ message DeleteAgentRequest {
119
+ // The unique identifier of the Agent
120
+ string ref = 1;
121
+ }
122
+
123
+ // The request message for the Agents.FindBy method
124
+ message FindByRequest {
125
+ // The field name to search
126
+ string field_name = 1;
127
+ // The value to search
128
+ string field_value = 2;
129
+ }
130
+
131
+ // The response message for the Agents.FindBy method
132
+ message FindByResponse {
133
+ // The list of Agents
134
+ repeated Agent items = 1;
135
+ }
136
+
137
+ // The request message for the Agents.List method
138
+ message ListAgentsRequest {
139
+ // The maximum number of items in the list
140
+ int32 page_size = 1;
141
+
142
+ // The next_page_token value returned from the previous request, if any
143
+ string page_token = 2;
144
+ }
145
+
146
+ // The response message for the Agents.List method
147
+ message ListAgentsResponse {
148
+ // List of Agents
149
+ repeated Agent items = 1;
150
+
151
+ // Token to retrieve the next page of results, or empty if there are no more results in the list
152
+ string next_page_token = 2;
153
+ }
@@ -0,0 +1,114 @@
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.credentials.v2beta1;
22
+
23
+ import "google/protobuf/struct.proto";
24
+ import "google/protobuf/empty.proto";
25
+
26
+ // The Credentials service definition
27
+ service CredentialsService {
28
+ // Creates a new set of Credentials
29
+ rpc Create (CreateCredentialsRequest) returns (Credentials) {}
30
+ // Updates an existing set of C redentials
31
+ rpc Update (UpdateCredentialsRequest) returns (Credentials) {}
32
+ // Gets the details of a given set of Credentials
33
+ rpc Get (GetCredentialsRequest) returns (Credentials) {}
34
+ // Deletes an existing set of Credentials
35
+ rpc Delete (DeleteCredentialsRequest) returns (.google.protobuf.Empty) {}
36
+ // Lists all Credentials
37
+ rpc List (ListCredentialsRequest) returns (ListCredentialsResponse) {}
38
+ }
39
+
40
+ // The message for the Credentials resource
41
+ message Credentials {
42
+ // The API version of the Credentials
43
+ string api_version = 1;
44
+ // The reference of the Credentials
45
+ string ref = 2;
46
+ // The name of the Credentials
47
+ string name = 3;
48
+ // The username of the Credentials
49
+ string username = 4;
50
+ // The password of the Credentials
51
+ string password = 5;
52
+ // The time the Credentials was created
53
+ int32 created_at = 6;
54
+ // The time the Credentials was updated
55
+ int32 updated_at = 7;
56
+ // The extended attributes for a set of Credentials
57
+ .google.protobuf.Struct extended = 8;
58
+ }
59
+
60
+ // The request message for the CreateCredentials.Create method
61
+ message CreateCredentialsRequest {
62
+ // The name of the Credentials
63
+ string name = 1;
64
+ // The username of the Credentials
65
+ string username = 2;
66
+ // The password of the Credentials
67
+ string password = 3;
68
+ // The extended attributes for a set of Credentials
69
+ .google.protobuf.Struct extended = 4;
70
+ }
71
+
72
+ // The request message for the UpdateCredentials.Update method
73
+ message UpdateCredentialsRequest {
74
+ // The reference of the Credentials to update
75
+ string ref = 1;
76
+ // The new name of the Credentials
77
+ string name = 2;
78
+ // The new username of the Credentials
79
+ string username = 3;
80
+ // The new password of the Credentials
81
+ string password = 4;
82
+ // The extended attributes for a set of Credentials
83
+ .google.protobuf.Struct extended = 5;
84
+ }
85
+
86
+ // The request message for the GetCredentials.Get method
87
+ message GetCredentialsRequest {
88
+ // The reference of the Credentials to retrieve
89
+ string ref = 1;
90
+ }
91
+
92
+ // The request message for the DeleteCredentials.Delete method
93
+ message DeleteCredentialsRequest {
94
+ // The reference of the Credentials to delete
95
+ string ref = 1;
96
+ }
97
+
98
+ // The request message for the ListCredentials.List method
99
+ message ListCredentialsRequest {
100
+ // The maximum number of items in the list
101
+ int32 page_size = 1;
102
+
103
+ // The next_page_token value returned from the previous request, if any
104
+ string page_token = 2;
105
+ }
106
+
107
+ // The response message for the ListCredentials.List method
108
+ message ListCredentialsResponse {
109
+ // List of Credentials
110
+ repeated Credentials items = 1;
111
+
112
+ // Token to retrieve the next page of results, or empty if there are no more results in the list
113
+ string next_page_token = 2;
114
+ }
@@ -0,0 +1,146 @@
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.domains.v2beta1;
22
+
23
+ import "google/protobuf/struct.proto";
24
+ import "google/protobuf/empty.proto";
25
+ import "acl.proto";
26
+ import "numbers.proto";
27
+
28
+ // The Domains service definition
29
+ service Domains {
30
+ // Create a new Domain
31
+ rpc Create (CreateDomainRequest) returns (Domain) {}
32
+ // Update an existing Domain
33
+ rpc Update (UpdateDomainRequest) returns (Domain) {}
34
+ // Get an existing Domain
35
+ rpc Get (GetDomainRequest) returns (Domain) {}
36
+ // Delete an existing Domain
37
+ rpc Delete (DeleteDomainRequest) returns (.google.protobuf.Empty) {}
38
+ // List all Domains
39
+ rpc List (ListDomainRequest) returns (ListDomainsResponse) {}
40
+ // Find a Domain by field name and value
41
+ rpc FindBy (FindByRequest) returns (FindByResponse) {}
42
+ }
43
+
44
+ // EgressPolicy defines the policy for egress traffic
45
+ message EgressPolicy {
46
+ // The pattern to match
47
+ string rule = 1;
48
+ // Reference to the number to use for egress
49
+ string number_ref = 2;
50
+ // The egress Number
51
+ fonoster.routr.connect.numbers.v2beta1.Number number = 3;
52
+ }
53
+
54
+ // The message for the Domain resource
55
+ message Domain {
56
+ // The API version of the Domain
57
+ string api_version = 1;
58
+ // The unique identifier of the Domain
59
+ string ref = 2;
60
+ // The name of the Domain
61
+ string name = 3;
62
+ // The URI of the Domain
63
+ string domain_uri = 4;
64
+ // The date of creation of the Domain
65
+ int32 created_at = 5;
66
+ // The date of the last update
67
+ int32 updated_at = 6;
68
+ // The list of IP addresses that are allowed to access the Domain
69
+ fonoster.routr.connect.acl.v2beta1.AccessControlList access_control_list = 7;
70
+ // The egress_policy of the Domain
71
+ repeated EgressPolicy egress_policies = 8;
72
+ // The extended attributes of the Domain
73
+ .google.protobuf.Struct extended = 9;
74
+ }
75
+
76
+ // The request message for Domains.Create
77
+ message CreateDomainRequest {
78
+ // The name of the Domain
79
+ string name = 1;
80
+ // The domain_uri of the Domain
81
+ string domain_uri = 2;
82
+ // Reference to the ACL to use for this Domain
83
+ string access_control_list_ref = 3;
84
+ // The egress_policy of the Domain
85
+ repeated EgressPolicy egress_policies = 4;
86
+ // The extended attributes of the Domain
87
+ .google.protobuf.Struct extended = 5;
88
+ }
89
+
90
+ // The request message for Domains.Update
91
+ message UpdateDomainRequest {
92
+ // The unique identifier of the Domain
93
+ string ref = 1;
94
+ // The name of the Domain
95
+ string name = 2;
96
+ // Reference to the ACL to use for this Domain
97
+ string access_control_list_ref = 3;
98
+ // The egress_policy of the Domain
99
+ repeated EgressPolicy egress_policies = 4;
100
+ // The extended attributes of the Domain
101
+ .google.protobuf.Struct extended = 5;
102
+ }
103
+
104
+ // The request message for Domains.Get
105
+ message GetDomainRequest {
106
+ // The unique identifier of the Domain
107
+ string ref = 1;
108
+ }
109
+
110
+ // The request message for Domains.Delete
111
+ message DeleteDomainRequest {
112
+ // The unique identifier of the Domain
113
+ string ref = 1;
114
+ }
115
+
116
+ // The request message for Domains.FindBy
117
+ message FindByRequest {
118
+ // The field name to search
119
+ string field_name = 1;
120
+ // The value to search
121
+ string field_value = 2;
122
+ }
123
+
124
+ // The response message for the Domains.FindBy method
125
+ message FindByResponse {
126
+ // The list of Domains
127
+ repeated Domain items = 1;
128
+ }
129
+
130
+ // The request message for Domains.List
131
+ message ListDomainRequest {
132
+ // The maximum number of items in the list
133
+ int32 page_size = 1;
134
+
135
+ // The next_page_token value returned from the previous request, if any
136
+ string page_token = 2;
137
+ }
138
+
139
+ // The response message for Domains.List
140
+ message ListDomainsResponse {
141
+ // List of Domains
142
+ repeated Domain items = 1;
143
+
144
+ // Token to retrieve the next page of results, or empty if there are no more results in the list
145
+ string next_page_token = 2;
146
+ }
@@ -0,0 +1,166 @@
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.numbers.v2beta1;
22
+
23
+ import "google/protobuf/struct.proto";
24
+ import "google/protobuf/empty.proto";
25
+ import "trunks.proto";
26
+
27
+ // The Numbers service definition
28
+ service Numbers {
29
+ // Create a new Number
30
+ rpc Create (CreateNumberRequest) returns (Number) {}
31
+ // Update an existing Number
32
+ rpc Update (UpdateNumberRequest) returns (Number) {}
33
+ // Get an existing Number
34
+ rpc Get (GetNumberRequest) returns (Number) {}
35
+ // Delete an existing Number
36
+ rpc Delete (DeleteNumberRequest) returns (.google.protobuf.Empty) {}
37
+ // List Numbers
38
+ rpc List (ListNumberRequest) returns (ListNumbersResponse) {}
39
+ // Find Numbers by field name and value
40
+ rpc FindBy (FindByRequest) returns (FindByResponse) {}
41
+ }
42
+
43
+ // The message for the Number resource
44
+ message Number {
45
+ // The version of the Number
46
+ string api_version = 1;
47
+ // The unique identifier of the Number
48
+ string ref = 2;
49
+ // The name of the Number
50
+ string name = 3;
51
+ // The tel_url of the Number
52
+ string tel_url = 4;
53
+ // The aor_link of the Number
54
+ string aor_link = 5;
55
+ // The city of the Number
56
+ string city = 6;
57
+ // The country of the Number
58
+ string country = 7;
59
+ // The country_iso_code of the Number
60
+ string country_iso_code = 8;
61
+ // The header to use for session affinity
62
+ string session_affinity_header = 9;
63
+ // Extra headers to send to the trunk
64
+ repeated ExtraHeader extra_headers = 10;
65
+ // The date when the Number was created
66
+ int32 created_at = 11;
67
+ // The date when the Number was last updated
68
+ int32 updated_at = 12;
69
+ // The trunk this number is associated with
70
+ fonoster.routr.connect.trunks.v2beta1.Trunk trunk = 13;
71
+ // The extended attributes of the Number
72
+ .google.protobuf.Struct extended = 14;
73
+ }
74
+
75
+ // The message for the ExtraHeader field
76
+ message ExtraHeader {
77
+ string name = 1;
78
+ string value = 2;
79
+ }
80
+
81
+ // The request message for Numbers.Create
82
+ message CreateNumberRequest {
83
+ // The version of the Number
84
+ string api_version = 1;
85
+ // The name of the Number
86
+ string name = 2;
87
+ // The tel_url of the Number
88
+ string tel_url = 3;
89
+ // The aor_link of the Number
90
+ string aor_link = 4;
91
+ // The city of the Number
92
+ string city = 5;
93
+ // The country of the Number
94
+ string country = 6;
95
+ // The country_iso_code of the Number
96
+ string country_iso_code = 7;
97
+ // The header to use for session affinity
98
+ string session_affinity_header = 8;
99
+ // Extra headers to send to the trunk
100
+ repeated ExtraHeader extra_headers = 9;
101
+ // Reference to the trunk this number is associated with
102
+ string trunk_ref = 10;
103
+ // The extended attributes of the Number
104
+ .google.protobuf.Struct extended = 11;
105
+ }
106
+
107
+ // The request message for Numbers.Update
108
+ message UpdateNumberRequest {
109
+ // The unique identifier of the Number
110
+ string ref = 1;
111
+ // The name of the Number
112
+ string name = 2;
113
+ // The aor_link of the Number
114
+ string aor_link = 4;
115
+ // The header to use for session affinity
116
+ string session_affinity_header = 8;
117
+ // Extra headers to send to the trunk
118
+ repeated ExtraHeader extra_headers = 9;
119
+ // Reference to the trunk this number is associated with
120
+ string trunk_ref = 10;
121
+ // The extended attributes of the Number
122
+ .google.protobuf.Struct extended = 11;
123
+ }
124
+
125
+ // The request message for Numbers.Get
126
+ message GetNumberRequest {
127
+ // The unique identifier of the Number
128
+ string ref = 1;
129
+ }
130
+
131
+ // The request message for Numbers.Delete
132
+ message DeleteNumberRequest {
133
+ // The unique identifier of the Number
134
+ string ref = 1;
135
+ }
136
+
137
+ // The request message for Numbers.FindBy
138
+ message FindByRequest {
139
+ // The field name to search
140
+ string field_name = 1;
141
+ // The value to search
142
+ string field_value = 2;
143
+ }
144
+
145
+ // The response message for the Numbers.FindBy method
146
+ message FindByResponse {
147
+ // The list of Numbers
148
+ repeated Number items = 1;
149
+ }
150
+
151
+ // The request message for Numbers.List
152
+ message ListNumberRequest {
153
+ // The maximum number of items in the list
154
+ int32 page_size = 1;
155
+
156
+ // The next_page_token value returned from the previous request, if any
157
+ string page_token = 2;
158
+ }
159
+
160
+ message ListNumbersResponse {
161
+ // List of Numbers
162
+ repeated Number items = 1;
163
+
164
+ // Token to retrieve the next page of results, or empty if there are no more results in the list
165
+ string next_page_token = 2;
166
+ }