naystack 1.1.8 → 1.1.9
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.
|
@@ -25,6 +25,7 @@ __export(socials_exports, {
|
|
|
25
25
|
getInstagramConversation: () => getInstagramConversation,
|
|
26
26
|
getInstagramConversationByUser: () => getInstagramConversationByUser,
|
|
27
27
|
getInstagramConversations: () => getInstagramConversations,
|
|
28
|
+
getInstagramConversationsByUser: () => getInstagramConversationsByUser,
|
|
28
29
|
getInstagramMedia: () => getInstagramMedia,
|
|
29
30
|
getInstagramMessage: () => getInstagramMessage,
|
|
30
31
|
getInstagramUser: () => getInstagramUser,
|
|
@@ -79,7 +80,7 @@ var getInstagramConversations = async (token, limit = 25, cursor) => {
|
|
|
79
80
|
fetchMore: result?.paging?.cursors?.after ? () => getInstagramConversations(token, limit, result.paging.cursors?.after) : void 0
|
|
80
81
|
};
|
|
81
82
|
};
|
|
82
|
-
var
|
|
83
|
+
var getInstagramConversationsByUser = (token, userID) => {
|
|
83
84
|
return getInstagramData(
|
|
84
85
|
token,
|
|
85
86
|
"me/conversations",
|
|
@@ -89,6 +90,10 @@ var getInstagramConversationByUser = (token, userID) => {
|
|
|
89
90
|
}
|
|
90
91
|
);
|
|
91
92
|
};
|
|
93
|
+
var getInstagramConversationByUser = async (token, userID) => {
|
|
94
|
+
const res = await getInstagramConversationsByUser(token, userID);
|
|
95
|
+
return res?.data.find((item) => item.participants?.data.length === 2);
|
|
96
|
+
};
|
|
92
97
|
var getInstagramConversation = async (token, id, cursor) => {
|
|
93
98
|
const result = await getInstagramData(token, id + "", {
|
|
94
99
|
fields: "participants,messages,updated_time",
|
|
@@ -222,6 +227,7 @@ var createThread = async (token, threads) => {
|
|
|
222
227
|
getInstagramConversation,
|
|
223
228
|
getInstagramConversationByUser,
|
|
224
229
|
getInstagramConversations,
|
|
230
|
+
getInstagramConversationsByUser,
|
|
225
231
|
getInstagramMedia,
|
|
226
232
|
getInstagramMessage,
|
|
227
233
|
getInstagramUser,
|
package/dist/socials/index.d.mts
CHANGED
|
@@ -76,9 +76,10 @@ declare const getInstagramConversations: (token: string, limit?: number, cursor?
|
|
|
76
76
|
}[] | undefined;
|
|
77
77
|
fetchMore: (() => Promise</*elided*/ any>) | undefined;
|
|
78
78
|
}>;
|
|
79
|
-
declare const
|
|
79
|
+
declare const getInstagramConversationsByUser: (token: string, userID: string) => Promise<({
|
|
80
80
|
data: InstagramConversation[];
|
|
81
81
|
} & InstagramError) | null>;
|
|
82
|
+
declare const getInstagramConversationByUser: (token: string, userID: string) => Promise<InstagramConversation | undefined>;
|
|
82
83
|
declare const getInstagramConversation: (token: string, id: string, cursor?: string) => Promise<{
|
|
83
84
|
messages: {
|
|
84
85
|
id: string;
|
|
@@ -118,4 +119,4 @@ declare const getThreadsReplies: <T = ThreadsPost>(token: string, id: string, fi
|
|
|
118
119
|
declare const createThreadsPost: (token: string, text: string, reply_to_id?: string) => Promise<string | void | null>;
|
|
119
120
|
declare const createThread: (token: string, threads: string[]) => Promise<string | undefined>;
|
|
120
121
|
|
|
121
|
-
export { createThread, createThreadsPost, getInstagramConversation, getInstagramConversationByUser, getInstagramConversations, getInstagramMedia, getInstagramMessage, getInstagramUser, getThread, getThreads, getThreadsReplies, sendInstagramMessage, setupInstagramWebhook };
|
|
122
|
+
export { createThread, createThreadsPost, getInstagramConversation, getInstagramConversationByUser, getInstagramConversations, getInstagramConversationsByUser, getInstagramMedia, getInstagramMessage, getInstagramUser, getThread, getThreads, getThreadsReplies, sendInstagramMessage, setupInstagramWebhook };
|
package/dist/socials/index.d.ts
CHANGED
|
@@ -76,9 +76,10 @@ declare const getInstagramConversations: (token: string, limit?: number, cursor?
|
|
|
76
76
|
}[] | undefined;
|
|
77
77
|
fetchMore: (() => Promise</*elided*/ any>) | undefined;
|
|
78
78
|
}>;
|
|
79
|
-
declare const
|
|
79
|
+
declare const getInstagramConversationsByUser: (token: string, userID: string) => Promise<({
|
|
80
80
|
data: InstagramConversation[];
|
|
81
81
|
} & InstagramError) | null>;
|
|
82
|
+
declare const getInstagramConversationByUser: (token: string, userID: string) => Promise<InstagramConversation | undefined>;
|
|
82
83
|
declare const getInstagramConversation: (token: string, id: string, cursor?: string) => Promise<{
|
|
83
84
|
messages: {
|
|
84
85
|
id: string;
|
|
@@ -118,4 +119,4 @@ declare const getThreadsReplies: <T = ThreadsPost>(token: string, id: string, fi
|
|
|
118
119
|
declare const createThreadsPost: (token: string, text: string, reply_to_id?: string) => Promise<string | void | null>;
|
|
119
120
|
declare const createThread: (token: string, threads: string[]) => Promise<string | undefined>;
|
|
120
121
|
|
|
121
|
-
export { createThread, createThreadsPost, getInstagramConversation, getInstagramConversationByUser, getInstagramConversations, getInstagramMedia, getInstagramMessage, getInstagramUser, getThread, getThreads, getThreadsReplies, sendInstagramMessage, setupInstagramWebhook };
|
|
122
|
+
export { createThread, createThreadsPost, getInstagramConversation, getInstagramConversationByUser, getInstagramConversations, getInstagramConversationsByUser, getInstagramMedia, getInstagramMessage, getInstagramUser, getThread, getThreads, getThreadsReplies, sendInstagramMessage, setupInstagramWebhook };
|
|
@@ -41,7 +41,7 @@ var getInstagramConversations = async (token, limit = 25, cursor) => {
|
|
|
41
41
|
fetchMore: result?.paging?.cursors?.after ? () => getInstagramConversations(token, limit, result.paging.cursors?.after) : void 0
|
|
42
42
|
};
|
|
43
43
|
};
|
|
44
|
-
var
|
|
44
|
+
var getInstagramConversationsByUser = (token, userID) => {
|
|
45
45
|
return getInstagramData(
|
|
46
46
|
token,
|
|
47
47
|
"me/conversations",
|
|
@@ -51,6 +51,10 @@ var getInstagramConversationByUser = (token, userID) => {
|
|
|
51
51
|
}
|
|
52
52
|
);
|
|
53
53
|
};
|
|
54
|
+
var getInstagramConversationByUser = async (token, userID) => {
|
|
55
|
+
const res = await getInstagramConversationsByUser(token, userID);
|
|
56
|
+
return res?.data.find((item) => item.participants?.data.length === 2);
|
|
57
|
+
};
|
|
54
58
|
var getInstagramConversation = async (token, id, cursor) => {
|
|
55
59
|
const result = await getInstagramData(token, id + "", {
|
|
56
60
|
fields: "participants,messages,updated_time",
|
|
@@ -183,6 +187,7 @@ export {
|
|
|
183
187
|
getInstagramConversation,
|
|
184
188
|
getInstagramConversationByUser,
|
|
185
189
|
getInstagramConversations,
|
|
190
|
+
getInstagramConversationsByUser,
|
|
186
191
|
getInstagramMedia,
|
|
187
192
|
getInstagramMessage,
|
|
188
193
|
getInstagramUser,
|