@dracoonghost/trndup-sdk 1.3.22 → 1.3.24
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/dist/index.d.mts +51 -5
- package/dist/index.d.ts +51 -5
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -674,13 +674,28 @@ declare namespace Instagram {
|
|
|
674
674
|
}
|
|
675
675
|
/**
|
|
676
676
|
* Response from POST /v1/platforms/instagram/analytics/posts/sync
|
|
677
|
+
* Post insights are queued for background processing via BullMQ
|
|
677
678
|
*/
|
|
678
679
|
interface PostInsightsSyncResponse {
|
|
680
|
+
message: string;
|
|
679
681
|
totalPosts: number;
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
682
|
+
jobsQueued: number;
|
|
683
|
+
status: SyncStatus;
|
|
684
|
+
queuedAt: string;
|
|
685
|
+
}
|
|
686
|
+
/**
|
|
687
|
+
* Response when sync is already in progress
|
|
688
|
+
*/
|
|
689
|
+
interface PostInsightsInProgressResponse {
|
|
690
|
+
message: string;
|
|
691
|
+
status: 'in_progress';
|
|
692
|
+
progress: {
|
|
693
|
+
waiting: number;
|
|
694
|
+
active: number;
|
|
695
|
+
completed: number;
|
|
696
|
+
failed: number;
|
|
697
|
+
delayed: number;
|
|
698
|
+
};
|
|
684
699
|
}
|
|
685
700
|
/**
|
|
686
701
|
* Response from GET /v1/platforms/instagram/analytics/posts/sync/status
|
|
@@ -688,15 +703,39 @@ declare namespace Instagram {
|
|
|
688
703
|
interface PostInsightsSyncStatusResponse {
|
|
689
704
|
needsSync: boolean;
|
|
690
705
|
status: SyncStatus;
|
|
706
|
+
/** Progress tracking - primary fields for UI */
|
|
707
|
+
progress: {
|
|
708
|
+
/** Number of posts that have been processed (attempted insights sync) */
|
|
709
|
+
completed: number;
|
|
710
|
+
/** Total number of posts */
|
|
711
|
+
total: number;
|
|
712
|
+
/** Posts remaining to be processed */
|
|
713
|
+
remaining: number;
|
|
714
|
+
/** Percentage complete (0-100) */
|
|
715
|
+
percent: number;
|
|
716
|
+
};
|
|
717
|
+
/** Total number of posts */
|
|
691
718
|
totalPosts: number;
|
|
719
|
+
/** Posts that have been processed (may or may not have insights) */
|
|
720
|
+
postsProcessed: number;
|
|
721
|
+
/** Posts that actually have insights data */
|
|
692
722
|
postsWithInsights: number;
|
|
723
|
+
/** Percentage of posts with insights (0-100) */
|
|
693
724
|
coverage: number;
|
|
694
725
|
lastSyncAt: string | null;
|
|
695
726
|
metadata?: {
|
|
727
|
+
postsProcessed?: number;
|
|
696
728
|
postsWithInsights?: number;
|
|
697
729
|
totalPosts?: number;
|
|
698
730
|
lastCheckedAt?: string;
|
|
699
731
|
} | null;
|
|
732
|
+
/** Queue processing info */
|
|
733
|
+
queue: {
|
|
734
|
+
isProcessing: boolean;
|
|
735
|
+
jobsActive: number;
|
|
736
|
+
jobsWaiting: number;
|
|
737
|
+
jobsFailed: number;
|
|
738
|
+
};
|
|
700
739
|
message: string;
|
|
701
740
|
}
|
|
702
741
|
interface SyncResponse {
|
|
@@ -1801,13 +1840,20 @@ declare class InstagramModule {
|
|
|
1801
1840
|
*/
|
|
1802
1841
|
getAccountAnalyticsSyncStatus(): Promise<Instagram.AccountAnalyticsSyncStatusResponse>;
|
|
1803
1842
|
/**
|
|
1804
|
-
*
|
|
1843
|
+
* Queue post-level insights sync for all posts (BullMQ-based)
|
|
1805
1844
|
* POST /v1/platforms/instagram/analytics/posts/sync
|
|
1845
|
+
*
|
|
1846
|
+
* Jobs are queued and processed in the background.
|
|
1847
|
+
* Poll getPostInsightsSyncStatus() to check progress.
|
|
1848
|
+
*
|
|
1849
|
+
* @returns Response with jobsQueued count and status
|
|
1806
1850
|
*/
|
|
1807
1851
|
syncPostInsights(): Promise<Instagram.PostInsightsSyncResponse>;
|
|
1808
1852
|
/**
|
|
1809
1853
|
* Get post insights sync status
|
|
1810
1854
|
* GET /v1/platforms/instagram/analytics/posts/sync/status
|
|
1855
|
+
*
|
|
1856
|
+
* Use to poll progress while sync is in_progress
|
|
1811
1857
|
*/
|
|
1812
1858
|
getPostInsightsSyncStatus(): Promise<Instagram.PostInsightsSyncStatusResponse>;
|
|
1813
1859
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -674,13 +674,28 @@ declare namespace Instagram {
|
|
|
674
674
|
}
|
|
675
675
|
/**
|
|
676
676
|
* Response from POST /v1/platforms/instagram/analytics/posts/sync
|
|
677
|
+
* Post insights are queued for background processing via BullMQ
|
|
677
678
|
*/
|
|
678
679
|
interface PostInsightsSyncResponse {
|
|
680
|
+
message: string;
|
|
679
681
|
totalPosts: number;
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
682
|
+
jobsQueued: number;
|
|
683
|
+
status: SyncStatus;
|
|
684
|
+
queuedAt: string;
|
|
685
|
+
}
|
|
686
|
+
/**
|
|
687
|
+
* Response when sync is already in progress
|
|
688
|
+
*/
|
|
689
|
+
interface PostInsightsInProgressResponse {
|
|
690
|
+
message: string;
|
|
691
|
+
status: 'in_progress';
|
|
692
|
+
progress: {
|
|
693
|
+
waiting: number;
|
|
694
|
+
active: number;
|
|
695
|
+
completed: number;
|
|
696
|
+
failed: number;
|
|
697
|
+
delayed: number;
|
|
698
|
+
};
|
|
684
699
|
}
|
|
685
700
|
/**
|
|
686
701
|
* Response from GET /v1/platforms/instagram/analytics/posts/sync/status
|
|
@@ -688,15 +703,39 @@ declare namespace Instagram {
|
|
|
688
703
|
interface PostInsightsSyncStatusResponse {
|
|
689
704
|
needsSync: boolean;
|
|
690
705
|
status: SyncStatus;
|
|
706
|
+
/** Progress tracking - primary fields for UI */
|
|
707
|
+
progress: {
|
|
708
|
+
/** Number of posts that have been processed (attempted insights sync) */
|
|
709
|
+
completed: number;
|
|
710
|
+
/** Total number of posts */
|
|
711
|
+
total: number;
|
|
712
|
+
/** Posts remaining to be processed */
|
|
713
|
+
remaining: number;
|
|
714
|
+
/** Percentage complete (0-100) */
|
|
715
|
+
percent: number;
|
|
716
|
+
};
|
|
717
|
+
/** Total number of posts */
|
|
691
718
|
totalPosts: number;
|
|
719
|
+
/** Posts that have been processed (may or may not have insights) */
|
|
720
|
+
postsProcessed: number;
|
|
721
|
+
/** Posts that actually have insights data */
|
|
692
722
|
postsWithInsights: number;
|
|
723
|
+
/** Percentage of posts with insights (0-100) */
|
|
693
724
|
coverage: number;
|
|
694
725
|
lastSyncAt: string | null;
|
|
695
726
|
metadata?: {
|
|
727
|
+
postsProcessed?: number;
|
|
696
728
|
postsWithInsights?: number;
|
|
697
729
|
totalPosts?: number;
|
|
698
730
|
lastCheckedAt?: string;
|
|
699
731
|
} | null;
|
|
732
|
+
/** Queue processing info */
|
|
733
|
+
queue: {
|
|
734
|
+
isProcessing: boolean;
|
|
735
|
+
jobsActive: number;
|
|
736
|
+
jobsWaiting: number;
|
|
737
|
+
jobsFailed: number;
|
|
738
|
+
};
|
|
700
739
|
message: string;
|
|
701
740
|
}
|
|
702
741
|
interface SyncResponse {
|
|
@@ -1801,13 +1840,20 @@ declare class InstagramModule {
|
|
|
1801
1840
|
*/
|
|
1802
1841
|
getAccountAnalyticsSyncStatus(): Promise<Instagram.AccountAnalyticsSyncStatusResponse>;
|
|
1803
1842
|
/**
|
|
1804
|
-
*
|
|
1843
|
+
* Queue post-level insights sync for all posts (BullMQ-based)
|
|
1805
1844
|
* POST /v1/platforms/instagram/analytics/posts/sync
|
|
1845
|
+
*
|
|
1846
|
+
* Jobs are queued and processed in the background.
|
|
1847
|
+
* Poll getPostInsightsSyncStatus() to check progress.
|
|
1848
|
+
*
|
|
1849
|
+
* @returns Response with jobsQueued count and status
|
|
1806
1850
|
*/
|
|
1807
1851
|
syncPostInsights(): Promise<Instagram.PostInsightsSyncResponse>;
|
|
1808
1852
|
/**
|
|
1809
1853
|
* Get post insights sync status
|
|
1810
1854
|
* GET /v1/platforms/instagram/analytics/posts/sync/status
|
|
1855
|
+
*
|
|
1856
|
+
* Use to poll progress while sync is in_progress
|
|
1811
1857
|
*/
|
|
1812
1858
|
getPostInsightsSyncStatus(): Promise<Instagram.PostInsightsSyncStatusResponse>;
|
|
1813
1859
|
/**
|
package/dist/index.js
CHANGED
|
@@ -549,8 +549,13 @@ var InstagramModule = class {
|
|
|
549
549
|
}
|
|
550
550
|
// ===== POST INSIGHTS SYNC =====
|
|
551
551
|
/**
|
|
552
|
-
*
|
|
552
|
+
* Queue post-level insights sync for all posts (BullMQ-based)
|
|
553
553
|
* POST /v1/platforms/instagram/analytics/posts/sync
|
|
554
|
+
*
|
|
555
|
+
* Jobs are queued and processed in the background.
|
|
556
|
+
* Poll getPostInsightsSyncStatus() to check progress.
|
|
557
|
+
*
|
|
558
|
+
* @returns Response with jobsQueued count and status
|
|
554
559
|
*/
|
|
555
560
|
async syncPostInsights() {
|
|
556
561
|
return this.client.post(
|
|
@@ -560,6 +565,8 @@ var InstagramModule = class {
|
|
|
560
565
|
/**
|
|
561
566
|
* Get post insights sync status
|
|
562
567
|
* GET /v1/platforms/instagram/analytics/posts/sync/status
|
|
568
|
+
*
|
|
569
|
+
* Use to poll progress while sync is in_progress
|
|
563
570
|
*/
|
|
564
571
|
async getPostInsightsSyncStatus() {
|
|
565
572
|
return this.client.get(
|