bereach 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 +90 -0
- package/README.md +530 -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/campaigns-filter.d.ts +20 -0
- package/esm/funcs/campaigns-filter.d.ts.map +1 -0
- package/esm/funcs/campaigns-filter.js +106 -0
- package/esm/funcs/campaigns-filter.js.map +1 -0
- package/esm/funcs/campaigns-get-stats.d.ts +18 -0
- package/esm/funcs/campaigns-get-stats.d.ts.map +1 -0
- package/esm/funcs/campaigns-get-stats.js +101 -0
- package/esm/funcs/campaigns-get-stats.js.map +1 -0
- package/esm/funcs/campaigns-get-status.d.ts +18 -0
- package/esm/funcs/campaigns-get-status.d.ts.map +1 -0
- package/esm/funcs/campaigns-get-status.js +101 -0
- package/esm/funcs/campaigns-get-status.js.map +1 -0
- package/esm/funcs/campaigns-sync-actions.d.ts +18 -0
- package/esm/funcs/campaigns-sync-actions.d.ts.map +1 -0
- package/esm/funcs/campaigns-sync-actions.js +101 -0
- package/esm/funcs/campaigns-sync-actions.js.map +1 -0
- package/esm/funcs/linkedin-actions-accept-invitation.d.ts +18 -0
- package/esm/funcs/linkedin-actions-accept-invitation.d.ts.map +1 -0
- package/esm/funcs/linkedin-actions-accept-invitation.js +95 -0
- package/esm/funcs/linkedin-actions-accept-invitation.js.map +1 -0
- package/esm/funcs/linkedin-actions-connect-profile.d.ts +18 -0
- package/esm/funcs/linkedin-actions-connect-profile.d.ts.map +1 -0
- package/esm/funcs/linkedin-actions-connect-profile.js +95 -0
- package/esm/funcs/linkedin-actions-connect-profile.js.map +1 -0
- package/esm/funcs/linkedin-actions-like-comment.d.ts +18 -0
- package/esm/funcs/linkedin-actions-like-comment.d.ts.map +1 -0
- package/esm/funcs/linkedin-actions-like-comment.js +95 -0
- package/esm/funcs/linkedin-actions-like-comment.js.map +1 -0
- package/esm/funcs/linkedin-actions-list-invitations.d.ts +18 -0
- package/esm/funcs/linkedin-actions-list-invitations.d.ts.map +1 -0
- package/esm/funcs/linkedin-actions-list-invitations.js +97 -0
- package/esm/funcs/linkedin-actions-list-invitations.js.map +1 -0
- package/esm/funcs/linkedin-actions-publish-post.d.ts +18 -0
- package/esm/funcs/linkedin-actions-publish-post.d.ts.map +1 -0
- package/esm/funcs/linkedin-actions-publish-post.js +95 -0
- package/esm/funcs/linkedin-actions-publish-post.js.map +1 -0
- package/esm/funcs/linkedin-actions-reply-to-comment.d.ts +18 -0
- package/esm/funcs/linkedin-actions-reply-to-comment.d.ts.map +1 -0
- package/esm/funcs/linkedin-actions-reply-to-comment.js +95 -0
- package/esm/funcs/linkedin-actions-reply-to-comment.js.map +1 -0
- package/esm/funcs/linkedin-actions-send-message.d.ts +18 -0
- package/esm/funcs/linkedin-actions-send-message.d.ts.map +1 -0
- package/esm/funcs/linkedin-actions-send-message.js +95 -0
- package/esm/funcs/linkedin-actions-send-message.js.map +1 -0
- package/esm/funcs/linkedin-chat-find-conversation.d.ts +25 -0
- package/esm/funcs/linkedin-chat-find-conversation.d.ts.map +1 -0
- package/esm/funcs/linkedin-chat-find-conversation.js +102 -0
- package/esm/funcs/linkedin-chat-find-conversation.js.map +1 -0
- package/esm/funcs/linkedin-chat-get-messages.d.ts +22 -0
- package/esm/funcs/linkedin-chat-get-messages.d.ts.map +1 -0
- package/esm/funcs/linkedin-chat-get-messages.js +99 -0
- package/esm/funcs/linkedin-chat-get-messages.js.map +1 -0
- package/esm/funcs/linkedin-chat-list-conversations.d.ts +18 -0
- package/esm/funcs/linkedin-chat-list-conversations.d.ts.map +1 -0
- package/esm/funcs/linkedin-chat-list-conversations.js +95 -0
- package/esm/funcs/linkedin-chat-list-conversations.js.map +1 -0
- package/esm/funcs/linkedin-chat-search-conversations.d.ts +18 -0
- package/esm/funcs/linkedin-chat-search-conversations.d.ts.map +1 -0
- package/esm/funcs/linkedin-chat-search-conversations.js +95 -0
- package/esm/funcs/linkedin-chat-search-conversations.js.map +1 -0
- package/esm/funcs/linkedin-scrapers-collect-comment-replies.d.ts +18 -0
- package/esm/funcs/linkedin-scrapers-collect-comment-replies.d.ts.map +1 -0
- package/esm/funcs/linkedin-scrapers-collect-comment-replies.js +95 -0
- package/esm/funcs/linkedin-scrapers-collect-comment-replies.js.map +1 -0
- package/esm/funcs/linkedin-scrapers-collect-comments.d.ts +18 -0
- package/esm/funcs/linkedin-scrapers-collect-comments.d.ts.map +1 -0
- package/esm/funcs/linkedin-scrapers-collect-comments.js +95 -0
- package/esm/funcs/linkedin-scrapers-collect-comments.js.map +1 -0
- package/esm/funcs/linkedin-scrapers-collect-likes.d.ts +18 -0
- package/esm/funcs/linkedin-scrapers-collect-likes.d.ts.map +1 -0
- package/esm/funcs/linkedin-scrapers-collect-likes.js +95 -0
- package/esm/funcs/linkedin-scrapers-collect-likes.js.map +1 -0
- package/esm/funcs/linkedin-scrapers-collect-posts.d.ts +18 -0
- package/esm/funcs/linkedin-scrapers-collect-posts.d.ts.map +1 -0
- package/esm/funcs/linkedin-scrapers-collect-posts.js +95 -0
- package/esm/funcs/linkedin-scrapers-collect-posts.js.map +1 -0
- package/esm/funcs/linkedin-scrapers-visit-company.d.ts +18 -0
- package/esm/funcs/linkedin-scrapers-visit-company.d.ts.map +1 -0
- package/esm/funcs/linkedin-scrapers-visit-company.js +95 -0
- package/esm/funcs/linkedin-scrapers-visit-company.js.map +1 -0
- package/esm/funcs/linkedin-scrapers-visit-profile.d.ts +18 -0
- package/esm/funcs/linkedin-scrapers-visit-profile.d.ts.map +1 -0
- package/esm/funcs/linkedin-scrapers-visit-profile.js +95 -0
- package/esm/funcs/linkedin-scrapers-visit-profile.js.map +1 -0
- package/esm/funcs/linkedin-search-resolve-parameters.d.ts +47 -0
- package/esm/funcs/linkedin-search-resolve-parameters.d.ts.map +1 -0
- package/esm/funcs/linkedin-search-resolve-parameters.js +124 -0
- package/esm/funcs/linkedin-search-resolve-parameters.js.map +1 -0
- package/esm/funcs/linkedin-search-search-by-url.d.ts +69 -0
- package/esm/funcs/linkedin-search-search-by-url.d.ts.map +1 -0
- package/esm/funcs/linkedin-search-search-by-url.js +146 -0
- package/esm/funcs/linkedin-search-search-by-url.js.map +1 -0
- package/esm/funcs/linkedin-search-search-companies.d.ts +75 -0
- package/esm/funcs/linkedin-search-search-companies.d.ts.map +1 -0
- package/esm/funcs/linkedin-search-search-companies.js +152 -0
- package/esm/funcs/linkedin-search-search-companies.js.map +1 -0
- package/esm/funcs/linkedin-search-search-jobs.d.ts +96 -0
- package/esm/funcs/linkedin-search-search-jobs.d.ts.map +1 -0
- package/esm/funcs/linkedin-search-search-jobs.js +173 -0
- package/esm/funcs/linkedin-search-search-jobs.js.map +1 -0
- package/esm/funcs/linkedin-search-search-people.d.ts +83 -0
- package/esm/funcs/linkedin-search-search-people.d.ts.map +1 -0
- package/esm/funcs/linkedin-search-search-people.js +160 -0
- package/esm/funcs/linkedin-search-search-people.js.map +1 -0
- package/esm/funcs/linkedin-search-search-posts.d.ts +71 -0
- package/esm/funcs/linkedin-search-search-posts.d.ts.map +1 -0
- package/esm/funcs/linkedin-search-search-posts.js +148 -0
- package/esm/funcs/linkedin-search-search-posts.js.map +1 -0
- package/esm/funcs/linkedin-search-unified-search.d.ts +55 -0
- package/esm/funcs/linkedin-search-unified-search.d.ts.map +1 -0
- package/esm/funcs/linkedin-search-unified-search.js +132 -0
- package/esm/funcs/linkedin-search-unified-search.js.map +1 -0
- package/esm/funcs/profile-get-credits.d.ts +18 -0
- package/esm/funcs/profile-get-credits.d.ts.map +1 -0
- package/esm/funcs/profile-get-credits.js +84 -0
- package/esm/funcs/profile-get-credits.js.map +1 -0
- package/esm/funcs/profile-get-followers.d.ts +18 -0
- package/esm/funcs/profile-get-followers.d.ts.map +1 -0
- package/esm/funcs/profile-get-followers.js +97 -0
- package/esm/funcs/profile-get-followers.js.map +1 -0
- package/esm/funcs/profile-get-limits.d.ts +18 -0
- package/esm/funcs/profile-get-limits.d.ts.map +1 -0
- package/esm/funcs/profile-get-limits.js +84 -0
- package/esm/funcs/profile-get-limits.js.map +1 -0
- package/esm/funcs/profile-get-linked-in-profile.d.ts +18 -0
- package/esm/funcs/profile-get-linked-in-profile.d.ts.map +1 -0
- package/esm/funcs/profile-get-linked-in-profile.js +84 -0
- package/esm/funcs/profile-get-linked-in-profile.js.map +1 -0
- package/esm/funcs/profile-get-posts.d.ts +18 -0
- package/esm/funcs/profile-get-posts.d.ts.map +1 -0
- package/esm/funcs/profile-get-posts.js +97 -0
- package/esm/funcs/profile-get-posts.js.map +1 -0
- package/esm/funcs/profile-refresh.d.ts +18 -0
- package/esm/funcs/profile-refresh.d.ts.map +1 -0
- package/esm/funcs/profile-refresh.js +84 -0
- package/esm/funcs/profile-refresh.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 +82 -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/registration.d.ts +3 -0
- package/esm/hooks/registration.d.ts.map +1 -0
- package/esm/hooks/registration.js +12 -0
- package/esm/hooks/registration.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 +370 -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 +13 -0
- package/esm/lib/files.d.ts.map +1 -0
- package/esm/lib/files.js +73 -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 +258 -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 +138 -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 +22 -0
- package/esm/lib/url.js.map +1 -0
- package/esm/models/errors/bereach-default-error.d.ts +10 -0
- package/esm/models/errors/bereach-default-error.d.ts.map +1 -0
- package/esm/models/errors/bereach-default-error.js +30 -0
- package/esm/models/errors/bereach-default-error.js.map +1 -0
- package/esm/models/errors/bereach-error.d.ts +19 -0
- package/esm/models/errors/bereach-error.d.ts.map +1 -0
- package/esm/models/errors/bereach-error.js +26 -0
- package/esm/models/errors/bereach-error.js.map +1 -0
- package/esm/models/errors/collect-linked-in-likes.d.ts +211 -0
- package/esm/models/errors/collect-linked-in-likes.d.ts.map +1 -0
- package/esm/models/errors/collect-linked-in-likes.js +306 -0
- package/esm/models/errors/collect-linked-in-likes.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 +7 -0
- package/esm/models/errors/index.d.ts.map +1 -0
- package/esm/models/errors/index.js +10 -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/index.d.ts +2 -0
- package/esm/models/index.d.ts.map +1 -0
- package/esm/models/index.js +5 -0
- package/esm/models/index.js.map +1 -0
- package/esm/models/operations/get-campaign-stats-response.d.ts +1627 -0
- package/esm/models/operations/get-campaign-stats-response.d.ts.map +1 -0
- package/esm/models/operations/get-campaign-stats-response.js +1002 -0
- package/esm/models/operations/get-campaign-stats-response.js.map +1 -0
- package/esm/models/operations/index.d.ts +3 -0
- package/esm/models/operations/index.d.ts.map +1 -0
- package/esm/models/operations/index.js +6 -0
- package/esm/models/operations/index.js.map +1 -0
- package/esm/models/operations/send-linked-in-message-response.d.ts +2350 -0
- package/esm/models/operations/send-linked-in-message-response.d.ts.map +1 -0
- package/esm/models/operations/send-linked-in-message-response.js +1585 -0
- package/esm/models/operations/send-linked-in-message-response.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 +12 -0
- package/esm/models/security.js.map +1 -0
- package/esm/sdk/campaigns.d.ts +35 -0
- package/esm/sdk/campaigns.d.ts.map +1 -0
- package/esm/sdk/campaigns.js +50 -0
- package/esm/sdk/campaigns.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/linkedin-actions.d.ts +54 -0
- package/esm/sdk/linkedin-actions.d.ts.map +1 -0
- package/esm/sdk/linkedin-actions.js +78 -0
- package/esm/sdk/linkedin-actions.js.map +1 -0
- package/esm/sdk/linkedin-chat.d.ts +44 -0
- package/esm/sdk/linkedin-chat.d.ts.map +1 -0
- package/esm/sdk/linkedin-chat.js +59 -0
- package/esm/sdk/linkedin-chat.js.map +1 -0
- package/esm/sdk/linkedin-scrapers.d.ts +47 -0
- package/esm/sdk/linkedin-scrapers.d.ts.map +1 -0
- package/esm/sdk/linkedin-scrapers.js +68 -0
- package/esm/sdk/linkedin-scrapers.js.map +1 -0
- package/esm/sdk/linkedin-search.d.ts +424 -0
- package/esm/sdk/linkedin-search.d.ts.map +1 -0
- package/esm/sdk/linkedin-search.js +448 -0
- package/esm/sdk/linkedin-search.js.map +1 -0
- package/esm/sdk/profile.d.ts +47 -0
- package/esm/sdk/profile.d.ts.map +1 -0
- package/esm/sdk/profile.js +68 -0
- package/esm/sdk/profile.js.map +1 -0
- package/esm/sdk/sdk.d.ts +22 -0
- package/esm/sdk/sdk.d.ts.map +1 -0
- package/esm/sdk/sdk.js +37 -0
- package/esm/sdk/sdk.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/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 +117 -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/examples/linkedinScrapersCollectLikes.example.ts +30 -0
- package/jsr.json +27 -0
- package/package.json +62 -0
- package/src/core.ts +13 -0
- package/src/funcs/campaigns-filter.ts +227 -0
- package/src/funcs/campaigns-get-stats.ts +222 -0
- package/src/funcs/campaigns-get-status.ts +222 -0
- package/src/funcs/campaigns-sync-actions.ts +222 -0
- package/src/funcs/linkedin-actions-accept-invitation.ts +215 -0
- package/src/funcs/linkedin-actions-connect-profile.ts +215 -0
- package/src/funcs/linkedin-actions-like-comment.ts +215 -0
- package/src/funcs/linkedin-actions-list-invitations.ts +220 -0
- package/src/funcs/linkedin-actions-publish-post.ts +215 -0
- package/src/funcs/linkedin-actions-reply-to-comment.ts +215 -0
- package/src/funcs/linkedin-actions-send-message.ts +215 -0
- package/src/funcs/linkedin-chat-find-conversation.ts +222 -0
- package/src/funcs/linkedin-chat-get-messages.ts +219 -0
- package/src/funcs/linkedin-chat-list-conversations.ts +215 -0
- package/src/funcs/linkedin-chat-search-conversations.ts +218 -0
- package/src/funcs/linkedin-scrapers-collect-comment-replies.ts +218 -0
- package/src/funcs/linkedin-scrapers-collect-comments.ts +215 -0
- package/src/funcs/linkedin-scrapers-collect-likes.ts +215 -0
- package/src/funcs/linkedin-scrapers-collect-posts.ts +215 -0
- package/src/funcs/linkedin-scrapers-visit-company.ts +215 -0
- package/src/funcs/linkedin-scrapers-visit-profile.ts +215 -0
- package/src/funcs/linkedin-search-resolve-parameters.ts +250 -0
- package/src/funcs/linkedin-search-search-by-url.ts +266 -0
- package/src/funcs/linkedin-search-search-companies.ts +272 -0
- package/src/funcs/linkedin-search-search-jobs.ts +293 -0
- package/src/funcs/linkedin-search-search-people.ts +280 -0
- package/src/funcs/linkedin-search-search-posts.ts +268 -0
- package/src/funcs/linkedin-search-unified-search.ts +251 -0
- package/src/funcs/profile-get-credits.ts +195 -0
- package/src/funcs/profile-get-followers.ts +220 -0
- package/src/funcs/profile-get-limits.ts +195 -0
- package/src/funcs/profile-get-linked-in-profile.ts +195 -0
- package/src/funcs/profile-get-posts.ts +220 -0
- package/src/funcs/profile-refresh.ts +195 -0
- package/src/hooks/hooks.ts +132 -0
- package/src/hooks/index.ts +6 -0
- package/src/hooks/registration.ts +14 -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 +67 -0
- package/src/lib/dlv.ts +53 -0
- package/src/lib/encodings.ts +501 -0
- package/src/lib/env.ts +57 -0
- package/src/lib/files.ts +82 -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 +406 -0
- package/src/lib/security.ts +263 -0
- package/src/lib/url.ts +33 -0
- package/src/models/errors/bereach-default-error.ts +40 -0
- package/src/models/errors/bereach-error.ts +35 -0
- package/src/models/errors/collect-linked-in-likes.ts +494 -0
- package/src/models/errors/http-client-errors.ts +62 -0
- package/src/models/errors/index.ts +10 -0
- package/src/models/errors/response-validation-error.ts +50 -0
- package/src/models/errors/sdk-validation-error.ts +54 -0
- package/src/models/index.ts +5 -0
- package/src/models/operations/get-campaign-stats-response.ts +3409 -0
- package/src/models/operations/index.ts +6 -0
- package/src/models/operations/send-linked-in-message-response.ts +4903 -0
- package/src/models/security.ts +26 -0
- package/src/sdk/campaigns.ts +83 -0
- package/src/sdk/index.ts +5 -0
- package/src/sdk/linkedin-actions.ts +135 -0
- package/src/sdk/linkedin-chat.ts +92 -0
- package/src/sdk/linkedin-scrapers.ts +117 -0
- package/src/sdk/linkedin-search.ts +505 -0
- package/src/sdk/profile.ts +109 -0
- package/src/sdk/sdk.ts +43 -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/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 +153 -0
- package/src/types/streams.ts +21 -0
- package/src/types/unrecognized.ts +35 -0
|
@@ -0,0 +1,3409 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import * as openEnums from "../../types/enums.js";
|
|
9
|
+
import { ClosedEnum, OpenEnum } from "../../types/enums.js";
|
|
10
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
11
|
+
import * as types from "../../types/primitives.js";
|
|
12
|
+
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
13
|
+
|
|
14
|
+
export type ReplyToLinkedInCommentRequest = {
|
|
15
|
+
/**
|
|
16
|
+
* LinkedIn comment URN (e.g., 'urn:li:comment:(activity:7399026485694537728,7399230513867026433)')
|
|
17
|
+
*/
|
|
18
|
+
commentUrn: string;
|
|
19
|
+
/**
|
|
20
|
+
* Reply message text
|
|
21
|
+
*/
|
|
22
|
+
message: string;
|
|
23
|
+
/**
|
|
24
|
+
* Campaign identifier for deduplication. Dedup by commentUrn automatically.
|
|
25
|
+
*/
|
|
26
|
+
campaignSlug?: string | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Deprecated. Use campaignSlug only.
|
|
29
|
+
*
|
|
30
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
31
|
+
*/
|
|
32
|
+
actionSlug?: string | undefined;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Reply sent successfully
|
|
37
|
+
*/
|
|
38
|
+
export type ReplyToLinkedInCommentResponse = {
|
|
39
|
+
success: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* URN of the created reply comment
|
|
42
|
+
*/
|
|
43
|
+
replyUrn?: string | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* True if this action was already executed for the given campaignSlug + target.
|
|
46
|
+
*/
|
|
47
|
+
duplicate?: boolean | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Credits consumed by this call (0 for free endpoints, cached results, or duplicates).
|
|
50
|
+
*/
|
|
51
|
+
creditsUsed: number;
|
|
52
|
+
/**
|
|
53
|
+
* Seconds to wait before making another call of the same type. 0 means no wait needed.
|
|
54
|
+
*/
|
|
55
|
+
retryAfter: number;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Reaction type (default: LIKE)
|
|
60
|
+
*/
|
|
61
|
+
export const ReactionType = {
|
|
62
|
+
Like: "LIKE",
|
|
63
|
+
Love: "LOVE",
|
|
64
|
+
Celebrate: "CELEBRATE",
|
|
65
|
+
Support: "SUPPORT",
|
|
66
|
+
Funny: "FUNNY",
|
|
67
|
+
Insightful: "INSIGHTFUL",
|
|
68
|
+
} as const;
|
|
69
|
+
/**
|
|
70
|
+
* Reaction type (default: LIKE)
|
|
71
|
+
*/
|
|
72
|
+
export type ReactionType = ClosedEnum<typeof ReactionType>;
|
|
73
|
+
|
|
74
|
+
export type LikeLinkedInCommentRequest = {
|
|
75
|
+
/**
|
|
76
|
+
* LinkedIn comment URN (e.g., 'urn:li:comment:(activity:7399026485694537728,7399230513867026433)')
|
|
77
|
+
*/
|
|
78
|
+
commentUrn: string;
|
|
79
|
+
/**
|
|
80
|
+
* Reaction type (default: LIKE)
|
|
81
|
+
*/
|
|
82
|
+
reactionType?: ReactionType | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* Campaign identifier for deduplication. Dedup by commentUrn automatically.
|
|
85
|
+
*/
|
|
86
|
+
campaignSlug?: string | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* Deprecated. Use campaignSlug only.
|
|
89
|
+
*
|
|
90
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
91
|
+
*/
|
|
92
|
+
actionSlug?: string | undefined;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Comment liked successfully
|
|
97
|
+
*/
|
|
98
|
+
export type LikeLinkedInCommentResponse = {
|
|
99
|
+
success: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Resource key of the created reaction
|
|
102
|
+
*/
|
|
103
|
+
resourceKey?: string | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* True if this action was already executed for the given campaignSlug + target.
|
|
106
|
+
*/
|
|
107
|
+
duplicate?: boolean | undefined;
|
|
108
|
+
/**
|
|
109
|
+
* Credits consumed by this call (0 for free endpoints, cached results, or duplicates).
|
|
110
|
+
*/
|
|
111
|
+
creditsUsed: number;
|
|
112
|
+
/**
|
|
113
|
+
* Seconds to wait before making another call of the same type. 0 means no wait needed.
|
|
114
|
+
*/
|
|
115
|
+
retryAfter: number;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Publish mode: 'instant' publishes immediately, 'scheduled' schedules for later
|
|
120
|
+
*/
|
|
121
|
+
export const Mode = {
|
|
122
|
+
Scheduled: "scheduled",
|
|
123
|
+
Instant: "instant",
|
|
124
|
+
} as const;
|
|
125
|
+
/**
|
|
126
|
+
* Publish mode: 'instant' publishes immediately, 'scheduled' schedules for later
|
|
127
|
+
*/
|
|
128
|
+
export type Mode = ClosedEnum<typeof Mode>;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Post visibility
|
|
132
|
+
*/
|
|
133
|
+
export const Visibility = {
|
|
134
|
+
Anyone: "ANYONE",
|
|
135
|
+
Connections: "CONNECTIONS",
|
|
136
|
+
} as const;
|
|
137
|
+
/**
|
|
138
|
+
* Post visibility
|
|
139
|
+
*/
|
|
140
|
+
export type Visibility = ClosedEnum<typeof Visibility>;
|
|
141
|
+
|
|
142
|
+
export type Mention = {
|
|
143
|
+
/**
|
|
144
|
+
* LinkedIn profile URN of the mentioned person (e.g., 'urn:li:fsd_profile:ACoAABZ0Qo4B...')
|
|
145
|
+
*/
|
|
146
|
+
profileUrn: string;
|
|
147
|
+
/**
|
|
148
|
+
* Start character offset in the text where the mention begins
|
|
149
|
+
*/
|
|
150
|
+
start: number;
|
|
151
|
+
/**
|
|
152
|
+
* Length of the mention text in characters
|
|
153
|
+
*/
|
|
154
|
+
length: number;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
export type PublishLinkedInPostRequest = {
|
|
158
|
+
/**
|
|
159
|
+
* Post commentary text
|
|
160
|
+
*/
|
|
161
|
+
text: string;
|
|
162
|
+
/**
|
|
163
|
+
* Publish mode: 'instant' publishes immediately, 'scheduled' schedules for later
|
|
164
|
+
*/
|
|
165
|
+
mode: Mode;
|
|
166
|
+
/**
|
|
167
|
+
* Timestamp in milliseconds for scheduled posts (required when mode='scheduled')
|
|
168
|
+
*/
|
|
169
|
+
scheduledAt?: number | undefined;
|
|
170
|
+
/**
|
|
171
|
+
* URL of an image to attach to the post
|
|
172
|
+
*/
|
|
173
|
+
imageUrl?: string | undefined;
|
|
174
|
+
/**
|
|
175
|
+
* Post visibility
|
|
176
|
+
*/
|
|
177
|
+
visibility?: Visibility | undefined;
|
|
178
|
+
/**
|
|
179
|
+
* Profile mentions with text positions
|
|
180
|
+
*/
|
|
181
|
+
mentions?: Array<Mention> | undefined;
|
|
182
|
+
/**
|
|
183
|
+
* Campaign identifier for deduplication.
|
|
184
|
+
*/
|
|
185
|
+
campaignSlug?: string | undefined;
|
|
186
|
+
/**
|
|
187
|
+
* Deprecated. Use campaignSlug only.
|
|
188
|
+
*
|
|
189
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
190
|
+
*/
|
|
191
|
+
actionSlug?: string | undefined;
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Post published or scheduled successfully
|
|
196
|
+
*/
|
|
197
|
+
export type PublishLinkedInPostResponse = {
|
|
198
|
+
success: boolean;
|
|
199
|
+
/**
|
|
200
|
+
* URN of the created share (e.g., 'urn:li:fsd_share:urn:li:share:123...')
|
|
201
|
+
*/
|
|
202
|
+
shareUrn: string;
|
|
203
|
+
/**
|
|
204
|
+
* Activity URN (only available for instant mode)
|
|
205
|
+
*/
|
|
206
|
+
activityUrn: string | null;
|
|
207
|
+
/**
|
|
208
|
+
* True if this action was already executed for the given campaignSlug + target.
|
|
209
|
+
*/
|
|
210
|
+
duplicate?: boolean | undefined;
|
|
211
|
+
/**
|
|
212
|
+
* Credits consumed by this call (0 for free endpoints, cached results, or duplicates).
|
|
213
|
+
*/
|
|
214
|
+
creditsUsed: number;
|
|
215
|
+
/**
|
|
216
|
+
* Seconds to wait before making another call of the same type. 0 means no wait needed.
|
|
217
|
+
*/
|
|
218
|
+
retryAfter: number;
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
export type GetMyLinkedInProfilePositionStartDate = {
|
|
222
|
+
month: number | null;
|
|
223
|
+
year: number;
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
export type GetMyLinkedInProfilePositionEndDate = {
|
|
227
|
+
month: number | null;
|
|
228
|
+
year: number;
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
export type GetMyLinkedInProfilePosition = {
|
|
232
|
+
companyName: string | null;
|
|
233
|
+
title: string | null;
|
|
234
|
+
companyUrl: string | null;
|
|
235
|
+
companyLogo: string | null;
|
|
236
|
+
startDate: GetMyLinkedInProfilePositionStartDate | null;
|
|
237
|
+
endDate: GetMyLinkedInProfilePositionEndDate | null;
|
|
238
|
+
isCurrent: boolean;
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
export type GetMyLinkedInProfileEducationStartDate = {
|
|
242
|
+
month: number | null;
|
|
243
|
+
year: number;
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
export type GetMyLinkedInProfileEducationEndDate = {
|
|
247
|
+
month: number | null;
|
|
248
|
+
year: number;
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
export type GetMyLinkedInProfileEducation = {
|
|
252
|
+
schoolName: string | null;
|
|
253
|
+
degreeName: string | null;
|
|
254
|
+
fieldOfStudy: string | null;
|
|
255
|
+
schoolUrl: string | null;
|
|
256
|
+
schoolLogo: string | null;
|
|
257
|
+
startDate: GetMyLinkedInProfileEducationStartDate | null;
|
|
258
|
+
endDate: GetMyLinkedInProfileEducationEndDate | null;
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Profile location
|
|
263
|
+
*/
|
|
264
|
+
export type GetMyLinkedInProfileLocation = {
|
|
265
|
+
countryCode: string;
|
|
266
|
+
postalCode?: string | undefined;
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
export const GetMyLinkedInProfileType = {
|
|
270
|
+
Activity: "activity",
|
|
271
|
+
UgcPost: "ugcPost",
|
|
272
|
+
Share: "share",
|
|
273
|
+
} as const;
|
|
274
|
+
export type GetMyLinkedInProfileType = OpenEnum<
|
|
275
|
+
typeof GetMyLinkedInProfileType
|
|
276
|
+
>;
|
|
277
|
+
|
|
278
|
+
export type GetMyLinkedInProfileLastPost = {
|
|
279
|
+
postUrl: string;
|
|
280
|
+
text: string;
|
|
281
|
+
date: number;
|
|
282
|
+
likesCount: number;
|
|
283
|
+
commentsCount: number;
|
|
284
|
+
sharesCount: number;
|
|
285
|
+
postUrn: string;
|
|
286
|
+
postId: string;
|
|
287
|
+
type: GetMyLinkedInProfileType;
|
|
288
|
+
};
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Stored LinkedIn profile data
|
|
292
|
+
*/
|
|
293
|
+
export type GetMyLinkedInProfileResponse = {
|
|
294
|
+
success: boolean;
|
|
295
|
+
/**
|
|
296
|
+
* LinkedIn vanity name (e.g., 'alexandre-sarfati')
|
|
297
|
+
*/
|
|
298
|
+
linkedinProfileId: string | null;
|
|
299
|
+
/**
|
|
300
|
+
* Full name from LinkedIn
|
|
301
|
+
*/
|
|
302
|
+
linkedinName: string | null;
|
|
303
|
+
/**
|
|
304
|
+
* Email from LinkedIn profile
|
|
305
|
+
*/
|
|
306
|
+
linkedinEmail: string | null;
|
|
307
|
+
/**
|
|
308
|
+
* LinkedIn profile URN
|
|
309
|
+
*/
|
|
310
|
+
profileUrn: string | null;
|
|
311
|
+
/**
|
|
312
|
+
* LinkedIn headline
|
|
313
|
+
*/
|
|
314
|
+
headline: string | null;
|
|
315
|
+
/**
|
|
316
|
+
* Profile picture URL
|
|
317
|
+
*/
|
|
318
|
+
profilePic: string | null;
|
|
319
|
+
/**
|
|
320
|
+
* Full LinkedIn profile URL
|
|
321
|
+
*/
|
|
322
|
+
profileUrl: string | null;
|
|
323
|
+
/**
|
|
324
|
+
* Work positions (populated after /refresh)
|
|
325
|
+
*/
|
|
326
|
+
positions?: Array<GetMyLinkedInProfilePosition> | undefined;
|
|
327
|
+
/**
|
|
328
|
+
* Education entries (populated after /refresh)
|
|
329
|
+
*/
|
|
330
|
+
educations?: Array<GetMyLinkedInProfileEducation> | undefined;
|
|
331
|
+
/**
|
|
332
|
+
* Total LinkedIn connections
|
|
333
|
+
*/
|
|
334
|
+
connectionsCount?: number | null | undefined;
|
|
335
|
+
/**
|
|
336
|
+
* Profile location
|
|
337
|
+
*/
|
|
338
|
+
location?: GetMyLinkedInProfileLocation | null | undefined;
|
|
339
|
+
/**
|
|
340
|
+
* LinkedIn verification status
|
|
341
|
+
*/
|
|
342
|
+
isVerified?: boolean | undefined;
|
|
343
|
+
/**
|
|
344
|
+
* Last 5 posts (populated when posts have been fetched via /me/linkedin/posts)
|
|
345
|
+
*/
|
|
346
|
+
lastPosts?: Array<GetMyLinkedInProfileLastPost> | undefined;
|
|
347
|
+
/**
|
|
348
|
+
* Credits consumed by this call (0 for free endpoints, cached results, or duplicates).
|
|
349
|
+
*/
|
|
350
|
+
creditsUsed: number;
|
|
351
|
+
/**
|
|
352
|
+
* Seconds to wait before making another call of the same type. 0 means no wait needed.
|
|
353
|
+
*/
|
|
354
|
+
retryAfter: number;
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
export type RefreshMyLinkedInProfilePositionStartDate = {
|
|
358
|
+
month: number | null;
|
|
359
|
+
year: number;
|
|
360
|
+
};
|
|
361
|
+
|
|
362
|
+
export type RefreshMyLinkedInProfilePositionEndDate = {
|
|
363
|
+
month: number | null;
|
|
364
|
+
year: number;
|
|
365
|
+
};
|
|
366
|
+
|
|
367
|
+
export type RefreshMyLinkedInProfilePosition = {
|
|
368
|
+
companyName: string | null;
|
|
369
|
+
title: string | null;
|
|
370
|
+
companyUrl: string | null;
|
|
371
|
+
companyLogo: string | null;
|
|
372
|
+
startDate: RefreshMyLinkedInProfilePositionStartDate | null;
|
|
373
|
+
endDate: RefreshMyLinkedInProfilePositionEndDate | null;
|
|
374
|
+
isCurrent: boolean;
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
export type RefreshMyLinkedInProfileEducationStartDate = {
|
|
378
|
+
month: number | null;
|
|
379
|
+
year: number;
|
|
380
|
+
};
|
|
381
|
+
|
|
382
|
+
export type RefreshMyLinkedInProfileEducationEndDate = {
|
|
383
|
+
month: number | null;
|
|
384
|
+
year: number;
|
|
385
|
+
};
|
|
386
|
+
|
|
387
|
+
export type RefreshMyLinkedInProfileEducation = {
|
|
388
|
+
schoolName: string | null;
|
|
389
|
+
degreeName: string | null;
|
|
390
|
+
fieldOfStudy: string | null;
|
|
391
|
+
schoolUrl: string | null;
|
|
392
|
+
schoolLogo: string | null;
|
|
393
|
+
startDate: RefreshMyLinkedInProfileEducationStartDate | null;
|
|
394
|
+
endDate: RefreshMyLinkedInProfileEducationEndDate | null;
|
|
395
|
+
};
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* Profile location
|
|
399
|
+
*/
|
|
400
|
+
export type RefreshMyLinkedInProfileLocation = {
|
|
401
|
+
countryCode: string;
|
|
402
|
+
postalCode?: string | undefined;
|
|
403
|
+
};
|
|
404
|
+
|
|
405
|
+
export const RefreshMyLinkedInProfileType = {
|
|
406
|
+
Activity: "activity",
|
|
407
|
+
UgcPost: "ugcPost",
|
|
408
|
+
Share: "share",
|
|
409
|
+
} as const;
|
|
410
|
+
export type RefreshMyLinkedInProfileType = OpenEnum<
|
|
411
|
+
typeof RefreshMyLinkedInProfileType
|
|
412
|
+
>;
|
|
413
|
+
|
|
414
|
+
export type RefreshMyLinkedInProfileLastPost = {
|
|
415
|
+
postUrl: string;
|
|
416
|
+
text: string;
|
|
417
|
+
date: number;
|
|
418
|
+
likesCount: number;
|
|
419
|
+
commentsCount: number;
|
|
420
|
+
sharesCount: number;
|
|
421
|
+
postUrn: string;
|
|
422
|
+
postId: string;
|
|
423
|
+
type: RefreshMyLinkedInProfileType;
|
|
424
|
+
};
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* Refreshed LinkedIn profile data
|
|
428
|
+
*/
|
|
429
|
+
export type RefreshMyLinkedInProfileResponse = {
|
|
430
|
+
success: boolean;
|
|
431
|
+
/**
|
|
432
|
+
* LinkedIn vanity name (e.g., 'alexandre-sarfati')
|
|
433
|
+
*/
|
|
434
|
+
linkedinProfileId: string | null;
|
|
435
|
+
/**
|
|
436
|
+
* Full name from LinkedIn
|
|
437
|
+
*/
|
|
438
|
+
linkedinName: string | null;
|
|
439
|
+
/**
|
|
440
|
+
* Email from LinkedIn profile
|
|
441
|
+
*/
|
|
442
|
+
linkedinEmail: string | null;
|
|
443
|
+
/**
|
|
444
|
+
* LinkedIn profile URN
|
|
445
|
+
*/
|
|
446
|
+
profileUrn: string | null;
|
|
447
|
+
/**
|
|
448
|
+
* LinkedIn headline
|
|
449
|
+
*/
|
|
450
|
+
headline: string | null;
|
|
451
|
+
/**
|
|
452
|
+
* Profile picture URL
|
|
453
|
+
*/
|
|
454
|
+
profilePic: string | null;
|
|
455
|
+
/**
|
|
456
|
+
* Full LinkedIn profile URL
|
|
457
|
+
*/
|
|
458
|
+
profileUrl: string | null;
|
|
459
|
+
/**
|
|
460
|
+
* Work positions (populated after /refresh)
|
|
461
|
+
*/
|
|
462
|
+
positions?: Array<RefreshMyLinkedInProfilePosition> | undefined;
|
|
463
|
+
/**
|
|
464
|
+
* Education entries (populated after /refresh)
|
|
465
|
+
*/
|
|
466
|
+
educations?: Array<RefreshMyLinkedInProfileEducation> | undefined;
|
|
467
|
+
/**
|
|
468
|
+
* Total LinkedIn connections
|
|
469
|
+
*/
|
|
470
|
+
connectionsCount?: number | null | undefined;
|
|
471
|
+
/**
|
|
472
|
+
* Profile location
|
|
473
|
+
*/
|
|
474
|
+
location?: RefreshMyLinkedInProfileLocation | null | undefined;
|
|
475
|
+
/**
|
|
476
|
+
* LinkedIn verification status
|
|
477
|
+
*/
|
|
478
|
+
isVerified?: boolean | undefined;
|
|
479
|
+
/**
|
|
480
|
+
* Last 5 posts (populated when posts have been fetched via /me/linkedin/posts)
|
|
481
|
+
*/
|
|
482
|
+
lastPosts?: Array<RefreshMyLinkedInProfileLastPost> | undefined;
|
|
483
|
+
refreshed: boolean;
|
|
484
|
+
/**
|
|
485
|
+
* Credits consumed by this call (0 for free endpoints, cached results, or duplicates).
|
|
486
|
+
*/
|
|
487
|
+
creditsUsed: number;
|
|
488
|
+
/**
|
|
489
|
+
* Seconds to wait before making another call of the same type. 0 means no wait needed.
|
|
490
|
+
*/
|
|
491
|
+
retryAfter: number;
|
|
492
|
+
};
|
|
493
|
+
|
|
494
|
+
export type GetMyLinkedInPostsRequest = {
|
|
495
|
+
/**
|
|
496
|
+
* Number of posts to fetch (default 20, max 100).
|
|
497
|
+
*/
|
|
498
|
+
count?: number | undefined;
|
|
499
|
+
/**
|
|
500
|
+
* Pagination offset (default 0).
|
|
501
|
+
*/
|
|
502
|
+
start?: number | undefined;
|
|
503
|
+
/**
|
|
504
|
+
* Pagination token from a previous response to fetch the next page.
|
|
505
|
+
*/
|
|
506
|
+
paginationToken?: string | undefined;
|
|
507
|
+
};
|
|
508
|
+
|
|
509
|
+
export const GetMyLinkedInPostsType = {
|
|
510
|
+
Activity: "activity",
|
|
511
|
+
UgcPost: "ugcPost",
|
|
512
|
+
Share: "share",
|
|
513
|
+
} as const;
|
|
514
|
+
export type GetMyLinkedInPostsType = OpenEnum<typeof GetMyLinkedInPostsType>;
|
|
515
|
+
|
|
516
|
+
export type GetMyLinkedInPostsPost = {
|
|
517
|
+
postUrl: string;
|
|
518
|
+
text: string;
|
|
519
|
+
date: number;
|
|
520
|
+
likesCount: number;
|
|
521
|
+
commentsCount: number;
|
|
522
|
+
sharesCount: number;
|
|
523
|
+
postUrn: string;
|
|
524
|
+
postId: string;
|
|
525
|
+
type: GetMyLinkedInPostsType;
|
|
526
|
+
};
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* Paginated list of the user's own posts
|
|
530
|
+
*/
|
|
531
|
+
export type GetMyLinkedInPostsResponse = {
|
|
532
|
+
success: boolean;
|
|
533
|
+
posts: Array<GetMyLinkedInPostsPost>;
|
|
534
|
+
count: number;
|
|
535
|
+
total: number;
|
|
536
|
+
start: number;
|
|
537
|
+
hasMore: boolean;
|
|
538
|
+
paginationToken: string | null;
|
|
539
|
+
/**
|
|
540
|
+
* Credits consumed by this call (0 for free endpoints, cached results, or duplicates).
|
|
541
|
+
*/
|
|
542
|
+
creditsUsed: number;
|
|
543
|
+
/**
|
|
544
|
+
* Seconds to wait before making another call of the same type. 0 means no wait needed.
|
|
545
|
+
*/
|
|
546
|
+
retryAfter: number;
|
|
547
|
+
};
|
|
548
|
+
|
|
549
|
+
export type GetMyLinkedInFollowersRequest = {
|
|
550
|
+
/**
|
|
551
|
+
* Pagination offset (default 0).
|
|
552
|
+
*/
|
|
553
|
+
start?: number | undefined;
|
|
554
|
+
/**
|
|
555
|
+
* Number of followers to fetch per page (default 10, max 50).
|
|
556
|
+
*/
|
|
557
|
+
count?: number | undefined;
|
|
558
|
+
};
|
|
559
|
+
|
|
560
|
+
export type Follower = {
|
|
561
|
+
name: string;
|
|
562
|
+
headline: string | null;
|
|
563
|
+
profileUrl: string | null;
|
|
564
|
+
profilePicture: string | null;
|
|
565
|
+
followerCount: number | null;
|
|
566
|
+
/**
|
|
567
|
+
* Whether you follow this person back
|
|
568
|
+
*/
|
|
569
|
+
following: boolean;
|
|
570
|
+
};
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* Paginated list of followers
|
|
574
|
+
*/
|
|
575
|
+
export type GetMyLinkedInFollowersResponse = {
|
|
576
|
+
success: boolean;
|
|
577
|
+
followers: Array<Follower>;
|
|
578
|
+
count: number;
|
|
579
|
+
/**
|
|
580
|
+
* Total reported by LinkedIn (capped at ~1000)
|
|
581
|
+
*/
|
|
582
|
+
totalFollowers: number;
|
|
583
|
+
start: number;
|
|
584
|
+
hasMore: boolean;
|
|
585
|
+
/**
|
|
586
|
+
* Credits consumed by this call (0 for free endpoints, cached results, or duplicates).
|
|
587
|
+
*/
|
|
588
|
+
creditsUsed: number;
|
|
589
|
+
/**
|
|
590
|
+
* Seconds to wait before making another call of the same type. 0 means no wait needed.
|
|
591
|
+
*/
|
|
592
|
+
retryAfter: number;
|
|
593
|
+
};
|
|
594
|
+
|
|
595
|
+
/**
|
|
596
|
+
* Daily usage counter (resets at midnight UTC)
|
|
597
|
+
*/
|
|
598
|
+
export type ConnectionRequestDaily = {
|
|
599
|
+
/**
|
|
600
|
+
* Number of actions used in this window
|
|
601
|
+
*/
|
|
602
|
+
current: number;
|
|
603
|
+
/**
|
|
604
|
+
* Maximum allowed actions in this window (with multiplier applied)
|
|
605
|
+
*/
|
|
606
|
+
limit: number;
|
|
607
|
+
/**
|
|
608
|
+
* Actions remaining before hitting the limit
|
|
609
|
+
*/
|
|
610
|
+
remaining: number;
|
|
611
|
+
};
|
|
612
|
+
|
|
613
|
+
/**
|
|
614
|
+
* Weekly usage counter (resets Monday 00:00 UTC). Null if no weekly cap for this action type.
|
|
615
|
+
*/
|
|
616
|
+
export type ConnectionRequestWeekly = {
|
|
617
|
+
/**
|
|
618
|
+
* Number of actions used in this window
|
|
619
|
+
*/
|
|
620
|
+
current: number;
|
|
621
|
+
/**
|
|
622
|
+
* Maximum allowed actions in this window (with multiplier applied)
|
|
623
|
+
*/
|
|
624
|
+
limit: number;
|
|
625
|
+
/**
|
|
626
|
+
* Actions remaining before hitting the limit
|
|
627
|
+
*/
|
|
628
|
+
remaining: number;
|
|
629
|
+
};
|
|
630
|
+
|
|
631
|
+
/**
|
|
632
|
+
* Limits for sending LinkedIn connection requests
|
|
633
|
+
*/
|
|
634
|
+
export type ConnectionRequest = {
|
|
635
|
+
/**
|
|
636
|
+
* Daily usage counter (resets at midnight UTC)
|
|
637
|
+
*/
|
|
638
|
+
daily: ConnectionRequestDaily;
|
|
639
|
+
/**
|
|
640
|
+
* Weekly usage counter (resets Monday 00:00 UTC). Null if no weekly cap for this action type.
|
|
641
|
+
*/
|
|
642
|
+
weekly: ConnectionRequestWeekly | null;
|
|
643
|
+
/**
|
|
644
|
+
* Minimum delay in seconds required between two consecutive actions of this type
|
|
645
|
+
*/
|
|
646
|
+
minIntervalSeconds: number;
|
|
647
|
+
/**
|
|
648
|
+
* ISO 8601 timestamp of the next daily counter reset
|
|
649
|
+
*/
|
|
650
|
+
nextResetDaily: Date;
|
|
651
|
+
/**
|
|
652
|
+
* ISO 8601 timestamp of the next weekly counter reset. Null if no weekly cap.
|
|
653
|
+
*/
|
|
654
|
+
nextResetWeekly: Date | null;
|
|
655
|
+
};
|
|
656
|
+
|
|
657
|
+
/**
|
|
658
|
+
* Daily usage counter (resets at midnight UTC)
|
|
659
|
+
*/
|
|
660
|
+
export type MessageDaily = {
|
|
661
|
+
/**
|
|
662
|
+
* Number of actions used in this window
|
|
663
|
+
*/
|
|
664
|
+
current: number;
|
|
665
|
+
/**
|
|
666
|
+
* Maximum allowed actions in this window (with multiplier applied)
|
|
667
|
+
*/
|
|
668
|
+
limit: number;
|
|
669
|
+
/**
|
|
670
|
+
* Actions remaining before hitting the limit
|
|
671
|
+
*/
|
|
672
|
+
remaining: number;
|
|
673
|
+
};
|
|
674
|
+
|
|
675
|
+
/**
|
|
676
|
+
* Weekly usage counter (resets Monday 00:00 UTC). Null if no weekly cap for this action type.
|
|
677
|
+
*/
|
|
678
|
+
export type MessageWeekly = {
|
|
679
|
+
/**
|
|
680
|
+
* Number of actions used in this window
|
|
681
|
+
*/
|
|
682
|
+
current: number;
|
|
683
|
+
/**
|
|
684
|
+
* Maximum allowed actions in this window (with multiplier applied)
|
|
685
|
+
*/
|
|
686
|
+
limit: number;
|
|
687
|
+
/**
|
|
688
|
+
* Actions remaining before hitting the limit
|
|
689
|
+
*/
|
|
690
|
+
remaining: number;
|
|
691
|
+
};
|
|
692
|
+
|
|
693
|
+
/**
|
|
694
|
+
* Limits for social engagement actions: sending messages, publishing posts, replying to comments, liking comments
|
|
695
|
+
*/
|
|
696
|
+
export type GetMyLimitsMessage = {
|
|
697
|
+
/**
|
|
698
|
+
* Daily usage counter (resets at midnight UTC)
|
|
699
|
+
*/
|
|
700
|
+
daily: MessageDaily;
|
|
701
|
+
/**
|
|
702
|
+
* Weekly usage counter (resets Monday 00:00 UTC). Null if no weekly cap for this action type.
|
|
703
|
+
*/
|
|
704
|
+
weekly: MessageWeekly | null;
|
|
705
|
+
/**
|
|
706
|
+
* Minimum delay in seconds required between two consecutive actions of this type
|
|
707
|
+
*/
|
|
708
|
+
minIntervalSeconds: number;
|
|
709
|
+
/**
|
|
710
|
+
* ISO 8601 timestamp of the next daily counter reset
|
|
711
|
+
*/
|
|
712
|
+
nextResetDaily: Date;
|
|
713
|
+
/**
|
|
714
|
+
* ISO 8601 timestamp of the next weekly counter reset. Null if no weekly cap.
|
|
715
|
+
*/
|
|
716
|
+
nextResetWeekly: Date | null;
|
|
717
|
+
};
|
|
718
|
+
|
|
719
|
+
/**
|
|
720
|
+
* Daily usage counter (resets at midnight UTC)
|
|
721
|
+
*/
|
|
722
|
+
export type ProfileVisitDaily = {
|
|
723
|
+
/**
|
|
724
|
+
* Number of actions used in this window
|
|
725
|
+
*/
|
|
726
|
+
current: number;
|
|
727
|
+
/**
|
|
728
|
+
* Maximum allowed actions in this window (with multiplier applied)
|
|
729
|
+
*/
|
|
730
|
+
limit: number;
|
|
731
|
+
/**
|
|
732
|
+
* Actions remaining before hitting the limit
|
|
733
|
+
*/
|
|
734
|
+
remaining: number;
|
|
735
|
+
};
|
|
736
|
+
|
|
737
|
+
/**
|
|
738
|
+
* Weekly usage counter (resets Monday 00:00 UTC). Null if no weekly cap for this action type.
|
|
739
|
+
*/
|
|
740
|
+
export type ProfileVisitWeekly = {
|
|
741
|
+
/**
|
|
742
|
+
* Number of actions used in this window
|
|
743
|
+
*/
|
|
744
|
+
current: number;
|
|
745
|
+
/**
|
|
746
|
+
* Maximum allowed actions in this window (with multiplier applied)
|
|
747
|
+
*/
|
|
748
|
+
limit: number;
|
|
749
|
+
/**
|
|
750
|
+
* Actions remaining before hitting the limit
|
|
751
|
+
*/
|
|
752
|
+
remaining: number;
|
|
753
|
+
};
|
|
754
|
+
|
|
755
|
+
/**
|
|
756
|
+
* Limits for visiting LinkedIn profiles and company pages
|
|
757
|
+
*/
|
|
758
|
+
export type ProfileVisit = {
|
|
759
|
+
/**
|
|
760
|
+
* Daily usage counter (resets at midnight UTC)
|
|
761
|
+
*/
|
|
762
|
+
daily: ProfileVisitDaily;
|
|
763
|
+
/**
|
|
764
|
+
* Weekly usage counter (resets Monday 00:00 UTC). Null if no weekly cap for this action type.
|
|
765
|
+
*/
|
|
766
|
+
weekly: ProfileVisitWeekly | null;
|
|
767
|
+
/**
|
|
768
|
+
* Minimum delay in seconds required between two consecutive actions of this type
|
|
769
|
+
*/
|
|
770
|
+
minIntervalSeconds: number;
|
|
771
|
+
/**
|
|
772
|
+
* ISO 8601 timestamp of the next daily counter reset
|
|
773
|
+
*/
|
|
774
|
+
nextResetDaily: Date;
|
|
775
|
+
/**
|
|
776
|
+
* ISO 8601 timestamp of the next weekly counter reset. Null if no weekly cap.
|
|
777
|
+
*/
|
|
778
|
+
nextResetWeekly: Date | null;
|
|
779
|
+
};
|
|
780
|
+
|
|
781
|
+
/**
|
|
782
|
+
* Daily usage counter (resets at midnight UTC)
|
|
783
|
+
*/
|
|
784
|
+
export type ScrapingDaily = {
|
|
785
|
+
/**
|
|
786
|
+
* Number of actions used in this window
|
|
787
|
+
*/
|
|
788
|
+
current: number;
|
|
789
|
+
/**
|
|
790
|
+
* Maximum allowed actions in this window (with multiplier applied)
|
|
791
|
+
*/
|
|
792
|
+
limit: number;
|
|
793
|
+
/**
|
|
794
|
+
* Actions remaining before hitting the limit
|
|
795
|
+
*/
|
|
796
|
+
remaining: number;
|
|
797
|
+
};
|
|
798
|
+
|
|
799
|
+
/**
|
|
800
|
+
* Weekly usage counter (resets Monday 00:00 UTC). Null if no weekly cap for this action type.
|
|
801
|
+
*/
|
|
802
|
+
export type ScrapingWeekly = {
|
|
803
|
+
/**
|
|
804
|
+
* Number of actions used in this window
|
|
805
|
+
*/
|
|
806
|
+
current: number;
|
|
807
|
+
/**
|
|
808
|
+
* Maximum allowed actions in this window (with multiplier applied)
|
|
809
|
+
*/
|
|
810
|
+
limit: number;
|
|
811
|
+
/**
|
|
812
|
+
* Actions remaining before hitting the limit
|
|
813
|
+
*/
|
|
814
|
+
remaining: number;
|
|
815
|
+
};
|
|
816
|
+
|
|
817
|
+
/**
|
|
818
|
+
* Limits for data collection: search, collecting posts/likes/comments, fetching followers, listing chats
|
|
819
|
+
*/
|
|
820
|
+
export type Scraping = {
|
|
821
|
+
/**
|
|
822
|
+
* Daily usage counter (resets at midnight UTC)
|
|
823
|
+
*/
|
|
824
|
+
daily: ScrapingDaily;
|
|
825
|
+
/**
|
|
826
|
+
* Weekly usage counter (resets Monday 00:00 UTC). Null if no weekly cap for this action type.
|
|
827
|
+
*/
|
|
828
|
+
weekly: ScrapingWeekly | null;
|
|
829
|
+
/**
|
|
830
|
+
* Minimum delay in seconds required between two consecutive actions of this type
|
|
831
|
+
*/
|
|
832
|
+
minIntervalSeconds: number;
|
|
833
|
+
/**
|
|
834
|
+
* ISO 8601 timestamp of the next daily counter reset
|
|
835
|
+
*/
|
|
836
|
+
nextResetDaily: Date;
|
|
837
|
+
/**
|
|
838
|
+
* ISO 8601 timestamp of the next weekly counter reset. Null if no weekly cap.
|
|
839
|
+
*/
|
|
840
|
+
nextResetWeekly: Date | null;
|
|
841
|
+
};
|
|
842
|
+
|
|
843
|
+
export type Limits = {
|
|
844
|
+
/**
|
|
845
|
+
* Limits for sending LinkedIn connection requests
|
|
846
|
+
*/
|
|
847
|
+
connectionRequest: ConnectionRequest;
|
|
848
|
+
/**
|
|
849
|
+
* Limits for social engagement actions: sending messages, publishing posts, replying to comments, liking comments
|
|
850
|
+
*/
|
|
851
|
+
message: GetMyLimitsMessage;
|
|
852
|
+
/**
|
|
853
|
+
* Limits for visiting LinkedIn profiles and company pages
|
|
854
|
+
*/
|
|
855
|
+
profileVisit: ProfileVisit;
|
|
856
|
+
/**
|
|
857
|
+
* Limits for data collection: search, collecting posts/likes/comments, fetching followers, listing chats
|
|
858
|
+
*/
|
|
859
|
+
scraping: Scraping;
|
|
860
|
+
};
|
|
861
|
+
|
|
862
|
+
/**
|
|
863
|
+
* Rate limit status for all action types
|
|
864
|
+
*/
|
|
865
|
+
export type GetMyLimitsResponse = {
|
|
866
|
+
success: boolean;
|
|
867
|
+
/**
|
|
868
|
+
* Workspace limit multiplier applied to all base limits (default 1.0)
|
|
869
|
+
*/
|
|
870
|
+
multiplier: number;
|
|
871
|
+
limits: Limits;
|
|
872
|
+
/**
|
|
873
|
+
* Credits consumed by this call (0 for free endpoints, cached results, or duplicates).
|
|
874
|
+
*/
|
|
875
|
+
creditsUsed: number;
|
|
876
|
+
/**
|
|
877
|
+
* Seconds to wait before making another call of the same type. 0 means no wait needed.
|
|
878
|
+
*/
|
|
879
|
+
retryAfter: number;
|
|
880
|
+
};
|
|
881
|
+
|
|
882
|
+
export type Credits = {
|
|
883
|
+
/**
|
|
884
|
+
* Number of credits used in the current billing period
|
|
885
|
+
*/
|
|
886
|
+
current: number;
|
|
887
|
+
/**
|
|
888
|
+
* Maximum credits available for the workspace
|
|
889
|
+
*/
|
|
890
|
+
limit: number;
|
|
891
|
+
/**
|
|
892
|
+
* Credits remaining before hitting the limit
|
|
893
|
+
*/
|
|
894
|
+
remaining: number;
|
|
895
|
+
/**
|
|
896
|
+
* Percentage of credits used (0-100, rounded to 2 decimal places)
|
|
897
|
+
*/
|
|
898
|
+
percentage: number;
|
|
899
|
+
};
|
|
900
|
+
|
|
901
|
+
/**
|
|
902
|
+
* Credit balance for the workspace
|
|
903
|
+
*/
|
|
904
|
+
export type GetMyCreditsResponse = {
|
|
905
|
+
success: boolean;
|
|
906
|
+
credits: Credits;
|
|
907
|
+
/**
|
|
908
|
+
* Credits consumed by this call (0 for free endpoints, cached results, or duplicates).
|
|
909
|
+
*/
|
|
910
|
+
creditsUsed: number;
|
|
911
|
+
/**
|
|
912
|
+
* Seconds to wait before making another call of the same type. 0 means no wait needed.
|
|
913
|
+
*/
|
|
914
|
+
retryAfter: number;
|
|
915
|
+
};
|
|
916
|
+
|
|
917
|
+
export type ListInboxConversationsRequest = {
|
|
918
|
+
/**
|
|
919
|
+
* Pagination cursor from a previous response
|
|
920
|
+
*/
|
|
921
|
+
nextCursor?: string | undefined;
|
|
922
|
+
};
|
|
923
|
+
|
|
924
|
+
export type ListInboxConversationsParticipant = {
|
|
925
|
+
profileUrn: string;
|
|
926
|
+
firstName: string;
|
|
927
|
+
lastName: string;
|
|
928
|
+
profileUrl: string;
|
|
929
|
+
headline: string | null;
|
|
930
|
+
profilePicture: string | null;
|
|
931
|
+
};
|
|
932
|
+
|
|
933
|
+
export type ListInboxConversationsLastMessage = {
|
|
934
|
+
text: string;
|
|
935
|
+
deliveredAt: number;
|
|
936
|
+
senderProfileUrn: string;
|
|
937
|
+
};
|
|
938
|
+
|
|
939
|
+
export type ListInboxConversationsConversation = {
|
|
940
|
+
conversationUrn: string;
|
|
941
|
+
conversationUrl: string;
|
|
942
|
+
lastActivityAt: number;
|
|
943
|
+
createdAt: number;
|
|
944
|
+
read: boolean;
|
|
945
|
+
unreadCount: number;
|
|
946
|
+
groupChat: boolean;
|
|
947
|
+
participants: Array<ListInboxConversationsParticipant>;
|
|
948
|
+
lastMessage: ListInboxConversationsLastMessage | null;
|
|
949
|
+
};
|
|
950
|
+
|
|
951
|
+
/**
|
|
952
|
+
* Inbox conversations
|
|
953
|
+
*/
|
|
954
|
+
export type ListInboxConversationsResponse = {
|
|
955
|
+
success: boolean;
|
|
956
|
+
conversations: Array<ListInboxConversationsConversation>;
|
|
957
|
+
/**
|
|
958
|
+
* Cursor for fetching next page
|
|
959
|
+
*/
|
|
960
|
+
nextCursor: string | null;
|
|
961
|
+
/**
|
|
962
|
+
* Credits consumed by this call (0 for free endpoints, cached results, or duplicates).
|
|
963
|
+
*/
|
|
964
|
+
creditsUsed: number;
|
|
965
|
+
/**
|
|
966
|
+
* Seconds to wait before making another call of the same type. 0 means no wait needed.
|
|
967
|
+
*/
|
|
968
|
+
retryAfter: number;
|
|
969
|
+
};
|
|
970
|
+
|
|
971
|
+
export type SearchLinkedInConversationsRequest = {
|
|
972
|
+
/**
|
|
973
|
+
* Search keywords
|
|
974
|
+
*/
|
|
975
|
+
keywords: string;
|
|
976
|
+
/**
|
|
977
|
+
* Pagination cursor from a previous response
|
|
978
|
+
*/
|
|
979
|
+
nextCursor?: string | undefined;
|
|
980
|
+
};
|
|
981
|
+
|
|
982
|
+
export type SearchLinkedInConversationsParticipant = {
|
|
983
|
+
profileUrn: string;
|
|
984
|
+
firstName: string;
|
|
985
|
+
lastName: string;
|
|
986
|
+
profileUrl: string;
|
|
987
|
+
headline: string | null;
|
|
988
|
+
profilePicture: string | null;
|
|
989
|
+
};
|
|
990
|
+
|
|
991
|
+
export type SearchLinkedInConversationsLastMessage = {
|
|
992
|
+
text: string;
|
|
993
|
+
deliveredAt: number;
|
|
994
|
+
senderProfileUrn: string;
|
|
995
|
+
};
|
|
996
|
+
|
|
997
|
+
export type SearchLinkedInConversationsConversation = {
|
|
998
|
+
conversationUrn: string;
|
|
999
|
+
conversationUrl: string;
|
|
1000
|
+
lastActivityAt: number;
|
|
1001
|
+
createdAt: number;
|
|
1002
|
+
read: boolean;
|
|
1003
|
+
unreadCount: number;
|
|
1004
|
+
groupChat: boolean;
|
|
1005
|
+
participants: Array<SearchLinkedInConversationsParticipant>;
|
|
1006
|
+
lastMessage: SearchLinkedInConversationsLastMessage | null;
|
|
1007
|
+
};
|
|
1008
|
+
|
|
1009
|
+
/**
|
|
1010
|
+
* Matching conversations
|
|
1011
|
+
*/
|
|
1012
|
+
export type SearchLinkedInConversationsResponse = {
|
|
1013
|
+
success: boolean;
|
|
1014
|
+
conversations: Array<SearchLinkedInConversationsConversation>;
|
|
1015
|
+
/**
|
|
1016
|
+
* Cursor for fetching next page
|
|
1017
|
+
*/
|
|
1018
|
+
nextCursor: string | null;
|
|
1019
|
+
/**
|
|
1020
|
+
* Credits consumed by this call (0 for free endpoints, cached results, or duplicates).
|
|
1021
|
+
*/
|
|
1022
|
+
creditsUsed: number;
|
|
1023
|
+
/**
|
|
1024
|
+
* Seconds to wait before making another call of the same type. 0 means no wait needed.
|
|
1025
|
+
*/
|
|
1026
|
+
retryAfter: number;
|
|
1027
|
+
};
|
|
1028
|
+
|
|
1029
|
+
export type FindLinkedInConversationRequest = {
|
|
1030
|
+
/**
|
|
1031
|
+
* Profile URL or URN (e.g. 'https://linkedin.com/in/marie-sandre' or 'urn:li:fsd_profile:ACoAA...'). Direct O(1) conversation lookup via LinkedIn's compose API — no search, no inbox scan. 0 credits.
|
|
1032
|
+
*/
|
|
1033
|
+
profile: string;
|
|
1034
|
+
/**
|
|
1035
|
+
* If true, also return the conversation's recent messages (0 extra credits).
|
|
1036
|
+
*/
|
|
1037
|
+
includeMessages?: boolean | undefined;
|
|
1038
|
+
};
|
|
1039
|
+
|
|
1040
|
+
export type FindLinkedInConversationParticipant = {
|
|
1041
|
+
profileUrn: string;
|
|
1042
|
+
firstName: string;
|
|
1043
|
+
lastName: string;
|
|
1044
|
+
profileUrl: string;
|
|
1045
|
+
headline: string | null;
|
|
1046
|
+
profilePicture: string | null;
|
|
1047
|
+
};
|
|
1048
|
+
|
|
1049
|
+
export type FindLinkedInConversationLastMessage = {
|
|
1050
|
+
text: string;
|
|
1051
|
+
deliveredAt: number;
|
|
1052
|
+
senderProfileUrn: string;
|
|
1053
|
+
};
|
|
1054
|
+
|
|
1055
|
+
export type FindLinkedInConversationConversation = {
|
|
1056
|
+
conversationUrn: string;
|
|
1057
|
+
conversationUrl: string;
|
|
1058
|
+
lastActivityAt: number;
|
|
1059
|
+
createdAt: number;
|
|
1060
|
+
read: boolean;
|
|
1061
|
+
unreadCount: number;
|
|
1062
|
+
groupChat: boolean;
|
|
1063
|
+
participants: Array<FindLinkedInConversationParticipant>;
|
|
1064
|
+
lastMessage: FindLinkedInConversationLastMessage | null;
|
|
1065
|
+
};
|
|
1066
|
+
|
|
1067
|
+
export type FindLinkedInConversationSender = {
|
|
1068
|
+
firstName: string;
|
|
1069
|
+
lastName: string;
|
|
1070
|
+
profileUrl: string;
|
|
1071
|
+
headline: string | null;
|
|
1072
|
+
profilePicture: string | null;
|
|
1073
|
+
};
|
|
1074
|
+
|
|
1075
|
+
export const FindLinkedInConversationType = {
|
|
1076
|
+
Audio: "audio",
|
|
1077
|
+
SharedPost: "shared_post",
|
|
1078
|
+
RepliedMessage: "replied_message",
|
|
1079
|
+
Image: "image",
|
|
1080
|
+
File: "file",
|
|
1081
|
+
Unknown: "unknown",
|
|
1082
|
+
} as const;
|
|
1083
|
+
export type FindLinkedInConversationType = OpenEnum<
|
|
1084
|
+
typeof FindLinkedInConversationType
|
|
1085
|
+
>;
|
|
1086
|
+
|
|
1087
|
+
export type FindLinkedInConversationAttachment = {
|
|
1088
|
+
type: FindLinkedInConversationType;
|
|
1089
|
+
audioUrl?: string | undefined;
|
|
1090
|
+
audioDuration?: number | undefined;
|
|
1091
|
+
hostUrn?: string | undefined;
|
|
1092
|
+
repliedText?: string | undefined;
|
|
1093
|
+
repliedSenderName?: string | undefined;
|
|
1094
|
+
imageUrl?: string | undefined;
|
|
1095
|
+
fileName?: string | undefined;
|
|
1096
|
+
fileUrl?: string | undefined;
|
|
1097
|
+
};
|
|
1098
|
+
|
|
1099
|
+
export type FindLinkedInConversationMessage = {
|
|
1100
|
+
messageUrn: string;
|
|
1101
|
+
text: string;
|
|
1102
|
+
deliveredAt: number;
|
|
1103
|
+
senderProfileUrn: string;
|
|
1104
|
+
sender: FindLinkedInConversationSender;
|
|
1105
|
+
attachments: Array<FindLinkedInConversationAttachment>;
|
|
1106
|
+
};
|
|
1107
|
+
|
|
1108
|
+
/**
|
|
1109
|
+
* Conversation found (or not)
|
|
1110
|
+
*/
|
|
1111
|
+
export type FindLinkedInConversationResponse = {
|
|
1112
|
+
success: boolean;
|
|
1113
|
+
found: boolean;
|
|
1114
|
+
conversation: FindLinkedInConversationConversation | null;
|
|
1115
|
+
messages: Array<FindLinkedInConversationMessage> | null;
|
|
1116
|
+
/**
|
|
1117
|
+
* Credits consumed by this call (0 for free endpoints, cached results, or duplicates).
|
|
1118
|
+
*/
|
|
1119
|
+
creditsUsed: number;
|
|
1120
|
+
/**
|
|
1121
|
+
* Seconds to wait before making another call of the same type. 0 means no wait needed.
|
|
1122
|
+
*/
|
|
1123
|
+
retryAfter: number;
|
|
1124
|
+
};
|
|
1125
|
+
|
|
1126
|
+
export type GetConversationMessagesRequest = {
|
|
1127
|
+
/**
|
|
1128
|
+
* Full conversation URN as returned by /chats/linkedin (e.g. 'urn:li:msg_conversation:(urn:li:fsd_profile:ACoAAXXX,2-YWUx...)')
|
|
1129
|
+
*/
|
|
1130
|
+
conversationUrn: string;
|
|
1131
|
+
/**
|
|
1132
|
+
* Timestamp (ms) of the oldest message from previous page — pass this to load older messages
|
|
1133
|
+
*/
|
|
1134
|
+
deliveredAt?: number | undefined;
|
|
1135
|
+
};
|
|
1136
|
+
|
|
1137
|
+
export type GetConversationMessagesSender = {
|
|
1138
|
+
firstName: string;
|
|
1139
|
+
lastName: string;
|
|
1140
|
+
profileUrl: string;
|
|
1141
|
+
headline: string | null;
|
|
1142
|
+
profilePicture: string | null;
|
|
1143
|
+
};
|
|
1144
|
+
|
|
1145
|
+
export const GetConversationMessagesType = {
|
|
1146
|
+
Audio: "audio",
|
|
1147
|
+
SharedPost: "shared_post",
|
|
1148
|
+
RepliedMessage: "replied_message",
|
|
1149
|
+
Image: "image",
|
|
1150
|
+
File: "file",
|
|
1151
|
+
Unknown: "unknown",
|
|
1152
|
+
} as const;
|
|
1153
|
+
export type GetConversationMessagesType = OpenEnum<
|
|
1154
|
+
typeof GetConversationMessagesType
|
|
1155
|
+
>;
|
|
1156
|
+
|
|
1157
|
+
export type GetConversationMessagesAttachment = {
|
|
1158
|
+
type: GetConversationMessagesType;
|
|
1159
|
+
audioUrl?: string | undefined;
|
|
1160
|
+
audioDuration?: number | undefined;
|
|
1161
|
+
hostUrn?: string | undefined;
|
|
1162
|
+
repliedText?: string | undefined;
|
|
1163
|
+
repliedSenderName?: string | undefined;
|
|
1164
|
+
imageUrl?: string | undefined;
|
|
1165
|
+
fileName?: string | undefined;
|
|
1166
|
+
fileUrl?: string | undefined;
|
|
1167
|
+
};
|
|
1168
|
+
|
|
1169
|
+
export type GetConversationMessagesMessage = {
|
|
1170
|
+
messageUrn: string;
|
|
1171
|
+
text: string;
|
|
1172
|
+
deliveredAt: number;
|
|
1173
|
+
senderProfileUrn: string;
|
|
1174
|
+
sender: GetConversationMessagesSender;
|
|
1175
|
+
attachments: Array<GetConversationMessagesAttachment>;
|
|
1176
|
+
};
|
|
1177
|
+
|
|
1178
|
+
/**
|
|
1179
|
+
* Conversation messages
|
|
1180
|
+
*/
|
|
1181
|
+
export type GetConversationMessagesResponse = {
|
|
1182
|
+
success: boolean;
|
|
1183
|
+
messages: Array<GetConversationMessagesMessage>;
|
|
1184
|
+
/**
|
|
1185
|
+
* deliveredAt timestamp (ms) of the oldest message — pass as 'deliveredAt' to load older messages. Null when no more messages.
|
|
1186
|
+
*/
|
|
1187
|
+
prevCursor: number | null;
|
|
1188
|
+
/**
|
|
1189
|
+
* Credits consumed by this call (0 for free endpoints, cached results, or duplicates).
|
|
1190
|
+
*/
|
|
1191
|
+
creditsUsed: number;
|
|
1192
|
+
/**
|
|
1193
|
+
* Seconds to wait before making another call of the same type. 0 means no wait needed.
|
|
1194
|
+
*/
|
|
1195
|
+
retryAfter: number;
|
|
1196
|
+
};
|
|
1197
|
+
|
|
1198
|
+
export type FilterCampaignRequest = {
|
|
1199
|
+
/**
|
|
1200
|
+
* Unique identifier for the automation campaign (e.g., 'lead-magnet-post-12345', 'outreach-webinar-feb')
|
|
1201
|
+
*/
|
|
1202
|
+
campaignSlug: string;
|
|
1203
|
+
/**
|
|
1204
|
+
* Comma-separated list of action slugs to check (e.g., 'send-mp-john-doe,like-comment-abc123')
|
|
1205
|
+
*/
|
|
1206
|
+
actionSlugs: string;
|
|
1207
|
+
};
|
|
1208
|
+
|
|
1209
|
+
export type CheckedSlug = {
|
|
1210
|
+
actionSlug: string;
|
|
1211
|
+
completed: boolean;
|
|
1212
|
+
};
|
|
1213
|
+
|
|
1214
|
+
/**
|
|
1215
|
+
* Filter status with checked slugs
|
|
1216
|
+
*/
|
|
1217
|
+
export type FilterCampaignResponse = {
|
|
1218
|
+
/**
|
|
1219
|
+
* True if all actionSlugs have been completed for this campaign, meaning the entire flow can be skipped
|
|
1220
|
+
*/
|
|
1221
|
+
filtered: boolean;
|
|
1222
|
+
/**
|
|
1223
|
+
* Status of each action slug — completed means the action was already executed for this campaign
|
|
1224
|
+
*/
|
|
1225
|
+
checkedSlugs: Array<CheckedSlug>;
|
|
1226
|
+
/**
|
|
1227
|
+
* Credits consumed by this call (always 0 for campaign queries).
|
|
1228
|
+
*/
|
|
1229
|
+
creditsUsed: number;
|
|
1230
|
+
/**
|
|
1231
|
+
* Seconds to wait before next call of the same type (always 0 for campaign queries).
|
|
1232
|
+
*/
|
|
1233
|
+
retryAfter: number;
|
|
1234
|
+
};
|
|
1235
|
+
|
|
1236
|
+
export type GetCampaignStatusRequestBody = {
|
|
1237
|
+
/**
|
|
1238
|
+
* LinkedIn profile URLs or URNs to check status for within this campaign.
|
|
1239
|
+
*/
|
|
1240
|
+
profiles: Array<string>;
|
|
1241
|
+
};
|
|
1242
|
+
|
|
1243
|
+
export type GetCampaignStatusRequest = {
|
|
1244
|
+
/**
|
|
1245
|
+
* Campaign identifier
|
|
1246
|
+
*/
|
|
1247
|
+
campaignSlug: string;
|
|
1248
|
+
body: GetCampaignStatusRequestBody;
|
|
1249
|
+
};
|
|
1250
|
+
|
|
1251
|
+
export type GetCampaignStatusProfile = {
|
|
1252
|
+
profile: string;
|
|
1253
|
+
message: boolean;
|
|
1254
|
+
reply: boolean;
|
|
1255
|
+
like: boolean;
|
|
1256
|
+
visit: boolean;
|
|
1257
|
+
connect: boolean;
|
|
1258
|
+
};
|
|
1259
|
+
|
|
1260
|
+
/**
|
|
1261
|
+
* Per-profile action completion status
|
|
1262
|
+
*/
|
|
1263
|
+
export type GetCampaignStatusResponse = {
|
|
1264
|
+
success: boolean;
|
|
1265
|
+
profiles: Array<GetCampaignStatusProfile>;
|
|
1266
|
+
/**
|
|
1267
|
+
* Credits consumed by this call (always 0 for campaign queries).
|
|
1268
|
+
*/
|
|
1269
|
+
creditsUsed: number;
|
|
1270
|
+
/**
|
|
1271
|
+
* Seconds to wait before next call of the same type (always 0 for campaign queries).
|
|
1272
|
+
*/
|
|
1273
|
+
retryAfter: number;
|
|
1274
|
+
};
|
|
1275
|
+
|
|
1276
|
+
export const Action = {
|
|
1277
|
+
Message: "message",
|
|
1278
|
+
Reply: "reply",
|
|
1279
|
+
Like: "like",
|
|
1280
|
+
Visit: "visit",
|
|
1281
|
+
Connect: "connect",
|
|
1282
|
+
} as const;
|
|
1283
|
+
export type Action = ClosedEnum<typeof Action>;
|
|
1284
|
+
|
|
1285
|
+
export type SyncCampaignActionsProfile = {
|
|
1286
|
+
/**
|
|
1287
|
+
* LinkedIn profile URL or URN
|
|
1288
|
+
*/
|
|
1289
|
+
profile: string;
|
|
1290
|
+
/**
|
|
1291
|
+
* Action types to mark as completed
|
|
1292
|
+
*/
|
|
1293
|
+
actions: Array<Action>;
|
|
1294
|
+
};
|
|
1295
|
+
|
|
1296
|
+
export type SyncCampaignActionsRequestBody = {
|
|
1297
|
+
/**
|
|
1298
|
+
* Profiles and actions to mark as completed without performing them on LinkedIn.
|
|
1299
|
+
*/
|
|
1300
|
+
profiles: Array<SyncCampaignActionsProfile>;
|
|
1301
|
+
};
|
|
1302
|
+
|
|
1303
|
+
export type SyncCampaignActionsRequest = {
|
|
1304
|
+
/**
|
|
1305
|
+
* Campaign identifier
|
|
1306
|
+
*/
|
|
1307
|
+
campaignSlug: string;
|
|
1308
|
+
body: SyncCampaignActionsRequestBody;
|
|
1309
|
+
};
|
|
1310
|
+
|
|
1311
|
+
export type Synced = {
|
|
1312
|
+
profile: string;
|
|
1313
|
+
actions: { [k: string]: boolean };
|
|
1314
|
+
};
|
|
1315
|
+
|
|
1316
|
+
/**
|
|
1317
|
+
* Actions marked as completed
|
|
1318
|
+
*/
|
|
1319
|
+
export type SyncCampaignActionsResponse = {
|
|
1320
|
+
success: boolean;
|
|
1321
|
+
synced: Array<Synced>;
|
|
1322
|
+
/**
|
|
1323
|
+
* Credits consumed by this call (always 0 for campaign queries).
|
|
1324
|
+
*/
|
|
1325
|
+
creditsUsed: number;
|
|
1326
|
+
/**
|
|
1327
|
+
* Seconds to wait before next call of the same type (always 0 for campaign queries).
|
|
1328
|
+
*/
|
|
1329
|
+
retryAfter: number;
|
|
1330
|
+
};
|
|
1331
|
+
|
|
1332
|
+
export type GetCampaignStatsRequestBody = {};
|
|
1333
|
+
|
|
1334
|
+
export type GetCampaignStatsRequest = {
|
|
1335
|
+
/**
|
|
1336
|
+
* Campaign identifier
|
|
1337
|
+
*/
|
|
1338
|
+
campaignSlug: string;
|
|
1339
|
+
body?: GetCampaignStatsRequestBody | undefined;
|
|
1340
|
+
};
|
|
1341
|
+
|
|
1342
|
+
/**
|
|
1343
|
+
* Aggregate campaign statistics
|
|
1344
|
+
*/
|
|
1345
|
+
export type GetCampaignStatsResponse = {
|
|
1346
|
+
success: boolean;
|
|
1347
|
+
/**
|
|
1348
|
+
* Per-action-type counts (e.g. message: 45, reply: 120)
|
|
1349
|
+
*/
|
|
1350
|
+
stats: { [k: string]: number };
|
|
1351
|
+
/**
|
|
1352
|
+
* Unique profiles processed in this campaign
|
|
1353
|
+
*/
|
|
1354
|
+
totalProfiles: number;
|
|
1355
|
+
/**
|
|
1356
|
+
* Total credits consumed by this campaign (sum of action counts). Also serves as the per-call creditsUsed (always 0 for this endpoint).
|
|
1357
|
+
*/
|
|
1358
|
+
creditsUsed: number;
|
|
1359
|
+
/**
|
|
1360
|
+
* Seconds to wait before next call of the same type (always 0 for campaign queries).
|
|
1361
|
+
*/
|
|
1362
|
+
retryAfter: number;
|
|
1363
|
+
};
|
|
1364
|
+
|
|
1365
|
+
/** @internal */
|
|
1366
|
+
export type ReplyToLinkedInCommentRequest$Outbound = {
|
|
1367
|
+
commentUrn: string;
|
|
1368
|
+
message: string;
|
|
1369
|
+
campaignSlug?: string | undefined;
|
|
1370
|
+
actionSlug?: string | undefined;
|
|
1371
|
+
};
|
|
1372
|
+
|
|
1373
|
+
/** @internal */
|
|
1374
|
+
export const ReplyToLinkedInCommentRequest$outboundSchema: z.ZodMiniType<
|
|
1375
|
+
ReplyToLinkedInCommentRequest$Outbound,
|
|
1376
|
+
ReplyToLinkedInCommentRequest
|
|
1377
|
+
> = z.object({
|
|
1378
|
+
commentUrn: z.string(),
|
|
1379
|
+
message: z.string(),
|
|
1380
|
+
campaignSlug: z.optional(z.string()),
|
|
1381
|
+
actionSlug: z.optional(z.string()),
|
|
1382
|
+
});
|
|
1383
|
+
|
|
1384
|
+
export function replyToLinkedInCommentRequestToJSON(
|
|
1385
|
+
replyToLinkedInCommentRequest: ReplyToLinkedInCommentRequest,
|
|
1386
|
+
): string {
|
|
1387
|
+
return JSON.stringify(
|
|
1388
|
+
ReplyToLinkedInCommentRequest$outboundSchema.parse(
|
|
1389
|
+
replyToLinkedInCommentRequest,
|
|
1390
|
+
),
|
|
1391
|
+
);
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1394
|
+
/** @internal */
|
|
1395
|
+
export const ReplyToLinkedInCommentResponse$inboundSchema: z.ZodMiniType<
|
|
1396
|
+
ReplyToLinkedInCommentResponse,
|
|
1397
|
+
unknown
|
|
1398
|
+
> = z.object({
|
|
1399
|
+
success: types.boolean(),
|
|
1400
|
+
replyUrn: types.optional(types.string()),
|
|
1401
|
+
duplicate: types.optional(types.boolean()),
|
|
1402
|
+
creditsUsed: types.number(),
|
|
1403
|
+
retryAfter: types.number(),
|
|
1404
|
+
});
|
|
1405
|
+
|
|
1406
|
+
export function replyToLinkedInCommentResponseFromJSON(
|
|
1407
|
+
jsonString: string,
|
|
1408
|
+
): SafeParseResult<ReplyToLinkedInCommentResponse, SDKValidationError> {
|
|
1409
|
+
return safeParse(
|
|
1410
|
+
jsonString,
|
|
1411
|
+
(x) => ReplyToLinkedInCommentResponse$inboundSchema.parse(JSON.parse(x)),
|
|
1412
|
+
`Failed to parse 'ReplyToLinkedInCommentResponse' from JSON`,
|
|
1413
|
+
);
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
/** @internal */
|
|
1417
|
+
export const ReactionType$outboundSchema: z.ZodMiniEnum<typeof ReactionType> = z
|
|
1418
|
+
.enum(ReactionType);
|
|
1419
|
+
|
|
1420
|
+
/** @internal */
|
|
1421
|
+
export type LikeLinkedInCommentRequest$Outbound = {
|
|
1422
|
+
commentUrn: string;
|
|
1423
|
+
reactionType: string;
|
|
1424
|
+
campaignSlug?: string | undefined;
|
|
1425
|
+
actionSlug?: string | undefined;
|
|
1426
|
+
};
|
|
1427
|
+
|
|
1428
|
+
/** @internal */
|
|
1429
|
+
export const LikeLinkedInCommentRequest$outboundSchema: z.ZodMiniType<
|
|
1430
|
+
LikeLinkedInCommentRequest$Outbound,
|
|
1431
|
+
LikeLinkedInCommentRequest
|
|
1432
|
+
> = z.object({
|
|
1433
|
+
commentUrn: z.string(),
|
|
1434
|
+
reactionType: z._default(ReactionType$outboundSchema, "LIKE"),
|
|
1435
|
+
campaignSlug: z.optional(z.string()),
|
|
1436
|
+
actionSlug: z.optional(z.string()),
|
|
1437
|
+
});
|
|
1438
|
+
|
|
1439
|
+
export function likeLinkedInCommentRequestToJSON(
|
|
1440
|
+
likeLinkedInCommentRequest: LikeLinkedInCommentRequest,
|
|
1441
|
+
): string {
|
|
1442
|
+
return JSON.stringify(
|
|
1443
|
+
LikeLinkedInCommentRequest$outboundSchema.parse(likeLinkedInCommentRequest),
|
|
1444
|
+
);
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1447
|
+
/** @internal */
|
|
1448
|
+
export const LikeLinkedInCommentResponse$inboundSchema: z.ZodMiniType<
|
|
1449
|
+
LikeLinkedInCommentResponse,
|
|
1450
|
+
unknown
|
|
1451
|
+
> = z.object({
|
|
1452
|
+
success: types.boolean(),
|
|
1453
|
+
resourceKey: types.optional(types.string()),
|
|
1454
|
+
duplicate: types.optional(types.boolean()),
|
|
1455
|
+
creditsUsed: types.number(),
|
|
1456
|
+
retryAfter: types.number(),
|
|
1457
|
+
});
|
|
1458
|
+
|
|
1459
|
+
export function likeLinkedInCommentResponseFromJSON(
|
|
1460
|
+
jsonString: string,
|
|
1461
|
+
): SafeParseResult<LikeLinkedInCommentResponse, SDKValidationError> {
|
|
1462
|
+
return safeParse(
|
|
1463
|
+
jsonString,
|
|
1464
|
+
(x) => LikeLinkedInCommentResponse$inboundSchema.parse(JSON.parse(x)),
|
|
1465
|
+
`Failed to parse 'LikeLinkedInCommentResponse' from JSON`,
|
|
1466
|
+
);
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
/** @internal */
|
|
1470
|
+
export const Mode$outboundSchema: z.ZodMiniEnum<typeof Mode> = z.enum(Mode);
|
|
1471
|
+
|
|
1472
|
+
/** @internal */
|
|
1473
|
+
export const Visibility$outboundSchema: z.ZodMiniEnum<typeof Visibility> = z
|
|
1474
|
+
.enum(Visibility);
|
|
1475
|
+
|
|
1476
|
+
/** @internal */
|
|
1477
|
+
export type Mention$Outbound = {
|
|
1478
|
+
profileUrn: string;
|
|
1479
|
+
start: number;
|
|
1480
|
+
length: number;
|
|
1481
|
+
};
|
|
1482
|
+
|
|
1483
|
+
/** @internal */
|
|
1484
|
+
export const Mention$outboundSchema: z.ZodMiniType<Mention$Outbound, Mention> =
|
|
1485
|
+
z.object({
|
|
1486
|
+
profileUrn: z.string(),
|
|
1487
|
+
start: z.int(),
|
|
1488
|
+
length: z.int(),
|
|
1489
|
+
});
|
|
1490
|
+
|
|
1491
|
+
export function mentionToJSON(mention: Mention): string {
|
|
1492
|
+
return JSON.stringify(Mention$outboundSchema.parse(mention));
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
/** @internal */
|
|
1496
|
+
export type PublishLinkedInPostRequest$Outbound = {
|
|
1497
|
+
text: string;
|
|
1498
|
+
mode: string;
|
|
1499
|
+
scheduledAt?: number | undefined;
|
|
1500
|
+
imageUrl?: string | undefined;
|
|
1501
|
+
visibility: string;
|
|
1502
|
+
mentions?: Array<Mention$Outbound> | undefined;
|
|
1503
|
+
campaignSlug?: string | undefined;
|
|
1504
|
+
actionSlug?: string | undefined;
|
|
1505
|
+
};
|
|
1506
|
+
|
|
1507
|
+
/** @internal */
|
|
1508
|
+
export const PublishLinkedInPostRequest$outboundSchema: z.ZodMiniType<
|
|
1509
|
+
PublishLinkedInPostRequest$Outbound,
|
|
1510
|
+
PublishLinkedInPostRequest
|
|
1511
|
+
> = z.object({
|
|
1512
|
+
text: z.string(),
|
|
1513
|
+
mode: Mode$outboundSchema,
|
|
1514
|
+
scheduledAt: z.optional(z.int()),
|
|
1515
|
+
imageUrl: z.optional(z.string()),
|
|
1516
|
+
visibility: z._default(Visibility$outboundSchema, "ANYONE"),
|
|
1517
|
+
mentions: z.optional(z.array(z.lazy(() => Mention$outboundSchema))),
|
|
1518
|
+
campaignSlug: z.optional(z.string()),
|
|
1519
|
+
actionSlug: z.optional(z.string()),
|
|
1520
|
+
});
|
|
1521
|
+
|
|
1522
|
+
export function publishLinkedInPostRequestToJSON(
|
|
1523
|
+
publishLinkedInPostRequest: PublishLinkedInPostRequest,
|
|
1524
|
+
): string {
|
|
1525
|
+
return JSON.stringify(
|
|
1526
|
+
PublishLinkedInPostRequest$outboundSchema.parse(publishLinkedInPostRequest),
|
|
1527
|
+
);
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
/** @internal */
|
|
1531
|
+
export const PublishLinkedInPostResponse$inboundSchema: z.ZodMiniType<
|
|
1532
|
+
PublishLinkedInPostResponse,
|
|
1533
|
+
unknown
|
|
1534
|
+
> = z.object({
|
|
1535
|
+
success: types.boolean(),
|
|
1536
|
+
shareUrn: types.string(),
|
|
1537
|
+
activityUrn: types.nullable(types.string()),
|
|
1538
|
+
duplicate: types.optional(types.boolean()),
|
|
1539
|
+
creditsUsed: types.number(),
|
|
1540
|
+
retryAfter: types.number(),
|
|
1541
|
+
});
|
|
1542
|
+
|
|
1543
|
+
export function publishLinkedInPostResponseFromJSON(
|
|
1544
|
+
jsonString: string,
|
|
1545
|
+
): SafeParseResult<PublishLinkedInPostResponse, SDKValidationError> {
|
|
1546
|
+
return safeParse(
|
|
1547
|
+
jsonString,
|
|
1548
|
+
(x) => PublishLinkedInPostResponse$inboundSchema.parse(JSON.parse(x)),
|
|
1549
|
+
`Failed to parse 'PublishLinkedInPostResponse' from JSON`,
|
|
1550
|
+
);
|
|
1551
|
+
}
|
|
1552
|
+
|
|
1553
|
+
/** @internal */
|
|
1554
|
+
export const GetMyLinkedInProfilePositionStartDate$inboundSchema: z.ZodMiniType<
|
|
1555
|
+
GetMyLinkedInProfilePositionStartDate,
|
|
1556
|
+
unknown
|
|
1557
|
+
> = z.object({
|
|
1558
|
+
month: types.nullable(types.number()),
|
|
1559
|
+
year: types.number(),
|
|
1560
|
+
});
|
|
1561
|
+
|
|
1562
|
+
export function getMyLinkedInProfilePositionStartDateFromJSON(
|
|
1563
|
+
jsonString: string,
|
|
1564
|
+
): SafeParseResult<GetMyLinkedInProfilePositionStartDate, SDKValidationError> {
|
|
1565
|
+
return safeParse(
|
|
1566
|
+
jsonString,
|
|
1567
|
+
(x) =>
|
|
1568
|
+
GetMyLinkedInProfilePositionStartDate$inboundSchema.parse(JSON.parse(x)),
|
|
1569
|
+
`Failed to parse 'GetMyLinkedInProfilePositionStartDate' from JSON`,
|
|
1570
|
+
);
|
|
1571
|
+
}
|
|
1572
|
+
|
|
1573
|
+
/** @internal */
|
|
1574
|
+
export const GetMyLinkedInProfilePositionEndDate$inboundSchema: z.ZodMiniType<
|
|
1575
|
+
GetMyLinkedInProfilePositionEndDate,
|
|
1576
|
+
unknown
|
|
1577
|
+
> = z.object({
|
|
1578
|
+
month: types.nullable(types.number()),
|
|
1579
|
+
year: types.number(),
|
|
1580
|
+
});
|
|
1581
|
+
|
|
1582
|
+
export function getMyLinkedInProfilePositionEndDateFromJSON(
|
|
1583
|
+
jsonString: string,
|
|
1584
|
+
): SafeParseResult<GetMyLinkedInProfilePositionEndDate, SDKValidationError> {
|
|
1585
|
+
return safeParse(
|
|
1586
|
+
jsonString,
|
|
1587
|
+
(x) =>
|
|
1588
|
+
GetMyLinkedInProfilePositionEndDate$inboundSchema.parse(JSON.parse(x)),
|
|
1589
|
+
`Failed to parse 'GetMyLinkedInProfilePositionEndDate' from JSON`,
|
|
1590
|
+
);
|
|
1591
|
+
}
|
|
1592
|
+
|
|
1593
|
+
/** @internal */
|
|
1594
|
+
export const GetMyLinkedInProfilePosition$inboundSchema: z.ZodMiniType<
|
|
1595
|
+
GetMyLinkedInProfilePosition,
|
|
1596
|
+
unknown
|
|
1597
|
+
> = z.object({
|
|
1598
|
+
companyName: types.nullable(types.string()),
|
|
1599
|
+
title: types.nullable(types.string()),
|
|
1600
|
+
companyUrl: types.nullable(types.string()),
|
|
1601
|
+
companyLogo: types.nullable(types.string()),
|
|
1602
|
+
startDate: types.nullable(
|
|
1603
|
+
z.lazy(() => GetMyLinkedInProfilePositionStartDate$inboundSchema),
|
|
1604
|
+
),
|
|
1605
|
+
endDate: types.nullable(
|
|
1606
|
+
z.lazy(() => GetMyLinkedInProfilePositionEndDate$inboundSchema),
|
|
1607
|
+
),
|
|
1608
|
+
isCurrent: types.boolean(),
|
|
1609
|
+
});
|
|
1610
|
+
|
|
1611
|
+
export function getMyLinkedInProfilePositionFromJSON(
|
|
1612
|
+
jsonString: string,
|
|
1613
|
+
): SafeParseResult<GetMyLinkedInProfilePosition, SDKValidationError> {
|
|
1614
|
+
return safeParse(
|
|
1615
|
+
jsonString,
|
|
1616
|
+
(x) => GetMyLinkedInProfilePosition$inboundSchema.parse(JSON.parse(x)),
|
|
1617
|
+
`Failed to parse 'GetMyLinkedInProfilePosition' from JSON`,
|
|
1618
|
+
);
|
|
1619
|
+
}
|
|
1620
|
+
|
|
1621
|
+
/** @internal */
|
|
1622
|
+
export const GetMyLinkedInProfileEducationStartDate$inboundSchema:
|
|
1623
|
+
z.ZodMiniType<GetMyLinkedInProfileEducationStartDate, unknown> = z.object({
|
|
1624
|
+
month: types.nullable(types.number()),
|
|
1625
|
+
year: types.number(),
|
|
1626
|
+
});
|
|
1627
|
+
|
|
1628
|
+
export function getMyLinkedInProfileEducationStartDateFromJSON(
|
|
1629
|
+
jsonString: string,
|
|
1630
|
+
): SafeParseResult<GetMyLinkedInProfileEducationStartDate, SDKValidationError> {
|
|
1631
|
+
return safeParse(
|
|
1632
|
+
jsonString,
|
|
1633
|
+
(x) =>
|
|
1634
|
+
GetMyLinkedInProfileEducationStartDate$inboundSchema.parse(JSON.parse(x)),
|
|
1635
|
+
`Failed to parse 'GetMyLinkedInProfileEducationStartDate' from JSON`,
|
|
1636
|
+
);
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
/** @internal */
|
|
1640
|
+
export const GetMyLinkedInProfileEducationEndDate$inboundSchema: z.ZodMiniType<
|
|
1641
|
+
GetMyLinkedInProfileEducationEndDate,
|
|
1642
|
+
unknown
|
|
1643
|
+
> = z.object({
|
|
1644
|
+
month: types.nullable(types.number()),
|
|
1645
|
+
year: types.number(),
|
|
1646
|
+
});
|
|
1647
|
+
|
|
1648
|
+
export function getMyLinkedInProfileEducationEndDateFromJSON(
|
|
1649
|
+
jsonString: string,
|
|
1650
|
+
): SafeParseResult<GetMyLinkedInProfileEducationEndDate, SDKValidationError> {
|
|
1651
|
+
return safeParse(
|
|
1652
|
+
jsonString,
|
|
1653
|
+
(x) =>
|
|
1654
|
+
GetMyLinkedInProfileEducationEndDate$inboundSchema.parse(JSON.parse(x)),
|
|
1655
|
+
`Failed to parse 'GetMyLinkedInProfileEducationEndDate' from JSON`,
|
|
1656
|
+
);
|
|
1657
|
+
}
|
|
1658
|
+
|
|
1659
|
+
/** @internal */
|
|
1660
|
+
export const GetMyLinkedInProfileEducation$inboundSchema: z.ZodMiniType<
|
|
1661
|
+
GetMyLinkedInProfileEducation,
|
|
1662
|
+
unknown
|
|
1663
|
+
> = z.object({
|
|
1664
|
+
schoolName: types.nullable(types.string()),
|
|
1665
|
+
degreeName: types.nullable(types.string()),
|
|
1666
|
+
fieldOfStudy: types.nullable(types.string()),
|
|
1667
|
+
schoolUrl: types.nullable(types.string()),
|
|
1668
|
+
schoolLogo: types.nullable(types.string()),
|
|
1669
|
+
startDate: types.nullable(
|
|
1670
|
+
z.lazy(() => GetMyLinkedInProfileEducationStartDate$inboundSchema),
|
|
1671
|
+
),
|
|
1672
|
+
endDate: types.nullable(
|
|
1673
|
+
z.lazy(() => GetMyLinkedInProfileEducationEndDate$inboundSchema),
|
|
1674
|
+
),
|
|
1675
|
+
});
|
|
1676
|
+
|
|
1677
|
+
export function getMyLinkedInProfileEducationFromJSON(
|
|
1678
|
+
jsonString: string,
|
|
1679
|
+
): SafeParseResult<GetMyLinkedInProfileEducation, SDKValidationError> {
|
|
1680
|
+
return safeParse(
|
|
1681
|
+
jsonString,
|
|
1682
|
+
(x) => GetMyLinkedInProfileEducation$inboundSchema.parse(JSON.parse(x)),
|
|
1683
|
+
`Failed to parse 'GetMyLinkedInProfileEducation' from JSON`,
|
|
1684
|
+
);
|
|
1685
|
+
}
|
|
1686
|
+
|
|
1687
|
+
/** @internal */
|
|
1688
|
+
export const GetMyLinkedInProfileLocation$inboundSchema: z.ZodMiniType<
|
|
1689
|
+
GetMyLinkedInProfileLocation,
|
|
1690
|
+
unknown
|
|
1691
|
+
> = z.object({
|
|
1692
|
+
countryCode: types.string(),
|
|
1693
|
+
postalCode: types.optional(types.string()),
|
|
1694
|
+
});
|
|
1695
|
+
|
|
1696
|
+
export function getMyLinkedInProfileLocationFromJSON(
|
|
1697
|
+
jsonString: string,
|
|
1698
|
+
): SafeParseResult<GetMyLinkedInProfileLocation, SDKValidationError> {
|
|
1699
|
+
return safeParse(
|
|
1700
|
+
jsonString,
|
|
1701
|
+
(x) => GetMyLinkedInProfileLocation$inboundSchema.parse(JSON.parse(x)),
|
|
1702
|
+
`Failed to parse 'GetMyLinkedInProfileLocation' from JSON`,
|
|
1703
|
+
);
|
|
1704
|
+
}
|
|
1705
|
+
|
|
1706
|
+
/** @internal */
|
|
1707
|
+
export const GetMyLinkedInProfileType$inboundSchema: z.ZodMiniType<
|
|
1708
|
+
GetMyLinkedInProfileType,
|
|
1709
|
+
unknown
|
|
1710
|
+
> = openEnums.inboundSchema(GetMyLinkedInProfileType);
|
|
1711
|
+
|
|
1712
|
+
/** @internal */
|
|
1713
|
+
export const GetMyLinkedInProfileLastPost$inboundSchema: z.ZodMiniType<
|
|
1714
|
+
GetMyLinkedInProfileLastPost,
|
|
1715
|
+
unknown
|
|
1716
|
+
> = z.object({
|
|
1717
|
+
postUrl: types.string(),
|
|
1718
|
+
text: types.string(),
|
|
1719
|
+
date: types.number(),
|
|
1720
|
+
likesCount: types.number(),
|
|
1721
|
+
commentsCount: types.number(),
|
|
1722
|
+
sharesCount: types.number(),
|
|
1723
|
+
postUrn: types.string(),
|
|
1724
|
+
postId: types.string(),
|
|
1725
|
+
type: GetMyLinkedInProfileType$inboundSchema,
|
|
1726
|
+
});
|
|
1727
|
+
|
|
1728
|
+
export function getMyLinkedInProfileLastPostFromJSON(
|
|
1729
|
+
jsonString: string,
|
|
1730
|
+
): SafeParseResult<GetMyLinkedInProfileLastPost, SDKValidationError> {
|
|
1731
|
+
return safeParse(
|
|
1732
|
+
jsonString,
|
|
1733
|
+
(x) => GetMyLinkedInProfileLastPost$inboundSchema.parse(JSON.parse(x)),
|
|
1734
|
+
`Failed to parse 'GetMyLinkedInProfileLastPost' from JSON`,
|
|
1735
|
+
);
|
|
1736
|
+
}
|
|
1737
|
+
|
|
1738
|
+
/** @internal */
|
|
1739
|
+
export const GetMyLinkedInProfileResponse$inboundSchema: z.ZodMiniType<
|
|
1740
|
+
GetMyLinkedInProfileResponse,
|
|
1741
|
+
unknown
|
|
1742
|
+
> = z.object({
|
|
1743
|
+
success: types.boolean(),
|
|
1744
|
+
linkedinProfileId: types.nullable(types.string()),
|
|
1745
|
+
linkedinName: types.nullable(types.string()),
|
|
1746
|
+
linkedinEmail: types.nullable(types.string()),
|
|
1747
|
+
profileUrn: types.nullable(types.string()),
|
|
1748
|
+
headline: types.nullable(types.string()),
|
|
1749
|
+
profilePic: types.nullable(types.string()),
|
|
1750
|
+
profileUrl: types.nullable(types.string()),
|
|
1751
|
+
positions: types.optional(
|
|
1752
|
+
z.array(z.lazy(() => GetMyLinkedInProfilePosition$inboundSchema)),
|
|
1753
|
+
),
|
|
1754
|
+
educations: types.optional(
|
|
1755
|
+
z.array(z.lazy(() => GetMyLinkedInProfileEducation$inboundSchema)),
|
|
1756
|
+
),
|
|
1757
|
+
connectionsCount: z.optional(z.nullable(types.number())),
|
|
1758
|
+
location: z.optional(
|
|
1759
|
+
z.nullable(z.lazy(() => GetMyLinkedInProfileLocation$inboundSchema)),
|
|
1760
|
+
),
|
|
1761
|
+
isVerified: types.optional(types.boolean()),
|
|
1762
|
+
lastPosts: types.optional(
|
|
1763
|
+
z.array(z.lazy(() => GetMyLinkedInProfileLastPost$inboundSchema)),
|
|
1764
|
+
),
|
|
1765
|
+
creditsUsed: types.number(),
|
|
1766
|
+
retryAfter: types.number(),
|
|
1767
|
+
});
|
|
1768
|
+
|
|
1769
|
+
export function getMyLinkedInProfileResponseFromJSON(
|
|
1770
|
+
jsonString: string,
|
|
1771
|
+
): SafeParseResult<GetMyLinkedInProfileResponse, SDKValidationError> {
|
|
1772
|
+
return safeParse(
|
|
1773
|
+
jsonString,
|
|
1774
|
+
(x) => GetMyLinkedInProfileResponse$inboundSchema.parse(JSON.parse(x)),
|
|
1775
|
+
`Failed to parse 'GetMyLinkedInProfileResponse' from JSON`,
|
|
1776
|
+
);
|
|
1777
|
+
}
|
|
1778
|
+
|
|
1779
|
+
/** @internal */
|
|
1780
|
+
export const RefreshMyLinkedInProfilePositionStartDate$inboundSchema:
|
|
1781
|
+
z.ZodMiniType<RefreshMyLinkedInProfilePositionStartDate, unknown> = z.object({
|
|
1782
|
+
month: types.nullable(types.number()),
|
|
1783
|
+
year: types.number(),
|
|
1784
|
+
});
|
|
1785
|
+
|
|
1786
|
+
export function refreshMyLinkedInProfilePositionStartDateFromJSON(
|
|
1787
|
+
jsonString: string,
|
|
1788
|
+
): SafeParseResult<
|
|
1789
|
+
RefreshMyLinkedInProfilePositionStartDate,
|
|
1790
|
+
SDKValidationError
|
|
1791
|
+
> {
|
|
1792
|
+
return safeParse(
|
|
1793
|
+
jsonString,
|
|
1794
|
+
(x) =>
|
|
1795
|
+
RefreshMyLinkedInProfilePositionStartDate$inboundSchema.parse(
|
|
1796
|
+
JSON.parse(x),
|
|
1797
|
+
),
|
|
1798
|
+
`Failed to parse 'RefreshMyLinkedInProfilePositionStartDate' from JSON`,
|
|
1799
|
+
);
|
|
1800
|
+
}
|
|
1801
|
+
|
|
1802
|
+
/** @internal */
|
|
1803
|
+
export const RefreshMyLinkedInProfilePositionEndDate$inboundSchema:
|
|
1804
|
+
z.ZodMiniType<RefreshMyLinkedInProfilePositionEndDate, unknown> = z.object({
|
|
1805
|
+
month: types.nullable(types.number()),
|
|
1806
|
+
year: types.number(),
|
|
1807
|
+
});
|
|
1808
|
+
|
|
1809
|
+
export function refreshMyLinkedInProfilePositionEndDateFromJSON(
|
|
1810
|
+
jsonString: string,
|
|
1811
|
+
): SafeParseResult<
|
|
1812
|
+
RefreshMyLinkedInProfilePositionEndDate,
|
|
1813
|
+
SDKValidationError
|
|
1814
|
+
> {
|
|
1815
|
+
return safeParse(
|
|
1816
|
+
jsonString,
|
|
1817
|
+
(x) =>
|
|
1818
|
+
RefreshMyLinkedInProfilePositionEndDate$inboundSchema.parse(
|
|
1819
|
+
JSON.parse(x),
|
|
1820
|
+
),
|
|
1821
|
+
`Failed to parse 'RefreshMyLinkedInProfilePositionEndDate' from JSON`,
|
|
1822
|
+
);
|
|
1823
|
+
}
|
|
1824
|
+
|
|
1825
|
+
/** @internal */
|
|
1826
|
+
export const RefreshMyLinkedInProfilePosition$inboundSchema: z.ZodMiniType<
|
|
1827
|
+
RefreshMyLinkedInProfilePosition,
|
|
1828
|
+
unknown
|
|
1829
|
+
> = z.object({
|
|
1830
|
+
companyName: types.nullable(types.string()),
|
|
1831
|
+
title: types.nullable(types.string()),
|
|
1832
|
+
companyUrl: types.nullable(types.string()),
|
|
1833
|
+
companyLogo: types.nullable(types.string()),
|
|
1834
|
+
startDate: types.nullable(
|
|
1835
|
+
z.lazy(() => RefreshMyLinkedInProfilePositionStartDate$inboundSchema),
|
|
1836
|
+
),
|
|
1837
|
+
endDate: types.nullable(
|
|
1838
|
+
z.lazy(() => RefreshMyLinkedInProfilePositionEndDate$inboundSchema),
|
|
1839
|
+
),
|
|
1840
|
+
isCurrent: types.boolean(),
|
|
1841
|
+
});
|
|
1842
|
+
|
|
1843
|
+
export function refreshMyLinkedInProfilePositionFromJSON(
|
|
1844
|
+
jsonString: string,
|
|
1845
|
+
): SafeParseResult<RefreshMyLinkedInProfilePosition, SDKValidationError> {
|
|
1846
|
+
return safeParse(
|
|
1847
|
+
jsonString,
|
|
1848
|
+
(x) => RefreshMyLinkedInProfilePosition$inboundSchema.parse(JSON.parse(x)),
|
|
1849
|
+
`Failed to parse 'RefreshMyLinkedInProfilePosition' from JSON`,
|
|
1850
|
+
);
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
/** @internal */
|
|
1854
|
+
export const RefreshMyLinkedInProfileEducationStartDate$inboundSchema:
|
|
1855
|
+
z.ZodMiniType<RefreshMyLinkedInProfileEducationStartDate, unknown> = z.object(
|
|
1856
|
+
{
|
|
1857
|
+
month: types.nullable(types.number()),
|
|
1858
|
+
year: types.number(),
|
|
1859
|
+
},
|
|
1860
|
+
);
|
|
1861
|
+
|
|
1862
|
+
export function refreshMyLinkedInProfileEducationStartDateFromJSON(
|
|
1863
|
+
jsonString: string,
|
|
1864
|
+
): SafeParseResult<
|
|
1865
|
+
RefreshMyLinkedInProfileEducationStartDate,
|
|
1866
|
+
SDKValidationError
|
|
1867
|
+
> {
|
|
1868
|
+
return safeParse(
|
|
1869
|
+
jsonString,
|
|
1870
|
+
(x) =>
|
|
1871
|
+
RefreshMyLinkedInProfileEducationStartDate$inboundSchema.parse(
|
|
1872
|
+
JSON.parse(x),
|
|
1873
|
+
),
|
|
1874
|
+
`Failed to parse 'RefreshMyLinkedInProfileEducationStartDate' from JSON`,
|
|
1875
|
+
);
|
|
1876
|
+
}
|
|
1877
|
+
|
|
1878
|
+
/** @internal */
|
|
1879
|
+
export const RefreshMyLinkedInProfileEducationEndDate$inboundSchema:
|
|
1880
|
+
z.ZodMiniType<RefreshMyLinkedInProfileEducationEndDate, unknown> = z.object({
|
|
1881
|
+
month: types.nullable(types.number()),
|
|
1882
|
+
year: types.number(),
|
|
1883
|
+
});
|
|
1884
|
+
|
|
1885
|
+
export function refreshMyLinkedInProfileEducationEndDateFromJSON(
|
|
1886
|
+
jsonString: string,
|
|
1887
|
+
): SafeParseResult<
|
|
1888
|
+
RefreshMyLinkedInProfileEducationEndDate,
|
|
1889
|
+
SDKValidationError
|
|
1890
|
+
> {
|
|
1891
|
+
return safeParse(
|
|
1892
|
+
jsonString,
|
|
1893
|
+
(x) =>
|
|
1894
|
+
RefreshMyLinkedInProfileEducationEndDate$inboundSchema.parse(
|
|
1895
|
+
JSON.parse(x),
|
|
1896
|
+
),
|
|
1897
|
+
`Failed to parse 'RefreshMyLinkedInProfileEducationEndDate' from JSON`,
|
|
1898
|
+
);
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
/** @internal */
|
|
1902
|
+
export const RefreshMyLinkedInProfileEducation$inboundSchema: z.ZodMiniType<
|
|
1903
|
+
RefreshMyLinkedInProfileEducation,
|
|
1904
|
+
unknown
|
|
1905
|
+
> = z.object({
|
|
1906
|
+
schoolName: types.nullable(types.string()),
|
|
1907
|
+
degreeName: types.nullable(types.string()),
|
|
1908
|
+
fieldOfStudy: types.nullable(types.string()),
|
|
1909
|
+
schoolUrl: types.nullable(types.string()),
|
|
1910
|
+
schoolLogo: types.nullable(types.string()),
|
|
1911
|
+
startDate: types.nullable(
|
|
1912
|
+
z.lazy(() => RefreshMyLinkedInProfileEducationStartDate$inboundSchema),
|
|
1913
|
+
),
|
|
1914
|
+
endDate: types.nullable(
|
|
1915
|
+
z.lazy(() => RefreshMyLinkedInProfileEducationEndDate$inboundSchema),
|
|
1916
|
+
),
|
|
1917
|
+
});
|
|
1918
|
+
|
|
1919
|
+
export function refreshMyLinkedInProfileEducationFromJSON(
|
|
1920
|
+
jsonString: string,
|
|
1921
|
+
): SafeParseResult<RefreshMyLinkedInProfileEducation, SDKValidationError> {
|
|
1922
|
+
return safeParse(
|
|
1923
|
+
jsonString,
|
|
1924
|
+
(x) => RefreshMyLinkedInProfileEducation$inboundSchema.parse(JSON.parse(x)),
|
|
1925
|
+
`Failed to parse 'RefreshMyLinkedInProfileEducation' from JSON`,
|
|
1926
|
+
);
|
|
1927
|
+
}
|
|
1928
|
+
|
|
1929
|
+
/** @internal */
|
|
1930
|
+
export const RefreshMyLinkedInProfileLocation$inboundSchema: z.ZodMiniType<
|
|
1931
|
+
RefreshMyLinkedInProfileLocation,
|
|
1932
|
+
unknown
|
|
1933
|
+
> = z.object({
|
|
1934
|
+
countryCode: types.string(),
|
|
1935
|
+
postalCode: types.optional(types.string()),
|
|
1936
|
+
});
|
|
1937
|
+
|
|
1938
|
+
export function refreshMyLinkedInProfileLocationFromJSON(
|
|
1939
|
+
jsonString: string,
|
|
1940
|
+
): SafeParseResult<RefreshMyLinkedInProfileLocation, SDKValidationError> {
|
|
1941
|
+
return safeParse(
|
|
1942
|
+
jsonString,
|
|
1943
|
+
(x) => RefreshMyLinkedInProfileLocation$inboundSchema.parse(JSON.parse(x)),
|
|
1944
|
+
`Failed to parse 'RefreshMyLinkedInProfileLocation' from JSON`,
|
|
1945
|
+
);
|
|
1946
|
+
}
|
|
1947
|
+
|
|
1948
|
+
/** @internal */
|
|
1949
|
+
export const RefreshMyLinkedInProfileType$inboundSchema: z.ZodMiniType<
|
|
1950
|
+
RefreshMyLinkedInProfileType,
|
|
1951
|
+
unknown
|
|
1952
|
+
> = openEnums.inboundSchema(RefreshMyLinkedInProfileType);
|
|
1953
|
+
|
|
1954
|
+
/** @internal */
|
|
1955
|
+
export const RefreshMyLinkedInProfileLastPost$inboundSchema: z.ZodMiniType<
|
|
1956
|
+
RefreshMyLinkedInProfileLastPost,
|
|
1957
|
+
unknown
|
|
1958
|
+
> = z.object({
|
|
1959
|
+
postUrl: types.string(),
|
|
1960
|
+
text: types.string(),
|
|
1961
|
+
date: types.number(),
|
|
1962
|
+
likesCount: types.number(),
|
|
1963
|
+
commentsCount: types.number(),
|
|
1964
|
+
sharesCount: types.number(),
|
|
1965
|
+
postUrn: types.string(),
|
|
1966
|
+
postId: types.string(),
|
|
1967
|
+
type: RefreshMyLinkedInProfileType$inboundSchema,
|
|
1968
|
+
});
|
|
1969
|
+
|
|
1970
|
+
export function refreshMyLinkedInProfileLastPostFromJSON(
|
|
1971
|
+
jsonString: string,
|
|
1972
|
+
): SafeParseResult<RefreshMyLinkedInProfileLastPost, SDKValidationError> {
|
|
1973
|
+
return safeParse(
|
|
1974
|
+
jsonString,
|
|
1975
|
+
(x) => RefreshMyLinkedInProfileLastPost$inboundSchema.parse(JSON.parse(x)),
|
|
1976
|
+
`Failed to parse 'RefreshMyLinkedInProfileLastPost' from JSON`,
|
|
1977
|
+
);
|
|
1978
|
+
}
|
|
1979
|
+
|
|
1980
|
+
/** @internal */
|
|
1981
|
+
export const RefreshMyLinkedInProfileResponse$inboundSchema: z.ZodMiniType<
|
|
1982
|
+
RefreshMyLinkedInProfileResponse,
|
|
1983
|
+
unknown
|
|
1984
|
+
> = z.object({
|
|
1985
|
+
success: types.boolean(),
|
|
1986
|
+
linkedinProfileId: types.nullable(types.string()),
|
|
1987
|
+
linkedinName: types.nullable(types.string()),
|
|
1988
|
+
linkedinEmail: types.nullable(types.string()),
|
|
1989
|
+
profileUrn: types.nullable(types.string()),
|
|
1990
|
+
headline: types.nullable(types.string()),
|
|
1991
|
+
profilePic: types.nullable(types.string()),
|
|
1992
|
+
profileUrl: types.nullable(types.string()),
|
|
1993
|
+
positions: types.optional(
|
|
1994
|
+
z.array(z.lazy(() => RefreshMyLinkedInProfilePosition$inboundSchema)),
|
|
1995
|
+
),
|
|
1996
|
+
educations: types.optional(
|
|
1997
|
+
z.array(z.lazy(() => RefreshMyLinkedInProfileEducation$inboundSchema)),
|
|
1998
|
+
),
|
|
1999
|
+
connectionsCount: z.optional(z.nullable(types.number())),
|
|
2000
|
+
location: z.optional(
|
|
2001
|
+
z.nullable(z.lazy(() => RefreshMyLinkedInProfileLocation$inboundSchema)),
|
|
2002
|
+
),
|
|
2003
|
+
isVerified: types.optional(types.boolean()),
|
|
2004
|
+
lastPosts: types.optional(
|
|
2005
|
+
z.array(z.lazy(() => RefreshMyLinkedInProfileLastPost$inboundSchema)),
|
|
2006
|
+
),
|
|
2007
|
+
refreshed: types.boolean(),
|
|
2008
|
+
creditsUsed: types.number(),
|
|
2009
|
+
retryAfter: types.number(),
|
|
2010
|
+
});
|
|
2011
|
+
|
|
2012
|
+
export function refreshMyLinkedInProfileResponseFromJSON(
|
|
2013
|
+
jsonString: string,
|
|
2014
|
+
): SafeParseResult<RefreshMyLinkedInProfileResponse, SDKValidationError> {
|
|
2015
|
+
return safeParse(
|
|
2016
|
+
jsonString,
|
|
2017
|
+
(x) => RefreshMyLinkedInProfileResponse$inboundSchema.parse(JSON.parse(x)),
|
|
2018
|
+
`Failed to parse 'RefreshMyLinkedInProfileResponse' from JSON`,
|
|
2019
|
+
);
|
|
2020
|
+
}
|
|
2021
|
+
|
|
2022
|
+
/** @internal */
|
|
2023
|
+
export type GetMyLinkedInPostsRequest$Outbound = {
|
|
2024
|
+
count?: number | undefined;
|
|
2025
|
+
start?: number | undefined;
|
|
2026
|
+
paginationToken?: string | undefined;
|
|
2027
|
+
};
|
|
2028
|
+
|
|
2029
|
+
/** @internal */
|
|
2030
|
+
export const GetMyLinkedInPostsRequest$outboundSchema: z.ZodMiniType<
|
|
2031
|
+
GetMyLinkedInPostsRequest$Outbound,
|
|
2032
|
+
GetMyLinkedInPostsRequest
|
|
2033
|
+
> = z.object({
|
|
2034
|
+
count: z.optional(z.int()),
|
|
2035
|
+
start: z.optional(z.int()),
|
|
2036
|
+
paginationToken: z.optional(z.string()),
|
|
2037
|
+
});
|
|
2038
|
+
|
|
2039
|
+
export function getMyLinkedInPostsRequestToJSON(
|
|
2040
|
+
getMyLinkedInPostsRequest: GetMyLinkedInPostsRequest,
|
|
2041
|
+
): string {
|
|
2042
|
+
return JSON.stringify(
|
|
2043
|
+
GetMyLinkedInPostsRequest$outboundSchema.parse(getMyLinkedInPostsRequest),
|
|
2044
|
+
);
|
|
2045
|
+
}
|
|
2046
|
+
|
|
2047
|
+
/** @internal */
|
|
2048
|
+
export const GetMyLinkedInPostsType$inboundSchema: z.ZodMiniType<
|
|
2049
|
+
GetMyLinkedInPostsType,
|
|
2050
|
+
unknown
|
|
2051
|
+
> = openEnums.inboundSchema(GetMyLinkedInPostsType);
|
|
2052
|
+
|
|
2053
|
+
/** @internal */
|
|
2054
|
+
export const GetMyLinkedInPostsPost$inboundSchema: z.ZodMiniType<
|
|
2055
|
+
GetMyLinkedInPostsPost,
|
|
2056
|
+
unknown
|
|
2057
|
+
> = z.object({
|
|
2058
|
+
postUrl: types.string(),
|
|
2059
|
+
text: types.string(),
|
|
2060
|
+
date: types.number(),
|
|
2061
|
+
likesCount: types.number(),
|
|
2062
|
+
commentsCount: types.number(),
|
|
2063
|
+
sharesCount: types.number(),
|
|
2064
|
+
postUrn: types.string(),
|
|
2065
|
+
postId: types.string(),
|
|
2066
|
+
type: GetMyLinkedInPostsType$inboundSchema,
|
|
2067
|
+
});
|
|
2068
|
+
|
|
2069
|
+
export function getMyLinkedInPostsPostFromJSON(
|
|
2070
|
+
jsonString: string,
|
|
2071
|
+
): SafeParseResult<GetMyLinkedInPostsPost, SDKValidationError> {
|
|
2072
|
+
return safeParse(
|
|
2073
|
+
jsonString,
|
|
2074
|
+
(x) => GetMyLinkedInPostsPost$inboundSchema.parse(JSON.parse(x)),
|
|
2075
|
+
`Failed to parse 'GetMyLinkedInPostsPost' from JSON`,
|
|
2076
|
+
);
|
|
2077
|
+
}
|
|
2078
|
+
|
|
2079
|
+
/** @internal */
|
|
2080
|
+
export const GetMyLinkedInPostsResponse$inboundSchema: z.ZodMiniType<
|
|
2081
|
+
GetMyLinkedInPostsResponse,
|
|
2082
|
+
unknown
|
|
2083
|
+
> = z.object({
|
|
2084
|
+
success: types.boolean(),
|
|
2085
|
+
posts: z.array(z.lazy(() => GetMyLinkedInPostsPost$inboundSchema)),
|
|
2086
|
+
count: types.number(),
|
|
2087
|
+
total: types.number(),
|
|
2088
|
+
start: types.number(),
|
|
2089
|
+
hasMore: types.boolean(),
|
|
2090
|
+
paginationToken: types.nullable(types.string()),
|
|
2091
|
+
creditsUsed: types.number(),
|
|
2092
|
+
retryAfter: types.number(),
|
|
2093
|
+
});
|
|
2094
|
+
|
|
2095
|
+
export function getMyLinkedInPostsResponseFromJSON(
|
|
2096
|
+
jsonString: string,
|
|
2097
|
+
): SafeParseResult<GetMyLinkedInPostsResponse, SDKValidationError> {
|
|
2098
|
+
return safeParse(
|
|
2099
|
+
jsonString,
|
|
2100
|
+
(x) => GetMyLinkedInPostsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
2101
|
+
`Failed to parse 'GetMyLinkedInPostsResponse' from JSON`,
|
|
2102
|
+
);
|
|
2103
|
+
}
|
|
2104
|
+
|
|
2105
|
+
/** @internal */
|
|
2106
|
+
export type GetMyLinkedInFollowersRequest$Outbound = {
|
|
2107
|
+
start?: number | undefined;
|
|
2108
|
+
count?: number | undefined;
|
|
2109
|
+
};
|
|
2110
|
+
|
|
2111
|
+
/** @internal */
|
|
2112
|
+
export const GetMyLinkedInFollowersRequest$outboundSchema: z.ZodMiniType<
|
|
2113
|
+
GetMyLinkedInFollowersRequest$Outbound,
|
|
2114
|
+
GetMyLinkedInFollowersRequest
|
|
2115
|
+
> = z.object({
|
|
2116
|
+
start: z.optional(z.int()),
|
|
2117
|
+
count: z.optional(z.int()),
|
|
2118
|
+
});
|
|
2119
|
+
|
|
2120
|
+
export function getMyLinkedInFollowersRequestToJSON(
|
|
2121
|
+
getMyLinkedInFollowersRequest: GetMyLinkedInFollowersRequest,
|
|
2122
|
+
): string {
|
|
2123
|
+
return JSON.stringify(
|
|
2124
|
+
GetMyLinkedInFollowersRequest$outboundSchema.parse(
|
|
2125
|
+
getMyLinkedInFollowersRequest,
|
|
2126
|
+
),
|
|
2127
|
+
);
|
|
2128
|
+
}
|
|
2129
|
+
|
|
2130
|
+
/** @internal */
|
|
2131
|
+
export const Follower$inboundSchema: z.ZodMiniType<Follower, unknown> = z
|
|
2132
|
+
.object({
|
|
2133
|
+
name: types.string(),
|
|
2134
|
+
headline: types.nullable(types.string()),
|
|
2135
|
+
profileUrl: types.nullable(types.string()),
|
|
2136
|
+
profilePicture: types.nullable(types.string()),
|
|
2137
|
+
followerCount: types.nullable(types.number()),
|
|
2138
|
+
following: types.boolean(),
|
|
2139
|
+
});
|
|
2140
|
+
|
|
2141
|
+
export function followerFromJSON(
|
|
2142
|
+
jsonString: string,
|
|
2143
|
+
): SafeParseResult<Follower, SDKValidationError> {
|
|
2144
|
+
return safeParse(
|
|
2145
|
+
jsonString,
|
|
2146
|
+
(x) => Follower$inboundSchema.parse(JSON.parse(x)),
|
|
2147
|
+
`Failed to parse 'Follower' from JSON`,
|
|
2148
|
+
);
|
|
2149
|
+
}
|
|
2150
|
+
|
|
2151
|
+
/** @internal */
|
|
2152
|
+
export const GetMyLinkedInFollowersResponse$inboundSchema: z.ZodMiniType<
|
|
2153
|
+
GetMyLinkedInFollowersResponse,
|
|
2154
|
+
unknown
|
|
2155
|
+
> = z.object({
|
|
2156
|
+
success: types.boolean(),
|
|
2157
|
+
followers: z.array(z.lazy(() => Follower$inboundSchema)),
|
|
2158
|
+
count: types.number(),
|
|
2159
|
+
totalFollowers: types.number(),
|
|
2160
|
+
start: types.number(),
|
|
2161
|
+
hasMore: types.boolean(),
|
|
2162
|
+
creditsUsed: types.number(),
|
|
2163
|
+
retryAfter: types.number(),
|
|
2164
|
+
});
|
|
2165
|
+
|
|
2166
|
+
export function getMyLinkedInFollowersResponseFromJSON(
|
|
2167
|
+
jsonString: string,
|
|
2168
|
+
): SafeParseResult<GetMyLinkedInFollowersResponse, SDKValidationError> {
|
|
2169
|
+
return safeParse(
|
|
2170
|
+
jsonString,
|
|
2171
|
+
(x) => GetMyLinkedInFollowersResponse$inboundSchema.parse(JSON.parse(x)),
|
|
2172
|
+
`Failed to parse 'GetMyLinkedInFollowersResponse' from JSON`,
|
|
2173
|
+
);
|
|
2174
|
+
}
|
|
2175
|
+
|
|
2176
|
+
/** @internal */
|
|
2177
|
+
export const ConnectionRequestDaily$inboundSchema: z.ZodMiniType<
|
|
2178
|
+
ConnectionRequestDaily,
|
|
2179
|
+
unknown
|
|
2180
|
+
> = z.object({
|
|
2181
|
+
current: types.number(),
|
|
2182
|
+
limit: types.number(),
|
|
2183
|
+
remaining: types.number(),
|
|
2184
|
+
});
|
|
2185
|
+
|
|
2186
|
+
export function connectionRequestDailyFromJSON(
|
|
2187
|
+
jsonString: string,
|
|
2188
|
+
): SafeParseResult<ConnectionRequestDaily, SDKValidationError> {
|
|
2189
|
+
return safeParse(
|
|
2190
|
+
jsonString,
|
|
2191
|
+
(x) => ConnectionRequestDaily$inboundSchema.parse(JSON.parse(x)),
|
|
2192
|
+
`Failed to parse 'ConnectionRequestDaily' from JSON`,
|
|
2193
|
+
);
|
|
2194
|
+
}
|
|
2195
|
+
|
|
2196
|
+
/** @internal */
|
|
2197
|
+
export const ConnectionRequestWeekly$inboundSchema: z.ZodMiniType<
|
|
2198
|
+
ConnectionRequestWeekly,
|
|
2199
|
+
unknown
|
|
2200
|
+
> = z.object({
|
|
2201
|
+
current: types.number(),
|
|
2202
|
+
limit: types.number(),
|
|
2203
|
+
remaining: types.number(),
|
|
2204
|
+
});
|
|
2205
|
+
|
|
2206
|
+
export function connectionRequestWeeklyFromJSON(
|
|
2207
|
+
jsonString: string,
|
|
2208
|
+
): SafeParseResult<ConnectionRequestWeekly, SDKValidationError> {
|
|
2209
|
+
return safeParse(
|
|
2210
|
+
jsonString,
|
|
2211
|
+
(x) => ConnectionRequestWeekly$inboundSchema.parse(JSON.parse(x)),
|
|
2212
|
+
`Failed to parse 'ConnectionRequestWeekly' from JSON`,
|
|
2213
|
+
);
|
|
2214
|
+
}
|
|
2215
|
+
|
|
2216
|
+
/** @internal */
|
|
2217
|
+
export const ConnectionRequest$inboundSchema: z.ZodMiniType<
|
|
2218
|
+
ConnectionRequest,
|
|
2219
|
+
unknown
|
|
2220
|
+
> = z.object({
|
|
2221
|
+
daily: z.lazy(() => ConnectionRequestDaily$inboundSchema),
|
|
2222
|
+
weekly: types.nullable(z.lazy(() => ConnectionRequestWeekly$inboundSchema)),
|
|
2223
|
+
minIntervalSeconds: types.number(),
|
|
2224
|
+
nextResetDaily: types.date(),
|
|
2225
|
+
nextResetWeekly: types.nullable(types.date()),
|
|
2226
|
+
});
|
|
2227
|
+
|
|
2228
|
+
export function connectionRequestFromJSON(
|
|
2229
|
+
jsonString: string,
|
|
2230
|
+
): SafeParseResult<ConnectionRequest, SDKValidationError> {
|
|
2231
|
+
return safeParse(
|
|
2232
|
+
jsonString,
|
|
2233
|
+
(x) => ConnectionRequest$inboundSchema.parse(JSON.parse(x)),
|
|
2234
|
+
`Failed to parse 'ConnectionRequest' from JSON`,
|
|
2235
|
+
);
|
|
2236
|
+
}
|
|
2237
|
+
|
|
2238
|
+
/** @internal */
|
|
2239
|
+
export const MessageDaily$inboundSchema: z.ZodMiniType<MessageDaily, unknown> =
|
|
2240
|
+
z.object({
|
|
2241
|
+
current: types.number(),
|
|
2242
|
+
limit: types.number(),
|
|
2243
|
+
remaining: types.number(),
|
|
2244
|
+
});
|
|
2245
|
+
|
|
2246
|
+
export function messageDailyFromJSON(
|
|
2247
|
+
jsonString: string,
|
|
2248
|
+
): SafeParseResult<MessageDaily, SDKValidationError> {
|
|
2249
|
+
return safeParse(
|
|
2250
|
+
jsonString,
|
|
2251
|
+
(x) => MessageDaily$inboundSchema.parse(JSON.parse(x)),
|
|
2252
|
+
`Failed to parse 'MessageDaily' from JSON`,
|
|
2253
|
+
);
|
|
2254
|
+
}
|
|
2255
|
+
|
|
2256
|
+
/** @internal */
|
|
2257
|
+
export const MessageWeekly$inboundSchema: z.ZodMiniType<
|
|
2258
|
+
MessageWeekly,
|
|
2259
|
+
unknown
|
|
2260
|
+
> = z.object({
|
|
2261
|
+
current: types.number(),
|
|
2262
|
+
limit: types.number(),
|
|
2263
|
+
remaining: types.number(),
|
|
2264
|
+
});
|
|
2265
|
+
|
|
2266
|
+
export function messageWeeklyFromJSON(
|
|
2267
|
+
jsonString: string,
|
|
2268
|
+
): SafeParseResult<MessageWeekly, SDKValidationError> {
|
|
2269
|
+
return safeParse(
|
|
2270
|
+
jsonString,
|
|
2271
|
+
(x) => MessageWeekly$inboundSchema.parse(JSON.parse(x)),
|
|
2272
|
+
`Failed to parse 'MessageWeekly' from JSON`,
|
|
2273
|
+
);
|
|
2274
|
+
}
|
|
2275
|
+
|
|
2276
|
+
/** @internal */
|
|
2277
|
+
export const GetMyLimitsMessage$inboundSchema: z.ZodMiniType<
|
|
2278
|
+
GetMyLimitsMessage,
|
|
2279
|
+
unknown
|
|
2280
|
+
> = z.object({
|
|
2281
|
+
daily: z.lazy(() => MessageDaily$inboundSchema),
|
|
2282
|
+
weekly: types.nullable(z.lazy(() => MessageWeekly$inboundSchema)),
|
|
2283
|
+
minIntervalSeconds: types.number(),
|
|
2284
|
+
nextResetDaily: types.date(),
|
|
2285
|
+
nextResetWeekly: types.nullable(types.date()),
|
|
2286
|
+
});
|
|
2287
|
+
|
|
2288
|
+
export function getMyLimitsMessageFromJSON(
|
|
2289
|
+
jsonString: string,
|
|
2290
|
+
): SafeParseResult<GetMyLimitsMessage, SDKValidationError> {
|
|
2291
|
+
return safeParse(
|
|
2292
|
+
jsonString,
|
|
2293
|
+
(x) => GetMyLimitsMessage$inboundSchema.parse(JSON.parse(x)),
|
|
2294
|
+
`Failed to parse 'GetMyLimitsMessage' from JSON`,
|
|
2295
|
+
);
|
|
2296
|
+
}
|
|
2297
|
+
|
|
2298
|
+
/** @internal */
|
|
2299
|
+
export const ProfileVisitDaily$inboundSchema: z.ZodMiniType<
|
|
2300
|
+
ProfileVisitDaily,
|
|
2301
|
+
unknown
|
|
2302
|
+
> = z.object({
|
|
2303
|
+
current: types.number(),
|
|
2304
|
+
limit: types.number(),
|
|
2305
|
+
remaining: types.number(),
|
|
2306
|
+
});
|
|
2307
|
+
|
|
2308
|
+
export function profileVisitDailyFromJSON(
|
|
2309
|
+
jsonString: string,
|
|
2310
|
+
): SafeParseResult<ProfileVisitDaily, SDKValidationError> {
|
|
2311
|
+
return safeParse(
|
|
2312
|
+
jsonString,
|
|
2313
|
+
(x) => ProfileVisitDaily$inboundSchema.parse(JSON.parse(x)),
|
|
2314
|
+
`Failed to parse 'ProfileVisitDaily' from JSON`,
|
|
2315
|
+
);
|
|
2316
|
+
}
|
|
2317
|
+
|
|
2318
|
+
/** @internal */
|
|
2319
|
+
export const ProfileVisitWeekly$inboundSchema: z.ZodMiniType<
|
|
2320
|
+
ProfileVisitWeekly,
|
|
2321
|
+
unknown
|
|
2322
|
+
> = z.object({
|
|
2323
|
+
current: types.number(),
|
|
2324
|
+
limit: types.number(),
|
|
2325
|
+
remaining: types.number(),
|
|
2326
|
+
});
|
|
2327
|
+
|
|
2328
|
+
export function profileVisitWeeklyFromJSON(
|
|
2329
|
+
jsonString: string,
|
|
2330
|
+
): SafeParseResult<ProfileVisitWeekly, SDKValidationError> {
|
|
2331
|
+
return safeParse(
|
|
2332
|
+
jsonString,
|
|
2333
|
+
(x) => ProfileVisitWeekly$inboundSchema.parse(JSON.parse(x)),
|
|
2334
|
+
`Failed to parse 'ProfileVisitWeekly' from JSON`,
|
|
2335
|
+
);
|
|
2336
|
+
}
|
|
2337
|
+
|
|
2338
|
+
/** @internal */
|
|
2339
|
+
export const ProfileVisit$inboundSchema: z.ZodMiniType<ProfileVisit, unknown> =
|
|
2340
|
+
z.object({
|
|
2341
|
+
daily: z.lazy(() => ProfileVisitDaily$inboundSchema),
|
|
2342
|
+
weekly: types.nullable(z.lazy(() => ProfileVisitWeekly$inboundSchema)),
|
|
2343
|
+
minIntervalSeconds: types.number(),
|
|
2344
|
+
nextResetDaily: types.date(),
|
|
2345
|
+
nextResetWeekly: types.nullable(types.date()),
|
|
2346
|
+
});
|
|
2347
|
+
|
|
2348
|
+
export function profileVisitFromJSON(
|
|
2349
|
+
jsonString: string,
|
|
2350
|
+
): SafeParseResult<ProfileVisit, SDKValidationError> {
|
|
2351
|
+
return safeParse(
|
|
2352
|
+
jsonString,
|
|
2353
|
+
(x) => ProfileVisit$inboundSchema.parse(JSON.parse(x)),
|
|
2354
|
+
`Failed to parse 'ProfileVisit' from JSON`,
|
|
2355
|
+
);
|
|
2356
|
+
}
|
|
2357
|
+
|
|
2358
|
+
/** @internal */
|
|
2359
|
+
export const ScrapingDaily$inboundSchema: z.ZodMiniType<
|
|
2360
|
+
ScrapingDaily,
|
|
2361
|
+
unknown
|
|
2362
|
+
> = z.object({
|
|
2363
|
+
current: types.number(),
|
|
2364
|
+
limit: types.number(),
|
|
2365
|
+
remaining: types.number(),
|
|
2366
|
+
});
|
|
2367
|
+
|
|
2368
|
+
export function scrapingDailyFromJSON(
|
|
2369
|
+
jsonString: string,
|
|
2370
|
+
): SafeParseResult<ScrapingDaily, SDKValidationError> {
|
|
2371
|
+
return safeParse(
|
|
2372
|
+
jsonString,
|
|
2373
|
+
(x) => ScrapingDaily$inboundSchema.parse(JSON.parse(x)),
|
|
2374
|
+
`Failed to parse 'ScrapingDaily' from JSON`,
|
|
2375
|
+
);
|
|
2376
|
+
}
|
|
2377
|
+
|
|
2378
|
+
/** @internal */
|
|
2379
|
+
export const ScrapingWeekly$inboundSchema: z.ZodMiniType<
|
|
2380
|
+
ScrapingWeekly,
|
|
2381
|
+
unknown
|
|
2382
|
+
> = z.object({
|
|
2383
|
+
current: types.number(),
|
|
2384
|
+
limit: types.number(),
|
|
2385
|
+
remaining: types.number(),
|
|
2386
|
+
});
|
|
2387
|
+
|
|
2388
|
+
export function scrapingWeeklyFromJSON(
|
|
2389
|
+
jsonString: string,
|
|
2390
|
+
): SafeParseResult<ScrapingWeekly, SDKValidationError> {
|
|
2391
|
+
return safeParse(
|
|
2392
|
+
jsonString,
|
|
2393
|
+
(x) => ScrapingWeekly$inboundSchema.parse(JSON.parse(x)),
|
|
2394
|
+
`Failed to parse 'ScrapingWeekly' from JSON`,
|
|
2395
|
+
);
|
|
2396
|
+
}
|
|
2397
|
+
|
|
2398
|
+
/** @internal */
|
|
2399
|
+
export const Scraping$inboundSchema: z.ZodMiniType<Scraping, unknown> = z
|
|
2400
|
+
.object({
|
|
2401
|
+
daily: z.lazy(() => ScrapingDaily$inboundSchema),
|
|
2402
|
+
weekly: types.nullable(z.lazy(() => ScrapingWeekly$inboundSchema)),
|
|
2403
|
+
minIntervalSeconds: types.number(),
|
|
2404
|
+
nextResetDaily: types.date(),
|
|
2405
|
+
nextResetWeekly: types.nullable(types.date()),
|
|
2406
|
+
});
|
|
2407
|
+
|
|
2408
|
+
export function scrapingFromJSON(
|
|
2409
|
+
jsonString: string,
|
|
2410
|
+
): SafeParseResult<Scraping, SDKValidationError> {
|
|
2411
|
+
return safeParse(
|
|
2412
|
+
jsonString,
|
|
2413
|
+
(x) => Scraping$inboundSchema.parse(JSON.parse(x)),
|
|
2414
|
+
`Failed to parse 'Scraping' from JSON`,
|
|
2415
|
+
);
|
|
2416
|
+
}
|
|
2417
|
+
|
|
2418
|
+
/** @internal */
|
|
2419
|
+
export const Limits$inboundSchema: z.ZodMiniType<Limits, unknown> = z.pipe(
|
|
2420
|
+
z.object({
|
|
2421
|
+
connection_request: z.lazy(() => ConnectionRequest$inboundSchema),
|
|
2422
|
+
message: z.lazy(() => GetMyLimitsMessage$inboundSchema),
|
|
2423
|
+
profile_visit: z.lazy(() => ProfileVisit$inboundSchema),
|
|
2424
|
+
scraping: z.lazy(() => Scraping$inboundSchema),
|
|
2425
|
+
}),
|
|
2426
|
+
z.transform((v) => {
|
|
2427
|
+
return remap$(v, {
|
|
2428
|
+
"connection_request": "connectionRequest",
|
|
2429
|
+
"profile_visit": "profileVisit",
|
|
2430
|
+
});
|
|
2431
|
+
}),
|
|
2432
|
+
);
|
|
2433
|
+
|
|
2434
|
+
export function limitsFromJSON(
|
|
2435
|
+
jsonString: string,
|
|
2436
|
+
): SafeParseResult<Limits, SDKValidationError> {
|
|
2437
|
+
return safeParse(
|
|
2438
|
+
jsonString,
|
|
2439
|
+
(x) => Limits$inboundSchema.parse(JSON.parse(x)),
|
|
2440
|
+
`Failed to parse 'Limits' from JSON`,
|
|
2441
|
+
);
|
|
2442
|
+
}
|
|
2443
|
+
|
|
2444
|
+
/** @internal */
|
|
2445
|
+
export const GetMyLimitsResponse$inboundSchema: z.ZodMiniType<
|
|
2446
|
+
GetMyLimitsResponse,
|
|
2447
|
+
unknown
|
|
2448
|
+
> = z.object({
|
|
2449
|
+
success: types.boolean(),
|
|
2450
|
+
multiplier: types.number(),
|
|
2451
|
+
limits: z.lazy(() => Limits$inboundSchema),
|
|
2452
|
+
creditsUsed: types.number(),
|
|
2453
|
+
retryAfter: types.number(),
|
|
2454
|
+
});
|
|
2455
|
+
|
|
2456
|
+
export function getMyLimitsResponseFromJSON(
|
|
2457
|
+
jsonString: string,
|
|
2458
|
+
): SafeParseResult<GetMyLimitsResponse, SDKValidationError> {
|
|
2459
|
+
return safeParse(
|
|
2460
|
+
jsonString,
|
|
2461
|
+
(x) => GetMyLimitsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
2462
|
+
`Failed to parse 'GetMyLimitsResponse' from JSON`,
|
|
2463
|
+
);
|
|
2464
|
+
}
|
|
2465
|
+
|
|
2466
|
+
/** @internal */
|
|
2467
|
+
export const Credits$inboundSchema: z.ZodMiniType<Credits, unknown> = z.object({
|
|
2468
|
+
current: types.number(),
|
|
2469
|
+
limit: types.number(),
|
|
2470
|
+
remaining: types.number(),
|
|
2471
|
+
percentage: types.number(),
|
|
2472
|
+
});
|
|
2473
|
+
|
|
2474
|
+
export function creditsFromJSON(
|
|
2475
|
+
jsonString: string,
|
|
2476
|
+
): SafeParseResult<Credits, SDKValidationError> {
|
|
2477
|
+
return safeParse(
|
|
2478
|
+
jsonString,
|
|
2479
|
+
(x) => Credits$inboundSchema.parse(JSON.parse(x)),
|
|
2480
|
+
`Failed to parse 'Credits' from JSON`,
|
|
2481
|
+
);
|
|
2482
|
+
}
|
|
2483
|
+
|
|
2484
|
+
/** @internal */
|
|
2485
|
+
export const GetMyCreditsResponse$inboundSchema: z.ZodMiniType<
|
|
2486
|
+
GetMyCreditsResponse,
|
|
2487
|
+
unknown
|
|
2488
|
+
> = z.object({
|
|
2489
|
+
success: types.boolean(),
|
|
2490
|
+
credits: z.lazy(() => Credits$inboundSchema),
|
|
2491
|
+
creditsUsed: types.number(),
|
|
2492
|
+
retryAfter: types.number(),
|
|
2493
|
+
});
|
|
2494
|
+
|
|
2495
|
+
export function getMyCreditsResponseFromJSON(
|
|
2496
|
+
jsonString: string,
|
|
2497
|
+
): SafeParseResult<GetMyCreditsResponse, SDKValidationError> {
|
|
2498
|
+
return safeParse(
|
|
2499
|
+
jsonString,
|
|
2500
|
+
(x) => GetMyCreditsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
2501
|
+
`Failed to parse 'GetMyCreditsResponse' from JSON`,
|
|
2502
|
+
);
|
|
2503
|
+
}
|
|
2504
|
+
|
|
2505
|
+
/** @internal */
|
|
2506
|
+
export type ListInboxConversationsRequest$Outbound = {
|
|
2507
|
+
nextCursor?: string | undefined;
|
|
2508
|
+
};
|
|
2509
|
+
|
|
2510
|
+
/** @internal */
|
|
2511
|
+
export const ListInboxConversationsRequest$outboundSchema: z.ZodMiniType<
|
|
2512
|
+
ListInboxConversationsRequest$Outbound,
|
|
2513
|
+
ListInboxConversationsRequest
|
|
2514
|
+
> = z.object({
|
|
2515
|
+
nextCursor: z.optional(z.string()),
|
|
2516
|
+
});
|
|
2517
|
+
|
|
2518
|
+
export function listInboxConversationsRequestToJSON(
|
|
2519
|
+
listInboxConversationsRequest: ListInboxConversationsRequest,
|
|
2520
|
+
): string {
|
|
2521
|
+
return JSON.stringify(
|
|
2522
|
+
ListInboxConversationsRequest$outboundSchema.parse(
|
|
2523
|
+
listInboxConversationsRequest,
|
|
2524
|
+
),
|
|
2525
|
+
);
|
|
2526
|
+
}
|
|
2527
|
+
|
|
2528
|
+
/** @internal */
|
|
2529
|
+
export const ListInboxConversationsParticipant$inboundSchema: z.ZodMiniType<
|
|
2530
|
+
ListInboxConversationsParticipant,
|
|
2531
|
+
unknown
|
|
2532
|
+
> = z.object({
|
|
2533
|
+
profileUrn: types.string(),
|
|
2534
|
+
firstName: types.string(),
|
|
2535
|
+
lastName: types.string(),
|
|
2536
|
+
profileUrl: types.string(),
|
|
2537
|
+
headline: types.nullable(types.string()),
|
|
2538
|
+
profilePicture: types.nullable(types.string()),
|
|
2539
|
+
});
|
|
2540
|
+
|
|
2541
|
+
export function listInboxConversationsParticipantFromJSON(
|
|
2542
|
+
jsonString: string,
|
|
2543
|
+
): SafeParseResult<ListInboxConversationsParticipant, SDKValidationError> {
|
|
2544
|
+
return safeParse(
|
|
2545
|
+
jsonString,
|
|
2546
|
+
(x) => ListInboxConversationsParticipant$inboundSchema.parse(JSON.parse(x)),
|
|
2547
|
+
`Failed to parse 'ListInboxConversationsParticipant' from JSON`,
|
|
2548
|
+
);
|
|
2549
|
+
}
|
|
2550
|
+
|
|
2551
|
+
/** @internal */
|
|
2552
|
+
export const ListInboxConversationsLastMessage$inboundSchema: z.ZodMiniType<
|
|
2553
|
+
ListInboxConversationsLastMessage,
|
|
2554
|
+
unknown
|
|
2555
|
+
> = z.object({
|
|
2556
|
+
text: types.string(),
|
|
2557
|
+
deliveredAt: types.number(),
|
|
2558
|
+
senderProfileUrn: types.string(),
|
|
2559
|
+
});
|
|
2560
|
+
|
|
2561
|
+
export function listInboxConversationsLastMessageFromJSON(
|
|
2562
|
+
jsonString: string,
|
|
2563
|
+
): SafeParseResult<ListInboxConversationsLastMessage, SDKValidationError> {
|
|
2564
|
+
return safeParse(
|
|
2565
|
+
jsonString,
|
|
2566
|
+
(x) => ListInboxConversationsLastMessage$inboundSchema.parse(JSON.parse(x)),
|
|
2567
|
+
`Failed to parse 'ListInboxConversationsLastMessage' from JSON`,
|
|
2568
|
+
);
|
|
2569
|
+
}
|
|
2570
|
+
|
|
2571
|
+
/** @internal */
|
|
2572
|
+
export const ListInboxConversationsConversation$inboundSchema: z.ZodMiniType<
|
|
2573
|
+
ListInboxConversationsConversation,
|
|
2574
|
+
unknown
|
|
2575
|
+
> = z.object({
|
|
2576
|
+
conversationUrn: types.string(),
|
|
2577
|
+
conversationUrl: types.string(),
|
|
2578
|
+
lastActivityAt: types.number(),
|
|
2579
|
+
createdAt: types.number(),
|
|
2580
|
+
read: types.boolean(),
|
|
2581
|
+
unreadCount: types.number(),
|
|
2582
|
+
groupChat: types.boolean(),
|
|
2583
|
+
participants: z.array(
|
|
2584
|
+
z.lazy(() => ListInboxConversationsParticipant$inboundSchema),
|
|
2585
|
+
),
|
|
2586
|
+
lastMessage: types.nullable(
|
|
2587
|
+
z.lazy(() => ListInboxConversationsLastMessage$inboundSchema),
|
|
2588
|
+
),
|
|
2589
|
+
});
|
|
2590
|
+
|
|
2591
|
+
export function listInboxConversationsConversationFromJSON(
|
|
2592
|
+
jsonString: string,
|
|
2593
|
+
): SafeParseResult<ListInboxConversationsConversation, SDKValidationError> {
|
|
2594
|
+
return safeParse(
|
|
2595
|
+
jsonString,
|
|
2596
|
+
(x) =>
|
|
2597
|
+
ListInboxConversationsConversation$inboundSchema.parse(JSON.parse(x)),
|
|
2598
|
+
`Failed to parse 'ListInboxConversationsConversation' from JSON`,
|
|
2599
|
+
);
|
|
2600
|
+
}
|
|
2601
|
+
|
|
2602
|
+
/** @internal */
|
|
2603
|
+
export const ListInboxConversationsResponse$inboundSchema: z.ZodMiniType<
|
|
2604
|
+
ListInboxConversationsResponse,
|
|
2605
|
+
unknown
|
|
2606
|
+
> = z.object({
|
|
2607
|
+
success: types.boolean(),
|
|
2608
|
+
conversations: z.array(
|
|
2609
|
+
z.lazy(() => ListInboxConversationsConversation$inboundSchema),
|
|
2610
|
+
),
|
|
2611
|
+
nextCursor: types.nullable(types.string()),
|
|
2612
|
+
creditsUsed: types.number(),
|
|
2613
|
+
retryAfter: types.number(),
|
|
2614
|
+
});
|
|
2615
|
+
|
|
2616
|
+
export function listInboxConversationsResponseFromJSON(
|
|
2617
|
+
jsonString: string,
|
|
2618
|
+
): SafeParseResult<ListInboxConversationsResponse, SDKValidationError> {
|
|
2619
|
+
return safeParse(
|
|
2620
|
+
jsonString,
|
|
2621
|
+
(x) => ListInboxConversationsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
2622
|
+
`Failed to parse 'ListInboxConversationsResponse' from JSON`,
|
|
2623
|
+
);
|
|
2624
|
+
}
|
|
2625
|
+
|
|
2626
|
+
/** @internal */
|
|
2627
|
+
export type SearchLinkedInConversationsRequest$Outbound = {
|
|
2628
|
+
keywords: string;
|
|
2629
|
+
nextCursor?: string | undefined;
|
|
2630
|
+
};
|
|
2631
|
+
|
|
2632
|
+
/** @internal */
|
|
2633
|
+
export const SearchLinkedInConversationsRequest$outboundSchema: z.ZodMiniType<
|
|
2634
|
+
SearchLinkedInConversationsRequest$Outbound,
|
|
2635
|
+
SearchLinkedInConversationsRequest
|
|
2636
|
+
> = z.object({
|
|
2637
|
+
keywords: z.string(),
|
|
2638
|
+
nextCursor: z.optional(z.string()),
|
|
2639
|
+
});
|
|
2640
|
+
|
|
2641
|
+
export function searchLinkedInConversationsRequestToJSON(
|
|
2642
|
+
searchLinkedInConversationsRequest: SearchLinkedInConversationsRequest,
|
|
2643
|
+
): string {
|
|
2644
|
+
return JSON.stringify(
|
|
2645
|
+
SearchLinkedInConversationsRequest$outboundSchema.parse(
|
|
2646
|
+
searchLinkedInConversationsRequest,
|
|
2647
|
+
),
|
|
2648
|
+
);
|
|
2649
|
+
}
|
|
2650
|
+
|
|
2651
|
+
/** @internal */
|
|
2652
|
+
export const SearchLinkedInConversationsParticipant$inboundSchema:
|
|
2653
|
+
z.ZodMiniType<SearchLinkedInConversationsParticipant, unknown> = z.object({
|
|
2654
|
+
profileUrn: types.string(),
|
|
2655
|
+
firstName: types.string(),
|
|
2656
|
+
lastName: types.string(),
|
|
2657
|
+
profileUrl: types.string(),
|
|
2658
|
+
headline: types.nullable(types.string()),
|
|
2659
|
+
profilePicture: types.nullable(types.string()),
|
|
2660
|
+
});
|
|
2661
|
+
|
|
2662
|
+
export function searchLinkedInConversationsParticipantFromJSON(
|
|
2663
|
+
jsonString: string,
|
|
2664
|
+
): SafeParseResult<SearchLinkedInConversationsParticipant, SDKValidationError> {
|
|
2665
|
+
return safeParse(
|
|
2666
|
+
jsonString,
|
|
2667
|
+
(x) =>
|
|
2668
|
+
SearchLinkedInConversationsParticipant$inboundSchema.parse(JSON.parse(x)),
|
|
2669
|
+
`Failed to parse 'SearchLinkedInConversationsParticipant' from JSON`,
|
|
2670
|
+
);
|
|
2671
|
+
}
|
|
2672
|
+
|
|
2673
|
+
/** @internal */
|
|
2674
|
+
export const SearchLinkedInConversationsLastMessage$inboundSchema:
|
|
2675
|
+
z.ZodMiniType<SearchLinkedInConversationsLastMessage, unknown> = z.object({
|
|
2676
|
+
text: types.string(),
|
|
2677
|
+
deliveredAt: types.number(),
|
|
2678
|
+
senderProfileUrn: types.string(),
|
|
2679
|
+
});
|
|
2680
|
+
|
|
2681
|
+
export function searchLinkedInConversationsLastMessageFromJSON(
|
|
2682
|
+
jsonString: string,
|
|
2683
|
+
): SafeParseResult<SearchLinkedInConversationsLastMessage, SDKValidationError> {
|
|
2684
|
+
return safeParse(
|
|
2685
|
+
jsonString,
|
|
2686
|
+
(x) =>
|
|
2687
|
+
SearchLinkedInConversationsLastMessage$inboundSchema.parse(JSON.parse(x)),
|
|
2688
|
+
`Failed to parse 'SearchLinkedInConversationsLastMessage' from JSON`,
|
|
2689
|
+
);
|
|
2690
|
+
}
|
|
2691
|
+
|
|
2692
|
+
/** @internal */
|
|
2693
|
+
export const SearchLinkedInConversationsConversation$inboundSchema:
|
|
2694
|
+
z.ZodMiniType<SearchLinkedInConversationsConversation, unknown> = z.object({
|
|
2695
|
+
conversationUrn: types.string(),
|
|
2696
|
+
conversationUrl: types.string(),
|
|
2697
|
+
lastActivityAt: types.number(),
|
|
2698
|
+
createdAt: types.number(),
|
|
2699
|
+
read: types.boolean(),
|
|
2700
|
+
unreadCount: types.number(),
|
|
2701
|
+
groupChat: types.boolean(),
|
|
2702
|
+
participants: z.array(
|
|
2703
|
+
z.lazy(() => SearchLinkedInConversationsParticipant$inboundSchema),
|
|
2704
|
+
),
|
|
2705
|
+
lastMessage: types.nullable(
|
|
2706
|
+
z.lazy(() => SearchLinkedInConversationsLastMessage$inboundSchema),
|
|
2707
|
+
),
|
|
2708
|
+
});
|
|
2709
|
+
|
|
2710
|
+
export function searchLinkedInConversationsConversationFromJSON(
|
|
2711
|
+
jsonString: string,
|
|
2712
|
+
): SafeParseResult<
|
|
2713
|
+
SearchLinkedInConversationsConversation,
|
|
2714
|
+
SDKValidationError
|
|
2715
|
+
> {
|
|
2716
|
+
return safeParse(
|
|
2717
|
+
jsonString,
|
|
2718
|
+
(x) =>
|
|
2719
|
+
SearchLinkedInConversationsConversation$inboundSchema.parse(
|
|
2720
|
+
JSON.parse(x),
|
|
2721
|
+
),
|
|
2722
|
+
`Failed to parse 'SearchLinkedInConversationsConversation' from JSON`,
|
|
2723
|
+
);
|
|
2724
|
+
}
|
|
2725
|
+
|
|
2726
|
+
/** @internal */
|
|
2727
|
+
export const SearchLinkedInConversationsResponse$inboundSchema: z.ZodMiniType<
|
|
2728
|
+
SearchLinkedInConversationsResponse,
|
|
2729
|
+
unknown
|
|
2730
|
+
> = z.object({
|
|
2731
|
+
success: types.boolean(),
|
|
2732
|
+
conversations: z.array(
|
|
2733
|
+
z.lazy(() => SearchLinkedInConversationsConversation$inboundSchema),
|
|
2734
|
+
),
|
|
2735
|
+
nextCursor: types.nullable(types.string()),
|
|
2736
|
+
creditsUsed: types.number(),
|
|
2737
|
+
retryAfter: types.number(),
|
|
2738
|
+
});
|
|
2739
|
+
|
|
2740
|
+
export function searchLinkedInConversationsResponseFromJSON(
|
|
2741
|
+
jsonString: string,
|
|
2742
|
+
): SafeParseResult<SearchLinkedInConversationsResponse, SDKValidationError> {
|
|
2743
|
+
return safeParse(
|
|
2744
|
+
jsonString,
|
|
2745
|
+
(x) =>
|
|
2746
|
+
SearchLinkedInConversationsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
2747
|
+
`Failed to parse 'SearchLinkedInConversationsResponse' from JSON`,
|
|
2748
|
+
);
|
|
2749
|
+
}
|
|
2750
|
+
|
|
2751
|
+
/** @internal */
|
|
2752
|
+
export type FindLinkedInConversationRequest$Outbound = {
|
|
2753
|
+
profile: string;
|
|
2754
|
+
includeMessages: boolean;
|
|
2755
|
+
};
|
|
2756
|
+
|
|
2757
|
+
/** @internal */
|
|
2758
|
+
export const FindLinkedInConversationRequest$outboundSchema: z.ZodMiniType<
|
|
2759
|
+
FindLinkedInConversationRequest$Outbound,
|
|
2760
|
+
FindLinkedInConversationRequest
|
|
2761
|
+
> = z.object({
|
|
2762
|
+
profile: z.string(),
|
|
2763
|
+
includeMessages: z._default(z.boolean(), false),
|
|
2764
|
+
});
|
|
2765
|
+
|
|
2766
|
+
export function findLinkedInConversationRequestToJSON(
|
|
2767
|
+
findLinkedInConversationRequest: FindLinkedInConversationRequest,
|
|
2768
|
+
): string {
|
|
2769
|
+
return JSON.stringify(
|
|
2770
|
+
FindLinkedInConversationRequest$outboundSchema.parse(
|
|
2771
|
+
findLinkedInConversationRequest,
|
|
2772
|
+
),
|
|
2773
|
+
);
|
|
2774
|
+
}
|
|
2775
|
+
|
|
2776
|
+
/** @internal */
|
|
2777
|
+
export const FindLinkedInConversationParticipant$inboundSchema: z.ZodMiniType<
|
|
2778
|
+
FindLinkedInConversationParticipant,
|
|
2779
|
+
unknown
|
|
2780
|
+
> = z.object({
|
|
2781
|
+
profileUrn: types.string(),
|
|
2782
|
+
firstName: types.string(),
|
|
2783
|
+
lastName: types.string(),
|
|
2784
|
+
profileUrl: types.string(),
|
|
2785
|
+
headline: types.nullable(types.string()),
|
|
2786
|
+
profilePicture: types.nullable(types.string()),
|
|
2787
|
+
});
|
|
2788
|
+
|
|
2789
|
+
export function findLinkedInConversationParticipantFromJSON(
|
|
2790
|
+
jsonString: string,
|
|
2791
|
+
): SafeParseResult<FindLinkedInConversationParticipant, SDKValidationError> {
|
|
2792
|
+
return safeParse(
|
|
2793
|
+
jsonString,
|
|
2794
|
+
(x) =>
|
|
2795
|
+
FindLinkedInConversationParticipant$inboundSchema.parse(JSON.parse(x)),
|
|
2796
|
+
`Failed to parse 'FindLinkedInConversationParticipant' from JSON`,
|
|
2797
|
+
);
|
|
2798
|
+
}
|
|
2799
|
+
|
|
2800
|
+
/** @internal */
|
|
2801
|
+
export const FindLinkedInConversationLastMessage$inboundSchema: z.ZodMiniType<
|
|
2802
|
+
FindLinkedInConversationLastMessage,
|
|
2803
|
+
unknown
|
|
2804
|
+
> = z.object({
|
|
2805
|
+
text: types.string(),
|
|
2806
|
+
deliveredAt: types.number(),
|
|
2807
|
+
senderProfileUrn: types.string(),
|
|
2808
|
+
});
|
|
2809
|
+
|
|
2810
|
+
export function findLinkedInConversationLastMessageFromJSON(
|
|
2811
|
+
jsonString: string,
|
|
2812
|
+
): SafeParseResult<FindLinkedInConversationLastMessage, SDKValidationError> {
|
|
2813
|
+
return safeParse(
|
|
2814
|
+
jsonString,
|
|
2815
|
+
(x) =>
|
|
2816
|
+
FindLinkedInConversationLastMessage$inboundSchema.parse(JSON.parse(x)),
|
|
2817
|
+
`Failed to parse 'FindLinkedInConversationLastMessage' from JSON`,
|
|
2818
|
+
);
|
|
2819
|
+
}
|
|
2820
|
+
|
|
2821
|
+
/** @internal */
|
|
2822
|
+
export const FindLinkedInConversationConversation$inboundSchema: z.ZodMiniType<
|
|
2823
|
+
FindLinkedInConversationConversation,
|
|
2824
|
+
unknown
|
|
2825
|
+
> = z.object({
|
|
2826
|
+
conversationUrn: types.string(),
|
|
2827
|
+
conversationUrl: types.string(),
|
|
2828
|
+
lastActivityAt: types.number(),
|
|
2829
|
+
createdAt: types.number(),
|
|
2830
|
+
read: types.boolean(),
|
|
2831
|
+
unreadCount: types.number(),
|
|
2832
|
+
groupChat: types.boolean(),
|
|
2833
|
+
participants: z.array(
|
|
2834
|
+
z.lazy(() => FindLinkedInConversationParticipant$inboundSchema),
|
|
2835
|
+
),
|
|
2836
|
+
lastMessage: types.nullable(
|
|
2837
|
+
z.lazy(() => FindLinkedInConversationLastMessage$inboundSchema),
|
|
2838
|
+
),
|
|
2839
|
+
});
|
|
2840
|
+
|
|
2841
|
+
export function findLinkedInConversationConversationFromJSON(
|
|
2842
|
+
jsonString: string,
|
|
2843
|
+
): SafeParseResult<FindLinkedInConversationConversation, SDKValidationError> {
|
|
2844
|
+
return safeParse(
|
|
2845
|
+
jsonString,
|
|
2846
|
+
(x) =>
|
|
2847
|
+
FindLinkedInConversationConversation$inboundSchema.parse(JSON.parse(x)),
|
|
2848
|
+
`Failed to parse 'FindLinkedInConversationConversation' from JSON`,
|
|
2849
|
+
);
|
|
2850
|
+
}
|
|
2851
|
+
|
|
2852
|
+
/** @internal */
|
|
2853
|
+
export const FindLinkedInConversationSender$inboundSchema: z.ZodMiniType<
|
|
2854
|
+
FindLinkedInConversationSender,
|
|
2855
|
+
unknown
|
|
2856
|
+
> = z.object({
|
|
2857
|
+
firstName: types.string(),
|
|
2858
|
+
lastName: types.string(),
|
|
2859
|
+
profileUrl: types.string(),
|
|
2860
|
+
headline: types.nullable(types.string()),
|
|
2861
|
+
profilePicture: types.nullable(types.string()),
|
|
2862
|
+
});
|
|
2863
|
+
|
|
2864
|
+
export function findLinkedInConversationSenderFromJSON(
|
|
2865
|
+
jsonString: string,
|
|
2866
|
+
): SafeParseResult<FindLinkedInConversationSender, SDKValidationError> {
|
|
2867
|
+
return safeParse(
|
|
2868
|
+
jsonString,
|
|
2869
|
+
(x) => FindLinkedInConversationSender$inboundSchema.parse(JSON.parse(x)),
|
|
2870
|
+
`Failed to parse 'FindLinkedInConversationSender' from JSON`,
|
|
2871
|
+
);
|
|
2872
|
+
}
|
|
2873
|
+
|
|
2874
|
+
/** @internal */
|
|
2875
|
+
export const FindLinkedInConversationType$inboundSchema: z.ZodMiniType<
|
|
2876
|
+
FindLinkedInConversationType,
|
|
2877
|
+
unknown
|
|
2878
|
+
> = openEnums.inboundSchema(FindLinkedInConversationType);
|
|
2879
|
+
|
|
2880
|
+
/** @internal */
|
|
2881
|
+
export const FindLinkedInConversationAttachment$inboundSchema: z.ZodMiniType<
|
|
2882
|
+
FindLinkedInConversationAttachment,
|
|
2883
|
+
unknown
|
|
2884
|
+
> = z.object({
|
|
2885
|
+
type: FindLinkedInConversationType$inboundSchema,
|
|
2886
|
+
audioUrl: types.optional(types.string()),
|
|
2887
|
+
audioDuration: types.optional(types.number()),
|
|
2888
|
+
hostUrn: types.optional(types.string()),
|
|
2889
|
+
repliedText: types.optional(types.string()),
|
|
2890
|
+
repliedSenderName: types.optional(types.string()),
|
|
2891
|
+
imageUrl: types.optional(types.string()),
|
|
2892
|
+
fileName: types.optional(types.string()),
|
|
2893
|
+
fileUrl: types.optional(types.string()),
|
|
2894
|
+
});
|
|
2895
|
+
|
|
2896
|
+
export function findLinkedInConversationAttachmentFromJSON(
|
|
2897
|
+
jsonString: string,
|
|
2898
|
+
): SafeParseResult<FindLinkedInConversationAttachment, SDKValidationError> {
|
|
2899
|
+
return safeParse(
|
|
2900
|
+
jsonString,
|
|
2901
|
+
(x) =>
|
|
2902
|
+
FindLinkedInConversationAttachment$inboundSchema.parse(JSON.parse(x)),
|
|
2903
|
+
`Failed to parse 'FindLinkedInConversationAttachment' from JSON`,
|
|
2904
|
+
);
|
|
2905
|
+
}
|
|
2906
|
+
|
|
2907
|
+
/** @internal */
|
|
2908
|
+
export const FindLinkedInConversationMessage$inboundSchema: z.ZodMiniType<
|
|
2909
|
+
FindLinkedInConversationMessage,
|
|
2910
|
+
unknown
|
|
2911
|
+
> = z.object({
|
|
2912
|
+
messageUrn: types.string(),
|
|
2913
|
+
text: types.string(),
|
|
2914
|
+
deliveredAt: types.number(),
|
|
2915
|
+
senderProfileUrn: types.string(),
|
|
2916
|
+
sender: z.lazy(() => FindLinkedInConversationSender$inboundSchema),
|
|
2917
|
+
attachments: z.array(
|
|
2918
|
+
z.lazy(() => FindLinkedInConversationAttachment$inboundSchema),
|
|
2919
|
+
),
|
|
2920
|
+
});
|
|
2921
|
+
|
|
2922
|
+
export function findLinkedInConversationMessageFromJSON(
|
|
2923
|
+
jsonString: string,
|
|
2924
|
+
): SafeParseResult<FindLinkedInConversationMessage, SDKValidationError> {
|
|
2925
|
+
return safeParse(
|
|
2926
|
+
jsonString,
|
|
2927
|
+
(x) => FindLinkedInConversationMessage$inboundSchema.parse(JSON.parse(x)),
|
|
2928
|
+
`Failed to parse 'FindLinkedInConversationMessage' from JSON`,
|
|
2929
|
+
);
|
|
2930
|
+
}
|
|
2931
|
+
|
|
2932
|
+
/** @internal */
|
|
2933
|
+
export const FindLinkedInConversationResponse$inboundSchema: z.ZodMiniType<
|
|
2934
|
+
FindLinkedInConversationResponse,
|
|
2935
|
+
unknown
|
|
2936
|
+
> = z.object({
|
|
2937
|
+
success: types.boolean(),
|
|
2938
|
+
found: types.boolean(),
|
|
2939
|
+
conversation: types.nullable(
|
|
2940
|
+
z.lazy(() => FindLinkedInConversationConversation$inboundSchema),
|
|
2941
|
+
),
|
|
2942
|
+
messages: types.nullable(
|
|
2943
|
+
z.array(z.lazy(() => FindLinkedInConversationMessage$inboundSchema)),
|
|
2944
|
+
),
|
|
2945
|
+
creditsUsed: types.number(),
|
|
2946
|
+
retryAfter: types.number(),
|
|
2947
|
+
});
|
|
2948
|
+
|
|
2949
|
+
export function findLinkedInConversationResponseFromJSON(
|
|
2950
|
+
jsonString: string,
|
|
2951
|
+
): SafeParseResult<FindLinkedInConversationResponse, SDKValidationError> {
|
|
2952
|
+
return safeParse(
|
|
2953
|
+
jsonString,
|
|
2954
|
+
(x) => FindLinkedInConversationResponse$inboundSchema.parse(JSON.parse(x)),
|
|
2955
|
+
`Failed to parse 'FindLinkedInConversationResponse' from JSON`,
|
|
2956
|
+
);
|
|
2957
|
+
}
|
|
2958
|
+
|
|
2959
|
+
/** @internal */
|
|
2960
|
+
export type GetConversationMessagesRequest$Outbound = {
|
|
2961
|
+
conversationUrn: string;
|
|
2962
|
+
deliveredAt?: number | undefined;
|
|
2963
|
+
};
|
|
2964
|
+
|
|
2965
|
+
/** @internal */
|
|
2966
|
+
export const GetConversationMessagesRequest$outboundSchema: z.ZodMiniType<
|
|
2967
|
+
GetConversationMessagesRequest$Outbound,
|
|
2968
|
+
GetConversationMessagesRequest
|
|
2969
|
+
> = z.object({
|
|
2970
|
+
conversationUrn: z.string(),
|
|
2971
|
+
deliveredAt: z.optional(z.int()),
|
|
2972
|
+
});
|
|
2973
|
+
|
|
2974
|
+
export function getConversationMessagesRequestToJSON(
|
|
2975
|
+
getConversationMessagesRequest: GetConversationMessagesRequest,
|
|
2976
|
+
): string {
|
|
2977
|
+
return JSON.stringify(
|
|
2978
|
+
GetConversationMessagesRequest$outboundSchema.parse(
|
|
2979
|
+
getConversationMessagesRequest,
|
|
2980
|
+
),
|
|
2981
|
+
);
|
|
2982
|
+
}
|
|
2983
|
+
|
|
2984
|
+
/** @internal */
|
|
2985
|
+
export const GetConversationMessagesSender$inboundSchema: z.ZodMiniType<
|
|
2986
|
+
GetConversationMessagesSender,
|
|
2987
|
+
unknown
|
|
2988
|
+
> = z.object({
|
|
2989
|
+
firstName: types.string(),
|
|
2990
|
+
lastName: types.string(),
|
|
2991
|
+
profileUrl: types.string(),
|
|
2992
|
+
headline: types.nullable(types.string()),
|
|
2993
|
+
profilePicture: types.nullable(types.string()),
|
|
2994
|
+
});
|
|
2995
|
+
|
|
2996
|
+
export function getConversationMessagesSenderFromJSON(
|
|
2997
|
+
jsonString: string,
|
|
2998
|
+
): SafeParseResult<GetConversationMessagesSender, SDKValidationError> {
|
|
2999
|
+
return safeParse(
|
|
3000
|
+
jsonString,
|
|
3001
|
+
(x) => GetConversationMessagesSender$inboundSchema.parse(JSON.parse(x)),
|
|
3002
|
+
`Failed to parse 'GetConversationMessagesSender' from JSON`,
|
|
3003
|
+
);
|
|
3004
|
+
}
|
|
3005
|
+
|
|
3006
|
+
/** @internal */
|
|
3007
|
+
export const GetConversationMessagesType$inboundSchema: z.ZodMiniType<
|
|
3008
|
+
GetConversationMessagesType,
|
|
3009
|
+
unknown
|
|
3010
|
+
> = openEnums.inboundSchema(GetConversationMessagesType);
|
|
3011
|
+
|
|
3012
|
+
/** @internal */
|
|
3013
|
+
export const GetConversationMessagesAttachment$inboundSchema: z.ZodMiniType<
|
|
3014
|
+
GetConversationMessagesAttachment,
|
|
3015
|
+
unknown
|
|
3016
|
+
> = z.object({
|
|
3017
|
+
type: GetConversationMessagesType$inboundSchema,
|
|
3018
|
+
audioUrl: types.optional(types.string()),
|
|
3019
|
+
audioDuration: types.optional(types.number()),
|
|
3020
|
+
hostUrn: types.optional(types.string()),
|
|
3021
|
+
repliedText: types.optional(types.string()),
|
|
3022
|
+
repliedSenderName: types.optional(types.string()),
|
|
3023
|
+
imageUrl: types.optional(types.string()),
|
|
3024
|
+
fileName: types.optional(types.string()),
|
|
3025
|
+
fileUrl: types.optional(types.string()),
|
|
3026
|
+
});
|
|
3027
|
+
|
|
3028
|
+
export function getConversationMessagesAttachmentFromJSON(
|
|
3029
|
+
jsonString: string,
|
|
3030
|
+
): SafeParseResult<GetConversationMessagesAttachment, SDKValidationError> {
|
|
3031
|
+
return safeParse(
|
|
3032
|
+
jsonString,
|
|
3033
|
+
(x) => GetConversationMessagesAttachment$inboundSchema.parse(JSON.parse(x)),
|
|
3034
|
+
`Failed to parse 'GetConversationMessagesAttachment' from JSON`,
|
|
3035
|
+
);
|
|
3036
|
+
}
|
|
3037
|
+
|
|
3038
|
+
/** @internal */
|
|
3039
|
+
export const GetConversationMessagesMessage$inboundSchema: z.ZodMiniType<
|
|
3040
|
+
GetConversationMessagesMessage,
|
|
3041
|
+
unknown
|
|
3042
|
+
> = z.object({
|
|
3043
|
+
messageUrn: types.string(),
|
|
3044
|
+
text: types.string(),
|
|
3045
|
+
deliveredAt: types.number(),
|
|
3046
|
+
senderProfileUrn: types.string(),
|
|
3047
|
+
sender: z.lazy(() => GetConversationMessagesSender$inboundSchema),
|
|
3048
|
+
attachments: z.array(
|
|
3049
|
+
z.lazy(() => GetConversationMessagesAttachment$inboundSchema),
|
|
3050
|
+
),
|
|
3051
|
+
});
|
|
3052
|
+
|
|
3053
|
+
export function getConversationMessagesMessageFromJSON(
|
|
3054
|
+
jsonString: string,
|
|
3055
|
+
): SafeParseResult<GetConversationMessagesMessage, SDKValidationError> {
|
|
3056
|
+
return safeParse(
|
|
3057
|
+
jsonString,
|
|
3058
|
+
(x) => GetConversationMessagesMessage$inboundSchema.parse(JSON.parse(x)),
|
|
3059
|
+
`Failed to parse 'GetConversationMessagesMessage' from JSON`,
|
|
3060
|
+
);
|
|
3061
|
+
}
|
|
3062
|
+
|
|
3063
|
+
/** @internal */
|
|
3064
|
+
export const GetConversationMessagesResponse$inboundSchema: z.ZodMiniType<
|
|
3065
|
+
GetConversationMessagesResponse,
|
|
3066
|
+
unknown
|
|
3067
|
+
> = z.object({
|
|
3068
|
+
success: types.boolean(),
|
|
3069
|
+
messages: z.array(z.lazy(() => GetConversationMessagesMessage$inboundSchema)),
|
|
3070
|
+
prevCursor: types.nullable(types.number()),
|
|
3071
|
+
creditsUsed: types.number(),
|
|
3072
|
+
retryAfter: types.number(),
|
|
3073
|
+
});
|
|
3074
|
+
|
|
3075
|
+
export function getConversationMessagesResponseFromJSON(
|
|
3076
|
+
jsonString: string,
|
|
3077
|
+
): SafeParseResult<GetConversationMessagesResponse, SDKValidationError> {
|
|
3078
|
+
return safeParse(
|
|
3079
|
+
jsonString,
|
|
3080
|
+
(x) => GetConversationMessagesResponse$inboundSchema.parse(JSON.parse(x)),
|
|
3081
|
+
`Failed to parse 'GetConversationMessagesResponse' from JSON`,
|
|
3082
|
+
);
|
|
3083
|
+
}
|
|
3084
|
+
|
|
3085
|
+
/** @internal */
|
|
3086
|
+
export type FilterCampaignRequest$Outbound = {
|
|
3087
|
+
campaignSlug: string;
|
|
3088
|
+
actionSlugs: string;
|
|
3089
|
+
};
|
|
3090
|
+
|
|
3091
|
+
/** @internal */
|
|
3092
|
+
export const FilterCampaignRequest$outboundSchema: z.ZodMiniType<
|
|
3093
|
+
FilterCampaignRequest$Outbound,
|
|
3094
|
+
FilterCampaignRequest
|
|
3095
|
+
> = z.object({
|
|
3096
|
+
campaignSlug: z.string(),
|
|
3097
|
+
actionSlugs: z.string(),
|
|
3098
|
+
});
|
|
3099
|
+
|
|
3100
|
+
export function filterCampaignRequestToJSON(
|
|
3101
|
+
filterCampaignRequest: FilterCampaignRequest,
|
|
3102
|
+
): string {
|
|
3103
|
+
return JSON.stringify(
|
|
3104
|
+
FilterCampaignRequest$outboundSchema.parse(filterCampaignRequest),
|
|
3105
|
+
);
|
|
3106
|
+
}
|
|
3107
|
+
|
|
3108
|
+
/** @internal */
|
|
3109
|
+
export const CheckedSlug$inboundSchema: z.ZodMiniType<CheckedSlug, unknown> = z
|
|
3110
|
+
.object({
|
|
3111
|
+
actionSlug: types.string(),
|
|
3112
|
+
completed: types.boolean(),
|
|
3113
|
+
});
|
|
3114
|
+
|
|
3115
|
+
export function checkedSlugFromJSON(
|
|
3116
|
+
jsonString: string,
|
|
3117
|
+
): SafeParseResult<CheckedSlug, SDKValidationError> {
|
|
3118
|
+
return safeParse(
|
|
3119
|
+
jsonString,
|
|
3120
|
+
(x) => CheckedSlug$inboundSchema.parse(JSON.parse(x)),
|
|
3121
|
+
`Failed to parse 'CheckedSlug' from JSON`,
|
|
3122
|
+
);
|
|
3123
|
+
}
|
|
3124
|
+
|
|
3125
|
+
/** @internal */
|
|
3126
|
+
export const FilterCampaignResponse$inboundSchema: z.ZodMiniType<
|
|
3127
|
+
FilterCampaignResponse,
|
|
3128
|
+
unknown
|
|
3129
|
+
> = z.object({
|
|
3130
|
+
filtered: types.boolean(),
|
|
3131
|
+
checkedSlugs: z.array(z.lazy(() => CheckedSlug$inboundSchema)),
|
|
3132
|
+
creditsUsed: types.number(),
|
|
3133
|
+
retryAfter: types.number(),
|
|
3134
|
+
});
|
|
3135
|
+
|
|
3136
|
+
export function filterCampaignResponseFromJSON(
|
|
3137
|
+
jsonString: string,
|
|
3138
|
+
): SafeParseResult<FilterCampaignResponse, SDKValidationError> {
|
|
3139
|
+
return safeParse(
|
|
3140
|
+
jsonString,
|
|
3141
|
+
(x) => FilterCampaignResponse$inboundSchema.parse(JSON.parse(x)),
|
|
3142
|
+
`Failed to parse 'FilterCampaignResponse' from JSON`,
|
|
3143
|
+
);
|
|
3144
|
+
}
|
|
3145
|
+
|
|
3146
|
+
/** @internal */
|
|
3147
|
+
export type GetCampaignStatusRequestBody$Outbound = {
|
|
3148
|
+
profiles: Array<string>;
|
|
3149
|
+
};
|
|
3150
|
+
|
|
3151
|
+
/** @internal */
|
|
3152
|
+
export const GetCampaignStatusRequestBody$outboundSchema: z.ZodMiniType<
|
|
3153
|
+
GetCampaignStatusRequestBody$Outbound,
|
|
3154
|
+
GetCampaignStatusRequestBody
|
|
3155
|
+
> = z.object({
|
|
3156
|
+
profiles: z.array(z.string()),
|
|
3157
|
+
});
|
|
3158
|
+
|
|
3159
|
+
export function getCampaignStatusRequestBodyToJSON(
|
|
3160
|
+
getCampaignStatusRequestBody: GetCampaignStatusRequestBody,
|
|
3161
|
+
): string {
|
|
3162
|
+
return JSON.stringify(
|
|
3163
|
+
GetCampaignStatusRequestBody$outboundSchema.parse(
|
|
3164
|
+
getCampaignStatusRequestBody,
|
|
3165
|
+
),
|
|
3166
|
+
);
|
|
3167
|
+
}
|
|
3168
|
+
|
|
3169
|
+
/** @internal */
|
|
3170
|
+
export type GetCampaignStatusRequest$Outbound = {
|
|
3171
|
+
campaignSlug: string;
|
|
3172
|
+
body: GetCampaignStatusRequestBody$Outbound;
|
|
3173
|
+
};
|
|
3174
|
+
|
|
3175
|
+
/** @internal */
|
|
3176
|
+
export const GetCampaignStatusRequest$outboundSchema: z.ZodMiniType<
|
|
3177
|
+
GetCampaignStatusRequest$Outbound,
|
|
3178
|
+
GetCampaignStatusRequest
|
|
3179
|
+
> = z.object({
|
|
3180
|
+
campaignSlug: z.string(),
|
|
3181
|
+
body: z.lazy(() => GetCampaignStatusRequestBody$outboundSchema),
|
|
3182
|
+
});
|
|
3183
|
+
|
|
3184
|
+
export function getCampaignStatusRequestToJSON(
|
|
3185
|
+
getCampaignStatusRequest: GetCampaignStatusRequest,
|
|
3186
|
+
): string {
|
|
3187
|
+
return JSON.stringify(
|
|
3188
|
+
GetCampaignStatusRequest$outboundSchema.parse(getCampaignStatusRequest),
|
|
3189
|
+
);
|
|
3190
|
+
}
|
|
3191
|
+
|
|
3192
|
+
/** @internal */
|
|
3193
|
+
export const GetCampaignStatusProfile$inboundSchema: z.ZodMiniType<
|
|
3194
|
+
GetCampaignStatusProfile,
|
|
3195
|
+
unknown
|
|
3196
|
+
> = z.object({
|
|
3197
|
+
profile: types.string(),
|
|
3198
|
+
message: types.boolean(),
|
|
3199
|
+
reply: types.boolean(),
|
|
3200
|
+
like: types.boolean(),
|
|
3201
|
+
visit: types.boolean(),
|
|
3202
|
+
connect: types.boolean(),
|
|
3203
|
+
});
|
|
3204
|
+
|
|
3205
|
+
export function getCampaignStatusProfileFromJSON(
|
|
3206
|
+
jsonString: string,
|
|
3207
|
+
): SafeParseResult<GetCampaignStatusProfile, SDKValidationError> {
|
|
3208
|
+
return safeParse(
|
|
3209
|
+
jsonString,
|
|
3210
|
+
(x) => GetCampaignStatusProfile$inboundSchema.parse(JSON.parse(x)),
|
|
3211
|
+
`Failed to parse 'GetCampaignStatusProfile' from JSON`,
|
|
3212
|
+
);
|
|
3213
|
+
}
|
|
3214
|
+
|
|
3215
|
+
/** @internal */
|
|
3216
|
+
export const GetCampaignStatusResponse$inboundSchema: z.ZodMiniType<
|
|
3217
|
+
GetCampaignStatusResponse,
|
|
3218
|
+
unknown
|
|
3219
|
+
> = z.object({
|
|
3220
|
+
success: types.boolean(),
|
|
3221
|
+
profiles: z.array(z.lazy(() => GetCampaignStatusProfile$inboundSchema)),
|
|
3222
|
+
creditsUsed: types.number(),
|
|
3223
|
+
retryAfter: types.number(),
|
|
3224
|
+
});
|
|
3225
|
+
|
|
3226
|
+
export function getCampaignStatusResponseFromJSON(
|
|
3227
|
+
jsonString: string,
|
|
3228
|
+
): SafeParseResult<GetCampaignStatusResponse, SDKValidationError> {
|
|
3229
|
+
return safeParse(
|
|
3230
|
+
jsonString,
|
|
3231
|
+
(x) => GetCampaignStatusResponse$inboundSchema.parse(JSON.parse(x)),
|
|
3232
|
+
`Failed to parse 'GetCampaignStatusResponse' from JSON`,
|
|
3233
|
+
);
|
|
3234
|
+
}
|
|
3235
|
+
|
|
3236
|
+
/** @internal */
|
|
3237
|
+
export const Action$outboundSchema: z.ZodMiniEnum<typeof Action> = z.enum(
|
|
3238
|
+
Action,
|
|
3239
|
+
);
|
|
3240
|
+
|
|
3241
|
+
/** @internal */
|
|
3242
|
+
export type SyncCampaignActionsProfile$Outbound = {
|
|
3243
|
+
profile: string;
|
|
3244
|
+
actions: Array<string>;
|
|
3245
|
+
};
|
|
3246
|
+
|
|
3247
|
+
/** @internal */
|
|
3248
|
+
export const SyncCampaignActionsProfile$outboundSchema: z.ZodMiniType<
|
|
3249
|
+
SyncCampaignActionsProfile$Outbound,
|
|
3250
|
+
SyncCampaignActionsProfile
|
|
3251
|
+
> = z.object({
|
|
3252
|
+
profile: z.string(),
|
|
3253
|
+
actions: z.array(Action$outboundSchema),
|
|
3254
|
+
});
|
|
3255
|
+
|
|
3256
|
+
export function syncCampaignActionsProfileToJSON(
|
|
3257
|
+
syncCampaignActionsProfile: SyncCampaignActionsProfile,
|
|
3258
|
+
): string {
|
|
3259
|
+
return JSON.stringify(
|
|
3260
|
+
SyncCampaignActionsProfile$outboundSchema.parse(syncCampaignActionsProfile),
|
|
3261
|
+
);
|
|
3262
|
+
}
|
|
3263
|
+
|
|
3264
|
+
/** @internal */
|
|
3265
|
+
export type SyncCampaignActionsRequestBody$Outbound = {
|
|
3266
|
+
profiles: Array<SyncCampaignActionsProfile$Outbound>;
|
|
3267
|
+
};
|
|
3268
|
+
|
|
3269
|
+
/** @internal */
|
|
3270
|
+
export const SyncCampaignActionsRequestBody$outboundSchema: z.ZodMiniType<
|
|
3271
|
+
SyncCampaignActionsRequestBody$Outbound,
|
|
3272
|
+
SyncCampaignActionsRequestBody
|
|
3273
|
+
> = z.object({
|
|
3274
|
+
profiles: z.array(z.lazy(() => SyncCampaignActionsProfile$outboundSchema)),
|
|
3275
|
+
});
|
|
3276
|
+
|
|
3277
|
+
export function syncCampaignActionsRequestBodyToJSON(
|
|
3278
|
+
syncCampaignActionsRequestBody: SyncCampaignActionsRequestBody,
|
|
3279
|
+
): string {
|
|
3280
|
+
return JSON.stringify(
|
|
3281
|
+
SyncCampaignActionsRequestBody$outboundSchema.parse(
|
|
3282
|
+
syncCampaignActionsRequestBody,
|
|
3283
|
+
),
|
|
3284
|
+
);
|
|
3285
|
+
}
|
|
3286
|
+
|
|
3287
|
+
/** @internal */
|
|
3288
|
+
export type SyncCampaignActionsRequest$Outbound = {
|
|
3289
|
+
campaignSlug: string;
|
|
3290
|
+
body: SyncCampaignActionsRequestBody$Outbound;
|
|
3291
|
+
};
|
|
3292
|
+
|
|
3293
|
+
/** @internal */
|
|
3294
|
+
export const SyncCampaignActionsRequest$outboundSchema: z.ZodMiniType<
|
|
3295
|
+
SyncCampaignActionsRequest$Outbound,
|
|
3296
|
+
SyncCampaignActionsRequest
|
|
3297
|
+
> = z.object({
|
|
3298
|
+
campaignSlug: z.string(),
|
|
3299
|
+
body: z.lazy(() => SyncCampaignActionsRequestBody$outboundSchema),
|
|
3300
|
+
});
|
|
3301
|
+
|
|
3302
|
+
export function syncCampaignActionsRequestToJSON(
|
|
3303
|
+
syncCampaignActionsRequest: SyncCampaignActionsRequest,
|
|
3304
|
+
): string {
|
|
3305
|
+
return JSON.stringify(
|
|
3306
|
+
SyncCampaignActionsRequest$outboundSchema.parse(syncCampaignActionsRequest),
|
|
3307
|
+
);
|
|
3308
|
+
}
|
|
3309
|
+
|
|
3310
|
+
/** @internal */
|
|
3311
|
+
export const Synced$inboundSchema: z.ZodMiniType<Synced, unknown> = z.object({
|
|
3312
|
+
profile: types.string(),
|
|
3313
|
+
actions: z.record(z.string(), types.boolean()),
|
|
3314
|
+
});
|
|
3315
|
+
|
|
3316
|
+
export function syncedFromJSON(
|
|
3317
|
+
jsonString: string,
|
|
3318
|
+
): SafeParseResult<Synced, SDKValidationError> {
|
|
3319
|
+
return safeParse(
|
|
3320
|
+
jsonString,
|
|
3321
|
+
(x) => Synced$inboundSchema.parse(JSON.parse(x)),
|
|
3322
|
+
`Failed to parse 'Synced' from JSON`,
|
|
3323
|
+
);
|
|
3324
|
+
}
|
|
3325
|
+
|
|
3326
|
+
/** @internal */
|
|
3327
|
+
export const SyncCampaignActionsResponse$inboundSchema: z.ZodMiniType<
|
|
3328
|
+
SyncCampaignActionsResponse,
|
|
3329
|
+
unknown
|
|
3330
|
+
> = z.object({
|
|
3331
|
+
success: types.boolean(),
|
|
3332
|
+
synced: z.array(z.lazy(() => Synced$inboundSchema)),
|
|
3333
|
+
creditsUsed: types.number(),
|
|
3334
|
+
retryAfter: types.number(),
|
|
3335
|
+
});
|
|
3336
|
+
|
|
3337
|
+
export function syncCampaignActionsResponseFromJSON(
|
|
3338
|
+
jsonString: string,
|
|
3339
|
+
): SafeParseResult<SyncCampaignActionsResponse, SDKValidationError> {
|
|
3340
|
+
return safeParse(
|
|
3341
|
+
jsonString,
|
|
3342
|
+
(x) => SyncCampaignActionsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
3343
|
+
`Failed to parse 'SyncCampaignActionsResponse' from JSON`,
|
|
3344
|
+
);
|
|
3345
|
+
}
|
|
3346
|
+
|
|
3347
|
+
/** @internal */
|
|
3348
|
+
export type GetCampaignStatsRequestBody$Outbound = {};
|
|
3349
|
+
|
|
3350
|
+
/** @internal */
|
|
3351
|
+
export const GetCampaignStatsRequestBody$outboundSchema: z.ZodMiniType<
|
|
3352
|
+
GetCampaignStatsRequestBody$Outbound,
|
|
3353
|
+
GetCampaignStatsRequestBody
|
|
3354
|
+
> = z.object({});
|
|
3355
|
+
|
|
3356
|
+
export function getCampaignStatsRequestBodyToJSON(
|
|
3357
|
+
getCampaignStatsRequestBody: GetCampaignStatsRequestBody,
|
|
3358
|
+
): string {
|
|
3359
|
+
return JSON.stringify(
|
|
3360
|
+
GetCampaignStatsRequestBody$outboundSchema.parse(
|
|
3361
|
+
getCampaignStatsRequestBody,
|
|
3362
|
+
),
|
|
3363
|
+
);
|
|
3364
|
+
}
|
|
3365
|
+
|
|
3366
|
+
/** @internal */
|
|
3367
|
+
export type GetCampaignStatsRequest$Outbound = {
|
|
3368
|
+
campaignSlug: string;
|
|
3369
|
+
body?: GetCampaignStatsRequestBody$Outbound | undefined;
|
|
3370
|
+
};
|
|
3371
|
+
|
|
3372
|
+
/** @internal */
|
|
3373
|
+
export const GetCampaignStatsRequest$outboundSchema: z.ZodMiniType<
|
|
3374
|
+
GetCampaignStatsRequest$Outbound,
|
|
3375
|
+
GetCampaignStatsRequest
|
|
3376
|
+
> = z.object({
|
|
3377
|
+
campaignSlug: z.string(),
|
|
3378
|
+
body: z.optional(z.lazy(() => GetCampaignStatsRequestBody$outboundSchema)),
|
|
3379
|
+
});
|
|
3380
|
+
|
|
3381
|
+
export function getCampaignStatsRequestToJSON(
|
|
3382
|
+
getCampaignStatsRequest: GetCampaignStatsRequest,
|
|
3383
|
+
): string {
|
|
3384
|
+
return JSON.stringify(
|
|
3385
|
+
GetCampaignStatsRequest$outboundSchema.parse(getCampaignStatsRequest),
|
|
3386
|
+
);
|
|
3387
|
+
}
|
|
3388
|
+
|
|
3389
|
+
/** @internal */
|
|
3390
|
+
export const GetCampaignStatsResponse$inboundSchema: z.ZodMiniType<
|
|
3391
|
+
GetCampaignStatsResponse,
|
|
3392
|
+
unknown
|
|
3393
|
+
> = z.object({
|
|
3394
|
+
success: types.boolean(),
|
|
3395
|
+
stats: z.record(z.string(), types.number()),
|
|
3396
|
+
totalProfiles: types.number(),
|
|
3397
|
+
creditsUsed: types.number(),
|
|
3398
|
+
retryAfter: types.number(),
|
|
3399
|
+
});
|
|
3400
|
+
|
|
3401
|
+
export function getCampaignStatsResponseFromJSON(
|
|
3402
|
+
jsonString: string,
|
|
3403
|
+
): SafeParseResult<GetCampaignStatsResponse, SDKValidationError> {
|
|
3404
|
+
return safeParse(
|
|
3405
|
+
jsonString,
|
|
3406
|
+
(x) => GetCampaignStatsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
3407
|
+
`Failed to parse 'GetCampaignStatsResponse' from JSON`,
|
|
3408
|
+
);
|
|
3409
|
+
}
|