@chirpie/sdk 1.0.10 → 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 +29 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.js +21 -0
- package/dist/index.mjs +21 -0
- package/package.json +1 -1
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<{
|
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<{
|
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
|
}
|
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
|
}
|