@stack0/sdk 0.3.0 → 0.3.1
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/README.md +33 -10
- package/dist/cdn/index.d.mts +56 -26
- package/dist/cdn/index.d.ts +56 -26
- package/dist/cdn/index.js +84 -23
- package/dist/cdn/index.js.map +1 -1
- package/dist/cdn/index.mjs +84 -23
- package/dist/cdn/index.mjs.map +1 -1
- package/dist/extraction/index.d.mts +1 -1
- package/dist/extraction/index.d.ts +1 -1
- package/dist/extraction/index.js +33 -29
- package/dist/extraction/index.js.map +1 -1
- package/dist/extraction/index.mjs +33 -29
- package/dist/extraction/index.mjs.map +1 -1
- package/dist/{http-client-DjrRWvXA.d.mts → http-client-Cgie_Rv6.d.mts} +1 -0
- package/dist/{http-client-DjrRWvXA.d.ts → http-client-Cgie_Rv6.d.ts} +1 -0
- package/dist/index.d.mts +475 -3
- package/dist/index.d.ts +475 -3
- package/dist/index.js +512 -72
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +512 -73
- package/dist/index.mjs.map +1 -1
- package/dist/mail/index.d.mts +1 -1
- package/dist/mail/index.d.ts +1 -1
- package/dist/mail/index.js +13 -5
- package/dist/mail/index.js.map +1 -1
- package/dist/mail/index.mjs +13 -5
- package/dist/mail/index.mjs.map +1 -1
- package/dist/screenshots/index.d.mts +1 -1
- package/dist/screenshots/index.d.ts +1 -1
- package/dist/screenshots/index.js +32 -26
- package/dist/screenshots/index.js.map +1 -1
- package/dist/screenshots/index.mjs +32 -26
- package/dist/screenshots/index.mjs.map +1 -1
- package/dist/webdata/index.d.mts +1 -1
- package/dist/webdata/index.d.ts +1 -1
- package/dist/webdata/index.js +37 -8
- package/dist/webdata/index.js.map +1 -1
- package/dist/webdata/index.mjs +37 -8
- package/dist/webdata/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Mail } from './mail/index.js';
|
|
2
2
|
export { Attachment, EmailAddress, EmailRecipient, GetEmailResponse, SendEmailRequest, SendEmailResponse, Stack0Error } from './mail/index.js';
|
|
3
3
|
import { CDN } from './cdn/index.js';
|
|
4
|
-
export { Asset, AssetStatus, AssetType, ConfirmUploadRequest, ConfirmUploadResponse, CreateFolderRequest, DeleteAssetRequest, DeleteAssetsRequest, DeleteAssetsResponse, ExtractAudioRequest, ExtractAudioResponse, Folder, FolderTreeNode, GetAssetRequest, GetFolderTreeRequest,
|
|
4
|
+
export { Asset, AssetStatus, AssetType, ConfirmUploadRequest, ConfirmUploadResponse, CreateFolderRequest, DeleteAssetRequest, DeleteAssetsRequest, DeleteAssetsResponse, ExtractAudioRequest, ExtractAudioResponse, Folder, FolderTreeNode, GetAssetRequest, GetFolderTreeRequest, ListAssetsRequest, ListAssetsResponse, ListJobsRequest, ListJobsResponse, MoveAssetsRequest, MoveAssetsResponse, StreamingUrls, ThumbnailRequest, ThumbnailResponse, TranscodeJob, TranscodeVideoRequest, TranscodingStatus, TransformOptions, TrimOptions, UpdateAssetRequest, UploadUrlRequest, UploadUrlResponse, VideoCodec, VideoOutputFormat, VideoQuality, VideoVariant, WatermarkOptions } from './cdn/index.js';
|
|
5
5
|
import { Screenshots } from './screenshots/index.js';
|
|
6
6
|
export { BatchScreenshotJob, Clip, CreateBatchScreenshotsRequest, CreateScreenshotRequest, CreateScreenshotResponse, CreateScreenshotScheduleRequest, DeviceType, GetScreenshotRequest, ListScreenshotsRequest, ListScreenshotsResponse, ResourceType, Screenshot, ScreenshotBatchJobsResponse, ScreenshotFormat, ScreenshotSchedule, ScreenshotSchedulesResponse, ScreenshotStatus, UpdateScreenshotScheduleRequest } from './screenshots/index.js';
|
|
7
7
|
import { Extraction } from './extraction/index.js';
|
|
8
8
|
export { BatchExtractionJob, CreateBatchExtractionsRequest, CreateExtractionRequest, CreateExtractionResponse, CreateExtractionScheduleRequest, ExtractionBatchJobsResponse, ExtractionMode, ExtractionResult, ExtractionSchedule, ExtractionSchedulesResponse, ExtractionStatus, ExtractionUsage, GetExtractionRequest, GetUsageRequest, ListExtractionsRequest, ListExtractionsResponse, PageMetadata, UpdateExtractionScheduleRequest } from './extraction/index.js';
|
|
9
9
|
import { Webdata } from './webdata/index.js';
|
|
10
|
-
import { H as HttpClient, a as HttpClientConfig } from './http-client-
|
|
10
|
+
import { H as HttpClient, a as HttpClientConfig } from './http-client-Cgie_Rv6.js';
|
|
11
11
|
export { B as BatchJobStatus, C as CreateBatchResponse, c as CreateScheduleResponse, E as Environment, G as GetBatchJobRequest, a as GetScheduleRequest, L as ListBatchJobsRequest, b as ListSchedulesRequest, S as ScheduleFrequency } from './shared-types-B0PyC7cF.js';
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -531,6 +531,466 @@ declare class Integrations {
|
|
|
531
531
|
passthrough(request: PassthroughRequest): Promise<unknown>;
|
|
532
532
|
}
|
|
533
533
|
|
|
534
|
+
/**
|
|
535
|
+
* Marketing SDK Types
|
|
536
|
+
*/
|
|
537
|
+
type MarketingEnvironment = "sandbox" | "production";
|
|
538
|
+
type ContentStatus = "draft" | "pending_review" | "approved" | "rejected" | "publishing" | "published" | "failed" | "archived";
|
|
539
|
+
type TrendStatus = "discovered" | "analyzing" | "active" | "declining" | "expired";
|
|
540
|
+
type ContentType = "tiktok_slideshow" | "instagram_reel" | "youtube_short" | "blog_post" | "twitter_thread";
|
|
541
|
+
type ApprovalStatus = "pending" | "approved" | "rejected";
|
|
542
|
+
interface Trend {
|
|
543
|
+
id: string;
|
|
544
|
+
organizationId: string;
|
|
545
|
+
projectId: string;
|
|
546
|
+
environment: MarketingEnvironment;
|
|
547
|
+
keyword: string;
|
|
548
|
+
source: string;
|
|
549
|
+
category?: string | null;
|
|
550
|
+
searchVolume?: number | null;
|
|
551
|
+
growthRate?: number | null;
|
|
552
|
+
trendScore: number;
|
|
553
|
+
status: TrendStatus;
|
|
554
|
+
sourceData?: Record<string, unknown> | null;
|
|
555
|
+
firstSeenAt: Date;
|
|
556
|
+
lastUpdatedAt: Date;
|
|
557
|
+
expiresAt?: Date | null;
|
|
558
|
+
createdAt: Date;
|
|
559
|
+
}
|
|
560
|
+
interface DiscoverTrendsRequest {
|
|
561
|
+
projectSlug: string;
|
|
562
|
+
environment: MarketingEnvironment;
|
|
563
|
+
}
|
|
564
|
+
interface DiscoverTrendsResponse {
|
|
565
|
+
success: boolean;
|
|
566
|
+
trendsDiscovered: number;
|
|
567
|
+
trends: Trend[];
|
|
568
|
+
}
|
|
569
|
+
interface ListTrendsRequest {
|
|
570
|
+
projectSlug: string;
|
|
571
|
+
environment: MarketingEnvironment;
|
|
572
|
+
status?: TrendStatus;
|
|
573
|
+
limit?: number;
|
|
574
|
+
}
|
|
575
|
+
type ListTrendsResponse = Trend[];
|
|
576
|
+
interface Opportunity {
|
|
577
|
+
id: string;
|
|
578
|
+
organizationId: string;
|
|
579
|
+
projectId: string;
|
|
580
|
+
environment: MarketingEnvironment;
|
|
581
|
+
title: string;
|
|
582
|
+
description?: string | null;
|
|
583
|
+
contentType: ContentType;
|
|
584
|
+
opportunityScore: number;
|
|
585
|
+
estimatedViews?: number | null;
|
|
586
|
+
confidenceLevel?: number | null;
|
|
587
|
+
trendIds?: string[] | null;
|
|
588
|
+
reasoning?: string | null;
|
|
589
|
+
suggestedAngle?: string | null;
|
|
590
|
+
targetAudience?: string | null;
|
|
591
|
+
contentId?: string | null;
|
|
592
|
+
status: string;
|
|
593
|
+
usedAt?: Date | null;
|
|
594
|
+
createdAt: Date;
|
|
595
|
+
expiresAt?: Date | null;
|
|
596
|
+
}
|
|
597
|
+
interface GenerateOpportunitiesRequest {
|
|
598
|
+
projectSlug: string;
|
|
599
|
+
environment: MarketingEnvironment;
|
|
600
|
+
}
|
|
601
|
+
interface GenerateOpportunitiesResponse {
|
|
602
|
+
success: boolean;
|
|
603
|
+
opportunitiesGenerated: number;
|
|
604
|
+
opportunities: Opportunity[];
|
|
605
|
+
}
|
|
606
|
+
interface ListOpportunitiesRequest {
|
|
607
|
+
projectSlug: string;
|
|
608
|
+
environment: MarketingEnvironment;
|
|
609
|
+
status?: string;
|
|
610
|
+
limit?: number;
|
|
611
|
+
}
|
|
612
|
+
type ListOpportunitiesResponse = Opportunity[];
|
|
613
|
+
interface DismissOpportunityRequest {
|
|
614
|
+
opportunityId: string;
|
|
615
|
+
}
|
|
616
|
+
interface Content {
|
|
617
|
+
id: string;
|
|
618
|
+
organizationId: string;
|
|
619
|
+
projectId: string;
|
|
620
|
+
environment: MarketingEnvironment;
|
|
621
|
+
contentType: ContentType;
|
|
622
|
+
title: string;
|
|
623
|
+
description?: string | null;
|
|
624
|
+
opportunityId?: string | null;
|
|
625
|
+
scriptId?: string | null;
|
|
626
|
+
assetUrls?: {
|
|
627
|
+
slides?: string[];
|
|
628
|
+
video?: string;
|
|
629
|
+
thumbnail?: string;
|
|
630
|
+
captions?: string;
|
|
631
|
+
} | null;
|
|
632
|
+
duration?: number | null;
|
|
633
|
+
slideCount?: number | null;
|
|
634
|
+
fileSize?: number | null;
|
|
635
|
+
platformData?: Record<string, unknown> | null;
|
|
636
|
+
status: ContentStatus;
|
|
637
|
+
approvalStatus: ApprovalStatus;
|
|
638
|
+
reviewedByUserId?: string | null;
|
|
639
|
+
reviewedAt?: Date | null;
|
|
640
|
+
reviewNotes?: string | null;
|
|
641
|
+
publishedAt?: Date | null;
|
|
642
|
+
publishedUrl?: string | null;
|
|
643
|
+
views?: number | null;
|
|
644
|
+
likes?: number | null;
|
|
645
|
+
shares?: number | null;
|
|
646
|
+
comments?: number | null;
|
|
647
|
+
creditsUsed?: number | null;
|
|
648
|
+
createdAt: Date;
|
|
649
|
+
updatedAt?: Date | null;
|
|
650
|
+
}
|
|
651
|
+
interface CreateContentRequest {
|
|
652
|
+
projectSlug: string;
|
|
653
|
+
environment: MarketingEnvironment;
|
|
654
|
+
contentType: ContentType;
|
|
655
|
+
title: string;
|
|
656
|
+
description?: string;
|
|
657
|
+
opportunityId?: string;
|
|
658
|
+
scriptId?: string;
|
|
659
|
+
}
|
|
660
|
+
interface ListContentRequest {
|
|
661
|
+
projectSlug: string;
|
|
662
|
+
environment: MarketingEnvironment;
|
|
663
|
+
status?: ContentStatus;
|
|
664
|
+
contentType?: ContentType;
|
|
665
|
+
approvalStatus?: ApprovalStatus;
|
|
666
|
+
limit?: number;
|
|
667
|
+
offset?: number;
|
|
668
|
+
}
|
|
669
|
+
type ListContentResponse = Content[];
|
|
670
|
+
interface UpdateContentRequest {
|
|
671
|
+
contentId: string;
|
|
672
|
+
title?: string;
|
|
673
|
+
description?: string;
|
|
674
|
+
status?: ContentStatus;
|
|
675
|
+
assetUrls?: {
|
|
676
|
+
slides?: string[];
|
|
677
|
+
video?: string;
|
|
678
|
+
thumbnail?: string;
|
|
679
|
+
captions?: string;
|
|
680
|
+
};
|
|
681
|
+
platformData?: Record<string, unknown>;
|
|
682
|
+
publishedUrl?: string;
|
|
683
|
+
}
|
|
684
|
+
interface ApproveContentRequest {
|
|
685
|
+
contentId: string;
|
|
686
|
+
reviewNotes?: string;
|
|
687
|
+
}
|
|
688
|
+
interface RejectContentRequest {
|
|
689
|
+
contentId: string;
|
|
690
|
+
reviewNotes: string;
|
|
691
|
+
}
|
|
692
|
+
interface ScriptSlide {
|
|
693
|
+
order: number;
|
|
694
|
+
text: string;
|
|
695
|
+
voiceoverText: string;
|
|
696
|
+
duration: number;
|
|
697
|
+
visualStyle?: string;
|
|
698
|
+
}
|
|
699
|
+
interface Script {
|
|
700
|
+
id: string;
|
|
701
|
+
organizationId: string;
|
|
702
|
+
projectId: string;
|
|
703
|
+
environment: MarketingEnvironment;
|
|
704
|
+
contentId?: string | null;
|
|
705
|
+
hook: string;
|
|
706
|
+
slides: ScriptSlide[];
|
|
707
|
+
cta: string;
|
|
708
|
+
prompt?: string | null;
|
|
709
|
+
model?: string | null;
|
|
710
|
+
tokensUsed?: number | null;
|
|
711
|
+
generationTimeMs?: number | null;
|
|
712
|
+
version: number;
|
|
713
|
+
previousVersionId?: string | null;
|
|
714
|
+
createdAt: Date;
|
|
715
|
+
}
|
|
716
|
+
interface CreateScriptRequest {
|
|
717
|
+
projectSlug: string;
|
|
718
|
+
environment: MarketingEnvironment;
|
|
719
|
+
contentId?: string;
|
|
720
|
+
hook: string;
|
|
721
|
+
slides: ScriptSlide[];
|
|
722
|
+
cta: string;
|
|
723
|
+
prompt?: string;
|
|
724
|
+
model?: string;
|
|
725
|
+
tokensUsed?: number;
|
|
726
|
+
generationTimeMs?: number;
|
|
727
|
+
}
|
|
728
|
+
interface ListScriptsRequest {
|
|
729
|
+
projectSlug: string;
|
|
730
|
+
environment: MarketingEnvironment;
|
|
731
|
+
contentId?: string;
|
|
732
|
+
limit?: number;
|
|
733
|
+
}
|
|
734
|
+
type ListScriptsResponse = Script[];
|
|
735
|
+
interface AnalyticsOverviewRequest {
|
|
736
|
+
projectSlug: string;
|
|
737
|
+
environment: MarketingEnvironment;
|
|
738
|
+
startDate?: Date;
|
|
739
|
+
endDate?: Date;
|
|
740
|
+
}
|
|
741
|
+
interface AnalyticsOverviewResponse {
|
|
742
|
+
totalContent: number;
|
|
743
|
+
publishedContent: number;
|
|
744
|
+
draftContent: number;
|
|
745
|
+
engagement: {
|
|
746
|
+
views: number;
|
|
747
|
+
likes: number;
|
|
748
|
+
shares: number;
|
|
749
|
+
comments: number;
|
|
750
|
+
};
|
|
751
|
+
contentByType: Array<{
|
|
752
|
+
contentType: ContentType;
|
|
753
|
+
count: number;
|
|
754
|
+
}>;
|
|
755
|
+
contentByStatus: Array<{
|
|
756
|
+
status: ContentStatus;
|
|
757
|
+
count: number;
|
|
758
|
+
}>;
|
|
759
|
+
}
|
|
760
|
+
interface ContentPerformanceRequest {
|
|
761
|
+
projectSlug: string;
|
|
762
|
+
environment: MarketingEnvironment;
|
|
763
|
+
contentType?: ContentType;
|
|
764
|
+
limit?: number;
|
|
765
|
+
}
|
|
766
|
+
interface ContentPerformanceItem {
|
|
767
|
+
id: string;
|
|
768
|
+
title: string;
|
|
769
|
+
contentType: ContentType;
|
|
770
|
+
views: number | null;
|
|
771
|
+
likes: number | null;
|
|
772
|
+
shares: number | null;
|
|
773
|
+
comments: number | null;
|
|
774
|
+
publishedAt: Date | null;
|
|
775
|
+
engagementRate: number;
|
|
776
|
+
}
|
|
777
|
+
type ContentPerformanceResponse = ContentPerformanceItem[];
|
|
778
|
+
|
|
779
|
+
/**
|
|
780
|
+
* Stack0 Marketing Client
|
|
781
|
+
* Discover trends, generate content opportunities, and manage marketing content
|
|
782
|
+
*/
|
|
783
|
+
|
|
784
|
+
declare class Marketing {
|
|
785
|
+
private http;
|
|
786
|
+
constructor(config: HttpClientConfig);
|
|
787
|
+
/**
|
|
788
|
+
* Discover new trends from all sources
|
|
789
|
+
*
|
|
790
|
+
* @example
|
|
791
|
+
* ```typescript
|
|
792
|
+
* const { trendsDiscovered, trends } = await marketing.discoverTrends({
|
|
793
|
+
* projectSlug: 'my-project',
|
|
794
|
+
* environment: 'production',
|
|
795
|
+
* });
|
|
796
|
+
* console.log(`Discovered ${trendsDiscovered} new trends`);
|
|
797
|
+
* ```
|
|
798
|
+
*/
|
|
799
|
+
discoverTrends(request: DiscoverTrendsRequest): Promise<DiscoverTrendsResponse>;
|
|
800
|
+
/**
|
|
801
|
+
* List trends for a project
|
|
802
|
+
*
|
|
803
|
+
* @example
|
|
804
|
+
* ```typescript
|
|
805
|
+
* const trends = await marketing.listTrends({
|
|
806
|
+
* projectSlug: 'my-project',
|
|
807
|
+
* environment: 'production',
|
|
808
|
+
* limit: 20,
|
|
809
|
+
* });
|
|
810
|
+
* ```
|
|
811
|
+
*/
|
|
812
|
+
listTrends(request: ListTrendsRequest): Promise<Trend[]>;
|
|
813
|
+
/**
|
|
814
|
+
* Get a single trend by ID
|
|
815
|
+
*/
|
|
816
|
+
getTrend(trendId: string): Promise<Trend>;
|
|
817
|
+
/**
|
|
818
|
+
* Generate content opportunities from active trends
|
|
819
|
+
*
|
|
820
|
+
* @example
|
|
821
|
+
* ```typescript
|
|
822
|
+
* const { opportunitiesGenerated, opportunities } = await marketing.generateOpportunities({
|
|
823
|
+
* projectSlug: 'my-project',
|
|
824
|
+
* environment: 'production',
|
|
825
|
+
* });
|
|
826
|
+
* console.log(`Generated ${opportunitiesGenerated} new content ideas`);
|
|
827
|
+
* ```
|
|
828
|
+
*/
|
|
829
|
+
generateOpportunities(request: GenerateOpportunitiesRequest): Promise<GenerateOpportunitiesResponse>;
|
|
830
|
+
/**
|
|
831
|
+
* List opportunities for a project
|
|
832
|
+
*
|
|
833
|
+
* @example
|
|
834
|
+
* ```typescript
|
|
835
|
+
* const opportunities = await marketing.listOpportunities({
|
|
836
|
+
* projectSlug: 'my-project',
|
|
837
|
+
* environment: 'production',
|
|
838
|
+
* status: 'pending',
|
|
839
|
+
* limit: 20,
|
|
840
|
+
* });
|
|
841
|
+
* ```
|
|
842
|
+
*/
|
|
843
|
+
listOpportunities(request: ListOpportunitiesRequest): Promise<Opportunity[]>;
|
|
844
|
+
/**
|
|
845
|
+
* Get a single opportunity by ID
|
|
846
|
+
*/
|
|
847
|
+
getOpportunity(opportunityId: string): Promise<Opportunity>;
|
|
848
|
+
/**
|
|
849
|
+
* Dismiss an opportunity
|
|
850
|
+
*
|
|
851
|
+
* @example
|
|
852
|
+
* ```typescript
|
|
853
|
+
* await marketing.dismissOpportunity({ opportunityId: 'opp-id' });
|
|
854
|
+
* ```
|
|
855
|
+
*/
|
|
856
|
+
dismissOpportunity(request: DismissOpportunityRequest): Promise<{
|
|
857
|
+
success: boolean;
|
|
858
|
+
}>;
|
|
859
|
+
/**
|
|
860
|
+
* Create new marketing content
|
|
861
|
+
*
|
|
862
|
+
* @example
|
|
863
|
+
* ```typescript
|
|
864
|
+
* const content = await marketing.createContent({
|
|
865
|
+
* projectSlug: 'my-project',
|
|
866
|
+
* environment: 'production',
|
|
867
|
+
* contentType: 'tiktok_slideshow',
|
|
868
|
+
* title: 'How AI is Changing Marketing',
|
|
869
|
+
* opportunityId: 'opp-id',
|
|
870
|
+
* });
|
|
871
|
+
* ```
|
|
872
|
+
*/
|
|
873
|
+
createContent(request: CreateContentRequest): Promise<Content>;
|
|
874
|
+
/**
|
|
875
|
+
* List content with filters
|
|
876
|
+
*
|
|
877
|
+
* @example
|
|
878
|
+
* ```typescript
|
|
879
|
+
* const content = await marketing.listContent({
|
|
880
|
+
* projectSlug: 'my-project',
|
|
881
|
+
* environment: 'production',
|
|
882
|
+
* status: 'published',
|
|
883
|
+
* limit: 20,
|
|
884
|
+
* });
|
|
885
|
+
* ```
|
|
886
|
+
*/
|
|
887
|
+
listContent(request: ListContentRequest): Promise<Content[]>;
|
|
888
|
+
/**
|
|
889
|
+
* Get a single content by ID
|
|
890
|
+
*/
|
|
891
|
+
getContent(contentId: string): Promise<Content>;
|
|
892
|
+
/**
|
|
893
|
+
* Update content
|
|
894
|
+
*
|
|
895
|
+
* @example
|
|
896
|
+
* ```typescript
|
|
897
|
+
* const updated = await marketing.updateContent({
|
|
898
|
+
* contentId: 'content-id',
|
|
899
|
+
* title: 'Updated Title',
|
|
900
|
+
* status: 'published',
|
|
901
|
+
* });
|
|
902
|
+
* ```
|
|
903
|
+
*/
|
|
904
|
+
updateContent(request: UpdateContentRequest): Promise<Content>;
|
|
905
|
+
/**
|
|
906
|
+
* Approve content for publishing
|
|
907
|
+
*
|
|
908
|
+
* @example
|
|
909
|
+
* ```typescript
|
|
910
|
+
* await marketing.approveContent({
|
|
911
|
+
* contentId: 'content-id',
|
|
912
|
+
* reviewNotes: 'Looks great!',
|
|
913
|
+
* });
|
|
914
|
+
* ```
|
|
915
|
+
*/
|
|
916
|
+
approveContent(request: ApproveContentRequest): Promise<Content>;
|
|
917
|
+
/**
|
|
918
|
+
* Reject content
|
|
919
|
+
*
|
|
920
|
+
* @example
|
|
921
|
+
* ```typescript
|
|
922
|
+
* await marketing.rejectContent({
|
|
923
|
+
* contentId: 'content-id',
|
|
924
|
+
* reviewNotes: 'Needs revisions',
|
|
925
|
+
* });
|
|
926
|
+
* ```
|
|
927
|
+
*/
|
|
928
|
+
rejectContent(request: RejectContentRequest): Promise<Content>;
|
|
929
|
+
/**
|
|
930
|
+
* Delete content
|
|
931
|
+
*/
|
|
932
|
+
deleteContent(contentId: string): Promise<{
|
|
933
|
+
success: boolean;
|
|
934
|
+
}>;
|
|
935
|
+
/**
|
|
936
|
+
* Create a new script
|
|
937
|
+
*
|
|
938
|
+
* @example
|
|
939
|
+
* ```typescript
|
|
940
|
+
* const script = await marketing.createScript({
|
|
941
|
+
* projectSlug: 'my-project',
|
|
942
|
+
* environment: 'production',
|
|
943
|
+
* hook: 'Are you ready to see the future?',
|
|
944
|
+
* slides: [
|
|
945
|
+
* { order: 0, text: 'AI is changing everything', voiceoverText: 'AI is transforming how we work', duration: 3 },
|
|
946
|
+
* ],
|
|
947
|
+
* cta: 'Follow for more insights!',
|
|
948
|
+
* });
|
|
949
|
+
* ```
|
|
950
|
+
*/
|
|
951
|
+
createScript(request: CreateScriptRequest): Promise<Script>;
|
|
952
|
+
/**
|
|
953
|
+
* List scripts
|
|
954
|
+
*/
|
|
955
|
+
listScripts(request: ListScriptsRequest): Promise<Script[]>;
|
|
956
|
+
/**
|
|
957
|
+
* Get a single script by ID
|
|
958
|
+
*/
|
|
959
|
+
getScript(scriptId: string): Promise<Script>;
|
|
960
|
+
/**
|
|
961
|
+
* Get analytics overview
|
|
962
|
+
*
|
|
963
|
+
* @example
|
|
964
|
+
* ```typescript
|
|
965
|
+
* const analytics = await marketing.getAnalyticsOverview({
|
|
966
|
+
* projectSlug: 'my-project',
|
|
967
|
+
* environment: 'production',
|
|
968
|
+
* });
|
|
969
|
+
* console.log(`Total content: ${analytics.totalContent}`);
|
|
970
|
+
* console.log(`Total views: ${analytics.engagement.views}`);
|
|
971
|
+
* ```
|
|
972
|
+
*/
|
|
973
|
+
getAnalyticsOverview(request: AnalyticsOverviewRequest): Promise<AnalyticsOverviewResponse>;
|
|
974
|
+
/**
|
|
975
|
+
* Get content performance metrics
|
|
976
|
+
*
|
|
977
|
+
* @example
|
|
978
|
+
* ```typescript
|
|
979
|
+
* const topContent = await marketing.getContentPerformance({
|
|
980
|
+
* projectSlug: 'my-project',
|
|
981
|
+
* environment: 'production',
|
|
982
|
+
* contentType: 'tiktok_slideshow',
|
|
983
|
+
* limit: 10,
|
|
984
|
+
* });
|
|
985
|
+
* ```
|
|
986
|
+
*/
|
|
987
|
+
getContentPerformance(request: ContentPerformanceRequest): Promise<ContentPerformanceResponse>;
|
|
988
|
+
private convertTrendDates;
|
|
989
|
+
private convertOpportunityDates;
|
|
990
|
+
private convertContentDates;
|
|
991
|
+
private convertScriptDates;
|
|
992
|
+
}
|
|
993
|
+
|
|
534
994
|
/**
|
|
535
995
|
* Stack0 SDK
|
|
536
996
|
* Official SDK for Stack0 services
|
|
@@ -578,12 +1038,23 @@ declare class Integrations {
|
|
|
578
1038
|
* channelId: 'C123',
|
|
579
1039
|
* content: 'Hello from Stack0!',
|
|
580
1040
|
* });
|
|
1041
|
+
*
|
|
1042
|
+
* // Discover trends and generate content ideas
|
|
1043
|
+
* const { trendsDiscovered, trends } = await stack0.marketing.discoverTrends({
|
|
1044
|
+
* projectSlug: 'my-project',
|
|
1045
|
+
* environment: 'production',
|
|
1046
|
+
* });
|
|
581
1047
|
* ```
|
|
582
1048
|
*/
|
|
583
1049
|
|
|
584
1050
|
interface Stack0Config extends HttpClientConfig {
|
|
585
1051
|
apiKey: string;
|
|
586
1052
|
baseUrl?: string;
|
|
1053
|
+
/**
|
|
1054
|
+
* CDN base URL for image transformations (e.g., 'https://cdn.yourproject.stack0.dev')
|
|
1055
|
+
* When provided, transform URLs are generated client-side without API calls
|
|
1056
|
+
*/
|
|
1057
|
+
cdnUrl?: string;
|
|
587
1058
|
}
|
|
588
1059
|
/**
|
|
589
1060
|
* Main Stack0 SDK class
|
|
@@ -595,6 +1066,7 @@ declare class Stack0 {
|
|
|
595
1066
|
screenshots: Screenshots;
|
|
596
1067
|
extraction: Extraction;
|
|
597
1068
|
integrations: Integrations;
|
|
1069
|
+
marketing: Marketing;
|
|
598
1070
|
/**
|
|
599
1071
|
* @deprecated Use `screenshots` and `extraction` instead. Will be removed in a future version.
|
|
600
1072
|
*/
|
|
@@ -602,4 +1074,4 @@ declare class Stack0 {
|
|
|
602
1074
|
constructor(config: Stack0Config);
|
|
603
1075
|
}
|
|
604
1076
|
|
|
605
|
-
export { CDN, type Channel, type CommunicationUser, type Company, type Connection, type Connector, type ConnectorCategory, type Contact, type CreateCompanyInput, type CreateContactInput, type CreateDealInput, type Deal, Extraction, type Address as IntegrationAddress, type ColumnType as IntegrationColumnType, type CreateDocumentInput as IntegrationCreateDocumentInput, type CreateFolderInput as IntegrationCreateFolderInput, type CreateTableRowInput as IntegrationCreateTableRowInput, type Document as IntegrationDocument, type IntegrationEmailAddress, type File as IntegrationFile, type FilePermission as IntegrationFilePermission, type IntegrationFolder, type MessageAttachment as IntegrationMessageAttachment, type MessageReaction as IntegrationMessageReaction, type PhoneNumber as IntegrationPhoneNumber, type SelectOption as IntegrationSelectOption, type Table as IntegrationTable, type TableColumn as IntegrationTableColumn, type TableRow as IntegrationTableRow, type UpdateDocumentInput as IntegrationUpdateDocumentInput, type UpdateTableRowInput as IntegrationUpdateTableRowInput, Integrations, type ListOptions as IntegrationsListOptions, type PaginatedResult as IntegrationsPaginatedResult, Mail, type Message, type PassthroughRequest, Screenshots, type SendMessageInput, Stack0, type Stack0Config, type UpdateCompanyInput, type UpdateContactInput, type UpdateDealInput, type UploadFileInput, Webdata, Stack0 as default };
|
|
1077
|
+
export { type AnalyticsOverviewRequest, type AnalyticsOverviewResponse, type ApprovalStatus, type ApproveContentRequest, CDN, type Channel, type CommunicationUser, type Company, type Connection, type Connector, type ConnectorCategory, type Contact, type Content, type ContentPerformanceItem, type ContentPerformanceRequest, type ContentPerformanceResponse, type ContentStatus, type ContentType, type CreateCompanyInput, type CreateContactInput, type CreateContentRequest, type CreateDealInput, type CreateScriptRequest, type Deal, type DiscoverTrendsRequest, type DiscoverTrendsResponse, type DismissOpportunityRequest, Extraction, type GenerateOpportunitiesRequest, type GenerateOpportunitiesResponse, type Address as IntegrationAddress, type ColumnType as IntegrationColumnType, type CreateDocumentInput as IntegrationCreateDocumentInput, type CreateFolderInput as IntegrationCreateFolderInput, type CreateTableRowInput as IntegrationCreateTableRowInput, type Document as IntegrationDocument, type IntegrationEmailAddress, type File as IntegrationFile, type FilePermission as IntegrationFilePermission, type IntegrationFolder, type MessageAttachment as IntegrationMessageAttachment, type MessageReaction as IntegrationMessageReaction, type PhoneNumber as IntegrationPhoneNumber, type SelectOption as IntegrationSelectOption, type Table as IntegrationTable, type TableColumn as IntegrationTableColumn, type TableRow as IntegrationTableRow, type UpdateDocumentInput as IntegrationUpdateDocumentInput, type UpdateTableRowInput as IntegrationUpdateTableRowInput, Integrations, type ListOptions as IntegrationsListOptions, type PaginatedResult as IntegrationsPaginatedResult, type ListContentRequest, type ListContentResponse, type ListOpportunitiesRequest, type ListOpportunitiesResponse, type ListScriptsRequest, type ListScriptsResponse, type ListTrendsRequest, type ListTrendsResponse, Mail, Marketing, type MarketingEnvironment, type Message, type Opportunity, type PassthroughRequest, type RejectContentRequest, Screenshots, type Script, type ScriptSlide, type SendMessageInput, Stack0, type Stack0Config, type Trend, type TrendStatus, type UpdateCompanyInput, type UpdateContactInput, type UpdateContentRequest, type UpdateDealInput, type UploadFileInput, Webdata, Stack0 as default };
|