@vendasta/social-posts 5.19.0 → 5.19.2
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/esm2020/lib/_internal/interfaces/api-v2.interface.mjs +1 -1
- package/esm2020/lib/_internal/interfaces/index.mjs +1 -1
- package/esm2020/lib/_internal/objects/api-v2.mjs +53 -1
- package/esm2020/lib/_internal/objects/index.mjs +2 -2
- package/esm2020/lib/_internal/unsplash.api.service.mjs +7 -2
- package/esm2020/lib/index.mjs +2 -1
- package/esm2020/lib/unsplash-image.service.mjs +23 -0
- package/fesm2015/vendasta-social-posts.mjs +76 -1
- package/fesm2015/vendasta-social-posts.mjs.map +1 -1
- package/fesm2020/vendasta-social-posts.mjs +76 -1
- package/fesm2020/vendasta-social-posts.mjs.map +1 -1
- package/lib/_internal/interfaces/api-v2.interface.d.ts +9 -0
- package/lib/_internal/interfaces/index.d.ts +1 -1
- package/lib/_internal/objects/api-v2.d.ts +15 -0
- package/lib/_internal/objects/index.d.ts +1 -1
- package/lib/_internal/unsplash.api.service.d.ts +3 -2
- package/lib/index.d.ts +1 -0
- package/lib/unsplash-image.service.d.ts +11 -0
- package/package.json +1 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { UnsplashApiService } from './_internal/unsplash.api.service';
|
|
3
|
+
import { ListUnsplashImagesRequest } from './_internal/objects/api-v2';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "./_internal/unsplash.api.service";
|
|
6
|
+
export class UnsplashImageService {
|
|
7
|
+
constructor(unsplashApiService) {
|
|
8
|
+
this.unsplashApiService = unsplashApiService;
|
|
9
|
+
}
|
|
10
|
+
listUnsplashImages(query, page = 1, perPage = 20, orderBy = "relevent", orientation = "squarish") {
|
|
11
|
+
const request = new ListUnsplashImagesRequest({
|
|
12
|
+
query: query, page: page, perPage: perPage, orderBy: orderBy, orientation: orientation,
|
|
13
|
+
});
|
|
14
|
+
return this.unsplashApiService.listUnsplashImages(request);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
UnsplashImageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UnsplashImageService, deps: [{ token: i1.UnsplashApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
18
|
+
UnsplashImageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UnsplashImageService, providedIn: 'root' });
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UnsplashImageService, decorators: [{
|
|
20
|
+
type: Injectable,
|
|
21
|
+
args: [{ providedIn: 'root' }]
|
|
22
|
+
}], ctorParameters: function () { return [{ type: i1.UnsplashApiService }]; } });
|
|
23
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidW5zcGxhc2gtaW1hZ2Uuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NvY2lhbF9wb3N0c19zZGsvc3JjL2xpYi91bnNwbGFzaC1pbWFnZS5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFM0MsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sa0NBQWtDLENBQUM7QUFDdEUsT0FBTyxFQUFFLHlCQUF5QixFQUE4QixNQUFNLDRCQUE0QixDQUFDOzs7QUFJbkcsTUFBTSxPQUFPLG9CQUFvQjtJQUM3QixZQUFvQixrQkFBc0M7UUFBdEMsdUJBQWtCLEdBQWxCLGtCQUFrQixDQUFvQjtJQUMxRCxDQUFDO0lBRUQsa0JBQWtCLENBQUMsS0FBYSxFQUFFLE9BQWEsQ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XNoQXBpU2VydmljZSkge1xuICAgIH1cblxuICAgIGxpc3RVbnNwbGFzaEltYWdlcyhxdWVyeTogc3RyaW5nLCBwYWdlOiBudW1iZXI9MSwgcGVyUGFnZTogbnVtYmVyPTIwLCBvcmRlckJ5PVwicmVsZXZlbnRcIiwgb3JpZW50YXRpb249XCJzcXVhcmlzaFwiKTogT2JzZXJ2YWJsZTxMaXN0VW5zcGxhc2hJbWFnZXNSZXNwb25zZT4ge1xuXG4gICAgICAgIGNvbnN0IHJlcXVlc3QgPSBuZXcgTGlzdFVuc3BsYXNoSW1hZ2VzUmVxdWVzdCh7XG4gICAgICAgICAgICBxdWVyeTogcXVlcnksIHBhZ2U6IHBhZ2UsIHBlclBhZ2U6IHBlclBhZ2UsIG9yZGVyQnk6b3JkZXJCeSwgb3JpZW50YXRpb246b3JpZW50YXRpb24sXG4gICAgICAgIH0pXG5cbiAgICAgICAgcmV0dXJuIHRoaXMudW5zcGxhc2hBcGlTZXJ2aWNlLmxpc3RVbnNwbGFzaEltYWdlcyhyZXF1ZXN0KVxuICAgIH1cblxuXG5cbn0iXX0=
|
|
@@ -4131,6 +4131,9 @@ class GeneratePostsResponse {
|
|
|
4131
4131
|
if (typeof this.posts !== 'undefined' && this.posts !== null) {
|
|
4132
4132
|
toReturn['posts'] = 'toApiJson' in this.posts ? this.posts.toApiJson() : this.posts;
|
|
4133
4133
|
}
|
|
4134
|
+
if (typeof this.keyword !== 'undefined') {
|
|
4135
|
+
toReturn['keyword'] = this.keyword;
|
|
4136
|
+
}
|
|
4134
4137
|
return toReturn;
|
|
4135
4138
|
}
|
|
4136
4139
|
}
|
|
@@ -4290,6 +4293,9 @@ class ListUnsplashImagesRequest {
|
|
|
4290
4293
|
if (typeof this.orientation !== 'undefined') {
|
|
4291
4294
|
toReturn['orientation'] = this.orientation;
|
|
4292
4295
|
}
|
|
4296
|
+
if (typeof this.random !== 'undefined') {
|
|
4297
|
+
toReturn['random'] = this.random;
|
|
4298
|
+
}
|
|
4293
4299
|
return toReturn;
|
|
4294
4300
|
}
|
|
4295
4301
|
}
|
|
@@ -4644,6 +4650,52 @@ class UpdateSocialPostResponse {
|
|
|
4644
4650
|
return toReturn;
|
|
4645
4651
|
}
|
|
4646
4652
|
}
|
|
4653
|
+
class UploadToStorageRequest {
|
|
4654
|
+
static fromProto(proto) {
|
|
4655
|
+
let m = new UploadToStorageRequest();
|
|
4656
|
+
m = Object.assign(m, proto);
|
|
4657
|
+
if (proto.mediaType) {
|
|
4658
|
+
m.mediaType = enumStringToValue(MediaType, proto.mediaType);
|
|
4659
|
+
}
|
|
4660
|
+
return m;
|
|
4661
|
+
}
|
|
4662
|
+
constructor(kwargs) {
|
|
4663
|
+
if (!kwargs) {
|
|
4664
|
+
return;
|
|
4665
|
+
}
|
|
4666
|
+
Object.assign(this, kwargs);
|
|
4667
|
+
}
|
|
4668
|
+
toApiJson() {
|
|
4669
|
+
const toReturn = {};
|
|
4670
|
+
if (typeof this.url !== 'undefined') {
|
|
4671
|
+
toReturn['url'] = this.url;
|
|
4672
|
+
}
|
|
4673
|
+
if (typeof this.mediaType !== 'undefined') {
|
|
4674
|
+
toReturn['mediaType'] = this.mediaType;
|
|
4675
|
+
}
|
|
4676
|
+
return toReturn;
|
|
4677
|
+
}
|
|
4678
|
+
}
|
|
4679
|
+
class UploadToStorageResponse {
|
|
4680
|
+
static fromProto(proto) {
|
|
4681
|
+
let m = new UploadToStorageResponse();
|
|
4682
|
+
m = Object.assign(m, proto);
|
|
4683
|
+
return m;
|
|
4684
|
+
}
|
|
4685
|
+
constructor(kwargs) {
|
|
4686
|
+
if (!kwargs) {
|
|
4687
|
+
return;
|
|
4688
|
+
}
|
|
4689
|
+
Object.assign(this, kwargs);
|
|
4690
|
+
}
|
|
4691
|
+
toApiJson() {
|
|
4692
|
+
const toReturn = {};
|
|
4693
|
+
if (typeof this.url !== 'undefined') {
|
|
4694
|
+
toReturn['url'] = this.url;
|
|
4695
|
+
}
|
|
4696
|
+
return toReturn;
|
|
4697
|
+
}
|
|
4698
|
+
}
|
|
4647
4699
|
|
|
4648
4700
|
// *********************************
|
|
4649
4701
|
// Code generated by sdkgen
|
|
@@ -5274,6 +5326,11 @@ class UnsplashApiService {
|
|
|
5274
5326
|
return this.http.post(this._host + "/socialposts.v2.Unsplash/ListUnsplashImages", request.toApiJson(), this.apiOptions())
|
|
5275
5327
|
.pipe(map(resp => ListUnsplashImagesResponse.fromProto(resp)));
|
|
5276
5328
|
}
|
|
5329
|
+
uploadToStorage(r) {
|
|
5330
|
+
const request = (r.toApiJson) ? r : new UploadToStorageRequest(r);
|
|
5331
|
+
return this.http.post(this._host + "/socialposts.v2.Unsplash/UploadToStorage", request.toApiJson(), this.apiOptions())
|
|
5332
|
+
.pipe(map(resp => UploadToStorageResponse.fromProto(resp)));
|
|
5333
|
+
}
|
|
5277
5334
|
}
|
|
5278
5335
|
UnsplashApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UnsplashApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5279
5336
|
UnsplashApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UnsplashApiService, providedIn: 'root' });
|
|
@@ -5635,9 +5692,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
5635
5692
|
args: [{ providedIn: 'root' }]
|
|
5636
5693
|
}], ctorParameters: function () { return [{ type: SocialPostsV2ApiService }]; } });
|
|
5637
5694
|
|
|
5695
|
+
class UnsplashImageService {
|
|
5696
|
+
constructor(unsplashApiService) {
|
|
5697
|
+
this.unsplashApiService = unsplashApiService;
|
|
5698
|
+
}
|
|
5699
|
+
listUnsplashImages(query, page = 1, perPage = 20, orderBy = "relevent", orientation = "squarish") {
|
|
5700
|
+
const request = new ListUnsplashImagesRequest({
|
|
5701
|
+
query: query, page: page, perPage: perPage, orderBy: orderBy, orientation: orientation,
|
|
5702
|
+
});
|
|
5703
|
+
return this.unsplashApiService.listUnsplashImages(request);
|
|
5704
|
+
}
|
|
5705
|
+
}
|
|
5706
|
+
UnsplashImageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UnsplashImageService, deps: [{ token: UnsplashApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5707
|
+
UnsplashImageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UnsplashImageService, providedIn: 'root' });
|
|
5708
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: UnsplashImageService, decorators: [{
|
|
5709
|
+
type: Injectable,
|
|
5710
|
+
args: [{ providedIn: 'root' }]
|
|
5711
|
+
}], ctorParameters: function () { return [{ type: UnsplashApiService }]; } });
|
|
5712
|
+
|
|
5638
5713
|
/**
|
|
5639
5714
|
* Generated bundle index. Do not edit.
|
|
5640
5715
|
*/
|
|
5641
5716
|
|
|
5642
|
-
export { AiInstructionService, AiInstructions, Ancestry, CallToAction, CallToActionCallToActionType, Collection, ContentGenerationService, CreateCommonAiInstructionsRequest, CreateCommonAiInstructionsResponse, CreateImageRequest, CreateImageResponse, CreateMultilocationPostRequest, CreateMultilocationPostResponse, CreatePostTemplateRequest, CreatePostTemplateResponse, DateRangeFilter, DeleteHashtagsRequest, DeleteMultilocationPostRequest, DeletePostRequest, DeletePostTemplateRequest, DeleteSocialPostRequest, EditMultilocationPostRequest, EditMultilocationPostResponse, Error, Event, FacebookPostStats, FieldMask, GenerateCSVForPerformanceStatsRequest, GenerateCSVForPerformanceStatsResponse, GeneratePostsRequest, GeneratePostsResponse, GeneratePostsResponsePost, GetCommonAiInstructionsRequest, GetCommonAiInstructionsResponse, GetGeneratedCSVForPerformanceStatsRequest, GetGeneratedCSVForPerformanceStatsResponse, GetMultiSocialPostStatsRequest, GetMultiSocialPostStatsResponse, GetMultiSocialPostsRequest, GetMultiSocialPostsResponse, GetMultilocationPostRequest, GetMultilocationPostResponse, GetPostTemplateRequest, GetPostTemplateResponse, GetScheduledPostCountRequest, GetScheduledPostCountResponse, GetTenorAnonymousIdRequest, GetTenorAnonymousIdResponse, HashTagsService, Hashtag, Image, ImageBlob, ImageCreated, ImageUrl, LinkV2, Links, ListMultilocationPostsForBrandRequest, ListMultilocationPostsForBrandResponse, ListPixabayImagesRequest, ListPixabayImagesResponse, ListPostTemplatesRequest, ListPostTemplatesResponse, ListSocialPostsRequest, ListSocialPostsResponse, ListTenorGifsRequest, ListTenorGifsResponse, ListUnsplashImagesRequest, ListUnsplashImagesResponse, Location, Media, MediaEntry, MediaType, MediaUploadRequest, MediaUploadResponse, MessageLength, MetaData, MetadataV2, MultilocationPost, MultilocationPostApiService, MultilocationPostError, MultilocationPostsService, PartnerListScheduledPostsResponse, PartnerListScheduledSocialPostsRequest, PartnerListScheduledSocialPostsRequestFilters, Photo, PixabayImage, PixabayImageService, PostAction, PostActionV2, PostContentV2, PostCustomization, PostCustomizationV2, PostData, PostEvent, PostEventV2, PostMediaV2, PostPerformanceApiService, PostPerformanceService, PostStatusV2, PostTemplate, PostTemplatesService, PostType, PostTypeV2, PostingStatus, RemoveFromMultilocationPostRequest, RemoveReason, ReplaceHashtagsRequest, RepostSocialPostRequest, SSIDPostType, SchedulePostRequest, SchedulePostResponse, SchedulePostStatus, ScheduleToAllPagesRequest, ScheduleToAllPagesResponse, SearchHashtagRequest, SearchHashtagResponse, Social, SocialPost, SocialPostData, SocialPostDeletionStatus, SocialPostOutput, SocialPostRequest, SocialPostResponse, SocialPostService, SocialPostStats, SocialPostV2, SocialPostsService, SocialPostsV2Service, Source, SubAncestry, SuggestMessageRequest, SuggestMessageResponse, Tags, TemplateType, TenorGif, TenorGifMediaMapEntry, TenorGifsService, TenorMediaObject, TwitterPostStats, UpdateCommonAiInstructionsRequest, UpdateCommonAiInstructionsResponse, UpdatePostTemplateRequest, UpdateSocialPostRequest, UpdateSocialPostResponse, Urls, User, UserLink, YoutubeCustomization, YoutubeCustomizationPrivacyStatus, YoutubeCustomizationV2, YoutubeCustomizationV2PrivacyStatusV2 };
|
|
5717
|
+
export { AiInstructionService, AiInstructions, Ancestry, CallToAction, CallToActionCallToActionType, Collection, ContentGenerationService, CreateCommonAiInstructionsRequest, CreateCommonAiInstructionsResponse, CreateImageRequest, CreateImageResponse, CreateMultilocationPostRequest, CreateMultilocationPostResponse, CreatePostTemplateRequest, CreatePostTemplateResponse, DateRangeFilter, DeleteHashtagsRequest, DeleteMultilocationPostRequest, DeletePostRequest, DeletePostTemplateRequest, DeleteSocialPostRequest, EditMultilocationPostRequest, EditMultilocationPostResponse, Error, Event, FacebookPostStats, FieldMask, GenerateCSVForPerformanceStatsRequest, GenerateCSVForPerformanceStatsResponse, GeneratePostsRequest, GeneratePostsResponse, GeneratePostsResponsePost, GetCommonAiInstructionsRequest, GetCommonAiInstructionsResponse, GetGeneratedCSVForPerformanceStatsRequest, GetGeneratedCSVForPerformanceStatsResponse, GetMultiSocialPostStatsRequest, GetMultiSocialPostStatsResponse, GetMultiSocialPostsRequest, GetMultiSocialPostsResponse, GetMultilocationPostRequest, GetMultilocationPostResponse, GetPostTemplateRequest, GetPostTemplateResponse, GetScheduledPostCountRequest, GetScheduledPostCountResponse, GetTenorAnonymousIdRequest, GetTenorAnonymousIdResponse, HashTagsService, Hashtag, Image, ImageBlob, ImageCreated, ImageUrl, LinkV2, Links, ListMultilocationPostsForBrandRequest, ListMultilocationPostsForBrandResponse, ListPixabayImagesRequest, ListPixabayImagesResponse, ListPostTemplatesRequest, ListPostTemplatesResponse, ListSocialPostsRequest, ListSocialPostsResponse, ListTenorGifsRequest, ListTenorGifsResponse, ListUnsplashImagesRequest, ListUnsplashImagesResponse, Location, Media, MediaEntry, MediaType, MediaUploadRequest, MediaUploadResponse, MessageLength, MetaData, MetadataV2, MultilocationPost, MultilocationPostApiService, MultilocationPostError, MultilocationPostsService, PartnerListScheduledPostsResponse, PartnerListScheduledSocialPostsRequest, PartnerListScheduledSocialPostsRequestFilters, Photo, PixabayImage, PixabayImageService, PostAction, PostActionV2, PostContentV2, PostCustomization, PostCustomizationV2, PostData, PostEvent, PostEventV2, PostMediaV2, PostPerformanceApiService, PostPerformanceService, PostStatusV2, PostTemplate, PostTemplatesService, PostType, PostTypeV2, PostingStatus, RemoveFromMultilocationPostRequest, RemoveReason, ReplaceHashtagsRequest, RepostSocialPostRequest, SSIDPostType, SchedulePostRequest, SchedulePostResponse, SchedulePostStatus, ScheduleToAllPagesRequest, ScheduleToAllPagesResponse, SearchHashtagRequest, SearchHashtagResponse, Social, SocialPost, SocialPostData, SocialPostDeletionStatus, SocialPostOutput, SocialPostRequest, SocialPostResponse, SocialPostService, SocialPostStats, SocialPostV2, SocialPostsService, SocialPostsV2Service, Source, SubAncestry, SuggestMessageRequest, SuggestMessageResponse, Tags, TemplateType, TenorGif, TenorGifMediaMapEntry, TenorGifsService, TenorMediaObject, TwitterPostStats, UnsplashImageService, UpdateCommonAiInstructionsRequest, UpdateCommonAiInstructionsResponse, UpdatePostTemplateRequest, UpdateSocialPostRequest, UpdateSocialPostResponse, UploadToStorageRequest, UploadToStorageResponse, Urls, User, UserLink, YoutubeCustomization, YoutubeCustomizationPrivacyStatus, YoutubeCustomizationV2, YoutubeCustomizationV2PrivacyStatusV2 };
|
|
5643
5718
|
//# sourceMappingURL=vendasta-social-posts.mjs.map
|