@parra/parra-js-sdk 0.3.624 → 0.3.626
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/dist/ParraAPI.d.ts +13 -1
- package/dist/ParraAPI.js +35 -4
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
@@ -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
|
}
|
@@ -7029,8 +7037,10 @@ declare class ParraAPI {
|
|
7029
7037
|
limit?: number;
|
7030
7038
|
offset?: number;
|
7031
7039
|
}, options?: Options) => Promise<ContentCardCollectionResponse>;
|
7032
|
-
|
7040
|
+
uploadSiteIcon: (tenant_id: string, site_id: string, site_icon_type: string, site_icon_size: number, body: UploadImageRequestBody, options?: Options) => Promise<SiteIcon>;
|
7033
7041
|
deleteSiteIcon: (tenant_id: string, site_id: string, site_icon_type: string, site_icon_size: number, options?: Options) => Promise<Response>;
|
7042
|
+
uploadSiteLogo: (tenant_id: string, site_id: string, body: UploadImageRequestBody, options?: Options) => Promise<ImageAsset>;
|
7043
|
+
uploadSiteWordmark: (tenant_id: string, site_id: string, body: UploadImageRequestBody, options?: Options) => Promise<ImageAsset>;
|
7034
7044
|
updateBackgroundImageForContentCardById: (tenant_id: string, content_card_id: string, body: UploadImageRequestBody, options?: Options) => Promise<ContentCard>;
|
7035
7045
|
uploadAttachmentForCreatorUpdateById: (tenant_id: string, creator_update_id: string, body: UploadImageRequestBody, options?: Options) => Promise<ImageAsset>;
|
7036
7046
|
uploadLogoForTenantById: (tenant_id: string, body: UploadImageRequestBody, options?: Options) => Promise<ImageAsset>;
|
@@ -7039,6 +7049,8 @@ declare class ParraAPI {
|
|
7039
7049
|
createSubscriberForEmailAudienceById: (email_audience_id: string, body: CreateEmailSubscriberRequestBody, options?: Options) => Promise<Response>;
|
7040
7050
|
getSiteForTenant: (tenant_id: string, options?: Options) => Promise<Site>;
|
7041
7051
|
getSiteById: (tenant_id: string, site_id: string, options?: Options) => Promise<Site>;
|
7052
|
+
updateSiteById: (tenant_id: string, site_id: string, body: UpdateSiteRequestBody, options?: Options) => Promise<Site>;
|
7053
|
+
deleteSiteById: (tenant_id: string, site_id: string, options?: Options) => Promise<Response>;
|
7042
7054
|
createTag: (tenant_id: string, body: CreateTagRequestBody, options?: Options) => Promise<Tag>;
|
7043
7055
|
paginateTags: (tenant_id: string, query?: {
|
7044
7056
|
pool?: string;
|
package/dist/ParraAPI.js
CHANGED
@@ -823,16 +823,37 @@ var ParraAPI = /** @class */ (function () {
|
|
823
823
|
if (options === void 0) { options = {}; }
|
824
824
|
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/content-cards"), method: "get", query: query }, options));
|
825
825
|
};
|
826
|
-
this.
|
826
|
+
this.uploadSiteIcon = function (tenant_id, site_id, site_icon_type, site_icon_size, body, options) {
|
827
827
|
if (options === void 0) { options = {}; }
|
828
|
-
|
829
|
-
|
830
|
-
|
828
|
+
var formData = new FormData();
|
829
|
+
Object.entries(body).forEach(function (_a) {
|
830
|
+
var key = _a[0], value = _a[1];
|
831
|
+
formData.append(key, value);
|
832
|
+
});
|
833
|
+
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: "post", body: formData, headers: {} }, options));
|
831
834
|
};
|
832
835
|
this.deleteSiteIcon = function (tenant_id, site_id, site_icon_type, site_icon_size, options) {
|
833
836
|
if (options === void 0) { options = {}; }
|
834
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));
|
835
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
|
+
};
|
836
857
|
this.updateBackgroundImageForContentCardById = function (tenant_id, content_card_id, body, options) {
|
837
858
|
if (options === void 0) { options = {}; }
|
838
859
|
var formData = new FormData();
|
@@ -882,6 +903,16 @@ var ParraAPI = /** @class */ (function () {
|
|
882
903
|
if (options === void 0) { options = {}; }
|
883
904
|
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/sites/").concat(site_id), method: "get" }, options));
|
884
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
|
+
};
|
885
916
|
this.createTag = function (tenant_id, body, options) {
|
886
917
|
if (options === void 0) { options = {}; }
|
887
918
|
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/tags"), method: "post", body: JSON.stringify(body), headers: {
|