@fonoster/sdk 0.6.1 → 0.6.2

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 (70) hide show
  1. package/README.md +2301 -169
  2. package/dist/node/Acls.d.ts +150 -0
  3. package/dist/node/Acls.js +227 -0
  4. package/dist/node/Agents.d.ts +163 -0
  5. package/dist/node/Agents.js +211 -0
  6. package/dist/node/ApiKeys.d.ts +120 -0
  7. package/dist/node/ApiKeys.js +178 -0
  8. package/dist/node/Applications.d.ts +31 -27
  9. package/dist/node/Applications.js +30 -26
  10. package/dist/node/Calls.d.ts +109 -0
  11. package/dist/node/Calls.js +165 -0
  12. package/dist/node/Credentials.d.ts +148 -0
  13. package/dist/node/Credentials.js +194 -0
  14. package/dist/node/Domains.d.ts +152 -0
  15. package/dist/node/Domains.js +198 -0
  16. package/dist/node/Numbers.d.ts +152 -0
  17. package/dist/node/Numbers.js +198 -0
  18. package/dist/node/Secrets.d.ts +144 -0
  19. package/dist/node/Secrets.js +190 -0
  20. package/dist/node/Trunks.d.ts +181 -0
  21. package/dist/node/Trunks.js +275 -0
  22. package/dist/node/Users.d.ts +132 -0
  23. package/dist/node/Users.js +169 -0
  24. package/dist/node/Workspaces.d.ts +195 -0
  25. package/dist/node/Workspaces.js +265 -0
  26. package/dist/node/client/AbstractClient.d.ts +16 -2
  27. package/dist/node/client/AbstractClient.js +0 -1
  28. package/dist/node/client/Client.d.ts +8 -0
  29. package/dist/node/client/Client.js +48 -0
  30. package/dist/node/client/types/AclsClient.d.ts +10 -0
  31. package/dist/node/client/types/AgentsClient.d.ts +10 -0
  32. package/dist/node/client/types/AgentsClient.js +2 -0
  33. package/dist/node/client/types/ApplicationsClient.d.ts +10 -0
  34. package/dist/node/client/types/ApplicationsClient.js +2 -0
  35. package/dist/node/client/types/CallsClient.d.ts +8 -0
  36. package/dist/node/client/types/CallsClient.js +2 -0
  37. package/dist/node/client/types/CredentialsClient.d.ts +10 -0
  38. package/dist/node/client/types/CredentialsClient.js +2 -0
  39. package/dist/node/client/types/DomainsClient.d.ts +10 -0
  40. package/dist/node/client/types/DomainsClient.js +2 -0
  41. package/dist/node/client/types/FonosterClient.d.ts +27 -0
  42. package/dist/node/client/types/FonosterClient.js +2 -0
  43. package/dist/node/client/types/IdentityClient.d.ts +24 -0
  44. package/dist/node/client/types/IdentityClient.js +2 -0
  45. package/dist/node/client/types/NumbersClient.d.ts +10 -0
  46. package/dist/node/client/types/NumbersClient.js +2 -0
  47. package/dist/node/client/types/SecretsClient.d.ts +10 -0
  48. package/dist/node/client/types/SecretsClient.js +2 -0
  49. package/dist/node/client/types/TrunksClient.d.ts +10 -0
  50. package/dist/node/client/types/TrunksClient.js +2 -0
  51. package/dist/node/client/types/common.d.ts +4 -0
  52. package/dist/node/client/types/common.js +2 -0
  53. package/dist/node/client/types/index.d.ts +6 -0
  54. package/dist/node/client/types/index.js +40 -0
  55. package/dist/node/generated/node/identity_pb.js +9 -9
  56. package/dist/node/generated/node/trunks_grpc_pb.js +8 -8
  57. package/dist/node/generated/node/trunks_pb.js +25 -25
  58. package/dist/node/generated/web/TrunksServiceClientPb.ts +5 -5
  59. package/dist/node/generated/web/identity_pb.d.ts +5 -5
  60. package/dist/node/generated/web/identity_pb.js +9 -9
  61. package/dist/node/generated/web/trunks_pb.d.ts +9 -9
  62. package/dist/node/generated/web/trunks_pb.js +25 -25
  63. package/dist/node/node.d.ts +11 -0
  64. package/dist/node/node.js +11 -0
  65. package/dist/node/tsconfig.node.tsbuildinfo +1 -1
  66. package/dist/web/fonoster.min.js +1 -1
  67. package/dist/web/index.esm.js +1 -1
  68. package/package.json +3 -3
  69. package/dist/node/client/types.d.ts +0 -26
  70. /package/dist/node/client/{types.js → types/AclsClient.js} +0 -0
@@ -22,8 +22,16 @@ exports.Client = void 0;
22
22
  const grpc_js_1 = require("@grpc/grpc-js");
23
23
  const AbstractClient_1 = require("./AbstractClient");
24
24
  const TokenRefresherNode_1 = require("./TokenRefresherNode");
25
+ const acls_grpc_pb_1 = require("../generated/node/acls_grpc_pb");
26
+ const agents_grpc_pb_1 = require("../generated/node/agents_grpc_pb");
25
27
  const applications_grpc_pb_1 = require("../generated/node/applications_grpc_pb");
28
+ const calls_grpc_pb_1 = require("../generated/node/calls_grpc_pb");
29
+ const credentials_grpc_pb_1 = require("../generated/node/credentials_grpc_pb");
30
+ const domains_grpc_pb_1 = require("../generated/node/domains_grpc_pb");
26
31
  const identity_grpc_pb_1 = require("../generated/node/identity_grpc_pb");
32
+ const numbers_grpc_pb_1 = require("../generated/node/numbers_grpc_pb");
33
+ const secrets_grpc_pb_1 = require("../generated/node/secrets_grpc_pb");
34
+ const trunks_grpc_pb_1 = require("../generated/node/trunks_grpc_pb");
27
35
  const DEFAULT_ENDPOINT = "api.fonoster.io:50051";
28
36
  class Client extends AbstractClient_1.AbstractClient {
29
37
  endpoint;
@@ -54,8 +62,48 @@ class Client extends AbstractClient_1.AbstractClient {
54
62
  interceptors: [this.tokenRefresherInterceptor]
55
63
  });
56
64
  }
65
+ getCallsClient() {
66
+ return new calls_grpc_pb_1.CallsClient(this.endpoint, this.channelCredentials, {
67
+ interceptors: [this.tokenRefresherInterceptor]
68
+ });
69
+ }
57
70
  getIdentityClient() {
58
71
  return new identity_grpc_pb_1.IdentityClient(this.endpoint, this.channelCredentials);
59
72
  }
73
+ getSecretsClient() {
74
+ return new secrets_grpc_pb_1.SecretsClient(this.endpoint, this.channelCredentials, {
75
+ interceptors: [this.tokenRefresherInterceptor]
76
+ });
77
+ }
78
+ getAgentsClient() {
79
+ return new agents_grpc_pb_1.AgentsClient(this.endpoint, this.channelCredentials, {
80
+ interceptors: [this.tokenRefresherInterceptor]
81
+ });
82
+ }
83
+ getAclsClient() {
84
+ return new acls_grpc_pb_1.AclsClient(this.endpoint, this.channelCredentials, {
85
+ interceptors: [this.tokenRefresherInterceptor]
86
+ });
87
+ }
88
+ getDomainsClient() {
89
+ return new domains_grpc_pb_1.DomainsClient(this.endpoint, this.channelCredentials, {
90
+ interceptors: [this.tokenRefresherInterceptor]
91
+ });
92
+ }
93
+ getTrunksClient() {
94
+ return new trunks_grpc_pb_1.TrunksClient(this.endpoint, this.channelCredentials, {
95
+ interceptors: [this.tokenRefresherInterceptor]
96
+ });
97
+ }
98
+ getNumbersClient() {
99
+ return new numbers_grpc_pb_1.NumbersClient(this.endpoint, this.channelCredentials, {
100
+ interceptors: [this.tokenRefresherInterceptor]
101
+ });
102
+ }
103
+ getCredentialsClient() {
104
+ return new credentials_grpc_pb_1.CredentialsServiceClient(this.endpoint, this.channelCredentials, {
105
+ interceptors: [this.tokenRefresherInterceptor]
106
+ });
107
+ }
60
108
  }
61
109
  exports.Client = Client;
@@ -0,0 +1,10 @@
1
+ import { ClientFunction } from "./common";
2
+ import { Acl, CreateAclRequest, CreateAclResponse, DeleteAclRequest, DeleteAclResponse, GetAclRequest, ListAclsRequest, ListAclsResponse, UpdateAclRequest, UpdateAclResponse } from "../../generated/web/acls_pb";
3
+ type AclsClient = {
4
+ createAcl: ClientFunction<CreateAclRequest, CreateAclResponse>;
5
+ getAcl: ClientFunction<GetAclRequest, Acl>;
6
+ updateAcl: ClientFunction<UpdateAclRequest, UpdateAclResponse>;
7
+ listAcls: ClientFunction<ListAclsRequest, ListAclsResponse>;
8
+ deleteAcl: ClientFunction<DeleteAclRequest, DeleteAclResponse>;
9
+ };
10
+ export { AclsClient };
@@ -0,0 +1,10 @@
1
+ import { ClientFunction } from "./common";
2
+ import { Agent, CreateAgentRequest, CreateAgentResponse, DeleteAgentRequest, DeleteAgentResponse, GetAgentRequest, ListAgentsRequest, ListAgentsResponse, UpdateAgentRequest, UpdateAgentResponse } from "../../generated/web/agents_pb";
3
+ type AgentsClient = {
4
+ createAgent: ClientFunction<CreateAgentRequest, CreateAgentResponse>;
5
+ getAgent: ClientFunction<GetAgentRequest, Agent>;
6
+ updateAgent: ClientFunction<UpdateAgentRequest, UpdateAgentResponse>;
7
+ listAgents: ClientFunction<ListAgentsRequest, ListAgentsResponse>;
8
+ deleteAgent: ClientFunction<DeleteAgentRequest, DeleteAgentResponse>;
9
+ };
10
+ export { AgentsClient };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ import { ClientFunction } from "./common";
2
+ import { Application, CreateApplicationRequest, CreateApplicationResponse, DeleteApplicationRequest, DeleteApplicationResponse, GetApplicationRequest, ListApplicationsRequest, ListApplicationsResponse, UpdateApplicationRequest, UpdateApplicationResponse } from "../../generated/web/applications_pb";
3
+ type ApplicationsClient = {
4
+ createApplication: ClientFunction<CreateApplicationRequest, CreateApplicationResponse>;
5
+ getApplication: ClientFunction<GetApplicationRequest, Application>;
6
+ updateApplication: ClientFunction<UpdateApplicationRequest, UpdateApplicationResponse>;
7
+ listApplications: ClientFunction<ListApplicationsRequest, ListApplicationsResponse>;
8
+ deleteApplication: ClientFunction<DeleteApplicationRequest, DeleteApplicationResponse>;
9
+ };
10
+ export { ApplicationsClient };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ import { ClientFunction } from "./common";
2
+ import { CallDetailRecord, CreateCallRequest, CreateCallResponse, GetCallRequest, ListCallsRequest, ListCallsResponse } from "../../generated/web/calls_pb";
3
+ type CallsClient = {
4
+ createCall: ClientFunction<CreateCallRequest, CreateCallResponse>;
5
+ getCall: ClientFunction<GetCallRequest, CallDetailRecord>;
6
+ listCalls: ClientFunction<ListCallsRequest, ListCallsResponse>;
7
+ };
8
+ export { CallsClient };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ import { ClientFunction } from "./common";
2
+ import { CreateCredentialsRequest, CreateCredentialsResponse, Credentials, DeleteCredentialsRequest, DeleteCredentialsResponse, GetCredentialsRequest, ListCredentialsRequest, ListCredentialsResponse, UpdateCredentialsRequest, UpdateCredentialsResponse } from "../../generated/web/credentials_pb";
3
+ type CredentialsClient = {
4
+ createCredentials: ClientFunction<CreateCredentialsRequest, CreateCredentialsResponse>;
5
+ getCredentials: ClientFunction<GetCredentialsRequest, Credentials>;
6
+ updateCredentials: ClientFunction<UpdateCredentialsRequest, UpdateCredentialsResponse>;
7
+ listCredentials: ClientFunction<ListCredentialsRequest, ListCredentialsResponse>;
8
+ deleteCredentials: ClientFunction<DeleteCredentialsRequest, DeleteCredentialsResponse>;
9
+ };
10
+ export { CredentialsClient };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ import { ClientFunction } from "./common";
2
+ import { CreateDomainRequest, CreateDomainResponse, DeleteDomainRequest, DeleteDomainResponse, Domain, GetDomainRequest, ListDomainsRequest, ListDomainsResponse, UpdateDomainRequest, UpdateDomainResponse } from "../../generated/web/domains_pb";
3
+ type DomainsClient = {
4
+ createDomain: ClientFunction<CreateDomainRequest, CreateDomainResponse>;
5
+ getDomain: ClientFunction<GetDomainRequest, Domain>;
6
+ updateDomain: ClientFunction<UpdateDomainRequest, UpdateDomainResponse>;
7
+ listDomains: ClientFunction<ListDomainsRequest, ListDomainsResponse>;
8
+ deleteDomain: ClientFunction<DeleteDomainRequest, DeleteDomainResponse>;
9
+ };
10
+ export { DomainsClient };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,27 @@
1
+ import { AclsClient } from "./AclsClient";
2
+ import { AgentsClient } from "./AgentsClient";
3
+ import { ApplicationsClient } from "./ApplicationsClient";
4
+ import { CallsClient } from "./CallsClient";
5
+ import { CredentialsClient } from "./CredentialsClient";
6
+ import { DomainsClient } from "./DomainsClient";
7
+ import { IdentityClient } from "./IdentityClient";
8
+ import { NumbersClient } from "./NumbersClient";
9
+ import { SecretsClient } from "./SecretsClient";
10
+ import { TrunksClient } from "./TrunksClient";
11
+ interface FonosterClient {
12
+ getAccessToken(): string;
13
+ getAccessKeyId(): string;
14
+ getApplicationsClient(): ApplicationsClient;
15
+ getCallsClient(): CallsClient;
16
+ getIdentityClient(): IdentityClient;
17
+ getSecretsClient(): SecretsClient;
18
+ getAgentsClient(): AgentsClient;
19
+ getNumbersClient(): NumbersClient;
20
+ getCredentialsClient(): CredentialsClient;
21
+ getDomainsClient(): DomainsClient;
22
+ getTrunksClient(): TrunksClient;
23
+ getAclsClient(): AclsClient;
24
+ getMetadata(): unknown;
25
+ refreshToken(): Promise<void>;
26
+ }
27
+ export { FonosterClient };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,24 @@
1
+ import { CreateApiKeyRequest, CreateApiKeyResponse, CreateUserRequest, CreateUserResponse, CreateWorkspaceRequest, DeleteApiKeyRequest, DeleteApiKeyResponse, DeleteUserRequest, DeleteUserResponse, DeleteWorkspaceRequest, DeleteWorkspaceResponse, ExchangeApiKeyRequest, ExchangeApiKeyResponse, ExchangeCredentialsRequest, ExchangeCredentialsResponse, ExchangeRefreshTokenRequest, ExchangeRefreshTokenResponse, GetUserRequest, GetUserResponse, GetWorkspaceRequest, InviteUserToWorkspaceRequest, InviteUserToWorkspaceResponse, ListApiKeysRequest, ListApiKeysResponse, ListWorkspacesRequest, ListWorkspacesResponse, RegenerateApiKeyRequest, RegenerateApiKeyResponse, RemoveUserFromWorkspaceRequest, RemoveUserFromWorkspaceResponse, ResendWorkspaceMembershipInvitationRequest, ResendWorkspaceMembershipInvitationResponse, UpdateUserRequest, UpdateWorkspaceRequest, UpdateWorkspaceResponse, Workspace } from "../../generated/web/identity_pb";
2
+ import { ClientFunction } from "../types";
3
+ type IdentityClient = {
4
+ createApiKey: ClientFunction<CreateApiKeyRequest, CreateApiKeyResponse>;
5
+ regenerateApiKey: ClientFunction<RegenerateApiKeyRequest, RegenerateApiKeyResponse>;
6
+ listApiKeys: ClientFunction<ListApiKeysRequest, ListApiKeysResponse>;
7
+ deleteApiKey: ClientFunction<DeleteApiKeyRequest, DeleteApiKeyResponse>;
8
+ exchangeApiKey: ClientFunction<ExchangeApiKeyRequest, ExchangeApiKeyResponse>;
9
+ exchangeCredentials: ClientFunction<ExchangeCredentialsRequest, ExchangeCredentialsResponse>;
10
+ exchangeRefreshToken: ClientFunction<ExchangeRefreshTokenRequest, ExchangeRefreshTokenResponse>;
11
+ createUser: ClientFunction<CreateUserRequest, CreateUserResponse>;
12
+ getUser: ClientFunction<GetUserRequest, GetUserResponse>;
13
+ updateUser: ClientFunction<UpdateUserRequest, CreateUserResponse>;
14
+ deleteUser: ClientFunction<DeleteUserRequest, DeleteUserResponse>;
15
+ createWorkspace: ClientFunction<CreateWorkspaceRequest, CreateUserResponse>;
16
+ getWorkspace: ClientFunction<GetWorkspaceRequest, Workspace>;
17
+ listWorkspaces: ClientFunction<ListWorkspacesRequest, ListWorkspacesResponse>;
18
+ updateWorkspace: ClientFunction<UpdateWorkspaceRequest, UpdateWorkspaceResponse>;
19
+ inviteUserToWorkspace: ClientFunction<InviteUserToWorkspaceRequest, InviteUserToWorkspaceResponse>;
20
+ resendWorkspaceMembershipInvitation: ClientFunction<ResendWorkspaceMembershipInvitationRequest, ResendWorkspaceMembershipInvitationResponse>;
21
+ removeUserFromWorkspace: ClientFunction<RemoveUserFromWorkspaceRequest, RemoveUserFromWorkspaceResponse>;
22
+ deleteWorkspace: ClientFunction<DeleteWorkspaceRequest, DeleteWorkspaceResponse>;
23
+ };
24
+ export { IdentityClient };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ import { ClientFunction } from "./common";
2
+ import { CreateNumberRequest, CreateNumberResponse, DeleteNumberRequest, DeleteNumberResponse, GetNumberRequest, Number as INumber, ListNumbersRequest, ListNumbersResponse, UpdateNumberRequest, UpdateNumberResponse } from "../../generated/web/numbers_pb";
3
+ type NumbersClient = {
4
+ createNumber: ClientFunction<CreateNumberRequest, CreateNumberResponse>;
5
+ getNumber: ClientFunction<GetNumberRequest, INumber>;
6
+ updateNumber: ClientFunction<UpdateNumberRequest, UpdateNumberResponse>;
7
+ listNumbers: ClientFunction<ListNumbersRequest, ListNumbersResponse>;
8
+ deleteNumber: ClientFunction<DeleteNumberRequest, DeleteNumberResponse>;
9
+ };
10
+ export { NumbersClient };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ import { ClientFunction } from "./common";
2
+ import { CreateSecretRequest, CreateSecretResponse, DeleteSecretRequest, DeleteSecretResponse, GetSecretRequest, ListSecretsRequest, ListSecretsResponse, Secret, UpdateSecretRequest, UpdateSecretResponse } from "../../generated/web/secrets_pb";
3
+ type SecretsClient = {
4
+ createSecret: ClientFunction<CreateSecretRequest, CreateSecretResponse>;
5
+ getSecret: ClientFunction<GetSecretRequest, Secret>;
6
+ updateSecret: ClientFunction<UpdateSecretRequest, UpdateSecretResponse>;
7
+ listSecrets: ClientFunction<ListSecretsRequest, ListSecretsResponse>;
8
+ deleteSecret: ClientFunction<DeleteSecretRequest, DeleteSecretResponse>;
9
+ };
10
+ export { SecretsClient };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ import { ClientFunction } from "./common";
2
+ import { CreateTrunkRequest, CreateTrunkResponse, DeleteTrunkRequest, DeleteTrunkResponse, GetTrunkRequest, ListTrunksRequest, ListTrunksResponse, Trunk, UpdateTrunkRequest, UpdateTrunkResponse } from "../../generated/web/trunks_pb";
3
+ type TrunksClient = {
4
+ createTrunk: ClientFunction<CreateTrunkRequest, CreateTrunkResponse>;
5
+ getTrunk: ClientFunction<GetTrunkRequest, Trunk>;
6
+ updateTrunk: ClientFunction<UpdateTrunkRequest, UpdateTrunkResponse>;
7
+ listTrunks: ClientFunction<ListTrunksRequest, ListTrunksResponse>;
8
+ deleteTrunk: ClientFunction<DeleteTrunkRequest, DeleteTrunkResponse>;
9
+ };
10
+ export { TrunksClient };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import { Metadata } from "grpc-web";
2
+ type MappingTuple<T> = Array<[string, T]>;
3
+ type ClientFunction<T, U> = (request: T, metadata: Metadata | unknown | null, callback: (err: Error | null, response: U | null) => void) => void;
4
+ export { MappingTuple, ClientFunction };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ export * from "./common";
2
+ export * from "./FonosterClient";
3
+ export * from "./ApplicationsClient";
4
+ export * from "./IdentityClient";
5
+ export * from "./CallsClient";
6
+ export * from "./SecretsClient";
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ /*
18
+ * Copyright (C) 2024 by Fonoster Inc (https://fonoster.com)
19
+ * http://github.com/fonoster/fonoster
20
+ *
21
+ * This file is part of Fonoster
22
+ *
23
+ * Licensed under the MIT License (the "License");
24
+ * you may not use this file except in compliance with
25
+ * the License. You may obtain a copy of the License at
26
+ *
27
+ * https://opensource.org/licenses/MIT
28
+ *
29
+ * Unless required by applicable law or agreed to in writing, software
30
+ * distributed under the License is distributed on an "AS IS" BASIS,
31
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32
+ * See the License for the specific language governing permissions and
33
+ * limitations under the License.
34
+ */
35
+ __exportStar(require("./common"), exports);
36
+ __exportStar(require("./FonosterClient"), exports);
37
+ __exportStar(require("./ApplicationsClient"), exports);
38
+ __exportStar(require("./IdentityClient"), exports);
39
+ __exportStar(require("./CallsClient"), exports);
40
+ __exportStar(require("./SecretsClient"), exports);
@@ -1834,7 +1834,7 @@ proto.fonoster.identity.v1beta2.ListWorkspacesResponse.prototype.toObject = func
1834
1834
  */
1835
1835
  proto.fonoster.identity.v1beta2.ListWorkspacesResponse.toObject = function(includeInstance, msg) {
1836
1836
  var f, obj = {
1837
- workspacesList: jspb.Message.toObjectList(msg.getWorkspacesList(),
1837
+ itemsList: jspb.Message.toObjectList(msg.getItemsList(),
1838
1838
  proto.fonoster.identity.v1beta2.Workspace.toObject, includeInstance),
1839
1839
  nextPageToken: jspb.Message.getFieldWithDefault(msg, 2, "")
1840
1840
  };
@@ -1876,7 +1876,7 @@ proto.fonoster.identity.v1beta2.ListWorkspacesResponse.deserializeBinaryFromRead
1876
1876
  case 1:
1877
1877
  var value = new proto.fonoster.identity.v1beta2.Workspace;
1878
1878
  reader.readMessage(value,proto.fonoster.identity.v1beta2.Workspace.deserializeBinaryFromReader);
1879
- msg.addWorkspaces(value);
1879
+ msg.addItems(value);
1880
1880
  break;
1881
1881
  case 2:
1882
1882
  var value = /** @type {string} */ (reader.readString());
@@ -1911,7 +1911,7 @@ proto.fonoster.identity.v1beta2.ListWorkspacesResponse.prototype.serializeBinary
1911
1911
  */
1912
1912
  proto.fonoster.identity.v1beta2.ListWorkspacesResponse.serializeBinaryToWriter = function(message, writer) {
1913
1913
  var f = undefined;
1914
- f = message.getWorkspacesList();
1914
+ f = message.getItemsList();
1915
1915
  if (f.length > 0) {
1916
1916
  writer.writeRepeatedMessage(
1917
1917
  1,
@@ -1930,10 +1930,10 @@ proto.fonoster.identity.v1beta2.ListWorkspacesResponse.serializeBinaryToWriter =
1930
1930
 
1931
1931
 
1932
1932
  /**
1933
- * repeated Workspace workspaces = 1;
1933
+ * repeated Workspace items = 1;
1934
1934
  * @return {!Array<!proto.fonoster.identity.v1beta2.Workspace>}
1935
1935
  */
1936
- proto.fonoster.identity.v1beta2.ListWorkspacesResponse.prototype.getWorkspacesList = function() {
1936
+ proto.fonoster.identity.v1beta2.ListWorkspacesResponse.prototype.getItemsList = function() {
1937
1937
  return /** @type{!Array<!proto.fonoster.identity.v1beta2.Workspace>} */ (
1938
1938
  jspb.Message.getRepeatedWrapperField(this, proto.fonoster.identity.v1beta2.Workspace, 1));
1939
1939
  };
@@ -1943,7 +1943,7 @@ proto.fonoster.identity.v1beta2.ListWorkspacesResponse.prototype.getWorkspacesLi
1943
1943
  * @param {!Array<!proto.fonoster.identity.v1beta2.Workspace>} value
1944
1944
  * @return {!proto.fonoster.identity.v1beta2.ListWorkspacesResponse} returns this
1945
1945
  */
1946
- proto.fonoster.identity.v1beta2.ListWorkspacesResponse.prototype.setWorkspacesList = function(value) {
1946
+ proto.fonoster.identity.v1beta2.ListWorkspacesResponse.prototype.setItemsList = function(value) {
1947
1947
  return jspb.Message.setRepeatedWrapperField(this, 1, value);
1948
1948
  };
1949
1949
 
@@ -1953,7 +1953,7 @@ proto.fonoster.identity.v1beta2.ListWorkspacesResponse.prototype.setWorkspacesLi
1953
1953
  * @param {number=} opt_index
1954
1954
  * @return {!proto.fonoster.identity.v1beta2.Workspace}
1955
1955
  */
1956
- proto.fonoster.identity.v1beta2.ListWorkspacesResponse.prototype.addWorkspaces = function(opt_value, opt_index) {
1956
+ proto.fonoster.identity.v1beta2.ListWorkspacesResponse.prototype.addItems = function(opt_value, opt_index) {
1957
1957
  return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.fonoster.identity.v1beta2.Workspace, opt_index);
1958
1958
  };
1959
1959
 
@@ -1962,8 +1962,8 @@ proto.fonoster.identity.v1beta2.ListWorkspacesResponse.prototype.addWorkspaces =
1962
1962
  * Clears the list making it empty but non-null.
1963
1963
  * @return {!proto.fonoster.identity.v1beta2.ListWorkspacesResponse} returns this
1964
1964
  */
1965
- proto.fonoster.identity.v1beta2.ListWorkspacesResponse.prototype.clearWorkspacesList = function() {
1966
- return this.setWorkspacesList([]);
1965
+ proto.fonoster.identity.v1beta2.ListWorkspacesResponse.prototype.clearItemsList = function() {
1966
+ return this.setItemsList([]);
1967
1967
  };
1968
1968
 
1969
1969
 
@@ -79,15 +79,15 @@ function deserialize_fonoster_trunks_v1beta2_GetTrunkRequest(buffer_arg) {
79
79
  return trunks_pb.GetTrunkRequest.deserializeBinary(new Uint8Array(buffer_arg));
80
80
  }
81
81
 
82
- function serialize_fonoster_trunks_v1beta2_ListTrunkRequest(arg) {
83
- if (!(arg instanceof trunks_pb.ListTrunkRequest)) {
84
- throw new Error('Expected argument of type fonoster.trunks.v1beta2.ListTrunkRequest');
82
+ function serialize_fonoster_trunks_v1beta2_ListTrunksRequest(arg) {
83
+ if (!(arg instanceof trunks_pb.ListTrunksRequest)) {
84
+ throw new Error('Expected argument of type fonoster.trunks.v1beta2.ListTrunksRequest');
85
85
  }
86
86
  return Buffer.from(arg.serializeBinary());
87
87
  }
88
88
 
89
- function deserialize_fonoster_trunks_v1beta2_ListTrunkRequest(buffer_arg) {
90
- return trunks_pb.ListTrunkRequest.deserializeBinary(new Uint8Array(buffer_arg));
89
+ function deserialize_fonoster_trunks_v1beta2_ListTrunksRequest(buffer_arg) {
90
+ return trunks_pb.ListTrunksRequest.deserializeBinary(new Uint8Array(buffer_arg));
91
91
  }
92
92
 
93
93
  function serialize_fonoster_trunks_v1beta2_ListTrunksResponse(arg) {
@@ -190,10 +190,10 @@ listTrunks: {
190
190
  path: '/fonoster.trunks.v1beta2.Trunks/ListTrunks',
191
191
  requestStream: false,
192
192
  responseStream: false,
193
- requestType: trunks_pb.ListTrunkRequest,
193
+ requestType: trunks_pb.ListTrunksRequest,
194
194
  responseType: trunks_pb.ListTrunksResponse,
195
- requestSerialize: serialize_fonoster_trunks_v1beta2_ListTrunkRequest,
196
- requestDeserialize: deserialize_fonoster_trunks_v1beta2_ListTrunkRequest,
195
+ requestSerialize: serialize_fonoster_trunks_v1beta2_ListTrunksRequest,
196
+ requestDeserialize: deserialize_fonoster_trunks_v1beta2_ListTrunksRequest,
197
197
  responseSerialize: serialize_fonoster_trunks_v1beta2_ListTrunksResponse,
198
198
  responseDeserialize: deserialize_fonoster_trunks_v1beta2_ListTrunksResponse,
199
199
  },
@@ -24,7 +24,7 @@ goog.exportSymbol('proto.fonoster.trunks.v1beta2.CreateTrunkResponse', null, glo
24
24
  goog.exportSymbol('proto.fonoster.trunks.v1beta2.DeleteTrunkRequest', null, global);
25
25
  goog.exportSymbol('proto.fonoster.trunks.v1beta2.DeleteTrunkResponse', null, global);
26
26
  goog.exportSymbol('proto.fonoster.trunks.v1beta2.GetTrunkRequest', null, global);
27
- goog.exportSymbol('proto.fonoster.trunks.v1beta2.ListTrunkRequest', null, global);
27
+ goog.exportSymbol('proto.fonoster.trunks.v1beta2.ListTrunksRequest', null, global);
28
28
  goog.exportSymbol('proto.fonoster.trunks.v1beta2.ListTrunksResponse', null, global);
29
29
  goog.exportSymbol('proto.fonoster.trunks.v1beta2.Trunk', null, global);
30
30
  goog.exportSymbol('proto.fonoster.trunks.v1beta2.TrunkURI', null, global);
@@ -229,16 +229,16 @@ if (goog.DEBUG && !COMPILED) {
229
229
  * @extends {jspb.Message}
230
230
  * @constructor
231
231
  */
232
- proto.fonoster.trunks.v1beta2.ListTrunkRequest = function(opt_data) {
232
+ proto.fonoster.trunks.v1beta2.ListTrunksRequest = function(opt_data) {
233
233
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
234
234
  };
235
- goog.inherits(proto.fonoster.trunks.v1beta2.ListTrunkRequest, jspb.Message);
235
+ goog.inherits(proto.fonoster.trunks.v1beta2.ListTrunksRequest, jspb.Message);
236
236
  if (goog.DEBUG && !COMPILED) {
237
237
  /**
238
238
  * @public
239
239
  * @override
240
240
  */
241
- proto.fonoster.trunks.v1beta2.ListTrunkRequest.displayName = 'proto.fonoster.trunks.v1beta2.ListTrunkRequest';
241
+ proto.fonoster.trunks.v1beta2.ListTrunksRequest.displayName = 'proto.fonoster.trunks.v1beta2.ListTrunksRequest';
242
242
  }
243
243
  /**
244
244
  * Generated by JsPbCodeGenerator.
@@ -2440,8 +2440,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
2440
2440
  * http://goto/soy-param-migration
2441
2441
  * @return {!Object}
2442
2442
  */
2443
- proto.fonoster.trunks.v1beta2.ListTrunkRequest.prototype.toObject = function(opt_includeInstance) {
2444
- return proto.fonoster.trunks.v1beta2.ListTrunkRequest.toObject(opt_includeInstance, this);
2443
+ proto.fonoster.trunks.v1beta2.ListTrunksRequest.prototype.toObject = function(opt_includeInstance) {
2444
+ return proto.fonoster.trunks.v1beta2.ListTrunksRequest.toObject(opt_includeInstance, this);
2445
2445
  };
2446
2446
 
2447
2447
 
@@ -2450,11 +2450,11 @@ proto.fonoster.trunks.v1beta2.ListTrunkRequest.prototype.toObject = function(opt
2450
2450
  * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2451
2451
  * the JSPB instance for transitional soy proto support:
2452
2452
  * http://goto/soy-param-migration
2453
- * @param {!proto.fonoster.trunks.v1beta2.ListTrunkRequest} msg The msg instance to transform.
2453
+ * @param {!proto.fonoster.trunks.v1beta2.ListTrunksRequest} msg The msg instance to transform.
2454
2454
  * @return {!Object}
2455
2455
  * @suppress {unusedLocalVariables} f is only used for nested messages
2456
2456
  */
2457
- proto.fonoster.trunks.v1beta2.ListTrunkRequest.toObject = function(includeInstance, msg) {
2457
+ proto.fonoster.trunks.v1beta2.ListTrunksRequest.toObject = function(includeInstance, msg) {
2458
2458
  var f, obj = {
2459
2459
  pageSize: jspb.Message.getFieldWithDefault(msg, 1, 0),
2460
2460
  pageToken: jspb.Message.getFieldWithDefault(msg, 2, "")
@@ -2471,23 +2471,23 @@ proto.fonoster.trunks.v1beta2.ListTrunkRequest.toObject = function(includeInstan
2471
2471
  /**
2472
2472
  * Deserializes binary data (in protobuf wire format).
2473
2473
  * @param {jspb.ByteSource} bytes The bytes to deserialize.
2474
- * @return {!proto.fonoster.trunks.v1beta2.ListTrunkRequest}
2474
+ * @return {!proto.fonoster.trunks.v1beta2.ListTrunksRequest}
2475
2475
  */
2476
- proto.fonoster.trunks.v1beta2.ListTrunkRequest.deserializeBinary = function(bytes) {
2476
+ proto.fonoster.trunks.v1beta2.ListTrunksRequest.deserializeBinary = function(bytes) {
2477
2477
  var reader = new jspb.BinaryReader(bytes);
2478
- var msg = new proto.fonoster.trunks.v1beta2.ListTrunkRequest;
2479
- return proto.fonoster.trunks.v1beta2.ListTrunkRequest.deserializeBinaryFromReader(msg, reader);
2478
+ var msg = new proto.fonoster.trunks.v1beta2.ListTrunksRequest;
2479
+ return proto.fonoster.trunks.v1beta2.ListTrunksRequest.deserializeBinaryFromReader(msg, reader);
2480
2480
  };
2481
2481
 
2482
2482
 
2483
2483
  /**
2484
2484
  * Deserializes binary data (in protobuf wire format) from the
2485
2485
  * given reader into the given message object.
2486
- * @param {!proto.fonoster.trunks.v1beta2.ListTrunkRequest} msg The message object to deserialize into.
2486
+ * @param {!proto.fonoster.trunks.v1beta2.ListTrunksRequest} msg The message object to deserialize into.
2487
2487
  * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2488
- * @return {!proto.fonoster.trunks.v1beta2.ListTrunkRequest}
2488
+ * @return {!proto.fonoster.trunks.v1beta2.ListTrunksRequest}
2489
2489
  */
2490
- proto.fonoster.trunks.v1beta2.ListTrunkRequest.deserializeBinaryFromReader = function(msg, reader) {
2490
+ proto.fonoster.trunks.v1beta2.ListTrunksRequest.deserializeBinaryFromReader = function(msg, reader) {
2491
2491
  while (reader.nextField()) {
2492
2492
  if (reader.isEndGroup()) {
2493
2493
  break;
@@ -2515,9 +2515,9 @@ proto.fonoster.trunks.v1beta2.ListTrunkRequest.deserializeBinaryFromReader = fun
2515
2515
  * Serializes the message to binary data (in protobuf wire format).
2516
2516
  * @return {!Uint8Array}
2517
2517
  */
2518
- proto.fonoster.trunks.v1beta2.ListTrunkRequest.prototype.serializeBinary = function() {
2518
+ proto.fonoster.trunks.v1beta2.ListTrunksRequest.prototype.serializeBinary = function() {
2519
2519
  var writer = new jspb.BinaryWriter();
2520
- proto.fonoster.trunks.v1beta2.ListTrunkRequest.serializeBinaryToWriter(this, writer);
2520
+ proto.fonoster.trunks.v1beta2.ListTrunksRequest.serializeBinaryToWriter(this, writer);
2521
2521
  return writer.getResultBuffer();
2522
2522
  };
2523
2523
 
@@ -2525,11 +2525,11 @@ proto.fonoster.trunks.v1beta2.ListTrunkRequest.prototype.serializeBinary = funct
2525
2525
  /**
2526
2526
  * Serializes the given message to binary data (in protobuf wire
2527
2527
  * format), writing to the given BinaryWriter.
2528
- * @param {!proto.fonoster.trunks.v1beta2.ListTrunkRequest} message
2528
+ * @param {!proto.fonoster.trunks.v1beta2.ListTrunksRequest} message
2529
2529
  * @param {!jspb.BinaryWriter} writer
2530
2530
  * @suppress {unusedLocalVariables} f is only used for nested messages
2531
2531
  */
2532
- proto.fonoster.trunks.v1beta2.ListTrunkRequest.serializeBinaryToWriter = function(message, writer) {
2532
+ proto.fonoster.trunks.v1beta2.ListTrunksRequest.serializeBinaryToWriter = function(message, writer) {
2533
2533
  var f = undefined;
2534
2534
  f = message.getPageSize();
2535
2535
  if (f !== 0) {
@@ -2552,16 +2552,16 @@ proto.fonoster.trunks.v1beta2.ListTrunkRequest.serializeBinaryToWriter = functio
2552
2552
  * optional int32 page_size = 1;
2553
2553
  * @return {number}
2554
2554
  */
2555
- proto.fonoster.trunks.v1beta2.ListTrunkRequest.prototype.getPageSize = function() {
2555
+ proto.fonoster.trunks.v1beta2.ListTrunksRequest.prototype.getPageSize = function() {
2556
2556
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
2557
2557
  };
2558
2558
 
2559
2559
 
2560
2560
  /**
2561
2561
  * @param {number} value
2562
- * @return {!proto.fonoster.trunks.v1beta2.ListTrunkRequest} returns this
2562
+ * @return {!proto.fonoster.trunks.v1beta2.ListTrunksRequest} returns this
2563
2563
  */
2564
- proto.fonoster.trunks.v1beta2.ListTrunkRequest.prototype.setPageSize = function(value) {
2564
+ proto.fonoster.trunks.v1beta2.ListTrunksRequest.prototype.setPageSize = function(value) {
2565
2565
  return jspb.Message.setProto3IntField(this, 1, value);
2566
2566
  };
2567
2567
 
@@ -2570,16 +2570,16 @@ proto.fonoster.trunks.v1beta2.ListTrunkRequest.prototype.setPageSize = function(
2570
2570
  * optional string page_token = 2;
2571
2571
  * @return {string}
2572
2572
  */
2573
- proto.fonoster.trunks.v1beta2.ListTrunkRequest.prototype.getPageToken = function() {
2573
+ proto.fonoster.trunks.v1beta2.ListTrunksRequest.prototype.getPageToken = function() {
2574
2574
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2575
2575
  };
2576
2576
 
2577
2577
 
2578
2578
  /**
2579
2579
  * @param {string} value
2580
- * @return {!proto.fonoster.trunks.v1beta2.ListTrunkRequest} returns this
2580
+ * @return {!proto.fonoster.trunks.v1beta2.ListTrunksRequest} returns this
2581
2581
  */
2582
- proto.fonoster.trunks.v1beta2.ListTrunkRequest.prototype.setPageToken = function(value) {
2582
+ proto.fonoster.trunks.v1beta2.ListTrunksRequest.prototype.setPageToken = function(value) {
2583
2583
  return jspb.Message.setProto3StringField(this, 2, value);
2584
2584
  };
2585
2585
 
@@ -214,26 +214,26 @@ export class TrunksClient {
214
214
  methodDescriptorListTrunks = new grpcWeb.MethodDescriptor(
215
215
  '/fonoster.trunks.v1beta2.Trunks/ListTrunks',
216
216
  grpcWeb.MethodType.UNARY,
217
- trunks_pb.ListTrunkRequest,
217
+ trunks_pb.ListTrunksRequest,
218
218
  trunks_pb.ListTrunksResponse,
219
- (request: trunks_pb.ListTrunkRequest) => {
219
+ (request: trunks_pb.ListTrunksRequest) => {
220
220
  return request.serializeBinary();
221
221
  },
222
222
  trunks_pb.ListTrunksResponse.deserializeBinary
223
223
  );
224
224
 
225
225
  listTrunks(
226
- request: trunks_pb.ListTrunkRequest,
226
+ request: trunks_pb.ListTrunksRequest,
227
227
  metadata?: grpcWeb.Metadata | null): Promise<trunks_pb.ListTrunksResponse>;
228
228
 
229
229
  listTrunks(
230
- request: trunks_pb.ListTrunkRequest,
230
+ request: trunks_pb.ListTrunksRequest,
231
231
  metadata: grpcWeb.Metadata | null,
232
232
  callback: (err: grpcWeb.RpcError,
233
233
  response: trunks_pb.ListTrunksResponse) => void): grpcWeb.ClientReadableStream<trunks_pb.ListTrunksResponse>;
234
234
 
235
235
  listTrunks(
236
- request: trunks_pb.ListTrunkRequest,
236
+ request: trunks_pb.ListTrunksRequest,
237
237
  metadata?: grpcWeb.Metadata | null,
238
238
  callback?: (err: grpcWeb.RpcError,
239
239
  response: trunks_pb.ListTrunksResponse) => void) {
@@ -116,10 +116,10 @@ export namespace ListWorkspacesRequest {
116
116
  }
117
117
 
118
118
  export class ListWorkspacesResponse extends jspb.Message {
119
- getWorkspacesList(): Array<Workspace>;
120
- setWorkspacesList(value: Array<Workspace>): ListWorkspacesResponse;
121
- clearWorkspacesList(): ListWorkspacesResponse;
122
- addWorkspaces(value?: Workspace, index?: number): Workspace;
119
+ getItemsList(): Array<Workspace>;
120
+ setItemsList(value: Array<Workspace>): ListWorkspacesResponse;
121
+ clearItemsList(): ListWorkspacesResponse;
122
+ addItems(value?: Workspace, index?: number): Workspace;
123
123
 
124
124
  getNextPageToken(): string;
125
125
  setNextPageToken(value: string): ListWorkspacesResponse;
@@ -134,7 +134,7 @@ export class ListWorkspacesResponse extends jspb.Message {
134
134
 
135
135
  export namespace ListWorkspacesResponse {
136
136
  export type AsObject = {
137
- workspacesList: Array<Workspace.AsObject>,
137
+ itemsList: Array<Workspace.AsObject>,
138
138
  nextPageToken: string,
139
139
  }
140
140
  }