@woopsocial/typescript-sdk 0.0.9 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/FUNCTIONS.md +9 -3
- package/README.md +71 -22
- package/esm/funcs/posts-create-post.d.ts +23 -0
- package/esm/funcs/posts-create-post.d.ts.map +1 -0
- package/esm/funcs/posts-create-post.js +88 -0
- package/esm/funcs/posts-create-post.js.map +1 -0
- package/esm/funcs/posts-delete-post.d.ts +21 -0
- package/esm/funcs/posts-delete-post.d.ts.map +1 -0
- package/esm/funcs/posts-delete-post.js +91 -0
- package/esm/funcs/posts-delete-post.js.map +1 -0
- package/esm/funcs/posts-get-post.d.ts +19 -0
- package/esm/funcs/posts-get-post.d.ts.map +1 -0
- package/esm/funcs/posts-get-post.js +89 -0
- package/esm/funcs/posts-get-post.js.map +1 -0
- package/esm/funcs/social-accounts-get-social-account-platform-inputs.d.ts +2 -1
- package/esm/funcs/social-accounts-get-social-account-platform-inputs.d.ts.map +1 -1
- package/esm/funcs/social-accounts-get-social-account-platform-inputs.js +2 -1
- package/esm/funcs/social-accounts-get-social-account-platform-inputs.js.map +1 -1
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/create-post-error-code.d.ts +16 -0
- package/esm/models/create-post-error-code.d.ts.map +1 -0
- package/esm/models/create-post-error-code.js +17 -0
- package/esm/models/create-post-error-code.js.map +1 -0
- package/esm/models/create-post-request.d.ts +35 -0
- package/esm/models/create-post-request.d.ts.map +1 -0
- package/esm/models/create-post-request.js +17 -0
- package/esm/models/create-post-request.js.map +1 -0
- package/esm/models/delete-post-error-code.d.ts +11 -0
- package/esm/models/delete-post-error-code.d.ts.map +1 -0
- package/esm/models/delete-post-error-code.js +12 -0
- package/esm/models/delete-post-error-code.js.map +1 -0
- package/esm/models/delivery-status.d.ts +0 -2
- package/esm/models/delivery-status.d.ts.map +1 -1
- package/esm/models/delivery-status.js +0 -2
- package/esm/models/delivery-status.js.map +1 -1
- package/esm/models/draft-post-schedule.d.ts +17 -0
- package/esm/models/draft-post-schedule.d.ts.map +1 -0
- package/esm/models/draft-post-schedule.js +21 -0
- package/esm/models/draft-post-schedule.js.map +1 -0
- package/esm/models/errors/create-post-error-response.d.ts +46 -0
- package/esm/models/errors/create-post-error-response.d.ts.map +1 -0
- package/esm/models/errors/create-post-error-response.js +55 -0
- package/esm/models/errors/create-post-error-response.js.map +1 -0
- package/esm/models/errors/delete-post-error-response.d.ts +20 -0
- package/esm/models/errors/delete-post-error-response.d.ts.map +1 -0
- package/esm/models/errors/delete-post-error-response.js +34 -0
- package/esm/models/errors/delete-post-error-response.js.map +1 -0
- package/esm/models/errors/get-post-error-response.d.ts +20 -0
- package/esm/models/errors/get-post-error-response.d.ts.map +1 -0
- package/esm/models/errors/get-post-error-response.js +34 -0
- package/esm/models/errors/get-post-error-response.js.map +1 -0
- package/esm/models/errors/index.d.ts +3 -0
- package/esm/models/errors/index.d.ts.map +1 -1
- package/esm/models/errors/index.js +3 -0
- package/esm/models/errors/index.js.map +1 -1
- package/esm/models/facebook-input.d.ts +33 -0
- package/esm/models/facebook-input.d.ts.map +1 -0
- package/esm/models/facebook-input.js +18 -0
- package/esm/models/facebook-input.js.map +1 -0
- package/esm/models/facebook-post.d.ts +43 -0
- package/esm/models/facebook-post.d.ts.map +1 -0
- package/esm/models/facebook-post.js +26 -0
- package/esm/models/facebook-post.js.map +1 -0
- package/esm/models/get-post-error-code.d.ts +10 -0
- package/esm/models/get-post-error-code.d.ts.map +1 -0
- package/esm/models/get-post-error-code.js +11 -0
- package/esm/models/get-post-error-code.js.map +1 -0
- package/esm/models/health-response.d.ts +2 -2
- package/esm/models/health-response.d.ts.map +1 -1
- package/esm/models/health-response.js +1 -1
- package/esm/models/health-response.js.map +1 -1
- package/esm/models/index.d.ts +37 -34
- package/esm/models/index.d.ts.map +1 -1
- package/esm/models/index.js +37 -34
- package/esm/models/index.js.map +1 -1
- package/esm/models/instagram-input.d.ts +31 -0
- package/esm/models/instagram-input.d.ts.map +1 -0
- package/esm/models/instagram-input.js +17 -0
- package/esm/models/instagram-input.js.map +1 -0
- package/esm/models/instagram-post.d.ts +42 -0
- package/esm/models/instagram-post.d.ts.map +1 -0
- package/esm/models/instagram-post.js +25 -0
- package/esm/models/instagram-post.js.map +1 -0
- package/esm/models/linked-in-input.d.ts +28 -0
- package/esm/models/linked-in-input.d.ts.map +1 -0
- package/esm/models/linked-in-input.js +15 -0
- package/esm/models/linked-in-input.js.map +1 -0
- package/esm/models/linked-in-pages-input.d.ts +28 -0
- package/esm/models/linked-in-pages-input.d.ts.map +1 -0
- package/esm/models/linked-in-pages-input.js +15 -0
- package/esm/models/linked-in-pages-input.js.map +1 -0
- package/esm/models/linked-in-pages-post.d.ts +40 -0
- package/esm/models/linked-in-pages-post.d.ts.map +1 -0
- package/esm/models/linked-in-pages-post.js +23 -0
- package/esm/models/linked-in-pages-post.js.map +1 -0
- package/esm/models/linked-in-post.d.ts +40 -0
- package/esm/models/linked-in-post.d.ts.map +1 -0
- package/esm/models/linked-in-post.js +23 -0
- package/esm/models/linked-in-post.js.map +1 -0
- package/esm/models/media-library-post-content-media-input.d.ts +17 -0
- package/esm/models/media-library-post-content-media-input.d.ts.map +1 -0
- package/esm/models/media-library-post-content-media-input.js +13 -0
- package/esm/models/media-library-post-content-media-input.js.map +1 -0
- package/esm/models/media-library-post-content-media.d.ts +31 -0
- package/esm/models/media-library-post-content-media.d.ts.map +1 -0
- package/esm/models/media-library-post-content-media.js +25 -0
- package/esm/models/media-library-post-content-media.js.map +1 -0
- package/esm/models/operations/delete-post.d.ts +15 -0
- package/esm/models/operations/delete-post.d.ts.map +1 -0
- package/esm/models/operations/delete-post.js +12 -0
- package/esm/models/operations/delete-post.js.map +1 -0
- package/esm/models/operations/get-post.d.ts +15 -0
- package/esm/models/operations/get-post.d.ts.map +1 -0
- package/esm/models/operations/get-post.js +12 -0
- package/esm/models/operations/get-post.js.map +1 -0
- package/esm/models/operations/index.d.ts +2 -0
- package/esm/models/operations/index.d.ts.map +1 -1
- package/esm/models/operations/index.js +2 -0
- package/esm/models/operations/index.js.map +1 -1
- package/esm/models/pinterest-input.d.ts +30 -0
- package/esm/models/pinterest-input.d.ts.map +1 -0
- package/esm/models/pinterest-input.js +16 -0
- package/esm/models/pinterest-input.js.map +1 -0
- package/esm/models/pinterest-post.d.ts +41 -0
- package/esm/models/pinterest-post.d.ts.map +1 -0
- package/esm/models/pinterest-post.js +24 -0
- package/esm/models/pinterest-post.js.map +1 -0
- package/esm/models/pinterest-social-account-platform-specific-inputs.d.ts +10 -2
- package/esm/models/pinterest-social-account-platform-specific-inputs.d.ts.map +1 -1
- package/esm/models/pinterest-social-account-platform-specific-inputs.js +2 -2
- package/esm/models/pinterest-social-account-platform-specific-inputs.js.map +1 -1
- package/esm/models/post-content-item-input.d.ts +18 -0
- package/esm/models/post-content-item-input.d.ts.map +1 -0
- package/esm/models/post-content-item-input.js +14 -0
- package/esm/models/post-content-item-input.js.map +1 -0
- package/esm/models/post-content-item.d.ts +15 -0
- package/esm/models/post-content-item.d.ts.map +1 -0
- package/esm/models/post-content-item.js +16 -0
- package/esm/models/post-content-item.js.map +1 -0
- package/esm/models/post-content-media-input.d.ts +14 -0
- package/esm/models/post-content-media-input.d.ts.map +1 -0
- package/esm/models/post-content-media-input.js +10 -0
- package/esm/models/post-content-media-input.js.map +1 -0
- package/esm/models/post-content-media.d.ts +14 -0
- package/esm/models/post-content-media.d.ts.map +1 -0
- package/esm/models/post-content-media.js +11 -0
- package/esm/models/post-content-media.js.map +1 -0
- package/esm/models/post-schedule.d.ts +17 -0
- package/esm/models/post-schedule.d.ts.map +1 -0
- package/esm/models/post-schedule.js +28 -0
- package/esm/models/post-schedule.js.map +1 -0
- package/esm/models/post.d.ts +14 -44
- package/esm/models/post.d.ts.map +1 -1
- package/esm/models/post.js +8 -18
- package/esm/models/post.js.map +1 -1
- package/esm/models/publish-now-post-schedule.d.ts +17 -0
- package/esm/models/publish-now-post-schedule.d.ts.map +1 -0
- package/esm/models/publish-now-post-schedule.js +21 -0
- package/esm/models/publish-now-post-schedule.js.map +1 -0
- package/esm/models/schedule-for-later-post-schedule.d.ts +22 -0
- package/esm/models/schedule-for-later-post-schedule.d.ts.map +1 -0
- package/esm/models/schedule-for-later-post-schedule.js +23 -0
- package/esm/models/schedule-for-later-post-schedule.js.map +1 -0
- package/esm/models/social-account-platform-inputs.d.ts +0 -5
- package/esm/models/social-account-platform-inputs.d.ts.map +1 -1
- package/esm/models/social-account-platform-inputs.js +0 -2
- package/esm/models/social-account-platform-inputs.js.map +1 -1
- package/esm/models/social-account-post.d.ts +17 -0
- package/esm/models/social-account-post.d.ts.map +1 -0
- package/esm/models/social-account-post.js +28 -0
- package/esm/models/social-account-post.js.map +1 -0
- package/esm/models/social-account-target-input.d.ts +16 -0
- package/esm/models/social-account-target-input.d.ts.map +1 -0
- package/esm/models/social-account-target-input.js +27 -0
- package/esm/models/social-account-target-input.js.map +1 -0
- package/esm/models/tik-tok-input.d.ts +90 -0
- package/esm/models/tik-tok-input.d.ts.map +1 -0
- package/esm/models/tik-tok-input.js +26 -0
- package/esm/models/tik-tok-input.js.map +1 -0
- package/esm/models/tik-tok-post.d.ts +93 -0
- package/esm/models/tik-tok-post.d.ts.map +1 -0
- package/esm/models/tik-tok-post.js +35 -0
- package/esm/models/tik-tok-post.js.map +1 -0
- package/esm/models/tik-tok-social-account-platform-specific-inputs.d.ts +26 -2
- package/esm/models/tik-tok-social-account-platform-specific-inputs.d.ts.map +1 -1
- package/esm/models/tik-tok-social-account-platform-specific-inputs.js +6 -2
- package/esm/models/tik-tok-social-account-platform-specific-inputs.js.map +1 -1
- package/esm/models/upload-session-aborted-status.d.ts +14 -0
- package/esm/models/upload-session-aborted-status.d.ts.map +1 -0
- package/esm/models/upload-session-aborted-status.js +15 -0
- package/esm/models/upload-session-aborted-status.js.map +1 -0
- package/esm/models/upload-session-failed-status.d.ts +22 -0
- package/esm/models/upload-session-failed-status.d.ts.map +1 -0
- package/esm/models/upload-session-failed-status.js +17 -0
- package/esm/models/upload-session-failed-status.js.map +1 -0
- package/esm/models/upload-session-initiated-status.d.ts +14 -0
- package/esm/models/upload-session-initiated-status.d.ts.map +1 -0
- package/esm/models/upload-session-initiated-status.js +15 -0
- package/esm/models/upload-session-initiated-status.js.map +1 -0
- package/esm/models/upload-session-ready-status.d.ts +18 -0
- package/esm/models/upload-session-ready-status.d.ts.map +1 -0
- package/esm/models/upload-session-ready-status.js +16 -0
- package/esm/models/upload-session-ready-status.js.map +1 -0
- package/esm/models/upload-session-status.d.ts +7 -11
- package/esm/models/upload-session-status.d.ts.map +1 -1
- package/esm/models/upload-session-status.js +12 -9
- package/esm/models/upload-session-status.js.map +1 -1
- package/esm/models/upload-session-uploaded-status.d.ts +14 -0
- package/esm/models/upload-session-uploaded-status.d.ts.map +1 -0
- package/esm/models/upload-session-uploaded-status.js +15 -0
- package/esm/models/upload-session-uploaded-status.js.map +1 -0
- package/esm/models/validation-error.d.ts +4 -2
- package/esm/models/validation-error.d.ts.map +1 -1
- package/esm/models/validation-error.js +1 -2
- package/esm/models/validation-error.js.map +1 -1
- package/esm/models/x-input.d.ts +28 -0
- package/esm/models/x-input.d.ts.map +1 -0
- package/esm/models/x-input.js +16 -0
- package/esm/models/x-input.js.map +1 -0
- package/esm/models/x-post.d.ts +40 -0
- package/esm/models/x-post.d.ts.map +1 -0
- package/esm/models/x-post.js +23 -0
- package/esm/models/x-post.js.map +1 -0
- package/esm/models/you-tube-input.d.ts +37 -0
- package/esm/models/you-tube-input.d.ts.map +1 -0
- package/esm/models/you-tube-input.js +20 -0
- package/esm/models/you-tube-input.js.map +1 -0
- package/esm/models/you-tube-post.d.ts +45 -0
- package/esm/models/you-tube-post.d.ts.map +1 -0
- package/esm/models/you-tube-post.js +29 -0
- package/esm/models/you-tube-post.js.map +1 -0
- package/esm/sdk/posts.d.ts +15 -27
- package/esm/sdk/posts.d.ts.map +1 -1
- package/esm/sdk/posts.js +20 -36
- package/esm/sdk/posts.js.map +1 -1
- package/esm/sdk/social-accounts.d.ts +2 -1
- package/esm/sdk/social-accounts.d.ts.map +1 -1
- package/esm/sdk/social-accounts.js +2 -1
- package/esm/sdk/social-accounts.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +3 -3
- package/src/funcs/{posts-delete-posts.ts → posts-create-post.ts} +27 -16
- package/src/funcs/{posts-create-posts.ts → posts-delete-post.ts} +36 -24
- package/src/funcs/{posts-list-posts.ts → posts-get-post.ts} +34 -21
- package/src/funcs/social-accounts-get-social-account-platform-inputs.ts +2 -1
- package/src/lib/config.ts +2 -2
- package/src/models/{create-post-failure-code.ts → create-post-error-code.ts} +8 -7
- package/src/models/create-post-request.ts +67 -0
- package/src/models/{delete-post-failure-code.ts → delete-post-error-code.ts} +5 -5
- package/src/models/delivery-status.ts +0 -5
- package/src/models/draft-post-schedule.ts +50 -0
- package/src/models/errors/create-post-error-response.ts +89 -0
- package/src/models/errors/delete-post-error-response.ts +53 -0
- package/src/models/errors/get-post-error-response.ts +53 -0
- package/src/models/errors/index.ts +3 -0
- package/src/models/facebook-input.ts +58 -0
- package/src/models/facebook-post.ts +80 -0
- package/src/models/get-post-error-code.ts +19 -0
- package/src/models/health-response.ts +3 -3
- package/src/models/index.ts +37 -34
- package/src/models/instagram-input.ts +55 -0
- package/src/models/instagram-post.ts +80 -0
- package/src/models/linked-in-input.ts +48 -0
- package/src/models/linked-in-pages-input.ts +52 -0
- package/src/models/linked-in-pages-post.ts +74 -0
- package/src/models/linked-in-post.ts +72 -0
- package/src/models/media-library-post-content-media-input.ts +38 -0
- package/src/models/media-library-post-content-media.ts +60 -0
- package/src/models/operations/delete-post.ts +33 -0
- package/src/models/operations/get-post.ts +29 -0
- package/src/models/operations/index.ts +2 -0
- package/src/models/pinterest-input.ts +51 -0
- package/src/models/pinterest-post.ts +76 -0
- package/src/models/pinterest-social-account-platform-specific-inputs.ts +13 -5
- package/src/models/post-content-item-input.ts +41 -0
- package/src/models/post-content-item.ts +40 -0
- package/src/models/post-content-media-input.ts +35 -0
- package/src/models/post-content-media.ts +35 -0
- package/src/models/post-schedule.ts +70 -0
- package/src/models/post.ts +23 -65
- package/src/models/publish-now-post-schedule.ts +50 -0
- package/src/models/schedule-for-later-post-schedule.ts +59 -0
- package/src/models/social-account-platform-inputs.ts +0 -9
- package/src/models/social-account-post.ts +63 -0
- package/src/models/social-account-target-input.ts +85 -0
- package/src/models/tik-tok-input.ts +125 -0
- package/src/models/tik-tok-post.ts +140 -0
- package/src/models/tik-tok-social-account-platform-specific-inputs.ts +33 -5
- package/src/models/upload-session-aborted-status.ts +36 -0
- package/src/models/upload-session-failed-status.ts +46 -0
- package/src/models/upload-session-initiated-status.ts +36 -0
- package/src/models/upload-session-ready-status.ts +41 -0
- package/src/models/upload-session-status.ts +34 -20
- package/src/models/upload-session-uploaded-status.ts +36 -0
- package/src/models/validation-error.ts +5 -6
- package/src/models/x-input.ts +46 -0
- package/src/models/x-post.ts +71 -0
- package/src/models/you-tube-input.ts +64 -0
- package/src/models/you-tube-post.ts +84 -0
- package/src/sdk/posts.ts +27 -50
- package/src/sdk/social-accounts.ts +2 -1
- package/src/funcs/posts-update-posts.ts +0 -165
- package/src/models/create-post-failure-result.ts +0 -68
- package/src/models/create-post-item.ts +0 -73
- package/src/models/create-post-result.ts +0 -42
- package/src/models/create-post-success-result.ts +0 -50
- package/src/models/create-posts-response.ts +0 -37
- package/src/models/delete-post-failure-result.ts +0 -44
- package/src/models/delete-post-result.ts +0 -42
- package/src/models/delete-post-success-result.ts +0 -36
- package/src/models/delete-posts-response.ts +0 -37
- package/src/models/facebook-specifics.ts +0 -63
- package/src/models/instagram-specifics.ts +0 -59
- package/src/models/linked-in-pages-specifics.ts +0 -50
- package/src/models/linked-in-specifics.ts +0 -50
- package/src/models/list-posts-request.ts +0 -68
- package/src/models/list-posts-response.ts +0 -37
- package/src/models/pinterest-account-platform-inputs.ts +0 -42
- package/src/models/pinterest-specifics.ts +0 -54
- package/src/models/platform-specifics.ts +0 -129
- package/src/models/post-media.ts +0 -56
- package/src/models/tik-tok-account-platform-inputs.ts +0 -63
- package/src/models/tik-tok-specifics.ts +0 -94
- package/src/models/update-post-failure-code.ts +0 -23
- package/src/models/update-post-failure-result.ts +0 -68
- package/src/models/update-post-item.ts +0 -61
- package/src/models/update-post-result.ts +0 -42
- package/src/models/update-post-success-result.ts +0 -45
- package/src/models/update-posts-response.ts +0 -37
- package/src/models/upload-session-status-value.ts +0 -24
- package/src/models/validation-field.ts +0 -29
- package/src/models/validation-warning.ts +0 -37
- package/src/models/x-specifics.ts +0 -44
- package/src/models/you-tube-specifics.ts +0 -71
|
@@ -0,0 +1,53 @@
|
|
|
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 types from "../../types/primitives.js";
|
|
7
|
+
import * as models from "../index.js";
|
|
8
|
+
import { WoopSocialError } from "./woop-social-error.js";
|
|
9
|
+
|
|
10
|
+
export type GetPostErrorResponseData = {
|
|
11
|
+
code: models.GetPostErrorCode;
|
|
12
|
+
message: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export class GetPostErrorResponse extends WoopSocialError {
|
|
16
|
+
code: models.GetPostErrorCode;
|
|
17
|
+
|
|
18
|
+
/** The original data that was passed to this error instance. */
|
|
19
|
+
data$: GetPostErrorResponseData;
|
|
20
|
+
|
|
21
|
+
constructor(
|
|
22
|
+
err: GetPostErrorResponseData,
|
|
23
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
24
|
+
) {
|
|
25
|
+
const message = err.message || `API error occurred: ${JSON.stringify(err)}`;
|
|
26
|
+
super(message, httpMeta);
|
|
27
|
+
this.data$ = err;
|
|
28
|
+
this.code = err.code;
|
|
29
|
+
|
|
30
|
+
this.name = "GetPostErrorResponse";
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const GetPostErrorResponse$inboundSchema: z.ZodMiniType<
|
|
36
|
+
GetPostErrorResponse,
|
|
37
|
+
unknown
|
|
38
|
+
> = z.pipe(
|
|
39
|
+
z.object({
|
|
40
|
+
code: models.GetPostErrorCode$inboundSchema,
|
|
41
|
+
message: types.string(),
|
|
42
|
+
request$: z.custom<Request>(x => x instanceof Request),
|
|
43
|
+
response$: z.custom<Response>(x => x instanceof Response),
|
|
44
|
+
body$: z.string(),
|
|
45
|
+
}),
|
|
46
|
+
z.transform((v) => {
|
|
47
|
+
return new GetPostErrorResponse(v, {
|
|
48
|
+
request: v.request$,
|
|
49
|
+
response: v.response$,
|
|
50
|
+
body: v.body$,
|
|
51
|
+
});
|
|
52
|
+
}),
|
|
53
|
+
);
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
export * from "./create-post-error-response.js";
|
|
6
|
+
export * from "./delete-post-error-response.js";
|
|
7
|
+
export * from "./get-post-error-response.js";
|
|
5
8
|
export * from "./http-client-errors.js";
|
|
6
9
|
export * from "./response-validation-error.js";
|
|
7
10
|
export * from "./sdk-validation-error.js";
|
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
FacebookPostType,
|
|
8
|
+
FacebookPostType$outboundSchema,
|
|
9
|
+
} from "./facebook-post-type.js";
|
|
10
|
+
import {
|
|
11
|
+
PostContentItemInput,
|
|
12
|
+
PostContentItemInput$Outbound,
|
|
13
|
+
PostContentItemInput$outboundSchema,
|
|
14
|
+
} from "./post-content-item-input.js";
|
|
15
|
+
|
|
16
|
+
export type FacebookInput = {
|
|
17
|
+
platform: "FACEBOOK";
|
|
18
|
+
/**
|
|
19
|
+
* Connected social account identifier.
|
|
20
|
+
*/
|
|
21
|
+
socialAccountId: string;
|
|
22
|
+
/**
|
|
23
|
+
* Post content expressed as thread items.
|
|
24
|
+
*
|
|
25
|
+
* @remarks
|
|
26
|
+
*
|
|
27
|
+
* The array exists for future thread support. Currently exactly one item
|
|
28
|
+
* is supported.
|
|
29
|
+
*/
|
|
30
|
+
contentOverride?: Array<PostContentItemInput> | undefined;
|
|
31
|
+
link?: string | undefined;
|
|
32
|
+
postType: FacebookPostType;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/** @internal */
|
|
36
|
+
export type FacebookInput$Outbound = {
|
|
37
|
+
platform: "FACEBOOK";
|
|
38
|
+
socialAccountId: string;
|
|
39
|
+
contentOverride?: Array<PostContentItemInput$Outbound> | undefined;
|
|
40
|
+
link?: string | undefined;
|
|
41
|
+
postType: string;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export const FacebookInput$outboundSchema: z.ZodMiniType<
|
|
46
|
+
FacebookInput$Outbound,
|
|
47
|
+
FacebookInput
|
|
48
|
+
> = z.object({
|
|
49
|
+
platform: z.literal("FACEBOOK"),
|
|
50
|
+
socialAccountId: z.string(),
|
|
51
|
+
contentOverride: z.optional(z.array(PostContentItemInput$outboundSchema)),
|
|
52
|
+
link: z.optional(z.string()),
|
|
53
|
+
postType: FacebookPostType$outboundSchema,
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
export function facebookInputToJSON(facebookInput: FacebookInput): string {
|
|
57
|
+
return JSON.stringify(FacebookInput$outboundSchema.parse(facebookInput));
|
|
58
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
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
|
+
DeliveryStatus,
|
|
11
|
+
DeliveryStatus$inboundSchema,
|
|
12
|
+
} from "./delivery-status.js";
|
|
13
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
14
|
+
import {
|
|
15
|
+
FacebookPostType,
|
|
16
|
+
FacebookPostType$inboundSchema,
|
|
17
|
+
} from "./facebook-post-type.js";
|
|
18
|
+
import {
|
|
19
|
+
PostContentItem,
|
|
20
|
+
PostContentItem$inboundSchema,
|
|
21
|
+
} from "./post-content-item.js";
|
|
22
|
+
|
|
23
|
+
export type FacebookPost = {
|
|
24
|
+
platform: "FACEBOOK";
|
|
25
|
+
/**
|
|
26
|
+
* Connected social account identifier.
|
|
27
|
+
*/
|
|
28
|
+
socialAccountId: string;
|
|
29
|
+
/**
|
|
30
|
+
* Delivery lifecycle status for a post.
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
*
|
|
34
|
+
* `NOT_STARTED`: The post exists and is scheduled, but delivery has not started yet.
|
|
35
|
+
* `SENDING`: Delivery is currently in progress.
|
|
36
|
+
* `SENT`: Delivery completed successfully.
|
|
37
|
+
* `FAILED`: Delivery completed unsuccessfully.
|
|
38
|
+
*/
|
|
39
|
+
deliveryStatus: DeliveryStatus;
|
|
40
|
+
/**
|
|
41
|
+
* Post content expressed as thread items.
|
|
42
|
+
*
|
|
43
|
+
* @remarks
|
|
44
|
+
*
|
|
45
|
+
* The array exists for future thread support. Currently exactly one item
|
|
46
|
+
* is returned.
|
|
47
|
+
*/
|
|
48
|
+
contentOverride?: Array<PostContentItem> | undefined;
|
|
49
|
+
sentAt?: Date | undefined;
|
|
50
|
+
externalPostId?: string | undefined;
|
|
51
|
+
externalPostUrl?: string | undefined;
|
|
52
|
+
errorMessage?: string | undefined;
|
|
53
|
+
link?: string | undefined;
|
|
54
|
+
postType: FacebookPostType;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
export const FacebookPost$inboundSchema: z.ZodMiniType<FacebookPost, unknown> =
|
|
59
|
+
z.object({
|
|
60
|
+
platform: types.literal("FACEBOOK"),
|
|
61
|
+
socialAccountId: types.string(),
|
|
62
|
+
deliveryStatus: DeliveryStatus$inboundSchema,
|
|
63
|
+
contentOverride: types.optional(z.array(PostContentItem$inboundSchema)),
|
|
64
|
+
sentAt: types.optional(types.date()),
|
|
65
|
+
externalPostId: types.optional(types.string()),
|
|
66
|
+
externalPostUrl: types.optional(types.string()),
|
|
67
|
+
errorMessage: types.optional(types.string()),
|
|
68
|
+
link: types.optional(types.string()),
|
|
69
|
+
postType: FacebookPostType$inboundSchema,
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
export function facebookPostFromJSON(
|
|
73
|
+
jsonString: string,
|
|
74
|
+
): SafeParseResult<FacebookPost, SDKValidationError> {
|
|
75
|
+
return safeParse(
|
|
76
|
+
jsonString,
|
|
77
|
+
(x) => FacebookPost$inboundSchema.parse(JSON.parse(x)),
|
|
78
|
+
`Failed to parse 'FacebookPost' from JSON`,
|
|
79
|
+
);
|
|
80
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
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 GetPostErrorCode = {
|
|
10
|
+
PostNotFound: "POST_NOT_FOUND",
|
|
11
|
+
InternalError: "INTERNAL_ERROR",
|
|
12
|
+
} as const;
|
|
13
|
+
export type GetPostErrorCode = OpenEnum<typeof GetPostErrorCode>;
|
|
14
|
+
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const GetPostErrorCode$inboundSchema: z.ZodMiniType<
|
|
17
|
+
GetPostErrorCode,
|
|
18
|
+
unknown
|
|
19
|
+
> = openEnums.inboundSchema(GetPostErrorCode);
|
|
@@ -14,9 +14,9 @@ export type HealthResponse = {
|
|
|
14
14
|
*/
|
|
15
15
|
message: string;
|
|
16
16
|
/**
|
|
17
|
-
* Current server time in UTC with millisecond precision.
|
|
17
|
+
* Current server time in UTC (ISO 8601) with millisecond precision.
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
timestamp: Date;
|
|
20
20
|
/**
|
|
21
21
|
* API version that produced the response.
|
|
22
22
|
*/
|
|
@@ -29,7 +29,7 @@ export const HealthResponse$inboundSchema: z.ZodMiniType<
|
|
|
29
29
|
unknown
|
|
30
30
|
> = z.object({
|
|
31
31
|
message: types.string(),
|
|
32
|
-
|
|
32
|
+
timestamp: types.date(),
|
|
33
33
|
version: types.string(),
|
|
34
34
|
});
|
|
35
35
|
|
package/src/models/index.ts
CHANGED
|
@@ -5,60 +5,63 @@
|
|
|
5
5
|
export * from "./create-media-response.js";
|
|
6
6
|
export * from "./create-o-auth-authorization-request.js";
|
|
7
7
|
export * from "./create-o-auth-authorization-response.js";
|
|
8
|
-
export * from "./create-post-
|
|
9
|
-
export * from "./create-post-
|
|
10
|
-
export * from "./create-post-item.js";
|
|
11
|
-
export * from "./create-post-result.js";
|
|
12
|
-
export * from "./create-post-success-result.js";
|
|
13
|
-
export * from "./create-posts-response.js";
|
|
8
|
+
export * from "./create-post-error-code.js";
|
|
9
|
+
export * from "./create-post-request.js";
|
|
14
10
|
export * from "./create-upload-session-request.js";
|
|
15
|
-
export * from "./delete-post-
|
|
16
|
-
export * from "./delete-post-failure-result.js";
|
|
17
|
-
export * from "./delete-post-result.js";
|
|
18
|
-
export * from "./delete-post-success-result.js";
|
|
19
|
-
export * from "./delete-posts-response.js";
|
|
11
|
+
export * from "./delete-post-error-code.js";
|
|
20
12
|
export * from "./delivery-status.js";
|
|
13
|
+
export * from "./draft-post-schedule.js";
|
|
14
|
+
export * from "./facebook-input.js";
|
|
21
15
|
export * from "./facebook-post-type.js";
|
|
22
|
-
export * from "./facebook-
|
|
16
|
+
export * from "./facebook-post.js";
|
|
17
|
+
export * from "./get-post-error-code.js";
|
|
23
18
|
export * from "./health-response.js";
|
|
19
|
+
export * from "./instagram-input.js";
|
|
24
20
|
export * from "./instagram-post-type.js";
|
|
25
|
-
export * from "./instagram-
|
|
26
|
-
export * from "./linked-in-
|
|
27
|
-
export * from "./linked-in-
|
|
28
|
-
export * from "./
|
|
29
|
-
export * from "./
|
|
30
|
-
export * from "./
|
|
21
|
+
export * from "./instagram-post.js";
|
|
22
|
+
export * from "./linked-in-input.js";
|
|
23
|
+
export * from "./linked-in-pages-input.js";
|
|
24
|
+
export * from "./linked-in-pages-post.js";
|
|
25
|
+
export * from "./linked-in-post.js";
|
|
26
|
+
export * from "./media-library-post-content-media-input.js";
|
|
27
|
+
export * from "./media-library-post-content-media.js";
|
|
31
28
|
export * from "./pinterest-board-option.js";
|
|
29
|
+
export * from "./pinterest-input.js";
|
|
30
|
+
export * from "./pinterest-post.js";
|
|
32
31
|
export * from "./pinterest-social-account-platform-specific-inputs.js";
|
|
33
|
-
export * from "./
|
|
34
|
-
export * from "./
|
|
35
|
-
export * from "./post-media.js";
|
|
32
|
+
export * from "./post-content-item-input.js";
|
|
33
|
+
export * from "./post-content-item.js";
|
|
34
|
+
export * from "./post-content-media-input.js";
|
|
35
|
+
export * from "./post-content-media.js";
|
|
36
|
+
export * from "./post-schedule.js";
|
|
36
37
|
export * from "./post.js";
|
|
37
38
|
export * from "./project.js";
|
|
39
|
+
export * from "./publish-now-post-schedule.js";
|
|
40
|
+
export * from "./schedule-for-later-post-schedule.js";
|
|
38
41
|
export * from "./security.js";
|
|
39
42
|
export * from "./social-account-platform-inputs.js";
|
|
40
43
|
export * from "./social-account-platform-specific-inputs.js";
|
|
44
|
+
export * from "./social-account-post.js";
|
|
41
45
|
export * from "./social-account-status.js";
|
|
46
|
+
export * from "./social-account-target-input.js";
|
|
42
47
|
export * from "./social-account.js";
|
|
43
48
|
export * from "./social-platform.js";
|
|
44
|
-
export * from "./tik-tok-
|
|
49
|
+
export * from "./tik-tok-input.js";
|
|
45
50
|
export * from "./tik-tok-post-type.js";
|
|
51
|
+
export * from "./tik-tok-post.js";
|
|
46
52
|
export * from "./tik-tok-privacy-level.js";
|
|
47
53
|
export * from "./tik-tok-social-account-platform-specific-inputs.js";
|
|
48
|
-
export * from "./
|
|
49
|
-
export * from "./
|
|
50
|
-
export * from "./
|
|
51
|
-
export * from "./update-post-item.js";
|
|
52
|
-
export * from "./update-post-result.js";
|
|
53
|
-
export * from "./update-post-success-result.js";
|
|
54
|
-
export * from "./update-posts-response.js";
|
|
54
|
+
export * from "./upload-session-aborted-status.js";
|
|
55
|
+
export * from "./upload-session-failed-status.js";
|
|
56
|
+
export * from "./upload-session-initiated-status.js";
|
|
55
57
|
export * from "./upload-session-part.js";
|
|
56
|
-
export * from "./upload-session-status
|
|
58
|
+
export * from "./upload-session-ready-status.js";
|
|
57
59
|
export * from "./upload-session-status.js";
|
|
60
|
+
export * from "./upload-session-uploaded-status.js";
|
|
58
61
|
export * from "./upload-session.js";
|
|
59
62
|
export * from "./validation-error.js";
|
|
60
|
-
export * from "./
|
|
61
|
-
export * from "./
|
|
62
|
-
export * from "./
|
|
63
|
+
export * from "./x-input.js";
|
|
64
|
+
export * from "./x-post.js";
|
|
65
|
+
export * from "./you-tube-input.js";
|
|
66
|
+
export * from "./you-tube-post.js";
|
|
63
67
|
export * from "./you-tube-privacy.js";
|
|
64
|
-
export * from "./you-tube-specifics.js";
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
InstagramPostType,
|
|
8
|
+
InstagramPostType$outboundSchema,
|
|
9
|
+
} from "./instagram-post-type.js";
|
|
10
|
+
import {
|
|
11
|
+
PostContentItemInput,
|
|
12
|
+
PostContentItemInput$Outbound,
|
|
13
|
+
PostContentItemInput$outboundSchema,
|
|
14
|
+
} from "./post-content-item-input.js";
|
|
15
|
+
|
|
16
|
+
export type InstagramInput = {
|
|
17
|
+
platform: "INSTAGRAM";
|
|
18
|
+
/**
|
|
19
|
+
* Connected social account identifier.
|
|
20
|
+
*/
|
|
21
|
+
socialAccountId: string;
|
|
22
|
+
/**
|
|
23
|
+
* Post content expressed as thread items.
|
|
24
|
+
*
|
|
25
|
+
* @remarks
|
|
26
|
+
*
|
|
27
|
+
* The array exists for future thread support. Currently exactly one item
|
|
28
|
+
* is supported.
|
|
29
|
+
*/
|
|
30
|
+
contentOverride?: Array<PostContentItemInput> | undefined;
|
|
31
|
+
postType: InstagramPostType;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export type InstagramInput$Outbound = {
|
|
36
|
+
platform: "INSTAGRAM";
|
|
37
|
+
socialAccountId: string;
|
|
38
|
+
contentOverride?: Array<PostContentItemInput$Outbound> | undefined;
|
|
39
|
+
postType: string;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const InstagramInput$outboundSchema: z.ZodMiniType<
|
|
44
|
+
InstagramInput$Outbound,
|
|
45
|
+
InstagramInput
|
|
46
|
+
> = z.object({
|
|
47
|
+
platform: z.literal("INSTAGRAM"),
|
|
48
|
+
socialAccountId: z.string(),
|
|
49
|
+
contentOverride: z.optional(z.array(PostContentItemInput$outboundSchema)),
|
|
50
|
+
postType: InstagramPostType$outboundSchema,
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
export function instagramInputToJSON(instagramInput: InstagramInput): string {
|
|
54
|
+
return JSON.stringify(InstagramInput$outboundSchema.parse(instagramInput));
|
|
55
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
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
|
+
DeliveryStatus,
|
|
11
|
+
DeliveryStatus$inboundSchema,
|
|
12
|
+
} from "./delivery-status.js";
|
|
13
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
14
|
+
import {
|
|
15
|
+
InstagramPostType,
|
|
16
|
+
InstagramPostType$inboundSchema,
|
|
17
|
+
} from "./instagram-post-type.js";
|
|
18
|
+
import {
|
|
19
|
+
PostContentItem,
|
|
20
|
+
PostContentItem$inboundSchema,
|
|
21
|
+
} from "./post-content-item.js";
|
|
22
|
+
|
|
23
|
+
export type InstagramPost = {
|
|
24
|
+
platform: "INSTAGRAM";
|
|
25
|
+
/**
|
|
26
|
+
* Connected social account identifier.
|
|
27
|
+
*/
|
|
28
|
+
socialAccountId: string;
|
|
29
|
+
/**
|
|
30
|
+
* Delivery lifecycle status for a post.
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
*
|
|
34
|
+
* `NOT_STARTED`: The post exists and is scheduled, but delivery has not started yet.
|
|
35
|
+
* `SENDING`: Delivery is currently in progress.
|
|
36
|
+
* `SENT`: Delivery completed successfully.
|
|
37
|
+
* `FAILED`: Delivery completed unsuccessfully.
|
|
38
|
+
*/
|
|
39
|
+
deliveryStatus: DeliveryStatus;
|
|
40
|
+
/**
|
|
41
|
+
* Post content expressed as thread items.
|
|
42
|
+
*
|
|
43
|
+
* @remarks
|
|
44
|
+
*
|
|
45
|
+
* The array exists for future thread support. Currently exactly one item
|
|
46
|
+
* is returned.
|
|
47
|
+
*/
|
|
48
|
+
contentOverride?: Array<PostContentItem> | undefined;
|
|
49
|
+
sentAt?: Date | undefined;
|
|
50
|
+
externalPostId?: string | undefined;
|
|
51
|
+
externalPostUrl?: string | undefined;
|
|
52
|
+
errorMessage?: string | undefined;
|
|
53
|
+
postType: InstagramPostType;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/** @internal */
|
|
57
|
+
export const InstagramPost$inboundSchema: z.ZodMiniType<
|
|
58
|
+
InstagramPost,
|
|
59
|
+
unknown
|
|
60
|
+
> = z.object({
|
|
61
|
+
platform: types.literal("INSTAGRAM"),
|
|
62
|
+
socialAccountId: types.string(),
|
|
63
|
+
deliveryStatus: DeliveryStatus$inboundSchema,
|
|
64
|
+
contentOverride: types.optional(z.array(PostContentItem$inboundSchema)),
|
|
65
|
+
sentAt: types.optional(types.date()),
|
|
66
|
+
externalPostId: types.optional(types.string()),
|
|
67
|
+
externalPostUrl: types.optional(types.string()),
|
|
68
|
+
errorMessage: types.optional(types.string()),
|
|
69
|
+
postType: InstagramPostType$inboundSchema,
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
export function instagramPostFromJSON(
|
|
73
|
+
jsonString: string,
|
|
74
|
+
): SafeParseResult<InstagramPost, SDKValidationError> {
|
|
75
|
+
return safeParse(
|
|
76
|
+
jsonString,
|
|
77
|
+
(x) => InstagramPost$inboundSchema.parse(JSON.parse(x)),
|
|
78
|
+
`Failed to parse 'InstagramPost' from JSON`,
|
|
79
|
+
);
|
|
80
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
PostContentItemInput,
|
|
8
|
+
PostContentItemInput$Outbound,
|
|
9
|
+
PostContentItemInput$outboundSchema,
|
|
10
|
+
} from "./post-content-item-input.js";
|
|
11
|
+
|
|
12
|
+
export type LinkedInInput = {
|
|
13
|
+
platform: "LINKEDIN";
|
|
14
|
+
/**
|
|
15
|
+
* Connected social account identifier.
|
|
16
|
+
*/
|
|
17
|
+
socialAccountId: string;
|
|
18
|
+
/**
|
|
19
|
+
* Post content expressed as thread items.
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
*
|
|
23
|
+
* The array exists for future thread support. Currently exactly one item
|
|
24
|
+
* is supported.
|
|
25
|
+
*/
|
|
26
|
+
contentOverride?: Array<PostContentItemInput> | undefined;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export type LinkedInInput$Outbound = {
|
|
31
|
+
platform: "LINKEDIN";
|
|
32
|
+
socialAccountId: string;
|
|
33
|
+
contentOverride?: Array<PostContentItemInput$Outbound> | undefined;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const LinkedInInput$outboundSchema: z.ZodMiniType<
|
|
38
|
+
LinkedInInput$Outbound,
|
|
39
|
+
LinkedInInput
|
|
40
|
+
> = z.object({
|
|
41
|
+
platform: z.literal("LINKEDIN"),
|
|
42
|
+
socialAccountId: z.string(),
|
|
43
|
+
contentOverride: z.optional(z.array(PostContentItemInput$outboundSchema)),
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
export function linkedInInputToJSON(linkedInInput: LinkedInInput): string {
|
|
47
|
+
return JSON.stringify(LinkedInInput$outboundSchema.parse(linkedInInput));
|
|
48
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
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
|
+
PostContentItemInput,
|
|
8
|
+
PostContentItemInput$Outbound,
|
|
9
|
+
PostContentItemInput$outboundSchema,
|
|
10
|
+
} from "./post-content-item-input.js";
|
|
11
|
+
|
|
12
|
+
export type LinkedInPagesInput = {
|
|
13
|
+
platform: "LINKEDIN_PAGES";
|
|
14
|
+
/**
|
|
15
|
+
* Connected social account identifier.
|
|
16
|
+
*/
|
|
17
|
+
socialAccountId: string;
|
|
18
|
+
/**
|
|
19
|
+
* Post content expressed as thread items.
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
*
|
|
23
|
+
* The array exists for future thread support. Currently exactly one item
|
|
24
|
+
* is supported.
|
|
25
|
+
*/
|
|
26
|
+
contentOverride?: Array<PostContentItemInput> | undefined;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export type LinkedInPagesInput$Outbound = {
|
|
31
|
+
platform: "LINKEDIN_PAGES";
|
|
32
|
+
socialAccountId: string;
|
|
33
|
+
contentOverride?: Array<PostContentItemInput$Outbound> | undefined;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const LinkedInPagesInput$outboundSchema: z.ZodMiniType<
|
|
38
|
+
LinkedInPagesInput$Outbound,
|
|
39
|
+
LinkedInPagesInput
|
|
40
|
+
> = z.object({
|
|
41
|
+
platform: z.literal("LINKEDIN_PAGES"),
|
|
42
|
+
socialAccountId: z.string(),
|
|
43
|
+
contentOverride: z.optional(z.array(PostContentItemInput$outboundSchema)),
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
export function linkedInPagesInputToJSON(
|
|
47
|
+
linkedInPagesInput: LinkedInPagesInput,
|
|
48
|
+
): string {
|
|
49
|
+
return JSON.stringify(
|
|
50
|
+
LinkedInPagesInput$outboundSchema.parse(linkedInPagesInput),
|
|
51
|
+
);
|
|
52
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
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
|
+
DeliveryStatus,
|
|
11
|
+
DeliveryStatus$inboundSchema,
|
|
12
|
+
} from "./delivery-status.js";
|
|
13
|
+
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
14
|
+
import {
|
|
15
|
+
PostContentItem,
|
|
16
|
+
PostContentItem$inboundSchema,
|
|
17
|
+
} from "./post-content-item.js";
|
|
18
|
+
|
|
19
|
+
export type LinkedInPagesPost = {
|
|
20
|
+
platform: "LINKEDIN_PAGES";
|
|
21
|
+
/**
|
|
22
|
+
* Connected social account identifier.
|
|
23
|
+
*/
|
|
24
|
+
socialAccountId: string;
|
|
25
|
+
/**
|
|
26
|
+
* Delivery lifecycle status for a post.
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
*
|
|
30
|
+
* `NOT_STARTED`: The post exists and is scheduled, but delivery has not started yet.
|
|
31
|
+
* `SENDING`: Delivery is currently in progress.
|
|
32
|
+
* `SENT`: Delivery completed successfully.
|
|
33
|
+
* `FAILED`: Delivery completed unsuccessfully.
|
|
34
|
+
*/
|
|
35
|
+
deliveryStatus: DeliveryStatus;
|
|
36
|
+
/**
|
|
37
|
+
* Post content expressed as thread items.
|
|
38
|
+
*
|
|
39
|
+
* @remarks
|
|
40
|
+
*
|
|
41
|
+
* The array exists for future thread support. Currently exactly one item
|
|
42
|
+
* is returned.
|
|
43
|
+
*/
|
|
44
|
+
contentOverride?: Array<PostContentItem> | undefined;
|
|
45
|
+
sentAt?: Date | undefined;
|
|
46
|
+
externalPostId?: string | undefined;
|
|
47
|
+
externalPostUrl?: string | undefined;
|
|
48
|
+
errorMessage?: string | undefined;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/** @internal */
|
|
52
|
+
export const LinkedInPagesPost$inboundSchema: z.ZodMiniType<
|
|
53
|
+
LinkedInPagesPost,
|
|
54
|
+
unknown
|
|
55
|
+
> = z.object({
|
|
56
|
+
platform: types.literal("LINKEDIN_PAGES"),
|
|
57
|
+
socialAccountId: types.string(),
|
|
58
|
+
deliveryStatus: DeliveryStatus$inboundSchema,
|
|
59
|
+
contentOverride: types.optional(z.array(PostContentItem$inboundSchema)),
|
|
60
|
+
sentAt: types.optional(types.date()),
|
|
61
|
+
externalPostId: types.optional(types.string()),
|
|
62
|
+
externalPostUrl: types.optional(types.string()),
|
|
63
|
+
errorMessage: types.optional(types.string()),
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
export function linkedInPagesPostFromJSON(
|
|
67
|
+
jsonString: string,
|
|
68
|
+
): SafeParseResult<LinkedInPagesPost, SDKValidationError> {
|
|
69
|
+
return safeParse(
|
|
70
|
+
jsonString,
|
|
71
|
+
(x) => LinkedInPagesPost$inboundSchema.parse(JSON.parse(x)),
|
|
72
|
+
`Failed to parse 'LinkedInPagesPost' from JSON`,
|
|
73
|
+
);
|
|
74
|
+
}
|