superposition-provider 0.102.0 → 0.103.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.js CHANGED
@@ -3183,7 +3183,7 @@ var runtimeConfig = {};
3183
3183
 
3184
3184
  var name = "superposition-sdk";
3185
3185
  var description = "superposition-sdk client";
3186
- var version = "0.102.0";
3186
+ var version = "0.103.0";
3187
3187
  var repository = {
3188
3188
  type: "git",
3189
3189
  url: "git+https://github.com/juspay/superposition.git"
@@ -8802,7 +8802,7 @@ function requireModels_0 () {
8802
8802
  if (hasRequiredModels_0) return models_0;
8803
8803
  hasRequiredModels_0 = 1;
8804
8804
  Object.defineProperty(models_0, "__esModule", { value: true });
8805
- models_0.VariableSortOn = models_0.SecretSortOn = models_0.Stage = models_0.FunctionExecutionRequest = models_0.ExperimentSortOn = models_0.ExperimentGroupSortOn = models_0.WorkspaceStatus = models_0.Version = models_0.HttpMethod = models_0.OrgStatus = models_0.FunctionRuntimeVersion = models_0.FunctionTypes = models_0.ContextFilterSortOn = models_0.DimensionMatchStrategy = models_0.MergeStrategy = models_0.DimensionType = models_0.ExperimentStatusType = models_0.ExperimentType = models_0.ContextActionOut = models_0.ContextAction = models_0.ContextIdentifier = models_0.SortBy = models_0.AuditAction = models_0.VariantType = models_0.ResourceNotFound = models_0.InternalServerError = models_0.GroupType = void 0;
8805
+ models_0.VariableSortOn = models_0.SecretSortOn = models_0.Stage = models_0.FunctionExecutionRequest = models_0.ExperimentSortOn = models_0.ExperimentGroupSortOn = models_0.WorkspaceStatus = models_0.Version = models_0.HttpMethod = models_0.OrgStatus = models_0.FunctionRuntimeVersion = models_0.FunctionTypes = models_0.ContextFilterSortOn = models_0.DimensionMatchStrategy = models_0.MergeStrategy = models_0.DimensionType = models_0.ExperimentStatusType = models_0.ExperimentType = models_0.WebhookFailed = models_0.ContextActionOut = models_0.ContextAction = models_0.ContextIdentifier = models_0.SortBy = models_0.AuditAction = models_0.VariantType = models_0.ResourceNotFound = models_0.InternalServerError = models_0.GroupType = void 0;
8806
8806
  const SuperpositionServiceException_1 = requireSuperpositionServiceException();
8807
8807
  models_0.GroupType = {
8808
8808
  SYSTEM_GENERATED: "SYSTEM_GENERATED",
@@ -8885,6 +8885,21 @@ function requireModels_0 () {
8885
8885
  return visitor._(value.$unknown[0], value.$unknown[1]);
8886
8886
  };
8887
8887
  })(ContextActionOut || (models_0.ContextActionOut = ContextActionOut = {}));
8888
+ class WebhookFailed extends SuperpositionServiceException_1.SuperpositionServiceException {
8889
+ name = "WebhookFailed";
8890
+ $fault = "server";
8891
+ data;
8892
+ constructor(opts) {
8893
+ super({
8894
+ name: "WebhookFailed",
8895
+ $fault: "server",
8896
+ ...opts
8897
+ });
8898
+ Object.setPrototypeOf(this, WebhookFailed.prototype);
8899
+ this.data = opts.data;
8900
+ }
8901
+ }
8902
+ models_0.WebhookFailed = WebhookFailed;
8888
8903
  models_0.ExperimentType = {
8889
8904
  DEFAULT: "DEFAULT",
8890
8905
  DELETE_OVERRIDES: "DELETE_OVERRIDES",
@@ -9035,13 +9050,17 @@ function requireAws_restJson1 () {
9035
9050
  [_xoi]: input[_oi],
9036
9051
  });
9037
9052
  b.bp("/experiments/applicable-variants");
9053
+ const query = (0, smithy_client_1.map)({
9054
+ [_i]: [, (0, smithy_client_1.expectNonNull)(input[_i], `identifier`)],
9055
+ [_p]: [() => input.prefix !== void 0, () => ((input[_p] || []))],
9056
+ });
9038
9057
  let body;
9039
9058
  body = JSON.stringify((0, smithy_client_1.take)(input, {
9040
9059
  'context': _ => se_Condition(_),
9041
- 'identifier': [],
9042
9060
  }));
9043
9061
  b.m("POST")
9044
9062
  .h(headers)
9063
+ .q(query)
9045
9064
  .b(body);
9046
9065
  return b.build();
9047
9066
  };
@@ -11698,7 +11717,7 @@ function requireAws_restJson1 () {
11698
11717
  });
11699
11718
  const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
11700
11719
  const doc = (0, smithy_client_1.take)(data, {
11701
- 'config': _ => de_Document(_),
11720
+ 'config': _ => de_ConfigData(_),
11702
11721
  'config_hash': smithy_client_1.expectString,
11703
11722
  'created_at': _ => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
11704
11723
  'description': smithy_client_1.expectString,
@@ -12641,6 +12660,9 @@ function requireAws_restJson1 () {
12641
12660
  case "ResourceNotFound":
12642
12661
  case "io.superposition#ResourceNotFound":
12643
12662
  throw await de_ResourceNotFoundRes(parsedOutput);
12663
+ case "WebhookFailed":
12664
+ case "io.superposition#WebhookFailed":
12665
+ throw await de_WebhookFailedRes(parsedOutput);
12644
12666
  default:
12645
12667
  const parsedBody = parsedOutput.body;
12646
12668
  return throwDefaultError({
@@ -12675,6 +12697,19 @@ function requireAws_restJson1 () {
12675
12697
  });
12676
12698
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
12677
12699
  };
12700
+ const de_WebhookFailedRes = async (parsedOutput, context) => {
12701
+ const contents = (0, smithy_client_1.map)({});
12702
+ const data = parsedOutput.body;
12703
+ const doc = (0, smithy_client_1.take)(data, {
12704
+ 'data': _ => de_Document(_),
12705
+ });
12706
+ Object.assign(contents, doc);
12707
+ const exception = new models_0_1.WebhookFailed({
12708
+ $metadata: deserializeMetadata(parsedOutput),
12709
+ ...contents
12710
+ });
12711
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
12712
+ };
12678
12713
  const se_BulkOperationList = (input, context) => {
12679
12714
  return input.filter((e) => e != null).map(entry => {
12680
12715
  return se_ContextAction(entry);
@@ -12861,6 +12896,14 @@ function requireAws_restJson1 () {
12861
12896
  return acc;
12862
12897
  }, {});
12863
12898
  };
12899
+ const de_ConfigData = (output, context) => {
12900
+ return (0, smithy_client_1.take)(output, {
12901
+ 'contexts': (_) => de_ContextList(_),
12902
+ 'default_configs': (_) => de_Object(_),
12903
+ 'dimensions': (_) => de_DimensionData(_),
12904
+ 'overrides': (_) => de_OverridesMap(_),
12905
+ });
12906
+ };
12864
12907
  const de_ContextActionOut = (output, context) => {
12865
12908
  if ((0, smithy_client_1.expectString)(output.DELETE) !== undefined) {
12866
12909
  return { DELETE: (0, smithy_client_1.expectString)(output.DELETE) };
@@ -13067,7 +13110,7 @@ function requireAws_restJson1 () {
13067
13110
  };
13068
13111
  const de_ListVersionsMember = (output, context) => {
13069
13112
  return (0, smithy_client_1.take)(output, {
13070
- 'config': (_) => de_Document(_),
13113
+ 'config': (_) => de_ConfigData(_),
13071
13114
  'created_at': (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
13072
13115
  'description': smithy_client_1.expectString,
13073
13116
  'id': smithy_client_1.expectString,