@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
package/CHANGELOG.md
CHANGED
|
@@ -1,105 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.
|
|
3
|
+
## 0.8.0
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
- Rebuilt the SDK with Hey API from the PostPeer OpenAPI specification.
|
|
6
|
+
- Added the `PostPeer` client with retries, timeouts, and typed errors.
|
|
7
|
+
- Simplified generation, testing, packaging, and releases.
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
* **api:** api update ([d2e32a9](https://github.com/PostPeer-API/postpeer-node/commit/d2e32a9b1ed5f1ba0fffc0937262f97945840299))
|
|
10
|
-
* **api:** api update ([7fe25ac](https://github.com/PostPeer-API/postpeer-node/commit/7fe25ac62bd8fff2b4a8595bdf2354247125bee8))
|
|
11
|
-
* **api:** api update ([0f4244a](https://github.com/PostPeer-API/postpeer-node/commit/0f4244a93883c46284d9a3aae68fed3ee3dd470a))
|
|
12
|
-
* **api:** manual updates ([1a587f1](https://github.com/PostPeer-API/postpeer-node/commit/1a587f1d8d28cc22aa7a60065238bf27739a90b2))
|
|
13
|
-
* support setting headers via env ([da2c3df](https://github.com/PostPeer-API/postpeer-node/commit/da2c3df88282d1a007a836853a407271db3fcb43))
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
### Chores
|
|
17
|
-
|
|
18
|
-
* avoid formatting file that gets changed during releases ([bbec615](https://github.com/PostPeer-API/postpeer-node/commit/bbec6155e6d2255bd46e504ddaf932f84f829763))
|
|
19
|
-
* **format:** run eslint and prettier separately ([6da828b](https://github.com/PostPeer-API/postpeer-node/commit/6da828bb9a28fb72bb3b73e7c582d98369b6b320))
|
|
20
|
-
* **internal:** codegen related update ([a02ee4a](https://github.com/PostPeer-API/postpeer-node/commit/a02ee4a29b99d489770e63d73bf784d1b92e2eb3))
|
|
21
|
-
|
|
22
|
-
## 0.5.0 (2026-04-27)
|
|
23
|
-
|
|
24
|
-
Full Changelog: [v0.4.0...v0.5.0](https://github.com/PostPeer-API/postpeer-node/compare/v0.4.0...v0.5.0)
|
|
25
|
-
|
|
26
|
-
### Features
|
|
27
|
-
|
|
28
|
-
* **api:** api update ([4d62307](https://github.com/PostPeer-API/postpeer-node/commit/4d6230790ddd0f60eb57b8f98b0361cbf16f4904))
|
|
29
|
-
* **api:** api update ([9411834](https://github.com/PostPeer-API/postpeer-node/commit/9411834d9792457de0fc2904e31a8128c21f2c5d))
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
### Chores
|
|
33
|
-
|
|
34
|
-
* **formatter:** run prettier and eslint separately ([80fe4b5](https://github.com/PostPeer-API/postpeer-node/commit/80fe4b51aabe1b22f5275c2f1c09c360f994f75c))
|
|
35
|
-
* **internal:** more robust bootstrap script ([b581aeb](https://github.com/PostPeer-API/postpeer-node/commit/b581aeb94a851b78096edeee23bea88f491a5f9a))
|
|
36
|
-
* restructure docs search code ([162a5ca](https://github.com/PostPeer-API/postpeer-node/commit/162a5ca3ff9decf80a52a5e8849ab1bd32e84d17))
|
|
37
|
-
|
|
38
|
-
## 0.4.0 (2026-04-16)
|
|
39
|
-
|
|
40
|
-
Full Changelog: [v0.3.1...v0.4.0](https://github.com/PostPeer-API/postpeer-node/compare/v0.3.1...v0.4.0)
|
|
41
|
-
|
|
42
|
-
### Features
|
|
43
|
-
|
|
44
|
-
* **api:** manual updates ([f6c645f](https://github.com/PostPeer-API/postpeer-node/commit/f6c645f270e89f136b31e6eb77deee347721cc3c))
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
### Chores
|
|
48
|
-
|
|
49
|
-
* sync repo ([64cc226](https://github.com/PostPeer-API/postpeer-node/commit/64cc226bdaec83152c6fe31c843a952a50ea1b52))
|
|
50
|
-
* update SDK settings ([726ba8c](https://github.com/PostPeer-API/postpeer-node/commit/726ba8cc5e14a8fec6eee1f2c8062254ad7ab49d))
|
|
51
|
-
|
|
52
|
-
## 0.3.1 (2026-04-16)
|
|
53
|
-
|
|
54
|
-
Full Changelog: [v0.3.0...v0.3.1](https://github.com/PostPeer-API/postpeer-typescript/compare/v0.3.0...v0.3.1)
|
|
55
|
-
|
|
56
|
-
## 0.3.0 (2026-04-16)
|
|
57
|
-
|
|
58
|
-
Full Changelog: [v0.2.0...v0.3.0](https://github.com/PostPeer-API/postpeer-typescript/compare/v0.2.0...v0.3.0)
|
|
59
|
-
|
|
60
|
-
### Features
|
|
61
|
-
|
|
62
|
-
* **api:** manual updates ([0e51c04](https://github.com/PostPeer-API/postpeer-typescript/commit/0e51c04af30a1656bfd425e2f5efcac90c05f9f8))
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
### Chores
|
|
66
|
-
|
|
67
|
-
* remove custom code ([0f67ec6](https://github.com/PostPeer-API/postpeer-typescript/commit/0f67ec6be9415fc5fb2471c878f02007fe632a02))
|
|
68
|
-
* update SDK settings ([bda5df5](https://github.com/PostPeer-API/postpeer-typescript/commit/bda5df5817239e8cb162a3c1b69cc661fb6ac6f0))
|
|
69
|
-
|
|
70
|
-
## 0.2.0 (2026-04-16)
|
|
71
|
-
|
|
72
|
-
Full Changelog: [v0.1.2...v0.2.0](https://github.com/PostPeer-API/postpeer-typescript/compare/v0.1.2...v0.2.0)
|
|
73
|
-
|
|
74
|
-
### Features
|
|
75
|
-
|
|
76
|
-
* **api:** api update ([06b89da](https://github.com/PostPeer-API/postpeer-typescript/commit/06b89dad537b8cca199c69dcba8a5239012dc591))
|
|
77
|
-
|
|
78
|
-
## 0.1.2 (2026-04-15)
|
|
79
|
-
|
|
80
|
-
Full Changelog: [v0.1.1...v0.1.2](https://github.com/PostPeer-API/postpeer-typescript/compare/v0.1.1...v0.1.2)
|
|
81
|
-
|
|
82
|
-
## 0.1.1 (2026-04-15)
|
|
83
|
-
|
|
84
|
-
Full Changelog: [v0.1.0...v0.1.1](https://github.com/PostPeer-API/postpeer-typescript/compare/v0.1.0...v0.1.1)
|
|
85
|
-
|
|
86
|
-
### Chores
|
|
87
|
-
|
|
88
|
-
* configure new SDK language ([3ea01db](https://github.com/PostPeer-API/postpeer-typescript/commit/3ea01db9930bbcbcb20e3216db9d1e75f3ef21c9))
|
|
89
|
-
|
|
90
|
-
## 0.1.0 (2026-04-15)
|
|
91
|
-
|
|
92
|
-
Full Changelog: [v0.0.1...v0.1.0](https://github.com/PostPeer-API/postpeer-typescript/compare/v0.0.1...v0.1.0)
|
|
93
|
-
|
|
94
|
-
### Features
|
|
95
|
-
|
|
96
|
-
* **api:** manual updates ([77ced69](https://github.com/PostPeer-API/postpeer-typescript/commit/77ced69d5ab0d5840ad15b8bf0026620021b1b31))
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
### Chores
|
|
100
|
-
|
|
101
|
-
* configure new SDK language ([656bd65](https://github.com/PostPeer-API/postpeer-typescript/commit/656bd653dd11e873734b34cba9f8b117ba50ee59))
|
|
102
|
-
* update SDK settings ([9256963](https://github.com/PostPeer-API/postpeer-typescript/commit/9256963d1e1bfdfa976d477545618c64ed092360))
|
|
103
|
-
* update SDK settings ([24f8c7b](https://github.com/PostPeer-API/postpeer-typescript/commit/24f8c7b95dd8412634fb90832b64a2b0e1c48e02))
|
|
104
|
-
* update SDK settings ([f630304](https://github.com/PostPeer-API/postpeer-typescript/commit/f630304937e27a2bb454d7d9198011859d1f3e22))
|
|
105
|
-
* update SDK settings ([76cf155](https://github.com/PostPeer-API/postpeer-typescript/commit/76cf15568d0738279cc7e77eb03510dc2d5f8d9c))
|
|
9
|
+
Earlier release history remains available in Git tags.
|
package/README.md
CHANGED
|
@@ -1,364 +1,138 @@
|
|
|
1
|
-
# PostPeer
|
|
1
|
+
# PostPeer Node.js SDK
|
|
2
2
|
|
|
3
|
-
[
|
|
4
|
-
|
|
5
|
-
This library provides convenient access to the PostPeer REST API from server-side TypeScript or JavaScript.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
## MCP Server
|
|
9
|
-
|
|
10
|
-
Use the Postpeer MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
|
|
11
|
-
|
|
12
|
-
[](https://cursor.com/en-US/install-mcp?name=postpeer-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsInBvc3RwZWVyLW1jcCJdLCJlbnYiOnsiUE9TVFBFRVJfQVBJX0tFWSI6Ik15IEFQSSBLZXkifX0)
|
|
13
|
-
[](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22postpeer-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22postpeer-mcp%22%5D%2C%22env%22%3A%7B%22POSTPEER_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)
|
|
14
|
-
|
|
15
|
-
> Note: You may need to set environment variables in your MCP client.
|
|
3
|
+
The official TypeScript SDK for the [PostPeer API](https://postpeer.dev), generated from PostPeer's OpenAPI contract with [Hey API](https://heyapi.dev/).
|
|
16
4
|
|
|
17
5
|
## Installation
|
|
18
6
|
|
|
19
|
-
```
|
|
7
|
+
```bash
|
|
20
8
|
npm install @postpeer/node
|
|
21
9
|
```
|
|
22
10
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
The full API of this library can be found in [api.md](api.md).
|
|
26
|
-
|
|
27
|
-
<!-- prettier-ignore -->
|
|
28
|
-
```js
|
|
29
|
-
import Postpeer from '@postpeer/node';
|
|
30
|
-
|
|
31
|
-
const client = new Postpeer({
|
|
32
|
-
apiKey: process.env['POSTPEER_API_KEY'], // This is the default and can be omitted
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
const response = await client.health.check();
|
|
36
|
-
|
|
37
|
-
console.log(response.ok);
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
### Request & Response types
|
|
41
|
-
|
|
42
|
-
This library includes TypeScript definitions for all request params and response fields. You may import and use them like so:
|
|
43
|
-
|
|
44
|
-
<!-- prettier-ignore -->
|
|
45
|
-
```ts
|
|
46
|
-
import Postpeer from '@postpeer/node';
|
|
47
|
-
|
|
48
|
-
const client = new Postpeer({
|
|
49
|
-
apiKey: process.env['POSTPEER_API_KEY'], // This is the default and can be omitted
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
const response: Postpeer.HealthCheckResponse = await client.health.check();
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.
|
|
56
|
-
|
|
57
|
-
## Handling errors
|
|
11
|
+
Node.js 20 or newer is required.
|
|
58
12
|
|
|
59
|
-
|
|
60
|
-
or if the API returns a non-success status code (i.e., 4xx or 5xx response),
|
|
61
|
-
a subclass of `APIError` will be thrown:
|
|
13
|
+
## Quick start
|
|
62
14
|
|
|
63
|
-
<!-- prettier-ignore -->
|
|
64
15
|
```ts
|
|
65
|
-
|
|
66
|
-
if (err instanceof Postpeer.APIError) {
|
|
67
|
-
console.log(err.status); // 400
|
|
68
|
-
console.log(err.name); // BadRequestError
|
|
69
|
-
console.log(err.headers); // {server: 'nginx', ...}
|
|
70
|
-
} else {
|
|
71
|
-
throw err;
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
Error codes are as follows:
|
|
77
|
-
|
|
78
|
-
| Status Code | Error Type |
|
|
79
|
-
| ----------- | -------------------------- |
|
|
80
|
-
| 400 | `BadRequestError` |
|
|
81
|
-
| 401 | `AuthenticationError` |
|
|
82
|
-
| 403 | `PermissionDeniedError` |
|
|
83
|
-
| 404 | `NotFoundError` |
|
|
84
|
-
| 422 | `UnprocessableEntityError` |
|
|
85
|
-
| 429 | `RateLimitError` |
|
|
86
|
-
| >=500 | `InternalServerError` |
|
|
87
|
-
| N/A | `APIConnectionError` |
|
|
88
|
-
|
|
89
|
-
### Retries
|
|
90
|
-
|
|
91
|
-
Certain errors will be automatically retried 2 times by default, with a short exponential backoff.
|
|
92
|
-
Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,
|
|
93
|
-
429 Rate Limit, and >=500 Internal errors will all be retried by default.
|
|
94
|
-
|
|
95
|
-
You can use the `maxRetries` option to configure or disable this:
|
|
96
|
-
|
|
97
|
-
<!-- prettier-ignore -->
|
|
98
|
-
```js
|
|
99
|
-
// Configure the default for all requests:
|
|
100
|
-
const client = new Postpeer({
|
|
101
|
-
maxRetries: 0, // default is 2
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
// Or, configure per-request:
|
|
105
|
-
await client.health.check({
|
|
106
|
-
maxRetries: 5,
|
|
107
|
-
});
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
### Timeouts
|
|
111
|
-
|
|
112
|
-
Requests time out after 1 minute by default. You can configure this with a `timeout` option:
|
|
113
|
-
|
|
114
|
-
<!-- prettier-ignore -->
|
|
115
|
-
```ts
|
|
116
|
-
// Configure the default for all requests:
|
|
117
|
-
const client = new Postpeer({
|
|
118
|
-
timeout: 20 * 1000, // 20 seconds (default is 1 minute)
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
// Override per-request:
|
|
122
|
-
await client.health.check({
|
|
123
|
-
timeout: 5 * 1000,
|
|
124
|
-
});
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
On timeout, an `APIConnectionTimeoutError` is thrown.
|
|
128
|
-
|
|
129
|
-
Note that requests which time out will be [retried twice by default](#retries).
|
|
130
|
-
|
|
131
|
-
## Advanced Usage
|
|
132
|
-
|
|
133
|
-
### Accessing raw Response data (e.g., headers)
|
|
134
|
-
|
|
135
|
-
The "raw" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.
|
|
136
|
-
This method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic.
|
|
137
|
-
|
|
138
|
-
You can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.
|
|
139
|
-
Unlike `.asResponse()` this method consumes the body, returning once it is parsed.
|
|
140
|
-
|
|
141
|
-
<!-- prettier-ignore -->
|
|
142
|
-
```ts
|
|
143
|
-
const client = new Postpeer();
|
|
144
|
-
|
|
145
|
-
const response = await client.health.check().asResponse();
|
|
146
|
-
console.log(response.headers.get('X-My-Header'));
|
|
147
|
-
console.log(response.statusText); // access the underlying Response object
|
|
148
|
-
|
|
149
|
-
const { data: response, response: raw } = await client.health.check().withResponse();
|
|
150
|
-
console.log(raw.headers.get('X-My-Header'));
|
|
151
|
-
console.log(response.ok);
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
### Logging
|
|
155
|
-
|
|
156
|
-
> [!IMPORTANT]
|
|
157
|
-
> All log messages are intended for debugging only. The format and content of log messages
|
|
158
|
-
> may change between releases.
|
|
159
|
-
|
|
160
|
-
#### Log levels
|
|
161
|
-
|
|
162
|
-
The log level can be configured in two ways:
|
|
16
|
+
import PostPeer from '@postpeer/node';
|
|
163
17
|
|
|
164
|
-
|
|
165
|
-
2. Using the `logLevel` client option (overrides the environment variable if set)
|
|
18
|
+
const postPeer = new PostPeer(); // Uses POSTPEER_API_KEY
|
|
166
19
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
20
|
+
const { data: post } = await postPeer.posts.create({
|
|
21
|
+
body: {
|
|
22
|
+
content: 'Hello from PostPeer!',
|
|
23
|
+
platforms: [{ platform: 'twitter', accountId: 'integration-id' }],
|
|
24
|
+
publishNow: true,
|
|
25
|
+
},
|
|
172
26
|
});
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
Available log levels, from most to least verbose:
|
|
176
|
-
|
|
177
|
-
- `'debug'` - Show debug messages, info, warnings, and errors
|
|
178
|
-
- `'info'` - Show info messages, warnings, and errors
|
|
179
|
-
- `'warn'` - Show warnings and errors (default)
|
|
180
|
-
- `'error'` - Show only errors
|
|
181
|
-
- `'off'` - Disable all logging
|
|
182
|
-
|
|
183
|
-
At the `'debug'` level, all HTTP requests and responses are logged, including headers and bodies.
|
|
184
|
-
Some authentication-related headers are redacted, but sensitive data in request and response bodies
|
|
185
|
-
may still be visible.
|
|
186
|
-
|
|
187
|
-
#### Custom logger
|
|
188
27
|
|
|
189
|
-
|
|
190
|
-
Most logging libraries are supported, including [pino](https://www.npmjs.com/package/pino), [winston](https://www.npmjs.com/package/winston), [bunyan](https://www.npmjs.com/package/bunyan), [consola](https://www.npmjs.com/package/consola), [signale](https://www.npmjs.com/package/signale), and [@std/log](https://jsr.io/@std/log). If your logger doesn't work, please open an issue.
|
|
191
|
-
|
|
192
|
-
When providing a custom logger, the `logLevel` option still controls which messages are emitted, messages
|
|
193
|
-
below the configured level will not be sent to your logger.
|
|
194
|
-
|
|
195
|
-
```ts
|
|
196
|
-
import Postpeer from '@postpeer/node';
|
|
197
|
-
import pino from 'pino';
|
|
198
|
-
|
|
199
|
-
const logger = pino();
|
|
200
|
-
|
|
201
|
-
const client = new Postpeer({
|
|
202
|
-
logger: logger.child({ name: 'Postpeer' }),
|
|
203
|
-
logLevel: 'debug', // Send all messages to pino, allowing it to filter
|
|
204
|
-
});
|
|
28
|
+
console.log(post);
|
|
205
29
|
```
|
|
206
30
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
This library is typed for convenient access to the documented API. If you need to access undocumented
|
|
210
|
-
endpoints, params, or response properties, the library can still be used.
|
|
211
|
-
|
|
212
|
-
#### Undocumented endpoints
|
|
213
|
-
|
|
214
|
-
To make requests to undocumented endpoints, you can use `client.get`, `client.post`, and other HTTP verbs.
|
|
215
|
-
Options on the client, such as retries, will be respected when making these requests.
|
|
31
|
+
You can also pass the key directly:
|
|
216
32
|
|
|
217
33
|
```ts
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
query: { some_query_arg: 'bar' },
|
|
34
|
+
const postPeer = new PostPeer({
|
|
35
|
+
apiKey: 'your-access-key',
|
|
221
36
|
});
|
|
222
37
|
```
|
|
223
38
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
To make requests using undocumented parameters, you may use `// @ts-expect-error` on the undocumented
|
|
227
|
-
parameter. This library doesn't validate at runtime that the request matches the type, so any extra values you
|
|
228
|
-
send will be sent as-is.
|
|
39
|
+
## Configuration
|
|
229
40
|
|
|
230
41
|
```ts
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
42
|
+
const postPeer = new PostPeer({
|
|
43
|
+
apiKey: 'your-access-key',
|
|
44
|
+
baseURL: 'https://api.postpeer.dev',
|
|
45
|
+
timeout: 60_000,
|
|
46
|
+
maxRetries: 2,
|
|
47
|
+
defaultHeaders: { 'X-Application': 'my-app' },
|
|
48
|
+
fetch: customFetch,
|
|
235
49
|
});
|
|
236
50
|
```
|
|
237
51
|
|
|
238
|
-
|
|
239
|
-
extra param in the body.
|
|
240
|
-
|
|
241
|
-
If you want to explicitly send an extra argument, you can do so with the `query`, `body`, and `headers` request
|
|
242
|
-
options.
|
|
243
|
-
|
|
244
|
-
#### Undocumented response properties
|
|
245
|
-
|
|
246
|
-
To access undocumented response properties, you may access the response object with `// @ts-expect-error` on
|
|
247
|
-
the response object, or cast the response object to the requisite type. Like the request params, we do not
|
|
248
|
-
validate or strip extra properties from the response from the API.
|
|
249
|
-
|
|
250
|
-
### Customizing the fetch client
|
|
52
|
+
Every `PostPeer` instance owns an isolated HTTP client, so separate API keys and base URLs do not interfere with one another.
|
|
251
53
|
|
|
252
|
-
|
|
54
|
+
## Resources
|
|
253
55
|
|
|
254
|
-
|
|
56
|
+
The SDK follows the API's resource structure:
|
|
255
57
|
|
|
256
58
|
```ts
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
59
|
+
postPeer.health.check();
|
|
60
|
+
postPeer.health.verifyAccessKey();
|
|
61
|
+
|
|
62
|
+
postPeer.posts.create({ body });
|
|
63
|
+
postPeer.posts.list({ query });
|
|
64
|
+
postPeer.posts.get({ path: { postId } });
|
|
65
|
+
postPeer.posts.delete({ path: { postId } });
|
|
66
|
+
postPeer.posts.scheduled.list();
|
|
67
|
+
postPeer.posts.scheduled.cancel({ path: { postId } });
|
|
68
|
+
postPeer.posts.scheduled.reschedule({ path: { postId }, body });
|
|
69
|
+
|
|
70
|
+
postPeer.connect.getOAuthUrl({ path: { platform }, query });
|
|
71
|
+
postPeer.connect.integrations.list();
|
|
72
|
+
postPeer.connect.integrations.disconnect({ path: { id } });
|
|
73
|
+
|
|
74
|
+
postPeer.profiles.list();
|
|
75
|
+
postPeer.apps.list();
|
|
76
|
+
postPeer.notifications.list();
|
|
77
|
+
postPeer.platforms.list();
|
|
78
|
+
postPeer.media.upload({ body });
|
|
79
|
+
postPeer.analytics.get({ query });
|
|
80
|
+
postPeer.usage.get();
|
|
81
|
+
postPeer.pinterest.getBoards({ query });
|
|
82
|
+
postPeer.tiktok.getCreatorInfo({ query });
|
|
83
|
+
postPeer.ai.write({ body });
|
|
84
|
+
postPeer.ai.generateImage({ body });
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Request parameters are grouped under `body`, `path`, `query`, and `headers`. Responses include `data`, `request`, and `response`, giving you access to the parsed result and the native Fetch objects.
|
|
88
|
+
|
|
89
|
+
## Error handling
|
|
263
90
|
|
|
264
91
|
```ts
|
|
265
|
-
import
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
92
|
+
import PostPeer, { NotFoundError, RateLimitError } from '@postpeer/node';
|
|
93
|
+
|
|
94
|
+
try {
|
|
95
|
+
await postPeer.posts.get({ path: { postId: 'missing' } });
|
|
96
|
+
} catch (error) {
|
|
97
|
+
if (error instanceof NotFoundError) {
|
|
98
|
+
console.error(error.status, error.requestId, error.message);
|
|
99
|
+
} else if (error instanceof RateLimitError) {
|
|
100
|
+
console.error('PostPeer rate limit reached');
|
|
101
|
+
}
|
|
102
|
+
}
|
|
269
103
|
```
|
|
270
104
|
|
|
271
|
-
|
|
105
|
+
The SDK exports typed API, connection, timeout, and user-abort errors.
|
|
272
106
|
|
|
273
|
-
|
|
107
|
+
## Updating the generated SDK
|
|
274
108
|
|
|
275
|
-
|
|
276
|
-
import Postpeer from '@postpeer/node';
|
|
109
|
+
The OpenAPI specification and npm releases are intentionally separate.
|
|
277
110
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
});
|
|
111
|
+
```bash
|
|
112
|
+
pnpm spec:fetch
|
|
113
|
+
pnpm generate
|
|
114
|
+
pnpm check
|
|
283
115
|
```
|
|
284
116
|
|
|
285
|
-
|
|
117
|
+
Commit `openapi.json` and `src/generated` together. This updates the code but does not publish a package. Package versions change only when a release PR is deliberately merged.
|
|
286
118
|
|
|
287
|
-
|
|
288
|
-
options to requests:
|
|
119
|
+
Generated files under `src/generated` must not be edited by hand.
|
|
289
120
|
|
|
290
|
-
|
|
121
|
+
## Versioning
|
|
291
122
|
|
|
292
|
-
|
|
293
|
-
import Postpeer from '@postpeer/node';
|
|
294
|
-
import * as undici from 'undici';
|
|
123
|
+
PostPeer uses conservative pre-1.0 versioning:
|
|
295
124
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
},
|
|
301
|
-
});
|
|
302
|
-
```
|
|
125
|
+
- `0.8.0` is the first Hey API release.
|
|
126
|
+
- Compatible fixes and additions remain in `0.8.x`.
|
|
127
|
+
- A breaking SDK change moves to `0.9.0`.
|
|
128
|
+
- `1.0.0` will be published only when the SDK contract is considered mature.
|
|
303
129
|
|
|
304
|
-
|
|
130
|
+
OpenAPI changes may accumulate before a package release.
|
|
305
131
|
|
|
306
|
-
|
|
307
|
-
import Postpeer from '@postpeer/node';
|
|
132
|
+
## Development
|
|
308
133
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
});
|
|
314
|
-
```
|
|
315
|
-
|
|
316
|
-
<img src="https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg" align="top" width="18" height="21"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>
|
|
317
|
-
|
|
318
|
-
```ts
|
|
319
|
-
import Postpeer from 'npm:@postpeer/node';
|
|
320
|
-
|
|
321
|
-
const httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });
|
|
322
|
-
const client = new Postpeer({
|
|
323
|
-
fetchOptions: {
|
|
324
|
-
client: httpClient,
|
|
325
|
-
},
|
|
326
|
-
});
|
|
134
|
+
```bash
|
|
135
|
+
pnpm install
|
|
136
|
+
pnpm generate
|
|
137
|
+
pnpm check
|
|
327
138
|
```
|
|
328
|
-
|
|
329
|
-
## Frequently Asked Questions
|
|
330
|
-
|
|
331
|
-
## Semantic versioning
|
|
332
|
-
|
|
333
|
-
This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:
|
|
334
|
-
|
|
335
|
-
1. Changes that only affect static types, without breaking runtime behavior.
|
|
336
|
-
2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_
|
|
337
|
-
3. Changes that we do not expect to impact the vast majority of users in practice.
|
|
338
|
-
|
|
339
|
-
We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
|
|
340
|
-
|
|
341
|
-
We are keen for your feedback; please open an [issue](https://www.github.com/PostPeer-API/postpeer-node/issues) with questions, bugs, or suggestions.
|
|
342
|
-
|
|
343
|
-
## Requirements
|
|
344
|
-
|
|
345
|
-
TypeScript >= 4.9 is supported.
|
|
346
|
-
|
|
347
|
-
The following runtimes are supported:
|
|
348
|
-
|
|
349
|
-
- Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more)
|
|
350
|
-
- Node.js 20 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.
|
|
351
|
-
- Deno v1.28.0 or higher.
|
|
352
|
-
- Bun 1.0 or later.
|
|
353
|
-
- Cloudflare Workers.
|
|
354
|
-
- Vercel Edge Runtime.
|
|
355
|
-
- Jest 28 or greater with the `"node"` environment (`"jsdom"` is not supported at this time).
|
|
356
|
-
- Nitro v2.6 or greater.
|
|
357
|
-
|
|
358
|
-
Note that React Native is not supported at this time.
|
|
359
|
-
|
|
360
|
-
If you are interested in other runtime environments, please open or upvote an issue on GitHub.
|
|
361
|
-
|
|
362
|
-
## Contributing
|
|
363
|
-
|
|
364
|
-
See [the contributing documentation](./CONTRIBUTING.md).
|