@jam-nodes/nodes 0.2.8 → 0.2.10

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 (118) hide show
  1. package/README.md +147 -0
  2. package/dist/ai/draft-emails.d.ts +1 -1
  3. package/dist/index.d.ts +199 -9
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +21 -3
  6. package/dist/index.js.map +1 -1
  7. package/dist/integrations/apollo/search-contacts.d.ts +4 -4
  8. package/dist/integrations/dataforseo/keyword-research.d.ts +6 -6
  9. package/dist/integrations/dataforseo/keyword-research.d.ts.map +1 -1
  10. package/dist/integrations/dataforseo/keyword-research.js +2 -8
  11. package/dist/integrations/dataforseo/keyword-research.js.map +1 -1
  12. package/dist/integrations/devto/create-article.d.ts +20 -0
  13. package/dist/integrations/devto/create-article.d.ts.map +1 -0
  14. package/dist/integrations/devto/create-article.js +67 -0
  15. package/dist/integrations/devto/create-article.js.map +1 -0
  16. package/dist/integrations/devto/credentials.d.ts +2 -0
  17. package/dist/integrations/devto/credentials.d.ts.map +1 -0
  18. package/dist/integrations/devto/credentials.js +17 -0
  19. package/dist/integrations/devto/credentials.js.map +1 -0
  20. package/dist/integrations/devto/get-articles.d.ts +21 -0
  21. package/dist/integrations/devto/get-articles.d.ts.map +1 -0
  22. package/dist/integrations/devto/get-articles.js +78 -0
  23. package/dist/integrations/devto/get-articles.js.map +1 -0
  24. package/dist/integrations/devto/index.d.ts +6 -0
  25. package/dist/integrations/devto/index.d.ts.map +1 -0
  26. package/dist/integrations/devto/index.js +6 -0
  27. package/dist/integrations/devto/index.js.map +1 -0
  28. package/dist/integrations/devto/schemas.d.ts +243 -0
  29. package/dist/integrations/devto/schemas.d.ts.map +1 -0
  30. package/dist/integrations/devto/schemas.js +69 -0
  31. package/dist/integrations/devto/schemas.js.map +1 -0
  32. package/dist/integrations/devto/update-article.d.ts +19 -0
  33. package/dist/integrations/devto/update-article.d.ts.map +1 -0
  34. package/dist/integrations/devto/update-article.js +65 -0
  35. package/dist/integrations/devto/update-article.js.map +1 -0
  36. package/dist/integrations/discord/schemas.d.ts +2 -2
  37. package/dist/integrations/discord/send-message.d.ts +1 -1
  38. package/dist/integrations/firecrawl/crawl.d.ts +3 -3
  39. package/dist/integrations/firecrawl/extract.d.ts +3 -3
  40. package/dist/integrations/firecrawl/scrape.d.ts +10 -10
  41. package/dist/integrations/index.d.ts +3 -1
  42. package/dist/integrations/index.d.ts.map +1 -1
  43. package/dist/integrations/index.js +5 -1
  44. package/dist/integrations/index.js.map +1 -1
  45. package/dist/integrations/social/credentials.d.ts +2 -0
  46. package/dist/integrations/social/credentials.d.ts.map +1 -0
  47. package/dist/integrations/social/credentials.js +36 -0
  48. package/dist/integrations/social/credentials.js.map +1 -0
  49. package/dist/integrations/social/index.d.ts +8 -0
  50. package/dist/integrations/social/index.d.ts.map +1 -1
  51. package/dist/integrations/social/index.js +8 -0
  52. package/dist/integrations/social/index.js.map +1 -1
  53. package/dist/integrations/social/twitter-client.d.ts +6 -0
  54. package/dist/integrations/social/twitter-client.d.ts.map +1 -0
  55. package/dist/integrations/social/twitter-client.js +140 -0
  56. package/dist/integrations/social/twitter-client.js.map +1 -0
  57. package/dist/integrations/social/twitter-create-tweet.d.ts +61 -0
  58. package/dist/integrations/social/twitter-create-tweet.d.ts.map +1 -0
  59. package/dist/integrations/social/twitter-create-tweet.js +83 -0
  60. package/dist/integrations/social/twitter-create-tweet.js.map +1 -0
  61. package/dist/integrations/social/twitter-delete-tweet.d.ts +23 -0
  62. package/dist/integrations/social/twitter-delete-tweet.d.ts.map +1 -0
  63. package/dist/integrations/social/twitter-delete-tweet.js +41 -0
  64. package/dist/integrations/social/twitter-delete-tweet.js.map +1 -0
  65. package/dist/integrations/social/twitter-get-user-by-username.d.ts +39 -0
  66. package/dist/integrations/social/twitter-get-user-by-username.d.ts.map +1 -0
  67. package/dist/integrations/social/twitter-get-user-by-username.js +56 -0
  68. package/dist/integrations/social/twitter-get-user-by-username.js.map +1 -0
  69. package/dist/integrations/social/twitter-like-tweet.d.ts +23 -0
  70. package/dist/integrations/social/twitter-like-tweet.d.ts.map +1 -0
  71. package/dist/integrations/social/twitter-like-tweet.js +48 -0
  72. package/dist/integrations/social/twitter-like-tweet.js.map +1 -0
  73. package/dist/integrations/social/twitter-retweet.d.ts +23 -0
  74. package/dist/integrations/social/twitter-retweet.d.ts.map +1 -0
  75. package/dist/integrations/social/twitter-retweet.js +48 -0
  76. package/dist/integrations/social/twitter-retweet.js.map +1 -0
  77. package/dist/integrations/social/twitter-search-tweets.d.ts +77 -0
  78. package/dist/integrations/social/twitter-search-tweets.d.ts.map +1 -0
  79. package/dist/integrations/social/twitter-search-tweets.js +76 -0
  80. package/dist/integrations/social/twitter-search-tweets.js.map +1 -0
  81. package/dist/integrations/social/twitter-send-dm.d.ts +39 -0
  82. package/dist/integrations/social/twitter-send-dm.d.ts.map +1 -0
  83. package/dist/integrations/social/twitter-send-dm.js +67 -0
  84. package/dist/integrations/social/twitter-send-dm.js.map +1 -0
  85. package/dist/integrations/wordpress/createPost.d.ts +25 -0
  86. package/dist/integrations/wordpress/createPost.d.ts.map +1 -0
  87. package/dist/integrations/wordpress/createPost.js +67 -0
  88. package/dist/integrations/wordpress/createPost.js.map +1 -0
  89. package/dist/integrations/wordpress/credentials.d.ts +2 -0
  90. package/dist/integrations/wordpress/credentials.d.ts.map +1 -0
  91. package/dist/integrations/wordpress/credentials.js +25 -0
  92. package/dist/integrations/wordpress/credentials.js.map +1 -0
  93. package/dist/integrations/wordpress/getPosts.d.ts +28 -0
  94. package/dist/integrations/wordpress/getPosts.d.ts.map +1 -0
  95. package/dist/integrations/wordpress/getPosts.js +70 -0
  96. package/dist/integrations/wordpress/getPosts.js.map +1 -0
  97. package/dist/integrations/wordpress/index.d.ts +8 -0
  98. package/dist/integrations/wordpress/index.d.ts.map +1 -0
  99. package/dist/integrations/wordpress/index.js +7 -0
  100. package/dist/integrations/wordpress/index.js.map +1 -0
  101. package/dist/integrations/wordpress/schemas.d.ts +411 -0
  102. package/dist/integrations/wordpress/schemas.d.ts.map +1 -0
  103. package/dist/integrations/wordpress/schemas.js +110 -0
  104. package/dist/integrations/wordpress/schemas.js.map +1 -0
  105. package/dist/integrations/wordpress/updatePost.d.ts +21 -0
  106. package/dist/integrations/wordpress/updatePost.d.ts.map +1 -0
  107. package/dist/integrations/wordpress/updatePost.js +59 -0
  108. package/dist/integrations/wordpress/updatePost.js.map +1 -0
  109. package/dist/integrations/wordpress/uploadMedia.d.ts +15 -0
  110. package/dist/integrations/wordpress/uploadMedia.d.ts.map +1 -0
  111. package/dist/integrations/wordpress/uploadMedia.js +56 -0
  112. package/dist/integrations/wordpress/uploadMedia.js.map +1 -0
  113. package/dist/integrations/wordpress/utils.d.ts +15 -0
  114. package/dist/integrations/wordpress/utils.d.ts.map +1 -0
  115. package/dist/integrations/wordpress/utils.js +15 -0
  116. package/dist/integrations/wordpress/utils.js.map +1 -0
  117. package/dist/schemas/ai.d.ts +6 -6
  118. package/package.json +2 -1
@@ -0,0 +1,61 @@
1
+ import { z } from 'zod';
2
+ export declare const TwitterCreateTweetInputSchema: z.ZodObject<{
3
+ text: z.ZodString;
4
+ replyToTweetId: z.ZodOptional<z.ZodString>;
5
+ mediaIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
6
+ quoteTweetId: z.ZodOptional<z.ZodString>;
7
+ poll: z.ZodOptional<z.ZodObject<{
8
+ options: z.ZodArray<z.ZodString, "many">;
9
+ durationMinutes: z.ZodNumber;
10
+ }, "strip", z.ZodTypeAny, {
11
+ options: string[];
12
+ durationMinutes: number;
13
+ }, {
14
+ options: string[];
15
+ durationMinutes: number;
16
+ }>>;
17
+ }, "strip", z.ZodTypeAny, {
18
+ text: string;
19
+ replyToTweetId?: string | undefined;
20
+ mediaIds?: string[] | undefined;
21
+ quoteTweetId?: string | undefined;
22
+ poll?: {
23
+ options: string[];
24
+ durationMinutes: number;
25
+ } | undefined;
26
+ }, {
27
+ text: string;
28
+ replyToTweetId?: string | undefined;
29
+ mediaIds?: string[] | undefined;
30
+ quoteTweetId?: string | undefined;
31
+ poll?: {
32
+ options: string[];
33
+ durationMinutes: number;
34
+ } | undefined;
35
+ }>;
36
+ export type TwitterCreateTweetInput = z.infer<typeof TwitterCreateTweetInputSchema>;
37
+ export declare const TwitterCreateTweetOutputSchema: z.ZodObject<{
38
+ tweetId: z.ZodString;
39
+ text: z.ZodString;
40
+ }, "strip", z.ZodTypeAny, {
41
+ text: string;
42
+ tweetId: string;
43
+ }, {
44
+ text: string;
45
+ tweetId: string;
46
+ }>;
47
+ export type TwitterCreateTweetOutput = z.infer<typeof TwitterCreateTweetOutputSchema>;
48
+ export declare const twitterCreateTweetNode: import("@jam-nodes/core").NodeDefinition<{
49
+ text: string;
50
+ replyToTweetId?: string | undefined;
51
+ mediaIds?: string[] | undefined;
52
+ quoteTweetId?: string | undefined;
53
+ poll?: {
54
+ options: string[];
55
+ durationMinutes: number;
56
+ } | undefined;
57
+ }, {
58
+ tweetId: string;
59
+ text: string;
60
+ }>;
61
+ //# sourceMappingURL=twitter-create-tweet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"twitter-create-tweet.d.ts","sourceRoot":"","sources":["../../../src/integrations/social/twitter-create-tweet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASxC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,eAAO,MAAM,8BAA8B;;;;;;;;;EAGzC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEtF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;EA0EjC,CAAC"}
@@ -0,0 +1,83 @@
1
+ import { z } from 'zod';
2
+ import { defineNode } from '@jam-nodes/core';
3
+ import { twitterRequest } from './twitter-client.js';
4
+ export const TwitterCreateTweetInputSchema = z.object({
5
+ text: z.string().min(1),
6
+ replyToTweetId: z.string().optional(),
7
+ mediaIds: z.array(z.string()).optional(),
8
+ quoteTweetId: z.string().optional(),
9
+ poll: z.object({
10
+ options: z.array(z.string()).min(2).max(4),
11
+ durationMinutes: z.number().int().min(5).max(10080),
12
+ }).optional(),
13
+ });
14
+ export const TwitterCreateTweetOutputSchema = z.object({
15
+ tweetId: z.string(),
16
+ text: z.string(),
17
+ });
18
+ export const twitterCreateTweetNode = defineNode({
19
+ type: 'twitter_create_tweet',
20
+ name: 'Twitter Create Tweet',
21
+ description: 'Create a new tweet on Twitter/X',
22
+ category: 'integration',
23
+ inputSchema: TwitterCreateTweetInputSchema,
24
+ outputSchema: TwitterCreateTweetOutputSchema,
25
+ estimatedDuration: 8,
26
+ capabilities: {
27
+ supportsRerun: true,
28
+ },
29
+ executor: async (input, context) => {
30
+ try {
31
+ const payload = {
32
+ text: input.text,
33
+ };
34
+ if (input.replyToTweetId) {
35
+ payload['reply'] = {
36
+ in_reply_to_tweet_id: input.replyToTweetId,
37
+ };
38
+ }
39
+ if (input.mediaIds && input.mediaIds.length > 0) {
40
+ payload['media'] = {
41
+ media_ids: input.mediaIds,
42
+ };
43
+ }
44
+ if (input.quoteTweetId) {
45
+ payload['quote_tweet_id'] = input.quoteTweetId;
46
+ }
47
+ if (input.poll) {
48
+ payload['poll'] = {
49
+ options: input.poll.options,
50
+ duration_minutes: input.poll.durationMinutes,
51
+ };
52
+ }
53
+ const response = await twitterRequest(context, '/2/tweets', {
54
+ method: 'POST',
55
+ headers: {
56
+ 'Content-Type': 'application/json',
57
+ },
58
+ body: JSON.stringify(payload),
59
+ });
60
+ const tweetId = response.data?.id;
61
+ if (!tweetId) {
62
+ return {
63
+ success: false,
64
+ error: 'Twitter API returned an invalid create tweet response.',
65
+ };
66
+ }
67
+ return {
68
+ success: true,
69
+ output: {
70
+ tweetId,
71
+ text: response.data?.text || input.text,
72
+ },
73
+ };
74
+ }
75
+ catch (error) {
76
+ return {
77
+ success: false,
78
+ error: error instanceof Error ? error.message : 'Failed to create tweet',
79
+ };
80
+ }
81
+ },
82
+ });
83
+ //# sourceMappingURL=twitter-create-tweet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"twitter-create-tweet.js","sourceRoot":"","sources":["../../../src/integrations/social/twitter-create-tweet.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,23 @@
1
+ import { z } from 'zod';
2
+ export declare const TwitterDeleteTweetInputSchema: z.ZodObject<{
3
+ tweetId: z.ZodString;
4
+ }, "strip", z.ZodTypeAny, {
5
+ tweetId: string;
6
+ }, {
7
+ tweetId: string;
8
+ }>;
9
+ export type TwitterDeleteTweetInput = z.infer<typeof TwitterDeleteTweetInputSchema>;
10
+ export declare const TwitterDeleteTweetOutputSchema: z.ZodObject<{
11
+ deleted: z.ZodBoolean;
12
+ }, "strip", z.ZodTypeAny, {
13
+ deleted: boolean;
14
+ }, {
15
+ deleted: boolean;
16
+ }>;
17
+ export type TwitterDeleteTweetOutput = z.infer<typeof TwitterDeleteTweetOutputSchema>;
18
+ export declare const twitterDeleteTweetNode: import("@jam-nodes/core").NodeDefinition<{
19
+ tweetId: string;
20
+ }, {
21
+ deleted: boolean;
22
+ }>;
23
+ //# sourceMappingURL=twitter-delete-tweet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"twitter-delete-tweet.d.ts","sourceRoot":"","sources":["../../../src/integrations/social/twitter-delete-tweet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,6BAA6B;;;;;;EAExC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,eAAO,MAAM,8BAA8B;;;;;;EAEzC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEtF,eAAO,MAAM,sBAAsB;;;;EAkCjC,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { z } from 'zod';
2
+ import { defineNode } from '@jam-nodes/core';
3
+ import { twitterRequest } from './twitter-client.js';
4
+ export const TwitterDeleteTweetInputSchema = z.object({
5
+ tweetId: z.string().min(1),
6
+ });
7
+ export const TwitterDeleteTweetOutputSchema = z.object({
8
+ deleted: z.boolean(),
9
+ });
10
+ export const twitterDeleteTweetNode = defineNode({
11
+ type: 'twitter_delete_tweet',
12
+ name: 'Twitter Delete Tweet',
13
+ description: 'Delete one of your tweets on Twitter/X',
14
+ category: 'integration',
15
+ inputSchema: TwitterDeleteTweetInputSchema,
16
+ outputSchema: TwitterDeleteTweetOutputSchema,
17
+ estimatedDuration: 6,
18
+ capabilities: {
19
+ supportsRerun: true,
20
+ },
21
+ executor: async (input, context) => {
22
+ try {
23
+ const response = await twitterRequest(context, `/2/tweets/${encodeURIComponent(input.tweetId)}`, {
24
+ method: 'DELETE',
25
+ });
26
+ return {
27
+ success: true,
28
+ output: {
29
+ deleted: Boolean(response.data?.deleted),
30
+ },
31
+ };
32
+ }
33
+ catch (error) {
34
+ return {
35
+ success: false,
36
+ error: error instanceof Error ? error.message : 'Failed to delete tweet',
37
+ };
38
+ }
39
+ },
40
+ });
41
+ //# sourceMappingURL=twitter-delete-tweet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"twitter-delete-tweet.js","sourceRoot":"","sources":["../../../src/integrations/social/twitter-delete-tweet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAQrD,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IACpD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC3B,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IACrD,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;CACrB,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,sBAAsB,GAAG,UAAU,CAAC;IAC/C,IAAI,EAAE,sBAAsB;IAC5B,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,wCAAwC;IACrD,QAAQ,EAAE,aAAa;IACvB,WAAW,EAAE,6BAA6B;IAC1C,YAAY,EAAE,8BAA8B;IAC5C,iBAAiB,EAAE,CAAC;IACpB,YAAY,EAAE;QACZ,aAAa,EAAE,IAAI;KACpB;IACD,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;QACjC,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,cAAc,CACnC,OAAO,EACP,aAAa,kBAAkB,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAChD;gBACE,MAAM,EAAE,QAAQ;aACjB,CACF,CAAC;YAEF,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,MAAM,EAAE;oBACN,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;iBACzC;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,wBAAwB;aACzE,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,39 @@
1
+ import { z } from 'zod';
2
+ export declare const TwitterGetUserByUsernameInputSchema: z.ZodObject<{
3
+ username: z.ZodString;
4
+ }, "strip", z.ZodTypeAny, {
5
+ username: string;
6
+ }, {
7
+ username: string;
8
+ }>;
9
+ export type TwitterGetUserByUsernameInput = z.infer<typeof TwitterGetUserByUsernameInputSchema>;
10
+ export declare const TwitterGetUserByUsernameOutputSchema: z.ZodObject<{
11
+ id: z.ZodString;
12
+ name: z.ZodString;
13
+ username: z.ZodString;
14
+ description: z.ZodOptional<z.ZodString>;
15
+ verified: z.ZodOptional<z.ZodBoolean>;
16
+ }, "strip", z.ZodTypeAny, {
17
+ id: string;
18
+ name: string;
19
+ username: string;
20
+ description?: string | undefined;
21
+ verified?: boolean | undefined;
22
+ }, {
23
+ id: string;
24
+ name: string;
25
+ username: string;
26
+ description?: string | undefined;
27
+ verified?: boolean | undefined;
28
+ }>;
29
+ export type TwitterGetUserByUsernameOutput = z.infer<typeof TwitterGetUserByUsernameOutputSchema>;
30
+ export declare const twitterGetUserByUsernameNode: import("@jam-nodes/core").NodeDefinition<{
31
+ username: string;
32
+ }, {
33
+ id: string;
34
+ name: string;
35
+ username: string;
36
+ description?: string | undefined;
37
+ verified?: boolean | undefined;
38
+ }>;
39
+ //# sourceMappingURL=twitter-get-user-by-username.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"twitter-get-user-by-username.d.ts","sourceRoot":"","sources":["../../../src/integrations/social/twitter-get-user-by-username.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,eAAO,MAAM,mCAAmC;;;;;;EAE9C,CAAC;AAEH,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC;AAEhG,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;EAM/C,CAAC;AAEH,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC;AAElG,eAAO,MAAM,4BAA4B;;;;;;;;EA8CvC,CAAC"}
@@ -0,0 +1,56 @@
1
+ import { z } from 'zod';
2
+ import { defineNode } from '@jam-nodes/core';
3
+ import { twitterRequest } from './twitter-client.js';
4
+ export const TwitterGetUserByUsernameInputSchema = z.object({
5
+ username: z.string().min(1),
6
+ });
7
+ export const TwitterGetUserByUsernameOutputSchema = z.object({
8
+ id: z.string(),
9
+ name: z.string(),
10
+ username: z.string(),
11
+ description: z.string().optional(),
12
+ verified: z.boolean().optional(),
13
+ });
14
+ export const twitterGetUserByUsernameNode = defineNode({
15
+ type: 'twitter_get_user_by_username',
16
+ name: 'Twitter Get User By Username',
17
+ description: 'Get a Twitter/X user profile by username',
18
+ category: 'integration',
19
+ inputSchema: TwitterGetUserByUsernameInputSchema,
20
+ outputSchema: TwitterGetUserByUsernameOutputSchema,
21
+ estimatedDuration: 6,
22
+ capabilities: {
23
+ supportsRerun: true,
24
+ },
25
+ executor: async (input, context) => {
26
+ try {
27
+ const response = await twitterRequest(context, `/2/users/by/username/${encodeURIComponent(input.username)}?user.fields=description,verified`, {
28
+ method: 'GET',
29
+ });
30
+ const user = response.data;
31
+ if (!user?.id || !user.username || !user.name) {
32
+ return {
33
+ success: false,
34
+ error: 'Twitter API returned an invalid user response.',
35
+ };
36
+ }
37
+ return {
38
+ success: true,
39
+ output: {
40
+ id: user.id,
41
+ name: user.name,
42
+ username: user.username,
43
+ description: user.description,
44
+ verified: user.verified,
45
+ },
46
+ };
47
+ }
48
+ catch (error) {
49
+ return {
50
+ success: false,
51
+ error: error instanceof Error ? error.message : 'Failed to get user',
52
+ };
53
+ }
54
+ },
55
+ });
56
+ //# sourceMappingURL=twitter-get-user-by-username.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"twitter-get-user-by-username.js","sourceRoot":"","sources":["../../../src/integrations/social/twitter-get-user-by-username.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAYrD,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1D,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC5B,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3D,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,4BAA4B,GAAG,UAAU,CAAC;IACrD,IAAI,EAAE,8BAA8B;IACpC,IAAI,EAAE,8BAA8B;IACpC,WAAW,EAAE,0CAA0C;IACvD,QAAQ,EAAE,aAAa;IACvB,WAAW,EAAE,mCAAmC;IAChD,YAAY,EAAE,oCAAoC;IAClD,iBAAiB,EAAE,CAAC;IACpB,YAAY,EAAE;QACZ,aAAa,EAAE,IAAI;KACpB;IACD,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;QACjC,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,cAAc,CACnC,OAAO,EACP,wBAAwB,kBAAkB,CAAC,KAAK,CAAC,QAAQ,CAAC,mCAAmC,EAC7F;gBACE,MAAM,EAAE,KAAK;aACd,CACF,CAAC;YAEF,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;YAC3B,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;gBAC9C,OAAO;oBACL,OAAO,EAAE,KAAK;oBACd,KAAK,EAAE,gDAAgD;iBACxD,CAAC;YACJ,CAAC;YAED,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,MAAM,EAAE;oBACN,EAAE,EAAE,IAAI,CAAC,EAAE;oBACX,IAAI,EAAE,IAAI,CAAC,IAAI;oBACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;oBACvB,WAAW,EAAE,IAAI,CAAC,WAAW;oBAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ;iBACxB;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,oBAAoB;aACrE,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { z } from 'zod';
2
+ export declare const TwitterLikeTweetInputSchema: z.ZodObject<{
3
+ tweetId: z.ZodString;
4
+ }, "strip", z.ZodTypeAny, {
5
+ tweetId: string;
6
+ }, {
7
+ tweetId: string;
8
+ }>;
9
+ export type TwitterLikeTweetInput = z.infer<typeof TwitterLikeTweetInputSchema>;
10
+ export declare const TwitterLikeTweetOutputSchema: z.ZodObject<{
11
+ liked: z.ZodBoolean;
12
+ }, "strip", z.ZodTypeAny, {
13
+ liked: boolean;
14
+ }, {
15
+ liked: boolean;
16
+ }>;
17
+ export type TwitterLikeTweetOutput = z.infer<typeof TwitterLikeTweetOutputSchema>;
18
+ export declare const twitterLikeTweetNode: import("@jam-nodes/core").NodeDefinition<{
19
+ tweetId: string;
20
+ }, {
21
+ liked: boolean;
22
+ }>;
23
+ //# sourceMappingURL=twitter-like-tweet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"twitter-like-tweet.d.ts","sourceRoot":"","sources":["../../../src/integrations/social/twitter-like-tweet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,2BAA2B;;;;;;EAEtC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,4BAA4B;;;;;;EAEvC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,oBAAoB;;;;EAyC/B,CAAC"}
@@ -0,0 +1,48 @@
1
+ import { z } from 'zod';
2
+ import { defineNode } from '@jam-nodes/core';
3
+ import { getAuthenticatedTwitterUserId, twitterRequest } from './twitter-client.js';
4
+ export const TwitterLikeTweetInputSchema = z.object({
5
+ tweetId: z.string().min(1),
6
+ });
7
+ export const TwitterLikeTweetOutputSchema = z.object({
8
+ liked: z.boolean(),
9
+ });
10
+ export const twitterLikeTweetNode = defineNode({
11
+ type: 'twitter_like_tweet',
12
+ name: 'Twitter Like Tweet',
13
+ description: 'Like a tweet on Twitter/X',
14
+ category: 'integration',
15
+ inputSchema: TwitterLikeTweetInputSchema,
16
+ outputSchema: TwitterLikeTweetOutputSchema,
17
+ estimatedDuration: 6,
18
+ capabilities: {
19
+ supportsRerun: true,
20
+ },
21
+ executor: async (input, context) => {
22
+ try {
23
+ const userId = await getAuthenticatedTwitterUserId(context);
24
+ const response = await twitterRequest(context, `/2/users/${encodeURIComponent(userId)}/likes`, {
25
+ method: 'POST',
26
+ headers: {
27
+ 'Content-Type': 'application/json',
28
+ },
29
+ body: JSON.stringify({
30
+ tweet_id: input.tweetId,
31
+ }),
32
+ });
33
+ return {
34
+ success: true,
35
+ output: {
36
+ liked: Boolean(response.data?.liked),
37
+ },
38
+ };
39
+ }
40
+ catch (error) {
41
+ return {
42
+ success: false,
43
+ error: error instanceof Error ? error.message : 'Failed to like tweet',
44
+ };
45
+ }
46
+ },
47
+ });
48
+ //# sourceMappingURL=twitter-like-tweet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"twitter-like-tweet.js","sourceRoot":"","sources":["../../../src/integrations/social/twitter-like-tweet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,6BAA6B,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAQpF,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC3B,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,KAAK,EAAE,CAAC,CAAC,OAAO,EAAE;CACnB,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,oBAAoB,GAAG,UAAU,CAAC;IAC7C,IAAI,EAAE,oBAAoB;IAC1B,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,2BAA2B;IACxC,QAAQ,EAAE,aAAa;IACvB,WAAW,EAAE,2BAA2B;IACxC,YAAY,EAAE,4BAA4B;IAC1C,iBAAiB,EAAE,CAAC;IACpB,YAAY,EAAE;QACZ,aAAa,EAAE,IAAI;KACpB;IACD,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;QACjC,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,6BAA6B,CAAC,OAAO,CAAC,CAAC;YAC5D,MAAM,QAAQ,GAAG,MAAM,cAAc,CACnC,OAAO,EACP,YAAY,kBAAkB,CAAC,MAAM,CAAC,QAAQ,EAC9C;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;iBACnC;gBACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;oBACnB,QAAQ,EAAE,KAAK,CAAC,OAAO;iBACxB,CAAC;aACH,CACF,CAAC;YAEF,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,MAAM,EAAE;oBACN,KAAK,EAAE,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;iBACrC;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,sBAAsB;aACvE,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { z } from 'zod';
2
+ export declare const TwitterRetweetInputSchema: z.ZodObject<{
3
+ tweetId: z.ZodString;
4
+ }, "strip", z.ZodTypeAny, {
5
+ tweetId: string;
6
+ }, {
7
+ tweetId: string;
8
+ }>;
9
+ export type TwitterRetweetInput = z.infer<typeof TwitterRetweetInputSchema>;
10
+ export declare const TwitterRetweetOutputSchema: z.ZodObject<{
11
+ retweeted: z.ZodBoolean;
12
+ }, "strip", z.ZodTypeAny, {
13
+ retweeted: boolean;
14
+ }, {
15
+ retweeted: boolean;
16
+ }>;
17
+ export type TwitterRetweetOutput = z.infer<typeof TwitterRetweetOutputSchema>;
18
+ export declare const twitterRetweetNode: import("@jam-nodes/core").NodeDefinition<{
19
+ tweetId: string;
20
+ }, {
21
+ retweeted: boolean;
22
+ }>;
23
+ //# sourceMappingURL=twitter-retweet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"twitter-retweet.d.ts","sourceRoot":"","sources":["../../../src/integrations/social/twitter-retweet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,yBAAyB;;;;;;EAEpC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,eAAO,MAAM,0BAA0B;;;;;;EAErC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,kBAAkB;;;;EAyC7B,CAAC"}
@@ -0,0 +1,48 @@
1
+ import { z } from 'zod';
2
+ import { defineNode } from '@jam-nodes/core';
3
+ import { getAuthenticatedTwitterUserId, twitterRequest } from './twitter-client.js';
4
+ export const TwitterRetweetInputSchema = z.object({
5
+ tweetId: z.string().min(1),
6
+ });
7
+ export const TwitterRetweetOutputSchema = z.object({
8
+ retweeted: z.boolean(),
9
+ });
10
+ export const twitterRetweetNode = defineNode({
11
+ type: 'twitter_retweet',
12
+ name: 'Twitter Retweet',
13
+ description: 'Retweet a tweet on Twitter/X',
14
+ category: 'integration',
15
+ inputSchema: TwitterRetweetInputSchema,
16
+ outputSchema: TwitterRetweetOutputSchema,
17
+ estimatedDuration: 6,
18
+ capabilities: {
19
+ supportsRerun: true,
20
+ },
21
+ executor: async (input, context) => {
22
+ try {
23
+ const userId = await getAuthenticatedTwitterUserId(context);
24
+ const response = await twitterRequest(context, `/2/users/${encodeURIComponent(userId)}/retweets`, {
25
+ method: 'POST',
26
+ headers: {
27
+ 'Content-Type': 'application/json',
28
+ },
29
+ body: JSON.stringify({
30
+ tweet_id: input.tweetId,
31
+ }),
32
+ });
33
+ return {
34
+ success: true,
35
+ output: {
36
+ retweeted: Boolean(response.data?.retweeted),
37
+ },
38
+ };
39
+ }
40
+ catch (error) {
41
+ return {
42
+ success: false,
43
+ error: error instanceof Error ? error.message : 'Failed to retweet',
44
+ };
45
+ }
46
+ },
47
+ });
48
+ //# sourceMappingURL=twitter-retweet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"twitter-retweet.js","sourceRoot":"","sources":["../../../src/integrations/social/twitter-retweet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,6BAA6B,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAQpF,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC3B,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE;CACvB,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,kBAAkB,GAAG,UAAU,CAAC;IAC3C,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,8BAA8B;IAC3C,QAAQ,EAAE,aAAa;IACvB,WAAW,EAAE,yBAAyB;IACtC,YAAY,EAAE,0BAA0B;IACxC,iBAAiB,EAAE,CAAC;IACpB,YAAY,EAAE;QACZ,aAAa,EAAE,IAAI;KACpB;IACD,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;QACjC,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,6BAA6B,CAAC,OAAO,CAAC,CAAC;YAC5D,MAAM,QAAQ,GAAG,MAAM,cAAc,CACnC,OAAO,EACP,YAAY,kBAAkB,CAAC,MAAM,CAAC,WAAW,EACjD;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;iBACnC;gBACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;oBACnB,QAAQ,EAAE,KAAK,CAAC,OAAO;iBACxB,CAAC;aACH,CACF,CAAC;YAEF,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,MAAM,EAAE;oBACN,SAAS,EAAE,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;iBAC7C;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,mBAAmB;aACpE,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,77 @@
1
+ import { z } from 'zod';
2
+ export declare const TwitterSearchTweetsInputSchema: z.ZodObject<{
3
+ query: z.ZodString;
4
+ maxResults: z.ZodOptional<z.ZodNumber>;
5
+ startTime: z.ZodOptional<z.ZodString>;
6
+ endTime: z.ZodOptional<z.ZodString>;
7
+ sortOrder: z.ZodOptional<z.ZodEnum<["recency", "relevancy"]>>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ query: string;
10
+ maxResults?: number | undefined;
11
+ startTime?: string | undefined;
12
+ endTime?: string | undefined;
13
+ sortOrder?: "recency" | "relevancy" | undefined;
14
+ }, {
15
+ query: string;
16
+ maxResults?: number | undefined;
17
+ startTime?: string | undefined;
18
+ endTime?: string | undefined;
19
+ sortOrder?: "recency" | "relevancy" | undefined;
20
+ }>;
21
+ export type TwitterSearchTweetsInput = z.infer<typeof TwitterSearchTweetsInputSchema>;
22
+ export declare const TwitterSearchTweetsOutputSchema: z.ZodObject<{
23
+ tweets: z.ZodArray<z.ZodObject<{
24
+ id: z.ZodString;
25
+ text: z.ZodString;
26
+ authorId: z.ZodOptional<z.ZodString>;
27
+ createdAt: z.ZodOptional<z.ZodString>;
28
+ }, "strip", z.ZodTypeAny, {
29
+ id: string;
30
+ text: string;
31
+ authorId?: string | undefined;
32
+ createdAt?: string | undefined;
33
+ }, {
34
+ id: string;
35
+ text: string;
36
+ authorId?: string | undefined;
37
+ createdAt?: string | undefined;
38
+ }>, "many">;
39
+ resultCount: z.ZodNumber;
40
+ nextToken: z.ZodOptional<z.ZodString>;
41
+ }, "strip", z.ZodTypeAny, {
42
+ tweets: {
43
+ id: string;
44
+ text: string;
45
+ authorId?: string | undefined;
46
+ createdAt?: string | undefined;
47
+ }[];
48
+ resultCount: number;
49
+ nextToken?: string | undefined;
50
+ }, {
51
+ tweets: {
52
+ id: string;
53
+ text: string;
54
+ authorId?: string | undefined;
55
+ createdAt?: string | undefined;
56
+ }[];
57
+ resultCount: number;
58
+ nextToken?: string | undefined;
59
+ }>;
60
+ export type TwitterSearchTweetsOutput = z.infer<typeof TwitterSearchTweetsOutputSchema>;
61
+ export declare const twitterSearchTweetsNode: import("@jam-nodes/core").NodeDefinition<{
62
+ query: string;
63
+ maxResults?: number | undefined;
64
+ startTime?: string | undefined;
65
+ endTime?: string | undefined;
66
+ sortOrder?: "recency" | "relevancy" | undefined;
67
+ }, {
68
+ tweets: {
69
+ id: string;
70
+ text: string;
71
+ authorId?: string | undefined;
72
+ createdAt?: string | undefined;
73
+ }[];
74
+ resultCount: number;
75
+ nextToken?: string | undefined;
76
+ }>;
77
+ //# sourceMappingURL=twitter-search-tweets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"twitter-search-tweets.d.ts","sourceRoot":"","sources":["../../../src/integrations/social/twitter-search-tweets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmBxB,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;EAMzC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEtF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS1C,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAExF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;EA8DlC,CAAC"}
@@ -0,0 +1,76 @@
1
+ import { z } from 'zod';
2
+ import { defineNode } from '@jam-nodes/core';
3
+ import { twitterRequest } from './twitter-client.js';
4
+ export const TwitterSearchTweetsInputSchema = z.object({
5
+ query: z.string().min(1),
6
+ maxResults: z.number().int().min(10).max(100).optional(),
7
+ startTime: z.string().datetime().optional(),
8
+ endTime: z.string().datetime().optional(),
9
+ sortOrder: z.enum(['recency', 'relevancy']).optional(),
10
+ });
11
+ export const TwitterSearchTweetsOutputSchema = z.object({
12
+ tweets: z.array(z.object({
13
+ id: z.string(),
14
+ text: z.string(),
15
+ authorId: z.string().optional(),
16
+ createdAt: z.string().optional(),
17
+ })),
18
+ resultCount: z.number(),
19
+ nextToken: z.string().optional(),
20
+ });
21
+ export const twitterSearchTweetsNode = defineNode({
22
+ type: 'twitter_search_tweets',
23
+ name: 'Twitter Search Tweets',
24
+ description: 'Search recent tweets on Twitter/X',
25
+ category: 'integration',
26
+ inputSchema: TwitterSearchTweetsInputSchema,
27
+ outputSchema: TwitterSearchTweetsOutputSchema,
28
+ estimatedDuration: 10,
29
+ capabilities: {
30
+ supportsRerun: true,
31
+ },
32
+ executor: async (input, context) => {
33
+ try {
34
+ const params = new URLSearchParams({
35
+ query: input.query,
36
+ });
37
+ if (input.maxResults) {
38
+ params.set('max_results', String(input.maxResults));
39
+ }
40
+ if (input.startTime) {
41
+ params.set('start_time', input.startTime);
42
+ }
43
+ if (input.endTime) {
44
+ params.set('end_time', input.endTime);
45
+ }
46
+ if (input.sortOrder) {
47
+ params.set('sort_order', input.sortOrder);
48
+ }
49
+ params.set('tweet.fields', 'author_id,created_at');
50
+ const response = await twitterRequest(context, `/2/tweets/search/recent?${params.toString()}`, {
51
+ method: 'GET',
52
+ });
53
+ const tweets = (response.data || []).map((tweet) => ({
54
+ id: tweet.id,
55
+ text: tweet.text,
56
+ authorId: tweet.author_id,
57
+ createdAt: tweet.created_at,
58
+ }));
59
+ return {
60
+ success: true,
61
+ output: {
62
+ tweets,
63
+ resultCount: response.meta?.result_count ?? tweets.length,
64
+ nextToken: response.meta?.next_token,
65
+ },
66
+ };
67
+ }
68
+ catch (error) {
69
+ return {
70
+ success: false,
71
+ error: error instanceof Error ? error.message : 'Failed to search tweets',
72
+ };
73
+ }
74
+ },
75
+ });
76
+ //# sourceMappingURL=twitter-search-tweets.js.map