@vendasta/social-posts 5.24.0 → 5.26.0

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.
Files changed (33) hide show
  1. package/esm2020/lib/_internal/content-generation.api.service.mjs +7 -2
  2. package/esm2020/lib/_internal/enums/api-v2.enum.mjs +13 -0
  3. package/esm2020/lib/_internal/enums/index.mjs +2 -1
  4. package/esm2020/lib/_internal/index.mjs +2 -1
  5. package/esm2020/lib/_internal/interfaces/api-v2.interface.mjs +1 -1
  6. package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
  7. package/esm2020/lib/_internal/interfaces/wordpress-plugin.interface.mjs +8 -0
  8. package/esm2020/lib/_internal/objects/api-v2.mjs +108 -1
  9. package/esm2020/lib/_internal/objects/index.mjs +3 -2
  10. package/esm2020/lib/_internal/objects/wordpress-plugin.mjs +62 -0
  11. package/esm2020/lib/_internal/wordpress-plugin.api.service.mjs +41 -0
  12. package/esm2020/lib/content-generation.service.mjs +4 -1
  13. package/esm2020/lib/index.mjs +2 -1
  14. package/esm2020/lib/wordpress-plugin.service.mjs +19 -0
  15. package/fesm2015/vendasta-social-posts.mjs +275 -37
  16. package/fesm2015/vendasta-social-posts.mjs.map +1 -1
  17. package/fesm2020/vendasta-social-posts.mjs +275 -37
  18. package/fesm2020/vendasta-social-posts.mjs.map +1 -1
  19. package/lib/_internal/content-generation.api.service.d.ts +3 -2
  20. package/lib/_internal/enums/api-v2.enum.d.ts +5 -0
  21. package/lib/_internal/enums/index.d.ts +1 -0
  22. package/lib/_internal/index.d.ts +1 -0
  23. package/lib/_internal/interfaces/api-v2.interface.d.ts +18 -0
  24. package/lib/_internal/interfaces/index.d.ts +2 -1
  25. package/lib/_internal/interfaces/wordpress-plugin.interface.d.ts +11 -0
  26. package/lib/_internal/objects/api-v2.d.ts +30 -0
  27. package/lib/_internal/objects/index.d.ts +2 -1
  28. package/lib/_internal/objects/wordpress-plugin.d.ts +19 -0
  29. package/lib/_internal/wordpress-plugin.api.service.d.ts +16 -0
  30. package/lib/content-generation.service.d.ts +2 -1
  31. package/lib/index.d.ts +1 -0
  32. package/lib/wordpress-plugin.service.d.ts +10 -0
  33. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- import { GeneratePostsRequest, GeneratePostsResponse } from './objects/';
2
- import { GeneratePostsRequestInterface } from './interfaces/';
1
+ import { GenerateAiRequest, GenerateAiResponse, GeneratePostsRequest, GeneratePostsResponse } from './objects/';
2
+ import { GenerateAiRequestInterface, GeneratePostsRequestInterface } from './interfaces/';
3
3
  import { HttpClient } from '@angular/common/http';
4
4
  import { HostService } from '../_generated/host.service';
5
5
  import { Observable } from 'rxjs';
@@ -11,6 +11,7 @@ export declare class ContentGenerationApiService {
11
11
  constructor(http: HttpClient, hostService: HostService);
12
12
  private apiOptions;
13
13
  generatePosts(r: GeneratePostsRequest | GeneratePostsRequestInterface): Observable<GeneratePostsResponse>;
14
+ generate(r: GenerateAiRequest | GenerateAiRequestInterface): Observable<GenerateAiResponse>;
14
15
  static ɵfac: i0.ɵɵFactoryDeclaration<ContentGenerationApiService, never>;
15
16
  static ɵprov: i0.ɵɵInjectableDeclaration<ContentGenerationApiService>;
16
17
  }
@@ -0,0 +1,5 @@
1
+ export declare enum GenerateType {
2
+ TITLE = 0,
3
+ OUTLINE = 1,
4
+ BLOG = 2
5
+ }
@@ -2,5 +2,6 @@ export { CallToActionCallToActionType, SocialPostDeletionStatus, MessageLength,
2
2
  export { RemoveReason, } from './multilocation-post.enum';
3
3
  export { PostStatusV2, PostTypeV2, YoutubeCustomizationV2PrivacyStatusV2, } from './social-post-v2.enum';
4
4
  export { MediaType, } from './linkedin-v2.enum';
5
+ export { GenerateType, } from './api-v2.enum';
5
6
  export { ActionType, } from './chat-bot.enum';
6
7
  export { Role, } from './chat-bot-v2.enum';
@@ -18,3 +18,4 @@ export { SocialPostsApiService } from './social-posts.api.service';
18
18
  export { SocialPostsV2ApiService } from './social-posts-v2.api.service';
19
19
  export { TenorGifsApiService } from './tenor-gifs.api.service';
20
20
  export { UnsplashApiService } from './unsplash.api.service';
21
+ export { WordpressPluginApiService } from './wordpress-plugin.api.service';
@@ -42,6 +42,18 @@ export interface DeletePostRequestInterface {
42
42
  accessToken?: string;
43
43
  postId?: string;
44
44
  }
45
+ export interface GenerateAiRequestInterface {
46
+ goal?: string;
47
+ instruction?: string;
48
+ keyword?: string;
49
+ tone?: string;
50
+ length?: string;
51
+ generateType?: e.GenerateType;
52
+ }
53
+ export interface GenerateAiResponseInterface {
54
+ multiResult?: MultiResponseInterface;
55
+ result?: ResponseInterface;
56
+ }
45
57
  export interface GeneratePostsRequestInterface {
46
58
  numberOfPosts?: number;
47
59
  topic?: string;
@@ -109,6 +121,9 @@ export interface MediaUploadRequestInterface {
109
121
  export interface MediaUploadResponseInterface {
110
122
  uploadUrns?: string[];
111
123
  }
124
+ export interface MultiResponseInterface {
125
+ items?: string[];
126
+ }
112
127
  export interface GeneratePostsResponsePostInterface {
113
128
  text?: string;
114
129
  }
@@ -116,6 +131,9 @@ export interface RepostSocialPostRequestInterface {
116
131
  socialPostId?: string;
117
132
  accountGroupId?: string;
118
133
  }
134
+ export interface ResponseInterface {
135
+ content?: string;
136
+ }
119
137
  export interface SocialPostOutputInterface {
120
138
  internalPostId?: string;
121
139
  socialPost?: SocialPostV2Interface;
@@ -10,7 +10,8 @@ export { AccessInterface, } from './annotations.interface';
10
10
  export { LinkV2Interface, MetadataV2Interface, PostActionV2Interface, PostContentV2Interface, PostCustomizationV2Interface, PostEventV2Interface, PostMediaV2Interface, SocialPostV2Interface, TikTokCustomizationV2Interface, YoutubeCustomizationV2Interface, } from './social-post-v2.interface';
11
11
  export { MediaInterface, } from './linkedin-v2.interface';
12
12
  export { AncestryInterface, CollectionInterface, ImageInterface, LinksInterface, PhotoInterface, SocialInterface, SourceInterface, SubAncestryInterface, TagsInterface, UrlsInterface, UserInterface, UserLinkInterface, } from './unsplash-image.interface';
13
- export { AiInstructionsInterface, CreateCommonAiInstructionsRequestInterface, CreateCommonAiInstructionsResponseInterface, CreateImageRequestInterface, CreateImageResponseInterface, CuratedContentPostInterface, DeletePostRequestInterface, GeneratePostsRequestInterface, GeneratePostsResponseInterface, GetCommonAiInstructionsRequestInterface, GetCommonAiInstructionsResponseInterface, ImageBlobInterface, ImageCreatedInterface, ImageUrlInterface, ListCuratedContentRequestInterface, ListCuratedContentResponseInterface, ListUnsplashImagesRequestInterface, ListUnsplashImagesResponseInterface, MediaUploadRequestInterface, MediaUploadResponseInterface, GeneratePostsResponsePostInterface, RepostSocialPostRequestInterface, SocialPostOutputInterface, SocialPostRequestInterface, SocialPostResponseInterface, UpdateCommonAiInstructionsRequestInterface, UpdateCommonAiInstructionsResponseInterface, UpdateSocialPostRequestInterface, UpdateSocialPostResponseInterface, UploadToStorageRequestInterface, UploadToStorageResponseInterface, UploadedMediaInterface, } from './api-v2.interface';
13
+ export { AiInstructionsInterface, CreateCommonAiInstructionsRequestInterface, CreateCommonAiInstructionsResponseInterface, CreateImageRequestInterface, CreateImageResponseInterface, CuratedContentPostInterface, DeletePostRequestInterface, GenerateAiRequestInterface, GenerateAiResponseInterface, GeneratePostsRequestInterface, GeneratePostsResponseInterface, GetCommonAiInstructionsRequestInterface, GetCommonAiInstructionsResponseInterface, ImageBlobInterface, ImageCreatedInterface, ImageUrlInterface, ListCuratedContentRequestInterface, ListCuratedContentResponseInterface, ListUnsplashImagesRequestInterface, ListUnsplashImagesResponseInterface, MediaUploadRequestInterface, MediaUploadResponseInterface, MultiResponseInterface, GeneratePostsResponsePostInterface, RepostSocialPostRequestInterface, ResponseInterface, SocialPostOutputInterface, SocialPostRequestInterface, SocialPostResponseInterface, UpdateCommonAiInstructionsRequestInterface, UpdateCommonAiInstructionsResponseInterface, UpdateSocialPostRequestInterface, UpdateSocialPostResponseInterface, UploadToStorageRequestInterface, UploadToStorageResponseInterface, UploadedMediaInterface, } from './api-v2.interface';
14
14
  export { ActionInterface, EndChatRequestInterface, SendMessageRequestInterface, SendMessageResponseInterface, StartChatRequestInterface, StartChatResponseInterface, } from './chat-bot.interface';
15
15
  export { ChatMessageInterface, SendMessageV2RequestInterface, SendMessageV2ResponseInterface, } from './chat-bot-v2.interface';
16
16
  export { BlogConnectionInterface, CreateBlogConnectionRequestInterface, CreateBlogConnectionResponseInterface, GetBlogConnectionRequestInterface, GetBlogConnectionResponseInterface, ListBlogConnectionRequestInterface, ListBlogConnectionResponseInterface, UpdateBlogConnectionRequestInterface, } from './blog-connection.interface';
17
+ export { StatusRequestInterface, StatusResponseInterface, } from './wordpress-plugin.interface';
@@ -0,0 +1,11 @@
1
+ export interface StatusRequestInterface {
2
+ businessId?: string;
3
+ apiKey?: string;
4
+ siteUrl?: string;
5
+ }
6
+ export interface StatusResponseInterface {
7
+ status?: boolean;
8
+ version?: string;
9
+ logo?: string;
10
+ name?: string;
11
+ }
@@ -65,6 +65,24 @@ export declare class DeletePostRequest implements i.DeletePostRequestInterface {
65
65
  constructor(kwargs?: i.DeletePostRequestInterface);
66
66
  toApiJson(): object;
67
67
  }
68
+ export declare class GenerateAiRequest implements i.GenerateAiRequestInterface {
69
+ goal: string;
70
+ instruction: string;
71
+ keyword: string;
72
+ tone: string;
73
+ length: string;
74
+ generateType: e.GenerateType;
75
+ static fromProto(proto: any): GenerateAiRequest;
76
+ constructor(kwargs?: i.GenerateAiRequestInterface);
77
+ toApiJson(): object;
78
+ }
79
+ export declare class GenerateAiResponse implements i.GenerateAiResponseInterface {
80
+ multiResult: MultiResponse;
81
+ result: Response;
82
+ static fromProto(proto: any): GenerateAiResponse;
83
+ constructor(kwargs?: i.GenerateAiResponseInterface);
84
+ toApiJson(): object;
85
+ }
68
86
  export declare class GeneratePostsRequest implements i.GeneratePostsRequestInterface {
69
87
  numberOfPosts: number;
70
88
  topic: string;
@@ -171,6 +189,12 @@ export declare class MediaUploadResponse implements i.MediaUploadResponseInterfa
171
189
  constructor(kwargs?: i.MediaUploadResponseInterface);
172
190
  toApiJson(): object;
173
191
  }
192
+ export declare class MultiResponse implements i.MultiResponseInterface {
193
+ items: string[];
194
+ static fromProto(proto: any): MultiResponse;
195
+ constructor(kwargs?: i.MultiResponseInterface);
196
+ toApiJson(): object;
197
+ }
174
198
  export declare class GeneratePostsResponsePost implements i.GeneratePostsResponsePostInterface {
175
199
  text: string;
176
200
  static fromProto(proto: any): GeneratePostsResponsePost;
@@ -184,6 +208,12 @@ export declare class RepostSocialPostRequest implements i.RepostSocialPostReques
184
208
  constructor(kwargs?: i.RepostSocialPostRequestInterface);
185
209
  toApiJson(): object;
186
210
  }
211
+ export declare class Response implements i.ResponseInterface {
212
+ content: string;
213
+ static fromProto(proto: any): Response;
214
+ constructor(kwargs?: i.ResponseInterface);
215
+ toApiJson(): object;
216
+ }
187
217
  export declare class SocialPostOutput implements i.SocialPostOutputInterface {
188
218
  internalPostId: string;
189
219
  socialPost: SocialPostV2;
@@ -10,7 +10,8 @@ export { Access, } from './annotations';
10
10
  export { LinkV2, MetadataV2, PostActionV2, PostContentV2, PostCustomizationV2, PostEventV2, PostMediaV2, SocialPostV2, TikTokCustomizationV2, YoutubeCustomizationV2, } from './social-post-v2';
11
11
  export { Media, } from './linkedin-v2';
12
12
  export { Ancestry, Collection, Image, Links, Photo, Social, Source, SubAncestry, Tags, Urls, User, UserLink, } from './unsplash-image';
13
- export { AiInstructions, CreateCommonAiInstructionsRequest, CreateCommonAiInstructionsResponse, CreateImageRequest, CreateImageResponse, CuratedContentPost, DeletePostRequest, GeneratePostsRequest, GeneratePostsResponse, GetCommonAiInstructionsRequest, GetCommonAiInstructionsResponse, ImageBlob, ImageCreated, ImageUrl, ListCuratedContentRequest, ListCuratedContentResponse, ListUnsplashImagesRequest, ListUnsplashImagesResponse, MediaUploadRequest, MediaUploadResponse, GeneratePostsResponsePost, RepostSocialPostRequest, SocialPostOutput, SocialPostRequest, SocialPostResponse, UpdateCommonAiInstructionsRequest, UpdateCommonAiInstructionsResponse, UpdateSocialPostRequest, UpdateSocialPostResponse, UploadToStorageRequest, UploadToStorageResponse, UploadedMedia, } from './api-v2';
13
+ export { AiInstructions, CreateCommonAiInstructionsRequest, CreateCommonAiInstructionsResponse, CreateImageRequest, CreateImageResponse, CuratedContentPost, DeletePostRequest, GenerateAiRequest, GenerateAiResponse, GeneratePostsRequest, GeneratePostsResponse, GetCommonAiInstructionsRequest, GetCommonAiInstructionsResponse, ImageBlob, ImageCreated, ImageUrl, ListCuratedContentRequest, ListCuratedContentResponse, ListUnsplashImagesRequest, ListUnsplashImagesResponse, MediaUploadRequest, MediaUploadResponse, MultiResponse, GeneratePostsResponsePost, RepostSocialPostRequest, Response, SocialPostOutput, SocialPostRequest, SocialPostResponse, UpdateCommonAiInstructionsRequest, UpdateCommonAiInstructionsResponse, UpdateSocialPostRequest, UpdateSocialPostResponse, UploadToStorageRequest, UploadToStorageResponse, UploadedMedia, } from './api-v2';
14
14
  export { Action, EndChatRequest, SendMessageRequest, SendMessageResponse, StartChatRequest, StartChatResponse, } from './chat-bot';
15
15
  export { ChatMessage, SendMessageV2Request, SendMessageV2Response, } from './chat-bot-v2';
16
16
  export { BlogConnection, CreateBlogConnectionRequest, CreateBlogConnectionResponse, GetBlogConnectionRequest, GetBlogConnectionResponse, ListBlogConnectionRequest, ListBlogConnectionResponse, UpdateBlogConnectionRequest, } from './blog-connection';
17
+ export { StatusRequest, StatusResponse, } from './wordpress-plugin';
@@ -0,0 +1,19 @@
1
+ import * as i from '../interfaces';
2
+ export declare function enumStringToValue<E>(enumRef: any, value: string): E;
3
+ export declare class StatusRequest implements i.StatusRequestInterface {
4
+ businessId: string;
5
+ apiKey: string;
6
+ siteUrl: string;
7
+ static fromProto(proto: any): StatusRequest;
8
+ constructor(kwargs?: i.StatusRequestInterface);
9
+ toApiJson(): object;
10
+ }
11
+ export declare class StatusResponse implements i.StatusResponseInterface {
12
+ status: boolean;
13
+ version: string;
14
+ logo: string;
15
+ name: string;
16
+ static fromProto(proto: any): StatusResponse;
17
+ constructor(kwargs?: i.StatusResponseInterface);
18
+ toApiJson(): object;
19
+ }
@@ -0,0 +1,16 @@
1
+ import { StatusRequest, StatusResponse } from './objects/';
2
+ import { StatusRequestInterface } from './interfaces/';
3
+ import { HttpClient } from '@angular/common/http';
4
+ import { HostService } from '../_generated/host.service';
5
+ import { Observable } from 'rxjs';
6
+ import * as i0 from "@angular/core";
7
+ export declare class WordpressPluginApiService {
8
+ private http;
9
+ private hostService;
10
+ private _host;
11
+ constructor(http: HttpClient, hostService: HostService);
12
+ private apiOptions;
13
+ status(r: StatusRequest | StatusRequestInterface): Observable<StatusResponse>;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<WordpressPluginApiService, never>;
15
+ static ɵprov: i0.ɵɵInjectableDeclaration<WordpressPluginApiService>;
16
+ }
@@ -1,10 +1,11 @@
1
1
  import { Observable } from 'rxjs';
2
- import { ContentGenerationApiService, GeneratePostsRequest, GeneratePostsRequestInterface, GeneratePostsResponse } from './_internal';
2
+ import { ContentGenerationApiService, GenerateAiRequest, GenerateAiRequestInterface, GenerateAiResponse, GeneratePostsRequest, GeneratePostsRequestInterface, GeneratePostsResponse } from './_internal';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class ContentGenerationService {
5
5
  private contentGenerationApiService;
6
6
  constructor(contentGenerationApiService: ContentGenerationApiService);
7
7
  generatePosts(r: GeneratePostsRequest | GeneratePostsRequestInterface): Observable<GeneratePostsResponse>;
8
+ generate(r: GenerateAiRequest | GenerateAiRequestInterface): Observable<GenerateAiResponse>;
8
9
  static ɵfac: i0.ɵɵFactoryDeclaration<ContentGenerationService, never>;
9
10
  static ɵprov: i0.ɵɵInjectableDeclaration<ContentGenerationService>;
10
11
  }
package/lib/index.d.ts CHANGED
@@ -16,3 +16,4 @@ export { UnsplashImageService } from './unsplash-image.service';
16
16
  export { ChatBotService } from './chat-bot.service';
17
17
  export { ChatBotV2Service } from './chat-bot-v2.service';
18
18
  export { BlogConnectionService } from './blog-connection.service';
19
+ export { WordpressPluginService } from './wordpress-plugin.service';
@@ -0,0 +1,10 @@
1
+ import { Observable } from 'rxjs';
2
+ import { StatusRequestInterface, StatusResponse, WordpressPluginApiService } from './_internal';
3
+ import * as i0 from "@angular/core";
4
+ export declare class WordpressPluginService {
5
+ private wordpressPluginApiService;
6
+ constructor(wordpressPluginApiService: WordpressPluginApiService);
7
+ status(statusRequestInterface: StatusRequestInterface): Observable<StatusResponse>;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<WordpressPluginService, never>;
9
+ static ɵprov: i0.ɵɵInjectableDeclaration<WordpressPluginService>;
10
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vendasta/social-posts",
3
- "version": "5.24.0",
3
+ "version": "5.26.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^15.1.0",
6
6
  "@angular/core": "^15.1.0"