@chirpie/sdk 1.0.6 → 1.0.8
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 +48 -4
- package/dist/index.d.ts +48 -4
- package/dist/index.js +34 -1
- package/dist/index.mjs +34 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type Platform = "x" | "bluesky" | "linkedin" | "threads" | "mastodon" | "instagram" | "facebook";
|
|
1
|
+
type Platform = "x" | "bluesky" | "linkedin" | "threads" | "mastodon" | "instagram" | "facebook" | "telegram" | "reddit" | "pinterest" | "tiktok" | "youtube" | "google_business" | "snapchat";
|
|
2
2
|
interface ApiPost {
|
|
3
3
|
id: string;
|
|
4
4
|
platform: Platform;
|
|
@@ -67,13 +67,36 @@ interface ConnectInstagramInput {
|
|
|
67
67
|
interface ConnectFacebookInput {
|
|
68
68
|
platform: "facebook";
|
|
69
69
|
}
|
|
70
|
+
interface ConnectTelegramInput {
|
|
71
|
+
platform: "telegram";
|
|
72
|
+
bot_token: string;
|
|
73
|
+
chat_id: string;
|
|
74
|
+
}
|
|
75
|
+
interface ConnectRedditInput {
|
|
76
|
+
platform: "reddit";
|
|
77
|
+
}
|
|
78
|
+
interface ConnectPinterestInput {
|
|
79
|
+
platform: "pinterest";
|
|
80
|
+
}
|
|
81
|
+
interface ConnectTikTokInput {
|
|
82
|
+
platform: "tiktok";
|
|
83
|
+
}
|
|
84
|
+
interface ConnectYouTubeInput {
|
|
85
|
+
platform: "youtube";
|
|
86
|
+
}
|
|
87
|
+
interface ConnectGBPInput {
|
|
88
|
+
platform: "google_business";
|
|
89
|
+
}
|
|
90
|
+
interface ConnectSnapchatInput {
|
|
91
|
+
platform: "snapchat";
|
|
92
|
+
}
|
|
70
93
|
interface ApiKeyInfo {
|
|
71
94
|
id: string;
|
|
72
95
|
name: string;
|
|
73
96
|
key_prefix: string;
|
|
74
97
|
last_used_at: string | null;
|
|
75
98
|
created_at: string;
|
|
76
|
-
|
|
99
|
+
expires_at: string | null;
|
|
77
100
|
}
|
|
78
101
|
interface CreatePostInput {
|
|
79
102
|
account_id: string;
|
|
@@ -133,7 +156,26 @@ declare class ChirpieClient {
|
|
|
133
156
|
connectFacebookAccount(): Promise<{
|
|
134
157
|
authorization_url: string;
|
|
135
158
|
}>;
|
|
136
|
-
|
|
159
|
+
connectTelegramAccount(input: ConnectTelegramInput): Promise<ApiAccount>;
|
|
160
|
+
connectRedditAccount(): Promise<{
|
|
161
|
+
authorization_url: string;
|
|
162
|
+
}>;
|
|
163
|
+
connectPinterestAccount(): Promise<{
|
|
164
|
+
authorization_url: string;
|
|
165
|
+
}>;
|
|
166
|
+
connectTikTokAccount(): Promise<{
|
|
167
|
+
authorization_url: string;
|
|
168
|
+
}>;
|
|
169
|
+
connectYouTubeAccount(): Promise<{
|
|
170
|
+
authorization_url: string;
|
|
171
|
+
}>;
|
|
172
|
+
connectGBPAccount(): Promise<{
|
|
173
|
+
authorization_url: string;
|
|
174
|
+
}>;
|
|
175
|
+
connectSnapchatAccount(): Promise<{
|
|
176
|
+
authorization_url: string;
|
|
177
|
+
}>;
|
|
178
|
+
/** @deprecated Use platform-specific connect methods instead */
|
|
137
179
|
connectAccount(): Promise<{
|
|
138
180
|
authorization_url: string;
|
|
139
181
|
}>;
|
|
@@ -141,6 +183,8 @@ declare class ChirpieClient {
|
|
|
141
183
|
key: string;
|
|
142
184
|
prefix: string;
|
|
143
185
|
name: string;
|
|
186
|
+
expires_at: string;
|
|
187
|
+
message: string;
|
|
144
188
|
}>;
|
|
145
189
|
listKeys(): Promise<ApiKeyInfo[]>;
|
|
146
190
|
revokeKey(id: string): Promise<{
|
|
@@ -180,4 +224,4 @@ declare function deleteConfig(): boolean;
|
|
|
180
224
|
*/
|
|
181
225
|
declare function requireConfig(): ChirpieConfig;
|
|
182
226
|
|
|
183
|
-
export { type ApiAccount, type ApiAnalytics, type ApiKeyInfo, type ApiPost, type ApiThread, ChirpieApiError, ChirpieClient, type ChirpieClientOptions, type ChirpieConfig, ChirpieError, type ConnectBlueskyInput, type ConnectFacebookInput, type ConnectInstagramInput, type ConnectLinkedInInput, type ConnectMastodonInput, type ConnectThreadsInput, type CreatePostInput, type CreateThreadInput, type ListPostsOptions, deleteConfig, getConfig, requireConfig, saveConfig };
|
|
227
|
+
export { type ApiAccount, type ApiAnalytics, type ApiKeyInfo, type ApiPost, type ApiThread, ChirpieApiError, ChirpieClient, type ChirpieClientOptions, type ChirpieConfig, ChirpieError, type ConnectBlueskyInput, type ConnectFacebookInput, type ConnectGBPInput, type ConnectInstagramInput, type ConnectLinkedInInput, type ConnectMastodonInput, type ConnectPinterestInput, type ConnectRedditInput, type ConnectSnapchatInput, type ConnectTelegramInput, type ConnectThreadsInput, type ConnectTikTokInput, type ConnectYouTubeInput, type CreatePostInput, type CreateThreadInput, type ListPostsOptions, deleteConfig, getConfig, requireConfig, saveConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type Platform = "x" | "bluesky" | "linkedin" | "threads" | "mastodon" | "instagram" | "facebook";
|
|
1
|
+
type Platform = "x" | "bluesky" | "linkedin" | "threads" | "mastodon" | "instagram" | "facebook" | "telegram" | "reddit" | "pinterest" | "tiktok" | "youtube" | "google_business" | "snapchat";
|
|
2
2
|
interface ApiPost {
|
|
3
3
|
id: string;
|
|
4
4
|
platform: Platform;
|
|
@@ -67,13 +67,36 @@ interface ConnectInstagramInput {
|
|
|
67
67
|
interface ConnectFacebookInput {
|
|
68
68
|
platform: "facebook";
|
|
69
69
|
}
|
|
70
|
+
interface ConnectTelegramInput {
|
|
71
|
+
platform: "telegram";
|
|
72
|
+
bot_token: string;
|
|
73
|
+
chat_id: string;
|
|
74
|
+
}
|
|
75
|
+
interface ConnectRedditInput {
|
|
76
|
+
platform: "reddit";
|
|
77
|
+
}
|
|
78
|
+
interface ConnectPinterestInput {
|
|
79
|
+
platform: "pinterest";
|
|
80
|
+
}
|
|
81
|
+
interface ConnectTikTokInput {
|
|
82
|
+
platform: "tiktok";
|
|
83
|
+
}
|
|
84
|
+
interface ConnectYouTubeInput {
|
|
85
|
+
platform: "youtube";
|
|
86
|
+
}
|
|
87
|
+
interface ConnectGBPInput {
|
|
88
|
+
platform: "google_business";
|
|
89
|
+
}
|
|
90
|
+
interface ConnectSnapchatInput {
|
|
91
|
+
platform: "snapchat";
|
|
92
|
+
}
|
|
70
93
|
interface ApiKeyInfo {
|
|
71
94
|
id: string;
|
|
72
95
|
name: string;
|
|
73
96
|
key_prefix: string;
|
|
74
97
|
last_used_at: string | null;
|
|
75
98
|
created_at: string;
|
|
76
|
-
|
|
99
|
+
expires_at: string | null;
|
|
77
100
|
}
|
|
78
101
|
interface CreatePostInput {
|
|
79
102
|
account_id: string;
|
|
@@ -133,7 +156,26 @@ declare class ChirpieClient {
|
|
|
133
156
|
connectFacebookAccount(): Promise<{
|
|
134
157
|
authorization_url: string;
|
|
135
158
|
}>;
|
|
136
|
-
|
|
159
|
+
connectTelegramAccount(input: ConnectTelegramInput): Promise<ApiAccount>;
|
|
160
|
+
connectRedditAccount(): Promise<{
|
|
161
|
+
authorization_url: string;
|
|
162
|
+
}>;
|
|
163
|
+
connectPinterestAccount(): Promise<{
|
|
164
|
+
authorization_url: string;
|
|
165
|
+
}>;
|
|
166
|
+
connectTikTokAccount(): Promise<{
|
|
167
|
+
authorization_url: string;
|
|
168
|
+
}>;
|
|
169
|
+
connectYouTubeAccount(): Promise<{
|
|
170
|
+
authorization_url: string;
|
|
171
|
+
}>;
|
|
172
|
+
connectGBPAccount(): Promise<{
|
|
173
|
+
authorization_url: string;
|
|
174
|
+
}>;
|
|
175
|
+
connectSnapchatAccount(): Promise<{
|
|
176
|
+
authorization_url: string;
|
|
177
|
+
}>;
|
|
178
|
+
/** @deprecated Use platform-specific connect methods instead */
|
|
137
179
|
connectAccount(): Promise<{
|
|
138
180
|
authorization_url: string;
|
|
139
181
|
}>;
|
|
@@ -141,6 +183,8 @@ declare class ChirpieClient {
|
|
|
141
183
|
key: string;
|
|
142
184
|
prefix: string;
|
|
143
185
|
name: string;
|
|
186
|
+
expires_at: string;
|
|
187
|
+
message: string;
|
|
144
188
|
}>;
|
|
145
189
|
listKeys(): Promise<ApiKeyInfo[]>;
|
|
146
190
|
revokeKey(id: string): Promise<{
|
|
@@ -180,4 +224,4 @@ declare function deleteConfig(): boolean;
|
|
|
180
224
|
*/
|
|
181
225
|
declare function requireConfig(): ChirpieConfig;
|
|
182
226
|
|
|
183
|
-
export { type ApiAccount, type ApiAnalytics, type ApiKeyInfo, type ApiPost, type ApiThread, ChirpieApiError, ChirpieClient, type ChirpieClientOptions, type ChirpieConfig, ChirpieError, type ConnectBlueskyInput, type ConnectFacebookInput, type ConnectInstagramInput, type ConnectLinkedInInput, type ConnectMastodonInput, type ConnectThreadsInput, type CreatePostInput, type CreateThreadInput, type ListPostsOptions, deleteConfig, getConfig, requireConfig, saveConfig };
|
|
227
|
+
export { type ApiAccount, type ApiAnalytics, type ApiKeyInfo, type ApiPost, type ApiThread, ChirpieApiError, ChirpieClient, type ChirpieClientOptions, type ChirpieConfig, ChirpieError, type ConnectBlueskyInput, type ConnectFacebookInput, type ConnectGBPInput, type ConnectInstagramInput, type ConnectLinkedInInput, type ConnectMastodonInput, type ConnectPinterestInput, type ConnectRedditInput, type ConnectSnapchatInput, type ConnectTelegramInput, type ConnectThreadsInput, type ConnectTikTokInput, type ConnectYouTubeInput, type CreatePostInput, type CreateThreadInput, type ListPostsOptions, deleteConfig, getConfig, requireConfig, saveConfig };
|
package/dist/index.js
CHANGED
|
@@ -133,7 +133,40 @@ var ChirpieClient = class {
|
|
|
133
133
|
platform: "facebook"
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
|
-
|
|
136
|
+
async connectTelegramAccount(input) {
|
|
137
|
+
return this.request("POST", "/accounts", input);
|
|
138
|
+
}
|
|
139
|
+
async connectRedditAccount() {
|
|
140
|
+
return this.request("POST", "/accounts", {
|
|
141
|
+
platform: "reddit"
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
async connectPinterestAccount() {
|
|
145
|
+
return this.request("POST", "/accounts", {
|
|
146
|
+
platform: "pinterest"
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
async connectTikTokAccount() {
|
|
150
|
+
return this.request("POST", "/accounts", {
|
|
151
|
+
platform: "tiktok"
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
async connectYouTubeAccount() {
|
|
155
|
+
return this.request("POST", "/accounts", {
|
|
156
|
+
platform: "youtube"
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
async connectGBPAccount() {
|
|
160
|
+
return this.request("POST", "/accounts", {
|
|
161
|
+
platform: "google_business"
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
async connectSnapchatAccount() {
|
|
165
|
+
return this.request("POST", "/accounts", {
|
|
166
|
+
platform: "snapchat"
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
/** @deprecated Use platform-specific connect methods instead */
|
|
137
170
|
async connectAccount() {
|
|
138
171
|
return this.connectXAccount();
|
|
139
172
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -101,7 +101,40 @@ var ChirpieClient = class {
|
|
|
101
101
|
platform: "facebook"
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
|
-
|
|
104
|
+
async connectTelegramAccount(input) {
|
|
105
|
+
return this.request("POST", "/accounts", input);
|
|
106
|
+
}
|
|
107
|
+
async connectRedditAccount() {
|
|
108
|
+
return this.request("POST", "/accounts", {
|
|
109
|
+
platform: "reddit"
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
async connectPinterestAccount() {
|
|
113
|
+
return this.request("POST", "/accounts", {
|
|
114
|
+
platform: "pinterest"
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
async connectTikTokAccount() {
|
|
118
|
+
return this.request("POST", "/accounts", {
|
|
119
|
+
platform: "tiktok"
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
async connectYouTubeAccount() {
|
|
123
|
+
return this.request("POST", "/accounts", {
|
|
124
|
+
platform: "youtube"
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
async connectGBPAccount() {
|
|
128
|
+
return this.request("POST", "/accounts", {
|
|
129
|
+
platform: "google_business"
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
async connectSnapchatAccount() {
|
|
133
|
+
return this.request("POST", "/accounts", {
|
|
134
|
+
platform: "snapchat"
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
/** @deprecated Use platform-specific connect methods instead */
|
|
105
138
|
async connectAccount() {
|
|
106
139
|
return this.connectXAccount();
|
|
107
140
|
}
|