@woopsocial/typescript-sdk 0.0.7
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/FUNCTIONS.md +87 -0
- package/README.md +474 -0
- package/RUNTIMES.md +48 -0
- package/esm/core.d.ts +10 -0
- package/esm/core.d.ts.map +1 -0
- package/esm/core.js +13 -0
- package/esm/core.js.map +1 -0
- package/esm/funcs/health-get-health.d.ts +17 -0
- package/esm/funcs/health-get-health.d.ts.map +1 -0
- package/esm/funcs/health-get-health.js +68 -0
- package/esm/funcs/health-get-health.js.map +1 -0
- package/esm/funcs/media-complete-upload-session.d.ts +15 -0
- package/esm/funcs/media-complete-upload-session.d.ts.map +1 -0
- package/esm/funcs/media-complete-upload-session.js +82 -0
- package/esm/funcs/media-complete-upload-session.js.map +1 -0
- package/esm/funcs/media-create-media.d.ts +25 -0
- package/esm/funcs/media-create-media.d.ts.map +1 -0
- package/esm/funcs/media-create-media.js +93 -0
- package/esm/funcs/media-create-media.js.map +1 -0
- package/esm/funcs/media-create-upload-session.d.ts +27 -0
- package/esm/funcs/media-create-upload-session.d.ts.map +1 -0
- package/esm/funcs/media-create-upload-session.js +89 -0
- package/esm/funcs/media-create-upload-session.js.map +1 -0
- package/esm/funcs/media-get-upload-session.d.ts +15 -0
- package/esm/funcs/media-get-upload-session.d.ts.map +1 -0
- package/esm/funcs/media-get-upload-session.js +82 -0
- package/esm/funcs/media-get-upload-session.js.map +1 -0
- package/esm/funcs/posts-create-posts.d.ts +23 -0
- package/esm/funcs/posts-create-posts.d.ts.map +1 -0
- package/esm/funcs/posts-create-posts.js +85 -0
- package/esm/funcs/posts-create-posts.js.map +1 -0
- package/esm/funcs/posts-delete-posts.d.ts +21 -0
- package/esm/funcs/posts-delete-posts.d.ts.map +1 -0
- package/esm/funcs/posts-delete-posts.js +83 -0
- package/esm/funcs/posts-delete-posts.js.map +1 -0
- package/esm/funcs/posts-list-posts.d.ts +17 -0
- package/esm/funcs/posts-list-posts.d.ts.map +1 -0
- package/esm/funcs/posts-list-posts.js +81 -0
- package/esm/funcs/posts-list-posts.js.map +1 -0
- package/esm/funcs/posts-update-posts.d.ts +21 -0
- package/esm/funcs/posts-update-posts.d.ts.map +1 -0
- package/esm/funcs/posts-update-posts.js +83 -0
- package/esm/funcs/posts-update-posts.js.map +1 -0
- package/esm/funcs/projects-list-projects.d.ts +17 -0
- package/esm/funcs/projects-list-projects.d.ts.map +1 -0
- package/esm/funcs/projects-list-projects.js +69 -0
- package/esm/funcs/projects-list-projects.js.map +1 -0
- package/esm/funcs/social-accounts-create-o-auth-authorization.d.ts +17 -0
- package/esm/funcs/social-accounts-create-o-auth-authorization.d.ts.map +1 -0
- package/esm/funcs/social-accounts-create-o-auth-authorization.js +79 -0
- package/esm/funcs/social-accounts-create-o-auth-authorization.js.map +1 -0
- package/esm/funcs/social-accounts-get-social-account-platform-inputs.d.ts +20 -0
- package/esm/funcs/social-accounts-get-social-account-platform-inputs.d.ts.map +1 -0
- package/esm/funcs/social-accounts-get-social-account-platform-inputs.js +87 -0
- package/esm/funcs/social-accounts-get-social-account-platform-inputs.js.map +1 -0
- package/esm/funcs/social-accounts-list-social-accounts.d.ts +20 -0
- package/esm/funcs/social-accounts-list-social-accounts.d.ts.map +1 -0
- package/esm/funcs/social-accounts-list-social-accounts.js +85 -0
- package/esm/funcs/social-accounts-list-social-accounts.js.map +1 -0
- package/esm/hooks/hooks.d.ts +25 -0
- package/esm/hooks/hooks.d.ts.map +1 -0
- package/esm/hooks/hooks.js +80 -0
- package/esm/hooks/hooks.js.map +1 -0
- package/esm/hooks/index.d.ts +3 -0
- package/esm/hooks/index.d.ts.map +1 -0
- package/esm/hooks/index.js +6 -0
- package/esm/hooks/index.js.map +1 -0
- package/esm/hooks/types.d.ts +76 -0
- package/esm/hooks/types.d.ts.map +1 -0
- package/esm/hooks/types.js +5 -0
- package/esm/hooks/types.js.map +1 -0
- package/esm/index.d.ts +6 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +8 -0
- package/esm/index.js.map +1 -0
- package/esm/lib/base64.d.ts +10 -0
- package/esm/lib/base64.d.ts.map +1 -0
- package/esm/lib/base64.js +31 -0
- package/esm/lib/base64.js.map +1 -0
- package/esm/lib/config.d.ts +38 -0
- package/esm/lib/config.d.ts.map +1 -0
- package/esm/lib/config.js +34 -0
- package/esm/lib/config.js.map +1 -0
- package/esm/lib/dlv.d.ts +14 -0
- package/esm/lib/dlv.d.ts.map +1 -0
- package/esm/lib/dlv.js +46 -0
- package/esm/lib/dlv.js.map +1 -0
- package/esm/lib/encodings.d.ts +53 -0
- package/esm/lib/encodings.d.ts.map +1 -0
- package/esm/lib/encodings.js +385 -0
- package/esm/lib/encodings.js.map +1 -0
- package/esm/lib/env.d.ts +15 -0
- package/esm/lib/env.d.ts.map +1 -0
- package/esm/lib/env.js +44 -0
- package/esm/lib/env.js.map +1 -0
- package/esm/lib/files.d.ts +26 -0
- package/esm/lib/files.d.ts.map +1 -0
- package/esm/lib/files.js +91 -0
- package/esm/lib/files.js.map +1 -0
- package/esm/lib/http.d.ts +67 -0
- package/esm/lib/http.d.ts.map +1 -0
- package/esm/lib/http.js +209 -0
- package/esm/lib/http.js.map +1 -0
- package/esm/lib/is-plain-object.d.ts +2 -0
- package/esm/lib/is-plain-object.d.ts.map +1 -0
- package/esm/lib/is-plain-object.js +38 -0
- package/esm/lib/is-plain-object.js.map +1 -0
- package/esm/lib/logger.d.ts +6 -0
- package/esm/lib/logger.d.ts.map +1 -0
- package/esm/lib/logger.js +5 -0
- package/esm/lib/logger.js.map +1 -0
- package/esm/lib/matchers.d.ts +59 -0
- package/esm/lib/matchers.d.ts.map +1 -0
- package/esm/lib/matchers.js +202 -0
- package/esm/lib/matchers.js.map +1 -0
- package/esm/lib/primitives.d.ts +26 -0
- package/esm/lib/primitives.d.ts.map +1 -0
- package/esm/lib/primitives.js +103 -0
- package/esm/lib/primitives.js.map +1 -0
- package/esm/lib/retries.d.ts +38 -0
- package/esm/lib/retries.d.ts.map +1 -0
- package/esm/lib/retries.js +150 -0
- package/esm/lib/retries.js.map +1 -0
- package/esm/lib/schemas.d.ts +21 -0
- package/esm/lib/schemas.d.ts.map +1 -0
- package/esm/lib/schemas.js +57 -0
- package/esm/lib/schemas.js.map +1 -0
- package/esm/lib/sdks.d.ts +63 -0
- package/esm/lib/sdks.d.ts.map +1 -0
- package/esm/lib/sdks.js +262 -0
- package/esm/lib/sdks.js.map +1 -0
- package/esm/lib/security.d.ts +83 -0
- package/esm/lib/security.d.ts.map +1 -0
- package/esm/lib/security.js +149 -0
- package/esm/lib/security.js.map +1 -0
- package/esm/lib/url.d.ts +5 -0
- package/esm/lib/url.d.ts.map +1 -0
- package/esm/lib/url.js +24 -0
- package/esm/lib/url.js.map +1 -0
- package/esm/models/create-media-response.d.ts +13 -0
- package/esm/models/create-media-response.d.ts.map +1 -0
- package/esm/models/create-media-response.js +14 -0
- package/esm/models/create-media-response.js.map +1 -0
- package/esm/models/create-o-auth-authorization-request.d.ts +21 -0
- package/esm/models/create-o-auth-authorization-request.d.ts.map +1 -0
- package/esm/models/create-o-auth-authorization-request.js +14 -0
- package/esm/models/create-o-auth-authorization-request.js.map +1 -0
- package/esm/models/create-o-auth-authorization-response.d.ts +13 -0
- package/esm/models/create-o-auth-authorization-response.d.ts.map +1 -0
- package/esm/models/create-o-auth-authorization-response.js +14 -0
- package/esm/models/create-o-auth-authorization-response.js.map +1 -0
- package/esm/models/create-post-failure-code.d.ts +16 -0
- package/esm/models/create-post-failure-code.d.ts.map +1 -0
- package/esm/models/create-post-failure-code.js +17 -0
- package/esm/models/create-post-failure-code.js.map +1 -0
- package/esm/models/create-post-failure-result.d.ts +33 -0
- package/esm/models/create-post-failure-result.d.ts.map +1 -0
- package/esm/models/create-post-failure-result.js +22 -0
- package/esm/models/create-post-failure-result.js.map +1 -0
- package/esm/models/create-post-item.d.ts +47 -0
- package/esm/models/create-post-item.d.ts.map +1 -0
- package/esm/models/create-post-item.js +21 -0
- package/esm/models/create-post-item.js.map +1 -0
- package/esm/models/create-post-result.d.ts +11 -0
- package/esm/models/create-post-result.d.ts.map +1 -0
- package/esm/models/create-post-result.js +16 -0
- package/esm/models/create-post-result.js.map +1 -0
- package/esm/models/create-post-success-result.d.ts +23 -0
- package/esm/models/create-post-success-result.d.ts.map +1 -0
- package/esm/models/create-post-success-result.js +18 -0
- package/esm/models/create-post-success-result.js.map +1 -0
- package/esm/models/create-posts-response.d.ts +14 -0
- package/esm/models/create-posts-response.d.ts.map +1 -0
- package/esm/models/create-posts-response.js +14 -0
- package/esm/models/create-posts-response.js.map +1 -0
- package/esm/models/create-upload-session-request.d.ts +20 -0
- package/esm/models/create-upload-session-request.d.ts.map +1 -0
- package/esm/models/create-upload-session-request.js +13 -0
- package/esm/models/create-upload-session-request.js.map +1 -0
- package/esm/models/delete-post-failure-code.d.ts +11 -0
- package/esm/models/delete-post-failure-code.d.ts.map +1 -0
- package/esm/models/delete-post-failure-code.js +12 -0
- package/esm/models/delete-post-failure-code.js.map +1 -0
- package/esm/models/delete-post-failure-result.d.ts +17 -0
- package/esm/models/delete-post-failure-result.d.ts.map +1 -0
- package/esm/models/delete-post-failure-result.js +18 -0
- package/esm/models/delete-post-failure-result.js.map +1 -0
- package/esm/models/delete-post-result.d.ts +11 -0
- package/esm/models/delete-post-result.d.ts.map +1 -0
- package/esm/models/delete-post-result.js +16 -0
- package/esm/models/delete-post-result.js.map +1 -0
- package/esm/models/delete-post-success-result.d.ts +14 -0
- package/esm/models/delete-post-success-result.d.ts.map +1 -0
- package/esm/models/delete-post-success-result.js +15 -0
- package/esm/models/delete-post-success-result.js.map +1 -0
- package/esm/models/delete-posts-response.d.ts +14 -0
- package/esm/models/delete-posts-response.d.ts.map +1 -0
- package/esm/models/delete-posts-response.js +14 -0
- package/esm/models/delete-posts-response.js.map +1 -0
- package/esm/models/delivery-status.d.ts +34 -0
- package/esm/models/delivery-status.d.ts.map +1 -0
- package/esm/models/delivery-status.js +25 -0
- package/esm/models/delivery-status.js.map +1 -0
- package/esm/models/errors/http-client-errors.d.ts +44 -0
- package/esm/models/errors/http-client-errors.d.ts.map +1 -0
- package/esm/models/errors/http-client-errors.js +56 -0
- package/esm/models/errors/http-client-errors.js.map +1 -0
- package/esm/models/errors/index.d.ts +6 -0
- package/esm/models/errors/index.d.ts.map +1 -0
- package/esm/models/errors/index.js +9 -0
- package/esm/models/errors/index.js.map +1 -0
- package/esm/models/errors/response-validation-error.d.ts +26 -0
- package/esm/models/errors/response-validation-error.d.ts.map +1 -0
- package/esm/models/errors/response-validation-error.js +37 -0
- package/esm/models/errors/response-validation-error.js.map +1 -0
- package/esm/models/errors/sdk-validation-error.d.ts +21 -0
- package/esm/models/errors/sdk-validation-error.d.ts.map +1 -0
- package/esm/models/errors/sdk-validation-error.js +52 -0
- package/esm/models/errors/sdk-validation-error.js.map +1 -0
- package/esm/models/errors/woop-social-default-error.d.ts +10 -0
- package/esm/models/errors/woop-social-default-error.d.ts.map +1 -0
- package/esm/models/errors/woop-social-default-error.js +30 -0
- package/esm/models/errors/woop-social-default-error.js.map +1 -0
- package/esm/models/errors/woop-social-error.d.ts +19 -0
- package/esm/models/errors/woop-social-error.d.ts.map +1 -0
- package/esm/models/errors/woop-social-error.js +26 -0
- package/esm/models/errors/woop-social-error.js.map +1 -0
- package/esm/models/facebook-post-type.d.ts +14 -0
- package/esm/models/facebook-post-type.d.ts.map +1 -0
- package/esm/models/facebook-post-type.js +15 -0
- package/esm/models/facebook-post-type.js.map +1 -0
- package/esm/models/facebook-specifics.d.ts +22 -0
- package/esm/models/facebook-specifics.d.ts.map +1 -0
- package/esm/models/facebook-specifics.js +26 -0
- package/esm/models/facebook-specifics.js.map +1 -0
- package/esm/models/health-response.d.ts +21 -0
- package/esm/models/health-response.d.ts.map +1 -0
- package/esm/models/health-response.js +16 -0
- package/esm/models/health-response.js.map +1 -0
- package/esm/models/index.d.ts +61 -0
- package/esm/models/index.d.ts.map +1 -0
- package/esm/models/index.js +64 -0
- package/esm/models/index.js.map +1 -0
- package/esm/models/instagram-post-type.d.ts +13 -0
- package/esm/models/instagram-post-type.d.ts.map +1 -0
- package/esm/models/instagram-post-type.js +14 -0
- package/esm/models/instagram-post-type.js.map +1 -0
- package/esm/models/instagram-specifics.d.ts +20 -0
- package/esm/models/instagram-specifics.d.ts.map +1 -0
- package/esm/models/instagram-specifics.js +24 -0
- package/esm/models/instagram-specifics.js.map +1 -0
- package/esm/models/linked-in-pages-specifics.d.ts +17 -0
- package/esm/models/linked-in-pages-specifics.d.ts.map +1 -0
- package/esm/models/linked-in-pages-specifics.js +21 -0
- package/esm/models/linked-in-pages-specifics.js.map +1 -0
- package/esm/models/linked-in-specifics.d.ts +17 -0
- package/esm/models/linked-in-specifics.d.ts.map +1 -0
- package/esm/models/linked-in-specifics.js +21 -0
- package/esm/models/linked-in-specifics.js.map +1 -0
- package/esm/models/list-posts-request.d.ts +43 -0
- package/esm/models/list-posts-request.d.ts.map +1 -0
- package/esm/models/list-posts-request.js +17 -0
- package/esm/models/list-posts-request.js.map +1 -0
- package/esm/models/list-posts-response.d.ts +15 -0
- package/esm/models/list-posts-response.d.ts.map +1 -0
- package/esm/models/list-posts-response.js +16 -0
- package/esm/models/list-posts-response.js.map +1 -0
- package/esm/models/operations/complete-upload-session.d.ts +15 -0
- package/esm/models/operations/complete-upload-session.d.ts.map +1 -0
- package/esm/models/operations/complete-upload-session.js +12 -0
- package/esm/models/operations/complete-upload-session.js.map +1 -0
- package/esm/models/operations/create-media.d.ts +17 -0
- package/esm/models/operations/create-media.d.ts.map +1 -0
- package/esm/models/operations/create-media.js +18 -0
- package/esm/models/operations/create-media.js.map +1 -0
- package/esm/models/operations/get-social-account-platform-inputs.d.ts +15 -0
- package/esm/models/operations/get-social-account-platform-inputs.d.ts.map +1 -0
- package/esm/models/operations/get-social-account-platform-inputs.js +12 -0
- package/esm/models/operations/get-social-account-platform-inputs.js.map +1 -0
- package/esm/models/operations/get-upload-session.d.ts +15 -0
- package/esm/models/operations/get-upload-session.d.ts.map +1 -0
- package/esm/models/operations/get-upload-session.js +12 -0
- package/esm/models/operations/get-upload-session.js.map +1 -0
- package/esm/models/operations/index.d.ts +6 -0
- package/esm/models/operations/index.d.ts.map +1 -0
- package/esm/models/operations/index.js +9 -0
- package/esm/models/operations/index.js.map +1 -0
- package/esm/models/operations/list-social-accounts.d.ts +15 -0
- package/esm/models/operations/list-social-accounts.d.ts.map +1 -0
- package/esm/models/operations/list-social-accounts.js +12 -0
- package/esm/models/operations/list-social-accounts.js.map +1 -0
- package/esm/models/pinterest-account-platform-inputs.d.ts +19 -0
- package/esm/models/pinterest-account-platform-inputs.d.ts.map +1 -0
- package/esm/models/pinterest-account-platform-inputs.js +14 -0
- package/esm/models/pinterest-account-platform-inputs.js.map +1 -0
- package/esm/models/pinterest-board-option.d.ts +17 -0
- package/esm/models/pinterest-board-option.d.ts.map +1 -0
- package/esm/models/pinterest-board-option.js +15 -0
- package/esm/models/pinterest-board-option.js.map +1 -0
- package/esm/models/pinterest-social-account-platform-specific-inputs.d.ts +12 -0
- package/esm/models/pinterest-social-account-platform-specific-inputs.d.ts.map +1 -0
- package/esm/models/pinterest-social-account-platform-specific-inputs.js +17 -0
- package/esm/models/pinterest-social-account-platform-specific-inputs.js.map +1 -0
- package/esm/models/pinterest-specifics.d.ts +19 -0
- package/esm/models/pinterest-specifics.d.ts.map +1 -0
- package/esm/models/pinterest-specifics.js +23 -0
- package/esm/models/pinterest-specifics.js.map +1 -0
- package/esm/models/platform-specifics.d.ts +25 -0
- package/esm/models/platform-specifics.d.ts.map +1 -0
- package/esm/models/platform-specifics.js +43 -0
- package/esm/models/platform-specifics.js.map +1 -0
- package/esm/models/post-media.d.ts +30 -0
- package/esm/models/post-media.d.ts.map +1 -0
- package/esm/models/post-media.js +26 -0
- package/esm/models/post-media.js.map +1 -0
- package/esm/models/post.d.ts +69 -0
- package/esm/models/post.d.ts.map +1 -0
- package/esm/models/post.js +33 -0
- package/esm/models/post.js.map +1 -0
- package/esm/models/project.d.ts +17 -0
- package/esm/models/project.d.ts.map +1 -0
- package/esm/models/project.js +15 -0
- package/esm/models/project.js.map +1 -0
- package/esm/models/security.d.ts +12 -0
- package/esm/models/security.d.ts.map +1 -0
- package/esm/models/security.js +17 -0
- package/esm/models/security.js.map +1 -0
- package/esm/models/social-account-platform-inputs.d.ts +20 -0
- package/esm/models/social-account-platform-inputs.d.ts.map +1 -0
- package/esm/models/social-account-platform-inputs.js +18 -0
- package/esm/models/social-account-platform-inputs.js.map +1 -0
- package/esm/models/social-account-platform-specific-inputs.d.ts +11 -0
- package/esm/models/social-account-platform-specific-inputs.d.ts.map +1 -0
- package/esm/models/social-account-platform-specific-inputs.js +16 -0
- package/esm/models/social-account-platform-specific-inputs.js.map +1 -0
- package/esm/models/social-account-status.d.ts +10 -0
- package/esm/models/social-account-status.d.ts.map +1 -0
- package/esm/models/social-account-status.js +11 -0
- package/esm/models/social-account-status.js.map +1 -0
- package/esm/models/social-account.d.ts +28 -0
- package/esm/models/social-account.d.ts.map +1 -0
- package/esm/models/social-account.js +20 -0
- package/esm/models/social-account.js.map +1 -0
- package/esm/models/social-platform.d.ts +24 -0
- package/esm/models/social-platform.d.ts.map +1 -0
- package/esm/models/social-platform.js +22 -0
- package/esm/models/social-platform.js.map +1 -0
- package/esm/models/tik-tok-account-platform-inputs.d.ts +35 -0
- package/esm/models/tik-tok-account-platform-inputs.d.ts.map +1 -0
- package/esm/models/tik-tok-account-platform-inputs.js +19 -0
- package/esm/models/tik-tok-account-platform-inputs.js.map +1 -0
- package/esm/models/tik-tok-post-type.d.ts +12 -0
- package/esm/models/tik-tok-post-type.d.ts.map +1 -0
- package/esm/models/tik-tok-post-type.js +13 -0
- package/esm/models/tik-tok-post-type.js.map +1 -0
- package/esm/models/tik-tok-privacy-level.d.ts +14 -0
- package/esm/models/tik-tok-privacy-level.d.ts.map +1 -0
- package/esm/models/tik-tok-privacy-level.js +15 -0
- package/esm/models/tik-tok-privacy-level.js.map +1 -0
- package/esm/models/tik-tok-social-account-platform-specific-inputs.d.ts +12 -0
- package/esm/models/tik-tok-social-account-platform-specific-inputs.d.ts.map +1 -0
- package/esm/models/tik-tok-social-account-platform-specific-inputs.js +16 -0
- package/esm/models/tik-tok-social-account-platform-specific-inputs.js.map +1 -0
- package/esm/models/tik-tok-specifics.d.ts +37 -0
- package/esm/models/tik-tok-specifics.d.ts.map +1 -0
- package/esm/models/tik-tok-specifics.js +41 -0
- package/esm/models/tik-tok-specifics.js.map +1 -0
- package/esm/models/update-post-failure-code.d.ts +14 -0
- package/esm/models/update-post-failure-code.d.ts.map +1 -0
- package/esm/models/update-post-failure-code.js +15 -0
- package/esm/models/update-post-failure-code.js.map +1 -0
- package/esm/models/update-post-failure-result.d.ts +33 -0
- package/esm/models/update-post-failure-result.d.ts.map +1 -0
- package/esm/models/update-post-failure-result.js +22 -0
- package/esm/models/update-post-failure-result.js.map +1 -0
- package/esm/models/update-post-item.d.ts +37 -0
- package/esm/models/update-post-item.d.ts.map +1 -0
- package/esm/models/update-post-item.js +19 -0
- package/esm/models/update-post-item.js.map +1 -0
- package/esm/models/update-post-result.d.ts +11 -0
- package/esm/models/update-post-result.d.ts.map +1 -0
- package/esm/models/update-post-result.js +16 -0
- package/esm/models/update-post-result.js.map +1 -0
- package/esm/models/update-post-success-result.d.ts +19 -0
- package/esm/models/update-post-success-result.d.ts.map +1 -0
- package/esm/models/update-post-success-result.js +17 -0
- package/esm/models/update-post-success-result.js.map +1 -0
- package/esm/models/update-posts-response.d.ts +14 -0
- package/esm/models/update-posts-response.d.ts.map +1 -0
- package/esm/models/update-posts-response.js +14 -0
- package/esm/models/update-posts-response.js.map +1 -0
- package/esm/models/upload-session-part.d.ts +17 -0
- package/esm/models/upload-session-part.d.ts.map +1 -0
- package/esm/models/upload-session-part.js +15 -0
- package/esm/models/upload-session-part.js.map +1 -0
- package/esm/models/upload-session-status-value.d.ts +13 -0
- package/esm/models/upload-session-status-value.d.ts.map +1 -0
- package/esm/models/upload-session-status-value.js +14 -0
- package/esm/models/upload-session-status-value.js.map +1 -0
- package/esm/models/upload-session-status.d.ts +18 -0
- package/esm/models/upload-session-status.d.ts.map +1 -0
- package/esm/models/upload-session-status.js +19 -0
- package/esm/models/upload-session-status.js.map +1 -0
- package/esm/models/upload-session.d.ts +36 -0
- package/esm/models/upload-session.d.ts.map +1 -0
- package/esm/models/upload-session.js +19 -0
- package/esm/models/upload-session.js.map +1 -0
- package/esm/models/validation-error.d.ts +12 -0
- package/esm/models/validation-error.d.ts.map +1 -0
- package/esm/models/validation-error.js +16 -0
- package/esm/models/validation-error.js.map +1 -0
- package/esm/models/validation-field.d.ts +20 -0
- package/esm/models/validation-field.d.ts.map +1 -0
- package/esm/models/validation-field.js +21 -0
- package/esm/models/validation-field.js.map +1 -0
- package/esm/models/validation-warning.d.ts +12 -0
- package/esm/models/validation-warning.d.ts.map +1 -0
- package/esm/models/validation-warning.js +16 -0
- package/esm/models/validation-warning.js.map +1 -0
- package/esm/models/x-specifics.d.ts +17 -0
- package/esm/models/x-specifics.d.ts.map +1 -0
- package/esm/models/x-specifics.js +22 -0
- package/esm/models/x-specifics.js.map +1 -0
- package/esm/models/you-tube-privacy.d.ts +13 -0
- package/esm/models/you-tube-privacy.d.ts.map +1 -0
- package/esm/models/you-tube-privacy.js +14 -0
- package/esm/models/you-tube-privacy.js.map +1 -0
- package/esm/models/you-tube-specifics.d.ts +26 -0
- package/esm/models/you-tube-specifics.d.ts.map +1 -0
- package/esm/models/you-tube-specifics.js +30 -0
- package/esm/models/you-tube-specifics.js.map +1 -0
- package/esm/sdk/health.d.ts +12 -0
- package/esm/sdk/health.d.ts.map +1 -0
- package/esm/sdk/health.js +18 -0
- package/esm/sdk/health.js.map +1 -0
- package/esm/sdk/index.d.ts +2 -0
- package/esm/sdk/index.d.ts.map +1 -0
- package/esm/sdk/index.js +5 -0
- package/esm/sdk/index.js.map +1 -0
- package/esm/sdk/media.d.ts +45 -0
- package/esm/sdk/media.d.ts.map +1 -0
- package/esm/sdk/media.js +59 -0
- package/esm/sdk/media.js.map +1 -0
- package/esm/sdk/posts.d.ts +47 -0
- package/esm/sdk/posts.d.ts.map +1 -0
- package/esm/sdk/posts.js +62 -0
- package/esm/sdk/posts.js.map +1 -0
- package/esm/sdk/projects.d.ts +12 -0
- package/esm/sdk/projects.d.ts.map +1 -0
- package/esm/sdk/projects.js +18 -0
- package/esm/sdk/projects.js.map +1 -0
- package/esm/sdk/sdk.d.ts +19 -0
- package/esm/sdk/sdk.d.ts.map +1 -0
- package/esm/sdk/sdk.js +32 -0
- package/esm/sdk/sdk.js.map +1 -0
- package/esm/sdk/social-accounts.d.ts +31 -0
- package/esm/sdk/social-accounts.d.ts.map +1 -0
- package/esm/sdk/social-accounts.js +42 -0
- package/esm/sdk/social-accounts.js.map +1 -0
- package/esm/types/async.d.ts +23 -0
- package/esm/types/async.d.ts.map +1 -0
- package/esm/types/async.js +28 -0
- package/esm/types/async.js.map +1 -0
- package/esm/types/blobs.d.ts +4 -0
- package/esm/types/blobs.d.ts.map +1 -0
- package/esm/types/blobs.js +25 -0
- package/esm/types/blobs.js.map +1 -0
- package/esm/types/const-date-time.d.ts +3 -0
- package/esm/types/const-date-time.d.ts.map +1 -0
- package/esm/types/const-date-time.js +10 -0
- package/esm/types/const-date-time.js.map +1 -0
- package/esm/types/default-to-zero-value.d.ts +12 -0
- package/esm/types/default-to-zero-value.d.ts.map +1 -0
- package/esm/types/default-to-zero-value.js +31 -0
- package/esm/types/default-to-zero-value.js.map +1 -0
- package/esm/types/discriminated-union.d.ts +25 -0
- package/esm/types/discriminated-union.d.ts.map +1 -0
- package/esm/types/discriminated-union.js +61 -0
- package/esm/types/discriminated-union.js.map +1 -0
- package/esm/types/enums.d.ts +9 -0
- package/esm/types/enums.d.ts.map +1 -0
- package/esm/types/enums.js +27 -0
- package/esm/types/enums.js.map +1 -0
- package/esm/types/fp.d.ts +31 -0
- package/esm/types/fp.d.ts.map +1 -0
- package/esm/types/fp.js +31 -0
- package/esm/types/fp.js.map +1 -0
- package/esm/types/index.d.ts +10 -0
- package/esm/types/index.d.ts.map +1 -0
- package/esm/types/index.js +10 -0
- package/esm/types/index.js.map +1 -0
- package/esm/types/operations.d.ts +27 -0
- package/esm/types/operations.d.ts.map +1 -0
- package/esm/types/operations.js +77 -0
- package/esm/types/operations.js.map +1 -0
- package/esm/types/primitives.d.ts +11 -0
- package/esm/types/primitives.d.ts.map +1 -0
- package/esm/types/primitives.js +132 -0
- package/esm/types/primitives.js.map +1 -0
- package/esm/types/rfcdate.d.ts +21 -0
- package/esm/types/rfcdate.d.ts.map +1 -0
- package/esm/types/rfcdate.js +43 -0
- package/esm/types/rfcdate.js.map +1 -0
- package/esm/types/smart-union.d.ts +7 -0
- package/esm/types/smart-union.d.ts.map +1 -0
- package/esm/types/smart-union.js +118 -0
- package/esm/types/smart-union.js.map +1 -0
- package/esm/types/streams.d.ts +2 -0
- package/esm/types/streams.d.ts.map +1 -0
- package/esm/types/streams.js +15 -0
- package/esm/types/streams.js.map +1 -0
- package/esm/types/unrecognized.d.ts +16 -0
- package/esm/types/unrecognized.d.ts.map +1 -0
- package/esm/types/unrecognized.js +31 -0
- package/esm/types/unrecognized.js.map +1 -0
- package/jsr.json +27 -0
- package/package.json +75 -0
- package/src/core.ts +13 -0
- package/src/funcs/health-get-health.ts +142 -0
- package/src/funcs/media-complete-upload-session.ts +167 -0
- package/src/funcs/media-create-media.ts +176 -0
- package/src/funcs/media-create-upload-session.ts +171 -0
- package/src/funcs/media-get-upload-session.ts +167 -0
- package/src/funcs/posts-create-posts.ts +167 -0
- package/src/funcs/posts-delete-posts.ts +165 -0
- package/src/funcs/posts-list-posts.ts +164 -0
- package/src/funcs/posts-update-posts.ts +165 -0
- package/src/funcs/projects-list-projects.ts +143 -0
- package/src/funcs/social-accounts-create-o-auth-authorization.ts +162 -0
- package/src/funcs/social-accounts-get-social-account-platform-inputs.ts +175 -0
- package/src/funcs/social-accounts-list-social-accounts.ts +172 -0
- package/src/hooks/hooks.ts +129 -0
- package/src/hooks/index.ts +6 -0
- package/src/hooks/types.ts +107 -0
- package/src/index.ts +9 -0
- package/src/lib/base64.ts +39 -0
- package/src/lib/config.ts +68 -0
- package/src/lib/dlv.ts +53 -0
- package/src/lib/encodings.ts +520 -0
- package/src/lib/env.ts +57 -0
- package/src/lib/files.ts +104 -0
- package/src/lib/http.ts +323 -0
- package/src/lib/is-plain-object.ts +43 -0
- package/src/lib/logger.ts +9 -0
- package/src/lib/matchers.ts +353 -0
- package/src/lib/primitives.ts +150 -0
- package/src/lib/retries.ts +218 -0
- package/src/lib/schemas.ts +94 -0
- package/src/lib/sdks.ts +408 -0
- package/src/lib/security.ts +275 -0
- package/src/lib/url.ts +35 -0
- package/src/models/create-media-response.ts +34 -0
- package/src/models/create-o-auth-authorization-request.ts +45 -0
- package/src/models/create-o-auth-authorization-response.ts +34 -0
- package/src/models/create-post-failure-code.ts +25 -0
- package/src/models/create-post-failure-result.ts +68 -0
- package/src/models/create-post-item.ts +73 -0
- package/src/models/create-post-result.ts +42 -0
- package/src/models/create-post-success-result.ts +50 -0
- package/src/models/create-posts-response.ts +37 -0
- package/src/models/create-upload-session-request.ts +39 -0
- package/src/models/delete-post-failure-code.ts +20 -0
- package/src/models/delete-post-failure-result.ts +44 -0
- package/src/models/delete-post-result.ts +42 -0
- package/src/models/delete-post-success-result.ts +36 -0
- package/src/models/delete-posts-response.ts +37 -0
- package/src/models/delivery-status.ts +46 -0
- package/src/models/errors/http-client-errors.ts +62 -0
- package/src/models/errors/index.ts +9 -0
- package/src/models/errors/response-validation-error.ts +50 -0
- package/src/models/errors/sdk-validation-error.ts +54 -0
- package/src/models/errors/woop-social-default-error.ts +40 -0
- package/src/models/errors/woop-social-error.ts +35 -0
- package/src/models/facebook-post-type.ts +26 -0
- package/src/models/facebook-specifics.ts +63 -0
- package/src/models/health-response.ts +44 -0
- package/src/models/index.ts +64 -0
- package/src/models/instagram-post-type.ts +25 -0
- package/src/models/instagram-specifics.ts +59 -0
- package/src/models/linked-in-pages-specifics.ts +50 -0
- package/src/models/linked-in-specifics.ts +50 -0
- package/src/models/list-posts-request.ts +68 -0
- package/src/models/list-posts-response.ts +37 -0
- package/src/models/operations/complete-upload-session.ts +35 -0
- package/src/models/operations/create-media.ts +41 -0
- package/src/models/operations/get-social-account-platform-inputs.ts +36 -0
- package/src/models/operations/get-upload-session.ts +33 -0
- package/src/models/operations/index.ts +9 -0
- package/src/models/operations/list-social-accounts.ts +33 -0
- package/src/models/pinterest-account-platform-inputs.ts +42 -0
- package/src/models/pinterest-board-option.ts +39 -0
- package/src/models/pinterest-social-account-platform-specific-inputs.ts +42 -0
- package/src/models/pinterest-specifics.ts +54 -0
- package/src/models/platform-specifics.ts +129 -0
- package/src/models/post-media.ts +56 -0
- package/src/models/post.ts +111 -0
- package/src/models/project.ts +36 -0
- package/src/models/security.ts +34 -0
- package/src/models/social-account-platform-inputs.ts +49 -0
- package/src/models/social-account-platform-specific-inputs.ts +43 -0
- package/src/models/social-account-status.ts +19 -0
- package/src/models/social-account.ts +59 -0
- package/src/models/social-platform.ts +36 -0
- package/src/models/tik-tok-account-platform-inputs.ts +63 -0
- package/src/models/tik-tok-post-type.ts +24 -0
- package/src/models/tik-tok-privacy-level.ts +26 -0
- package/src/models/tik-tok-social-account-platform-specific-inputs.ts +41 -0
- package/src/models/tik-tok-specifics.ts +94 -0
- package/src/models/update-post-failure-code.ts +23 -0
- package/src/models/update-post-failure-result.ts +68 -0
- package/src/models/update-post-item.ts +61 -0
- package/src/models/update-post-result.ts +42 -0
- package/src/models/update-post-success-result.ts +45 -0
- package/src/models/update-posts-response.ts +37 -0
- package/src/models/upload-session-part.ts +39 -0
- package/src/models/upload-session-status-value.ts +24 -0
- package/src/models/upload-session-status.ts +46 -0
- package/src/models/upload-session.ts +64 -0
- package/src/models/validation-error.ts +37 -0
- package/src/models/validation-field.ts +29 -0
- package/src/models/validation-warning.ts +37 -0
- package/src/models/x-specifics.ts +44 -0
- package/src/models/you-tube-privacy.ts +25 -0
- package/src/models/you-tube-specifics.ts +71 -0
- package/src/sdk/health.ts +25 -0
- package/src/sdk/index.ts +5 -0
- package/src/sdk/media.ts +93 -0
- package/src/sdk/posts.ts +95 -0
- package/src/sdk/projects.ts +25 -0
- package/src/sdk/sdk.ts +37 -0
- package/src/sdk/social-accounts.ts +68 -0
- package/src/types/async.ts +68 -0
- package/src/types/blobs.ts +33 -0
- package/src/types/const-date-time.ts +15 -0
- package/src/types/default-to-zero-value.ts +33 -0
- package/src/types/discriminated-union.ts +101 -0
- package/src/types/enums.ts +45 -0
- package/src/types/fp.ts +50 -0
- package/src/types/index.ts +13 -0
- package/src/types/operations.ts +105 -0
- package/src/types/primitives.ts +168 -0
- package/src/types/rfcdate.ts +54 -0
- package/src/types/smart-union.ts +154 -0
- package/src/types/streams.ts +21 -0
- package/src/types/unrecognized.ts +35 -0
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as models from "../models/index.js";
|
|
6
|
+
import { env } from "./env.js";
|
|
7
|
+
|
|
8
|
+
type OAuth2PasswordFlow = {
|
|
9
|
+
username: string;
|
|
10
|
+
password: string;
|
|
11
|
+
clientID?: string | undefined;
|
|
12
|
+
clientSecret?: string | undefined;
|
|
13
|
+
tokenURL: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export enum SecurityErrorCode {
|
|
17
|
+
Incomplete = "incomplete",
|
|
18
|
+
UnrecognisedSecurityType = "unrecognized_security_type",
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export class SecurityError extends Error {
|
|
22
|
+
constructor(
|
|
23
|
+
public code: SecurityErrorCode,
|
|
24
|
+
message: string,
|
|
25
|
+
) {
|
|
26
|
+
super(message);
|
|
27
|
+
this.name = "SecurityError";
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
static incomplete(): SecurityError {
|
|
31
|
+
return new SecurityError(
|
|
32
|
+
SecurityErrorCode.Incomplete,
|
|
33
|
+
"Security requirements not met in order to perform the operation",
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
static unrecognizedType(type: string): SecurityError {
|
|
37
|
+
return new SecurityError(
|
|
38
|
+
SecurityErrorCode.UnrecognisedSecurityType,
|
|
39
|
+
`Unrecognised security type: ${type}`,
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export type SecurityState = {
|
|
45
|
+
basic: { username?: string | undefined; password?: string | undefined };
|
|
46
|
+
headers: Record<string, string>;
|
|
47
|
+
queryParams: Record<string, string>;
|
|
48
|
+
cookies: Record<string, string>;
|
|
49
|
+
oauth2: ({ type: "password" } & OAuth2PasswordFlow) | { type: "none" };
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
type SecurityInputBasic = {
|
|
53
|
+
type: "http:basic";
|
|
54
|
+
value:
|
|
55
|
+
| { username?: string | undefined; password?: string | undefined }
|
|
56
|
+
| null
|
|
57
|
+
| undefined;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
type SecurityInputBearer = {
|
|
61
|
+
type: "http:bearer";
|
|
62
|
+
value: string | null | undefined;
|
|
63
|
+
fieldName: string;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
type SecurityInputAPIKey = {
|
|
67
|
+
type: "apiKey:header" | "apiKey:query" | "apiKey:cookie";
|
|
68
|
+
value: string | null | undefined;
|
|
69
|
+
fieldName: string;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
type SecurityInputOIDC = {
|
|
73
|
+
type: "openIdConnect";
|
|
74
|
+
value: string | null | undefined;
|
|
75
|
+
fieldName: string;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
type SecurityInputOAuth2 = {
|
|
79
|
+
type: "oauth2";
|
|
80
|
+
value: string | null | undefined;
|
|
81
|
+
fieldName: string;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
type SecurityInputOAuth2ClientCredentials = {
|
|
85
|
+
type: "oauth2:client_credentials";
|
|
86
|
+
value:
|
|
87
|
+
| {
|
|
88
|
+
clientID?: string | undefined;
|
|
89
|
+
clientSecret?: string | undefined;
|
|
90
|
+
}
|
|
91
|
+
| null
|
|
92
|
+
| string
|
|
93
|
+
| undefined;
|
|
94
|
+
fieldName?: string;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
type SecurityInputOAuth2PasswordCredentials = {
|
|
98
|
+
type: "oauth2:password";
|
|
99
|
+
value:
|
|
100
|
+
| string
|
|
101
|
+
| null
|
|
102
|
+
| undefined;
|
|
103
|
+
fieldName?: string;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
type SecurityInputCustom = {
|
|
107
|
+
type: "http:custom";
|
|
108
|
+
value: any | null | undefined;
|
|
109
|
+
fieldName?: string;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export type SecurityInput =
|
|
113
|
+
| SecurityInputBasic
|
|
114
|
+
| SecurityInputBearer
|
|
115
|
+
| SecurityInputAPIKey
|
|
116
|
+
| SecurityInputOAuth2
|
|
117
|
+
| SecurityInputOAuth2ClientCredentials
|
|
118
|
+
| SecurityInputOAuth2PasswordCredentials
|
|
119
|
+
| SecurityInputOIDC
|
|
120
|
+
| SecurityInputCustom;
|
|
121
|
+
|
|
122
|
+
export function resolveSecurity(
|
|
123
|
+
...options: SecurityInput[][]
|
|
124
|
+
): SecurityState | null {
|
|
125
|
+
const state: SecurityState = {
|
|
126
|
+
basic: {},
|
|
127
|
+
headers: {},
|
|
128
|
+
queryParams: {},
|
|
129
|
+
cookies: {},
|
|
130
|
+
oauth2: { type: "none" },
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
const option = options.find((opts) => {
|
|
134
|
+
return opts.every((o) => {
|
|
135
|
+
if (o.value == null) {
|
|
136
|
+
return false;
|
|
137
|
+
} else if (o.type === "http:basic") {
|
|
138
|
+
return o.value.username != null || o.value.password != null;
|
|
139
|
+
} else if (o.type === "http:custom") {
|
|
140
|
+
return null;
|
|
141
|
+
} else if (o.type === "oauth2:password") {
|
|
142
|
+
return (
|
|
143
|
+
typeof o.value === "string" && !!o.value
|
|
144
|
+
);
|
|
145
|
+
} else if (o.type === "oauth2:client_credentials") {
|
|
146
|
+
if (typeof o.value == "string") {
|
|
147
|
+
return !!o.value;
|
|
148
|
+
}
|
|
149
|
+
return o.value.clientID != null || o.value.clientSecret != null;
|
|
150
|
+
} else if (typeof o.value === "string") {
|
|
151
|
+
return !!o.value;
|
|
152
|
+
} else {
|
|
153
|
+
throw new Error(
|
|
154
|
+
`Unrecognized security type: ${o.type} (value type: ${typeof o
|
|
155
|
+
.value})`,
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
if (option == null) {
|
|
161
|
+
return null;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
option.forEach((spec) => {
|
|
165
|
+
if (spec.value == null) {
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
const { type } = spec;
|
|
170
|
+
|
|
171
|
+
switch (type) {
|
|
172
|
+
case "apiKey:header":
|
|
173
|
+
state.headers[spec.fieldName] = spec.value;
|
|
174
|
+
break;
|
|
175
|
+
case "apiKey:query":
|
|
176
|
+
state.queryParams[spec.fieldName] = spec.value;
|
|
177
|
+
break;
|
|
178
|
+
case "apiKey:cookie":
|
|
179
|
+
state.cookies[spec.fieldName] = spec.value;
|
|
180
|
+
break;
|
|
181
|
+
case "http:basic":
|
|
182
|
+
applyBasic(state, spec);
|
|
183
|
+
break;
|
|
184
|
+
case "http:custom":
|
|
185
|
+
break;
|
|
186
|
+
case "http:bearer":
|
|
187
|
+
applyBearer(state, spec);
|
|
188
|
+
break;
|
|
189
|
+
case "oauth2":
|
|
190
|
+
applyBearer(state, spec);
|
|
191
|
+
break;
|
|
192
|
+
case "oauth2:password":
|
|
193
|
+
applyBearer(state, spec);
|
|
194
|
+
break;
|
|
195
|
+
case "oauth2:client_credentials":
|
|
196
|
+
break;
|
|
197
|
+
case "openIdConnect":
|
|
198
|
+
applyBearer(state, spec);
|
|
199
|
+
break;
|
|
200
|
+
default:
|
|
201
|
+
throw SecurityError.unrecognizedType((spec satisfies never, type));
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
return state;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
function applyBasic(
|
|
209
|
+
state: SecurityState,
|
|
210
|
+
spec: SecurityInputBasic,
|
|
211
|
+
) {
|
|
212
|
+
if (spec.value == null) {
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
state.basic = spec.value;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
function applyBearer(
|
|
220
|
+
state: SecurityState,
|
|
221
|
+
spec:
|
|
222
|
+
| SecurityInputBearer
|
|
223
|
+
| SecurityInputOAuth2
|
|
224
|
+
| SecurityInputOIDC
|
|
225
|
+
| SecurityInputOAuth2PasswordCredentials,
|
|
226
|
+
) {
|
|
227
|
+
if (typeof spec.value !== "string" || !spec.value) {
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
let value = spec.value;
|
|
232
|
+
if (value.slice(0, 7).toLowerCase() !== "bearer ") {
|
|
233
|
+
value = `Bearer ${value}`;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
if (spec.fieldName !== undefined) {
|
|
237
|
+
state.headers[spec.fieldName] = value;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export function resolveGlobalSecurity(
|
|
242
|
+
security: Partial<models.Security> | null | undefined,
|
|
243
|
+
allowedFields?: number[],
|
|
244
|
+
): SecurityState | null {
|
|
245
|
+
let inputs: SecurityInput[][] = [
|
|
246
|
+
[
|
|
247
|
+
{
|
|
248
|
+
fieldName: "Authorization",
|
|
249
|
+
type: "http:bearer",
|
|
250
|
+
value: security?.bearerAuth ?? env().WOOPSOCIAL_BEARER_AUTH,
|
|
251
|
+
},
|
|
252
|
+
],
|
|
253
|
+
];
|
|
254
|
+
|
|
255
|
+
if (allowedFields) {
|
|
256
|
+
inputs = allowedFields.map((i) => {
|
|
257
|
+
if (i < 0 || i >= inputs.length) {
|
|
258
|
+
throw new RangeError(`invalid allowedFields index ${i}`);
|
|
259
|
+
}
|
|
260
|
+
return inputs[i]!;
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
return resolveSecurity(...inputs);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export async function extractSecurity<
|
|
268
|
+
T extends string | Record<string, unknown>,
|
|
269
|
+
>(sec: T | (() => Promise<T>) | undefined): Promise<T | undefined> {
|
|
270
|
+
if (sec == null) {
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
return typeof sec === "function" ? sec() : sec;
|
|
275
|
+
}
|
package/src/lib/url.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
const hasOwn = Object.prototype.hasOwnProperty;
|
|
6
|
+
|
|
7
|
+
export type Params = Partial<Record<string, string | number>>;
|
|
8
|
+
|
|
9
|
+
export function pathToFunc(
|
|
10
|
+
pathPattern: string,
|
|
11
|
+
options?: { charEncoding?: "percent" | "none" },
|
|
12
|
+
): (params?: Params) => string {
|
|
13
|
+
const paramRE = /\{([a-zA-Z0-9_][a-zA-Z0-9_-]*?)\}/g;
|
|
14
|
+
|
|
15
|
+
return function buildURLPath(params: Record<string, unknown> = {}): string {
|
|
16
|
+
return pathPattern
|
|
17
|
+
.replace(paramRE, function (_, placeholder) {
|
|
18
|
+
if (!hasOwn.call(params, placeholder)) {
|
|
19
|
+
throw new Error(`Parameter '${placeholder}' is required`);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const value = params[placeholder];
|
|
23
|
+
if (typeof value !== "string" && typeof value !== "number") {
|
|
24
|
+
throw new Error(
|
|
25
|
+
`Parameter '${placeholder}' must be a string or number`,
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return options?.charEncoding === "percent"
|
|
30
|
+
? encodeURIComponent(`${value}`)
|
|
31
|
+
: `${value}`;
|
|
32
|
+
})
|
|
33
|
+
.replace(/^\/+/, "");
|
|
34
|
+
};
|
|
35
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
+
import * as types from "../types/primitives.js";
|
|
9
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
10
|
+
|
|
11
|
+
export type CreateMediaResponse = {
|
|
12
|
+
/**
|
|
13
|
+
* Media identifier.
|
|
14
|
+
*/
|
|
15
|
+
mediaId: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const CreateMediaResponse$inboundSchema: z.ZodMiniType<
|
|
20
|
+
CreateMediaResponse,
|
|
21
|
+
unknown
|
|
22
|
+
> = z.object({
|
|
23
|
+
mediaId: types.string(),
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
export function createMediaResponseFromJSON(
|
|
27
|
+
jsonString: string,
|
|
28
|
+
): SafeParseResult<CreateMediaResponse, SDKValidationError> {
|
|
29
|
+
return safeParse(
|
|
30
|
+
jsonString,
|
|
31
|
+
(x) => CreateMediaResponse$inboundSchema.parse(JSON.parse(x)),
|
|
32
|
+
`Failed to parse 'CreateMediaResponse' from JSON`,
|
|
33
|
+
);
|
|
34
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import {
|
|
7
|
+
SocialPlatform,
|
|
8
|
+
SocialPlatform$outboundSchema,
|
|
9
|
+
} from "./social-platform.js";
|
|
10
|
+
|
|
11
|
+
export type CreateOAuthAuthorizationRequest = {
|
|
12
|
+
/**
|
|
13
|
+
* Project identifier.
|
|
14
|
+
*/
|
|
15
|
+
projectId: string;
|
|
16
|
+
/**
|
|
17
|
+
* Social platform supported by WoopSocial.
|
|
18
|
+
*/
|
|
19
|
+
platform: SocialPlatform;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export type CreateOAuthAuthorizationRequest$Outbound = {
|
|
24
|
+
projectId: string;
|
|
25
|
+
platform: string;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const CreateOAuthAuthorizationRequest$outboundSchema: z.ZodMiniType<
|
|
30
|
+
CreateOAuthAuthorizationRequest$Outbound,
|
|
31
|
+
CreateOAuthAuthorizationRequest
|
|
32
|
+
> = z.object({
|
|
33
|
+
projectId: z.string(),
|
|
34
|
+
platform: SocialPlatform$outboundSchema,
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export function createOAuthAuthorizationRequestToJSON(
|
|
38
|
+
createOAuthAuthorizationRequest: CreateOAuthAuthorizationRequest,
|
|
39
|
+
): string {
|
|
40
|
+
return JSON.stringify(
|
|
41
|
+
CreateOAuthAuthorizationRequest$outboundSchema.parse(
|
|
42
|
+
createOAuthAuthorizationRequest,
|
|
43
|
+
),
|
|
44
|
+
);
|
|
45
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
+
import * as types from "../types/primitives.js";
|
|
9
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
10
|
+
|
|
11
|
+
export type CreateOAuthAuthorizationResponse = {
|
|
12
|
+
/**
|
|
13
|
+
* Browser URL that starts the OAuth authorization flow.
|
|
14
|
+
*/
|
|
15
|
+
url: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const CreateOAuthAuthorizationResponse$inboundSchema: z.ZodMiniType<
|
|
20
|
+
CreateOAuthAuthorizationResponse,
|
|
21
|
+
unknown
|
|
22
|
+
> = z.object({
|
|
23
|
+
url: types.string(),
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
export function createOAuthAuthorizationResponseFromJSON(
|
|
27
|
+
jsonString: string,
|
|
28
|
+
): SafeParseResult<CreateOAuthAuthorizationResponse, SDKValidationError> {
|
|
29
|
+
return safeParse(
|
|
30
|
+
jsonString,
|
|
31
|
+
(x) => CreateOAuthAuthorizationResponse$inboundSchema.parse(JSON.parse(x)),
|
|
32
|
+
`Failed to parse 'CreateOAuthAuthorizationResponse' from JSON`,
|
|
33
|
+
);
|
|
34
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import * as openEnums from "../types/enums.js";
|
|
7
|
+
import { OpenEnum } from "../types/enums.js";
|
|
8
|
+
|
|
9
|
+
export const CreatePostFailureCode = {
|
|
10
|
+
InvalidProjectId: "INVALID_PROJECT_ID",
|
|
11
|
+
ProjectNotFound: "PROJECT_NOT_FOUND",
|
|
12
|
+
InvalidSocialAccountId: "INVALID_SOCIAL_ACCOUNT_ID",
|
|
13
|
+
SocialAccountNotConnected: "SOCIAL_ACCOUNT_NOT_CONNECTED",
|
|
14
|
+
InvalidMediaId: "INVALID_MEDIA_ID",
|
|
15
|
+
InvalidPlatformSpecificData: "INVALID_PLATFORM_SPECIFIC_DATA",
|
|
16
|
+
ValidationFailed: "VALIDATION_FAILED",
|
|
17
|
+
InternalError: "INTERNAL_ERROR",
|
|
18
|
+
} as const;
|
|
19
|
+
export type CreatePostFailureCode = OpenEnum<typeof CreatePostFailureCode>;
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const CreatePostFailureCode$inboundSchema: z.ZodMiniType<
|
|
23
|
+
CreatePostFailureCode,
|
|
24
|
+
unknown
|
|
25
|
+
> = openEnums.inboundSchema(CreatePostFailureCode);
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
+
import * as types from "../types/primitives.js";
|
|
9
|
+
import {
|
|
10
|
+
CreatePostFailureCode,
|
|
11
|
+
CreatePostFailureCode$inboundSchema,
|
|
12
|
+
} from "./create-post-failure-code.js";
|
|
13
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
14
|
+
import {
|
|
15
|
+
ValidationError,
|
|
16
|
+
ValidationError$inboundSchema,
|
|
17
|
+
} from "./validation-error.js";
|
|
18
|
+
import {
|
|
19
|
+
ValidationWarning,
|
|
20
|
+
ValidationWarning$inboundSchema,
|
|
21
|
+
} from "./validation-warning.js";
|
|
22
|
+
|
|
23
|
+
export type CreatePostFailureResult = {
|
|
24
|
+
status: "FAILURE";
|
|
25
|
+
/**
|
|
26
|
+
* Item idempotency key echoed from the request.
|
|
27
|
+
*/
|
|
28
|
+
idempotencyKey: string;
|
|
29
|
+
code: CreatePostFailureCode;
|
|
30
|
+
/**
|
|
31
|
+
* Human-readable summary of the failure.
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
* When `code` is `VALIDATION_FAILED`, inspect `validationErrors` for the specific field-level errors.
|
|
35
|
+
*/
|
|
36
|
+
message: string;
|
|
37
|
+
/**
|
|
38
|
+
* Structured validation errors for this item. Empty when there are no validation errors.
|
|
39
|
+
*/
|
|
40
|
+
validationErrors: Array<ValidationError>;
|
|
41
|
+
/**
|
|
42
|
+
* Structured validation warnings for this item. Empty when there are no warnings.
|
|
43
|
+
*/
|
|
44
|
+
validationWarnings: Array<ValidationWarning>;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** @internal */
|
|
48
|
+
export const CreatePostFailureResult$inboundSchema: z.ZodMiniType<
|
|
49
|
+
CreatePostFailureResult,
|
|
50
|
+
unknown
|
|
51
|
+
> = z.object({
|
|
52
|
+
status: types.literal("FAILURE"),
|
|
53
|
+
idempotencyKey: types.string(),
|
|
54
|
+
code: CreatePostFailureCode$inboundSchema,
|
|
55
|
+
message: types.string(),
|
|
56
|
+
validationErrors: z.array(ValidationError$inboundSchema),
|
|
57
|
+
validationWarnings: z.array(ValidationWarning$inboundSchema),
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
export function createPostFailureResultFromJSON(
|
|
61
|
+
jsonString: string,
|
|
62
|
+
): SafeParseResult<CreatePostFailureResult, SDKValidationError> {
|
|
63
|
+
return safeParse(
|
|
64
|
+
jsonString,
|
|
65
|
+
(x) => CreatePostFailureResult$inboundSchema.parse(JSON.parse(x)),
|
|
66
|
+
`Failed to parse 'CreatePostFailureResult' from JSON`,
|
|
67
|
+
);
|
|
68
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import {
|
|
7
|
+
PlatformSpecifics,
|
|
8
|
+
PlatformSpecifics$Outbound,
|
|
9
|
+
PlatformSpecifics$outboundSchema,
|
|
10
|
+
} from "./platform-specifics.js";
|
|
11
|
+
|
|
12
|
+
export type CreatePostItem = {
|
|
13
|
+
/**
|
|
14
|
+
* Client-provided item idempotency key.
|
|
15
|
+
*/
|
|
16
|
+
idempotencyKey: string;
|
|
17
|
+
/**
|
|
18
|
+
* Project identifier.
|
|
19
|
+
*/
|
|
20
|
+
projectId: string;
|
|
21
|
+
/**
|
|
22
|
+
* Connected social account identifier.
|
|
23
|
+
*/
|
|
24
|
+
socialAccountId: string;
|
|
25
|
+
/**
|
|
26
|
+
* UTC time when this post should be published.
|
|
27
|
+
*/
|
|
28
|
+
scheduledForUTC: Date;
|
|
29
|
+
title?: string | undefined;
|
|
30
|
+
description?: string | undefined;
|
|
31
|
+
firstComment?: string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Media identifiers previously created via the external media upload flow.
|
|
34
|
+
*/
|
|
35
|
+
mediaIds?: Array<string> | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Platform-specific publishing options. The `platform` value must match the publishing account's platform.
|
|
38
|
+
*/
|
|
39
|
+
platformSpecifics: PlatformSpecifics;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export type CreatePostItem$Outbound = {
|
|
44
|
+
idempotencyKey: string;
|
|
45
|
+
projectId: string;
|
|
46
|
+
socialAccountId: string;
|
|
47
|
+
scheduledForUTC: string;
|
|
48
|
+
title?: string | undefined;
|
|
49
|
+
description?: string | undefined;
|
|
50
|
+
firstComment?: string | undefined;
|
|
51
|
+
mediaIds?: Array<string> | undefined;
|
|
52
|
+
platformSpecifics: PlatformSpecifics$Outbound;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/** @internal */
|
|
56
|
+
export const CreatePostItem$outboundSchema: z.ZodMiniType<
|
|
57
|
+
CreatePostItem$Outbound,
|
|
58
|
+
CreatePostItem
|
|
59
|
+
> = z.object({
|
|
60
|
+
idempotencyKey: z.string(),
|
|
61
|
+
projectId: z.string(),
|
|
62
|
+
socialAccountId: z.string(),
|
|
63
|
+
scheduledForUTC: z.pipe(z.date(), z.transform(v => v.toISOString())),
|
|
64
|
+
title: z.optional(z.string()),
|
|
65
|
+
description: z.optional(z.string()),
|
|
66
|
+
firstComment: z.optional(z.string()),
|
|
67
|
+
mediaIds: z.optional(z.array(z.string())),
|
|
68
|
+
platformSpecifics: PlatformSpecifics$outboundSchema,
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
export function createPostItemToJSON(createPostItem: CreatePostItem): string {
|
|
72
|
+
return JSON.stringify(CreatePostItem$outboundSchema.parse(createPostItem));
|
|
73
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import * as discriminatedUnionTypes from "../types/discriminated-union.js";
|
|
8
|
+
import { discriminatedUnion } from "../types/discriminated-union.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
|
+
import {
|
|
11
|
+
CreatePostFailureResult,
|
|
12
|
+
CreatePostFailureResult$inboundSchema,
|
|
13
|
+
} from "./create-post-failure-result.js";
|
|
14
|
+
import {
|
|
15
|
+
CreatePostSuccessResult,
|
|
16
|
+
CreatePostSuccessResult$inboundSchema,
|
|
17
|
+
} from "./create-post-success-result.js";
|
|
18
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
19
|
+
|
|
20
|
+
export type CreatePostResult =
|
|
21
|
+
| CreatePostSuccessResult
|
|
22
|
+
| CreatePostFailureResult
|
|
23
|
+
| discriminatedUnionTypes.Unknown<"status">;
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const CreatePostResult$inboundSchema: z.ZodMiniType<
|
|
27
|
+
CreatePostResult,
|
|
28
|
+
unknown
|
|
29
|
+
> = discriminatedUnion("status", {
|
|
30
|
+
SUCCESS: CreatePostSuccessResult$inboundSchema,
|
|
31
|
+
FAILURE: CreatePostFailureResult$inboundSchema,
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export function createPostResultFromJSON(
|
|
35
|
+
jsonString: string,
|
|
36
|
+
): SafeParseResult<CreatePostResult, SDKValidationError> {
|
|
37
|
+
return safeParse(
|
|
38
|
+
jsonString,
|
|
39
|
+
(x) => CreatePostResult$inboundSchema.parse(JSON.parse(x)),
|
|
40
|
+
`Failed to parse 'CreatePostResult' from JSON`,
|
|
41
|
+
);
|
|
42
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
+
import * as types from "../types/primitives.js";
|
|
9
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
10
|
+
import {
|
|
11
|
+
ValidationWarning,
|
|
12
|
+
ValidationWarning$inboundSchema,
|
|
13
|
+
} from "./validation-warning.js";
|
|
14
|
+
|
|
15
|
+
export type CreatePostSuccessResult = {
|
|
16
|
+
status: "SUCCESS";
|
|
17
|
+
/**
|
|
18
|
+
* Item idempotency key echoed from the request.
|
|
19
|
+
*/
|
|
20
|
+
idempotencyKey: string;
|
|
21
|
+
/**
|
|
22
|
+
* Created post identifier.
|
|
23
|
+
*/
|
|
24
|
+
id: string;
|
|
25
|
+
/**
|
|
26
|
+
* Structured validation warnings for this item. Empty when there are no warnings.
|
|
27
|
+
*/
|
|
28
|
+
validationWarnings: Array<ValidationWarning>;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const CreatePostSuccessResult$inboundSchema: z.ZodMiniType<
|
|
33
|
+
CreatePostSuccessResult,
|
|
34
|
+
unknown
|
|
35
|
+
> = z.object({
|
|
36
|
+
status: types.literal("SUCCESS"),
|
|
37
|
+
idempotencyKey: types.string(),
|
|
38
|
+
id: types.string(),
|
|
39
|
+
validationWarnings: z.array(ValidationWarning$inboundSchema),
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
export function createPostSuccessResultFromJSON(
|
|
43
|
+
jsonString: string,
|
|
44
|
+
): SafeParseResult<CreatePostSuccessResult, SDKValidationError> {
|
|
45
|
+
return safeParse(
|
|
46
|
+
jsonString,
|
|
47
|
+
(x) => CreatePostSuccessResult$inboundSchema.parse(JSON.parse(x)),
|
|
48
|
+
`Failed to parse 'CreatePostSuccessResult' from JSON`,
|
|
49
|
+
);
|
|
50
|
+
}
|