@knocklabs/node 0.6.19 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -7
- package/LICENSE +201 -21
- package/README.md +338 -129
- 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 +220 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +220 -0
- package/client.d.ts.map +1 -0
- package/client.js +502 -0
- package/client.js.map +1 -0
- package/client.mjs +475 -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/pagination.d.mts +112 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +112 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +183 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +174 -0
- package/core/pagination.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 +7 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +7 -0
- package/index.d.ts.map +1 -0
- package/index.js +32 -0
- package/index.js.map +1 -0
- package/index.mjs +8 -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 +79 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +74 -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/qs/formats.d.mts +6 -0
- package/internal/qs/formats.d.mts.map +1 -0
- package/internal/qs/formats.d.ts +6 -0
- package/internal/qs/formats.d.ts.map +1 -0
- package/internal/qs/formats.js +11 -0
- package/internal/qs/formats.js.map +1 -0
- package/internal/qs/formats.mjs +8 -0
- package/internal/qs/formats.mjs.map +1 -0
- package/internal/qs/index.d.mts +10 -0
- package/internal/qs/index.d.mts.map +1 -0
- package/internal/qs/index.d.ts +10 -0
- package/internal/qs/index.d.ts.map +1 -0
- package/internal/qs/index.js +14 -0
- package/internal/qs/index.js.map +1 -0
- package/internal/qs/index.mjs +10 -0
- package/internal/qs/index.mjs.map +1 -0
- package/internal/qs/stringify.d.mts +3 -0
- package/internal/qs/stringify.d.mts.map +1 -0
- package/internal/qs/stringify.d.ts +3 -0
- package/internal/qs/stringify.d.ts.map +1 -0
- package/internal/qs/stringify.js +280 -0
- package/internal/qs/stringify.js.map +1 -0
- package/internal/qs/stringify.mjs +276 -0
- package/internal/qs/stringify.mjs.map +1 -0
- package/internal/qs/types.d.mts +57 -0
- package/internal/qs/types.d.mts.map +1 -0
- package/internal/qs/types.d.ts +57 -0
- package/internal/qs/types.d.ts.map +1 -0
- package/{dist/src/common/interfaces.js → internal/qs/types.js} +1 -0
- package/internal/qs/types.js.map +1 -0
- package/internal/qs/types.mjs +2 -0
- package/internal/qs/types.mjs.map +1 -0
- package/internal/qs/utils.d.mts +14 -0
- package/internal/qs/utils.d.mts.map +1 -0
- package/internal/qs/utils.d.ts +14 -0
- package/internal/qs/utils.d.ts.map +1 -0
- package/internal/qs/utils.js +229 -0
- package/internal/qs/utils.js.map +1 -0
- package/internal/qs/utils.mjs +217 -0
- package/internal/qs/utils.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 +71 -0
- package/internal/shims/getBuiltinModule.js.map +1 -0
- package/internal/shims/getBuiltinModule.mjs +67 -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 +38 -0
- package/internal/utils/base64.js.map +1 -0
- package/internal/utils/base64.mjs +33 -0
- package/internal/utils/base64.mjs.map +1 -0
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/bytes.d.ts +4 -0
- package/internal/utils/bytes.d.ts.map +1 -0
- package/internal/utils/bytes.js +32 -0
- package/internal/utils/bytes.js.map +1 -0
- package/internal/utils/bytes.mjs +26 -0
- package/internal/utils/bytes.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 +85 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +79 -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/lib/index.d.mts +6 -0
- package/lib/index.d.mts.map +1 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.d.ts.map +1 -0
- package/{dist/src → lib}/index.js +6 -10
- package/lib/index.js.map +1 -0
- package/lib/index.mjs +6 -0
- package/lib/index.mjs.map +1 -0
- package/lib/tokenSigner.d.mts +46 -0
- package/lib/tokenSigner.d.mts.map +1 -0
- package/lib/tokenSigner.d.ts +46 -0
- package/lib/tokenSigner.d.ts.map +1 -0
- package/lib/tokenSigner.js +154 -0
- package/lib/tokenSigner.js.map +1 -0
- package/lib/tokenSigner.mjs +125 -0
- package/lib/tokenSigner.mjs.map +1 -0
- package/lib/userTokens.d.mts +32 -0
- package/lib/userTokens.d.mts.map +1 -0
- package/{dist/src/common → lib}/userTokens.d.ts +7 -3
- package/lib/userTokens.d.ts.map +1 -0
- package/{dist/src/common → lib}/userTokens.js +5 -1
- package/lib/userTokens.js.map +1 -0
- package/lib/userTokens.mjs +12 -0
- package/lib/userTokens.mjs.map +1 -0
- package/package.json +157 -39
- package/pagination.d.mts +2 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +2 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +19 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +2 -0
- package/pagination.mjs.map +1 -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/audiences.d.mts +123 -0
- package/resources/audiences.d.mts.map +1 -0
- package/resources/audiences.d.ts +123 -0
- package/resources/audiences.d.ts.map +1 -0
- package/resources/audiences.js +28 -0
- package/resources/audiences.js.map +1 -0
- package/resources/audiences.mjs +24 -0
- package/resources/audiences.mjs.map +1 -0
- package/resources/bulk-operations.d.mts +90 -0
- package/resources/bulk-operations.d.mts.map +1 -0
- package/resources/bulk-operations.d.ts +90 -0
- package/resources/bulk-operations.d.ts.map +1 -0
- package/resources/bulk-operations.js +16 -0
- package/resources/bulk-operations.js.map +1 -0
- package/resources/bulk-operations.mjs +12 -0
- package/resources/bulk-operations.mjs.map +1 -0
- package/resources/channels/bulk.d.mts +61 -0
- package/resources/channels/bulk.d.mts.map +1 -0
- package/resources/channels/bulk.d.ts +61 -0
- package/resources/channels/bulk.d.ts.map +1 -0
- package/resources/channels/bulk.js +19 -0
- package/resources/channels/bulk.js.map +1 -0
- package/resources/channels/bulk.mjs +15 -0
- package/resources/channels/bulk.mjs.map +1 -0
- package/resources/channels/channels.d.mts +10 -0
- package/resources/channels/channels.d.mts.map +1 -0
- package/resources/channels/channels.d.ts +10 -0
- package/resources/channels/channels.d.ts.map +1 -0
- package/resources/channels/channels.js +39 -0
- package/resources/channels/channels.js.map +1 -0
- package/resources/channels/channels.mjs +12 -0
- package/resources/channels/channels.mjs.map +1 -0
- package/resources/channels/index.d.mts +3 -0
- package/resources/channels/index.d.mts.map +1 -0
- package/resources/channels/index.d.ts +3 -0
- package/resources/channels/index.d.ts.map +1 -0
- package/resources/channels/index.js +9 -0
- package/resources/channels/index.js.map +1 -0
- package/resources/channels/index.mjs +4 -0
- package/resources/channels/index.mjs.map +1 -0
- package/resources/channels.d.mts +2 -0
- package/resources/channels.d.mts.map +1 -0
- package/resources/channels.d.ts +2 -0
- package/resources/channels.d.ts.map +1 -0
- package/resources/channels.js +19 -0
- package/resources/channels.js.map +1 -0
- package/resources/channels.mjs +3 -0
- package/resources/channels.mjs.map +1 -0
- package/resources/index.d.mts +14 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +14 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +31 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +15 -0
- package/resources/index.mjs.map +1 -0
- package/resources/integrations/census.d.mts +41 -0
- package/resources/integrations/census.d.mts.map +1 -0
- package/resources/integrations/census.d.ts +41 -0
- package/resources/integrations/census.d.ts.map +1 -0
- package/resources/integrations/census.js +15 -0
- package/resources/integrations/census.js.map +1 -0
- package/resources/integrations/census.mjs +11 -0
- package/resources/integrations/census.mjs.map +1 -0
- package/resources/integrations/hightouch.d.mts +41 -0
- package/resources/integrations/hightouch.d.mts.map +1 -0
- package/resources/integrations/hightouch.d.ts +41 -0
- package/resources/integrations/hightouch.d.ts.map +1 -0
- package/resources/integrations/hightouch.js +15 -0
- package/resources/integrations/hightouch.js.map +1 -0
- package/resources/integrations/hightouch.mjs +11 -0
- package/resources/integrations/hightouch.mjs.map +1 -0
- package/resources/integrations/index.d.mts +4 -0
- package/resources/integrations/index.d.mts.map +1 -0
- package/resources/integrations/index.d.ts +4 -0
- package/resources/integrations/index.d.ts.map +1 -0
- package/resources/integrations/index.js +11 -0
- package/resources/integrations/index.js.map +1 -0
- package/resources/integrations/index.mjs +5 -0
- package/resources/integrations/index.mjs.map +1 -0
- package/resources/integrations/integrations.d.mts +14 -0
- package/resources/integrations/integrations.d.mts.map +1 -0
- package/resources/integrations/integrations.d.ts +14 -0
- package/resources/integrations/integrations.d.ts.map +1 -0
- package/resources/integrations/integrations.js +43 -0
- package/resources/integrations/integrations.js.map +1 -0
- package/resources/integrations/integrations.mjs +16 -0
- package/resources/integrations/integrations.mjs.map +1 -0
- package/resources/integrations.d.mts +2 -0
- package/resources/integrations.d.mts.map +1 -0
- package/resources/integrations.d.ts +2 -0
- package/resources/integrations.d.ts.map +1 -0
- package/resources/integrations.js +19 -0
- package/resources/integrations.js.map +1 -0
- package/resources/integrations.mjs +3 -0
- package/resources/integrations.mjs.map +1 -0
- package/resources/messages/activities.d.mts +22 -0
- package/resources/messages/activities.d.mts.map +1 -0
- package/resources/messages/activities.d.ts +22 -0
- package/resources/messages/activities.d.ts.map +1 -0
- package/resources/messages/activities.js +17 -0
- package/resources/messages/activities.js.map +1 -0
- package/resources/messages/activities.mjs +13 -0
- package/resources/messages/activities.mjs.map +1 -0
- package/resources/messages/batch.d.mts +379 -0
- package/resources/messages/batch.d.mts.map +1 -0
- package/resources/messages/batch.d.ts +379 -0
- package/resources/messages/batch.d.ts.map +1 -0
- package/resources/messages/batch.js +71 -0
- package/resources/messages/batch.js.map +1 -0
- package/resources/messages/batch.mjs +67 -0
- package/resources/messages/batch.mjs.map +1 -0
- package/resources/messages/index.d.mts +4 -0
- package/resources/messages/index.d.mts.map +1 -0
- package/resources/messages/index.d.ts +4 -0
- package/resources/messages/index.d.ts.map +1 -0
- package/resources/messages/index.js +11 -0
- package/resources/messages/index.js.map +1 -0
- package/resources/messages/index.mjs +5 -0
- package/resources/messages/index.mjs.map +1 -0
- package/resources/messages/messages.d.mts +677 -0
- package/resources/messages/messages.d.mts.map +1 -0
- package/resources/messages/messages.d.ts +677 -0
- package/resources/messages/messages.d.ts.map +1 -0
- package/resources/messages/messages.js +144 -0
- package/resources/messages/messages.js.map +1 -0
- package/resources/messages/messages.mjs +117 -0
- package/resources/messages/messages.mjs.map +1 -0
- package/resources/messages.d.mts +2 -0
- package/resources/messages.d.mts.map +1 -0
- package/resources/messages.d.ts +2 -0
- package/resources/messages.d.ts.map +1 -0
- package/resources/messages.js +19 -0
- package/resources/messages.js.map +1 -0
- package/resources/messages.mjs +3 -0
- package/resources/messages.mjs.map +1 -0
- package/resources/objects/bulk.d.mts +59 -0
- package/resources/objects/bulk.d.mts.map +1 -0
- package/resources/objects/bulk.d.ts +59 -0
- package/resources/objects/bulk.d.ts.map +1 -0
- package/resources/objects/bulk.js +32 -0
- package/resources/objects/bulk.js.map +1 -0
- package/resources/objects/bulk.mjs +28 -0
- package/resources/objects/bulk.mjs.map +1 -0
- package/resources/objects/index.d.mts +3 -0
- package/resources/objects/index.d.mts.map +1 -0
- package/resources/objects/index.d.ts +3 -0
- package/resources/objects/index.d.ts.map +1 -0
- package/resources/objects/index.js +9 -0
- package/resources/objects/index.js.map +1 -0
- package/resources/objects/index.mjs +4 -0
- package/resources/objects/index.mjs.map +1 -0
- package/resources/objects/objects.d.mts +389 -0
- package/resources/objects/objects.d.mts.map +1 -0
- package/resources/objects/objects.d.ts +389 -0
- package/resources/objects/objects.d.ts.map +1 -0
- package/resources/objects/objects.js +163 -0
- package/resources/objects/objects.js.map +1 -0
- package/resources/objects/objects.mjs +136 -0
- package/resources/objects/objects.mjs.map +1 -0
- package/resources/objects.d.mts +2 -0
- package/resources/objects.d.mts.map +1 -0
- package/resources/objects.d.ts +2 -0
- package/resources/objects.d.ts.map +1 -0
- package/resources/objects.js +19 -0
- package/resources/objects.js.map +1 -0
- package/resources/objects.mjs +3 -0
- package/resources/objects.mjs.map +1 -0
- package/resources/providers/index.d.mts +4 -0
- package/resources/providers/index.d.mts.map +1 -0
- package/resources/providers/index.d.ts +4 -0
- package/resources/providers/index.d.ts.map +1 -0
- package/resources/providers/index.js +11 -0
- package/resources/providers/index.js.map +1 -0
- package/resources/providers/index.mjs +5 -0
- package/resources/providers/index.mjs.map +1 -0
- package/resources/providers/ms-teams.d.mts +183 -0
- package/resources/providers/ms-teams.d.mts.map +1 -0
- package/resources/providers/ms-teams.d.ts +183 -0
- package/resources/providers/ms-teams.d.ts.map +1 -0
- package/resources/providers/ms-teams.js +42 -0
- package/resources/providers/ms-teams.js.map +1 -0
- package/resources/providers/ms-teams.mjs +38 -0
- package/resources/providers/ms-teams.mjs.map +1 -0
- package/resources/providers/providers.d.mts +14 -0
- package/resources/providers/providers.d.mts.map +1 -0
- package/resources/providers/providers.d.ts +14 -0
- package/resources/providers/providers.d.ts.map +1 -0
- package/resources/providers/providers.js +43 -0
- package/resources/providers/providers.js.map +1 -0
- package/resources/providers/providers.mjs +16 -0
- package/resources/providers/providers.mjs.map +1 -0
- package/resources/providers/slack.d.mts +127 -0
- package/resources/providers/slack.d.mts.map +1 -0
- package/resources/providers/slack.d.ts +127 -0
- package/resources/providers/slack.d.ts.map +1 -0
- package/resources/providers/slack.js +33 -0
- package/resources/providers/slack.js.map +1 -0
- package/resources/providers/slack.mjs +29 -0
- package/resources/providers/slack.mjs.map +1 -0
- package/resources/providers.d.mts +2 -0
- package/resources/providers.d.mts.map +1 -0
- package/resources/providers.d.ts +2 -0
- package/resources/providers.d.ts.map +1 -0
- package/resources/providers.js +19 -0
- package/resources/providers.js.map +1 -0
- package/resources/providers.mjs +3 -0
- package/resources/providers.mjs.map +1 -0
- package/resources/recipients/channel-data.d.mts +205 -0
- package/resources/recipients/channel-data.d.mts.map +1 -0
- package/resources/recipients/channel-data.d.ts +205 -0
- package/resources/recipients/channel-data.d.ts.map +1 -0
- package/resources/recipients/channel-data.js +9 -0
- package/resources/recipients/channel-data.js.map +1 -0
- package/resources/recipients/channel-data.mjs +5 -0
- package/resources/recipients/channel-data.mjs.map +1 -0
- package/resources/recipients/index.d.mts +5 -0
- package/resources/recipients/index.d.mts.map +1 -0
- package/resources/recipients/index.d.ts +5 -0
- package/resources/recipients/index.d.ts.map +1 -0
- package/resources/recipients/index.js +13 -0
- package/resources/recipients/index.js.map +1 -0
- package/resources/recipients/index.mjs +6 -0
- package/resources/recipients/index.mjs.map +1 -0
- package/resources/recipients/preferences.d.mts +155 -0
- package/resources/recipients/preferences.d.mts.map +1 -0
- package/resources/recipients/preferences.d.ts +155 -0
- package/resources/recipients/preferences.d.ts.map +1 -0
- package/resources/recipients/preferences.js +9 -0
- package/resources/recipients/preferences.js.map +1 -0
- package/resources/recipients/preferences.mjs +5 -0
- package/resources/recipients/preferences.mjs.map +1 -0
- package/resources/recipients/recipients.d.mts +51 -0
- package/resources/recipients/recipients.d.mts.map +1 -0
- package/resources/recipients/recipients.d.ts +51 -0
- package/resources/recipients/recipients.d.ts.map +1 -0
- package/resources/recipients/recipients.js +45 -0
- package/resources/recipients/recipients.js.map +1 -0
- package/resources/recipients/recipients.mjs +18 -0
- package/resources/recipients/recipients.mjs.map +1 -0
- package/resources/recipients/subscriptions.d.mts +40 -0
- package/resources/recipients/subscriptions.d.mts.map +1 -0
- package/resources/recipients/subscriptions.d.ts +40 -0
- package/resources/recipients/subscriptions.d.ts.map +1 -0
- package/resources/recipients/subscriptions.js +9 -0
- package/resources/recipients/subscriptions.js.map +1 -0
- package/resources/recipients/subscriptions.mjs +5 -0
- package/resources/recipients/subscriptions.mjs.map +1 -0
- package/resources/recipients.d.mts +2 -0
- package/resources/recipients.d.mts.map +1 -0
- package/resources/recipients.d.ts +2 -0
- package/resources/recipients.d.ts.map +1 -0
- package/resources/recipients.js +19 -0
- package/resources/recipients.js.map +1 -0
- package/resources/recipients.mjs +3 -0
- package/resources/recipients.mjs.map +1 -0
- package/resources/schedules/bulk.d.mts +68 -0
- package/resources/schedules/bulk.d.mts.map +1 -0
- package/resources/schedules/bulk.d.ts +68 -0
- package/resources/schedules/bulk.d.ts.map +1 -0
- package/resources/schedules/bulk.js +17 -0
- package/resources/schedules/bulk.js.map +1 -0
- package/resources/schedules/bulk.mjs +13 -0
- package/resources/schedules/bulk.mjs.map +1 -0
- package/resources/schedules/index.d.mts +3 -0
- package/resources/schedules/index.d.mts.map +1 -0
- package/resources/schedules/index.d.ts +3 -0
- package/resources/schedules/index.d.ts.map +1 -0
- package/resources/schedules/index.js +9 -0
- package/resources/schedules/index.js.map +1 -0
- package/resources/schedules/index.mjs +4 -0
- package/resources/schedules/index.mjs.map +1 -0
- package/resources/schedules/schedules.d.mts +225 -0
- package/resources/schedules/schedules.d.mts.map +1 -0
- package/resources/schedules/schedules.d.ts +225 -0
- package/resources/schedules/schedules.d.ts.map +1 -0
- package/resources/schedules/schedules.js +74 -0
- package/resources/schedules/schedules.js.map +1 -0
- package/resources/schedules/schedules.mjs +47 -0
- package/resources/schedules/schedules.mjs.map +1 -0
- package/resources/schedules.d.mts +2 -0
- package/resources/schedules.d.mts.map +1 -0
- package/resources/schedules.d.ts +2 -0
- package/resources/schedules.d.ts.map +1 -0
- package/resources/schedules.js +19 -0
- package/resources/schedules.js.map +1 -0
- package/resources/schedules.mjs +3 -0
- package/resources/schedules.mjs.map +1 -0
- package/resources/shared.d.mts +45 -0
- package/resources/shared.d.mts.map +1 -0
- package/resources/shared.d.ts +45 -0
- package/resources/shared.d.ts.map +1 -0
- package/resources/shared.js +9 -0
- package/resources/shared.js.map +1 -0
- package/resources/shared.mjs +5 -0
- package/resources/shared.mjs.map +1 -0
- package/resources/tenants/bulk.d.mts +31 -0
- package/resources/tenants/bulk.d.mts.map +1 -0
- package/resources/tenants/bulk.d.ts +31 -0
- package/resources/tenants/bulk.d.ts.map +1 -0
- package/resources/tenants/bulk.js +22 -0
- package/resources/tenants/bulk.js.map +1 -0
- package/resources/tenants/bulk.mjs +18 -0
- package/resources/tenants/bulk.mjs.map +1 -0
- package/resources/tenants/index.d.mts +3 -0
- package/resources/tenants/index.d.mts.map +1 -0
- package/resources/tenants/index.d.ts +3 -0
- package/resources/tenants/index.d.ts.map +1 -0
- package/resources/tenants/index.js +9 -0
- package/resources/tenants/index.js.map +1 -0
- package/resources/tenants/index.mjs +4 -0
- package/resources/tenants/index.mjs.map +1 -0
- package/resources/tenants/tenants.d.mts +233 -0
- package/resources/tenants/tenants.d.mts.map +1 -0
- package/resources/tenants/tenants.d.ts +233 -0
- package/resources/tenants/tenants.d.ts.map +1 -0
- package/resources/tenants/tenants.js +66 -0
- package/resources/tenants/tenants.js.map +1 -0
- package/resources/tenants/tenants.mjs +39 -0
- package/resources/tenants/tenants.mjs.map +1 -0
- package/resources/tenants.d.mts +2 -0
- package/resources/tenants.d.mts.map +1 -0
- package/resources/tenants.d.ts +2 -0
- package/resources/tenants.d.ts.map +1 -0
- package/resources/tenants.js +19 -0
- package/resources/tenants.js.map +1 -0
- package/resources/tenants.mjs +3 -0
- package/resources/tenants.mjs.map +1 -0
- package/resources/users/bulk.d.mts +51 -0
- package/resources/users/bulk.d.mts.map +1 -0
- package/resources/users/bulk.d.ts +51 -0
- package/resources/users/bulk.d.ts.map +1 -0
- package/resources/users/bulk.js +32 -0
- package/resources/users/bulk.js.map +1 -0
- package/resources/users/bulk.mjs +28 -0
- package/resources/users/bulk.mjs.map +1 -0
- package/resources/users/feeds.d.mts +229 -0
- package/resources/users/feeds.d.mts.map +1 -0
- package/resources/users/feeds.d.ts +229 -0
- package/resources/users/feeds.d.ts.map +1 -0
- package/resources/users/feeds.js +24 -0
- package/resources/users/feeds.js.map +1 -0
- package/resources/users/feeds.mjs +20 -0
- package/resources/users/feeds.mjs.map +1 -0
- package/resources/users/guides.d.mts +225 -0
- package/resources/users/guides.d.mts.map +1 -0
- package/resources/users/guides.d.ts +225 -0
- package/resources/users/guides.d.ts.map +1 -0
- package/resources/users/guides.js +46 -0
- package/resources/users/guides.js.map +1 -0
- package/resources/users/guides.mjs +42 -0
- package/resources/users/guides.mjs.map +1 -0
- package/resources/users/index.d.mts +5 -0
- package/resources/users/index.d.mts.map +1 -0
- package/resources/users/index.d.ts +5 -0
- package/resources/users/index.d.ts.map +1 -0
- package/resources/users/index.js +13 -0
- package/resources/users/index.js.map +1 -0
- package/resources/users/index.mjs +6 -0
- package/resources/users/index.mjs.map +1 -0
- package/resources/users/users.d.mts +431 -0
- package/resources/users/users.d.mts.map +1 -0
- package/resources/users/users.d.ts +431 -0
- package/resources/users/users.d.ts.map +1 -0
- package/resources/users/users.js +145 -0
- package/resources/users/users.js.map +1 -0
- package/resources/users/users.mjs +118 -0
- package/resources/users/users.mjs.map +1 -0
- package/resources/users.d.mts +2 -0
- package/resources/users.d.mts.map +1 -0
- package/resources/users.d.ts +2 -0
- package/resources/users.d.ts.map +1 -0
- package/resources/users.js +19 -0
- package/resources/users.js.map +1 -0
- package/resources/users.mjs +3 -0
- package/resources/users.mjs.map +1 -0
- package/resources/workflows.d.mts +83 -0
- package/resources/workflows.d.mts.map +1 -0
- package/resources/workflows.d.ts +83 -0
- package/resources/workflows.d.ts.map +1 -0
- package/resources/workflows.js +28 -0
- package/resources/workflows.js.map +1 -0
- package/resources/workflows.mjs +24 -0
- package/resources/workflows.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 +967 -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/pagination.ts +323 -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 +23 -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 +97 -0
- package/src/internal/parse.ts +50 -0
- package/src/internal/qs/LICENSE.md +13 -0
- package/src/internal/qs/README.md +3 -0
- package/src/internal/qs/formats.ts +9 -0
- package/src/internal/qs/index.ts +13 -0
- package/src/internal/qs/stringify.ts +388 -0
- package/src/internal/qs/types.ts +71 -0
- package/src/internal/qs/utils.ts +265 -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 +66 -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 +40 -0
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/env.ts +18 -0
- package/src/internal/utils/log.ts +126 -0
- package/src/internal/utils/path.ts +63 -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/lib/index.ts +6 -0
- package/src/lib/tokenSigner.ts +170 -0
- package/src/lib/userTokens.ts +38 -0
- package/src/pagination.ts +2 -0
- package/src/resource.ts +2 -0
- package/src/resources/audiences.ts +163 -0
- package/src/resources/bulk-operations.ts +113 -0
- package/src/resources/channels/bulk.ts +107 -0
- package/src/resources/channels/channels.ts +15 -0
- package/src/resources/channels/index.ts +4 -0
- package/src/resources/channels.ts +3 -0
- package/src/resources/index.ts +108 -0
- package/src/resources/integrations/census.ts +58 -0
- package/src/resources/integrations/hightouch.ts +58 -0
- package/src/resources/integrations/index.ts +9 -0
- package/src/resources/integrations/integrations.ts +33 -0
- package/src/resources/integrations.ts +3 -0
- package/src/resources/messages/activities.ts +38 -0
- package/src/resources/messages/batch.ts +499 -0
- package/src/resources/messages/index.ts +39 -0
- package/src/resources/messages/messages.ts +954 -0
- package/src/resources/messages.ts +3 -0
- package/src/resources/objects/bulk.ts +92 -0
- package/src/resources/objects/index.ts +23 -0
- package/src/resources/objects/objects.ts +623 -0
- package/src/resources/objects.ts +3 -0
- package/src/resources/providers/index.ts +25 -0
- package/src/resources/providers/ms-teams.ts +260 -0
- package/src/resources/providers/providers.ts +61 -0
- package/src/resources/providers/slack.ts +186 -0
- package/src/resources/providers.ts +3 -0
- package/src/resources/recipients/channel-data.ts +255 -0
- package/src/resources/recipients/index.ts +22 -0
- package/src/resources/recipients/preferences.ts +192 -0
- package/src/resources/recipients/recipients.ts +101 -0
- package/src/resources/recipients/subscriptions.ts +49 -0
- package/src/resources/recipients.ts +3 -0
- package/src/resources/schedules/bulk.ts +82 -0
- package/src/resources/schedules/index.ts +16 -0
- package/src/resources/schedules/schedules.ts +295 -0
- package/src/resources/schedules.ts +3 -0
- package/src/resources/shared.ts +72 -0
- package/src/resources/tenants/bulk.ts +42 -0
- package/src/resources/tenants/index.ts +13 -0
- package/src/resources/tenants/tenants.ts +300 -0
- package/src/resources/tenants.ts +3 -0
- package/src/resources/users/bulk.ts +73 -0
- package/src/resources/users/feeds.ts +296 -0
- package/src/resources/users/guides.ts +318 -0
- package/src/resources/users/index.ts +40 -0
- package/src/resources/users/users.ts +666 -0
- package/src/resources/users.ts +3 -0
- package/src/resources/workflows.ts +110 -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
- package/dist/package.json +0 -48
- package/dist/src/common/exceptions.d.ts +0 -48
- package/dist/src/common/exceptions.js +0 -78
- package/dist/src/common/fetchClient.d.ts +0 -28
- package/dist/src/common/fetchClient.js +0 -148
- package/dist/src/common/interfaces.d.ts +0 -70
- package/dist/src/index.d.ts +0 -8
- package/dist/src/knock.d.ts +0 -57
- package/dist/src/knock.js +0 -241
- package/dist/src/resources/activities/interfaces.d.ts +0 -11
- package/dist/src/resources/activities/interfaces.js +0 -2
- package/dist/src/resources/bulk_operations/index.d.ts +0 -7
- package/dist/src/resources/bulk_operations/index.js +0 -24
- package/dist/src/resources/bulk_operations/interfaces.d.ts +0 -12
- package/dist/src/resources/bulk_operations/interfaces.js +0 -2
- package/dist/src/resources/messages/index.d.ts +0 -16
- package/dist/src/resources/messages/index.js +0 -93
- package/dist/src/resources/messages/interfaces.d.ts +0 -58
- package/dist/src/resources/messages/interfaces.js +0 -2
- package/dist/src/resources/objects/index.d.ts +0 -36
- package/dist/src/resources/objects/index.js +0 -203
- package/dist/src/resources/objects/interfaces.d.ts +0 -51
- package/dist/src/resources/objects/interfaces.js +0 -2
- package/dist/src/resources/preferences/helpers.d.ts +0 -7
- package/dist/src/resources/preferences/helpers.js +0 -11
- package/dist/src/resources/preferences/interfaces.d.ts +0 -30
- package/dist/src/resources/preferences/interfaces.js +0 -2
- package/dist/src/resources/slack/index.d.ts +0 -9
- package/dist/src/resources/slack/index.js +0 -75
- package/dist/src/resources/slack/interfaces.d.ts +0 -30
- package/dist/src/resources/slack/interfaces.js +0 -2
- package/dist/src/resources/tenants/index.d.ts +0 -11
- package/dist/src/resources/tenants/index.js +0 -42
- package/dist/src/resources/tenants/interfaces.d.ts +0 -32
- package/dist/src/resources/tenants/interfaces.js +0 -2
- package/dist/src/resources/users/index.d.ts +0 -36
- package/dist/src/resources/users/index.js +0 -232
- package/dist/src/resources/users/interfaces.d.ts +0 -34
- package/dist/src/resources/users/interfaces.js +0 -2
- package/dist/src/resources/workflows/index.d.ts +0 -13
- package/dist/src/resources/workflows/index.js +0 -72
- package/dist/src/resources/workflows/interfaces.d.ts +0 -90
- package/dist/src/resources/workflows/interfaces.js +0 -20
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"values.d.ts","sourceRoot":"","sources":["../../src/internal/utils/values.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,aAAa,QAAS,MAAM,KAAG,OAE3C,CAAC;AAEF,oFAAoF;AACpF,wBAAgB,QAAQ,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,CAM3C;AAGD,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAIlE;AAGD,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,WAAW,GAAG,GAAG,IAAI,MAAM,CAAC,CAE1F;AAED,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAElE;AAED,eAAO,MAAM,aAAa,uCAMzB,CAAC;AAEF,eAAO,MAAM,uBAAuB,SAAU,MAAM,KAAK,OAAO,KAAG,MAQlE,CAAC;AAEF,eAAO,MAAM,aAAa,UAAW,OAAO,KAAG,MAK9C,CAAC;AAEF,eAAO,MAAM,WAAW,UAAW,OAAO,KAAG,MAK5C,CAAC;AAEF,eAAO,MAAM,aAAa,UAAW,OAAO,KAAG,OAI9C,CAAC;AAEF,eAAO,MAAM,kBAAkB,UAAW,OAAO,KAAG,MAAM,GAAG,SAK5D,CAAC;AAEF,eAAO,MAAM,gBAAgB,UAAW,OAAO,KAAG,MAAM,GAAG,SAK1D,CAAC;AAEF,eAAO,MAAM,kBAAkB,UAAW,OAAO,KAAG,OAAO,GAAG,SAK7D,CAAC;AAEF,eAAO,MAAM,QAAQ,SAAU,MAAM,QAMpC,CAAC"}
|
|
@@ -0,0 +1,109 @@
|
|
|
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.safeJSON = exports.maybeCoerceBoolean = exports.maybeCoerceFloat = exports.maybeCoerceInteger = exports.coerceBoolean = exports.coerceFloat = exports.coerceInteger = exports.validatePositiveInteger = exports.ensurePresent = exports.isObj = exports.hasOwn = exports.isEmptyObj = exports.maybeObj = exports.isAbsoluteURL = void 0;
|
|
5
|
+
const error_1 = require("../../core/error.js");
|
|
6
|
+
// https://url.spec.whatwg.org/#url-scheme-string
|
|
7
|
+
const startsWithSchemeRegexp = /^[a-z][a-z0-9+.-]*:/i;
|
|
8
|
+
const isAbsoluteURL = (url) => {
|
|
9
|
+
return startsWithSchemeRegexp.test(url);
|
|
10
|
+
};
|
|
11
|
+
exports.isAbsoluteURL = isAbsoluteURL;
|
|
12
|
+
/** Returns an object if the given value isn't an object, otherwise returns as-is */
|
|
13
|
+
function maybeObj(x) {
|
|
14
|
+
if (typeof x !== 'object') {
|
|
15
|
+
return {};
|
|
16
|
+
}
|
|
17
|
+
return x ?? {};
|
|
18
|
+
}
|
|
19
|
+
exports.maybeObj = maybeObj;
|
|
20
|
+
// https://stackoverflow.com/a/34491287
|
|
21
|
+
function isEmptyObj(obj) {
|
|
22
|
+
if (!obj)
|
|
23
|
+
return true;
|
|
24
|
+
for (const _k in obj)
|
|
25
|
+
return false;
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
exports.isEmptyObj = isEmptyObj;
|
|
29
|
+
// https://eslint.org/docs/latest/rules/no-prototype-builtins
|
|
30
|
+
function hasOwn(obj, key) {
|
|
31
|
+
return Object.prototype.hasOwnProperty.call(obj, key);
|
|
32
|
+
}
|
|
33
|
+
exports.hasOwn = hasOwn;
|
|
34
|
+
function isObj(obj) {
|
|
35
|
+
return obj != null && typeof obj === 'object' && !Array.isArray(obj);
|
|
36
|
+
}
|
|
37
|
+
exports.isObj = isObj;
|
|
38
|
+
const ensurePresent = (value) => {
|
|
39
|
+
if (value == null) {
|
|
40
|
+
throw new error_1.KnockError(`Expected a value to be given but received ${value} instead.`);
|
|
41
|
+
}
|
|
42
|
+
return value;
|
|
43
|
+
};
|
|
44
|
+
exports.ensurePresent = ensurePresent;
|
|
45
|
+
const validatePositiveInteger = (name, n) => {
|
|
46
|
+
if (typeof n !== 'number' || !Number.isInteger(n)) {
|
|
47
|
+
throw new error_1.KnockError(`${name} must be an integer`);
|
|
48
|
+
}
|
|
49
|
+
if (n < 0) {
|
|
50
|
+
throw new error_1.KnockError(`${name} must be a positive integer`);
|
|
51
|
+
}
|
|
52
|
+
return n;
|
|
53
|
+
};
|
|
54
|
+
exports.validatePositiveInteger = validatePositiveInteger;
|
|
55
|
+
const coerceInteger = (value) => {
|
|
56
|
+
if (typeof value === 'number')
|
|
57
|
+
return Math.round(value);
|
|
58
|
+
if (typeof value === 'string')
|
|
59
|
+
return parseInt(value, 10);
|
|
60
|
+
throw new error_1.KnockError(`Could not coerce ${value} (type: ${typeof value}) into a number`);
|
|
61
|
+
};
|
|
62
|
+
exports.coerceInteger = coerceInteger;
|
|
63
|
+
const coerceFloat = (value) => {
|
|
64
|
+
if (typeof value === 'number')
|
|
65
|
+
return value;
|
|
66
|
+
if (typeof value === 'string')
|
|
67
|
+
return parseFloat(value);
|
|
68
|
+
throw new error_1.KnockError(`Could not coerce ${value} (type: ${typeof value}) into a number`);
|
|
69
|
+
};
|
|
70
|
+
exports.coerceFloat = coerceFloat;
|
|
71
|
+
const coerceBoolean = (value) => {
|
|
72
|
+
if (typeof value === 'boolean')
|
|
73
|
+
return value;
|
|
74
|
+
if (typeof value === 'string')
|
|
75
|
+
return value === 'true';
|
|
76
|
+
return Boolean(value);
|
|
77
|
+
};
|
|
78
|
+
exports.coerceBoolean = coerceBoolean;
|
|
79
|
+
const maybeCoerceInteger = (value) => {
|
|
80
|
+
if (value === undefined) {
|
|
81
|
+
return undefined;
|
|
82
|
+
}
|
|
83
|
+
return (0, exports.coerceInteger)(value);
|
|
84
|
+
};
|
|
85
|
+
exports.maybeCoerceInteger = maybeCoerceInteger;
|
|
86
|
+
const maybeCoerceFloat = (value) => {
|
|
87
|
+
if (value === undefined) {
|
|
88
|
+
return undefined;
|
|
89
|
+
}
|
|
90
|
+
return (0, exports.coerceFloat)(value);
|
|
91
|
+
};
|
|
92
|
+
exports.maybeCoerceFloat = maybeCoerceFloat;
|
|
93
|
+
const maybeCoerceBoolean = (value) => {
|
|
94
|
+
if (value === undefined) {
|
|
95
|
+
return undefined;
|
|
96
|
+
}
|
|
97
|
+
return (0, exports.coerceBoolean)(value);
|
|
98
|
+
};
|
|
99
|
+
exports.maybeCoerceBoolean = maybeCoerceBoolean;
|
|
100
|
+
const safeJSON = (text) => {
|
|
101
|
+
try {
|
|
102
|
+
return JSON.parse(text);
|
|
103
|
+
}
|
|
104
|
+
catch (err) {
|
|
105
|
+
return undefined;
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
exports.safeJSON = safeJSON;
|
|
109
|
+
//# sourceMappingURL=values.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"values.js","sourceRoot":"","sources":["../../src/internal/utils/values.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,+CAA8C;AAE9C,iDAAiD;AACjD,MAAM,sBAAsB,GAAG,sBAAsB,CAAC;AAE/C,MAAM,aAAa,GAAG,CAAC,GAAW,EAAW,EAAE;IACpD,OAAO,sBAAsB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC1C,CAAC,CAAC;AAFW,QAAA,aAAa,iBAExB;AAEF,oFAAoF;AACpF,SAAgB,QAAQ,CAAC,CAAU;IACjC,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE;QACzB,OAAO,EAAE,CAAC;KACX;IAED,OAAO,CAAC,IAAI,EAAE,CAAC;AACjB,CAAC;AAND,4BAMC;AAED,uCAAuC;AACvC,SAAgB,UAAU,CAAC,GAA8B;IACvD,IAAI,CAAC,GAAG;QAAE,OAAO,IAAI,CAAC;IACtB,KAAK,MAAM,EAAE,IAAI,GAAG;QAAE,OAAO,KAAK,CAAC;IACnC,OAAO,IAAI,CAAC;AACd,CAAC;AAJD,gCAIC;AAED,6DAA6D;AAC7D,SAAgB,MAAM,CAA4B,GAAM,EAAE,GAAgB;IACxE,OAAO,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AACxD,CAAC;AAFD,wBAEC;AAED,SAAgB,KAAK,CAAC,GAAY;IAChC,OAAO,GAAG,IAAI,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;AACvE,CAAC;AAFD,sBAEC;AAEM,MAAM,aAAa,GAAG,CAAI,KAA2B,EAAK,EAAE;IACjE,IAAI,KAAK,IAAI,IAAI,EAAE;QACjB,MAAM,IAAI,kBAAU,CAAC,6CAA6C,KAAK,WAAW,CAA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K,SAAS;QAAE,OAAO,KAAK,CAAC;IAC7C,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,KAAK,MAAM,CAAC;IACvD,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC;AACxB,CAAC,CAAC;AAJW,QAAA,aAAa,iBAIxB;AAEK,MAAM,kBAAkB,GAAG,CAAC,KAAc,EAAsB,EAAE;IACvE,IAAI,KAAK,KAAK,SAAS,EAAE;QACvB,OAAO,SAAS,CAAC;KAClB;IACD,OAAO,IAAA,qBAAa,EAAC,KAAK,CAAC,CAAC;AAC9B,CAAC,CAAC;AALW,QAAA,kBAAkB,sBAK7B;AAEK,MAAM,gBAAgB,GAAG,CAAC,KAAc,EAAsB,EAAE;IACrE,IAAI,KAAK,KAAK,SAAS,EAAE;QACvB,OAAO,SAAS,CAAC;KAClB;IACD,OAAO,IAAA,mBAAW,EAAC,KAAK,CAAC,CAAC;AAC5B,CAAC,CAAC;AALW,QAAA,gBAAgB,oBAK3B;AAEK,MAAM,kBAAkB,GAAG,CAAC,KAAc,EAAuB,EAAE;IACxE,IAAI,KAAK,KAAK,SAAS,EAAE;QACvB,OAAO,SAAS,CAAC;KAClB;IACD,OAAO,IAAA,qBAAa,EAAC,KAAK,CAAC,CAAC;AAC9B,CAAC,CAAC;AALW,QAAA,kBAAkB,sBAK7B;AAEK,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,EAAE;IACvC,IAAI;QACF,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;KACzB;IAAC,OAAO,GAAG,EAAE;QACZ,OAAO,SAAS,CAAC;KAClB;AACH,CAAC,CAAC;AANW,QAAA,QAAQ,YAMnB"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { KnockError } from "../../core/error.mjs";
|
|
3
|
+
// https://url.spec.whatwg.org/#url-scheme-string
|
|
4
|
+
const startsWithSchemeRegexp = /^[a-z][a-z0-9+.-]*:/i;
|
|
5
|
+
export const isAbsoluteURL = (url) => {
|
|
6
|
+
return startsWithSchemeRegexp.test(url);
|
|
7
|
+
};
|
|
8
|
+
/** Returns an object if the given value isn't an object, otherwise returns as-is */
|
|
9
|
+
export function maybeObj(x) {
|
|
10
|
+
if (typeof x !== 'object') {
|
|
11
|
+
return {};
|
|
12
|
+
}
|
|
13
|
+
return x ?? {};
|
|
14
|
+
}
|
|
15
|
+
// https://stackoverflow.com/a/34491287
|
|
16
|
+
export function isEmptyObj(obj) {
|
|
17
|
+
if (!obj)
|
|
18
|
+
return true;
|
|
19
|
+
for (const _k in obj)
|
|
20
|
+
return false;
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
// https://eslint.org/docs/latest/rules/no-prototype-builtins
|
|
24
|
+
export function hasOwn(obj, key) {
|
|
25
|
+
return Object.prototype.hasOwnProperty.call(obj, key);
|
|
26
|
+
}
|
|
27
|
+
export function isObj(obj) {
|
|
28
|
+
return obj != null && typeof obj === 'object' && !Array.isArray(obj);
|
|
29
|
+
}
|
|
30
|
+
export const ensurePresent = (value) => {
|
|
31
|
+
if (value == null) {
|
|
32
|
+
throw new KnockError(`Expected a value to be given but received ${value} instead.`);
|
|
33
|
+
}
|
|
34
|
+
return value;
|
|
35
|
+
};
|
|
36
|
+
export const validatePositiveInteger = (name, n) => {
|
|
37
|
+
if (typeof n !== 'number' || !Number.isInteger(n)) {
|
|
38
|
+
throw new KnockError(`${name} must be an integer`);
|
|
39
|
+
}
|
|
40
|
+
if (n < 0) {
|
|
41
|
+
throw new KnockError(`${name} must be a positive integer`);
|
|
42
|
+
}
|
|
43
|
+
return n;
|
|
44
|
+
};
|
|
45
|
+
export const coerceInteger = (value) => {
|
|
46
|
+
if (typeof value === 'number')
|
|
47
|
+
return Math.round(value);
|
|
48
|
+
if (typeof value === 'string')
|
|
49
|
+
return parseInt(value, 10);
|
|
50
|
+
throw new KnockError(`Could not coerce ${value} (type: ${typeof value}) into a number`);
|
|
51
|
+
};
|
|
52
|
+
export const coerceFloat = (value) => {
|
|
53
|
+
if (typeof value === 'number')
|
|
54
|
+
return value;
|
|
55
|
+
if (typeof value === 'string')
|
|
56
|
+
return parseFloat(value);
|
|
57
|
+
throw new KnockError(`Could not coerce ${value} (type: ${typeof value}) into a number`);
|
|
58
|
+
};
|
|
59
|
+
export const coerceBoolean = (value) => {
|
|
60
|
+
if (typeof value === 'boolean')
|
|
61
|
+
return value;
|
|
62
|
+
if (typeof value === 'string')
|
|
63
|
+
return value === 'true';
|
|
64
|
+
return Boolean(value);
|
|
65
|
+
};
|
|
66
|
+
export const maybeCoerceInteger = (value) => {
|
|
67
|
+
if (value === undefined) {
|
|
68
|
+
return undefined;
|
|
69
|
+
}
|
|
70
|
+
return coerceInteger(value);
|
|
71
|
+
};
|
|
72
|
+
export const maybeCoerceFloat = (value) => {
|
|
73
|
+
if (value === undefined) {
|
|
74
|
+
return undefined;
|
|
75
|
+
}
|
|
76
|
+
return coerceFloat(value);
|
|
77
|
+
};
|
|
78
|
+
export const maybeCoerceBoolean = (value) => {
|
|
79
|
+
if (value === undefined) {
|
|
80
|
+
return undefined;
|
|
81
|
+
}
|
|
82
|
+
return coerceBoolean(value);
|
|
83
|
+
};
|
|
84
|
+
export const safeJSON = (text) => {
|
|
85
|
+
try {
|
|
86
|
+
return JSON.parse(text);
|
|
87
|
+
}
|
|
88
|
+
catch (err) {
|
|
89
|
+
return undefined;
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
//# sourceMappingURL=values.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"values.mjs","sourceRoot":"","sources":["../../src/internal/utils/values.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,UAAU,EAAE;AAErB,iDAAiD;AACjD,MAAM,sBAAsB,GAAG,sBAAsB,CAAC;AAEtD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,GAAW,EAAW,EAA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,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAc,EAAsB,EAAE;IACrE,IAAI,KAAK,KAAK,SAAS,EAAE;QACvB,OAAO,SAAS,CAAC;KAClB;IACD,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAAc,EAAuB,EAAE;IACxE,IAAI,KAAK,KAAK,SAAS,EAAE;QACvB,OAAO,SAAS,CAAC;KAClB;IACD,OAAO,aAAa,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,EAAE;IACvC,IAAI;QACF,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;KACzB;IAAC,OAAO,GAAG,EAAE;QACZ,OAAO,SAAS,CAAC;KAClB;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.mts","sourceRoot":"","sources":["../src/internal/utils.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/internal/utils.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
__exportStar(require("./utils/values.js"), exports);
|
|
19
|
+
__exportStar(require("./utils/base64.js"), exports);
|
|
20
|
+
__exportStar(require("./utils/env.js"), exports);
|
|
21
|
+
__exportStar(require("./utils/log.js"), exports);
|
|
22
|
+
__exportStar(require("./utils/uuid.js"), exports);
|
|
23
|
+
__exportStar(require("./utils/sleep.js"), exports);
|
|
24
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/internal/utils.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;AAEtF,oDAA+B;AAC/B,oDAA+B;AAC/B,iDAA4B;AAC5B,iDAA4B;AAC5B,kDAA6B;AAC7B,mDAA8B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
export * from "./utils/values.mjs";
|
|
3
|
+
export * from "./utils/base64.mjs";
|
|
4
|
+
export * from "./utils/env.mjs";
|
|
5
|
+
export * from "./utils/log.mjs";
|
|
6
|
+
export * from "./utils/uuid.mjs";
|
|
7
|
+
export * from "./utils/sleep.mjs";
|
|
8
|
+
//# sourceMappingURL=utils.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.mjs","sourceRoot":"","sources":["../src/internal/utils.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
|
package/lib/index.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Exports for Knock custom functionality
|
|
4
|
+
*/
|
|
2
5
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
6
|
if (k2 === undefined) k2 = k;
|
|
4
7
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -14,13 +17,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
17
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
18
|
};
|
|
16
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
18
|
-
__exportStar(require("./
|
|
19
|
-
|
|
20
|
-
__exportStar(require("./resources/preferences/interfaces"), exports);
|
|
21
|
-
__exportStar(require("./resources/slack/interfaces"), exports);
|
|
22
|
-
__exportStar(require("./common/interfaces"), exports);
|
|
23
|
-
__exportStar(require("./common/userTokens"), exports);
|
|
24
|
-
__exportStar(require("./common/exceptions"), exports);
|
|
25
|
-
var knock_1 = require("./knock");
|
|
26
|
-
Object.defineProperty(exports, "Knock", { enumerable: true, get: function () { return knock_1.Knock; } });
|
|
20
|
+
__exportStar(require("./userTokens.js"), exports);
|
|
21
|
+
__exportStar(require("./tokenSigner.js"), exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;AAEH,kDAA6B;AAC7B,mDAA8B"}
|
package/lib/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Token signing functionality for Knock authentication
|
|
3
|
+
*/
|
|
4
|
+
import type { TokenEntity, TokenGrant, TokenGrantOptions } from "./userTokens.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* Options for signing a user token
|
|
7
|
+
*/
|
|
8
|
+
export interface SignUserTokenOptions {
|
|
9
|
+
/**
|
|
10
|
+
* The signing key to use (in PEM or base-64 encoded format)
|
|
11
|
+
* If not provided, it will try to use process.env.KNOCK_SIGNING_KEY
|
|
12
|
+
*/
|
|
13
|
+
signingKey?: string | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* How long the token should be valid for in seconds
|
|
16
|
+
* @default 3600 (1 hour)
|
|
17
|
+
*/
|
|
18
|
+
expiresInSeconds?: number | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Grants to include in the token
|
|
21
|
+
*/
|
|
22
|
+
grants?: TokenGrant[] | undefined;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Prepare user token grants
|
|
26
|
+
*/
|
|
27
|
+
export declare function maybePrepareUserTokenGrants(grants: TokenGrant[] | undefined): Record<string, TokenGrant['grants']> | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Helper function to build user token grants to pass to the `signUserToken` method.
|
|
30
|
+
*
|
|
31
|
+
* @param entity {TokenEntity} The type of entity to build a grant for
|
|
32
|
+
* @param grants {TokenGrantOptions} A list of grants to give to the entity for the user
|
|
33
|
+
*
|
|
34
|
+
* @returns {TokenGrant} A single token grant that can be passed to the signUserToken function
|
|
35
|
+
*/
|
|
36
|
+
export declare function buildUserTokenGrant(entity: TokenEntity, grants: TokenGrantOptions): TokenGrant;
|
|
37
|
+
/**
|
|
38
|
+
* Generate JWT for authenticating client-side requests (e.g. in-app feeds)
|
|
39
|
+
* For more information, visit https://docs.knock.app/in-app-ui/security-and-authentication#authentication-with-enhanced-security-enabled
|
|
40
|
+
*
|
|
41
|
+
* @param userId {string} The ID of the user that needs a token, e.g. the user viewing an in-app feed.
|
|
42
|
+
* @param options Optionally specify the signing key to use (in PEM or base-64 encoded format), and how long the token should be valid for in seconds
|
|
43
|
+
* @returns {Promise<string>} A JWT token that can be used to authenticate requests to the Knock API (e.g. by passing into the <KnockFeedProvider /> component)
|
|
44
|
+
*/
|
|
45
|
+
export declare function signUserToken(userId: string, options?: SignUserTokenOptions): Promise<string>;
|
|
46
|
+
//# sourceMappingURL=tokenSigner.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokenSigner.d.mts","sourceRoot":"","sources":["../src/lib/tokenSigner.ts"],"names":[],"mappings":"AAAA;;GAEG;OAGI,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,iBAAiB,EAAE;AAK1D;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEhC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEtC;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,EAAE,GAAG,SAAS,CAAC;CACnC;AAuED;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,UAAU,EAAE,GAAG,SAAS,GAC/B,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC,GAAG,SAAS,CAalD;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,iBAAiB,GAAG,UAAU,CAK9F;AAED;;;;;;;GAOG;AACH,wBAAsB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,CAyBnG"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Token signing functionality for Knock authentication
|
|
3
|
+
*/
|
|
4
|
+
import type { TokenEntity, TokenGrant, TokenGrantOptions } from "./userTokens.js";
|
|
5
|
+
/**
|
|
6
|
+
* Options for signing a user token
|
|
7
|
+
*/
|
|
8
|
+
export interface SignUserTokenOptions {
|
|
9
|
+
/**
|
|
10
|
+
* The signing key to use (in PEM or base-64 encoded format)
|
|
11
|
+
* If not provided, it will try to use process.env.KNOCK_SIGNING_KEY
|
|
12
|
+
*/
|
|
13
|
+
signingKey?: string | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* How long the token should be valid for in seconds
|
|
16
|
+
* @default 3600 (1 hour)
|
|
17
|
+
*/
|
|
18
|
+
expiresInSeconds?: number | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Grants to include in the token
|
|
21
|
+
*/
|
|
22
|
+
grants?: TokenGrant[] | undefined;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Prepare user token grants
|
|
26
|
+
*/
|
|
27
|
+
export declare function maybePrepareUserTokenGrants(grants: TokenGrant[] | undefined): Record<string, TokenGrant['grants']> | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Helper function to build user token grants to pass to the `signUserToken` method.
|
|
30
|
+
*
|
|
31
|
+
* @param entity {TokenEntity} The type of entity to build a grant for
|
|
32
|
+
* @param grants {TokenGrantOptions} A list of grants to give to the entity for the user
|
|
33
|
+
*
|
|
34
|
+
* @returns {TokenGrant} A single token grant that can be passed to the signUserToken function
|
|
35
|
+
*/
|
|
36
|
+
export declare function buildUserTokenGrant(entity: TokenEntity, grants: TokenGrantOptions): TokenGrant;
|
|
37
|
+
/**
|
|
38
|
+
* Generate JWT for authenticating client-side requests (e.g. in-app feeds)
|
|
39
|
+
* For more information, visit https://docs.knock.app/in-app-ui/security-and-authentication#authentication-with-enhanced-security-enabled
|
|
40
|
+
*
|
|
41
|
+
* @param userId {string} The ID of the user that needs a token, e.g. the user viewing an in-app feed.
|
|
42
|
+
* @param options Optionally specify the signing key to use (in PEM or base-64 encoded format), and how long the token should be valid for in seconds
|
|
43
|
+
* @returns {Promise<string>} A JWT token that can be used to authenticate requests to the Knock API (e.g. by passing into the <KnockFeedProvider /> component)
|
|
44
|
+
*/
|
|
45
|
+
export declare function signUserToken(userId: string, options?: SignUserTokenOptions): Promise<string>;
|
|
46
|
+
//# sourceMappingURL=tokenSigner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokenSigner.d.ts","sourceRoot":"","sources":["../src/lib/tokenSigner.ts"],"names":[],"mappings":"AAAA;;GAEG;OAGI,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,iBAAiB,EAAE;AAK1D;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEhC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAEtC;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,EAAE,GAAG,SAAS,CAAC;CACnC;AAuED;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,UAAU,EAAE,GAAG,SAAS,GAC/B,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC,GAAG,SAAS,CAalD;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,iBAAiB,GAAG,UAAU,CAK9F;AAED;;;;;;;GAOG;AACH,wBAAsB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,CAyBnG"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Token signing functionality for Knock authentication
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.signUserToken = exports.buildUserTokenGrant = exports.maybePrepareUserTokenGrants = void 0;
|
|
30
|
+
const crypto = __importStar(require("crypto"));
|
|
31
|
+
// Default hostname for Knock API
|
|
32
|
+
const DEFAULT_HOSTNAME = 'https://api.knock.app';
|
|
33
|
+
/**
|
|
34
|
+
* Prepare the signing key for use
|
|
35
|
+
*/
|
|
36
|
+
function prepareSigningKey(key) {
|
|
37
|
+
const maybeSigningKey = key ?? process.env['KNOCK_SIGNING_KEY'];
|
|
38
|
+
if (!maybeSigningKey)
|
|
39
|
+
throw new Error('No signing key provided. Set KNOCK_SIGNING_KEY environment variable or pass signingKey option.');
|
|
40
|
+
// If it's already in PEM format
|
|
41
|
+
if (maybeSigningKey.startsWith('-----BEGIN'))
|
|
42
|
+
return maybeSigningKey;
|
|
43
|
+
// LS0tLS1CRUdJTi is the base64 encoded version of "-----BEGIN"
|
|
44
|
+
if (maybeSigningKey.startsWith('LS0tLS1CRUdJTi'))
|
|
45
|
+
return Buffer.from(maybeSigningKey, 'base64').toString('utf-8');
|
|
46
|
+
throw new Error('Invalid signing key format. Must be PEM or base64 encoded PEM.');
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Prepare the token entity URI
|
|
50
|
+
*/
|
|
51
|
+
function prepareTokenEntityUri(entity) {
|
|
52
|
+
switch (entity.type) {
|
|
53
|
+
case 'user':
|
|
54
|
+
return `${DEFAULT_HOSTNAME}/v1/users/${entity.id}`;
|
|
55
|
+
case 'tenant':
|
|
56
|
+
return `${DEFAULT_HOSTNAME}/v1/objects/$tenants/${entity.id}`;
|
|
57
|
+
case 'object':
|
|
58
|
+
return `${DEFAULT_HOSTNAME}/v1/objects/${entity.collection}/${entity.id}`;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Create and sign a JWT using Node.js crypto
|
|
63
|
+
*/
|
|
64
|
+
function createJWT(header, payload, privateKey) {
|
|
65
|
+
// Base64Url encode the header
|
|
66
|
+
const headerBase64 = Buffer.from(JSON.stringify(header))
|
|
67
|
+
.toString('base64')
|
|
68
|
+
.replace(/=/g, '')
|
|
69
|
+
.replace(/\+/g, '-')
|
|
70
|
+
.replace(/\//g, '_');
|
|
71
|
+
// Base64Url encode the payload
|
|
72
|
+
const payloadBase64 = Buffer.from(JSON.stringify(payload))
|
|
73
|
+
.toString('base64')
|
|
74
|
+
.replace(/=/g, '')
|
|
75
|
+
.replace(/\+/g, '-')
|
|
76
|
+
.replace(/\//g, '_');
|
|
77
|
+
// Create the content to sign
|
|
78
|
+
const signatureContent = `${headerBase64}.${payloadBase64}`;
|
|
79
|
+
// Sign the content
|
|
80
|
+
const signer = crypto.createSign('RSA-SHA256');
|
|
81
|
+
signer.update(signatureContent);
|
|
82
|
+
const signature = signer
|
|
83
|
+
.sign(privateKey, 'base64')
|
|
84
|
+
.replace(/=/g, '')
|
|
85
|
+
.replace(/\+/g, '-')
|
|
86
|
+
.replace(/\//g, '_');
|
|
87
|
+
// Combine to create the JWT
|
|
88
|
+
return `${signatureContent}.${signature}`;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Prepare user token grants
|
|
92
|
+
*/
|
|
93
|
+
function maybePrepareUserTokenGrants(grants) {
|
|
94
|
+
if (!grants)
|
|
95
|
+
return undefined;
|
|
96
|
+
// Given a list of token grants, flattens them into a single object
|
|
97
|
+
// like: { "entity": { "slack/channels_read": [] } }
|
|
98
|
+
return grants.reduce((acc, grant) => {
|
|
99
|
+
if (acc[grant.entity]) {
|
|
100
|
+
const currentGrants = acc[grant.entity];
|
|
101
|
+
return { ...acc, [grant.entity]: { ...currentGrants, ...grant.grants } };
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
return { ...acc, [grant.entity]: grant.grants };
|
|
105
|
+
}
|
|
106
|
+
}, {});
|
|
107
|
+
}
|
|
108
|
+
exports.maybePrepareUserTokenGrants = maybePrepareUserTokenGrants;
|
|
109
|
+
/**
|
|
110
|
+
* Helper function to build user token grants to pass to the `signUserToken` method.
|
|
111
|
+
*
|
|
112
|
+
* @param entity {TokenEntity} The type of entity to build a grant for
|
|
113
|
+
* @param grants {TokenGrantOptions} A list of grants to give to the entity for the user
|
|
114
|
+
*
|
|
115
|
+
* @returns {TokenGrant} A single token grant that can be passed to the signUserToken function
|
|
116
|
+
*/
|
|
117
|
+
function buildUserTokenGrant(entity, grants) {
|
|
118
|
+
return {
|
|
119
|
+
entity: prepareTokenEntityUri(entity),
|
|
120
|
+
grants: grants.reduce((acc, grant) => ({ ...acc, [grant]: [] }), {}),
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
exports.buildUserTokenGrant = buildUserTokenGrant;
|
|
124
|
+
/**
|
|
125
|
+
* Generate JWT for authenticating client-side requests (e.g. in-app feeds)
|
|
126
|
+
* For more information, visit https://docs.knock.app/in-app-ui/security-and-authentication#authentication-with-enhanced-security-enabled
|
|
127
|
+
*
|
|
128
|
+
* @param userId {string} The ID of the user that needs a token, e.g. the user viewing an in-app feed.
|
|
129
|
+
* @param options Optionally specify the signing key to use (in PEM or base-64 encoded format), and how long the token should be valid for in seconds
|
|
130
|
+
* @returns {Promise<string>} A JWT token that can be used to authenticate requests to the Knock API (e.g. by passing into the <KnockFeedProvider /> component)
|
|
131
|
+
*/
|
|
132
|
+
async function signUserToken(userId, options) {
|
|
133
|
+
const signingKey = prepareSigningKey(options?.signingKey);
|
|
134
|
+
// JWT NumericDates specified in seconds
|
|
135
|
+
const currentTime = Math.floor(Date.now() / 1000);
|
|
136
|
+
// Default to 1 hour from now
|
|
137
|
+
const expireInSeconds = options?.expiresInSeconds ?? 60 * 60;
|
|
138
|
+
// Create JWT header
|
|
139
|
+
const header = {
|
|
140
|
+
alg: 'RS256',
|
|
141
|
+
typ: 'JWT',
|
|
142
|
+
};
|
|
143
|
+
// Create JWT payload
|
|
144
|
+
const payload = {
|
|
145
|
+
sub: userId,
|
|
146
|
+
grants: maybePrepareUserTokenGrants(options?.grants),
|
|
147
|
+
iat: currentTime,
|
|
148
|
+
exp: currentTime + expireInSeconds,
|
|
149
|
+
};
|
|
150
|
+
// Create and sign the JWT
|
|
151
|
+
return createJWT(header, payload, signingKey);
|
|
152
|
+
}
|
|
153
|
+
exports.signUserToken = signUserToken;
|
|
154
|
+
//# sourceMappingURL=tokenSigner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokenSigner.js","sourceRoot":"","sources":["../src/lib/tokenSigner.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,+CAAiC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