@postpeer/node 0.6.0 → 0.8.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 +5 -101
- package/README.md +91 -317
- 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 +59 -131
- package/api-promise.d.mts +0 -2
- package/api-promise.d.mts.map +0 -1
- package/api-promise.d.ts +0 -2
- 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 -2
- 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 -2
- package/error.d.mts.map +0 -1
- package/error.d.ts +0 -2
- package/error.d.ts.map +0 -1
- package/error.js +0 -6
- package/error.js.map +0 -1
- package/error.mjs +0 -2
- 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 -20
- package/internal/shims.d.mts.map +0 -1
- package/internal/shims.d.ts +0 -20
- 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 -86
- package/internal/utils/log.js.map +0 -1
- package/internal/utils/log.mjs +0 -80
- 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 -2
- package/resource.d.mts.map +0 -1
- package/resource.d.ts +0 -2
- package/resource.d.ts.map +0 -1
- package/resource.js +0 -6
- package/resource.js.map +0 -1
- package/resource.mjs +0 -2
- package/resource.mjs.map +0 -1
- package/resources/connect/connect.d.mts +0 -26
- package/resources/connect/connect.d.mts.map +0 -1
- package/resources/connect/connect.d.ts +0 -26
- 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 -64
- package/resources/connect/integrations.d.mts.map +0 -1
- package/resources/connect/integrations.d.ts +0 -64
- 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 -279
- package/resources/posts/posts.d.mts.map +0 -1
- package/resources/posts/posts.d.ts +0 -279
- 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 -105
- package/resources/posts/scheduled.d.mts.map +0 -1
- package/resources/posts/scheduled.d.ts +0 -105
- package/resources/posts/scheduled.d.ts.map +0 -1
- package/resources/posts/scheduled.js +0 -48
- package/resources/posts/scheduled.js.map +0 -1
- package/resources/posts/scheduled.mjs +0 -44
- 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 -127
- 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 -55
- package/src/resources/connect/index.ts +0 -9
- package/src/resources/connect/integrations.ts +0 -96
- 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 -30
- package/src/resources/posts/index.ts +0 -19
- package/src/resources/posts/posts.ts +0 -399
- package/src/resources/posts/scheduled.ts +0 -147
- 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 -2
- package/uploads.d.mts.map +0 -1
- package/uploads.d.ts +0 -2
- package/uploads.d.ts.map +0 -1
- package/uploads.js +0 -6
- package/uploads.js.map +0 -1
- package/uploads.mjs +0 -2
- 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,279 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
-
import * as ScheduledAPI from "./scheduled.mjs";
|
|
3
|
-
import { Scheduled, ScheduledCancelResponse, ScheduledListResponse, ScheduledRescheduleParams, ScheduledRescheduleResponse } from "./scheduled.mjs";
|
|
4
|
-
import { APIPromise } from "../../core/api-promise.mjs";
|
|
5
|
-
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
6
|
-
export declare class Posts extends APIResource {
|
|
7
|
-
scheduled: ScheduledAPI.Scheduled;
|
|
8
|
-
/**
|
|
9
|
-
* Publish a post to one or more social media platforms
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts
|
|
13
|
-
* const post = await client.posts.create({
|
|
14
|
-
* content: 'Hello world!',
|
|
15
|
-
* platforms: [
|
|
16
|
-
* { platform: 'twitter', accountId: '<your-account-id>' },
|
|
17
|
-
* ],
|
|
18
|
-
* publishNow: true,
|
|
19
|
-
* });
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
create(body: PostCreateParams, options?: RequestOptions): APIPromise<PostCreateResponse>;
|
|
23
|
-
/**
|
|
24
|
-
* Get a single post by ID
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```ts
|
|
28
|
-
* const post = await client.posts.retrieve('postId');
|
|
29
|
-
* ```
|
|
30
|
-
*/
|
|
31
|
-
retrieve(postID: string, options?: RequestOptions): APIPromise<PostRetrieveResponse>;
|
|
32
|
-
/**
|
|
33
|
-
* Returns a paginated list of posts. Filter by status, platform (OR logic), and
|
|
34
|
-
* date ranges. Published posts include platformPostUrl per platform.
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* ```ts
|
|
38
|
-
* const posts = await client.posts.list();
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
list(query?: PostListParams | null | undefined, options?: RequestOptions): APIPromise<PostListResponse>;
|
|
42
|
-
/**
|
|
43
|
-
* Delete a post by ID
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* ```ts
|
|
47
|
-
* const post = await client.posts.delete('postId');
|
|
48
|
-
* ```
|
|
49
|
-
*/
|
|
50
|
-
delete(postID: string, options?: RequestOptions): APIPromise<PostDeleteResponse>;
|
|
51
|
-
}
|
|
52
|
-
export type Status = 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
53
|
-
export interface PostCreateResponse {
|
|
54
|
-
platforms: Array<PostCreateResponse.Platform>;
|
|
55
|
-
/**
|
|
56
|
-
* id of the saved Post document
|
|
57
|
-
*/
|
|
58
|
-
postId: string;
|
|
59
|
-
status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
60
|
-
/**
|
|
61
|
-
* false only when every platform failed
|
|
62
|
-
*/
|
|
63
|
-
success: boolean;
|
|
64
|
-
/**
|
|
65
|
-
* ISO 8601 datetime the post is scheduled for (only present for scheduled posts)
|
|
66
|
-
*/
|
|
67
|
-
scheduledFor?: string;
|
|
68
|
-
}
|
|
69
|
-
export declare namespace PostCreateResponse {
|
|
70
|
-
interface Platform {
|
|
71
|
-
platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky';
|
|
72
|
-
success: boolean;
|
|
73
|
-
/**
|
|
74
|
-
* Error message when success is false
|
|
75
|
-
*/
|
|
76
|
-
error?: string;
|
|
77
|
-
/**
|
|
78
|
-
* Direct URL to the published post
|
|
79
|
-
*/
|
|
80
|
-
platformPostUrl?: string;
|
|
81
|
-
/**
|
|
82
|
-
* Warning message when the post published but a non-critical follow-up action
|
|
83
|
-
* failed
|
|
84
|
-
*/
|
|
85
|
-
warningMessage?: string;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
export interface PostRetrieveResponse {
|
|
89
|
-
post: PostRetrieveResponse.Post;
|
|
90
|
-
success: boolean;
|
|
91
|
-
}
|
|
92
|
-
export declare namespace PostRetrieveResponse {
|
|
93
|
-
interface Post {
|
|
94
|
-
content: string;
|
|
95
|
-
createdAt: string;
|
|
96
|
-
crosspostingEnabled: boolean;
|
|
97
|
-
mediaItems: Array<Post.MediaItem>;
|
|
98
|
-
platforms: Array<Post.Platform>;
|
|
99
|
-
/**
|
|
100
|
-
* MongoDB ObjectId of the Post document
|
|
101
|
-
*/
|
|
102
|
-
postId: string;
|
|
103
|
-
rawRequestBody: {
|
|
104
|
-
[key: string]: unknown;
|
|
105
|
-
};
|
|
106
|
-
/**
|
|
107
|
-
* ISO 8601 scheduled datetime
|
|
108
|
-
*/
|
|
109
|
-
scheduledFor: string | null;
|
|
110
|
-
status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
111
|
-
timezone: string;
|
|
112
|
-
updatedAt: string;
|
|
113
|
-
}
|
|
114
|
-
namespace Post {
|
|
115
|
-
interface MediaItem {
|
|
116
|
-
filename: string;
|
|
117
|
-
mimeType: string;
|
|
118
|
-
size: number;
|
|
119
|
-
type: 'image' | 'video' | 'gif';
|
|
120
|
-
url: string;
|
|
121
|
-
}
|
|
122
|
-
interface Platform {
|
|
123
|
-
errorMessage: string | null;
|
|
124
|
-
platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky';
|
|
125
|
-
platformPostId: string | null;
|
|
126
|
-
/**
|
|
127
|
-
* Direct URL to the published post
|
|
128
|
-
*/
|
|
129
|
-
platformPostUrl: string | null;
|
|
130
|
-
publishedAt: string | null;
|
|
131
|
-
status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
132
|
-
warningMessage: string | null;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
export interface PostListResponse {
|
|
137
|
-
posts: Array<PostListResponse.Post>;
|
|
138
|
-
success: boolean;
|
|
139
|
-
/**
|
|
140
|
-
* Total matched posts across all pages
|
|
141
|
-
*/
|
|
142
|
-
total: number;
|
|
143
|
-
}
|
|
144
|
-
export declare namespace PostListResponse {
|
|
145
|
-
interface Post {
|
|
146
|
-
content: string;
|
|
147
|
-
createdAt: string;
|
|
148
|
-
crosspostingEnabled: boolean;
|
|
149
|
-
mediaItems: Array<Post.MediaItem>;
|
|
150
|
-
platforms: Array<Post.Platform>;
|
|
151
|
-
/**
|
|
152
|
-
* MongoDB ObjectId of the Post document
|
|
153
|
-
*/
|
|
154
|
-
postId: string;
|
|
155
|
-
rawRequestBody: {
|
|
156
|
-
[key: string]: unknown;
|
|
157
|
-
};
|
|
158
|
-
/**
|
|
159
|
-
* ISO 8601 scheduled datetime
|
|
160
|
-
*/
|
|
161
|
-
scheduledFor: string | null;
|
|
162
|
-
status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
163
|
-
timezone: string;
|
|
164
|
-
updatedAt: string;
|
|
165
|
-
}
|
|
166
|
-
namespace Post {
|
|
167
|
-
interface MediaItem {
|
|
168
|
-
filename: string;
|
|
169
|
-
mimeType: string;
|
|
170
|
-
size: number;
|
|
171
|
-
type: 'image' | 'video' | 'gif';
|
|
172
|
-
url: string;
|
|
173
|
-
}
|
|
174
|
-
interface Platform {
|
|
175
|
-
errorMessage: string | null;
|
|
176
|
-
platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky';
|
|
177
|
-
platformPostId: string | null;
|
|
178
|
-
/**
|
|
179
|
-
* Direct URL to the published post
|
|
180
|
-
*/
|
|
181
|
-
platformPostUrl: string | null;
|
|
182
|
-
publishedAt: string | null;
|
|
183
|
-
status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
184
|
-
warningMessage: string | null;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
export interface PostDeleteResponse {
|
|
189
|
-
success: boolean;
|
|
190
|
-
}
|
|
191
|
-
export interface PostCreateParams {
|
|
192
|
-
/**
|
|
193
|
-
* Post text body
|
|
194
|
-
*/
|
|
195
|
-
content: string;
|
|
196
|
-
/**
|
|
197
|
-
* Target platform accounts to publish to
|
|
198
|
-
*/
|
|
199
|
-
platforms: Array<PostCreateParams.Platform>;
|
|
200
|
-
/**
|
|
201
|
-
* Media attachments (images, videos, GIFs)
|
|
202
|
-
*/
|
|
203
|
-
mediaItems?: Array<PostCreateParams.MediaItem>;
|
|
204
|
-
/**
|
|
205
|
-
* Publish immediately. Required when scheduledFor is omitted.
|
|
206
|
-
*/
|
|
207
|
-
publishNow?: boolean;
|
|
208
|
-
/**
|
|
209
|
-
* ISO 8601 datetime to schedule the post for future publishing
|
|
210
|
-
*/
|
|
211
|
-
scheduledFor?: string;
|
|
212
|
-
/**
|
|
213
|
-
* IANA timezone for the scheduled time (e.g. America/New_York). Defaults to UTC.
|
|
214
|
-
*/
|
|
215
|
-
timezone?: string;
|
|
216
|
-
}
|
|
217
|
-
export declare namespace PostCreateParams {
|
|
218
|
-
interface Platform {
|
|
219
|
-
/**
|
|
220
|
-
* Integration.\_id — find yours via GET /connect/integrations
|
|
221
|
-
*/
|
|
222
|
-
accountId: string;
|
|
223
|
-
platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky';
|
|
224
|
-
/**
|
|
225
|
-
* Platform-specific options. See TwitterConfigurations, YouTubeConfigurations,
|
|
226
|
-
* TikTokConfigurations, PinterestConfigurations, or LinkedInConfigurations in the
|
|
227
|
-
* schema reference for available fields per platform.
|
|
228
|
-
*/
|
|
229
|
-
platformSpecificData?: {
|
|
230
|
-
[key: string]: unknown;
|
|
231
|
-
};
|
|
232
|
-
}
|
|
233
|
-
interface MediaItem {
|
|
234
|
-
type: 'image' | 'video' | 'gif';
|
|
235
|
-
url: string;
|
|
236
|
-
/**
|
|
237
|
-
* Thumbnail image URL for video items. Supported on YouTube regular videos (not
|
|
238
|
-
* Shorts). JPEG, PNG, or GIF, max 2 MB, min 640 px wide.
|
|
239
|
-
*/
|
|
240
|
-
thumbnail?: string;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
export interface PostListParams {
|
|
244
|
-
/**
|
|
245
|
-
* ISO 8601 lower bound on createdAt
|
|
246
|
-
*/
|
|
247
|
-
createdAfter?: string;
|
|
248
|
-
/**
|
|
249
|
-
* ISO 8601 upper bound on createdAt
|
|
250
|
-
*/
|
|
251
|
-
createdBefore?: string;
|
|
252
|
-
/**
|
|
253
|
-
* Page size (max 100)
|
|
254
|
-
*/
|
|
255
|
-
limit?: number;
|
|
256
|
-
/**
|
|
257
|
-
* Number of posts to skip
|
|
258
|
-
*/
|
|
259
|
-
offset?: number;
|
|
260
|
-
/**
|
|
261
|
-
* Filter by platform (repeatable — OR logic)
|
|
262
|
-
*/
|
|
263
|
-
platform?: Array<'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky'>;
|
|
264
|
-
/**
|
|
265
|
-
* ISO 8601 lower bound on scheduledFor
|
|
266
|
-
*/
|
|
267
|
-
scheduledAfter?: string;
|
|
268
|
-
/**
|
|
269
|
-
* ISO 8601 upper bound on scheduledFor
|
|
270
|
-
*/
|
|
271
|
-
scheduledBefore?: string;
|
|
272
|
-
sort?: 'asc' | 'desc';
|
|
273
|
-
status?: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
274
|
-
}
|
|
275
|
-
export declare namespace Posts {
|
|
276
|
-
export { type Status as Status, type PostCreateResponse as PostCreateResponse, type PostRetrieveResponse as PostRetrieveResponse, type PostListResponse as PostListResponse, type PostDeleteResponse as PostDeleteResponse, type PostCreateParams as PostCreateParams, type PostListParams as PostListParams, };
|
|
277
|
-
export { Scheduled as Scheduled, type ScheduledListResponse as ScheduledListResponse, type ScheduledCancelResponse as ScheduledCancelResponse, type ScheduledRescheduleResponse as ScheduledRescheduleResponse, type ScheduledRescheduleParams as ScheduledRescheduleParams, };
|
|
278
|
-
}
|
|
279
|
-
//# sourceMappingURL=posts.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"posts.d.mts","sourceRoot":"","sources":["../../src/resources/posts/posts.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,YAAY;OACjB,EACL,SAAS,EACT,uBAAuB,EACvB,qBAAqB,EACrB,yBAAyB,EACzB,2BAA2B,EAC5B;OACM,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,KAAM,SAAQ,WAAW;IACpC,SAAS,EAAE,YAAY,CAAC,SAAS,CAA4C;IAE7E;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,IAAI,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,kBAAkB,CAAC;IAIxF;;;;;;;OAOG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;IAIpF;;;;;;;;OAQG;IACH,IAAI,CACF,KAAK,GAAE,cAAc,GAAG,IAAI,GAAG,SAAc,EAC7C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,gBAAgB,CAAC;IAI/B;;;;;;;OAOG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,kBAAkB,CAAC;CAGjF;AAED,MAAM,MAAM,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,WAAW,GAAG,YAAY,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE3G,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,KAAK,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IAE9C;;OAEG;IACH,MA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AG,SAAS,GAAG,WAAW,GAAG,YAAY,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;CAChG;AAID,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;IAEF,OAAO,EACL,SAAS,IAAI,SAAS,EACtB,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
|
@@ -1,279 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../../core/resource.js";
|
|
2
|
-
import * as ScheduledAPI from "./scheduled.js";
|
|
3
|
-
import { Scheduled, ScheduledCancelResponse, ScheduledListResponse, ScheduledRescheduleParams, ScheduledRescheduleResponse } from "./scheduled.js";
|
|
4
|
-
import { APIPromise } from "../../core/api-promise.js";
|
|
5
|
-
import { RequestOptions } from "../../internal/request-options.js";
|
|
6
|
-
export declare class Posts extends APIResource {
|
|
7
|
-
scheduled: ScheduledAPI.Scheduled;
|
|
8
|
-
/**
|
|
9
|
-
* Publish a post to one or more social media platforms
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts
|
|
13
|
-
* const post = await client.posts.create({
|
|
14
|
-
* content: 'Hello world!',
|
|
15
|
-
* platforms: [
|
|
16
|
-
* { platform: 'twitter', accountId: '<your-account-id>' },
|
|
17
|
-
* ],
|
|
18
|
-
* publishNow: true,
|
|
19
|
-
* });
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
create(body: PostCreateParams, options?: RequestOptions): APIPromise<PostCreateResponse>;
|
|
23
|
-
/**
|
|
24
|
-
* Get a single post by ID
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```ts
|
|
28
|
-
* const post = await client.posts.retrieve('postId');
|
|
29
|
-
* ```
|
|
30
|
-
*/
|
|
31
|
-
retrieve(postID: string, options?: RequestOptions): APIPromise<PostRetrieveResponse>;
|
|
32
|
-
/**
|
|
33
|
-
* Returns a paginated list of posts. Filter by status, platform (OR logic), and
|
|
34
|
-
* date ranges. Published posts include platformPostUrl per platform.
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* ```ts
|
|
38
|
-
* const posts = await client.posts.list();
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
list(query?: PostListParams | null | undefined, options?: RequestOptions): APIPromise<PostListResponse>;
|
|
42
|
-
/**
|
|
43
|
-
* Delete a post by ID
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* ```ts
|
|
47
|
-
* const post = await client.posts.delete('postId');
|
|
48
|
-
* ```
|
|
49
|
-
*/
|
|
50
|
-
delete(postID: string, options?: RequestOptions): APIPromise<PostDeleteResponse>;
|
|
51
|
-
}
|
|
52
|
-
export type Status = 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
53
|
-
export interface PostCreateResponse {
|
|
54
|
-
platforms: Array<PostCreateResponse.Platform>;
|
|
55
|
-
/**
|
|
56
|
-
* id of the saved Post document
|
|
57
|
-
*/
|
|
58
|
-
postId: string;
|
|
59
|
-
status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
60
|
-
/**
|
|
61
|
-
* false only when every platform failed
|
|
62
|
-
*/
|
|
63
|
-
success: boolean;
|
|
64
|
-
/**
|
|
65
|
-
* ISO 8601 datetime the post is scheduled for (only present for scheduled posts)
|
|
66
|
-
*/
|
|
67
|
-
scheduledFor?: string;
|
|
68
|
-
}
|
|
69
|
-
export declare namespace PostCreateResponse {
|
|
70
|
-
interface Platform {
|
|
71
|
-
platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky';
|
|
72
|
-
success: boolean;
|
|
73
|
-
/**
|
|
74
|
-
* Error message when success is false
|
|
75
|
-
*/
|
|
76
|
-
error?: string;
|
|
77
|
-
/**
|
|
78
|
-
* Direct URL to the published post
|
|
79
|
-
*/
|
|
80
|
-
platformPostUrl?: string;
|
|
81
|
-
/**
|
|
82
|
-
* Warning message when the post published but a non-critical follow-up action
|
|
83
|
-
* failed
|
|
84
|
-
*/
|
|
85
|
-
warningMessage?: string;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
export interface PostRetrieveResponse {
|
|
89
|
-
post: PostRetrieveResponse.Post;
|
|
90
|
-
success: boolean;
|
|
91
|
-
}
|
|
92
|
-
export declare namespace PostRetrieveResponse {
|
|
93
|
-
interface Post {
|
|
94
|
-
content: string;
|
|
95
|
-
createdAt: string;
|
|
96
|
-
crosspostingEnabled: boolean;
|
|
97
|
-
mediaItems: Array<Post.MediaItem>;
|
|
98
|
-
platforms: Array<Post.Platform>;
|
|
99
|
-
/**
|
|
100
|
-
* MongoDB ObjectId of the Post document
|
|
101
|
-
*/
|
|
102
|
-
postId: string;
|
|
103
|
-
rawRequestBody: {
|
|
104
|
-
[key: string]: unknown;
|
|
105
|
-
};
|
|
106
|
-
/**
|
|
107
|
-
* ISO 8601 scheduled datetime
|
|
108
|
-
*/
|
|
109
|
-
scheduledFor: string | null;
|
|
110
|
-
status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
111
|
-
timezone: string;
|
|
112
|
-
updatedAt: string;
|
|
113
|
-
}
|
|
114
|
-
namespace Post {
|
|
115
|
-
interface MediaItem {
|
|
116
|
-
filename: string;
|
|
117
|
-
mimeType: string;
|
|
118
|
-
size: number;
|
|
119
|
-
type: 'image' | 'video' | 'gif';
|
|
120
|
-
url: string;
|
|
121
|
-
}
|
|
122
|
-
interface Platform {
|
|
123
|
-
errorMessage: string | null;
|
|
124
|
-
platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky';
|
|
125
|
-
platformPostId: string | null;
|
|
126
|
-
/**
|
|
127
|
-
* Direct URL to the published post
|
|
128
|
-
*/
|
|
129
|
-
platformPostUrl: string | null;
|
|
130
|
-
publishedAt: string | null;
|
|
131
|
-
status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
132
|
-
warningMessage: string | null;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
export interface PostListResponse {
|
|
137
|
-
posts: Array<PostListResponse.Post>;
|
|
138
|
-
success: boolean;
|
|
139
|
-
/**
|
|
140
|
-
* Total matched posts across all pages
|
|
141
|
-
*/
|
|
142
|
-
total: number;
|
|
143
|
-
}
|
|
144
|
-
export declare namespace PostListResponse {
|
|
145
|
-
interface Post {
|
|
146
|
-
content: string;
|
|
147
|
-
createdAt: string;
|
|
148
|
-
crosspostingEnabled: boolean;
|
|
149
|
-
mediaItems: Array<Post.MediaItem>;
|
|
150
|
-
platforms: Array<Post.Platform>;
|
|
151
|
-
/**
|
|
152
|
-
* MongoDB ObjectId of the Post document
|
|
153
|
-
*/
|
|
154
|
-
postId: string;
|
|
155
|
-
rawRequestBody: {
|
|
156
|
-
[key: string]: unknown;
|
|
157
|
-
};
|
|
158
|
-
/**
|
|
159
|
-
* ISO 8601 scheduled datetime
|
|
160
|
-
*/
|
|
161
|
-
scheduledFor: string | null;
|
|
162
|
-
status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
163
|
-
timezone: string;
|
|
164
|
-
updatedAt: string;
|
|
165
|
-
}
|
|
166
|
-
namespace Post {
|
|
167
|
-
interface MediaItem {
|
|
168
|
-
filename: string;
|
|
169
|
-
mimeType: string;
|
|
170
|
-
size: number;
|
|
171
|
-
type: 'image' | 'video' | 'gif';
|
|
172
|
-
url: string;
|
|
173
|
-
}
|
|
174
|
-
interface Platform {
|
|
175
|
-
errorMessage: string | null;
|
|
176
|
-
platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky';
|
|
177
|
-
platformPostId: string | null;
|
|
178
|
-
/**
|
|
179
|
-
* Direct URL to the published post
|
|
180
|
-
*/
|
|
181
|
-
platformPostUrl: string | null;
|
|
182
|
-
publishedAt: string | null;
|
|
183
|
-
status: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
184
|
-
warningMessage: string | null;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
export interface PostDeleteResponse {
|
|
189
|
-
success: boolean;
|
|
190
|
-
}
|
|
191
|
-
export interface PostCreateParams {
|
|
192
|
-
/**
|
|
193
|
-
* Post text body
|
|
194
|
-
*/
|
|
195
|
-
content: string;
|
|
196
|
-
/**
|
|
197
|
-
* Target platform accounts to publish to
|
|
198
|
-
*/
|
|
199
|
-
platforms: Array<PostCreateParams.Platform>;
|
|
200
|
-
/**
|
|
201
|
-
* Media attachments (images, videos, GIFs)
|
|
202
|
-
*/
|
|
203
|
-
mediaItems?: Array<PostCreateParams.MediaItem>;
|
|
204
|
-
/**
|
|
205
|
-
* Publish immediately. Required when scheduledFor is omitted.
|
|
206
|
-
*/
|
|
207
|
-
publishNow?: boolean;
|
|
208
|
-
/**
|
|
209
|
-
* ISO 8601 datetime to schedule the post for future publishing
|
|
210
|
-
*/
|
|
211
|
-
scheduledFor?: string;
|
|
212
|
-
/**
|
|
213
|
-
* IANA timezone for the scheduled time (e.g. America/New_York). Defaults to UTC.
|
|
214
|
-
*/
|
|
215
|
-
timezone?: string;
|
|
216
|
-
}
|
|
217
|
-
export declare namespace PostCreateParams {
|
|
218
|
-
interface Platform {
|
|
219
|
-
/**
|
|
220
|
-
* Integration.\_id — find yours via GET /connect/integrations
|
|
221
|
-
*/
|
|
222
|
-
accountId: string;
|
|
223
|
-
platform: 'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky';
|
|
224
|
-
/**
|
|
225
|
-
* Platform-specific options. See TwitterConfigurations, YouTubeConfigurations,
|
|
226
|
-
* TikTokConfigurations, PinterestConfigurations, or LinkedInConfigurations in the
|
|
227
|
-
* schema reference for available fields per platform.
|
|
228
|
-
*/
|
|
229
|
-
platformSpecificData?: {
|
|
230
|
-
[key: string]: unknown;
|
|
231
|
-
};
|
|
232
|
-
}
|
|
233
|
-
interface MediaItem {
|
|
234
|
-
type: 'image' | 'video' | 'gif';
|
|
235
|
-
url: string;
|
|
236
|
-
/**
|
|
237
|
-
* Thumbnail image URL for video items. Supported on YouTube regular videos (not
|
|
238
|
-
* Shorts). JPEG, PNG, or GIF, max 2 MB, min 640 px wide.
|
|
239
|
-
*/
|
|
240
|
-
thumbnail?: string;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
export interface PostListParams {
|
|
244
|
-
/**
|
|
245
|
-
* ISO 8601 lower bound on createdAt
|
|
246
|
-
*/
|
|
247
|
-
createdAfter?: string;
|
|
248
|
-
/**
|
|
249
|
-
* ISO 8601 upper bound on createdAt
|
|
250
|
-
*/
|
|
251
|
-
createdBefore?: string;
|
|
252
|
-
/**
|
|
253
|
-
* Page size (max 100)
|
|
254
|
-
*/
|
|
255
|
-
limit?: number;
|
|
256
|
-
/**
|
|
257
|
-
* Number of posts to skip
|
|
258
|
-
*/
|
|
259
|
-
offset?: number;
|
|
260
|
-
/**
|
|
261
|
-
* Filter by platform (repeatable — OR logic)
|
|
262
|
-
*/
|
|
263
|
-
platform?: Array<'twitter' | 'instagram' | 'youtube' | 'tiktok' | 'pinterest' | 'linkedin' | 'bluesky'>;
|
|
264
|
-
/**
|
|
265
|
-
* ISO 8601 lower bound on scheduledFor
|
|
266
|
-
*/
|
|
267
|
-
scheduledAfter?: string;
|
|
268
|
-
/**
|
|
269
|
-
* ISO 8601 upper bound on scheduledFor
|
|
270
|
-
*/
|
|
271
|
-
scheduledBefore?: string;
|
|
272
|
-
sort?: 'asc' | 'desc';
|
|
273
|
-
status?: 'draft' | 'pending' | 'scheduled' | 'publishing' | 'published' | 'failed' | 'partial';
|
|
274
|
-
}
|
|
275
|
-
export declare namespace Posts {
|
|
276
|
-
export { type Status as Status, type PostCreateResponse as PostCreateResponse, type PostRetrieveResponse as PostRetrieveResponse, type PostListResponse as PostListResponse, type PostDeleteResponse as PostDeleteResponse, type PostCreateParams as PostCreateParams, type PostListParams as PostListParams, };
|
|
277
|
-
export { Scheduled as Scheduled, type ScheduledListResponse as ScheduledListResponse, type ScheduledCancelResponse as ScheduledCancelResponse, type ScheduledRescheduleResponse as ScheduledRescheduleResponse, type ScheduledRescheduleParams as ScheduledRescheduleParams, };
|
|
278
|
-
}
|
|
279
|
-
//# sourceMappingURL=posts.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"posts.d.ts","sourceRoot":"","sources":["../../src/resources/posts/posts.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,YAAY;OACjB,EACL,SAAS,EACT,uBAAuB,EACvB,qBAAqB,EACrB,yBAAyB,EACzB,2BAA2B,EAC5B;OACM,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,KAAM,SAAQ,WAAW;IACpC,SAAS,EAAE,YAAY,CAAC,SAAS,CAA4C;IAE7E;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,IAAI,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,kBAAkB,CAAC;IAIxF;;;;;;;OAOG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;IAIpF;;;;;;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E,MAAM,CAAC;IAEtB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,CAAC,CAAC;IAExG;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAEtB,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,WAAW,GAAG,YAAY,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;CAChG;AAID,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;IAEF,OAAO,EACL,SAAS,IAAI,SAAS,EACtB,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
package/resources/posts/posts.js
DELETED
|
@@ -1,69 +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.Posts = void 0;
|
|
5
|
-
const tslib_1 = require("../../internal/tslib.js");
|
|
6
|
-
const resource_1 = require("../../core/resource.js");
|
|
7
|
-
const ScheduledAPI = tslib_1.__importStar(require("./scheduled.js"));
|
|
8
|
-
const scheduled_1 = require("./scheduled.js");
|
|
9
|
-
const path_1 = require("../../internal/utils/path.js");
|
|
10
|
-
class Posts extends resource_1.APIResource {
|
|
11
|
-
constructor() {
|
|
12
|
-
super(...arguments);
|
|
13
|
-
this.scheduled = new ScheduledAPI.Scheduled(this._client);
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Publish a post to one or more social media platforms
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* ```ts
|
|
20
|
-
* const post = await client.posts.create({
|
|
21
|
-
* content: 'Hello world!',
|
|
22
|
-
* platforms: [
|
|
23
|
-
* { platform: 'twitter', accountId: '<your-account-id>' },
|
|
24
|
-
* ],
|
|
25
|
-
* publishNow: true,
|
|
26
|
-
* });
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
|
-
create(body, options) {
|
|
30
|
-
return this._client.post('/v1/posts/', { body, ...options });
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Get a single post by ID
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* ```ts
|
|
37
|
-
* const post = await client.posts.retrieve('postId');
|
|
38
|
-
* ```
|
|
39
|
-
*/
|
|
40
|
-
retrieve(postID, options) {
|
|
41
|
-
return this._client.get((0, path_1.path) `/v1/posts/${postID}`, options);
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Returns a paginated list of posts. Filter by status, platform (OR logic), and
|
|
45
|
-
* date ranges. Published posts include platformPostUrl per platform.
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
* ```ts
|
|
49
|
-
* const posts = await client.posts.list();
|
|
50
|
-
* ```
|
|
51
|
-
*/
|
|
52
|
-
list(query = {}, options) {
|
|
53
|
-
return this._client.get('/v1/posts/', { query, ...options });
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Delete a post by ID
|
|
57
|
-
*
|
|
58
|
-
* @example
|
|
59
|
-
* ```ts
|
|
60
|
-
* const post = await client.posts.delete('postId');
|
|
61
|
-
* ```
|
|
62
|
-
*/
|
|
63
|
-
delete(postID, options) {
|
|
64
|
-
return this._client.delete((0, path_1.path) `/v1/posts/${postID}`, options);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
exports.Posts = Posts;
|
|
68
|
-
Posts.Scheduled = scheduled_1.Scheduled;
|
|
69
|
-
//# sourceMappingURL=posts.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"posts.js","sourceRoot":"","sources":["../../src/resources/posts/posts.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,qEAA4C;AAC5C,8CAMqB;AAGrB,uDAAiD;AAEjD,MAAa,KAAM,SAAQ,sBAAW;IAAtC;;QACE,cAAS,GAA2B,IAAI,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA2D/E,CAAC;IAzDC;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,IAAsB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;;;OAOG;IACH,QAAQ,CAAC,MAAc,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;;;OAQG;IACH,IAAI,CACF,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,MAAc,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;CACF;AA5DD,sBA4DC;AA+SD,KAAK,CAAC,SAAS,GAAG,qBAAS,CAAC"}
|