@fonoster/sdk 0.12.15 → 0.13.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.
@@ -16,7 +16,7 @@
16
16
  * See the License for the specific language governing permissions and
17
17
  * limitations under the License.
18
18
  */
19
- import { BaseApiObject, CreateUserRequest, CreateUserWithOauth2CodeRequest, ExchangeCredentialsResponse, ResetPasswordRequest, UpdateUserRequest, User } from "@fonoster/types";
19
+ import { BaseApiObject, CreateUserRequest, CreateUserWithOauth2CodeRequest, ExchangeCredentialsResponse, ResetPasswordRequest, SendResetPasswordCodeRequest, UpdateUserRequest, User } from "@fonoster/types";
20
20
  import { FonosterClient } from "./client/types";
21
21
  /**
22
22
  * @classdesc Fonoster Users, part of the Fonoster Identity subsystem,
@@ -149,7 +149,7 @@ declare class Users {
149
149
  * .then(console.log) // successful response
150
150
  * .catch(console.error); // an error occurred
151
151
  */
152
- sendResetPasswordCode(username: string): Promise<BaseApiObject>;
152
+ sendResetPasswordCode(request: SendResetPasswordCodeRequest): Promise<BaseApiObject>;
153
153
  /**
154
154
  * Resets the password of the User.
155
155
  *
@@ -169,13 +169,13 @@ class Users {
169
169
  * .then(console.log) // successful response
170
170
  * .catch(console.error); // an error occurred
171
171
  */
172
- async sendResetPasswordCode(username) {
172
+ async sendResetPasswordCode(request) {
173
173
  const client = this.client.getIdentityClient();
174
174
  return await (0, makeRpcRequest_1.makeRpcRequest)({
175
175
  method: client.sendResetPasswordCode.bind(client),
176
176
  requestPBObjectConstructor: identity_pb_1.SendResetPasswordCodeRequest,
177
177
  metadata: this.client.getMetadata(),
178
- request: { username }
178
+ request
179
179
  });
180
180
  }
181
181
  /**
@@ -6181,7 +6181,8 @@ proto.fonoster.identity.v1beta2.SendResetPasswordCodeRequest.prototype.toObject
6181
6181
  */
6182
6182
  proto.fonoster.identity.v1beta2.SendResetPasswordCodeRequest.toObject = function(includeInstance, msg) {
6183
6183
  var f, obj = {
6184
- username: jspb.Message.getFieldWithDefault(msg, 1, "")
6184
+ username: jspb.Message.getFieldWithDefault(msg, 1, ""),
6185
+ resetPasswordUrl: jspb.Message.getFieldWithDefault(msg, 2, "")
6185
6186
  };
6186
6187
 
6187
6188
  if (includeInstance) {
@@ -6222,6 +6223,10 @@ proto.fonoster.identity.v1beta2.SendResetPasswordCodeRequest.deserializeBinaryFr
6222
6223
  var value = /** @type {string} */ (reader.readString());
6223
6224
  msg.setUsername(value);
6224
6225
  break;
6226
+ case 2:
6227
+ var value = /** @type {string} */ (reader.readString());
6228
+ msg.setResetPasswordUrl(value);
6229
+ break;
6225
6230
  default:
6226
6231
  reader.skipField();
6227
6232
  break;
@@ -6258,6 +6263,13 @@ proto.fonoster.identity.v1beta2.SendResetPasswordCodeRequest.serializeBinaryToWr
6258
6263
  f
6259
6264
  );
6260
6265
  }
6266
+ f = message.getResetPasswordUrl();
6267
+ if (f.length > 0) {
6268
+ writer.writeString(
6269
+ 2,
6270
+ f
6271
+ );
6272
+ }
6261
6273
  };
6262
6274
 
6263
6275
 
@@ -6279,6 +6291,24 @@ proto.fonoster.identity.v1beta2.SendResetPasswordCodeRequest.prototype.setUserna
6279
6291
  };
6280
6292
 
6281
6293
 
6294
+ /**
6295
+ * optional string reset_password_url = 2;
6296
+ * @return {string}
6297
+ */
6298
+ proto.fonoster.identity.v1beta2.SendResetPasswordCodeRequest.prototype.getResetPasswordUrl = function() {
6299
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
6300
+ };
6301
+
6302
+
6303
+ /**
6304
+ * @param {string} value
6305
+ * @return {!proto.fonoster.identity.v1beta2.SendResetPasswordCodeRequest} returns this
6306
+ */
6307
+ proto.fonoster.identity.v1beta2.SendResetPasswordCodeRequest.prototype.setResetPasswordUrl = function(value) {
6308
+ return jspb.Message.setProto3StringField(this, 2, value);
6309
+ };
6310
+
6311
+
6282
6312
 
6283
6313
 
6284
6314
 
@@ -687,6 +687,9 @@ export class SendResetPasswordCodeRequest extends jspb.Message {
687
687
  getUsername(): string;
688
688
  setUsername(value: string): SendResetPasswordCodeRequest;
689
689
 
690
+ getResetPasswordUrl(): string;
691
+ setResetPasswordUrl(value: string): SendResetPasswordCodeRequest;
692
+
690
693
  serializeBinary(): Uint8Array;
691
694
  toObject(includeInstance?: boolean): SendResetPasswordCodeRequest.AsObject;
692
695
  static toObject(includeInstance: boolean, msg: SendResetPasswordCodeRequest): SendResetPasswordCodeRequest.AsObject;
@@ -698,6 +701,7 @@ export class SendResetPasswordCodeRequest extends jspb.Message {
698
701
  export namespace SendResetPasswordCodeRequest {
699
702
  export type AsObject = {
700
703
  username: string,
704
+ resetPasswordUrl: string,
701
705
  }
702
706
  }
703
707
 
@@ -6181,7 +6181,8 @@ proto.fonoster.identity.v1beta2.SendResetPasswordCodeRequest.prototype.toObject
6181
6181
  */
6182
6182
  proto.fonoster.identity.v1beta2.SendResetPasswordCodeRequest.toObject = function(includeInstance, msg) {
6183
6183
  var f, obj = {
6184
- username: jspb.Message.getFieldWithDefault(msg, 1, "")
6184
+ username: jspb.Message.getFieldWithDefault(msg, 1, ""),
6185
+ resetPasswordUrl: jspb.Message.getFieldWithDefault(msg, 2, "")
6185
6186
  };
6186
6187
 
6187
6188
  if (includeInstance) {
@@ -6222,6 +6223,10 @@ proto.fonoster.identity.v1beta2.SendResetPasswordCodeRequest.deserializeBinaryFr
6222
6223
  var value = /** @type {string} */ (reader.readString());
6223
6224
  msg.setUsername(value);
6224
6225
  break;
6226
+ case 2:
6227
+ var value = /** @type {string} */ (reader.readString());
6228
+ msg.setResetPasswordUrl(value);
6229
+ break;
6225
6230
  default:
6226
6231
  reader.skipField();
6227
6232
  break;
@@ -6258,6 +6263,13 @@ proto.fonoster.identity.v1beta2.SendResetPasswordCodeRequest.serializeBinaryToWr
6258
6263
  f
6259
6264
  );
6260
6265
  }
6266
+ f = message.getResetPasswordUrl();
6267
+ if (f.length > 0) {
6268
+ writer.writeString(
6269
+ 2,
6270
+ f
6271
+ );
6272
+ }
6261
6273
  };
6262
6274
 
6263
6275
 
@@ -6279,6 +6291,24 @@ proto.fonoster.identity.v1beta2.SendResetPasswordCodeRequest.prototype.setUserna
6279
6291
  };
6280
6292
 
6281
6293
 
6294
+ /**
6295
+ * optional string reset_password_url = 2;
6296
+ * @return {string}
6297
+ */
6298
+ proto.fonoster.identity.v1beta2.SendResetPasswordCodeRequest.prototype.getResetPasswordUrl = function() {
6299
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
6300
+ };
6301
+
6302
+
6303
+ /**
6304
+ * @param {string} value
6305
+ * @return {!proto.fonoster.identity.v1beta2.SendResetPasswordCodeRequest} returns this
6306
+ */
6307
+ proto.fonoster.identity.v1beta2.SendResetPasswordCodeRequest.prototype.setResetPasswordUrl = function(value) {
6308
+ return jspb.Message.setProto3StringField(this, 2, value);
6309
+ };
6310
+
6311
+
6282
6312
 
6283
6313
 
6284
6314