@dereekb/zoho 13.26.0 → 13.27.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/cli/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@dereekb/zoho/cli",
3
- "version": "13.26.0",
3
+ "version": "13.27.1",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "zoho-cli": "index.js"
7
7
  },
8
8
  "peerDependencies": {
9
- "@dereekb/dbx-cli": "13.26.0",
10
- "@dereekb/nestjs": "13.26.0",
11
- "@dereekb/rxjs": "13.26.0",
12
- "@dereekb/util": "13.26.0",
13
- "@dereekb/zoho": "13.26.0",
14
- "@dereekb/zoho/nestjs": "13.26.0",
9
+ "@dereekb/dbx-cli": "13.27.1",
10
+ "@dereekb/nestjs": "13.27.1",
11
+ "@dereekb/rxjs": "13.27.1",
12
+ "@dereekb/util": "13.27.1",
13
+ "@dereekb/zoho": "13.27.1",
14
+ "@dereekb/zoho/nestjs": "13.27.1",
15
15
  "yargs": "^18.0.0"
16
16
  },
17
17
  "devDependencies": {
package/index.cjs.js CHANGED
@@ -332,7 +332,7 @@ function _assert_this_initialized$5(self) {
332
332
  }
333
333
  return self;
334
334
  }
335
- function asyncGeneratorStep$b(gen, resolve, reject, _next, _throw, key, arg) {
335
+ function asyncGeneratorStep$c(gen, resolve, reject, _next, _throw, key, arg) {
336
336
  try {
337
337
  var info = gen[key](arg);
338
338
  var value = info.value;
@@ -346,16 +346,16 @@ function asyncGeneratorStep$b(gen, resolve, reject, _next, _throw, key, arg) {
346
346
  Promise.resolve(value).then(_next, _throw);
347
347
  }
348
348
  }
349
- function _async_to_generator$b(fn) {
349
+ function _async_to_generator$c(fn) {
350
350
  return function() {
351
351
  var self = this, args = arguments;
352
352
  return new Promise(function(resolve, reject) {
353
353
  var gen = fn.apply(self, args);
354
354
  function _next(value) {
355
- asyncGeneratorStep$b(gen, resolve, reject, _next, _throw, "next", value);
355
+ asyncGeneratorStep$c(gen, resolve, reject, _next, _throw, "next", value);
356
356
  }
357
357
  function _throw(err) {
358
- asyncGeneratorStep$b(gen, resolve, reject, _next, _throw, "throw", err);
358
+ asyncGeneratorStep$c(gen, resolve, reject, _next, _throw, "throw", err);
359
359
  }
360
360
  _next(undefined);
361
361
  });
@@ -448,7 +448,7 @@ function _is_native_reflect_construct$5() {
448
448
  return !!result;
449
449
  })();
450
450
  }
451
- function _ts_generator$b(thisArg, body) {
451
+ function _ts_generator$c(thisArg, body) {
452
452
  var f, y, t, _ = {
453
453
  label: 0,
454
454
  sent: function() {
@@ -692,9 +692,9 @@ function _ts_generator$b(thisArg, body) {
692
692
  return function(fetch$1) {
693
693
  var logError = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : defaultLogError, onError = arguments.length > 2 ? arguments[2] : void 0;
694
694
  return function(x, y) {
695
- return _async_to_generator$b(function() {
695
+ return _async_to_generator$c(function() {
696
696
  var e, error;
697
- return _ts_generator$b(this, function(_state) {
697
+ return _ts_generator$c(this, function(_state) {
698
698
  switch(_state.label){
699
699
  case 0:
700
700
  _state.trys.push([
@@ -945,7 +945,7 @@ function _assert_this_initialized$4(self) {
945
945
  }
946
946
  return self;
947
947
  }
948
- function asyncGeneratorStep$a(gen, resolve, reject, _next, _throw, key, arg) {
948
+ function asyncGeneratorStep$b(gen, resolve, reject, _next, _throw, key, arg) {
949
949
  try {
950
950
  var info = gen[key](arg);
951
951
  var value = info.value;
@@ -959,16 +959,16 @@ function asyncGeneratorStep$a(gen, resolve, reject, _next, _throw, key, arg) {
959
959
  Promise.resolve(value).then(_next, _throw);
960
960
  }
961
961
  }
962
- function _async_to_generator$a(fn) {
962
+ function _async_to_generator$b(fn) {
963
963
  return function() {
964
964
  var self = this, args = arguments;
965
965
  return new Promise(function(resolve, reject) {
966
966
  var gen = fn.apply(self, args);
967
967
  function _next(value) {
968
- asyncGeneratorStep$a(gen, resolve, reject, _next, _throw, "next", value);
968
+ asyncGeneratorStep$b(gen, resolve, reject, _next, _throw, "next", value);
969
969
  }
970
970
  function _throw(err) {
971
- asyncGeneratorStep$a(gen, resolve, reject, _next, _throw, "throw", err);
971
+ asyncGeneratorStep$b(gen, resolve, reject, _next, _throw, "throw", err);
972
972
  }
973
973
  _next(undefined);
974
974
  });
@@ -1053,7 +1053,7 @@ function _is_native_reflect_construct$4() {
1053
1053
  return !!result;
1054
1054
  })();
1055
1055
  }
1056
- function _ts_generator$a(thisArg, body) {
1056
+ function _ts_generator$b(thisArg, body) {
1057
1057
  var f, y, t, _ = {
1058
1058
  label: 0,
1059
1059
  sent: function() {
@@ -1285,9 +1285,9 @@ function _ts_generator$a(thisArg, body) {
1285
1285
  * @param responseError - The fetch response error to parse.
1286
1286
  * @returns Parsed Zoho server error, or undefined if parsing fails.
1287
1287
  */ function parseZohoRecruitError(responseError) {
1288
- return _async_to_generator$a(function() {
1288
+ return _async_to_generator$b(function() {
1289
1289
  var data, result;
1290
- return _ts_generator$a(this, function(_state) {
1290
+ return _ts_generator$b(this, function(_state) {
1291
1291
  switch(_state.label){
1292
1292
  case 0:
1293
1293
  return [
@@ -2889,7 +2889,7 @@ function _assert_this_initialized$2(self) {
2889
2889
  }
2890
2890
  return self;
2891
2891
  }
2892
- function asyncGeneratorStep$9(gen, resolve, reject, _next, _throw, key, arg) {
2892
+ function asyncGeneratorStep$a(gen, resolve, reject, _next, _throw, key, arg) {
2893
2893
  try {
2894
2894
  var info = gen[key](arg);
2895
2895
  var value = info.value;
@@ -2903,16 +2903,16 @@ function asyncGeneratorStep$9(gen, resolve, reject, _next, _throw, key, arg) {
2903
2903
  Promise.resolve(value).then(_next, _throw);
2904
2904
  }
2905
2905
  }
2906
- function _async_to_generator$9(fn) {
2906
+ function _async_to_generator$a(fn) {
2907
2907
  return function() {
2908
2908
  var self = this, args = arguments;
2909
2909
  return new Promise(function(resolve, reject) {
2910
2910
  var gen = fn.apply(self, args);
2911
2911
  function _next(value) {
2912
- asyncGeneratorStep$9(gen, resolve, reject, _next, _throw, "next", value);
2912
+ asyncGeneratorStep$a(gen, resolve, reject, _next, _throw, "next", value);
2913
2913
  }
2914
2914
  function _throw(err) {
2915
- asyncGeneratorStep$9(gen, resolve, reject, _next, _throw, "throw", err);
2915
+ asyncGeneratorStep$a(gen, resolve, reject, _next, _throw, "throw", err);
2916
2916
  }
2917
2917
  _next(undefined);
2918
2918
  });
@@ -2984,7 +2984,7 @@ function _is_native_reflect_construct$2() {
2984
2984
  return !!result;
2985
2985
  })();
2986
2986
  }
2987
- function _ts_generator$9(thisArg, body) {
2987
+ function _ts_generator$a(thisArg, body) {
2988
2988
  var f, y, t, _ = {
2989
2989
  label: 0,
2990
2990
  sent: function() {
@@ -3125,9 +3125,9 @@ var logZohoAccountsErrorToConsole = logZohoServerErrorFunction('ZohoAccounts');
3125
3125
  * @param responseError - The fetch response error to parse.
3126
3126
  * @returns The parsed Zoho server error, or undefined if the response could not be parsed.
3127
3127
  */ function parseZohoAccountsError(responseError) {
3128
- return _async_to_generator$9(function() {
3128
+ return _async_to_generator$a(function() {
3129
3129
  var data, result;
3130
- return _ts_generator$9(this, function(_state) {
3130
+ return _ts_generator$a(this, function(_state) {
3131
3131
  switch(_state.label){
3132
3132
  case 0:
3133
3133
  return [
@@ -3175,7 +3175,7 @@ var logZohoAccountsErrorToConsole = logZohoServerErrorFunction('ZohoAccounts');
3175
3175
  var interceptZohoAccounts200StatusWithErrorResponse = interceptZohoErrorResponseFactory(parseZohoAccountsServerErrorResponseData);
3176
3176
  var handleZohoAccountsErrorFetch = handleZohoErrorFetchFactory(parseZohoAccountsError, logZohoAccountsErrorToConsole);
3177
3177
 
3178
- function asyncGeneratorStep$8(gen, resolve, reject, _next, _throw, key, arg) {
3178
+ function asyncGeneratorStep$9(gen, resolve, reject, _next, _throw, key, arg) {
3179
3179
  try {
3180
3180
  var info = gen[key](arg);
3181
3181
  var value = info.value;
@@ -3189,22 +3189,22 @@ function asyncGeneratorStep$8(gen, resolve, reject, _next, _throw, key, arg) {
3189
3189
  Promise.resolve(value).then(_next, _throw);
3190
3190
  }
3191
3191
  }
3192
- function _async_to_generator$8(fn) {
3192
+ function _async_to_generator$9(fn) {
3193
3193
  return function() {
3194
3194
  var self = this, args = arguments;
3195
3195
  return new Promise(function(resolve, reject) {
3196
3196
  var gen = fn.apply(self, args);
3197
3197
  function _next(value) {
3198
- asyncGeneratorStep$8(gen, resolve, reject, _next, _throw, "next", value);
3198
+ asyncGeneratorStep$9(gen, resolve, reject, _next, _throw, "next", value);
3199
3199
  }
3200
3200
  function _throw(err) {
3201
- asyncGeneratorStep$8(gen, resolve, reject, _next, _throw, "throw", err);
3201
+ asyncGeneratorStep$9(gen, resolve, reject, _next, _throw, "throw", err);
3202
3202
  }
3203
3203
  _next(undefined);
3204
3204
  });
3205
3205
  };
3206
3206
  }
3207
- function _ts_generator$8(thisArg, body) {
3207
+ function _ts_generator$9(thisArg, body) {
3208
3208
  var f, y, t, _ = {
3209
3209
  label: 0,
3210
3210
  sent: function() {
@@ -3312,9 +3312,9 @@ function _ts_generator$8(thisArg, body) {
3312
3312
  * @__NO_SIDE_EFFECTS__
3313
3313
  */ function zohoAccessTokenStringFactory(zohoAccessTokenFactory) {
3314
3314
  return function() {
3315
- return _async_to_generator$8(function() {
3315
+ return _async_to_generator$9(function() {
3316
3316
  var token;
3317
- return _ts_generator$8(this, function(_state) {
3317
+ return _ts_generator$9(this, function(_state) {
3318
3318
  switch(_state.label){
3319
3319
  case 0:
3320
3320
  return [
@@ -3514,7 +3514,7 @@ function _object_spread_props$i(target, source) {
3514
3514
  * @deprecated use DEFAULT_ZOHO_RATE_LIMITED_TOO_MANY_REQUESTS_LOG_FUNCTION instead.
3515
3515
  */ var DEFAULT_ZOHO_RATE_LIMITED_TOO_MANY_REQUETS_LOG_FUNCTION = DEFAULT_ZOHO_RATE_LIMITED_TOO_MANY_REQUESTS_LOG_FUNCTION;
3516
3516
 
3517
- function asyncGeneratorStep$7(gen, resolve, reject, _next, _throw, key, arg) {
3517
+ function asyncGeneratorStep$8(gen, resolve, reject, _next, _throw, key, arg) {
3518
3518
  try {
3519
3519
  var info = gen[key](arg);
3520
3520
  var value = info.value;
@@ -3528,16 +3528,16 @@ function asyncGeneratorStep$7(gen, resolve, reject, _next, _throw, key, arg) {
3528
3528
  Promise.resolve(value).then(_next, _throw);
3529
3529
  }
3530
3530
  }
3531
- function _async_to_generator$7(fn) {
3531
+ function _async_to_generator$8(fn) {
3532
3532
  return function() {
3533
3533
  var self = this, args = arguments;
3534
3534
  return new Promise(function(resolve, reject) {
3535
3535
  var gen = fn.apply(self, args);
3536
3536
  function _next(value) {
3537
- asyncGeneratorStep$7(gen, resolve, reject, _next, _throw, "next", value);
3537
+ asyncGeneratorStep$8(gen, resolve, reject, _next, _throw, "next", value);
3538
3538
  }
3539
3539
  function _throw(err) {
3540
- asyncGeneratorStep$7(gen, resolve, reject, _next, _throw, "throw", err);
3540
+ asyncGeneratorStep$8(gen, resolve, reject, _next, _throw, "throw", err);
3541
3541
  }
3542
3542
  _next(undefined);
3543
3543
  });
@@ -3598,7 +3598,7 @@ function _object_spread_props$h(target, source) {
3598
3598
  }
3599
3599
  return target;
3600
3600
  }
3601
- function _ts_generator$7(thisArg, body) {
3601
+ function _ts_generator$8(thisArg, body) {
3602
3602
  var f, y, t, _ = {
3603
3603
  label: 0,
3604
3604
  sent: function() {
@@ -3731,9 +3731,9 @@ function _ts_generator$7(thisArg, body) {
3731
3731
  return fetch.fetchApiFetchService.makeFetch({
3732
3732
  baseUrl: input.apiUrl,
3733
3733
  baseRequest: function baseRequest() {
3734
- return _async_to_generator$7(function() {
3734
+ return _async_to_generator$8(function() {
3735
3735
  var _tmp, _tmp1, _, _1;
3736
- return _ts_generator$7(this, function(_state) {
3736
+ return _ts_generator$8(this, function(_state) {
3737
3737
  switch(_state.label){
3738
3738
  case 0:
3739
3739
  _tmp = {};
@@ -3885,7 +3885,7 @@ function _assert_this_initialized$1(self) {
3885
3885
  }
3886
3886
  return self;
3887
3887
  }
3888
- function asyncGeneratorStep$6(gen, resolve, reject, _next, _throw, key, arg) {
3888
+ function asyncGeneratorStep$7(gen, resolve, reject, _next, _throw, key, arg) {
3889
3889
  try {
3890
3890
  var info = gen[key](arg);
3891
3891
  var value = info.value;
@@ -3899,16 +3899,16 @@ function asyncGeneratorStep$6(gen, resolve, reject, _next, _throw, key, arg) {
3899
3899
  Promise.resolve(value).then(_next, _throw);
3900
3900
  }
3901
3901
  }
3902
- function _async_to_generator$6(fn) {
3902
+ function _async_to_generator$7(fn) {
3903
3903
  return function() {
3904
3904
  var self = this, args = arguments;
3905
3905
  return new Promise(function(resolve, reject) {
3906
3906
  var gen = fn.apply(self, args);
3907
3907
  function _next(value) {
3908
- asyncGeneratorStep$6(gen, resolve, reject, _next, _throw, "next", value);
3908
+ asyncGeneratorStep$7(gen, resolve, reject, _next, _throw, "next", value);
3909
3909
  }
3910
3910
  function _throw(err) {
3911
- asyncGeneratorStep$6(gen, resolve, reject, _next, _throw, "throw", err);
3911
+ asyncGeneratorStep$7(gen, resolve, reject, _next, _throw, "throw", err);
3912
3912
  }
3913
3913
  _next(undefined);
3914
3914
  });
@@ -3993,7 +3993,7 @@ function _is_native_reflect_construct$1() {
3993
3993
  return !!result;
3994
3994
  })();
3995
3995
  }
3996
- function _ts_generator$6(thisArg, body) {
3996
+ function _ts_generator$7(thisArg, body) {
3997
3997
  var f, y, t, _ = {
3998
3998
  label: 0,
3999
3999
  sent: function() {
@@ -4227,9 +4227,9 @@ function _ts_generator$6(thisArg, body) {
4227
4227
  * @param responseError - The fetch response error to parse.
4228
4228
  * @returns The parsed Zoho server error, or undefined if the response could not be parsed.
4229
4229
  */ function parseZohoCrmError(responseError) {
4230
- return _async_to_generator$6(function() {
4230
+ return _async_to_generator$7(function() {
4231
4231
  var data, result;
4232
- return _ts_generator$6(this, function(_state) {
4232
+ return _ts_generator$7(this, function(_state) {
4233
4233
  switch(_state.label){
4234
4234
  case 0:
4235
4235
  return [
@@ -5565,7 +5565,7 @@ function _unsupported_iterable_to_array(o, minLen) {
5565
5565
  };
5566
5566
  }
5567
5567
 
5568
- function asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, key, arg) {
5568
+ function asyncGeneratorStep$6(gen, resolve, reject, _next, _throw, key, arg) {
5569
5569
  try {
5570
5570
  var info = gen[key](arg);
5571
5571
  var value = info.value;
@@ -5579,16 +5579,16 @@ function asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, key, arg) {
5579
5579
  Promise.resolve(value).then(_next, _throw);
5580
5580
  }
5581
5581
  }
5582
- function _async_to_generator$5(fn) {
5582
+ function _async_to_generator$6(fn) {
5583
5583
  return function() {
5584
5584
  var self = this, args = arguments;
5585
5585
  return new Promise(function(resolve, reject) {
5586
5586
  var gen = fn.apply(self, args);
5587
5587
  function _next(value) {
5588
- asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, "next", value);
5588
+ asyncGeneratorStep$6(gen, resolve, reject, _next, _throw, "next", value);
5589
5589
  }
5590
5590
  function _throw(err) {
5591
- asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, "throw", err);
5591
+ asyncGeneratorStep$6(gen, resolve, reject, _next, _throw, "throw", err);
5592
5592
  }
5593
5593
  _next(undefined);
5594
5594
  });
@@ -5649,7 +5649,7 @@ function _object_spread_props$d(target, source) {
5649
5649
  }
5650
5650
  return target;
5651
5651
  }
5652
- function _ts_generator$5(thisArg, body) {
5652
+ function _ts_generator$6(thisArg, body) {
5653
5653
  var f, y, t, _ = {
5654
5654
  label: 0,
5655
5655
  sent: function() {
@@ -5782,9 +5782,9 @@ function _ts_generator$5(thisArg, body) {
5782
5782
  return fetch.fetchApiFetchService.makeFetch({
5783
5783
  baseUrl: input.apiUrl,
5784
5784
  baseRequest: function baseRequest() {
5785
- return _async_to_generator$5(function() {
5785
+ return _async_to_generator$6(function() {
5786
5786
  var _tmp, _tmp1, _, _1;
5787
- return _ts_generator$5(this, function(_state) {
5787
+ return _ts_generator$6(this, function(_state) {
5788
5788
  switch(_state.label){
5789
5789
  case 0:
5790
5790
  _tmp = {};
@@ -5850,6 +5850,54 @@ function _ts_generator$5(thisArg, body) {
5850
5850
  * Maximum length of ZohoCrmTagName
5851
5851
  */ var ZOHO_CRM_TAG_NAME_MAX_LENGTH = 25;
5852
5852
 
5853
+ var ZOHO_SIGN_SERVICE_NAME = 'sign';
5854
+ /**
5855
+ * Full Zoho Sign sandbox API URL. The sandbox does NOT enforce an https `host` origin on embedded
5856
+ * signing requests.
5857
+ */ var ZOHO_SIGN_SANDBOX_API_URL = 'https://signsandbox.zoho.com/api/v1';
5858
+ /**
5859
+ * Full Zoho Sign production API URL. The production endpoint enforces an https `host` origin on
5860
+ * embedded signing requests, rejecting a non-https host with error 3006 ("Url has invalid scheme").
5861
+ */ var ZOHO_SIGN_PRODUCTION_API_URL = 'https://sign.zoho.com/api/v1';
5862
+ /**
5863
+ * Resolves an environment key or passthrough URL to the full Zoho Sign API URL.
5864
+ *
5865
+ * @param input - An environment key ('sandbox' or 'production') or a full API URL.
5866
+ * @returns The resolved Zoho Sign API URL.
5867
+ */ function zohoSignConfigApiUrl(input) {
5868
+ var result;
5869
+ switch(input){
5870
+ case 'sandbox':
5871
+ result = ZOHO_SIGN_SANDBOX_API_URL;
5872
+ break;
5873
+ case 'production':
5874
+ result = ZOHO_SIGN_PRODUCTION_API_URL;
5875
+ break;
5876
+ default:
5877
+ result = input;
5878
+ break;
5879
+ }
5880
+ return result;
5881
+ }
5882
+ /**
5883
+ * Returns whether the given Zoho Sign API URL (an environment key or full URL) targets an endpoint
5884
+ * that enforces an https `host` origin on embedded signing requests. Every production data center
5885
+ * enforces it (rejecting a non-https host with error 3006, "Url has invalid scheme"); only the
5886
+ * sandbox tolerates a non-https host.
5887
+ *
5888
+ * @param input - An environment key ('sandbox' or 'production') or a full API URL.
5889
+ * @returns True unless the resolved URL is the Zoho Sign sandbox.
5890
+ */ function zohoSignApiUrlRequiresHttpsHost(input) {
5891
+ var resolved = zohoSignConfigApiUrl(input);
5892
+ var result;
5893
+ try {
5894
+ result = new URL(resolved).hostname !== new URL(ZOHO_SIGN_SANDBOX_API_URL).hostname;
5895
+ } catch (unused) {
5896
+ result = true; // fail safe: enforce https when the URL cannot be parsed
5897
+ }
5898
+ return result;
5899
+ }
5900
+
5853
5901
  function _define_property$d(obj, key, value) {
5854
5902
  if (key in obj) {
5855
5903
  Object.defineProperty(obj, key, {
@@ -5944,6 +5992,35 @@ function _object_spread_props$c(target, source) {
5944
5992
  }));
5945
5993
  }
5946
5994
 
5995
+ function asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, key, arg) {
5996
+ try {
5997
+ var info = gen[key](arg);
5998
+ var value = info.value;
5999
+ } catch (error) {
6000
+ reject(error);
6001
+ return;
6002
+ }
6003
+ if (info.done) {
6004
+ resolve(value);
6005
+ } else {
6006
+ Promise.resolve(value).then(_next, _throw);
6007
+ }
6008
+ }
6009
+ function _async_to_generator$5(fn) {
6010
+ return function() {
6011
+ var self = this, args = arguments;
6012
+ return new Promise(function(resolve, reject) {
6013
+ var gen = fn.apply(self, args);
6014
+ function _next(value) {
6015
+ asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, "next", value);
6016
+ }
6017
+ function _throw(err) {
6018
+ asyncGeneratorStep$5(gen, resolve, reject, _next, _throw, "throw", err);
6019
+ }
6020
+ _next(undefined);
6021
+ });
6022
+ };
6023
+ }
5947
6024
  function _define_property$c(obj, key, value) {
5948
6025
  if (key in obj) {
5949
6026
  Object.defineProperty(obj, key, {
@@ -6008,6 +6085,105 @@ function _object_without_properties_loose$8(source, excluded) {
6008
6085
  }
6009
6086
  return target;
6010
6087
  }
6088
+ function _ts_generator$5(thisArg, body) {
6089
+ var f, y, t, _ = {
6090
+ label: 0,
6091
+ sent: function() {
6092
+ if (t[0] & 1) throw t[1];
6093
+ return t[1];
6094
+ },
6095
+ trys: [],
6096
+ ops: []
6097
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), d = Object.defineProperty;
6098
+ return d(g, "next", {
6099
+ value: verb(0)
6100
+ }), d(g, "throw", {
6101
+ value: verb(1)
6102
+ }), d(g, "return", {
6103
+ value: verb(2)
6104
+ }), typeof Symbol === "function" && d(g, Symbol.iterator, {
6105
+ value: function() {
6106
+ return this;
6107
+ }
6108
+ }), g;
6109
+ function verb(n) {
6110
+ return function(v) {
6111
+ return step([
6112
+ n,
6113
+ v
6114
+ ]);
6115
+ };
6116
+ }
6117
+ function step(op) {
6118
+ if (f) throw new TypeError("Generator is already executing.");
6119
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
6120
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
6121
+ if (y = 0, t) op = [
6122
+ op[0] & 2,
6123
+ t.value
6124
+ ];
6125
+ switch(op[0]){
6126
+ case 0:
6127
+ case 1:
6128
+ t = op;
6129
+ break;
6130
+ case 4:
6131
+ _.label++;
6132
+ return {
6133
+ value: op[1],
6134
+ done: false
6135
+ };
6136
+ case 5:
6137
+ _.label++;
6138
+ y = op[1];
6139
+ op = [
6140
+ 0
6141
+ ];
6142
+ continue;
6143
+ case 7:
6144
+ op = _.ops.pop();
6145
+ _.trys.pop();
6146
+ continue;
6147
+ default:
6148
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
6149
+ _ = 0;
6150
+ continue;
6151
+ }
6152
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
6153
+ _.label = op[1];
6154
+ break;
6155
+ }
6156
+ if (op[0] === 6 && _.label < t[1]) {
6157
+ _.label = t[1];
6158
+ t = op;
6159
+ break;
6160
+ }
6161
+ if (t && _.label < t[2]) {
6162
+ _.label = t[2];
6163
+ _.ops.push(op);
6164
+ break;
6165
+ }
6166
+ if (t[2]) _.ops.pop();
6167
+ _.trys.pop();
6168
+ continue;
6169
+ }
6170
+ op = body.call(thisArg, _);
6171
+ } catch (e) {
6172
+ op = [
6173
+ 6,
6174
+ e
6175
+ ];
6176
+ y = 0;
6177
+ } finally{
6178
+ f = t = 0;
6179
+ }
6180
+ if (op[0] & 5) throw op[1];
6181
+ return {
6182
+ value: op[0] ? op[1] : void 0,
6183
+ done: true
6184
+ };
6185
+ }
6186
+ }
6011
6187
  // MARK: Utility
6012
6188
  /**
6013
6189
  * Builds a {@link FetchJsonInput} for Zoho Sign API calls.
@@ -6557,37 +6733,31 @@ function _object_without_properties_loose$8(source, excluded) {
6557
6733
  */ function zohoSignGetEmbeddedSigningUrl(context) {
6558
6734
  return function(param) {
6559
6735
  var requestId = param.requestId, actionId = param.actionId, host = param.host;
6560
- return context.fetchJson({
6561
- url: "/requests/".concat(requestId, "/actions/").concat(actionId, "/embedtoken"),
6562
- queryParams: {
6563
- host: host
6564
- }
6565
- }, zohoSignApiFetchJsonInput('POST'));
6736
+ return _async_to_generator$5(function() {
6737
+ var apiUrl;
6738
+ return _ts_generator$5(this, function(_state) {
6739
+ // Zoho Sign's production endpoint enforces an https `host` origin, rejecting a non-https host with
6740
+ // error 3006 ("Url has invalid scheme"). Assert it pre-send so a misconfigured http origin fails with
6741
+ // a legible error instead of an opaque Zoho server error; the sandbox does not enforce this, so a
6742
+ // non-https host is passed through there untouched.
6743
+ apiUrl = context.config.apiUrl;
6744
+ if (apiUrl != null && zohoSignApiUrlRequiresHttpsHost(apiUrl) && !/^https:\/\//i.test(host)) {
6745
+ throw new Error('Zoho Sign requires an https embedded-signing host for this environment, but received "'.concat(host, '".'));
6746
+ }
6747
+ return [
6748
+ 2,
6749
+ context.fetchJson({
6750
+ url: "/requests/".concat(requestId, "/actions/").concat(actionId, "/embedtoken"),
6751
+ queryParams: {
6752
+ host: host
6753
+ }
6754
+ }, zohoSignApiFetchJsonInput('POST'))
6755
+ ];
6756
+ });
6757
+ })();
6566
6758
  };
6567
6759
  }
6568
6760
 
6569
- var ZOHO_SIGN_SERVICE_NAME = 'sign';
6570
- /**
6571
- * Resolves an environment key or passthrough URL to the full Zoho Sign API URL.
6572
- *
6573
- * @param input - An environment key ('sandbox' or 'production') or a full API URL.
6574
- * @returns The resolved Zoho Sign API URL.
6575
- */ function zohoSignConfigApiUrl(input) {
6576
- var result;
6577
- switch(input){
6578
- case 'sandbox':
6579
- result = 'https://signsandbox.zoho.com/api/v1';
6580
- break;
6581
- case 'production':
6582
- result = 'https://sign.zoho.com/api/v1';
6583
- break;
6584
- default:
6585
- result = input;
6586
- break;
6587
- }
6588
- return result;
6589
- }
6590
-
6591
6761
  function asyncGeneratorStep$4(gen, resolve, reject, _next, _throw, key, arg) {
6592
6762
  try {
6593
6763
  var info = gen[key](arg);
@@ -9855,6 +10025,8 @@ exports.ZOHO_RECRUIT_RECORD_ATTACHMENT_METADATA_ATTACH_TYPE_RESUME = ZOHO_RECRUI
9855
10025
  exports.ZOHO_RECRUIT_REMOVE_TAGS_FROM_RECORDS_MAX_IDS_ALLOWED = ZOHO_RECRUIT_REMOVE_TAGS_FROM_RECORDS_MAX_IDS_ALLOWED;
9856
10026
  exports.ZOHO_RECRUIT_SERVICE_NAME = ZOHO_RECRUIT_SERVICE_NAME;
9857
10027
  exports.ZOHO_RECRUIT_TAG_NAME_MAX_LENGTH = ZOHO_RECRUIT_TAG_NAME_MAX_LENGTH;
10028
+ exports.ZOHO_SIGN_PRODUCTION_API_URL = ZOHO_SIGN_PRODUCTION_API_URL;
10029
+ exports.ZOHO_SIGN_SANDBOX_API_URL = ZOHO_SIGN_SANDBOX_API_URL;
9858
10030
  exports.ZOHO_SIGN_SERVICE_NAME = ZOHO_SIGN_SERVICE_NAME;
9859
10031
  exports.ZOHO_SUCCESS_CODE = ZOHO_SUCCESS_CODE;
9860
10032
  exports.ZOHO_SUCCESS_STATUS = ZOHO_SUCCESS_STATUS;
@@ -10100,6 +10272,7 @@ exports.zohoRecruitUrlSearchParams = zohoRecruitUrlSearchParams;
10100
10272
  exports.zohoRecruitUrlSearchParamsMinusIdAndModule = zohoRecruitUrlSearchParamsMinusIdAndModule;
10101
10273
  exports.zohoRecruitUrlSearchParamsMinusModule = zohoRecruitUrlSearchParamsMinusModule;
10102
10274
  exports.zohoServerErrorData = zohoServerErrorData;
10275
+ exports.zohoSignApiUrlRequiresHttpsHost = zohoSignApiUrlRequiresHttpsHost;
10103
10276
  exports.zohoSignConfigApiUrl = zohoSignConfigApiUrl;
10104
10277
  exports.zohoSignCreateDocument = zohoSignCreateDocument;
10105
10278
  exports.zohoSignCreateDocumentFromTemplate = zohoSignCreateDocumentFromTemplate;