@chirpie/sdk 1.0.1 → 1.0.2
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 +20 -5
- package/dist/index.d.ts +20 -5
- package/dist/index.js +8 -1
- package/dist/index.mjs +8 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
type Platform = "x" | "bluesky";
|
|
1
2
|
interface ApiPost {
|
|
2
3
|
id: string;
|
|
4
|
+
platform: Platform;
|
|
3
5
|
account_id: string;
|
|
4
6
|
text: string;
|
|
5
7
|
media_urls: string[] | null;
|
|
@@ -9,10 +11,12 @@ interface ApiPost {
|
|
|
9
11
|
published_at: string | null;
|
|
10
12
|
thread_id: string | null;
|
|
11
13
|
thread_order: number | null;
|
|
14
|
+
error_message: string | null;
|
|
12
15
|
created_at: string;
|
|
13
16
|
}
|
|
14
17
|
interface ApiThread {
|
|
15
18
|
id: string;
|
|
19
|
+
platform: Platform;
|
|
16
20
|
account_id: string;
|
|
17
21
|
posts: ApiPost[];
|
|
18
22
|
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
@@ -21,17 +25,18 @@ interface ApiThread {
|
|
|
21
25
|
}
|
|
22
26
|
interface ApiAccount {
|
|
23
27
|
id: string;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
platform: Platform;
|
|
29
|
+
platform_user_id: string;
|
|
30
|
+
username: string;
|
|
31
|
+
display_name: string | null;
|
|
32
|
+
avatar_url: string | null;
|
|
29
33
|
max_post_length: number;
|
|
30
34
|
is_active: boolean;
|
|
31
35
|
created_at: string;
|
|
32
36
|
}
|
|
33
37
|
interface ApiAnalytics {
|
|
34
38
|
post_id: string;
|
|
39
|
+
platform: Platform;
|
|
35
40
|
impressions: number;
|
|
36
41
|
likes: number;
|
|
37
42
|
retweets: number;
|
|
@@ -41,6 +46,11 @@ interface ApiAnalytics {
|
|
|
41
46
|
clicks: number;
|
|
42
47
|
fetched_at: string;
|
|
43
48
|
}
|
|
49
|
+
interface ConnectBlueskyInput {
|
|
50
|
+
platform: "bluesky";
|
|
51
|
+
identifier: string;
|
|
52
|
+
app_password: string;
|
|
53
|
+
}
|
|
44
54
|
interface ApiKeyInfo {
|
|
45
55
|
id: string;
|
|
46
56
|
name: string;
|
|
@@ -88,6 +98,11 @@ declare class ChirpieClient {
|
|
|
88
98
|
}>;
|
|
89
99
|
createThread(input: CreateThreadInput): Promise<ApiThread>;
|
|
90
100
|
listAccounts(): Promise<ApiAccount[]>;
|
|
101
|
+
connectXAccount(): Promise<{
|
|
102
|
+
authorization_url: string;
|
|
103
|
+
}>;
|
|
104
|
+
connectBlueskyAccount(input: ConnectBlueskyInput): Promise<ApiAccount>;
|
|
105
|
+
/** @deprecated Use connectXAccount() or connectBlueskyAccount() instead */
|
|
91
106
|
connectAccount(): Promise<{
|
|
92
107
|
authorization_url: string;
|
|
93
108
|
}>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
type Platform = "x" | "bluesky";
|
|
1
2
|
interface ApiPost {
|
|
2
3
|
id: string;
|
|
4
|
+
platform: Platform;
|
|
3
5
|
account_id: string;
|
|
4
6
|
text: string;
|
|
5
7
|
media_urls: string[] | null;
|
|
@@ -9,10 +11,12 @@ interface ApiPost {
|
|
|
9
11
|
published_at: string | null;
|
|
10
12
|
thread_id: string | null;
|
|
11
13
|
thread_order: number | null;
|
|
14
|
+
error_message: string | null;
|
|
12
15
|
created_at: string;
|
|
13
16
|
}
|
|
14
17
|
interface ApiThread {
|
|
15
18
|
id: string;
|
|
19
|
+
platform: Platform;
|
|
16
20
|
account_id: string;
|
|
17
21
|
posts: ApiPost[];
|
|
18
22
|
status: "draft" | "scheduled" | "publishing" | "published" | "failed";
|
|
@@ -21,17 +25,18 @@ interface ApiThread {
|
|
|
21
25
|
}
|
|
22
26
|
interface ApiAccount {
|
|
23
27
|
id: string;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
platform: Platform;
|
|
29
|
+
platform_user_id: string;
|
|
30
|
+
username: string;
|
|
31
|
+
display_name: string | null;
|
|
32
|
+
avatar_url: string | null;
|
|
29
33
|
max_post_length: number;
|
|
30
34
|
is_active: boolean;
|
|
31
35
|
created_at: string;
|
|
32
36
|
}
|
|
33
37
|
interface ApiAnalytics {
|
|
34
38
|
post_id: string;
|
|
39
|
+
platform: Platform;
|
|
35
40
|
impressions: number;
|
|
36
41
|
likes: number;
|
|
37
42
|
retweets: number;
|
|
@@ -41,6 +46,11 @@ interface ApiAnalytics {
|
|
|
41
46
|
clicks: number;
|
|
42
47
|
fetched_at: string;
|
|
43
48
|
}
|
|
49
|
+
interface ConnectBlueskyInput {
|
|
50
|
+
platform: "bluesky";
|
|
51
|
+
identifier: string;
|
|
52
|
+
app_password: string;
|
|
53
|
+
}
|
|
44
54
|
interface ApiKeyInfo {
|
|
45
55
|
id: string;
|
|
46
56
|
name: string;
|
|
@@ -88,6 +98,11 @@ declare class ChirpieClient {
|
|
|
88
98
|
}>;
|
|
89
99
|
createThread(input: CreateThreadInput): Promise<ApiThread>;
|
|
90
100
|
listAccounts(): Promise<ApiAccount[]>;
|
|
101
|
+
connectXAccount(): Promise<{
|
|
102
|
+
authorization_url: string;
|
|
103
|
+
}>;
|
|
104
|
+
connectBlueskyAccount(input: ConnectBlueskyInput): Promise<ApiAccount>;
|
|
105
|
+
/** @deprecated Use connectXAccount() or connectBlueskyAccount() instead */
|
|
91
106
|
connectAccount(): Promise<{
|
|
92
107
|
authorization_url: string;
|
|
93
108
|
}>;
|
package/dist/index.js
CHANGED
|
@@ -104,9 +104,16 @@ var ChirpieClient = class {
|
|
|
104
104
|
async listAccounts() {
|
|
105
105
|
return this.request("GET", "/accounts");
|
|
106
106
|
}
|
|
107
|
-
async
|
|
107
|
+
async connectXAccount() {
|
|
108
108
|
return this.request("POST", "/accounts");
|
|
109
109
|
}
|
|
110
|
+
async connectBlueskyAccount(input) {
|
|
111
|
+
return this.request("POST", "/accounts", input);
|
|
112
|
+
}
|
|
113
|
+
/** @deprecated Use connectXAccount() or connectBlueskyAccount() instead */
|
|
114
|
+
async connectAccount() {
|
|
115
|
+
return this.connectXAccount();
|
|
116
|
+
}
|
|
110
117
|
// Keys
|
|
111
118
|
async createKey(name) {
|
|
112
119
|
return this.request(
|
package/dist/index.mjs
CHANGED
|
@@ -72,9 +72,16 @@ var ChirpieClient = class {
|
|
|
72
72
|
async listAccounts() {
|
|
73
73
|
return this.request("GET", "/accounts");
|
|
74
74
|
}
|
|
75
|
-
async
|
|
75
|
+
async connectXAccount() {
|
|
76
76
|
return this.request("POST", "/accounts");
|
|
77
77
|
}
|
|
78
|
+
async connectBlueskyAccount(input) {
|
|
79
|
+
return this.request("POST", "/accounts", input);
|
|
80
|
+
}
|
|
81
|
+
/** @deprecated Use connectXAccount() or connectBlueskyAccount() instead */
|
|
82
|
+
async connectAccount() {
|
|
83
|
+
return this.connectXAccount();
|
|
84
|
+
}
|
|
78
85
|
// Keys
|
|
79
86
|
async createKey(name) {
|
|
80
87
|
return this.request(
|