@fonoster/sdk 0.9.23 → 0.9.24

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.
@@ -34,7 +34,7 @@ declare abstract class AbstractClient implements FonosterClient {
34
34
  accessKeyId: string;
35
35
  identityClient: IdentityClient;
36
36
  });
37
- login(username: string, password: string, verificationCode?: string): Promise<void>;
37
+ login(username: string, password: string, twoFactorCode?: string): Promise<void>;
38
38
  logout(): void;
39
39
  loginWithRefreshToken(refreshToken: string): Promise<void>;
40
40
  loginWithApiKey(accessKeyId: string, accessKeySecret: string): Promise<void>;
@@ -16,7 +16,7 @@ class AbstractClient {
16
16
  this._refreshToken = "";
17
17
  this._idToken = "";
18
18
  }
19
- async login(username, password, verificationCode) {
19
+ async login(username, password, twoFactorCode) {
20
20
  const { refreshToken, accessToken, idToken } = await (0, makeRpcRequest_1.makeRpcRequest)({
21
21
  method: this.identityClient.exchangeCredentials.bind(this.identityClient),
22
22
  requestPBObjectConstructor: identity_pb_1.ExchangeCredentialsRequest,
@@ -24,7 +24,7 @@ class AbstractClient {
24
24
  request: {
25
25
  username,
26
26
  password,
27
- verificationCode
27
+ twoFactorCode
28
28
  }
29
29
  });
30
30
  this._refreshToken = refreshToken;
@@ -197,4 +197,4 @@ listAcls: {
197
197
  },
198
198
  };
199
199
 
200
- exports.AclsClient = grpc.makeGenericClientConstructor(AclsService);
200
+ exports.AclsClient = grpc.makeGenericClientConstructor(AclsService, 'Acls');
@@ -197,4 +197,4 @@ listAgents: {
197
197
  },
198
198
  };
199
199
 
200
- exports.AgentsClient = grpc.makeGenericClientConstructor(AgentsService);
200
+ exports.AgentsClient = grpc.makeGenericClientConstructor(AgentsService, 'Agents');
@@ -198,4 +198,4 @@ deleteApplication: {
198
198
  },
199
199
  };
200
200
 
201
- exports.ApplicationsClient = grpc.makeGenericClientConstructor(ApplicationsService);
201
+ exports.ApplicationsClient = grpc.makeGenericClientConstructor(ApplicationsService, 'Applications');
@@ -163,4 +163,4 @@ trackCall: {
163
163
  },
164
164
  };
165
165
 
166
- exports.CallsClient = grpc.makeGenericClientConstructor(CallsService);
166
+ exports.CallsClient = grpc.makeGenericClientConstructor(CallsService, 'Calls');
@@ -197,4 +197,4 @@ listCredentials: {
197
197
  },
198
198
  };
199
199
 
200
- exports.CredentialsServiceClient = grpc.makeGenericClientConstructor(CredentialsServiceService);
200
+ exports.CredentialsServiceClient = grpc.makeGenericClientConstructor(CredentialsServiceService, 'CredentialsService');
@@ -197,4 +197,4 @@ deleteDomain: {
197
197
  },
198
198
  };
199
199
 
200
- exports.DomainsClient = grpc.makeGenericClientConstructor(DomainsService);
200
+ exports.DomainsClient = grpc.makeGenericClientConstructor(DomainsService, 'Domains');
@@ -901,4 +901,4 @@ getPublicKey: {
901
901
  },
902
902
  };
903
903
 
904
- exports.IdentityClient = grpc.makeGenericClientConstructor(IdentityService);
904
+ exports.IdentityClient = grpc.makeGenericClientConstructor(IdentityService, 'Identity');
@@ -8063,7 +8063,7 @@ proto.fonoster.identity.v1beta2.ExchangeCredentialsRequest.toObject = function(i
8063
8063
  var f, obj = {
8064
8064
  username: jspb.Message.getFieldWithDefault(msg, 1, ""),
8065
8065
  password: jspb.Message.getFieldWithDefault(msg, 2, ""),
8066
- verificationCode: jspb.Message.getFieldWithDefault(msg, 3, "")
8066
+ twoFactorCode: jspb.Message.getFieldWithDefault(msg, 3, "")
8067
8067
  };
8068
8068
 
8069
8069
  if (includeInstance) {
@@ -8110,7 +8110,7 @@ proto.fonoster.identity.v1beta2.ExchangeCredentialsRequest.deserializeBinaryFrom
8110
8110
  break;
8111
8111
  case 3:
8112
8112
  var value = /** @type {string} */ (reader.readString());
8113
- msg.setVerificationCode(value);
8113
+ msg.setTwoFactorCode(value);
8114
8114
  break;
8115
8115
  default:
8116
8116
  reader.skipField();
@@ -8155,7 +8155,7 @@ proto.fonoster.identity.v1beta2.ExchangeCredentialsRequest.serializeBinaryToWrit
8155
8155
  f
8156
8156
  );
8157
8157
  }
8158
- f = message.getVerificationCode();
8158
+ f = message.getTwoFactorCode();
8159
8159
  if (f.length > 0) {
8160
8160
  writer.writeString(
8161
8161
  3,
@@ -8202,10 +8202,10 @@ proto.fonoster.identity.v1beta2.ExchangeCredentialsRequest.prototype.setPassword
8202
8202
 
8203
8203
 
8204
8204
  /**
8205
- * optional string verification_code = 3;
8205
+ * optional string two_factor_code = 3;
8206
8206
  * @return {string}
8207
8207
  */
8208
- proto.fonoster.identity.v1beta2.ExchangeCredentialsRequest.prototype.getVerificationCode = function() {
8208
+ proto.fonoster.identity.v1beta2.ExchangeCredentialsRequest.prototype.getTwoFactorCode = function() {
8209
8209
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
8210
8210
  };
8211
8211
 
@@ -8214,7 +8214,7 @@ proto.fonoster.identity.v1beta2.ExchangeCredentialsRequest.prototype.getVerifica
8214
8214
  * @param {string} value
8215
8215
  * @return {!proto.fonoster.identity.v1beta2.ExchangeCredentialsRequest} returns this
8216
8216
  */
8217
- proto.fonoster.identity.v1beta2.ExchangeCredentialsRequest.prototype.setVerificationCode = function(value) {
8217
+ proto.fonoster.identity.v1beta2.ExchangeCredentialsRequest.prototype.setTwoFactorCode = function(value) {
8218
8218
  return jspb.Message.setProto3StringField(this, 3, value);
8219
8219
  };
8220
8220
 
@@ -197,4 +197,4 @@ listNumbers: {
197
197
  },
198
198
  };
199
199
 
200
- exports.NumbersClient = grpc.makeGenericClientConstructor(NumbersService);
200
+ exports.NumbersClient = grpc.makeGenericClientConstructor(NumbersService, 'Numbers');
@@ -197,4 +197,4 @@ listSecrets: {
197
197
  },
198
198
  };
199
199
 
200
- exports.SecretsClient = grpc.makeGenericClientConstructor(SecretsService);
200
+ exports.SecretsClient = grpc.makeGenericClientConstructor(SecretsService, 'Secrets');
@@ -197,4 +197,4 @@ listTrunks: {
197
197
  },
198
198
  };
199
199
 
200
- exports.TrunksClient = grpc.makeGenericClientConstructor(TrunksService);
200
+ exports.TrunksClient = grpc.makeGenericClientConstructor(TrunksService, 'Trunks');
@@ -946,8 +946,8 @@ export class ExchangeCredentialsRequest extends jspb.Message {
946
946
  getPassword(): string;
947
947
  setPassword(value: string): ExchangeCredentialsRequest;
948
948
 
949
- getVerificationCode(): string;
950
- setVerificationCode(value: string): ExchangeCredentialsRequest;
949
+ getTwoFactorCode(): string;
950
+ setTwoFactorCode(value: string): ExchangeCredentialsRequest;
951
951
 
952
952
  serializeBinary(): Uint8Array;
953
953
  toObject(includeInstance?: boolean): ExchangeCredentialsRequest.AsObject;
@@ -961,7 +961,7 @@ export namespace ExchangeCredentialsRequest {
961
961
  export type AsObject = {
962
962
  username: string,
963
963
  password: string,
964
- verificationCode: string,
964
+ twoFactorCode: string,
965
965
  }
966
966
  }
967
967
 
@@ -8063,7 +8063,7 @@ proto.fonoster.identity.v1beta2.ExchangeCredentialsRequest.toObject = function(i
8063
8063
  var f, obj = {
8064
8064
  username: jspb.Message.getFieldWithDefault(msg, 1, ""),
8065
8065
  password: jspb.Message.getFieldWithDefault(msg, 2, ""),
8066
- verificationCode: jspb.Message.getFieldWithDefault(msg, 3, "")
8066
+ twoFactorCode: jspb.Message.getFieldWithDefault(msg, 3, "")
8067
8067
  };
8068
8068
 
8069
8069
  if (includeInstance) {
@@ -8110,7 +8110,7 @@ proto.fonoster.identity.v1beta2.ExchangeCredentialsRequest.deserializeBinaryFrom
8110
8110
  break;
8111
8111
  case 3:
8112
8112
  var value = /** @type {string} */ (reader.readString());
8113
- msg.setVerificationCode(value);
8113
+ msg.setTwoFactorCode(value);
8114
8114
  break;
8115
8115
  default:
8116
8116
  reader.skipField();
@@ -8155,7 +8155,7 @@ proto.fonoster.identity.v1beta2.ExchangeCredentialsRequest.serializeBinaryToWrit
8155
8155
  f
8156
8156
  );
8157
8157
  }
8158
- f = message.getVerificationCode();
8158
+ f = message.getTwoFactorCode();
8159
8159
  if (f.length > 0) {
8160
8160
  writer.writeString(
8161
8161
  3,
@@ -8202,10 +8202,10 @@ proto.fonoster.identity.v1beta2.ExchangeCredentialsRequest.prototype.setPassword
8202
8202
 
8203
8203
 
8204
8204
  /**
8205
- * optional string verification_code = 3;
8205
+ * optional string two_factor_code = 3;
8206
8206
  * @return {string}
8207
8207
  */
8208
- proto.fonoster.identity.v1beta2.ExchangeCredentialsRequest.prototype.getVerificationCode = function() {
8208
+ proto.fonoster.identity.v1beta2.ExchangeCredentialsRequest.prototype.getTwoFactorCode = function() {
8209
8209
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
8210
8210
  };
8211
8211
 
@@ -8214,7 +8214,7 @@ proto.fonoster.identity.v1beta2.ExchangeCredentialsRequest.prototype.getVerifica
8214
8214
  * @param {string} value
8215
8215
  * @return {!proto.fonoster.identity.v1beta2.ExchangeCredentialsRequest} returns this
8216
8216
  */
8217
- proto.fonoster.identity.v1beta2.ExchangeCredentialsRequest.prototype.setVerificationCode = function(value) {
8217
+ proto.fonoster.identity.v1beta2.ExchangeCredentialsRequest.prototype.setTwoFactorCode = function(value) {
8218
8218
  return jspb.Message.setProto3StringField(this, 3, value);
8219
8219
  };
8220
8220