@chirpie/sdk 1.0.4 → 1.0.6

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" | "instagram" | "facebook";
2
2
  interface ApiPost {
3
3
  id: string;
4
4
  platform: Platform;
@@ -51,6 +51,22 @@ 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
+ }
64
+ interface ConnectInstagramInput {
65
+ platform: "instagram";
66
+ }
67
+ interface ConnectFacebookInput {
68
+ platform: "facebook";
69
+ }
54
70
  interface ApiKeyInfo {
55
71
  id: string;
56
72
  name: string;
@@ -108,7 +124,16 @@ declare class ChirpieClient {
108
124
  connectThreadsAccount(): Promise<{
109
125
  authorization_url: string;
110
126
  }>;
111
- /** @deprecated Use connectXAccount(), connectBlueskyAccount(), connectLinkedInAccount(), or connectThreadsAccount() instead */
127
+ connectMastodonAccount(input: ConnectMastodonInput): Promise<{
128
+ authorization_url: string;
129
+ }>;
130
+ connectInstagramAccount(): Promise<{
131
+ authorization_url: string;
132
+ }>;
133
+ connectFacebookAccount(): Promise<{
134
+ authorization_url: string;
135
+ }>;
136
+ /** @deprecated Use connectXAccount(), connectBlueskyAccount(), connectLinkedInAccount(), connectThreadsAccount(), connectMastodonAccount(), connectInstagramAccount(), or connectFacebookAccount() instead */
112
137
  connectAccount(): Promise<{
113
138
  authorization_url: string;
114
139
  }>;
@@ -155,4 +180,4 @@ declare function deleteConfig(): boolean;
155
180
  */
156
181
  declare function requireConfig(): ChirpieConfig;
157
182
 
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 };
183
+ export { type ApiAccount, type ApiAnalytics, type ApiKeyInfo, type ApiPost, type ApiThread, ChirpieApiError, ChirpieClient, type ChirpieClientOptions, type ChirpieConfig, ChirpieError, type ConnectBlueskyInput, type ConnectFacebookInput, type ConnectInstagramInput, 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" | "instagram" | "facebook";
2
2
  interface ApiPost {
3
3
  id: string;
4
4
  platform: Platform;
@@ -51,6 +51,22 @@ 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
+ }
64
+ interface ConnectInstagramInput {
65
+ platform: "instagram";
66
+ }
67
+ interface ConnectFacebookInput {
68
+ platform: "facebook";
69
+ }
54
70
  interface ApiKeyInfo {
55
71
  id: string;
56
72
  name: string;
@@ -108,7 +124,16 @@ declare class ChirpieClient {
108
124
  connectThreadsAccount(): Promise<{
109
125
  authorization_url: string;
110
126
  }>;
111
- /** @deprecated Use connectXAccount(), connectBlueskyAccount(), connectLinkedInAccount(), or connectThreadsAccount() instead */
127
+ connectMastodonAccount(input: ConnectMastodonInput): Promise<{
128
+ authorization_url: string;
129
+ }>;
130
+ connectInstagramAccount(): Promise<{
131
+ authorization_url: string;
132
+ }>;
133
+ connectFacebookAccount(): Promise<{
134
+ authorization_url: string;
135
+ }>;
136
+ /** @deprecated Use connectXAccount(), connectBlueskyAccount(), connectLinkedInAccount(), connectThreadsAccount(), connectMastodonAccount(), connectInstagramAccount(), or connectFacebookAccount() instead */
112
137
  connectAccount(): Promise<{
113
138
  authorization_url: string;
114
139
  }>;
@@ -155,4 +180,4 @@ declare function deleteConfig(): boolean;
155
180
  */
156
181
  declare function requireConfig(): ChirpieConfig;
157
182
 
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 };
183
+ export { type ApiAccount, type ApiAnalytics, type ApiKeyInfo, type ApiPost, type ApiThread, ChirpieApiError, ChirpieClient, type ChirpieClientOptions, type ChirpieConfig, ChirpieError, type ConnectBlueskyInput, type ConnectFacebookInput, type ConnectInstagramInput, type ConnectLinkedInInput, type ConnectMastodonInput, type ConnectThreadsInput, type CreatePostInput, type CreateThreadInput, type ListPostsOptions, deleteConfig, getConfig, requireConfig, saveConfig };
package/dist/index.js CHANGED
@@ -120,7 +120,20 @@ 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
+ async connectInstagramAccount() {
127
+ return this.request("POST", "/accounts", {
128
+ platform: "instagram"
129
+ });
130
+ }
131
+ async connectFacebookAccount() {
132
+ return this.request("POST", "/accounts", {
133
+ platform: "facebook"
134
+ });
135
+ }
136
+ /** @deprecated Use connectXAccount(), connectBlueskyAccount(), connectLinkedInAccount(), connectThreadsAccount(), connectMastodonAccount(), connectInstagramAccount(), or connectFacebookAccount() instead */
124
137
  async connectAccount() {
125
138
  return this.connectXAccount();
126
139
  }
package/dist/index.mjs CHANGED
@@ -88,7 +88,20 @@ 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
+ async connectInstagramAccount() {
95
+ return this.request("POST", "/accounts", {
96
+ platform: "instagram"
97
+ });
98
+ }
99
+ async connectFacebookAccount() {
100
+ return this.request("POST", "/accounts", {
101
+ platform: "facebook"
102
+ });
103
+ }
104
+ /** @deprecated Use connectXAccount(), connectBlueskyAccount(), connectLinkedInAccount(), connectThreadsAccount(), connectMastodonAccount(), connectInstagramAccount(), or connectFacebookAccount() instead */
92
105
  async connectAccount() {
93
106
  return this.connectXAccount();
94
107
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chirpie/sdk",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Chirpie SDK — TypeScript client for the Chirpie social media API",
5
5
  "repository": {
6
6
  "type": "git",