@chirpie/sdk 1.0.4 → 1.0.5

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 CHANGED
@@ -1,4 +1,4 @@
1
- type Platform = "x" | "bluesky" | "linkedin" | "threads";
1
+ type Platform = "x" | "bluesky" | "linkedin" | "threads" | "mastodon";
2
2
  interface ApiPost {
3
3
  id: string;
4
4
  platform: Platform;
@@ -51,6 +51,16 @@ interface ConnectBlueskyInput {
51
51
  identifier: string;
52
52
  app_password: string;
53
53
  }
54
+ interface ConnectMastodonInput {
55
+ platform: "mastodon";
56
+ instance_url: string;
57
+ }
58
+ interface ConnectLinkedInInput {
59
+ platform: "linkedin";
60
+ }
61
+ interface ConnectThreadsInput {
62
+ platform: "threads";
63
+ }
54
64
  interface ApiKeyInfo {
55
65
  id: string;
56
66
  name: string;
@@ -108,7 +118,10 @@ declare class ChirpieClient {
108
118
  connectThreadsAccount(): Promise<{
109
119
  authorization_url: string;
110
120
  }>;
111
- /** @deprecated Use connectXAccount(), connectBlueskyAccount(), connectLinkedInAccount(), or connectThreadsAccount() instead */
121
+ connectMastodonAccount(input: ConnectMastodonInput): Promise<{
122
+ authorization_url: string;
123
+ }>;
124
+ /** @deprecated Use connectXAccount(), connectBlueskyAccount(), connectLinkedInAccount(), connectThreadsAccount(), or connectMastodonAccount() instead */
112
125
  connectAccount(): Promise<{
113
126
  authorization_url: string;
114
127
  }>;
@@ -155,4 +168,4 @@ declare function deleteConfig(): boolean;
155
168
  */
156
169
  declare function requireConfig(): ChirpieConfig;
157
170
 
158
- export { type ApiAccount, type ApiAnalytics, type ApiKeyInfo, type ApiPost, type ApiThread, ChirpieApiError, ChirpieClient, type ChirpieClientOptions, type ChirpieConfig, ChirpieError, type CreatePostInput, type CreateThreadInput, type ListPostsOptions, deleteConfig, getConfig, requireConfig, saveConfig };
171
+ export { type ApiAccount, type ApiAnalytics, type ApiKeyInfo, type ApiPost, type ApiThread, ChirpieApiError, ChirpieClient, type ChirpieClientOptions, type ChirpieConfig, ChirpieError, type ConnectBlueskyInput, type ConnectLinkedInInput, type ConnectMastodonInput, type ConnectThreadsInput, 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";
1
+ type Platform = "x" | "bluesky" | "linkedin" | "threads" | "mastodon";
2
2
  interface ApiPost {
3
3
  id: string;
4
4
  platform: Platform;
@@ -51,6 +51,16 @@ interface ConnectBlueskyInput {
51
51
  identifier: string;
52
52
  app_password: string;
53
53
  }
54
+ interface ConnectMastodonInput {
55
+ platform: "mastodon";
56
+ instance_url: string;
57
+ }
58
+ interface ConnectLinkedInInput {
59
+ platform: "linkedin";
60
+ }
61
+ interface ConnectThreadsInput {
62
+ platform: "threads";
63
+ }
54
64
  interface ApiKeyInfo {
55
65
  id: string;
56
66
  name: string;
@@ -108,7 +118,10 @@ declare class ChirpieClient {
108
118
  connectThreadsAccount(): Promise<{
109
119
  authorization_url: string;
110
120
  }>;
111
- /** @deprecated Use connectXAccount(), connectBlueskyAccount(), connectLinkedInAccount(), or connectThreadsAccount() instead */
121
+ connectMastodonAccount(input: ConnectMastodonInput): Promise<{
122
+ authorization_url: string;
123
+ }>;
124
+ /** @deprecated Use connectXAccount(), connectBlueskyAccount(), connectLinkedInAccount(), connectThreadsAccount(), or connectMastodonAccount() instead */
112
125
  connectAccount(): Promise<{
113
126
  authorization_url: string;
114
127
  }>;
@@ -155,4 +168,4 @@ declare function deleteConfig(): boolean;
155
168
  */
156
169
  declare function requireConfig(): ChirpieConfig;
157
170
 
158
- export { type ApiAccount, type ApiAnalytics, type ApiKeyInfo, type ApiPost, type ApiThread, ChirpieApiError, ChirpieClient, type ChirpieClientOptions, type ChirpieConfig, ChirpieError, type CreatePostInput, type CreateThreadInput, type ListPostsOptions, deleteConfig, getConfig, requireConfig, saveConfig };
171
+ export { type ApiAccount, type ApiAnalytics, type ApiKeyInfo, type ApiPost, type ApiThread, ChirpieApiError, ChirpieClient, type ChirpieClientOptions, type ChirpieConfig, ChirpieError, type ConnectBlueskyInput, type ConnectLinkedInInput, type ConnectMastodonInput, type ConnectThreadsInput, type CreatePostInput, type CreateThreadInput, type ListPostsOptions, deleteConfig, getConfig, requireConfig, saveConfig };
package/dist/index.js CHANGED
@@ -120,7 +120,10 @@ var ChirpieClient = class {
120
120
  platform: "threads"
121
121
  });
122
122
  }
123
- /** @deprecated Use connectXAccount(), connectBlueskyAccount(), connectLinkedInAccount(), or connectThreadsAccount() instead */
123
+ async connectMastodonAccount(input) {
124
+ return this.request("POST", "/accounts", input);
125
+ }
126
+ /** @deprecated Use connectXAccount(), connectBlueskyAccount(), connectLinkedInAccount(), connectThreadsAccount(), or connectMastodonAccount() instead */
124
127
  async connectAccount() {
125
128
  return this.connectXAccount();
126
129
  }
package/dist/index.mjs CHANGED
@@ -88,7 +88,10 @@ var ChirpieClient = class {
88
88
  platform: "threads"
89
89
  });
90
90
  }
91
- /** @deprecated Use connectXAccount(), connectBlueskyAccount(), connectLinkedInAccount(), or connectThreadsAccount() instead */
91
+ async connectMastodonAccount(input) {
92
+ return this.request("POST", "/accounts", input);
93
+ }
94
+ /** @deprecated Use connectXAccount(), connectBlueskyAccount(), connectLinkedInAccount(), connectThreadsAccount(), or connectMastodonAccount() instead */
92
95
  async connectAccount() {
93
96
  return this.connectXAccount();
94
97
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chirpie/sdk",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Chirpie SDK — TypeScript client for the Chirpie social media API",
5
5
  "repository": {
6
6
  "type": "git",