@postpeer/node 0.7.0 → 0.8.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 +7 -128
- package/LICENSE +1 -1
- package/README.md +92 -314
- package/dist/index.cjs +1709 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +3484 -0
- package/dist/index.d.ts +3484 -0
- package/dist/index.js +1690 -0
- package/dist/index.js.map +1 -0
- package/package.json +58 -131
- package/api-promise.d.mts +0 -3
- package/api-promise.d.mts.map +0 -1
- package/api-promise.d.ts +0 -3
- package/api-promise.d.ts.map +0 -1
- package/api-promise.js +0 -6
- package/api-promise.js.map +0 -1
- package/api-promise.mjs +0 -3
- package/api-promise.mjs.map +0 -1
- package/client.d.mts +0 -190
- package/client.d.mts.map +0 -1
- package/client.d.ts +0 -190
- package/client.d.ts.map +0 -1
- package/client.js +0 -485
- package/client.js.map +0 -1
- package/client.mjs +0 -481
- package/client.mjs.map +0 -1
- package/core/api-promise.d.mts +0 -46
- package/core/api-promise.d.mts.map +0 -1
- package/core/api-promise.d.ts +0 -46
- package/core/api-promise.d.ts.map +0 -1
- package/core/api-promise.js +0 -74
- package/core/api-promise.js.map +0 -1
- package/core/api-promise.mjs +0 -70
- package/core/api-promise.mjs.map +0 -1
- package/core/error.d.mts +0 -46
- package/core/error.d.mts.map +0 -1
- package/core/error.d.ts +0 -46
- package/core/error.d.ts.map +0 -1
- package/core/error.js +0 -113
- package/core/error.js.map +0 -1
- package/core/error.mjs +0 -97
- package/core/error.mjs.map +0 -1
- package/core/resource.d.mts +0 -6
- package/core/resource.d.mts.map +0 -1
- package/core/resource.d.ts +0 -6
- package/core/resource.d.ts.map +0 -1
- package/core/resource.js +0 -11
- package/core/resource.js.map +0 -1
- package/core/resource.mjs +0 -7
- package/core/resource.mjs.map +0 -1
- package/core/uploads.d.mts +0 -3
- package/core/uploads.d.mts.map +0 -1
- package/core/uploads.d.ts +0 -3
- package/core/uploads.d.ts.map +0 -1
- package/core/uploads.js +0 -6
- package/core/uploads.js.map +0 -1
- package/core/uploads.mjs +0 -2
- package/core/uploads.mjs.map +0 -1
- package/error.d.mts +0 -3
- package/error.d.mts.map +0 -1
- package/error.d.ts +0 -3
- package/error.d.ts.map +0 -1
- package/error.js +0 -6
- package/error.js.map +0 -1
- package/error.mjs +0 -3
- package/error.mjs.map +0 -1
- package/index.d.mts +0 -6
- package/index.d.mts.map +0 -1
- package/index.d.ts +0 -6
- package/index.d.ts.map +0 -1
- package/index.js +0 -30
- package/index.js.map +0 -1
- package/index.mjs +0 -7
- package/index.mjs.map +0 -1
- package/internal/builtin-types.d.mts +0 -73
- package/internal/builtin-types.d.mts.map +0 -1
- package/internal/builtin-types.d.ts +0 -73
- package/internal/builtin-types.d.ts.map +0 -1
- package/internal/builtin-types.js +0 -4
- package/internal/builtin-types.js.map +0 -1
- package/internal/builtin-types.mjs +0 -3
- package/internal/builtin-types.mjs.map +0 -1
- package/internal/detect-platform.d.mts +0 -15
- package/internal/detect-platform.d.mts.map +0 -1
- package/internal/detect-platform.d.ts +0 -15
- package/internal/detect-platform.d.ts.map +0 -1
- package/internal/detect-platform.js +0 -162
- package/internal/detect-platform.js.map +0 -1
- package/internal/detect-platform.mjs +0 -157
- package/internal/detect-platform.mjs.map +0 -1
- package/internal/errors.d.mts +0 -3
- package/internal/errors.d.mts.map +0 -1
- package/internal/errors.d.ts +0 -3
- package/internal/errors.d.ts.map +0 -1
- package/internal/errors.js +0 -41
- package/internal/errors.js.map +0 -1
- package/internal/errors.mjs +0 -36
- package/internal/errors.mjs.map +0 -1
- package/internal/headers.d.mts +0 -20
- package/internal/headers.d.mts.map +0 -1
- package/internal/headers.d.ts +0 -20
- package/internal/headers.d.ts.map +0 -1
- package/internal/headers.js +0 -79
- package/internal/headers.js.map +0 -1
- package/internal/headers.mjs +0 -74
- package/internal/headers.mjs.map +0 -1
- package/internal/parse.d.mts +0 -12
- package/internal/parse.d.mts.map +0 -1
- package/internal/parse.d.ts +0 -12
- package/internal/parse.d.ts.map +0 -1
- package/internal/parse.js +0 -40
- package/internal/parse.js.map +0 -1
- package/internal/parse.mjs +0 -37
- package/internal/parse.mjs.map +0 -1
- package/internal/qs/formats.d.mts +0 -7
- package/internal/qs/formats.d.mts.map +0 -1
- package/internal/qs/formats.d.ts +0 -7
- package/internal/qs/formats.d.ts.map +0 -1
- package/internal/qs/formats.js +0 -13
- package/internal/qs/formats.js.map +0 -1
- package/internal/qs/formats.mjs +0 -9
- package/internal/qs/formats.mjs.map +0 -1
- package/internal/qs/index.d.mts +0 -10
- package/internal/qs/index.d.mts.map +0 -1
- package/internal/qs/index.d.ts +0 -10
- package/internal/qs/index.d.ts.map +0 -1
- package/internal/qs/index.js +0 -14
- package/internal/qs/index.js.map +0 -1
- package/internal/qs/index.mjs +0 -10
- package/internal/qs/index.mjs.map +0 -1
- package/internal/qs/stringify.d.mts +0 -3
- package/internal/qs/stringify.d.mts.map +0 -1
- package/internal/qs/stringify.d.ts +0 -3
- package/internal/qs/stringify.d.ts.map +0 -1
- package/internal/qs/stringify.js +0 -277
- package/internal/qs/stringify.js.map +0 -1
- package/internal/qs/stringify.mjs +0 -274
- package/internal/qs/stringify.mjs.map +0 -1
- package/internal/qs/types.d.mts +0 -57
- package/internal/qs/types.d.mts.map +0 -1
- package/internal/qs/types.d.ts +0 -57
- package/internal/qs/types.d.ts.map +0 -1
- package/internal/qs/types.js +0 -3
- package/internal/qs/types.js.map +0 -1
- package/internal/qs/types.mjs +0 -2
- package/internal/qs/types.mjs.map +0 -1
- package/internal/qs/utils.d.mts +0 -15
- package/internal/qs/utils.d.mts.map +0 -1
- package/internal/qs/utils.d.ts +0 -15
- package/internal/qs/utils.d.ts.map +0 -1
- package/internal/qs/utils.js +0 -230
- package/internal/qs/utils.js.map +0 -1
- package/internal/qs/utils.mjs +0 -217
- package/internal/qs/utils.mjs.map +0 -1
- package/internal/request-options.d.mts +0 -75
- package/internal/request-options.d.mts.map +0 -1
- package/internal/request-options.d.ts +0 -75
- package/internal/request-options.d.ts.map +0 -1
- package/internal/request-options.js +0 -14
- package/internal/request-options.js.map +0 -1
- package/internal/request-options.mjs +0 -10
- package/internal/request-options.mjs.map +0 -1
- package/internal/shim-types.d.mts +0 -17
- package/internal/shim-types.d.mts.map +0 -1
- package/internal/shim-types.d.ts +0 -17
- package/internal/shim-types.d.ts.map +0 -1
- package/internal/shim-types.js +0 -4
- package/internal/shim-types.js.map +0 -1
- package/internal/shim-types.mjs +0 -3
- package/internal/shim-types.mjs.map +0 -1
- package/internal/shims.d.mts +0 -26
- package/internal/shims.d.mts.map +0 -1
- package/internal/shims.d.ts +0 -26
- package/internal/shims.d.ts.map +0 -1
- package/internal/shims.js +0 -92
- package/internal/shims.js.map +0 -1
- package/internal/shims.mjs +0 -85
- package/internal/shims.mjs.map +0 -1
- package/internal/to-file.d.mts +0 -45
- package/internal/to-file.d.mts.map +0 -1
- package/internal/to-file.d.ts +0 -45
- package/internal/to-file.d.ts.map +0 -1
- package/internal/to-file.js +0 -91
- package/internal/to-file.js.map +0 -1
- package/internal/to-file.mjs +0 -88
- package/internal/to-file.mjs.map +0 -1
- package/internal/tslib.js +0 -81
- package/internal/tslib.mjs +0 -17
- package/internal/types.d.mts +0 -69
- package/internal/types.d.mts.map +0 -1
- package/internal/types.d.ts +0 -69
- package/internal/types.d.ts.map +0 -1
- package/internal/types.js +0 -4
- package/internal/types.js.map +0 -1
- package/internal/types.mjs +0 -3
- package/internal/types.mjs.map +0 -1
- package/internal/uploads.d.mts +0 -42
- package/internal/uploads.d.mts.map +0 -1
- package/internal/uploads.d.ts +0 -42
- package/internal/uploads.d.ts.map +0 -1
- package/internal/uploads.js +0 -141
- package/internal/uploads.js.map +0 -1
- package/internal/uploads.mjs +0 -131
- package/internal/uploads.mjs.map +0 -1
- package/internal/utils/base64.d.mts +0 -3
- package/internal/utils/base64.d.mts.map +0 -1
- package/internal/utils/base64.d.ts +0 -3
- package/internal/utils/base64.d.ts.map +0 -1
- package/internal/utils/base64.js +0 -38
- package/internal/utils/base64.js.map +0 -1
- package/internal/utils/base64.mjs +0 -33
- package/internal/utils/base64.mjs.map +0 -1
- package/internal/utils/bytes.d.mts +0 -4
- package/internal/utils/bytes.d.mts.map +0 -1
- package/internal/utils/bytes.d.ts +0 -4
- package/internal/utils/bytes.d.ts.map +0 -1
- package/internal/utils/bytes.js +0 -31
- package/internal/utils/bytes.js.map +0 -1
- package/internal/utils/bytes.mjs +0 -26
- package/internal/utils/bytes.mjs.map +0 -1
- package/internal/utils/env.d.mts +0 -9
- package/internal/utils/env.d.mts.map +0 -1
- package/internal/utils/env.d.ts +0 -9
- package/internal/utils/env.d.ts.map +0 -1
- package/internal/utils/env.js +0 -22
- package/internal/utils/env.js.map +0 -1
- package/internal/utils/env.mjs +0 -18
- package/internal/utils/env.mjs.map +0 -1
- package/internal/utils/log.d.mts +0 -37
- package/internal/utils/log.d.mts.map +0 -1
- package/internal/utils/log.d.ts +0 -37
- package/internal/utils/log.d.ts.map +0 -1
- package/internal/utils/log.js +0 -88
- package/internal/utils/log.js.map +0 -1
- package/internal/utils/log.mjs +0 -82
- package/internal/utils/log.mjs.map +0 -1
- package/internal/utils/path.d.mts +0 -15
- package/internal/utils/path.d.mts.map +0 -1
- package/internal/utils/path.d.ts +0 -15
- package/internal/utils/path.d.ts.map +0 -1
- package/internal/utils/path.js +0 -79
- package/internal/utils/path.js.map +0 -1
- package/internal/utils/path.mjs +0 -74
- package/internal/utils/path.mjs.map +0 -1
- package/internal/utils/query.d.mts +0 -2
- package/internal/utils/query.d.mts.map +0 -1
- package/internal/utils/query.d.ts +0 -2
- package/internal/utils/query.d.ts.map +0 -1
- package/internal/utils/query.js +0 -10
- package/internal/utils/query.js.map +0 -1
- package/internal/utils/query.mjs +0 -6
- package/internal/utils/query.mjs.map +0 -1
- package/internal/utils/sleep.d.mts +0 -2
- package/internal/utils/sleep.d.mts.map +0 -1
- package/internal/utils/sleep.d.ts +0 -2
- package/internal/utils/sleep.d.ts.map +0 -1
- package/internal/utils/sleep.js +0 -7
- package/internal/utils/sleep.js.map +0 -1
- package/internal/utils/sleep.mjs +0 -3
- package/internal/utils/sleep.mjs.map +0 -1
- package/internal/utils/uuid.d.mts +0 -5
- package/internal/utils/uuid.d.mts.map +0 -1
- package/internal/utils/uuid.d.ts +0 -5
- package/internal/utils/uuid.d.ts.map +0 -1
- package/internal/utils/uuid.js +0 -19
- package/internal/utils/uuid.js.map +0 -1
- package/internal/utils/uuid.mjs +0 -15
- package/internal/utils/uuid.mjs.map +0 -1
- package/internal/utils/values.d.mts +0 -18
- package/internal/utils/values.d.mts.map +0 -1
- package/internal/utils/values.d.ts +0 -18
- package/internal/utils/values.d.ts.map +0 -1
- package/internal/utils/values.js +0 -112
- package/internal/utils/values.js.map +0 -1
- package/internal/utils/values.mjs +0 -94
- package/internal/utils/values.mjs.map +0 -1
- package/internal/utils.d.mts +0 -8
- package/internal/utils.d.mts.map +0 -1
- package/internal/utils.d.ts +0 -8
- package/internal/utils.d.ts.map +0 -1
- package/internal/utils.js +0 -12
- package/internal/utils.js.map +0 -1
- package/internal/utils.mjs +0 -9
- package/internal/utils.mjs.map +0 -1
- package/resource.d.mts +0 -3
- package/resource.d.mts.map +0 -1
- package/resource.d.ts +0 -3
- package/resource.d.ts.map +0 -1
- package/resource.js +0 -6
- package/resource.js.map +0 -1
- package/resource.mjs +0 -3
- package/resource.mjs.map +0 -1
- package/resources/connect/connect.d.mts +0 -31
- package/resources/connect/connect.d.mts.map +0 -1
- package/resources/connect/connect.d.ts +0 -31
- package/resources/connect/connect.d.ts.map +0 -1
- package/resources/connect/connect.js +0 -24
- package/resources/connect/connect.js.map +0 -1
- package/resources/connect/connect.mjs +0 -19
- package/resources/connect/connect.mjs.map +0 -1
- package/resources/connect/index.d.mts +0 -3
- package/resources/connect/index.d.mts.map +0 -1
- package/resources/connect/index.d.ts +0 -3
- package/resources/connect/index.d.ts.map +0 -1
- package/resources/connect/index.js +0 -9
- package/resources/connect/index.js.map +0 -1
- package/resources/connect/index.mjs +0 -4
- package/resources/connect/index.mjs.map +0 -1
- package/resources/connect/integrations.d.mts +0 -78
- package/resources/connect/integrations.d.mts.map +0 -1
- package/resources/connect/integrations.d.ts +0 -78
- package/resources/connect/integrations.d.ts.map +0 -1
- package/resources/connect/integrations.js +0 -22
- package/resources/connect/integrations.js.map +0 -1
- package/resources/connect/integrations.mjs +0 -18
- package/resources/connect/integrations.mjs.map +0 -1
- package/resources/connect.d.mts +0 -2
- package/resources/connect.d.mts.map +0 -1
- package/resources/connect.d.ts +0 -2
- package/resources/connect.d.ts.map +0 -1
- package/resources/connect.js +0 -6
- package/resources/connect.js.map +0 -1
- package/resources/connect.mjs +0 -3
- package/resources/connect.mjs.map +0 -1
- package/resources/health.d.mts +0 -23
- package/resources/health.d.mts.map +0 -1
- package/resources/health.d.ts +0 -23
- package/resources/health.d.ts.map +0 -1
- package/resources/health.js +0 -21
- package/resources/health.js.map +0 -1
- package/resources/health.mjs +0 -17
- package/resources/health.mjs.map +0 -1
- package/resources/index.d.mts +0 -6
- package/resources/index.d.mts.map +0 -1
- package/resources/index.d.ts +0 -6
- package/resources/index.d.ts.map +0 -1
- package/resources/index.js +0 -15
- package/resources/index.js.map +0 -1
- package/resources/index.mjs +0 -7
- package/resources/index.mjs.map +0 -1
- package/resources/media.d.mts +0 -27
- package/resources/media.d.mts.map +0 -1
- package/resources/media.d.ts +0 -27
- package/resources/media.d.ts.map +0 -1
- package/resources/media.js +0 -15
- package/resources/media.js.map +0 -1
- package/resources/media.mjs +0 -11
- package/resources/media.mjs.map +0 -1
- package/resources/platforms.d.mts +0 -22
- package/resources/platforms.d.mts.map +0 -1
- package/resources/platforms.d.ts +0 -22
- package/resources/platforms.d.ts.map +0 -1
- package/resources/platforms.js +0 -15
- package/resources/platforms.js.map +0 -1
- package/resources/platforms.mjs +0 -11
- package/resources/platforms.mjs.map +0 -1
- package/resources/posts/index.d.mts +0 -3
- package/resources/posts/index.d.mts.map +0 -1
- package/resources/posts/index.d.ts +0 -3
- package/resources/posts/index.d.ts.map +0 -1
- package/resources/posts/index.js +0 -9
- package/resources/posts/index.js.map +0 -1
- package/resources/posts/index.mjs +0 -4
- package/resources/posts/index.mjs.map +0 -1
- package/resources/posts/posts.d.mts +0 -300
- package/resources/posts/posts.d.mts.map +0 -1
- package/resources/posts/posts.d.ts +0 -300
- package/resources/posts/posts.d.ts.map +0 -1
- package/resources/posts/posts.js +0 -69
- package/resources/posts/posts.js.map +0 -1
- package/resources/posts/posts.mjs +0 -64
- package/resources/posts/posts.mjs.map +0 -1
- package/resources/posts/scheduled.d.mts +0 -121
- package/resources/posts/scheduled.d.mts.map +0 -1
- package/resources/posts/scheduled.d.ts +0 -121
- package/resources/posts/scheduled.d.ts.map +0 -1
- package/resources/posts/scheduled.js +0 -49
- package/resources/posts/scheduled.js.map +0 -1
- package/resources/posts/scheduled.mjs +0 -45
- package/resources/posts/scheduled.mjs.map +0 -1
- package/resources/posts.d.mts +0 -2
- package/resources/posts.d.mts.map +0 -1
- package/resources/posts.d.ts +0 -2
- package/resources/posts.d.ts.map +0 -1
- package/resources/posts.js +0 -6
- package/resources/posts.js.map +0 -1
- package/resources/posts.mjs +0 -3
- package/resources/posts.mjs.map +0 -1
- package/resources.d.mts +0 -2
- package/resources.d.mts.map +0 -1
- package/resources.d.ts +0 -2
- package/resources.d.ts.map +0 -1
- package/resources.js +0 -5
- package/resources.js.map +0 -1
- package/resources.mjs +0 -2
- package/resources.mjs.map +0 -1
- package/src/api-promise.ts +0 -2
- package/src/client.ts +0 -789
- package/src/core/README.md +0 -3
- package/src/core/api-promise.ts +0 -92
- package/src/core/error.ts +0 -130
- package/src/core/resource.ts +0 -11
- package/src/core/uploads.ts +0 -2
- package/src/error.ts +0 -2
- package/src/index.ts +0 -22
- package/src/internal/README.md +0 -3
- package/src/internal/builtin-types.ts +0 -93
- package/src/internal/detect-platform.ts +0 -196
- package/src/internal/errors.ts +0 -33
- package/src/internal/headers.ts +0 -97
- package/src/internal/parse.ts +0 -56
- package/src/internal/qs/LICENSE.md +0 -13
- package/src/internal/qs/README.md +0 -3
- package/src/internal/qs/formats.ts +0 -10
- package/src/internal/qs/index.ts +0 -13
- package/src/internal/qs/stringify.ts +0 -385
- package/src/internal/qs/types.ts +0 -71
- package/src/internal/qs/utils.ts +0 -265
- package/src/internal/request-options.ts +0 -91
- package/src/internal/shim-types.ts +0 -26
- package/src/internal/shims.ts +0 -107
- package/src/internal/to-file.ts +0 -154
- package/src/internal/types.ts +0 -93
- package/src/internal/uploads.ts +0 -187
- package/src/internal/utils/base64.ts +0 -40
- package/src/internal/utils/bytes.ts +0 -32
- package/src/internal/utils/env.ts +0 -18
- package/src/internal/utils/log.ts +0 -129
- package/src/internal/utils/path.ts +0 -88
- package/src/internal/utils/query.ts +0 -7
- package/src/internal/utils/sleep.ts +0 -3
- package/src/internal/utils/uuid.ts +0 -17
- package/src/internal/utils/values.ts +0 -105
- package/src/internal/utils.ts +0 -9
- package/src/lib/.keep +0 -4
- package/src/resource.ts +0 -2
- package/src/resources/connect/connect.ts +0 -70
- package/src/resources/connect/index.ts +0 -9
- package/src/resources/connect/integrations.ts +0 -130
- package/src/resources/connect.ts +0 -3
- package/src/resources/health.ts +0 -36
- package/src/resources/index.ts +0 -16
- package/src/resources/media.ts +0 -38
- package/src/resources/platforms.ts +0 -39
- package/src/resources/posts/index.ts +0 -20
- package/src/resources/posts/posts.ts +0 -472
- package/src/resources/posts/scheduled.ts +0 -180
- package/src/resources/posts.ts +0 -3
- package/src/resources.ts +0 -1
- package/src/tsconfig.json +0 -11
- package/src/uploads.ts +0 -2
- package/src/version.ts +0 -1
- package/uploads.d.mts +0 -3
- package/uploads.d.mts.map +0 -1
- package/uploads.d.ts +0 -3
- package/uploads.d.ts.map +0 -1
- package/uploads.js +0 -6
- package/uploads.js.map +0 -1
- package/uploads.mjs +0 -3
- package/uploads.mjs.map +0 -1
- package/version.d.mts +0 -2
- package/version.d.mts.map +0 -1
- package/version.d.ts +0 -2
- package/version.d.ts.map +0 -1
- package/version.js +0 -5
- package/version.js.map +0 -1
- package/version.mjs +0 -2
- package/version.mjs.map +0 -1
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export declare const isAbsoluteURL: (url: string) => boolean;
|
|
2
|
-
export declare let isArray: (val: unknown) => val is unknown[];
|
|
3
|
-
export declare let isReadonlyArray: (val: unknown) => val is readonly unknown[];
|
|
4
|
-
/** Returns an object if the given value isn't an object, otherwise returns as-is */
|
|
5
|
-
export declare function maybeObj(x: unknown): object;
|
|
6
|
-
export declare function isEmptyObj(obj: Object | null | undefined): boolean;
|
|
7
|
-
export declare function hasOwn<T extends object = object>(obj: T, key: PropertyKey): key is keyof T;
|
|
8
|
-
export declare function isObj(obj: unknown): obj is Record<string, unknown>;
|
|
9
|
-
export declare const ensurePresent: <T>(value: T | null | undefined) => T;
|
|
10
|
-
export declare const validatePositiveInteger: (name: string, n: unknown) => number;
|
|
11
|
-
export declare const coerceInteger: (value: unknown) => number;
|
|
12
|
-
export declare const coerceFloat: (value: unknown) => number;
|
|
13
|
-
export declare const coerceBoolean: (value: unknown) => boolean;
|
|
14
|
-
export declare const maybeCoerceInteger: (value: unknown) => number | undefined;
|
|
15
|
-
export declare const maybeCoerceFloat: (value: unknown) => number | undefined;
|
|
16
|
-
export declare const maybeCoerceBoolean: (value: unknown) => boolean | undefined;
|
|
17
|
-
export declare const safeJSON: (text: string) => any;
|
|
18
|
-
//# sourceMappingURL=values.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"values.d.ts","sourceRoot":"","sources":["../../src/internal/utils/values.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,KAAG,OAE3C,CAAC;AAEF,eAAO,IAAI,OAAO,GAAI,KAAK,OAAO,KAAG,GAAG,IAAI,OAAO,EAA+C,CAAC;AACnG,eAAO,IAAI,eAAe,EAAc,CAAC,GAAG,EAAE,OAAO,KA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
-
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.isReadonlyArray = exports.isArray = exports.isAbsoluteURL = void 0;
|
|
5
|
-
exports.maybeObj = maybeObj;
|
|
6
|
-
exports.isEmptyObj = isEmptyObj;
|
|
7
|
-
exports.hasOwn = hasOwn;
|
|
8
|
-
exports.isObj = isObj;
|
|
9
|
-
const error_1 = require("../../core/error.js");
|
|
10
|
-
// https://url.spec.whatwg.org/#url-scheme-string
|
|
11
|
-
const startsWithSchemeRegexp = /^[a-z][a-z0-9+.-]*:/i;
|
|
12
|
-
const isAbsoluteURL = (url) => {
|
|
13
|
-
return startsWithSchemeRegexp.test(url);
|
|
14
|
-
};
|
|
15
|
-
exports.isAbsoluteURL = isAbsoluteURL;
|
|
16
|
-
let isArray = (val) => ((exports.isArray = Array.isArray), (0, exports.isArray)(val));
|
|
17
|
-
exports.isArray = isArray;
|
|
18
|
-
exports.isReadonlyArray = exports.isArray;
|
|
19
|
-
/** Returns an object if the given value isn't an object, otherwise returns as-is */
|
|
20
|
-
function maybeObj(x) {
|
|
21
|
-
if (typeof x !== 'object') {
|
|
22
|
-
return {};
|
|
23
|
-
}
|
|
24
|
-
return x ?? {};
|
|
25
|
-
}
|
|
26
|
-
// https://stackoverflow.com/a/34491287
|
|
27
|
-
function isEmptyObj(obj) {
|
|
28
|
-
if (!obj)
|
|
29
|
-
return true;
|
|
30
|
-
for (const _k in obj)
|
|
31
|
-
return false;
|
|
32
|
-
return true;
|
|
33
|
-
}
|
|
34
|
-
// https://eslint.org/docs/latest/rules/no-prototype-builtins
|
|
35
|
-
function hasOwn(obj, key) {
|
|
36
|
-
return Object.prototype.hasOwnProperty.call(obj, key);
|
|
37
|
-
}
|
|
38
|
-
function isObj(obj) {
|
|
39
|
-
return obj != null && typeof obj === 'object' && !Array.isArray(obj);
|
|
40
|
-
}
|
|
41
|
-
const ensurePresent = (value) => {
|
|
42
|
-
if (value == null) {
|
|
43
|
-
throw new error_1.PostpeerError(`Expected a value to be given but received ${value} instead.`);
|
|
44
|
-
}
|
|
45
|
-
return value;
|
|
46
|
-
};
|
|
47
|
-
exports.ensurePresent = ensurePresent;
|
|
48
|
-
const validatePositiveInteger = (name, n) => {
|
|
49
|
-
if (typeof n !== 'number' || !Number.isInteger(n)) {
|
|
50
|
-
throw new error_1.PostpeerError(`${name} must be an integer`);
|
|
51
|
-
}
|
|
52
|
-
if (n < 0) {
|
|
53
|
-
throw new error_1.PostpeerError(`${name} must be a positive integer`);
|
|
54
|
-
}
|
|
55
|
-
return n;
|
|
56
|
-
};
|
|
57
|
-
exports.validatePositiveInteger = validatePositiveInteger;
|
|
58
|
-
const coerceInteger = (value) => {
|
|
59
|
-
if (typeof value === 'number')
|
|
60
|
-
return Math.round(value);
|
|
61
|
-
if (typeof value === 'string')
|
|
62
|
-
return parseInt(value, 10);
|
|
63
|
-
throw new error_1.PostpeerError(`Could not coerce ${value} (type: ${typeof value}) into a number`);
|
|
64
|
-
};
|
|
65
|
-
exports.coerceInteger = coerceInteger;
|
|
66
|
-
const coerceFloat = (value) => {
|
|
67
|
-
if (typeof value === 'number')
|
|
68
|
-
return value;
|
|
69
|
-
if (typeof value === 'string')
|
|
70
|
-
return parseFloat(value);
|
|
71
|
-
throw new error_1.PostpeerError(`Could not coerce ${value} (type: ${typeof value}) into a number`);
|
|
72
|
-
};
|
|
73
|
-
exports.coerceFloat = coerceFloat;
|
|
74
|
-
const coerceBoolean = (value) => {
|
|
75
|
-
if (typeof value === 'boolean')
|
|
76
|
-
return value;
|
|
77
|
-
if (typeof value === 'string')
|
|
78
|
-
return value === 'true';
|
|
79
|
-
return Boolean(value);
|
|
80
|
-
};
|
|
81
|
-
exports.coerceBoolean = coerceBoolean;
|
|
82
|
-
const maybeCoerceInteger = (value) => {
|
|
83
|
-
if (value == null) {
|
|
84
|
-
return undefined;
|
|
85
|
-
}
|
|
86
|
-
return (0, exports.coerceInteger)(value);
|
|
87
|
-
};
|
|
88
|
-
exports.maybeCoerceInteger = maybeCoerceInteger;
|
|
89
|
-
const maybeCoerceFloat = (value) => {
|
|
90
|
-
if (value == null) {
|
|
91
|
-
return undefined;
|
|
92
|
-
}
|
|
93
|
-
return (0, exports.coerceFloat)(value);
|
|
94
|
-
};
|
|
95
|
-
exports.maybeCoerceFloat = maybeCoerceFloat;
|
|
96
|
-
const maybeCoerceBoolean = (value) => {
|
|
97
|
-
if (value == null) {
|
|
98
|
-
return undefined;
|
|
99
|
-
}
|
|
100
|
-
return (0, exports.coerceBoolean)(value);
|
|
101
|
-
};
|
|
102
|
-
exports.maybeCoerceBoolean = maybeCoerceBoolean;
|
|
103
|
-
const safeJSON = (text) => {
|
|
104
|
-
try {
|
|
105
|
-
return JSON.parse(text);
|
|
106
|
-
}
|
|
107
|
-
catch (err) {
|
|
108
|
-
return undefined;
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
exports.safeJSON = safeJSON;
|
|
112
|
-
//# sourceMappingURL=values.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"values.js","sourceRoot":"","sources":["../../src/internal/utils/values.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAetF,4BAMC;AAGD,gCAIC;AAGD,wBAEC;AAED,sBAEC;AAnCD,+CAAiD;AAEjD,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;AAEK,IAAI,OAAO,GAAG,CAAC,GAAY,EAAoB,EAAE,CAAC,CAAC,CAAC,eAAO,GAAG,KAAK,CAAC,OAAO,CAAC,EAAE,IAAA,eAAO,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AI,EAAE,CAAC;QAClB,OAAO,SAAS,CAAC;IACnB,CAAC;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,IAAI,IAAI,EAAE,CAAC;QAClB,OAAO,SAAS,CAAC;IACnB,CAAC;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,IAAI,IAAI,EAAE,CAAC;QAClB,OAAO,SAAS,CAAC;IACnB,CAAC;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,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC,CAAC;AANW,QAAA,QAAQ,YAMnB"}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { PostpeerError } 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
|
-
export let isArray = (val) => ((isArray = Array.isArray), isArray(val));
|
|
9
|
-
export let isReadonlyArray = isArray;
|
|
10
|
-
/** Returns an object if the given value isn't an object, otherwise returns as-is */
|
|
11
|
-
export function maybeObj(x) {
|
|
12
|
-
if (typeof x !== 'object') {
|
|
13
|
-
return {};
|
|
14
|
-
}
|
|
15
|
-
return x ?? {};
|
|
16
|
-
}
|
|
17
|
-
// https://stackoverflow.com/a/34491287
|
|
18
|
-
export function isEmptyObj(obj) {
|
|
19
|
-
if (!obj)
|
|
20
|
-
return true;
|
|
21
|
-
for (const _k in obj)
|
|
22
|
-
return false;
|
|
23
|
-
return true;
|
|
24
|
-
}
|
|
25
|
-
// https://eslint.org/docs/latest/rules/no-prototype-builtins
|
|
26
|
-
export function hasOwn(obj, key) {
|
|
27
|
-
return Object.prototype.hasOwnProperty.call(obj, key);
|
|
28
|
-
}
|
|
29
|
-
export function isObj(obj) {
|
|
30
|
-
return obj != null && typeof obj === 'object' && !Array.isArray(obj);
|
|
31
|
-
}
|
|
32
|
-
export const ensurePresent = (value) => {
|
|
33
|
-
if (value == null) {
|
|
34
|
-
throw new PostpeerError(`Expected a value to be given but received ${value} instead.`);
|
|
35
|
-
}
|
|
36
|
-
return value;
|
|
37
|
-
};
|
|
38
|
-
export const validatePositiveInteger = (name, n) => {
|
|
39
|
-
if (typeof n !== 'number' || !Number.isInteger(n)) {
|
|
40
|
-
throw new PostpeerError(`${name} must be an integer`);
|
|
41
|
-
}
|
|
42
|
-
if (n < 0) {
|
|
43
|
-
throw new PostpeerError(`${name} must be a positive integer`);
|
|
44
|
-
}
|
|
45
|
-
return n;
|
|
46
|
-
};
|
|
47
|
-
export const coerceInteger = (value) => {
|
|
48
|
-
if (typeof value === 'number')
|
|
49
|
-
return Math.round(value);
|
|
50
|
-
if (typeof value === 'string')
|
|
51
|
-
return parseInt(value, 10);
|
|
52
|
-
throw new PostpeerError(`Could not coerce ${value} (type: ${typeof value}) into a number`);
|
|
53
|
-
};
|
|
54
|
-
export const coerceFloat = (value) => {
|
|
55
|
-
if (typeof value === 'number')
|
|
56
|
-
return value;
|
|
57
|
-
if (typeof value === 'string')
|
|
58
|
-
return parseFloat(value);
|
|
59
|
-
throw new PostpeerError(`Could not coerce ${value} (type: ${typeof value}) into a number`);
|
|
60
|
-
};
|
|
61
|
-
export const coerceBoolean = (value) => {
|
|
62
|
-
if (typeof value === 'boolean')
|
|
63
|
-
return value;
|
|
64
|
-
if (typeof value === 'string')
|
|
65
|
-
return value === 'true';
|
|
66
|
-
return Boolean(value);
|
|
67
|
-
};
|
|
68
|
-
export const maybeCoerceInteger = (value) => {
|
|
69
|
-
if (value == null) {
|
|
70
|
-
return undefined;
|
|
71
|
-
}
|
|
72
|
-
return coerceInteger(value);
|
|
73
|
-
};
|
|
74
|
-
export const maybeCoerceFloat = (value) => {
|
|
75
|
-
if (value == null) {
|
|
76
|
-
return undefined;
|
|
77
|
-
}
|
|
78
|
-
return coerceFloat(value);
|
|
79
|
-
};
|
|
80
|
-
export const maybeCoerceBoolean = (value) => {
|
|
81
|
-
if (value == null) {
|
|
82
|
-
return undefined;
|
|
83
|
-
}
|
|
84
|
-
return coerceBoolean(value);
|
|
85
|
-
};
|
|
86
|
-
export const safeJSON = (text) => {
|
|
87
|
-
try {
|
|
88
|
-
return JSON.parse(text);
|
|
89
|
-
}
|
|
90
|
-
catch (err) {
|
|
91
|
-
return undefined;
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
//# sourceMappingURL=values.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"values.mjs","sourceRoot":"","sources":["../../src/internal/utils/values.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,aAAa,EAAE,6BAAyB;AAEjD,iDAAiD;AACjD,MAAM,sBAAsB,GAAG,sBAAsB,CAAC;AAEtD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,GAAW,EAAW,EAAE;IACpD,OAAO,sBAAsB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC1C,CAAC,CAAC;AAEF,MAAM,CAAC,IAAI,OAAO,G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AsB,EAAE;IACvE,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;QAClB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,aAAa,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAc,EAAsB,EAAE;IACrE,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;QAClB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAAc,EAAuB,EAAE;IACxE,IAAI,KAAK,IAAI,IAAI,EAAE,CAAC;QAClB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,aAAa,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,EAAE;IACvC,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC,CAAC"}
|
package/internal/utils.d.mts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from "./utils/values.mjs";
|
|
2
|
-
export * from "./utils/base64.mjs";
|
|
3
|
-
export * from "./utils/env.mjs";
|
|
4
|
-
export * from "./utils/log.mjs";
|
|
5
|
-
export * from "./utils/uuid.mjs";
|
|
6
|
-
export * from "./utils/sleep.mjs";
|
|
7
|
-
export * from "./utils/query.mjs";
|
|
8
|
-
//# sourceMappingURL=utils.d.mts.map
|
package/internal/utils.d.mts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.mts","sourceRoot":"","sources":["../src/internal/utils.ts"],"names":[],"mappings":"AAEA,mCAA+B;AAC/B,mCAA+B;AAC/B,gCAA4B;AAC5B,gCAA4B;AAC5B,iCAA6B;AAC7B,kCAA8B;AAC9B,kCAA8B"}
|
package/internal/utils.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from "./utils/values.js";
|
|
2
|
-
export * from "./utils/base64.js";
|
|
3
|
-
export * from "./utils/env.js";
|
|
4
|
-
export * from "./utils/log.js";
|
|
5
|
-
export * from "./utils/uuid.js";
|
|
6
|
-
export * from "./utils/sleep.js";
|
|
7
|
-
export * from "./utils/query.js";
|
|
8
|
-
//# sourceMappingURL=utils.d.ts.map
|
package/internal/utils.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/internal/utils.ts"],"names":[],"mappings":"AAEA,kCAA+B;AAC/B,kCAA+B;AAC/B,+BAA4B;AAC5B,+BAA4B;AAC5B,gCAA6B;AAC7B,iCAA8B;AAC9B,iCAA8B"}
|
package/internal/utils.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
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
|
-
const tslib_1 = require("./tslib.js");
|
|
5
|
-
tslib_1.__exportStar(require("./utils/values.js"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./utils/base64.js"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./utils/env.js"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./utils/log.js"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("./utils/uuid.js"), exports);
|
|
10
|
-
tslib_1.__exportStar(require("./utils/sleep.js"), exports);
|
|
11
|
-
tslib_1.__exportStar(require("./utils/query.js"), exports);
|
|
12
|
-
//# sourceMappingURL=utils.js.map
|
package/internal/utils.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/internal/utils.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,4DAA+B;AAC/B,4DAA+B;AAC/B,yDAA4B;AAC5B,yDAA4B;AAC5B,0DAA6B;AAC7B,2DAA8B;AAC9B,2DAA8B"}
|
package/internal/utils.mjs
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
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
|
-
export * from "./utils/query.mjs";
|
|
9
|
-
//# sourceMappingURL=utils.mjs.map
|
package/internal/utils.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.mjs","sourceRoot":"","sources":["../src/internal/utils.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,mCAA+B;AAC/B,mCAA+B;AAC/B,gCAA4B;AAC5B,gCAA4B;AAC5B,iCAA6B;AAC7B,kCAA8B;AAC9B,kCAA8B"}
|
package/resource.d.mts
DELETED
package/resource.d.mts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resource.d.mts","sourceRoot":"","sources":["src/resource.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,oCAAgC"}
|
package/resource.d.ts
DELETED
package/resource.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["src/resource.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,mCAAgC"}
|
package/resource.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("./internal/tslib.js");
|
|
4
|
-
/** @deprecated Import from ./core/resource instead */
|
|
5
|
-
tslib_1.__exportStar(require("./core/resource.js"), exports);
|
|
6
|
-
//# sourceMappingURL=resource.js.map
|
package/resource.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resource.js","sourceRoot":"","sources":["src/resource.ts"],"names":[],"mappings":";;;AAAA,sDAAsD;AACtD,6DAAgC"}
|
package/resource.mjs
DELETED
package/resource.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resource.mjs","sourceRoot":"","sources":["src/resource.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,oCAAgC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
-
import * as IntegrationsAPI from "./integrations.mjs";
|
|
3
|
-
import { IntegrationDisconnectResponse, IntegrationListParams, IntegrationListResponse, Integrations } from "./integrations.mjs";
|
|
4
|
-
import { APIPromise } from "../../core/api-promise.mjs";
|
|
5
|
-
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
6
|
-
export declare class Connect extends APIResource {
|
|
7
|
-
integrations: IntegrationsAPI.Integrations;
|
|
8
|
-
/**
|
|
9
|
-
* Get OAuth URL for a platform
|
|
10
|
-
*/
|
|
11
|
-
getOAuthURL(platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky' | 'facebook' | 'threads', query?: ConnectGetOAuthURLParams | null | undefined, options?: RequestOptions): APIPromise<ConnectGetOAuthURLResponse>;
|
|
12
|
-
}
|
|
13
|
-
export interface ConnectGetOAuthURLResponse {
|
|
14
|
-
url: string;
|
|
15
|
-
}
|
|
16
|
-
export interface ConnectGetOAuthURLParams {
|
|
17
|
-
/**
|
|
18
|
-
* Profile to associate the resulting integration with. Must belong to the same
|
|
19
|
-
* project. Omit to connect without a profile.
|
|
20
|
-
*/
|
|
21
|
-
profileId?: string;
|
|
22
|
-
/**
|
|
23
|
-
* URL to redirect to after a successful connection
|
|
24
|
-
*/
|
|
25
|
-
redirectUri?: string;
|
|
26
|
-
}
|
|
27
|
-
export declare namespace Connect {
|
|
28
|
-
export { type ConnectGetOAuthURLResponse as ConnectGetOAuthURLResponse, type ConnectGetOAuthURLParams as ConnectGetOAuthURLParams, };
|
|
29
|
-
export { Integrations as Integrations, type IntegrationListResponse as IntegrationListResponse, type IntegrationDisconnectResponse as IntegrationDisconnectResponse, type IntegrationListParams as IntegrationListParams, };
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=connect.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"connect.d.mts","sourceRoot":"","sources":["../../src/resources/connect/connect.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,eAAe,2BAAuB;AAClD,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,EACrB,uBAAuB,EACvB,YAAY,EACb,2BAAuB;AACxB,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE,qBAAa,OAAQ,SAAQ,WAAW;IACtC,YAAY,EAAE,eAAe,CAAC,YAAY,CAAkD;IAE5F;;OAEG;IACH,WAAW,CACT,QAAQ,EACJ,SAAS,GACT,WAAW,GACX,SAAS,GACT,QAAQ,GACR,WAAW,GACX,UAAU,GACV,SAAS,GACT,UAAU,GACV,SAAS,EACb,KAAK,GAAE,wBAAwB,GAAG,IAAI,GAAG,SAAc,EACvD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,0BAA0B,CAAC;CAG1C;AAED,MAAM,WAAW,0BAA0B;IACzC,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAID,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;IAEF,OAAO,EACL,YAAY,IAAI,YAAY,EAC5B,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../../core/resource.js";
|
|
2
|
-
import * as IntegrationsAPI from "./integrations.js";
|
|
3
|
-
import { IntegrationDisconnectResponse, IntegrationListParams, IntegrationListResponse, Integrations } from "./integrations.js";
|
|
4
|
-
import { APIPromise } from "../../core/api-promise.js";
|
|
5
|
-
import { RequestOptions } from "../../internal/request-options.js";
|
|
6
|
-
export declare class Connect extends APIResource {
|
|
7
|
-
integrations: IntegrationsAPI.Integrations;
|
|
8
|
-
/**
|
|
9
|
-
* Get OAuth URL for a platform
|
|
10
|
-
*/
|
|
11
|
-
getOAuthURL(platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky' | 'facebook' | 'threads', query?: ConnectGetOAuthURLParams | null | undefined, options?: RequestOptions): APIPromise<ConnectGetOAuthURLResponse>;
|
|
12
|
-
}
|
|
13
|
-
export interface ConnectGetOAuthURLResponse {
|
|
14
|
-
url: string;
|
|
15
|
-
}
|
|
16
|
-
export interface ConnectGetOAuthURLParams {
|
|
17
|
-
/**
|
|
18
|
-
* Profile to associate the resulting integration with. Must belong to the same
|
|
19
|
-
* project. Omit to connect without a profile.
|
|
20
|
-
*/
|
|
21
|
-
profileId?: string;
|
|
22
|
-
/**
|
|
23
|
-
* URL to redirect to after a successful connection
|
|
24
|
-
*/
|
|
25
|
-
redirectUri?: string;
|
|
26
|
-
}
|
|
27
|
-
export declare namespace Connect {
|
|
28
|
-
export { type ConnectGetOAuthURLResponse as ConnectGetOAuthURLResponse, type ConnectGetOAuthURLParams as ConnectGetOAuthURLParams, };
|
|
29
|
-
export { Integrations as Integrations, type IntegrationListResponse as IntegrationListResponse, type IntegrationDisconnectResponse as IntegrationDisconnectResponse, type IntegrationListParams as IntegrationListParams, };
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=connect.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../src/resources/connect/connect.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,eAAe,0BAAuB;AAClD,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,EACrB,uBAAuB,EACvB,YAAY,EACb,0BAAuB;AACxB,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE,qBAAa,OAAQ,SAAQ,WAAW;IACtC,YAAY,EAAE,eAAe,CAAC,YAAY,CAAkD;IAE5F;;OAEG;IACH,WAAW,CACT,QAAQ,EACJ,SAAS,GACT,WAAW,GACX,SAAS,GACT,QAAQ,GACR,WAAW,GACX,UAAU,GACV,SAAS,GACT,UAAU,GACV,SAAS,EACb,KAAK,GAAE,wBAAwB,GAAG,IAAI,GAAG,SAAc,EACvD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,0BAA0B,CAAC;CAG1C;AAED,MAAM,WAAW,0BAA0B;IACzC,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAID,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;IAEF,OAAO,EACL,YAAY,IAAI,YAAY,EAC5B,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
|
|
@@ -1,24 +0,0 @@
|
|
|
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.Connect = void 0;
|
|
5
|
-
const tslib_1 = require("../../internal/tslib.js");
|
|
6
|
-
const resource_1 = require("../../core/resource.js");
|
|
7
|
-
const IntegrationsAPI = tslib_1.__importStar(require("./integrations.js"));
|
|
8
|
-
const integrations_1 = require("./integrations.js");
|
|
9
|
-
const path_1 = require("../../internal/utils/path.js");
|
|
10
|
-
class Connect extends resource_1.APIResource {
|
|
11
|
-
constructor() {
|
|
12
|
-
super(...arguments);
|
|
13
|
-
this.integrations = new IntegrationsAPI.Integrations(this._client);
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Get OAuth URL for a platform
|
|
17
|
-
*/
|
|
18
|
-
getOAuthURL(platform, query = {}, options) {
|
|
19
|
-
return this._client.get((0, path_1.path) `/v1/connect/${platform}`, { query, ...options });
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
exports.Connect = Connect;
|
|
23
|
-
Connect.Integrations = integrations_1.Integrations;
|
|
24
|
-
//# sourceMappingURL=connect.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"connect.js","sourceRoot":"","sources":["../../src/resources/connect/connect.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,2EAAkD;AAClD,oDAKwB;AAGxB,uDAAiD;AAEjD,MAAa,OAAQ,SAAQ,sBAAW;IAAxC;;QACE,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAqB9F,CAAC;IAnBC;;OAEG;IACH,WAAW,CACT,QASa,EACb,QAAqD,EAAE,EACvD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,eAAe,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;CACF;AAtBD,0BAsBC;AAmBD,OAAO,CAAC,YAAY,GAAG,2BAAY,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
-
import * as IntegrationsAPI from "./integrations.mjs";
|
|
4
|
-
import { Integrations, } from "./integrations.mjs";
|
|
5
|
-
import { path } from "../../internal/utils/path.mjs";
|
|
6
|
-
export class Connect extends APIResource {
|
|
7
|
-
constructor() {
|
|
8
|
-
super(...arguments);
|
|
9
|
-
this.integrations = new IntegrationsAPI.Integrations(this._client);
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Get OAuth URL for a platform
|
|
13
|
-
*/
|
|
14
|
-
getOAuthURL(platform, query = {}, options) {
|
|
15
|
-
return this._client.get(path `/v1/connect/${platform}`, { query, ...options });
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
Connect.Integrations = Integrations;
|
|
19
|
-
//# sourceMappingURL=connect.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"connect.mjs","sourceRoot":"","sources":["../../src/resources/connect/connect.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,eAAe,2BAAuB;AAClD,OAAO,EAIL,YAAY,GACb,2BAAuB;AAGxB,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD,MAAM,OAAO,OAAQ,SAAQ,WAAW;IAAxC;;QACE,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAqB9F,CAAC;IAnBC;;OAEG;IACH,WAAW,CACT,QASa,EACb,QAAqD,EAAE,EACvD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,eAAe,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;CACF;AAmBD,OAAO,CAAC,YAAY,GAAG,YAAY,CAAC"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { Connect, type ConnectGetOAuthURLResponse, type ConnectGetOAuthURLParams } from "./connect.mjs";
|
|
2
|
-
export { Integrations, type IntegrationListResponse, type IntegrationDisconnectResponse, type IntegrationListParams, } from "./integrations.mjs";
|
|
3
|
-
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/connect/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,KAAK,0BAA0B,EAAE,KAAK,wBAAwB,EAAE,sBAAkB;AACpG,OAAO,EACL,YAAY,EACZ,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,EAClC,KAAK,qBAAqB,GAC3B,2BAAuB"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { Connect, type ConnectGetOAuthURLResponse, type ConnectGetOAuthURLParams } from "./connect.js";
|
|
2
|
-
export { Integrations, type IntegrationListResponse, type IntegrationDisconnectResponse, type IntegrationListParams, } from "./integrations.js";
|
|
3
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/connect/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,KAAK,0BAA0B,EAAE,KAAK,wBAAwB,EAAE,qBAAkB;AACpG,OAAO,EACL,YAAY,EACZ,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,EAClC,KAAK,qBAAqB,GAC3B,0BAAuB"}
|
|
@@ -1,9 +0,0 @@
|
|
|
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.Integrations = exports.Connect = void 0;
|
|
5
|
-
var connect_1 = require("./connect.js");
|
|
6
|
-
Object.defineProperty(exports, "Connect", { enumerable: true, get: function () { return connect_1.Connect; } });
|
|
7
|
-
var integrations_1 = require("./integrations.js");
|
|
8
|
-
Object.defineProperty(exports, "Integrations", { enumerable: true, get: function () { return integrations_1.Integrations; } });
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/connect/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wCAAoG;AAA3F,kGAAA,OAAO,OAAA;AAChB,kDAKwB;AAJtB,4GAAA,YAAY,OAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/connect/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,OAAO,EAAkE,sBAAkB;AACpG,OAAO,EACL,YAAY,GAIb,2BAAuB"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
-
import { APIPromise } from "../../core/api-promise.mjs";
|
|
3
|
-
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
4
|
-
export declare class Integrations extends APIResource {
|
|
5
|
-
/**
|
|
6
|
-
* List integrations connected to this project
|
|
7
|
-
*/
|
|
8
|
-
list(query?: IntegrationListParams | null | undefined, options?: RequestOptions): APIPromise<IntegrationListResponse>;
|
|
9
|
-
/**
|
|
10
|
-
* Disconnect a platform integration
|
|
11
|
-
*/
|
|
12
|
-
disconnect(id: string, options?: RequestOptions): APIPromise<IntegrationDisconnectResponse>;
|
|
13
|
-
}
|
|
14
|
-
export interface IntegrationListResponse {
|
|
15
|
-
integrations: Array<IntegrationListResponse.Integration>;
|
|
16
|
-
success: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Total matched integrations across all pages
|
|
19
|
-
*/
|
|
20
|
-
total: number;
|
|
21
|
-
}
|
|
22
|
-
export declare namespace IntegrationListResponse {
|
|
23
|
-
interface Integration {
|
|
24
|
-
/**
|
|
25
|
-
* Use this as accountId when creating posts
|
|
26
|
-
*/
|
|
27
|
-
id: string;
|
|
28
|
-
createdAt: string;
|
|
29
|
-
/**
|
|
30
|
-
* Display name of the connected account (e.g. @handle or channel name)
|
|
31
|
-
*/
|
|
32
|
-
displayName: string | null;
|
|
33
|
-
/**
|
|
34
|
-
* Profile image URL for the connected account, or null if unavailable
|
|
35
|
-
*/
|
|
36
|
-
imageUrl: string | null;
|
|
37
|
-
platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky' | 'facebook' | 'threads';
|
|
38
|
-
/**
|
|
39
|
-
* The user ID on the platform, or null if not yet retrieved
|
|
40
|
-
*/
|
|
41
|
-
platformUserId: string | null;
|
|
42
|
-
/**
|
|
43
|
-
* Profile this integration belongs to, or null if it was connected without a
|
|
44
|
-
* profile
|
|
45
|
-
*/
|
|
46
|
-
profileId: string | null;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
export interface IntegrationDisconnectResponse {
|
|
50
|
-
message: string;
|
|
51
|
-
success: boolean;
|
|
52
|
-
}
|
|
53
|
-
export interface IntegrationListParams {
|
|
54
|
-
/**
|
|
55
|
-
* Page size (max 100)
|
|
56
|
-
*/
|
|
57
|
-
limit?: number;
|
|
58
|
-
/**
|
|
59
|
-
* Number of integrations to skip
|
|
60
|
-
*/
|
|
61
|
-
offset?: number;
|
|
62
|
-
platform?: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky' | 'facebook' | 'threads';
|
|
63
|
-
/**
|
|
64
|
-
* Filter to integrations belonging to this profile. Pass "null" (literal string)
|
|
65
|
-
* to filter to integrations with no profile.
|
|
66
|
-
*/
|
|
67
|
-
profileId?: string;
|
|
68
|
-
/**
|
|
69
|
-
* Case-insensitive search across the connected account name (displayName) and the
|
|
70
|
-
* platform user ID.
|
|
71
|
-
*/
|
|
72
|
-
q?: string;
|
|
73
|
-
sort?: 'asc' | 'desc';
|
|
74
|
-
}
|
|
75
|
-
export declare namespace Integrations {
|
|
76
|
-
export { type IntegrationListResponse as IntegrationListResponse, type IntegrationDisconnectResponse as IntegrationDisconnectResponse, type IntegrationListParams as IntegrationListParams, };
|
|
77
|
-
}
|
|
78
|
-
//# sourceMappingURL=integrations.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"integrations.d.mts","sourceRoot":"","sources":["../../src/resources/connect/integrations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;OAEG;IACH,IAAI,CACF,KAAK,GAAE,qBAAqB,GAAG,IAAI,GAAG,SAAc,EACpD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,CAAC;IAItC;;OAEG;IACH,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,6BAA6B,CAAC;CAG5F;AAED,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE,KAAK,CAAC,uBAAuB,CAAC,WAAW,CAAC,CAAC;IAEzD,OAAO,EAAE,OAAO,CAA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