@chirpie/sdk 1.0.9 → 1.0.11
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 +35 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.js +27 -0
- package/dist/index.mjs +27 -0
- package/package.json +19 -2
package/dist/index.d.mts
CHANGED
|
@@ -102,6 +102,10 @@ interface CreatePostInput {
|
|
|
102
102
|
account_id: string;
|
|
103
103
|
text: string;
|
|
104
104
|
media_urls?: string[];
|
|
105
|
+
/**
|
|
106
|
+
* ISO 8601 datetime to schedule the post (UTC). Must be in the future.
|
|
107
|
+
* Scheduled posts publish within ~5 minutes of this time.
|
|
108
|
+
*/
|
|
105
109
|
schedule_at?: string;
|
|
106
110
|
}
|
|
107
111
|
interface CreateThreadInput {
|
|
@@ -110,6 +114,10 @@ interface CreateThreadInput {
|
|
|
110
114
|
text: string;
|
|
111
115
|
media_urls?: string[];
|
|
112
116
|
}[];
|
|
117
|
+
/**
|
|
118
|
+
* ISO 8601 datetime to schedule the entire thread (UTC). Must be in the future.
|
|
119
|
+
* Scheduled threads publish within ~5 minutes of this time.
|
|
120
|
+
*/
|
|
113
121
|
schedule_at?: string;
|
|
114
122
|
}
|
|
115
123
|
interface ListPostsOptions {
|
|
@@ -128,6 +136,16 @@ declare class ChirpieClient {
|
|
|
128
136
|
private baseUrl;
|
|
129
137
|
constructor(options: ChirpieClientOptions);
|
|
130
138
|
private request;
|
|
139
|
+
/**
|
|
140
|
+
* Create a post (immediate or scheduled).
|
|
141
|
+
* If `schedule_at` is set, the post is queued and publishes within ~5 minutes
|
|
142
|
+
* of the scheduled time.
|
|
143
|
+
*
|
|
144
|
+
* @param input - Post payload including `account_id`, `text`, optional `media_urls`, and optional `schedule_at`.
|
|
145
|
+
* @returns The created post.
|
|
146
|
+
* @throws {ChirpieError} On network/transport failure.
|
|
147
|
+
* @throws {ChirpieApiError} On non-2xx responses (auth, validation, plan limit, platform error) or invalid JSON.
|
|
148
|
+
*/
|
|
131
149
|
createPost(input: CreatePostInput): Promise<ApiPost>;
|
|
132
150
|
listPosts(options?: ListPostsOptions): Promise<ApiPost[]>;
|
|
133
151
|
getPost(id: string): Promise<ApiPost>;
|
|
@@ -135,6 +153,17 @@ declare class ChirpieClient {
|
|
|
135
153
|
id: string;
|
|
136
154
|
deleted: boolean;
|
|
137
155
|
}>;
|
|
156
|
+
/**
|
|
157
|
+
* Create a thread (immediate or scheduled).
|
|
158
|
+
* If `schedule_at` is set, the thread is queued and publishes within ~5 minutes
|
|
159
|
+
* of the scheduled time. Threads publish atomically — if any post fails, the
|
|
160
|
+
* entire thread is retried.
|
|
161
|
+
*
|
|
162
|
+
* @param input - Thread payload including `account_id`, an array of `posts` (text + optional `media_urls`), and optional `schedule_at`.
|
|
163
|
+
* @returns The created thread, including each post's id and status.
|
|
164
|
+
* @throws {ChirpieError} On network/transport failure.
|
|
165
|
+
* @throws {ChirpieApiError} On non-2xx responses (auth, validation, plan limit, platform error) or invalid JSON.
|
|
166
|
+
*/
|
|
138
167
|
createThread(input: CreateThreadInput): Promise<ApiThread>;
|
|
139
168
|
listAccounts(): Promise<ApiAccount[]>;
|
|
140
169
|
connectXAccount(): Promise<{
|
|
@@ -157,21 +186,27 @@ declare class ChirpieClient {
|
|
|
157
186
|
authorization_url: string;
|
|
158
187
|
}>;
|
|
159
188
|
connectTelegramAccount(input: ConnectTelegramInput): Promise<ApiAccount>;
|
|
189
|
+
/** Coming Soon. */
|
|
160
190
|
connectRedditAccount(): Promise<{
|
|
161
191
|
authorization_url: string;
|
|
162
192
|
}>;
|
|
193
|
+
/** Coming Soon. */
|
|
163
194
|
connectPinterestAccount(): Promise<{
|
|
164
195
|
authorization_url: string;
|
|
165
196
|
}>;
|
|
197
|
+
/** Coming Soon. */
|
|
166
198
|
connectTikTokAccount(): Promise<{
|
|
167
199
|
authorization_url: string;
|
|
168
200
|
}>;
|
|
201
|
+
/** Coming Soon. */
|
|
169
202
|
connectYouTubeAccount(): Promise<{
|
|
170
203
|
authorization_url: string;
|
|
171
204
|
}>;
|
|
205
|
+
/** Coming Soon. */
|
|
172
206
|
connectGBPAccount(): Promise<{
|
|
173
207
|
authorization_url: string;
|
|
174
208
|
}>;
|
|
209
|
+
/** Coming Soon. */
|
|
175
210
|
connectSnapchatAccount(): Promise<{
|
|
176
211
|
authorization_url: string;
|
|
177
212
|
}>;
|
package/dist/index.d.ts
CHANGED
|
@@ -102,6 +102,10 @@ interface CreatePostInput {
|
|
|
102
102
|
account_id: string;
|
|
103
103
|
text: string;
|
|
104
104
|
media_urls?: string[];
|
|
105
|
+
/**
|
|
106
|
+
* ISO 8601 datetime to schedule the post (UTC). Must be in the future.
|
|
107
|
+
* Scheduled posts publish within ~5 minutes of this time.
|
|
108
|
+
*/
|
|
105
109
|
schedule_at?: string;
|
|
106
110
|
}
|
|
107
111
|
interface CreateThreadInput {
|
|
@@ -110,6 +114,10 @@ interface CreateThreadInput {
|
|
|
110
114
|
text: string;
|
|
111
115
|
media_urls?: string[];
|
|
112
116
|
}[];
|
|
117
|
+
/**
|
|
118
|
+
* ISO 8601 datetime to schedule the entire thread (UTC). Must be in the future.
|
|
119
|
+
* Scheduled threads publish within ~5 minutes of this time.
|
|
120
|
+
*/
|
|
113
121
|
schedule_at?: string;
|
|
114
122
|
}
|
|
115
123
|
interface ListPostsOptions {
|
|
@@ -128,6 +136,16 @@ declare class ChirpieClient {
|
|
|
128
136
|
private baseUrl;
|
|
129
137
|
constructor(options: ChirpieClientOptions);
|
|
130
138
|
private request;
|
|
139
|
+
/**
|
|
140
|
+
* Create a post (immediate or scheduled).
|
|
141
|
+
* If `schedule_at` is set, the post is queued and publishes within ~5 minutes
|
|
142
|
+
* of the scheduled time.
|
|
143
|
+
*
|
|
144
|
+
* @param input - Post payload including `account_id`, `text`, optional `media_urls`, and optional `schedule_at`.
|
|
145
|
+
* @returns The created post.
|
|
146
|
+
* @throws {ChirpieError} On network/transport failure.
|
|
147
|
+
* @throws {ChirpieApiError} On non-2xx responses (auth, validation, plan limit, platform error) or invalid JSON.
|
|
148
|
+
*/
|
|
131
149
|
createPost(input: CreatePostInput): Promise<ApiPost>;
|
|
132
150
|
listPosts(options?: ListPostsOptions): Promise<ApiPost[]>;
|
|
133
151
|
getPost(id: string): Promise<ApiPost>;
|
|
@@ -135,6 +153,17 @@ declare class ChirpieClient {
|
|
|
135
153
|
id: string;
|
|
136
154
|
deleted: boolean;
|
|
137
155
|
}>;
|
|
156
|
+
/**
|
|
157
|
+
* Create a thread (immediate or scheduled).
|
|
158
|
+
* If `schedule_at` is set, the thread is queued and publishes within ~5 minutes
|
|
159
|
+
* of the scheduled time. Threads publish atomically — if any post fails, the
|
|
160
|
+
* entire thread is retried.
|
|
161
|
+
*
|
|
162
|
+
* @param input - Thread payload including `account_id`, an array of `posts` (text + optional `media_urls`), and optional `schedule_at`.
|
|
163
|
+
* @returns The created thread, including each post's id and status.
|
|
164
|
+
* @throws {ChirpieError} On network/transport failure.
|
|
165
|
+
* @throws {ChirpieApiError} On non-2xx responses (auth, validation, plan limit, platform error) or invalid JSON.
|
|
166
|
+
*/
|
|
138
167
|
createThread(input: CreateThreadInput): Promise<ApiThread>;
|
|
139
168
|
listAccounts(): Promise<ApiAccount[]>;
|
|
140
169
|
connectXAccount(): Promise<{
|
|
@@ -157,21 +186,27 @@ declare class ChirpieClient {
|
|
|
157
186
|
authorization_url: string;
|
|
158
187
|
}>;
|
|
159
188
|
connectTelegramAccount(input: ConnectTelegramInput): Promise<ApiAccount>;
|
|
189
|
+
/** Coming Soon. */
|
|
160
190
|
connectRedditAccount(): Promise<{
|
|
161
191
|
authorization_url: string;
|
|
162
192
|
}>;
|
|
193
|
+
/** Coming Soon. */
|
|
163
194
|
connectPinterestAccount(): Promise<{
|
|
164
195
|
authorization_url: string;
|
|
165
196
|
}>;
|
|
197
|
+
/** Coming Soon. */
|
|
166
198
|
connectTikTokAccount(): Promise<{
|
|
167
199
|
authorization_url: string;
|
|
168
200
|
}>;
|
|
201
|
+
/** Coming Soon. */
|
|
169
202
|
connectYouTubeAccount(): Promise<{
|
|
170
203
|
authorization_url: string;
|
|
171
204
|
}>;
|
|
205
|
+
/** Coming Soon. */
|
|
172
206
|
connectGBPAccount(): Promise<{
|
|
173
207
|
authorization_url: string;
|
|
174
208
|
}>;
|
|
209
|
+
/** Coming Soon. */
|
|
175
210
|
connectSnapchatAccount(): Promise<{
|
|
176
211
|
authorization_url: string;
|
|
177
212
|
}>;
|
package/dist/index.js
CHANGED
|
@@ -90,6 +90,16 @@ var ChirpieClient = class {
|
|
|
90
90
|
return json.data;
|
|
91
91
|
}
|
|
92
92
|
// Posts
|
|
93
|
+
/**
|
|
94
|
+
* Create a post (immediate or scheduled).
|
|
95
|
+
* If `schedule_at` is set, the post is queued and publishes within ~5 minutes
|
|
96
|
+
* of the scheduled time.
|
|
97
|
+
*
|
|
98
|
+
* @param input - Post payload including `account_id`, `text`, optional `media_urls`, and optional `schedule_at`.
|
|
99
|
+
* @returns The created post.
|
|
100
|
+
* @throws {ChirpieError} On network/transport failure.
|
|
101
|
+
* @throws {ChirpieApiError} On non-2xx responses (auth, validation, plan limit, platform error) or invalid JSON.
|
|
102
|
+
*/
|
|
93
103
|
async createPost(input) {
|
|
94
104
|
return this.request("POST", "/posts", input);
|
|
95
105
|
}
|
|
@@ -109,6 +119,17 @@ var ChirpieClient = class {
|
|
|
109
119
|
return this.request("DELETE", `/posts/${id}`);
|
|
110
120
|
}
|
|
111
121
|
// Threads
|
|
122
|
+
/**
|
|
123
|
+
* Create a thread (immediate or scheduled).
|
|
124
|
+
* If `schedule_at` is set, the thread is queued and publishes within ~5 minutes
|
|
125
|
+
* of the scheduled time. Threads publish atomically — if any post fails, the
|
|
126
|
+
* entire thread is retried.
|
|
127
|
+
*
|
|
128
|
+
* @param input - Thread payload including `account_id`, an array of `posts` (text + optional `media_urls`), and optional `schedule_at`.
|
|
129
|
+
* @returns The created thread, including each post's id and status.
|
|
130
|
+
* @throws {ChirpieError} On network/transport failure.
|
|
131
|
+
* @throws {ChirpieApiError} On non-2xx responses (auth, validation, plan limit, platform error) or invalid JSON.
|
|
132
|
+
*/
|
|
112
133
|
async createThread(input) {
|
|
113
134
|
return this.request("POST", "/threads", input);
|
|
114
135
|
}
|
|
@@ -148,31 +169,37 @@ var ChirpieClient = class {
|
|
|
148
169
|
async connectTelegramAccount(input) {
|
|
149
170
|
return this.request("POST", "/accounts", input);
|
|
150
171
|
}
|
|
172
|
+
/** Coming Soon. */
|
|
151
173
|
async connectRedditAccount() {
|
|
152
174
|
return this.request("POST", "/accounts", {
|
|
153
175
|
platform: "reddit"
|
|
154
176
|
});
|
|
155
177
|
}
|
|
178
|
+
/** Coming Soon. */
|
|
156
179
|
async connectPinterestAccount() {
|
|
157
180
|
return this.request("POST", "/accounts", {
|
|
158
181
|
platform: "pinterest"
|
|
159
182
|
});
|
|
160
183
|
}
|
|
184
|
+
/** Coming Soon. */
|
|
161
185
|
async connectTikTokAccount() {
|
|
162
186
|
return this.request("POST", "/accounts", {
|
|
163
187
|
platform: "tiktok"
|
|
164
188
|
});
|
|
165
189
|
}
|
|
190
|
+
/** Coming Soon. */
|
|
166
191
|
async connectYouTubeAccount() {
|
|
167
192
|
return this.request("POST", "/accounts", {
|
|
168
193
|
platform: "youtube"
|
|
169
194
|
});
|
|
170
195
|
}
|
|
196
|
+
/** Coming Soon. */
|
|
171
197
|
async connectGBPAccount() {
|
|
172
198
|
return this.request("POST", "/accounts", {
|
|
173
199
|
platform: "google_business"
|
|
174
200
|
});
|
|
175
201
|
}
|
|
202
|
+
/** Coming Soon. */
|
|
176
203
|
async connectSnapchatAccount() {
|
|
177
204
|
return this.request("POST", "/accounts", {
|
|
178
205
|
platform: "snapchat"
|
package/dist/index.mjs
CHANGED
|
@@ -58,6 +58,16 @@ var ChirpieClient = class {
|
|
|
58
58
|
return json.data;
|
|
59
59
|
}
|
|
60
60
|
// Posts
|
|
61
|
+
/**
|
|
62
|
+
* Create a post (immediate or scheduled).
|
|
63
|
+
* If `schedule_at` is set, the post is queued and publishes within ~5 minutes
|
|
64
|
+
* of the scheduled time.
|
|
65
|
+
*
|
|
66
|
+
* @param input - Post payload including `account_id`, `text`, optional `media_urls`, and optional `schedule_at`.
|
|
67
|
+
* @returns The created post.
|
|
68
|
+
* @throws {ChirpieError} On network/transport failure.
|
|
69
|
+
* @throws {ChirpieApiError} On non-2xx responses (auth, validation, plan limit, platform error) or invalid JSON.
|
|
70
|
+
*/
|
|
61
71
|
async createPost(input) {
|
|
62
72
|
return this.request("POST", "/posts", input);
|
|
63
73
|
}
|
|
@@ -77,6 +87,17 @@ var ChirpieClient = class {
|
|
|
77
87
|
return this.request("DELETE", `/posts/${id}`);
|
|
78
88
|
}
|
|
79
89
|
// Threads
|
|
90
|
+
/**
|
|
91
|
+
* Create a thread (immediate or scheduled).
|
|
92
|
+
* If `schedule_at` is set, the thread is queued and publishes within ~5 minutes
|
|
93
|
+
* of the scheduled time. Threads publish atomically — if any post fails, the
|
|
94
|
+
* entire thread is retried.
|
|
95
|
+
*
|
|
96
|
+
* @param input - Thread payload including `account_id`, an array of `posts` (text + optional `media_urls`), and optional `schedule_at`.
|
|
97
|
+
* @returns The created thread, including each post's id and status.
|
|
98
|
+
* @throws {ChirpieError} On network/transport failure.
|
|
99
|
+
* @throws {ChirpieApiError} On non-2xx responses (auth, validation, plan limit, platform error) or invalid JSON.
|
|
100
|
+
*/
|
|
80
101
|
async createThread(input) {
|
|
81
102
|
return this.request("POST", "/threads", input);
|
|
82
103
|
}
|
|
@@ -116,31 +137,37 @@ var ChirpieClient = class {
|
|
|
116
137
|
async connectTelegramAccount(input) {
|
|
117
138
|
return this.request("POST", "/accounts", input);
|
|
118
139
|
}
|
|
140
|
+
/** Coming Soon. */
|
|
119
141
|
async connectRedditAccount() {
|
|
120
142
|
return this.request("POST", "/accounts", {
|
|
121
143
|
platform: "reddit"
|
|
122
144
|
});
|
|
123
145
|
}
|
|
146
|
+
/** Coming Soon. */
|
|
124
147
|
async connectPinterestAccount() {
|
|
125
148
|
return this.request("POST", "/accounts", {
|
|
126
149
|
platform: "pinterest"
|
|
127
150
|
});
|
|
128
151
|
}
|
|
152
|
+
/** Coming Soon. */
|
|
129
153
|
async connectTikTokAccount() {
|
|
130
154
|
return this.request("POST", "/accounts", {
|
|
131
155
|
platform: "tiktok"
|
|
132
156
|
});
|
|
133
157
|
}
|
|
158
|
+
/** Coming Soon. */
|
|
134
159
|
async connectYouTubeAccount() {
|
|
135
160
|
return this.request("POST", "/accounts", {
|
|
136
161
|
platform: "youtube"
|
|
137
162
|
});
|
|
138
163
|
}
|
|
164
|
+
/** Coming Soon. */
|
|
139
165
|
async connectGBPAccount() {
|
|
140
166
|
return this.request("POST", "/accounts", {
|
|
141
167
|
platform: "google_business"
|
|
142
168
|
});
|
|
143
169
|
}
|
|
170
|
+
/** Coming Soon. */
|
|
144
171
|
async connectSnapchatAccount() {
|
|
145
172
|
return this.request("POST", "/accounts", {
|
|
146
173
|
platform: "snapchat"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chirpie/sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"description": "Chirpie SDK — TypeScript client for the Chirpie social media API",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,8 +33,25 @@
|
|
|
33
33
|
"social-media",
|
|
34
34
|
"api",
|
|
35
35
|
"sdk",
|
|
36
|
+
"x",
|
|
36
37
|
"twitter",
|
|
37
|
-
"
|
|
38
|
+
"bluesky",
|
|
39
|
+
"linkedin",
|
|
40
|
+
"threads",
|
|
41
|
+
"mastodon",
|
|
42
|
+
"instagram",
|
|
43
|
+
"facebook",
|
|
44
|
+
"telegram",
|
|
45
|
+
"reddit",
|
|
46
|
+
"pinterest",
|
|
47
|
+
"tiktok",
|
|
48
|
+
"youtube",
|
|
49
|
+
"google-business",
|
|
50
|
+
"snapchat",
|
|
51
|
+
"fediverse",
|
|
52
|
+
"scheduling",
|
|
53
|
+
"agent",
|
|
54
|
+
"llm"
|
|
38
55
|
],
|
|
39
56
|
"license": "MIT",
|
|
40
57
|
"devDependencies": {
|