@fonoster/sdk 0.12.16 → 0.13.1
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/Users.d.ts +11 -6
- package/dist/node/Users.js +11 -6
- package/dist/node/generated/node/identity_pb.js +31 -1
- package/dist/node/generated/web/identity_pb.d.ts +4 -0
- package/dist/node/generated/web/identity_pb.js +31 -1
- 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/Users.d.ts
CHANGED
|
@@ -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,
|
|
@@ -137,19 +137,24 @@ declare class Users {
|
|
|
137
137
|
/**
|
|
138
138
|
* Sends a reset password code to the User.
|
|
139
139
|
*
|
|
140
|
-
* @param {
|
|
141
|
-
* @
|
|
140
|
+
* @param {SendResetPasswordCodeRequest} request - The request object that contains the necessary information to send a reset password code to a User
|
|
141
|
+
* @param {string} request.username - The username of the User
|
|
142
|
+
* @param {string} request.resetPasswordUrl - The URL to reset the password
|
|
143
|
+
* @return {Promise<BaseApiObject>} - The response object that contains the reference to the User
|
|
142
144
|
* @example
|
|
143
145
|
* const users = new SDK.Users(client); // Existing client object
|
|
144
146
|
*
|
|
145
|
-
* const
|
|
147
|
+
* const request = {
|
|
148
|
+
* username: "john.doe@example.com",
|
|
149
|
+
* resetPasswordUrl: "https://example.com/reset-password"
|
|
150
|
+
* };
|
|
146
151
|
*
|
|
147
152
|
* users
|
|
148
|
-
* .sendResetPasswordCode(
|
|
153
|
+
* .sendResetPasswordCode(request)
|
|
149
154
|
* .then(console.log) // successful response
|
|
150
155
|
* .catch(console.error); // an error occurred
|
|
151
156
|
*/
|
|
152
|
-
sendResetPasswordCode(
|
|
157
|
+
sendResetPasswordCode(request: SendResetPasswordCodeRequest): Promise<BaseApiObject>;
|
|
153
158
|
/**
|
|
154
159
|
* Resets the password of the User.
|
|
155
160
|
*
|
package/dist/node/Users.js
CHANGED
|
@@ -157,25 +157,30 @@ class Users {
|
|
|
157
157
|
/**
|
|
158
158
|
* Sends a reset password code to the User.
|
|
159
159
|
*
|
|
160
|
-
* @param {
|
|
161
|
-
* @
|
|
160
|
+
* @param {SendResetPasswordCodeRequest} request - The request object that contains the necessary information to send a reset password code to a User
|
|
161
|
+
* @param {string} request.username - The username of the User
|
|
162
|
+
* @param {string} request.resetPasswordUrl - The URL to reset the password
|
|
163
|
+
* @return {Promise<BaseApiObject>} - The response object that contains the reference to the User
|
|
162
164
|
* @example
|
|
163
165
|
* const users = new SDK.Users(client); // Existing client object
|
|
164
166
|
*
|
|
165
|
-
* const
|
|
167
|
+
* const request = {
|
|
168
|
+
* username: "john.doe@example.com",
|
|
169
|
+
* resetPasswordUrl: "https://example.com/reset-password"
|
|
170
|
+
* };
|
|
166
171
|
*
|
|
167
172
|
* users
|
|
168
|
-
* .sendResetPasswordCode(
|
|
173
|
+
* .sendResetPasswordCode(request)
|
|
169
174
|
* .then(console.log) // successful response
|
|
170
175
|
* .catch(console.error); // an error occurred
|
|
171
176
|
*/
|
|
172
|
-
async sendResetPasswordCode(
|
|
177
|
+
async sendResetPasswordCode(request) {
|
|
173
178
|
const client = this.client.getIdentityClient();
|
|
174
179
|
return await (0, makeRpcRequest_1.makeRpcRequest)({
|
|
175
180
|
method: client.sendResetPasswordCode.bind(client),
|
|
176
181
|
requestPBObjectConstructor: identity_pb_1.SendResetPasswordCodeRequest,
|
|
177
182
|
metadata: this.client.getMetadata(),
|
|
178
|
-
request
|
|
183
|
+
request
|
|
179
184
|
});
|
|
180
185
|
}
|
|
181
186
|
/**
|
|
@@ -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
|
|