@vendasta/social-posts 5.6.1 → 5.8.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 (46) hide show
  1. package/esm2020/lib/_internal/enums/index.mjs +4 -3
  2. package/esm2020/lib/_internal/enums/linkedin-v2.enum.mjs +15 -0
  3. package/esm2020/lib/_internal/enums/social-post-v2.enum.mjs +16 -0
  4. package/esm2020/lib/_internal/enums/social-posts.enum.mjs +12 -6
  5. package/esm2020/lib/_internal/index.mjs +2 -1
  6. package/esm2020/lib/_internal/interfaces/api-v2.interface.mjs +2 -0
  7. package/esm2020/lib/_internal/interfaces/api.interface.mjs +1 -1
  8. package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
  9. package/esm2020/lib/_internal/interfaces/linkedin-v2.interface.mjs +8 -0
  10. package/esm2020/lib/_internal/interfaces/social-post-v2.interface.mjs +8 -0
  11. package/esm2020/lib/_internal/linkedin.api.service.mjs +7 -3
  12. package/esm2020/lib/_internal/objects/api-v2.mjs +243 -0
  13. package/esm2020/lib/_internal/objects/api.mjs +10 -53
  14. package/esm2020/lib/_internal/objects/index.mjs +8 -6
  15. package/esm2020/lib/_internal/objects/linkedin-v2.mjs +34 -0
  16. package/esm2020/lib/_internal/objects/social-post-v2.mjs +264 -0
  17. package/esm2020/lib/_internal/social-posts-v2.api.service.mjs +46 -0
  18. package/esm2020/lib/index.mjs +2 -2
  19. package/esm2020/lib/social-posts.service.mjs +3 -3
  20. package/fesm2015/vendasta-social-posts.mjs +715 -195
  21. package/fesm2015/vendasta-social-posts.mjs.map +1 -1
  22. package/fesm2020/vendasta-social-posts.mjs +712 -192
  23. package/fesm2020/vendasta-social-posts.mjs.map +1 -1
  24. package/lib/_internal/enums/index.d.ts +3 -2
  25. package/lib/_internal/enums/{linkedin.enum.d.ts → linkedin-v2.enum.d.ts} +0 -0
  26. package/lib/_internal/enums/social-post-v2.enum.d.ts +8 -0
  27. package/lib/_internal/enums/social-posts.enum.d.ts +6 -1
  28. package/lib/_internal/index.d.ts +1 -0
  29. package/lib/_internal/interfaces/api-v2.interface.d.ts +40 -0
  30. package/lib/_internal/interfaces/api.interface.d.ts +4 -11
  31. package/lib/_internal/interfaces/index.d.ts +7 -5
  32. package/lib/_internal/interfaces/{linkedin.interface.d.ts → linkedin-v2.interface.d.ts} +0 -0
  33. package/lib/_internal/interfaces/social-post-v2.interface.d.ts +46 -0
  34. package/lib/_internal/linkedin.api.service.d.ts +4 -3
  35. package/lib/_internal/objects/api-v2.d.ts +69 -0
  36. package/lib/_internal/objects/api.d.ts +4 -17
  37. package/lib/_internal/objects/index.d.ts +7 -5
  38. package/lib/_internal/objects/{linkedin.d.ts → linkedin-v2.d.ts} +0 -0
  39. package/lib/_internal/objects/social-post-v2.d.ts +72 -0
  40. package/lib/_internal/social-posts-v2.api.service.d.ts +17 -0
  41. package/lib/index.d.ts +1 -1
  42. package/lib/social-posts.service.d.ts +2 -2
  43. package/package.json +1 -1
  44. package/esm2020/lib/_internal/enums/linkedin.enum.mjs +0 -15
  45. package/esm2020/lib/_internal/interfaces/linkedin.interface.mjs +0 -8
  46. package/esm2020/lib/_internal/objects/linkedin.mjs +0 -34
@@ -1,3 +1,4 @@
1
1
  export { RemoveReason, } from './multilocation-post.enum';
2
- export { MediaType, } from './linkedin.enum';
3
- export { CallToActionCallToActionType, SocialPostDeletionStatus, PostLength, PostType, PostingStatus, SocialPostService, } from './social-posts.enum';
2
+ export { CallToActionCallToActionType, SocialPostDeletionStatus, MessageLength, PostType, PostingStatus, SocialPostService, TemplateType, } from './social-posts.enum';
3
+ export { PostType as PostTypeEnum, } from './social-post-v2.enum';
4
+ export { MediaType, } from './linkedin-v2.enum';
@@ -0,0 +1,8 @@
1
+ export declare enum PostType {
2
+ POST_TYPE_INVALID = 0,
3
+ POST_TYPE_IMAGE = 1,
4
+ POST_TYPE_VIDEO = 2,
5
+ POST_TYPE_GIF = 3,
6
+ POST_TYPE_MULTI_MEDIA = 4,
7
+ POST_TYPE_TEXT = 5
8
+ }
@@ -12,7 +12,7 @@ export declare enum SocialPostDeletionStatus {
12
12
  FAILED = 1,
13
13
  IN_PROGRESS = 2
14
14
  }
15
- export declare enum PostLength {
15
+ export declare enum MessageLength {
16
16
  SHORT_FORM = 0,
17
17
  LONG_FORM = 1
18
18
  }
@@ -38,3 +38,8 @@ export declare enum SocialPostService {
38
38
  UNKNOWN = 5,
39
39
  INSTAGRAM = 6
40
40
  }
41
+ export declare enum TemplateType {
42
+ TEMPLATE_UNSET = 0,
43
+ TEMPLATE_CUSTOM = 1,
44
+ TEMPLATE_SOCIAL_POST = 2
45
+ }
@@ -9,4 +9,5 @@ export { PixabayImagesApiService } from './pixabay-images.api.service';
9
9
  export { PostPerformanceApiService } from './post-performance.api.service';
10
10
  export { PostTemplatesApiService } from './post-templates.api.service';
11
11
  export { SocialPostsApiService } from './social-posts.api.service';
12
+ export { SocialPostsV2ApiService } from './social-posts-v2.api.service';
12
13
  export { TenorGifsApiService } from './tenor-gifs.api.service';
@@ -0,0 +1,40 @@
1
+ import { MediaInterface } from './linkedin-v2.interface';
2
+ import { SocialPostInterface, MetadataInterface } from './social-post-v2.interface';
3
+ export interface CreateImageRequestInterface {
4
+ businessId?: string;
5
+ prompt?: string;
6
+ imageAmount?: number;
7
+ size?: string;
8
+ responseFormat?: string;
9
+ }
10
+ export interface CreateImageResponseInterface {
11
+ createdId?: number;
12
+ generatedImages?: ImageCreatedInterface[];
13
+ }
14
+ export interface DeletePostRequestInterface {
15
+ accessToken?: string;
16
+ postId?: string;
17
+ }
18
+ export interface ImageCreatedInterface {
19
+ url?: string;
20
+ b64Json?: string;
21
+ }
22
+ export interface MediaUploadRequestInterface {
23
+ accessToken?: string;
24
+ owner?: string;
25
+ media?: MediaInterface[];
26
+ }
27
+ export interface MediaUploadResponseInterface {
28
+ uploadUrn?: string[];
29
+ }
30
+ export interface SocialPostOutputInterface {
31
+ internalPostId?: string;
32
+ socialPost?: SocialPostInterface;
33
+ metadata?: MetadataInterface[];
34
+ }
35
+ export interface SocialPostRequestInterface {
36
+ socialPost?: SocialPostInterface[];
37
+ }
38
+ export interface SocialPostResponseInterface {
39
+ socialPost?: SocialPostOutputInterface[];
40
+ }
@@ -1,9 +1,9 @@
1
1
  import { FieldMaskInterface } from './field-mask.interface';
2
2
  import { HashtagInterface } from './hashtag.interface';
3
3
  import { LocationInterface, MultilocationPostInterface, MultilocationPostErrorInterface } from './multilocation-post.interface';
4
- import { MediaEntryInterface, MetaDataInterface, SocialPostInterface, PostTemplateInterface, SocialPostDataInterface, SchedulePostStatusInterface } from './social-posts.interface';
5
- import { MediaInterface } from './linkedin.interface';
4
+ import { MediaEntryInterface, MetaDataInterface, PostTemplateInterface, SocialPostDataInterface, SchedulePostStatusInterface } from './social-posts.interface';
6
5
  import { PixabayImageInterface } from './pixabay-image.interface';
6
+ import { SocialPostInterface } from './social-post-v2.interface';
7
7
  import { SocialPostStatsInterface } from './social-post-stats.interface';
8
8
  import { TenorGifInterface } from './tenor-gif.interface';
9
9
  import * as e from '../enums';
@@ -197,14 +197,6 @@ export interface ListTenorGifsResponseInterface {
197
197
  next?: string;
198
198
  results?: TenorGifInterface[];
199
199
  }
200
- export interface MediaUploadRequestInterface {
201
- accessToken?: string;
202
- owner?: string;
203
- media?: MediaInterface[];
204
- }
205
- export interface MediaUploadResponseInterface {
206
- uploadUrn?: string[];
207
- }
208
200
  export interface PartnerListScheduledPostsResponseInterface {
209
201
  socialPosts?: SocialPostInterface[];
210
202
  nextCursor?: string;
@@ -273,7 +265,8 @@ export interface SearchHashtagResponseInterface {
273
265
  export interface SuggestMessageRequestInterface {
274
266
  prompt?: string;
275
267
  businessId?: string;
276
- length?: e.PostLength;
268
+ length?: e.MessageLength;
269
+ type?: e.TemplateType;
277
270
  }
278
271
  export interface SuggestMessageResponseInterface {
279
272
  message?: string;
@@ -1,9 +1,11 @@
1
+ export { FieldMaskInterface, } from './field-mask.interface';
2
+ export { HashtagInterface, } from './hashtag.interface';
3
+ export { LocationInterface, MultilocationPostInterface, MultilocationPostErrorInterface, } from './multilocation-post.interface';
1
4
  export { PixabayImageInterface, } from './pixabay-image.interface';
2
5
  export { FacebookPostStatsInterface, SocialPostStatsInterface, TwitterPostStatsInterface, } from './social-post-stats.interface';
3
- export { LocationInterface, MultilocationPostInterface, MultilocationPostErrorInterface, } from './multilocation-post.interface';
4
- export { FieldMaskInterface, } from './field-mask.interface';
5
6
  export { TenorGifMediaEntryInterface, TenorGifInterface, TenorMediaObjectInterface, } from './tenor-gif.interface';
6
- export { HashtagInterface, } from './hashtag.interface';
7
- export { MediaInterface, } from './linkedin.interface';
8
7
  export { CallToActionInterface, ErrorInterface, EventInterface, MediaEntryInterface, MetaDataInterface, PostTemplateInterface, SchedulePostStatusInterface, SocialPostInterface, SocialPostDataInterface, } from './social-posts.interface';
9
- export { CreateMultilocationPostRequestInterface, CreateMultilocationPostResponseInterface, CreatePostTemplateRequestInterface, CreatePostTemplateResponseInterface, DateRangeFilterInterface, DeleteHashtagsRequestInterface, DeleteMultilocationPostRequestInterface, DeletePostTemplateRequestInterface, DeleteSocialPostRequestInterface, EditMultilocationPostRequestInterface, EditMultilocationPostResponseInterface, PartnerListScheduledSocialPostsRequestFiltersInterface, GenerateCSVForPerformanceStatsRequestInterface, GenerateCSVForPerformanceStatsResponseInterface, GetGeneratedCSVForPerformanceStatsRequestInterface, GetGeneratedCSVForPerformanceStatsResponseInterface, GetMultiSocialPostStatsRequestInterface, GetMultiSocialPostStatsResponseInterface, GetMultiSocialPostsRequestInterface, GetMultiSocialPostsResponseInterface, GetMultilocationPostRequestInterface, GetMultilocationPostResponseInterface, GetPostTemplateRequestInterface, GetPostTemplateResponseInterface, GetScheduledPostCountRequestInterface, GetScheduledPostCountResponseInterface, GetTenorAnonymousIdRequestInterface, GetTenorAnonymousIdResponseInterface, ListMultilocationPostsForBrandRequestInterface, ListMultilocationPostsForBrandResponseInterface, ListPixabayImagesRequestInterface, ListPixabayImagesResponseInterface, ListPostTemplatesRequestInterface, ListPostTemplatesResponseInterface, ListSocialPostsRequestInterface, ListSocialPostsResponseInterface, ListTenorGifsRequestInterface, ListTenorGifsResponseInterface, MediaUploadRequestInterface, MediaUploadResponseInterface, PartnerListScheduledPostsResponseInterface, PartnerListScheduledSocialPostsRequestInterface, PostDataInterface, RemoveFromMultilocationPostRequestInterface, ReplaceHashtagsRequestInterface, SchedulePostRequestInterface, SchedulePostResponseInterface, ScheduleToAllPagesRequestInterface, ScheduleToAllPagesResponseInterface, SearchHashtagRequestInterface, SearchHashtagResponseInterface, SuggestMessageRequestInterface, SuggestMessageResponseInterface, UpdatePostTemplateRequestInterface, } from './api.interface';
8
+ export { CreateMultilocationPostRequestInterface, CreateMultilocationPostResponseInterface, CreatePostTemplateRequestInterface, CreatePostTemplateResponseInterface, DateRangeFilterInterface, DeleteHashtagsRequestInterface, DeleteMultilocationPostRequestInterface, DeletePostTemplateRequestInterface, DeleteSocialPostRequestInterface, EditMultilocationPostRequestInterface, EditMultilocationPostResponseInterface, PartnerListScheduledSocialPostsRequestFiltersInterface, GenerateCSVForPerformanceStatsRequestInterface, GenerateCSVForPerformanceStatsResponseInterface, GetGeneratedCSVForPerformanceStatsRequestInterface, GetGeneratedCSVForPerformanceStatsResponseInterface, GetMultiSocialPostStatsRequestInterface, GetMultiSocialPostStatsResponseInterface, GetMultiSocialPostsRequestInterface, GetMultiSocialPostsResponseInterface, GetMultilocationPostRequestInterface, GetMultilocationPostResponseInterface, GetPostTemplateRequestInterface, GetPostTemplateResponseInterface, GetScheduledPostCountRequestInterface, GetScheduledPostCountResponseInterface, GetTenorAnonymousIdRequestInterface, GetTenorAnonymousIdResponseInterface, ListMultilocationPostsForBrandRequestInterface, ListMultilocationPostsForBrandResponseInterface, ListPixabayImagesRequestInterface, ListPixabayImagesResponseInterface, ListPostTemplatesRequestInterface, ListPostTemplatesResponseInterface, ListSocialPostsRequestInterface, ListSocialPostsResponseInterface, ListTenorGifsRequestInterface, ListTenorGifsResponseInterface, PartnerListScheduledPostsResponseInterface, PartnerListScheduledSocialPostsRequestInterface, PostDataInterface, RemoveFromMultilocationPostRequestInterface, ReplaceHashtagsRequestInterface, SchedulePostRequestInterface, SchedulePostResponseInterface, ScheduleToAllPagesRequestInterface, ScheduleToAllPagesResponseInterface, SearchHashtagRequestInterface, SearchHashtagResponseInterface, SuggestMessageRequestInterface, SuggestMessageResponseInterface, UpdatePostTemplateRequestInterface, } from './api.interface';
9
+ export { LinkInterface, MetadataInterface, PostActionInterface, PostContentInterface, PostCustomizationInterface, PostEventInterface, PostMediaInterface, SocialPostInterface as SocialPostInterfaceV2, } from './social-post-v2.interface';
10
+ export { MediaInterface, } from './linkedin-v2.interface';
11
+ export { CreateImageRequestInterface, CreateImageResponseInterface, DeletePostRequestInterface, ImageCreatedInterface, MediaUploadRequestInterface, MediaUploadResponseInterface, SocialPostOutputInterface, SocialPostRequestInterface, SocialPostResponseInterface, } from './api-v2.interface';
@@ -0,0 +1,46 @@
1
+ import * as e from '../enums';
2
+ export interface LinkInterface {
3
+ name?: string;
4
+ picture?: string;
5
+ description?: string;
6
+ title?: string;
7
+ url?: string;
8
+ shortcode?: string;
9
+ }
10
+ export interface MetadataInterface {
11
+ name?: string;
12
+ value?: string;
13
+ }
14
+ export interface PostActionInterface {
15
+ type?: string;
16
+ linkUrl?: string;
17
+ }
18
+ export interface PostContentInterface {
19
+ postText?: string;
20
+ media?: PostMediaInterface[];
21
+ link?: LinkInterface[];
22
+ }
23
+ export interface PostCustomizationInterface {
24
+ event?: PostEventInterface;
25
+ action?: PostActionInterface;
26
+ }
27
+ export interface PostEventInterface {
28
+ title?: string;
29
+ start?: Date;
30
+ end?: Date;
31
+ }
32
+ export interface PostMediaInterface {
33
+ mediaId?: string;
34
+ mediaUrl?: string;
35
+ mediaType?: string;
36
+ containerId?: string;
37
+ metadata?: MetadataInterface[];
38
+ }
39
+ export interface SocialPostInterface {
40
+ businessId?: string;
41
+ socialServiceId?: string;
42
+ postContent?: PostContentInterface;
43
+ scheduled?: Date;
44
+ customization?: PostCustomizationInterface;
45
+ postType?: e.PostType;
46
+ }
@@ -1,6 +1,6 @@
1
- import { MediaUploadRequest, MediaUploadResponse } from './objects/';
2
- import { MediaUploadRequestInterface } from './interfaces/';
3
- import { HttpClient } from '@angular/common/http';
1
+ import { DeletePostRequest, MediaUploadRequest, MediaUploadResponse } from './objects/';
2
+ import { DeletePostRequestInterface, MediaUploadRequestInterface } from './interfaces/';
3
+ import { HttpClient, HttpResponse } from '@angular/common/http';
4
4
  import { HostService } from '../_generated/host.service';
5
5
  import { Observable } from 'rxjs';
6
6
  import * as i0 from "@angular/core";
@@ -10,6 +10,7 @@ export declare class LinkedinApiService {
10
10
  private _host;
11
11
  constructor(http: HttpClient, hostService: HostService);
12
12
  private apiOptions;
13
+ deletePost(r: DeletePostRequest | DeletePostRequestInterface): Observable<HttpResponse<null>>;
13
14
  uploadMedia(r: MediaUploadRequest | MediaUploadRequestInterface): Observable<MediaUploadResponse>;
14
15
  static ɵfac: i0.ɵɵFactoryDeclaration<LinkedinApiService, never>;
15
16
  static ɵprov: i0.ɵɵInjectableDeclaration<LinkedinApiService>;
@@ -0,0 +1,69 @@
1
+ import * as i from '../interfaces';
2
+ import { Media } from './linkedin-v2';
3
+ import { SocialPost, Metadata } from './social-post-v2';
4
+ export declare function enumStringToValue<E>(enumRef: any, value: string): E;
5
+ export declare class CreateImageRequest implements i.CreateImageRequestInterface {
6
+ businessId: string;
7
+ prompt: string;
8
+ imageAmount: number;
9
+ size: string;
10
+ responseFormat: string;
11
+ static fromProto(proto: any): CreateImageRequest;
12
+ constructor(kwargs?: i.CreateImageRequestInterface);
13
+ toApiJson(): object;
14
+ }
15
+ export declare class CreateImageResponse implements i.CreateImageResponseInterface {
16
+ createdId: number;
17
+ generatedImages: ImageCreated[];
18
+ static fromProto(proto: any): CreateImageResponse;
19
+ constructor(kwargs?: i.CreateImageResponseInterface);
20
+ toApiJson(): object;
21
+ }
22
+ export declare class DeletePostRequest implements i.DeletePostRequestInterface {
23
+ accessToken: string;
24
+ postId: string;
25
+ static fromProto(proto: any): DeletePostRequest;
26
+ constructor(kwargs?: i.DeletePostRequestInterface);
27
+ toApiJson(): object;
28
+ }
29
+ export declare class ImageCreated implements i.ImageCreatedInterface {
30
+ url: string;
31
+ b64Json: string;
32
+ static fromProto(proto: any): ImageCreated;
33
+ constructor(kwargs?: i.ImageCreatedInterface);
34
+ toApiJson(): object;
35
+ }
36
+ export declare class MediaUploadRequest implements i.MediaUploadRequestInterface {
37
+ accessToken: string;
38
+ owner: string;
39
+ media: Media[];
40
+ static fromProto(proto: any): MediaUploadRequest;
41
+ constructor(kwargs?: i.MediaUploadRequestInterface);
42
+ toApiJson(): object;
43
+ }
44
+ export declare class MediaUploadResponse implements i.MediaUploadResponseInterface {
45
+ uploadUrn: string[];
46
+ static fromProto(proto: any): MediaUploadResponse;
47
+ constructor(kwargs?: i.MediaUploadResponseInterface);
48
+ toApiJson(): object;
49
+ }
50
+ export declare class SocialPostOutput implements i.SocialPostOutputInterface {
51
+ internalPostId: string;
52
+ socialPost: SocialPost;
53
+ metadata: Metadata[];
54
+ static fromProto(proto: any): SocialPostOutput;
55
+ constructor(kwargs?: i.SocialPostOutputInterface);
56
+ toApiJson(): object;
57
+ }
58
+ export declare class SocialPostRequest implements i.SocialPostRequestInterface {
59
+ socialPost: SocialPost[];
60
+ static fromProto(proto: any): SocialPostRequest;
61
+ constructor(kwargs?: i.SocialPostRequestInterface);
62
+ toApiJson(): object;
63
+ }
64
+ export declare class SocialPostResponse implements i.SocialPostResponseInterface {
65
+ socialPost: SocialPostOutput[];
66
+ static fromProto(proto: any): SocialPostResponse;
67
+ constructor(kwargs?: i.SocialPostResponseInterface);
68
+ toApiJson(): object;
69
+ }
@@ -2,9 +2,9 @@ import * as i from '../interfaces';
2
2
  import { FieldMask } from './field-mask';
3
3
  import { Hashtag } from './hashtag';
4
4
  import { Location, MultilocationPost, MultilocationPostError } from './multilocation-post';
5
- import { Media } from './linkedin';
6
- import { MediaEntry, MetaData, SocialPost, PostTemplate, SocialPostData, SchedulePostStatus } from './social-posts';
5
+ import { MediaEntry, MetaData, PostTemplate, SocialPostData, SchedulePostStatus } from './social-posts';
7
6
  import { PixabayImage } from './pixabay-image';
7
+ import { SocialPost } from './social-posts';
8
8
  import { SocialPostStats } from './social-post-stats';
9
9
  import { TenorGif } from './tenor-gif';
10
10
  import * as e from '../enums';
@@ -313,20 +313,6 @@ export declare class ListTenorGifsResponse implements i.ListTenorGifsResponseInt
313
313
  constructor(kwargs?: i.ListTenorGifsResponseInterface);
314
314
  toApiJson(): object;
315
315
  }
316
- export declare class MediaUploadRequest implements i.MediaUploadRequestInterface {
317
- accessToken: string;
318
- owner: string;
319
- media: Media[];
320
- static fromProto(proto: any): MediaUploadRequest;
321
- constructor(kwargs?: i.MediaUploadRequestInterface);
322
- toApiJson(): object;
323
- }
324
- export declare class MediaUploadResponse implements i.MediaUploadResponseInterface {
325
- uploadUrn: string[];
326
- static fromProto(proto: any): MediaUploadResponse;
327
- constructor(kwargs?: i.MediaUploadResponseInterface);
328
- toApiJson(): object;
329
- }
330
316
  export declare class PartnerListScheduledPostsResponse implements i.PartnerListScheduledPostsResponseInterface {
331
317
  socialPosts: SocialPost[];
332
318
  nextCursor: string;
@@ -428,7 +414,8 @@ export declare class SearchHashtagResponse implements i.SearchHashtagResponseInt
428
414
  export declare class SuggestMessageRequest implements i.SuggestMessageRequestInterface {
429
415
  prompt: string;
430
416
  businessId: string;
431
- length: e.PostLength;
417
+ length: e.MessageLength;
418
+ type: e.TemplateType;
432
419
  static fromProto(proto: any): SuggestMessageRequest;
433
420
  constructor(kwargs?: i.SuggestMessageRequestInterface);
434
421
  toApiJson(): object;
@@ -1,9 +1,11 @@
1
+ export { FieldMask, } from './field-mask';
2
+ export { Hashtag, } from './hashtag';
3
+ export { Location, MultilocationPost, MultilocationPostError, } from './multilocation-post';
1
4
  export { PixabayImage, } from './pixabay-image';
2
5
  export { FacebookPostStats, SocialPostStats, TwitterPostStats, } from './social-post-stats';
3
- export { Location, MultilocationPost, MultilocationPostError, } from './multilocation-post';
4
- export { FieldMask, } from './field-mask';
5
6
  export { TenorGifMediaEntry, TenorGif, TenorMediaObject, } from './tenor-gif';
6
- export { Hashtag, } from './hashtag';
7
- export { Media, } from './linkedin';
8
7
  export { CallToAction, Error, Event, MediaEntry, MetaData, PostTemplate, SchedulePostStatus, SocialPost, SocialPostData, } from './social-posts';
9
- export { CreateMultilocationPostRequest, CreateMultilocationPostResponse, CreatePostTemplateRequest, CreatePostTemplateResponse, DateRangeFilter, DeleteHashtagsRequest, DeleteMultilocationPostRequest, DeletePostTemplateRequest, DeleteSocialPostRequest, EditMultilocationPostRequest, EditMultilocationPostResponse, PartnerListScheduledSocialPostsRequestFilters, GenerateCSVForPerformanceStatsRequest, GenerateCSVForPerformanceStatsResponse, GetGeneratedCSVForPerformanceStatsRequest, GetGeneratedCSVForPerformanceStatsResponse, GetMultiSocialPostStatsRequest, GetMultiSocialPostStatsResponse, GetMultiSocialPostsRequest, GetMultiSocialPostsResponse, GetMultilocationPostRequest, GetMultilocationPostResponse, GetPostTemplateRequest, GetPostTemplateResponse, GetScheduledPostCountRequest, GetScheduledPostCountResponse, GetTenorAnonymousIdRequest, GetTenorAnonymousIdResponse, ListMultilocationPostsForBrandRequest, ListMultilocationPostsForBrandResponse, ListPixabayImagesRequest, ListPixabayImagesResponse, ListPostTemplatesRequest, ListPostTemplatesResponse, ListSocialPostsRequest, ListSocialPostsResponse, ListTenorGifsRequest, ListTenorGifsResponse, MediaUploadRequest, MediaUploadResponse, PartnerListScheduledPostsResponse, PartnerListScheduledSocialPostsRequest, PostData, RemoveFromMultilocationPostRequest, ReplaceHashtagsRequest, SchedulePostRequest, SchedulePostResponse, ScheduleToAllPagesRequest, ScheduleToAllPagesResponse, SearchHashtagRequest, SearchHashtagResponse, SuggestMessageRequest, SuggestMessageResponse, UpdatePostTemplateRequest, } from './api';
8
+ export { CreateMultilocationPostRequest, CreateMultilocationPostResponse, CreatePostTemplateRequest, CreatePostTemplateResponse, DateRangeFilter, DeleteHashtagsRequest, DeleteMultilocationPostRequest, DeletePostTemplateRequest, DeleteSocialPostRequest, EditMultilocationPostRequest, EditMultilocationPostResponse, PartnerListScheduledSocialPostsRequestFilters, GenerateCSVForPerformanceStatsRequest, GenerateCSVForPerformanceStatsResponse, GetGeneratedCSVForPerformanceStatsRequest, GetGeneratedCSVForPerformanceStatsResponse, GetMultiSocialPostStatsRequest, GetMultiSocialPostStatsResponse, GetMultiSocialPostsRequest, GetMultiSocialPostsResponse, GetMultilocationPostRequest, GetMultilocationPostResponse, GetPostTemplateRequest, GetPostTemplateResponse, GetScheduledPostCountRequest, GetScheduledPostCountResponse, GetTenorAnonymousIdRequest, GetTenorAnonymousIdResponse, ListMultilocationPostsForBrandRequest, ListMultilocationPostsForBrandResponse, ListPixabayImagesRequest, ListPixabayImagesResponse, ListPostTemplatesRequest, ListPostTemplatesResponse, ListSocialPostsRequest, ListSocialPostsResponse, ListTenorGifsRequest, ListTenorGifsResponse, PartnerListScheduledPostsResponse, PartnerListScheduledSocialPostsRequest, PostData, RemoveFromMultilocationPostRequest, ReplaceHashtagsRequest, SchedulePostRequest, SchedulePostResponse, ScheduleToAllPagesRequest, ScheduleToAllPagesResponse, SearchHashtagRequest, SearchHashtagResponse, SuggestMessageRequest, SuggestMessageResponse, UpdatePostTemplateRequest, } from './api';
9
+ export { Link, Metadata, PostAction, PostContent, PostCustomization, PostEvent, PostMedia, SocialPost as SocialPostV2, } from './social-post-v2';
10
+ export { Media, } from './linkedin-v2';
11
+ export { CreateImageRequest, CreateImageResponse, DeletePostRequest, ImageCreated, MediaUploadRequest, MediaUploadResponse, SocialPostOutput, SocialPostRequest, SocialPostResponse, } from './api-v2';
@@ -0,0 +1,72 @@
1
+ import * as i from '../interfaces';
2
+ import * as e from '../enums';
3
+ export declare function enumStringToValue<E>(enumRef: any, value: string): E;
4
+ export declare class Link implements i.LinkInterface {
5
+ name: string;
6
+ picture: string;
7
+ description: string;
8
+ title: string;
9
+ url: string;
10
+ shortcode: string;
11
+ static fromProto(proto: any): Link;
12
+ constructor(kwargs?: i.LinkInterface);
13
+ toApiJson(): object;
14
+ }
15
+ export declare class Metadata implements i.MetadataInterface {
16
+ name: string;
17
+ value: string;
18
+ static fromProto(proto: any): Metadata;
19
+ constructor(kwargs?: i.MetadataInterface);
20
+ toApiJson(): object;
21
+ }
22
+ export declare class PostAction implements i.PostActionInterface {
23
+ type: string;
24
+ linkUrl: string;
25
+ static fromProto(proto: any): PostAction;
26
+ constructor(kwargs?: i.PostActionInterface);
27
+ toApiJson(): object;
28
+ }
29
+ export declare class PostContent implements i.PostContentInterface {
30
+ postText: string;
31
+ media: PostMedia[];
32
+ link: Link[];
33
+ static fromProto(proto: any): PostContent;
34
+ constructor(kwargs?: i.PostContentInterface);
35
+ toApiJson(): object;
36
+ }
37
+ export declare class PostCustomization implements i.PostCustomizationInterface {
38
+ event: PostEvent;
39
+ action: PostAction;
40
+ static fromProto(proto: any): PostCustomization;
41
+ constructor(kwargs?: i.PostCustomizationInterface);
42
+ toApiJson(): object;
43
+ }
44
+ export declare class PostEvent implements i.PostEventInterface {
45
+ title: string;
46
+ start: Date;
47
+ end: Date;
48
+ static fromProto(proto: any): PostEvent;
49
+ constructor(kwargs?: i.PostEventInterface);
50
+ toApiJson(): object;
51
+ }
52
+ export declare class PostMedia implements i.PostMediaInterface {
53
+ mediaId: string;
54
+ mediaUrl: string;
55
+ mediaType: string;
56
+ containerId: string;
57
+ metadata: Metadata[];
58
+ static fromProto(proto: any): PostMedia;
59
+ constructor(kwargs?: i.PostMediaInterface);
60
+ toApiJson(): object;
61
+ }
62
+ export declare class SocialPost implements i.SocialPostInterface {
63
+ businessId: string;
64
+ socialServiceId: string;
65
+ postContent: PostContent;
66
+ scheduled: Date;
67
+ customization: PostCustomization;
68
+ postType: e.PostType;
69
+ static fromProto(proto: any): SocialPost;
70
+ constructor(kwargs?: i.SocialPostInterface);
71
+ toApiJson(): object;
72
+ }
@@ -0,0 +1,17 @@
1
+ import { CreateImageRequest, CreateImageResponse, SocialPostRequest, SocialPostResponse } from './objects/';
2
+ import { CreateImageRequestInterface, SocialPostRequestInterface } 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 SocialPostsV2ApiService {
8
+ private http;
9
+ private hostService;
10
+ private _host;
11
+ constructor(http: HttpClient, hostService: HostService);
12
+ private apiOptions;
13
+ scheduleSocialPosts(r: SocialPostRequest | SocialPostRequestInterface): Observable<SocialPostResponse>;
14
+ createImages(r: CreateImageRequest | CreateImageRequestInterface): Observable<CreateImageResponse>;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<SocialPostsV2ApiService, never>;
16
+ static ɵprov: i0.ɵɵInjectableDeclaration<SocialPostsV2ApiService>;
17
+ }
package/lib/index.d.ts CHANGED
@@ -5,4 +5,4 @@ export { TenorGifsService } from './tenor-gifs.service';
5
5
  export { PixabayImageService } from './pixabay-image.service';
6
6
  export { HashTagsService } from './hashtag.service';
7
7
  export { PostPerformanceService } from './post-performance.service';
8
- export { FieldMask, Location, MultilocationPost, PostingStatus, RemoveReason, MultilocationPostApiService, GetMultilocationPostRequest, DeleteMultilocationPostRequest, ListMultilocationPostsForBrandRequest, PostPerformanceApiService, PostLength, } from './_internal';
8
+ export { FieldMask, Location, MultilocationPost, PostingStatus, RemoveReason, MultilocationPostApiService, GetMultilocationPostRequest, DeleteMultilocationPostRequest, ListMultilocationPostsForBrandRequest, PostPerformanceApiService, MessageLength, TemplateType } from './_internal';
@@ -1,7 +1,7 @@
1
1
  import { Observable } from 'rxjs';
2
2
  import { ListSocialPostsResponse, GetMultiSocialPostsResponse, GetScheduledPostCountResponse, SuggestMessageResponse } from './_internal/objects/api';
3
3
  import { SocialPostsApiService } from './_internal/social-posts.api.service';
4
- import { PostLength } from "./_internal";
4
+ import { MessageLength, TemplateType } from "./_internal";
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class SocialPostsService {
7
7
  private socialPostsApiService;
@@ -9,7 +9,7 @@ export declare class SocialPostsService {
9
9
  list(start: Date, end: Date, socialServiceIds: string[], businessId: string, partnerId: string, cursor: string, tags: string[], pageSize: number): Observable<ListSocialPostsResponse>;
10
10
  getMultiSocialPosts(businessId: string, internalPostIds: string[]): Observable<GetMultiSocialPostsResponse>;
11
11
  getScheduledPostCount(partnerId: string, businessId: string, socialServiceIds: string[]): Observable<GetScheduledPostCountResponse>;
12
- suggestMessage(businessId: string, prompt: string, postLength: PostLength): Observable<SuggestMessageResponse>;
12
+ suggestMessage(businessId: string, prompt: string, postLength: MessageLength, templateType: TemplateType): Observable<SuggestMessageResponse>;
13
13
  static ɵfac: i0.ɵɵFactoryDeclaration<SocialPostsService, never>;
14
14
  static ɵprov: i0.ɵɵInjectableDeclaration<SocialPostsService>;
15
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vendasta/social-posts",
3
- "version": "5.6.1",
3
+ "version": "5.8.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^14.0.2",
6
6
  "@angular/core": "^14.0.2"
@@ -1,15 +0,0 @@
1
- // *********************************
2
- // Code generated by sdkgen
3
- // DO NOT EDIT!.
4
- //
5
- // Enums.
6
- // *********************************
7
- export var MediaType;
8
- (function (MediaType) {
9
- MediaType[MediaType["MEDIA_TYPE_INVALID"] = 0] = "MEDIA_TYPE_INVALID";
10
- MediaType[MediaType["MEDIA_TYPE_IMAGE"] = 1] = "MEDIA_TYPE_IMAGE";
11
- MediaType[MediaType["MEDIA_TYPE_VIDEO"] = 2] = "MEDIA_TYPE_VIDEO";
12
- MediaType[MediaType["MEDIA_TYPE_GIF"] = 3] = "MEDIA_TYPE_GIF";
13
- MediaType[MediaType["MEDIA_TYPE_CAROUSEL"] = 4] = "MEDIA_TYPE_CAROUSEL";
14
- })(MediaType || (MediaType = {}));
15
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlua2VkaW4uZW51bS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NvY2lhbF9wb3N0c19zZGsvc3JjL2xpYi9faW50ZXJuYWwvZW51bXMvbGlua2VkaW4uZW51bS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxvQ0FBb0M7QUFDcEMsMkJBQTJCO0FBQzNCLGdCQUFnQjtBQUNoQixFQUFFO0FBQ0YsU0FBUztBQUNULG9DQUFvQztBQUVwQyxNQUFNLENBQU4sSUFBWSxTQU1YO0FBTkQsV0FBWSxTQUFTO0lBQ2pCLHFFQUFzQixDQUFBO0lBQ3RCLGlFQUFvQixDQUFBO0lBQ3BCLGlFQUFvQixDQUFBO0lBQ3BCLDZEQUFrQixDQUFBO0lBQ2xCLHVFQUF1QixDQUFBO0FBQzNCLENBQUMsRUFOVyxTQUFTLEtBQVQsU0FBUyxRQU1wQiIsInNvdXJjZXNDb250ZW50IjpbIi8vICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxuLy8gQ29kZSBnZW5lcmF0ZWQgYnkgc2RrZ2VuXG4vLyBETyBOT1QgRURJVCEuXG4vL1xuLy8gRW51bXMuXG4vLyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcblxuZXhwb3J0IGVudW0gTWVkaWFUeXBlIHtcbiAgICBNRURJQV9UWVBFX0lOVkFMSUQgPSAwLFxuICAgIE1FRElBX1RZUEVfSU1BR0UgPSAxLFxuICAgIE1FRElBX1RZUEVfVklERU8gPSAyLFxuICAgIE1FRElBX1RZUEVfR0lGID0gMyxcbiAgICBNRURJQV9UWVBFX0NBUk9VU0VMID0gNCxcbn1cbiJdfQ==
@@ -1,8 +0,0 @@
1
- // *********************************
2
- // Code generated by sdkgen
3
- // DO NOT EDIT!.
4
- //
5
- // Interfaces.
6
- // *********************************
7
- export {};
8
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlua2VkaW4uaW50ZXJmYWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc29jaWFsX3Bvc3RzX3Nkay9zcmMvbGliL19pbnRlcm5hbC9pbnRlcmZhY2VzL2xpbmtlZGluLmludGVyZmFjZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxvQ0FBb0M7QUFDcEMsMkJBQTJCO0FBQzNCLGdCQUFnQjtBQUNoQixFQUFFO0FBQ0YsY0FBYztBQUNkLG9DQUFvQyIsInNvdXJjZXNDb250ZW50IjpbIi8vICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxuLy8gQ29kZSBnZW5lcmF0ZWQgYnkgc2RrZ2VuXG4vLyBETyBOT1QgRURJVCEuXG4vL1xuLy8gSW50ZXJmYWNlcy5cbi8vICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxuXG5pbXBvcnQgKiBhcyBlIGZyb20gJy4uL2VudW1zJztcblxuZXhwb3J0IGludGVyZmFjZSBNZWRpYUludGVyZmFjZSB7XG4gICAgdXJsPzogc3RyaW5nO1xuICAgIG1lZGlhVHlwZT86IGUuTWVkaWFUeXBlO1xufVxuXG4iXX0=
@@ -1,34 +0,0 @@
1
- import * as e from '../enums';
2
- export function enumStringToValue(enumRef, value) {
3
- if (typeof value === 'number') {
4
- return value;
5
- }
6
- return enumRef[value];
7
- }
8
- export class Media {
9
- constructor(kwargs) {
10
- if (!kwargs) {
11
- return;
12
- }
13
- Object.assign(this, kwargs);
14
- }
15
- static fromProto(proto) {
16
- let m = new Media();
17
- m = Object.assign(m, proto);
18
- if (proto.mediaType) {
19
- m.mediaType = enumStringToValue(e.MediaType, proto.mediaType);
20
- }
21
- return m;
22
- }
23
- toApiJson() {
24
- const toReturn = {};
25
- if (typeof this.url !== 'undefined') {
26
- toReturn['url'] = this.url;
27
- }
28
- if (typeof this.mediaType !== 'undefined') {
29
- toReturn['mediaType'] = this.mediaType;
30
- }
31
- return toReturn;
32
- }
33
- }
34
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlua2VkaW4uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zb2NpYWxfcG9zdHNfc2RrL3NyYy9saWIvX2ludGVybmFsL29iamVjdHMvbGlua2VkaW4udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBUUEsT0FBTyxLQUFLLENBQUMsTUFBTSxVQUFVLENBQUM7QUFFOUIsTUFBTSxVQUFVLGlCQUFpQixDQUFJLE9BQVksRUFBRSxLQUFhO0lBQzlELElBQUksT0FBTyxLQUFLLEtBQUssUUFBUSxFQUFFO1FBQzdCLE9BQU8sS0FBSyxDQUFDO0tBQ2Q7SUFDRCxPQUFPLE9BQU8sQ0FBQyxLQUFLLENBQUMsQ0FBQztBQUN4QixDQUFDO0FBRUQsTUFBTSxPQUFPLEtBQUs7SUFXZCxZQUFZLE1BQXlCO1FBQ2pDLElBQUksQ0FBQyxNQUFNLEVBQUU7WUFDVCxPQUFPO1NBQ1Y7UUFDRCxNQUFNLENBQUMsTUFBTSxDQUFDLElBQUksRUFBRSxNQUFNLENBQUMsQ0FBQztJQUNoQyxDQUFDO0lBWkQsTUFBTSxDQUFDLFNBQVMsQ0FBQyxLQUFVO1FBQ3ZCLElBQUksQ0FBQyxHQUFHLElBQUksS0FBSyxFQUFFLENBQUM7UUFDcEIsQ0FBQyxHQUFHLE1BQU0sQ0FBQyxNQUFNLENBQUMsQ0FBQyxFQUFFLEtBQUssQ0FBQyxDQUFDO1FBQzVCLElBQUksS0FBSyxDQUFDLFNBQVMsRUFBRTtZQUFDLENBQUMsQ0FBQyxTQUFTLEdBQUcsaUJBQWlCLENBQWMsQ0FBQyxDQUFDLFNBQVMsRUFBRSxLQUFLLENBQUMsU0FBUyxDQUFDLENBQUM7U0FBQztRQUNsRyxPQUFPLENBQUMsQ0FBQztJQUNiLENBQUM7SUFTRCxTQUFTO1FBQ0wsTUFBTSxRQUFRLEdBRVYsRUFBRSxDQUFDO1FBRVAsSUFBSSxPQUFPLElBQUksQ0FBQyxHQUFHLEtBQUssV0FBVyxFQUFFO1lBQUMsUUFBUSxDQUFDLEtBQUssQ0FBQyxHQUFHLElBQUksQ0FBQyxHQUFHLENBQUM7U0FBQztRQUNsRSxJQUFJLE9BQU8sSUFBSSxDQUFDLFNBQVMsS0FBSyxXQUFXLEVBQUU7WUFBQyxRQUFRLENBQUMsV0FBVyxDQUFDLEdBQUcsSUFBSSxDQUFDLFNBQVMsQ0FBQztTQUFDO1FBQ3BGLE9BQU8sUUFBUSxDQUFDO0lBQ3BCLENBQUM7Q0FDSiIsInNvdXJjZXNDb250ZW50IjpbIi8vICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxuLy8gQ29kZSBnZW5lcmF0ZWQgYnkgc2RrZ2VuXG4vLyBETyBOT1QgRURJVCEuXG4vL1xuLy8gT2JqZWN0cy5cbi8vICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxuaW1wb3J0ICogYXMgaSBmcm9tICcuLi9pbnRlcmZhY2VzJztcblxuaW1wb3J0ICogYXMgZSBmcm9tICcuLi9lbnVtcyc7XG5cbmV4cG9ydCBmdW5jdGlvbiBlbnVtU3RyaW5nVG9WYWx1ZTxFPihlbnVtUmVmOiBhbnksIHZhbHVlOiBzdHJpbmcpOiBFIHtcbiAgaWYgKHR5cGVvZiB2YWx1ZSA9PT0gJ251bWJlcicpIHtcbiAgICByZXR1cm4gdmFsdWU7XG4gIH1cbiAgcmV0dXJuIGVudW1SZWZbdmFsdWVdO1xufVxuXG5leHBvcnQgY2xhc3MgTWVkaWEgaW1wbGVtZW50cyBpLk1lZGlhSW50ZXJmYWNlIHtcbiAgICB1cmw6IHN0cmluZztcbiAgICBtZWRpYVR5cGU6IGUuTWVkaWFUeXBlO1xuXG4gICAgc3RhdGljIGZyb21Qcm90byhwcm90bzogYW55KTogTWVkaWEge1xuICAgICAgICBsZXQgbSA9IG5ldyBNZWRpYSgpO1xuICAgICAgICBtID0gT2JqZWN0LmFzc2lnbihtLCBwcm90byk7XG4gICAgICAgIGlmIChwcm90by5tZWRpYVR5cGUpIHttLm1lZGlhVHlwZSA9IGVudW1TdHJpbmdUb1ZhbHVlPGUuTWVkaWFUeXBlPihlLk1lZGlhVHlwZSwgcHJvdG8ubWVkaWFUeXBlKTt9XG4gICAgICAgIHJldHVybiBtO1xuICAgIH1cblxuICAgIGNvbnN0cnVjdG9yKGt3YXJncz86IGkuTWVkaWFJbnRlcmZhY2UpIHtcbiAgICAgICAgaWYgKCFrd2FyZ3MpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICBPYmplY3QuYXNzaWduKHRoaXMsIGt3YXJncyk7XG4gICAgfVxuXG4gICAgdG9BcGlKc29uKCk6IG9iamVjdCB7XG4gICAgICAgIGNvbnN0IHRvUmV0dXJuOiB7XG4gICAgICAgICAgICBba2V5OiBzdHJpbmddOiBhbnk7XG4gICAgICAgIH0gPSB7fTtcbiAgICAgICAgXG4gICAgICAgIGlmICh0eXBlb2YgdGhpcy51cmwgIT09ICd1bmRlZmluZWQnKSB7dG9SZXR1cm5bJ3VybCddID0gdGhpcy51cmw7fVxuICAgICAgICBpZiAodHlwZW9mIHRoaXMubWVkaWFUeXBlICE9PSAndW5kZWZpbmVkJykge3RvUmV0dXJuWydtZWRpYVR5cGUnXSA9IHRoaXMubWVkaWFUeXBlO31cbiAgICAgICAgcmV0dXJuIHRvUmV0dXJuO1xuICAgIH1cbn1cblxuIl19