@parra/parra-js-sdk 0.3.625 → 0.3.628

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.
@@ -811,8 +811,16 @@ export interface Site {
811
811
  tenant_id: string;
812
812
  name: string;
813
813
  description: string;
814
+ logo?: ImageAssetStub | null;
815
+ wordmark?: ImageAssetStub | null;
814
816
  icons: Array<SiteIconStub>;
815
817
  }
818
+ export interface UpdateSiteRequestBody {
819
+ name?: string;
820
+ description?: string | null;
821
+ logo_asset_id?: string | null;
822
+ wordmark_asset_id?: string | null;
823
+ }
816
824
  export declare enum TagPool {
817
825
  content = "content"
818
826
  }
@@ -1794,6 +1802,8 @@ export interface UpdateProductRequestBody {
1794
1802
  disabled?: boolean;
1795
1803
  icon_asset_id?: string | null;
1796
1804
  image_asset_id?: string | null;
1805
+ cta_title?: string | null;
1806
+ cta_url?: string | null;
1797
1807
  }
1798
1808
  export interface CreateProductEntitlementRequestBody {
1799
1809
  entitlement_id: string;
@@ -7031,6 +7041,8 @@ declare class ParraAPI {
7031
7041
  }, options?: Options) => Promise<ContentCardCollectionResponse>;
7032
7042
  uploadSiteIcon: (tenant_id: string, site_id: string, site_icon_type: string, site_icon_size: number, body: UploadImageRequestBody, options?: Options) => Promise<SiteIcon>;
7033
7043
  deleteSiteIcon: (tenant_id: string, site_id: string, site_icon_type: string, site_icon_size: number, options?: Options) => Promise<Response>;
7044
+ uploadSiteLogo: (tenant_id: string, site_id: string, body: UploadImageRequestBody, options?: Options) => Promise<ImageAsset>;
7045
+ uploadSiteWordmark: (tenant_id: string, site_id: string, body: UploadImageRequestBody, options?: Options) => Promise<ImageAsset>;
7034
7046
  updateBackgroundImageForContentCardById: (tenant_id: string, content_card_id: string, body: UploadImageRequestBody, options?: Options) => Promise<ContentCard>;
7035
7047
  uploadAttachmentForCreatorUpdateById: (tenant_id: string, creator_update_id: string, body: UploadImageRequestBody, options?: Options) => Promise<ImageAsset>;
7036
7048
  uploadLogoForTenantById: (tenant_id: string, body: UploadImageRequestBody, options?: Options) => Promise<ImageAsset>;
@@ -7039,6 +7051,8 @@ declare class ParraAPI {
7039
7051
  createSubscriberForEmailAudienceById: (email_audience_id: string, body: CreateEmailSubscriberRequestBody, options?: Options) => Promise<Response>;
7040
7052
  getSiteForTenant: (tenant_id: string, options?: Options) => Promise<Site>;
7041
7053
  getSiteById: (tenant_id: string, site_id: string, options?: Options) => Promise<Site>;
7054
+ updateSiteById: (tenant_id: string, site_id: string, body?: UpdateSiteRequestBody, options?: Options) => Promise<Site>;
7055
+ deleteSiteById: (tenant_id: string, site_id: string, options?: Options) => Promise<Response>;
7042
7056
  createTag: (tenant_id: string, body: CreateTagRequestBody, options?: Options) => Promise<Tag>;
7043
7057
  paginateTags: (tenant_id: string, query?: {
7044
7058
  pool?: string;
package/dist/ParraAPI.js CHANGED
@@ -836,6 +836,24 @@ var ParraAPI = /** @class */ (function () {
836
836
  if (options === void 0) { options = {}; }
837
837
  return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/sites/").concat(site_id, "/icons/").concat(site_icon_type, "/").concat(site_icon_size), method: "delete" }, options));
838
838
  };
839
+ this.uploadSiteLogo = function (tenant_id, site_id, body, options) {
840
+ if (options === void 0) { options = {}; }
841
+ var formData = new FormData();
842
+ Object.entries(body).forEach(function (_a) {
843
+ var key = _a[0], value = _a[1];
844
+ formData.append(key, value);
845
+ });
846
+ return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/sites/").concat(site_id, "/logo"), method: "post", body: formData, headers: {} }, options));
847
+ };
848
+ this.uploadSiteWordmark = function (tenant_id, site_id, body, options) {
849
+ if (options === void 0) { options = {}; }
850
+ var formData = new FormData();
851
+ Object.entries(body).forEach(function (_a) {
852
+ var key = _a[0], value = _a[1];
853
+ formData.append(key, value);
854
+ });
855
+ return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/sites/").concat(site_id, "/wordmark"), method: "post", body: formData, headers: {} }, options));
856
+ };
839
857
  this.updateBackgroundImageForContentCardById = function (tenant_id, content_card_id, body, options) {
840
858
  if (options === void 0) { options = {}; }
841
859
  var formData = new FormData();
@@ -885,6 +903,16 @@ var ParraAPI = /** @class */ (function () {
885
903
  if (options === void 0) { options = {}; }
886
904
  return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/sites/").concat(site_id), method: "get" }, options));
887
905
  };
906
+ this.updateSiteById = function (tenant_id, site_id, body, options) {
907
+ if (options === void 0) { options = {}; }
908
+ return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/sites/").concat(site_id), method: "put", body: JSON.stringify(body), headers: {
909
+ "content-type": "application/json",
910
+ } }, options));
911
+ };
912
+ this.deleteSiteById = function (tenant_id, site_id, options) {
913
+ if (options === void 0) { options = {}; }
914
+ return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/sites/").concat(site_id), method: "delete" }, options));
915
+ };
888
916
  this.createTag = function (tenant_id, body, options) {
889
917
  if (options === void 0) { options = {}; }
890
918
  return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/tags"), method: "post", body: JSON.stringify(body), headers: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.3.625",
3
+ "version": "0.3.628",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",