postiz 1.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.
@@ -0,0 +1,153 @@
1
+ declare class MediaDto {
2
+ id: string;
3
+ path: string;
4
+ alt?: string;
5
+ thumbnail?: string;
6
+ }
7
+
8
+ declare class RedditFlairDto {
9
+ id: string;
10
+ name: string;
11
+ }
12
+ declare class RedditSettingsDtoInner {
13
+ subreddit: string;
14
+ title: string;
15
+ type: string;
16
+ url: string;
17
+ is_flair_required: boolean;
18
+ flair: RedditFlairDto;
19
+ media: MediaDto[];
20
+ }
21
+ declare class RedditSettingsValueDto {
22
+ value: RedditSettingsDtoInner;
23
+ }
24
+ declare class RedditSettingsDto {
25
+ subreddit: RedditSettingsValueDto[];
26
+ }
27
+
28
+ declare class PinterestSettingsDto {
29
+ title: string;
30
+ link: string;
31
+ dominant_color: string;
32
+ board: string;
33
+ }
34
+
35
+ declare class YoutubeTagsSettings {
36
+ value: string;
37
+ label: string;
38
+ }
39
+ declare class YoutubeSettingsDto {
40
+ title: string;
41
+ type: string;
42
+ thumbnail?: MediaDto;
43
+ tags: YoutubeTagsSettings[];
44
+ }
45
+
46
+ declare class TikTokDto {
47
+ privacy_level: 'PUBLIC_TO_EVERYONE' | 'MUTUAL_FOLLOW_FRIENDS' | 'FOLLOWER_OF_CREATOR' | 'SELF_ONLY';
48
+ duet: boolean;
49
+ stitch: boolean;
50
+ comment: boolean;
51
+ autoAddMusic: 'yes' | 'no';
52
+ brand_content_toggle: boolean;
53
+ brand_organic_toggle: boolean;
54
+ content_posting_method: 'DIRECT_POST' | 'UPLOAD';
55
+ }
56
+
57
+ declare class XDto {
58
+ community?: string;
59
+ }
60
+
61
+ declare class LemmySettingsDtoInner {
62
+ subreddit: string;
63
+ id: string;
64
+ title: string;
65
+ url: string;
66
+ }
67
+ declare class LemmySettingsValueDto {
68
+ value: LemmySettingsDtoInner;
69
+ }
70
+ declare class LemmySettingsDto {
71
+ subreddit: LemmySettingsValueDto[];
72
+ }
73
+
74
+ declare class DribbbleDto {
75
+ title: string;
76
+ team: string;
77
+ }
78
+
79
+ declare class DiscordDto {
80
+ channel: string;
81
+ }
82
+
83
+ declare class SlackDto {
84
+ channel: string;
85
+ }
86
+
87
+ declare class Collaborators {
88
+ label: string;
89
+ }
90
+ declare class InstagramDto {
91
+ post_type: 'post' | 'story';
92
+ collaborators: Collaborators[];
93
+ }
94
+
95
+ declare class LinkedinDto {
96
+ post_as_images_carousel: boolean;
97
+ }
98
+
99
+ type ProviderExtension<T extends string, M> = {
100
+ type: T;
101
+ } & M;
102
+ type AllProvidersSettings = ProviderExtension<'reddit', RedditSettingsDto> | ProviderExtension<'lemmy', LemmySettingsDto> | ProviderExtension<'youtube', YoutubeSettingsDto> | ProviderExtension<'pinterest', PinterestSettingsDto> | ProviderExtension<'dribbble', DribbbleDto> | ProviderExtension<'tiktok', TikTokDto> | ProviderExtension<'discord', DiscordDto> | ProviderExtension<'slack', SlackDto> | ProviderExtension<'x', XDto> | ProviderExtension<'linkedin', LinkedinDto> | ProviderExtension<'linkedin-page', LinkedinDto> | ProviderExtension<'instagram', InstagramDto> | ProviderExtension<'instagram-standalone', InstagramDto> | ProviderExtension<'facebook', None> | ProviderExtension<'threads', None> | ProviderExtension<'mastodon', None> | ProviderExtension<'bluesky', None> | ProviderExtension<'wrapcast', None> | ProviderExtension<'telegram', None> | ProviderExtension<'nostr', None> | ProviderExtension<'vk', None>;
103
+ type None = NonNullable<unknown>;
104
+
105
+ declare class Integration {
106
+ id: string;
107
+ }
108
+ declare class PostContent {
109
+ content: string;
110
+ id: string;
111
+ image: MediaDto[];
112
+ }
113
+ declare class Post {
114
+ integration: Integration;
115
+ value: PostContent[];
116
+ group: string;
117
+ settings: AllProvidersSettings;
118
+ }
119
+ declare class Tags {
120
+ value: string;
121
+ label: string;
122
+ }
123
+ declare class CreatePostDto {
124
+ type: 'draft' | 'schedule' | 'now';
125
+ order: string;
126
+ shortLink: boolean;
127
+ inter?: number;
128
+ date: string;
129
+ tags: Tags[];
130
+ posts: Post[];
131
+ }
132
+
133
+ declare class GetPostsDto {
134
+ week: number;
135
+ day: number;
136
+ display: 'day' | 'week' | 'month';
137
+ month: number;
138
+ year: number;
139
+ customer: string;
140
+ }
141
+
142
+ declare class Postiz {
143
+ private _apiKey;
144
+ private _path;
145
+ constructor(_apiKey: string, _path?: string);
146
+ post(posts: CreatePostDto): Promise<any>;
147
+ postList(filters: GetPostsDto): Promise<any>;
148
+ upload(file: Buffer, extension: string): Promise<any>;
149
+ integrations(): Promise<any>;
150
+ deletePost(id: string): Promise<Response>;
151
+ }
152
+
153
+ export { Postiz as default };