sociova 1.2.2 → 1.2.4

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/client.d.ts CHANGED
@@ -112,7 +112,20 @@ export type SendGenericTemplatePayload = {
112
112
  };
113
113
 
114
114
  export type SendGenericTemplateResponse = Record<string, any>;
115
-
115
+ export interface DirectPublishPayload {
116
+ caption: string;
117
+ image_url: string;
118
+ }
119
+
120
+ export interface MediaResponse {
121
+ id: string;
122
+ status?: string;
123
+ [key: string]: any; // in case Instagram returns extra fields
124
+ }
125
+
126
+ export interface PublishPostResumePayload {
127
+ creation_id: string;
128
+ }
116
129
  export declare class InstaClient {
117
130
  Config: {
118
131
  auth: string;
@@ -133,4 +146,7 @@ export declare class InstaClient {
133
146
  sendButtonTemplate(payload: SendButtonTemplatePayload): Promise<SendButtonTemplateResponse>;
134
147
  sendPublishedPosts(payload: SendMediaPayload): Promise<SendMediaResponse>;
135
148
  sendGenericTemplate(payload: SendGenericTemplatePayload): Promise<SendGenericTemplateResponse>;
136
- }
149
+ directPublishPost(payload: DirectPublishPayload): Promise<MediaResponse>;
150
+ createMedia(payload: DirectPublishPayload): Promise<MediaResponse>;
151
+ publishPostResume(payload: PublishPostResumePayload): Promise<MediaResponse>;
152
+ }
package/dist/client.js CHANGED
@@ -210,7 +210,7 @@ async directPublishPost(payload){
210
210
  }
211
211
 
212
212
  // Not direct
213
- async directPublishPost(payload){
213
+ async createMedia(payload){
214
214
  const url = `${INSTAGRAM_BASE_URL}/26338849465738403/media`;
215
215
  const res = await fetch(url, {
216
216
  method: "POST",
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export * from "./client"
1
+ export * from "./client"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sociova",
3
- "version": "1.2.2",
3
+ "version": "1.2.4",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",