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,494 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import * as types from "../../types/primitives.js";
|
|
7
|
+
import * as operations from "../operations/index.js";
|
|
8
|
+
import { BereachError } from "./bereach-error.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The server encountered a situation it does not know how to handle.
|
|
12
|
+
*/
|
|
13
|
+
export type InternalServerErrorData = {
|
|
14
|
+
success?: boolean | undefined;
|
|
15
|
+
error: operations.CollectLinkedInLikesInternalServerErrorError;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The server encountered a situation it does not know how to handle.
|
|
20
|
+
*/
|
|
21
|
+
export class InternalServerError extends BereachError {
|
|
22
|
+
success?: boolean | undefined;
|
|
23
|
+
error: operations.CollectLinkedInLikesInternalServerErrorError;
|
|
24
|
+
|
|
25
|
+
/** The original data that was passed to this error instance. */
|
|
26
|
+
data$: InternalServerErrorData;
|
|
27
|
+
|
|
28
|
+
constructor(
|
|
29
|
+
err: InternalServerErrorData,
|
|
30
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
31
|
+
) {
|
|
32
|
+
const message = err.error?.message
|
|
33
|
+
|| `API error occurred: ${JSON.stringify(err)}`;
|
|
34
|
+
super(message, httpMeta);
|
|
35
|
+
this.data$ = err;
|
|
36
|
+
if (err.success != null) this.success = err.success;
|
|
37
|
+
this.error = err.error;
|
|
38
|
+
|
|
39
|
+
this.name = "InternalServerError";
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Rate limit exceeded. Read error.retryAfter for the wait time in seconds.
|
|
45
|
+
*/
|
|
46
|
+
export type TooManyRequestsErrorData = {
|
|
47
|
+
success?: boolean | undefined;
|
|
48
|
+
error: operations.CollectLinkedInLikesTooManyRequestsError;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Rate limit exceeded. Read error.retryAfter for the wait time in seconds.
|
|
53
|
+
*/
|
|
54
|
+
export class TooManyRequestsError extends BereachError {
|
|
55
|
+
success?: boolean | undefined;
|
|
56
|
+
error: operations.CollectLinkedInLikesTooManyRequestsError;
|
|
57
|
+
|
|
58
|
+
/** The original data that was passed to this error instance. */
|
|
59
|
+
data$: TooManyRequestsErrorData;
|
|
60
|
+
|
|
61
|
+
constructor(
|
|
62
|
+
err: TooManyRequestsErrorData,
|
|
63
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
64
|
+
) {
|
|
65
|
+
const message = err.error?.message
|
|
66
|
+
|| `API error occurred: ${JSON.stringify(err)}`;
|
|
67
|
+
super(message, httpMeta);
|
|
68
|
+
this.data$ = err;
|
|
69
|
+
if (err.success != null) this.success = err.success;
|
|
70
|
+
this.error = err.error;
|
|
71
|
+
|
|
72
|
+
this.name = "TooManyRequestsError";
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The request was well-formed but was unable to be followed due to semantic errors.
|
|
78
|
+
*/
|
|
79
|
+
export type UnprocessableEntityErrorData = {
|
|
80
|
+
success?: boolean | undefined;
|
|
81
|
+
error: operations.CollectLinkedInLikesUnprocessableEntityError;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* The request was well-formed but was unable to be followed due to semantic errors.
|
|
86
|
+
*/
|
|
87
|
+
export class UnprocessableEntityError extends BereachError {
|
|
88
|
+
success?: boolean | undefined;
|
|
89
|
+
error: operations.CollectLinkedInLikesUnprocessableEntityError;
|
|
90
|
+
|
|
91
|
+
/** The original data that was passed to this error instance. */
|
|
92
|
+
data$: UnprocessableEntityErrorData;
|
|
93
|
+
|
|
94
|
+
constructor(
|
|
95
|
+
err: UnprocessableEntityErrorData,
|
|
96
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
97
|
+
) {
|
|
98
|
+
const message = err.error?.message
|
|
99
|
+
|| `API error occurred: ${JSON.stringify(err)}`;
|
|
100
|
+
super(message, httpMeta);
|
|
101
|
+
this.data$ = err;
|
|
102
|
+
if (err.success != null) this.success = err.success;
|
|
103
|
+
this.error = err.error;
|
|
104
|
+
|
|
105
|
+
this.name = "UnprocessableEntityError";
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* The requested content has been permanently deleted from the server.
|
|
111
|
+
*/
|
|
112
|
+
export type GoneErrorData = {
|
|
113
|
+
success?: boolean | undefined;
|
|
114
|
+
error: operations.CollectLinkedInLikesGoneError;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* The requested content has been permanently deleted from the server.
|
|
119
|
+
*/
|
|
120
|
+
export class GoneError extends BereachError {
|
|
121
|
+
success?: boolean | undefined;
|
|
122
|
+
error: operations.CollectLinkedInLikesGoneError;
|
|
123
|
+
|
|
124
|
+
/** The original data that was passed to this error instance. */
|
|
125
|
+
data$: GoneErrorData;
|
|
126
|
+
|
|
127
|
+
constructor(
|
|
128
|
+
err: GoneErrorData,
|
|
129
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
130
|
+
) {
|
|
131
|
+
const message = err.error?.message
|
|
132
|
+
|| `API error occurred: ${JSON.stringify(err)}`;
|
|
133
|
+
super(message, httpMeta);
|
|
134
|
+
this.data$ = err;
|
|
135
|
+
if (err.success != null) this.success = err.success;
|
|
136
|
+
this.error = err.error;
|
|
137
|
+
|
|
138
|
+
this.name = "GoneError";
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* The request conflicts with the current state of the server.
|
|
144
|
+
*/
|
|
145
|
+
export type ConflictErrorData = {
|
|
146
|
+
success?: boolean | undefined;
|
|
147
|
+
error: operations.CollectLinkedInLikesConflictError;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* The request conflicts with the current state of the server.
|
|
152
|
+
*/
|
|
153
|
+
export class ConflictError extends BereachError {
|
|
154
|
+
success?: boolean | undefined;
|
|
155
|
+
error: operations.CollectLinkedInLikesConflictError;
|
|
156
|
+
|
|
157
|
+
/** The original data that was passed to this error instance. */
|
|
158
|
+
data$: ConflictErrorData;
|
|
159
|
+
|
|
160
|
+
constructor(
|
|
161
|
+
err: ConflictErrorData,
|
|
162
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
163
|
+
) {
|
|
164
|
+
const message = err.error?.message
|
|
165
|
+
|| `API error occurred: ${JSON.stringify(err)}`;
|
|
166
|
+
super(message, httpMeta);
|
|
167
|
+
this.data$ = err;
|
|
168
|
+
if (err.success != null) this.success = err.success;
|
|
169
|
+
this.error = err.error;
|
|
170
|
+
|
|
171
|
+
this.name = "ConflictError";
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* The server cannot find the requested resource.
|
|
177
|
+
*/
|
|
178
|
+
export type NotFoundErrorData = {
|
|
179
|
+
success?: boolean | undefined;
|
|
180
|
+
error: operations.CollectLinkedInLikesNotFoundError;
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* The server cannot find the requested resource.
|
|
185
|
+
*/
|
|
186
|
+
export class NotFoundError extends BereachError {
|
|
187
|
+
success?: boolean | undefined;
|
|
188
|
+
error: operations.CollectLinkedInLikesNotFoundError;
|
|
189
|
+
|
|
190
|
+
/** The original data that was passed to this error instance. */
|
|
191
|
+
data$: NotFoundErrorData;
|
|
192
|
+
|
|
193
|
+
constructor(
|
|
194
|
+
err: NotFoundErrorData,
|
|
195
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
196
|
+
) {
|
|
197
|
+
const message = err.error?.message
|
|
198
|
+
|| `API error occurred: ${JSON.stringify(err)}`;
|
|
199
|
+
super(message, httpMeta);
|
|
200
|
+
this.data$ = err;
|
|
201
|
+
if (err.success != null) this.success = err.success;
|
|
202
|
+
this.error = err.error;
|
|
203
|
+
|
|
204
|
+
this.name = "NotFoundError";
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* The client does not have access rights to the content.
|
|
210
|
+
*/
|
|
211
|
+
export type ForbiddenErrorData = {
|
|
212
|
+
success?: boolean | undefined;
|
|
213
|
+
error: operations.CollectLinkedInLikesForbiddenError;
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* The client does not have access rights to the content.
|
|
218
|
+
*/
|
|
219
|
+
export class ForbiddenError extends BereachError {
|
|
220
|
+
success?: boolean | undefined;
|
|
221
|
+
error: operations.CollectLinkedInLikesForbiddenError;
|
|
222
|
+
|
|
223
|
+
/** The original data that was passed to this error instance. */
|
|
224
|
+
data$: ForbiddenErrorData;
|
|
225
|
+
|
|
226
|
+
constructor(
|
|
227
|
+
err: ForbiddenErrorData,
|
|
228
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
229
|
+
) {
|
|
230
|
+
const message = err.error?.message
|
|
231
|
+
|| `API error occurred: ${JSON.stringify(err)}`;
|
|
232
|
+
super(message, httpMeta);
|
|
233
|
+
this.data$ = err;
|
|
234
|
+
if (err.success != null) this.success = err.success;
|
|
235
|
+
this.error = err.error;
|
|
236
|
+
|
|
237
|
+
this.name = "ForbiddenError";
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Although HTTP specifies "unauthorized", this response means "unauthenticated". Authenticate to continue.
|
|
243
|
+
*/
|
|
244
|
+
export type UnauthorizedErrorData = {
|
|
245
|
+
success?: boolean | undefined;
|
|
246
|
+
error: operations.CollectLinkedInLikesUnauthorizedError;
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Although HTTP specifies "unauthorized", this response means "unauthenticated". Authenticate to continue.
|
|
251
|
+
*/
|
|
252
|
+
export class UnauthorizedError extends BereachError {
|
|
253
|
+
success?: boolean | undefined;
|
|
254
|
+
error: operations.CollectLinkedInLikesUnauthorizedError;
|
|
255
|
+
|
|
256
|
+
/** The original data that was passed to this error instance. */
|
|
257
|
+
data$: UnauthorizedErrorData;
|
|
258
|
+
|
|
259
|
+
constructor(
|
|
260
|
+
err: UnauthorizedErrorData,
|
|
261
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
262
|
+
) {
|
|
263
|
+
const message = err.error?.message
|
|
264
|
+
|| `API error occurred: ${JSON.stringify(err)}`;
|
|
265
|
+
super(message, httpMeta);
|
|
266
|
+
this.data$ = err;
|
|
267
|
+
if (err.success != null) this.success = err.success;
|
|
268
|
+
this.error = err.error;
|
|
269
|
+
|
|
270
|
+
this.name = "UnauthorizedError";
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* The server cannot or will not process the request due to something that is perceived to be a client error.
|
|
276
|
+
*/
|
|
277
|
+
export type BadRequestErrorData = {
|
|
278
|
+
success?: boolean | undefined;
|
|
279
|
+
error: operations.CollectLinkedInLikesBadRequestError;
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* The server cannot or will not process the request due to something that is perceived to be a client error.
|
|
284
|
+
*/
|
|
285
|
+
export class BadRequestError extends BereachError {
|
|
286
|
+
success?: boolean | undefined;
|
|
287
|
+
error: operations.CollectLinkedInLikesBadRequestError;
|
|
288
|
+
|
|
289
|
+
/** The original data that was passed to this error instance. */
|
|
290
|
+
data$: BadRequestErrorData;
|
|
291
|
+
|
|
292
|
+
constructor(
|
|
293
|
+
err: BadRequestErrorData,
|
|
294
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
295
|
+
) {
|
|
296
|
+
const message = err.error?.message
|
|
297
|
+
|| `API error occurred: ${JSON.stringify(err)}`;
|
|
298
|
+
super(message, httpMeta);
|
|
299
|
+
this.data$ = err;
|
|
300
|
+
if (err.success != null) this.success = err.success;
|
|
301
|
+
this.error = err.error;
|
|
302
|
+
|
|
303
|
+
this.name = "BadRequestError";
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/** @internal */
|
|
308
|
+
export const InternalServerError$inboundSchema: z.ZodMiniType<
|
|
309
|
+
InternalServerError,
|
|
310
|
+
unknown
|
|
311
|
+
> = z.pipe(
|
|
312
|
+
z.object({
|
|
313
|
+
success: z._default(types.boolean(), false),
|
|
314
|
+
error:
|
|
315
|
+
operations.CollectLinkedInLikesInternalServerErrorError$inboundSchema,
|
|
316
|
+
request$: z.custom<Request>(x => x instanceof Request),
|
|
317
|
+
response$: z.custom<Response>(x => x instanceof Response),
|
|
318
|
+
body$: z.string(),
|
|
319
|
+
}),
|
|
320
|
+
z.transform((v) => {
|
|
321
|
+
return new InternalServerError(v, {
|
|
322
|
+
request: v.request$,
|
|
323
|
+
response: v.response$,
|
|
324
|
+
body: v.body$,
|
|
325
|
+
});
|
|
326
|
+
}),
|
|
327
|
+
);
|
|
328
|
+
|
|
329
|
+
/** @internal */
|
|
330
|
+
export const TooManyRequestsError$inboundSchema: z.ZodMiniType<
|
|
331
|
+
TooManyRequestsError,
|
|
332
|
+
unknown
|
|
333
|
+
> = z.pipe(
|
|
334
|
+
z.object({
|
|
335
|
+
success: z._default(types.boolean(), false),
|
|
336
|
+
error: operations.CollectLinkedInLikesTooManyRequestsError$inboundSchema,
|
|
337
|
+
request$: z.custom<Request>(x => x instanceof Request),
|
|
338
|
+
response$: z.custom<Response>(x => x instanceof Response),
|
|
339
|
+
body$: z.string(),
|
|
340
|
+
}),
|
|
341
|
+
z.transform((v) => {
|
|
342
|
+
return new TooManyRequestsError(v, {
|
|
343
|
+
request: v.request$,
|
|
344
|
+
response: v.response$,
|
|
345
|
+
body: v.body$,
|
|
346
|
+
});
|
|
347
|
+
}),
|
|
348
|
+
);
|
|
349
|
+
|
|
350
|
+
/** @internal */
|
|
351
|
+
export const UnprocessableEntityError$inboundSchema: z.ZodMiniType<
|
|
352
|
+
UnprocessableEntityError,
|
|
353
|
+
unknown
|
|
354
|
+
> = z.pipe(
|
|
355
|
+
z.object({
|
|
356
|
+
success: z._default(types.boolean(), false),
|
|
357
|
+
error:
|
|
358
|
+
operations.CollectLinkedInLikesUnprocessableEntityError$inboundSchema,
|
|
359
|
+
request$: z.custom<Request>(x => x instanceof Request),
|
|
360
|
+
response$: z.custom<Response>(x => x instanceof Response),
|
|
361
|
+
body$: z.string(),
|
|
362
|
+
}),
|
|
363
|
+
z.transform((v) => {
|
|
364
|
+
return new UnprocessableEntityError(v, {
|
|
365
|
+
request: v.request$,
|
|
366
|
+
response: v.response$,
|
|
367
|
+
body: v.body$,
|
|
368
|
+
});
|
|
369
|
+
}),
|
|
370
|
+
);
|
|
371
|
+
|
|
372
|
+
/** @internal */
|
|
373
|
+
export const GoneError$inboundSchema: z.ZodMiniType<GoneError, unknown> = z
|
|
374
|
+
.pipe(
|
|
375
|
+
z.object({
|
|
376
|
+
success: z._default(types.boolean(), false),
|
|
377
|
+
error: operations.CollectLinkedInLikesGoneError$inboundSchema,
|
|
378
|
+
request$: z.custom<Request>(x => x instanceof Request),
|
|
379
|
+
response$: z.custom<Response>(x => x instanceof Response),
|
|
380
|
+
body$: z.string(),
|
|
381
|
+
}),
|
|
382
|
+
z.transform((v) => {
|
|
383
|
+
return new GoneError(v, {
|
|
384
|
+
request: v.request$,
|
|
385
|
+
response: v.response$,
|
|
386
|
+
body: v.body$,
|
|
387
|
+
});
|
|
388
|
+
}),
|
|
389
|
+
);
|
|
390
|
+
|
|
391
|
+
/** @internal */
|
|
392
|
+
export const ConflictError$inboundSchema: z.ZodMiniType<
|
|
393
|
+
ConflictError,
|
|
394
|
+
unknown
|
|
395
|
+
> = z.pipe(
|
|
396
|
+
z.object({
|
|
397
|
+
success: z._default(types.boolean(), false),
|
|
398
|
+
error: operations.CollectLinkedInLikesConflictError$inboundSchema,
|
|
399
|
+
request$: z.custom<Request>(x => x instanceof Request),
|
|
400
|
+
response$: z.custom<Response>(x => x instanceof Response),
|
|
401
|
+
body$: z.string(),
|
|
402
|
+
}),
|
|
403
|
+
z.transform((v) => {
|
|
404
|
+
return new ConflictError(v, {
|
|
405
|
+
request: v.request$,
|
|
406
|
+
response: v.response$,
|
|
407
|
+
body: v.body$,
|
|
408
|
+
});
|
|
409
|
+
}),
|
|
410
|
+
);
|
|
411
|
+
|
|
412
|
+
/** @internal */
|
|
413
|
+
export const NotFoundError$inboundSchema: z.ZodMiniType<
|
|
414
|
+
NotFoundError,
|
|
415
|
+
unknown
|
|
416
|
+
> = z.pipe(
|
|
417
|
+
z.object({
|
|
418
|
+
success: z._default(types.boolean(), false),
|
|
419
|
+
error: operations.CollectLinkedInLikesNotFoundError$inboundSchema,
|
|
420
|
+
request$: z.custom<Request>(x => x instanceof Request),
|
|
421
|
+
response$: z.custom<Response>(x => x instanceof Response),
|
|
422
|
+
body$: z.string(),
|
|
423
|
+
}),
|
|
424
|
+
z.transform((v) => {
|
|
425
|
+
return new NotFoundError(v, {
|
|
426
|
+
request: v.request$,
|
|
427
|
+
response: v.response$,
|
|
428
|
+
body: v.body$,
|
|
429
|
+
});
|
|
430
|
+
}),
|
|
431
|
+
);
|
|
432
|
+
|
|
433
|
+
/** @internal */
|
|
434
|
+
export const ForbiddenError$inboundSchema: z.ZodMiniType<
|
|
435
|
+
ForbiddenError,
|
|
436
|
+
unknown
|
|
437
|
+
> = z.pipe(
|
|
438
|
+
z.object({
|
|
439
|
+
success: z._default(types.boolean(), false),
|
|
440
|
+
error: operations.CollectLinkedInLikesForbiddenError$inboundSchema,
|
|
441
|
+
request$: z.custom<Request>(x => x instanceof Request),
|
|
442
|
+
response$: z.custom<Response>(x => x instanceof Response),
|
|
443
|
+
body$: z.string(),
|
|
444
|
+
}),
|
|
445
|
+
z.transform((v) => {
|
|
446
|
+
return new ForbiddenError(v, {
|
|
447
|
+
request: v.request$,
|
|
448
|
+
response: v.response$,
|
|
449
|
+
body: v.body$,
|
|
450
|
+
});
|
|
451
|
+
}),
|
|
452
|
+
);
|
|
453
|
+
|
|
454
|
+
/** @internal */
|
|
455
|
+
export const UnauthorizedError$inboundSchema: z.ZodMiniType<
|
|
456
|
+
UnauthorizedError,
|
|
457
|
+
unknown
|
|
458
|
+
> = z.pipe(
|
|
459
|
+
z.object({
|
|
460
|
+
success: z._default(types.boolean(), false),
|
|
461
|
+
error: operations.CollectLinkedInLikesUnauthorizedError$inboundSchema,
|
|
462
|
+
request$: z.custom<Request>(x => x instanceof Request),
|
|
463
|
+
response$: z.custom<Response>(x => x instanceof Response),
|
|
464
|
+
body$: z.string(),
|
|
465
|
+
}),
|
|
466
|
+
z.transform((v) => {
|
|
467
|
+
return new UnauthorizedError(v, {
|
|
468
|
+
request: v.request$,
|
|
469
|
+
response: v.response$,
|
|
470
|
+
body: v.body$,
|
|
471
|
+
});
|
|
472
|
+
}),
|
|
473
|
+
);
|
|
474
|
+
|
|
475
|
+
/** @internal */
|
|
476
|
+
export const BadRequestError$inboundSchema: z.ZodMiniType<
|
|
477
|
+
BadRequestError,
|
|
478
|
+
unknown
|
|
479
|
+
> = z.pipe(
|
|
480
|
+
z.object({
|
|
481
|
+
success: z._default(types.boolean(), false),
|
|
482
|
+
error: operations.CollectLinkedInLikesBadRequestError$inboundSchema,
|
|
483
|
+
request$: z.custom<Request>(x => x instanceof Request),
|
|
484
|
+
response$: z.custom<Response>(x => x instanceof Response),
|
|
485
|
+
body$: z.string(),
|
|
486
|
+
}),
|
|
487
|
+
z.transform((v) => {
|
|
488
|
+
return new BadRequestError(v, {
|
|
489
|
+
request: v.request$,
|
|
490
|
+
response: v.response$,
|
|
491
|
+
body: v.body$,
|
|
492
|
+
});
|
|
493
|
+
}),
|
|
494
|
+
);
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Base class for all HTTP errors.
|
|
7
|
+
*/
|
|
8
|
+
export class HTTPClientError extends Error {
|
|
9
|
+
/** The underlying cause of the error. */
|
|
10
|
+
override readonly cause: unknown;
|
|
11
|
+
override name = "HTTPClientError";
|
|
12
|
+
constructor(message: string, opts?: { cause?: unknown }) {
|
|
13
|
+
let msg = message;
|
|
14
|
+
if (opts?.cause) {
|
|
15
|
+
msg += `: ${opts.cause}`;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
super(msg, opts);
|
|
19
|
+
// In older runtimes, the cause field would not have been assigned through
|
|
20
|
+
// the super() call.
|
|
21
|
+
if (typeof this.cause === "undefined") {
|
|
22
|
+
this.cause = opts?.cause;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* An error to capture unrecognised or unexpected errors when making HTTP calls.
|
|
29
|
+
*/
|
|
30
|
+
export class UnexpectedClientError extends HTTPClientError {
|
|
31
|
+
override name = "UnexpectedClientError";
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* An error that is raised when any inputs used to create a request are invalid.
|
|
36
|
+
*/
|
|
37
|
+
export class InvalidRequestError extends HTTPClientError {
|
|
38
|
+
override name = "InvalidRequestError";
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* An error that is raised when a HTTP request was aborted by the client error.
|
|
43
|
+
*/
|
|
44
|
+
export class RequestAbortedError extends HTTPClientError {
|
|
45
|
+
override readonly name = "RequestAbortedError";
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* An error that is raised when a HTTP request timed out due to an AbortSignal
|
|
50
|
+
* signal timeout.
|
|
51
|
+
*/
|
|
52
|
+
export class RequestTimeoutError extends HTTPClientError {
|
|
53
|
+
override readonly name = "RequestTimeoutError";
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* An error that is raised when a HTTP client is unable to make a request to
|
|
58
|
+
* a server.
|
|
59
|
+
*/
|
|
60
|
+
export class ConnectionError extends HTTPClientError {
|
|
61
|
+
override readonly name = "ConnectionError";
|
|
62
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export * from "./bereach-default-error.js";
|
|
6
|
+
export * from "./bereach-error.js";
|
|
7
|
+
export * from "./collect-linked-in-likes.js";
|
|
8
|
+
export * from "./http-client-errors.js";
|
|
9
|
+
export * from "./response-validation-error.js";
|
|
10
|
+
export * from "./sdk-validation-error.js";
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4/core";
|
|
6
|
+
import { BereachError } from "./bereach-error.js";
|
|
7
|
+
import { formatZodError } from "./sdk-validation-error.js";
|
|
8
|
+
|
|
9
|
+
export class ResponseValidationError extends BereachError {
|
|
10
|
+
/**
|
|
11
|
+
* The raw value that failed validation.
|
|
12
|
+
*/
|
|
13
|
+
public readonly rawValue: unknown;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The raw message that failed validation.
|
|
17
|
+
*/
|
|
18
|
+
public readonly rawMessage: unknown;
|
|
19
|
+
|
|
20
|
+
constructor(
|
|
21
|
+
message: string,
|
|
22
|
+
extra: {
|
|
23
|
+
response: Response;
|
|
24
|
+
request: Request;
|
|
25
|
+
body: string;
|
|
26
|
+
cause: unknown;
|
|
27
|
+
rawValue: unknown;
|
|
28
|
+
rawMessage: unknown;
|
|
29
|
+
},
|
|
30
|
+
) {
|
|
31
|
+
super(message, extra);
|
|
32
|
+
this.name = "ResponseValidationError";
|
|
33
|
+
this.cause = extra.cause;
|
|
34
|
+
this.rawValue = extra.rawValue;
|
|
35
|
+
this.rawMessage = extra.rawMessage;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Return a pretty-formatted error message if the underlying validation error
|
|
40
|
+
* is a ZodError or some other recognized error type, otherwise return the
|
|
41
|
+
* default error message.
|
|
42
|
+
*/
|
|
43
|
+
public pretty(): string {
|
|
44
|
+
if (this.cause instanceof z.$ZodError) {
|
|
45
|
+
return `${this.rawMessage}\n${formatZodError(this.cause)}`;
|
|
46
|
+
} else {
|
|
47
|
+
return this.toString();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4/core";
|
|
6
|
+
|
|
7
|
+
export class SDKValidationError extends Error {
|
|
8
|
+
/**
|
|
9
|
+
* The raw value that failed validation.
|
|
10
|
+
*/
|
|
11
|
+
public readonly rawValue: unknown;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The raw message that failed validation.
|
|
15
|
+
*/
|
|
16
|
+
public readonly rawMessage: unknown;
|
|
17
|
+
|
|
18
|
+
// Allows for backwards compatibility for `instanceof` checks of `ResponseValidationError`
|
|
19
|
+
static override [Symbol.hasInstance](
|
|
20
|
+
instance: unknown,
|
|
21
|
+
): instance is SDKValidationError {
|
|
22
|
+
if (!(instance instanceof Error)) return false;
|
|
23
|
+
if (!("rawValue" in instance)) return false;
|
|
24
|
+
if (!("rawMessage" in instance)) return false;
|
|
25
|
+
if (!("pretty" in instance)) return false;
|
|
26
|
+
if (typeof instance.pretty !== "function") return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
constructor(message: string, cause: unknown, rawValue: unknown) {
|
|
31
|
+
super(`${message}: ${cause}`);
|
|
32
|
+
this.name = "SDKValidationError";
|
|
33
|
+
this.cause = cause;
|
|
34
|
+
this.rawValue = rawValue;
|
|
35
|
+
this.rawMessage = message;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Return a pretty-formatted error message if the underlying validation error
|
|
40
|
+
* is a ZodError or some other recognized error type, otherwise return the
|
|
41
|
+
* default error message.
|
|
42
|
+
*/
|
|
43
|
+
public pretty(): string {
|
|
44
|
+
if (this.cause instanceof z.$ZodError) {
|
|
45
|
+
return `${this.rawMessage}\n${formatZodError(this.cause)}`;
|
|
46
|
+
} else {
|
|
47
|
+
return this.toString();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function formatZodError(err: z.$ZodError): string {
|
|
53
|
+
return z.prettifyError(err);
|
|
54
|
+
}
|