pulse-ts-sdk 0.0.51 → 0.0.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/BaseClient.d.ts +39 -0
- package/dist/cjs/BaseClient.js +62 -0
- package/dist/cjs/Client.d.ts +57 -0
- package/dist/cjs/Client.js +189 -0
- package/dist/cjs/api/errors/BadRequestError.d.ts +5 -0
- package/dist/cjs/api/errors/BadRequestError.js +54 -0
- package/dist/cjs/api/errors/ForbiddenError.d.ts +5 -0
- package/dist/cjs/api/errors/ForbiddenError.js +54 -0
- package/dist/cjs/api/errors/InternalServerError.d.ts +5 -0
- package/dist/cjs/api/errors/InternalServerError.js +54 -0
- package/dist/cjs/api/errors/NotFoundError.d.ts +5 -0
- package/dist/cjs/api/errors/NotFoundError.js +54 -0
- package/dist/cjs/api/errors/TooManyRequestsError.d.ts +5 -0
- package/dist/cjs/api/errors/TooManyRequestsError.js +54 -0
- package/dist/cjs/api/errors/UnauthorizedError.d.ts +5 -0
- package/dist/cjs/api/errors/UnauthorizedError.js +54 -0
- package/dist/cjs/api/errors/index.d.ts +6 -0
- package/dist/cjs/api/errors/index.js +22 -0
- package/dist/cjs/api/index.d.ts +3 -0
- package/dist/cjs/api/index.js +19 -0
- package/dist/cjs/api/resources/index.d.ts +4 -0
- package/dist/cjs/api/resources/index.js +43 -0
- package/dist/cjs/api/resources/jobs/client/Client.d.ts +53 -0
- package/dist/cjs/api/resources/jobs/client/Client.js +185 -0
- package/dist/cjs/api/resources/jobs/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/jobs/client/index.js +17 -0
- package/dist/cjs/api/resources/jobs/client/requests/CancelJobRequest.d.ts +10 -0
- package/dist/cjs/api/resources/jobs/client/requests/CancelJobRequest.js +3 -0
- package/dist/cjs/api/resources/jobs/client/requests/GetJobRequest.d.ts +10 -0
- package/dist/cjs/api/resources/jobs/client/requests/GetJobRequest.js +3 -0
- package/dist/cjs/api/resources/jobs/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/jobs/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/jobs/index.d.ts +1 -0
- package/dist/cjs/api/resources/jobs/index.js +17 -0
- package/dist/cjs/api/resources/webhooks/client/Client.d.ts +26 -0
- package/dist/cjs/api/resources/webhooks/client/Client.js +108 -0
- package/dist/cjs/api/resources/webhooks/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/webhooks/client/index.js +2 -0
- package/dist/cjs/api/resources/webhooks/index.d.ts +2 -0
- package/dist/cjs/api/resources/webhooks/index.js +18 -0
- package/dist/cjs/api/resources/webhooks/types/CreateWebhookLinkResponse.d.ts +4 -0
- package/dist/cjs/api/resources/webhooks/types/CreateWebhookLinkResponse.js +3 -0
- package/dist/cjs/api/resources/webhooks/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/webhooks/types/index.js +17 -0
- package/dist/cjs/api/types/ExtractAsyncInput.d.ts +1 -0
- package/dist/cjs/api/types/ExtractAsyncInput.js +3 -0
- package/dist/cjs/api/types/ExtractAsyncResponse.d.ts +22 -0
- package/dist/cjs/api/types/ExtractAsyncResponse.js +15 -0
- package/dist/cjs/api/types/ExtractInput.d.ts +1 -0
- package/dist/cjs/api/types/ExtractInput.js +3 -0
- package/dist/cjs/api/types/ExtractJsonInput.d.ts +61 -0
- package/dist/cjs/api/types/ExtractJsonInput.js +3 -0
- package/dist/cjs/api/types/ExtractMultipartInput.d.ts +63 -0
- package/dist/cjs/api/types/ExtractMultipartInput.js +3 -0
- package/dist/cjs/api/types/ExtractOptions.d.ts +59 -0
- package/dist/cjs/api/types/ExtractOptions.js +3 -0
- package/dist/cjs/api/types/ExtractResponse.d.ts +17 -0
- package/dist/cjs/api/types/ExtractResponse.js +3 -0
- package/dist/cjs/api/types/JobCancellationResponse.d.ts +9 -0
- package/dist/cjs/api/types/JobCancellationResponse.js +3 -0
- package/dist/cjs/api/types/JobStatus.d.ts +9 -0
- package/dist/cjs/api/types/JobStatus.js +12 -0
- package/dist/cjs/api/types/JobStatusResponse.d.ts +17 -0
- package/dist/cjs/api/types/JobStatusResponse.js +3 -0
- package/dist/cjs/api/types/JsonSource.d.ts +7 -0
- package/dist/cjs/api/types/JsonSource.js +3 -0
- package/dist/cjs/api/types/MultipartSource.d.ts +9 -0
- package/dist/cjs/api/types/MultipartSource.js +3 -0
- package/dist/cjs/api/types/index.d.ts +12 -0
- package/dist/cjs/api/types/index.js +28 -0
- package/dist/cjs/auth/HeaderAuthProvider.d.ts +16 -0
- package/dist/cjs/auth/HeaderAuthProvider.js +71 -0
- package/dist/cjs/auth/index.d.ts +1 -0
- package/dist/cjs/auth/index.js +5 -0
- package/dist/cjs/core/auth/AuthProvider.d.ts +7 -0
- package/dist/cjs/core/auth/AuthProvider.js +2 -0
- package/dist/cjs/core/auth/AuthRequest.d.ts +9 -0
- package/dist/cjs/core/auth/AuthRequest.js +2 -0
- package/dist/cjs/core/auth/BasicAuth.d.ts +8 -0
- package/dist/cjs/core/auth/BasicAuth.js +27 -0
- package/dist/cjs/core/auth/BearerToken.d.ts +7 -0
- package/dist/cjs/core/auth/BearerToken.js +16 -0
- package/dist/cjs/core/auth/NoOpAuthProvider.d.ts +5 -0
- package/dist/cjs/core/auth/NoOpAuthProvider.js +9 -0
- package/dist/cjs/core/auth/index.d.ts +5 -0
- package/dist/cjs/core/auth/index.js +9 -0
- package/dist/cjs/core/base64.d.ts +2 -0
- package/dist/cjs/core/base64.js +26 -0
- package/dist/cjs/core/exports.d.ts +1 -0
- package/dist/cjs/core/exports.js +17 -0
- package/dist/cjs/core/fetcher/APIResponse.d.ts +20 -0
- package/dist/cjs/core/fetcher/APIResponse.js +2 -0
- package/dist/cjs/core/fetcher/BinaryResponse.d.ts +19 -0
- package/dist/cjs/core/fetcher/BinaryResponse.js +17 -0
- package/dist/cjs/core/fetcher/EndpointMetadata.d.ts +13 -0
- package/dist/cjs/core/fetcher/EndpointMetadata.js +2 -0
- package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +12 -0
- package/dist/cjs/core/fetcher/EndpointSupplier.js +22 -0
- package/dist/cjs/core/fetcher/Fetcher.d.ts +49 -0
- package/dist/cjs/core/fetcher/Fetcher.js +316 -0
- package/dist/cjs/core/fetcher/Headers.d.ts +2 -0
- package/dist/cjs/core/fetcher/Headers.js +84 -0
- package/dist/cjs/core/fetcher/HttpResponsePromise.d.ts +58 -0
- package/dist/cjs/core/fetcher/HttpResponsePromise.js +103 -0
- package/dist/cjs/core/fetcher/RawResponse.d.ts +29 -0
- package/dist/cjs/core/fetcher/RawResponse.js +44 -0
- package/dist/cjs/core/fetcher/Supplier.d.ts +4 -0
- package/dist/cjs/core/fetcher/Supplier.js +22 -0
- package/dist/cjs/core/fetcher/createRequestUrl.d.ts +1 -0
- package/dist/cjs/core/fetcher/createRequestUrl.js +8 -0
- package/dist/cjs/core/fetcher/getErrorResponseBody.d.ts +1 -0
- package/dist/cjs/core/fetcher/getErrorResponseBody.js +45 -0
- package/dist/cjs/core/fetcher/getFetchFn.d.ts +1 -0
- package/dist/cjs/core/fetcher/getFetchFn.js +17 -0
- package/dist/cjs/core/fetcher/getHeader.d.ts +1 -0
- package/dist/cjs/core/fetcher/getHeader.js +11 -0
- package/dist/cjs/core/fetcher/getRequestBody.d.ts +7 -0
- package/dist/cjs/core/fetcher/getRequestBody.js +27 -0
- package/dist/cjs/core/fetcher/getResponseBody.d.ts +1 -0
- package/dist/cjs/core/fetcher/getResponseBody.js +69 -0
- package/dist/cjs/core/fetcher/index.d.ts +11 -0
- package/dist/cjs/core/fetcher/index.js +17 -0
- package/dist/cjs/core/fetcher/makeRequest.d.ts +1 -0
- package/dist/cjs/core/fetcher/makeRequest.js +40 -0
- package/dist/cjs/core/fetcher/requestWithRetries.d.ts +1 -0
- package/dist/cjs/core/fetcher/requestWithRetries.js +67 -0
- package/dist/cjs/core/fetcher/signals.d.ts +5 -0
- package/dist/cjs/core/fetcher/signals.js +24 -0
- package/dist/cjs/core/headers.d.ts +2 -0
- package/dist/cjs/core/headers.js +31 -0
- package/dist/cjs/core/index.d.ts +6 -0
- package/dist/cjs/core/index.js +45 -0
- package/dist/cjs/core/json.d.ts +15 -0
- package/dist/cjs/core/json.js +24 -0
- package/dist/cjs/core/logging/exports.d.ts +18 -0
- package/dist/cjs/core/logging/exports.js +45 -0
- package/dist/cjs/core/logging/index.d.ts +1 -0
- package/dist/cjs/core/logging/index.js +17 -0
- package/dist/cjs/core/logging/logger.d.ts +126 -0
- package/dist/cjs/core/logging/logger.js +144 -0
- package/dist/cjs/core/runtime/index.d.ts +1 -0
- package/dist/cjs/core/runtime/index.js +5 -0
- package/dist/cjs/core/runtime/runtime.d.ts +9 -0
- package/dist/cjs/core/runtime/runtime.js +103 -0
- package/dist/cjs/core/url/encodePathParam.d.ts +1 -0
- package/dist/cjs/core/url/encodePathParam.js +21 -0
- package/dist/cjs/core/url/index.d.ts +3 -0
- package/dist/cjs/core/url/index.js +9 -0
- package/dist/cjs/core/url/join.d.ts +1 -0
- package/dist/cjs/core/url/join.js +68 -0
- package/dist/cjs/core/url/qs.d.ts +6 -0
- package/dist/cjs/core/url/qs.js +64 -0
- package/dist/cjs/environments.d.ts +4 -0
- package/dist/cjs/environments.js +7 -0
- package/dist/cjs/errors/PulseError.d.ts +12 -0
- package/dist/cjs/errors/PulseError.js +32 -0
- package/dist/cjs/errors/PulseTimeoutError.d.ts +3 -0
- package/dist/cjs/errors/PulseTimeoutError.js +15 -0
- package/dist/cjs/errors/handleNonStatusCodeError.d.ts +2 -0
- package/dist/cjs/errors/handleNonStatusCodeError.js +65 -0
- package/dist/cjs/errors/index.d.ts +2 -0
- package/dist/cjs/errors/index.js +7 -0
- package/dist/cjs/exports.d.ts +1 -0
- package/dist/cjs/exports.js +17 -0
- package/dist/cjs/index.d.ts +6 -0
- package/dist/cjs/index.js +48 -0
- package/dist/cjs/version.d.ts +1 -0
- package/dist/cjs/version.js +4 -0
- package/dist/esm/BaseClient.d.mts +39 -0
- package/dist/esm/BaseClient.mjs +25 -0
- package/dist/esm/Client.d.mts +57 -0
- package/dist/esm/Client.mjs +152 -0
- package/dist/esm/api/errors/BadRequestError.d.mts +5 -0
- package/dist/esm/api/errors/BadRequestError.mjs +17 -0
- package/dist/esm/api/errors/ForbiddenError.d.mts +5 -0
- package/dist/esm/api/errors/ForbiddenError.mjs +17 -0
- package/dist/esm/api/errors/InternalServerError.d.mts +5 -0
- package/dist/esm/api/errors/InternalServerError.mjs +17 -0
- package/dist/esm/api/errors/NotFoundError.d.mts +5 -0
- package/dist/esm/api/errors/NotFoundError.mjs +17 -0
- package/dist/esm/api/errors/TooManyRequestsError.d.mts +5 -0
- package/dist/esm/api/errors/TooManyRequestsError.mjs +17 -0
- package/dist/esm/api/errors/UnauthorizedError.d.mts +5 -0
- package/dist/esm/api/errors/UnauthorizedError.mjs +17 -0
- package/dist/esm/api/errors/index.d.mts +6 -0
- package/dist/esm/api/errors/index.mjs +6 -0
- package/dist/esm/api/index.d.mts +3 -0
- package/dist/esm/api/index.mjs +3 -0
- package/dist/esm/api/resources/index.d.mts +4 -0
- package/dist/esm/api/resources/index.mjs +4 -0
- package/dist/esm/api/resources/jobs/client/Client.d.mts +53 -0
- package/dist/esm/api/resources/jobs/client/Client.mjs +148 -0
- package/dist/esm/api/resources/jobs/client/index.d.mts +1 -0
- package/dist/esm/api/resources/jobs/client/index.mjs +1 -0
- package/dist/esm/api/resources/jobs/client/requests/CancelJobRequest.d.mts +10 -0
- package/dist/esm/api/resources/jobs/client/requests/CancelJobRequest.mjs +2 -0
- package/dist/esm/api/resources/jobs/client/requests/GetJobRequest.d.mts +10 -0
- package/dist/esm/api/resources/jobs/client/requests/GetJobRequest.mjs +2 -0
- package/dist/esm/api/resources/jobs/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/jobs/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/jobs/index.d.mts +1 -0
- package/dist/esm/api/resources/jobs/index.mjs +1 -0
- package/dist/esm/api/resources/webhooks/client/Client.d.mts +26 -0
- package/dist/esm/api/resources/webhooks/client/Client.mjs +71 -0
- package/dist/esm/api/resources/webhooks/client/index.d.mts +1 -0
- package/dist/esm/api/resources/webhooks/client/index.mjs +1 -0
- package/dist/esm/api/resources/webhooks/index.d.mts +2 -0
- package/dist/esm/api/resources/webhooks/index.mjs +2 -0
- package/dist/esm/api/resources/webhooks/types/CreateWebhookLinkResponse.d.mts +4 -0
- package/dist/esm/api/resources/webhooks/types/CreateWebhookLinkResponse.mjs +2 -0
- package/dist/esm/api/resources/webhooks/types/index.d.mts +1 -0
- package/dist/esm/api/resources/webhooks/types/index.mjs +1 -0
- package/dist/esm/api/types/ExtractAsyncInput.d.mts +1 -0
- package/dist/esm/api/types/ExtractAsyncInput.mjs +2 -0
- package/dist/esm/api/types/ExtractAsyncResponse.d.mts +22 -0
- package/dist/esm/api/types/ExtractAsyncResponse.mjs +12 -0
- package/dist/esm/api/types/ExtractInput.d.mts +1 -0
- package/dist/esm/api/types/ExtractInput.mjs +2 -0
- package/dist/esm/api/types/ExtractJsonInput.d.mts +61 -0
- package/dist/esm/api/types/ExtractJsonInput.mjs +2 -0
- package/dist/esm/api/types/ExtractMultipartInput.d.mts +63 -0
- package/dist/esm/api/types/ExtractMultipartInput.mjs +2 -0
- package/dist/esm/api/types/ExtractOptions.d.mts +59 -0
- package/dist/esm/api/types/ExtractOptions.mjs +2 -0
- package/dist/esm/api/types/ExtractResponse.d.mts +17 -0
- package/dist/esm/api/types/ExtractResponse.mjs +2 -0
- package/dist/esm/api/types/JobCancellationResponse.d.mts +9 -0
- package/dist/esm/api/types/JobCancellationResponse.mjs +2 -0
- package/dist/esm/api/types/JobStatus.d.mts +9 -0
- package/dist/esm/api/types/JobStatus.mjs +9 -0
- package/dist/esm/api/types/JobStatusResponse.d.mts +17 -0
- package/dist/esm/api/types/JobStatusResponse.mjs +2 -0
- package/dist/esm/api/types/JsonSource.d.mts +7 -0
- package/dist/esm/api/types/JsonSource.mjs +2 -0
- package/dist/esm/api/types/MultipartSource.d.mts +9 -0
- package/dist/esm/api/types/MultipartSource.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +12 -0
- package/dist/esm/api/types/index.mjs +12 -0
- package/dist/esm/auth/HeaderAuthProvider.d.mts +16 -0
- package/dist/esm/auth/HeaderAuthProvider.mjs +34 -0
- package/dist/esm/auth/index.d.mts +1 -0
- package/dist/esm/auth/index.mjs +1 -0
- package/dist/esm/core/auth/AuthProvider.d.mts +7 -0
- package/dist/esm/core/auth/AuthProvider.mjs +1 -0
- package/dist/esm/core/auth/AuthRequest.d.mts +9 -0
- package/dist/esm/core/auth/AuthRequest.mjs +1 -0
- package/dist/esm/core/auth/BasicAuth.d.mts +8 -0
- package/dist/esm/core/auth/BasicAuth.mjs +24 -0
- package/dist/esm/core/auth/BearerToken.d.mts +7 -0
- package/dist/esm/core/auth/BearerToken.mjs +13 -0
- package/dist/esm/core/auth/NoOpAuthProvider.d.mts +5 -0
- package/dist/esm/core/auth/NoOpAuthProvider.mjs +5 -0
- package/dist/esm/core/auth/index.d.mts +5 -0
- package/dist/esm/core/auth/index.mjs +3 -0
- package/dist/esm/core/base64.d.mts +2 -0
- package/dist/esm/core/base64.mjs +22 -0
- package/dist/esm/core/exports.d.mts +1 -0
- package/dist/esm/core/exports.mjs +1 -0
- package/dist/esm/core/fetcher/APIResponse.d.mts +20 -0
- package/dist/esm/core/fetcher/APIResponse.mjs +1 -0
- package/dist/esm/core/fetcher/BinaryResponse.d.mts +19 -0
- package/dist/esm/core/fetcher/BinaryResponse.mjs +14 -0
- package/dist/esm/core/fetcher/EndpointMetadata.d.mts +13 -0
- package/dist/esm/core/fetcher/EndpointMetadata.mjs +1 -0
- package/dist/esm/core/fetcher/EndpointSupplier.d.mts +12 -0
- package/dist/esm/core/fetcher/EndpointSupplier.mjs +19 -0
- package/dist/esm/core/fetcher/Fetcher.d.mts +49 -0
- package/dist/esm/core/fetcher/Fetcher.mjs +312 -0
- package/dist/esm/core/fetcher/Headers.d.mts +2 -0
- package/dist/esm/core/fetcher/Headers.mjs +82 -0
- package/dist/esm/core/fetcher/HttpResponsePromise.d.mts +58 -0
- package/dist/esm/core/fetcher/HttpResponsePromise.mjs +99 -0
- package/dist/esm/core/fetcher/RawResponse.d.mts +29 -0
- package/dist/esm/core/fetcher/RawResponse.mjs +40 -0
- package/dist/esm/core/fetcher/Supplier.d.mts +4 -0
- package/dist/esm/core/fetcher/Supplier.mjs +19 -0
- package/dist/esm/core/fetcher/createRequestUrl.d.mts +1 -0
- package/dist/esm/core/fetcher/createRequestUrl.mjs +5 -0
- package/dist/esm/core/fetcher/getErrorResponseBody.d.mts +1 -0
- package/dist/esm/core/fetcher/getErrorResponseBody.mjs +42 -0
- package/dist/esm/core/fetcher/getFetchFn.d.mts +1 -0
- package/dist/esm/core/fetcher/getFetchFn.mjs +14 -0
- package/dist/esm/core/fetcher/getHeader.d.mts +1 -0
- package/dist/esm/core/fetcher/getHeader.mjs +8 -0
- package/dist/esm/core/fetcher/getRequestBody.d.mts +7 -0
- package/dist/esm/core/fetcher/getRequestBody.mjs +24 -0
- package/dist/esm/core/fetcher/getResponseBody.d.mts +1 -0
- package/dist/esm/core/fetcher/getResponseBody.mjs +66 -0
- package/dist/esm/core/fetcher/index.d.mts +11 -0
- package/dist/esm/core/fetcher/index.mjs +6 -0
- package/dist/esm/core/fetcher/makeRequest.d.mts +1 -0
- package/dist/esm/core/fetcher/makeRequest.mjs +36 -0
- package/dist/esm/core/fetcher/requestWithRetries.d.mts +1 -0
- package/dist/esm/core/fetcher/requestWithRetries.mjs +64 -0
- package/dist/esm/core/fetcher/signals.d.mts +5 -0
- package/dist/esm/core/fetcher/signals.mjs +20 -0
- package/dist/esm/core/headers.d.mts +2 -0
- package/dist/esm/core/headers.mjs +27 -0
- package/dist/esm/core/index.d.mts +6 -0
- package/dist/esm/core/index.mjs +6 -0
- package/dist/esm/core/json.d.mts +15 -0
- package/dist/esm/core/json.mjs +19 -0
- package/dist/esm/core/logging/exports.d.mts +18 -0
- package/dist/esm/core/logging/exports.mjs +9 -0
- package/dist/esm/core/logging/index.d.mts +1 -0
- package/dist/esm/core/logging/index.mjs +1 -0
- package/dist/esm/core/logging/logger.d.mts +126 -0
- package/dist/esm/core/logging/logger.mjs +138 -0
- package/dist/esm/core/runtime/index.d.mts +1 -0
- package/dist/esm/core/runtime/index.mjs +1 -0
- package/dist/esm/core/runtime/runtime.d.mts +9 -0
- package/dist/esm/core/runtime/runtime.mjs +100 -0
- package/dist/esm/core/url/encodePathParam.d.mts +1 -0
- package/dist/esm/core/url/encodePathParam.mjs +18 -0
- package/dist/esm/core/url/index.d.mts +3 -0
- package/dist/esm/core/url/index.mjs +3 -0
- package/dist/esm/core/url/join.d.mts +1 -0
- package/dist/esm/core/url/join.mjs +65 -0
- package/dist/esm/core/url/qs.d.mts +6 -0
- package/dist/esm/core/url/qs.mjs +61 -0
- package/dist/esm/environments.d.mts +4 -0
- package/dist/esm/environments.mjs +4 -0
- package/dist/esm/errors/PulseError.d.mts +12 -0
- package/dist/esm/errors/PulseError.mjs +28 -0
- package/dist/esm/errors/PulseTimeoutError.d.mts +3 -0
- package/dist/esm/errors/PulseTimeoutError.mjs +11 -0
- package/dist/esm/errors/handleNonStatusCodeError.d.mts +2 -0
- package/dist/esm/errors/handleNonStatusCodeError.mjs +29 -0
- package/dist/esm/errors/index.d.mts +2 -0
- package/dist/esm/errors/index.mjs +2 -0
- package/dist/esm/exports.d.mts +1 -0
- package/dist/esm/exports.mjs +1 -0
- package/dist/esm/index.d.mts +6 -0
- package/dist/esm/index.mjs +5 -0
- package/dist/esm/version.d.mts +1 -0
- package/dist/esm/version.mjs +1 -0
- package/package.json +1 -1
- package/reference.md +6 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
|
|
2
|
+
import { type NormalizedClientOptions } from "../../../../BaseClient.mjs";
|
|
3
|
+
import * as core from "../../../../core/index.mjs";
|
|
4
|
+
import * as Pulse from "../../../index.mjs";
|
|
5
|
+
export declare namespace WebhooksClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class WebhooksClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptions<WebhooksClient.Options>;
|
|
12
|
+
constructor(options?: WebhooksClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Generates a temporary link to the Svix webhook portal where users can manage their webhook endpoints and view message logs.
|
|
15
|
+
*
|
|
16
|
+
* @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
17
|
+
*
|
|
18
|
+
* @throws {@link Pulse.UnauthorizedError}
|
|
19
|
+
* @throws {@link Pulse.InternalServerError}
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* await client.webhooks.createWebhookLink()
|
|
23
|
+
*/
|
|
24
|
+
createWebhookLink(requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<Pulse.CreateWebhookLinkResponse>;
|
|
25
|
+
private __createWebhookLink;
|
|
26
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
import { normalizeClientOptions } from "../../../../BaseClient.mjs";
|
|
12
|
+
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
13
|
+
import * as core from "../../../../core/index.mjs";
|
|
14
|
+
import * as environments from "../../../../environments.mjs";
|
|
15
|
+
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
16
|
+
import * as errors from "../../../../errors/index.mjs";
|
|
17
|
+
import * as Pulse from "../../../index.mjs";
|
|
18
|
+
export class WebhooksClient {
|
|
19
|
+
constructor(options = {}) {
|
|
20
|
+
this._options = normalizeClientOptions(options);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Generates a temporary link to the Svix webhook portal where users can manage their webhook endpoints and view message logs.
|
|
24
|
+
*
|
|
25
|
+
* @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
26
|
+
*
|
|
27
|
+
* @throws {@link Pulse.UnauthorizedError}
|
|
28
|
+
* @throws {@link Pulse.InternalServerError}
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* await client.webhooks.createWebhookLink()
|
|
32
|
+
*/
|
|
33
|
+
createWebhookLink(requestOptions) {
|
|
34
|
+
return core.HttpResponsePromise.fromPromise(this.__createWebhookLink(requestOptions));
|
|
35
|
+
}
|
|
36
|
+
__createWebhookLink(requestOptions) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
39
|
+
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
40
|
+
const _response = yield core.fetcher({
|
|
41
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PulseEnvironment.Default, "webhook"),
|
|
42
|
+
method: "POST",
|
|
43
|
+
headers: _headers,
|
|
44
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
45
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
46
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
47
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
48
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
49
|
+
logging: this._options.logging,
|
|
50
|
+
});
|
|
51
|
+
if (_response.ok) {
|
|
52
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
53
|
+
}
|
|
54
|
+
if (_response.error.reason === "status-code") {
|
|
55
|
+
switch (_response.error.statusCode) {
|
|
56
|
+
case 401:
|
|
57
|
+
throw new Pulse.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
58
|
+
case 500:
|
|
59
|
+
throw new Pulse.InternalServerError(_response.error.body, _response.rawResponse);
|
|
60
|
+
default:
|
|
61
|
+
throw new errors.PulseError({
|
|
62
|
+
statusCode: _response.error.statusCode,
|
|
63
|
+
body: _response.error.body,
|
|
64
|
+
rawResponse: _response.rawResponse,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/webhook");
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./CreateWebhookLinkResponse.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./CreateWebhookLinkResponse.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ExtractAsyncInput = unknown;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Metadata describing the enqueued asynchronous extraction job.
|
|
3
|
+
*/
|
|
4
|
+
export interface ExtractAsyncResponse {
|
|
5
|
+
/** Identifier assigned to the asynchronous extraction job. */
|
|
6
|
+
job_id: string;
|
|
7
|
+
/** Initial status reported by the extractor. */
|
|
8
|
+
status: ExtractAsyncResponse.Status;
|
|
9
|
+
/** Timestamp indicating when the job was accepted. */
|
|
10
|
+
queuedAt?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare namespace ExtractAsyncResponse {
|
|
13
|
+
/** Initial status reported by the extractor. */
|
|
14
|
+
const Status: {
|
|
15
|
+
readonly Pending: "pending";
|
|
16
|
+
readonly Processing: "processing";
|
|
17
|
+
readonly Completed: "completed";
|
|
18
|
+
readonly Failed: "failed";
|
|
19
|
+
readonly Canceled: "canceled";
|
|
20
|
+
};
|
|
21
|
+
type Status = (typeof Status)[keyof typeof Status];
|
|
22
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
export var ExtractAsyncResponse;
|
|
3
|
+
(function (ExtractAsyncResponse) {
|
|
4
|
+
/** Initial status reported by the extractor. */
|
|
5
|
+
ExtractAsyncResponse.Status = {
|
|
6
|
+
Pending: "pending",
|
|
7
|
+
Processing: "processing",
|
|
8
|
+
Completed: "completed",
|
|
9
|
+
Failed: "failed",
|
|
10
|
+
Canceled: "canceled",
|
|
11
|
+
};
|
|
12
|
+
})(ExtractAsyncResponse || (ExtractAsyncResponse = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ExtractInput = unknown;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Input schema for JSON requests (fileUrl only).
|
|
3
|
+
*/
|
|
4
|
+
export interface ExtractJsonInput {
|
|
5
|
+
/** Public or pre-signed URL that Pulse will download and extract. */
|
|
6
|
+
fileUrl: string;
|
|
7
|
+
/** Recommended method for schema-guided extraction. Contains the schema and optional prompt in a single object. */
|
|
8
|
+
structuredOutput?: ExtractJsonInput.StructuredOutput;
|
|
9
|
+
/** (Deprecated) JSON schema describing structured data to extract. Use structuredOutput instead. Accepts either a JSON object or a stringified JSON representation. */
|
|
10
|
+
schema?: ExtractJsonInput.Schema;
|
|
11
|
+
/** (Deprecated) Experimental schema definition used for feature flagged behaviour. Accepts either a JSON object or a stringified JSON representation. */
|
|
12
|
+
experimentalSchema?: ExtractJsonInput.ExperimentalSchema;
|
|
13
|
+
/** (Deprecated) Natural language prompt for schema-guided extraction. Use structuredOutput.schemaPrompt instead. */
|
|
14
|
+
schemaPrompt?: string;
|
|
15
|
+
/** (Deprecated) Custom instructions that augment the default extraction behaviour. */
|
|
16
|
+
customPrompt?: string;
|
|
17
|
+
/** Comma-separated list of chunking strategies to apply (for example `semantic,header,page,recursive`). */
|
|
18
|
+
chunking?: string;
|
|
19
|
+
/** Override for maximum characters per chunk when chunking is enabled. */
|
|
20
|
+
chunkSize?: number;
|
|
21
|
+
/** Page range filter supporting segments such as `1-2` or mixed ranges like `1-2,5`. */
|
|
22
|
+
pages?: string;
|
|
23
|
+
/** Toggle to enable figure extraction in results. */
|
|
24
|
+
extractFigure?: boolean;
|
|
25
|
+
/** Toggle to generate descriptive captions for extracted figures. */
|
|
26
|
+
figureDescription?: boolean;
|
|
27
|
+
/** Whether to include HTML representation alongside markdown in the response. */
|
|
28
|
+
returnHtml?: boolean;
|
|
29
|
+
/** (Deprecated) Enables expanded rationale output for debugging. */
|
|
30
|
+
thinking?: boolean;
|
|
31
|
+
/** Options for persisting extraction artifacts. When enabled (default), artifacts are saved to storage and a database record is created. */
|
|
32
|
+
storage?: ExtractJsonInput.Storage;
|
|
33
|
+
}
|
|
34
|
+
export declare namespace ExtractJsonInput {
|
|
35
|
+
/**
|
|
36
|
+
* Recommended method for schema-guided extraction. Contains the schema and optional prompt in a single object.
|
|
37
|
+
*/
|
|
38
|
+
interface StructuredOutput {
|
|
39
|
+
/** JSON schema describing the structured data to extract. */
|
|
40
|
+
schema?: Record<string, unknown>;
|
|
41
|
+
/** Natural language prompt with additional extraction instructions. */
|
|
42
|
+
schemaPrompt?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* (Deprecated) JSON schema describing structured data to extract. Use structuredOutput instead. Accepts either a JSON object or a stringified JSON representation.
|
|
46
|
+
*/
|
|
47
|
+
type Schema = Record<string, unknown> | string;
|
|
48
|
+
/**
|
|
49
|
+
* (Deprecated) Experimental schema definition used for feature flagged behaviour. Accepts either a JSON object or a stringified JSON representation.
|
|
50
|
+
*/
|
|
51
|
+
type ExperimentalSchema = Record<string, unknown> | string;
|
|
52
|
+
/**
|
|
53
|
+
* Options for persisting extraction artifacts. When enabled (default), artifacts are saved to storage and a database record is created.
|
|
54
|
+
*/
|
|
55
|
+
interface Storage {
|
|
56
|
+
/** Whether to persist extraction artifacts. Set to false for temporary extractions with no storage or database record. */
|
|
57
|
+
enabled?: boolean;
|
|
58
|
+
/** Target folder name to save the extraction to. Creates the folder if it doesn't exist. */
|
|
59
|
+
folderName?: string;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Input schema for multipart/form-data requests (file upload or fileUrl).
|
|
3
|
+
*/
|
|
4
|
+
export interface ExtractMultipartInput {
|
|
5
|
+
/** Document to upload directly. Required unless fileUrl is provided. */
|
|
6
|
+
file?: string;
|
|
7
|
+
/** Public or pre-signed URL that Pulse will download and extract. Required unless file is provided. */
|
|
8
|
+
fileUrl?: string;
|
|
9
|
+
/** Recommended method for schema-guided extraction. Contains the schema and optional prompt in a single object. */
|
|
10
|
+
structuredOutput?: ExtractMultipartInput.StructuredOutput;
|
|
11
|
+
/** (Deprecated) JSON schema describing structured data to extract. Use structuredOutput instead. Accepts either a JSON object or a stringified JSON representation. */
|
|
12
|
+
schema?: ExtractMultipartInput.Schema;
|
|
13
|
+
/** (Deprecated) Experimental schema definition used for feature flagged behaviour. Accepts either a JSON object or a stringified JSON representation. */
|
|
14
|
+
experimentalSchema?: ExtractMultipartInput.ExperimentalSchema;
|
|
15
|
+
/** (Deprecated) Natural language prompt for schema-guided extraction. Use structuredOutput.schemaPrompt instead. */
|
|
16
|
+
schemaPrompt?: string;
|
|
17
|
+
/** (Deprecated) Custom instructions that augment the default extraction behaviour. */
|
|
18
|
+
customPrompt?: string;
|
|
19
|
+
/** Comma-separated list of chunking strategies to apply (for example `semantic,header,page,recursive`). */
|
|
20
|
+
chunking?: string;
|
|
21
|
+
/** Override for maximum characters per chunk when chunking is enabled. */
|
|
22
|
+
chunkSize?: number;
|
|
23
|
+
/** Page range filter supporting segments such as `1-2` or mixed ranges like `1-2,5`. */
|
|
24
|
+
pages?: string;
|
|
25
|
+
/** Toggle to enable figure extraction in results. */
|
|
26
|
+
extractFigure?: boolean;
|
|
27
|
+
/** Toggle to generate descriptive captions for extracted figures. */
|
|
28
|
+
figureDescription?: boolean;
|
|
29
|
+
/** Whether to include HTML representation alongside markdown in the response. */
|
|
30
|
+
returnHtml?: boolean;
|
|
31
|
+
/** (Deprecated) Enables expanded rationale output for debugging. */
|
|
32
|
+
thinking?: boolean;
|
|
33
|
+
/** Options for persisting extraction artifacts. When enabled (default), artifacts are saved to storage and a database record is created. */
|
|
34
|
+
storage?: ExtractMultipartInput.Storage;
|
|
35
|
+
}
|
|
36
|
+
export declare namespace ExtractMultipartInput {
|
|
37
|
+
/**
|
|
38
|
+
* Recommended method for schema-guided extraction. Contains the schema and optional prompt in a single object.
|
|
39
|
+
*/
|
|
40
|
+
interface StructuredOutput {
|
|
41
|
+
/** JSON schema describing the structured data to extract. */
|
|
42
|
+
schema?: Record<string, unknown>;
|
|
43
|
+
/** Natural language prompt with additional extraction instructions. */
|
|
44
|
+
schemaPrompt?: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* (Deprecated) JSON schema describing structured data to extract. Use structuredOutput instead. Accepts either a JSON object or a stringified JSON representation.
|
|
48
|
+
*/
|
|
49
|
+
type Schema = Record<string, unknown> | string;
|
|
50
|
+
/**
|
|
51
|
+
* (Deprecated) Experimental schema definition used for feature flagged behaviour. Accepts either a JSON object or a stringified JSON representation.
|
|
52
|
+
*/
|
|
53
|
+
type ExperimentalSchema = Record<string, unknown> | string;
|
|
54
|
+
/**
|
|
55
|
+
* Options for persisting extraction artifacts. When enabled (default), artifacts are saved to storage and a database record is created.
|
|
56
|
+
*/
|
|
57
|
+
interface Storage {
|
|
58
|
+
/** Whether to persist extraction artifacts. Set to false for temporary extractions with no storage or database record. */
|
|
59
|
+
enabled?: boolean;
|
|
60
|
+
/** Target folder name to save the extraction to. Creates the folder if it doesn't exist. */
|
|
61
|
+
folderName?: string;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Common extraction options shared by synchronous and asynchronous endpoints.
|
|
3
|
+
*/
|
|
4
|
+
export interface ExtractOptions {
|
|
5
|
+
/** Recommended method for schema-guided extraction. Contains the schema and optional prompt in a single object. */
|
|
6
|
+
structuredOutput?: ExtractOptions.StructuredOutput;
|
|
7
|
+
/** (Deprecated) JSON schema describing structured data to extract. Use structuredOutput instead. Accepts either a JSON object or a stringified JSON representation. */
|
|
8
|
+
schema?: ExtractOptions.Schema;
|
|
9
|
+
/** (Deprecated) Experimental schema definition used for feature flagged behaviour. Accepts either a JSON object or a stringified JSON representation. */
|
|
10
|
+
experimentalSchema?: ExtractOptions.ExperimentalSchema;
|
|
11
|
+
/** (Deprecated) Natural language prompt for schema-guided extraction. Use structuredOutput.schemaPrompt instead. */
|
|
12
|
+
schemaPrompt?: string;
|
|
13
|
+
/** (Deprecated) Custom instructions that augment the default extraction behaviour. */
|
|
14
|
+
customPrompt?: string;
|
|
15
|
+
/** Comma-separated list of chunking strategies to apply (for example `semantic,header,page,recursive`). */
|
|
16
|
+
chunking?: string;
|
|
17
|
+
/** Override for maximum characters per chunk when chunking is enabled. */
|
|
18
|
+
chunkSize?: number;
|
|
19
|
+
/** Page range filter supporting segments such as `1-2` or mixed ranges like `1-2,5`. */
|
|
20
|
+
pages?: string;
|
|
21
|
+
/** Toggle to enable figure extraction in results. */
|
|
22
|
+
extractFigure?: boolean;
|
|
23
|
+
/** Toggle to generate descriptive captions for extracted figures. */
|
|
24
|
+
figureDescription?: boolean;
|
|
25
|
+
/** Whether to include HTML representation alongside markdown in the response. */
|
|
26
|
+
returnHtml?: boolean;
|
|
27
|
+
/** (Deprecated) Enables expanded rationale output for debugging. */
|
|
28
|
+
thinking?: boolean;
|
|
29
|
+
/** Options for persisting extraction artifacts. When enabled (default), artifacts are saved to storage and a database record is created. */
|
|
30
|
+
storage?: ExtractOptions.Storage;
|
|
31
|
+
}
|
|
32
|
+
export declare namespace ExtractOptions {
|
|
33
|
+
/**
|
|
34
|
+
* Recommended method for schema-guided extraction. Contains the schema and optional prompt in a single object.
|
|
35
|
+
*/
|
|
36
|
+
interface StructuredOutput {
|
|
37
|
+
/** JSON schema describing the structured data to extract. */
|
|
38
|
+
schema?: Record<string, unknown>;
|
|
39
|
+
/** Natural language prompt with additional extraction instructions. */
|
|
40
|
+
schemaPrompt?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* (Deprecated) JSON schema describing structured data to extract. Use structuredOutput instead. Accepts either a JSON object or a stringified JSON representation.
|
|
44
|
+
*/
|
|
45
|
+
type Schema = Record<string, unknown> | string;
|
|
46
|
+
/**
|
|
47
|
+
* (Deprecated) Experimental schema definition used for feature flagged behaviour. Accepts either a JSON object or a stringified JSON representation.
|
|
48
|
+
*/
|
|
49
|
+
type ExperimentalSchema = Record<string, unknown> | string;
|
|
50
|
+
/**
|
|
51
|
+
* Options for persisting extraction artifacts. When enabled (default), artifacts are saved to storage and a database record is created.
|
|
52
|
+
*/
|
|
53
|
+
interface Storage {
|
|
54
|
+
/** Whether to persist extraction artifacts. Set to false for temporary extractions with no storage or database record. */
|
|
55
|
+
enabled?: boolean;
|
|
56
|
+
/** Target folder name to save the extraction to. Creates the folder if it doesn't exist. */
|
|
57
|
+
folderName?: string;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* High-level structure returned by the synchronous extract API.
|
|
3
|
+
*/
|
|
4
|
+
export interface ExtractResponse {
|
|
5
|
+
/** Primary markdown content extracted from the document. */
|
|
6
|
+
content?: string;
|
|
7
|
+
/** Optional HTML representation when returnHtml is true. */
|
|
8
|
+
html?: string;
|
|
9
|
+
/** Identifier assigned to the extraction job. */
|
|
10
|
+
job_id?: string;
|
|
11
|
+
/** Non-fatal warnings generated during extraction. */
|
|
12
|
+
warnings?: string[];
|
|
13
|
+
/** Additional metadata supplied by the backend. */
|
|
14
|
+
metadata?: Record<string, unknown>;
|
|
15
|
+
/** Accepts any additional properties */
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Lifecycle status for an asynchronous extraction job. */
|
|
2
|
+
export declare const JobStatus: {
|
|
3
|
+
readonly Pending: "pending";
|
|
4
|
+
readonly Processing: "processing";
|
|
5
|
+
readonly Completed: "completed";
|
|
6
|
+
readonly Failed: "failed";
|
|
7
|
+
readonly Canceled: "canceled";
|
|
8
|
+
};
|
|
9
|
+
export type JobStatus = (typeof JobStatus)[keyof typeof JobStatus];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
/** Lifecycle status for an asynchronous extraction job. */
|
|
3
|
+
export const JobStatus = {
|
|
4
|
+
Pending: "pending",
|
|
5
|
+
Processing: "processing",
|
|
6
|
+
Completed: "completed",
|
|
7
|
+
Failed: "failed",
|
|
8
|
+
Canceled: "canceled",
|
|
9
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type * as Pulse from "../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Current status and metadata for an asynchronous extraction job.
|
|
4
|
+
*/
|
|
5
|
+
export interface JobStatusResponse {
|
|
6
|
+
/** Identifier assigned to the asynchronous extraction job. */
|
|
7
|
+
job_id: string;
|
|
8
|
+
status: Pulse.JobStatus;
|
|
9
|
+
/** Timestamp when the job was accepted. */
|
|
10
|
+
created_at: string;
|
|
11
|
+
/** Timestamp of the last status update, if available. */
|
|
12
|
+
updated_at?: string;
|
|
13
|
+
/** Structured payload that contains extraction output when the job is completed. */
|
|
14
|
+
result?: Record<string, unknown>;
|
|
15
|
+
/** Error message describing why the job failed, if applicable. */
|
|
16
|
+
error?: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Document source definition for multipart/form-data requests. Provide exactly one of `file` (direct upload) or `fileUrl` (remote URL).
|
|
3
|
+
*/
|
|
4
|
+
export interface MultipartSource {
|
|
5
|
+
/** Document to upload directly. Required unless fileUrl is provided. */
|
|
6
|
+
file?: string;
|
|
7
|
+
/** Public or pre-signed URL that Pulse will download and extract. Required unless file is provided. */
|
|
8
|
+
fileUrl?: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from "./ExtractAsyncInput.mjs";
|
|
2
|
+
export * from "./ExtractAsyncResponse.mjs";
|
|
3
|
+
export * from "./ExtractInput.mjs";
|
|
4
|
+
export * from "./ExtractJsonInput.mjs";
|
|
5
|
+
export * from "./ExtractMultipartInput.mjs";
|
|
6
|
+
export * from "./ExtractOptions.mjs";
|
|
7
|
+
export * from "./ExtractResponse.mjs";
|
|
8
|
+
export * from "./JobCancellationResponse.mjs";
|
|
9
|
+
export * from "./JobStatus.mjs";
|
|
10
|
+
export * from "./JobStatusResponse.mjs";
|
|
11
|
+
export * from "./JsonSource.mjs";
|
|
12
|
+
export * from "./MultipartSource.mjs";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from "./ExtractAsyncInput.mjs";
|
|
2
|
+
export * from "./ExtractAsyncResponse.mjs";
|
|
3
|
+
export * from "./ExtractInput.mjs";
|
|
4
|
+
export * from "./ExtractJsonInput.mjs";
|
|
5
|
+
export * from "./ExtractMultipartInput.mjs";
|
|
6
|
+
export * from "./ExtractOptions.mjs";
|
|
7
|
+
export * from "./ExtractResponse.mjs";
|
|
8
|
+
export * from "./JobCancellationResponse.mjs";
|
|
9
|
+
export * from "./JobStatus.mjs";
|
|
10
|
+
export * from "./JobStatusResponse.mjs";
|
|
11
|
+
export * from "./JsonSource.mjs";
|
|
12
|
+
export * from "./MultipartSource.mjs";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as core from "../core/index.mjs";
|
|
2
|
+
export declare namespace HeaderAuthProvider {
|
|
3
|
+
interface AuthOptions {
|
|
4
|
+
apiKey?: core.Supplier<string>;
|
|
5
|
+
}
|
|
6
|
+
interface Options extends AuthOptions {
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export declare class HeaderAuthProvider implements core.AuthProvider {
|
|
10
|
+
private readonly headerValue;
|
|
11
|
+
constructor(options: HeaderAuthProvider.Options);
|
|
12
|
+
static canCreate(options: HeaderAuthProvider.Options): boolean;
|
|
13
|
+
getAuthRequest(_arg?: {
|
|
14
|
+
endpointMetadata?: core.EndpointMetadata;
|
|
15
|
+
}): Promise<core.AuthRequest>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
import * as core from "../core/index.mjs";
|
|
12
|
+
import * as errors from "../errors/index.mjs";
|
|
13
|
+
export class HeaderAuthProvider {
|
|
14
|
+
constructor(options) {
|
|
15
|
+
this.headerValue = options.apiKey;
|
|
16
|
+
}
|
|
17
|
+
static canCreate(options) {
|
|
18
|
+
return options.apiKey != null;
|
|
19
|
+
}
|
|
20
|
+
getAuthRequest(_arg) {
|
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
const apiKey = yield core.Supplier.get(this.headerValue);
|
|
23
|
+
if (apiKey == null) {
|
|
24
|
+
throw new errors.PulseError({
|
|
25
|
+
message: "Please specify a apiKey by passing it in to the constructor",
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
const headerValue = apiKey;
|
|
29
|
+
return {
|
|
30
|
+
headers: { "x-api-key": headerValue },
|
|
31
|
+
};
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { HeaderAuthProvider } from "./HeaderAuthProvider.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { HeaderAuthProvider } from "./HeaderAuthProvider.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|