@chirpie/sdk 1.0.8 → 1.0.10
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 +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +24 -6
- package/dist/index.mjs +24 -6
- package/package.json +19 -2
package/dist/index.d.mts
CHANGED
|
@@ -157,21 +157,27 @@ declare class ChirpieClient {
|
|
|
157
157
|
authorization_url: string;
|
|
158
158
|
}>;
|
|
159
159
|
connectTelegramAccount(input: ConnectTelegramInput): Promise<ApiAccount>;
|
|
160
|
+
/** Coming Soon. */
|
|
160
161
|
connectRedditAccount(): Promise<{
|
|
161
162
|
authorization_url: string;
|
|
162
163
|
}>;
|
|
164
|
+
/** Coming Soon. */
|
|
163
165
|
connectPinterestAccount(): Promise<{
|
|
164
166
|
authorization_url: string;
|
|
165
167
|
}>;
|
|
168
|
+
/** Coming Soon. */
|
|
166
169
|
connectTikTokAccount(): Promise<{
|
|
167
170
|
authorization_url: string;
|
|
168
171
|
}>;
|
|
172
|
+
/** Coming Soon. */
|
|
169
173
|
connectYouTubeAccount(): Promise<{
|
|
170
174
|
authorization_url: string;
|
|
171
175
|
}>;
|
|
176
|
+
/** Coming Soon. */
|
|
172
177
|
connectGBPAccount(): Promise<{
|
|
173
178
|
authorization_url: string;
|
|
174
179
|
}>;
|
|
180
|
+
/** Coming Soon. */
|
|
175
181
|
connectSnapchatAccount(): Promise<{
|
|
176
182
|
authorization_url: string;
|
|
177
183
|
}>;
|
package/dist/index.d.ts
CHANGED
|
@@ -157,21 +157,27 @@ declare class ChirpieClient {
|
|
|
157
157
|
authorization_url: string;
|
|
158
158
|
}>;
|
|
159
159
|
connectTelegramAccount(input: ConnectTelegramInput): Promise<ApiAccount>;
|
|
160
|
+
/** Coming Soon. */
|
|
160
161
|
connectRedditAccount(): Promise<{
|
|
161
162
|
authorization_url: string;
|
|
162
163
|
}>;
|
|
164
|
+
/** Coming Soon. */
|
|
163
165
|
connectPinterestAccount(): Promise<{
|
|
164
166
|
authorization_url: string;
|
|
165
167
|
}>;
|
|
168
|
+
/** Coming Soon. */
|
|
166
169
|
connectTikTokAccount(): Promise<{
|
|
167
170
|
authorization_url: string;
|
|
168
171
|
}>;
|
|
172
|
+
/** Coming Soon. */
|
|
169
173
|
connectYouTubeAccount(): Promise<{
|
|
170
174
|
authorization_url: string;
|
|
171
175
|
}>;
|
|
176
|
+
/** Coming Soon. */
|
|
172
177
|
connectGBPAccount(): Promise<{
|
|
173
178
|
authorization_url: string;
|
|
174
179
|
}>;
|
|
180
|
+
/** Coming Soon. */
|
|
175
181
|
connectSnapchatAccount(): Promise<{
|
|
176
182
|
authorization_url: string;
|
|
177
183
|
}>;
|
package/dist/index.js
CHANGED
|
@@ -65,12 +65,24 @@ var ChirpieClient = class {
|
|
|
65
65
|
Authorization: `Bearer ${this.apiKey}`,
|
|
66
66
|
"Content-Type": "application/json"
|
|
67
67
|
};
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
let res;
|
|
69
|
+
try {
|
|
70
|
+
res = await fetch(url, {
|
|
71
|
+
method,
|
|
72
|
+
headers,
|
|
73
|
+
body: body ? JSON.stringify(body) : void 0
|
|
74
|
+
});
|
|
75
|
+
} catch (err) {
|
|
76
|
+
throw new ChirpieError(
|
|
77
|
+
err instanceof Error ? `Network error: ${err.message}` : "Network error"
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
let json;
|
|
81
|
+
try {
|
|
82
|
+
json = await res.json();
|
|
83
|
+
} catch {
|
|
84
|
+
throw new ChirpieApiError("parse_error", "Invalid response from server", res.status);
|
|
85
|
+
}
|
|
74
86
|
if (!res.ok) {
|
|
75
87
|
const err = json.error ?? { code: "unknown", message: "Request failed" };
|
|
76
88
|
throw new ChirpieApiError(err.code, err.message, res.status);
|
|
@@ -136,31 +148,37 @@ var ChirpieClient = class {
|
|
|
136
148
|
async connectTelegramAccount(input) {
|
|
137
149
|
return this.request("POST", "/accounts", input);
|
|
138
150
|
}
|
|
151
|
+
/** Coming Soon. */
|
|
139
152
|
async connectRedditAccount() {
|
|
140
153
|
return this.request("POST", "/accounts", {
|
|
141
154
|
platform: "reddit"
|
|
142
155
|
});
|
|
143
156
|
}
|
|
157
|
+
/** Coming Soon. */
|
|
144
158
|
async connectPinterestAccount() {
|
|
145
159
|
return this.request("POST", "/accounts", {
|
|
146
160
|
platform: "pinterest"
|
|
147
161
|
});
|
|
148
162
|
}
|
|
163
|
+
/** Coming Soon. */
|
|
149
164
|
async connectTikTokAccount() {
|
|
150
165
|
return this.request("POST", "/accounts", {
|
|
151
166
|
platform: "tiktok"
|
|
152
167
|
});
|
|
153
168
|
}
|
|
169
|
+
/** Coming Soon. */
|
|
154
170
|
async connectYouTubeAccount() {
|
|
155
171
|
return this.request("POST", "/accounts", {
|
|
156
172
|
platform: "youtube"
|
|
157
173
|
});
|
|
158
174
|
}
|
|
175
|
+
/** Coming Soon. */
|
|
159
176
|
async connectGBPAccount() {
|
|
160
177
|
return this.request("POST", "/accounts", {
|
|
161
178
|
platform: "google_business"
|
|
162
179
|
});
|
|
163
180
|
}
|
|
181
|
+
/** Coming Soon. */
|
|
164
182
|
async connectSnapchatAccount() {
|
|
165
183
|
return this.request("POST", "/accounts", {
|
|
166
184
|
platform: "snapchat"
|
package/dist/index.mjs
CHANGED
|
@@ -33,12 +33,24 @@ var ChirpieClient = class {
|
|
|
33
33
|
Authorization: `Bearer ${this.apiKey}`,
|
|
34
34
|
"Content-Type": "application/json"
|
|
35
35
|
};
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
let res;
|
|
37
|
+
try {
|
|
38
|
+
res = await fetch(url, {
|
|
39
|
+
method,
|
|
40
|
+
headers,
|
|
41
|
+
body: body ? JSON.stringify(body) : void 0
|
|
42
|
+
});
|
|
43
|
+
} catch (err) {
|
|
44
|
+
throw new ChirpieError(
|
|
45
|
+
err instanceof Error ? `Network error: ${err.message}` : "Network error"
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
let json;
|
|
49
|
+
try {
|
|
50
|
+
json = await res.json();
|
|
51
|
+
} catch {
|
|
52
|
+
throw new ChirpieApiError("parse_error", "Invalid response from server", res.status);
|
|
53
|
+
}
|
|
42
54
|
if (!res.ok) {
|
|
43
55
|
const err = json.error ?? { code: "unknown", message: "Request failed" };
|
|
44
56
|
throw new ChirpieApiError(err.code, err.message, res.status);
|
|
@@ -104,31 +116,37 @@ var ChirpieClient = class {
|
|
|
104
116
|
async connectTelegramAccount(input) {
|
|
105
117
|
return this.request("POST", "/accounts", input);
|
|
106
118
|
}
|
|
119
|
+
/** Coming Soon. */
|
|
107
120
|
async connectRedditAccount() {
|
|
108
121
|
return this.request("POST", "/accounts", {
|
|
109
122
|
platform: "reddit"
|
|
110
123
|
});
|
|
111
124
|
}
|
|
125
|
+
/** Coming Soon. */
|
|
112
126
|
async connectPinterestAccount() {
|
|
113
127
|
return this.request("POST", "/accounts", {
|
|
114
128
|
platform: "pinterest"
|
|
115
129
|
});
|
|
116
130
|
}
|
|
131
|
+
/** Coming Soon. */
|
|
117
132
|
async connectTikTokAccount() {
|
|
118
133
|
return this.request("POST", "/accounts", {
|
|
119
134
|
platform: "tiktok"
|
|
120
135
|
});
|
|
121
136
|
}
|
|
137
|
+
/** Coming Soon. */
|
|
122
138
|
async connectYouTubeAccount() {
|
|
123
139
|
return this.request("POST", "/accounts", {
|
|
124
140
|
platform: "youtube"
|
|
125
141
|
});
|
|
126
142
|
}
|
|
143
|
+
/** Coming Soon. */
|
|
127
144
|
async connectGBPAccount() {
|
|
128
145
|
return this.request("POST", "/accounts", {
|
|
129
146
|
platform: "google_business"
|
|
130
147
|
});
|
|
131
148
|
}
|
|
149
|
+
/** Coming Soon. */
|
|
132
150
|
async connectSnapchatAccount() {
|
|
133
151
|
return this.request("POST", "/accounts", {
|
|
134
152
|
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.10",
|
|
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": {
|