@fonoster/identity-client 0.19.1 → 0.20.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/dist/index.d.ts CHANGED
@@ -39,6 +39,8 @@ export interface InviteMemberRequest {
39
39
  role: string;
40
40
  name?: string;
41
41
  }
42
+ /** Channel a verification code is sent over. */
43
+ export type ContactType = "EMAIL" | "PHONE";
42
44
  export interface WorkspaceAccess {
43
45
  accessKeyId: string;
44
46
  role: string;
@@ -90,6 +92,9 @@ export declare class IdentityClient {
90
92
  updateWorkspace(ref: string, name: string, token: string): Promise<{
91
93
  ref: string;
92
94
  }>;
95
+ deleteWorkspace(ref: string, token: string): Promise<{
96
+ ref: string;
97
+ }>;
93
98
  listWorkspaceMembers(accessKeyId: string, token: string): Promise<{
94
99
  items: WorkspaceMember[];
95
100
  nextPageToken?: string;
@@ -103,6 +108,8 @@ export declare class IdentityClient {
103
108
  resendWorkspaceMembershipInvitation(userRef: string, accessKeyId: string, token: string): Promise<{
104
109
  userRef: string;
105
110
  }>;
111
+ sendVerificationCode(contactType: ContactType, value: string): Promise<void>;
112
+ verifyCode(username: string, contactType: ContactType, value: string, verificationCode: string): Promise<void>;
106
113
  sendResetPasswordCode(username: string, resetPasswordUrl: string): Promise<void>;
107
114
  resetPassword(username: string, password: string, verificationCode: string): Promise<void>;
108
115
  close(): void;
package/dist/index.js CHANGED
@@ -148,6 +148,9 @@ class IdentityClient {
148
148
  updateWorkspace(ref, name, token) {
149
149
  return this.unary("updateWorkspace", { ref, name }, { token });
150
150
  }
151
+ deleteWorkspace(ref, token) {
152
+ return this.unary("deleteWorkspace", { ref }, { token });
153
+ }
151
154
  listWorkspaceMembers(accessKeyId, token) {
152
155
  return this.unary("listWorkspaceMembers", {}, { token, accessKeyId });
153
156
  }
@@ -160,6 +163,17 @@ class IdentityClient {
160
163
  resendWorkspaceMembershipInvitation(userRef, accessKeyId, token) {
161
164
  return this.unary("resendWorkspaceMembershipInvitation", { userRef }, { token, accessKeyId });
162
165
  }
166
+ sendVerificationCode(contactType, value) {
167
+ return this.unary("sendVerificationCode", { contactType, value });
168
+ }
169
+ verifyCode(username, contactType, value, verificationCode) {
170
+ return this.unary("verifyCode", {
171
+ username,
172
+ contactType,
173
+ value,
174
+ verificationCode
175
+ });
176
+ }
163
177
  sendResetPasswordCode(username, resetPasswordUrl) {
164
178
  return this.unary("sendResetPasswordCode", { username, resetPasswordUrl });
165
179
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fonoster/identity-client",
3
- "version": "0.19.1",
3
+ "version": "0.20.0",
4
4
  "description": "Lightweight client for the Fonoster Identity gRPC service",
5
5
  "license": "MIT",
6
6
  "main": "dist/index",
@@ -28,5 +28,5 @@
28
28
  "publishConfig": {
29
29
  "access": "public"
30
30
  },
31
- "gitHead": "4c28def9ff1aebbbaf2e23a8944cf3cf49c4da1e"
31
+ "gitHead": "b123f4400cbeb968ae2b5f4a27c2375f5bb372c0"
32
32
  }