@yolk-sdk/connectors 0.0.1-canary.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +195 -0
  3. package/dist/action.d.mts +37 -0
  4. package/dist/action.d.mts.map +1 -0
  5. package/dist/action.mjs +24 -0
  6. package/dist/action.mjs.map +1 -0
  7. package/dist/agent.d.mts +21 -0
  8. package/dist/agent.d.mts.map +1 -0
  9. package/dist/agent.mjs +66 -0
  10. package/dist/agent.mjs.map +1 -0
  11. package/dist/config.d.mts +10 -0
  12. package/dist/config.d.mts.map +1 -0
  13. package/dist/config.mjs +21 -0
  14. package/dist/config.mjs.map +1 -0
  15. package/dist/connector.d.mts +27 -0
  16. package/dist/connector.d.mts.map +1 -0
  17. package/dist/connector.mjs +32 -0
  18. package/dist/connector.mjs.map +1 -0
  19. package/dist/credential.d.mts +62 -0
  20. package/dist/credential.d.mts.map +1 -0
  21. package/dist/credential.mjs +62 -0
  22. package/dist/credential.mjs.map +1 -0
  23. package/dist/error.d.mts +17 -0
  24. package/dist/error.d.mts.map +1 -0
  25. package/dist/error.mjs +22 -0
  26. package/dist/error.mjs.map +1 -0
  27. package/dist/figma/index.d.mts +48 -0
  28. package/dist/figma/index.d.mts.map +1 -0
  29. package/dist/figma/index.mjs +97 -0
  30. package/dist/figma/index.mjs.map +1 -0
  31. package/dist/google/calendar.d.mts +53 -0
  32. package/dist/google/calendar.d.mts.map +1 -0
  33. package/dist/google/calendar.mjs +111 -0
  34. package/dist/google/calendar.mjs.map +1 -0
  35. package/dist/google/gmail.d.mts +53 -0
  36. package/dist/google/gmail.d.mts.map +1 -0
  37. package/dist/google/gmail.mjs +103 -0
  38. package/dist/google/gmail.mjs.map +1 -0
  39. package/dist/google/index.d.mts +14 -0
  40. package/dist/google/index.d.mts.map +1 -0
  41. package/dist/google/index.mjs +15 -0
  42. package/dist/google/index.mjs.map +1 -0
  43. package/dist/google/oauth.d.mts +18 -0
  44. package/dist/google/oauth.d.mts.map +1 -0
  45. package/dist/google/oauth.mjs +25 -0
  46. package/dist/google/oauth.mjs.map +1 -0
  47. package/dist/google/shared.d.mts +20 -0
  48. package/dist/google/shared.d.mts.map +1 -0
  49. package/dist/google/shared.mjs +36 -0
  50. package/dist/google/shared.mjs.map +1 -0
  51. package/dist/http.d.mts +32 -0
  52. package/dist/http.d.mts.map +1 -0
  53. package/dist/http.mjs +36 -0
  54. package/dist/http.mjs.map +1 -0
  55. package/dist/index.d.mts +9 -0
  56. package/dist/index.mjs +9 -0
  57. package/dist/integration.d.mts +24 -0
  58. package/dist/integration.d.mts.map +1 -0
  59. package/dist/integration.mjs +22 -0
  60. package/dist/integration.mjs.map +1 -0
  61. package/dist/linkedin-search/index.d.mts +60 -0
  62. package/dist/linkedin-search/index.d.mts.map +1 -0
  63. package/dist/linkedin-search/index.mjs +162 -0
  64. package/dist/linkedin-search/index.mjs.map +1 -0
  65. package/dist/notion/index.d.mts +69 -0
  66. package/dist/notion/index.d.mts.map +1 -0
  67. package/dist/notion/index.mjs +169 -0
  68. package/dist/notion/index.mjs.map +1 -0
  69. package/dist/r2-storage/index.d.mts +48 -0
  70. package/dist/r2-storage/index.d.mts.map +1 -0
  71. package/dist/r2-storage/index.mjs +91 -0
  72. package/dist/r2-storage/index.mjs.map +1 -0
  73. package/dist/result.d.mts +32 -0
  74. package/dist/result.d.mts.map +1 -0
  75. package/dist/result.mjs +23 -0
  76. package/dist/result.mjs.map +1 -0
  77. package/dist/telegram/index.d.mts +34 -0
  78. package/dist/telegram/index.d.mts.map +1 -0
  79. package/dist/telegram/index.mjs +109 -0
  80. package/dist/telegram/index.mjs.map +1 -0
  81. package/dist/todoist/index.d.mts +70 -0
  82. package/dist/todoist/index.d.mts.map +1 -0
  83. package/dist/todoist/index.mjs +176 -0
  84. package/dist/todoist/index.mjs.map +1 -0
  85. package/package.json +96 -0
  86. package/src/action.ts +75 -0
  87. package/src/agent.ts +120 -0
  88. package/src/config.ts +28 -0
  89. package/src/connector.ts +62 -0
  90. package/src/credential.ts +86 -0
  91. package/src/error.ts +20 -0
  92. package/src/figma/index.ts +121 -0
  93. package/src/google/calendar.ts +145 -0
  94. package/src/google/gmail.ts +127 -0
  95. package/src/google/index.ts +46 -0
  96. package/src/google/oauth.ts +26 -0
  97. package/src/google/shared.ts +56 -0
  98. package/src/http.ts +51 -0
  99. package/src/index.ts +36 -0
  100. package/src/integration.ts +28 -0
  101. package/src/linkedin-search/index.ts +217 -0
  102. package/src/notion/index.ts +234 -0
  103. package/src/r2-storage/index.ts +118 -0
  104. package/src/result.ts +35 -0
  105. package/src/telegram/index.ts +144 -0
  106. package/src/todoist/index.ts +227 -0
@@ -0,0 +1,15 @@
1
+ import { defineConnector } from "../connector.mjs";
2
+ import { GoogleOAuthCredentialSlot, googleAuthorizationHeaders, googleCalendarEventsScope, googleCalendarReadonlyScope, googleConnectorId, googleGmailReadonlyScope, googleGmailSendScope, googleOAuthAuthorizeUrl, googleOAuthSlotId, googleOAuthTokenUrl } from "./oauth.mjs";
3
+ import { resolveGoogleAccessToken } from "./shared.mjs";
4
+ import { GoogleCalendarCreateEventInput, GoogleCalendarEvent, GoogleCalendarEventDateTime, GoogleCalendarListEventsInput, GoogleCalendarListEventsOutput, googleCalendarActions, googleCalendarApiBaseUrl, googleCalendarCreateEventAction, googleCalendarListEventsAction } from "./calendar.mjs";
5
+ import { GmailGetMessageInput, GmailMessageOutput, GmailMessageRef, GmailSearchInput, GmailSearchOutput, gmailActions, gmailGetMessageAction, gmailSearchAction, googleGmailApiBaseUrl } from "./gmail.mjs";
6
+ //#region src/google/index.ts
7
+ const GoogleConnector = defineConnector({
8
+ id: googleConnectorId,
9
+ description: "Google Gmail and Calendar connector actions.",
10
+ actions: [...gmailActions, ...googleCalendarActions]
11
+ });
12
+ //#endregion
13
+ export { GmailGetMessageInput, GmailMessageOutput, GmailMessageRef, GmailSearchInput, GmailSearchOutput, GoogleCalendarCreateEventInput, GoogleCalendarEvent, GoogleCalendarEventDateTime, GoogleCalendarListEventsInput, GoogleCalendarListEventsOutput, GoogleConnector, GoogleOAuthCredentialSlot, gmailActions, gmailGetMessageAction, gmailSearchAction, googleAuthorizationHeaders, googleCalendarActions, googleCalendarApiBaseUrl, googleCalendarCreateEventAction, googleCalendarEventsScope, googleCalendarListEventsAction, googleCalendarReadonlyScope, googleConnectorId, googleGmailApiBaseUrl, googleGmailReadonlyScope, googleGmailSendScope, googleOAuthAuthorizeUrl, googleOAuthSlotId, googleOAuthTokenUrl, resolveGoogleAccessToken };
14
+
15
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../src/google/index.ts"],"sourcesContent":["export {\n googleCalendarActions,\n googleCalendarApiBaseUrl,\n googleCalendarCreateEventAction,\n googleCalendarListEventsAction,\n GoogleCalendarCreateEventInput,\n GoogleCalendarEvent,\n GoogleCalendarEventDateTime,\n GoogleCalendarListEventsInput,\n GoogleCalendarListEventsOutput\n} from './calendar.ts'\nexport {\n gmailActions,\n gmailGetMessageAction,\n GmailGetMessageInput,\n gmailSearchAction,\n GmailMessageOutput,\n GmailMessageRef,\n GmailSearchInput,\n GmailSearchOutput,\n googleGmailApiBaseUrl\n} from './gmail.ts'\nexport {\n GoogleOAuthCredentialSlot,\n googleAuthorizationHeaders,\n googleCalendarEventsScope,\n googleCalendarReadonlyScope,\n googleConnectorId,\n googleGmailReadonlyScope,\n googleGmailSendScope,\n googleOAuthAuthorizeUrl,\n googleOAuthSlotId,\n googleOAuthTokenUrl\n} from './oauth.ts'\nexport { resolveGoogleAccessToken } from './shared.ts'\n\nimport { defineConnector } from '../connector.ts'\nimport { googleCalendarActions } from './calendar.ts'\nimport { gmailActions } from './gmail.ts'\nimport { googleConnectorId } from './oauth.ts'\n\nexport const GoogleConnector = defineConnector({\n id: googleConnectorId,\n description: 'Google Gmail and Calendar connector actions.',\n actions: [...gmailActions, ...googleCalendarActions]\n})\n"],"mappings":";;;;;;AAyCA,MAAa,kBAAkB,gBAAgB;CAC7C,IAAI;CACJ,aAAa;CACb,SAAS,CAAC,GAAG,cAAc,GAAG,qBAAqB;AACrD,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { CredentialSlot } from "../credential.mjs";
2
+
3
+ //#region src/google/oauth.d.ts
4
+ declare const googleConnectorId = "google";
5
+ declare const googleOAuthSlotId = "google.oauth";
6
+ declare const googleOAuthAuthorizeUrl = "https://accounts.google.com/o/oauth2/v2/auth";
7
+ declare const googleOAuthTokenUrl = "https://oauth2.googleapis.com/token";
8
+ declare const googleGmailReadonlyScope = "https://www.googleapis.com/auth/gmail.readonly";
9
+ declare const googleGmailSendScope = "https://www.googleapis.com/auth/gmail.send";
10
+ declare const googleCalendarReadonlyScope = "https://www.googleapis.com/auth/calendar.readonly";
11
+ declare const googleCalendarEventsScope = "https://www.googleapis.com/auth/calendar.events";
12
+ declare const GoogleOAuthCredentialSlot: CredentialSlot;
13
+ declare const googleAuthorizationHeaders: (accessToken: string) => {
14
+ authorization: string;
15
+ };
16
+ //#endregion
17
+ export { GoogleOAuthCredentialSlot, googleAuthorizationHeaders, googleCalendarEventsScope, googleCalendarReadonlyScope, googleConnectorId, googleGmailReadonlyScope, googleGmailSendScope, googleOAuthAuthorizeUrl, googleOAuthSlotId, googleOAuthTokenUrl };
18
+ //# sourceMappingURL=oauth.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oauth.d.mts","names":[],"sources":["../../src/google/oauth.ts"],"mappings":";;;cAEa,iBAAA;AAAA,cACA,iBAAA;AAAA,cACA,uBAAA;AAAA,cACA,mBAAA;AAAA,cAEA,wBAAA;AAAA,cACA,oBAAA;AAAA,cACA,2BAAA;AAAA,cACA,yBAAA;AAAA,cAEA,yBAAA,EAAyB,cASpC;AAAA,cAEW,0BAAA,GAA8B,WAAA;EAAA,aAAA;AAAA"}
@@ -0,0 +1,25 @@
1
+ import { CredentialSlot } from "../credential.mjs";
2
+ //#region src/google/oauth.ts
3
+ const googleConnectorId = "google";
4
+ const googleOAuthSlotId = "google.oauth";
5
+ const googleOAuthAuthorizeUrl = "https://accounts.google.com/o/oauth2/v2/auth";
6
+ const googleOAuthTokenUrl = "https://oauth2.googleapis.com/token";
7
+ const googleGmailReadonlyScope = "https://www.googleapis.com/auth/gmail.readonly";
8
+ const googleGmailSendScope = "https://www.googleapis.com/auth/gmail.send";
9
+ const googleCalendarReadonlyScope = "https://www.googleapis.com/auth/calendar.readonly";
10
+ const googleCalendarEventsScope = "https://www.googleapis.com/auth/calendar.events";
11
+ const GoogleOAuthCredentialSlot = CredentialSlot.make({
12
+ id: googleOAuthSlotId,
13
+ kind: "oauth",
14
+ requiredScopes: [
15
+ googleGmailReadonlyScope,
16
+ googleGmailSendScope,
17
+ googleCalendarReadonlyScope,
18
+ googleCalendarEventsScope
19
+ ]
20
+ });
21
+ const googleAuthorizationHeaders = (accessToken) => ({ authorization: `Bearer ${accessToken}` });
22
+ //#endregion
23
+ export { GoogleOAuthCredentialSlot, googleAuthorizationHeaders, googleCalendarEventsScope, googleCalendarReadonlyScope, googleConnectorId, googleGmailReadonlyScope, googleGmailSendScope, googleOAuthAuthorizeUrl, googleOAuthSlotId, googleOAuthTokenUrl };
24
+
25
+ //# sourceMappingURL=oauth.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oauth.mjs","names":[],"sources":["../../src/google/oauth.ts"],"sourcesContent":["import { CredentialSlot } from '../credential.ts'\n\nexport const googleConnectorId = 'google'\nexport const googleOAuthSlotId = 'google.oauth'\nexport const googleOAuthAuthorizeUrl = 'https://accounts.google.com/o/oauth2/v2/auth'\nexport const googleOAuthTokenUrl = 'https://oauth2.googleapis.com/token'\n\nexport const googleGmailReadonlyScope = 'https://www.googleapis.com/auth/gmail.readonly'\nexport const googleGmailSendScope = 'https://www.googleapis.com/auth/gmail.send'\nexport const googleCalendarReadonlyScope = 'https://www.googleapis.com/auth/calendar.readonly'\nexport const googleCalendarEventsScope = 'https://www.googleapis.com/auth/calendar.events'\n\nexport const GoogleOAuthCredentialSlot = CredentialSlot.make({\n id: googleOAuthSlotId,\n kind: 'oauth',\n requiredScopes: [\n googleGmailReadonlyScope,\n googleGmailSendScope,\n googleCalendarReadonlyScope,\n googleCalendarEventsScope\n ]\n})\n\nexport const googleAuthorizationHeaders = (accessToken: string) => ({\n authorization: `Bearer ${accessToken}`\n})\n"],"mappings":";;AAEA,MAAa,oBAAoB;AACjC,MAAa,oBAAoB;AACjC,MAAa,0BAA0B;AACvC,MAAa,sBAAsB;AAEnC,MAAa,2BAA2B;AACxC,MAAa,uBAAuB;AACpC,MAAa,8BAA8B;AAC3C,MAAa,4BAA4B;AAEzC,MAAa,4BAA4B,eAAe,KAAK;CAC3D,IAAI;CACJ,MAAM;CACN,gBAAgB;EACd;EACA;EACA;EACA;CACF;AACF,CAAC;AAED,MAAa,8BAA8B,iBAAyB,EAClE,eAAe,UAAU,cAC3B"}
@@ -0,0 +1,20 @@
1
+ import { ConnectorError } from "../error.mjs";
2
+ import { ActionResult } from "../result.mjs";
3
+ import { CredentialResolver } from "../credential.mjs";
4
+ import { ConnectorIntegration } from "../integration.mjs";
5
+ import { Effect } from "effect";
6
+
7
+ //#region src/google/shared.d.ts
8
+ declare const resolveGoogleAccessToken: (integration: ConnectorIntegration) => Effect.Effect<string, ConnectorError, CredentialResolver>;
9
+ declare const providerFailureFromResponse: (input: {
10
+ readonly code: string;
11
+ readonly message: string;
12
+ readonly status: number;
13
+ readonly body: string;
14
+ }) => ActionResult<never>;
15
+ declare const isSuccessStatus: (status: number) => boolean;
16
+ declare const appendSearchParam: (params: URLSearchParams, key: string, value: string | undefined) => void;
17
+ declare const appendNumberSearchParam: (params: URLSearchParams, key: string, value: number | undefined) => void;
18
+ //#endregion
19
+ export { appendNumberSearchParam, appendSearchParam, isSuccessStatus, providerFailureFromResponse, resolveGoogleAccessToken };
20
+ //# sourceMappingURL=shared.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.d.mts","names":[],"sources":["../../src/google/shared.ts"],"mappings":";;;;;;;cAOa,wBAAA,GAA4B,WAAA,EAAa,oBAAA,KAAoB,MAAA,CAAA,MAAA,SAAA,cAAA,EAAA,kBAAA;AAAA,cAqB7D,2BAAA,GAA+B,KAAA;EAAA,SACjC,IAAA;EAAA,SACA,OAAA;EAAA,SACA,MAAA;EAAA,SACA,IAAA;AAAA,MACV,YAAA;AAAA,cAUY,eAAA,GAAmB,MAAc;AAAA,cAEjC,iBAAA,GAAqB,MAAA,EAAQ,eAAe,EAAE,GAAA,UAAa,KAAA;AAAA,cAM3D,uBAAA,GAA2B,MAAA,EAAQ,eAAe,EAAE,GAAA,UAAa,KAAA"}
@@ -0,0 +1,36 @@
1
+ import { ConnectorError } from "../error.mjs";
2
+ import { resolveCredential } from "../credential.mjs";
3
+ import { ActionResult, ProviderFailure } from "../result.mjs";
4
+ import { GoogleOAuthCredentialSlot } from "./oauth.mjs";
5
+ import { Effect } from "effect";
6
+ //#region src/google/shared.ts
7
+ const resolveGoogleAccessToken = (integration) => Effect.gen(function* () {
8
+ const credential = yield* resolveCredential(integration, GoogleOAuthCredentialSlot);
9
+ switch (credential._tag) {
10
+ case "OAuthCredential": return credential.accessToken;
11
+ case "BearerTokenCredential": return credential.token;
12
+ case "ApiKeyCredential": return yield* Effect.fail(new ConnectorError({
13
+ cause: "credential_invalid",
14
+ message: "Google connector requires an OAuth or bearer token credential",
15
+ connectorId: integration.connectorId,
16
+ slotId: GoogleOAuthCredentialSlot.id
17
+ }));
18
+ }
19
+ });
20
+ const providerFailureFromResponse = (input) => ActionResult.failure(new ProviderFailure({
21
+ code: input.code,
22
+ message: input.message,
23
+ status: input.status,
24
+ underlying: input.body
25
+ }));
26
+ const isSuccessStatus = (status) => status >= 200 && status < 300;
27
+ const appendSearchParam = (params, key, value) => {
28
+ if (value !== void 0 && value.trim() !== "") params.set(key, value);
29
+ };
30
+ const appendNumberSearchParam = (params, key, value) => {
31
+ if (value !== void 0) params.set(key, String(value));
32
+ };
33
+ //#endregion
34
+ export { appendNumberSearchParam, appendSearchParam, isSuccessStatus, providerFailureFromResponse, resolveGoogleAccessToken };
35
+
36
+ //# sourceMappingURL=shared.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.mjs","names":[],"sources":["../../src/google/shared.ts"],"sourcesContent":["import { Effect } from 'effect'\nimport { resolveCredential } from '../credential.ts'\nimport { ConnectorError } from '../error.ts'\nimport { ActionResult, ProviderFailure } from '../result.ts'\nimport type { ConnectorIntegration } from '../integration.ts'\nimport { GoogleOAuthCredentialSlot } from './oauth.ts'\n\nexport const resolveGoogleAccessToken = (integration: ConnectorIntegration) =>\n Effect.gen(function* () {\n const credential = yield* resolveCredential(integration, GoogleOAuthCredentialSlot)\n\n switch (credential._tag) {\n case 'OAuthCredential':\n return credential.accessToken\n case 'BearerTokenCredential':\n return credential.token\n case 'ApiKeyCredential':\n return yield* Effect.fail(\n new ConnectorError({\n cause: 'credential_invalid',\n message: 'Google connector requires an OAuth or bearer token credential',\n connectorId: integration.connectorId,\n slotId: GoogleOAuthCredentialSlot.id\n })\n )\n }\n })\n\nexport const providerFailureFromResponse = (input: {\n readonly code: string\n readonly message: string\n readonly status: number\n readonly body: string\n}) =>\n ActionResult.failure(\n new ProviderFailure({\n code: input.code,\n message: input.message,\n status: input.status,\n underlying: input.body\n })\n )\n\nexport const isSuccessStatus = (status: number) => status >= 200 && status < 300\n\nexport const appendSearchParam = (params: URLSearchParams, key: string, value: string | undefined) => {\n if (value !== undefined && value.trim() !== '') {\n params.set(key, value)\n }\n}\n\nexport const appendNumberSearchParam = (params: URLSearchParams, key: string, value: number | undefined) => {\n if (value !== undefined) {\n params.set(key, String(value))\n }\n}\n"],"mappings":";;;;;;AAOA,MAAa,4BAA4B,gBACvC,OAAO,IAAI,aAAa;CACtB,MAAM,aAAa,OAAO,kBAAkB,aAAa,yBAAyB;CAElF,QAAQ,WAAW,MAAnB;EACE,KAAK,mBACH,OAAO,WAAW;EACpB,KAAK,yBACH,OAAO,WAAW;EACpB,KAAK,oBACH,OAAO,OAAO,OAAO,KACnB,IAAI,eAAe;GACjB,OAAO;GACP,SAAS;GACT,aAAa,YAAY;GACzB,QAAQ,0BAA0B;EACpC,CAAC,CACH;CACJ;AACF,CAAC;AAEH,MAAa,+BAA+B,UAM1C,aAAa,QACX,IAAI,gBAAgB;CAClB,MAAM,MAAM;CACZ,SAAS,MAAM;CACf,QAAQ,MAAM;CACd,YAAY,MAAM;AACpB,CAAC,CACH;AAEF,MAAa,mBAAmB,WAAmB,UAAU,OAAO,SAAS;AAE7E,MAAa,qBAAqB,QAAyB,KAAa,UAA8B;CACpG,IAAI,UAAU,KAAA,KAAa,MAAM,KAAK,MAAM,IAC1C,OAAO,IAAI,KAAK,KAAK;AAEzB;AAEA,MAAa,2BAA2B,QAAyB,KAAa,UAA8B;CAC1G,IAAI,UAAU,KAAA,GACZ,OAAO,IAAI,KAAK,OAAO,KAAK,CAAC;AAEjC"}
@@ -0,0 +1,32 @@
1
+ import { ConnectorError } from "./error.mjs";
2
+ import { Context, Effect } from "effect";
3
+ import * as Schema from "effect/Schema";
4
+
5
+ //#region src/http.d.ts
6
+ declare const HttpMethod: Schema.Literals<readonly ["GET", "POST", "PATCH", "PUT", "DELETE"]>;
7
+ type HttpMethod = typeof HttpMethod.Type;
8
+ declare const ConnectorHttpRequest_base: Schema.Class<ConnectorHttpRequest, Schema.Struct<{
9
+ readonly method: Schema.Literals<readonly ["GET", "POST", "PATCH", "PUT", "DELETE"]>;
10
+ readonly url: Schema.String;
11
+ readonly headers: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
12
+ readonly body: Schema.optional<Schema.String>;
13
+ }>, {}>;
14
+ declare class ConnectorHttpRequest extends ConnectorHttpRequest_base {}
15
+ declare const ConnectorHttpResponse_base: Schema.Class<ConnectorHttpResponse, Schema.Struct<{
16
+ readonly status: Schema.Number;
17
+ readonly headers: Schema.$Record<Schema.String, Schema.String>;
18
+ readonly body: Schema.String;
19
+ }>, {}>;
20
+ declare class ConnectorHttpResponse extends ConnectorHttpResponse_base {}
21
+ type ConnectorHttpClientApi = {
22
+ readonly request: (request: ConnectorHttpRequest) => Effect.Effect<ConnectorHttpResponse, ConnectorError>;
23
+ };
24
+ declare const ConnectorHttpClient_base: Context.ServiceClass<ConnectorHttpClient, "@yolk-sdk/connectors/ConnectorHttpClient", ConnectorHttpClientApi>;
25
+ declare class ConnectorHttpClient extends ConnectorHttpClient_base {}
26
+ type JsonResponseSchema<A> = Schema.Schema<A> & {
27
+ readonly DecodingServices: never;
28
+ };
29
+ declare const decodeJsonResponse: <A>(schema: JsonResponseSchema<A>, response: ConnectorHttpResponse) => Effect.Effect<A, ConnectorError, never>;
30
+ //#endregion
31
+ export { ConnectorHttpClient, ConnectorHttpClientApi, ConnectorHttpRequest, ConnectorHttpResponse, HttpMethod, decodeJsonResponse };
32
+ //# sourceMappingURL=http.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http.d.mts","names":[],"sources":["../src/http.ts"],"mappings":";;;;;cAIa,UAAA,EAAU,MAAA,CAAA,QAAA;AAAA,KACX,UAAA,UAAoB,UAAA,CAAW,IAAI;AAAA,cAAA,yBAAA;;;;;;cAElC,oBAAA,SAA6B,yBAKxC;AAAA,cAAG,0BAAA;;;;;cAEQ,qBAAA,SAA8B,0BAIzC;AAAA,KAEU,sBAAA;EAAA,SACD,OAAA,GAAU,OAAA,EAAS,oBAAA,KAAyB,MAAA,CAAO,MAAA,CAAO,qBAAA,EAAuB,cAAA;AAAA;AAAA,cAC3F,wBAAA;cAEY,mBAAA,SAA4B,wBAExC;AAAA,KAEI,kBAAA,MAAwB,MAAA,CAAO,MAAM,CAAC,CAAA;EAAA,SAAgB,gBAAA;AAAA;AAAA,cAE9C,kBAAA,MAAyB,MAAA,EAAQ,kBAAA,CAAmB,CAAA,GAAI,QAAA,EAAU,qBAAA,KAAqB,MAAA,CAAA,MAAA,CAAA,CAAA,EAAA,cAAA"}
package/dist/http.mjs ADDED
@@ -0,0 +1,36 @@
1
+ import { ConnectorError } from "./error.mjs";
2
+ import { Context, Effect } from "effect";
3
+ import * as Schema from "effect/Schema";
4
+ //#region src/http.ts
5
+ const HttpMethod = Schema.Literals([
6
+ "GET",
7
+ "POST",
8
+ "PATCH",
9
+ "PUT",
10
+ "DELETE"
11
+ ]);
12
+ var ConnectorHttpRequest = class extends Schema.Class("ConnectorHttpRequest")({
13
+ method: HttpMethod,
14
+ url: Schema.String,
15
+ headers: Schema.optional(Schema.Record(Schema.String, Schema.String)),
16
+ body: Schema.optional(Schema.String)
17
+ }) {};
18
+ var ConnectorHttpResponse = class extends Schema.Class("ConnectorHttpResponse")({
19
+ status: Schema.Number,
20
+ headers: Schema.Record(Schema.String, Schema.String),
21
+ body: Schema.String
22
+ }) {};
23
+ var ConnectorHttpClient = class extends Context.Service()("@yolk-sdk/connectors/ConnectorHttpClient") {};
24
+ const decodeJsonResponse = (schema, response) => Schema.decodeUnknownEffect(Schema.UnknownFromJsonString)(response.body).pipe(Effect.mapError((error) => new ConnectorError({
25
+ cause: "validation_failed",
26
+ message: "Invalid JSON response",
27
+ underlying: error
28
+ })), Effect.flatMap((value) => Schema.decodeUnknownEffect(schema)(value).pipe(Effect.mapError((error) => new ConnectorError({
29
+ cause: "validation_failed",
30
+ message: "Invalid response shape",
31
+ underlying: error
32
+ })))));
33
+ //#endregion
34
+ export { ConnectorHttpClient, ConnectorHttpRequest, ConnectorHttpResponse, HttpMethod, decodeJsonResponse };
35
+
36
+ //# sourceMappingURL=http.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http.mjs","names":[],"sources":["../src/http.ts"],"sourcesContent":["import { Context, Effect } from 'effect'\nimport * as Schema from 'effect/Schema'\nimport { ConnectorError } from './error.ts'\n\nexport const HttpMethod = Schema.Literals(['GET', 'POST', 'PATCH', 'PUT', 'DELETE'])\nexport type HttpMethod = typeof HttpMethod.Type\n\nexport class ConnectorHttpRequest extends Schema.Class<ConnectorHttpRequest>('ConnectorHttpRequest')({\n method: HttpMethod,\n url: Schema.String,\n headers: Schema.optional(Schema.Record(Schema.String, Schema.String)),\n body: Schema.optional(Schema.String)\n}) {}\n\nexport class ConnectorHttpResponse extends Schema.Class<ConnectorHttpResponse>('ConnectorHttpResponse')({\n status: Schema.Number,\n headers: Schema.Record(Schema.String, Schema.String),\n body: Schema.String\n}) {}\n\nexport type ConnectorHttpClientApi = {\n readonly request: (request: ConnectorHttpRequest) => Effect.Effect<ConnectorHttpResponse, ConnectorError>\n}\n\nexport class ConnectorHttpClient extends Context.Service<ConnectorHttpClient, ConnectorHttpClientApi>()(\n '@yolk-sdk/connectors/ConnectorHttpClient'\n) {}\n\ntype JsonResponseSchema<A> = Schema.Schema<A> & { readonly DecodingServices: never }\n\nexport const decodeJsonResponse = <A>(schema: JsonResponseSchema<A>, response: ConnectorHttpResponse) =>\n Schema.decodeUnknownEffect(Schema.UnknownFromJsonString)(response.body).pipe(\n Effect.mapError(error =>\n new ConnectorError({\n cause: 'validation_failed',\n message: 'Invalid JSON response',\n underlying: error\n })\n ),\n Effect.flatMap(value =>\n Schema.decodeUnknownEffect(schema)(value).pipe(\n Effect.mapError(error =>\n new ConnectorError({\n cause: 'validation_failed',\n message: 'Invalid response shape',\n underlying: error\n })\n )\n )\n )\n )\n"],"mappings":";;;;AAIA,MAAa,aAAa,OAAO,SAAS;CAAC;CAAO;CAAQ;CAAS;CAAO;AAAQ,CAAC;AAGnF,IAAa,uBAAb,cAA0C,OAAO,MAA4B,sBAAsB,EAAE;CACnG,QAAQ;CACR,KAAK,OAAO;CACZ,SAAS,OAAO,SAAS,OAAO,OAAO,OAAO,QAAQ,OAAO,MAAM,CAAC;CACpE,MAAM,OAAO,SAAS,OAAO,MAAM;AACrC,CAAC,EAAE,CAAC;AAEJ,IAAa,wBAAb,cAA2C,OAAO,MAA6B,uBAAuB,EAAE;CACtG,QAAQ,OAAO;CACf,SAAS,OAAO,OAAO,OAAO,QAAQ,OAAO,MAAM;CACnD,MAAM,OAAO;AACf,CAAC,EAAE,CAAC;AAMJ,IAAa,sBAAb,cAAyC,QAAQ,QAAqD,EACpG,0CACF,EAAE,CAAC;AAIH,MAAa,sBAAyB,QAA+B,aACnE,OAAO,oBAAoB,OAAO,qBAAqB,EAAE,SAAS,IAAI,EAAE,KACtE,OAAO,UAAS,UACd,IAAI,eAAe;CACjB,OAAO;CACP,SAAS;CACT,YAAY;AACd,CAAC,CACH,GACA,OAAO,SAAQ,UACb,OAAO,oBAAoB,MAAM,EAAE,KAAK,EAAE,KACxC,OAAO,UAAS,UACd,IAAI,eAAe;CACjB,OAAO;CACP,SAAS;CACT,YAAY;AACd,CAAC,CACH,CACF,CACF,CACF"}
@@ -0,0 +1,9 @@
1
+ import { ConnectorError, ConnectorErrorCause } from "./error.mjs";
2
+ import { ActionResult, ProviderFailure } from "./result.mjs";
3
+ import { ApiKeyCredential, BearerTokenCredential, CredentialBinding, CredentialKind, CredentialResolveRequest, CredentialResolver, CredentialResolverApi, CredentialSlot, OAuthCredential, RuntimeCredential, findCredentialBinding, makeCredentialBinding, resolveCredential } from "./credential.mjs";
4
+ import { ConnectorIntegration, IntegrationConfig, makeIntegration } from "./integration.mjs";
5
+ import { ActionExecutionInput, ConnectorAction, DefineActionOptions, UnknownActionExecutionInput, defineAction } from "./action.mjs";
6
+ import { Connector, ConnectorInvokeInput, DefineConnectorOptions, defineConnector } from "./connector.mjs";
7
+ import { optionalStringConfig, requiredStringConfig } from "./config.mjs";
8
+ import { ConnectorHttpClient, ConnectorHttpClientApi, ConnectorHttpRequest, ConnectorHttpResponse, HttpMethod, decodeJsonResponse } from "./http.mjs";
9
+ export { type ActionExecutionInput, ActionResult, type ActionResult as ActionResultType, ApiKeyCredential, BearerTokenCredential, type Connector, type ConnectorAction, ConnectorError, ConnectorErrorCause, ConnectorHttpClient, type ConnectorHttpClientApi, ConnectorHttpRequest, ConnectorHttpResponse, ConnectorIntegration, type ConnectorInvokeInput, CredentialBinding, CredentialKind, type CredentialResolveRequest, CredentialResolver, type CredentialResolverApi, CredentialSlot, type DefineActionOptions, type DefineConnectorOptions, HttpMethod, IntegrationConfig, OAuthCredential, ProviderFailure, RuntimeCredential, type UnknownActionExecutionInput, decodeJsonResponse, defineAction, defineConnector, findCredentialBinding, makeCredentialBinding, makeIntegration, optionalStringConfig, requiredStringConfig, resolveCredential };
package/dist/index.mjs ADDED
@@ -0,0 +1,9 @@
1
+ import { ConnectorError, ConnectorErrorCause } from "./error.mjs";
2
+ import { defineAction } from "./action.mjs";
3
+ import { optionalStringConfig, requiredStringConfig } from "./config.mjs";
4
+ import { defineConnector } from "./connector.mjs";
5
+ import { ApiKeyCredential, BearerTokenCredential, CredentialBinding, CredentialKind, CredentialResolver, CredentialSlot, OAuthCredential, RuntimeCredential, findCredentialBinding, makeCredentialBinding, resolveCredential } from "./credential.mjs";
6
+ import { ConnectorHttpClient, ConnectorHttpRequest, ConnectorHttpResponse, HttpMethod, decodeJsonResponse } from "./http.mjs";
7
+ import { ConnectorIntegration, IntegrationConfig, makeIntegration } from "./integration.mjs";
8
+ import { ActionResult, ProviderFailure } from "./result.mjs";
9
+ export { ActionResult, ApiKeyCredential, BearerTokenCredential, ConnectorError, ConnectorErrorCause, ConnectorHttpClient, ConnectorHttpRequest, ConnectorHttpResponse, ConnectorIntegration, CredentialBinding, CredentialKind, CredentialResolver, CredentialSlot, HttpMethod, IntegrationConfig, OAuthCredential, ProviderFailure, RuntimeCredential, decodeJsonResponse, defineAction, defineConnector, findCredentialBinding, makeCredentialBinding, makeIntegration, optionalStringConfig, requiredStringConfig, resolveCredential };
@@ -0,0 +1,24 @@
1
+ import { CredentialBinding } from "./credential.mjs";
2
+ import * as Schema from "effect/Schema";
3
+
4
+ //#region src/integration.d.ts
5
+ declare const IntegrationConfig: Schema.$Record<Schema.String, Schema.Unknown>;
6
+ type IntegrationConfig = typeof IntegrationConfig.Type;
7
+ declare const ConnectorIntegration_base: Schema.Class<ConnectorIntegration, Schema.Struct<{
8
+ readonly id: Schema.optional<Schema.String>;
9
+ readonly connectorId: Schema.String;
10
+ readonly config: Schema.$Record<Schema.String, Schema.Unknown>;
11
+ readonly credentialBindings: Schema.$Array<typeof CredentialBinding>;
12
+ readonly metadata: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
13
+ }>, {}>;
14
+ declare class ConnectorIntegration extends ConnectorIntegration_base {}
15
+ declare const makeIntegration: (input: {
16
+ readonly id?: string;
17
+ readonly connectorId: string;
18
+ readonly config?: IntegrationConfig;
19
+ readonly credentialBindings?: ReadonlyArray<CredentialBinding>;
20
+ readonly metadata?: Readonly<Record<string, unknown>>;
21
+ }) => ConnectorIntegration;
22
+ //#endregion
23
+ export { ConnectorIntegration, IntegrationConfig, makeIntegration };
24
+ //# sourceMappingURL=integration.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration.d.mts","names":[],"sources":["../src/integration.ts"],"mappings":";;;;cAGa,iBAAA,EAAiB,MAAA,CAAA,OAAA,CAAA,MAAA,CAAA,MAAA,EAAA,MAAA,CAAA,OAAA;AAAA,KAClB,iBAAA,UAA2B,iBAAA,CAAkB,IAAI;AAAA,cAAA,yBAAA;;;;;;;cAEhD,oBAAA,SAA6B,yBAMxC;AAAA,cAEW,eAAA,GAAmB,KAAA;EAAA,SACrB,EAAA;EAAA,SACA,WAAA;EAAA,SACA,MAAA,GAAS,iBAAA;EAAA,SACT,kBAAA,GAAqB,aAAA,CAAc,iBAAA;EAAA,SACnC,QAAA,GAAW,QAAA,CAAS,MAAA;AAAA,MAC9B,oBAAA"}
@@ -0,0 +1,22 @@
1
+ import { CredentialBinding } from "./credential.mjs";
2
+ import * as Schema from "effect/Schema";
3
+ //#region src/integration.ts
4
+ const IntegrationConfig = Schema.Record(Schema.String, Schema.Unknown);
5
+ var ConnectorIntegration = class extends Schema.Class("ConnectorIntegration")({
6
+ id: Schema.optional(Schema.String),
7
+ connectorId: Schema.String,
8
+ config: IntegrationConfig,
9
+ credentialBindings: Schema.Array(CredentialBinding),
10
+ metadata: Schema.optional(Schema.Record(Schema.String, Schema.Unknown))
11
+ }) {};
12
+ const makeIntegration = (input) => ConnectorIntegration.make({
13
+ id: input.id,
14
+ connectorId: input.connectorId,
15
+ config: input.config ?? {},
16
+ credentialBindings: input.credentialBindings ?? [],
17
+ metadata: input.metadata
18
+ });
19
+ //#endregion
20
+ export { ConnectorIntegration, IntegrationConfig, makeIntegration };
21
+
22
+ //# sourceMappingURL=integration.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integration.mjs","names":[],"sources":["../src/integration.ts"],"sourcesContent":["import * as Schema from 'effect/Schema'\nimport { CredentialBinding } from './credential.ts'\n\nexport const IntegrationConfig = Schema.Record(Schema.String, Schema.Unknown)\nexport type IntegrationConfig = typeof IntegrationConfig.Type\n\nexport class ConnectorIntegration extends Schema.Class<ConnectorIntegration>('ConnectorIntegration')({\n id: Schema.optional(Schema.String),\n connectorId: Schema.String,\n config: IntegrationConfig,\n credentialBindings: Schema.Array(CredentialBinding),\n metadata: Schema.optional(Schema.Record(Schema.String, Schema.Unknown))\n}) {}\n\nexport const makeIntegration = (input: {\n readonly id?: string\n readonly connectorId: string\n readonly config?: IntegrationConfig\n readonly credentialBindings?: ReadonlyArray<CredentialBinding>\n readonly metadata?: Readonly<Record<string, unknown>>\n}) =>\n ConnectorIntegration.make({\n id: input.id,\n connectorId: input.connectorId,\n config: input.config ?? {},\n credentialBindings: input.credentialBindings ?? [],\n metadata: input.metadata\n })\n"],"mappings":";;;AAGA,MAAa,oBAAoB,OAAO,OAAO,OAAO,QAAQ,OAAO,OAAO;AAG5E,IAAa,uBAAb,cAA0C,OAAO,MAA4B,sBAAsB,EAAE;CACnG,IAAI,OAAO,SAAS,OAAO,MAAM;CACjC,aAAa,OAAO;CACpB,QAAQ;CACR,oBAAoB,OAAO,MAAM,iBAAiB;CAClD,UAAU,OAAO,SAAS,OAAO,OAAO,OAAO,QAAQ,OAAO,OAAO,CAAC;AACxE,CAAC,EAAE,CAAC;AAEJ,MAAa,mBAAmB,UAO9B,qBAAqB,KAAK;CACxB,IAAI,MAAM;CACV,aAAa,MAAM;CACnB,QAAQ,MAAM,UAAU,CAAC;CACzB,oBAAoB,MAAM,sBAAsB,CAAC;CACjD,UAAU,MAAM;AAClB,CAAC"}
@@ -0,0 +1,60 @@
1
+ import { ConnectorError } from "../error.mjs";
2
+ import { CredentialResolver, CredentialSlot } from "../credential.mjs";
3
+ import { ConnectorAction } from "../action.mjs";
4
+ import { Connector } from "../connector.mjs";
5
+ import { ConnectorHttpClient } from "../http.mjs";
6
+ import * as Schema from "effect/Schema";
7
+
8
+ //#region src/linkedin-search/index.d.ts
9
+ declare const linkedInSearchConnectorId = "linkedin-search";
10
+ declare const exaApiKeySlotId = "linkedin-search.exa_api_key";
11
+ declare const enrichLayerApiKeySlotId = "linkedin-search.enrich_layer_api_key";
12
+ declare const exaApiBaseUrl = "https://api.exa.ai";
13
+ declare const enrichLayerApiBaseUrl = "https://enrichlayer.com/api/v2";
14
+ declare const ExaApiKeySlot: CredentialSlot;
15
+ declare const EnrichLayerApiKeySlot: CredentialSlot;
16
+ declare const LinkedInSearchInput_base: Schema.Class<LinkedInSearchInput, Schema.Struct<{
17
+ readonly query: Schema.String;
18
+ readonly numResults: Schema.optional<Schema.Number>;
19
+ }>, {}>;
20
+ declare class LinkedInSearchInput extends LinkedInSearchInput_base {}
21
+ declare const LinkedInSearchResult: Schema.Struct<{
22
+ readonly title: Schema.optional<Schema.String>;
23
+ readonly url: Schema.optional<Schema.String>;
24
+ readonly text: Schema.optional<Schema.String>;
25
+ readonly publishedDate: Schema.optional<Schema.String>;
26
+ readonly author: Schema.optional<Schema.String>;
27
+ }>;
28
+ declare const LinkedInSearchOutput_base: Schema.Class<LinkedInSearchOutput, Schema.Struct<{
29
+ readonly results: Schema.$Array<Schema.Struct<{
30
+ readonly title: Schema.optional<Schema.String>;
31
+ readonly url: Schema.optional<Schema.String>;
32
+ readonly text: Schema.optional<Schema.String>;
33
+ readonly publishedDate: Schema.optional<Schema.String>;
34
+ readonly author: Schema.optional<Schema.String>;
35
+ }>>;
36
+ readonly totalResults: Schema.optional<Schema.Number>;
37
+ }>, {}>;
38
+ declare class LinkedInSearchOutput extends LinkedInSearchOutput_base {}
39
+ declare const LinkedInProfileInput_base: Schema.Class<LinkedInProfileInput, Schema.Struct<{
40
+ readonly linkedinUrl: Schema.String;
41
+ }>, {}>;
42
+ declare class LinkedInProfileInput extends LinkedInProfileInput_base {}
43
+ declare const LinkedInProfileOutput_base: Schema.Class<LinkedInProfileOutput, Schema.Struct<{
44
+ readonly profile: Schema.Unknown;
45
+ }>, {}>;
46
+ declare class LinkedInProfileOutput extends LinkedInProfileOutput_base {}
47
+ declare const LinkedInEmailOutput_base: Schema.Class<LinkedInEmailOutput, Schema.Struct<{
48
+ readonly email: Schema.NullOr<Schema.String>;
49
+ readonly status: Schema.optional<Schema.String>;
50
+ readonly message: Schema.optional<Schema.String>;
51
+ }>, {}>;
52
+ declare class LinkedInEmailOutput extends LinkedInEmailOutput_base {}
53
+ declare const linkedInSearchAction: ConnectorAction<ConnectorHttpClient | CredentialResolver, ConnectorError>;
54
+ declare const linkedInProfileAction: ConnectorAction<ConnectorHttpClient | CredentialResolver, ConnectorError>;
55
+ declare const linkedInEmailAction: ConnectorAction<ConnectorHttpClient | CredentialResolver, ConnectorError>;
56
+ declare const linkedInSearchActions: ConnectorAction<ConnectorHttpClient | CredentialResolver, ConnectorError>[];
57
+ declare const LinkedInSearchConnector: Connector<ConnectorHttpClient | CredentialResolver, ConnectorError>;
58
+ //#endregion
59
+ export { EnrichLayerApiKeySlot, ExaApiKeySlot, LinkedInEmailOutput, LinkedInProfileInput, LinkedInProfileOutput, LinkedInSearchConnector, LinkedInSearchInput, LinkedInSearchOutput, LinkedInSearchResult, enrichLayerApiBaseUrl, enrichLayerApiKeySlotId, exaApiBaseUrl, exaApiKeySlotId, linkedInEmailAction, linkedInProfileAction, linkedInSearchAction, linkedInSearchActions, linkedInSearchConnectorId };
60
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../src/linkedin-search/index.ts"],"mappings":";;;;;;;;cAUa,yBAAA;AAAA,cACA,eAAA;AAAA,cACA,uBAAA;AAAA,cACA,aAAA;AAAA,cACA,qBAAA;AAAA,cAEA,aAAA,EAAa,cAAgE;AAAA,cAC7E,qBAAA,EAAqB,cAGhC;AAAA,cAAA,wBAAA;;;;cAiCW,mBAAA,SAA4B,wBAGvC;AAAA,cAEW,oBAAA,EAAoB,MAAA,CAAA,MAAA;EAAA;;;;;;cAM/B,yBAAA;;;;;;;;;;cAEW,oBAAA,SAA6B,yBAGxC;AAAA,cAAG,yBAAA;;;cAEQ,oBAAA,SAA6B,yBAExC;AAAA,cAAG,0BAAA;;;cAEQ,qBAAA,SAA8B,0BAEzC;AAAA,cAAG,wBAAA;;;;;cAEQ,mBAAA,SAA4B,wBAIvC;AAAA,cAUW,oBAAA,EAAoB,eAAA,CAAA,mBAAA,GAAA,kBAAA,EAAA,cAAA;AAAA,cA4CpB,qBAAA,EAAqB,eAAA,CAAA,mBAAA,GAAA,kBAAA,EAAA,cAAA;AAAA,cAiCrB,mBAAA,EAAmB,eAAA,CAAA,mBAAA,GAAA,kBAAA,EAAA,cAAA;AAAA,cAwCnB,qBAAA,EAAqB,eAAA,CAAA,mBAAA,GAAA,kBAAA,EAAA,cAAA;AAAA,cAErB,uBAAA,EAAuB,SAAA,CAAA,mBAAA,GAAA,kBAAA,EAAA,cAAA"}
@@ -0,0 +1,162 @@
1
+ import { ConnectorError } from "../error.mjs";
2
+ import { defineAction } from "../action.mjs";
3
+ import { defineConnector } from "../connector.mjs";
4
+ import { CredentialSlot, resolveCredential } from "../credential.mjs";
5
+ import { ConnectorHttpClient, ConnectorHttpRequest, decodeJsonResponse } from "../http.mjs";
6
+ import { ActionResult, ProviderFailure } from "../result.mjs";
7
+ import { Effect } from "effect";
8
+ import * as Schema from "effect/Schema";
9
+ //#region src/linkedin-search/index.ts
10
+ const linkedInSearchConnectorId = "linkedin-search";
11
+ const exaApiKeySlotId = "linkedin-search.exa_api_key";
12
+ const enrichLayerApiKeySlotId = "linkedin-search.enrich_layer_api_key";
13
+ const exaApiBaseUrl = "https://api.exa.ai";
14
+ const enrichLayerApiBaseUrl = "https://enrichlayer.com/api/v2";
15
+ const ExaApiKeySlot = CredentialSlot.make({
16
+ id: exaApiKeySlotId,
17
+ kind: "api_key"
18
+ });
19
+ const EnrichLayerApiKeySlot = CredentialSlot.make({
20
+ id: enrichLayerApiKeySlotId,
21
+ kind: "api_key"
22
+ });
23
+ const resolveApiToken = (integration, slot) => Effect.gen(function* () {
24
+ const credential = yield* resolveCredential(integration, slot);
25
+ switch (credential._tag) {
26
+ case "ApiKeyCredential": return credential.key;
27
+ case "BearerTokenCredential": return credential.token;
28
+ case "OAuthCredential": return credential.accessToken;
29
+ }
30
+ });
31
+ const isSuccessStatus = (status) => status >= 200 && status < 300;
32
+ const linkedInProviderFailure = (input) => ActionResult.failure(new ProviderFailure({
33
+ code: input.code,
34
+ message: input.message,
35
+ status: input.status,
36
+ underlying: input.body
37
+ }));
38
+ var LinkedInSearchInput = class extends Schema.Class("LinkedInSearchInput")({
39
+ query: Schema.String,
40
+ numResults: Schema.optional(Schema.Number)
41
+ }) {};
42
+ const LinkedInSearchResult = Schema.Struct({
43
+ title: Schema.optional(Schema.String),
44
+ url: Schema.optional(Schema.String),
45
+ text: Schema.optional(Schema.String),
46
+ publishedDate: Schema.optional(Schema.String),
47
+ author: Schema.optional(Schema.String)
48
+ });
49
+ var LinkedInSearchOutput = class extends Schema.Class("LinkedInSearchOutput")({
50
+ results: Schema.Array(LinkedInSearchResult),
51
+ totalResults: Schema.optional(Schema.Number)
52
+ }) {};
53
+ var LinkedInProfileInput = class extends Schema.Class("LinkedInProfileInput")({ linkedinUrl: Schema.String }) {};
54
+ var LinkedInProfileOutput = class extends Schema.Class("LinkedInProfileOutput")({ profile: Schema.Unknown }) {};
55
+ var LinkedInEmailOutput = class extends Schema.Class("LinkedInEmailOutput")({
56
+ email: Schema.NullOr(Schema.String),
57
+ status: Schema.optional(Schema.String),
58
+ message: Schema.optional(Schema.String)
59
+ }) {};
60
+ const missingEnrichLayer = (integration) => new ConnectorError({
61
+ cause: "credential_binding_missing",
62
+ message: "Missing Enrich Layer credential binding",
63
+ connectorId: integration.connectorId,
64
+ slotId: EnrichLayerApiKeySlot.id
65
+ });
66
+ const linkedInSearchAction = defineAction({
67
+ id: "linkedin_search.search",
68
+ description: "Search LinkedIn people results through Exa.",
69
+ inputSchema: LinkedInSearchInput,
70
+ outputSchema: LinkedInSearchOutput,
71
+ execute: ({ integration, input }) => Effect.gen(function* () {
72
+ const token = yield* resolveApiToken(integration, ExaApiKeySlot);
73
+ const response = yield* (yield* ConnectorHttpClient).request(ConnectorHttpRequest.make({
74
+ method: "POST",
75
+ url: `${exaApiBaseUrl}/search`,
76
+ headers: {
77
+ authorization: `Bearer ${token}`,
78
+ "content-type": "application/json"
79
+ },
80
+ body: JSON.stringify({
81
+ query: input.query,
82
+ category: "people",
83
+ numResults: input.numResults ?? 10,
84
+ type: "auto",
85
+ contents: { text: true }
86
+ })
87
+ }));
88
+ if (!isSuccessStatus(response.status)) return linkedInProviderFailure({
89
+ code: "linkedin_search_failed",
90
+ message: "LinkedIn search failed",
91
+ status: response.status,
92
+ body: response.body
93
+ });
94
+ const decoded = yield* decodeJsonResponse(Schema.Struct({
95
+ results: Schema.Array(LinkedInSearchResult),
96
+ totalResults: Schema.optional(Schema.Number)
97
+ }), response);
98
+ return ActionResult.success(LinkedInSearchOutput.make(decoded));
99
+ })
100
+ });
101
+ const linkedInProfileAction = defineAction({
102
+ id: "linkedin_search.profile",
103
+ description: "Fetch a LinkedIn profile through Enrich Layer.",
104
+ inputSchema: LinkedInProfileInput,
105
+ outputSchema: LinkedInProfileOutput,
106
+ execute: ({ integration, input }) => Effect.gen(function* () {
107
+ const token = yield* resolveApiToken(integration, EnrichLayerApiKeySlot).pipe(Effect.catchTag("ConnectorError", () => Effect.fail(missingEnrichLayer(integration))));
108
+ const response = yield* (yield* ConnectorHttpClient).request(ConnectorHttpRequest.make({
109
+ method: "GET",
110
+ url: `${enrichLayerApiBaseUrl}/profile?linkedin_profile_url=${encodeURIComponent(input.linkedinUrl)}`,
111
+ headers: { authorization: `Bearer ${token}` }
112
+ }));
113
+ if (!isSuccessStatus(response.status)) return linkedInProviderFailure({
114
+ code: "linkedin_profile_failed",
115
+ message: "LinkedIn profile fetch failed",
116
+ status: response.status,
117
+ body: response.body
118
+ });
119
+ const profile = yield* decodeJsonResponse(Schema.Unknown, response);
120
+ return ActionResult.success(LinkedInProfileOutput.make({ profile }));
121
+ })
122
+ });
123
+ const linkedInEmailAction = defineAction({
124
+ id: "linkedin_search.email",
125
+ description: "Fetch a LinkedIn profile email through Enrich Layer.",
126
+ inputSchema: LinkedInProfileInput,
127
+ outputSchema: LinkedInEmailOutput,
128
+ execute: ({ integration, input }) => Effect.gen(function* () {
129
+ const token = yield* resolveApiToken(integration, EnrichLayerApiKeySlot).pipe(Effect.catchTag("ConnectorError", () => Effect.fail(missingEnrichLayer(integration))));
130
+ const response = yield* (yield* ConnectorHttpClient).request(ConnectorHttpRequest.make({
131
+ method: "GET",
132
+ url: `${enrichLayerApiBaseUrl}/profile/email?linkedin_profile_url=${encodeURIComponent(input.linkedinUrl)}`,
133
+ headers: { authorization: `Bearer ${token}` }
134
+ }));
135
+ if (!isSuccessStatus(response.status)) return linkedInProviderFailure({
136
+ code: "linkedin_email_failed",
137
+ message: "LinkedIn email fetch failed",
138
+ status: response.status,
139
+ body: response.body
140
+ });
141
+ const decoded = yield* decodeJsonResponse(Schema.Struct({
142
+ email: Schema.NullOr(Schema.String),
143
+ status: Schema.optional(Schema.String),
144
+ message: Schema.optional(Schema.String)
145
+ }), response);
146
+ return ActionResult.success(LinkedInEmailOutput.make(decoded));
147
+ })
148
+ });
149
+ const linkedInSearchActions = [
150
+ linkedInSearchAction,
151
+ linkedInProfileAction,
152
+ linkedInEmailAction
153
+ ];
154
+ const LinkedInSearchConnector = defineConnector({
155
+ id: linkedInSearchConnectorId,
156
+ description: "LinkedIn people search and enrichment connector actions.",
157
+ actions: linkedInSearchActions
158
+ });
159
+ //#endregion
160
+ export { EnrichLayerApiKeySlot, ExaApiKeySlot, LinkedInEmailOutput, LinkedInProfileInput, LinkedInProfileOutput, LinkedInSearchConnector, LinkedInSearchInput, LinkedInSearchOutput, LinkedInSearchResult, enrichLayerApiBaseUrl, enrichLayerApiKeySlotId, exaApiBaseUrl, exaApiKeySlotId, linkedInEmailAction, linkedInProfileAction, linkedInSearchAction, linkedInSearchActions, linkedInSearchConnectorId };
161
+
162
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../src/linkedin-search/index.ts"],"sourcesContent":["import { Effect } from 'effect'\nimport * as Schema from 'effect/Schema'\nimport { defineAction } from '../action.ts'\nimport { defineConnector } from '../connector.ts'\nimport { CredentialSlot, resolveCredential } from '../credential.ts'\nimport { ConnectorError } from '../error.ts'\nimport { ConnectorHttpClient, ConnectorHttpRequest, decodeJsonResponse } from '../http.ts'\nimport { ActionResult, ProviderFailure } from '../result.ts'\nimport type { ConnectorIntegration } from '../integration.ts'\n\nexport const linkedInSearchConnectorId = 'linkedin-search'\nexport const exaApiKeySlotId = 'linkedin-search.exa_api_key'\nexport const enrichLayerApiKeySlotId = 'linkedin-search.enrich_layer_api_key'\nexport const exaApiBaseUrl = 'https://api.exa.ai'\nexport const enrichLayerApiBaseUrl = 'https://enrichlayer.com/api/v2'\n\nexport const ExaApiKeySlot = CredentialSlot.make({ id: exaApiKeySlotId, kind: 'api_key' })\nexport const EnrichLayerApiKeySlot = CredentialSlot.make({\n id: enrichLayerApiKeySlotId,\n kind: 'api_key'\n})\n\nconst resolveApiToken = (integration: ConnectorIntegration, slot: CredentialSlot) =>\n Effect.gen(function* () {\n const credential = yield* resolveCredential(integration, slot)\n\n switch (credential._tag) {\n case 'ApiKeyCredential':\n return credential.key\n case 'BearerTokenCredential':\n return credential.token\n case 'OAuthCredential':\n return credential.accessToken\n }\n })\n\nconst isSuccessStatus = (status: number) => status >= 200 && status < 300\n\nconst linkedInProviderFailure = (input: {\n readonly code: string\n readonly message: string\n readonly status: number\n readonly body: string\n}) =>\n ActionResult.failure(\n new ProviderFailure({\n code: input.code,\n message: input.message,\n status: input.status,\n underlying: input.body\n })\n )\n\nexport class LinkedInSearchInput extends Schema.Class<LinkedInSearchInput>('LinkedInSearchInput')({\n query: Schema.String,\n numResults: Schema.optional(Schema.Number)\n}) {}\n\nexport const LinkedInSearchResult = Schema.Struct({\n title: Schema.optional(Schema.String),\n url: Schema.optional(Schema.String),\n text: Schema.optional(Schema.String),\n publishedDate: Schema.optional(Schema.String),\n author: Schema.optional(Schema.String)\n})\n\nexport class LinkedInSearchOutput extends Schema.Class<LinkedInSearchOutput>('LinkedInSearchOutput')({\n results: Schema.Array(LinkedInSearchResult),\n totalResults: Schema.optional(Schema.Number)\n}) {}\n\nexport class LinkedInProfileInput extends Schema.Class<LinkedInProfileInput>('LinkedInProfileInput')({\n linkedinUrl: Schema.String\n}) {}\n\nexport class LinkedInProfileOutput extends Schema.Class<LinkedInProfileOutput>('LinkedInProfileOutput')({\n profile: Schema.Unknown\n}) {}\n\nexport class LinkedInEmailOutput extends Schema.Class<LinkedInEmailOutput>('LinkedInEmailOutput')({\n email: Schema.NullOr(Schema.String),\n status: Schema.optional(Schema.String),\n message: Schema.optional(Schema.String)\n}) {}\n\nconst missingEnrichLayer = (integration: ConnectorIntegration) =>\n new ConnectorError({\n cause: 'credential_binding_missing',\n message: 'Missing Enrich Layer credential binding',\n connectorId: integration.connectorId,\n slotId: EnrichLayerApiKeySlot.id\n })\n\nexport const linkedInSearchAction = defineAction({\n id: 'linkedin_search.search',\n description: 'Search LinkedIn people results through Exa.',\n inputSchema: LinkedInSearchInput,\n outputSchema: LinkedInSearchOutput,\n execute: ({ integration, input }) =>\n Effect.gen(function* () {\n const token = yield* resolveApiToken(integration, ExaApiKeySlot)\n const http = yield* ConnectorHttpClient\n const response = yield* http.request(\n ConnectorHttpRequest.make({\n method: 'POST',\n url: `${exaApiBaseUrl}/search`,\n headers: {\n authorization: `Bearer ${token}`,\n 'content-type': 'application/json'\n },\n body: JSON.stringify({\n query: input.query,\n category: 'people',\n numResults: input.numResults ?? 10,\n type: 'auto',\n contents: { text: true }\n })\n })\n )\n\n if (!isSuccessStatus(response.status)) {\n return linkedInProviderFailure({\n code: 'linkedin_search_failed',\n message: 'LinkedIn search failed',\n status: response.status,\n body: response.body\n })\n }\n\n const decoded = yield* decodeJsonResponse(\n Schema.Struct({ results: Schema.Array(LinkedInSearchResult), totalResults: Schema.optional(Schema.Number) }),\n response\n )\n return ActionResult.success(LinkedInSearchOutput.make(decoded))\n })\n})\n\nexport const linkedInProfileAction = defineAction({\n id: 'linkedin_search.profile',\n description: 'Fetch a LinkedIn profile through Enrich Layer.',\n inputSchema: LinkedInProfileInput,\n outputSchema: LinkedInProfileOutput,\n execute: ({ integration, input }) =>\n Effect.gen(function* () {\n const token = yield* resolveApiToken(integration, EnrichLayerApiKeySlot).pipe(\n Effect.catchTag('ConnectorError', () => Effect.fail(missingEnrichLayer(integration)))\n )\n const http = yield* ConnectorHttpClient\n const response = yield* http.request(\n ConnectorHttpRequest.make({\n method: 'GET',\n url: `${enrichLayerApiBaseUrl}/profile?linkedin_profile_url=${encodeURIComponent(input.linkedinUrl)}`,\n headers: { authorization: `Bearer ${token}` }\n })\n )\n\n if (!isSuccessStatus(response.status)) {\n return linkedInProviderFailure({\n code: 'linkedin_profile_failed',\n message: 'LinkedIn profile fetch failed',\n status: response.status,\n body: response.body\n })\n }\n\n const profile = yield* decodeJsonResponse(Schema.Unknown, response)\n return ActionResult.success(LinkedInProfileOutput.make({ profile }))\n })\n})\n\nexport const linkedInEmailAction = defineAction({\n id: 'linkedin_search.email',\n description: 'Fetch a LinkedIn profile email through Enrich Layer.',\n inputSchema: LinkedInProfileInput,\n outputSchema: LinkedInEmailOutput,\n execute: ({ integration, input }) =>\n Effect.gen(function* () {\n const token = yield* resolveApiToken(integration, EnrichLayerApiKeySlot).pipe(\n Effect.catchTag('ConnectorError', () => Effect.fail(missingEnrichLayer(integration)))\n )\n const http = yield* ConnectorHttpClient\n const response = yield* http.request(\n ConnectorHttpRequest.make({\n method: 'GET',\n url: `${enrichLayerApiBaseUrl}/profile/email?linkedin_profile_url=${encodeURIComponent(input.linkedinUrl)}`,\n headers: { authorization: `Bearer ${token}` }\n })\n )\n\n if (!isSuccessStatus(response.status)) {\n return linkedInProviderFailure({\n code: 'linkedin_email_failed',\n message: 'LinkedIn email fetch failed',\n status: response.status,\n body: response.body\n })\n }\n\n const decoded = yield* decodeJsonResponse(\n Schema.Struct({\n email: Schema.NullOr(Schema.String),\n status: Schema.optional(Schema.String),\n message: Schema.optional(Schema.String)\n }),\n response\n )\n return ActionResult.success(LinkedInEmailOutput.make(decoded))\n })\n})\n\nexport const linkedInSearchActions = [linkedInSearchAction, linkedInProfileAction, linkedInEmailAction]\n\nexport const LinkedInSearchConnector = defineConnector({\n id: linkedInSearchConnectorId,\n description: 'LinkedIn people search and enrichment connector actions.',\n actions: linkedInSearchActions\n})\n"],"mappings":";;;;;;;;;AAUA,MAAa,4BAA4B;AACzC,MAAa,kBAAkB;AAC/B,MAAa,0BAA0B;AACvC,MAAa,gBAAgB;AAC7B,MAAa,wBAAwB;AAErC,MAAa,gBAAgB,eAAe,KAAK;CAAE,IAAI;CAAiB,MAAM;AAAU,CAAC;AACzF,MAAa,wBAAwB,eAAe,KAAK;CACvD,IAAI;CACJ,MAAM;AACR,CAAC;AAED,MAAM,mBAAmB,aAAmC,SAC1D,OAAO,IAAI,aAAa;CACtB,MAAM,aAAa,OAAO,kBAAkB,aAAa,IAAI;CAE7D,QAAQ,WAAW,MAAnB;EACE,KA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