@woopsocial/typescript-sdk 0.0.9 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +1 -1
- 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 +1 -1
- 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 +2 -2
- 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
|
@@ -1,37 +0,0 @@
|
|
|
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 {
|
|
9
|
-
DeletePostResult,
|
|
10
|
-
DeletePostResult$inboundSchema,
|
|
11
|
-
} from "./delete-post-result.js";
|
|
12
|
-
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
13
|
-
|
|
14
|
-
export type DeletePostsResponse = {
|
|
15
|
-
/**
|
|
16
|
-
* Results in the same order as the request items.
|
|
17
|
-
*/
|
|
18
|
-
results: Array<DeletePostResult>;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
/** @internal */
|
|
22
|
-
export const DeletePostsResponse$inboundSchema: z.ZodMiniType<
|
|
23
|
-
DeletePostsResponse,
|
|
24
|
-
unknown
|
|
25
|
-
> = z.object({
|
|
26
|
-
results: z.array(DeletePostResult$inboundSchema),
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
export function deletePostsResponseFromJSON(
|
|
30
|
-
jsonString: string,
|
|
31
|
-
): SafeParseResult<DeletePostsResponse, SDKValidationError> {
|
|
32
|
-
return safeParse(
|
|
33
|
-
jsonString,
|
|
34
|
-
(x) => DeletePostsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
35
|
-
`Failed to parse 'DeletePostsResponse' from JSON`,
|
|
36
|
-
);
|
|
37
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
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
|
-
FacebookPostType,
|
|
12
|
-
FacebookPostType$inboundSchema,
|
|
13
|
-
FacebookPostType$outboundSchema,
|
|
14
|
-
} from "./facebook-post-type.js";
|
|
15
|
-
|
|
16
|
-
export type FacebookSpecifics = {
|
|
17
|
-
platform: "FACEBOOK";
|
|
18
|
-
link?: string | undefined;
|
|
19
|
-
postType: FacebookPostType;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
/** @internal */
|
|
23
|
-
export const FacebookSpecifics$inboundSchema: z.ZodMiniType<
|
|
24
|
-
FacebookSpecifics,
|
|
25
|
-
unknown
|
|
26
|
-
> = z.object({
|
|
27
|
-
platform: types.literal("FACEBOOK"),
|
|
28
|
-
link: types.optional(types.string()),
|
|
29
|
-
postType: FacebookPostType$inboundSchema,
|
|
30
|
-
});
|
|
31
|
-
/** @internal */
|
|
32
|
-
export type FacebookSpecifics$Outbound = {
|
|
33
|
-
platform: "FACEBOOK";
|
|
34
|
-
link?: string | undefined;
|
|
35
|
-
postType: string;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
/** @internal */
|
|
39
|
-
export const FacebookSpecifics$outboundSchema: z.ZodMiniType<
|
|
40
|
-
FacebookSpecifics$Outbound,
|
|
41
|
-
FacebookSpecifics
|
|
42
|
-
> = z.object({
|
|
43
|
-
platform: z.literal("FACEBOOK"),
|
|
44
|
-
link: z.optional(z.string()),
|
|
45
|
-
postType: FacebookPostType$outboundSchema,
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
export function facebookSpecificsToJSON(
|
|
49
|
-
facebookSpecifics: FacebookSpecifics,
|
|
50
|
-
): string {
|
|
51
|
-
return JSON.stringify(
|
|
52
|
-
FacebookSpecifics$outboundSchema.parse(facebookSpecifics),
|
|
53
|
-
);
|
|
54
|
-
}
|
|
55
|
-
export function facebookSpecificsFromJSON(
|
|
56
|
-
jsonString: string,
|
|
57
|
-
): SafeParseResult<FacebookSpecifics, SDKValidationError> {
|
|
58
|
-
return safeParse(
|
|
59
|
-
jsonString,
|
|
60
|
-
(x) => FacebookSpecifics$inboundSchema.parse(JSON.parse(x)),
|
|
61
|
-
`Failed to parse 'FacebookSpecifics' from JSON`,
|
|
62
|
-
);
|
|
63
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
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
|
-
InstagramPostType,
|
|
12
|
-
InstagramPostType$inboundSchema,
|
|
13
|
-
InstagramPostType$outboundSchema,
|
|
14
|
-
} from "./instagram-post-type.js";
|
|
15
|
-
|
|
16
|
-
export type InstagramSpecifics = {
|
|
17
|
-
platform: "INSTAGRAM";
|
|
18
|
-
postType: InstagramPostType;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
/** @internal */
|
|
22
|
-
export const InstagramSpecifics$inboundSchema: z.ZodMiniType<
|
|
23
|
-
InstagramSpecifics,
|
|
24
|
-
unknown
|
|
25
|
-
> = z.object({
|
|
26
|
-
platform: types.literal("INSTAGRAM"),
|
|
27
|
-
postType: InstagramPostType$inboundSchema,
|
|
28
|
-
});
|
|
29
|
-
/** @internal */
|
|
30
|
-
export type InstagramSpecifics$Outbound = {
|
|
31
|
-
platform: "INSTAGRAM";
|
|
32
|
-
postType: string;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
/** @internal */
|
|
36
|
-
export const InstagramSpecifics$outboundSchema: z.ZodMiniType<
|
|
37
|
-
InstagramSpecifics$Outbound,
|
|
38
|
-
InstagramSpecifics
|
|
39
|
-
> = z.object({
|
|
40
|
-
platform: z.literal("INSTAGRAM"),
|
|
41
|
-
postType: InstagramPostType$outboundSchema,
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
export function instagramSpecificsToJSON(
|
|
45
|
-
instagramSpecifics: InstagramSpecifics,
|
|
46
|
-
): string {
|
|
47
|
-
return JSON.stringify(
|
|
48
|
-
InstagramSpecifics$outboundSchema.parse(instagramSpecifics),
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
export function instagramSpecificsFromJSON(
|
|
52
|
-
jsonString: string,
|
|
53
|
-
): SafeParseResult<InstagramSpecifics, SDKValidationError> {
|
|
54
|
-
return safeParse(
|
|
55
|
-
jsonString,
|
|
56
|
-
(x) => InstagramSpecifics$inboundSchema.parse(JSON.parse(x)),
|
|
57
|
-
`Failed to parse 'InstagramSpecifics' from JSON`,
|
|
58
|
-
);
|
|
59
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
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 LinkedInPagesSpecifics = {
|
|
12
|
-
platform: "LINKEDIN_PAGES";
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
/** @internal */
|
|
16
|
-
export const LinkedInPagesSpecifics$inboundSchema: z.ZodMiniType<
|
|
17
|
-
LinkedInPagesSpecifics,
|
|
18
|
-
unknown
|
|
19
|
-
> = z.object({
|
|
20
|
-
platform: types.literal("LINKEDIN_PAGES"),
|
|
21
|
-
});
|
|
22
|
-
/** @internal */
|
|
23
|
-
export type LinkedInPagesSpecifics$Outbound = {
|
|
24
|
-
platform: "LINKEDIN_PAGES";
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
/** @internal */
|
|
28
|
-
export const LinkedInPagesSpecifics$outboundSchema: z.ZodMiniType<
|
|
29
|
-
LinkedInPagesSpecifics$Outbound,
|
|
30
|
-
LinkedInPagesSpecifics
|
|
31
|
-
> = z.object({
|
|
32
|
-
platform: z.literal("LINKEDIN_PAGES"),
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
export function linkedInPagesSpecificsToJSON(
|
|
36
|
-
linkedInPagesSpecifics: LinkedInPagesSpecifics,
|
|
37
|
-
): string {
|
|
38
|
-
return JSON.stringify(
|
|
39
|
-
LinkedInPagesSpecifics$outboundSchema.parse(linkedInPagesSpecifics),
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
export function linkedInPagesSpecificsFromJSON(
|
|
43
|
-
jsonString: string,
|
|
44
|
-
): SafeParseResult<LinkedInPagesSpecifics, SDKValidationError> {
|
|
45
|
-
return safeParse(
|
|
46
|
-
jsonString,
|
|
47
|
-
(x) => LinkedInPagesSpecifics$inboundSchema.parse(JSON.parse(x)),
|
|
48
|
-
`Failed to parse 'LinkedInPagesSpecifics' from JSON`,
|
|
49
|
-
);
|
|
50
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
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 LinkedInSpecifics = {
|
|
12
|
-
platform: "LINKEDIN";
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
/** @internal */
|
|
16
|
-
export const LinkedInSpecifics$inboundSchema: z.ZodMiniType<
|
|
17
|
-
LinkedInSpecifics,
|
|
18
|
-
unknown
|
|
19
|
-
> = z.object({
|
|
20
|
-
platform: types.literal("LINKEDIN"),
|
|
21
|
-
});
|
|
22
|
-
/** @internal */
|
|
23
|
-
export type LinkedInSpecifics$Outbound = {
|
|
24
|
-
platform: "LINKEDIN";
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
/** @internal */
|
|
28
|
-
export const LinkedInSpecifics$outboundSchema: z.ZodMiniType<
|
|
29
|
-
LinkedInSpecifics$Outbound,
|
|
30
|
-
LinkedInSpecifics
|
|
31
|
-
> = z.object({
|
|
32
|
-
platform: z.literal("LINKEDIN"),
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
export function linkedInSpecificsToJSON(
|
|
36
|
-
linkedInSpecifics: LinkedInSpecifics,
|
|
37
|
-
): string {
|
|
38
|
-
return JSON.stringify(
|
|
39
|
-
LinkedInSpecifics$outboundSchema.parse(linkedInSpecifics),
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
export function linkedInSpecificsFromJSON(
|
|
43
|
-
jsonString: string,
|
|
44
|
-
): SafeParseResult<LinkedInSpecifics, SDKValidationError> {
|
|
45
|
-
return safeParse(
|
|
46
|
-
jsonString,
|
|
47
|
-
(x) => LinkedInSpecifics$inboundSchema.parse(JSON.parse(x)),
|
|
48
|
-
`Failed to parse 'LinkedInSpecifics' from JSON`,
|
|
49
|
-
);
|
|
50
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
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
|
-
DeliveryStatus,
|
|
8
|
-
DeliveryStatus$outboundSchema,
|
|
9
|
-
} from "./delivery-status.js";
|
|
10
|
-
|
|
11
|
-
export type ListPostsRequest = {
|
|
12
|
-
/**
|
|
13
|
-
* Filter to resources that belong to a specific project.
|
|
14
|
-
*/
|
|
15
|
-
projectId?: string | undefined;
|
|
16
|
-
/**
|
|
17
|
-
* Delivery lifecycle status for a post.
|
|
18
|
-
*
|
|
19
|
-
* @remarks
|
|
20
|
-
*
|
|
21
|
-
* `NOT_STARTED`: The post exists and is scheduled, but delivery has not started yet.
|
|
22
|
-
* `SENDING`: Delivery is currently in progress.
|
|
23
|
-
* `SENT`: Delivery completed successfully.
|
|
24
|
-
* `FAILED`: Delivery completed unsuccessfully.
|
|
25
|
-
*/
|
|
26
|
-
deliveryStatus?: DeliveryStatus | undefined;
|
|
27
|
-
/**
|
|
28
|
-
* Number of items to return. Defaults to 50. Maximum 100.
|
|
29
|
-
*/
|
|
30
|
-
limit?: number | undefined;
|
|
31
|
-
/**
|
|
32
|
-
* Opaque cursor for the next page of results.
|
|
33
|
-
*/
|
|
34
|
-
cursor?: string | undefined;
|
|
35
|
-
/**
|
|
36
|
-
* Filter to specific post IDs. When provided, only posts with matching IDs are returned.
|
|
37
|
-
*/
|
|
38
|
-
ids?: Array<string> | undefined;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
/** @internal */
|
|
42
|
-
export type ListPostsRequest$Outbound = {
|
|
43
|
-
projectId?: string | undefined;
|
|
44
|
-
deliveryStatus?: string | undefined;
|
|
45
|
-
limit: number;
|
|
46
|
-
cursor?: string | undefined;
|
|
47
|
-
ids?: Array<string> | undefined;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
/** @internal */
|
|
51
|
-
export const ListPostsRequest$outboundSchema: z.ZodMiniType<
|
|
52
|
-
ListPostsRequest$Outbound,
|
|
53
|
-
ListPostsRequest
|
|
54
|
-
> = z.object({
|
|
55
|
-
projectId: z.optional(z.string()),
|
|
56
|
-
deliveryStatus: z.optional(DeliveryStatus$outboundSchema),
|
|
57
|
-
limit: z._default(z.int(), 50),
|
|
58
|
-
cursor: z.optional(z.string()),
|
|
59
|
-
ids: z.optional(z.array(z.string())),
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
export function listPostsRequestToJSON(
|
|
63
|
-
listPostsRequest: ListPostsRequest,
|
|
64
|
-
): string {
|
|
65
|
-
return JSON.stringify(
|
|
66
|
-
ListPostsRequest$outboundSchema.parse(listPostsRequest),
|
|
67
|
-
);
|
|
68
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
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 { Post, Post$inboundSchema } from "./post.js";
|
|
11
|
-
|
|
12
|
-
export type ListPostsResponse = {
|
|
13
|
-
posts: Array<Post>;
|
|
14
|
-
/**
|
|
15
|
-
* Opaque cursor for the next page of results. Omitted when there are no more results.
|
|
16
|
-
*/
|
|
17
|
-
nextCursor?: string | undefined;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
/** @internal */
|
|
21
|
-
export const ListPostsResponse$inboundSchema: z.ZodMiniType<
|
|
22
|
-
ListPostsResponse,
|
|
23
|
-
unknown
|
|
24
|
-
> = z.object({
|
|
25
|
-
posts: z.array(Post$inboundSchema),
|
|
26
|
-
nextCursor: types.optional(types.string()),
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
export function listPostsResponseFromJSON(
|
|
30
|
-
jsonString: string,
|
|
31
|
-
): SafeParseResult<ListPostsResponse, SDKValidationError> {
|
|
32
|
-
return safeParse(
|
|
33
|
-
jsonString,
|
|
34
|
-
(x) => ListPostsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
35
|
-
`Failed to parse 'ListPostsResponse' from JSON`,
|
|
36
|
-
);
|
|
37
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
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 { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
9
|
-
import {
|
|
10
|
-
PinterestBoardOption,
|
|
11
|
-
PinterestBoardOption$inboundSchema,
|
|
12
|
-
} from "./pinterest-board-option.js";
|
|
13
|
-
|
|
14
|
-
export type PinterestAccountPlatformInputs = {
|
|
15
|
-
/**
|
|
16
|
-
* Available Pinterest boards for this account.
|
|
17
|
-
*
|
|
18
|
-
* @remarks
|
|
19
|
-
*
|
|
20
|
-
* Each `id` value can be sent as
|
|
21
|
-
* `platformSpecifics.pinterestBoardId` when creating a post.
|
|
22
|
-
*/
|
|
23
|
-
boards: Array<PinterestBoardOption>;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
/** @internal */
|
|
27
|
-
export const PinterestAccountPlatformInputs$inboundSchema: z.ZodMiniType<
|
|
28
|
-
PinterestAccountPlatformInputs,
|
|
29
|
-
unknown
|
|
30
|
-
> = z.object({
|
|
31
|
-
boards: z.array(PinterestBoardOption$inboundSchema),
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
export function pinterestAccountPlatformInputsFromJSON(
|
|
35
|
-
jsonString: string,
|
|
36
|
-
): SafeParseResult<PinterestAccountPlatformInputs, SDKValidationError> {
|
|
37
|
-
return safeParse(
|
|
38
|
-
jsonString,
|
|
39
|
-
(x) => PinterestAccountPlatformInputs$inboundSchema.parse(JSON.parse(x)),
|
|
40
|
-
`Failed to parse 'PinterestAccountPlatformInputs' from JSON`,
|
|
41
|
-
);
|
|
42
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
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 PinterestSpecifics = {
|
|
12
|
-
platform: "PINTEREST";
|
|
13
|
-
pinterestBoardId: string;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
/** @internal */
|
|
17
|
-
export const PinterestSpecifics$inboundSchema: z.ZodMiniType<
|
|
18
|
-
PinterestSpecifics,
|
|
19
|
-
unknown
|
|
20
|
-
> = z.object({
|
|
21
|
-
platform: types.literal("PINTEREST"),
|
|
22
|
-
pinterestBoardId: types.string(),
|
|
23
|
-
});
|
|
24
|
-
/** @internal */
|
|
25
|
-
export type PinterestSpecifics$Outbound = {
|
|
26
|
-
platform: "PINTEREST";
|
|
27
|
-
pinterestBoardId: string;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
/** @internal */
|
|
31
|
-
export const PinterestSpecifics$outboundSchema: z.ZodMiniType<
|
|
32
|
-
PinterestSpecifics$Outbound,
|
|
33
|
-
PinterestSpecifics
|
|
34
|
-
> = z.object({
|
|
35
|
-
platform: z.literal("PINTEREST"),
|
|
36
|
-
pinterestBoardId: z.string(),
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
export function pinterestSpecificsToJSON(
|
|
40
|
-
pinterestSpecifics: PinterestSpecifics,
|
|
41
|
-
): string {
|
|
42
|
-
return JSON.stringify(
|
|
43
|
-
PinterestSpecifics$outboundSchema.parse(pinterestSpecifics),
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
export function pinterestSpecificsFromJSON(
|
|
47
|
-
jsonString: string,
|
|
48
|
-
): SafeParseResult<PinterestSpecifics, SDKValidationError> {
|
|
49
|
-
return safeParse(
|
|
50
|
-
jsonString,
|
|
51
|
-
(x) => PinterestSpecifics$inboundSchema.parse(JSON.parse(x)),
|
|
52
|
-
`Failed to parse 'PinterestSpecifics' from JSON`,
|
|
53
|
-
);
|
|
54
|
-
}
|
|
@@ -1,129 +0,0 @@
|
|
|
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 { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
11
|
-
import {
|
|
12
|
-
FacebookSpecifics,
|
|
13
|
-
FacebookSpecifics$inboundSchema,
|
|
14
|
-
FacebookSpecifics$Outbound,
|
|
15
|
-
FacebookSpecifics$outboundSchema,
|
|
16
|
-
} from "./facebook-specifics.js";
|
|
17
|
-
import {
|
|
18
|
-
InstagramSpecifics,
|
|
19
|
-
InstagramSpecifics$inboundSchema,
|
|
20
|
-
InstagramSpecifics$Outbound,
|
|
21
|
-
InstagramSpecifics$outboundSchema,
|
|
22
|
-
} from "./instagram-specifics.js";
|
|
23
|
-
import {
|
|
24
|
-
LinkedInPagesSpecifics,
|
|
25
|
-
LinkedInPagesSpecifics$inboundSchema,
|
|
26
|
-
LinkedInPagesSpecifics$Outbound,
|
|
27
|
-
LinkedInPagesSpecifics$outboundSchema,
|
|
28
|
-
} from "./linked-in-pages-specifics.js";
|
|
29
|
-
import {
|
|
30
|
-
LinkedInSpecifics,
|
|
31
|
-
LinkedInSpecifics$inboundSchema,
|
|
32
|
-
LinkedInSpecifics$Outbound,
|
|
33
|
-
LinkedInSpecifics$outboundSchema,
|
|
34
|
-
} from "./linked-in-specifics.js";
|
|
35
|
-
import {
|
|
36
|
-
PinterestSpecifics,
|
|
37
|
-
PinterestSpecifics$inboundSchema,
|
|
38
|
-
PinterestSpecifics$Outbound,
|
|
39
|
-
PinterestSpecifics$outboundSchema,
|
|
40
|
-
} from "./pinterest-specifics.js";
|
|
41
|
-
import {
|
|
42
|
-
TikTokSpecifics,
|
|
43
|
-
TikTokSpecifics$inboundSchema,
|
|
44
|
-
TikTokSpecifics$Outbound,
|
|
45
|
-
TikTokSpecifics$outboundSchema,
|
|
46
|
-
} from "./tik-tok-specifics.js";
|
|
47
|
-
import {
|
|
48
|
-
XSpecifics,
|
|
49
|
-
XSpecifics$inboundSchema,
|
|
50
|
-
XSpecifics$Outbound,
|
|
51
|
-
XSpecifics$outboundSchema,
|
|
52
|
-
} from "./x-specifics.js";
|
|
53
|
-
import {
|
|
54
|
-
YouTubeSpecifics,
|
|
55
|
-
YouTubeSpecifics$inboundSchema,
|
|
56
|
-
YouTubeSpecifics$Outbound,
|
|
57
|
-
YouTubeSpecifics$outboundSchema,
|
|
58
|
-
} from "./you-tube-specifics.js";
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Platform-specific publishing options. The `platform` value must match the publishing account's platform.
|
|
62
|
-
*/
|
|
63
|
-
export type PlatformSpecifics =
|
|
64
|
-
| PinterestSpecifics
|
|
65
|
-
| InstagramSpecifics
|
|
66
|
-
| FacebookSpecifics
|
|
67
|
-
| TikTokSpecifics
|
|
68
|
-
| YouTubeSpecifics
|
|
69
|
-
| XSpecifics
|
|
70
|
-
| LinkedInSpecifics
|
|
71
|
-
| LinkedInPagesSpecifics
|
|
72
|
-
| discriminatedUnionTypes.Unknown<"platform">;
|
|
73
|
-
|
|
74
|
-
/** @internal */
|
|
75
|
-
export const PlatformSpecifics$inboundSchema: z.ZodMiniType<
|
|
76
|
-
PlatformSpecifics,
|
|
77
|
-
unknown
|
|
78
|
-
> = discriminatedUnion("platform", {
|
|
79
|
-
PINTEREST: PinterestSpecifics$inboundSchema,
|
|
80
|
-
INSTAGRAM: InstagramSpecifics$inboundSchema,
|
|
81
|
-
FACEBOOK: FacebookSpecifics$inboundSchema,
|
|
82
|
-
TIKTOK: TikTokSpecifics$inboundSchema,
|
|
83
|
-
YOUTUBE: YouTubeSpecifics$inboundSchema,
|
|
84
|
-
X: XSpecifics$inboundSchema,
|
|
85
|
-
LINKEDIN: LinkedInSpecifics$inboundSchema,
|
|
86
|
-
LINKEDIN_PAGES: LinkedInPagesSpecifics$inboundSchema,
|
|
87
|
-
});
|
|
88
|
-
/** @internal */
|
|
89
|
-
export type PlatformSpecifics$Outbound =
|
|
90
|
-
| PinterestSpecifics$Outbound
|
|
91
|
-
| InstagramSpecifics$Outbound
|
|
92
|
-
| FacebookSpecifics$Outbound
|
|
93
|
-
| TikTokSpecifics$Outbound
|
|
94
|
-
| YouTubeSpecifics$Outbound
|
|
95
|
-
| XSpecifics$Outbound
|
|
96
|
-
| LinkedInSpecifics$Outbound
|
|
97
|
-
| LinkedInPagesSpecifics$Outbound;
|
|
98
|
-
|
|
99
|
-
/** @internal */
|
|
100
|
-
export const PlatformSpecifics$outboundSchema: z.ZodMiniType<
|
|
101
|
-
PlatformSpecifics$Outbound,
|
|
102
|
-
PlatformSpecifics
|
|
103
|
-
> = z.union([
|
|
104
|
-
PinterestSpecifics$outboundSchema,
|
|
105
|
-
InstagramSpecifics$outboundSchema,
|
|
106
|
-
FacebookSpecifics$outboundSchema,
|
|
107
|
-
TikTokSpecifics$outboundSchema,
|
|
108
|
-
YouTubeSpecifics$outboundSchema,
|
|
109
|
-
XSpecifics$outboundSchema,
|
|
110
|
-
LinkedInSpecifics$outboundSchema,
|
|
111
|
-
LinkedInPagesSpecifics$outboundSchema,
|
|
112
|
-
]);
|
|
113
|
-
|
|
114
|
-
export function platformSpecificsToJSON(
|
|
115
|
-
platformSpecifics: PlatformSpecifics,
|
|
116
|
-
): string {
|
|
117
|
-
return JSON.stringify(
|
|
118
|
-
PlatformSpecifics$outboundSchema.parse(platformSpecifics),
|
|
119
|
-
);
|
|
120
|
-
}
|
|
121
|
-
export function platformSpecificsFromJSON(
|
|
122
|
-
jsonString: string,
|
|
123
|
-
): SafeParseResult<PlatformSpecifics, SDKValidationError> {
|
|
124
|
-
return safeParse(
|
|
125
|
-
jsonString,
|
|
126
|
-
(x) => PlatformSpecifics$inboundSchema.parse(JSON.parse(x)),
|
|
127
|
-
`Failed to parse 'PlatformSpecifics' from JSON`,
|
|
128
|
-
);
|
|
129
|
-
}
|
package/src/models/post-media.ts
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
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 openEnums from "../types/enums.js";
|
|
8
|
-
import { OpenEnum } from "../types/enums.js";
|
|
9
|
-
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
|
-
import * as types from "../types/primitives.js";
|
|
11
|
-
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
12
|
-
|
|
13
|
-
export const Type = {
|
|
14
|
-
Image: "IMAGE",
|
|
15
|
-
Video: "VIDEO",
|
|
16
|
-
} as const;
|
|
17
|
-
export type Type = OpenEnum<typeof Type>;
|
|
18
|
-
|
|
19
|
-
export type PostMedia = {
|
|
20
|
-
/**
|
|
21
|
-
* Media identifier.
|
|
22
|
-
*/
|
|
23
|
-
mediaId: string;
|
|
24
|
-
type: Type;
|
|
25
|
-
/**
|
|
26
|
-
* Canonical media URL.
|
|
27
|
-
*/
|
|
28
|
-
url: string;
|
|
29
|
-
/**
|
|
30
|
-
* Thumbnail or preview URL for the media item.
|
|
31
|
-
*/
|
|
32
|
-
thumbnailUrl: string;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
/** @internal */
|
|
36
|
-
export const Type$inboundSchema: z.ZodMiniType<Type, unknown> = openEnums
|
|
37
|
-
.inboundSchema(Type);
|
|
38
|
-
|
|
39
|
-
/** @internal */
|
|
40
|
-
export const PostMedia$inboundSchema: z.ZodMiniType<PostMedia, unknown> = z
|
|
41
|
-
.object({
|
|
42
|
-
mediaId: types.string(),
|
|
43
|
-
type: Type$inboundSchema,
|
|
44
|
-
url: types.string(),
|
|
45
|
-
thumbnailUrl: types.string(),
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
export function postMediaFromJSON(
|
|
49
|
-
jsonString: string,
|
|
50
|
-
): SafeParseResult<PostMedia, SDKValidationError> {
|
|
51
|
-
return safeParse(
|
|
52
|
-
jsonString,
|
|
53
|
-
(x) => PostMedia$inboundSchema.parse(JSON.parse(x)),
|
|
54
|
-
`Failed to parse 'PostMedia' from JSON`,
|
|
55
|
-
);
|
|
56
|
-
}
|