@fonoster/sdk 0.6.5 → 0.7.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 +524 -459
- package/dist/node/Acls.d.ts +43 -44
- package/dist/node/Acls.js +62 -49
- package/dist/node/Agents.d.ts +44 -45
- package/dist/node/Agents.js +47 -46
- package/dist/node/ApiKeys.d.ts +29 -29
- package/dist/node/ApiKeys.js +29 -29
- package/dist/node/Applications.d.ts +43 -43
- package/dist/node/Applications.js +56 -44
- package/dist/node/Calls.d.ts +42 -30
- package/dist/node/Calls.js +78 -54
- package/dist/node/Credentials.d.ts +39 -39
- package/dist/node/Credentials.js +39 -39
- package/dist/node/Domains.d.ts +37 -37
- package/dist/node/Domains.js +37 -37
- package/dist/node/Numbers.d.ts +40 -40
- package/dist/node/Numbers.js +40 -40
- package/dist/node/Secrets.d.ts +37 -37
- package/dist/node/Secrets.js +37 -37
- package/dist/node/Trunks.d.ts +58 -52
- package/dist/node/Trunks.js +104 -70
- package/dist/node/Users.d.ts +34 -34
- package/dist/node/Users.js +34 -34
- package/dist/node/Workspaces.d.ts +55 -54
- package/dist/node/Workspaces.js +61 -54
- package/dist/node/client/jsonToObject.js +1 -1
- package/dist/node/client/makeRpcRequest.js +1 -1
- package/dist/node/client/objectToJson.d.ts +1 -1
- package/dist/node/client/objectToJson.js +12 -2
- package/dist/node/client/types/CallsClient.d.ts +3 -2
- package/dist/node/client/types/IdentityClient.d.ts +2 -2
- package/dist/node/client/types/common.d.ts +8 -1
- package/dist/node/client/utils.js +6 -3
- package/dist/node/generated/node/acls_pb.js +6 -6
- package/dist/node/generated/node/agents_grpc_pb.js +0 -2
- package/dist/node/generated/node/agents_pb.js +450 -30
- package/dist/node/generated/node/applications_pb.js +24 -24
- package/dist/node/generated/node/calls_grpc_pb.js +0 -3
- package/dist/node/generated/node/calls_pb.js +103 -104
- package/dist/node/generated/node/credentials_pb.js +15 -45
- package/dist/node/generated/node/domains_pb.js +34 -34
- package/dist/node/generated/node/identity_grpc_pb.js +14 -14
- package/dist/node/generated/node/identity_pb.js +55 -55
- package/dist/node/generated/node/numbers_grpc_pb.js +0 -1
- package/dist/node/generated/node/numbers_pb.js +197 -17
- package/dist/node/generated/node/secrets_pb.js +6 -6
- package/dist/node/generated/node/trunks_grpc_pb.js +0 -2
- package/dist/node/generated/node/trunks_pb.js +532 -37
- package/dist/node/generated/web/IdentityServiceClientPb.ts +5 -5
- package/dist/node/generated/web/acls_pb.js +6 -6
- package/dist/node/generated/web/agents_pb.d.ts +62 -10
- package/dist/node/generated/web/agents_pb.js +450 -30
- package/dist/node/generated/web/applications_pb.d.ts +9 -9
- package/dist/node/generated/web/applications_pb.js +24 -24
- package/dist/node/generated/web/calls_pb.d.ts +37 -37
- package/dist/node/generated/web/calls_pb.js +103 -104
- package/dist/node/generated/web/credentials_pb.d.ts +0 -4
- package/dist/node/generated/web/credentials_pb.js +15 -45
- package/dist/node/generated/web/domains_pb.js +34 -34
- package/dist/node/generated/web/identity_pb.d.ts +13 -13
- package/dist/node/generated/web/identity_pb.js +55 -55
- package/dist/node/generated/web/numbers_pb.d.ts +26 -4
- package/dist/node/generated/web/numbers_pb.js +197 -17
- package/dist/node/generated/web/secrets_pb.js +6 -6
- package/dist/node/generated/web/trunks_pb.d.ts +71 -11
- package/dist/node/generated/web/trunks_pb.js +532 -37
- package/dist/node/tsconfig.node.tsbuildinfo +1 -1
- package/dist/node/utils.d.ts +5 -3
- package/dist/node/utils.js +56 -0
- package/dist/web/fonoster.min.js +1 -1
- package/dist/web/index.esm.js +1 -1
- package/package.json +4 -4
package/dist/node/Secrets.d.ts
CHANGED
|
@@ -10,11 +10,11 @@ import { FonosterClient } from "./client/types";
|
|
|
10
10
|
* const SDK = require("@fonoster/sdk");
|
|
11
11
|
*
|
|
12
12
|
* async function main(request) {
|
|
13
|
-
*
|
|
14
|
-
*
|
|
13
|
+
* const API_KEY = "your-api-key";
|
|
14
|
+
* const ACCESS_KEY_ID = "00000000-0000-0000-0000-000000000000";
|
|
15
15
|
*
|
|
16
|
-
*
|
|
17
|
-
* const client = SDK.Client({ accessKeyId });
|
|
16
|
+
* try {
|
|
17
|
+
* const client = SDK.Client({ accessKeyId: ACCESS_KEY_ID });
|
|
18
18
|
* await client.loginWithApiKey(apiKey);
|
|
19
19
|
*
|
|
20
20
|
* const secrets = new SDK.Secrets(client);
|
|
@@ -51,17 +51,17 @@ declare class Secrets {
|
|
|
51
51
|
* @param {string} request.secret - The secret of the Secret
|
|
52
52
|
* @return {Promise<BaseApiObject>} - The response object that contains the reference to the created Secret
|
|
53
53
|
* @example
|
|
54
|
+
* const secrets = new SDK.Secrets(client); // Existing client object
|
|
54
55
|
*
|
|
55
56
|
* const request = {
|
|
56
|
-
*
|
|
57
|
-
*
|
|
57
|
+
* name: "FRIENDLY_NAME",
|
|
58
|
+
* secret: "mysecret"
|
|
58
59
|
* };
|
|
59
60
|
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
* .catch(console.error); // an error occurred
|
|
61
|
+
* secrets
|
|
62
|
+
* .createSecret(request)
|
|
63
|
+
* .then(console.log) // successful response
|
|
64
|
+
* .catch(console.error); // an error occurred
|
|
65
65
|
*/
|
|
66
66
|
createSecret(request: CreateSecretRequest): Promise<BaseApiObject>;
|
|
67
67
|
/**
|
|
@@ -70,14 +70,14 @@ declare class Secrets {
|
|
|
70
70
|
* @param {string} ref - The reference of the Secret to retrieve
|
|
71
71
|
* @return {Promise<Acl>} - The response object that contains the Secret
|
|
72
72
|
* @example
|
|
73
|
-
*
|
|
74
|
-
* const ref = "00000000-0000-0000-0000-000000000000"
|
|
75
|
-
*
|
|
76
73
|
* const secrets = new SDK.Secrets(client); // Existing client object
|
|
77
74
|
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
75
|
+
* const ref = "00000000-0000-0000-0000-000000000000";
|
|
76
|
+
*
|
|
77
|
+
* secrets
|
|
78
|
+
* .getSecret(ref)
|
|
79
|
+
* .then(console.log) // successful response
|
|
80
|
+
* .catch(console.error); // an error occurred
|
|
81
81
|
*/
|
|
82
82
|
getSecret(ref: string): Promise<Secret>;
|
|
83
83
|
/**
|
|
@@ -89,17 +89,17 @@ declare class Secrets {
|
|
|
89
89
|
* @param {string} request.secret - The secret of the Secret
|
|
90
90
|
* @return {Promise<BaseApiObject>} - The response object that contains the reference to the updated Secret
|
|
91
91
|
* @example
|
|
92
|
+
* const secrets = new SDK.Secrets(client); // Existing client object
|
|
92
93
|
*
|
|
93
94
|
* const request = {
|
|
94
|
-
*
|
|
95
|
-
*
|
|
95
|
+
* ref: "00000000-0000-0000-0000-000000000000",
|
|
96
|
+
* secret: "mysecret"
|
|
96
97
|
* };
|
|
97
98
|
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
* .catch(console.error); // an error occurred
|
|
99
|
+
* secrets
|
|
100
|
+
* .updateSecret(request)
|
|
101
|
+
* .then(console.log) // successful response
|
|
102
|
+
* .catch(console.error); // an error occurred
|
|
103
103
|
*/
|
|
104
104
|
updateSecret(request: UpdateSecretRequest): Promise<BaseApiObject>;
|
|
105
105
|
/**
|
|
@@ -110,17 +110,17 @@ declare class Secrets {
|
|
|
110
110
|
* @param {string} request.pageToken - The token to retrieve the next page of Secrets
|
|
111
111
|
* @return {Promise<ListSecretsResponse>} - The response object that contains the list of Secrets
|
|
112
112
|
* @example
|
|
113
|
+
* const secrets = new SDK.Secrets(client); // Existing client object
|
|
113
114
|
*
|
|
114
115
|
* const request = {
|
|
115
|
-
*
|
|
116
|
-
*
|
|
116
|
+
* pageSize: 10,
|
|
117
|
+
* pageToken: "00000000-0000-0000-0000-000000000000"
|
|
117
118
|
* };
|
|
118
119
|
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
* .catch(console.error); // an error occurred
|
|
120
|
+
* secrets
|
|
121
|
+
* .listSecrets(request)
|
|
122
|
+
* .then(console.log) // successful response
|
|
123
|
+
* .catch(console.error); // an error occurred
|
|
124
124
|
*/
|
|
125
125
|
listSecrets(request: ListSecretsRequest): Promise<ListSecretsResponse>;
|
|
126
126
|
/**
|
|
@@ -130,14 +130,14 @@ declare class Secrets {
|
|
|
130
130
|
* @param {string} ref - The reference of the Secret to delete
|
|
131
131
|
* @return {Promise<BaseApiObject>} - The response object that contains the reference to the deleted Secret
|
|
132
132
|
* @example
|
|
133
|
-
*
|
|
134
|
-
* const ref = "00000000-0000-0000-0000-000000000000"
|
|
135
|
-
*
|
|
136
133
|
* const secrets = new SDK.Secrets(client); // Existing client object
|
|
137
134
|
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
135
|
+
* const ref = "00000000-0000-0000-0000-000000000000";
|
|
136
|
+
*
|
|
137
|
+
* secrets
|
|
138
|
+
* .deleteSecret(ref)
|
|
139
|
+
* .then(console.log) // successful response
|
|
140
|
+
* .catch(console.error); // an error occurred
|
|
141
141
|
*/
|
|
142
142
|
deleteSecret(ref: string): Promise<BaseApiObject>;
|
|
143
143
|
}
|
package/dist/node/Secrets.js
CHANGED
|
@@ -13,11 +13,11 @@ const secrets_pb_1 = require("./generated/node/secrets_pb");
|
|
|
13
13
|
* const SDK = require("@fonoster/sdk");
|
|
14
14
|
*
|
|
15
15
|
* async function main(request) {
|
|
16
|
-
*
|
|
17
|
-
*
|
|
16
|
+
* const API_KEY = "your-api-key";
|
|
17
|
+
* const ACCESS_KEY_ID = "00000000-0000-0000-0000-000000000000";
|
|
18
18
|
*
|
|
19
|
-
*
|
|
20
|
-
* const client = SDK.Client({ accessKeyId });
|
|
19
|
+
* try {
|
|
20
|
+
* const client = SDK.Client({ accessKeyId: ACCESS_KEY_ID });
|
|
21
21
|
* await client.loginWithApiKey(apiKey);
|
|
22
22
|
*
|
|
23
23
|
* const secrets = new SDK.Secrets(client);
|
|
@@ -56,17 +56,17 @@ class Secrets {
|
|
|
56
56
|
* @param {string} request.secret - The secret of the Secret
|
|
57
57
|
* @return {Promise<BaseApiObject>} - The response object that contains the reference to the created Secret
|
|
58
58
|
* @example
|
|
59
|
+
* const secrets = new SDK.Secrets(client); // Existing client object
|
|
59
60
|
*
|
|
60
61
|
* const request = {
|
|
61
|
-
*
|
|
62
|
-
*
|
|
62
|
+
* name: "FRIENDLY_NAME",
|
|
63
|
+
* secret: "mysecret"
|
|
63
64
|
* };
|
|
64
65
|
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
* .catch(console.error); // an error occurred
|
|
66
|
+
* secrets
|
|
67
|
+
* .createSecret(request)
|
|
68
|
+
* .then(console.log) // successful response
|
|
69
|
+
* .catch(console.error); // an error occurred
|
|
70
70
|
*/
|
|
71
71
|
async createSecret(request) {
|
|
72
72
|
const client = this.client.getSecretsClient();
|
|
@@ -83,14 +83,14 @@ class Secrets {
|
|
|
83
83
|
* @param {string} ref - The reference of the Secret to retrieve
|
|
84
84
|
* @return {Promise<Acl>} - The response object that contains the Secret
|
|
85
85
|
* @example
|
|
86
|
-
*
|
|
87
|
-
* const ref = "00000000-0000-0000-0000-000000000000"
|
|
88
|
-
*
|
|
89
86
|
* const secrets = new SDK.Secrets(client); // Existing client object
|
|
90
87
|
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
88
|
+
* const ref = "00000000-0000-0000-0000-000000000000";
|
|
89
|
+
*
|
|
90
|
+
* secrets
|
|
91
|
+
* .getSecret(ref)
|
|
92
|
+
* .then(console.log) // successful response
|
|
93
|
+
* .catch(console.error); // an error occurred
|
|
94
94
|
*/
|
|
95
95
|
async getSecret(ref) {
|
|
96
96
|
const client = this.client.getSecretsClient();
|
|
@@ -110,17 +110,17 @@ class Secrets {
|
|
|
110
110
|
* @param {string} request.secret - The secret of the Secret
|
|
111
111
|
* @return {Promise<BaseApiObject>} - The response object that contains the reference to the updated Secret
|
|
112
112
|
* @example
|
|
113
|
+
* const secrets = new SDK.Secrets(client); // Existing client object
|
|
113
114
|
*
|
|
114
115
|
* const request = {
|
|
115
|
-
*
|
|
116
|
-
*
|
|
116
|
+
* ref: "00000000-0000-0000-0000-000000000000",
|
|
117
|
+
* secret: "mysecret"
|
|
117
118
|
* };
|
|
118
119
|
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
* .catch(console.error); // an error occurred
|
|
120
|
+
* secrets
|
|
121
|
+
* .updateSecret(request)
|
|
122
|
+
* .then(console.log) // successful response
|
|
123
|
+
* .catch(console.error); // an error occurred
|
|
124
124
|
*/
|
|
125
125
|
async updateSecret(request) {
|
|
126
126
|
const client = this.client.getSecretsClient();
|
|
@@ -139,17 +139,17 @@ class Secrets {
|
|
|
139
139
|
* @param {string} request.pageToken - The token to retrieve the next page of Secrets
|
|
140
140
|
* @return {Promise<ListSecretsResponse>} - The response object that contains the list of Secrets
|
|
141
141
|
* @example
|
|
142
|
+
* const secrets = new SDK.Secrets(client); // Existing client object
|
|
142
143
|
*
|
|
143
144
|
* const request = {
|
|
144
|
-
*
|
|
145
|
-
*
|
|
145
|
+
* pageSize: 10,
|
|
146
|
+
* pageToken: "00000000-0000-0000-0000-000000000000"
|
|
146
147
|
* };
|
|
147
148
|
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
* .catch(console.error); // an error occurred
|
|
149
|
+
* secrets
|
|
150
|
+
* .listSecrets(request)
|
|
151
|
+
* .then(console.log) // successful response
|
|
152
|
+
* .catch(console.error); // an error occurred
|
|
153
153
|
*/
|
|
154
154
|
async listSecrets(request) {
|
|
155
155
|
const client = this.client.getSecretsClient();
|
|
@@ -168,14 +168,14 @@ class Secrets {
|
|
|
168
168
|
* @param {string} ref - The reference of the Secret to delete
|
|
169
169
|
* @return {Promise<BaseApiObject>} - The response object that contains the reference to the deleted Secret
|
|
170
170
|
* @example
|
|
171
|
-
*
|
|
172
|
-
* const ref = "00000000-0000-0000-0000-000000000000"
|
|
173
|
-
*
|
|
174
171
|
* const secrets = new SDK.Secrets(client); // Existing client object
|
|
175
172
|
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
*
|
|
173
|
+
* const ref = "00000000-0000-0000-0000-000000000000";
|
|
174
|
+
*
|
|
175
|
+
* secrets
|
|
176
|
+
* .deleteSecret(ref)
|
|
177
|
+
* .then(console.log) // successful response
|
|
178
|
+
* .catch(console.error); // an error occurred
|
|
179
179
|
*/
|
|
180
180
|
async deleteSecret(ref) {
|
|
181
181
|
const applicationsClient = this.client.getSecretsClient();
|
package/dist/node/Trunks.d.ts
CHANGED
|
@@ -10,11 +10,11 @@ import { FonosterClient } from "./client/types";
|
|
|
10
10
|
* const SDK = require("@fonoster/sdk");
|
|
11
11
|
*
|
|
12
12
|
* async function main(request) {
|
|
13
|
-
*
|
|
14
|
-
*
|
|
13
|
+
* const API_KEY = "your-api-key";
|
|
14
|
+
* const ACCESS_KEY_ID = "00000000-0000-0000-0000-000000000000";
|
|
15
15
|
*
|
|
16
|
-
*
|
|
17
|
-
* const client = SDK.Client({ accessKeyId });
|
|
16
|
+
* try {
|
|
17
|
+
* const client = SDK.Client({ accessKeyId: ACCESS_KEY_ID });
|
|
18
18
|
* await client.loginWithApiKey(apiKey);
|
|
19
19
|
*
|
|
20
20
|
* const trunks = new SDK.Trunks(client);
|
|
@@ -63,27 +63,27 @@ declare class Trunks {
|
|
|
63
63
|
* @param {boolean} request.uris[].enabled - Optional enabled of the Trunk
|
|
64
64
|
* @return {Promise<BaseApiObject>} - The response object that contains the reference to the created Trunk
|
|
65
65
|
* @example
|
|
66
|
+
* const trunks = new SDK.Trunks(client); // Existing client object
|
|
66
67
|
*
|
|
67
68
|
* const request = {
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
69
|
+
* name: "My Trunk",
|
|
70
|
+
* inboundUri: "sip.company.fonoster.io"
|
|
71
|
+
* sendRegister: true
|
|
72
|
+
* uris: [{
|
|
73
|
+
* host: "sip.company.fonoster.io",
|
|
74
|
+
* port: 5060,
|
|
75
|
+
* transport: "UDP",
|
|
76
|
+
* user: "user",
|
|
77
|
+
* weight: 0,
|
|
78
|
+
* priority: 0,
|
|
79
|
+
* enabled: true
|
|
80
|
+
* }]
|
|
80
81
|
* };
|
|
81
82
|
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
* .catch(console.error); // an error occurred
|
|
83
|
+
* trunks
|
|
84
|
+
* .createTrunk(request)
|
|
85
|
+
* .then(console.log) // successful response
|
|
86
|
+
* .catch(console.error); // an error occurred
|
|
87
87
|
*/
|
|
88
88
|
createTrunk(request: CreateTrunkRequest): Promise<BaseApiObject>;
|
|
89
89
|
/**
|
|
@@ -92,14 +92,14 @@ declare class Trunks {
|
|
|
92
92
|
* @param {string} ref - The reference of the Trunk to retrieve
|
|
93
93
|
* @return {Promise<Acl>} - The response object that contains the Trunk
|
|
94
94
|
* @example
|
|
95
|
-
*
|
|
96
|
-
* const ref = "00000000-0000-0000-0000-000000000000"
|
|
97
|
-
*
|
|
98
95
|
* const trunks = new SDK.Trunks(client); // Existing client object
|
|
99
96
|
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
97
|
+
* const ref = "00000000-0000-0000-0000-000000000000";
|
|
98
|
+
*
|
|
99
|
+
* trunks
|
|
100
|
+
* .getTrunk(ref)
|
|
101
|
+
* .then(console.log) // successful response
|
|
102
|
+
* .catch(console.error); // an error occurred
|
|
103
103
|
*/
|
|
104
104
|
getTrunk(ref: string): Promise<unknown>;
|
|
105
105
|
/**
|
|
@@ -122,21 +122,27 @@ declare class Trunks {
|
|
|
122
122
|
* @param {boolean} request.uris[].enabled - Optional enabled of the Trunk
|
|
123
123
|
* @return {Promise<BaseApiObject>} - The response object that contains the reference to the updated Trunk
|
|
124
124
|
* @example
|
|
125
|
+
* const trunks = new SDK.Trunks(client); // Existing client object
|
|
125
126
|
*
|
|
126
127
|
* const request = {
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
128
|
+
* ref: "00000000-0000-0000-0000-000000000000",
|
|
129
|
+
* name: "My Trunk",
|
|
130
|
+
* sendRegister: true
|
|
131
|
+
* uris: [{
|
|
132
|
+
* host: "sip.company.fonoster.io",
|
|
133
|
+
* port: 5060,
|
|
134
|
+
* transport: "UDP",
|
|
135
|
+
* user: "user",
|
|
136
|
+
* weight: 0,
|
|
137
|
+
* priority: 0,
|
|
138
|
+
* enabled: true
|
|
139
|
+
* }]
|
|
139
140
|
* };
|
|
141
|
+
*
|
|
142
|
+
* trunks
|
|
143
|
+
* .updateTrunk(request)
|
|
144
|
+
* .then(console.log) // successful response
|
|
145
|
+
* .catch(console.error); // an error occurred
|
|
140
146
|
*/
|
|
141
147
|
updateTrunk(request: UpdateTrunkRequest): Promise<BaseApiObject>;
|
|
142
148
|
/**
|
|
@@ -147,17 +153,17 @@ declare class Trunks {
|
|
|
147
153
|
* @param {string} request.pageToken - The token to retrieve the next page of Trunks
|
|
148
154
|
* @return {Promise<ListTrunksResponse>} - The response object that contains the list of Trunks
|
|
149
155
|
* @example
|
|
156
|
+
* const trunks = new SDK.Trunks(client); // Existing client object
|
|
150
157
|
*
|
|
151
158
|
* const request = {
|
|
152
|
-
*
|
|
153
|
-
*
|
|
159
|
+
* pageSize: 10,
|
|
160
|
+
* pageToken: "00000000-0000-0000-0000-000000000000"
|
|
154
161
|
* };
|
|
155
162
|
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
* .catch(console.error); // an error occurred
|
|
163
|
+
* trunks
|
|
164
|
+
* .listTrunks(request)
|
|
165
|
+
* .then(console.log) // successful response
|
|
166
|
+
* .catch(console.error); // an error occurred
|
|
161
167
|
*/
|
|
162
168
|
listTrunks(request: ListTrunksRequest): Promise<ListTrunksResponse>;
|
|
163
169
|
/**
|
|
@@ -167,14 +173,14 @@ declare class Trunks {
|
|
|
167
173
|
* @param {string} ref - The reference of the Trunk to delete
|
|
168
174
|
* @return {Promise<BaseApiObject>} - The response object that contains the reference to the deleted Trunk
|
|
169
175
|
* @example
|
|
170
|
-
*
|
|
171
|
-
* const ref = "00000000-0000-0000-0000-000000000000"
|
|
172
|
-
*
|
|
173
176
|
* const trunks = new SDK.Trunks(client); // Existing client object
|
|
174
177
|
*
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
+
* const ref = "00000000-0000-0000-0000-000000000000";
|
|
179
|
+
*
|
|
180
|
+
* trunks
|
|
181
|
+
* .deleteTrunk(ref)
|
|
182
|
+
* .then(console.log) // successful response
|
|
183
|
+
* .catch(console.error); // an error occurred
|
|
178
184
|
*/
|
|
179
185
|
deleteTrunk(ref: string): Promise<BaseApiObject>;
|
|
180
186
|
}
|