@aws-amplify/api-rest 4.0.14 → 4.0.15-node-20-action.f356afc.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 (42) hide show
  1. package/dist/cjs/apis/common/handler.js.map +1 -1
  2. package/dist/cjs/apis/common/internalPost.js.map +1 -1
  3. package/dist/cjs/apis/common/publicApis.js.map +1 -1
  4. package/dist/cjs/apis/index.js.map +1 -1
  5. package/dist/cjs/apis/server.js.map +1 -1
  6. package/dist/cjs/errors/CanceledError.js.map +1 -1
  7. package/dist/cjs/errors/RestApiError.js.map +1 -1
  8. package/dist/cjs/errors/assertValidatonError.js.map +1 -1
  9. package/dist/cjs/errors/index.js.map +1 -1
  10. package/dist/cjs/errors/validation.js.map +1 -1
  11. package/dist/cjs/index.js.map +1 -1
  12. package/dist/cjs/internals/index.js.map +1 -1
  13. package/dist/cjs/internals/server.js.map +1 -1
  14. package/dist/cjs/server.js.map +1 -1
  15. package/dist/cjs/types/index.js.map +1 -1
  16. package/dist/cjs/utils/constants.js.map +1 -1
  17. package/dist/cjs/utils/createCancellableOperation.js.map +1 -1
  18. package/dist/cjs/utils/index.js.map +1 -1
  19. package/dist/cjs/utils/logger.js.map +1 -1
  20. package/dist/cjs/utils/parseSigningInfo.js.map +1 -1
  21. package/dist/cjs/utils/resolveApiUrl.js.map +1 -1
  22. package/dist/cjs/utils/resolveHeaders.js.map +1 -1
  23. package/dist/cjs/utils/serviceError.js.map +1 -1
  24. package/dist/esm/apis/common/handler.mjs.map +1 -1
  25. package/dist/esm/apis/common/internalPost.mjs.map +1 -1
  26. package/dist/esm/apis/common/publicApis.mjs.map +1 -1
  27. package/dist/esm/apis/index.mjs.map +1 -1
  28. package/dist/esm/apis/server.mjs.map +1 -1
  29. package/dist/esm/errors/CanceledError.mjs.map +1 -1
  30. package/dist/esm/errors/RestApiError.mjs.map +1 -1
  31. package/dist/esm/errors/assertValidatonError.mjs.map +1 -1
  32. package/dist/esm/errors/validation.mjs.map +1 -1
  33. package/dist/esm/internals/index.mjs.map +1 -1
  34. package/dist/esm/internals/server.mjs.map +1 -1
  35. package/dist/esm/utils/constants.mjs.map +1 -1
  36. package/dist/esm/utils/createCancellableOperation.mjs.map +1 -1
  37. package/dist/esm/utils/logger.mjs.map +1 -1
  38. package/dist/esm/utils/parseSigningInfo.mjs.map +1 -1
  39. package/dist/esm/utils/resolveApiUrl.mjs.map +1 -1
  40. package/dist/esm/utils/resolveHeaders.mjs.map +1 -1
  41. package/dist/esm/utils/serviceError.mjs.map +1 -1
  42. package/package.json +100 -99
@@ -1 +1 @@
1
- {"version":3,"file":"handler.js","sources":["../../../../../src/apis/common/handler.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAGA,MAOsD,kBAAA,GAAA,OAAA,CAAA,8CAAA,CAAA,CAAA;AAMtD,MAIqB,OAAA,GAAA,OAAA,CAAA,aAAA,CAAA,CAAA;AACrB,MAA4D,gBAAA,GAAA,OAAA,CAAA,4BAAA,CAAA,CAAA;AAc5D;;;;;;;;;AASG;AACI,MAAM,eAAe,GAAG,OAC9B,OAAuB,EACvB,OAAsD,EACtD,kBAAuC,KACV;AAC7B,IAAA,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC;IAC7E,MAAM,YAAY,GAAG,IAAI;UACtB,IAAI,YAAY,QAAQ;AACzB,cAAE,IAAI;cACJ,IAAI,CAAC,SAAS,CAAC,IAAI,IAAI,EAAE,CAAC;UAC3B,SAAS,CAAC;IACb,MAAM,eAAe,GAAY,IAAA,gBAAA,CAAA,cAAc,EAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAC/D,IAAA,MAAM,OAAO,GAAG;QACf,GAAG;AACH,QAAA,OAAO,EAAE,eAAe;QACxB,MAAM;AACN,QAAA,IAAI,EAAE,YAAY;KAClB,CAAC;AACF,IAAA,MAAM,WAAW,GAAG;AACnB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C,OAAO,CAAC,aAAa,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,kBAAkB,CAAC;AAE7E,MAAM,kBAAkB,GAAG,OAC1B,OAAuB,KACY;IACnC,IAAI;QACH,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC;AAC9D,QAAA,IAAI,WAAW,EAAE;AAChB,YAAA,OAAO,WAAW,CAAC;AACnB,SAAA;AACD,KAAA;AAAC,IAAA,OAAO,CAAC,EAAE;AACX,QAAA,OAAA,CAAA,MAAM,CAAC,KAAK,CAAC,yDAAyD,CAAC,CAAC;AACxE,KAAA;AACD,IAAA,OAAO,IAAI,CAAC;AACb,CAAC;;"}
1
+ {"version":3,"file":"handler.js","sources":["../../../../src/apis/common/handler.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.transferHandler = void 0;\nconst aws_client_utils_1 = require(\"@aws-amplify/core/internals/aws-client-utils\");\nconst utils_1 = require(\"../../utils\");\nconst resolveHeaders_1 = require(\"../../utils/resolveHeaders\");\n/**\n * Make REST API call with best-effort IAM auth.\n * @param amplify Amplify instance to to resolve credentials and tokens. Should use different instance in client-side\n * and SSR\n * @param options Options accepted from public API options when calling the handlers.\n * @param signingServiceInfo Internal-only options enable IAM auth as well as to to overwrite the IAM signing service\n * and region. If specified, and NONE of API Key header or Auth header is present, IAM auth will be used.\n *\n * @internal\n */\nconst transferHandler = async (amplify, options, signingServiceInfo) => {\n const { url, method, headers, body, withCredentials, abortSignal } = options;\n const resolvedBody = body\n ? body instanceof FormData\n ? body\n : JSON.stringify(body ?? '')\n : undefined;\n const resolvedHeaders = (0, resolveHeaders_1.resolveHeaders)(headers, body);\n const request = {\n url,\n headers: resolvedHeaders,\n method,\n body: resolvedBody,\n };\n const baseOptions = {\n retryDecider: (0, aws_client_utils_1.getRetryDecider)(utils_1.parseRestApiServiceError),\n computeDelay: aws_client_utils_1.jitteredBackoff,\n withCrossDomainCredentials: withCredentials,\n abortSignal,\n };\n const isIamAuthApplicable = iamAuthApplicable(request, signingServiceInfo);\n let response;\n const credentials = await resolveCredentials(amplify);\n if (isIamAuthApplicable && credentials) {\n const signingInfoFromUrl = (0, utils_1.parseSigningInfo)(url);\n const signingService = signingServiceInfo?.service ?? signingInfoFromUrl.service;\n const signingRegion = signingServiceInfo?.region ?? signingInfoFromUrl.region;\n response = await (0, aws_client_utils_1.authenticatedHandler)(request, {\n ...baseOptions,\n credentials,\n region: signingRegion,\n service: signingService,\n });\n }\n else {\n response = await (0, aws_client_utils_1.unauthenticatedHandler)(request, {\n ...baseOptions,\n });\n }\n // Clean-up un-modeled properties from response.\n return {\n statusCode: response.statusCode,\n headers: response.headers,\n body: response.body,\n };\n};\nexports.transferHandler = transferHandler;\nconst iamAuthApplicable = ({ headers }, signingServiceInfo) => !headers.authorization && !headers['x-api-key'] && !!signingServiceInfo;\nconst resolveCredentials = async (amplify) => {\n try {\n const { credentials } = await amplify.Auth.fetchAuthSession();\n if (credentials) {\n return credentials;\n }\n }\n catch (e) {\n utils_1.logger.debug('No credentials available, the request will be unsigned.');\n }\n return null;\n};\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,eAAe,GAAG,KAAK,CAAC,CAAC;AACjC,MAAM,kBAAkB,GAAG,OAAO,CAAC,8CAA8C,CAAC,CAAC;AACnF,MAAM,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AACvC,MAAM,gBAAgB,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,eAAe,GAAG,OAAO,OAAO,EAAE,OAAO,EAAE,kBAAkB,KAAK;AACxE,IAAI,MAAM,EAAE,GAAG,EAAE,MAA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AE;;;AAGpD,YAAA,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC;AACtC,SAAA;AACD,QAAA,OAAO,IAAI,CAAC;AACZ,KAAA;AACD,IAAA,OAAO,KAAK,CAAC;AACd,CAAC,CAAC;AAfW,OAAA,CAAA,MAAM,GAejB,MAAA,CAAA;AAEF;;AAEG;AACI,MAAM,4BAA4B,GAAG,CAC3C,OAAqB,EACrB,UAA2B,KACxB;AACH,IAAA,cAAc,CAAC,GAAG,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;AACzC,CAAC,CAAC;AALW,OAAA,CAAA,4BAA4B,GAKvC,4BAAA;;"}
1
+ {"version":3,"file":"internalPost.js","sources":["../../../../src/apis/common/internalPost.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.updateRequestToBeCancellable = exports.cancel = exports.post = void 0;\nconst handler_1 = require(\"./handler\");\nconst utils_1 = require(\"../../utils\");\n/**\n * This weak map provides functionality to cancel a request given the promise containing the `post` request.\n *\n * 1. For every GraphQL POST request, an abort controller is created and supplied to the request.\n * 2. The promise fulfilled by GraphGL POST request is then mapped to that abort controller.\n * 3. The promise is returned to the external caller.\n * 4. The caller can either wait for the promise to fulfill or call `cancel(promise)` to cancel the request.\n * 5. If `cancel(promise)` is called, then the corresponding abort controller is retrieved from the map below.\n * 6. GraphQL POST request will be rejected with the error message provided during cancel.\n * 7. Caller can check if the error is because of cancelling by calling `isCancelError(error)`.\n */\nconst cancelTokenMap = new WeakMap();\n/**\n * @internal\n */\nconst post = (amplify, { url, options, abortController }) => {\n const controller = abortController ?? new AbortController();\n const responsePromise = (0, utils_1.createCancellableOperation)(async () => {\n const response = (0, handler_1.transferHandler)(amplify, {\n url,\n method: 'POST',\n ...options,\n abortSignal: controller.signal,\n }, options?.signingServiceInfo);\n return response;\n }, controller);\n const responseWithCleanUp = responsePromise.finally(() => {\n cancelTokenMap.delete(responseWithCleanUp);\n });\n return responseWithCleanUp;\n};\nexports.post = post;\n/**\n * Cancels a request given the promise returned by `post`.\n * If the request is already completed, this function does nothing.\n * It MUST be used after `updateRequestToBeCancellable` is called.\n */\nconst cancel = (promise, message) => {\n const controller = cancelTokenMap.get(promise);\n if (controller) {\n controller.abort(message);\n if (message && controller.signal.reason !== message) {\n // In runtimes where `AbortSignal.reason` is not supported, we track the reason ourselves.\n // @ts-expect-error reason is read-only property.\n controller.signal['reason'] = message;\n }\n return true;\n }\n return false;\n};\nexports.cancel = cancel;\n/**\n * MUST be used to make a promise including internal `post` API call cancellable.\n */\nconst updateRequestToBeCancellable = (promise, controller) => {\n cancelTokenMap.set(promise, controller);\n};\nexports.updateRequestToBeCancellable = updateRequestToBeCancellable;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,4BAA4B,GAAG,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC;AAC9E,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AACvC,MAAM,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,cAAc,GAAG,IAAI,OAAO,EAAE,CAAC;AACrC;AACA;AACA;AACA,MAAM,IAAI,GAAG,CAAC,OAAO,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,eAAe,EAAE,KAAK;AAC7D,IAAI,MAAM,UAAU,GAAG,eAAe,IAAI,IAAI,eAAe,EAAE,CAAC;AAChE,IAAI,MAAM,eAAe,GAAG,IAAI,OAAO,CAAC,0BAA0B,EAAE,YAAY;AAChF,QAAQ,MAAM,QAAQ,GAAG,IAA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G,4BAA4B;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"publicApis.js","sources":["../../../../../src/apis/common/publicApis.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;;;AAmBA,MAKqB,OAAA,GAAA,OAAA,CAAA,aAAA,CAAA,CAAA;AACrB,MAA4C,SAAA,GAAA,OAAA,CAAA,WAAA,CAAA,CAAA;AAE5C,MAAM,aAAa,GAAG,CACrB,OAAuB,EACvB,OAAqC,EACrC,MAAc,KAEd,IAAA,OAA0B,CAAA,0BAAA,EAAC,OAAM,WAAW,KAAG;AAC9C,IAAA,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,GAAG,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;AACrE,IAAA,MAAM,GAAG,GAAG,IAAA,OAAA,CAAA,aAAa,EACxB,OAAO,EACP,OAAO,EACP,OAAO,EACP,UAAU,EAAE,WAAW,CACvB,CAAC;AACF,IAAA,MAAM,oBAAoB,GACzB,MAAM,OAAO,CAAC,cAAc,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,GAAG;QAClD,OAAO;AACP,KAAA,CAAC,CAAC;IACJ,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,EAAE,EAAE,GAAG,UAAU,CAAC;AACvD,IAAA,MAAM,OAAO,GAAG;;AAEf,QAAA,GAAG,oBAAoB;AACvB,QAAA,GAAG,iBAAiB;KACpB,CAAC;AACF,IAAA,MAAM,kBAAkB,GAAG,IAAA,OAAgB,CAAA,gBAAA,EAAC,GAAG,EAAE;QAChD,OAAO;QACP,OAAO;AACP,KAAA,CAAC,CAAC;AACH,IAAA,OAAA,CAAA,MAAM,CAAC,KAAK,CACX,MAAM,EACN,GAAG,EACH,OAAO,EACP,CAAwB,qBAAA,EAAA,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAA,CAAE,CAC5D,CAAC;AACF,IAAA,OAAO,IAAA,SAAA,CAAA,eAAe,EACrB,OAAO,EACP;AACC,QAAA,GAAG,UAAU;QACb,GAAG;QACH,MAAM;QACN,OAAO;QACP,WAAW;KACX,EACD,kBAAkB,CAClB,CAAC;AACH,CAAC,CAAC,CAAC;AAEG,MAAM,GAAG,GAAG,CAAC,OAAuB,EAAE,KAAe,KAC3D,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AADzB,OAAA,CAAA,GAAG,GACsB,GAAA,CAAA;AAE/B,MAAM,IAAI,GAAG,CACnB,OAAuB,EACvB,KAAgB,KACG,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AAH7C,OAAA,CAAA,IAAI,GAGyC,IAAA,CAAA;AAEnD,MAAM,GAAG,GAAG,CAAC,OAAuB,EAAE,KAAe,KAC3D,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AADzB,OAAA,CAAA,GAAG,GACsB,GAAA,CAAA;AAE/B,MAAM,GAAG,GAAG,CAClB,OAAuB,EACvB,KAAkB,KACG,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;AAHjD,OAAA,CAAA,GAAG,GAG8C,GAAA,CAAA;AAEvD,MAAM,IAAI,GAAG,CACnB,OAAuB,EACvB,KAAgB,KACG,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AAH7C,OAAA,CAAA,IAAI,GAGyC,IAAA,CAAA;AAEnD,MAAM,KAAK,GAAG,CACpB,OAAuB,EACvB,KAAiB,KACG,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AAH/C,OAAA,CAAA,KAAK,GAG0C,KAAA;;"}
1
+ {"version":3,"file":"publicApis.js","sources":["../../../../src/apis/common/publicApis.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.patch = exports.head = exports.del = exports.put = exports.post = exports.get = void 0;\nconst utils_1 = require(\"../../utils\");\nconst handler_1 = require(\"./handler\");\nconst publicHandler = (amplify, options, method) => (0, utils_1.createCancellableOperation)(async (abortSignal) => {\n const { apiName, options: apiOptions = {}, path: apiPath } = options;\n const url = (0, utils_1.resolveApiUrl)(amplify, apiName, apiPath, apiOptions?.queryParams);\n const libraryConfigHeaders = await amplify.libraryOptions?.API?.REST?.headers?.({\n apiName,\n });\n const { headers: invocationHeaders = {} } = apiOptions;\n const headers = {\n // custom headers from invocation options should precede library options\n ...libraryConfigHeaders,\n ...invocationHeaders,\n };\n const signingServiceInfo = (0, utils_1.parseSigningInfo)(url, {\n amplify,\n apiName,\n });\n utils_1.logger.debug(method, url, headers, `IAM signing options: ${JSON.stringify(signingServiceInfo)}`);\n return (0, handler_1.transferHandler)(amplify, {\n ...apiOptions,\n url,\n method,\n headers,\n abortSignal,\n }, signingServiceInfo);\n});\nconst get = (amplify, input) => publicHandler(amplify, input, 'GET');\nexports.get = get;\nconst post = (amplify, input) => publicHandler(amplify, input, 'POST');\nexports.post = post;\nconst put = (amplify, input) => publicHandler(amplify, input, 'PUT');\nexports.put = put;\nconst del = (amplify, input) => publicHandler(amplify, input, 'DELETE');\nexports.del = del;\nconst head = (amplify, input) => publicHandler(amplify, input, 'HEAD');\nexports.head = head;\nconst patch = (amplify, input) => publicHandler(amplify, input, 'PATCH');\nexports.patch = patch;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC;AAC/F,MAAM,OAAO,GAAG,OAAO,CAAC,aAAa,C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strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.patch = exports.head = exports.del = exports.put = exports.post = exports.get = void 0;\nconst core_1 = require(\"@aws-amplify/core\");\nconst publicApis_1 = require(\"./common/publicApis\");\n/**\n * GET HTTP request\n * @param {GetInput} input - Input for GET operation\n * @returns {GetOperation} Operation for GET request\n * @throws - {@link RestApiError}\n * @example\n * Send a GET request\n * ```js\n * import { get, isCancelError } from '@aws-amplify/api';\n *\n * const { body } = await get({\n * apiName,\n * path,\n * options: {\n * headers, // Optional, A map of custom header key/values\n * body, // Optional, JSON object or FormData\n * queryParams, // Optional, A map of query strings\n * }\n * }).response;\n * const data = await body.json();\n * ```\n * @example\n * Cancel a GET request\n *\n * ```js\n * import { get, isCancelError } from '@aws-amplify/api';\n *\n * const { response, cancel } = get({apiName, path, options});\n * cancel(message);\n * try {\n * await response;\n * } cache (e) {\n * if (isCancelError(e)) {\n * // handle request cancellation\n * }\n * //...\n * }\n * ```\n */\nconst get = (input) => (0, publicApis_1.get)(core_1.Amplify, input);\nexports.get = get;\n/**\n * POST HTTP request\n * @param {PostInput} input - Input for POST operation\n * @returns {PostOperation} Operation for POST request\n * @throws - {@link RestApiError}\n * @example\n * Send a POST request\n * ```js\n * import { post, isCancelError } from '@aws-amplify/api';\n *\n * const { body } = await post({\n * apiName,\n * path,\n * options: {\n * headers, // Optional, A map of custom header key/values\n * body, // Optional, JSON object or FormData\n * queryParams, // Optional, A map of query strings\n * }\n * }).response;\n * const data = await body.json();\n * ```\n * @example\n * Cancel a POST request\n *\n * ```js\n * import { post, isCancelError } from '@aws-amplify/api';\n *\n * const { response, cancel } = post({apiName, path, options});\n * cancel(message);\n * try {\n * await response;\n * } cache (e) {\n * if (isCancelError(e)) {\n * // handle request cancellation\n * }\n * //...\n * }\n * ```\n */\nconst post = (input) => (0, publicApis_1.post)(core_1.Amplify, input);\nexports.post = post;\n/**\n * PUT HTTP request\n * @param {PutInput} input - Input for PUT operation\n * @returns {PutOperation} Operation for PUT request\n * @throws - {@link RestApiError}\n * @example\n * Send a PUT request\n * ```js\n * import { put, isCancelError } from '@aws-amplify/api';\n *\n * const { body } = await put({\n * apiName,\n * path,\n * options: {\n * headers, // Optional, A map of custom header key/values\n * body, // Optional, JSON object or FormData\n * queryParams, // Optional, A map of query strings\n * }\n * }).response;\n * const data = await body.json();\n * ```\n * @example\n * Cancel a PUT request\n * ```js\n * import { put, isCancelError } from '@aws-amplify/api';\n *\n * const { response, cancel } = put({apiName, path, options});\n * cancel(message);\n * try {\n * await response;\n * } cache (e) {\n * if (isCancelError(e)) {\n * // handle request cancellation\n * }\n * //...\n * }\n * ```\n */\nconst put = (input) => (0, publicApis_1.put)(core_1.Amplify, input);\nexports.put = put;\n/**\n * DELETE HTTP request\n * @param {DeleteInput} input - Input for DELETE operation\n * @returns {DeleteOperation} Operation for DELETE request\n * @throws - {@link RestApiError}\n * @example\n * Send a DELETE request\n * ```js\n * import { del } from '@aws-amplify/api';\n *\n * const { statusCode } = await del({\n * apiName,\n * path,\n * options: {\n * headers, // Optional, A map of custom header key/values\n * queryParams, // Optional, A map of query strings\n * }\n * }).response;\n * ```\n */\nconst del = (input) => (0, publicApis_1.del)(core_1.Amplify, input);\nexports.del = del;\n/**\n * HEAD HTTP request\n * @param {HeadInput} input - Input for HEAD operation\n * @returns {HeadOperation} Operation for HEAD request\n * @throws - {@link RestApiError}\n * @example\n * Send a HEAD request\n * ```js\n * import { head, isCancelError } from '@aws-amplify/api';\n *\n * const { headers, statusCode } = await head({\n * apiName,\n * path,\n * options: {\n * headers, // Optional, A map of custom header key/values\n * queryParams, // Optional, A map of query strings\n * }\n * }),response;\n * ```\n *\n */\nconst head = (input) => (0, publicApis_1.head)(core_1.Amplify, input);\nexports.head = head;\n/**\n * PATCH HTTP request\n * @param {PatchInput} input - Input for PATCH operation\n * @returns {PatchOperation} Operation for PATCH request\n * @throws - {@link RestApiError}\n * @example\n * Send a PATCH request\n * ```js\n * import { patch } from '@aws-amplify/api';\n *\n * const { body } = await patch({\n * apiName,\n * path,\n * options: {\n * headers, // Optional, A map of custom header key/values\n * body, // Optional, JSON object or FormData\n * queryParams, // Optional, A map of query strings\n * }\n * }).response;\n * const data = await body.json();\n * ```\n *\n * @example\n * Cancel a PATCH request\n * ```js\n * import { patch, isCancelError } from '@aws-amplify/api';\n *\n * const { response, cancel } = patch({apiName, path, options});\n * cancel(message);\n * try {\n * await response;\n * } cache (e) {\n * if (isCancelError(e)) {\n * // handle request cancellation\n * }\n * //...\n * }\n * ```\n */\nconst patch = (input) => (0, publicApis_1.patch)(core_1.Amplify, input);\nexports.patch = patch;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC;AAC/F,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC5C,MAAM,YAAY,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,GAAG,GAAG,CAAC,KAAK,KAAK,IAAI,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AACpE,OAAO,CAAC,GAAG,GAAG,GAAG,CAAC;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,IAAI,GAAG,CAAC,KAAK,KAAK,IAAI,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AACtE,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,GAAG,GAAG,CAAC,KAAK,KAAK,IAAI,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AACpE,OAAO,CAAC,GAAG,GAAG,GAAG,CAAC;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,GAAG,GAAG,CAAC,KAAK,KAAK,IAAI,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AACpE,OAAO,CAAC,GAAG,GAAG,GAAG,CAAC;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,IAAI,GAAG,CAAC,KAAK,KAAK,IAAI,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AACtE,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAK,GAAG,CAAC,KAAK,KAAK,IAAI,YAAY,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AACxE,OAAO,CAAC,KAAK,GAAG,KAAK;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sources":["../../../../src/apis/server.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;;;AAEA,MAGkD,cAAA,GAAA,OAAA,CAAA,0CAAA,CAAA,CAAA;AAClD,MAO6B,YAAA,GAAA,OAAA,CAAA,qBAAA,CAAA,CAAA;AAiB7B;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;AACI,MAAM,GAAG,GAAG,CAClB,WAAsC,EACtC,KAAe,KAEf,IAAA,YAAA,CAAA,GAAS,EAAC,IAAA,cAAA,CAAA,uBAAuB,EAAC,WAAW,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AAJnD,OAAA,CAAA,GAAG,GAIgD,GAAA,CAAA;AAEhE;;;;;;;;;;;;;;;;;;;;;;;AAuBG;AACI,MAAM,IAAI,GAAG,CACnB,WAAsC,EACtC,KAAgB,KAEhB,IAAA,YAAA,CAAA,IAAU,EAAC,IAAA,cAAA,CAAA,uBAAuB,EAAC,WAAW,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AAJpD,OAAA,CAAA,IAAI,GAIgD,IAAA,CAAA;AAEjE;;;;;;;;;;;;;;;;;;;;;;;AAuBG;AACI,MAAM,GAAG,GAAG,CAClB,WAAsC,EACtC,KAAe,KAEf,IAAA,YAAA,CAAA,GAAS,EAAC,IAAA,cAAA,CAAA,uBAAuB,EAAC,WAAW,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AAJnD,OAAA,CAAA,GAAG,GAIgD,GAAA,CAAA;AAEhE;;;;;;;;;;;;;;;;;;;;;;AAsBG;AACI,MAAM,GAAG,GAAG,CAClB,WAAsC,EACtC,KAAkB,KAElB,IAAA,YAAA,CAAA,GAAS,EAAC,IAAA,cAAA,CAAA,uBAAuB,EAAC,WAAW,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AAJnD,OAAA,CAAA,GAAG,GAIgD,GAAA,CAAA;AAEhE;;;;;;;;;;;;;;;;;;;;;;AAsBG;AACI,MAAM,IAAI,GAAG,CACnB,WAAsC,EACtC,KAAgB,KAEhB,IAAA,YAAA,CAAA,IAAU,EAAC,IAAA,cAAA,CAAA,uBAAuB,EAAC,WAAW,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AAJpD,OAAA,CAAA,IAAI,GAIgD,IAAA,CAAA;AAEjE;;;;;;;;;;;;;;;;;;;;;;;AAuBG;AACI,MAAM,KAAK,GAAG,CACpB,WAAsC,EACtC,KAAiB,KAEjB,IAAA,YAAA,CAAA,KAAW,EAAC,IAAA,cAAA,CAAA,uBAAuB,EAAC,WAAW,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AAJrD,OAAA,CAAA,KAAK,GAIgD,KAAA;;"}
1
+ {"version":3,"file":"server.js","sources":["../../../src/apis/server.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.patch = exports.head = exports.del = exports.put = exports.post = exports.get = void 0;\nconst adapter_core_1 = require(\"@aws-amplify/core/internals/adapter-core\");\nconst publicApis_1 = require(\"./common/publicApis\");\n/**\n * GET HTTP request (server-side)\n * @param {AmplifyServer.ContextSpec} contextSpec - The context spec used to get the Amplify server context.\n * @param {GetInput} input - Input for GET operation.\n * @throws - {@link RestApiError}\n * @example\n * Send a GET request\n * ```js\n * import { get } from 'aws-amplify/api/server';\n * //...\n * const restApiResponse = await runWithAmplifyServerContext({\n * nextServerContext: { request, response },\n * operation: async (contextSpec) => {\n * try {\n * const { body } = await get(contextSpec, input).response;\n * return await body.json();\n * } catch (error) {\n * console.log(error);\n * return false;\n * }\n * },\n * });\n * ```\n * @see {@link clientGet}\n */\nconst get = (contextSpec, input) => (0, publicApis_1.get)((0, adapter_core_1.getAmplifyServerContext)(contextSpec).amplify, input);\nexports.get = get;\n/**\n * POST HTTP request (server-side)\n * @param {AmplifyServer.ContextSpec} contextSpec - The context spec used to get the Amplify server context.\n * @param {PostInput} input - Input for POST operation.\n * @throws - {@link RestApiError}\n * @example\n * Send a POST request\n * ```js\n * import { post } from 'aws-amplify/api/server';\n * //...\n * const restApiResponse = await runWithAmplifyServerContext({\n * nextServerContext: { request, response },\n * operation: async (contextSpec) => {\n * try {\n * const { body } = await post(contextSpec, input).response;\n * return await body.json();\n * } catch (error) {\n * console.log(error);\n * return false;\n * }\n * },\n * });\n * ```\n */\nconst post = (contextSpec, input) => (0, publicApis_1.post)((0, adapter_core_1.getAmplifyServerContext)(contextSpec).amplify, input);\nexports.post = post;\n/**\n * PUT HTTP request (server-side)\n * @param {AmplifyServer.ContextSpec} contextSpec - The context spec used to get the Amplify server context.\n * @param {PutInput} input - Input for PUT operation.\n * @throws - {@link RestApiError}\n * @example\n * Send a PUT request\n * ```js\n * import { put } from 'aws-amplify/api/server';\n * //...\n * const restApiResponse = await runWithAmplifyServerContext({\n * nextServerContext: { request, response },\n * operation: async (contextSpec) => {\n * try {\n * const { body } = await put(contextSpec, input).response;\n * return await body.json();\n * } catch (error) {\n * console.log(error);\n * return false;\n * }\n * },\n * });\n * ```\n */\nconst put = (contextSpec, input) => (0, publicApis_1.put)((0, adapter_core_1.getAmplifyServerContext)(contextSpec).amplify, input);\nexports.put = put;\n/**\n * DELETE HTTP request (server-side)\n * @param {AmplifyServer.ContextSpec} contextSpec - The context spec used to get the Amplify server context.\n * @param {DeleteInput} input - Input for DELETE operation.\n * @throws - {@link RestApiError}\n * @example\n * Send a DELETE request\n * ```js\n * import { del } from 'aws-amplify/api/server';\n * //...\n * const restApiResponse = await runWithAmplifyServerContext({\n * nextServerContext: { request, response },\n * operation: async (contextSpec) => {\n * try {\n * const { headers } = await del(contextSpec, input).response;\n * } catch (error) {\n * console.log(error);\n * return false;\n * }\n * },\n * });\n * ```\n */\nconst del = (contextSpec, input) => (0, publicApis_1.del)((0, adapter_core_1.getAmplifyServerContext)(contextSpec).amplify, input);\nexports.del = del;\n/**\n * HEAD HTTP request (server-side)\n * @param {AmplifyServer.ContextSpec} contextSpec - The context spec used to get the Amplify server context.\n * @param {HeadInput} input - Input for HEAD operation.\n * @throws - {@link RestApiError}\n * @example\n * Send a HEAD request\n * ```js\n * import { head } from 'aws-amplify/api/server';\n * //...\n * const restApiResponse = await runWithAmplifyServerContext({\n * nextServerContext: { request, response },\n * operation: async (contextSpec) => {\n * try {\n * const { headers } = await head(contextSpec, input).response;\n * } catch (error) {\n * console.log(error);\n * return false;\n * }\n * },\n * });\n * ```\n */\nconst head = (contextSpec, input) => (0, publicApis_1.head)((0, adapter_core_1.getAmplifyServerContext)(contextSpec).amplify, input);\nexports.head = head;\n/**\n * PATCH HTTP request (server-side)\n * @param {AmplifyServer.ContextSpec} contextSpec - The context spec used to get the Amplify server context.\n * @param {PatchInput} input - Input for PATCH operation.\n * @throws - {@link RestApiError}\n * @example\n * Send a PATCH request\n * ```js\n * import { patch } from 'aws-amplify/api/server';\n * //...\n * const restApiResponse = await runWithAmplifyServerContext({\n * nextServerContext: { request, response },\n * operation: async (contextSpec) => {\n * try {\n * const { body } = await patch(contextSpec, input).response;\n * return await body.json();\n * } catch (error) {\n * console.log(error);\n * return false;\n * }\n * },\n * });\n * ```\n */\nconst patch = (contextSpec, input) => (0, publicApis_1.patch)((0, adapter_core_1.getAmplifyServerContext)(contextSpec).amplify, input);\nexports.patch = patch;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,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,EAAE,KAAK,CAAC,CAAC;AACnI,OAAO,CAAC,GAAG,GAAG,GAAG,CAAC;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,GAAG,GAAG,CAAC,WAAW,EAAE,KAAK,KAAK,IAAI,YAAY,CAAC,GAAG,EAAE,IAAI,cAAc,CAAC,uBAAuB,EAAE,WAAW,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AACnI,OAAO,CAAC,GAAG,GAAG,GAAG,CAAC;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,IAAI,GAAG,CAAC,WAAW,EAAE,KAAK,KAAK,IAAI,YAAY,CAAC,IAAI,EAAE,IAAI,cAAc,CAAC,uBAAuB,EAAE,WAAW,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AACrI,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,KAAK,GAAG,CAAC,WAAW,EAAE,KAAK,KAAK,IAAI,YAAY,CAAC,KAAK,EAAE,IAAI,cAAc,CAAC,uBAAuB,EAAE,WAAW,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AACvI,OAAO,CAAC,KAAK,GAAG,KAAK;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"CanceledError.js","sources":["../../../../src/errors/CanceledError.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;;;AAGA,MAA8C,cAAA,GAAA,OAAA,CAAA,gBAAA,CAAA,CAAA;AAE9C;;;;AAIG;AACH,MAAa,aAAc,SAAQ,cAAY,CAAA,YAAA,CAAA;AAC9C,IAAA,WAAA,CAAY,SAAsC,EAAE,EAAA;AACnD,QAAA,KAAK,CAAC;AACL,YAAA,IAAI,EAAE,eAAe;AACrB,YAAA,OAAO,EAAE,6BAA6B;AACtC,YAAA,GAAG,MAAM;AACT,SAAA,CAAC,CAAC;;AAGH,QAAA,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC;QACjC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;KACrD;AACD,CAAA;AAZD,OAYC,CAAA,aAAA,GAAA,aAAA,CAAA;AAED;;;;;AAKG;AACI,MAAM,aAAa,GAAG,CAAC,KAAc,KAC3C,CAAC,CAAC,KAAK,IAAI,KAAK,YAAY,aAAa,CAAC;AAD9B,OAAA,CAAA,aAAa,GACiB,aAAA;;"}
1
+ {"version":3,"file":"CanceledError.js","sources":["../../../src/errors/CanceledError.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isCancelError = exports.CanceledError = void 0;\nconst RestApiError_1 = require(\"./RestApiError\");\n/**\n * Internal-only class for CanceledError.\n *\n * @internal\n */\nclass CanceledError extends RestApiError_1.RestApiError {\n constructor(params = {}) {\n super({\n name: 'CanceledError',\n message: 'Request is canceled by user',\n ...params,\n });\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = CanceledError;\n Object.setPrototypeOf(this, CanceledError.prototype);\n }\n}\nexports.CanceledError = CanceledError;\n/**\n * Check if an error is caused by user calling `cancel()` in REST API.\n *\n * @note This function works **ONLY** for errors thrown by REST API. For GraphQL APIs, use `client.isCancelError(error)`\n * instead. `client` is generated from `generateClient()` API from `aws-amplify/api`.\n */\nconst isCancelError = (error) => !!error && error instanceof CanceledError;\nexports.isCancelError = isCancelError;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MA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CAAC,CAAC;KACpD;AACD,CAAA;AARD,OAQC,CAAA,YAAA,GAAA,YAAA;;"}
1
+ {"version":3,"file":"RestApiError.js","sources":["../../../src/errors/RestApiError.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RestApiError = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nclass RestApiError extends utils_1.ApiError {\n constructor(params) {\n super(params);\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = RestApiError;\n Object.setPrototypeOf(this, RestApiError.prototype);\n }\n}\nexports.RestApiError = RestApiError;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,YAAY,GAAG,KAAK,CAAC,CAAC;AAC9B,MAAM,OAAO,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAAC;AAC7D,MAAM,YAAY,SAAS,OAAO,CAAC,QAAQ,CAAC;AAC5C,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB,QAAQ,KAAK,CAAC,MAAM,CAAC,CAAC;AACtB;AACA,QAAQ,IAAI,CAAC,WAAW,GAAG,YAAY,CAAC;AACxC,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;AAC5D,KAAK;AACL,CAAC;AACD,OAAO,CAAC,YAAY,GAAG,YAAY;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"assertValidatonError.js","sources":["../../../../src/errors/assertValidatonError.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;;;AAEA,MAA8C,cAAA,GAAA,OAAA,CAAA,gBAAA,CAAA,CAAA;AAC9C,MAA8E,YAAA,GAAA,OAAA,CAAA,cAAA,CAAA,CAAA;AAE9E;;AAEG;AACH,SAAgB,qBAAqB,CACpC,SAAkB,EAClB,IAAgC,EAAA;IAEhC,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,GAAG,YAAkB,CAAA,kBAAA,CAAC,IAAI,CAAC,CAAC;IAEjE,IAAI,CAAC,SAAS,EAAE;QACf,MAAM,IAAI,cAAY,CAAA,YAAA,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC,CAAC;AAC9D,KAAA;AACF,CAAC;AATD,OASC,CAAA,qBAAA,GAAA,qBAAA;;"}
1
+ {"version":3,"file":"assertValidatonError.js","sources":["../../../src/errors/assertValidatonError.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assertValidationError = void 0;\nconst RestApiError_1 = require(\"./RestApiError\");\nconst validation_1 = require(\"./validation\");\n/**\n * @internal\n */\nfunction assertValidationError(assertion, name) {\n const { message, recoverySuggestion } = validation_1.validationErrorMap[name];\n if (!assertion) {\n throw new RestApiError_1.RestApiError({ name, message, recoverySuggestion });\n }\n}\nexports.assertValidationError = assertValidationError;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,qBAAqB,GAAG,KAAK,CAAC,CAAC;AACvC,MAAM,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AACjD,MAAM,YAAY,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AAC7C;AACA;AACA;AACA,SAAS,qBAAqB,CAAC,SAAS,EAAE,IAAI,EAAE;AAChD,IAAI,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,GAAG,YAAY,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;AAClF,IAAI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AAA,EAAA,UAAA,EAAA,IAAA,EAAA,GAAA,EAAA,YAAA,EAAA,OAAA,YAAA,CAAA,0BAA0B,CAAA,EAAA,EAAA,CAAA,CAAA;AAAE,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,oBAAA,EAAA,EAAA,UAAA,EAAA,IAAA,EAAA,GAAA,EAAA,YAAA,EAAA,OAAA,YAAA,CAAA,kBAAkB,CAAA,EAAA,EAAA,CAAA;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/errors/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validationErrorMap = exports.RestApiValidationErrorCode = exports.assertValidationError = exports.RestApiError = exports.isCancelError = exports.CanceledError = void 0;\nvar CanceledError_1 = require(\"./CanceledError\");\nObject.defineProperty(exports, \"CanceledError\", { enumerable: true, get: function () { return CanceledError_1.CanceledError; } });\nObject.defineProperty(exports, \"isCancelError\", { enumerable: true, get: function () { return CanceledError_1.isCancelError; } });\nvar RestApiError_1 = require(\"./RestApiError\");\nObject.defineProperty(exports, \"RestApiError\", { enumerable: true, get: function () { return RestApiError_1.RestApiError; } });\nvar assertValidatonError_1 = require(\"./assertValidatonError\");\nObject.defineProperty(exports, \"assertValidationError\", { enumerable: true, get: function () { return assertValidatonError_1.assertValidationError; } });\nvar validation_1 = require(\"./validation\");\nObject.defineProperty(exports, \"RestApiValidationErrorCode\", { enumerable: true, get: function () { return validation_1.RestApiValidationErrorCode; } });\nObject.defineProperty(exports, \"validationErrorMap\", { enumerable: true, get: function () { return validation_1.validationErrorMap; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,0BAA0B,GAAG,O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AE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,YAAY,CAAC,kBAAkB,CAAC,EAAE,EAAE,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"validation.js","sources":["../../../../src/errors/validation.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;;;AAIA,IAAY,0BAEX,CAAA;AAFD,CAAA,UAAY,0BAA0B,EAAA;AACrC,IAAA,0BAAA,CAAA,gBAAA,CAAA,GAAA,gBAAiC,CAAA;AAClC,CAAC,EAFW,0BAA0B,GAA1B,OAA0B,CAAA,0BAAA,KAA1B,kCAA0B,GAErC,EAAA,CAAA,CAAA,CAAA;AAEY,OAAA,CAAA,kBAAkB,GAAgD;AAC9E,IAAA,CAAC,0BAA0B,CAAC,cAAc,GAAG;AAC5C,QAAA,OAAO,EAAE,sBAAsB;AAC/B,QAAA,kBAAkB,EACjB,iFAAiF;AAClF,KAAA;CACD;;"}
1
+ {"version":3,"file":"validation.js","sources":["../../../src/errors/validation.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validationErrorMap = exports.RestApiValidationErrorCode = void 0;\nvar RestApiValidationErrorCode;\n(function (RestApiValidationErrorCode) {\n RestApiValidationErrorCode[\"InvalidApiName\"] = \"InvalidApiName\";\n})(RestApiValidationErrorCode = exports.RestApiValidationErrorCode || (exports.RestApiValidationErrorCode = {}));\nexports.validationErrorMap = {\n [RestApiValidationErrorCode.InvalidApiName]: {\n message: 'API name is invalid.',\n recoverySuggestion: 'Check if the API name matches the one in your configuration or `aws-exports.js`',\n },\n};\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,kBAAkB,GAAG,O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AAA,EAAA,YAAA,EAAA,OAAA,MAAA,CAAA,GAAG,CAAA,EAAA,EAAA,CAAA,CAAA;AAAE,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,KAAA,EAAA,EAAA,UAAA,EAAA,IAAA,EAAA,GAAA,EAAA,YAAA,EAAA,OAAA,MAAA,CAAA,GAAG,CAAA,EAAA,EAAA,CAAA,CAAA;AAAE,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,MAAA,EAAA,EAAA,UAAA,EAAA,IAAA,EAAA,GAAA,EAAA,YAAA,EAAA,OAAA,MAAA,CAAA,IAAI,CAAA,EAAA,EAAA,CAAA,CAAA;AAAE,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,OAAA,EAAA,EAAA,UAAA,EAAA,IAAA,EAAA,GAAA,EAAA,YAAA,EAAA,OAAA,MAAA,CAAA,KAAK,CAAA,EAAA,EAAA,CAAA;;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.patch = exports.head = exports.del = exports.put = exports.post = exports.get = exports.isCancelError = void 0;\nvar CanceledError_1 = require(\"./errors/CanceledError\");\nObject.defineProperty(exports, \"isCancelError\", { enumerable: true, get: function () { return CanceledError_1.isCancelError; } });\nvar apis_1 = require(\"./apis\");\nObject.defineProperty(exports, \"get\", { enumerable: true, get: function () { return apis_1.get; } });\nObject.defineProperty(exports, \"post\", { enumerable: true, get: function () { return apis_1.post; } });\nObject.defineProperty(exports, \"put\", { enumerable: true, get: function () { return apis_1.put; } });\nObject.defineProperty(exports, \"del\", { enumerable: true, get: function () { return apis_1.del; } });\nObject.defineProperty(exports, \"head\", { enumerable: true, get: function () { return apis_1.head; } });\nObject.defineProperty(exports, \"patch\", { enumerable: true, get: function () { return apis_1.patch; } });\n"],"names":[],"mappings":";;AACA;AACA;A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AAc,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;AACvG,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,MAAM,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/internals/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;AACA;AACA,MAA4C,MAAA,GAAA,OAAA,CAAA,mBAAA,CAAA,CAAA;AAE5C,MAAmE,cAAA,GAAA,OAAA,CAAA,6BAAA,CAAA,CAAA;AAGnE;;;;;;;;;;;;;;;AAeG;AACI,MAAM,IAAI,GAAG,CAAC,KAAwB,KAAI;AAChD,IAAA,OAAO,IAAA,cAAY,CAAA,IAAA,EAAC,cAAO,EAAE,KAAK,CAAC,CAAC;AACrC,CAAC,CAAC;AAFW,OAAA,CAAA,IAAI,GAEf,IAAA,CAAA;AAEF,IAGqC,cAAA,GAAA,OAAA,CAAA,6BAAA,CAAA,CAAA;AAFpC,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,QAAA,EAAA,EAAA,UAAA,EAAA,IAAA,EAAA,GAAA,EAAA,YAAA,EAAA,OAAA,cAAA,CAAA,MAAM,CAAA,EAAA,EAAA,CAAA,CAAA;AACN,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,8BAAA,EAAA,EAAA,UAAA,EAAA,IAAA,EAAA,GAAA,EAAA,YAAA,EAAA,OAAA,cAAA,CAAA,4BAA4B,CAAA,EAAA,EAAA,CAAA;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/internals/index.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.updateRequestToBeCancellable = exports.cancel = exports.post = void 0;\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst core_1 = require(\"@aws-amplify/core\");\nconst internalPost_1 = require(\"../apis/common/internalPost\");\n/**\n * Internal-only REST POST handler to send GraphQL request to given endpoint. By default, it will use IAM to authorize\n * the request. In some auth modes, the IAM auth has to be disabled. Here's how to set up the request auth correctly:\n * * If auth mode is 'iam', you MUST NOT set 'authorization' header and 'x-api-key' header, since it would disable IAM\n * auth. You MUST also set 'input.options.signingServiceInfo' option.\n * * The including 'input.options.signingServiceInfo.service' and 'input.options.signingServiceInfo.region' are\n * optional. If omitted, the signing service and region will be inferred from url.\n * * If auth mode is 'none', you MUST NOT set 'options.signingServiceInfo' option.\n * * If auth mode is 'apiKey', you MUST set 'x-api-key' custom header.\n * * If auth mode is 'oidc' or 'lambda' or 'userPool', you MUST set 'authorization' header.\n *\n * To make the internal post cancellable, you must also call `updateRequestToBeCancellable()` with the promise from\n * internal post call and the abort controller supplied to the internal post call.\n *\n * @internal\n */\nconst post = (input) => {\n return (0, internalPost_1.post)(core_1.Amplify, input);\n};\nexports.post = post;\nvar internalPost_2 = require(\"../apis/common/internalPost\");\nObject.defineProperty(exports, \"cancel\", { enumerable: true, get: function () { return internalPost_2.cancel; } });\nObject.defineProperty(exports, \"updateRequestToBeCancellable\", { enumerable: true, get: function () { return internalPost_2.updateRequestToBeCancellable; } });\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,4BAA4B,GAAG,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC;AAC9E;AACA;AACA,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC5C,MAAM,cAAc,GAAG,OAAO,CAAC,6BAA6B,CAAC,CAAC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,IAAI,GAAG,CAAC,KAAK,KAAK;AACxB,IAAI,OAAO,IAAI,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AAC3D,CAAC,CAAC;AACF,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;AACpB,IAAI,cAAc,GAAG,OAAO,CAAC,6BAA6B,CAAC,CAAC;AAC5D,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,cAAc,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC;AACnH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,8BAA8B,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,cAAc,CAAC,4BAA4B,CAAC,EAAE,EAAE,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sources":["../../../../src/internals/server.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;AACA;AACA,MAGkD,cAAA,GAAA,OAAA,CAAA,0CAAA,CAAA,CAAA;AAElD,MAAmE,cAAA,GAAA,OAAA,CAAA,6BAAA,CAAA,CAAA;AAGnE;;;;;;;;;;;;;;;AAeG;AACI,MAAM,IAAI,GAAG,CACnB,WAAsC,EACtC,KAAwB,KACrB;AACH,IAAA,OAAO,IAAA,cAAA,CAAA,IAAY,EAAC,IAAA,cAAuB,CAAA,uBAAA,EAAC,WAAW,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AAC1E,CAAC,CAAC;AALW,OAAA,CAAA,IAAI,GAKf,IAAA,CAAA;AAEF,IAGqC,cAAA,GAAA,OAAA,CAAA,6BAAA,CAAA,CAAA;AAFpC,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,QAAA,EAAA,EAAA,UAAA,EAAA,IAAA,EAAA,GAAA,EAAA,YAAA,EAAA,OAAA,cAAA,CAAA,MAAM,CAAA,EAAA,EAAA,CAAA,CAAA;AACN,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,8BAAA,EAAA,EAAA,UAAA,EAAA,IAAA,EAAA,GAAA,EAAA,YAAA,EAAA,OAAA,cAAA,CAAA,4BAA4B,CAAA,EAAA,EAAA,CAAA;;"}
1
+ {"version":3,"file":"server.js","sources":["../../../src/internals/server.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.updateRequestToBeCancellable = exports.cancel = exports.post = void 0;\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nconst adapter_core_1 = require(\"@aws-amplify/core/internals/adapter-core\");\nconst internalPost_1 = require(\"../apis/common/internalPost\");\n/**\n * Internal-only REST POST handler to send GraphQL request to given endpoint. By default, it will use IAM to authorize\n * the request. In some auth modes, the IAM auth has to be disabled. Here's how to set up the request auth correctly:\n * * If auth mode is 'iam', you MUST NOT set 'authorization' header and 'x-api-key' header, since it would disable IAM\n * auth. You MUST also set 'input.options.signingServiceInfo' option.\n * * The including 'input.options.signingServiceInfo.service' and 'input.options.signingServiceInfo.region' are\n * optional. If omitted, the signing service and region will be inferred from url.\n * * If auth mode is 'none', you MUST NOT set 'options.signingServiceInfo' option.\n * * If auth mode is 'apiKey', you MUST set 'x-api-key' custom header.\n * * If auth mode is 'oidc' or 'lambda' or 'userPool', you MUST set 'authorization' header.\n *\n * To make the internal post cancellable, you must also call `updateRequestToBeCancellable()` with the promise from\n * internal post call and the abort controller supplied to the internal post call.\n *\n * @internal\n */\nconst post = (contextSpec, input) => {\n return (0, internalPost_1.post)((0, adapter_core_1.getAmplifyServerContext)(contextSpec).amplify, input);\n};\nexports.post = post;\nvar internalPost_2 = require(\"../apis/common/internalPost\");\nObject.defineProperty(exports, \"cancel\", { enumerable: true, get: function () { return internalPost_2.cancel; } });\nObject.defineProperty(exports, \"updateRequestToBeCancellable\", { enumerable: true, get: function () { return internalPost_2.updateRequestToBeCancellable; } });\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,4BAA4B,GAAG,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC;AAC9E;AACA;AACA,MAAM,cAAc,GAAG,OAAO,CAAC,0CAA0C,CAAC,CAAC;AAC3E,MAAM,cAAc,GAAG,OAAO,CAAC,6BAA6B,CAAC,CAAC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,IAAI,GAAG,CAAC,WAAW,EAAE,KAAK,KAAK;AACrC,IAAI,OAAO,IAAI,cAAc,CAAC,IAAI,EAAE,IAAI,cAAc,CAAC,uBAAuB,EAAE,WAAW,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AAC7G,CAAC,CAAC;AACF,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;AACpB,IAAI,cAAc,GAAG,OAAO,CAAC,6BAA6B,CAAC,CAAC;AAC5D,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,cAAc,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC;AACnH,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,8BAA8B,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,cAAc,CAAC,4BAA4B,CAAC,EAAE,EAAE,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sources":["../../../src/server.ts"],"sourcesContent":[null],"names":[],"mappings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KAAK,CAAA,EAAA,EAAA,CAAA;;"}
1
+ {"version":3,"file":"server.js","sources":["../../src/server.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.patch = exports.head = exports.del = exports.put = exports.post = exports.get = exports.isCancelError = void 0;\nvar CanceledError_1 = require(\"./errors/CanceledError\");\nObject.defineProperty(exports, \"isCancelError\", { enumerable: true, get: function () { return CanceledError_1.isCancelError; } });\nvar server_1 = require(\"./apis/server\");\nObject.defineProperty(exports, \"get\", { enumerable: true, get: function () { return server_1.get; } });\nObject.defineProperty(exports, \"post\", { enumerable: true, get: function () { return server_1.post; } });\nObject.defineProperty(exports, \"put\", { enumerable: true, get: function () { return server_1.put; } });\nObject.defineProperty(exports, \"del\", { enumerable: true, get: function () { return server_1.del; } });\nObject.defineProperty(exports, \"head\", { enumerable: true, get: function () { return server_1.head; } });\nObject.defineProperty(exports, \"patch\", { enumerable: true, get: function () { return server_1.patch; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,aAAa,GAAG,KAAK,CAAC,CAAC;AACvH,IAAI,eAAe,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;AACxD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,eAAe,CAAC,aAAa,CAAC,EAAE,EAAE,CAAC,CAAC;AAClI,IAAI,QAAQ,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;AACxC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,QAAQ,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;AACvG,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;AACzG,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,QAAQ,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;AACvG,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,QAAQ,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;AACvG,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;AACzG,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,QAAQ,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/types/index.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../../../../src/utils/constants.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;;;AAEa,OAAA,CAAA,gCAAgC,GAAG,aAAa,CAAC;AAEjD,OAAA,CAAA,2BAA2B,GAAG,aAAa,CAAC;AAE5C,OAAA,CAAA,0BAA0B,GAAG,WAAW,CAAC;AAEtD;;;AAGG;AACU,OAAA,CAAA,qBAAqB,GACjC,iDAAiD;;"}
1
+ {"version":3,"file":"constants.js","sources":["../../../src/utils/constants.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.APIG_HOSTNAME_PATTERN = exports.DEFAULT_IAM_SIGNING_REGION = exports.DEFAULT_APPSYNC_API_SERVICE = exports.DEFAULT_REST_IAM_SIGNING_SERVICE = void 0;\nexports.DEFAULT_REST_IAM_SIGNING_SERVICE = 'execute-api';\nexports.DEFAULT_APPSYNC_API_SERVICE = 'appsync-api';\nexports.DEFAULT_IAM_SIGNING_REGION = 'us-east-1';\n/**\n * The REST endpoints generated by API Gateway\n * @see {@link https://docs.aws.amazon.com/general/latest/gr/apigateway.html#apigateway_region_data_plane}\n */\nexports.APIG_HOSTNAME_PATTERN = /^.+\\.([a-z0-9-]+)\\.([a-z0-9-]+)\\.amazonaws\\.com/;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,qBAAqB,GAAG,OAAO,CAAC,0BAA0B,GAAG,OAAO,CAAC,2BAA2B,GAAG,OAAO,CAAC,gCAAgC,GAAG,KAAK,CAAC,CAAC;AAC7J,OAAO,CAAC,gCAAgC,GAAG,aAAa,CAAC;AACzD,OAAO,CAAC,2BAA2B,GAAG,aAAa,CAAC;AACpD,OAAO,CAAC,0BAA0B,GAAG,WAAW,CAAC;AACjD;AACA;AACA;AACA;AACA,OAAO,CAAC,qBAAqB,GAAG,iDAAiD;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"createCancellableOperation.js","sources":["../../../../src/utils/createCancellableOperation.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;;;AAGA,MAA0C,QAAA,GAAA,OAAA,CAAA,WAAA,CAAA,CAAA;AAE1C,MAA0D,cAAA,GAAA,OAAA,CAAA,gBAAA,CAAA,CAAA;AAC1D,MAAkC,QAAA,GAAA,OAAA,CAAA,UAAA,CAAA,CAAA;AAmBlC;;AAEG;AACH,SAAgB,0BAA0B,CACzC,OAEgC,EAChC,eAAiC,EAAA;IAEjC,MAAM,cAAc,GAAG,CACtB,OAEgC,KACY,CAAC,CAAC,eAAe,CAAC;;;;AAK/D,IAAA,MAAM,yBAAyB,GAAG,IAAI,eAAe,EAAE,CAAC;AACxD,IAAA,MAAM,qBAAqB,GAAG,yBAAyB,CAAC,MAAM,CAAC;AAC/D,IAAA,MAAM,uBAAuB,GAAG,eAAe,EAAE,MAAM,CAAC;AACxD,IAAA,IAAI,WAAmB,CAAC;AAExB,IAAA,MAAM,GAAG,GAAG,YAAW;QACtB,IAAI;AACH,YAAA,MAAM,QAAQ,GAAG,OAAO,cAAc,CAAC,OAAO,CAAC;kBAC5C,OAAO,EAAE;AACX,kBAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC,CAAC;AAEnC,YAAA,IAAI,QAAQ,CAAC,UAAU,IAAI,GAAG,EAAE;AAC/B,gBAAA,MAAM,MAAM,CAAA,CAAA,EAAA,cAAA,CAAA,wBAAwB,EAAC,QAAQ,CAAE,CAAC;AAChD,aAAA;AACD,YAAA,OAAO,QAAQ,CAAC;AAChB,SAAA;AAAC,QAAA,OAAO,KAAU,EAAE;AACpB,YAAA,MAAM,WAAW,GAAG,uBAAuB,IAAI,qBAAqB,CAAC;AACrE,YAAA,MAAM,OAAO,GAAG,WAAW,IAAI,WAAW,CAAC,MAAM,CAAC;YAClD,IAAI,KAAK,CAAC,IAAI,KAAK,YAAY,IAAI,WAAW,EAAE,OAAO,KAAK,IAAI,EAAE;AACjE,gBAAA,MAAM,aAAa,GAAG,IAAI,QAAA,CAAA,aAAa,CAAC;AACvC,oBAAA,IAAI,OAAO,IAAI,EAAE,OAAO,EAAE;AAC1B,oBAAA,eAAe,EAAE,KAAK;AACtB,iBAAA,CAAC,CAAC;AACH,gBAAA,QAAA,CAAA,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AACpB,gBAAA,MAAM,aAAa,CAAC;AACpB,aAAA;AACD,YAAA,QAAA,CAAA,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AACpB,YAAA,MAAM,KAAK,CAAC;AACZ,SAAA;AACF,KAAC,CAAC;AAEF,IAAA,IAAI,cAAc,CAAQ,CAAC,EAAE;QAC5B,OAAO,GAAG,EAAE,CAAC;AACb,KAAA;AAAM,SAAA;AACN,QAAA,MAAM,MAAM,GAAG,CAAC,YAAqB,KAAI;AACxC,YAAA,IAAI,qBAAqB,CAAC,OAAO,KAAK,IAAI,EAAE;gBAC3C,OAAO;AACP,aAAA;AACD,YAAA,yBAAyB,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;;;AAG9C,YAAA,IAAI,YAAY,IAAI,qBAAqB,CAAC,MAAM,KAAK,YAAY,EAAE;gBAClE,WAAW,GAAG,YAAY,CAAC;AAC3B,aAAA;AACF,SAAC,CAAC;QACF,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE,MAAM,EAAE,CAAC;AACnC,KAAA;AACF,CAAC;AA9DD,OA8DC,CAAA,0BAAA,GAAA,0BAAA;;"}
1
+ {"version":3,"file":"createCancellableOperation.js","sources":["../../../src/utils/createCancellableOperation.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createCancellableOperation = void 0;\nconst errors_1 = require(\"../errors\");\nconst serviceError_1 = require(\"./serviceError\");\nconst logger_1 = require(\"./logger\");\n/**\n * @internal\n */\nfunction createCancellableOperation(handler, abortController) {\n const isInternalPost = (handler) => !!abortController;\n // For creating a cancellable operation for public REST APIs, we need to create an AbortController\n // internally. Whereas for internal POST APIs, we need to accept in the AbortController from the\n // callers.\n const publicApisAbortController = new AbortController();\n const publicApisAbortSignal = publicApisAbortController.signal;\n const internalPostAbortSignal = abortController?.signal;\n let abortReason;\n const job = async () => {\n try {\n const response = await (isInternalPost(handler)\n ? handler()\n : handler(publicApisAbortSignal));\n if (response.statusCode >= 300) {\n throw await (0, serviceError_1.parseRestApiServiceError)(response);\n }\n return response;\n }\n catch (error) {\n const abortSignal = internalPostAbortSignal ?? publicApisAbortSignal;\n const message = abortReason ?? abortSignal.reason;\n if (error.name === 'AbortError' || abortSignal?.aborted === true) {\n const canceledError = new errors_1.CanceledError({\n ...(message && { message }),\n underlyingError: error,\n });\n logger_1.logger.debug(error);\n throw canceledError;\n }\n logger_1.logger.debug(error);\n throw error;\n }\n };\n if (isInternalPost(handler)) {\n return job();\n }\n else {\n const cancel = (abortMessage) => {\n if (publicApisAbortSignal.aborted === true) {\n return;\n }\n publicApisAbortController.abort(abortMessage);\n // If abort reason is not supported, set a scoped reasons instead. The reason property inside an\n // AbortSignal is a readonly property and trying to set it would throw an error.\n if (abortMessage && publicApisAbortSignal.reason !== abortMessage) {\n abortReason = abortMessage;\n }\n };\n return { response: job(), cancel };\n }\n}\nexports.createCancellableOperation = createCancellableOperation;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,0BAA0B,GAAG,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OAAA,4BAAA,CAAA,0BAA0B,CAAA,EAAA,EAAA,CAAA,CAAA;AACnC,IAAsD,kBAAA,GAAA,OAAA,CAAA,oBAAA,CAAA,CAAA;AAA7C,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,kBAAA,EAAA,EAAA,UAAA,EAAA,IAAA,EAAA,GAAA,EAAA,YAAA,EAAA,OAAA,kBAAA,CAAA,gBAAgB,CAAA,EAAA,EAAA,CAAA,CAAA;AACzB,IAA0D,cAAA,GAAA,OAAA,CAAA,gBAAA,CAAA,CAAA;AAAjD,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,0BAAA,EAAA,EAAA,UAAA,EAAA,IAAA,EAAA,GAAA,EAAA,YAAA,EAAA,OAAA,cAAA,CAAA,wBAAwB,CAAA,EAAA,EAAA,CAAA,CAAA;AACjC,IAAgD,eAAA,GAAA,OAAA,CAAA,iBAAA,CAAA,CAAA;AAAvC,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,eAAA,EAAA,EAAA,UAAA,EAAA,IAAA,EAAA,GAAA,EAAA,YAAA,EAAA,OAAA,eAAA,CAAA,aAAa,CAAA,EAAA,EAAA,CAAA,CAAA;AACtB,IAAkC,QAAA,GAAA,OAAA,CAAA,UAAA,CAAA,CAAA;AAAzB,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,QAAA,EAAA,EAAA,UAAA,EAAA,IAAA,EAAA,GAAA,EAAA,YAAA,EAAA,OAAA,QAAA,CAAA,MAAM,CAAA,EAAA,EAAA,CAAA;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/utils/index.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.logger = exports.resolveApiUrl = exports.parseRestApiServiceError = exports.parseSigningInfo = exports.createCancellableOperation = void 0;\nvar createCancellableOperation_1 = require(\"./createCancellableOperation\");\nObject.defineProperty(exports, \"createCancellableOperation\", { enumerable: true, get: function () { return createCancellableOperation_1.createCancellableOperation; } });\nvar parseSigningInfo_1 = require(\"./parseSigningInfo\");\nObject.defineProperty(exports, \"parseSigningInfo\", { enumerable: true, get: function () { return parseSigningInfo_1.parseSigningInfo; } });\nvar serviceError_1 = require(\"./serviceError\");\nObject.defineProperty(exports, \"parseRestApiServiceError\", { enumerable: true, get: function () { return serviceError_1.parseRestApiServiceError; } });\nvar resolveApiUrl_1 = require(\"./resolveApiUrl\");\nObject.defineProperty(exports, \"resolveApiUrl\", { enumerable: true, get: function () { return resolveApiUrl_1.resolveApiUrl; } });\nvar logger_1 = require(\"./logger\");\nObject.defineProperty(exports, \"logger\", { enumerable: true, get: function () { return logger_1.logger; } });\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC,wBAAwB,GAAG,OAAO,CAAC,gBAAgB,GAAG,OAAO,CAAC,0BAA0B,GAAG,KAAK,CAAC,CAAC;AACnJ,IAAI,4BAA4B,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAAC;AAC3E,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,4BAA4B,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,4BAA4B,CAAC,0BAA0B,CAAC,EAAE,EAAE,CAAC,CAAC;AACzK,IAAI,kBAAkB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AACvD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,kBAAkB,CAAC,gBAAgB,CAAC,EAAE,EAAE,CAAC,CAAC;AAC3I,IAAI,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAC/C,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,0BAA0B,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,cAAc,CAAC,wBAAwB,CAAC,EAAE,EAAE,CAAC,CAAC;AACvJ,IAAI,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACjD,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,eAAe,CAAC,aAAa,CAAC,EAAE,EAAE,CAAC,CAAC;AAClI,IAAI,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AACnC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,OAAO,QAAQ,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"logger.js","sources":["../../../../src/utils/logger.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;;;AAEA,MAAkD,MAAA,GAAA,OAAA,CAAA,mBAAA,CAAA,CAAA;AAErC,OAAA,CAAA,MAAM,GAAG,IAAI,oBAAa,CAAC,UAAU,CAAC;;"}
1
+ {"version":3,"file":"logger.js","sources":["../../../src/utils/logger.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.logger = void 0;\nconst core_1 = require(\"@aws-amplify/core\");\nexports.logger = new core_1.ConsoleLogger('RestApis');\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OA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CAAC;AAnCW,OAAA,CAAA,gBAAgB,GAmC3B,gBAAA;;"}
1
+ {"version":3,"file":"parseSigningInfo.js","sources":["../../../src/utils/parseSigningInfo.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseSigningInfo = void 0;\nconst constants_1 = require(\"./constants\");\n/**\n * Infer the signing service and region from the given URL, and for REST API only, from the Amplify configuration.\n * It supports raw API Gateway endpoint and AppSync endpoint.\n *\n * @internal\n */\nconst parseSigningInfo = (url, restApiOptions) => {\n const { service: signingService = constants_1.DEFAULT_REST_IAM_SIGNING_SERVICE, region: signingRegion = constants_1.DEFAULT_IAM_SIGNING_REGION, } = restApiOptions?.amplify.getConfig()?.API?.REST?.[restApiOptions?.apiName] ??\n {};\n const { hostname } = url;\n const [, service, region] = constants_1.APIG_HOSTNAME_PATTERN.exec(hostname) ?? [];\n if (service === constants_1.DEFAULT_REST_IAM_SIGNING_SERVICE) {\n // The configured endpoint is an API Gateway endpoint\n // @see: https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-call-api.html\n return {\n service,\n region: region ?? signingRegion,\n };\n }\n else if (service === 'appsync-api') {\n // AppSync endpoint is internally supported because GraphQL operation will send request using POST handler.\n // example: https://xxxx.appsync-api.us-east-1.amazonaws.com/graphql\n return {\n service: 'appsync',\n region: region ?? signingRegion,\n };\n }\n else {\n return {\n service: signingService,\n region: signingRegion,\n };\n }\n};\nexports.parseSigningInfo = parseSigningInfo;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,gBAAgB,GAAG,KAAK,CAAC,CAAC;AAClC,MAAM,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AAC3C;AACA;AACA;AAC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A,aAAa,GAyBxB,aAAA;;"}
1
+ {"version":3,"file":"resolveApiUrl.js","sources":["../../../src/utils/resolveApiUrl.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveApiUrl = void 0;\nconst utils_1 = require(\"@aws-amplify/core/internals/utils\");\nconst errors_1 = require(\"../errors\");\n/**\n * Resolve the REST API request URL by:\n * 1. Loading the REST API endpoint from the Amplify configuration with corresponding API name.\n * 2. Appending the path to the endpoint.\n * 3. Merge the query parameters from path and the queryParameter argument which is taken from the public REST API\n * options.\n * 4. Validating the resulting URL string.\n *\n * @internal\n */\nconst resolveApiUrl = (amplify, apiName, path, queryParams) => {\n const urlStr = amplify.getConfig()?.API?.REST?.[apiName]?.endpoint;\n (0, errors_1.assertValidationError)(!!urlStr, errors_1.RestApiValidationErrorCode.InvalidApiName);\n try {\n const url = new utils_1.AmplifyUrl(urlStr + path);\n if (queryParams) {\n const mergedQueryParams = new utils_1.AmplifyUrlSearchParams(url.searchParams);\n Object.entries(queryParams).forEach(([key, value]) => {\n mergedQueryParams.set(key, value);\n });\n url.search = new utils_1.AmplifyUrlSearchParams(mergedQueryParams).toString();\n }\n return url;\n }\n catch (error) {\n throw new errors_1.RestApiError({\n name: errors_1.RestApiValidationErrorCode.InvalidApiName,\n ...errors_1.validationErrorMap[errors_1.RestApiValidationErrorCode.InvalidApiName],\n recoverySuggestion: `Please make sure the REST endpoint URL is a valid URL string. Got ${urlStr}`,\n });\n }\n};\nexports.resolveApiUrl = resolveApiUrl;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,aAAa,GAAG,KAAK,CAAC,CAAC;AAC/B,MAAM,OAAO,GAAG,OAAO,CAAC,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C,0BAA0B,CAAC,cAAc,CAAC;AAC9F,YAAY,kBAAkB,EAAE,CAAC,kEAAkE,EAAE,MAAM,CAAC,CAAC;AAC7G,SAAS,CAAC,CAAC;AACX,KAAK;AACL,CAAC,CAAC;AACF,OAAO,CAAC,aAAa,GAAG,aAAa;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"resolveHeaders.js","sources":["../../../../src/utils/resolveHeaders.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;;;AAEO,MAAM,cAAc,GAAG,CAC7B,OAAgC,EAChC,IAAc,KACX;IACH,MAAM,iBAAiB,GAA2B,EAAE,CAAC;AAErD,IAAA,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE;QAC1B,iBAAiB,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;AACpD,KAAA;AACD,IAAA,IAAI,IAAI,EAAE;AACT,QAAA,iBAAiB,CAAC,cAAc,CAAC,GAAG,iCAAiC,CAAC;QACtE,IAAI,IAAI,YAAY,QAAQ,EAAE;AAC7B;;;;;AAKG;AACH,YAAA,OAAO,iBAAiB,CAAC,cAAc,CAAC,CAAC;AACzC,SAAA;AACD,KAAA;AACD,IAAA,OAAO,iBAAiB,CAAC;AAC1B,CAAC,CAAC;AAtBW,OAAA,CAAA,cAAc,GAsBzB,cAAA;;"}
1
+ {"version":3,"file":"resolveHeaders.js","sources":["../../../src/utils/resolveHeaders.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveHeaders = void 0;\nconst resolveHeaders = (headers, body) => {\n const normalizedHeaders = {};\n const isFormData = body instanceof FormData;\n for (const key in headers) {\n normalizedHeaders[key.toLowerCase()] = headers[key];\n }\n if (body) {\n normalizedHeaders['content-type'] = 'application/json; charset=UTF-8';\n if (body instanceof FormData) {\n /**\n * If body is a FormData we should not allow setting content-type.\n * It's because runtime HTTP handlers(xhr, fetch, undici, node-fetch,\n * etc.) will modify the content-type value when setting multipart\n * boundary.\n */\n delete normalizedHeaders['content-type'];\n }\n }\n return normalizedHeaders;\n};\nexports.resolveHeaders = resolveHeaders;\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,cAAc,GAAG,KAAK,CAAC,CAAC;AAChC,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,IAAI,KAAK;AAC1C,IAAI,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAEjC,IAAI,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE;AAC/B,QAAQ,iBAAiB,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;AAC5D,KAAK;AACL,IAAI,IAAI,IAAI,EAAE;AACd,QAAQ,iBAAiB,CAAC,cAAc,CAAC,GAAG,iCAAiC,CAAC;AAC9E,QAAQ,IAAI,IAAI,YAAY,QAAQ,EAAE;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO,iBAAiB,CAAC,cAAc,CAAC,CAAC;AACrD,SAAS;AACT,KAAK;AACL,IAAI,OAAO,iBAAiB,CAAC;AAC7B,CAAC,CAAC;AACF,OAAO,CAAC,cAAc,GAAG,cAAc;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"serviceError.js","sources":["../../../../src/utils/serviceError.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAGA,MAGsD,kBAAA,GAAA,OAAA,CAAA,8CAAA,CAAA,CAAA;AAGtD,MAAyC,QAAA,GAAA,OAAA,CAAA,WAAA,CAAA,CAAA;AAEzC;;;;;;;;AAQG;AACI,MAAM,wBAAwB,GAAG,OACvC,QAAuB,KACkC;IACzD,IAAI,CAAC,QAAQ,EA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,IAAI,EAAE,CAAC;AAChC,qBAAA;AACD,oBAAA,OAAO,eAAe,CAAC;AACxB,iBAAC,CAAC;AACF,aAAA;AAAM,iBAAA;gBACN,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC3C,aAAA;SACD;AACD,KAAA,CAAC,CAAC;AACH,IAAA,MAAM,aAAa,GAAG,IAAI,KAAK,CAAC,QAAQ,EAAE;AACzC,QAAA,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAA;YACzB,IAAI,IAAI,KAAK,MAAM,EAAE;AACpB,gBAAA,OAAO,SAAS,CAAC;AACjB,aAAA;AAAM,iBAAA;gBACN,OAAO,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC3C,aAAA;SACD;AACD,KAAA,CAAC,CAAC;AACH,IAAA,OAAO,aAAa,CAAC;AACtB,CAAC,CAAC;AAEF;;AAEG;AACH,MAAM,iBAAiB,GAAG,CACzB,KAA6B,EAC7B,QAA2B,KACO;AAClC,IAAA,MAAM,YAAY,GAAG,IAAI,QAAA,CAAA,YAAY,CAAC;QACrC,IAAI,EAAE,KAAK,EAAE,IAAI;QACjB,OAAO,EAAE,KAAK,CAAC,OAAO;AACtB,QAAA,eAAe,EAAE,KAAK;QACtB,QAAQ;AACR,KAAA,CAAC,CAAC;;AAEH,IAAA,OAAO,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC;AACpE,CAAC;;"}
1
+ {"version":3,"file":"serviceError.js","sources":["../../../src/utils/serviceError.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parseRestApiServiceError = void 0;\nconst aws_client_utils_1 = require(\"@aws-amplify/core/internals/aws-client-utils\");\nconst errors_1 = require(\"../errors\");\n/**\n * Parses both AWS and non-AWS error responses coming from the users' backend code.\n * * AWS errors generated by the AWS services(e.g. API Gateway, Bedrock). They can be Signature errors,\n * ClockSkew errors, etc. These responses will be parsed to errors with proper name and message from the AWS\n * services.\n * * non-AWS errors thrown by the user code. They can contain any headers or body. Users need to access the\n * error.response to get the headers and body and parse them accordingly. The JS error name and message will\n * be `UnknownError` and `Unknown error` respectively.\n */\nconst parseRestApiServiceError = async (response) => {\n if (!response) {\n // Response is not considered an error.\n return;\n }\n const parsedAwsError = await (0, aws_client_utils_1.parseJsonError)(stubErrorResponse(response));\n if (!parsedAwsError) {\n // Response is not considered an error.\n return;\n }\n else {\n const bodyText = await response.body?.text();\n return buildRestApiError(parsedAwsError, {\n statusCode: response.statusCode,\n headers: response.headers,\n body: bodyText,\n });\n }\n};\nexports.parseRestApiServiceError = parseRestApiServiceError;\n/**\n * The response object needs to be stub here because the parseAwsJsonError assumes the response body to be valid JSON.\n * Although this is true for AWS services, it is not true for responses from user's code. Once the response body is\n * unwrapped as JSON(and fail), it cannot be read as text again. Therefore, we need to stub the response body here to\n * make sure we can read the error response body as a JSON, and may fall back to read as text if it is not a valid JSON.\n */\nconst stubErrorResponse = (response) => {\n let bodyTextPromise = undefined;\n const bodyProxy = new Proxy(response.body, {\n get(target, prop, receiver) {\n if (prop === 'json') {\n // For potential AWS errors, error parser will try to parse the body as JSON first.\n return async () => {\n if (!bodyTextPromise) {\n bodyTextPromise = target.text();\n }\n try {\n return JSON.parse(await bodyTextPromise);\n }\n catch (error) {\n // If response body is not a valid JSON, we stub it to be an empty object and eventually parsed\n // as an unknown error\n return {};\n }\n };\n }\n else if (prop === 'text') {\n // For non-AWS errors, users can access the body as a string as a fallback.\n return async () => {\n if (!bodyTextPromise) {\n bodyTextPromise = target.text();\n }\n return bodyTextPromise;\n };\n }\n else {\n return Reflect.get(target, prop, receiver);\n }\n },\n });\n const responseProxy = new Proxy(response, {\n get(target, prop, receiver) {\n if (prop === 'body') {\n return bodyProxy;\n }\n else {\n return Reflect.get(target, prop, receiver);\n }\n },\n });\n return responseProxy;\n};\n/**\n * Utility to create a new RestApiError from a service error.\n */\nconst buildRestApiError = (error, response) => {\n const restApiError = new errors_1.RestApiError({\n name: error?.name,\n message: error.message,\n underlyingError: error,\n response,\n });\n // $metadata is only required for backwards compatibility.\n return Object.assign(restApiError, { $metadata: error.$metadata });\n};\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,wBAAwB,GAAG,KAAK,CAAC,CAAC;AAC1C,MAAM,kBAAkB,GAAG,OAAO,CAAC,8CAA8C,CAAC,CAAC;AACnF,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,wBAAwB,GAAG,OAAO,QAAQ,KAAK;AACrD,IAAI,IAAI,CAAC,QAAQ,EAAE;AACnB;AACA,QAAQ,OAAO;AACf,KAAK;AACL,IAAI,MAAM,cAAc,GAAG,MAAM,IAAI,kBAAkB,CAAC,cAAc,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAC,CAAC;AACrG,IAAI,IAAI,CAAC,cAAc,EAAE;AACzB;AACA,QAAQ,OAAO;AACf,KAAK;AACL,SAAS;AACT,QAAQ,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC;AACrD,QAAQ,OAAO,iBAAiB,CAAC,cAAc,EAAE;AACjD,YAAY,UAAU,EAAE,QAAQ,CAAC,UAAU;AAC3C,YAAY,OAAO,EAAE,QAAQ,CAAC,OAAO;AACrC,YAAY,IAAI,EAAE,QAAQ;AAC1B,SAAS,CAAC,CAAC;AACX,KAAK;AACL,CAAC,CAAC;AACF,OAAO,CAAC,wBAAwB,GAAG,wBAAwB,CAAC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,iBAAiB,G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AAC,kBAAkB,CAAC;AAE7E,MAAM,kBAAkB,GAAG,OAC1B,OAAuB,KACY;IACnC,IAAI;QACH,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC;AAC9D,QAAA,IAAI,WAAW,EAAE;AAChB,YAAA,OAAO,WAAW,CAAC;AACnB,SAAA;AACD,KAAA;AAAC,IAAA,OAAO,CAAC,EAAE;AACX,QAAA,MAAM,CAAC,KAAK,CAAC,yDAAyD,CAAC,CAAC;AACxE,KAAA;AACD,IAAA,OAAO,IAAI,CAAC;AACb,CAAC;;;;"}
1
+ {"version":3,"file":"handler.mjs","sources":["../../../../src/apis/common/handler.ts"],"sourcesContent":["import { unauthenticatedHandler, getRetryDecider, jitteredBackoff, authenticatedHandler, } from '@aws-amplify/core/internals/aws-client-utils';\nimport { logger, parseRestApiServiceError, parseSigningInfo, } from '../../utils';\nimport { resolveHeaders } from '../../utils/resolveHeaders';\n/**\n * Make REST API call with best-effort IAM auth.\n * @param amplify Amplify instance to to resolve credentials and tokens. Should use different instance in client-side\n * and SSR\n * @param options Options accepted from public API options when calling the handlers.\n * @param signingServiceInfo Internal-only options enable IAM auth as well as to to overwrite the IAM signing service\n * and region. If specified, and NONE of API Key header or Auth header is present, IAM auth will be used.\n *\n * @internal\n */\nexport const transferHandler = async (amplify, options, signingServiceInfo) => {\n const { url, method, headers, body, withCredentials, abortSignal } = options;\n const resolvedBody = body\n ? body instanceof FormData\n ? body\n : JSON.stringify(body ?? '')\n : undefined;\n const resolvedHeaders = resolveHeaders(headers, body);\n const request = {\n url,\n headers: resolvedHeaders,\n method,\n body: resolvedBody,\n };\n const baseOptions = {\n retryDecider: getRetryDecider(parseRestApiServiceError),\n computeDelay: jitteredBackoff,\n withCrossDomainCredentials: withCredentials,\n abortSignal,\n };\n const isIamAuthApplicable = iamAuthApplicable(request, signingServiceInfo);\n let response;\n const credentials = await resolveCredentials(amplify);\n if (isIamAuthApplicable && credentials) {\n const signingInfoFromUrl = parseSigningInfo(url);\n const signingService = signingServiceInfo?.service ?? signingInfoFromUrl.service;\n const signingRegion = signingServiceInfo?.region ?? signingInfoFromUrl.region;\n response = await authenticatedHandler(request, {\n ...baseOptions,\n credentials,\n region: signingRegion,\n service: signingService,\n });\n }\n else {\n response = await unauthenticatedHandler(request, {\n ...baseOptions,\n });\n }\n // Clean-up un-modeled properties from response.\n return {\n statusCode: response.statusCode,\n headers: response.headers,\n body: response.body,\n };\n};\nconst iamAuthApplicable = ({ headers }, signingServiceInfo) => !headers.authorization && !headers['x-api-key'] && !!signingServiceInfo;\nconst resolveCredentials = async (amplify) => {\n try {\n const { credentials } = await amplify.Auth.fetchAuthSession();\n if (credentials) {\n return credentials;\n }\n }\n catch (e) {\n logger.debug('No credentials available, the request will be unsigned.');\n }\n return null;\n};\n"],"names":[],"mappings":";;;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,eAAe,GAAG,OAAO,OAAO,EAAE,OAAO,EAAE,kBAAkB,KAAK;AAC/E,IAAI,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC;AACjF,IAAI,MAAM,YAAY,GAAG,IAAI;AAC7B,UAAU,IAAI,YAAY,QAAQ;AAClC,cAAc,IAAI;AAClB,cAAc,IAAI,CAAC,SAAS,CAAC,IAAI,IAAI,EAAE,CAAC;AACxC,UAAU,SAAS,CAAC;AACpB,IAAI,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAC1D,IAAI,MAAM,OAAO,GAAG;AACpB,QAAQ,GAAG;AACX,QAAQ,OAAO,EAAE,eAAe;AAChC,QAAQ,MAAM;AACd,QAAQ,IAAI,EAAE,YAAY;AAC1B,KAAK,CAAC;AACN,IAAI,MAAM,WAAW,GAAG;AACxB,QAAQ,YAAY,EAAE,eAAe,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AAC,CAAC,kBAAkB,CAAC;AACvI,MAAM,kBAAkB,GAAG,OAAO,OAAO,KAAK;AAC9C,IAAI,IAAI;AACR,QAAQ,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC;AACtE,QAAQ,IAAI,WAAW,EAAE;AACzB,YAAY,OAAO,WAAW,CAAC;AAC/B,SAAS;AACT,KAAK;AACL,IAAI,OAAO,CAAC,EAAE;AACd,QAAQ,MAAM,CAAC,KAAK,CAAC,yDAAyD,CAAC,CAAC;AAChF,KAAK;AACL,IAAI,OAAO,IAAI,CAAC;AAChB,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"internalPost.mjs","sources":["../../../../../src/apis/common/internalPost.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AAAA;AACA;AAQA;;;;;;;;;;AAUG;AACH,MAAM,cAAc,GAAG,IAAI,OAAO,EAAiC,CAAC;AAEpE;;AAEG;AACI,MAAM,IAAI,GAAG,CACnB,OAAuB,EACvB,EAAE,GAAG,EAAE,OAAO,EAAE,eAAe,EAAqB,KACvB;AAC7B,IAAA,MAAM,UAAU,GAAG,eAAe,IAAI,IAAI,eAAe,EAAE,CAAC;AAC5D,IAAA,MAAM,eAAe,GAAG,0BAA0B,CAAC,YAAW;AAC7D,QAAA,MAAM,QAAQ,GAAG,eAAe,CAC/B,OAAO,EACP;YACC,GAAG;AACH,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,GAAG,OAAO;YACV,WAAW,EAAE,UAAU,CAAC,MAAM;AAC9B,SAAA,EACD,OAAO,EAAE,kBAAkB,CAC3B,CAAC;AACF,QAAA,OAAO,QAAQ,CAAC;KAChB,EAAE,UAAU,CAAC,CAAC;AAEf,IAAA,MAAM,mBAAmB,GAAG,eAAe,CAAC,OAAO,CAAC,MAAK;AACxD,QAAA,cAAc,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;AAC5C,KAAC,CAAC,CAAC;AACH,IAAA,OAAO,mBAAmB,CAAC;AAC5B,EAAE;AAEF;;;;AAIG;MACU,MAAM,GAAG,CACrB,OAAiC,EACjC,OAAgB,KACJ;IACZ,MAAM,UAAU,GAAG,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AAC/C,IAAA,IAAI,UAAU,EAAE;AACf,QAAA,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC1B,IAAI,OAAO,IAAI,UAAU,CAAC,MAAM,CAAC,MAAM,KAAK,OAAO,EAAE;;;AAGpD,YAAA,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC;AACtC,SAAA;AACD,QAAA,OAAO,IAAI,CAAC;AACZ,KAAA;AACD,IAAA,OAAO,KAAK,CAAC;AACd,EAAE;AAEF;;AAEG;MACU,4BAA4B,GAAG,CAC3C,OAAqB,EACrB,UAA2B,KACxB;AACH,IAAA,cAAc,CAAC,GAAG,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;AACzC;;;;"}
1
+ {"version":3,"file":"internalPost.mjs","sources":["../../../../src/apis/common/internalPost.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { transferHandler } from './handler';\nimport { createCancellableOperation } from '../../utils';\n/**\n * This weak map provides functionality to cancel a request given the promise containing the `post` request.\n *\n * 1. For every GraphQL POST request, an abort controller is created and supplied to the request.\n * 2. The promise fulfilled by GraphGL POST request is then mapped to that abort controller.\n * 3. The promise is returned to the external caller.\n * 4. The caller can either wait for the promise to fulfill or call `cancel(promise)` to cancel the request.\n * 5. If `cancel(promise)` is called, then the corresponding abort controller is retrieved from the map below.\n * 6. GraphQL POST request will be rejected with the error message provided during cancel.\n * 7. Caller can check if the error is because of cancelling by calling `isCancelError(error)`.\n */\nconst cancelTokenMap = new WeakMap();\n/**\n * @internal\n */\nexport const post = (amplify, { url, options, abortController }) => {\n const controller = abortController ?? new AbortController();\n const responsePromise = createCancellableOperation(async () => {\n const response = transferHandler(amplify, {\n url,\n method: 'POST',\n ...options,\n abortSignal: controller.signal,\n }, options?.signingServiceInfo);\n return response;\n }, controller);\n const responseWithCleanUp = responsePromise.finally(() => {\n cancelTokenMap.delete(responseWithCleanUp);\n });\n return responseWithCleanUp;\n};\n/**\n * Cancels a request given the promise returned by `post`.\n * If the request is already completed, this function does nothing.\n * It MUST be used after `updateRequestToBeCancellable` is called.\n */\nexport const cancel = (promise, message) => {\n const controller = cancelTokenMap.get(promise);\n if (controller) {\n controller.abort(message);\n if (message && controller.signal.reason !== message) {\n // In runtimes where `AbortSignal.reason` is not supported, we track the reason ourselves.\n // @ts-expect-error reason is read-only property.\n controller.signal['reason'] = message;\n }\n return true;\n }\n return false;\n};\n/**\n * MUST be used to make a promise including internal `post` API call cancellable.\n */\nexport const updateRequestToBeCancellable = (promise, controller) => {\n cancelTokenMap.set(promise, controller);\n};\n"],"names":[],"mappings":";;;;;;;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,cAAc,GAAG,IAAI,OAAO,EAAE,CAAC;AACrC;AACA;AACA;AACY,MAAC,IAAI,GAAG,CAAC,OAAO,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,eAAe,EAAE,KAAK;AACpE,IAAI,MAAM,UAAU,GAAG,eAAe,IAAI,IAAI,eAAe,EAAE,CAAC;AAChE,IAAI,MAAM,eAAe,GAAG,0BAA0B,CAAC,YAAY;AACnE,QAAQ,MAAM,QAAQ,GAAG,eAAe,CAAC,OAAO,EAAE;AAClD,YAAY,GAAG;AACf,YAAY,MAAM,EAAE,MAAM;AAC1B,YAAY,GAAG,OAAO;AACtB,YAAY,WAAW,EAAE,UAAU,CAAC,MAAM;AAC1C,SAAS,EAAE,OAAO,EAAE,kBAAkB,CAAC,CAAC;AACxC,QAAQ,OAAO,QAAQ,CAAC;AACxB,KAAK,EAAE,UAAU,CAAC,CAAC;AACnB,IAAI,MAAM,mBAAmB,GAAG,eAAe,CAAC,OAAO,CAAC,MAAM;AAC9D,QAAQ,cAAc,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;AACnD,KAAK,CAAC,CAAC;AACP,IAAI,OAAO,mBAAmB,CAAC;AAC/B,EAAE;AACF;AACA;AACA;AACA;AACA;AACY,MAAC,MAAM,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK;AAC5C,IAAI,MAAM,UAAU,GAAG,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACnD,IAAI,IAAI,UAAU,EAAE;AACpB,QAAQ,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AAClC,QAAQ,IAAI,OAAO,IAAI,UAAU,CAAC,MAAM,CAAC,MAAM,KAAK,OAAO,EAAE;AAC7D;AACA;AACA,YAAY,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC;AAClD,SAAS;AACT,QAAQ,OAAO,IAAI,CAAC;AACpB,KAAK;AACL,IAAI,OAAO,KAAK,CAAC;AACjB,EAAE;AACF;AACA;AACA;AACY,MAAC,4BAA4B,GAAG,CAAC,OAAO,EAAE,UAAU,KAAK;AACrE,IAAI,cAAc,CAAC,GAAG,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;AAC5C;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"publicApis.mjs","sources":["../../../../../src/apis/common/publicApis.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;AAAA;AACA;AA2BA,MAAM,aAAa,GAAG,CACrB,OAAuB,EACvB,OAAqC,EACrC,MAAc,KAEd,0BAA0B,CAAC,OAAM,WAAW,KAAG;AAC9C,IAAA,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,GAAG,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;AACrE,IAAA,MAAM,GAAG,GAAG,aAAa,CACxB,OAAO,EACP,OAAO,EACP,OA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AAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE;AAE7C,MAAA,KAAK,GAAG,CACpB,OAAuB,EACvB,KAAiB,KACG,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO;;;;"}
1
+ {"version":3,"file":"publicApis.mjs","sources":["../../../../src/apis/common/publicApis.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { resolveApiUrl, createCancellableOperation, logger, parseSigningInfo, } from '../../utils';\nimport { transferHandler } from './handler';\nconst publicHandler = (amplify, options, method) => createCancellableOperation(async (abortSignal) => {\n const { apiName, options: apiOptions = {}, path: apiPath } = options;\n const url = resolveApiUrl(amplify, apiName, apiPath, apiOptions?.queryParams);\n const libraryConfigHeaders = await amplify.libraryOptions?.API?.REST?.headers?.({\n apiName,\n });\n const { headers: invocationHeaders = {} } = apiOptions;\n const headers = {\n // custom headers from invocation options should precede library options\n ...libraryConfigHeaders,\n ...invocationHeaders,\n };\n const signingServiceInfo = parseSigningInfo(url, {\n amplify,\n apiName,\n });\n logger.debug(method, url, headers, `IAM signing options: ${JSON.stringify(signingServiceInfo)}`);\n return transferHandler(amplify, {\n ...apiOptions,\n url,\n method,\n headers,\n abortSignal,\n }, signingServiceInfo);\n});\nexport const get = (amplify, input) => publicHandler(amplify, input, 'GET');\nexport const post = (amplify, input) => publicHandler(amplify, input, 'POST');\nexport const put = (amplify, input) => publicHandler(amplify, input, 'PUT');\nexport const del = (amplify, input) => publicHandler(amplify, input, 'DELETE');\nexport const head = (amplify, input) => publicHandler(amplify, input, 'HEAD');\nexport const patch = (amplify, input) => publicHandler(amplify, input, 'PATCH');\n"],"names":[],"mappings":";;;;;;;;;AAAA;AACA;AAGA,MAAM,aAAa,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,0BAA0B,CAAC,OAAO,WAAW,KAAK;AACtG,IAAI,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,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K,KAAK,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE;AAChE,MAAC,GAAG,GAAG,CAAC,OAAO,EAAE,KAAK,KAAK,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE;AACnE,MAAC,IAAI,GAAG,CAAC,OAAO,EAAE,KAAK,KAAK,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE;AAClE,MAAC,KAAK,GAAG,CAAC,OAAO,EAAE,KAAK,KAAK,aAAa,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../src/apis/index.ts"],"sourcesContent":[null],"names":["commonGet","commonPost","commonPut","commonDel","commonHead","commonPatch"],"mappings":";;;AAAA;AACA;AA2BA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCG;AACI,MAAM,GAAG,GAAG,CAAC,KAAe,KAAmBA,KAAS,CAAC,OAAO,EAAE,KAAK,EAAE;AAEhF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCG;AACI,MAAM,IAAI,GAAG,CAAC,KAAgB,KACpCC,MAAU,CAAC,OAAO,EAAE,KAAK,EAAE;AAE5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCG;AACI,MAAM,GAAG,GAAG,CAAC,KAAe,KAAmBC,KAAS,CAAC,OAAO,EAAE,KAAK,EAAE;AAEhF;;;;;;;;;;;;;;;;;;;AAmBG;AACI,MAAM,GAAG,GAAG,CAAC,KAAkB,KACrCC,KAAS,CAAC,OAAO,EAAE,KAAK,EAAE;AAE3B;;;;;;;;;;;;;;;;;;;;AAoBG;AACI,MAAM,IAAI,GAAG,CAAC,KAAgB,KACpCC,MAAU,CAAC,OAAO,EAAE,KAAK,EAAE;AAE5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCG;AACI,MAAM,KAAK,GAAG,CAAC,KAAiB,KACtCC,OAAW,CAAC,OAAO,EAAE,KAAK;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../src/apis/index.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Amplify } from '@aws-amplify/core';\nimport { get as commonGet, post as commonPost, put as commonPut, del as commonDel, head as commonHead, patch as commonPatch, } from './common/publicApis';\n/**\n * GET HTTP request\n * @param {GetInput} input - Input for GET operation\n * @returns {GetOperation} Operation for GET request\n * @throws - {@link RestApiError}\n * @example\n * Send a GET request\n * ```js\n * import { get, isCancelError } from '@aws-amplify/api';\n *\n * const { body } = await get({\n * apiName,\n * path,\n * options: {\n * headers, // Optional, A map of custom header key/values\n * body, // Optional, JSON object or FormData\n * queryParams, // Optional, A map of query strings\n * }\n * }).response;\n * const data = await body.json();\n * ```\n * @example\n * Cancel a GET request\n *\n * ```js\n * import { get, isCancelError } from '@aws-amplify/api';\n *\n * const { response, cancel } = get({apiName, path, options});\n * cancel(message);\n * try {\n * await response;\n * } cache (e) {\n * if (isCancelError(e)) {\n * // handle request cancellation\n * }\n * //...\n * }\n * ```\n */\nexport const get = (input) => commonGet(Amplify, input);\n/**\n * POST HTTP request\n * @param {PostInput} input - Input for POST operation\n * @returns {PostOperation} Operation for POST request\n * @throws - {@link RestApiError}\n * @example\n * Send a POST request\n * ```js\n * import { post, isCancelError } from '@aws-amplify/api';\n *\n * const { body } = await post({\n * apiName,\n * path,\n * options: {\n * headers, // Optional, A map of custom header key/values\n * body, // Optional, JSON object or FormData\n * queryParams, // Optional, A map of query strings\n * }\n * }).response;\n * const data = await body.json();\n * ```\n * @example\n * Cancel a POST request\n *\n * ```js\n * import { post, isCancelError } from '@aws-amplify/api';\n *\n * const { response, cancel } = post({apiName, path, options});\n * cancel(message);\n * try {\n * await response;\n * } cache (e) {\n * if (isCancelError(e)) {\n * // handle request cancellation\n * }\n * //...\n * }\n * ```\n */\nexport const post = (input) => commonPost(Amplify, input);\n/**\n * PUT HTTP request\n * @param {PutInput} input - Input for PUT operation\n * @returns {PutOperation} Operation for PUT request\n * @throws - {@link RestApiError}\n * @example\n * Send a PUT request\n * ```js\n * import { put, isCancelError } from '@aws-amplify/api';\n *\n * const { body } = await put({\n * apiName,\n * path,\n * options: {\n * headers, // Optional, A map of custom header key/values\n * body, // Optional, JSON object or FormData\n * queryParams, // Optional, A map of query strings\n * }\n * }).response;\n * const data = await body.json();\n * ```\n * @example\n * Cancel a PUT request\n * ```js\n * import { put, isCancelError } from '@aws-amplify/api';\n *\n * const { response, cancel } = put({apiName, path, options});\n * cancel(message);\n * try {\n * await response;\n * } cache (e) {\n * if (isCancelError(e)) {\n * // handle request cancellation\n * }\n * //...\n * }\n * ```\n */\nexport const put = (input) => commonPut(Amplify, input);\n/**\n * DELETE HTTP request\n * @param {DeleteInput} input - Input for DELETE operation\n * @returns {DeleteOperation} Operation for DELETE request\n * @throws - {@link RestApiError}\n * @example\n * Send a DELETE request\n * ```js\n * import { del } from '@aws-amplify/api';\n *\n * const { statusCode } = await del({\n * apiName,\n * path,\n * options: {\n * headers, // Optional, A map of custom header key/values\n * queryParams, // Optional, A map of query strings\n * }\n * }).response;\n * ```\n */\nexport const del = (input) => commonDel(Amplify, input);\n/**\n * HEAD HTTP request\n * @param {HeadInput} input - Input for HEAD operation\n * @returns {HeadOperation} Operation for HEAD request\n * @throws - {@link RestApiError}\n * @example\n * Send a HEAD request\n * ```js\n * import { head, isCancelError } from '@aws-amplify/api';\n *\n * const { headers, statusCode } = await head({\n * apiName,\n * path,\n * options: {\n * headers, // Optional, A map of custom header key/values\n * queryParams, // Optional, A map of query strings\n * }\n * }),response;\n * ```\n *\n */\nexport const head = (input) => commonHead(Amplify, input);\n/**\n * PATCH HTTP request\n * @param {PatchInput} input - Input for PATCH operation\n * @returns {PatchOperation} Operation for PATCH request\n * @throws - {@link RestApiError}\n * @example\n * Send a PATCH request\n * ```js\n * import { patch } from '@aws-amplify/api';\n *\n * const { body } = await patch({\n * apiName,\n * path,\n * options: {\n * headers, // Optional, A map of custom header key/values\n * body, // Optional, JSON object or FormData\n * queryParams, // Optional, A map of query strings\n * }\n * }).response;\n * const data = await body.json();\n * ```\n *\n * @example\n * Cancel a PATCH request\n * ```js\n * import { patch, isCancelError } from '@aws-amplify/api';\n *\n * const { response, cancel } = patch({apiName, path, options});\n * cancel(message);\n * try {\n * await response;\n * } cache (e) {\n * if (isCancelError(e)) {\n * // handle request cancellation\n * }\n * //...\n * }\n * ```\n */\nexport const patch = (input) => commonPatch(Amplify, input);\n"],"names":["commonGet","commonPost","commonPut","commonDel","commonHead","commonPatch"],"mappings":";;;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,GAAG,GAAG,CAAC,KAAK,KAAKA,KAAS,CAAC,OAAO,EAAE,KAAK,EAAE;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,IAAI,GAAG,CAAC,KAAK,KAAKC,MAAU,CAAC,OAAO,EAAE,KAAK,EAAE;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,GAAG,GAAG,CAAC,KAAK,KAAKC,KAAS,CAAC,OAAO,EAAE,KAAK,EAAE;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,GAAG,GAAG,CAAC,KAAK,KAAKC,KAAS,CAAC,OAAO,EAAE,KAAK,EAAE;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,IAAI,GAAG,CAAC,KAAK,KAAKC,MAAU,CAAC,OAAO,EAAE,KAAK,EAAE;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,KAAK,GAAG,CAAC,KAAK,KAAKC,OAAW,CAAC,OAAO,EAAE,KAAK;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"server.mjs","sources":["../../../../src/apis/server.ts"],"sourcesContent":[null],"names":["commonGet","commonPost","commonPut","commonDel","commonHead","commonPatch"],"mappings":";;;AAAA;AACA;AA8BA;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;MACU,GAAG,GAAG,CAClB,WAAsC,EACtC,KAAe,KAEfA,KAAS,CAAC,uBAAuB,CAAC,WAAW,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE;AAEhE;;;;;;;;;;;;;;;;;;;;;;;AAuBG;MACU,IAAI,GAAG,CACnB,WAAsC,EACtC,KAAgB,KAEhBC,MAAU,CAAC,uBAAuB,CAAC,WAAW,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE;AAEjE;;;;;;;;;;;;;;;;;;;;;;;AAuBG;MACU,GAAG,GAAG,CAClB,WAAsC,EACtC,KAAe,KAEfC,KAAS,CAAC,uBAAuB,CAAC,WAAW,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE;AAEhE;;;;;;;;;;;;;;;;;;;;;;AAsBG;MACU,GAAG,GAAG,CAClB,WAAsC,EACtC,KAAkB,KAElBC,KAAS,CAAC,uBAAuB,CAAC,WAAW,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE;AAEhE;;;;;;;;;;;;;;;;;;;;;;AAsBG;MACU,IAAI,GAAG,CACnB,WAAsC,EACtC,KAAgB,KAEhBC,MAAU,CAAC,uBAAuB,CAAC,WAAW,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE;AAEjE;;;;;;;;;;;;;;;;;;;;;;;AAuBG;MACU,KAAK,GAAG,CACpB,WAAsC,EACtC,KAAiB,KAEjBC,OAAW,CAAC,uBAAuB,CAAC,WAAW,CAAC,CAAC,OAAO,EAAE,KAAK;;;;"}
1
+ {"version":3,"file":"server.mjs","sources":["../../../src/apis/server.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { getAmplifyServerContext, } from '@aws-amplify/core/internals/adapter-core';\nimport { get as commonGet, post as commonPost, put as commonPut, del as commonDel, head as commonHead, patch as commonPatch, } from './common/publicApis';\n/**\n * GET HTTP request (server-side)\n * @param {AmplifyServer.ContextSpec} contextSpec - The context spec used to get the Amplify server context.\n * @param {GetInput} input - Input for GET operation.\n * @throws - {@link RestApiError}\n * @example\n * Send a GET request\n * ```js\n * import { get } from 'aws-amplify/api/server';\n * //...\n * const restApiResponse = await runWithAmplifyServerContext({\n * nextServerContext: { request, response },\n * operation: async (contextSpec) => {\n * try {\n * const { body } = await get(contextSpec, input).response;\n * return await body.json();\n * } catch (error) {\n * console.log(error);\n * return false;\n * }\n * },\n * });\n * ```\n * @see {@link clientGet}\n */\nexport const get = (contextSpec, input) => commonGet(getAmplifyServerContext(contextSpec).amplify, input);\n/**\n * POST HTTP request (server-side)\n * @param {AmplifyServer.ContextSpec} contextSpec - The context spec used to get the Amplify server context.\n * @param {PostInput} input - Input for POST operation.\n * @throws - {@link RestApiError}\n * @example\n * Send a POST request\n * ```js\n * import { post } from 'aws-amplify/api/server';\n * //...\n * const restApiResponse = await runWithAmplifyServerContext({\n * nextServerContext: { request, response },\n * operation: async (contextSpec) => {\n * try {\n * const { body } = await post(contextSpec, input).response;\n * return await body.json();\n * } catch (error) {\n * console.log(error);\n * return false;\n * }\n * },\n * });\n * ```\n */\nexport const post = (contextSpec, input) => commonPost(getAmplifyServerContext(contextSpec).amplify, input);\n/**\n * PUT HTTP request (server-side)\n * @param {AmplifyServer.ContextSpec} contextSpec - The context spec used to get the Amplify server context.\n * @param {PutInput} input - Input for PUT operation.\n * @throws - {@link RestApiError}\n * @example\n * Send a PUT request\n * ```js\n * import { put } from 'aws-amplify/api/server';\n * //...\n * const restApiResponse = await runWithAmplifyServerContext({\n * nextServerContext: { request, response },\n * operation: async (contextSpec) => {\n * try {\n * const { body } = await put(contextSpec, input).response;\n * return await body.json();\n * } catch (error) {\n * console.log(error);\n * return false;\n * }\n * },\n * });\n * ```\n */\nexport const put = (contextSpec, input) => commonPut(getAmplifyServerContext(contextSpec).amplify, input);\n/**\n * DELETE HTTP request (server-side)\n * @param {AmplifyServer.ContextSpec} contextSpec - The context spec used to get the Amplify server context.\n * @param {DeleteInput} input - Input for DELETE operation.\n * @throws - {@link RestApiError}\n * @example\n * Send a DELETE request\n * ```js\n * import { del } from 'aws-amplify/api/server';\n * //...\n * const restApiResponse = await runWithAmplifyServerContext({\n * nextServerContext: { request, response },\n * operation: async (contextSpec) => {\n * try {\n * const { headers } = await del(contextSpec, input).response;\n * } catch (error) {\n * console.log(error);\n * return false;\n * }\n * },\n * });\n * ```\n */\nexport const del = (contextSpec, input) => commonDel(getAmplifyServerContext(contextSpec).amplify, input);\n/**\n * HEAD HTTP request (server-side)\n * @param {AmplifyServer.ContextSpec} contextSpec - The context spec used to get the Amplify server context.\n * @param {HeadInput} input - Input for HEAD operation.\n * @throws - {@link RestApiError}\n * @example\n * Send a HEAD request\n * ```js\n * import { head } from 'aws-amplify/api/server';\n * //...\n * const restApiResponse = await runWithAmplifyServerContext({\n * nextServerContext: { request, response },\n * operation: async (contextSpec) => {\n * try {\n * const { headers } = await head(contextSpec, input).response;\n * } catch (error) {\n * console.log(error);\n * return false;\n * }\n * },\n * });\n * ```\n */\nexport const head = (contextSpec, input) => commonHead(getAmplifyServerContext(contextSpec).amplify, input);\n/**\n * PATCH HTTP request (server-side)\n * @param {AmplifyServer.ContextSpec} contextSpec - The context spec used to get the Amplify server context.\n * @param {PatchInput} input - Input for PATCH operation.\n * @throws - {@link RestApiError}\n * @example\n * Send a PATCH request\n * ```js\n * import { patch } from 'aws-amplify/api/server';\n * //...\n * const restApiResponse = await runWithAmplifyServerContext({\n * nextServerContext: { request, response },\n * operation: async (contextSpec) => {\n * try {\n * const { body } = await patch(contextSpec, input).response;\n * return await body.json();\n * } catch (error) {\n * console.log(error);\n * return false;\n * }\n * },\n * });\n * ```\n */\nexport const patch = (contextSpec, input) => commonPatch(getAmplifyServerContext(contextSpec).amplify, input);\n"],"names":["commonGet","commonPost","commonPut","commonDel","commonHead","commonPatch"],"mappings":";;;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,GAAG,GAAG,CAAC,WAAW,EAAE,KAAK,KAAKA,KAAS,CAAC,uBAAuB,CAAC,WAAW,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,IAAI,GAAG,CAAC,WAAW,EAAE,KAAK,KAAKC,MAAU,CAAC,uBAAuB,CAAC,WAAW,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,GAAG,GAAG,CAAC,WAAW,EAAE,KAAK,KAAKC,KAAS,CAAC,uBAAuB,CAAC,WAAW,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,GAAG,GAAG,CAAC,WAAW,EAAE,KAAK,KAAKC,KAAS,CAAC,uBAAuB,CAAC,WAAW,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE;AAC1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,IAAI,GAAG,CAAC,WAAW,EAAE,KAAK,KAAKC,MAAU,CAAC,uBAAuB,CAAC,WAAW,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,KAAK,GAAG,CAAC,WAAW,EAAE,KAAK,KAAKC,OAAW,CAAC,uBAAuB,CAAC,WAAW,CAAC,CAAC,OAAO,EAAE,KAAK;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"CanceledError.mjs","sources":["../../../../src/errors/CanceledError.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;AAKA;;;;AAIG;AACG,MAAO,aAAc,SAAQ,YAAY,CAAA;AAC9C,IAAA,WAAA,CAAY,SAAsC,EAAE,EAAA;AACnD,QAAA,KAAK,CAAC;AACL,YAAA,IAAI,EAAE,eAAe;AACrB,YAAA,OAAO,EAAE,6BAA6B;AACtC,YAAA,GAAG,MAAM;AACT,SAAA,CAAC,CAAC;;AAGH,QAAA,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC;QACjC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;KACrD;AACD,CAAA;AAED;;;;;AAKG;AACU,MAAA,aAAa,GAAG,CAAC,KAAc,KAC3C,CAAC,CAAC,KAAK,IAAI,KAAK,YAAY;;;;"}
1
+ {"version":3,"file":"CanceledError.mjs","sources":["../../../src/errors/CanceledError.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { RestApiError } from './RestApiError';\n/**\n * Internal-only class for CanceledError.\n *\n * @internal\n */\nexport class CanceledError extends RestApiError {\n constructor(params = {}) {\n super({\n name: 'CanceledError',\n message: 'Request is canceled by user',\n ...params,\n });\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = CanceledError;\n Object.setPrototypeOf(this, CanceledError.prototype);\n }\n}\n/**\n * Check if an error is caused by user calling `cancel()` in REST API.\n *\n * @note This function works **ONLY** for errors thrown by REST API. For GraphQL APIs, use `client.isCancelError(error)`\n * instead. `client` is generated from `generateClient()` API from `aws-amplify/api`.\n */\nexport const isCancelError = (error) => !!error && error instanceof CanceledError;\n"],"names":[],"mappings":";;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACO,MAAM,aAAa,SAAS,YAAY,CAAC;AAChD,IAAI,WAAW,CAAC,MAAM,GAAG,EAAE,EAAE;AAC7B,QAAQ,KAAK,CAAC;AACd,YAAY,IAAI,EAAE,eAAe;AACjC,YAAY,OAAO,EAAE,6BAA6B;AAClD,YAAY,GAAG,MAAM;AACrB,SAAS,CAAC,CAAC;AACX;AACA,QAAQ,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC;AACzC,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;AAC7D,KAAK;AACL,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,aAAa,GAAG,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,IAAI,KAAK,YAAY;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"RestApiError.mjs","sources":["../../../../src/errors/RestApiError.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;AAIM,MAAO,YAAa,SAAQ,QAAQ,CAAA;AACzC,IAAA,WAAA,CAAY,MAAsB,EAAA;QACjC,KAAK,CAAC,MAAM,CAAC,CAAC;;AAGd,QAAA,IAAI,CAAC,WAAW,GAAG,YAAY,CAAC;QAChC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;KACpD;AACD;;;;"}
1
+ {"version":3,"file":"RestApiError.mjs","sources":["../../../src/errors/RestApiError.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ApiError } from '@aws-amplify/core/internals/utils';\nexport class RestApiError extends ApiError {\n constructor(params) {\n super(params);\n // TODO: Delete the following 2 lines after we change the build target to >= es2015\n this.constructor = RestApiError;\n Object.setPrototypeOf(this, RestApiError.prototype);\n }\n}\n"],"names":[],"mappings":";;AAAA;AACA;AAEO,MAAM,YAAY,SAAS,QAAQ,CAAC;AAC3C,IAAI,WAAW,CAAC,MAAM,EAAE;AACxB,QAAQ,KAAK,CAAC,MAAM,CAAC,CAAC;AACtB;AACA,QAAQ,IAAI,CAAC,WAAW,GAAG,YAAY,CAAC;AACxC,QAAQ,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;AAC5D,KAAK;AACL;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"assertValidatonError.mjs","sources":["../../../../src/errors/assertValidatonError.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAAA;AACA;AAKA;;AAEG;AACa,SAAA,qBAAqB,CACpC,SAAkB,EAClB,IAAgC,EAAA;IAEhC,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAEjE,IAAI,CAAC,SAAS,EAAE;QACf,MAAM,IAAI,YAAY,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC,CAAC;AAC9D,KAAA;AACF;;;;"}
1
+ {"version":3,"file":"assertValidatonError.mjs","sources":["../../../src/errors/assertValidatonError.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { RestApiError } from './RestApiError';\nimport { validationErrorMap } from './validation';\n/**\n * @internal\n */\nexport function assertValidationError(assertion, name) {\n const { message, recoverySuggestion } = validationErrorMap[name];\n if (!assertion) {\n throw new RestApiError({ name, message, recoverySuggestion });\n }\n}\n"],"names":[],"mappings":";;;AAAA;AACA;AAGA;AACA;AACA;AACO,SAAS,qBAAqB,CAAC,SAAS,EAAE,IAAI,EAAE;AACvD,IAAI,MAAM,EAAE,OAAO,EAAE,kBAAkB,EAAE,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC;AACrE,IAAI,IAAI,CAAC,SAAS,EAAE;AACpB,QAAQ,MAAM,IAAI,YAAY,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC,CAAC;AACtE,KAAK;AACL;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"validation.mjs","sources":["../../../../src/errors/validation.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;IAIY,2BAEX;AAFD,CAAA,UAAY,0BAA0B,EAAA;AACrC,IAAA,0BAAA,CAAA,gBAAA,CAAA,GAAA,gBAAiC,CAAA;AAClC,CAAC,EAFW,0BAA0B,KAA1B,0BAA0B,GAErC,EAAA,CAAA,CAAA,CAAA;AAEY,MAAA,kBAAkB,GAAgD;AAC9E,IAAA,CAAC,0BAA0B,CAAC,cAAc,GAAG;AAC5C,QAAA,OAAO,EAAE,sBAAsB;AAC/B,QAAA,kBAAkB,EACjB,iFAAiF;AAClF,KAAA;;;;;"}
1
+ {"version":3,"file":"validation.mjs","sources":["../../../src/errors/validation.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport var RestApiValidationErrorCode;\n(function (RestApiValidationErrorCode) {\n RestApiValidationErrorCode[\"InvalidApiName\"] = \"InvalidApiName\";\n})(RestApiValidationErrorCode || (RestApiValidationErrorCode = {}));\nexport const validationErrorMap = {\n [RestApiValidationErrorCode.InvalidApiName]: {\n message: 'API name is invalid.',\n recoverySuggestion: 'Check if the API name matches the one in your configuration or `aws-exports.js`',\n },\n};\n"],"names":[],"mappings":"AAAA;AACA;AACU,IAAC,2BAA2B;AACtC,CAAC,UAAU,0BAA0B,EAAE;AACvC,IAAI,0BAA0B,CAAC,gBAAgB,CAAC,GAAG,gBAAgB,CAAC;AACpE,CAAC,EAAE,0BAA0B,KAAK,0BAA0B,GAAG,EAAE,CAAC,CAAC,CAAC;AACxD,MAAC,kBAAkB,GAAG;AAClC,IAAI,CAAC,0BAA0B,CAAC,cAAc,GAAG;AACjD,QAAQ,OAAO,EAAE,sBAAsB;AACvC,QAAQ,kBAAkB,EAAE,iFAAiF;AAC7G,KAAK;AACL;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../src/internals/index.ts"],"sourcesContent":[null],"names":["internalPost"],"mappings":";;;;AAAA;AACA;AAMA;;;;;;;;;;;;;;;AAeG;AACU,MAAA,IAAI,GAAG,CAAC,KAAwB,KAAI;AAChD,IAAA,OAAOA,MAAY,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AACrC;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../src/internals/index.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { Amplify } from '@aws-amplify/core';\nimport { post as internalPost } from '../apis/common/internalPost';\n/**\n * Internal-only REST POST handler to send GraphQL request to given endpoint. By default, it will use IAM to authorize\n * the request. In some auth modes, the IAM auth has to be disabled. Here's how to set up the request auth correctly:\n * * If auth mode is 'iam', you MUST NOT set 'authorization' header and 'x-api-key' header, since it would disable IAM\n * auth. You MUST also set 'input.options.signingServiceInfo' option.\n * * The including 'input.options.signingServiceInfo.service' and 'input.options.signingServiceInfo.region' are\n * optional. If omitted, the signing service and region will be inferred from url.\n * * If auth mode is 'none', you MUST NOT set 'options.signingServiceInfo' option.\n * * If auth mode is 'apiKey', you MUST set 'x-api-key' custom header.\n * * If auth mode is 'oidc' or 'lambda' or 'userPool', you MUST set 'authorization' header.\n *\n * To make the internal post cancellable, you must also call `updateRequestToBeCancellable()` with the promise from\n * internal post call and the abort controller supplied to the internal post call.\n *\n * @internal\n */\nexport const post = (input) => {\n return internalPost(Amplify, input);\n};\nexport { cancel, updateRequestToBeCancellable, } from '../apis/common/internalPost';\n"],"names":["internalPost"],"mappings":";;;;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,IAAI,GAAG,CAAC,KAAK,KAAK;AAC/B,IAAI,OAAOA,MAAY,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AACxC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"server.mjs","sources":["../../../../src/internals/server.ts"],"sourcesContent":[null],"names":["internalPost"],"mappings":";;;;AAAA;AACA;AASA;;;;;;;;;;;;;;;AAeG;MACU,IAAI,GAAG,CACnB,WAAsC,EACtC,KAAwB,KACrB;IACH,OAAOA,MAAY,CAAC,uBAAuB,CAAC,WAAW,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AAC1E;;;;"}
1
+ {"version":3,"file":"server.mjs","sources":["../../../src/internals/server.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { getAmplifyServerContext, } from '@aws-amplify/core/internals/adapter-core';\nimport { post as internalPost } from '../apis/common/internalPost';\n/**\n * Internal-only REST POST handler to send GraphQL request to given endpoint. By default, it will use IAM to authorize\n * the request. In some auth modes, the IAM auth has to be disabled. Here's how to set up the request auth correctly:\n * * If auth mode is 'iam', you MUST NOT set 'authorization' header and 'x-api-key' header, since it would disable IAM\n * auth. You MUST also set 'input.options.signingServiceInfo' option.\n * * The including 'input.options.signingServiceInfo.service' and 'input.options.signingServiceInfo.region' are\n * optional. If omitted, the signing service and region will be inferred from url.\n * * If auth mode is 'none', you MUST NOT set 'options.signingServiceInfo' option.\n * * If auth mode is 'apiKey', you MUST set 'x-api-key' custom header.\n * * If auth mode is 'oidc' or 'lambda' or 'userPool', you MUST set 'authorization' header.\n *\n * To make the internal post cancellable, you must also call `updateRequestToBeCancellable()` with the promise from\n * internal post call and the abort controller supplied to the internal post call.\n *\n * @internal\n */\nexport const post = (contextSpec, input) => {\n return internalPost(getAmplifyServerContext(contextSpec).amplify, input);\n};\nexport { cancel, updateRequestToBeCancellable, } from '../apis/common/internalPost';\n"],"names":["internalPost"],"mappings":";;;;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,IAAI,GAAG,CAAC,WAAW,EAAE,KAAK,KAAK;AAC5C,IAAI,OAAOA,MAAY,CAAC,uBAAuB,CAAC,WAAW,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AAC7E;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"constants.mjs","sources":["../../../../src/utils/constants.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;AACA;AAEO,MAAM,gCAAgC,GAAG,cAAc;AAEvD,MAAM,2BAA2B,GAAG,cAAc;AAElD,MAAM,0BAA0B,GAAG,YAAY;AAEtD;;;AAGG;AACI,MAAM,qBAAqB,GACjC;;;;"}
1
+ {"version":3,"file":"constants.mjs","sources":["../../../src/utils/constants.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport const DEFAULT_REST_IAM_SIGNING_SERVICE = 'execute-api';\nexport const DEFAULT_APPSYNC_API_SERVICE = 'appsync-api';\nexport const DEFAULT_IAM_SIGNING_REGION = 'us-east-1';\n/**\n * The REST endpoints generated by API Gateway\n * @see {@link https://docs.aws.amazon.com/general/latest/gr/apigateway.html#apigateway_region_data_plane}\n */\nexport const APIG_HOSTNAME_PATTERN = /^.+\\.([a-z0-9-]+)\\.([a-z0-9-]+)\\.amazonaws\\.com/;\n"],"names":[],"mappings":"AAAA;AACA;AACY,MAAC,gCAAgC,GAAG,cAAc;AAClD,MAAC,2BAA2B,GAAG,cAAc;AAC7C,MAAC,0BAA0B,GAAG,YAAY;AACtD;AACA;AACA;AACA;AACY,MAAC,qBAAqB,GAAG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"createCancellableOperation.mjs","sources":["../../../../src/utils/createCancellableOperation.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;AAAA;AACA;AAyBA;;AAEG;AACa,SAAA,0BAA0B,CACzC,OAEgC,EAChC,eAAiC,EAAA;IAEjC,MAAM,cAAc,GAAG,CACtB,OAEgC,KACY,CAAC,CAAC,eAAe,CAAC;;;;AAK/D,IAAA,MAAM,yBAAyB,GAAG,IAAI,eAAe,EAAE,CAAC;AACxD,IAAA,MAAM,qBAAqB,GAAG,yBAAyB,CAAC,MAAM,CAAC;AAC/D,IAAA,MAAM,uBAAuB,GAAG,eAAe,EAAE,MAAM,CAAC;AACxD,IAAA,IAAI,WAAmB,CAAC;AAExB,IAAA,MAAM,GAAG,GAAG,YAAW;QACtB,IAAI;AACH,YAAA,MAAM,QAAQ,GAAG,OAAO,cAAc,CAAC,OAAO,CAAC;kBAC5C,OAAO,EAAE;AACX,k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AAC;QACF,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE,MAAM,EAAE,CAAC;AACnC,KAAA;AACF;;;;"}
1
+ {"version":3,"file":"createCancellableOperation.mjs","sources":["../../../src/utils/createCancellableOperation.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { CanceledError } from '../errors';\nimport { parseRestApiServiceError } from './serviceError';\nimport { logger } from './logger';\n/**\n * @internal\n */\nexport function createCancellableOperation(handler, abortController) {\n const isInternalPost = (handler) => !!abortController;\n // For creating a cancellable operation for public REST APIs, we need to create an AbortController\n // internally. Whereas for internal POST APIs, we need to accept in the AbortController from the\n // callers.\n const publicApisAbortController = new AbortController();\n const publicApisAbortSignal = publicApisAbortController.signal;\n const internalPostAbortSignal = abortController?.signal;\n let abortReason;\n const job = async () => {\n try {\n const response = await (isInternalPost(handler)\n ? handler()\n : handler(publicApisAbortSignal));\n if (response.statusCode >= 300) {\n throw await parseRestApiServiceError(response);\n }\n return response;\n }\n catch (error) {\n const abortSignal = internalPostAbortSignal ?? publicApisAbortSignal;\n const message = abortReason ?? abortSignal.reason;\n if (error.name === 'AbortError' || abortSignal?.aborted === true) {\n const canceledError = new CanceledError({\n ...(message && { message }),\n underlyingError: error,\n });\n logger.debug(error);\n throw canceledError;\n }\n logger.debug(error);\n throw error;\n }\n };\n if (isInternalPost(handler)) {\n return job();\n }\n else {\n const cancel = (abortMessage) => {\n if (publicApisAbortSignal.aborted === true) {\n return;\n }\n publicApisAbortController.abort(abortMessage);\n // If abort reason is not supported, set a scoped reasons instead. The reason property inside an\n // AbortSignal is a readonly property and trying to set it would throw an error.\n if (abortMessage && publicApisAbortSignal.reason !== abortMessage) {\n abortReason = abortMessage;\n }\n };\n return { response: job(), cancel };\n }\n}\n"],"names":[],"mappings":";;;;;;AAAA;AACA;AAIA;AACA;AACA;AACO,SAAS,0BAA0B,CAAC,OAAO,EAAE,eAAe,EAAE;A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C,YAAY,MAAM,KAAK,CAAC;AACxB,SAAS;AACT,KAAK,CAAC;AACN,IAAI,IAAI,cAAc,CAAQ,CAAC,EAAE;AACjC,QAAQ,OAAO,GAAG,EAAE,CAAC;AACrB,KAAK;AACL,SAAS;AACT,QAAQ,MAAM,MAAM,GAAG,CAAC,YAAY,KAAK;AACzC,YAAY,IAAI,qBAAqB,CAAC,OAAO,KAAK,IAAI,EAAE;AACxD,gBAAgB,OAAO;AACvB,aAAa;AACb,YAAY,yBAAyB,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;AAC1D;AACA;AACA,YAAY,IAAI,YAAY,IAAI,qBAAqB,CAAC,MAAM,KAAK,YAAY,EAAE;AAC/E,gBAAgB,WAAW,GAAG,YAAY,CAAC;AAC3C,aAAa;AACb,SAAS,CAAC;AACV,QAAQ,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE,MAAM,EAAE,CAAC;AAC3C,KAAK;AACL;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"logger.mjs","sources":["../../../../src/utils/logger.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;MAIa,MAAM,GAAG,IAAI,aAAa,CAAC,UAAU;;;;"}
1
+ {"version":3,"file":"logger.mjs","sources":["../../../src/utils/logger.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ConsoleLogger } from '@aws-amplify/core';\nexport const logger = new ConsoleLogger('RestApis');\n"],"names":[],"mappings":";;AAAA;AACA;AAEY,MAAC,MAAM,GAAG,IAAI,aAAa,CAAC,UAAU;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"parseSigningInfo.mjs","sources":["../../../../src/utils/parseSigningInfo.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;AACA;AASA;;;;;AAKG;MACU,gBAAgB,GAAG,CAC/B,GAAQ,EACR,cAGC,KACE;AACH,IAAA,MAAM,EACL,OAAO,EAAE,cAAc,GAAG,gCAAgC,EAC1D,MAAM,EAAE,aAAa,GAAG,0BAA0B,GAClD,GACA,cAAc,EAAE,OAAO,CAAC,SAAS,EAAE,EAAE,GAAG,EAAE,IAAI,GAAG,cAAc,EAAE,OAAO,CAAC;AACzE,QAAA,EAAE,CAAC;AACJ,IAAA,MAAM,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC;AACzB,IAAA,MAAM,GAAG,OAAO,EAAE,MAAM,CAAC,GAAG,qBAAqB,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;IACvE,IAAI,OAAO,KAAK,gCAAgC,EAAE;;;QAGjD,OAAO;YACN,OAAO;YACP,MAAM,EAAE,MAAM,IAAI,aAAa;SAC/B,CAAC;AACF,KAAA;SAAM,IAAI,OAAO,KAAK,aAAa,EAAE;;;QAGrC,OAAO;AACN,YAAA,OAAO,EAAE,SAAS;YAClB,MAAM,EAAE,MAAM,IAAI,aAAa;SAC/B,CAAC;AACF,KAAA;AAAM,SAAA;QACN,OAAO;AACN,YAAA,OAAO,EAAE,cAAc;AACvB,YAAA,MAAM,EAAE,aAAa;SACrB,CAAC;AACF,KAAA;AACF;;;;"}
1
+ {"version":3,"file":"parseSigningInfo.mjs","sources":["../../../src/utils/parseSigningInfo.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { APIG_HOSTNAME_PATTERN, DEFAULT_IAM_SIGNING_REGION, DEFAULT_REST_IAM_SIGNING_SERVICE, } from './constants';\n/**\n * Infer the signing service and region from the given URL, and for REST API only, from the Amplify configuration.\n * It supports raw API Gateway endpoint and AppSync endpoint.\n *\n * @internal\n */\nexport const parseSigningInfo = (url, restApiOptions) => {\n const { service: signingService = DEFAULT_REST_IAM_SIGNING_SERVICE, region: signingRegion = DEFAULT_IAM_SIGNING_REGION, } = restApiOptions?.amplify.getConfig()?.API?.REST?.[restApiOptions?.apiName] ??\n {};\n const { hostname } = url;\n const [, service, region] = APIG_HOSTNAME_PATTERN.exec(hostname) ?? [];\n if (service === DEFAULT_REST_IAM_SIGNING_SERVICE) {\n // The configured endpoint is an API Gateway endpoint\n // @see: https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-call-api.html\n return {\n service,\n region: region ?? signingRegion,\n };\n }\n else if (service === 'appsync-api') {\n // AppSync endpoint is internally supported because GraphQL operation will send request using POST handler.\n // example: https://xxxx.appsync-api.us-east-1.amazonaws.com/graphql\n return {\n service: 'appsync',\n region: region ?? signingRegion,\n };\n }\n else {\n return {\n service: signingService,\n region: signingRegion,\n };\n }\n};\n"],"names":[],"mappings":";;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,gBAAgB,GAAG,CAAC,GAAG,EAAE,cAAc,KAAK;AACzD,IAAI,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,gCAAgC,EAAE,MAAM,EAAE,aAAa,GAAG,0BAA0B,GAAG,GAAG,cAAc,EAAE,OAAO,CAAC,SAAS,EAAE,EAAE,GAAG,EAAE,IAAI,GAAG,cAAc,EAAE,OAAO,CAAC;AACzM,QAAQ,EAAE,CAAC;AACX,IAAI,MAAM,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC;AAC7B,IAAI,MAAM,GAAG,OAAO,EAAE,MAAM,CAAC,GAAG,qBAAqB,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;AAC3E,IAAI,IAAI,OAAO,KAAK,gCAAgC,EAAE;AACtD;AACA;AACA,QAAQ,OAAO;AACf,YAAY,OAAO;AACnB,YAAY,MAAM,EAAE,MAAM,IAAI,aAAa;AAC3C,SAAS,CAAC;AACV,KAAK;AACL,SAAS,IAAI,OAAO,KAAK,aAAa,EAAE;AACxC;AACA;AACA,QAAQ,OAAO;AACf,YAAY,OAAO,EAAE,SAAS;AAC9B,YAAY,MAAM,EAAE,MAAM,IAAI,aAAa;AAC3C,SAAS,CAAC;AACV,KAAK;AACL,S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,kBAAkB,EAAE,CAAqE,kEAAA,EAAA,MAAM,CAAE,CAAA;AACjG,SAAA,CAAC,CAAC;AACH,KAAA;AACF;;;;"}
1
+ {"version":3,"file":"resolveApiUrl.mjs","sources":["../../../src/utils/resolveApiUrl.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { AmplifyUrl, AmplifyUrlSearchParams, } from '@aws-amplify/core/internals/utils';\nimport { RestApiError, RestApiValidationErrorCode, assertValidationError, validationErrorMap, } from '../errors';\n/**\n * Resolve the REST API request URL by:\n * 1. Loading the REST API endpoint from the Amplify configuration with corresponding API name.\n * 2. Appending the path to the endpoint.\n * 3. Merge the query parameters from path and the queryParameter argument which is taken from the public REST API\n * options.\n * 4. Validating the resulting URL string.\n *\n * @internal\n */\nexport const resolveApiUrl = (amplify, apiName, path, queryParams) => {\n const urlStr = amplify.getConfig()?.API?.REST?.[apiName]?.endpoint;\n assertValidationError(!!urlStr, RestApiValidationErrorCode.InvalidApiName);\n try {\n const url = new AmplifyUrl(urlStr + path);\n if (queryParams) {\n const mergedQueryParams = new AmplifyUrlSearchParams(url.searchParams);\n Object.entries(queryParams).forEach(([key, value]) => {\n mergedQueryParams.set(key, value);\n });\n url.search = new AmplifyUrlSearchParams(mergedQueryParams).toString();\n }\n return url;\n }\n catch (error) {\n throw new RestApiError({\n name: RestApiValidationErrorCode.InvalidApiName,\n ...validationErrorMap[RestApiValidationErrorCode.InvalidApiName],\n recoverySuggestion: `Please make sure the REST endpoint URL is a valid URL string. Got ${urlStr}`,\n });\n }\n};\n"],"names":[],"mappings":";;;;;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,aAAa,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,KAAK;AACtE,IAAI,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,EAAE,GAAG,EAAE,I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BAAiB,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;AACpD,KAAA;AACD,IAAA,IAAI,IAAI,EAAE;AACT,QAAA,iBAAiB,CAAC,cAAc,CAAC,GAAG,iCAAiC,CAAC;QACtE,IAAI,IAAI,YAAY,QAAQ,EAAE;AAC7B;;;;;AAKG;AACH,YAAA,OAAO,iBAAiB,CAAC,cAAc,CAAC,CAAC;AACzC,SAAA;AACD,KAAA;AACD,IAAA,OAAO,iBAAiB,CAAC;AAC1B;;;;"}
1
+ {"version":3,"file":"resolveHeaders.mjs","sources":["../../../src/utils/resolveHeaders.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nexport const resolveHeaders = (headers, body) => {\n const normalizedHeaders = {};\n const isFormData = body instanceof FormData;\n for (const key in headers) {\n normalizedHeaders[key.toLowerCase()] = headers[key];\n }\n if (body) {\n normalizedHeaders['content-type'] = 'application/json; charset=UTF-8';\n if (body instanceof FormData) {\n /**\n * If body is a FormData we should not allow setting content-type.\n * It's because runtime HTTP handlers(xhr, fetch, undici, node-fetch,\n * etc.) will modify the content-type value when setting multipart\n * boundary.\n */\n delete normalizedHeaders['content-type'];\n }\n }\n return normalizedHeaders;\n};\n"],"names":[],"mappings":"AAAA;AACA;AACY,MAAC,cAAc,GAAG,CAAC,OAAO,EAAE,IAAI,KAAK;AACjD,IAAI,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAEjC,IAAI,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE;AAC/B,QAAQ,iBAAiB,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;AAC5D,KAAK;AACL,IAAI,IAAI,IAAI,EAAE;AACd,QAAQ,iBAAiB,CAAC,cAAc,CAAC,GAAG,iCAAiC,CAAC;AAC9E,QAAQ,IAAI,IAAI,YAAY,QAAQ,EAAE;AACtC;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO,iBAAiB,CAAC,cAAc,CAAC,CAAC;AACrD,SAAS;AACT,KAAK;AACL,IAAI,OAAO,iBAAiB,CAAC;AAC7B;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"serviceError.mjs","sources":["../../../../src/utils/serviceError.ts"],"sourcesContent":[null],"names":["parseAwsJsonError"],"mappings":";;;;AAWA;;;;;;;;AAQG;MACU,wBAAwB,GAAG,OACvC,QAAuB,KACkC;IACzD,IAAI,CAAC,QAAQ,EAAE;;QAEd,OAAO;AACP,KAAA;IACD,MAAM,cAAc,GAAG,MAAMA,cAAiB,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC5E,IAAI,CAAC,cAAc,EAAE;;QAEpB,OAAO;AACP,KAAA;AAAM,SAAA;QACN,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC;QAC7C,OAAO,iBAAiB,CAAC,cAAc,EAAE;YACxC,UAAU,EAAE,QAAQ,CAAC,UAAU;YAC/B,OAAO,EAAE,QAAQ,CAAC,OAAO;AACzB,YAAA,IAAI,EAAE,QAAQ;AACd,SAAA,CAAC,CAAC;AACH,KAAA;AACF,EAAE;AAEF;;;;;AAKG;AACH,MAAM,iBAAiB,GAAG,CAAC,QAAsB,KAAkB;IAClE,IAAI,eAAe,GAAgC,SAAS,CAAC;IAC7D,MAAM,SAAS,GAAG,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE;AAC1C,QAAA,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAA;YACzB,IAAI,IAAI,KAAK,MAAM,EAAE;;gBAEpB,OAAO,YAAW;oBACjB,IAAI,CAAC,eAAe,EAAE;AACrB,wBAAA,eAAe,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;AAChC,qBAAA;oBACD,IAAI;AACH,wBAAA,OAAO,IAAI,CAAC,KAAK,CAA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AAE,CAAC,CAAC;AACpE,CAAC;;;;"}
1
+ {"version":3,"file":"serviceError.mjs","sources":["../../../src/utils/serviceError.ts"],"sourcesContent":["import { parseJsonError as parseAwsJsonError, } from '@aws-amplify/core/internals/aws-client-utils';\nimport { RestApiError } from '../errors';\n/**\n * Parses both AWS and non-AWS error responses coming from the users' backend code.\n * * AWS errors generated by the AWS services(e.g. API Gateway, Bedrock). They can be Signature errors,\n * ClockSkew errors, etc. These responses will be parsed to errors with proper name and message from the AWS\n * services.\n * * non-AWS errors thrown by the user code. They can contain any headers or body. Users need to access the\n * error.response to get the headers and body and parse them accordingly. The JS error name and message will\n * be `UnknownError` and `Unknown error` respectively.\n */\nexport const parseRestApiServiceError = async (response) => {\n if (!response) {\n // Response is not considered an error.\n return;\n }\n const parsedAwsError = await parseAwsJsonError(stubErrorResponse(response));\n if (!parsedAwsError) {\n // Response is not considered an error.\n return;\n }\n else {\n const bodyText = await response.body?.text();\n return buildRestApiError(parsedAwsError, {\n statusCode: response.statusCode,\n headers: response.headers,\n body: bodyText,\n });\n }\n};\n/**\n * The response object needs to be stub here because the parseAwsJsonError assumes the response body to be valid JSON.\n * Although this is true for AWS services, it is not true for responses from user's code. Once the response body is\n * unwrapped as JSON(and fail), it cannot be read as text again. Therefore, we need to stub the response body here to\n * make sure we can read the error response body as a JSON, and may fall back to read as text if it is not a valid JSON.\n */\nconst stubErrorResponse = (response) => {\n let bodyTextPromise = undefined;\n const bodyProxy = new Proxy(response.body, {\n get(target, prop, receiver) {\n if (prop === 'json') {\n // For potential AWS errors, error parser will try to parse the body as JSON first.\n return async () => {\n if (!bodyTextPromise) {\n bodyTextPromise = target.text();\n }\n try {\n return JSON.parse(await bodyTextPromise);\n }\n catch (error) {\n // If response body is not a valid JSON, we stub it to be an empty object and eventually parsed\n // as an unknown error\n return {};\n }\n };\n }\n else if (prop === 'text') {\n // For non-AWS errors, users can access the body as a string as a fallback.\n return async () => {\n if (!bodyTextPromise) {\n bodyTextPromise = target.text();\n }\n return bodyTextPromise;\n };\n }\n else {\n return Reflect.get(target, prop, receiver);\n }\n },\n });\n const responseProxy = new Proxy(response, {\n get(target, prop, receiver) {\n if (prop === 'body') {\n return bodyProxy;\n }\n else {\n return Reflect.get(target, prop, receiver);\n }\n },\n });\n return responseProxy;\n};\n/**\n * Utility to create a new RestApiError from a service error.\n */\nconst buildRestApiError = (error, response) => {\n const restApiError = new RestApiError({\n name: error?.name,\n message: error.message,\n underlyingError: error,\n response,\n });\n // $metadata is only required for backwards compatibility.\n return Object.assign(restApiError, { $metadata: error.$metadata });\n};\n"],"names":["parseAwsJsonError"],"mappings":";;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,wBAAwB,GAAG,OAAO,QAAQ,KAAK;AAC5D,IAAI,IAAI,CAAC,QAAQ,EAAE;AACnB;AACA,QAAQ,OAAO;AACf,KAAK;AACL,IAAI,MAAM,cAAc,GAAG,MAAMA,cAAiB,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,CAAC;AAChF,IAAI,IAAI,CAAC,cAAc,EAAE;AACzB;AACA,QAAQ,OAAO;AACf,KAAK;AACL,SAAS;AACT,QAAQ,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC;AACrD,QAAQ,OAAO,iBAAiB,CAAC,cAAc,EAAE;AACjD,YAAY,UAAU,EAAE,QAAQ,CAAC,UAAU;AAC3C,YAAY,OAAO,EAAE,QAAQ,CAAC,OAAO;AACrC,YAAY,IAAI,EAAE,QAAQ;AAC1B,SAAS,CAAC,CAAC;AACX,KAAK;AACL,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,iBAAiB,GAAG,CAAC,QAAQ,KAAK;AACxC,IAAI,IAAI,eAAe,GAAG,SAAS,CAAC;AACpC,IAAI,MAAM,SAAS,GAAG,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE;AAC/C,QAAQ,GAAG,CAAC,M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AACzB,CAAC,CAAC;AACF;AACA;AACA;AACA,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,QAAQ,KAAK;AAC/C,IAAI,MAAM,YAAY,GAAG,IAAI,YAAY,CAAC;AAC1C,QAAQ,IAAI,EAAE,KAAK,EAAE,IAAI;AACzB,QAAQ,OAAO,EAAE,KAAK,CAAC,OAAO;AAC9B,QAAQ,eAAe,EAAE,KAAK;AAC9B,QAAQ,QAAQ;AAChB,KAAK,CAAC,CAAC;AACP;AACA,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC;AACvE,CAAC;;;;"}
package/package.json CHANGED
@@ -1,101 +1,102 @@
1
1
  {
2
- "name": "@aws-amplify/api-rest",
3
- "private": false,
4
- "version": "4.0.14",
5
- "description": "Api-rest category of aws-amplify",
6
- "main": "./dist/cjs/index.js",
7
- "module": "./dist/esm/index.mjs",
8
- "typings": "./dist/esm/index.d.ts",
9
- "react-native": "./src/index.ts",
10
- "publishConfig": {
11
- "access": "public"
12
- },
13
- "scripts": {
14
- "test": "npm run lint && jest -w 1 --coverage --logHeapUsage",
15
- "test:watch": "tslint 'src/**/*.ts' && jest -w 1 --watch",
16
- "build-with-test": "npm test && npm build",
17
- "build:umd": "webpack && webpack --config ./webpack.config.dev.js",
18
- "build:esm-cjs": "rollup -c rollup.config.mjs",
19
- "build:watch": "npm run build:esm-cjs -- --watch",
20
- "build": "npm run clean && npm run build:esm-cjs && npm run build:umd",
21
- "clean": "npm run clean:size && rimraf dist lib lib-esm",
22
- "clean:size": "rimraf dual-publish-tmp tmp*",
23
- "format": "echo \"Not implemented\"",
24
- "lint": "tslint 'src/**/*.ts' && npm run ts-coverage",
25
- "ts-coverage": "typescript-coverage-report -p ./tsconfig.build.json -t 70.0"
26
- },
27
- "exports": {
28
- ".": {
29
- "types": "./dist/esm/index.d.ts",
30
- "import": "./dist/esm/index.mjs",
31
- "require": "./dist/cjs/index.js",
32
- "react-native": "./src/index.ts"
33
- },
34
- "./server": {
35
- "types": "./dist/esm/server.d.ts",
36
- "import": "./dist/esm/server.mjs",
37
- "require": "./dist/cjs/server.js"
38
- },
39
- "./internals": {
40
- "types": "./dist/esm/internals/index.d.ts",
41
- "import": "./dist/esm/internals/index.mjs",
42
- "require": "./dist/cjs/internals/index.js",
43
- "react-native": "./src/internals/index.ts"
44
- },
45
- "./internals/server": {
46
- "types": "./dist/esm/internals/server.d.ts",
47
- "import": "./dist/esm/internals/server.mjs",
48
- "require": "./dist/cjs/internals/server.js"
49
- },
50
- "./package.json": "./package.json"
51
- },
52
- "typesVersions": {
53
- ">=4.2": {
54
- "server": [
55
- "./dist/esm/server.d.ts"
56
- ],
57
- "internals": [
58
- "./dist/esm/internals/index.d.ts"
59
- ],
60
- "internals/server": [
61
- "./dist/esm/internals/server.d.ts"
62
- ]
63
- }
64
- },
65
- "repository": {
66
- "type": "git",
67
- "url": "https://github.com/aws-amplify/amplify-js.git"
68
- },
69
- "author": "Amazon Web Services",
70
- "license": "Apache-2.0",
71
- "bugs": {
72
- "url": "https://github.com/aws/aws-amplify/issues"
73
- },
74
- "homepage": "https://aws-amplify.github.io/",
75
- "files": [
76
- "dist/cjs",
77
- "dist/esm",
78
- "src",
79
- "internals",
80
- "server"
81
- ],
82
- "dependencies": {
83
- "tslib": "^2.5.0"
84
- },
85
- "peerDependencies": {
86
- "@aws-amplify/core": "^6.0.0"
87
- },
88
- "devDependencies": {
89
- "@aws-amplify/core": "6.0.14",
90
- "@aws-amplify/react-native": "1.0.14"
91
- },
92
- "size-limit": [
93
- {
94
- "name": "API (rest client)",
95
- "path": "./dist/esm/index.mjs",
96
- "import": "{ Amplify, RestAPI }",
97
- "limit": "31.5 kB"
98
- }
99
- ],
100
- "gitHead": "ac07014b8a5bbf12f6e9188a6eb2f3f29cc3880c"
2
+ "name": "@aws-amplify/api-rest",
3
+ "private": false,
4
+ "version": "4.0.15-node-20-action.f356afc.0+f356afc",
5
+ "description": "Api-rest category of aws-amplify",
6
+ "main": "./dist/cjs/index.js",
7
+ "module": "./dist/esm/index.mjs",
8
+ "typings": "./dist/esm/index.d.ts",
9
+ "react-native": "./src/index.ts",
10
+ "publishConfig": {
11
+ "access": "public"
12
+ },
13
+ "scripts": {
14
+ "test": "npm run lint && jest -w 1 --coverage --logHeapUsage",
15
+ "test:watch": "tslint 'src/**/*.ts' && jest -w 1 --watch",
16
+ "build-with-test": "npm test && npm build",
17
+ "build:umd": "webpack && webpack --config ./webpack.config.dev.js",
18
+ "build:esm-cjs": "rollup -c rollup.config.mjs",
19
+ "build:watch": "npm run build:esm-cjs -- --watch",
20
+ "build": "npm run clean && npm run build:esm-cjs && npm run build:umd",
21
+ "clean": "npm run clean:size && rimraf dist lib lib-esm",
22
+ "clean:size": "rimraf dual-publish-tmp tmp*",
23
+ "format": "echo \"Not implemented\"",
24
+ "lint": "tslint 'src/**/*.ts' && npm run ts-coverage",
25
+ "ts-coverage": "typescript-coverage-report -p ./tsconfig.build.json -t 70.0"
26
+ },
27
+ "exports": {
28
+ ".": {
29
+ "types": "./dist/esm/index.d.ts",
30
+ "import": "./dist/esm/index.mjs",
31
+ "require": "./dist/cjs/index.js",
32
+ "react-native": "./src/index.ts"
33
+ },
34
+ "./server": {
35
+ "types": "./dist/esm/server.d.ts",
36
+ "import": "./dist/esm/server.mjs",
37
+ "require": "./dist/cjs/server.js"
38
+ },
39
+ "./internals": {
40
+ "types": "./dist/esm/internals/index.d.ts",
41
+ "import": "./dist/esm/internals/index.mjs",
42
+ "require": "./dist/cjs/internals/index.js",
43
+ "react-native": "./src/internals/index.ts"
44
+ },
45
+ "./internals/server": {
46
+ "types": "./dist/esm/internals/server.d.ts",
47
+ "import": "./dist/esm/internals/server.mjs",
48
+ "require": "./dist/cjs/internals/server.js"
49
+ },
50
+ "./package.json": "./package.json"
51
+ },
52
+ "typesVersions": {
53
+ ">=4.2": {
54
+ "server": [
55
+ "./dist/esm/server.d.ts"
56
+ ],
57
+ "internals": [
58
+ "./dist/esm/internals/index.d.ts"
59
+ ],
60
+ "internals/server": [
61
+ "./dist/esm/internals/server.d.ts"
62
+ ]
63
+ }
64
+ },
65
+ "repository": {
66
+ "type": "git",
67
+ "url": "https://github.com/aws-amplify/amplify-js.git"
68
+ },
69
+ "author": "Amazon Web Services",
70
+ "license": "Apache-2.0",
71
+ "bugs": {
72
+ "url": "https://github.com/aws/aws-amplify/issues"
73
+ },
74
+ "homepage": "https://aws-amplify.github.io/",
75
+ "files": [
76
+ "dist/cjs",
77
+ "dist/esm",
78
+ "src",
79
+ "internals",
80
+ "server"
81
+ ],
82
+ "dependencies": {
83
+ "tslib": "^2.5.0"
84
+ },
85
+ "peerDependencies": {
86
+ "@aws-amplify/core": "6.0.15-node-20-action.f356afc.0+f356afc"
87
+ },
88
+ "devDependencies": {
89
+ "@aws-amplify/core": "6.0.15-node-20-action.f356afc.0+f356afc",
90
+ "@aws-amplify/react-native": "1.0.15-node-20-action.f356afc.0+f356afc",
91
+ "typescript": "5.0.2"
92
+ },
93
+ "size-limit": [
94
+ {
95
+ "name": "API (rest client)",
96
+ "path": "./dist/esm/index.mjs",
97
+ "import": "{ Amplify, RestAPI }",
98
+ "limit": "31.5 kB"
99
+ }
100
+ ],
101
+ "gitHead": "f356afc3f445230d0c79fe941266a27194358c15"
101
102
  }