@cakemail-org/ui-components-v2 2.2.122 → 2.2.124
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/cjs/components/scopePicker/index.d.ts +10 -1
- package/dist/cjs/factories/contentCatalog/index.d.ts +17 -0
- package/dist/cjs/factories/index.d.ts +1 -0
- package/dist/cjs/index.js +235 -13
- package/dist/cjs/models/contentCatalog/index.d.ts +44 -0
- package/dist/cjs/models/contentCatalog/types.d.ts +37 -0
- package/dist/cjs/models/index.d.ts +1 -0
- package/dist/cjs/services/contentCatalog/index.d.ts +15 -0
- package/dist/cjs/services/contentCatalog/types.d.ts +14 -0
- package/dist/cjs/services/index.d.ts +1 -0
- package/dist/esm/components/scopePicker/index.d.ts +10 -1
- package/dist/esm/factories/contentCatalog/index.d.ts +17 -0
- package/dist/esm/factories/index.d.ts +1 -0
- package/dist/esm/index.js +224 -14
- package/dist/esm/models/contentCatalog/index.d.ts +44 -0
- package/dist/esm/models/contentCatalog/types.d.ts +37 -0
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/services/contentCatalog/index.d.ts +15 -0
- package/dist/esm/services/contentCatalog/types.d.ts +14 -0
- package/dist/esm/services/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -2,10 +2,19 @@ import React from "react";
|
|
|
2
2
|
import "./styles.scss";
|
|
3
3
|
export { groupScopesByCategory } from "./scopeGroups";
|
|
4
4
|
export type { TScopeCategorySummary } from "./scopeGroups";
|
|
5
|
+
export type TScopePickerLabels = {
|
|
6
|
+
presetsHeading?: string;
|
|
7
|
+
presets?: Record<string, string>;
|
|
8
|
+
categories?: Record<string, string>;
|
|
9
|
+
impliedHint?: string;
|
|
10
|
+
unrecognizedHint?: string;
|
|
11
|
+
selectedPermissions?: (count: number) => string;
|
|
12
|
+
};
|
|
5
13
|
export type TScopePicker = {
|
|
6
14
|
value: string[];
|
|
7
15
|
onChange: (scopes: string[]) => void;
|
|
8
16
|
isPartner?: boolean;
|
|
9
17
|
disabled?: boolean;
|
|
18
|
+
labels?: TScopePickerLabels;
|
|
10
19
|
};
|
|
11
|
-
export declare function ScopePicker({ value, onChange, isPartner, disabled }: TScopePicker): React.JSX.Element;
|
|
20
|
+
export declare function ScopePicker({ value, onChange, isPartner, disabled, labels }: TScopePicker): React.JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BeeCategoryModel, BeeCollectionModel, BeeTagModel, BeeTemplateModel, TBeeFreeList } from "../../models";
|
|
2
|
+
import { TPageSizeParam, TTemplateListParams } from "../../services/contentCatalog/types";
|
|
3
|
+
export declare class ContentCatalogFactory {
|
|
4
|
+
static listTemplates(params?: TTemplateListParams): Promise<TBeeFreeList<BeeTemplateModel>>;
|
|
5
|
+
static getTemplate({ slug }: {
|
|
6
|
+
slug: string;
|
|
7
|
+
}): Promise<BeeTemplateModel>;
|
|
8
|
+
static listCategories(params?: TPageSizeParam): Promise<TBeeFreeList<BeeCategoryModel>>;
|
|
9
|
+
static getCategory({ slug }: {
|
|
10
|
+
slug: string;
|
|
11
|
+
}): Promise<BeeCategoryModel>;
|
|
12
|
+
static listCollections(params?: TPageSizeParam): Promise<TBeeFreeList<BeeCollectionModel>>;
|
|
13
|
+
static getCollection({ slug }: {
|
|
14
|
+
slug: string;
|
|
15
|
+
}): Promise<BeeCollectionModel>;
|
|
16
|
+
static listTags(params?: TPageSizeParam): Promise<BeeTagModel[]>;
|
|
17
|
+
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -11166,6 +11166,99 @@ function untagContact(_a) {
|
|
|
11166
11166
|
});
|
|
11167
11167
|
}
|
|
11168
11168
|
|
|
11169
|
+
function listCatalogTemplates(params) {
|
|
11170
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
11171
|
+
return __generator(this, function (_a) {
|
|
11172
|
+
return [2 /*return*/, callApi({
|
|
11173
|
+
url: uiKitConfig.GATEWAY_PROXY + "/contentCatalog/templates",
|
|
11174
|
+
query: params,
|
|
11175
|
+
fetchOptions: {
|
|
11176
|
+
method: exports.EMethods.get
|
|
11177
|
+
}
|
|
11178
|
+
})];
|
|
11179
|
+
});
|
|
11180
|
+
});
|
|
11181
|
+
}
|
|
11182
|
+
function getCatalogTemplate(_a) {
|
|
11183
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
11184
|
+
var slug = _b.slug;
|
|
11185
|
+
return __generator(this, function (_c) {
|
|
11186
|
+
return [2 /*return*/, callApi({
|
|
11187
|
+
url: uiKitConfig.GATEWAY_PROXY + "/contentCatalog/templates/".concat(slug),
|
|
11188
|
+
fetchOptions: {
|
|
11189
|
+
method: exports.EMethods.get
|
|
11190
|
+
}
|
|
11191
|
+
})];
|
|
11192
|
+
});
|
|
11193
|
+
});
|
|
11194
|
+
}
|
|
11195
|
+
function listCatalogCategories(params) {
|
|
11196
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
11197
|
+
return __generator(this, function (_a) {
|
|
11198
|
+
return [2 /*return*/, callApi({
|
|
11199
|
+
url: uiKitConfig.GATEWAY_PROXY + "/contentCatalog/categories",
|
|
11200
|
+
query: params,
|
|
11201
|
+
fetchOptions: {
|
|
11202
|
+
method: exports.EMethods.get
|
|
11203
|
+
}
|
|
11204
|
+
})];
|
|
11205
|
+
});
|
|
11206
|
+
});
|
|
11207
|
+
}
|
|
11208
|
+
function getCatalogCategory(_a) {
|
|
11209
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
11210
|
+
var slug = _b.slug;
|
|
11211
|
+
return __generator(this, function (_c) {
|
|
11212
|
+
return [2 /*return*/, callApi({
|
|
11213
|
+
url: uiKitConfig.GATEWAY_PROXY + "/contentCatalog/categories/".concat(slug),
|
|
11214
|
+
fetchOptions: {
|
|
11215
|
+
method: exports.EMethods.get
|
|
11216
|
+
}
|
|
11217
|
+
})];
|
|
11218
|
+
});
|
|
11219
|
+
});
|
|
11220
|
+
}
|
|
11221
|
+
function listCatalogCollections(params) {
|
|
11222
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
11223
|
+
return __generator(this, function (_a) {
|
|
11224
|
+
return [2 /*return*/, callApi({
|
|
11225
|
+
url: uiKitConfig.GATEWAY_PROXY + "/contentCatalog/collections",
|
|
11226
|
+
query: params,
|
|
11227
|
+
fetchOptions: {
|
|
11228
|
+
method: exports.EMethods.get
|
|
11229
|
+
}
|
|
11230
|
+
})];
|
|
11231
|
+
});
|
|
11232
|
+
});
|
|
11233
|
+
}
|
|
11234
|
+
function getCatalogCollection(_a) {
|
|
11235
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
11236
|
+
var slug = _b.slug;
|
|
11237
|
+
return __generator(this, function (_c) {
|
|
11238
|
+
return [2 /*return*/, callApi({
|
|
11239
|
+
url: uiKitConfig.GATEWAY_PROXY + "/contentCatalog/collections/".concat(slug),
|
|
11240
|
+
fetchOptions: {
|
|
11241
|
+
method: exports.EMethods.get
|
|
11242
|
+
}
|
|
11243
|
+
})];
|
|
11244
|
+
});
|
|
11245
|
+
});
|
|
11246
|
+
}
|
|
11247
|
+
function listCatalogTags(params) {
|
|
11248
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
11249
|
+
return __generator(this, function (_a) {
|
|
11250
|
+
// BeeFree returns a flat array for tags, not a paginated wrapper.
|
|
11251
|
+
return [2 /*return*/, callApi({
|
|
11252
|
+
url: uiKitConfig.GATEWAY_PROXY + "/contentCatalog/tags",
|
|
11253
|
+
query: params,
|
|
11254
|
+
fetchOptions: {
|
|
11255
|
+
method: exports.EMethods.get
|
|
11256
|
+
}
|
|
11257
|
+
})];
|
|
11258
|
+
});
|
|
11259
|
+
});
|
|
11260
|
+
}
|
|
11261
|
+
|
|
11169
11262
|
var baseUrl$1 = function () { return uiKitConfig.GATEWAY_PROXY + "/customDomains"; };
|
|
11170
11263
|
function listCustomDomains(_a) {
|
|
11171
11264
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -12511,6 +12604,61 @@ var ContactModel = /** @class */ (function () {
|
|
|
12511
12604
|
return ContactModel;
|
|
12512
12605
|
}());
|
|
12513
12606
|
|
|
12607
|
+
var BeeTemplateModel = /** @class */ (function () {
|
|
12608
|
+
function BeeTemplateModel(params) {
|
|
12609
|
+
this.id = params.id;
|
|
12610
|
+
this.title = params.title;
|
|
12611
|
+
this.description = params.description;
|
|
12612
|
+
this.short_description = params.short_description;
|
|
12613
|
+
this.template_type = params.template_type;
|
|
12614
|
+
this.categories = params.categories;
|
|
12615
|
+
this.collections = params.collections;
|
|
12616
|
+
this.designer = params.designer;
|
|
12617
|
+
this.tags = params.tags;
|
|
12618
|
+
this.thumbnail = params.thumbnail;
|
|
12619
|
+
this.thumbnail_large = params.thumbnail_large;
|
|
12620
|
+
this.published_at = params.published_at;
|
|
12621
|
+
this.order = params.order;
|
|
12622
|
+
this.context = params.context;
|
|
12623
|
+
this.is_blank = params.is_blank;
|
|
12624
|
+
}
|
|
12625
|
+
BeeTemplateModel.prototype.toJson = function () {
|
|
12626
|
+
return modelToJson(this);
|
|
12627
|
+
};
|
|
12628
|
+
BeeTemplateModel.prototype.set = function (property, value) {
|
|
12629
|
+
modelSet(this, property, value);
|
|
12630
|
+
};
|
|
12631
|
+
return BeeTemplateModel;
|
|
12632
|
+
}());
|
|
12633
|
+
var BeeCategoryModel = /** @class */ (function () {
|
|
12634
|
+
function BeeCategoryModel(params) {
|
|
12635
|
+
this.id = params.id;
|
|
12636
|
+
this.name = params.name;
|
|
12637
|
+
this.parent = params.parent;
|
|
12638
|
+
}
|
|
12639
|
+
BeeCategoryModel.prototype.toJson = function () { return modelToJson(this); };
|
|
12640
|
+
BeeCategoryModel.prototype.set = function (property, value) { modelSet(this, property, value); };
|
|
12641
|
+
return BeeCategoryModel;
|
|
12642
|
+
}());
|
|
12643
|
+
var BeeCollectionModel = /** @class */ (function () {
|
|
12644
|
+
function BeeCollectionModel(params) {
|
|
12645
|
+
this.id = params.id;
|
|
12646
|
+
this.name = params.name;
|
|
12647
|
+
}
|
|
12648
|
+
BeeCollectionModel.prototype.toJson = function () { return modelToJson(this); };
|
|
12649
|
+
BeeCollectionModel.prototype.set = function (property, value) { modelSet(this, property, value); };
|
|
12650
|
+
return BeeCollectionModel;
|
|
12651
|
+
}());
|
|
12652
|
+
var BeeTagModel = /** @class */ (function () {
|
|
12653
|
+
function BeeTagModel(params) {
|
|
12654
|
+
this.id = params.id;
|
|
12655
|
+
this.name = params.name;
|
|
12656
|
+
}
|
|
12657
|
+
BeeTagModel.prototype.toJson = function () { return modelToJson(this); };
|
|
12658
|
+
BeeTagModel.prototype.set = function (property, value) { modelSet(this, property, value); };
|
|
12659
|
+
return BeeTagModel;
|
|
12660
|
+
}());
|
|
12661
|
+
|
|
12514
12662
|
exports.ECertificateStatus = void 0;
|
|
12515
12663
|
(function (ECertificateStatus) {
|
|
12516
12664
|
ECertificateStatus["unknown"] = "unknown";
|
|
@@ -19645,8 +19793,9 @@ function getImpliedScopes(scope) {
|
|
|
19645
19793
|
return implied.map(function (a) { return "".concat(resource, ":").concat(a); }).filter(function (s) { return ALL_GRANULAR_SCOPES.has(s); });
|
|
19646
19794
|
}
|
|
19647
19795
|
function ScopePicker(_a) {
|
|
19648
|
-
var
|
|
19649
|
-
var
|
|
19796
|
+
var _b;
|
|
19797
|
+
var value = _a.value, onChange = _a.onChange, _c = _a.isPartner, isPartner = _c === void 0 ? false : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.labels, labels = _e === void 0 ? {} : _e;
|
|
19798
|
+
var _f = React.useState(new Set()), expandedCategories = _f[0], setExpandedCategories = _f[1];
|
|
19650
19799
|
var selectedSet = React.useMemo(function () { return new Set(value); }, [value]);
|
|
19651
19800
|
var visibleCategories = React.useMemo(function () { return SCOPE_CATEGORIES.filter(function (c) { return !c.adminOnly || isPartner; }); }, [isPartner]);
|
|
19652
19801
|
var toggleCategory = React.useCallback(function (categoryId) {
|
|
@@ -19742,39 +19891,42 @@ function ScopePicker(_a) {
|
|
|
19742
19891
|
}, [selectedSet]);
|
|
19743
19892
|
return (React.createElement("div", { className: "scopePicker", "aria-label": "Permission scope picker" },
|
|
19744
19893
|
!disabled && (React.createElement("div", { className: "scopePicker__presets" },
|
|
19745
|
-
React.createElement("span", { className: "scopePicker__presetsLabel" }, "Quick presets:"),
|
|
19746
|
-
React.createElement("div", { className: "scopePicker__presetButtons" }, SCOPE_PRESETS.map(function (preset) {
|
|
19894
|
+
React.createElement("span", { className: "scopePicker__presetsLabel" }, (_b = labels.presetsHeading) !== null && _b !== void 0 ? _b : "Quick presets:"),
|
|
19895
|
+
React.createElement("div", { className: "scopePicker__presetButtons" }, SCOPE_PRESETS.map(function (preset) {
|
|
19896
|
+
var _a, _b;
|
|
19897
|
+
return (React.createElement("button", { key: preset.id, type: "button", className: "scopePicker__presetBtn", onClick: function () { return handlePreset(preset.id); } }, (_b = (_a = labels.presets) === null || _a === void 0 ? void 0 : _a[preset.id]) !== null && _b !== void 0 ? _b : preset.label));
|
|
19898
|
+
})))),
|
|
19747
19899
|
React.createElement("div", { className: "scopePicker__categories" }, visibleCategories.map(function (category) {
|
|
19900
|
+
var _a, _b, _c, _d, _e, _f;
|
|
19748
19901
|
var isExpanded = expandedCategories.has(category.id);
|
|
19749
19902
|
var allSelected = isCategoryAllSelected(category.id);
|
|
19750
19903
|
var someSelected = isCategorySomeSelected(category.id);
|
|
19751
19904
|
return (React.createElement("div", { key: category.id, className: "scopePicker__category ".concat(category.adminOnly ? "scopePicker__category--admin" : "") },
|
|
19752
19905
|
React.createElement("div", { className: "scopePicker__categoryHeader" },
|
|
19753
19906
|
React.createElement("label", { className: "scopePicker__categorySelect" },
|
|
19754
|
-
React.createElement(IndeterminateCheckbox, { checked: allSelected, indeterminate: someSelected && !allSelected, onChange: function (checked) { return handleCategorySelectAll(category.id, checked); }, disabled: disabled, ariaLabel: "Select all ".concat(category.label, " scopes") }),
|
|
19755
|
-
React.createElement("span", { className: "scopePicker__categoryLabel" }, category.label)),
|
|
19756
|
-
React.createElement("button", { type: "button", className: "scopePicker__categoryToggle", onClick: function () { return toggleCategory(category.id); }, "aria-expanded": isExpanded, "aria-label": "".concat(isExpanded ? "Collapse" : "Expand", " ").concat(category.label) }, isExpanded ? "▲" : "▼")),
|
|
19907
|
+
React.createElement(IndeterminateCheckbox, { checked: allSelected, indeterminate: someSelected && !allSelected, onChange: function (checked) { return handleCategorySelectAll(category.id, checked); }, disabled: disabled, ariaLabel: "Select all ".concat((_b = (_a = labels.categories) === null || _a === void 0 ? void 0 : _a[category.id]) !== null && _b !== void 0 ? _b : category.label, " scopes") }),
|
|
19908
|
+
React.createElement("span", { className: "scopePicker__categoryLabel" }, (_d = (_c = labels.categories) === null || _c === void 0 ? void 0 : _c[category.id]) !== null && _d !== void 0 ? _d : category.label)),
|
|
19909
|
+
React.createElement("button", { type: "button", className: "scopePicker__categoryToggle", onClick: function () { return toggleCategory(category.id); }, "aria-expanded": isExpanded, "aria-label": "".concat(isExpanded ? "Collapse" : "Expand", " ").concat((_f = (_e = labels.categories) === null || _e === void 0 ? void 0 : _e[category.id]) !== null && _f !== void 0 ? _f : category.label) }, isExpanded ? "▲" : "▼")),
|
|
19757
19910
|
isExpanded && (React.createElement("div", { className: "scopePicker__categoryBody" }, category.resources.map(function (resource) { return (React.createElement("div", { key: resource.resource, className: "scopePicker__resource" },
|
|
19758
19911
|
React.createElement("span", { className: "scopePicker__resourceLabel" }, resource.label),
|
|
19759
19912
|
React.createElement("div", { className: "scopePicker__actions" }, resource.actions.map(function (action) {
|
|
19913
|
+
var _a;
|
|
19760
19914
|
var scope = "".concat(resource.resource, ":").concat(action);
|
|
19761
19915
|
var checked = selectedSet.has(scope);
|
|
19762
19916
|
var implied = isImplied(scope);
|
|
19763
|
-
return (React.createElement("label", { key: action, className: "scopePicker__action ".concat(implied ? "scopePicker__action--implied" : ""), title: implied ? "Automatically included by another selected permission" : undefined },
|
|
19917
|
+
return (React.createElement("label", { key: action, className: "scopePicker__action ".concat(implied ? "scopePicker__action--implied" : ""), title: implied ? ((_a = labels.impliedHint) !== null && _a !== void 0 ? _a : "Automatically included by another selected permission") : undefined },
|
|
19764
19918
|
React.createElement("input", { type: "checkbox", checked: checked, onChange: function (e) { return handleScopeToggle(scope, e.target.checked); }, disabled: disabled || implied, "aria-label": "".concat(resource.label, " ").concat(action) }),
|
|
19765
19919
|
React.createElement("span", null, action)));
|
|
19766
19920
|
})))); })))));
|
|
19767
19921
|
})),
|
|
19768
19922
|
value.length > 0 && (React.createElement("details", { className: "scopePicker__summary" },
|
|
19769
|
-
React.createElement("summary", null,
|
|
19770
|
-
"Selected permissions (",
|
|
19771
|
-
value.length,
|
|
19772
|
-
")"),
|
|
19923
|
+
React.createElement("summary", null, labels.selectedPermissions ? labels.selectedPermissions(value.length) : "Selected permissions (".concat(value.length, ")")),
|
|
19773
19924
|
React.createElement("div", { className: "scopePicker__summaryList" }, __spreadArray([], value, true).sort().map(function (scope) {
|
|
19925
|
+
var _a;
|
|
19774
19926
|
// Scopes not in the catalog (e.g. enum drift) get a
|
|
19775
19927
|
// distinct style + tooltip so they're never invisible.
|
|
19776
19928
|
var unrecognized = !ALL_GRANULAR_SCOPES.has(scope);
|
|
19777
|
-
return (React.createElement("span", { key: scope, className: "scopePicker__summaryChip ".concat(unrecognized ? "scopePicker__summaryChip--unknown" : ""), title: unrecognized ? "Not in the current permission catalog — kept as-is on save" : undefined }, scope));
|
|
19929
|
+
return (React.createElement("span", { key: scope, className: "scopePicker__summaryChip ".concat(unrecognized ? "scopePicker__summaryChip--unknown" : ""), title: unrecognized ? ((_a = labels.unrecognizedHint) !== null && _a !== void 0 ? _a : "Not in the current permission catalog — kept as-is on save") : undefined }, scope));
|
|
19778
19930
|
}))))));
|
|
19779
19931
|
}
|
|
19780
19932
|
|
|
@@ -20328,6 +20480,64 @@ var ContactsFactory = /** @class */ (function () {
|
|
|
20328
20480
|
return ContactsFactory;
|
|
20329
20481
|
}());
|
|
20330
20482
|
|
|
20483
|
+
var ContentCatalogFactory = /** @class */ (function () {
|
|
20484
|
+
function ContentCatalogFactory() {
|
|
20485
|
+
}
|
|
20486
|
+
ContentCatalogFactory.listTemplates = function (params) {
|
|
20487
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
20488
|
+
return __generator(this, function (_a) {
|
|
20489
|
+
return [2 /*return*/, listCatalogTemplates(params).then(function (data) { return (__assign(__assign({}, data), { results: data.results.map(function (t) { return new BeeTemplateModel(t); }) })); })];
|
|
20490
|
+
});
|
|
20491
|
+
});
|
|
20492
|
+
};
|
|
20493
|
+
ContentCatalogFactory.getTemplate = function (_a) {
|
|
20494
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
20495
|
+
var slug = _b.slug;
|
|
20496
|
+
return __generator(this, function (_c) {
|
|
20497
|
+
return [2 /*return*/, getCatalogTemplate({ slug: slug }).then(function (data) { return new BeeTemplateModel(data); })];
|
|
20498
|
+
});
|
|
20499
|
+
});
|
|
20500
|
+
};
|
|
20501
|
+
ContentCatalogFactory.listCategories = function (params) {
|
|
20502
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
20503
|
+
return __generator(this, function (_a) {
|
|
20504
|
+
return [2 /*return*/, listCatalogCategories(params).then(function (data) { return (__assign(__assign({}, data), { results: data.results.map(function (c) { return new BeeCategoryModel(c); }) })); })];
|
|
20505
|
+
});
|
|
20506
|
+
});
|
|
20507
|
+
};
|
|
20508
|
+
ContentCatalogFactory.getCategory = function (_a) {
|
|
20509
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
20510
|
+
var slug = _b.slug;
|
|
20511
|
+
return __generator(this, function (_c) {
|
|
20512
|
+
return [2 /*return*/, getCatalogCategory({ slug: slug }).then(function (data) { return new BeeCategoryModel(data); })];
|
|
20513
|
+
});
|
|
20514
|
+
});
|
|
20515
|
+
};
|
|
20516
|
+
ContentCatalogFactory.listCollections = function (params) {
|
|
20517
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
20518
|
+
return __generator(this, function (_a) {
|
|
20519
|
+
return [2 /*return*/, listCatalogCollections(params).then(function (data) { return (__assign(__assign({}, data), { results: data.results.map(function (c) { return new BeeCollectionModel(c); }) })); })];
|
|
20520
|
+
});
|
|
20521
|
+
});
|
|
20522
|
+
};
|
|
20523
|
+
ContentCatalogFactory.getCollection = function (_a) {
|
|
20524
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
20525
|
+
var slug = _b.slug;
|
|
20526
|
+
return __generator(this, function (_c) {
|
|
20527
|
+
return [2 /*return*/, getCatalogCollection({ slug: slug }).then(function (data) { return new BeeCollectionModel(data); })];
|
|
20528
|
+
});
|
|
20529
|
+
});
|
|
20530
|
+
};
|
|
20531
|
+
ContentCatalogFactory.listTags = function (params) {
|
|
20532
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
20533
|
+
return __generator(this, function (_a) {
|
|
20534
|
+
return [2 /*return*/, listCatalogTags(params).then(function (tags) { return tags.map(function (t) { return new BeeTagModel(t); }); })];
|
|
20535
|
+
});
|
|
20536
|
+
});
|
|
20537
|
+
};
|
|
20538
|
+
return ContentCatalogFactory;
|
|
20539
|
+
}());
|
|
20540
|
+
|
|
20331
20541
|
var CustomDomainsFactory = /** @class */ (function () {
|
|
20332
20542
|
function CustomDomainsFactory() {
|
|
20333
20543
|
}
|
|
@@ -21197,6 +21407,10 @@ exports.AssetManager = AssetManager;
|
|
|
21197
21407
|
exports.AutomationModel = AutomationModel;
|
|
21198
21408
|
exports.AutomationsFactory = AutomationsFactory;
|
|
21199
21409
|
exports.Avatar = Avatar;
|
|
21410
|
+
exports.BeeCategoryModel = BeeCategoryModel;
|
|
21411
|
+
exports.BeeCollectionModel = BeeCollectionModel;
|
|
21412
|
+
exports.BeeTagModel = BeeTagModel;
|
|
21413
|
+
exports.BeeTemplateModel = BeeTemplateModel;
|
|
21200
21414
|
exports.BillingFactory = BillingFactory;
|
|
21201
21415
|
exports.BrandWrapper = BrandWrapper;
|
|
21202
21416
|
exports.BrandsFactory = BrandsFactory;
|
|
@@ -21213,6 +21427,7 @@ exports.ColorTextField = ColorTextField;
|
|
|
21213
21427
|
exports.CommonFormModel = CommonFormModel;
|
|
21214
21428
|
exports.ContactModel = ContactModel;
|
|
21215
21429
|
exports.ContactsFactory = ContactsFactory;
|
|
21430
|
+
exports.ContentCatalogFactory = ContentCatalogFactory;
|
|
21216
21431
|
exports.ContentSectionContainer = ContentSectionContainer;
|
|
21217
21432
|
exports.CountryDropdown = CountryDropdown;
|
|
21218
21433
|
exports.CustomDomainModel = CustomDomainModel;
|
|
@@ -21411,6 +21626,9 @@ exports.getCampaignLogsExports = getCampaignLogsExports;
|
|
|
21411
21626
|
exports.getCampaignReport = getCampaignReport;
|
|
21412
21627
|
exports.getCampaignRevisions = getCampaignRevisions;
|
|
21413
21628
|
exports.getCampaignsReportsExport = getCampaignsReportsExport;
|
|
21629
|
+
exports.getCatalogCategory = getCatalogCategory;
|
|
21630
|
+
exports.getCatalogCollection = getCatalogCollection;
|
|
21631
|
+
exports.getCatalogTemplate = getCatalogTemplate;
|
|
21414
21632
|
exports.getComparator = getComparator;
|
|
21415
21633
|
exports.getContactsExport = getContactsExport;
|
|
21416
21634
|
exports.getCustomDomain = getCustomDomain;
|
|
@@ -21469,6 +21687,10 @@ exports.listAccounts = listAccounts;
|
|
|
21469
21687
|
exports.listAutomations = listAutomations;
|
|
21470
21688
|
exports.listCampaigns = listCampaigns;
|
|
21471
21689
|
exports.listCampaignsReportsExports = listCampaignsReportsExports;
|
|
21690
|
+
exports.listCatalogCategories = listCatalogCategories;
|
|
21691
|
+
exports.listCatalogCollections = listCatalogCollections;
|
|
21692
|
+
exports.listCatalogTags = listCatalogTags;
|
|
21693
|
+
exports.listCatalogTemplates = listCatalogTemplates;
|
|
21472
21694
|
exports.listContacts = listContacts;
|
|
21473
21695
|
exports.listCustomDomains = listCustomDomains;
|
|
21474
21696
|
exports.listDkimService = listDkimService;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { TBeeCategoryModel, TBeeCollectionModel, TBeeTagModel, TBeeTemplateModel } from "./types";
|
|
2
|
+
export declare class BeeTemplateModel {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
short_description: string;
|
|
7
|
+
template_type: string;
|
|
8
|
+
categories: string[];
|
|
9
|
+
collections: string;
|
|
10
|
+
designer: string;
|
|
11
|
+
tags: string[];
|
|
12
|
+
thumbnail: string;
|
|
13
|
+
thumbnail_large: string;
|
|
14
|
+
published_at: string;
|
|
15
|
+
order: string;
|
|
16
|
+
context: string;
|
|
17
|
+
is_blank: boolean;
|
|
18
|
+
constructor(params: TBeeTemplateModel);
|
|
19
|
+
toJson(): any;
|
|
20
|
+
set<T extends keyof this>(property: T, value: this[T]): void;
|
|
21
|
+
}
|
|
22
|
+
export declare class BeeCategoryModel {
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
parent: string;
|
|
26
|
+
constructor(params: TBeeCategoryModel);
|
|
27
|
+
toJson(): any;
|
|
28
|
+
set<T extends keyof this>(property: T, value: this[T]): void;
|
|
29
|
+
}
|
|
30
|
+
export declare class BeeCollectionModel {
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
constructor(params: TBeeCollectionModel);
|
|
34
|
+
toJson(): any;
|
|
35
|
+
set<T extends keyof this>(property: T, value: this[T]): void;
|
|
36
|
+
}
|
|
37
|
+
export declare class BeeTagModel {
|
|
38
|
+
id: string;
|
|
39
|
+
name: string;
|
|
40
|
+
constructor(params: TBeeTagModel);
|
|
41
|
+
toJson(): any;
|
|
42
|
+
set<T extends keyof this>(property: T, value: this[T]): void;
|
|
43
|
+
}
|
|
44
|
+
export * from "./types";
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export interface TBeeFreeList<T> {
|
|
2
|
+
count: number;
|
|
3
|
+
next: string | null;
|
|
4
|
+
previous: string | null;
|
|
5
|
+
results: T[];
|
|
6
|
+
facets?: Record<string, unknown>;
|
|
7
|
+
}
|
|
8
|
+
export interface TBeeTemplateModel {
|
|
9
|
+
id: string;
|
|
10
|
+
title: string;
|
|
11
|
+
description: string;
|
|
12
|
+
short_description: string;
|
|
13
|
+
template_type: string;
|
|
14
|
+
categories: string[];
|
|
15
|
+
collections: string;
|
|
16
|
+
designer: string;
|
|
17
|
+
tags: string[];
|
|
18
|
+
thumbnail: string;
|
|
19
|
+
thumbnail_large: string;
|
|
20
|
+
published_at: string;
|
|
21
|
+
order: string;
|
|
22
|
+
context: string;
|
|
23
|
+
is_blank: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface TBeeCategoryModel {
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
parent: string;
|
|
29
|
+
}
|
|
30
|
+
export interface TBeeCollectionModel {
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
}
|
|
34
|
+
export interface TBeeTagModel {
|
|
35
|
+
id: string;
|
|
36
|
+
name: string;
|
|
37
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TBeeCategoryModel, TBeeCollectionModel, TBeeFreeList, TBeeTagModel, TBeeTemplateModel } from "../../models";
|
|
2
|
+
import { TPageSizeParam, TTemplateListParams } from "./types";
|
|
3
|
+
export declare function listCatalogTemplates(params?: TTemplateListParams): Promise<TBeeFreeList<TBeeTemplateModel>>;
|
|
4
|
+
export declare function getCatalogTemplate({ slug }: {
|
|
5
|
+
slug: string;
|
|
6
|
+
}): Promise<TBeeTemplateModel>;
|
|
7
|
+
export declare function listCatalogCategories(params?: TPageSizeParam): Promise<TBeeFreeList<TBeeCategoryModel>>;
|
|
8
|
+
export declare function getCatalogCategory({ slug }: {
|
|
9
|
+
slug: string;
|
|
10
|
+
}): Promise<TBeeCategoryModel>;
|
|
11
|
+
export declare function listCatalogCollections(params?: TPageSizeParam): Promise<TBeeFreeList<TBeeCollectionModel>>;
|
|
12
|
+
export declare function getCatalogCollection({ slug }: {
|
|
13
|
+
slug: string;
|
|
14
|
+
}): Promise<TBeeCollectionModel>;
|
|
15
|
+
export declare function listCatalogTags(params?: TPageSizeParam): Promise<TBeeTagModel[]>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface TTemplateListParams {
|
|
2
|
+
search?: string;
|
|
3
|
+
category?: string;
|
|
4
|
+
collection?: string;
|
|
5
|
+
designer?: string;
|
|
6
|
+
tag?: string;
|
|
7
|
+
template_type?: string;
|
|
8
|
+
pagesize?: number;
|
|
9
|
+
published_after?: string;
|
|
10
|
+
published_before?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface TPageSizeParam {
|
|
13
|
+
pagesize?: number;
|
|
14
|
+
}
|
|
@@ -2,10 +2,19 @@ import React from "react";
|
|
|
2
2
|
import "./styles.scss";
|
|
3
3
|
export { groupScopesByCategory } from "./scopeGroups";
|
|
4
4
|
export type { TScopeCategorySummary } from "./scopeGroups";
|
|
5
|
+
export type TScopePickerLabels = {
|
|
6
|
+
presetsHeading?: string;
|
|
7
|
+
presets?: Record<string, string>;
|
|
8
|
+
categories?: Record<string, string>;
|
|
9
|
+
impliedHint?: string;
|
|
10
|
+
unrecognizedHint?: string;
|
|
11
|
+
selectedPermissions?: (count: number) => string;
|
|
12
|
+
};
|
|
5
13
|
export type TScopePicker = {
|
|
6
14
|
value: string[];
|
|
7
15
|
onChange: (scopes: string[]) => void;
|
|
8
16
|
isPartner?: boolean;
|
|
9
17
|
disabled?: boolean;
|
|
18
|
+
labels?: TScopePickerLabels;
|
|
10
19
|
};
|
|
11
|
-
export declare function ScopePicker({ value, onChange, isPartner, disabled }: TScopePicker): React.JSX.Element;
|
|
20
|
+
export declare function ScopePicker({ value, onChange, isPartner, disabled, labels }: TScopePicker): React.JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BeeCategoryModel, BeeCollectionModel, BeeTagModel, BeeTemplateModel, TBeeFreeList } from "../../models";
|
|
2
|
+
import { TPageSizeParam, TTemplateListParams } from "../../services/contentCatalog/types";
|
|
3
|
+
export declare class ContentCatalogFactory {
|
|
4
|
+
static listTemplates(params?: TTemplateListParams): Promise<TBeeFreeList<BeeTemplateModel>>;
|
|
5
|
+
static getTemplate({ slug }: {
|
|
6
|
+
slug: string;
|
|
7
|
+
}): Promise<BeeTemplateModel>;
|
|
8
|
+
static listCategories(params?: TPageSizeParam): Promise<TBeeFreeList<BeeCategoryModel>>;
|
|
9
|
+
static getCategory({ slug }: {
|
|
10
|
+
slug: string;
|
|
11
|
+
}): Promise<BeeCategoryModel>;
|
|
12
|
+
static listCollections(params?: TPageSizeParam): Promise<TBeeFreeList<BeeCollectionModel>>;
|
|
13
|
+
static getCollection({ slug }: {
|
|
14
|
+
slug: string;
|
|
15
|
+
}): Promise<BeeCollectionModel>;
|
|
16
|
+
static listTags(params?: TPageSizeParam): Promise<BeeTagModel[]>;
|
|
17
|
+
}
|
package/dist/esm/index.js
CHANGED
|
@@ -11146,6 +11146,99 @@ function untagContact(_a) {
|
|
|
11146
11146
|
});
|
|
11147
11147
|
}
|
|
11148
11148
|
|
|
11149
|
+
function listCatalogTemplates(params) {
|
|
11150
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
11151
|
+
return __generator(this, function (_a) {
|
|
11152
|
+
return [2 /*return*/, callApi({
|
|
11153
|
+
url: uiKitConfig.GATEWAY_PROXY + "/contentCatalog/templates",
|
|
11154
|
+
query: params,
|
|
11155
|
+
fetchOptions: {
|
|
11156
|
+
method: EMethods.get
|
|
11157
|
+
}
|
|
11158
|
+
})];
|
|
11159
|
+
});
|
|
11160
|
+
});
|
|
11161
|
+
}
|
|
11162
|
+
function getCatalogTemplate(_a) {
|
|
11163
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
11164
|
+
var slug = _b.slug;
|
|
11165
|
+
return __generator(this, function (_c) {
|
|
11166
|
+
return [2 /*return*/, callApi({
|
|
11167
|
+
url: uiKitConfig.GATEWAY_PROXY + "/contentCatalog/templates/".concat(slug),
|
|
11168
|
+
fetchOptions: {
|
|
11169
|
+
method: EMethods.get
|
|
11170
|
+
}
|
|
11171
|
+
})];
|
|
11172
|
+
});
|
|
11173
|
+
});
|
|
11174
|
+
}
|
|
11175
|
+
function listCatalogCategories(params) {
|
|
11176
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
11177
|
+
return __generator(this, function (_a) {
|
|
11178
|
+
return [2 /*return*/, callApi({
|
|
11179
|
+
url: uiKitConfig.GATEWAY_PROXY + "/contentCatalog/categories",
|
|
11180
|
+
query: params,
|
|
11181
|
+
fetchOptions: {
|
|
11182
|
+
method: EMethods.get
|
|
11183
|
+
}
|
|
11184
|
+
})];
|
|
11185
|
+
});
|
|
11186
|
+
});
|
|
11187
|
+
}
|
|
11188
|
+
function getCatalogCategory(_a) {
|
|
11189
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
11190
|
+
var slug = _b.slug;
|
|
11191
|
+
return __generator(this, function (_c) {
|
|
11192
|
+
return [2 /*return*/, callApi({
|
|
11193
|
+
url: uiKitConfig.GATEWAY_PROXY + "/contentCatalog/categories/".concat(slug),
|
|
11194
|
+
fetchOptions: {
|
|
11195
|
+
method: EMethods.get
|
|
11196
|
+
}
|
|
11197
|
+
})];
|
|
11198
|
+
});
|
|
11199
|
+
});
|
|
11200
|
+
}
|
|
11201
|
+
function listCatalogCollections(params) {
|
|
11202
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
11203
|
+
return __generator(this, function (_a) {
|
|
11204
|
+
return [2 /*return*/, callApi({
|
|
11205
|
+
url: uiKitConfig.GATEWAY_PROXY + "/contentCatalog/collections",
|
|
11206
|
+
query: params,
|
|
11207
|
+
fetchOptions: {
|
|
11208
|
+
method: EMethods.get
|
|
11209
|
+
}
|
|
11210
|
+
})];
|
|
11211
|
+
});
|
|
11212
|
+
});
|
|
11213
|
+
}
|
|
11214
|
+
function getCatalogCollection(_a) {
|
|
11215
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
11216
|
+
var slug = _b.slug;
|
|
11217
|
+
return __generator(this, function (_c) {
|
|
11218
|
+
return [2 /*return*/, callApi({
|
|
11219
|
+
url: uiKitConfig.GATEWAY_PROXY + "/contentCatalog/collections/".concat(slug),
|
|
11220
|
+
fetchOptions: {
|
|
11221
|
+
method: EMethods.get
|
|
11222
|
+
}
|
|
11223
|
+
})];
|
|
11224
|
+
});
|
|
11225
|
+
});
|
|
11226
|
+
}
|
|
11227
|
+
function listCatalogTags(params) {
|
|
11228
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
11229
|
+
return __generator(this, function (_a) {
|
|
11230
|
+
// BeeFree returns a flat array for tags, not a paginated wrapper.
|
|
11231
|
+
return [2 /*return*/, callApi({
|
|
11232
|
+
url: uiKitConfig.GATEWAY_PROXY + "/contentCatalog/tags",
|
|
11233
|
+
query: params,
|
|
11234
|
+
fetchOptions: {
|
|
11235
|
+
method: EMethods.get
|
|
11236
|
+
}
|
|
11237
|
+
})];
|
|
11238
|
+
});
|
|
11239
|
+
});
|
|
11240
|
+
}
|
|
11241
|
+
|
|
11149
11242
|
var baseUrl$1 = function () { return uiKitConfig.GATEWAY_PROXY + "/customDomains"; };
|
|
11150
11243
|
function listCustomDomains(_a) {
|
|
11151
11244
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -12491,6 +12584,61 @@ var ContactModel = /** @class */ (function () {
|
|
|
12491
12584
|
return ContactModel;
|
|
12492
12585
|
}());
|
|
12493
12586
|
|
|
12587
|
+
var BeeTemplateModel = /** @class */ (function () {
|
|
12588
|
+
function BeeTemplateModel(params) {
|
|
12589
|
+
this.id = params.id;
|
|
12590
|
+
this.title = params.title;
|
|
12591
|
+
this.description = params.description;
|
|
12592
|
+
this.short_description = params.short_description;
|
|
12593
|
+
this.template_type = params.template_type;
|
|
12594
|
+
this.categories = params.categories;
|
|
12595
|
+
this.collections = params.collections;
|
|
12596
|
+
this.designer = params.designer;
|
|
12597
|
+
this.tags = params.tags;
|
|
12598
|
+
this.thumbnail = params.thumbnail;
|
|
12599
|
+
this.thumbnail_large = params.thumbnail_large;
|
|
12600
|
+
this.published_at = params.published_at;
|
|
12601
|
+
this.order = params.order;
|
|
12602
|
+
this.context = params.context;
|
|
12603
|
+
this.is_blank = params.is_blank;
|
|
12604
|
+
}
|
|
12605
|
+
BeeTemplateModel.prototype.toJson = function () {
|
|
12606
|
+
return modelToJson(this);
|
|
12607
|
+
};
|
|
12608
|
+
BeeTemplateModel.prototype.set = function (property, value) {
|
|
12609
|
+
modelSet(this, property, value);
|
|
12610
|
+
};
|
|
12611
|
+
return BeeTemplateModel;
|
|
12612
|
+
}());
|
|
12613
|
+
var BeeCategoryModel = /** @class */ (function () {
|
|
12614
|
+
function BeeCategoryModel(params) {
|
|
12615
|
+
this.id = params.id;
|
|
12616
|
+
this.name = params.name;
|
|
12617
|
+
this.parent = params.parent;
|
|
12618
|
+
}
|
|
12619
|
+
BeeCategoryModel.prototype.toJson = function () { return modelToJson(this); };
|
|
12620
|
+
BeeCategoryModel.prototype.set = function (property, value) { modelSet(this, property, value); };
|
|
12621
|
+
return BeeCategoryModel;
|
|
12622
|
+
}());
|
|
12623
|
+
var BeeCollectionModel = /** @class */ (function () {
|
|
12624
|
+
function BeeCollectionModel(params) {
|
|
12625
|
+
this.id = params.id;
|
|
12626
|
+
this.name = params.name;
|
|
12627
|
+
}
|
|
12628
|
+
BeeCollectionModel.prototype.toJson = function () { return modelToJson(this); };
|
|
12629
|
+
BeeCollectionModel.prototype.set = function (property, value) { modelSet(this, property, value); };
|
|
12630
|
+
return BeeCollectionModel;
|
|
12631
|
+
}());
|
|
12632
|
+
var BeeTagModel = /** @class */ (function () {
|
|
12633
|
+
function BeeTagModel(params) {
|
|
12634
|
+
this.id = params.id;
|
|
12635
|
+
this.name = params.name;
|
|
12636
|
+
}
|
|
12637
|
+
BeeTagModel.prototype.toJson = function () { return modelToJson(this); };
|
|
12638
|
+
BeeTagModel.prototype.set = function (property, value) { modelSet(this, property, value); };
|
|
12639
|
+
return BeeTagModel;
|
|
12640
|
+
}());
|
|
12641
|
+
|
|
12494
12642
|
var ECertificateStatus;
|
|
12495
12643
|
(function (ECertificateStatus) {
|
|
12496
12644
|
ECertificateStatus["unknown"] = "unknown";
|
|
@@ -19625,8 +19773,9 @@ function getImpliedScopes(scope) {
|
|
|
19625
19773
|
return implied.map(function (a) { return "".concat(resource, ":").concat(a); }).filter(function (s) { return ALL_GRANULAR_SCOPES.has(s); });
|
|
19626
19774
|
}
|
|
19627
19775
|
function ScopePicker(_a) {
|
|
19628
|
-
var
|
|
19629
|
-
var
|
|
19776
|
+
var _b;
|
|
19777
|
+
var value = _a.value, onChange = _a.onChange, _c = _a.isPartner, isPartner = _c === void 0 ? false : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.labels, labels = _e === void 0 ? {} : _e;
|
|
19778
|
+
var _f = useState(new Set()), expandedCategories = _f[0], setExpandedCategories = _f[1];
|
|
19630
19779
|
var selectedSet = useMemo(function () { return new Set(value); }, [value]);
|
|
19631
19780
|
var visibleCategories = useMemo(function () { return SCOPE_CATEGORIES.filter(function (c) { return !c.adminOnly || isPartner; }); }, [isPartner]);
|
|
19632
19781
|
var toggleCategory = useCallback(function (categoryId) {
|
|
@@ -19722,39 +19871,42 @@ function ScopePicker(_a) {
|
|
|
19722
19871
|
}, [selectedSet]);
|
|
19723
19872
|
return (React__default.createElement("div", { className: "scopePicker", "aria-label": "Permission scope picker" },
|
|
19724
19873
|
!disabled && (React__default.createElement("div", { className: "scopePicker__presets" },
|
|
19725
|
-
React__default.createElement("span", { className: "scopePicker__presetsLabel" }, "Quick presets:"),
|
|
19726
|
-
React__default.createElement("div", { className: "scopePicker__presetButtons" }, SCOPE_PRESETS.map(function (preset) {
|
|
19874
|
+
React__default.createElement("span", { className: "scopePicker__presetsLabel" }, (_b = labels.presetsHeading) !== null && _b !== void 0 ? _b : "Quick presets:"),
|
|
19875
|
+
React__default.createElement("div", { className: "scopePicker__presetButtons" }, SCOPE_PRESETS.map(function (preset) {
|
|
19876
|
+
var _a, _b;
|
|
19877
|
+
return (React__default.createElement("button", { key: preset.id, type: "button", className: "scopePicker__presetBtn", onClick: function () { return handlePreset(preset.id); } }, (_b = (_a = labels.presets) === null || _a === void 0 ? void 0 : _a[preset.id]) !== null && _b !== void 0 ? _b : preset.label));
|
|
19878
|
+
})))),
|
|
19727
19879
|
React__default.createElement("div", { className: "scopePicker__categories" }, visibleCategories.map(function (category) {
|
|
19880
|
+
var _a, _b, _c, _d, _e, _f;
|
|
19728
19881
|
var isExpanded = expandedCategories.has(category.id);
|
|
19729
19882
|
var allSelected = isCategoryAllSelected(category.id);
|
|
19730
19883
|
var someSelected = isCategorySomeSelected(category.id);
|
|
19731
19884
|
return (React__default.createElement("div", { key: category.id, className: "scopePicker__category ".concat(category.adminOnly ? "scopePicker__category--admin" : "") },
|
|
19732
19885
|
React__default.createElement("div", { className: "scopePicker__categoryHeader" },
|
|
19733
19886
|
React__default.createElement("label", { className: "scopePicker__categorySelect" },
|
|
19734
|
-
React__default.createElement(IndeterminateCheckbox, { checked: allSelected, indeterminate: someSelected && !allSelected, onChange: function (checked) { return handleCategorySelectAll(category.id, checked); }, disabled: disabled, ariaLabel: "Select all ".concat(category.label, " scopes") }),
|
|
19735
|
-
React__default.createElement("span", { className: "scopePicker__categoryLabel" }, category.label)),
|
|
19736
|
-
React__default.createElement("button", { type: "button", className: "scopePicker__categoryToggle", onClick: function () { return toggleCategory(category.id); }, "aria-expanded": isExpanded, "aria-label": "".concat(isExpanded ? "Collapse" : "Expand", " ").concat(category.label) }, isExpanded ? "▲" : "▼")),
|
|
19887
|
+
React__default.createElement(IndeterminateCheckbox, { checked: allSelected, indeterminate: someSelected && !allSelected, onChange: function (checked) { return handleCategorySelectAll(category.id, checked); }, disabled: disabled, ariaLabel: "Select all ".concat((_b = (_a = labels.categories) === null || _a === void 0 ? void 0 : _a[category.id]) !== null && _b !== void 0 ? _b : category.label, " scopes") }),
|
|
19888
|
+
React__default.createElement("span", { className: "scopePicker__categoryLabel" }, (_d = (_c = labels.categories) === null || _c === void 0 ? void 0 : _c[category.id]) !== null && _d !== void 0 ? _d : category.label)),
|
|
19889
|
+
React__default.createElement("button", { type: "button", className: "scopePicker__categoryToggle", onClick: function () { return toggleCategory(category.id); }, "aria-expanded": isExpanded, "aria-label": "".concat(isExpanded ? "Collapse" : "Expand", " ").concat((_f = (_e = labels.categories) === null || _e === void 0 ? void 0 : _e[category.id]) !== null && _f !== void 0 ? _f : category.label) }, isExpanded ? "▲" : "▼")),
|
|
19737
19890
|
isExpanded && (React__default.createElement("div", { className: "scopePicker__categoryBody" }, category.resources.map(function (resource) { return (React__default.createElement("div", { key: resource.resource, className: "scopePicker__resource" },
|
|
19738
19891
|
React__default.createElement("span", { className: "scopePicker__resourceLabel" }, resource.label),
|
|
19739
19892
|
React__default.createElement("div", { className: "scopePicker__actions" }, resource.actions.map(function (action) {
|
|
19893
|
+
var _a;
|
|
19740
19894
|
var scope = "".concat(resource.resource, ":").concat(action);
|
|
19741
19895
|
var checked = selectedSet.has(scope);
|
|
19742
19896
|
var implied = isImplied(scope);
|
|
19743
|
-
return (React__default.createElement("label", { key: action, className: "scopePicker__action ".concat(implied ? "scopePicker__action--implied" : ""), title: implied ? "Automatically included by another selected permission" : undefined },
|
|
19897
|
+
return (React__default.createElement("label", { key: action, className: "scopePicker__action ".concat(implied ? "scopePicker__action--implied" : ""), title: implied ? ((_a = labels.impliedHint) !== null && _a !== void 0 ? _a : "Automatically included by another selected permission") : undefined },
|
|
19744
19898
|
React__default.createElement("input", { type: "checkbox", checked: checked, onChange: function (e) { return handleScopeToggle(scope, e.target.checked); }, disabled: disabled || implied, "aria-label": "".concat(resource.label, " ").concat(action) }),
|
|
19745
19899
|
React__default.createElement("span", null, action)));
|
|
19746
19900
|
})))); })))));
|
|
19747
19901
|
})),
|
|
19748
19902
|
value.length > 0 && (React__default.createElement("details", { className: "scopePicker__summary" },
|
|
19749
|
-
React__default.createElement("summary", null,
|
|
19750
|
-
"Selected permissions (",
|
|
19751
|
-
value.length,
|
|
19752
|
-
")"),
|
|
19903
|
+
React__default.createElement("summary", null, labels.selectedPermissions ? labels.selectedPermissions(value.length) : "Selected permissions (".concat(value.length, ")")),
|
|
19753
19904
|
React__default.createElement("div", { className: "scopePicker__summaryList" }, __spreadArray([], value, true).sort().map(function (scope) {
|
|
19905
|
+
var _a;
|
|
19754
19906
|
// Scopes not in the catalog (e.g. enum drift) get a
|
|
19755
19907
|
// distinct style + tooltip so they're never invisible.
|
|
19756
19908
|
var unrecognized = !ALL_GRANULAR_SCOPES.has(scope);
|
|
19757
|
-
return (React__default.createElement("span", { key: scope, className: "scopePicker__summaryChip ".concat(unrecognized ? "scopePicker__summaryChip--unknown" : ""), title: unrecognized ? "Not in the current permission catalog — kept as-is on save" : undefined }, scope));
|
|
19909
|
+
return (React__default.createElement("span", { key: scope, className: "scopePicker__summaryChip ".concat(unrecognized ? "scopePicker__summaryChip--unknown" : ""), title: unrecognized ? ((_a = labels.unrecognizedHint) !== null && _a !== void 0 ? _a : "Not in the current permission catalog — kept as-is on save") : undefined }, scope));
|
|
19758
19910
|
}))))));
|
|
19759
19911
|
}
|
|
19760
19912
|
|
|
@@ -20308,6 +20460,64 @@ var ContactsFactory = /** @class */ (function () {
|
|
|
20308
20460
|
return ContactsFactory;
|
|
20309
20461
|
}());
|
|
20310
20462
|
|
|
20463
|
+
var ContentCatalogFactory = /** @class */ (function () {
|
|
20464
|
+
function ContentCatalogFactory() {
|
|
20465
|
+
}
|
|
20466
|
+
ContentCatalogFactory.listTemplates = function (params) {
|
|
20467
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
20468
|
+
return __generator(this, function (_a) {
|
|
20469
|
+
return [2 /*return*/, listCatalogTemplates(params).then(function (data) { return (__assign(__assign({}, data), { results: data.results.map(function (t) { return new BeeTemplateModel(t); }) })); })];
|
|
20470
|
+
});
|
|
20471
|
+
});
|
|
20472
|
+
};
|
|
20473
|
+
ContentCatalogFactory.getTemplate = function (_a) {
|
|
20474
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
20475
|
+
var slug = _b.slug;
|
|
20476
|
+
return __generator(this, function (_c) {
|
|
20477
|
+
return [2 /*return*/, getCatalogTemplate({ slug: slug }).then(function (data) { return new BeeTemplateModel(data); })];
|
|
20478
|
+
});
|
|
20479
|
+
});
|
|
20480
|
+
};
|
|
20481
|
+
ContentCatalogFactory.listCategories = function (params) {
|
|
20482
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
20483
|
+
return __generator(this, function (_a) {
|
|
20484
|
+
return [2 /*return*/, listCatalogCategories(params).then(function (data) { return (__assign(__assign({}, data), { results: data.results.map(function (c) { return new BeeCategoryModel(c); }) })); })];
|
|
20485
|
+
});
|
|
20486
|
+
});
|
|
20487
|
+
};
|
|
20488
|
+
ContentCatalogFactory.getCategory = function (_a) {
|
|
20489
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
20490
|
+
var slug = _b.slug;
|
|
20491
|
+
return __generator(this, function (_c) {
|
|
20492
|
+
return [2 /*return*/, getCatalogCategory({ slug: slug }).then(function (data) { return new BeeCategoryModel(data); })];
|
|
20493
|
+
});
|
|
20494
|
+
});
|
|
20495
|
+
};
|
|
20496
|
+
ContentCatalogFactory.listCollections = function (params) {
|
|
20497
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
20498
|
+
return __generator(this, function (_a) {
|
|
20499
|
+
return [2 /*return*/, listCatalogCollections(params).then(function (data) { return (__assign(__assign({}, data), { results: data.results.map(function (c) { return new BeeCollectionModel(c); }) })); })];
|
|
20500
|
+
});
|
|
20501
|
+
});
|
|
20502
|
+
};
|
|
20503
|
+
ContentCatalogFactory.getCollection = function (_a) {
|
|
20504
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
20505
|
+
var slug = _b.slug;
|
|
20506
|
+
return __generator(this, function (_c) {
|
|
20507
|
+
return [2 /*return*/, getCatalogCollection({ slug: slug }).then(function (data) { return new BeeCollectionModel(data); })];
|
|
20508
|
+
});
|
|
20509
|
+
});
|
|
20510
|
+
};
|
|
20511
|
+
ContentCatalogFactory.listTags = function (params) {
|
|
20512
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
20513
|
+
return __generator(this, function (_a) {
|
|
20514
|
+
return [2 /*return*/, listCatalogTags(params).then(function (tags) { return tags.map(function (t) { return new BeeTagModel(t); }); })];
|
|
20515
|
+
});
|
|
20516
|
+
});
|
|
20517
|
+
};
|
|
20518
|
+
return ContentCatalogFactory;
|
|
20519
|
+
}());
|
|
20520
|
+
|
|
20311
20521
|
var CustomDomainsFactory = /** @class */ (function () {
|
|
20312
20522
|
function CustomDomainsFactory() {
|
|
20313
20523
|
}
|
|
@@ -21169,4 +21379,4 @@ var UsersFactory = /** @class */ (function () {
|
|
|
21169
21379
|
return UsersFactory;
|
|
21170
21380
|
}());
|
|
21171
21381
|
|
|
21172
|
-
export { AccountModel, AccountsFactory, ActionBarContainer, ActionBarContainerHandler, AssetManager, AutomationModel, AutomationsFactory, Avatar, BillingFactory, BrandWrapper, BrandsFactory, Button, ButtonMenu, CampaignModel, CampaignsFactory, Checkbox, Chip, CircularProgress, CodeInput, ColManager, ColorTextField, CommonFormModel, ContactModel, ContactsFactory, ContentSectionContainer, CountryDropdown, CustomDomainModel, CustomDomainsFactory, CustomerModel, DataTable, DataTableHead, DataTableRow, DateCalendar, DatePicker, DateTimeCalendar, DateTimePicker, Dialog, DialogActions, DialogHandler, DialogTitle, Divider, Drawer, DrawerHandler, DropMenu, Dropdown, EApiLanguages, EAssetManagerMatchType, ECampaignStatuses, ECertificateStatus, EDnsStatus, EEMailSummaryStatuses, EEditorType, EEmailAttachementTypes, EEmailLogType, EEmailLogTypeParam, EEmailProviders, EEmailStatuses, EEmailSummaryEngagement, EEventBreakdownDimension, EEventSortField, EEventTimeseriesGranularity, EEvents, EIngressRouteStatus, EListAttributeType, EMethods, EOperatorTypes, EPageBranding, EPartialInfoPool, EPopupBranding, EPopupBrowserType, EPopupCloseButtonPosition, EPopupDeviceType, EPopupDisplayFrequency, EPopupPosition, EPopupTriggerType, EStorageType, ETaskType, ETopDomainStatus, ETrackedDeviceType, ETrackedEntityType, ETrackedEventType, ElementContains, Email, EmailAPIFactory, EmptyContent, EnhancedFormModel, EventModel, EventTrackingFactory, FileUpload, FilterBar, FormModel, FormsFactory, FullBar, GenericWrapper, GenericWrapperContext, GroupedActions, Header, Icon, IconPill, InformationGroup, InlineTextEdit, LinearProgress, Link, ListCampaignModel, ListModel, ListPageModel, ListPopupModel, ListTemplateModel, ListsFactory, LoadingContainer, LocationTextField, Logo, MD5, MetricCard, Modal, ModalHandler, ModalHeading, Overlay, OverlayHandler, OverlayHeading, PageModel, PagesFactory, PersonalAccessTokenModel, PersonalAccessTokensFactory, PhoneTextField, PopupModel, PopupsFactory, Radio, ResourceEdit, ScopePicker, Search, SenderModel, SendersFactory, SideMenu, SideMenuContainer, SideMenuItem, SubNav, SummaryEnhancedFormModel, SuppressedEmailsFactory, SystemEmailsFactory, SystemEmailsModel, TagsFactory, TasksFactory, TemplateModel, TemplatesFactory, TextField, TimePicker, TimeSelector, Toggle, TopDomainModel, TopDomainsFactory, TopMenu, Typography, UserModel, UsersFactory, acceptListPolicy, addInterestsToContactsOfList, addPartialInformation, addSuppressedEmail, addToImpersonificationTree, amIImpersonating, amILoggedInService, archiveCampaign, areAllPropertiesEmpty, buildMUITheme, callApi, camelCase, camelToSnakeCase, cancelCampaign, capitalizeFirstLetter, cleanPostHogId, clearImpersonificationTree, clearStorage, copyToClipboard, createAccount, createBrand, createCampaign, createCampaignLogsExports, createCampaignsReportsExport, createContactsExport, createCustomDomain, createForm, createPage, createPat, createPopup, createSender, createSuppressedEmailExport, createTemplate, createTopDomain, deepMergeObject, deleteAccount, deleteAnyAutomation, deleteAutomation, deleteCampaign, deleteCampaignsReportsExport, deleteContact, deleteCustomDomain, deleteForm, deleteList, deletePage, deletePartialInformation, deletePopup, deleteSender, deleteStorageItem, deleteSuppressedEmail, deleteTaskService, deleteTemplate, deleteTopDomain, deleteUser, deleteWorkflow, descendingComparator, disableForm, disablePage, disablePopup, domainHasValidCertificateService, downloadCampaignLogExport, downloadCampaignsReportsExport, downloadContactsExport, downloadListLogExport, downloadSuppressedEmailExport, emptyAccountAddress, emptyAccountLimits, enableForm, enablePage, enablePopup, enrichBrand, enrichOrganization, enrichProfile, eventCondition, eventIdentify, eventLogout, fetchRetry, fetchRoute, findNestedProperty, formatNumber, getAccount, getAccountMetadata, getAccountReport, getAdjustedBillingCycle, getAllAutomationStats, getAutomation, getAutomationEmailContent, getAutomationExecutionsCount, getAutomationStats, getBeeTokenService, getBestLocalMatch, getBrand, getBrandService, getBrandUrl, getCalendarFormat, getCampaign, getCampaignLinks, getCampaignLinksReport, getCampaignLogs, getCampaignLogsExports, getCampaignReport, getCampaignRevisions, getCampaignsReportsExport, getComparator, getContactsExport, getCustomDomain, getCustomerProfile, getDate, getDomainFromEmail, getDomainsFromEmails, getDomainsService, getEmail, getEmailActivitySummary, getEmailReport, getEndOfDate, getEventBreakdown, getEventFunnel, getEventPropertyKeys, getEventSummary, getEventTimeseries, getForm, getHashQueryWithoutHistory, getIconSize, getList, getListLogs, getListReport, getNestedProperty, getPage, getPat, getPopup, getPropertyValue, getSender, getStartOfDate, getStorage, getSuppressedEmailExport, getTColor, getTaskService, getTemplate, getTopDomain, getUnixTime, getUrlQueryParam, getUser, getUtmCookies, googlePlacesMapper, groupScopesByCategory, hasDecimal, impersonateService, initFieldValidation, initPostHog, isColorLight, isDomainValidService, isPublicEmailProviderService, isSimpleType, isValidEmail, isValidString, isValidUrl, lisTEmailTags, listAccounts, listAutomations, listCampaigns, listCampaignsReportsExports, listContacts, listCustomDomains, listDkimService, listEmailLogs, listEvents, listForms, listList, listListAttributes, listListInterests, listPages, listPats, listPopups, listSenders, listSuppressedEmails, listSystemEmails, listTasksService, listTemplates, listTopDomains, listUsers, listWorkflows, logOutService, loginService, miliToSecond, modelSet, modelToJson, originalBrand, patchAccountDomainsService, patchForm, popImpersonificationTree, postMessage, publishForm, publishPage, publishPopup, reScheduleCampaign, removeEmptyProperties, removeInterestsFromContactsOfList, removeQueryParams, removeTrailingChar, renderCampaign, renderEmail, renderForm, renderPage, renderPopup, renderPublicHtmlForm, renderTemplate, requestSupportService, resendEmail, resendVerificationEmail, resumeCampaign, revokePat, saveList, scheduleCampaign, searchCustomerProfiles, sendCampaignTest, setBrandHeadElements, setStorage, shareTemplate, splitArray, splitObject, stableSort, startPromisePool, suspendAccount, suspendCampaign, tagContact, tagsContactsOfList, trackEvent, truncateEmail, truncateText, uiKitConfig, unArchiveCampaign, unScheduleCampaign, unSuspendAccount, unshareTemplate, unsubscribeContact, untagContact, untagContactsOfList, unwrapResponse, updateAccount, updateAndClearUrlParams, updateAnyAutomation, updateAutomation, updateCampaign, updatePage, updatePat, updatePopup, updateSystemEmails, updateTemplate, updateUser, updateWorkflow, validateColor, validateEmail, validateGenericInput, validateTopDomain, validateUrl, verifyCustomDomain, verifyTrackingCnamesService, wait, whiteLabelBrand, whoAmi };
|
|
21382
|
+
export { AccountModel, AccountsFactory, ActionBarContainer, ActionBarContainerHandler, AssetManager, AutomationModel, AutomationsFactory, Avatar, BeeCategoryModel, BeeCollectionModel, BeeTagModel, BeeTemplateModel, BillingFactory, BrandWrapper, BrandsFactory, Button, ButtonMenu, CampaignModel, CampaignsFactory, Checkbox, Chip, CircularProgress, CodeInput, ColManager, ColorTextField, CommonFormModel, ContactModel, ContactsFactory, ContentCatalogFactory, ContentSectionContainer, CountryDropdown, CustomDomainModel, CustomDomainsFactory, CustomerModel, DataTable, DataTableHead, DataTableRow, DateCalendar, DatePicker, DateTimeCalendar, DateTimePicker, Dialog, DialogActions, DialogHandler, DialogTitle, Divider, Drawer, DrawerHandler, DropMenu, Dropdown, EApiLanguages, EAssetManagerMatchType, ECampaignStatuses, ECertificateStatus, EDnsStatus, EEMailSummaryStatuses, EEditorType, EEmailAttachementTypes, EEmailLogType, EEmailLogTypeParam, EEmailProviders, EEmailStatuses, EEmailSummaryEngagement, EEventBreakdownDimension, EEventSortField, EEventTimeseriesGranularity, EEvents, EIngressRouteStatus, EListAttributeType, EMethods, EOperatorTypes, EPageBranding, EPartialInfoPool, EPopupBranding, EPopupBrowserType, EPopupCloseButtonPosition, EPopupDeviceType, EPopupDisplayFrequency, EPopupPosition, EPopupTriggerType, EStorageType, ETaskType, ETopDomainStatus, ETrackedDeviceType, ETrackedEntityType, ETrackedEventType, ElementContains, Email, EmailAPIFactory, EmptyContent, EnhancedFormModel, EventModel, EventTrackingFactory, FileUpload, FilterBar, FormModel, FormsFactory, FullBar, GenericWrapper, GenericWrapperContext, GroupedActions, Header, Icon, IconPill, InformationGroup, InlineTextEdit, LinearProgress, Link, ListCampaignModel, ListModel, ListPageModel, ListPopupModel, ListTemplateModel, ListsFactory, LoadingContainer, LocationTextField, Logo, MD5, MetricCard, Modal, ModalHandler, ModalHeading, Overlay, OverlayHandler, OverlayHeading, PageModel, PagesFactory, PersonalAccessTokenModel, PersonalAccessTokensFactory, PhoneTextField, PopupModel, PopupsFactory, Radio, ResourceEdit, ScopePicker, Search, SenderModel, SendersFactory, SideMenu, SideMenuContainer, SideMenuItem, SubNav, SummaryEnhancedFormModel, SuppressedEmailsFactory, SystemEmailsFactory, SystemEmailsModel, TagsFactory, TasksFactory, TemplateModel, TemplatesFactory, TextField, TimePicker, TimeSelector, Toggle, TopDomainModel, TopDomainsFactory, TopMenu, Typography, UserModel, UsersFactory, acceptListPolicy, addInterestsToContactsOfList, addPartialInformation, addSuppressedEmail, addToImpersonificationTree, amIImpersonating, amILoggedInService, archiveCampaign, areAllPropertiesEmpty, buildMUITheme, callApi, camelCase, camelToSnakeCase, cancelCampaign, capitalizeFirstLetter, cleanPostHogId, clearImpersonificationTree, clearStorage, copyToClipboard, createAccount, createBrand, createCampaign, createCampaignLogsExports, createCampaignsReportsExport, createContactsExport, createCustomDomain, createForm, createPage, createPat, createPopup, createSender, createSuppressedEmailExport, createTemplate, createTopDomain, deepMergeObject, deleteAccount, deleteAnyAutomation, deleteAutomation, deleteCampaign, deleteCampaignsReportsExport, deleteContact, deleteCustomDomain, deleteForm, deleteList, deletePage, deletePartialInformation, deletePopup, deleteSender, deleteStorageItem, deleteSuppressedEmail, deleteTaskService, deleteTemplate, deleteTopDomain, deleteUser, deleteWorkflow, descendingComparator, disableForm, disablePage, disablePopup, domainHasValidCertificateService, downloadCampaignLogExport, downloadCampaignsReportsExport, downloadContactsExport, downloadListLogExport, downloadSuppressedEmailExport, emptyAccountAddress, emptyAccountLimits, enableForm, enablePage, enablePopup, enrichBrand, enrichOrganization, enrichProfile, eventCondition, eventIdentify, eventLogout, fetchRetry, fetchRoute, findNestedProperty, formatNumber, getAccount, getAccountMetadata, getAccountReport, getAdjustedBillingCycle, getAllAutomationStats, getAutomation, getAutomationEmailContent, getAutomationExecutionsCount, getAutomationStats, getBeeTokenService, getBestLocalMatch, getBrand, getBrandService, getBrandUrl, getCalendarFormat, getCampaign, getCampaignLinks, getCampaignLinksReport, getCampaignLogs, getCampaignLogsExports, getCampaignReport, getCampaignRevisions, getCampaignsReportsExport, getCatalogCategory, getCatalogCollection, getCatalogTemplate, getComparator, getContactsExport, getCustomDomain, getCustomerProfile, getDate, getDomainFromEmail, getDomainsFromEmails, getDomainsService, getEmail, getEmailActivitySummary, getEmailReport, getEndOfDate, getEventBreakdown, getEventFunnel, getEventPropertyKeys, getEventSummary, getEventTimeseries, getForm, getHashQueryWithoutHistory, getIconSize, getList, getListLogs, getListReport, getNestedProperty, getPage, getPat, getPopup, getPropertyValue, getSender, getStartOfDate, getStorage, getSuppressedEmailExport, getTColor, getTaskService, getTemplate, getTopDomain, getUnixTime, getUrlQueryParam, getUser, getUtmCookies, googlePlacesMapper, groupScopesByCategory, hasDecimal, impersonateService, initFieldValidation, initPostHog, isColorLight, isDomainValidService, isPublicEmailProviderService, isSimpleType, isValidEmail, isValidString, isValidUrl, lisTEmailTags, listAccounts, listAutomations, listCampaigns, listCampaignsReportsExports, listCatalogCategories, listCatalogCollections, listCatalogTags, listCatalogTemplates, listContacts, listCustomDomains, listDkimService, listEmailLogs, listEvents, listForms, listList, listListAttributes, listListInterests, listPages, listPats, listPopups, listSenders, listSuppressedEmails, listSystemEmails, listTasksService, listTemplates, listTopDomains, listUsers, listWorkflows, logOutService, loginService, miliToSecond, modelSet, modelToJson, originalBrand, patchAccountDomainsService, patchForm, popImpersonificationTree, postMessage, publishForm, publishPage, publishPopup, reScheduleCampaign, removeEmptyProperties, removeInterestsFromContactsOfList, removeQueryParams, removeTrailingChar, renderCampaign, renderEmail, renderForm, renderPage, renderPopup, renderPublicHtmlForm, renderTemplate, requestSupportService, resendEmail, resendVerificationEmail, resumeCampaign, revokePat, saveList, scheduleCampaign, searchCustomerProfiles, sendCampaignTest, setBrandHeadElements, setStorage, shareTemplate, splitArray, splitObject, stableSort, startPromisePool, suspendAccount, suspendCampaign, tagContact, tagsContactsOfList, trackEvent, truncateEmail, truncateText, uiKitConfig, unArchiveCampaign, unScheduleCampaign, unSuspendAccount, unshareTemplate, unsubscribeContact, untagContact, untagContactsOfList, unwrapResponse, updateAccount, updateAndClearUrlParams, updateAnyAutomation, updateAutomation, updateCampaign, updatePage, updatePat, updatePopup, updateSystemEmails, updateTemplate, updateUser, updateWorkflow, validateColor, validateEmail, validateGenericInput, validateTopDomain, validateUrl, verifyCustomDomain, verifyTrackingCnamesService, wait, whiteLabelBrand, whoAmi };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { TBeeCategoryModel, TBeeCollectionModel, TBeeTagModel, TBeeTemplateModel } from "./types";
|
|
2
|
+
export declare class BeeTemplateModel {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
short_description: string;
|
|
7
|
+
template_type: string;
|
|
8
|
+
categories: string[];
|
|
9
|
+
collections: string;
|
|
10
|
+
designer: string;
|
|
11
|
+
tags: string[];
|
|
12
|
+
thumbnail: string;
|
|
13
|
+
thumbnail_large: string;
|
|
14
|
+
published_at: string;
|
|
15
|
+
order: string;
|
|
16
|
+
context: string;
|
|
17
|
+
is_blank: boolean;
|
|
18
|
+
constructor(params: TBeeTemplateModel);
|
|
19
|
+
toJson(): any;
|
|
20
|
+
set<T extends keyof this>(property: T, value: this[T]): void;
|
|
21
|
+
}
|
|
22
|
+
export declare class BeeCategoryModel {
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
parent: string;
|
|
26
|
+
constructor(params: TBeeCategoryModel);
|
|
27
|
+
toJson(): any;
|
|
28
|
+
set<T extends keyof this>(property: T, value: this[T]): void;
|
|
29
|
+
}
|
|
30
|
+
export declare class BeeCollectionModel {
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
constructor(params: TBeeCollectionModel);
|
|
34
|
+
toJson(): any;
|
|
35
|
+
set<T extends keyof this>(property: T, value: this[T]): void;
|
|
36
|
+
}
|
|
37
|
+
export declare class BeeTagModel {
|
|
38
|
+
id: string;
|
|
39
|
+
name: string;
|
|
40
|
+
constructor(params: TBeeTagModel);
|
|
41
|
+
toJson(): any;
|
|
42
|
+
set<T extends keyof this>(property: T, value: this[T]): void;
|
|
43
|
+
}
|
|
44
|
+
export * from "./types";
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export interface TBeeFreeList<T> {
|
|
2
|
+
count: number;
|
|
3
|
+
next: string | null;
|
|
4
|
+
previous: string | null;
|
|
5
|
+
results: T[];
|
|
6
|
+
facets?: Record<string, unknown>;
|
|
7
|
+
}
|
|
8
|
+
export interface TBeeTemplateModel {
|
|
9
|
+
id: string;
|
|
10
|
+
title: string;
|
|
11
|
+
description: string;
|
|
12
|
+
short_description: string;
|
|
13
|
+
template_type: string;
|
|
14
|
+
categories: string[];
|
|
15
|
+
collections: string;
|
|
16
|
+
designer: string;
|
|
17
|
+
tags: string[];
|
|
18
|
+
thumbnail: string;
|
|
19
|
+
thumbnail_large: string;
|
|
20
|
+
published_at: string;
|
|
21
|
+
order: string;
|
|
22
|
+
context: string;
|
|
23
|
+
is_blank: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface TBeeCategoryModel {
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
parent: string;
|
|
29
|
+
}
|
|
30
|
+
export interface TBeeCollectionModel {
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
}
|
|
34
|
+
export interface TBeeTagModel {
|
|
35
|
+
id: string;
|
|
36
|
+
name: string;
|
|
37
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TBeeCategoryModel, TBeeCollectionModel, TBeeFreeList, TBeeTagModel, TBeeTemplateModel } from "../../models";
|
|
2
|
+
import { TPageSizeParam, TTemplateListParams } from "./types";
|
|
3
|
+
export declare function listCatalogTemplates(params?: TTemplateListParams): Promise<TBeeFreeList<TBeeTemplateModel>>;
|
|
4
|
+
export declare function getCatalogTemplate({ slug }: {
|
|
5
|
+
slug: string;
|
|
6
|
+
}): Promise<TBeeTemplateModel>;
|
|
7
|
+
export declare function listCatalogCategories(params?: TPageSizeParam): Promise<TBeeFreeList<TBeeCategoryModel>>;
|
|
8
|
+
export declare function getCatalogCategory({ slug }: {
|
|
9
|
+
slug: string;
|
|
10
|
+
}): Promise<TBeeCategoryModel>;
|
|
11
|
+
export declare function listCatalogCollections(params?: TPageSizeParam): Promise<TBeeFreeList<TBeeCollectionModel>>;
|
|
12
|
+
export declare function getCatalogCollection({ slug }: {
|
|
13
|
+
slug: string;
|
|
14
|
+
}): Promise<TBeeCollectionModel>;
|
|
15
|
+
export declare function listCatalogTags(params?: TPageSizeParam): Promise<TBeeTagModel[]>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface TTemplateListParams {
|
|
2
|
+
search?: string;
|
|
3
|
+
category?: string;
|
|
4
|
+
collection?: string;
|
|
5
|
+
designer?: string;
|
|
6
|
+
tag?: string;
|
|
7
|
+
template_type?: string;
|
|
8
|
+
pagesize?: number;
|
|
9
|
+
published_after?: string;
|
|
10
|
+
published_before?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface TPageSizeParam {
|
|
13
|
+
pagesize?: number;
|
|
14
|
+
}
|