@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.
Files changed (111) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +358 -2
  3. package/dist/node/Applications.d.ts +206 -0
  4. package/dist/node/Applications.js +267 -0
  5. package/dist/node/client/AbstractClient.d.ts +22 -0
  6. package/dist/node/client/AbstractClient.js +86 -0
  7. package/dist/node/client/Client.d.ts +15 -0
  8. package/dist/node/client/Client.js +61 -0
  9. package/dist/node/client/TokenRefresherNode.d.ts +8 -0
  10. package/dist/node/client/TokenRefresherNode.js +43 -0
  11. package/dist/node/client/TokenRefresherWeb.d.ts +13 -0
  12. package/dist/node/client/TokenRefresherWeb.js +44 -0
  13. package/dist/node/client/isJwtExpired.d.ts +2 -0
  14. package/dist/node/client/isJwtExpired.js +37 -0
  15. package/dist/node/client/jsonToObject.d.ts +8 -0
  16. package/dist/node/client/jsonToObject.js +31 -0
  17. package/dist/node/client/makeRpcRequest.d.ts +11 -0
  18. package/dist/node/client/makeRpcRequest.js +44 -0
  19. package/dist/node/client/objectToJson.d.ts +3 -0
  20. package/dist/node/client/objectToJson.js +32 -0
  21. package/dist/node/client/types.d.ts +26 -0
  22. package/dist/node/client/types.js +2 -0
  23. package/dist/node/client/utils.d.ts +5 -0
  24. package/dist/node/client/utils.js +17 -0
  25. package/dist/node/generated/node/acls.ts +1054 -0
  26. package/dist/node/generated/node/acls_grpc_pb.js +200 -0
  27. package/dist/node/generated/node/acls_pb.js +2063 -0
  28. package/dist/node/generated/node/agents.ts +1388 -0
  29. package/dist/node/generated/node/agents_grpc_pb.js +202 -0
  30. package/dist/node/generated/node/agents_pb.js +2403 -0
  31. package/dist/node/generated/node/applications.ts +1411 -0
  32. package/dist/node/generated/node/applications_grpc_pb.js +201 -0
  33. package/dist/node/generated/node/applications_pb.js +2651 -0
  34. package/dist/node/generated/node/calls.ts +1123 -0
  35. package/dist/node/generated/node/calls_grpc_pb.js +169 -0
  36. package/dist/node/generated/node/calls_pb.js +1916 -0
  37. package/dist/node/generated/node/credentials.ts +1054 -0
  38. package/dist/node/generated/node/credentials_grpc_pb.js +200 -0
  39. package/dist/node/generated/node/credentials_pb.js +1928 -0
  40. package/dist/node/generated/node/domains.ts +1144 -0
  41. package/dist/node/generated/node/domains_grpc_pb.js +200 -0
  42. package/dist/node/generated/node/domains_pb.js +2170 -0
  43. package/dist/node/generated/node/google/protobuf/empty.ts +48 -0
  44. package/dist/node/generated/node/google/protobuf/struct.ts +408 -0
  45. package/dist/node/generated/node/identity.ts +4267 -0
  46. package/dist/node/generated/node/identity_grpc_pb.js +761 -0
  47. package/dist/node/generated/node/identity_pb.js +8058 -0
  48. package/dist/node/generated/node/numbers.ts +1371 -0
  49. package/dist/node/generated/node/numbers_grpc_pb.js +201 -0
  50. package/dist/node/generated/node/numbers_pb.js +2470 -0
  51. package/dist/node/generated/node/secrets.ts +985 -0
  52. package/dist/node/generated/node/secrets_grpc_pb.js +200 -0
  53. package/dist/node/generated/node/secrets_pb.js +1838 -0
  54. package/dist/node/generated/node/trunks.ts +1546 -0
  55. package/dist/node/generated/node/trunks_grpc_pb.js +202 -0
  56. package/dist/node/generated/node/trunks_pb.js +2777 -0
  57. package/dist/node/generated/web/AclsServiceClientPb.ts +258 -0
  58. package/dist/node/generated/web/AgentsServiceClientPb.ts +258 -0
  59. package/dist/node/generated/web/ApplicationsServiceClientPb.ts +258 -0
  60. package/dist/node/generated/web/CallsServiceClientPb.ts +194 -0
  61. package/dist/node/generated/web/CredentialsServiceClientPb.ts +258 -0
  62. package/dist/node/generated/web/DomainsServiceClientPb.ts +258 -0
  63. package/dist/node/generated/web/IdentityServiceClientPb.ts +990 -0
  64. package/dist/node/generated/web/NumbersServiceClientPb.ts +258 -0
  65. package/dist/node/generated/web/SecretsServiceClientPb.ts +258 -0
  66. package/dist/node/generated/web/TrunksServiceClientPb.ts +258 -0
  67. package/dist/node/generated/web/acls.ts +1054 -0
  68. package/dist/node/generated/web/acls_pb.d.ts +246 -0
  69. package/dist/node/generated/web/acls_pb.js +2063 -0
  70. package/dist/node/generated/web/agents.ts +1388 -0
  71. package/dist/node/generated/web/agents_pb.d.ts +300 -0
  72. package/dist/node/generated/web/agents_pb.js +2403 -0
  73. package/dist/node/generated/web/applications.ts +1411 -0
  74. package/dist/node/generated/web/applications_pb.d.ts +322 -0
  75. package/dist/node/generated/web/applications_pb.js +2651 -0
  76. package/dist/node/generated/web/calls.ts +1123 -0
  77. package/dist/node/generated/web/calls_pb.d.ts +262 -0
  78. package/dist/node/generated/web/calls_pb.js +1916 -0
  79. package/dist/node/generated/web/credentials.ts +1054 -0
  80. package/dist/node/generated/web/credentials_pb.d.ts +234 -0
  81. package/dist/node/generated/web/credentials_pb.js +1928 -0
  82. package/dist/node/generated/web/domains.ts +1144 -0
  83. package/dist/node/generated/web/domains_pb.d.ts +260 -0
  84. package/dist/node/generated/web/domains_pb.js +2170 -0
  85. package/dist/node/generated/web/google/protobuf/empty.ts +48 -0
  86. package/dist/node/generated/web/google/protobuf/struct.ts +408 -0
  87. package/dist/node/generated/web/identity.ts +4267 -0
  88. package/dist/node/generated/web/identity_pb.d.ts +973 -0
  89. package/dist/node/generated/web/identity_pb.js +8058 -0
  90. package/dist/node/generated/web/numbers.ts +1371 -0
  91. package/dist/node/generated/web/numbers_pb.d.ts +305 -0
  92. package/dist/node/generated/web/numbers_pb.js +2470 -0
  93. package/dist/node/generated/web/secrets.ts +985 -0
  94. package/dist/node/generated/web/secrets_pb.d.ts +222 -0
  95. package/dist/node/generated/web/secrets_pb.js +1838 -0
  96. package/dist/node/generated/web/trunks.ts +1546 -0
  97. package/dist/node/generated/web/trunks_pb.d.ts +338 -0
  98. package/dist/node/generated/web/trunks_pb.js +2777 -0
  99. package/dist/node/node.d.ts +2 -0
  100. package/dist/node/node.js +36 -0
  101. package/dist/node/tsconfig.node.tsbuildinfo +1 -0
  102. package/dist/node/utils.d.ts +22 -0
  103. package/dist/node/utils.js +54 -0
  104. package/dist/web/fonoster.min.js +1 -0
  105. package/dist/web/index.esm.js +1 -0
  106. package/package.json +24 -12
  107. package/dist/fonoster.min.js +0 -1
  108. package/dist/index.d.ts +0 -6
  109. package/dist/index.esm.js +0 -1
  110. package/dist/index.js +0 -1
  111. 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);