@aws-sdk/util-endpoints 3.433.0 → 3.438.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.
Files changed (153) hide show
  1. package/dist-cjs/aws.js +12 -0
  2. package/dist-cjs/index.js +1 -0
  3. package/dist-cjs/lib/aws/isVirtualHostableS3Bucket.js +2 -2
  4. package/dist-cjs/lib/isIpAddress.js +2 -3
  5. package/dist-cjs/resolveEndpoint.js +2 -39
  6. package/dist-cjs/types/EndpointError.js +2 -7
  7. package/dist-es/aws.js +10 -0
  8. package/dist-es/index.js +1 -0
  9. package/dist-es/lib/aws/isVirtualHostableS3Bucket.js +1 -1
  10. package/dist-es/lib/isIpAddress.js +1 -2
  11. package/dist-es/resolveEndpoint.js +1 -37
  12. package/dist-es/types/EndpointError.js +1 -6
  13. package/dist-types/aws.d.ts +1 -0
  14. package/dist-types/index.d.ts +1 -0
  15. package/dist-types/lib/aws/parseArn.d.ts +1 -1
  16. package/dist-types/lib/aws/partition.d.ts +1 -1
  17. package/dist-types/lib/isIpAddress.d.ts +1 -4
  18. package/dist-types/resolveEndpoint.d.ts +1 -6
  19. package/dist-types/ts3.4/aws.d.ts +1 -0
  20. package/dist-types/ts3.4/index.d.ts +1 -0
  21. package/dist-types/ts3.4/lib/aws/parseArn.d.ts +1 -1
  22. package/dist-types/ts3.4/lib/aws/partition.d.ts +1 -1
  23. package/dist-types/ts3.4/lib/isIpAddress.d.ts +1 -1
  24. package/dist-types/ts3.4/resolveEndpoint.d.ts +1 -6
  25. package/dist-types/ts3.4/types/EndpointError.d.ts +1 -3
  26. package/dist-types/ts3.4/types/EndpointRuleObject.d.ts +6 -15
  27. package/dist-types/ts3.4/types/ErrorRuleObject.d.ts +1 -7
  28. package/dist-types/ts3.4/types/RuleSetObject.d.ts +5 -19
  29. package/dist-types/ts3.4/types/TreeRuleObject.d.ts +1 -12
  30. package/dist-types/ts3.4/types/shared.d.ts +12 -29
  31. package/dist-types/types/EndpointError.d.ts +1 -3
  32. package/dist-types/types/EndpointRuleObject.d.ts +1 -15
  33. package/dist-types/types/ErrorRuleObject.d.ts +1 -7
  34. package/dist-types/types/RuleSetObject.d.ts +1 -19
  35. package/dist-types/types/TreeRuleObject.d.ts +1 -10
  36. package/dist-types/types/shared.d.ts +1 -25
  37. package/package.json +2 -1
  38. package/dist-cjs/debug/debugId.js +0 -4
  39. package/dist-cjs/debug/index.js +0 -5
  40. package/dist-cjs/debug/toDebugString.js +0 -16
  41. package/dist-cjs/lib/booleanEquals.js +0 -5
  42. package/dist-cjs/lib/getAttr.js +0 -15
  43. package/dist-cjs/lib/getAttrPathList.js +0 -29
  44. package/dist-cjs/lib/index.js +0 -14
  45. package/dist-cjs/lib/isSet.js +0 -5
  46. package/dist-cjs/lib/isValidHostLabel.js +0 -17
  47. package/dist-cjs/lib/not.js +0 -5
  48. package/dist-cjs/lib/parseURL.js +0 -55
  49. package/dist-cjs/lib/stringEquals.js +0 -5
  50. package/dist-cjs/lib/substring.js +0 -13
  51. package/dist-cjs/lib/uriEncode.js +0 -5
  52. package/dist-cjs/utils/callFunction.js +0 -11
  53. package/dist-cjs/utils/evaluateCondition.js +0 -19
  54. package/dist-cjs/utils/evaluateConditions.js +0 -27
  55. package/dist-cjs/utils/evaluateEndpointRule.js +0 -32
  56. package/dist-cjs/utils/evaluateErrorRule.js +0 -18
  57. package/dist-cjs/utils/evaluateExpression.js +0 -20
  58. package/dist-cjs/utils/evaluateRules.js +0 -31
  59. package/dist-cjs/utils/evaluateTemplate.js +0 -40
  60. package/dist-cjs/utils/evaluateTreeRule.js +0 -17
  61. package/dist-cjs/utils/getEndpointHeaders.js +0 -16
  62. package/dist-cjs/utils/getEndpointProperties.js +0 -9
  63. package/dist-cjs/utils/getEndpointProperty.js +0 -25
  64. package/dist-cjs/utils/getEndpointUrl.js +0 -19
  65. package/dist-cjs/utils/getReferenceValue.js +0 -11
  66. package/dist-cjs/utils/index.js +0 -4
  67. package/dist-es/debug/debugId.js +0 -1
  68. package/dist-es/debug/index.js +0 -2
  69. package/dist-es/debug/toDebugString.js +0 -12
  70. package/dist-es/lib/booleanEquals.js +0 -1
  71. package/dist-es/lib/getAttr.js +0 -11
  72. package/dist-es/lib/getAttrPathList.js +0 -25
  73. package/dist-es/lib/index.js +0 -10
  74. package/dist-es/lib/isSet.js +0 -1
  75. package/dist-es/lib/isValidHostLabel.js +0 -13
  76. package/dist-es/lib/not.js +0 -1
  77. package/dist-es/lib/parseURL.js +0 -51
  78. package/dist-es/lib/stringEquals.js +0 -1
  79. package/dist-es/lib/substring.js +0 -9
  80. package/dist-es/lib/uriEncode.js +0 -1
  81. package/dist-es/utils/callFunction.js +0 -6
  82. package/dist-es/utils/evaluateCondition.js +0 -14
  83. package/dist-es/utils/evaluateConditions.js +0 -22
  84. package/dist-es/utils/evaluateEndpointRule.js +0 -27
  85. package/dist-es/utils/evaluateErrorRule.js +0 -14
  86. package/dist-es/utils/evaluateExpression.js +0 -16
  87. package/dist-es/utils/evaluateRules.js +0 -27
  88. package/dist-es/utils/evaluateTemplate.js +0 -36
  89. package/dist-es/utils/evaluateTreeRule.js +0 -13
  90. package/dist-es/utils/getEndpointHeaders.js +0 -12
  91. package/dist-es/utils/getEndpointProperties.js +0 -5
  92. package/dist-es/utils/getEndpointProperty.js +0 -21
  93. package/dist-es/utils/getEndpointUrl.js +0 -15
  94. package/dist-es/utils/getReferenceValue.js +0 -7
  95. package/dist-es/utils/index.js +0 -1
  96. package/dist-types/debug/debugId.d.ts +0 -1
  97. package/dist-types/debug/index.d.ts +0 -2
  98. package/dist-types/debug/toDebugString.d.ts +0 -9
  99. package/dist-types/lib/booleanEquals.d.ts +0 -5
  100. package/dist-types/lib/getAttr.d.ts +0 -7
  101. package/dist-types/lib/getAttrPathList.d.ts +0 -4
  102. package/dist-types/lib/index.d.ts +0 -10
  103. package/dist-types/lib/isSet.d.ts +0 -5
  104. package/dist-types/lib/isValidHostLabel.d.ts +0 -7
  105. package/dist-types/lib/not.d.ts +0 -5
  106. package/dist-types/lib/parseURL.d.ts +0 -5
  107. package/dist-types/lib/stringEquals.d.ts +0 -5
  108. package/dist-types/lib/substring.d.ts +0 -7
  109. package/dist-types/lib/uriEncode.d.ts +0 -4
  110. package/dist-types/ts3.4/debug/debugId.d.ts +0 -1
  111. package/dist-types/ts3.4/debug/index.d.ts +0 -2
  112. package/dist-types/ts3.4/debug/toDebugString.d.ts +0 -9
  113. package/dist-types/ts3.4/lib/booleanEquals.d.ts +0 -4
  114. package/dist-types/ts3.4/lib/getAttr.d.ts +0 -11
  115. package/dist-types/ts3.4/lib/getAttrPathList.d.ts +0 -1
  116. package/dist-types/ts3.4/lib/index.d.ts +0 -11
  117. package/dist-types/ts3.4/lib/isSet.d.ts +0 -1
  118. package/dist-types/ts3.4/lib/isValidHostLabel.d.ts +0 -4
  119. package/dist-types/ts3.4/lib/not.d.ts +0 -1
  120. package/dist-types/ts3.4/lib/parseURL.d.ts +0 -4
  121. package/dist-types/ts3.4/lib/stringEquals.d.ts +0 -1
  122. package/dist-types/ts3.4/lib/substring.d.ts +0 -6
  123. package/dist-types/ts3.4/lib/uriEncode.d.ts +0 -1
  124. package/dist-types/ts3.4/utils/callFunction.d.ts +0 -5
  125. package/dist-types/ts3.4/utils/evaluateCondition.d.ts +0 -13
  126. package/dist-types/ts3.4/utils/evaluateConditions.d.ts +0 -13
  127. package/dist-types/ts3.4/utils/evaluateEndpointRule.d.ts +0 -6
  128. package/dist-types/ts3.4/utils/evaluateErrorRule.d.ts +0 -5
  129. package/dist-types/ts3.4/utils/evaluateExpression.d.ts +0 -6
  130. package/dist-types/ts3.4/utils/evaluateRules.d.ts +0 -6
  131. package/dist-types/ts3.4/utils/evaluateTemplate.d.ts +0 -5
  132. package/dist-types/ts3.4/utils/evaluateTreeRule.d.ts +0 -6
  133. package/dist-types/ts3.4/utils/getEndpointHeaders.d.ts +0 -5
  134. package/dist-types/ts3.4/utils/getEndpointProperties.d.ts +0 -5
  135. package/dist-types/ts3.4/utils/getEndpointProperty.d.ts +0 -6
  136. package/dist-types/ts3.4/utils/getEndpointUrl.d.ts +0 -5
  137. package/dist-types/ts3.4/utils/getReferenceValue.d.ts +0 -5
  138. package/dist-types/ts3.4/utils/index.d.ts +0 -1
  139. package/dist-types/utils/callFunction.d.ts +0 -2
  140. package/dist-types/utils/evaluateCondition.d.ts +0 -8
  141. package/dist-types/utils/evaluateConditions.d.ts +0 -8
  142. package/dist-types/utils/evaluateEndpointRule.d.ts +0 -3
  143. package/dist-types/utils/evaluateErrorRule.d.ts +0 -2
  144. package/dist-types/utils/evaluateExpression.d.ts +0 -2
  145. package/dist-types/utils/evaluateRules.d.ts +0 -3
  146. package/dist-types/utils/evaluateTemplate.d.ts +0 -2
  147. package/dist-types/utils/evaluateTreeRule.d.ts +0 -3
  148. package/dist-types/utils/getEndpointHeaders.d.ts +0 -2
  149. package/dist-types/utils/getEndpointProperties.d.ts +0 -2
  150. package/dist-types/utils/getEndpointProperty.d.ts +0 -3
  151. package/dist-types/utils/getEndpointUrl.d.ts +0 -2
  152. package/dist-types/utils/getReferenceValue.d.ts +0 -2
  153. package/dist-types/utils/index.d.ts +0 -1
@@ -1,14 +0,0 @@
1
- import { EndpointError } from "../types";
2
- import { evaluateConditions } from "./evaluateConditions";
3
- import { evaluateExpression } from "./evaluateExpression";
4
- export const evaluateErrorRule = (errorRule, options) => {
5
- const { conditions, error } = errorRule;
6
- const { result, referenceRecord } = evaluateConditions(conditions, options);
7
- if (!result) {
8
- return;
9
- }
10
- throw new EndpointError(evaluateExpression(error, "Error", {
11
- ...options,
12
- referenceRecord: { ...options.referenceRecord, ...referenceRecord },
13
- }));
14
- };
@@ -1,16 +0,0 @@
1
- import { EndpointError } from "../types";
2
- import { callFunction } from "./callFunction";
3
- import { evaluateTemplate } from "./evaluateTemplate";
4
- import { getReferenceValue } from "./getReferenceValue";
5
- export const evaluateExpression = (obj, keyName, options) => {
6
- if (typeof obj === "string") {
7
- return evaluateTemplate(obj, options);
8
- }
9
- else if (obj["fn"]) {
10
- return callFunction(obj, options);
11
- }
12
- else if (obj["ref"]) {
13
- return getReferenceValue(obj, options);
14
- }
15
- throw new EndpointError(`'${keyName}': ${String(obj)} is not a string, function or reference.`);
16
- };
@@ -1,27 +0,0 @@
1
- import { EndpointError } from "../types";
2
- import { evaluateEndpointRule } from "./evaluateEndpointRule";
3
- import { evaluateErrorRule } from "./evaluateErrorRule";
4
- import { evaluateTreeRule } from "./evaluateTreeRule";
5
- export const evaluateRules = (rules, options) => {
6
- for (const rule of rules) {
7
- if (rule.type === "endpoint") {
8
- const endpointOrUndefined = evaluateEndpointRule(rule, options);
9
- if (endpointOrUndefined) {
10
- return endpointOrUndefined;
11
- }
12
- }
13
- else if (rule.type === "error") {
14
- evaluateErrorRule(rule, options);
15
- }
16
- else if (rule.type === "tree") {
17
- const endpointOrUndefined = evaluateTreeRule(rule, options);
18
- if (endpointOrUndefined) {
19
- return endpointOrUndefined;
20
- }
21
- }
22
- else {
23
- throw new EndpointError(`Unknown endpoint rule: ${rule}`);
24
- }
25
- }
26
- throw new EndpointError(`Rules evaluation failed`);
27
- };
@@ -1,36 +0,0 @@
1
- import { getAttr } from "../lib";
2
- export const evaluateTemplate = (template, options) => {
3
- const evaluatedTemplateArr = [];
4
- const templateContext = {
5
- ...options.endpointParams,
6
- ...options.referenceRecord,
7
- };
8
- let currentIndex = 0;
9
- while (currentIndex < template.length) {
10
- const openingBraceIndex = template.indexOf("{", currentIndex);
11
- if (openingBraceIndex === -1) {
12
- evaluatedTemplateArr.push(template.slice(currentIndex));
13
- break;
14
- }
15
- evaluatedTemplateArr.push(template.slice(currentIndex, openingBraceIndex));
16
- const closingBraceIndex = template.indexOf("}", openingBraceIndex);
17
- if (closingBraceIndex === -1) {
18
- evaluatedTemplateArr.push(template.slice(openingBraceIndex));
19
- break;
20
- }
21
- if (template[openingBraceIndex + 1] === "{" && template[closingBraceIndex + 1] === "}") {
22
- evaluatedTemplateArr.push(template.slice(openingBraceIndex + 1, closingBraceIndex));
23
- currentIndex = closingBraceIndex + 2;
24
- }
25
- const parameterName = template.substring(openingBraceIndex + 1, closingBraceIndex);
26
- if (parameterName.includes("#")) {
27
- const [refName, attrName] = parameterName.split("#");
28
- evaluatedTemplateArr.push(getAttr(templateContext[refName], attrName));
29
- }
30
- else {
31
- evaluatedTemplateArr.push(templateContext[parameterName]);
32
- }
33
- currentIndex = closingBraceIndex + 1;
34
- }
35
- return evaluatedTemplateArr.join("");
36
- };
@@ -1,13 +0,0 @@
1
- import { evaluateConditions } from "./evaluateConditions";
2
- import { evaluateRules } from "./evaluateRules";
3
- export const evaluateTreeRule = (treeRule, options) => {
4
- const { conditions, rules } = treeRule;
5
- const { result, referenceRecord } = evaluateConditions(conditions, options);
6
- if (!result) {
7
- return;
8
- }
9
- return evaluateRules(rules, {
10
- ...options,
11
- referenceRecord: { ...options.referenceRecord, ...referenceRecord },
12
- });
13
- };
@@ -1,12 +0,0 @@
1
- import { EndpointError } from "../types";
2
- import { evaluateExpression } from "./evaluateExpression";
3
- export const getEndpointHeaders = (headers, options) => Object.entries(headers).reduce((acc, [headerKey, headerVal]) => ({
4
- ...acc,
5
- [headerKey]: headerVal.map((headerValEntry) => {
6
- const processedExpr = evaluateExpression(headerValEntry, "Header value entry", options);
7
- if (typeof processedExpr !== "string") {
8
- throw new EndpointError(`Header '${headerKey}' value '${processedExpr}' is not a string`);
9
- }
10
- return processedExpr;
11
- }),
12
- }), {});
@@ -1,5 +0,0 @@
1
- import { getEndpointProperty } from "./getEndpointProperty";
2
- export const getEndpointProperties = (properties, options) => Object.entries(properties).reduce((acc, [propertyKey, propertyVal]) => ({
3
- ...acc,
4
- [propertyKey]: getEndpointProperty(propertyVal, options),
5
- }), {});
@@ -1,21 +0,0 @@
1
- import { EndpointError } from "../types";
2
- import { evaluateTemplate } from "./evaluateTemplate";
3
- import { getEndpointProperties } from "./getEndpointProperties";
4
- export const getEndpointProperty = (property, options) => {
5
- if (Array.isArray(property)) {
6
- return property.map((propertyEntry) => getEndpointProperty(propertyEntry, options));
7
- }
8
- switch (typeof property) {
9
- case "string":
10
- return evaluateTemplate(property, options);
11
- case "object":
12
- if (property === null) {
13
- throw new EndpointError(`Unexpected endpoint property: ${property}`);
14
- }
15
- return getEndpointProperties(property, options);
16
- case "boolean":
17
- return property;
18
- default:
19
- throw new EndpointError(`Unexpected endpoint property type: ${typeof property}`);
20
- }
21
- };
@@ -1,15 +0,0 @@
1
- import { EndpointError } from "../types";
2
- import { evaluateExpression } from "./evaluateExpression";
3
- export const getEndpointUrl = (endpointUrl, options) => {
4
- const expression = evaluateExpression(endpointUrl, "Endpoint URL", options);
5
- if (typeof expression === "string") {
6
- try {
7
- return new URL(expression);
8
- }
9
- catch (error) {
10
- console.error(`Failed to construct URL with ${expression}`, error);
11
- throw error;
12
- }
13
- }
14
- throw new EndpointError(`Endpoint URL must be a string, got ${typeof expression}`);
15
- };
@@ -1,7 +0,0 @@
1
- export const getReferenceValue = ({ ref }, options) => {
2
- const referenceRecord = {
3
- ...options.endpointParams,
4
- ...options.referenceRecord,
5
- };
6
- return referenceRecord[ref];
7
- };
@@ -1 +0,0 @@
1
- export * from "./evaluateRules";
@@ -1 +0,0 @@
1
- export declare const debugId = "endpoints";
@@ -1,2 +0,0 @@
1
- export * from "./debugId";
2
- export * from "./toDebugString";
@@ -1,9 +0,0 @@
1
- import { EndpointParameters, EndpointV2 } from "@aws-sdk/types";
2
- import { GetAttrValue } from "../lib";
3
- import { EndpointObject, FunctionObject, FunctionReturn } from "../types";
4
- export declare function toDebugString(input: EndpointParameters): string;
5
- export declare function toDebugString(input: EndpointV2): string;
6
- export declare function toDebugString(input: GetAttrValue): string;
7
- export declare function toDebugString(input: FunctionObject): string;
8
- export declare function toDebugString(input: FunctionReturn): string;
9
- export declare function toDebugString(input: EndpointObject): string;
@@ -1,5 +0,0 @@
1
- /**
2
- * Evaluates two boolean values value1 and value2 for equality and returns
3
- * true if both values match.
4
- */
5
- export declare const booleanEquals: (value1: boolean, value2: boolean) => boolean;
@@ -1,7 +0,0 @@
1
- export type GetAttrValue = string | boolean | {
2
- [key: string]: GetAttrValue;
3
- } | Array<GetAttrValue>;
4
- /**
5
- * Returns value corresponding to pathing string for an array or object.
6
- */
7
- export declare const getAttr: (value: GetAttrValue, path: string) => GetAttrValue;
@@ -1,4 +0,0 @@
1
- /**
2
- * Parses path as a getAttr expression, returning a list of strings.
3
- */
4
- export declare const getAttrPathList: (path: string) => Array<string>;
@@ -1,10 +0,0 @@
1
- export * as aws from "./aws";
2
- export * from "./booleanEquals";
3
- export * from "./getAttr";
4
- export * from "./isSet";
5
- export * from "./isValidHostLabel";
6
- export * from "./not";
7
- export * from "./parseURL";
8
- export * from "./stringEquals";
9
- export * from "./substring";
10
- export * from "./uriEncode";
@@ -1,5 +0,0 @@
1
- /**
2
- * Evaluates whether a value is set (aka not null or undefined).
3
- * Returns true if the value is set, otherwise returns false.
4
- */
5
- export declare const isSet: (value: unknown) => boolean;
@@ -1,7 +0,0 @@
1
- /**
2
- * Evaluates whether one or more string values are valid host labels per RFC 1123.
3
- *
4
- * If allowSubDomains is true, then the provided value may be zero or more dotted
5
- * subdomains which are each validated per RFC 1123.
6
- */
7
- export declare const isValidHostLabel: (value: string, allowSubDomains?: boolean) => boolean;
@@ -1,5 +0,0 @@
1
- /**
2
- * Performs logical negation on the provided boolean value,
3
- * returning the negated value.
4
- */
5
- export declare const not: (value: boolean) => boolean;
@@ -1,5 +0,0 @@
1
- import { Endpoint, EndpointURL } from "@aws-sdk/types";
2
- /**
3
- * Parses a string, URL, or Endpoint into it’s Endpoint URL components.
4
- */
5
- export declare const parseURL: (value: string | URL | Endpoint) => EndpointURL | null;
@@ -1,5 +0,0 @@
1
- /**
2
- * Evaluates two string values value1 and value2 for equality and returns
3
- * true if both values match.
4
- */
5
- export declare const stringEquals: (value1: string, value2: string) => boolean;
@@ -1,7 +0,0 @@
1
- /**
2
- * Computes the substring of a given string, conditionally indexing from the end of the string.
3
- * When the string is long enough to fully include the substring, return the substring.
4
- * Otherwise, return None. The start index is inclusive and the stop index is exclusive.
5
- * The length of the returned string will always be stop-start.
6
- */
7
- export declare const substring: (input: string, start: number, stop: number, reverse: boolean) => string | null;
@@ -1,4 +0,0 @@
1
- /**
2
- * Performs percent-encoding per RFC3986 section 2.1
3
- */
4
- export declare const uriEncode: (value: string) => string;
@@ -1 +0,0 @@
1
- export declare const debugId = "endpoints";
@@ -1,2 +0,0 @@
1
- export * from "./debugId";
2
- export * from "./toDebugString";
@@ -1,9 +0,0 @@
1
- import { EndpointParameters, EndpointV2 } from "@aws-sdk/types";
2
- import { GetAttrValue } from "../lib";
3
- import { EndpointObject, FunctionObject, FunctionReturn } from "../types";
4
- export declare function toDebugString(input: EndpointParameters): string;
5
- export declare function toDebugString(input: EndpointV2): string;
6
- export declare function toDebugString(input: GetAttrValue): string;
7
- export declare function toDebugString(input: FunctionObject): string;
8
- export declare function toDebugString(input: FunctionReturn): string;
9
- export declare function toDebugString(input: EndpointObject): string;
@@ -1,4 +0,0 @@
1
- export declare const booleanEquals: (
2
- value1: boolean,
3
- value2: boolean
4
- ) => boolean;
@@ -1,11 +0,0 @@
1
- export type GetAttrValue =
2
- | string
3
- | boolean
4
- | {
5
- [key: string]: GetAttrValue;
6
- }
7
- | Array<GetAttrValue>;
8
- export declare const getAttr: (
9
- value: GetAttrValue,
10
- path: string
11
- ) => GetAttrValue;
@@ -1 +0,0 @@
1
- export declare const getAttrPathList: (path: string) => Array<string>;
@@ -1,11 +0,0 @@
1
- import * as aws_1 from "./aws";
2
- export { aws_1 as aws };
3
- export * from "./booleanEquals";
4
- export * from "./getAttr";
5
- export * from "./isSet";
6
- export * from "./isValidHostLabel";
7
- export * from "./not";
8
- export * from "./parseURL";
9
- export * from "./stringEquals";
10
- export * from "./substring";
11
- export * from "./uriEncode";
@@ -1 +0,0 @@
1
- export declare const isSet: (value: unknown) => boolean;
@@ -1,4 +0,0 @@
1
- export declare const isValidHostLabel: (
2
- value: string,
3
- allowSubDomains?: boolean
4
- ) => boolean;
@@ -1 +0,0 @@
1
- export declare const not: (value: boolean) => boolean;
@@ -1,4 +0,0 @@
1
- import { Endpoint, EndpointURL } from "@aws-sdk/types";
2
- export declare const parseURL: (
3
- value: string | URL | Endpoint
4
- ) => EndpointURL | null;
@@ -1 +0,0 @@
1
- export declare const stringEquals: (value1: string, value2: string) => boolean;
@@ -1,6 +0,0 @@
1
- export declare const substring: (
2
- input: string,
3
- start: number,
4
- stop: number,
5
- reverse: boolean
6
- ) => string | null;
@@ -1 +0,0 @@
1
- export declare const uriEncode: (value: string) => string;
@@ -1,5 +0,0 @@
1
- import { EvaluateOptions, FunctionObject, FunctionReturn } from "../types";
2
- export declare const callFunction: (
3
- { fn, argv }: FunctionObject,
4
- options: EvaluateOptions
5
- ) => FunctionReturn;
@@ -1,13 +0,0 @@
1
- import { ConditionObject, EvaluateOptions } from "../types";
2
- export declare const evaluateCondition: (
3
- { assign, ...fnArgs }: ConditionObject,
4
- options: EvaluateOptions
5
- ) => {
6
- toAssign?:
7
- | {
8
- name: string;
9
- value: import("../types").FunctionReturn;
10
- }
11
- | undefined;
12
- result: boolean;
13
- };
@@ -1,13 +0,0 @@
1
- import { ConditionObject, EvaluateOptions, FunctionReturn } from "../types";
2
- export declare const evaluateConditions: (
3
- conditions: ConditionObject[] | undefined,
4
- options: EvaluateOptions
5
- ) =>
6
- | {
7
- result: false;
8
- referenceRecord?: undefined;
9
- }
10
- | {
11
- result: boolean;
12
- referenceRecord: Record<string, FunctionReturn>;
13
- };
@@ -1,6 +0,0 @@
1
- import { EndpointV2 } from "@aws-sdk/types";
2
- import { EndpointRuleObject, EvaluateOptions } from "../types";
3
- export declare const evaluateEndpointRule: (
4
- endpointRule: EndpointRuleObject,
5
- options: EvaluateOptions
6
- ) => EndpointV2 | undefined;
@@ -1,5 +0,0 @@
1
- import { ErrorRuleObject, EvaluateOptions } from "../types";
2
- export declare const evaluateErrorRule: (
3
- errorRule: ErrorRuleObject,
4
- options: EvaluateOptions
5
- ) => void;
@@ -1,6 +0,0 @@
1
- import { EvaluateOptions, Expression } from "../types";
2
- export declare const evaluateExpression: (
3
- obj: Expression,
4
- keyName: string,
5
- options: EvaluateOptions
6
- ) => import("../types").FunctionReturn;
@@ -1,6 +0,0 @@
1
- import { EndpointV2 } from "@aws-sdk/types";
2
- import { EvaluateOptions, RuleSetRules } from "../types";
3
- export declare const evaluateRules: (
4
- rules: RuleSetRules,
5
- options: EvaluateOptions
6
- ) => EndpointV2;
@@ -1,5 +0,0 @@
1
- import { EvaluateOptions } from "../types";
2
- export declare const evaluateTemplate: (
3
- template: string,
4
- options: EvaluateOptions
5
- ) => string;
@@ -1,6 +0,0 @@
1
- import { EndpointV2 } from "@aws-sdk/types";
2
- import { EvaluateOptions, TreeRuleObject } from "../types";
3
- export declare const evaluateTreeRule: (
4
- treeRule: TreeRuleObject,
5
- options: EvaluateOptions
6
- ) => EndpointV2 | undefined;
@@ -1,5 +0,0 @@
1
- import { EndpointObjectHeaders, EvaluateOptions } from "../types";
2
- export declare const getEndpointHeaders: (
3
- headers: EndpointObjectHeaders,
4
- options: EvaluateOptions
5
- ) => {};
@@ -1,5 +0,0 @@
1
- import { EndpointObjectProperties, EvaluateOptions } from "../types";
2
- export declare const getEndpointProperties: (
3
- properties: EndpointObjectProperties,
4
- options: EvaluateOptions
5
- ) => {};
@@ -1,6 +0,0 @@
1
- import { EndpointObjectProperty } from "@aws-sdk/types";
2
- import { EvaluateOptions } from "../types";
3
- export declare const getEndpointProperty: (
4
- property: EndpointObjectProperty,
5
- options: EvaluateOptions
6
- ) => EndpointObjectProperty;
@@ -1,5 +0,0 @@
1
- import { EvaluateOptions, Expression } from "../types";
2
- export declare const getEndpointUrl: (
3
- endpointUrl: Expression,
4
- options: EvaluateOptions
5
- ) => URL;
@@ -1,5 +0,0 @@
1
- import { EvaluateOptions, ReferenceObject } from "../types";
2
- export declare const getReferenceValue: (
3
- { ref }: ReferenceObject,
4
- options: EvaluateOptions
5
- ) => import("../types").FunctionReturn;
@@ -1 +0,0 @@
1
- export * from "./evaluateRules";
@@ -1,2 +0,0 @@
1
- import { EvaluateOptions, FunctionObject, FunctionReturn } from "../types";
2
- export declare const callFunction: ({ fn, argv }: FunctionObject, options: EvaluateOptions) => FunctionReturn;
@@ -1,8 +0,0 @@
1
- import { ConditionObject, EvaluateOptions } from "../types";
2
- export declare const evaluateCondition: ({ assign, ...fnArgs }: ConditionObject, options: EvaluateOptions) => {
3
- toAssign?: {
4
- name: string;
5
- value: import("../types").FunctionReturn;
6
- } | undefined;
7
- result: boolean;
8
- };
@@ -1,8 +0,0 @@
1
- import { ConditionObject, EvaluateOptions, FunctionReturn } from "../types";
2
- export declare const evaluateConditions: (conditions: ConditionObject[] | undefined, options: EvaluateOptions) => {
3
- result: false;
4
- referenceRecord?: undefined;
5
- } | {
6
- result: boolean;
7
- referenceRecord: Record<string, FunctionReturn>;
8
- };
@@ -1,3 +0,0 @@
1
- import { EndpointV2 } from "@aws-sdk/types";
2
- import { EndpointRuleObject, EvaluateOptions } from "../types";
3
- export declare const evaluateEndpointRule: (endpointRule: EndpointRuleObject, options: EvaluateOptions) => EndpointV2 | undefined;
@@ -1,2 +0,0 @@
1
- import { ErrorRuleObject, EvaluateOptions } from "../types";
2
- export declare const evaluateErrorRule: (errorRule: ErrorRuleObject, options: EvaluateOptions) => void;
@@ -1,2 +0,0 @@
1
- import { EvaluateOptions, Expression } from "../types";
2
- export declare const evaluateExpression: (obj: Expression, keyName: string, options: EvaluateOptions) => import("../types").FunctionReturn;
@@ -1,3 +0,0 @@
1
- import { EndpointV2 } from "@aws-sdk/types";
2
- import { EvaluateOptions, RuleSetRules } from "../types";
3
- export declare const evaluateRules: (rules: RuleSetRules, options: EvaluateOptions) => EndpointV2;
@@ -1,2 +0,0 @@
1
- import { EvaluateOptions } from "../types";
2
- export declare const evaluateTemplate: (template: string, options: EvaluateOptions) => string;
@@ -1,3 +0,0 @@
1
- import { EndpointV2 } from "@aws-sdk/types";
2
- import { EvaluateOptions, TreeRuleObject } from "../types";
3
- export declare const evaluateTreeRule: (treeRule: TreeRuleObject, options: EvaluateOptions) => EndpointV2 | undefined;
@@ -1,2 +0,0 @@
1
- import { EndpointObjectHeaders, EvaluateOptions } from "../types";
2
- export declare const getEndpointHeaders: (headers: EndpointObjectHeaders, options: EvaluateOptions) => {};
@@ -1,2 +0,0 @@
1
- import { EndpointObjectProperties, EvaluateOptions } from "../types";
2
- export declare const getEndpointProperties: (properties: EndpointObjectProperties, options: EvaluateOptions) => {};
@@ -1,3 +0,0 @@
1
- import { EndpointObjectProperty } from "@aws-sdk/types";
2
- import { EvaluateOptions } from "../types";
3
- export declare const getEndpointProperty: (property: EndpointObjectProperty, options: EvaluateOptions) => EndpointObjectProperty;
@@ -1,2 +0,0 @@
1
- import { EvaluateOptions, Expression } from "../types";
2
- export declare const getEndpointUrl: (endpointUrl: Expression, options: EvaluateOptions) => URL;
@@ -1,2 +0,0 @@
1
- import { EvaluateOptions, ReferenceObject } from "../types";
2
- export declare const getReferenceValue: ({ ref }: ReferenceObject, options: EvaluateOptions) => import("../types").FunctionReturn;
@@ -1 +0,0 @@
1
- export * from "./evaluateRules";