@fonoster/sdk 0.9.5 → 0.9.7
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 +3 -15
- package/dist/node/Workspaces.d.ts +1 -9
- package/dist/node/Workspaces.js +1 -9
- package/dist/node/client/AbstractClient.d.ts +1 -0
- package/dist/node/client/AbstractClient.js +5 -0
- 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 +3 -3
package/README.md
CHANGED
|
@@ -2305,7 +2305,7 @@ Note that an active Fonoster deployment is required.
|
|
|
2305
2305
|
* [.getWorkspace(ref)](#Workspaces+getWorkspace) ⇒ <code>Promise.<Acl></code>
|
|
2306
2306
|
* [.updateWorkspace(request)](#Workspaces+updateWorkspace) ⇒ <code>Promise.<BaseApiObject></code>
|
|
2307
2307
|
* [.deleteWorkspace(ref)](#Workspaces+deleteWorkspace) ⇒ <code>Promise.<BaseApiObject></code>
|
|
2308
|
-
* [.listWorkspaces(
|
|
2308
|
+
* [.listWorkspaces()](#Workspaces+listWorkspaces) ⇒ <code>Promise.<ListWorkspacesResponse></code>
|
|
2309
2309
|
* [.inviteUserToWorkspace(request)](#Workspaces+inviteUserToWorkspace) ⇒ <code>Promise.<BaseApiObject></code>
|
|
2310
2310
|
* [.resendWorkspaceMembershipInvitation(userRef)](#Workspaces+resendWorkspaceMembershipInvitation) ⇒ <code>Promise.<ResendWorkspaceMembershipInvitationResponse></code>
|
|
2311
2311
|
* [.removeUserFromWorkspace(userRef)](#Workspaces+removeUserFromWorkspace) ⇒ <code>Promise.<RemoveUserFromWorkspaceResponse></code>
|
|
@@ -2451,29 +2451,17 @@ workspaces
|
|
|
2451
2451
|
```
|
|
2452
2452
|
<a name="Workspaces+listWorkspaces"></a>
|
|
2453
2453
|
|
|
2454
|
-
### workspaces.listWorkspaces(
|
|
2454
|
+
### workspaces.listWorkspaces() ⇒ <code>Promise.<ListWorkspacesResponse></code>
|
|
2455
2455
|
Retrieves a list of Workspaces from a Workspace.
|
|
2456
2456
|
|
|
2457
2457
|
**Kind**: instance method of [<code>Workspaces</code>](#Workspaces)
|
|
2458
2458
|
**Returns**: <code>Promise.<ListWorkspacesResponse></code> - - The response object that contains the list of Workspaces
|
|
2459
|
-
|
|
2460
|
-
| Param | Type | Description |
|
|
2461
|
-
| --- | --- | --- |
|
|
2462
|
-
| request | <code>ListWorkspacesRequest</code> | The request object that contains the necessary information to retrieve a list of Workspaces |
|
|
2463
|
-
| request.pageSize | <code>number</code> | The workspace of Workspaces to retrieve |
|
|
2464
|
-
| request.pageToken | <code>string</code> | The token to retrieve the next page of Workspaces |
|
|
2465
|
-
|
|
2466
2459
|
**Example**
|
|
2467
2460
|
```js
|
|
2468
2461
|
const workspaces = new SDK.Workspaces(client); // Existing client object
|
|
2469
2462
|
|
|
2470
|
-
const request = {
|
|
2471
|
-
pageSize: 10,
|
|
2472
|
-
pageToken: "00000000-0000-0000-0000-000000000000"
|
|
2473
|
-
};
|
|
2474
|
-
|
|
2475
2463
|
workspaces
|
|
2476
|
-
.listWorkspaces(
|
|
2464
|
+
.listWorkspaces()
|
|
2477
2465
|
.then(console.log) // successful response
|
|
2478
2466
|
.catch(console.error); // an error occurred
|
|
2479
2467
|
```
|
|
@@ -119,20 +119,12 @@ declare class Workspaces {
|
|
|
119
119
|
/**
|
|
120
120
|
* Retrieves a list of Workspaces from a Workspace.
|
|
121
121
|
*
|
|
122
|
-
* @param {ListWorkspacesRequest} request - The request object that contains the necessary information to retrieve a list of Workspaces
|
|
123
|
-
* @param {number} request.pageSize - The workspace of Workspaces to retrieve
|
|
124
|
-
* @param {string} request.pageToken - The token to retrieve the next page of Workspaces
|
|
125
122
|
* @return {Promise<ListWorkspacesResponse>} - The response object that contains the list of Workspaces
|
|
126
123
|
* @example
|
|
127
124
|
* const workspaces = new SDK.Workspaces(client); // Existing client object
|
|
128
125
|
*
|
|
129
|
-
* const request = {
|
|
130
|
-
* pageSize: 10,
|
|
131
|
-
* pageToken: "00000000-0000-0000-0000-000000000000"
|
|
132
|
-
* };
|
|
133
|
-
*
|
|
134
126
|
* workspaces
|
|
135
|
-
* .listWorkspaces(
|
|
127
|
+
* .listWorkspaces()
|
|
136
128
|
* .then(console.log) // successful response
|
|
137
129
|
* .catch(console.error); // an error occurred
|
|
138
130
|
*/
|
package/dist/node/Workspaces.js
CHANGED
|
@@ -156,20 +156,12 @@ class Workspaces {
|
|
|
156
156
|
/**
|
|
157
157
|
* Retrieves a list of Workspaces from a Workspace.
|
|
158
158
|
*
|
|
159
|
-
* @param {ListWorkspacesRequest} request - The request object that contains the necessary information to retrieve a list of Workspaces
|
|
160
|
-
* @param {number} request.pageSize - The workspace of Workspaces to retrieve
|
|
161
|
-
* @param {string} request.pageToken - The token to retrieve the next page of Workspaces
|
|
162
159
|
* @return {Promise<ListWorkspacesResponse>} - The response object that contains the list of Workspaces
|
|
163
160
|
* @example
|
|
164
161
|
* const workspaces = new SDK.Workspaces(client); // Existing client object
|
|
165
162
|
*
|
|
166
|
-
* const request = {
|
|
167
|
-
* pageSize: 10,
|
|
168
|
-
* pageToken: "00000000-0000-0000-0000-000000000000"
|
|
169
|
-
* };
|
|
170
|
-
*
|
|
171
163
|
* workspaces
|
|
172
|
-
* .listWorkspaces(
|
|
164
|
+
* .listWorkspaces()
|
|
173
165
|
* .then(console.log) // successful response
|
|
174
166
|
* .catch(console.error); // an error occurred
|
|
175
167
|
*/
|
|
@@ -17,6 +17,7 @@ declare abstract class AbstractClient implements FonosterClient {
|
|
|
17
17
|
identityClient: IdentityClient;
|
|
18
18
|
});
|
|
19
19
|
login(username: string, password: string, verificationCode?: string): Promise<void>;
|
|
20
|
+
logout(): void;
|
|
20
21
|
loginWithRefreshToken(refreshToken: string): Promise<void>;
|
|
21
22
|
loginWithApiKey(accessKeyId: string, accessKeySecret: string): Promise<void>;
|
|
22
23
|
loginWithOauth2Code(provider: "GITHUB", code: string): Promise<void>;
|
|
@@ -31,6 +31,11 @@ class AbstractClient {
|
|
|
31
31
|
this._accessToken = accessToken;
|
|
32
32
|
this._idToken = idToken;
|
|
33
33
|
}
|
|
34
|
+
logout() {
|
|
35
|
+
this._refreshToken = "";
|
|
36
|
+
this._accessToken = "";
|
|
37
|
+
this._idToken = "";
|
|
38
|
+
}
|
|
34
39
|
async loginWithRefreshToken(refreshToken) {
|
|
35
40
|
const { accessToken, refreshToken: newRefreshToken, idToken } = await (0, makeRpcRequest_1.makeRpcRequest)({
|
|
36
41
|
method: this.identityClient.exchangeRefreshToken.bind(this.identityClient),
|