@fonoster/sdk 0.7.38 → 0.7.40
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/dist/node/Acls.d.ts +5 -4
- package/dist/node/Acls.js +5 -4
- package/dist/node/Agents.d.ts +5 -4
- package/dist/node/Agents.js +5 -4
- package/dist/node/ApiKeys.d.ts +5 -4
- package/dist/node/ApiKeys.js +5 -4
- package/dist/node/Applications.d.ts +5 -4
- package/dist/node/Applications.js +5 -4
- package/dist/node/Calls.d.ts +5 -4
- package/dist/node/Calls.js +5 -4
- package/dist/node/Credentials.d.ts +5 -4
- package/dist/node/Credentials.js +5 -4
- package/dist/node/Domains.d.ts +5 -4
- package/dist/node/Domains.js +5 -4
- package/dist/node/Numbers.d.ts +5 -4
- package/dist/node/Numbers.js +5 -4
- package/dist/node/Secrets.d.ts +5 -4
- package/dist/node/Secrets.js +5 -4
- package/dist/node/Trunks.d.ts +5 -4
- package/dist/node/Trunks.js +5 -4
- package/dist/node/Users.d.ts +5 -4
- package/dist/node/Users.js +5 -4
- package/dist/node/Workspaces.d.ts +5 -4
- package/dist/node/Workspaces.js +5 -4
- package/dist/node/client/AbstractClient.d.ts +1 -1
- package/dist/node/client/AbstractClient.js +3 -3
- package/dist/node/generated/node/identity_pb.js +41 -11
- package/dist/node/generated/web/identity_pb.d.ts +4 -0
- package/dist/node/generated/web/identity_pb.js +41 -11
- package/dist/node/tsconfig.tsbuildinfo +1 -1
- package/dist/web/fonoster.min.js +1 -1
- package/dist/web/index.esm.js +1 -1
- package/package.json +4 -4
package/dist/node/Acls.d.ts
CHANGED
|
@@ -9,12 +9,13 @@ import { FonosterClient } from "./client/types";
|
|
|
9
9
|
* const SDK = require("@fonoster/sdk");
|
|
10
10
|
*
|
|
11
11
|
* async function main(request) {
|
|
12
|
-
* const
|
|
13
|
-
* const
|
|
12
|
+
* const apiKey = "your-api-key";
|
|
13
|
+
* const apiSecret = "your-api-secret"
|
|
14
|
+
* const accessKeyId = "00000000-0000-0000-0000-000000000000";
|
|
14
15
|
*
|
|
15
16
|
* try {
|
|
16
|
-
* const client = SDK.Client({ accessKeyId
|
|
17
|
-
* await client.loginWithApiKey(
|
|
17
|
+
* const client = SDK.Client({ accessKeyId });
|
|
18
|
+
* await client.loginWithApiKey(apiKey, apiSecret);
|
|
18
19
|
*
|
|
19
20
|
* const acls = new SDK.Acls(client);
|
|
20
21
|
* const response = await acls.createAcl(request);
|
package/dist/node/Acls.js
CHANGED
|
@@ -12,12 +12,13 @@ const acls_pb_1 = require("./generated/node/acls_pb");
|
|
|
12
12
|
* const SDK = require("@fonoster/sdk");
|
|
13
13
|
*
|
|
14
14
|
* async function main(request) {
|
|
15
|
-
* const
|
|
16
|
-
* const
|
|
15
|
+
* const apiKey = "your-api-key";
|
|
16
|
+
* const apiSecret = "your-api-secret"
|
|
17
|
+
* const accessKeyId = "00000000-0000-0000-0000-000000000000";
|
|
17
18
|
*
|
|
18
19
|
* try {
|
|
19
|
-
* const client = SDK.Client({ accessKeyId
|
|
20
|
-
* await client.loginWithApiKey(
|
|
20
|
+
* const client = SDK.Client({ accessKeyId });
|
|
21
|
+
* await client.loginWithApiKey(apiKey, apiSecret);
|
|
21
22
|
*
|
|
22
23
|
* const acls = new SDK.Acls(client);
|
|
23
24
|
* const response = await acls.createAcl(request);
|
package/dist/node/Agents.d.ts
CHANGED
|
@@ -9,12 +9,13 @@ import { FonosterClient } from "./client/types";
|
|
|
9
9
|
* const SDK = require("@fonoster/sdk");
|
|
10
10
|
*
|
|
11
11
|
* async function main(request) {
|
|
12
|
-
* const
|
|
13
|
-
* const
|
|
12
|
+
* const apiKey = "your-api-key";
|
|
13
|
+
* const apiSecret = "your-api-secret"
|
|
14
|
+
* const accessKeyId = "00000000-0000-0000-0000-000000000000";
|
|
14
15
|
*
|
|
15
16
|
* try {
|
|
16
|
-
* const client = SDK.Client({ accessKeyId
|
|
17
|
-
* await client.loginWithApiKey(
|
|
17
|
+
* const client = SDK.Client({ accessKeyId });
|
|
18
|
+
* await client.loginWithApiKey(apiKey, apiSecret);
|
|
18
19
|
*
|
|
19
20
|
* const agents = new SDK.Agents(client);
|
|
20
21
|
* const response = await agents.createAgent(request);
|
package/dist/node/Agents.js
CHANGED
|
@@ -12,12 +12,13 @@ const agents_pb_1 = require("./generated/node/agents_pb");
|
|
|
12
12
|
* const SDK = require("@fonoster/sdk");
|
|
13
13
|
*
|
|
14
14
|
* async function main(request) {
|
|
15
|
-
* const
|
|
16
|
-
* const
|
|
15
|
+
* const apiKey = "your-api-key";
|
|
16
|
+
* const apiSecret = "your-api-secret"
|
|
17
|
+
* const accessKeyId = "00000000-0000-0000-0000-000000000000";
|
|
17
18
|
*
|
|
18
19
|
* try {
|
|
19
|
-
* const client = SDK.Client({ accessKeyId
|
|
20
|
-
* await client.loginWithApiKey(
|
|
20
|
+
* const client = SDK.Client({ accessKeyId });
|
|
21
|
+
* await client.loginWithApiKey(apiKey, apiSecret);
|
|
21
22
|
*
|
|
22
23
|
* const agents = new SDK.Agents(client);
|
|
23
24
|
* const response = await agents.createAgent(request);
|
package/dist/node/ApiKeys.d.ts
CHANGED
|
@@ -10,12 +10,13 @@ import { FonosterClient } from "./client/types";
|
|
|
10
10
|
* const SDK = require("@fonoster/sdk");
|
|
11
11
|
*
|
|
12
12
|
* async function main(request) {
|
|
13
|
-
* const
|
|
14
|
-
* const
|
|
13
|
+
* const apiKey = "your-api-key";
|
|
14
|
+
* const apiSecret = "your-api-secret"
|
|
15
|
+
* const accessKeyId = "00000000-0000-0000-0000-000000000000";
|
|
15
16
|
*
|
|
16
17
|
* try {
|
|
17
|
-
* const client = SDK.Client({ accessKeyId
|
|
18
|
-
* await client.loginWithApiKey(apiKey);
|
|
18
|
+
* const client = SDK.Client({ accessKeyId });
|
|
19
|
+
* await client.loginWithApiKey(apiKey, apiSecret);
|
|
19
20
|
*
|
|
20
21
|
* const apiKeys = new SDK.ApiKeys(client);
|
|
21
22
|
* const response = await apiKeys.createApiKey(request);
|
package/dist/node/ApiKeys.js
CHANGED
|
@@ -32,12 +32,13 @@ const identity_pb_1 = require("./generated/node/identity_pb");
|
|
|
32
32
|
* const SDK = require("@fonoster/sdk");
|
|
33
33
|
*
|
|
34
34
|
* async function main(request) {
|
|
35
|
-
* const
|
|
36
|
-
* const
|
|
35
|
+
* const apiKey = "your-api-key";
|
|
36
|
+
* const apiSecret = "your-api-secret"
|
|
37
|
+
* const accessKeyId = "00000000-0000-0000-0000-000000000000";
|
|
37
38
|
*
|
|
38
39
|
* try {
|
|
39
|
-
* const client = SDK.Client({ accessKeyId
|
|
40
|
-
* await client.loginWithApiKey(apiKey);
|
|
40
|
+
* const client = SDK.Client({ accessKeyId });
|
|
41
|
+
* await client.loginWithApiKey(apiKey, apiSecret);
|
|
41
42
|
*
|
|
42
43
|
* const apiKeys = new SDK.ApiKeys(client);
|
|
43
44
|
* const response = await apiKeys.createApiKey(request);
|
|
@@ -10,12 +10,13 @@ import { FonosterClient } from "./client/types";
|
|
|
10
10
|
* const SDK = require("@fonoster/sdk");
|
|
11
11
|
*
|
|
12
12
|
* async function main(request) {
|
|
13
|
-
* const
|
|
14
|
-
* const
|
|
13
|
+
* const apiKey = "your-api-key";
|
|
14
|
+
* const apiSecret = "your-api-secret"
|
|
15
|
+
* const accessKeyId = "00000000-0000-0000-0000-000000000000";
|
|
15
16
|
*
|
|
16
17
|
* try {
|
|
17
|
-
* const client = SDK.Client({ accessKeyId
|
|
18
|
-
* await client.loginWithApiKey(apiKey);
|
|
18
|
+
* const client = SDK.Client({ accessKeyId });
|
|
19
|
+
* await client.loginWithApiKey(apiKey, apiSecret);
|
|
19
20
|
*
|
|
20
21
|
* const apps = new SDK.Applications(client);
|
|
21
22
|
* const response = await apps.createApplication(request);
|
|
@@ -14,12 +14,13 @@ const utils_1 = require("./utils");
|
|
|
14
14
|
* const SDK = require("@fonoster/sdk");
|
|
15
15
|
*
|
|
16
16
|
* async function main(request) {
|
|
17
|
-
* const
|
|
18
|
-
* const
|
|
17
|
+
* const apiKey = "your-api-key";
|
|
18
|
+
* const apiSecret = "your-api-secret"
|
|
19
|
+
* const accessKeyId = "00000000-0000-0000-0000-000000000000";
|
|
19
20
|
*
|
|
20
21
|
* try {
|
|
21
|
-
* const client = SDK.Client({ accessKeyId
|
|
22
|
-
* await client.loginWithApiKey(apiKey);
|
|
22
|
+
* const client = SDK.Client({ accessKeyId });
|
|
23
|
+
* await client.loginWithApiKey(apiKey, apiSecret);
|
|
23
24
|
*
|
|
24
25
|
* const apps = new SDK.Applications(client);
|
|
25
26
|
* const response = await apps.createApplication(request);
|
package/dist/node/Calls.d.ts
CHANGED
|
@@ -11,12 +11,13 @@ import { FonosterClient } from "./client/types";
|
|
|
11
11
|
* const SDK = require("@fonoster/sdk");
|
|
12
12
|
*
|
|
13
13
|
* async function main(request) {
|
|
14
|
-
* const
|
|
15
|
-
* const
|
|
14
|
+
* const apiKey = "your-api-key";
|
|
15
|
+
* const apiSecret = "your-api-secret"
|
|
16
|
+
* const accessKeyId = "00000000-0000-0000-0000-000000000000";
|
|
16
17
|
*
|
|
17
18
|
* try {
|
|
18
|
-
* const client = SDK.Client({ accessKeyId
|
|
19
|
-
* await client.loginWithApiKey(apiKey);
|
|
19
|
+
* const client = SDK.Client({ accessKeyId });
|
|
20
|
+
* await client.loginWithApiKey(apiKey, apiSecret);
|
|
20
21
|
*
|
|
21
22
|
* const calls = new SDK.Calls(client);
|
|
22
23
|
* const response = await apiKeys.createCall(request);
|
package/dist/node/Calls.js
CHANGED
|
@@ -14,12 +14,13 @@ const utils_1 = require("./utils");
|
|
|
14
14
|
* const SDK = require("@fonoster/sdk");
|
|
15
15
|
*
|
|
16
16
|
* async function main(request) {
|
|
17
|
-
* const
|
|
18
|
-
* const
|
|
17
|
+
* const apiKey = "your-api-key";
|
|
18
|
+
* const apiSecret = "your-api-secret"
|
|
19
|
+
* const accessKeyId = "00000000-0000-0000-0000-000000000000";
|
|
19
20
|
*
|
|
20
21
|
* try {
|
|
21
|
-
* const client = SDK.Client({ accessKeyId
|
|
22
|
-
* await client.loginWithApiKey(apiKey);
|
|
22
|
+
* const client = SDK.Client({ accessKeyId });
|
|
23
|
+
* await client.loginWithApiKey(apiKey, apiSecret);
|
|
23
24
|
*
|
|
24
25
|
* const calls = new SDK.Calls(client);
|
|
25
26
|
* const response = await apiKeys.createCall(request);
|
|
@@ -10,12 +10,13 @@ import { FonosterClient } from "./client/types";
|
|
|
10
10
|
* const SDK = require("@fonoster/sdk");
|
|
11
11
|
*
|
|
12
12
|
* async function main(request) {
|
|
13
|
-
* const
|
|
14
|
-
* const
|
|
13
|
+
* const apiKey = "your-api-key";
|
|
14
|
+
* const apiSecret = "your-api-secret"
|
|
15
|
+
* const accessKeyId = "00000000-0000-0000-0000-000000000000";
|
|
15
16
|
*
|
|
16
17
|
* try {
|
|
17
|
-
* const client = SDK.Client({ accessKeyId
|
|
18
|
-
* await client.loginWithApiKey(apiKey);
|
|
18
|
+
* const client = SDK.Client({ accessKeyId });
|
|
19
|
+
* await client.loginWithApiKey(apiKey, apiSecret);
|
|
19
20
|
*
|
|
20
21
|
* const credentials = new SDK.Credentials(client);
|
|
21
22
|
* const response = await apiKeys.createCredentials(request);
|
package/dist/node/Credentials.js
CHANGED
|
@@ -13,12 +13,13 @@ const credentials_pb_1 = require("./generated/node/credentials_pb");
|
|
|
13
13
|
* const SDK = require("@fonoster/sdk");
|
|
14
14
|
*
|
|
15
15
|
* async function main(request) {
|
|
16
|
-
* const
|
|
17
|
-
* const
|
|
16
|
+
* const apiKey = "your-api-key";
|
|
17
|
+
* const apiSecret = "your-api-secret"
|
|
18
|
+
* const accessKeyId = "00000000-0000-0000-0000-000000000000";
|
|
18
19
|
*
|
|
19
20
|
* try {
|
|
20
|
-
* const client = SDK.Client({ accessKeyId
|
|
21
|
-
* await client.loginWithApiKey(apiKey);
|
|
21
|
+
* const client = SDK.Client({ accessKeyId });
|
|
22
|
+
* await client.loginWithApiKey(apiKey, apiSecret);
|
|
22
23
|
*
|
|
23
24
|
* const credentials = new SDK.Credentials(client);
|
|
24
25
|
* const response = await apiKeys.createCredentials(request);
|
package/dist/node/Domains.d.ts
CHANGED
|
@@ -10,12 +10,13 @@ import { FonosterClient } from "./client/types";
|
|
|
10
10
|
* const SDK = require("@fonoster/sdk");
|
|
11
11
|
*
|
|
12
12
|
* async function main(request) {
|
|
13
|
-
* const
|
|
14
|
-
* const
|
|
13
|
+
* const apiKey = "your-api-key";
|
|
14
|
+
* const apiSecret = "your-api-secret"
|
|
15
|
+
* const accessKeyId = "00000000-0000-0000-0000-000000000000";
|
|
15
16
|
*
|
|
16
17
|
* try {
|
|
17
|
-
* const client = SDK.Client({ accessKeyId
|
|
18
|
-
* await client.loginWithApiKey(apiKey);
|
|
18
|
+
* const client = SDK.Client({ accessKeyId });
|
|
19
|
+
* await client.loginWithApiKey(apiKey, apiSecret);
|
|
19
20
|
*
|
|
20
21
|
* const domains = new SDK.Domains(client);
|
|
21
22
|
* const response = await domains.createDomain(request);
|
package/dist/node/Domains.js
CHANGED
|
@@ -13,12 +13,13 @@ const domains_pb_1 = require("./generated/node/domains_pb");
|
|
|
13
13
|
* const SDK = require("@fonoster/sdk");
|
|
14
14
|
*
|
|
15
15
|
* async function main(request) {
|
|
16
|
-
* const
|
|
17
|
-
* const
|
|
16
|
+
* const apiKey = "your-api-key";
|
|
17
|
+
* const apiSecret = "your-api-secret"
|
|
18
|
+
* const accessKeyId = "00000000-0000-0000-0000-000000000000";
|
|
18
19
|
*
|
|
19
20
|
* try {
|
|
20
|
-
* const client = SDK.Client({ accessKeyId
|
|
21
|
-
* await client.loginWithApiKey(apiKey);
|
|
21
|
+
* const client = SDK.Client({ accessKeyId });
|
|
22
|
+
* await client.loginWithApiKey(apiKey, apiSecret);
|
|
22
23
|
*
|
|
23
24
|
* const domains = new SDK.Domains(client);
|
|
24
25
|
* const response = await domains.createDomain(request);
|
package/dist/node/Numbers.d.ts
CHANGED
|
@@ -10,12 +10,13 @@ import { FonosterClient } from "./client/types";
|
|
|
10
10
|
* const SDK = require("@fonoster/sdk");
|
|
11
11
|
*
|
|
12
12
|
* async function main(request) {
|
|
13
|
-
* const
|
|
14
|
-
* const
|
|
13
|
+
* const apiKey = "your-api-key";
|
|
14
|
+
* const apiSecret = "your-api-secret"
|
|
15
|
+
* const accessKeyId = "00000000-0000-0000-0000-000000000000";
|
|
15
16
|
*
|
|
16
17
|
* try {
|
|
17
|
-
* const client = SDK.Client({ accessKeyId
|
|
18
|
-
* await client.loginWithApiKey(apiKey);
|
|
18
|
+
* const client = SDK.Client({ accessKeyId });
|
|
19
|
+
* await client.loginWithApiKey(apiKey, apiSecret);
|
|
19
20
|
*
|
|
20
21
|
* const numbers = new SDK.Numbers(client);
|
|
21
22
|
* const response = await numbers.createNumber(request);
|
package/dist/node/Numbers.js
CHANGED
|
@@ -13,12 +13,13 @@ const numbers_pb_1 = require("./generated/node/numbers_pb");
|
|
|
13
13
|
* const SDK = require("@fonoster/sdk");
|
|
14
14
|
*
|
|
15
15
|
* async function main(request) {
|
|
16
|
-
* const
|
|
17
|
-
* const
|
|
16
|
+
* const apiKey = "your-api-key";
|
|
17
|
+
* const apiSecret = "your-api-secret"
|
|
18
|
+
* const accessKeyId = "00000000-0000-0000-0000-000000000000";
|
|
18
19
|
*
|
|
19
20
|
* try {
|
|
20
|
-
* const client = SDK.Client({ accessKeyId
|
|
21
|
-
* await client.loginWithApiKey(apiKey);
|
|
21
|
+
* const client = SDK.Client({ accessKeyId });
|
|
22
|
+
* await client.loginWithApiKey(apiKey, apiSecret);
|
|
22
23
|
*
|
|
23
24
|
* const numbers = new SDK.Numbers(client);
|
|
24
25
|
* const response = await numbers.createNumber(request);
|
package/dist/node/Secrets.d.ts
CHANGED
|
@@ -10,12 +10,13 @@ import { FonosterClient } from "./client/types";
|
|
|
10
10
|
* const SDK = require("@fonoster/sdk");
|
|
11
11
|
*
|
|
12
12
|
* async function main(request) {
|
|
13
|
-
* const
|
|
14
|
-
* const
|
|
13
|
+
* const apiKey = "your-api-key";
|
|
14
|
+
* const apiSecret = "your-api-secret"
|
|
15
|
+
* const accessKeyId = "00000000-0000-0000-0000-000000000000";
|
|
15
16
|
*
|
|
16
17
|
* try {
|
|
17
|
-
* const client = SDK.Client({ accessKeyId
|
|
18
|
-
* await client.loginWithApiKey(apiKey);
|
|
18
|
+
* const client = SDK.Client({ accessKeyId });
|
|
19
|
+
* await client.loginWithApiKey(apiKey, apiSecret);
|
|
19
20
|
*
|
|
20
21
|
* const secrets = new SDK.Secrets(client);
|
|
21
22
|
* const response = await secrets.creteSecret(request);
|
package/dist/node/Secrets.js
CHANGED
|
@@ -13,12 +13,13 @@ 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
|
-
* const
|
|
17
|
-
* const
|
|
16
|
+
* const apiKey = "your-api-key";
|
|
17
|
+
* const apiSecret = "your-api-secret"
|
|
18
|
+
* const accessKeyId = "00000000-0000-0000-0000-000000000000";
|
|
18
19
|
*
|
|
19
20
|
* try {
|
|
20
|
-
* const client = SDK.Client({ accessKeyId
|
|
21
|
-
* await client.loginWithApiKey(apiKey);
|
|
21
|
+
* const client = SDK.Client({ accessKeyId });
|
|
22
|
+
* await client.loginWithApiKey(apiKey, apiSecret);
|
|
22
23
|
*
|
|
23
24
|
* const secrets = new SDK.Secrets(client);
|
|
24
25
|
* const response = await secrets.creteSecret(request);
|
package/dist/node/Trunks.d.ts
CHANGED
|
@@ -10,12 +10,13 @@ import { FonosterClient } from "./client/types";
|
|
|
10
10
|
* const SDK = require("@fonoster/sdk");
|
|
11
11
|
*
|
|
12
12
|
* async function main(request) {
|
|
13
|
-
* const
|
|
14
|
-
* const
|
|
13
|
+
* const apiKey = "your-api-key";
|
|
14
|
+
* const apiSecret = "your-api-secret"
|
|
15
|
+
* const accessKeyId = "00000000-0000-0000-0000-000000000000";
|
|
15
16
|
*
|
|
16
17
|
* try {
|
|
17
|
-
* const client = SDK.Client({ accessKeyId
|
|
18
|
-
* await client.loginWithApiKey(apiKey);
|
|
18
|
+
* const client = SDK.Client({ accessKeyId });
|
|
19
|
+
* await client.loginWithApiKey(apiKey, apiSecret);
|
|
19
20
|
*
|
|
20
21
|
* const trunks = new SDK.Trunks(client);
|
|
21
22
|
* const response = await trunks.createTrunk(request);
|
package/dist/node/Trunks.js
CHANGED
|
@@ -13,12 +13,13 @@ const trunks_pb_1 = require("./generated/node/trunks_pb");
|
|
|
13
13
|
* const SDK = require("@fonoster/sdk");
|
|
14
14
|
*
|
|
15
15
|
* async function main(request) {
|
|
16
|
-
* const
|
|
17
|
-
* const
|
|
16
|
+
* const apiKey = "your-api-key";
|
|
17
|
+
* const apiSecret = "your-api-secret"
|
|
18
|
+
* const accessKeyId = "00000000-0000-0000-0000-000000000000";
|
|
18
19
|
*
|
|
19
20
|
* try {
|
|
20
|
-
* const client = SDK.Client({ accessKeyId
|
|
21
|
-
* await client.loginWithApiKey(apiKey);
|
|
21
|
+
* const client = SDK.Client({ accessKeyId });
|
|
22
|
+
* await client.loginWithApiKey(apiKey, apiSecret);
|
|
22
23
|
*
|
|
23
24
|
* const trunks = new SDK.Trunks(client);
|
|
24
25
|
* const response = await trunks.createTrunk(request);
|
package/dist/node/Users.d.ts
CHANGED
|
@@ -10,12 +10,13 @@ import { FonosterClient } from "./client/types";
|
|
|
10
10
|
* const SDK = require("@fonoster/sdk");
|
|
11
11
|
*
|
|
12
12
|
* async function main(request) {
|
|
13
|
-
* const
|
|
14
|
-
* const
|
|
13
|
+
* const apiKey = "your-api-key";
|
|
14
|
+
* const apiSecret = "your-api-secret"
|
|
15
|
+
* const accessKeyId = "00000000-0000-0000-0000-000000000000";
|
|
15
16
|
*
|
|
16
17
|
* try {
|
|
17
|
-
* const client = SDK.Client({ accessKeyId
|
|
18
|
-
* await client.loginWithApiKey(apiKey);
|
|
18
|
+
* const client = SDK.Client({ accessKeyId });
|
|
19
|
+
* await client.loginWithApiKey(apiKey, apiSecret);
|
|
19
20
|
*
|
|
20
21
|
* const users = new SDK.Users(client);
|
|
21
22
|
* const response = await users.createUser(request);
|
package/dist/node/Users.js
CHANGED
|
@@ -13,12 +13,13 @@ const identity_pb_1 = require("./generated/node/identity_pb");
|
|
|
13
13
|
* const SDK = require("@fonoster/sdk");
|
|
14
14
|
*
|
|
15
15
|
* async function main(request) {
|
|
16
|
-
* const
|
|
17
|
-
* const
|
|
16
|
+
* const apiKey = "your-api-key";
|
|
17
|
+
* const apiSecret = "your-api-secret"
|
|
18
|
+
* const accessKeyId = "00000000-0000-0000-0000-000000000000";
|
|
18
19
|
*
|
|
19
20
|
* try {
|
|
20
|
-
* const client = SDK.Client({ accessKeyId
|
|
21
|
-
* await client.loginWithApiKey(apiKey);
|
|
21
|
+
* const client = SDK.Client({ accessKeyId });
|
|
22
|
+
* await client.loginWithApiKey(apiKey, apiSecret);
|
|
22
23
|
*
|
|
23
24
|
* const users = new SDK.Users(client);
|
|
24
25
|
* const response = await users.createUser(request);
|
|
@@ -10,12 +10,13 @@ import { FonosterClient } from "./client/types";
|
|
|
10
10
|
* const SDK = require("@fonoster/sdk");
|
|
11
11
|
*
|
|
12
12
|
* async function main(request) {
|
|
13
|
-
* const
|
|
14
|
-
* const
|
|
13
|
+
* const apiKey = "your-api-key";
|
|
14
|
+
* const apiSecret = "your-api-secret"
|
|
15
|
+
* const accessKeyId = "00000000-0000-0000-0000-000000000000";
|
|
15
16
|
*
|
|
16
17
|
* try {
|
|
17
|
-
* const client = SDK.Client({ accessKeyId
|
|
18
|
-
* await client.loginWithApiKey(apiKey);
|
|
18
|
+
* const client = SDK.Client({ accessKeyId });
|
|
19
|
+
* await client.loginWithApiKey(apiKey, apiSecret);
|
|
19
20
|
*
|
|
20
21
|
* const workspaces = new SDK.Workspaces(client);
|
|
21
22
|
* const response = await workspaces.createWorkspace(request);
|
package/dist/node/Workspaces.js
CHANGED
|
@@ -13,12 +13,13 @@ const identity_pb_1 = require("./generated/node/identity_pb");
|
|
|
13
13
|
* const SDK = require("@fonoster/sdk");
|
|
14
14
|
*
|
|
15
15
|
* async function main(request) {
|
|
16
|
-
* const
|
|
17
|
-
* const
|
|
16
|
+
* const apiKey = "your-api-key";
|
|
17
|
+
* const apiSecret = "your-api-secret"
|
|
18
|
+
* const accessKeyId = "00000000-0000-0000-0000-000000000000";
|
|
18
19
|
*
|
|
19
20
|
* try {
|
|
20
|
-
* const client = SDK.Client({ accessKeyId
|
|
21
|
-
* await client.loginWithApiKey(apiKey);
|
|
21
|
+
* const client = SDK.Client({ accessKeyId });
|
|
22
|
+
* await client.loginWithApiKey(apiKey, apiSecret);
|
|
22
23
|
*
|
|
23
24
|
* const workspaces = new SDK.Workspaces(client);
|
|
24
25
|
* const response = await workspaces.createWorkspace(request);
|
|
@@ -17,7 +17,7 @@ declare abstract class AbstractClient implements FonosterClient {
|
|
|
17
17
|
});
|
|
18
18
|
login(username: string, password: string, verificationCode?: string): Promise<void>;
|
|
19
19
|
loginWithRefreshToken(refreshToken: string): Promise<void>;
|
|
20
|
-
loginWithApiKey(
|
|
20
|
+
loginWithApiKey(accessKeyId: string, accessKeySecret: string): Promise<void>;
|
|
21
21
|
loginWithOauth2Code(provider: "GITHUB", username: string, code: string): Promise<void>;
|
|
22
22
|
sendVerificationCode(contactType: ContactType, value: string): Promise<void>;
|
|
23
23
|
verifyCode(request: {
|
|
@@ -40,14 +40,14 @@ class AbstractClient {
|
|
|
40
40
|
this._refreshToken = newRefreshToken;
|
|
41
41
|
this._accessToken = accessToken;
|
|
42
42
|
}
|
|
43
|
-
async loginWithApiKey(
|
|
43
|
+
async loginWithApiKey(accessKeyId, accessKeySecret) {
|
|
44
44
|
const { refreshToken, accessToken } = await (0, makeRpcRequest_1.makeRpcRequest)({
|
|
45
45
|
method: this.identityClient.exchangeApiKey.bind(this.identityClient),
|
|
46
46
|
requestPBObjectConstructor: identity_pb_1.ExchangeApiKeyRequest,
|
|
47
47
|
metadata: {},
|
|
48
48
|
request: {
|
|
49
|
-
accessKeyId
|
|
50
|
-
accessKeySecret
|
|
49
|
+
accessKeyId,
|
|
50
|
+
accessKeySecret
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
53
|
this._refreshToken = refreshToken;
|
|
@@ -1066,8 +1066,9 @@ proto.fonoster.identity.v1beta2.Workspace.toObject = function(includeInstance, m
|
|
|
1066
1066
|
ref: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
1067
1067
|
name: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
1068
1068
|
ownerRef: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
|
1069
|
-
|
|
1070
|
-
|
|
1069
|
+
accessKeyId: jspb.Message.getFieldWithDefault(msg, 4, ""),
|
|
1070
|
+
createdAt: jspb.Message.getFieldWithDefault(msg, 5, 0),
|
|
1071
|
+
updatedAt: jspb.Message.getFieldWithDefault(msg, 6, 0)
|
|
1071
1072
|
};
|
|
1072
1073
|
|
|
1073
1074
|
if (includeInstance) {
|
|
@@ -1117,10 +1118,14 @@ proto.fonoster.identity.v1beta2.Workspace.deserializeBinaryFromReader = function
|
|
|
1117
1118
|
msg.setOwnerRef(value);
|
|
1118
1119
|
break;
|
|
1119
1120
|
case 4:
|
|
1121
|
+
var value = /** @type {string} */ (reader.readString());
|
|
1122
|
+
msg.setAccessKeyId(value);
|
|
1123
|
+
break;
|
|
1124
|
+
case 5:
|
|
1120
1125
|
var value = /** @type {number} */ (reader.readInt32());
|
|
1121
1126
|
msg.setCreatedAt(value);
|
|
1122
1127
|
break;
|
|
1123
|
-
case
|
|
1128
|
+
case 6:
|
|
1124
1129
|
var value = /** @type {number} */ (reader.readInt32());
|
|
1125
1130
|
msg.setUpdatedAt(value);
|
|
1126
1131
|
break;
|
|
@@ -1174,17 +1179,24 @@ proto.fonoster.identity.v1beta2.Workspace.serializeBinaryToWriter = function(mes
|
|
|
1174
1179
|
f
|
|
1175
1180
|
);
|
|
1176
1181
|
}
|
|
1182
|
+
f = message.getAccessKeyId();
|
|
1183
|
+
if (f.length > 0) {
|
|
1184
|
+
writer.writeString(
|
|
1185
|
+
4,
|
|
1186
|
+
f
|
|
1187
|
+
);
|
|
1188
|
+
}
|
|
1177
1189
|
f = message.getCreatedAt();
|
|
1178
1190
|
if (f !== 0) {
|
|
1179
1191
|
writer.writeInt32(
|
|
1180
|
-
|
|
1192
|
+
5,
|
|
1181
1193
|
f
|
|
1182
1194
|
);
|
|
1183
1195
|
}
|
|
1184
1196
|
f = message.getUpdatedAt();
|
|
1185
1197
|
if (f !== 0) {
|
|
1186
1198
|
writer.writeInt32(
|
|
1187
|
-
|
|
1199
|
+
6,
|
|
1188
1200
|
f
|
|
1189
1201
|
);
|
|
1190
1202
|
}
|
|
@@ -1246,11 +1258,29 @@ proto.fonoster.identity.v1beta2.Workspace.prototype.setOwnerRef = function(value
|
|
|
1246
1258
|
|
|
1247
1259
|
|
|
1248
1260
|
/**
|
|
1249
|
-
* optional
|
|
1261
|
+
* optional string access_key_id = 4;
|
|
1262
|
+
* @return {string}
|
|
1263
|
+
*/
|
|
1264
|
+
proto.fonoster.identity.v1beta2.Workspace.prototype.getAccessKeyId = function() {
|
|
1265
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
|
|
1266
|
+
};
|
|
1267
|
+
|
|
1268
|
+
|
|
1269
|
+
/**
|
|
1270
|
+
* @param {string} value
|
|
1271
|
+
* @return {!proto.fonoster.identity.v1beta2.Workspace} returns this
|
|
1272
|
+
*/
|
|
1273
|
+
proto.fonoster.identity.v1beta2.Workspace.prototype.setAccessKeyId = function(value) {
|
|
1274
|
+
return jspb.Message.setProto3StringField(this, 4, value);
|
|
1275
|
+
};
|
|
1276
|
+
|
|
1277
|
+
|
|
1278
|
+
/**
|
|
1279
|
+
* optional int32 created_at = 5;
|
|
1250
1280
|
* @return {number}
|
|
1251
1281
|
*/
|
|
1252
1282
|
proto.fonoster.identity.v1beta2.Workspace.prototype.getCreatedAt = function() {
|
|
1253
|
-
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this,
|
|
1283
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
|
|
1254
1284
|
};
|
|
1255
1285
|
|
|
1256
1286
|
|
|
@@ -1259,16 +1289,16 @@ proto.fonoster.identity.v1beta2.Workspace.prototype.getCreatedAt = function() {
|
|
|
1259
1289
|
* @return {!proto.fonoster.identity.v1beta2.Workspace} returns this
|
|
1260
1290
|
*/
|
|
1261
1291
|
proto.fonoster.identity.v1beta2.Workspace.prototype.setCreatedAt = function(value) {
|
|
1262
|
-
return jspb.Message.setProto3IntField(this,
|
|
1292
|
+
return jspb.Message.setProto3IntField(this, 5, value);
|
|
1263
1293
|
};
|
|
1264
1294
|
|
|
1265
1295
|
|
|
1266
1296
|
/**
|
|
1267
|
-
* optional int32 updated_at =
|
|
1297
|
+
* optional int32 updated_at = 6;
|
|
1268
1298
|
* @return {number}
|
|
1269
1299
|
*/
|
|
1270
1300
|
proto.fonoster.identity.v1beta2.Workspace.prototype.getUpdatedAt = function() {
|
|
1271
|
-
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this,
|
|
1301
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
|
|
1272
1302
|
};
|
|
1273
1303
|
|
|
1274
1304
|
|
|
@@ -1277,7 +1307,7 @@ proto.fonoster.identity.v1beta2.Workspace.prototype.getUpdatedAt = function() {
|
|
|
1277
1307
|
* @return {!proto.fonoster.identity.v1beta2.Workspace} returns this
|
|
1278
1308
|
*/
|
|
1279
1309
|
proto.fonoster.identity.v1beta2.Workspace.prototype.setUpdatedAt = function(value) {
|
|
1280
|
-
return jspb.Message.setProto3IntField(this,
|
|
1310
|
+
return jspb.Message.setProto3IntField(this, 6, value);
|
|
1281
1311
|
};
|
|
1282
1312
|
|
|
1283
1313
|
|
|
@@ -13,6 +13,9 @@ export class Workspace extends jspb.Message {
|
|
|
13
13
|
getOwnerRef(): string;
|
|
14
14
|
setOwnerRef(value: string): Workspace;
|
|
15
15
|
|
|
16
|
+
getAccessKeyId(): string;
|
|
17
|
+
setAccessKeyId(value: string): Workspace;
|
|
18
|
+
|
|
16
19
|
getCreatedAt(): number;
|
|
17
20
|
setCreatedAt(value: number): Workspace;
|
|
18
21
|
|
|
@@ -32,6 +35,7 @@ export namespace Workspace {
|
|
|
32
35
|
ref: string,
|
|
33
36
|
name: string,
|
|
34
37
|
ownerRef: string,
|
|
38
|
+
accessKeyId: string,
|
|
35
39
|
createdAt: number,
|
|
36
40
|
updatedAt: number,
|
|
37
41
|
}
|