@composio/client 0.1.0-alpha.1
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/CHANGELOG.md +15 -0
- package/LICENSE +201 -0
- package/README.md +373 -0
- package/api-promise.d.mts +2 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +2 -0
- package/api-promise.d.ts.map +1 -0
- package/api-promise.js +19 -0
- package/api-promise.js.map +1 -0
- package/api-promise.mjs +2 -0
- package/api-promise.mjs.map +1 -0
- package/client.d.mts +218 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +218 -0
- package/client.d.ts.map +1 -0
- package/client.js +506 -0
- package/client.js.map +1 -0
- package/client.mjs +479 -0
- package/client.mjs.map +1 -0
- package/core/api-promise.d.mts +47 -0
- package/core/api-promise.d.mts.map +1 -0
- package/core/api-promise.d.ts +47 -0
- package/core/api-promise.d.ts.map +1 -0
- package/core/api-promise.js +84 -0
- package/core/api-promise.js.map +1 -0
- package/core/api-promise.mjs +80 -0
- package/core/api-promise.mjs.map +1 -0
- package/core/error.d.mts +47 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +47 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +113 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +97 -0
- package/core/error.mjs.map +1 -0
- package/core/resource.d.mts +6 -0
- package/core/resource.d.mts.map +1 -0
- package/core/resource.d.ts +6 -0
- package/core/resource.d.ts.map +1 -0
- package/core/resource.js +11 -0
- package/core/resource.js.map +1 -0
- package/core/resource.mjs +7 -0
- package/core/resource.mjs.map +1 -0
- package/core/uploads.d.mts +3 -0
- package/core/uploads.d.mts.map +1 -0
- package/core/uploads.d.ts +3 -0
- package/core/uploads.d.ts.map +1 -0
- package/core/uploads.js +6 -0
- package/core/uploads.js.map +1 -0
- package/core/uploads.mjs +2 -0
- package/core/uploads.mjs.map +1 -0
- package/error.d.mts +2 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +2 -0
- package/error.d.ts.map +1 -0
- package/error.js +19 -0
- package/error.js.map +1 -0
- package/error.mjs +2 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +6 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +6 -0
- package/index.d.ts.map +1 -0
- package/index.js +30 -0
- package/index.js.map +1 -0
- package/index.mjs +7 -0
- package/index.mjs.map +1 -0
- package/internal/builtin-types.d.mts +75 -0
- package/internal/builtin-types.d.mts.map +1 -0
- package/internal/builtin-types.d.ts +75 -0
- package/internal/builtin-types.d.ts.map +1 -0
- package/internal/builtin-types.js +4 -0
- package/internal/builtin-types.js.map +1 -0
- package/internal/builtin-types.mjs +3 -0
- package/internal/builtin-types.mjs.map +1 -0
- package/internal/detect-platform.d.mts +15 -0
- package/internal/detect-platform.d.mts.map +1 -0
- package/internal/detect-platform.d.ts +15 -0
- package/internal/detect-platform.d.ts.map +1 -0
- package/internal/detect-platform.js +162 -0
- package/internal/detect-platform.js.map +1 -0
- package/internal/detect-platform.mjs +157 -0
- package/internal/detect-platform.mjs.map +1 -0
- package/internal/errors.d.mts +3 -0
- package/internal/errors.d.mts.map +1 -0
- package/internal/errors.d.ts +3 -0
- package/internal/errors.d.ts.map +1 -0
- package/internal/errors.js +41 -0
- package/internal/errors.js.map +1 -0
- package/internal/errors.mjs +36 -0
- package/internal/errors.mjs.map +1 -0
- package/internal/headers.d.mts +21 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/headers.d.ts +21 -0
- package/internal/headers.d.ts.map +1 -0
- package/internal/headers.js +77 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +72 -0
- package/internal/headers.mjs.map +1 -0
- package/internal/parse.d.mts +13 -0
- package/internal/parse.d.mts.map +1 -0
- package/internal/parse.d.ts +13 -0
- package/internal/parse.d.ts.map +1 -0
- package/internal/parse.js +36 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +32 -0
- package/internal/parse.mjs.map +1 -0
- package/internal/request-options.d.mts +33 -0
- package/internal/request-options.d.mts.map +1 -0
- package/internal/request-options.d.ts +33 -0
- package/internal/request-options.d.ts.map +1 -0
- package/internal/request-options.js +14 -0
- package/internal/request-options.js.map +1 -0
- package/internal/request-options.mjs +10 -0
- package/internal/request-options.mjs.map +1 -0
- package/internal/shim-types.d.mts +28 -0
- package/internal/shim-types.d.ts +28 -0
- package/internal/shims/crypto.d.mts +13 -0
- package/internal/shims/crypto.d.mts.map +1 -0
- package/internal/shims/crypto.d.ts +13 -0
- package/internal/shims/crypto.d.ts.map +1 -0
- package/internal/shims/crypto.js +13 -0
- package/internal/shims/crypto.js.map +1 -0
- package/internal/shims/crypto.mjs +9 -0
- package/internal/shims/crypto.mjs.map +1 -0
- package/internal/shims/file.d.mts +23 -0
- package/internal/shims/file.d.mts.map +1 -0
- package/internal/shims/file.d.ts +23 -0
- package/internal/shims/file.d.ts.map +1 -0
- package/internal/shims/file.js +16 -0
- package/internal/shims/file.js.map +1 -0
- package/internal/shims/file.mjs +12 -0
- package/internal/shims/file.mjs.map +1 -0
- package/internal/shims/getBuiltinModule.d.mts +11 -0
- package/internal/shims/getBuiltinModule.d.mts.map +1 -0
- package/internal/shims/getBuiltinModule.d.ts +11 -0
- package/internal/shims/getBuiltinModule.d.ts.map +1 -0
- package/internal/shims/getBuiltinModule.js +68 -0
- package/internal/shims/getBuiltinModule.js.map +1 -0
- package/internal/shims/getBuiltinModule.mjs +64 -0
- package/internal/shims/getBuiltinModule.mjs.map +1 -0
- package/internal/shims/nullGetBuiltinModule.d.mts +2 -0
- package/internal/shims/nullGetBuiltinModule.d.mts.map +1 -0
- package/internal/shims/nullGetBuiltinModule.d.ts +2 -0
- package/internal/shims/nullGetBuiltinModule.d.ts.map +1 -0
- package/internal/shims/nullGetBuiltinModule.js +5 -0
- package/internal/shims/nullGetBuiltinModule.js.map +1 -0
- package/internal/shims/nullGetBuiltinModule.mjs +2 -0
- package/internal/shims/nullGetBuiltinModule.mjs.map +1 -0
- package/internal/shims.d.mts +20 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +20 -0
- package/internal/shims.d.ts.map +1 -0
- package/internal/shims.js +93 -0
- package/internal/shims.js.map +1 -0
- package/internal/shims.mjs +85 -0
- package/internal/shims.mjs.map +1 -0
- package/internal/to-file.d.mts +46 -0
- package/internal/to-file.d.mts.map +1 -0
- package/internal/to-file.d.ts +46 -0
- package/internal/to-file.d.ts.map +1 -0
- package/internal/to-file.js +91 -0
- package/internal/to-file.js.map +1 -0
- package/internal/to-file.mjs +87 -0
- package/internal/to-file.mjs.map +1 -0
- package/internal/types.d.mts +68 -0
- package/internal/types.d.mts.map +1 -0
- package/internal/types.d.ts +68 -0
- package/internal/types.d.ts.map +1 -0
- package/internal/types.js +4 -0
- package/internal/types.js.map +1 -0
- package/internal/types.mjs +3 -0
- package/internal/types.mjs.map +1 -0
- package/internal/uploads.d.mts +44 -0
- package/internal/uploads.d.mts.map +1 -0
- package/internal/uploads.d.ts +44 -0
- package/internal/uploads.d.ts.map +1 -0
- package/internal/uploads.js +131 -0
- package/internal/uploads.js.map +1 -0
- package/internal/uploads.mjs +122 -0
- package/internal/uploads.mjs.map +1 -0
- package/internal/utils/base64.d.mts +3 -0
- package/internal/utils/base64.d.mts.map +1 -0
- package/internal/utils/base64.d.ts +3 -0
- package/internal/utils/base64.d.ts.map +1 -0
- package/internal/utils/base64.js +33 -0
- package/internal/utils/base64.js.map +1 -0
- package/internal/utils/base64.mjs +28 -0
- package/internal/utils/base64.mjs.map +1 -0
- package/internal/utils/env.d.mts +9 -0
- package/internal/utils/env.d.mts.map +1 -0
- package/internal/utils/env.d.ts +9 -0
- package/internal/utils/env.d.ts.map +1 -0
- package/internal/utils/env.js +22 -0
- package/internal/utils/env.js.map +1 -0
- package/internal/utils/env.mjs +18 -0
- package/internal/utils/env.mjs.map +1 -0
- package/internal/utils/log.d.mts +38 -0
- package/internal/utils/log.d.mts.map +1 -0
- package/internal/utils/log.d.ts +38 -0
- package/internal/utils/log.d.ts.map +1 -0
- package/internal/utils/log.js +86 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +80 -0
- package/internal/utils/log.mjs.map +1 -0
- package/internal/utils/path.d.mts +15 -0
- package/internal/utils/path.d.mts.map +1 -0
- package/internal/utils/path.d.ts +15 -0
- package/internal/utils/path.d.ts.map +1 -0
- package/internal/utils/path.js +58 -0
- package/internal/utils/path.js.map +1 -0
- package/internal/utils/path.mjs +53 -0
- package/internal/utils/path.mjs.map +1 -0
- package/internal/utils/sleep.d.mts +2 -0
- package/internal/utils/sleep.d.mts.map +1 -0
- package/internal/utils/sleep.d.ts +2 -0
- package/internal/utils/sleep.d.ts.map +1 -0
- package/internal/utils/sleep.js +7 -0
- package/internal/utils/sleep.js.map +1 -0
- package/internal/utils/sleep.mjs +3 -0
- package/internal/utils/sleep.mjs.map +1 -0
- package/internal/utils/uuid.d.mts +5 -0
- package/internal/utils/uuid.d.mts.map +1 -0
- package/internal/utils/uuid.d.ts +5 -0
- package/internal/utils/uuid.d.ts.map +1 -0
- package/internal/utils/uuid.js +20 -0
- package/internal/utils/uuid.js.map +1 -0
- package/internal/utils/uuid.mjs +16 -0
- package/internal/utils/uuid.mjs.map +1 -0
- package/internal/utils/values.d.mts +16 -0
- package/internal/utils/values.d.mts.map +1 -0
- package/internal/utils/values.d.ts +16 -0
- package/internal/utils/values.d.ts.map +1 -0
- package/internal/utils/values.js +109 -0
- package/internal/utils/values.js.map +1 -0
- package/internal/utils/values.mjs +92 -0
- package/internal/utils/values.mjs.map +1 -0
- package/internal/utils.d.mts +7 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +7 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +24 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +8 -0
- package/internal/utils.mjs.map +1 -0
- package/package.json +146 -0
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +2 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +19 -0
- package/resource.js.map +1 -0
- package/resource.mjs +2 -0
- package/resource.mjs.map +1 -0
- package/resources/action-execution.d.mts +155 -0
- package/resources/action-execution.d.mts.map +1 -0
- package/resources/action-execution.d.ts +155 -0
- package/resources/action-execution.d.ts.map +1 -0
- package/resources/action-execution.js +19 -0
- package/resources/action-execution.js.map +1 -0
- package/resources/action-execution.mjs +15 -0
- package/resources/action-execution.mjs.map +1 -0
- package/resources/auth-configs.d.mts +217 -0
- package/resources/auth-configs.d.mts.map +1 -0
- package/resources/auth-configs.d.ts +217 -0
- package/resources/auth-configs.d.ts.map +1 -0
- package/resources/auth-configs.js +29 -0
- package/resources/auth-configs.js.map +1 -0
- package/resources/auth-configs.mjs +25 -0
- package/resources/auth-configs.mjs.map +1 -0
- package/resources/connected-accounts.d.mts +449 -0
- package/resources/connected-accounts.d.mts.map +1 -0
- package/resources/connected-accounts.d.ts +449 -0
- package/resources/connected-accounts.d.ts.map +1 -0
- package/resources/connected-accounts.js +28 -0
- package/resources/connected-accounts.js.map +1 -0
- package/resources/connected-accounts.mjs +24 -0
- package/resources/connected-accounts.mjs.map +1 -0
- package/resources/index.d.mts +11 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +11 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +25 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +12 -0
- package/resources/index.mjs.map +1 -0
- package/resources/org/api-key.d.mts +17 -0
- package/resources/org/api-key.d.mts.map +1 -0
- package/resources/org/api-key.d.ts +17 -0
- package/resources/org/api-key.d.ts.map +1 -0
- package/resources/org/api-key.js +15 -0
- package/resources/org/api-key.js.map +1 -0
- package/resources/org/api-key.mjs +11 -0
- package/resources/org/api-key.mjs.map +1 -0
- package/resources/org/index.d.mts +4 -0
- package/resources/org/index.d.mts.map +1 -0
- package/resources/org/index.d.ts +4 -0
- package/resources/org/index.d.ts.map +1 -0
- package/resources/org/index.js +11 -0
- package/resources/org/index.js.map +1 -0
- package/resources/org/index.mjs +5 -0
- package/resources/org/index.mjs.map +1 -0
- package/resources/org/org.d.mts +14 -0
- package/resources/org/org.d.mts.map +1 -0
- package/resources/org/org.d.ts +14 -0
- package/resources/org/org.d.ts.map +1 -0
- package/resources/org/org.js +43 -0
- package/resources/org/org.js.map +1 -0
- package/resources/org/org.mjs +16 -0
- package/resources/org/org.mjs.map +1 -0
- package/resources/org/project/api-keys.d.mts +109 -0
- package/resources/org/project/api-keys.d.mts.map +1 -0
- package/resources/org/project/api-keys.d.ts +109 -0
- package/resources/org/project/api-keys.d.ts.map +1 -0
- package/resources/org/project/api-keys.js +23 -0
- package/resources/org/project/api-keys.js.map +1 -0
- package/resources/org/project/api-keys.mjs +19 -0
- package/resources/org/project/api-keys.mjs.map +1 -0
- package/resources/org/project/index.d.mts +5 -0
- package/resources/org/project/index.d.mts.map +1 -0
- package/resources/org/project/index.d.ts +5 -0
- package/resources/org/project/index.d.ts.map +1 -0
- package/resources/org/project/index.js +13 -0
- package/resources/org/project/index.js.map +1 -0
- package/resources/org/project/index.mjs +6 -0
- package/resources/org/project/index.mjs.map +1 -0
- package/resources/org/project/project.d.mts +90 -0
- package/resources/org/project/project.d.mts.map +1 -0
- package/resources/org/project/project.d.ts +90 -0
- package/resources/org/project/project.d.ts.map +1 -0
- package/resources/org/project/project.js +60 -0
- package/resources/org/project/project.js.map +1 -0
- package/resources/org/project/project.mjs +33 -0
- package/resources/org/project/project.mjs.map +1 -0
- package/resources/org/project/trigger.d.mts +51 -0
- package/resources/org/project/trigger.d.mts.map +1 -0
- package/resources/org/project/trigger.d.ts +51 -0
- package/resources/org/project/trigger.d.ts.map +1 -0
- package/resources/org/project/trigger.js +16 -0
- package/resources/org/project/trigger.js.map +1 -0
- package/resources/org/project/trigger.mjs +12 -0
- package/resources/org/project/trigger.mjs.map +1 -0
- package/resources/org/project/webhook.d.mts +92 -0
- package/resources/org/project/webhook.d.mts.map +1 -0
- package/resources/org/project/webhook.d.ts +92 -0
- package/resources/org/project/webhook.d.ts.map +1 -0
- package/resources/org/project/webhook.js +24 -0
- package/resources/org/project/webhook.js.map +1 -0
- package/resources/org/project/webhook.mjs +20 -0
- package/resources/org/project/webhook.mjs.map +1 -0
- package/resources/org/project.d.mts +2 -0
- package/resources/org/project.d.mts.map +1 -0
- package/resources/org/project.d.ts +2 -0
- package/resources/org/project.d.ts.map +1 -0
- package/resources/org/project.js +19 -0
- package/resources/org/project.js.map +1 -0
- package/resources/org/project.mjs +3 -0
- package/resources/org/project.mjs.map +1 -0
- package/resources/org.d.mts +2 -0
- package/resources/org.d.mts.map +1 -0
- package/resources/org.d.ts +2 -0
- package/resources/org.d.ts.map +1 -0
- package/resources/org.js +19 -0
- package/resources/org.js.map +1 -0
- package/resources/org.mjs +3 -0
- package/resources/org.mjs.map +1 -0
- package/resources/team-members.d.mts +57 -0
- package/resources/team-members.d.mts.map +1 -0
- package/resources/team-members.d.ts +57 -0
- package/resources/team-members.d.ts.map +1 -0
- package/resources/team-members.js +22 -0
- package/resources/team-members.js.map +1 -0
- package/resources/team-members.mjs +18 -0
- package/resources/team-members.mjs.map +1 -0
- package/resources/toolkits.d.mts +141 -0
- package/resources/toolkits.d.mts.map +1 -0
- package/resources/toolkits.d.ts +141 -0
- package/resources/toolkits.d.ts.map +1 -0
- package/resources/toolkits.js +19 -0
- package/resources/toolkits.js.map +1 -0
- package/resources/toolkits.mjs +15 -0
- package/resources/toolkits.mjs.map +1 -0
- package/resources/tools.d.mts +164 -0
- package/resources/tools.d.mts.map +1 -0
- package/resources/tools.d.ts +164 -0
- package/resources/tools.d.ts.map +1 -0
- package/resources/tools.js +28 -0
- package/resources/tools.js.map +1 -0
- package/resources/tools.mjs +24 -0
- package/resources/tools.mjs.map +1 -0
- package/resources/trigger-instances/handle.d.mts +25 -0
- package/resources/trigger-instances/handle.d.mts.map +1 -0
- package/resources/trigger-instances/handle.d.ts +25 -0
- package/resources/trigger-instances/handle.d.ts.map +1 -0
- package/resources/trigger-instances/handle.js +18 -0
- package/resources/trigger-instances/handle.js.map +1 -0
- package/resources/trigger-instances/handle.mjs +14 -0
- package/resources/trigger-instances/handle.mjs.map +1 -0
- package/resources/trigger-instances/index.d.mts +3 -0
- package/resources/trigger-instances/index.d.mts.map +1 -0
- package/resources/trigger-instances/index.d.ts +3 -0
- package/resources/trigger-instances/index.d.ts.map +1 -0
- package/resources/trigger-instances/index.js +9 -0
- package/resources/trigger-instances/index.js.map +1 -0
- package/resources/trigger-instances/index.mjs +4 -0
- package/resources/trigger-instances/index.mjs.map +1 -0
- package/resources/trigger-instances/trigger-instances.d.mts +126 -0
- package/resources/trigger-instances/trigger-instances.d.mts.map +1 -0
- package/resources/trigger-instances/trigger-instances.d.ts +126 -0
- package/resources/trigger-instances/trigger-instances.d.ts.map +1 -0
- package/resources/trigger-instances/trigger-instances.js +53 -0
- package/resources/trigger-instances/trigger-instances.js.map +1 -0
- package/resources/trigger-instances/trigger-instances.mjs +26 -0
- package/resources/trigger-instances/trigger-instances.mjs.map +1 -0
- package/resources/trigger-instances.d.mts +2 -0
- package/resources/trigger-instances.d.mts.map +1 -0
- package/resources/trigger-instances.d.ts +2 -0
- package/resources/trigger-instances.d.ts.map +1 -0
- package/resources/trigger-instances.js +19 -0
- package/resources/trigger-instances.js.map +1 -0
- package/resources/trigger-instances.mjs +3 -0
- package/resources/trigger-instances.mjs.map +1 -0
- package/resources/trigger.d.mts +73 -0
- package/resources/trigger.d.mts.map +1 -0
- package/resources/trigger.d.ts +73 -0
- package/resources/trigger.d.ts.map +1 -0
- package/resources/trigger.js +12 -0
- package/resources/trigger.js.map +1 -0
- package/resources/trigger.mjs +8 -0
- package/resources/trigger.mjs.map +1 -0
- package/resources/triggers-types.d.mts +59 -0
- package/resources/triggers-types.d.mts.map +1 -0
- package/resources/triggers-types.d.ts +59 -0
- package/resources/triggers-types.d.ts.map +1 -0
- package/resources/triggers-types.js +19 -0
- package/resources/triggers-types.js.map +1 -0
- package/resources/triggers-types.mjs +15 -0
- package/resources/triggers-types.mjs.map +1 -0
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +18 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/api-promise.ts +2 -0
- package/src/client.ts +898 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +130 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -0
- package/src/index.ts +22 -0
- package/src/internal/README.md +3 -0
- package/src/internal/builtin-types.ts +93 -0
- package/src/internal/detect-platform.ts +196 -0
- package/src/internal/errors.ts +33 -0
- package/src/internal/headers.ts +96 -0
- package/src/internal/parse.ts +50 -0
- package/src/internal/request-options.ts +37 -0
- package/src/internal/shim-types.d.ts +28 -0
- package/src/internal/shims/crypto.ts +18 -0
- package/src/internal/shims/file.ts +32 -0
- package/src/internal/shims/getBuiltinModule.ts +64 -0
- package/src/internal/shims/nullGetBuiltinModule.ts +1 -0
- package/src/internal/shims.ts +107 -0
- package/src/internal/to-file.ts +152 -0
- package/src/internal/types.ts +92 -0
- package/src/internal/uploads.ts +175 -0
- package/src/internal/utils/base64.ts +37 -0
- package/src/internal/utils/env.ts +18 -0
- package/src/internal/utils/log.ts +127 -0
- package/src/internal/utils/path.ts +65 -0
- package/src/internal/utils/sleep.ts +3 -0
- package/src/internal/utils/uuid.ts +19 -0
- package/src/internal/utils/values.ts +102 -0
- package/src/internal/utils.ts +8 -0
- package/src/lib/.keep +4 -0
- package/src/resource.ts +2 -0
- package/src/resources/action-execution.ts +244 -0
- package/src/resources/auth-configs.ts +362 -0
- package/src/resources/connected-accounts.ts +661 -0
- package/src/resources/index.ts +82 -0
- package/src/resources/org/api-key.ts +30 -0
- package/src/resources/org/index.ts +12 -0
- package/src/resources/org/org.ts +39 -0
- package/src/resources/org/project/api-keys.ts +156 -0
- package/src/resources/org/project/index.ts +35 -0
- package/src/resources/org/project/project.ts +206 -0
- package/src/resources/org/project/trigger.ts +95 -0
- package/src/resources/org/project/webhook.ts +131 -0
- package/src/resources/org/project.ts +3 -0
- package/src/resources/org.ts +3 -0
- package/src/resources/team-members.ts +111 -0
- package/src/resources/toolkits.ts +232 -0
- package/src/resources/tools.ts +265 -0
- package/src/resources/trigger-instances/handle.ts +45 -0
- package/src/resources/trigger-instances/index.ts +19 -0
- package/src/resources/trigger-instances/trigger-instances.ts +202 -0
- package/src/resources/trigger-instances.ts +3 -0
- package/src/resources/trigger.ts +108 -0
- package/src/resources/triggers-types.ts +105 -0
- package/src/resources.ts +1 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +2 -0
- package/src/version.ts +1 -0
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +2 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +19 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +2 -0
- package/uploads.mjs.map +1 -0
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crypto.d.ts","sourceRoot":"","sources":["../../src/internal/shims/crypto.ts"],"names":[],"mappings":"AAEA,KAAK,MAAM,GAAG;IACZ,yFAAyF;IACzF,eAAe,CAAC,CAAC,SAAS,eAAe,GAAG,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC;IAC/D;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,MAAM,CAAC;CAC3B,CAAC;AACF,eAAO,IAAI,SAAS,EAAE,MAAM,MAAM,GAAG,SAKpC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCrypto = void 0;
|
|
4
|
+
const getBuiltinModule_1 = require("./getBuiltinModule.js");
|
|
5
|
+
let getCrypto = function lazyGetCrypto() {
|
|
6
|
+
if (exports.getCrypto !== lazyGetCrypto)
|
|
7
|
+
return (0, exports.getCrypto)();
|
|
8
|
+
const crypto = globalThis.crypto || (0, getBuiltinModule_1.getBuiltinModule)?.('node:crypto')?.webcrypto;
|
|
9
|
+
exports.getCrypto = () => crypto;
|
|
10
|
+
return crypto;
|
|
11
|
+
};
|
|
12
|
+
exports.getCrypto = getCrypto;
|
|
13
|
+
//# sourceMappingURL=crypto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crypto.js","sourceRoot":"","sources":["../../src/internal/shims/crypto.ts"],"names":[],"mappings":";;;AAAA,4DAAsD;AAY/C,IAAI,SAAS,GAA6B,SAAS,aAAa;IACrE,IAAI,iBAAS,KAAK,aAAa;QAAE,OAAO,IAAA,iBAAS,GAAE,CAAC;IACpD,MAAM,MAAM,GAAY,UAAkB,CAAC,MAAM,IAAK,IAAA,mCAAgB,CAAA,EAAE,CAAC,aAAa,CAAS,EAAE,SAAS,CAAC;IAC3G,iBAAS,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC;IACzB,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AALS,QAAA,SAAS,aAKlB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { getBuiltinModule } from "./getBuiltinModule.mjs";
|
|
2
|
+
export let getCrypto = function lazyGetCrypto() {
|
|
3
|
+
if (getCrypto !== lazyGetCrypto)
|
|
4
|
+
return getCrypto();
|
|
5
|
+
const crypto = globalThis.crypto || getBuiltinModule?.('node:crypto')?.webcrypto;
|
|
6
|
+
getCrypto = () => crypto;
|
|
7
|
+
return crypto;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=crypto.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crypto.mjs","sourceRoot":"","sources":["../../src/internal/shims/crypto.ts"],"names":[],"mappings":"OAAO,EAAE,gBAAgB,EAAE;AAY3B,MAAM,CAAC,IAAI,SAAS,GAA6B,SAAS,aAAa;IACrE,IAAI,SAAS,KAAK,aAAa;QAAE,OAAO,SAAS,EAAE,CAAC;IACpD,MAAM,MAAM,GAAY,UAAkB,CAAC,MAAM,IAAK,gBAAgB,EAAE,CAAC,aAAa,CAAS,EAAE,SAAS,CAAC;IAC3G,SAAS,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC;IACzB,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
|
|
2
|
+
export declare let getFile: () => FileConstructor;
|
|
3
|
+
type FileConstructor = typeof globalThis extends {
|
|
4
|
+
File: infer fileConstructor;
|
|
5
|
+
} ? fileConstructor : typeof FallbackFile;
|
|
6
|
+
export type File = InstanceType<FileConstructor>;
|
|
7
|
+
type FallbackBlobSource = ConstructorParameters<typeof Blob>[0] extends infer T ? T : never;
|
|
8
|
+
/**
|
|
9
|
+
* A [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) provides information about files.
|
|
10
|
+
*/
|
|
11
|
+
declare class FallbackFile extends Blob {
|
|
12
|
+
constructor(sources: FallbackBlobSource, fileName: string, options?: any);
|
|
13
|
+
/**
|
|
14
|
+
* The name of the `File`.
|
|
15
|
+
*/
|
|
16
|
+
readonly name: string;
|
|
17
|
+
/**
|
|
18
|
+
* The last modified date of the `File`.
|
|
19
|
+
*/
|
|
20
|
+
readonly lastModified: number;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=file.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.d.mts","sourceRoot":"","sources":["../../src/internal/shims/file.ts"],"names":[],"mappings":";AAEA,eAAO,IAAI,OAAO,QAA2B,eAO5C,CAAC;AAEF,KAAK,eAAe,GAClB,OAAO,UAAU,SAAS;IAAE,IAAI,EAAE,MAAM,eAAe,CAAA;CAAE,GAAG,eAAe,GAAG,OAAO,YAAY,CAAC;AACpG,MAAM,MAAM,IAAI,GAAG,YAAY,CAAC,eAAe,CAAC,CAAC;AAIjD,KAAK,kBAAkB,GAAG,qBAAqB,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAC5F;;GAEG;AACH,OAAO,OAAO,YAAa,SAAQ,IAAI;gBACzB,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG;IACxE;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
|
|
2
|
+
export declare let getFile: () => FileConstructor;
|
|
3
|
+
type FileConstructor = typeof globalThis extends {
|
|
4
|
+
File: infer fileConstructor;
|
|
5
|
+
} ? fileConstructor : typeof FallbackFile;
|
|
6
|
+
export type File = InstanceType<FileConstructor>;
|
|
7
|
+
type FallbackBlobSource = ConstructorParameters<typeof Blob>[0] extends infer T ? T : never;
|
|
8
|
+
/**
|
|
9
|
+
* A [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) provides information about files.
|
|
10
|
+
*/
|
|
11
|
+
declare class FallbackFile extends Blob {
|
|
12
|
+
constructor(sources: FallbackBlobSource, fileName: string, options?: any);
|
|
13
|
+
/**
|
|
14
|
+
* The name of the `File`.
|
|
15
|
+
*/
|
|
16
|
+
readonly name: string;
|
|
17
|
+
/**
|
|
18
|
+
* The last modified date of the `File`.
|
|
19
|
+
*/
|
|
20
|
+
readonly lastModified: number;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/internal/shims/file.ts"],"names":[],"mappings":";AAEA,eAAO,IAAI,OAAO,QAA2B,eAO5C,CAAC;AAEF,KAAK,eAAe,GAClB,OAAO,UAAU,SAAS;IAAE,IAAI,EAAE,MAAM,eAAe,CAAA;CAAE,GAAG,eAAe,GAAG,OAAO,YAAY,CAAC;AACpG,MAAM,MAAM,IAAI,GAAG,YAAY,CAAC,eAAe,CAAC,CAAC;AAIjD,KAAK,kBAAkB,GAAG,qBAAqB,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAC5F;;GAEG;AACH,OAAO,OAAO,YAAa,SAAQ,IAAI;gBACzB,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG;IACxE;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getFile = void 0;
|
|
4
|
+
const getBuiltinModule_1 = require("./getBuiltinModule.js");
|
|
5
|
+
let getFile = function lazyGetFile() {
|
|
6
|
+
if (exports.getFile !== lazyGetFile)
|
|
7
|
+
return (0, exports.getFile)();
|
|
8
|
+
// We can drop getBuiltinModule once we no longer support Node < 20.0.0
|
|
9
|
+
const File = globalThis.File ?? (0, getBuiltinModule_1.getBuiltinModule)?.('node:buffer')?.File;
|
|
10
|
+
if (!File)
|
|
11
|
+
throw new Error('`File` is not defined as a global, which is required for file uploads.');
|
|
12
|
+
exports.getFile = () => File;
|
|
13
|
+
return File;
|
|
14
|
+
};
|
|
15
|
+
exports.getFile = getFile;
|
|
16
|
+
//# sourceMappingURL=file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.js","sourceRoot":"","sources":["../../src/internal/shims/file.ts"],"names":[],"mappings":";;;AAAA,4DAAsD;AAE/C,IAAI,OAAO,GAAG,SAAS,WAAW;IACvC,IAAI,eAAO,KAAK,WAAW;QAAE,OAAO,IAAA,eAAO,GAAE,CAAC;IAC9C,uEAAuE;IACvE,MAAM,IAAI,GAAI,UAAkB,CAAC,IAAI,IAAK,IAAA,mCAAgB,CAAA,EAAE,CAAC,aAAa,CAAS,EAAE,IAAI,CAAC;IAC1F,IAAI,CAAC,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,wEAAwE,CAAC,CAAC;IACrG,eAAO,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC;IACrB,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAPS,QAAA,OAAO,WAOhB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { getBuiltinModule } from "./getBuiltinModule.mjs";
|
|
2
|
+
export let getFile = function lazyGetFile() {
|
|
3
|
+
if (getFile !== lazyGetFile)
|
|
4
|
+
return getFile();
|
|
5
|
+
// We can drop getBuiltinModule once we no longer support Node < 20.0.0
|
|
6
|
+
const File = globalThis.File ?? getBuiltinModule?.('node:buffer')?.File;
|
|
7
|
+
if (!File)
|
|
8
|
+
throw new Error('`File` is not defined as a global, which is required for file uploads.');
|
|
9
|
+
getFile = () => File;
|
|
10
|
+
return File;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=file.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.mjs","sourceRoot":"","sources":["../../src/internal/shims/file.ts"],"names":[],"mappings":"OAAO,EAAE,gBAAgB,EAAE;AAE3B,MAAM,CAAC,IAAI,OAAO,GAAG,SAAS,WAAW;IACvC,IAAI,OAAO,KAAK,WAAW;QAAE,OAAO,OAAO,EAAE,CAAC;IAC9C,uEAAuE;IACvE,MAAM,IAAI,GAAI,UAAkB,CAAC,IAAI,IAAK,gBAAgB,EAAE,CAAC,aAAa,CAAS,EAAE,IAAI,CAAC;IAC1F,IAAI,CAAC,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,wEAAwE,CAAC,CAAC;IACrG,OAAO,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC;IACrB,OAAO,IAAI,CAAC;AACd,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Load a Node built-in module. ID may or may not be prefixed by `node:` and
|
|
3
|
+
* will be normalized. If we used static imports then our bundle size would be bloated by
|
|
4
|
+
* injected polyfills, and if we used dynamic require then in addition to bundlers logging warnings,
|
|
5
|
+
* our code would not work when bundled to ESM and run in Node 18.
|
|
6
|
+
* @param {string} id ID of the built-in to be loaded.
|
|
7
|
+
* @returns {object|undefined} exports of the built-in. Undefined if the built-in
|
|
8
|
+
* does not exist.
|
|
9
|
+
*/
|
|
10
|
+
export declare let getBuiltinModule: null | ((id: string) => object | undefined);
|
|
11
|
+
//# sourceMappingURL=getBuiltinModule.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getBuiltinModule.d.mts","sourceRoot":"","sources":["../../src/internal/shims/getBuiltinModule.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,IAAI,gBAAgB,EAAE,IAAI,GAAG,CAAC,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAsDtE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Load a Node built-in module. ID may or may not be prefixed by `node:` and
|
|
3
|
+
* will be normalized. If we used static imports then our bundle size would be bloated by
|
|
4
|
+
* injected polyfills, and if we used dynamic require then in addition to bundlers logging warnings,
|
|
5
|
+
* our code would not work when bundled to ESM and run in Node 18.
|
|
6
|
+
* @param {string} id ID of the built-in to be loaded.
|
|
7
|
+
* @returns {object|undefined} exports of the built-in. Undefined if the built-in
|
|
8
|
+
* does not exist.
|
|
9
|
+
*/
|
|
10
|
+
export declare let getBuiltinModule: null | ((id: string) => object | undefined);
|
|
11
|
+
//# sourceMappingURL=getBuiltinModule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getBuiltinModule.d.ts","sourceRoot":"","sources":["../../src/internal/shims/getBuiltinModule.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,IAAI,gBAAgB,EAAE,IAAI,GAAG,CAAC,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAsDtE,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getBuiltinModule = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Load a Node built-in module. ID may or may not be prefixed by `node:` and
|
|
6
|
+
* will be normalized. If we used static imports then our bundle size would be bloated by
|
|
7
|
+
* injected polyfills, and if we used dynamic require then in addition to bundlers logging warnings,
|
|
8
|
+
* our code would not work when bundled to ESM and run in Node 18.
|
|
9
|
+
* @param {string} id ID of the built-in to be loaded.
|
|
10
|
+
* @returns {object|undefined} exports of the built-in. Undefined if the built-in
|
|
11
|
+
* does not exist.
|
|
12
|
+
*/
|
|
13
|
+
let getBuiltinModule = function getBuiltinModuleLazy(id) {
|
|
14
|
+
try {
|
|
15
|
+
if (exports.getBuiltinModule !== getBuiltinModuleLazy)
|
|
16
|
+
return exports.getBuiltinModule(id);
|
|
17
|
+
if (process.getBuiltinModule) {
|
|
18
|
+
exports.getBuiltinModule = process.getBuiltinModule;
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
/* Fallback implementation for Node 18 */
|
|
22
|
+
function createFallbackGetBuiltinModule(BuiltinModule) {
|
|
23
|
+
return function getBuiltinModule(id) {
|
|
24
|
+
id = BuiltinModule.normalizeRequirableId(String(id));
|
|
25
|
+
if (!BuiltinModule.canBeRequiredByUsers(id)) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const mod = BuiltinModule.map.get(id);
|
|
29
|
+
mod.compileForPublicLoader();
|
|
30
|
+
return mod.exports;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
const magicKey = Math.random() + '';
|
|
34
|
+
let module;
|
|
35
|
+
try {
|
|
36
|
+
const kClone = Object.getOwnPropertySymbols(Blob.prototype).find((e) => e.description?.includes('clone'));
|
|
37
|
+
Object.defineProperty(Object.prototype, magicKey, {
|
|
38
|
+
get() {
|
|
39
|
+
module = this;
|
|
40
|
+
throw null;
|
|
41
|
+
},
|
|
42
|
+
configurable: true,
|
|
43
|
+
});
|
|
44
|
+
structuredClone(new (class extends Blob {
|
|
45
|
+
[kClone]() {
|
|
46
|
+
return {
|
|
47
|
+
deserializeInfo: 'internal/bootstrap/realm:' + magicKey,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
})([]));
|
|
51
|
+
}
|
|
52
|
+
catch { }
|
|
53
|
+
delete Object.prototype[magicKey];
|
|
54
|
+
if (module) {
|
|
55
|
+
exports.getBuiltinModule = createFallbackGetBuiltinModule(module.BuiltinModule);
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
exports.getBuiltinModule = () => undefined;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return exports.getBuiltinModule(id);
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
return undefined;
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
exports.getBuiltinModule = getBuiltinModule;
|
|
68
|
+
//# sourceMappingURL=getBuiltinModule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getBuiltinModule.js","sourceRoot":"","sources":["../../src/internal/shims/getBuiltinModule.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;GAQG;AACI,IAAI,gBAAgB,GAAgD,SAAS,oBAAoB,CACtG,EAA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AQ;yBACxD,CAAC;oBACJ,CAAC;iBACF,CAAC,CAAC,EAAE,CAAC,CACP,CAAC;aACH;YAAC,MAAM,GAAE;YACV,OAAQ,MAAM,CAAC,SAAiB,CAAC,QAAQ,CAAC,CAAC;YAC3C,IAAI,MAAM,EAAE;gBACV,wBAAgB,GAAG,8BAA8B,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;aACzE;iBAAM;gBACL,wBAAgB,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC;aACpC;SACF;QACD,OAAO,wBAAiB,CAAC,EAAE,CAAC,CAAC;KAC9B;IAAC,MAAM;QACN,OAAO,SAAS,CAAC;KAClB;AACH,CAAC,CAAC;AAtDS,QAAA,gBAAgB,oBAsDzB"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Load a Node built-in module. ID may or may not be prefixed by `node:` and
|
|
3
|
+
* will be normalized. If we used static imports then our bundle size would be bloated by
|
|
4
|
+
* injected polyfills, and if we used dynamic require then in addition to bundlers logging warnings,
|
|
5
|
+
* our code would not work when bundled to ESM and run in Node 18.
|
|
6
|
+
* @param {string} id ID of the built-in to be loaded.
|
|
7
|
+
* @returns {object|undefined} exports of the built-in. Undefined if the built-in
|
|
8
|
+
* does not exist.
|
|
9
|
+
*/
|
|
10
|
+
export let getBuiltinModule = function getBuiltinModuleLazy(id) {
|
|
11
|
+
try {
|
|
12
|
+
if (getBuiltinModule !== getBuiltinModuleLazy)
|
|
13
|
+
return getBuiltinModule(id);
|
|
14
|
+
if (process.getBuiltinModule) {
|
|
15
|
+
getBuiltinModule = process.getBuiltinModule;
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
/* Fallback implementation for Node 18 */
|
|
19
|
+
function createFallbackGetBuiltinModule(BuiltinModule) {
|
|
20
|
+
return function getBuiltinModule(id) {
|
|
21
|
+
id = BuiltinModule.normalizeRequirableId(String(id));
|
|
22
|
+
if (!BuiltinModule.canBeRequiredByUsers(id)) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
const mod = BuiltinModule.map.get(id);
|
|
26
|
+
mod.compileForPublicLoader();
|
|
27
|
+
return mod.exports;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
const magicKey = Math.random() + '';
|
|
31
|
+
let module;
|
|
32
|
+
try {
|
|
33
|
+
const kClone = Object.getOwnPropertySymbols(Blob.prototype).find((e) => e.description?.includes('clone'));
|
|
34
|
+
Object.defineProperty(Object.prototype, magicKey, {
|
|
35
|
+
get() {
|
|
36
|
+
module = this;
|
|
37
|
+
throw null;
|
|
38
|
+
},
|
|
39
|
+
configurable: true,
|
|
40
|
+
});
|
|
41
|
+
structuredClone(new (class extends Blob {
|
|
42
|
+
[kClone]() {
|
|
43
|
+
return {
|
|
44
|
+
deserializeInfo: 'internal/bootstrap/realm:' + magicKey,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
})([]));
|
|
48
|
+
}
|
|
49
|
+
catch { }
|
|
50
|
+
delete Object.prototype[magicKey];
|
|
51
|
+
if (module) {
|
|
52
|
+
getBuiltinModule = createFallbackGetBuiltinModule(module.BuiltinModule);
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
getBuiltinModule = () => undefined;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return getBuiltinModule(id);
|
|
59
|
+
}
|
|
60
|
+
catch {
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=getBuiltinModule.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getBuiltinModule.mjs","sourceRoot":"","sources":["../../src/internal/shims/getBuiltinModule.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,CAAC,IAAI,gBAAgB,GAAgD,SAAS,oBAAoB,CACtG,EAAU;IAEV,IAAI;QACF,IAAI,gBAAgB,KAAK,oBAAoB;YAAE,OAAO,gBAAiB,CAAC,EA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YAAC,MAAM,GAAE;YACV,OAAQ,MAAM,CAAC,SAAiB,CAAC,QAAQ,CAAC,CAAC;YAC3C,IAAI,MAAM,EAAE;gBACV,gBAAgB,GAAG,8BAA8B,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;aACzE;iBAAM;gBACL,gBAAgB,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC;aACpC;SACF;QACD,OAAO,gBAAiB,CAAC,EAAE,CAAC,CAAC;KAC9B;IAAC,MAAM;QACN,OAAO,SAAS,CAAC;KAClB;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nullGetBuiltinModule.d.mts","sourceRoot":"","sources":["../../src/internal/shims/nullGetBuiltinModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,MAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nullGetBuiltinModule.d.ts","sourceRoot":"","sources":["../../src/internal/shims/nullGetBuiltinModule.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,MAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nullGetBuiltinModule.js","sourceRoot":"","sources":["../../src/internal/shims/nullGetBuiltinModule.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nullGetBuiltinModule.mjs","sourceRoot":"","sources":["../../src/internal/shims/nullGetBuiltinModule.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type Fetch } from "./builtin-types.mjs";
|
|
2
|
+
import { type ReadableStream } from "./shim-types.mjs";
|
|
3
|
+
export declare function getDefaultFetch(): Fetch;
|
|
4
|
+
type ReadableStreamArgs = ConstructorParameters<typeof ReadableStream>;
|
|
5
|
+
export declare function makeReadableStream(...args: ReadableStreamArgs): ReadableStream;
|
|
6
|
+
export declare function ReadableStreamFrom<T>(iterable: Iterable<T> | AsyncIterable<T>): ReadableStream<T>;
|
|
7
|
+
/**
|
|
8
|
+
* Most browsers don't yet have async iterable support for ReadableStream,
|
|
9
|
+
* and Node has a very different way of reading bytes from its "ReadableStream".
|
|
10
|
+
*
|
|
11
|
+
* This polyfill was pulled from https://github.com/MattiasBuelens/web-streams-polyfill/pull/122#issuecomment-1627354490
|
|
12
|
+
*/
|
|
13
|
+
export declare function ReadableStreamToAsyncIterable<T>(stream: any): AsyncIterableIterator<T>;
|
|
14
|
+
/**
|
|
15
|
+
* Cancels a ReadableStream we don't need to consume.
|
|
16
|
+
* See https://undici.nodejs.org/#/?id=garbage-collection
|
|
17
|
+
*/
|
|
18
|
+
export declare function CancelReadableStream(stream: any): Promise<void>;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=shims.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shims.d.mts","sourceRoot":"","sources":["../src/internal/shims.ts"],"names":[],"mappings":"OASO,EAAE,KAAK,KAAK,EAAE;OACd,EAAE,KAAK,cAAc,EAAE;AAE9B,wBAAgB,eAAe,IAAI,KAAK,CAQvC;AAED,KAAK,kBAAkB,GAAG,qBAAqB,CAAC,OAAO,cAAc,CAAC,CAAC;AAEvE,wBAAgB,kBAAkB,CAAC,GAAG,IAAI,EAAE,kBAAkB,GAAG,cAAc,CAW9E;AAED,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAkBjG;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAyBtF;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,CAAC,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAYrE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type Fetch } from "./builtin-types.js";
|
|
2
|
+
import { type ReadableStream } from "./shim-types.js";
|
|
3
|
+
export declare function getDefaultFetch(): Fetch;
|
|
4
|
+
type ReadableStreamArgs = ConstructorParameters<typeof ReadableStream>;
|
|
5
|
+
export declare function makeReadableStream(...args: ReadableStreamArgs): ReadableStream;
|
|
6
|
+
export declare function ReadableStreamFrom<T>(iterable: Iterable<T> | AsyncIterable<T>): ReadableStream<T>;
|
|
7
|
+
/**
|
|
8
|
+
* Most browsers don't yet have async iterable support for ReadableStream,
|
|
9
|
+
* and Node has a very different way of reading bytes from its "ReadableStream".
|
|
10
|
+
*
|
|
11
|
+
* This polyfill was pulled from https://github.com/MattiasBuelens/web-streams-polyfill/pull/122#issuecomment-1627354490
|
|
12
|
+
*/
|
|
13
|
+
export declare function ReadableStreamToAsyncIterable<T>(stream: any): AsyncIterableIterator<T>;
|
|
14
|
+
/**
|
|
15
|
+
* Cancels a ReadableStream we don't need to consume.
|
|
16
|
+
* See https://undici.nodejs.org/#/?id=garbage-collection
|
|
17
|
+
*/
|
|
18
|
+
export declare function CancelReadableStream(stream: any): Promise<void>;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=shims.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shims.d.ts","sourceRoot":"","sources":["../src/internal/shims.ts"],"names":[],"mappings":"OASO,EAAE,KAAK,KAAK,EAAE;OACd,EAAE,KAAK,cAAc,EAAE;AAE9B,wBAAgB,eAAe,IAAI,KAAK,CAQvC;AAED,KAAK,kBAAkB,GAAG,qBAAqB,CAAC,OAAO,cAAc,CAAC,CAAC;AAEvE,wBAAgB,kBAAkB,CAAC,GAAG,IAAI,EAAE,kBAAkB,GAAG,cAAc,CAW9E;AAED,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAkBjG;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAyBtF;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,CAAC,MAAM,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAYrE"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.CancelReadableStream = exports.ReadableStreamToAsyncIterable = exports.ReadableStreamFrom = exports.makeReadableStream = exports.getDefaultFetch = void 0;
|
|
5
|
+
function getDefaultFetch() {
|
|
6
|
+
if (typeof fetch !== 'undefined') {
|
|
7
|
+
return fetch;
|
|
8
|
+
}
|
|
9
|
+
throw new Error('`fetch` is not defined as a global; Either pass `fetch` to the client, `new ComposioSDK({ fetch })` or polyfill the global, `globalThis.fetch = fetch`');
|
|
10
|
+
}
|
|
11
|
+
exports.getDefaultFetch = getDefaultFetch;
|
|
12
|
+
function makeReadableStream(...args) {
|
|
13
|
+
const ReadableStream = globalThis.ReadableStream;
|
|
14
|
+
if (typeof ReadableStream === 'undefined') {
|
|
15
|
+
// Note: All of the platforms / runtimes we officially support already define
|
|
16
|
+
// `ReadableStream` as a global, so this should only ever be hit on unsupported runtimes.
|
|
17
|
+
throw new Error('`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`');
|
|
18
|
+
}
|
|
19
|
+
return new ReadableStream(...args);
|
|
20
|
+
}
|
|
21
|
+
exports.makeReadableStream = makeReadableStream;
|
|
22
|
+
function ReadableStreamFrom(iterable) {
|
|
23
|
+
let iter = Symbol.asyncIterator in iterable ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator]();
|
|
24
|
+
return makeReadableStream({
|
|
25
|
+
start() { },
|
|
26
|
+
async pull(controller) {
|
|
27
|
+
const { done, value } = await iter.next();
|
|
28
|
+
if (done) {
|
|
29
|
+
controller.close();
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
controller.enqueue(value);
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
async cancel() {
|
|
36
|
+
await iter.return?.();
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
exports.ReadableStreamFrom = ReadableStreamFrom;
|
|
41
|
+
/**
|
|
42
|
+
* Most browsers don't yet have async iterable support for ReadableStream,
|
|
43
|
+
* and Node has a very different way of reading bytes from its "ReadableStream".
|
|
44
|
+
*
|
|
45
|
+
* This polyfill was pulled from https://github.com/MattiasBuelens/web-streams-polyfill/pull/122#issuecomment-1627354490
|
|
46
|
+
*/
|
|
47
|
+
function ReadableStreamToAsyncIterable(stream) {
|
|
48
|
+
if (stream[Symbol.asyncIterator])
|
|
49
|
+
return stream;
|
|
50
|
+
const reader = stream.getReader();
|
|
51
|
+
return {
|
|
52
|
+
async next() {
|
|
53
|
+
try {
|
|
54
|
+
const result = await reader.read();
|
|
55
|
+
if (result?.done)
|
|
56
|
+
reader.releaseLock(); // release lock when stream becomes closed
|
|
57
|
+
return result;
|
|
58
|
+
}
|
|
59
|
+
catch (e) {
|
|
60
|
+
reader.releaseLock(); // release lock when stream becomes errored
|
|
61
|
+
throw e;
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
async return() {
|
|
65
|
+
const cancelPromise = reader.cancel();
|
|
66
|
+
reader.releaseLock();
|
|
67
|
+
await cancelPromise;
|
|
68
|
+
return { done: true, value: undefined };
|
|
69
|
+
},
|
|
70
|
+
[Symbol.asyncIterator]() {
|
|
71
|
+
return this;
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
exports.ReadableStreamToAsyncIterable = ReadableStreamToAsyncIterable;
|
|
76
|
+
/**
|
|
77
|
+
* Cancels a ReadableStream we don't need to consume.
|
|
78
|
+
* See https://undici.nodejs.org/#/?id=garbage-collection
|
|
79
|
+
*/
|
|
80
|
+
async function CancelReadableStream(stream) {
|
|
81
|
+
if (stream === null || typeof stream !== 'object')
|
|
82
|
+
return;
|
|
83
|
+
if (stream[Symbol.asyncIterator]) {
|
|
84
|
+
await stream[Symbol.asyncIterator]().return?.();
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
const reader = stream.getReader();
|
|
88
|
+
const cancelPromise = reader.cancel();
|
|
89
|
+
reader.releaseLock();
|
|
90
|
+
await cancelPromise;
|
|
91
|
+
}
|
|
92
|
+
exports.CancelReadableStream = CancelReadableStream;
|
|
93
|
+
//# sourceMappingURL=shims.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shims.js","sourceRoot":"","sources":["../src/internal/shims.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAYtF,SAAgB,eAAe;IAC7B,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE;QAChC,OAAO,KAAY,CAAC;KACrB;IAED,MAAM,IAAI,KAAK,CACb,wJAAwJ,CACzJ,CAAC;AACJ,CAAC;AARD,0CAQC;AAID,SAAgB,kBAAkB,CAAC,GAAG,IAAwB;IAC5D,MAAM,cAAc,GAAI,UAAkB,CAAC,cAAc,CAAC;IAC1D,IAAI,OAAO,cAAc,KAAK,WAAW,EAAE;QACzC,6EAA6E;QAC7E,yFAAyF;QACzF,MAAM,IAAI,KAAK,CACb,yHAAyH,CAC1H,CAAC;KACH;IAED,OAAO,IAAI,cAAc,CAAC,GAAG,IAAI,CAAC,CAAC;AACrC,CAAC;AAXD,gDAWC;AAED,SAAgB,kBAAkB,CAAI,QAAwC;IAC5E,IAAI,IAAI,GACN,MAAM,CAAC,aAAa,IAAI,QAAQ,CAAC,CAAC,C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AAI,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;QAC1C,CAAC;QACD,CAAC,MAAM,CAAC,aAAa,CAAC;YACpB,OAAO,IAAI,CAAC;QACd,CAAC;KACF,CAAC;AACJ,CAAC;AAzBD,sEAyBC;AAED;;;GAGG;AACI,KAAK,UAAU,oBAAoB,CAAC,MAAW;IACpD,IAAI,MAAM,KAAK,IAAI,IAAI,OAAO,MAAM,KAAK,QAAQ;QAAE,OAAO;IAE1D,IAAI,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE;QAChC,MAAM,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC;QAChD,OAAO;KACR;IAED,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;IAClC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;IACtC,MAAM,CAAC,WAAW,EAAE,CAAC;IACrB,MAAM,aAAa,CAAC;AACtB,CAAC;AAZD,oDAYC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
export function getDefaultFetch() {
|
|
3
|
+
if (typeof fetch !== 'undefined') {
|
|
4
|
+
return fetch;
|
|
5
|
+
}
|
|
6
|
+
throw new Error('`fetch` is not defined as a global; Either pass `fetch` to the client, `new ComposioSDK({ fetch })` or polyfill the global, `globalThis.fetch = fetch`');
|
|
7
|
+
}
|
|
8
|
+
export function makeReadableStream(...args) {
|
|
9
|
+
const ReadableStream = globalThis.ReadableStream;
|
|
10
|
+
if (typeof ReadableStream === 'undefined') {
|
|
11
|
+
// Note: All of the platforms / runtimes we officially support already define
|
|
12
|
+
// `ReadableStream` as a global, so this should only ever be hit on unsupported runtimes.
|
|
13
|
+
throw new Error('`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`');
|
|
14
|
+
}
|
|
15
|
+
return new ReadableStream(...args);
|
|
16
|
+
}
|
|
17
|
+
export function ReadableStreamFrom(iterable) {
|
|
18
|
+
let iter = Symbol.asyncIterator in iterable ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator]();
|
|
19
|
+
return makeReadableStream({
|
|
20
|
+
start() { },
|
|
21
|
+
async pull(controller) {
|
|
22
|
+
const { done, value } = await iter.next();
|
|
23
|
+
if (done) {
|
|
24
|
+
controller.close();
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
controller.enqueue(value);
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
async cancel() {
|
|
31
|
+
await iter.return?.();
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Most browsers don't yet have async iterable support for ReadableStream,
|
|
37
|
+
* and Node has a very different way of reading bytes from its "ReadableStream".
|
|
38
|
+
*
|
|
39
|
+
* This polyfill was pulled from https://github.com/MattiasBuelens/web-streams-polyfill/pull/122#issuecomment-1627354490
|
|
40
|
+
*/
|
|
41
|
+
export function ReadableStreamToAsyncIterable(stream) {
|
|
42
|
+
if (stream[Symbol.asyncIterator])
|
|
43
|
+
return stream;
|
|
44
|
+
const reader = stream.getReader();
|
|
45
|
+
return {
|
|
46
|
+
async next() {
|
|
47
|
+
try {
|
|
48
|
+
const result = await reader.read();
|
|
49
|
+
if (result?.done)
|
|
50
|
+
reader.releaseLock(); // release lock when stream becomes closed
|
|
51
|
+
return result;
|
|
52
|
+
}
|
|
53
|
+
catch (e) {
|
|
54
|
+
reader.releaseLock(); // release lock when stream becomes errored
|
|
55
|
+
throw e;
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
async return() {
|
|
59
|
+
const cancelPromise = reader.cancel();
|
|
60
|
+
reader.releaseLock();
|
|
61
|
+
await cancelPromise;
|
|
62
|
+
return { done: true, value: undefined };
|
|
63
|
+
},
|
|
64
|
+
[Symbol.asyncIterator]() {
|
|
65
|
+
return this;
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Cancels a ReadableStream we don't need to consume.
|
|
71
|
+
* See https://undici.nodejs.org/#/?id=garbage-collection
|
|
72
|
+
*/
|
|
73
|
+
export async function CancelReadableStream(stream) {
|
|
74
|
+
if (stream === null || typeof stream !== 'object')
|
|
75
|
+
return;
|
|
76
|
+
if (stream[Symbol.asyncIterator]) {
|
|
77
|
+
await stream[Symbol.asyncIterator]().return?.();
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
const reader = stream.getReader();
|
|
81
|
+
const cancelPromise = reader.cancel();
|
|
82
|
+
reader.releaseLock();
|
|
83
|
+
await cancelPromise;
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=shims.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shims.mjs","sourceRoot":"","sources":["../src/internal/shims.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAYtF,MAAM,UAAU,eAAe;IAC7B,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE;QAChC,OAAO,KAAY,CAAC;KACrB;IAED,MAAM,IAAI,KAAK,CACb,wJAAwJ,CACzJ,CAAC;AACJ,CAAC;AAID,MAAM,UAAU,kBAAkB,CAAC,GAAG,IAAwB;IAC5D,MAAM,cAAc,GAAI,UAAkB,CAAC,cAAc,CAAC;IAC1D,IAAI,OAAO,cAAc,KAAK,WAAW,EAAE;QACzC,6EAA6E;QAC7E,yFAAyF;QACzF,MAAM,IAAI,KAAK,CACb,yHAAyH,CAC1H,CAAC;KACH;IAED,OAAO,IAAI,cAAc,CAAC,GAAG,IAAI,CAAC,CAAC;AACrC,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAI,QAAwC;IAC5E,IAAI,IAAI,GACN,MAAM,CAAC,aAAa,IAAI,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ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CAAC;YACpB,OAAO,IAAI,CAAC;QACd,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,MAAW;IACpD,IAAI,MAAM,KAAK,IAAI,IAAI,OAAO,MAAM,KAAK,QAAQ;QAAE,OAAO;IAE1D,IAAI,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE;QAChC,MAAM,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC;QAChD,OAAO;KACR;IAED,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;IAClC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;IACtC,MAAM,CAAC,WAAW,EAAE,CAAC;IACrB,MAAM,aAAa,CAAC;AACtB,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { type File } from "./shims/file.mjs";
|
|
2
|
+
import type { FilePropertyBag } from "./builtin-types.mjs";
|
|
3
|
+
type BlobLikePart = string | ArrayBuffer | ArrayBufferView | BlobLike | DataView;
|
|
4
|
+
/**
|
|
5
|
+
* Intended to match DOM Blob, node-fetch Blob, node:buffer Blob, etc.
|
|
6
|
+
* Don't add arrayBuffer here, node-fetch doesn't have it
|
|
7
|
+
*/
|
|
8
|
+
interface BlobLike {
|
|
9
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size) */
|
|
10
|
+
readonly size: number;
|
|
11
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type) */
|
|
12
|
+
readonly type: string;
|
|
13
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
14
|
+
text(): Promise<string>;
|
|
15
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
16
|
+
slice(start?: number, end?: number): BlobLike;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Intended to match DOM File, node:buffer File, undici File, etc.
|
|
20
|
+
*/
|
|
21
|
+
interface FileLike extends BlobLike {
|
|
22
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */
|
|
23
|
+
readonly lastModified: number;
|
|
24
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) */
|
|
25
|
+
readonly name?: string | undefined;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Intended to match DOM Response, node-fetch Response, undici Response, etc.
|
|
29
|
+
*/
|
|
30
|
+
export interface ResponseLike {
|
|
31
|
+
url: string;
|
|
32
|
+
blob(): Promise<BlobLike>;
|
|
33
|
+
}
|
|
34
|
+
export type ToFileInput = FileLike | ResponseLike | Exclude<BlobLikePart, string> | AsyncIterable<BlobLikePart>;
|
|
35
|
+
/**
|
|
36
|
+
* Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats
|
|
37
|
+
* @param value the raw content of the file. Can be an {@link Uploadable}, {@link BlobLikePart}, or {@link AsyncIterable} of {@link BlobLikePart}s
|
|
38
|
+
* @param {string=} name the name of the file. If omitted, toFile will try to determine a file name from bits if possible
|
|
39
|
+
* @param {Object=} options additional properties
|
|
40
|
+
* @param {string=} options.type the MIME type of the content
|
|
41
|
+
* @param {number=} options.lastModified the last modified timestamp
|
|
42
|
+
* @returns a {@link File} with the given properties
|
|
43
|
+
*/
|
|
44
|
+
export declare function toFile(value: ToFileInput | PromiseLike<ToFileInput>, name?: string | null | undefined, options?: FilePropertyBag | undefined): Promise<File>;
|
|
45
|
+
export {};
|
|
46
|
+
//# sourceMappingURL=to-file.d.mts.map
|