superposition-provider 0.102.0 → 0.104.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.esm.js CHANGED
@@ -3180,7 +3180,7 @@ var runtimeConfig = {};
3180
3180
 
3181
3181
  var name = "superposition-sdk";
3182
3182
  var description = "superposition-sdk client";
3183
- var version = "0.102.0";
3183
+ var version = "0.104.0";
3184
3184
  var repository = {
3185
3185
  type: "git",
3186
3186
  url: "git+https://github.com/juspay/superposition.git"
@@ -8799,7 +8799,7 @@ function requireModels_0 () {
8799
8799
  if (hasRequiredModels_0) return models_0;
8800
8800
  hasRequiredModels_0 = 1;
8801
8801
  Object.defineProperty(models_0, "__esModule", { value: true });
8802
- 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;
8802
+ 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;
8803
8803
  const SuperpositionServiceException_1 = requireSuperpositionServiceException();
8804
8804
  models_0.GroupType = {
8805
8805
  SYSTEM_GENERATED: "SYSTEM_GENERATED",
@@ -8882,6 +8882,21 @@ function requireModels_0 () {
8882
8882
  return visitor._(value.$unknown[0], value.$unknown[1]);
8883
8883
  };
8884
8884
  })(ContextActionOut || (models_0.ContextActionOut = ContextActionOut = {}));
8885
+ class WebhookFailed extends SuperpositionServiceException_1.SuperpositionServiceException {
8886
+ name = "WebhookFailed";
8887
+ $fault = "server";
8888
+ data;
8889
+ constructor(opts) {
8890
+ super({
8891
+ name: "WebhookFailed",
8892
+ $fault: "server",
8893
+ ...opts
8894
+ });
8895
+ Object.setPrototypeOf(this, WebhookFailed.prototype);
8896
+ this.data = opts.data;
8897
+ }
8898
+ }
8899
+ models_0.WebhookFailed = WebhookFailed;
8885
8900
  models_0.ExperimentType = {
8886
8901
  DEFAULT: "DEFAULT",
8887
8902
  DELETE_OVERRIDES: "DELETE_OVERRIDES",
@@ -9032,13 +9047,17 @@ function requireAws_restJson1 () {
9032
9047
  [_xoi]: input[_oi],
9033
9048
  });
9034
9049
  b.bp("/experiments/applicable-variants");
9050
+ const query = (0, smithy_client_1.map)({
9051
+ [_i]: [, (0, smithy_client_1.expectNonNull)(input[_i], `identifier`)],
9052
+ [_p]: [() => input.prefix !== void 0, () => ((input[_p] || []))],
9053
+ });
9035
9054
  let body;
9036
9055
  body = JSON.stringify((0, smithy_client_1.take)(input, {
9037
9056
  'context': _ => se_Condition(_),
9038
- 'identifier': [],
9039
9057
  }));
9040
9058
  b.m("POST")
9041
9059
  .h(headers)
9060
+ .q(query)
9042
9061
  .b(body);
9043
9062
  return b.build();
9044
9063
  };
@@ -11695,7 +11714,7 @@ function requireAws_restJson1 () {
11695
11714
  });
11696
11715
  const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
11697
11716
  const doc = (0, smithy_client_1.take)(data, {
11698
- 'config': _ => de_Document(_),
11717
+ 'config': _ => de_ConfigData(_),
11699
11718
  'config_hash': smithy_client_1.expectString,
11700
11719
  'created_at': _ => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
11701
11720
  'description': smithy_client_1.expectString,
@@ -12638,6 +12657,9 @@ function requireAws_restJson1 () {
12638
12657
  case "ResourceNotFound":
12639
12658
  case "io.superposition#ResourceNotFound":
12640
12659
  throw await de_ResourceNotFoundRes(parsedOutput);
12660
+ case "WebhookFailed":
12661
+ case "io.superposition#WebhookFailed":
12662
+ throw await de_WebhookFailedRes(parsedOutput);
12641
12663
  default:
12642
12664
  const parsedBody = parsedOutput.body;
12643
12665
  return throwDefaultError({
@@ -12672,6 +12694,19 @@ function requireAws_restJson1 () {
12672
12694
  });
12673
12695
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
12674
12696
  };
12697
+ const de_WebhookFailedRes = async (parsedOutput, context) => {
12698
+ const contents = (0, smithy_client_1.map)({});
12699
+ const data = parsedOutput.body;
12700
+ const doc = (0, smithy_client_1.take)(data, {
12701
+ 'data': _ => de_Document(_),
12702
+ });
12703
+ Object.assign(contents, doc);
12704
+ const exception = new models_0_1.WebhookFailed({
12705
+ $metadata: deserializeMetadata(parsedOutput),
12706
+ ...contents
12707
+ });
12708
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
12709
+ };
12675
12710
  const se_BulkOperationList = (input, context) => {
12676
12711
  return input.filter((e) => e != null).map(entry => {
12677
12712
  return se_ContextAction(entry);
@@ -12858,6 +12893,14 @@ function requireAws_restJson1 () {
12858
12893
  return acc;
12859
12894
  }, {});
12860
12895
  };
12896
+ const de_ConfigData = (output, context) => {
12897
+ return (0, smithy_client_1.take)(output, {
12898
+ 'contexts': (_) => de_ContextList(_),
12899
+ 'default_configs': (_) => de_Object(_),
12900
+ 'dimensions': (_) => de_DimensionData(_),
12901
+ 'overrides': (_) => de_OverridesMap(_),
12902
+ });
12903
+ };
12861
12904
  const de_ContextActionOut = (output, context) => {
12862
12905
  if ((0, smithy_client_1.expectString)(output.DELETE) !== undefined) {
12863
12906
  return { DELETE: (0, smithy_client_1.expectString)(output.DELETE) };
@@ -13064,7 +13107,7 @@ function requireAws_restJson1 () {
13064
13107
  };
13065
13108
  const de_ListVersionsMember = (output, context) => {
13066
13109
  return (0, smithy_client_1.take)(output, {
13067
- 'config': (_) => de_Document(_),
13110
+ 'config': (_) => de_ConfigData(_),
13068
13111
  'created_at': (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
13069
13112
  'description': smithy_client_1.expectString,
13070
13113
  'id': smithy_client_1.expectString,