@fonoster/sdk 0.6.0 → 0.6.1
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/LICENSE +21 -0
- package/README.md +358 -2
- package/dist/node/Applications.d.ts +206 -0
- package/dist/node/Applications.js +267 -0
- package/dist/node/client/AbstractClient.d.ts +22 -0
- package/dist/node/client/AbstractClient.js +86 -0
- package/dist/node/client/Client.d.ts +15 -0
- package/dist/node/client/Client.js +61 -0
- package/dist/node/client/TokenRefresherNode.d.ts +8 -0
- package/dist/node/client/TokenRefresherNode.js +43 -0
- package/dist/node/client/TokenRefresherWeb.d.ts +13 -0
- package/dist/node/client/TokenRefresherWeb.js +44 -0
- package/dist/node/client/isJwtExpired.d.ts +2 -0
- package/dist/node/client/isJwtExpired.js +37 -0
- package/dist/node/client/jsonToObject.d.ts +8 -0
- package/dist/node/client/jsonToObject.js +31 -0
- package/dist/node/client/makeRpcRequest.d.ts +11 -0
- package/dist/node/client/makeRpcRequest.js +44 -0
- package/dist/node/client/objectToJson.d.ts +3 -0
- package/dist/node/client/objectToJson.js +32 -0
- package/dist/node/client/types.d.ts +26 -0
- package/dist/node/client/types.js +2 -0
- package/dist/node/client/utils.d.ts +5 -0
- package/dist/node/client/utils.js +17 -0
- package/dist/node/generated/node/acls.ts +1054 -0
- package/dist/node/generated/node/acls_grpc_pb.js +200 -0
- package/dist/node/generated/node/acls_pb.js +2063 -0
- package/dist/node/generated/node/agents.ts +1388 -0
- package/dist/node/generated/node/agents_grpc_pb.js +202 -0
- package/dist/node/generated/node/agents_pb.js +2403 -0
- package/dist/node/generated/node/applications.ts +1411 -0
- package/dist/node/generated/node/applications_grpc_pb.js +201 -0
- package/dist/node/generated/node/applications_pb.js +2651 -0
- package/dist/node/generated/node/calls.ts +1123 -0
- package/dist/node/generated/node/calls_grpc_pb.js +169 -0
- package/dist/node/generated/node/calls_pb.js +1916 -0
- package/dist/node/generated/node/credentials.ts +1054 -0
- package/dist/node/generated/node/credentials_grpc_pb.js +200 -0
- package/dist/node/generated/node/credentials_pb.js +1928 -0
- package/dist/node/generated/node/domains.ts +1144 -0
- package/dist/node/generated/node/domains_grpc_pb.js +200 -0
- package/dist/node/generated/node/domains_pb.js +2170 -0
- package/dist/node/generated/node/google/protobuf/empty.ts +48 -0
- package/dist/node/generated/node/google/protobuf/struct.ts +408 -0
- package/dist/node/generated/node/identity.ts +4267 -0
- package/dist/node/generated/node/identity_grpc_pb.js +761 -0
- package/dist/node/generated/node/identity_pb.js +8058 -0
- package/dist/node/generated/node/numbers.ts +1371 -0
- package/dist/node/generated/node/numbers_grpc_pb.js +201 -0
- package/dist/node/generated/node/numbers_pb.js +2470 -0
- package/dist/node/generated/node/secrets.ts +985 -0
- package/dist/node/generated/node/secrets_grpc_pb.js +200 -0
- package/dist/node/generated/node/secrets_pb.js +1838 -0
- package/dist/node/generated/node/trunks.ts +1546 -0
- package/dist/node/generated/node/trunks_grpc_pb.js +202 -0
- package/dist/node/generated/node/trunks_pb.js +2777 -0
- package/dist/node/generated/web/AclsServiceClientPb.ts +258 -0
- package/dist/node/generated/web/AgentsServiceClientPb.ts +258 -0
- package/dist/node/generated/web/ApplicationsServiceClientPb.ts +258 -0
- package/dist/node/generated/web/CallsServiceClientPb.ts +194 -0
- package/dist/node/generated/web/CredentialsServiceClientPb.ts +258 -0
- package/dist/node/generated/web/DomainsServiceClientPb.ts +258 -0
- package/dist/node/generated/web/IdentityServiceClientPb.ts +990 -0
- package/dist/node/generated/web/NumbersServiceClientPb.ts +258 -0
- package/dist/node/generated/web/SecretsServiceClientPb.ts +258 -0
- package/dist/node/generated/web/TrunksServiceClientPb.ts +258 -0
- package/dist/node/generated/web/acls.ts +1054 -0
- package/dist/node/generated/web/acls_pb.d.ts +246 -0
- package/dist/node/generated/web/acls_pb.js +2063 -0
- package/dist/node/generated/web/agents.ts +1388 -0
- package/dist/node/generated/web/agents_pb.d.ts +300 -0
- package/dist/node/generated/web/agents_pb.js +2403 -0
- package/dist/node/generated/web/applications.ts +1411 -0
- package/dist/node/generated/web/applications_pb.d.ts +322 -0
- package/dist/node/generated/web/applications_pb.js +2651 -0
- package/dist/node/generated/web/calls.ts +1123 -0
- package/dist/node/generated/web/calls_pb.d.ts +262 -0
- package/dist/node/generated/web/calls_pb.js +1916 -0
- package/dist/node/generated/web/credentials.ts +1054 -0
- package/dist/node/generated/web/credentials_pb.d.ts +234 -0
- package/dist/node/generated/web/credentials_pb.js +1928 -0
- package/dist/node/generated/web/domains.ts +1144 -0
- package/dist/node/generated/web/domains_pb.d.ts +260 -0
- package/dist/node/generated/web/domains_pb.js +2170 -0
- package/dist/node/generated/web/google/protobuf/empty.ts +48 -0
- package/dist/node/generated/web/google/protobuf/struct.ts +408 -0
- package/dist/node/generated/web/identity.ts +4267 -0
- package/dist/node/generated/web/identity_pb.d.ts +973 -0
- package/dist/node/generated/web/identity_pb.js +8058 -0
- package/dist/node/generated/web/numbers.ts +1371 -0
- package/dist/node/generated/web/numbers_pb.d.ts +305 -0
- package/dist/node/generated/web/numbers_pb.js +2470 -0
- package/dist/node/generated/web/secrets.ts +985 -0
- package/dist/node/generated/web/secrets_pb.d.ts +222 -0
- package/dist/node/generated/web/secrets_pb.js +1838 -0
- package/dist/node/generated/web/trunks.ts +1546 -0
- package/dist/node/generated/web/trunks_pb.d.ts +338 -0
- package/dist/node/generated/web/trunks_pb.js +2777 -0
- package/dist/node/node.d.ts +2 -0
- package/dist/node/node.js +36 -0
- package/dist/node/tsconfig.node.tsbuildinfo +1 -0
- package/dist/node/utils.d.ts +22 -0
- package/dist/node/utils.js +54 -0
- package/dist/web/fonoster.min.js +1 -0
- package/dist/web/index.esm.js +1 -0
- package/package.json +24 -12
- package/dist/fonoster.min.js +0 -1
- package/dist/index.d.ts +0 -6
- package/dist/index.esm.js +0 -1
- package/dist/index.js +0 -1
- package/dist/printHello.d.ts +0 -2
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
// GENERATED CODE -- DO NOT EDIT!
|
|
2
|
+
|
|
3
|
+
// Original file comments:
|
|
4
|
+
//
|
|
5
|
+
// Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
|
|
6
|
+
// http://github.com/fonoster/fonoster
|
|
7
|
+
//
|
|
8
|
+
// This file is part of Fonoster
|
|
9
|
+
//
|
|
10
|
+
// Licensed under the MIT License (the "License");
|
|
11
|
+
// you may not use this file except in compliance with
|
|
12
|
+
// the License. You may obtain a copy of the License at
|
|
13
|
+
//
|
|
14
|
+
// https://opensource.org/licenses/MIT
|
|
15
|
+
//
|
|
16
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
17
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
18
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
+
// See the License for the specific language governing permissions and
|
|
20
|
+
// limitations under the License.
|
|
21
|
+
'use strict';
|
|
22
|
+
var grpc = require('@grpc/grpc-js');
|
|
23
|
+
var applications_pb = require('./applications_pb.js');
|
|
24
|
+
var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js');
|
|
25
|
+
|
|
26
|
+
function serialize_fonoster_applications_v1beta2_Application(arg) {
|
|
27
|
+
if (!(arg instanceof applications_pb.Application)) {
|
|
28
|
+
throw new Error('Expected argument of type fonoster.applications.v1beta2.Application');
|
|
29
|
+
}
|
|
30
|
+
return Buffer.from(arg.serializeBinary());
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function deserialize_fonoster_applications_v1beta2_Application(buffer_arg) {
|
|
34
|
+
return applications_pb.Application.deserializeBinary(new Uint8Array(buffer_arg));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function serialize_fonoster_applications_v1beta2_CreateApplicationRequest(arg) {
|
|
38
|
+
if (!(arg instanceof applications_pb.CreateApplicationRequest)) {
|
|
39
|
+
throw new Error('Expected argument of type fonoster.applications.v1beta2.CreateApplicationRequest');
|
|
40
|
+
}
|
|
41
|
+
return Buffer.from(arg.serializeBinary());
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function deserialize_fonoster_applications_v1beta2_CreateApplicationRequest(buffer_arg) {
|
|
45
|
+
return applications_pb.CreateApplicationRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function serialize_fonoster_applications_v1beta2_CreateApplicationResponse(arg) {
|
|
49
|
+
if (!(arg instanceof applications_pb.CreateApplicationResponse)) {
|
|
50
|
+
throw new Error('Expected argument of type fonoster.applications.v1beta2.CreateApplicationResponse');
|
|
51
|
+
}
|
|
52
|
+
return Buffer.from(arg.serializeBinary());
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function deserialize_fonoster_applications_v1beta2_CreateApplicationResponse(buffer_arg) {
|
|
56
|
+
return applications_pb.CreateApplicationResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function serialize_fonoster_applications_v1beta2_DeleteApplicationRequest(arg) {
|
|
60
|
+
if (!(arg instanceof applications_pb.DeleteApplicationRequest)) {
|
|
61
|
+
throw new Error('Expected argument of type fonoster.applications.v1beta2.DeleteApplicationRequest');
|
|
62
|
+
}
|
|
63
|
+
return Buffer.from(arg.serializeBinary());
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function deserialize_fonoster_applications_v1beta2_DeleteApplicationRequest(buffer_arg) {
|
|
67
|
+
return applications_pb.DeleteApplicationRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function serialize_fonoster_applications_v1beta2_DeleteApplicationResponse(arg) {
|
|
71
|
+
if (!(arg instanceof applications_pb.DeleteApplicationResponse)) {
|
|
72
|
+
throw new Error('Expected argument of type fonoster.applications.v1beta2.DeleteApplicationResponse');
|
|
73
|
+
}
|
|
74
|
+
return Buffer.from(arg.serializeBinary());
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function deserialize_fonoster_applications_v1beta2_DeleteApplicationResponse(buffer_arg) {
|
|
78
|
+
return applications_pb.DeleteApplicationResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function serialize_fonoster_applications_v1beta2_GetApplicationRequest(arg) {
|
|
82
|
+
if (!(arg instanceof applications_pb.GetApplicationRequest)) {
|
|
83
|
+
throw new Error('Expected argument of type fonoster.applications.v1beta2.GetApplicationRequest');
|
|
84
|
+
}
|
|
85
|
+
return Buffer.from(arg.serializeBinary());
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function deserialize_fonoster_applications_v1beta2_GetApplicationRequest(buffer_arg) {
|
|
89
|
+
return applications_pb.GetApplicationRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function serialize_fonoster_applications_v1beta2_ListApplicationsRequest(arg) {
|
|
93
|
+
if (!(arg instanceof applications_pb.ListApplicationsRequest)) {
|
|
94
|
+
throw new Error('Expected argument of type fonoster.applications.v1beta2.ListApplicationsRequest');
|
|
95
|
+
}
|
|
96
|
+
return Buffer.from(arg.serializeBinary());
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function deserialize_fonoster_applications_v1beta2_ListApplicationsRequest(buffer_arg) {
|
|
100
|
+
return applications_pb.ListApplicationsRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function serialize_fonoster_applications_v1beta2_ListApplicationsResponse(arg) {
|
|
104
|
+
if (!(arg instanceof applications_pb.ListApplicationsResponse)) {
|
|
105
|
+
throw new Error('Expected argument of type fonoster.applications.v1beta2.ListApplicationsResponse');
|
|
106
|
+
}
|
|
107
|
+
return Buffer.from(arg.serializeBinary());
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function deserialize_fonoster_applications_v1beta2_ListApplicationsResponse(buffer_arg) {
|
|
111
|
+
return applications_pb.ListApplicationsResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function serialize_fonoster_applications_v1beta2_UpdateApplicationRequest(arg) {
|
|
115
|
+
if (!(arg instanceof applications_pb.UpdateApplicationRequest)) {
|
|
116
|
+
throw new Error('Expected argument of type fonoster.applications.v1beta2.UpdateApplicationRequest');
|
|
117
|
+
}
|
|
118
|
+
return Buffer.from(arg.serializeBinary());
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function deserialize_fonoster_applications_v1beta2_UpdateApplicationRequest(buffer_arg) {
|
|
122
|
+
return applications_pb.UpdateApplicationRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function serialize_fonoster_applications_v1beta2_UpdateApplicationResponse(arg) {
|
|
126
|
+
if (!(arg instanceof applications_pb.UpdateApplicationResponse)) {
|
|
127
|
+
throw new Error('Expected argument of type fonoster.applications.v1beta2.UpdateApplicationResponse');
|
|
128
|
+
}
|
|
129
|
+
return Buffer.from(arg.serializeBinary());
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function deserialize_fonoster_applications_v1beta2_UpdateApplicationResponse(buffer_arg) {
|
|
133
|
+
return applications_pb.UpdateApplicationResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
// Applications service definition
|
|
138
|
+
var ApplicationsService = exports.ApplicationsService = {
|
|
139
|
+
// Create a new application
|
|
140
|
+
createApplication: {
|
|
141
|
+
path: '/fonoster.applications.v1beta2.Applications/CreateApplication',
|
|
142
|
+
requestStream: false,
|
|
143
|
+
responseStream: false,
|
|
144
|
+
requestType: applications_pb.CreateApplicationRequest,
|
|
145
|
+
responseType: applications_pb.CreateApplicationResponse,
|
|
146
|
+
requestSerialize: serialize_fonoster_applications_v1beta2_CreateApplicationRequest,
|
|
147
|
+
requestDeserialize: deserialize_fonoster_applications_v1beta2_CreateApplicationRequest,
|
|
148
|
+
responseSerialize: serialize_fonoster_applications_v1beta2_CreateApplicationResponse,
|
|
149
|
+
responseDeserialize: deserialize_fonoster_applications_v1beta2_CreateApplicationResponse,
|
|
150
|
+
},
|
|
151
|
+
// Get an application
|
|
152
|
+
getApplication: {
|
|
153
|
+
path: '/fonoster.applications.v1beta2.Applications/GetApplication',
|
|
154
|
+
requestStream: false,
|
|
155
|
+
responseStream: false,
|
|
156
|
+
requestType: applications_pb.GetApplicationRequest,
|
|
157
|
+
responseType: applications_pb.Application,
|
|
158
|
+
requestSerialize: serialize_fonoster_applications_v1beta2_GetApplicationRequest,
|
|
159
|
+
requestDeserialize: deserialize_fonoster_applications_v1beta2_GetApplicationRequest,
|
|
160
|
+
responseSerialize: serialize_fonoster_applications_v1beta2_Application,
|
|
161
|
+
responseDeserialize: deserialize_fonoster_applications_v1beta2_Application,
|
|
162
|
+
},
|
|
163
|
+
// List applications
|
|
164
|
+
listApplications: {
|
|
165
|
+
path: '/fonoster.applications.v1beta2.Applications/ListApplications',
|
|
166
|
+
requestStream: false,
|
|
167
|
+
responseStream: false,
|
|
168
|
+
requestType: applications_pb.ListApplicationsRequest,
|
|
169
|
+
responseType: applications_pb.ListApplicationsResponse,
|
|
170
|
+
requestSerialize: serialize_fonoster_applications_v1beta2_ListApplicationsRequest,
|
|
171
|
+
requestDeserialize: deserialize_fonoster_applications_v1beta2_ListApplicationsRequest,
|
|
172
|
+
responseSerialize: serialize_fonoster_applications_v1beta2_ListApplicationsResponse,
|
|
173
|
+
responseDeserialize: deserialize_fonoster_applications_v1beta2_ListApplicationsResponse,
|
|
174
|
+
},
|
|
175
|
+
// Update an application
|
|
176
|
+
updateApplication: {
|
|
177
|
+
path: '/fonoster.applications.v1beta2.Applications/UpdateApplication',
|
|
178
|
+
requestStream: false,
|
|
179
|
+
responseStream: false,
|
|
180
|
+
requestType: applications_pb.UpdateApplicationRequest,
|
|
181
|
+
responseType: applications_pb.UpdateApplicationResponse,
|
|
182
|
+
requestSerialize: serialize_fonoster_applications_v1beta2_UpdateApplicationRequest,
|
|
183
|
+
requestDeserialize: deserialize_fonoster_applications_v1beta2_UpdateApplicationRequest,
|
|
184
|
+
responseSerialize: serialize_fonoster_applications_v1beta2_UpdateApplicationResponse,
|
|
185
|
+
responseDeserialize: deserialize_fonoster_applications_v1beta2_UpdateApplicationResponse,
|
|
186
|
+
},
|
|
187
|
+
// Delete an application
|
|
188
|
+
deleteApplication: {
|
|
189
|
+
path: '/fonoster.applications.v1beta2.Applications/DeleteApplication',
|
|
190
|
+
requestStream: false,
|
|
191
|
+
responseStream: false,
|
|
192
|
+
requestType: applications_pb.DeleteApplicationRequest,
|
|
193
|
+
responseType: applications_pb.DeleteApplicationResponse,
|
|
194
|
+
requestSerialize: serialize_fonoster_applications_v1beta2_DeleteApplicationRequest,
|
|
195
|
+
requestDeserialize: deserialize_fonoster_applications_v1beta2_DeleteApplicationRequest,
|
|
196
|
+
responseSerialize: serialize_fonoster_applications_v1beta2_DeleteApplicationResponse,
|
|
197
|
+
responseDeserialize: deserialize_fonoster_applications_v1beta2_DeleteApplicationResponse,
|
|
198
|
+
},
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
exports.ApplicationsClient = grpc.makeGenericClientConstructor(ApplicationsService);
|