@vendasta/social-posts 5.9.0 → 5.9.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.
@@ -2985,6 +2985,9 @@ class SocialPost {
2985
2985
  if (typeof this.postType !== 'undefined') {
2986
2986
  toReturn['postType'] = this.postType;
2987
2987
  }
2988
+ if (typeof this.internalPostId !== 'undefined') {
2989
+ toReturn['internalPostId'] = this.internalPostId;
2990
+ }
2988
2991
  return toReturn;
2989
2992
  }
2990
2993
  }
@@ -3112,6 +3115,26 @@ class DeletePostRequest {
3112
3115
  return toReturn;
3113
3116
  }
3114
3117
  }
3118
+ class ImageBlob {
3119
+ constructor(kwargs) {
3120
+ if (!kwargs) {
3121
+ return;
3122
+ }
3123
+ Object.assign(this, kwargs);
3124
+ }
3125
+ static fromProto(proto) {
3126
+ let m = new ImageBlob();
3127
+ m = Object.assign(m, proto);
3128
+ return m;
3129
+ }
3130
+ toApiJson() {
3131
+ const toReturn = {};
3132
+ if (typeof this.blob !== 'undefined') {
3133
+ toReturn['blob'] = this.blob;
3134
+ }
3135
+ return toReturn;
3136
+ }
3137
+ }
3115
3138
  class ImageCreated {
3116
3139
  constructor(kwargs) {
3117
3140
  if (!kwargs) {
@@ -3135,6 +3158,26 @@ class ImageCreated {
3135
3158
  return toReturn;
3136
3159
  }
3137
3160
  }
3161
+ class ImageUrl {
3162
+ constructor(kwargs) {
3163
+ if (!kwargs) {
3164
+ return;
3165
+ }
3166
+ Object.assign(this, kwargs);
3167
+ }
3168
+ static fromProto(proto) {
3169
+ let m = new ImageUrl();
3170
+ m = Object.assign(m, proto);
3171
+ return m;
3172
+ }
3173
+ toApiJson() {
3174
+ const toReturn = {};
3175
+ if (typeof this.url !== 'undefined') {
3176
+ toReturn['url'] = this.url;
3177
+ }
3178
+ return toReturn;
3179
+ }
3180
+ }
3138
3181
  class MediaUploadRequest {
3139
3182
  constructor(kwargs) {
3140
3183
  if (!kwargs) {
@@ -3675,6 +3718,11 @@ class SocialPostsV2ApiService {
3675
3718
  return this.http.post(this._host + "/socialposts.v2.SocialPostsV2/CreateImages", request.toApiJson(), this.apiOptions())
3676
3719
  .pipe(map(resp => CreateImageResponse.fromProto(resp)));
3677
3720
  }
3721
+ getImageByUrl(r) {
3722
+ const request = (r.toApiJson) ? r : new ImageUrl(r);
3723
+ return this.http.post(this._host + "/socialposts.v2.SocialPostsV2/GetImageByUrl", request.toApiJson(), this.apiOptions())
3724
+ .pipe(map(resp => ImageBlob.fromProto(resp)));
3725
+ }
3678
3726
  }
3679
3727
  SocialPostsV2ApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: SocialPostsV2ApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
3680
3728
  SocialPostsV2ApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: SocialPostsV2ApiService, providedIn: 'root' });
@@ -3974,6 +4022,10 @@ class SocialPostsV2Service {
3974
4022
  const req = new CreateImageRequest({ businessId: businessId, prompt: prompt, imageAmount: imageAmount, size: size, responseFormat: 'url' });
3975
4023
  return this.socialpostV2ApiService.createImages(req);
3976
4024
  }
4025
+ getImageByUrl(url) {
4026
+ const urlRequest = new ImageUrl({ url: url });
4027
+ return this.socialpostV2ApiService.getImageByUrl(urlRequest);
4028
+ }
3977
4029
  }
3978
4030
  SocialPostsV2Service.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: SocialPostsV2Service, deps: [{ token: SocialPostsV2ApiService }], target: i0.ɵɵFactoryTarget.Injectable });
3979
4031
  SocialPostsV2Service.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: SocialPostsV2Service, providedIn: 'root' });