@fonoster/common 0.5.5 → 0.6.0
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/README.md +3 -0
- package/dist/constants.d.ts +4 -0
- package/dist/constants.js +6 -0
- package/dist/errors.d.ts +8 -0
- package/dist/errors.js +95 -0
- package/dist/grpcStatusMap.d.ts +4 -0
- package/dist/{envs.js → grpcStatusMap.js} +8 -6
- package/dist/index.d.ts +7 -8
- package/dist/index.js +38 -14
- package/dist/notifications/compileTemplate.d.ts +6 -0
- package/dist/{env_is_set.js → notifications/compileTemplate.js} +12 -14
- package/dist/notifications/createEmailSender.d.ts +17 -0
- package/dist/notifications/createEmailSender.js +55 -0
- package/dist/notifications/index.d.ts +2 -0
- package/dist/notifications/index.js +36 -0
- package/dist/protos/acls.proto +119 -0
- package/dist/protos/agents.proto +155 -0
- package/dist/protos/applications.proto +154 -0
- package/dist/protos/calls.proto +162 -0
- package/dist/protos/credentials.proto +119 -0
- package/dist/protos/domains.proto +127 -0
- package/dist/protos/identity.proto +286 -0
- package/dist/protos/numbers.proto +155 -0
- package/dist/protos/secrets.proto +113 -0
- package/dist/protos/trunks.proto +164 -0
- package/dist/protos/voice.proto +421 -0
- package/dist/tts/AzureVoices.d.ts +523 -0
- package/dist/tts/AzureVoices.js +3622 -0
- package/dist/tts/GoogleVoices.d.ts +475 -0
- package/dist/tts/GoogleVoices.js +3284 -0
- package/dist/tts/index.d.ts +3 -0
- package/dist/tts/index.js +37 -0
- package/dist/tts/types.d.ts +164 -0
- package/dist/tts/types.js +186 -0
- package/dist/utils/assertEnvsAreSet.d.ts +7 -0
- package/dist/utils/assertEnvsAreSet.js +37 -0
- package/dist/utils/assertFileExists.d.ts +5 -0
- package/dist/utils/assertFileExists.js +38 -0
- package/dist/utils/createInterceptingCall.d.ts +7 -0
- package/dist/utils/createInterceptingCall.js +9 -0
- package/dist/utils/createService.d.ts +9 -0
- package/dist/{service_runner.js → utils/createService.js} +15 -40
- package/dist/utils/datesMapper.d.ts +9 -0
- package/dist/utils/datesMapper.js +8 -0
- package/dist/utils/getServerCredentials.d.ts +10 -0
- package/dist/{trust_util.js → utils/getServerCredentials.js} +33 -37
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils/index.js +42 -0
- package/dist/utils/toCamelCase.d.ts +2 -0
- package/dist/utils/toCamelCase.js +27 -0
- package/dist/utils/toPascalCase.d.ts +2 -0
- package/dist/{speech/plugin.js → utils/toPascalCase.js} +9 -13
- package/dist/voice/Dial.d.ts +23 -0
- package/dist/voice/Dial.js +19 -0
- package/dist/voice/Gather.d.ts +18 -0
- package/dist/voice/Gather.js +9 -0
- package/dist/voice/Mute.d.ts +13 -0
- package/dist/voice/Mute.js +9 -0
- package/dist/voice/Play.d.ts +12 -0
- package/dist/voice/PlayDtmf.d.ts +5 -0
- package/dist/voice/PlaybackControl.d.ts +13 -0
- package/dist/voice/PlaybackControl.js +11 -0
- package/dist/voice/Record.d.ts +18 -0
- package/dist/voice/Record.js +7 -0
- package/dist/voice/Say.d.ts +15 -0
- package/dist/voice/Say.js +2 -0
- package/dist/voice/Stream.d.ts +41 -0
- package/dist/voice/Stream.js +39 -0
- package/dist/voice/Verb.d.ts +9 -0
- package/dist/{healthcheck.js → voice/Verb.js} +2 -5
- package/dist/voice/index.d.ts +11 -0
- package/dist/voice/index.js +45 -0
- package/dist/voice/voice.d.ts +101 -0
- package/dist/voice/voice.js +44 -0
- package/package.json +28 -25
- package/LICENSE +0 -21
- package/dist/api_client.d.ts +0 -27
- package/dist/api_client.js +0 -110
- package/dist/env_is_set.d.ts +0 -1
- package/dist/envs.d.ts +0 -4
- package/dist/healthcheck.d.ts +0 -2
- package/dist/service_runner.d.ts +0 -13
- package/dist/speech/plugin.d.ts +0 -6
- package/dist/speech/types.d.ts +0 -17
- package/dist/trust_util.d.ts +0 -4
- package/dist/types.d.ts +0 -6
- /package/dist/{speech/types.js → voice/Play.js} +0 -0
- /package/dist/{types.js → voice/PlayDtmf.js} +0 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
|
|
3
|
+
* http://github.com/fonoster/fonoster
|
|
4
|
+
*
|
|
5
|
+
* This file is part of Fonoster
|
|
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.applications.v1beta2;
|
|
22
|
+
|
|
23
|
+
import "google/protobuf/struct.proto";
|
|
24
|
+
|
|
25
|
+
// Applications service definition
|
|
26
|
+
service Applications {
|
|
27
|
+
// Create a new application
|
|
28
|
+
rpc CreateApplication(CreateApplicationRequest) returns (CreateApplicationResponse) {}
|
|
29
|
+
// Get an application
|
|
30
|
+
rpc GetApplication(GetApplicationRequest) returns (Application) {}
|
|
31
|
+
// List applications
|
|
32
|
+
rpc ListApplications(ListApplicationsRequest) returns (ListApplicationsResponse) {}
|
|
33
|
+
// Update an application
|
|
34
|
+
rpc UpdateApplication(UpdateApplicationRequest) returns (UpdateApplicationResponse) {}
|
|
35
|
+
// Delete an application
|
|
36
|
+
rpc DeleteApplication(DeleteApplicationRequest) returns (DeleteApplicationResponse) {}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// The type of application
|
|
40
|
+
enum ApplicationType {
|
|
41
|
+
// Programmable Voice
|
|
42
|
+
PROGRAMMABLE_VOICE = 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
message ProductContainer {
|
|
46
|
+
// Product reference
|
|
47
|
+
string product_ref = 1;
|
|
48
|
+
// Product configuration
|
|
49
|
+
google.protobuf.Struct config = 2;
|
|
50
|
+
// Product credentials
|
|
51
|
+
google.protobuf.Struct credentials = 3;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Application definition
|
|
55
|
+
message Application {
|
|
56
|
+
// Reference to the application
|
|
57
|
+
string ref = 1;
|
|
58
|
+
// The application's resource name
|
|
59
|
+
string name = 2;
|
|
60
|
+
// Application type
|
|
61
|
+
ApplicationType type = 3;
|
|
62
|
+
// Endpoint for programmable voice
|
|
63
|
+
string app_endpoint = 4;
|
|
64
|
+
// Text to speech product
|
|
65
|
+
ProductContainer text_to_speech = 5;
|
|
66
|
+
// Speech to text product
|
|
67
|
+
ProductContainer speech_to_text = 6;
|
|
68
|
+
// Conversation product
|
|
69
|
+
ProductContainer conversation = 7;
|
|
70
|
+
// Creation time
|
|
71
|
+
int64 created_at = 8;
|
|
72
|
+
// Update time
|
|
73
|
+
int64 updated_at = 9;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Request to create a new application
|
|
77
|
+
message CreateApplicationRequest {
|
|
78
|
+
// Name of the application
|
|
79
|
+
string name = 1;
|
|
80
|
+
// Application type
|
|
81
|
+
ApplicationType type = 2;
|
|
82
|
+
// App URL for programmable voice
|
|
83
|
+
string app_endpoint = 3;
|
|
84
|
+
// Text to speech product
|
|
85
|
+
ProductContainer text_to_speech = 4;
|
|
86
|
+
// Speech to text product
|
|
87
|
+
ProductContainer speech_to_text = 5;
|
|
88
|
+
// Conversation product
|
|
89
|
+
ProductContainer intelligence = 6;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Response for create application
|
|
93
|
+
message CreateApplicationResponse {
|
|
94
|
+
// Echo the reference of the application
|
|
95
|
+
string ref = 1;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Request to get an application
|
|
99
|
+
message GetApplicationRequest {
|
|
100
|
+
// The reference to the application
|
|
101
|
+
string ref = 1;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Request to list applications
|
|
105
|
+
message ListApplicationsRequest {
|
|
106
|
+
// The number of items to list
|
|
107
|
+
int32 page_size = 1;
|
|
108
|
+
// The page token
|
|
109
|
+
string page_token = 2;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Response for list applications
|
|
113
|
+
message ListApplicationsResponse {
|
|
114
|
+
// List of applications
|
|
115
|
+
repeated Application items = 1;
|
|
116
|
+
// The page token
|
|
117
|
+
string next_page_token = 2;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Request to update an application
|
|
121
|
+
message UpdateApplicationRequest {
|
|
122
|
+
// Reference to the application
|
|
123
|
+
string ref = 1;
|
|
124
|
+
// Name of the application
|
|
125
|
+
string name = 2;
|
|
126
|
+
// Application type
|
|
127
|
+
ApplicationType type = 3;
|
|
128
|
+
// App URL for programmable voice
|
|
129
|
+
string app_endpoint = 4;
|
|
130
|
+
// Text to speech product
|
|
131
|
+
ProductContainer text_to_speech = 5;
|
|
132
|
+
// Speech to text product
|
|
133
|
+
ProductContainer speech_to_text = 6;
|
|
134
|
+
// Conversation product
|
|
135
|
+
ProductContainer intelligence = 7;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// Response for update application
|
|
139
|
+
message UpdateApplicationResponse {
|
|
140
|
+
// Echo the reference of the application
|
|
141
|
+
string ref = 1;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// Request to delete an application
|
|
145
|
+
message DeleteApplicationRequest {
|
|
146
|
+
// The reference to the application
|
|
147
|
+
string ref = 1;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// Response for delete application
|
|
151
|
+
message DeleteApplicationResponse {
|
|
152
|
+
// Echo the reference of the application
|
|
153
|
+
string ref = 1;
|
|
154
|
+
}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
|
|
3
|
+
* http://github.com/fonoster/fonoster
|
|
4
|
+
*
|
|
5
|
+
* This file is part of Fonoster
|
|
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.calls.v1beta2;
|
|
22
|
+
|
|
23
|
+
// TODO: Consider using Timestamp instead of int64
|
|
24
|
+
// import "google/protobuf/timestamp.proto";
|
|
25
|
+
|
|
26
|
+
// Calls service definition
|
|
27
|
+
service Calls {
|
|
28
|
+
// Call a number and returns the call status
|
|
29
|
+
rpc CreateCall (CreateCallRequest) returns (CreateCallResponse) {}
|
|
30
|
+
// Get a list of Call Detail Records
|
|
31
|
+
rpc ListCalls (ListCallsRequest) returns (ListCallsResponse) {}
|
|
32
|
+
// Get a Call Detail Record
|
|
33
|
+
rpc GetCall (GetCallRequest) returns (CallDetailRecord) {}
|
|
34
|
+
// Stream call status
|
|
35
|
+
rpc TrackCall (TrackCallRequest) returns (stream TrackCallResponse) {}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
enum CallType {
|
|
39
|
+
PROGRAMMABLE = 0;
|
|
40
|
+
SIP_TRUNKING = 1;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
enum HangupCause {
|
|
44
|
+
NORMAL_CLEARING = 0;
|
|
45
|
+
CALL_REJECTED = 1;
|
|
46
|
+
UNALLOCATED = 2;
|
|
47
|
+
NO_USER_RESPONSE = 3;
|
|
48
|
+
NO_ROUTE_DESTINATION = 4;
|
|
49
|
+
NO_ANSWER = 5;
|
|
50
|
+
USER_BUSY = 6;
|
|
51
|
+
NOT_ACCEPTABLE_HERE = 7;
|
|
52
|
+
SERVICE_UNAVAILABLE = 8;
|
|
53
|
+
INVALID_NUMBER_FORMAT = 9;
|
|
54
|
+
UNKNOWN = 10;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
enum CallStatus {
|
|
58
|
+
QUEUED = 0;
|
|
59
|
+
RINGING = 1;
|
|
60
|
+
IN_PROGRESS = 2;
|
|
61
|
+
COMPLETED = 3;
|
|
62
|
+
FAILED = 4;
|
|
63
|
+
BUSY = 5;
|
|
64
|
+
NO_ANSWER = 6;
|
|
65
|
+
CANCELED = 7;
|
|
66
|
+
REJECTED = 8;
|
|
67
|
+
TIMEOUT = 9;
|
|
68
|
+
UNKNOWN = 10;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
enum CallDirection {
|
|
72
|
+
INBOUND = 0;
|
|
73
|
+
OUTBOUND = 1;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Message for a Call Detail Record
|
|
77
|
+
message CallDetailRecord {
|
|
78
|
+
// The unique identifier of the Call
|
|
79
|
+
string ref = 1;
|
|
80
|
+
// The call type
|
|
81
|
+
CallType type = 2;
|
|
82
|
+
// The call status
|
|
83
|
+
CallStatus status = 3;
|
|
84
|
+
// Hangup cause
|
|
85
|
+
HangupCause hangup_cause = 4;
|
|
86
|
+
// Start time of the call
|
|
87
|
+
int64 started_at = 5;
|
|
88
|
+
// End time of the call
|
|
89
|
+
int64 ended_at = 6;
|
|
90
|
+
// The from number (E.164 format or SIP URI)
|
|
91
|
+
string from = 7;
|
|
92
|
+
// The to number (E.164 format or SIP URI)
|
|
93
|
+
string to = 8;
|
|
94
|
+
// The call duration in seconds
|
|
95
|
+
int32 duration = 9;
|
|
96
|
+
// The call direction
|
|
97
|
+
CallDirection direction = 10;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// The request message for Calls.Call
|
|
101
|
+
message CreateCallRequest {
|
|
102
|
+
// The from number (E.164 format or SIP URI)
|
|
103
|
+
string from = 1;
|
|
104
|
+
// The to number (E.164 format or SIP URI)
|
|
105
|
+
string to = 2;
|
|
106
|
+
// Optional application reference
|
|
107
|
+
string app_ref = 3;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// The response message for Calls.Call
|
|
111
|
+
message CreateCallResponse {
|
|
112
|
+
// The refence of the call
|
|
113
|
+
string ref = 1;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// The request message for Calls.ListCalls
|
|
117
|
+
message ListCallsRequest {
|
|
118
|
+
// Optional start date in RFC3339 format
|
|
119
|
+
string after = 1;
|
|
120
|
+
// Optional end date in RFC3339 format
|
|
121
|
+
string before = 2;
|
|
122
|
+
// Optional call type
|
|
123
|
+
CallType type = 3;
|
|
124
|
+
// Optional call status
|
|
125
|
+
CallStatus status = 4;
|
|
126
|
+
// Optional from number (E.164 format or SIP URI)
|
|
127
|
+
string from = 5;
|
|
128
|
+
// Optional to number (E.164 format or SIP URI)
|
|
129
|
+
string to = 6;
|
|
130
|
+
// The page size
|
|
131
|
+
int32 page_size = 7;
|
|
132
|
+
// The page token
|
|
133
|
+
string page_token = 8;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// The response message for Calls.ListCalls
|
|
137
|
+
message ListCallsResponse {
|
|
138
|
+
// The list of Call Detail Records
|
|
139
|
+
repeated CallDetailRecord items = 1;
|
|
140
|
+
// The token to retrieve the next page of results
|
|
141
|
+
string next_page_token = 2;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// The request message for Calls.GetCall
|
|
145
|
+
message GetCallRequest {
|
|
146
|
+
// The unique identifier of the Call
|
|
147
|
+
string ref = 1;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// The request message for Calls.TrackCall
|
|
151
|
+
message TrackCallRequest {
|
|
152
|
+
// The unique identifier of the Call
|
|
153
|
+
string ref = 1;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// The response message for Calls.TrackCall
|
|
157
|
+
message TrackCallResponse {
|
|
158
|
+
// The refence of the call
|
|
159
|
+
string ref = 1;
|
|
160
|
+
// The call status
|
|
161
|
+
CallStatus status = 2;
|
|
162
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
|
|
3
|
+
* http://github.com/fonoster/fonoster
|
|
4
|
+
*
|
|
5
|
+
* This file is part of Fonoster
|
|
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.credentials.v1beta2;
|
|
22
|
+
|
|
23
|
+
// The Credentials service definition
|
|
24
|
+
service CredentialsService {
|
|
25
|
+
// Creates a new set of Credentials
|
|
26
|
+
rpc CreateCredentials (CreateCredentialsRequest) returns (CreateCredentialsResponse) {}
|
|
27
|
+
// Updates an existing set of Credentials
|
|
28
|
+
rpc UpdateCredentials (UpdateCredentialsRequest) returns (UpdateCredentialsResponse) {}
|
|
29
|
+
// Gets the details of a given set of Credentials
|
|
30
|
+
rpc GetCredentials (GetCredentialsRequest) returns (Credentials) {}
|
|
31
|
+
// Deletes an existing set of Credentials
|
|
32
|
+
rpc DeleteCredentials (DeleteCredentialsRequest) returns (DeleteCredentialsResponse) {}
|
|
33
|
+
// Lists all Credentials
|
|
34
|
+
rpc ListCredentials (ListCredentialsRequest) returns (ListCredentialsResponse) {}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// The message for the Credentials resource
|
|
38
|
+
message Credentials {
|
|
39
|
+
// The reference of the Credentials
|
|
40
|
+
string ref = 1;
|
|
41
|
+
// The name of the Credentials
|
|
42
|
+
string name = 2;
|
|
43
|
+
// The username of the Credentials
|
|
44
|
+
string username = 3;
|
|
45
|
+
// The password of the Credentials
|
|
46
|
+
string password = 4;
|
|
47
|
+
// The time the Credentials was created
|
|
48
|
+
int64 created_at = 5;
|
|
49
|
+
// The time the Credentials was updated
|
|
50
|
+
int64 updated_at = 6;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// The request message for the Credentials.CreateCredentials method
|
|
54
|
+
message CreateCredentialsRequest {
|
|
55
|
+
// The name of the Credentials
|
|
56
|
+
string name = 1;
|
|
57
|
+
// The username of the Credentials
|
|
58
|
+
string username = 2;
|
|
59
|
+
// The password of the Credentials
|
|
60
|
+
string password = 3;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// The response message for the Credentials.CreateCredentials method
|
|
64
|
+
message CreateCredentialsResponse {
|
|
65
|
+
// The reference of the created Credentials
|
|
66
|
+
string ref = 1;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// The request message for the Credentials.UpdateCredentials method
|
|
70
|
+
message UpdateCredentialsRequest {
|
|
71
|
+
// The reference of the Credentials to update
|
|
72
|
+
string ref = 1;
|
|
73
|
+
// The new name of the Credentials
|
|
74
|
+
string name = 2;
|
|
75
|
+
// The new username of the Credentials
|
|
76
|
+
string username = 3;
|
|
77
|
+
// The new password of the Credentials
|
|
78
|
+
string password = 4;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// The response message for the Credentials.UpdateCredentials method
|
|
82
|
+
message UpdateCredentialsResponse {
|
|
83
|
+
// The reference of the updated Credentials
|
|
84
|
+
string ref = 1;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// The request message for the Credentials.GetCredentials method
|
|
88
|
+
message GetCredentialsRequest {
|
|
89
|
+
// The reference of the Credentials to retrieve
|
|
90
|
+
string ref = 1;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// The request message for the Credentials.DeleteCredentials method
|
|
94
|
+
message DeleteCredentialsRequest {
|
|
95
|
+
// The reference of the Credentials to delete
|
|
96
|
+
string ref = 1;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// The response message for the Credentials.DeleteCredentials method
|
|
100
|
+
message DeleteCredentialsResponse {
|
|
101
|
+
// The reference of the deleted Credentials
|
|
102
|
+
string ref = 1;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// The request message for the Credentials.ListCredentials method
|
|
106
|
+
message ListCredentialsRequest {
|
|
107
|
+
// The maximum number of items in the list
|
|
108
|
+
int32 page_size = 1;
|
|
109
|
+
// The next_page_token value returned from the previous request, if any
|
|
110
|
+
string page_token = 2;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// The response message for the Credentials.ListCredentials method
|
|
114
|
+
message ListCredentialsResponse {
|
|
115
|
+
// List of Credentials
|
|
116
|
+
repeated Credentials items = 1;
|
|
117
|
+
// Token to retrieve the next page of results, or empty if there are no more results in the list
|
|
118
|
+
string next_page_token = 2;
|
|
119
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
|
|
3
|
+
* http://github.com/fonoster/fonoster
|
|
4
|
+
*
|
|
5
|
+
* This file is part of Fonoster
|
|
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.domains.v1beta2;
|
|
22
|
+
|
|
23
|
+
// The Domains service definition
|
|
24
|
+
service Domains {
|
|
25
|
+
// Create a new Domain
|
|
26
|
+
rpc CreateDomain (CreateDomainRequest) returns (CreateDomainResponse) {}
|
|
27
|
+
// Update an existing Domain
|
|
28
|
+
rpc UpdateDomain (UpdateDomainRequest) returns (UpdateDomainResponse) {}
|
|
29
|
+
// Get an existing Domain
|
|
30
|
+
rpc GetDomain (GetDomainRequest) returns (Domain) {}
|
|
31
|
+
// List all Domains
|
|
32
|
+
rpc ListDomains (ListDomainsRequest) returns (ListDomainsResponse) {}
|
|
33
|
+
// Delete an existing Domain
|
|
34
|
+
rpc DeleteDomain (DeleteDomainRequest) returns (DeleteDomainResponse) {}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// The message for the Domain resource
|
|
38
|
+
message Domain {
|
|
39
|
+
// The unique identifier of the Domain
|
|
40
|
+
string ref = 2;
|
|
41
|
+
// The name of the Domain
|
|
42
|
+
string name = 3;
|
|
43
|
+
// The URI of the Domain
|
|
44
|
+
string domain_uri = 4;
|
|
45
|
+
// The date of creation of the Domain
|
|
46
|
+
int64 created_at = 5;
|
|
47
|
+
// The date of the last update
|
|
48
|
+
int64 updated_at = 6;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// EgressPolicy defines the policy for egress traffic
|
|
52
|
+
message EgressPolicy {
|
|
53
|
+
// The pattern to match
|
|
54
|
+
string rule = 1;
|
|
55
|
+
// Reference to the number to use for egress
|
|
56
|
+
string number_ref = 2;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// The request message for Domains.CreateDomain
|
|
60
|
+
message CreateDomainRequest {
|
|
61
|
+
// The name of the Domain
|
|
62
|
+
string name = 1;
|
|
63
|
+
// The domain_uri of the Domain
|
|
64
|
+
string domain_uri = 2;
|
|
65
|
+
// Reference to the Access Control List
|
|
66
|
+
string access_control_list_ref = 3;
|
|
67
|
+
// Optional list of egress policies
|
|
68
|
+
repeated EgressPolicy egress_policies = 4;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// The response message for Domains.CreateDomain
|
|
72
|
+
message CreateDomainResponse {
|
|
73
|
+
// The id of the new Domain
|
|
74
|
+
string ref = 1;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// The request message for Domains.UpdateDomain
|
|
78
|
+
message UpdateDomainRequest {
|
|
79
|
+
// The id of the Domain
|
|
80
|
+
string ref = 1;
|
|
81
|
+
// The name of the Domain
|
|
82
|
+
string name = 2;
|
|
83
|
+
// Reference to the Access Control List
|
|
84
|
+
string access_control_list_ref = 3;
|
|
85
|
+
// Optional list of egress policies
|
|
86
|
+
repeated EgressPolicy egress_policies = 4;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// The response message for Domains.UpdateDomain
|
|
90
|
+
message UpdateDomainResponse {
|
|
91
|
+
// The id of the updated Domain
|
|
92
|
+
string ref = 1;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// The request message for Domains.GetDomain
|
|
96
|
+
message GetDomainRequest {
|
|
97
|
+
// // The unique identifier of the Domain
|
|
98
|
+
string ref = 1;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// The request message for Domains.DeleteDomain
|
|
102
|
+
message DeleteDomainRequest {
|
|
103
|
+
// The unique identifier of the Domain
|
|
104
|
+
string ref = 1;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// The response message for Domains.DeleteDomain
|
|
108
|
+
message DeleteDomainResponse {
|
|
109
|
+
// Echo back the id of the deleted Domain
|
|
110
|
+
string ref = 1;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// The request message for Domains.ListDomains
|
|
114
|
+
message ListDomainsRequest {
|
|
115
|
+
// The maximum number of items in the list
|
|
116
|
+
int32 page_size = 1;
|
|
117
|
+
// The next_page_token value returned from the previous request, if any
|
|
118
|
+
string page_token = 2;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// The response message for Domains.ListDomains
|
|
122
|
+
message ListDomainsResponse {
|
|
123
|
+
// List of Domains
|
|
124
|
+
repeated Domain items = 1;
|
|
125
|
+
// Token to retrieve the next page of results, or empty if there are no more results in the list
|
|
126
|
+
string next_page_token = 2;
|
|
127
|
+
}
|