@xnkee/n8n-nodes-instagram 1.7.0 → 2.0.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.
- package/{LICENSE.md → LICENSE} +21 -21
- package/README.md +132 -437
- package/dist/credentials/InstagramApi.credentials.d.ts +10 -0
- package/dist/credentials/InstagramApi.credentials.js +55 -0
- package/dist/credentials/InstagramApi.credentials.js.map +1 -0
- package/dist/credentials/InstagramOAuth2Api.credentials.d.ts +2 -2
- package/dist/credentials/InstagramOAuth2Api.credentials.js +33 -113
- package/dist/credentials/InstagramOAuth2Api.credentials.js.map +1 -1
- package/dist/credentials/InstagramUnifiedLoginOAuth2Api.credentials.d.ts +17 -0
- package/dist/credentials/InstagramUnifiedLoginOAuth2Api.credentials.js +116 -0
- package/dist/credentials/InstagramUnifiedLoginOAuth2Api.credentials.js.map +1 -0
- package/dist/credentials/instagram.svg +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/nodes/Instagram/GenericFunctions.d.ts +27 -23
- package/dist/nodes/Instagram/GenericFunctions.js +182 -223
- package/dist/nodes/Instagram/GenericFunctions.js.map +1 -1
- package/dist/nodes/Instagram/Instagram.node.d.ts +1 -1
- package/dist/nodes/Instagram/Instagram.node.js +109 -2353
- package/dist/nodes/Instagram/Instagram.node.js.map +1 -1
- package/dist/nodes/Instagram/Instagram.node.json +17 -0
- package/dist/nodes/Instagram/descriptions/comment/Comment.fields.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/comment/Comment.fields.js +161 -0
- package/dist/nodes/Instagram/descriptions/comment/Comment.fields.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/comment/Comment.operations.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/comment/Comment.operations.js +62 -0
- package/dist/nodes/Instagram/descriptions/comment/Comment.operations.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/comment/index.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/comment/index.js +8 -0
- package/dist/nodes/Instagram/descriptions/comment/index.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/custom/Custom.fields.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/custom/Custom.fields.js +65 -0
- package/dist/nodes/Instagram/descriptions/custom/Custom.fields.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/custom/Custom.operations.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/custom/Custom.operations.js +26 -0
- package/dist/nodes/Instagram/descriptions/custom/Custom.operations.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/custom/index.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/custom/index.js +8 -0
- package/dist/nodes/Instagram/descriptions/custom/index.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/index.d.ts +7 -0
- package/dist/nodes/Instagram/descriptions/index.js +24 -0
- package/dist/nodes/Instagram/descriptions/index.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/insight/AccountInsight.fields.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/insight/AccountInsight.fields.js +164 -0
- package/dist/nodes/Instagram/descriptions/insight/AccountInsight.fields.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/insight/Insight.operations.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/insight/Insight.operations.js +32 -0
- package/dist/nodes/Instagram/descriptions/insight/Insight.operations.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/insight/MediaInsight.fields.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/insight/MediaInsight.fields.js +87 -0
- package/dist/nodes/Instagram/descriptions/insight/MediaInsight.fields.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/insight/index.d.ts +4 -0
- package/dist/nodes/Instagram/descriptions/insight/index.js +12 -0
- package/dist/nodes/Instagram/descriptions/insight/index.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/media/Media.operations.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/media/Media.operations.js +62 -0
- package/dist/nodes/Instagram/descriptions/media/Media.operations.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/media/MediaGet.fields.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/media/MediaGet.fields.js +163 -0
- package/dist/nodes/Instagram/descriptions/media/MediaGet.fields.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/media/MediaPublish.fields.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/media/MediaPublish.fields.js +285 -0
- package/dist/nodes/Instagram/descriptions/media/MediaPublish.fields.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/media/index.d.ts +4 -0
- package/dist/nodes/Instagram/descriptions/media/index.js +12 -0
- package/dist/nodes/Instagram/descriptions/media/index.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/mention/Mention.fields.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/mention/Mention.fields.js +122 -0
- package/dist/nodes/Instagram/descriptions/mention/Mention.fields.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/mention/Mention.operations.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/mention/Mention.operations.js +38 -0
- package/dist/nodes/Instagram/descriptions/mention/Mention.operations.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/mention/index.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/mention/index.js +8 -0
- package/dist/nodes/Instagram/descriptions/mention/index.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/message/Message.fields.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/message/Message.fields.js +123 -0
- package/dist/nodes/Instagram/descriptions/message/Message.fields.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/message/Message.operations.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/message/Message.operations.js +44 -0
- package/dist/nodes/Instagram/descriptions/message/Message.operations.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/message/index.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/message/index.js +8 -0
- package/dist/nodes/Instagram/descriptions/message/index.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/user/User.operations.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/user/User.operations.js +38 -0
- package/dist/nodes/Instagram/descriptions/user/User.operations.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/user/UserInsights.fields.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/user/UserInsights.fields.js +164 -0
- package/dist/nodes/Instagram/descriptions/user/UserInsights.fields.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/user/UserProfile.fields.d.ts +2 -0
- package/dist/nodes/Instagram/descriptions/user/UserProfile.fields.js +83 -0
- package/dist/nodes/Instagram/descriptions/user/UserProfile.fields.js.map +1 -0
- package/dist/nodes/Instagram/descriptions/user/index.d.ts +4 -0
- package/dist/nodes/Instagram/descriptions/user/index.js +12 -0
- package/dist/nodes/Instagram/descriptions/user/index.js.map +1 -0
- package/dist/nodes/Instagram/handlers/CommentHandler.d.ts +2 -0
- package/dist/nodes/Instagram/handlers/CommentHandler.js +63 -0
- package/dist/nodes/Instagram/handlers/CommentHandler.js.map +1 -0
- package/dist/nodes/Instagram/handlers/CustomHandler.d.ts +2 -0
- package/dist/nodes/Instagram/handlers/CustomHandler.js +28 -0
- package/dist/nodes/Instagram/handlers/CustomHandler.js.map +1 -0
- package/dist/nodes/Instagram/handlers/InsightHandler.d.ts +2 -0
- package/dist/nodes/Instagram/handlers/InsightHandler.js +42 -0
- package/dist/nodes/Instagram/handlers/InsightHandler.js.map +1 -0
- package/dist/nodes/Instagram/handlers/MediaHandler.d.ts +2 -0
- package/dist/nodes/Instagram/handlers/MediaHandler.js +172 -0
- package/dist/nodes/Instagram/handlers/MediaHandler.js.map +1 -0
- package/dist/nodes/Instagram/handlers/MentionHandler.d.ts +2 -0
- package/dist/nodes/Instagram/handlers/MentionHandler.js +48 -0
- package/dist/nodes/Instagram/handlers/MentionHandler.js.map +1 -0
- package/dist/nodes/Instagram/handlers/MessageHandler.d.ts +2 -0
- package/dist/nodes/Instagram/handlers/MessageHandler.js +57 -0
- package/dist/nodes/Instagram/handlers/MessageHandler.js.map +1 -0
- package/dist/nodes/Instagram/handlers/UserHandler.d.ts +2 -0
- package/dist/nodes/Instagram/handlers/UserHandler.js +48 -0
- package/dist/nodes/Instagram/handlers/UserHandler.js.map +1 -0
- package/dist/nodes/Instagram/instagram.svg +1 -0
- package/package.json +34 -47
- package/API_REFERENCE.md +0 -907
- package/AUTHENTICATION_GUIDE.md +0 -718
- package/CHANGELOG.md +0 -391
- package/dist/credentials/InstagramUnifiedLoginApi.credentials.d.ts +0 -9
- package/dist/credentials/InstagramUnifiedLoginApi.credentials.js +0 -481
- package/dist/credentials/InstagramUnifiedLoginApi.credentials.js.map +0 -1
- package/dist/nodes/Instagram/InstagramTrigger.node.d.ts +0 -17
- package/dist/nodes/Instagram/InstagramTrigger.node.js +0 -398
- package/dist/nodes/Instagram/InstagramTrigger.node.js.map +0 -1
- package/dist/nodes/Instagram/instagram-large.svg +0 -27
- package/dist/nodes/Instagram/instagram-small.svg +0 -14
- package/dist/nodes/Instagram/types.d.ts +0 -171
- package/dist/nodes/Instagram/types.js +0 -3
- package/dist/nodes/Instagram/types.js.map +0 -1
- package/dist/package.json +0 -76
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/index.js +0 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.messageOperations = void 0;
|
|
4
|
+
exports.messageOperations = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Operation',
|
|
7
|
+
name: 'operation',
|
|
8
|
+
type: 'options',
|
|
9
|
+
noDataExpression: true,
|
|
10
|
+
displayOptions: {
|
|
11
|
+
show: {
|
|
12
|
+
resource: ['message'],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
options: [
|
|
16
|
+
{
|
|
17
|
+
name: 'Get Conversations',
|
|
18
|
+
value: 'getConversations',
|
|
19
|
+
description: 'Get list of active direct message conversations',
|
|
20
|
+
action: 'Get DM conversations',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'Get Messages in Conversation',
|
|
24
|
+
value: 'getMessages',
|
|
25
|
+
description: 'Get messages from a specific conversation',
|
|
26
|
+
action: 'Get messages from conversation',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'Send Media Message',
|
|
30
|
+
value: 'sendMedia',
|
|
31
|
+
description: 'Send an image, video, or audio file as a direct message (DM)',
|
|
32
|
+
action: 'Send a media DM',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: 'Send Text Message',
|
|
36
|
+
value: 'sendText',
|
|
37
|
+
description: 'Send a text direct message (DM) to an Instagram user',
|
|
38
|
+
action: 'Send a text DM',
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
default: 'sendText',
|
|
42
|
+
},
|
|
43
|
+
];
|
|
44
|
+
//# sourceMappingURL=Message.operations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Message.operations.js","sourceRoot":"","sources":["../../../../../nodes/Instagram/descriptions/message/Message.operations.ts"],"names":[],"mappings":";;;AAEa,QAAA,iBAAiB,GAAsB;IAClD;QACE,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACd,IAAI,EAAE;gBACJ,QAAQ,EAAE,CAAC,SAAS,CAAC;aACtB;SACF;QACD,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,mBAAmB;gBACzB,KAAK,EAAE,kBAAkB;gBACzB,WAAW,EAAE,iDAAiD;gBAC9D,MAAM,EAAE,sBAAsB;aAC/B;YACD;gBACE,IAAI,EAAE,8BAA8B;gBACpC,KAAK,EAAE,aAAa;gBACpB,WAAW,EAAE,2CAA2C;gBACxD,MAAM,EAAE,gCAAgC;aACzC;YACD;gBACE,IAAI,EAAE,oBAAoB;gBAC1B,KAAK,EAAE,WAAW;gBAClB,WAAW,EAAE,8DAA8D;gBAC3E,MAAM,EAAE,iBAAiB;aAC1B;YACD;gBACE,IAAI,EAAE,mBAAmB;gBACzB,KAAK,EAAE,UAAU;gBACjB,WAAW,EAAE,sDAAsD;gBACnE,MAAM,EAAE,gBAAgB;aACzB;SACF;QACD,OAAO,EAAE,UAAU;KACpB;CACF,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.messageFields = exports.messageOperations = void 0;
|
|
4
|
+
var Message_operations_1 = require("./Message.operations");
|
|
5
|
+
Object.defineProperty(exports, "messageOperations", { enumerable: true, get: function () { return Message_operations_1.messageOperations; } });
|
|
6
|
+
var Message_fields_1 = require("./Message.fields");
|
|
7
|
+
Object.defineProperty(exports, "messageFields", { enumerable: true, get: function () { return Message_fields_1.messageFields; } });
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Instagram/descriptions/message/index.ts"],"names":[],"mappings":";;;AAAA,2DAAyD;AAAhD,uHAAA,iBAAiB,OAAA;AAC1B,mDAAiD;AAAxC,+GAAA,aAAa,OAAA"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.userOperations = void 0;
|
|
4
|
+
exports.userOperations = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Operation',
|
|
7
|
+
name: 'operation',
|
|
8
|
+
type: 'options',
|
|
9
|
+
noDataExpression: true,
|
|
10
|
+
displayOptions: {
|
|
11
|
+
show: {
|
|
12
|
+
resource: ['user'],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
options: [
|
|
16
|
+
{
|
|
17
|
+
name: 'Get Authenticated User Profile',
|
|
18
|
+
value: 'getMe',
|
|
19
|
+
description: 'Get profile information for the authenticated Instagram account',
|
|
20
|
+
action: 'Get authenticated user profile',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'Get User Insights',
|
|
24
|
+
value: 'getInsights',
|
|
25
|
+
description: 'Get metrics and insights for an Instagram account',
|
|
26
|
+
action: 'Get user insights',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'Get User Profile',
|
|
30
|
+
value: 'get',
|
|
31
|
+
description: 'Get profile information of a specific Instagram account by User ID',
|
|
32
|
+
action: 'Get a user profile',
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
default: 'getMe',
|
|
36
|
+
},
|
|
37
|
+
];
|
|
38
|
+
//# sourceMappingURL=User.operations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"User.operations.js","sourceRoot":"","sources":["../../../../../nodes/Instagram/descriptions/user/User.operations.ts"],"names":[],"mappings":";;;AAEa,QAAA,cAAc,GAAsB;IAC/C;QACE,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACd,IAAI,EAAE;gBACJ,QAAQ,EAAE,CAAC,MAAM,CAAC;aACnB;SACF;QACD,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,gCAAgC;gBACtC,KAAK,EAAE,OAAO;gBACd,WAAW,EAAE,iEAAiE;gBAC9E,MAAM,EAAE,gCAAgC;aACzC;YACD;gBACE,IAAI,EAAE,mBAAmB;gBACzB,KAAK,EAAE,aAAa;gBACpB,WAAW,EAAE,mDAAmD;gBAChE,MAAM,EAAE,mBAAmB;aAC5B;YACD;gBACE,IAAI,EAAE,kBAAkB;gBACxB,KAAK,EAAE,KAAK;gBACZ,WAAW,EAAE,oEAAoE;gBACjF,MAAM,EAAE,oBAAoB;aAC7B;SACF;QACD,OAAO,EAAE,OAAO;KACjB;CACF,CAAC"}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.userInsightsFields = void 0;
|
|
4
|
+
exports.userInsightsFields = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'User ID',
|
|
7
|
+
name: 'userId',
|
|
8
|
+
type: 'string',
|
|
9
|
+
default: 'me',
|
|
10
|
+
displayOptions: {
|
|
11
|
+
show: {
|
|
12
|
+
resource: ['user'],
|
|
13
|
+
operation: ['getInsights'],
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
description: 'The Instagram User ID (or "me" for authenticated user)',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
displayName: 'Metrics to Retrieve',
|
|
20
|
+
name: 'metricsMode',
|
|
21
|
+
type: 'options',
|
|
22
|
+
options: [
|
|
23
|
+
{
|
|
24
|
+
name: 'All Standard Metrics (Select All)',
|
|
25
|
+
value: 'all',
|
|
26
|
+
description: 'Retrieve all standard account performance metrics',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'Selected Metrics',
|
|
30
|
+
value: 'selected',
|
|
31
|
+
description: 'Choose specific metrics to retrieve',
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
default: 'all',
|
|
35
|
+
displayOptions: {
|
|
36
|
+
show: {
|
|
37
|
+
resource: ['user'],
|
|
38
|
+
operation: ['getInsights'],
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
description: 'Whether to retrieve all standard metrics or pick specific metrics',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
displayName: 'Metrics',
|
|
45
|
+
name: 'metrics',
|
|
46
|
+
type: 'multiOptions',
|
|
47
|
+
required: true,
|
|
48
|
+
options: [
|
|
49
|
+
{ name: 'Accounts Engaged', value: 'accounts_engaged' },
|
|
50
|
+
{ name: 'Comments', value: 'comments' },
|
|
51
|
+
{ name: 'Content Views', value: 'content_views' },
|
|
52
|
+
{ name: 'Engaged Audience Demographics', value: 'engaged_audience_demographics' },
|
|
53
|
+
{ name: 'Follower Count', value: 'follower_count' },
|
|
54
|
+
{ name: 'Follower Demographics', value: 'follower_demographics' },
|
|
55
|
+
{ name: 'Follows and Unfollows', value: 'follows_and_unfollows' },
|
|
56
|
+
{ name: 'Likes', value: 'likes' },
|
|
57
|
+
{ name: 'Online Followers', value: 'online_followers' },
|
|
58
|
+
{ name: 'Profile Links Taps', value: 'profile_links_taps' },
|
|
59
|
+
{ name: 'Profile Views', value: 'profile_views' },
|
|
60
|
+
{ name: 'Quotes', value: 'quotes' },
|
|
61
|
+
{ name: 'Reach', value: 'reach' },
|
|
62
|
+
{ name: 'Reached Audience Demographics', value: 'reached_audience_demographics' },
|
|
63
|
+
{ name: 'Replies', value: 'replies' },
|
|
64
|
+
{ name: 'Reposts', value: 'reposts' },
|
|
65
|
+
{ name: 'Saves', value: 'saves' },
|
|
66
|
+
{ name: 'Shares', value: 'shares' },
|
|
67
|
+
{ name: 'Threads Clicks', value: 'threads_clicks' },
|
|
68
|
+
{ name: 'Threads Follower Demographics', value: 'threads_follower_demographics' },
|
|
69
|
+
{ name: 'Threads Followers', value: 'threads_followers' },
|
|
70
|
+
{ name: 'Threads Likes', value: 'threads_likes' },
|
|
71
|
+
{ name: 'Threads Replies', value: 'threads_replies' },
|
|
72
|
+
{ name: 'Threads Reposts', value: 'threads_reposts' },
|
|
73
|
+
{ name: 'Threads Views', value: 'threads_views' },
|
|
74
|
+
{ name: 'Total Interactions', value: 'total_interactions' },
|
|
75
|
+
{ name: 'Views', value: 'views' },
|
|
76
|
+
{ name: 'Website Clicks', value: 'website_clicks' },
|
|
77
|
+
],
|
|
78
|
+
default: [
|
|
79
|
+
'reach',
|
|
80
|
+
'views',
|
|
81
|
+
'accounts_engaged',
|
|
82
|
+
'total_interactions',
|
|
83
|
+
'likes',
|
|
84
|
+
'comments',
|
|
85
|
+
'shares',
|
|
86
|
+
'saves',
|
|
87
|
+
'replies',
|
|
88
|
+
'profile_views',
|
|
89
|
+
'website_clicks',
|
|
90
|
+
'content_views',
|
|
91
|
+
],
|
|
92
|
+
displayOptions: {
|
|
93
|
+
show: {
|
|
94
|
+
resource: ['user'],
|
|
95
|
+
operation: ['getInsights'],
|
|
96
|
+
metricsMode: ['selected'],
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
description: 'Metrics to query from Instagram Insights',
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
displayName: 'Period',
|
|
103
|
+
name: 'period',
|
|
104
|
+
type: 'options',
|
|
105
|
+
options: [
|
|
106
|
+
{ name: 'Day', value: 'day' },
|
|
107
|
+
{ name: 'Days 28', value: 'days_28' },
|
|
108
|
+
{ name: 'Lifetime', value: 'lifetime' },
|
|
109
|
+
{ name: 'Month', value: 'month' },
|
|
110
|
+
{ name: 'Total Over Range', value: 'total_over_range' },
|
|
111
|
+
{ name: 'Week', value: 'week' },
|
|
112
|
+
],
|
|
113
|
+
default: 'day',
|
|
114
|
+
displayOptions: {
|
|
115
|
+
show: {
|
|
116
|
+
resource: ['user'],
|
|
117
|
+
operation: ['getInsights'],
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
description: 'Aggregation period for the metric',
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
displayName: 'Additional Options',
|
|
124
|
+
name: 'additionalFields',
|
|
125
|
+
type: 'collection',
|
|
126
|
+
placeholder: 'Add Option',
|
|
127
|
+
default: {},
|
|
128
|
+
displayOptions: {
|
|
129
|
+
show: {
|
|
130
|
+
resource: ['user'],
|
|
131
|
+
operation: ['getInsights'],
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
options: [
|
|
135
|
+
{
|
|
136
|
+
displayName: 'Since (Unix Timestamp)',
|
|
137
|
+
name: 'since',
|
|
138
|
+
type: 'number',
|
|
139
|
+
default: 0,
|
|
140
|
+
description: 'Lower bound for the range of dates to return data for',
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
displayName: 'Until (Unix Timestamp)',
|
|
144
|
+
name: 'until',
|
|
145
|
+
type: 'number',
|
|
146
|
+
default: 0,
|
|
147
|
+
description: 'Upper bound for the range of dates to return data for',
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
displayName: 'Metric Type',
|
|
151
|
+
name: 'metric_type',
|
|
152
|
+
type: 'options',
|
|
153
|
+
options: [
|
|
154
|
+
{ name: 'Default', value: 'default' },
|
|
155
|
+
{ name: 'Time Series', value: 'time_series' },
|
|
156
|
+
{ name: 'Total Value', value: 'total_value' },
|
|
157
|
+
],
|
|
158
|
+
default: 'default',
|
|
159
|
+
description: 'Format of the metric values',
|
|
160
|
+
},
|
|
161
|
+
],
|
|
162
|
+
},
|
|
163
|
+
];
|
|
164
|
+
//# sourceMappingURL=UserInsights.fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserInsights.fields.js","sourceRoot":"","sources":["../../../../../nodes/Instagram/descriptions/user/UserInsights.fields.ts"],"names":[],"mappings":";;;AAEa,QAAA,kBAAkB,GAAsB;IACnD;QACE,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,IAAI;QACb,cAAc,EAAE;YACd,IAAI,EAAE;gBACJ,QAAQ,EAAE,CAAC,MAAM,CAAC;gBAClB,SAAS,EAAE,CAAC,aAAa,CAAC;aAC3B;SACF;QACD,WAAW,EAAE,wDAAwD;KACtE;IACD;QACE,WAAW,EAAE,qBAAqB;QAClC,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,SAAS;QACf,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,mCAAmC;gBACzC,KAAK,EAAE,KAAK;gBACZ,WAAW,EAAE,mDAAmD;aACjE;YACD;gBACE,IAAI,EAAE,kBAAkB;gBACxB,KAAK,EAAE,UAAU;gBACjB,WAAW,EAAE,qCAAqC;aACnD;SACF;QACD,OAAO,EAAE,KAAK;Q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AAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;oBACrC,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE;oBAC7C,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE;iBAC9C;gBACD,OAAO,EAAE,SAAS;gBAClB,WAAW,EAAE,6BAA6B;aAC3C;SACF;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.userProfileFields = void 0;
|
|
4
|
+
exports.userProfileFields = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'User ID',
|
|
7
|
+
name: 'userId',
|
|
8
|
+
type: 'string',
|
|
9
|
+
required: true,
|
|
10
|
+
default: '',
|
|
11
|
+
displayOptions: {
|
|
12
|
+
show: {
|
|
13
|
+
resource: ['user'],
|
|
14
|
+
operation: ['get'],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
description: 'The Instagram User ID to retrieve profile details for',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
displayName: 'Fields to Retrieve',
|
|
21
|
+
name: 'fieldsMode',
|
|
22
|
+
type: 'options',
|
|
23
|
+
options: [
|
|
24
|
+
{
|
|
25
|
+
name: 'All Fields (Recommended)',
|
|
26
|
+
value: 'all',
|
|
27
|
+
description: 'Retrieve all available profile fields',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: 'Selected Fields',
|
|
31
|
+
value: 'selected',
|
|
32
|
+
description: 'Choose specific fields to retrieve',
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
default: 'all',
|
|
36
|
+
displayOptions: {
|
|
37
|
+
show: {
|
|
38
|
+
resource: ['user'],
|
|
39
|
+
operation: ['get', 'getMe'],
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
description: 'Whether to retrieve all available fields or pick specific fields',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
displayName: 'Fields',
|
|
46
|
+
name: 'fields',
|
|
47
|
+
type: 'multiOptions',
|
|
48
|
+
options: [
|
|
49
|
+
{ name: 'Account Type', value: 'account_type' },
|
|
50
|
+
{ name: 'Biography', value: 'biography' },
|
|
51
|
+
{ name: 'Followers Count', value: 'followers_count' },
|
|
52
|
+
{ name: 'Follows Count', value: 'follows_count' },
|
|
53
|
+
{ name: 'ID', value: 'id' },
|
|
54
|
+
{ name: 'Media Count', value: 'media_count' },
|
|
55
|
+
{ name: 'Name', value: 'name' },
|
|
56
|
+
{ name: 'Profile Picture URL', value: 'profile_picture_url' },
|
|
57
|
+
{ name: 'User ID', value: 'user_id' },
|
|
58
|
+
{ name: 'Username', value: 'username' },
|
|
59
|
+
{ name: 'Website', value: 'website' },
|
|
60
|
+
],
|
|
61
|
+
default: [
|
|
62
|
+
'id',
|
|
63
|
+
'user_id',
|
|
64
|
+
'username',
|
|
65
|
+
'name',
|
|
66
|
+
'account_type',
|
|
67
|
+
'profile_picture_url',
|
|
68
|
+
'followers_count',
|
|
69
|
+
'media_count',
|
|
70
|
+
'biography',
|
|
71
|
+
'website',
|
|
72
|
+
],
|
|
73
|
+
displayOptions: {
|
|
74
|
+
show: {
|
|
75
|
+
resource: ['user'],
|
|
76
|
+
operation: ['get', 'getMe'],
|
|
77
|
+
fieldsMode: ['selected'],
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
description: 'Specific fields to return in the response',
|
|
81
|
+
},
|
|
82
|
+
];
|
|
83
|
+
//# sourceMappingURL=UserProfile.fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserProfile.fields.js","sourceRoot":"","sources":["../../../../../nodes/Instagram/descriptions/user/UserProfile.fields.ts"],"names":[],"mappings":";;;AAEa,QAAA,iBAAiB,GAAsB;IAClD;QACE,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,QAAQ;QACd,Q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AE,qBAAqB,EAAE;YAC7D,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;YACrC,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;YACvC,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;SACtC;QACD,OAAO,EAAE;YACP,IAAI;YACJ,SAAS;YACT,UAAU;YACV,MAAM;YACN,cAAc;YACd,qBAAqB;YACrB,iBAAiB;YACjB,aAAa;YACb,WAAW;YACX,SAAS;SACV;QACD,cAAc,EAAE;YACd,IAAI,EAAE;gBACJ,QAAQ,EAAE,CAAC,MAAM,CAAC;gBAClB,SAAS,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC;gBAC3B,UAAU,EAAE,CAAC,UAAU,CAAC;aACzB;SACF;QACD,WAAW,EAAE,2CAA2C;KACzD;CACF,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.userOperations = exports.userFields = void 0;
|
|
4
|
+
const User_operations_1 = require("./User.operations");
|
|
5
|
+
Object.defineProperty(exports, "userOperations", { enumerable: true, get: function () { return User_operations_1.userOperations; } });
|
|
6
|
+
const UserProfile_fields_1 = require("./UserProfile.fields");
|
|
7
|
+
const UserInsights_fields_1 = require("./UserInsights.fields");
|
|
8
|
+
exports.userFields = [
|
|
9
|
+
...UserProfile_fields_1.userProfileFields,
|
|
10
|
+
...UserInsights_fields_1.userInsightsFields,
|
|
11
|
+
];
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/Instagram/descriptions/user/index.ts"],"names":[],"mappings":";;;AACA,uDAAmD;AAS1C,+FATA,gCAAc,OASA;AARvB,6DAAyD;AACzD,+DAA2D;AAE9C,QAAA,UAAU,GAAsB;IAC3C,GAAG,sCAAiB;IACpB,GAAG,wCAAkB;CACtB,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.handleComment = handleComment;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const GenericFunctions_1 = require("../GenericFunctions");
|
|
6
|
+
const ALL_COMMENT_FIELDS = 'id,text,timestamp,like_count,hidden,replies_count,username,from{id,username}';
|
|
7
|
+
async function handleGetComment(i) {
|
|
8
|
+
const commentId = this.getNodeParameter('commentId', i);
|
|
9
|
+
const fields = GenericFunctions_1.resolveParameterList.call(this, i, ALL_COMMENT_FIELDS);
|
|
10
|
+
return await GenericFunctions_1.instagramApiRequest.call(this, 'GET', `/${commentId}`, {}, { fields });
|
|
11
|
+
}
|
|
12
|
+
async function handleGetAllComments(i) {
|
|
13
|
+
const mediaId = this.getNodeParameter('mediaId', i);
|
|
14
|
+
const returnAll = this.getNodeParameter('returnAll', i, false);
|
|
15
|
+
const limit = returnAll ? undefined : this.getNodeParameter('limit', i, 50);
|
|
16
|
+
const fields = GenericFunctions_1.resolveParameterList.call(this, i, ALL_COMMENT_FIELDS);
|
|
17
|
+
return await GenericFunctions_1.instagramApiRequestAllItems.call(this, 'data', 'GET', `/${mediaId}/comments`, {}, { fields }, limit);
|
|
18
|
+
}
|
|
19
|
+
async function handleGetCommentReplies(i) {
|
|
20
|
+
const commentId = this.getNodeParameter('commentId', i);
|
|
21
|
+
const returnAll = this.getNodeParameter('returnAll', i, false);
|
|
22
|
+
const limit = returnAll ? undefined : this.getNodeParameter('limit', i, 50);
|
|
23
|
+
const fields = GenericFunctions_1.resolveParameterList.call(this, i, ALL_COMMENT_FIELDS);
|
|
24
|
+
return await GenericFunctions_1.instagramApiRequestAllItems.call(this, 'data', 'GET', `/${commentId}/replies`, {}, { fields }, limit);
|
|
25
|
+
}
|
|
26
|
+
async function handleCreateComment(i) {
|
|
27
|
+
const mediaId = this.getNodeParameter('mediaId', i);
|
|
28
|
+
const message = this.getNodeParameter('message', i);
|
|
29
|
+
return await GenericFunctions_1.instagramApiRequest.call(this, 'POST', `/${mediaId}/comments`, { message });
|
|
30
|
+
}
|
|
31
|
+
async function handleReplyComment(i) {
|
|
32
|
+
const commentId = this.getNodeParameter('commentId', i);
|
|
33
|
+
const message = this.getNodeParameter('message', i);
|
|
34
|
+
return await GenericFunctions_1.instagramApiRequest.call(this, 'POST', `/${commentId}/replies`, { message });
|
|
35
|
+
}
|
|
36
|
+
async function handleDeleteComment(i) {
|
|
37
|
+
const commentId = this.getNodeParameter('commentId', i);
|
|
38
|
+
return await GenericFunctions_1.instagramApiRequest.call(this, 'DELETE', `/${commentId}`);
|
|
39
|
+
}
|
|
40
|
+
async function handleHideComment(i) {
|
|
41
|
+
const commentId = this.getNodeParameter('commentId', i);
|
|
42
|
+
const hide = this.getNodeParameter('hide', i, true);
|
|
43
|
+
return await GenericFunctions_1.instagramApiRequest.call(this, 'POST', `/${commentId}`, { hide });
|
|
44
|
+
}
|
|
45
|
+
const commentOperationHandlers = {
|
|
46
|
+
get: handleGetComment,
|
|
47
|
+
getAll: handleGetAllComments,
|
|
48
|
+
getReplies: handleGetCommentReplies,
|
|
49
|
+
create: handleCreateComment,
|
|
50
|
+
reply: handleReplyComment,
|
|
51
|
+
delete: handleDeleteComment,
|
|
52
|
+
hide: handleHideComment,
|
|
53
|
+
};
|
|
54
|
+
async function handleComment(operation, i) {
|
|
55
|
+
const handler = commentOperationHandlers[operation];
|
|
56
|
+
if (!handler) {
|
|
57
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unsupported Comment operation: ${operation}`, {
|
|
58
|
+
itemIndex: i,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
return await handler.call(this, i);
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=CommentHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"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|
|
3
|
+
exports.handleCustom = handleCustom;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const GenericFunctions_1 = require("../GenericFunctions");
|
|
6
|
+
function parseJsonParameter(input, errorMessage, nodeContext, itemIndex) {
|
|
7
|
+
if (typeof input === 'object' && input !== null) {
|
|
8
|
+
return input;
|
|
9
|
+
}
|
|
10
|
+
try {
|
|
11
|
+
return JSON.parse(input || '{}');
|
|
12
|
+
}
|
|
13
|
+
catch {
|
|
14
|
+
throw new n8n_workflow_1.NodeOperationError(nodeContext, errorMessage, { itemIndex });
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
async function handleCustom(_operation, i) {
|
|
18
|
+
const httpMethod = this.getNodeParameter('httpMethod', i);
|
|
19
|
+
const endpointPath = this.getNodeParameter('endpointPath', i);
|
|
20
|
+
const queryParamsJson = this.getNodeParameter('queryParamsJson', i, '{}');
|
|
21
|
+
const bodyParamsJson = this.getNodeParameter('bodyParamsJson', i, '{}');
|
|
22
|
+
const qs = parseJsonParameter(queryParamsJson, 'Query Parameters must be a valid JSON object', this.getNode(), i);
|
|
23
|
+
const body = parseJsonParameter(bodyParamsJson, 'Body Parameters must be a valid JSON object', this.getNode(), i);
|
|
24
|
+
return await GenericFunctions_1.instagramApiRequest.call(this, httpMethod, endpointPath, body, qs,
|
|
25
|
+
// Send the path exactly as typed (e.g. /me/assigned_instagram_accounts with Unified Login)
|
|
26
|
+
{ rawEndpoint: true });
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=CustomHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomHandler.js","sourceRoot":"","sources":["../../../../nodes/Instagram/handlers/CustomHandler.ts"],"names":[],"mappings":";;AAwBA,oCAgCC;AAxDD,+CAKsB;AACtB,0DAA0D;AAE1D,SAAS,kBAAkB,CACzB,KAA2B,EAC3B,YAAoB,EACpB,WAAgB,EAChB,SAAiB;IAEjB,IAAI,OAAO,KA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
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const GenericFunctions_1 = require("../GenericFunctions");
|
|
6
|
+
const ALL_ACCOUNT_METRICS = 'reach,views,accounts_engaged,total_interactions,likes,comments,shares,saves,replies,profile_views,website_clicks,content_views';
|
|
7
|
+
const ALL_MEDIA_METRICS = 'reach,views,saved,shares,likes,comments,total_interactions,plays,profile_visits,profile_activity,follows';
|
|
8
|
+
async function handleGetAccountInsights(i) {
|
|
9
|
+
const rawUserId = this.getNodeParameter('userId', i, 'me');
|
|
10
|
+
const resolvedUserId = await GenericFunctions_1.getResolvedUserId.call(this, rawUserId);
|
|
11
|
+
const metric = GenericFunctions_1.resolveParameterList.call(this, i, ALL_ACCOUNT_METRICS, 'metrics', 'metricsMode');
|
|
12
|
+
const period = this.getNodeParameter('period', i, 'day');
|
|
13
|
+
const additionalFields = this.getNodeParameter('additionalFields', i, {});
|
|
14
|
+
const qs = { metric, period };
|
|
15
|
+
if (additionalFields.since)
|
|
16
|
+
qs.since = additionalFields.since;
|
|
17
|
+
if (additionalFields.until)
|
|
18
|
+
qs.until = additionalFields.until;
|
|
19
|
+
if (additionalFields.metric_type && additionalFields.metric_type !== 'default') {
|
|
20
|
+
qs.metric_type = additionalFields.metric_type;
|
|
21
|
+
}
|
|
22
|
+
return await GenericFunctions_1.instagramApiRequest.call(this, 'GET', `/${resolvedUserId}/insights`, {}, qs);
|
|
23
|
+
}
|
|
24
|
+
async function handleGetMediaInsights(i) {
|
|
25
|
+
const mediaId = this.getNodeParameter('mediaId', i);
|
|
26
|
+
const metric = GenericFunctions_1.resolveParameterList.call(this, i, ALL_MEDIA_METRICS, 'mediaMetrics', 'mediaMetricsMode');
|
|
27
|
+
return await GenericFunctions_1.instagramApiRequest.call(this, 'GET', `/${mediaId}/insights`, {}, { metric });
|
|
28
|
+
}
|
|
29
|
+
const insightOperationHandlers = {
|
|
30
|
+
getAccountInsights: handleGetAccountInsights,
|
|
31
|
+
getMediaInsights: handleGetMediaInsights,
|
|
32
|
+
};
|
|
33
|
+
async function handleInsight(operation, i) {
|
|
34
|
+
const handler = insightOperationHandlers[operation];
|
|
35
|
+
if (!handler) {
|
|
36
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unsupported Insight operation: ${operation}`, {
|
|
37
|
+
itemIndex: i,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
return await handler.call(this, i);
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=InsightHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InsightHandler.js","sourceRoot":"","sources":["../../../../nodes/Instagram/handlers/InsightHandler.ts"],"names":[],"mappings":";;AAyDA,sCAYC;AArED,+CAAkF;AAClF,0DAI6B;AAE7B,MAAM,mBAAmB,GACvB,gIAAgI,CAAC;AAEnI,MAAM,iBAAiB,GACrB,0GAA0G,CAAC;AAE7G,KAAK,UAAU,wBAAwB,CAA0B,CAAS;IACxE,MAAM,SAAS,GAAG,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC,EAAE,IAAI,CAAW,CAAC;IACrE,MAAM,cAAc,GAAG,MAAM,oCAAiB,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACrE,MAAM,MAAM,GAAG,uCAAoB,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,mBAAmB,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;IACjG,MAAM,MAAM,GAAG,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC,EAAE,KAAK,CAAW,CAAC;IACnE,MAAM,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,CAAC,EAAE,EAAE,CAAgB,CAAC;IAEzF,MAAM,EAAE,GAAgB,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAC3C,IAAI,gBAAgB,CAAC,KAAK;QAAE,EAAE,CAAC,KAAK,GAAG,gBAAgB,CAAC,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