@cakemail-org/ui-components-v2 2.0.60 → 2.0.62
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/factories/forms/index.d.ts +6 -3
- package/dist/cjs/index.js +237 -13
- package/dist/cjs/models/form/index.d.ts +46 -6
- package/dist/cjs/models/form/types.d.ts +35 -1
- package/dist/cjs/services/forms/index.d.ts +24 -0
- package/dist/cjs/types/generic.d.ts +10 -0
- package/dist/cjs/utils/posthog.d.ts +5 -0
- package/dist/esm/factories/forms/index.d.ts +6 -3
- package/dist/esm/index.js +228 -14
- package/dist/esm/models/form/index.d.ts +46 -6
- package/dist/esm/models/form/types.d.ts +35 -1
- package/dist/esm/services/forms/index.d.ts +24 -0
- package/dist/esm/types/generic.d.ts +10 -0
- package/dist/esm/utils/posthog.d.ts +5 -0
- package/package.json +1 -1
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { FormModel } from "../../models";
|
|
1
|
+
import { EnhancedFormModel, FormModel, SummaryEnhancedFormModel } from "../../models";
|
|
2
2
|
import { TGenericListParams, TGenericListReturn } from "../../types/services";
|
|
3
3
|
export declare class FormsFactory {
|
|
4
4
|
static get({ id }: {
|
|
5
5
|
id: string;
|
|
6
|
-
}): Promise<FormModel>;
|
|
7
|
-
static list({ ...options }: TGenericListParams): Promise<TGenericListReturn<FormModel>>;
|
|
6
|
+
}): Promise<FormModel | EnhancedFormModel>;
|
|
7
|
+
static list({ ...options }: TGenericListParams): Promise<TGenericListReturn<FormModel | SummaryEnhancedFormModel>>;
|
|
8
|
+
static create({ form }: {
|
|
9
|
+
form: Partial<FormModel | EnhancedFormModel>;
|
|
10
|
+
}): Promise<EnhancedFormModel | FormModel>;
|
|
8
11
|
}
|
|
9
12
|
export * from "./types";
|
package/dist/cjs/index.js
CHANGED
|
@@ -5243,6 +5243,11 @@ exports.EEvents = void 0;
|
|
|
5243
5243
|
EEvents["FORM_CREATED"] = "Form.Created";
|
|
5244
5244
|
EEvents["FORM_UPDATED"] = "Form.Updated";
|
|
5245
5245
|
EEvents["FORM_DELETED"] = "Form.Deleted";
|
|
5246
|
+
EEvents["FORM_ENABLED"] = "Form.Enabled";
|
|
5247
|
+
EEvents["FORM_DISABLED"] = "Form.Disabled";
|
|
5248
|
+
EEvents["FORM_PUBLISHED"] = "Form.Published";
|
|
5249
|
+
EEvents["FORM_RENDERED"] = "Form.Rendered";
|
|
5250
|
+
EEvents["FORM_RENDERED_PUBLISHED"] = "Form.Rendered.Published";
|
|
5246
5251
|
EEvents["AUTOMATION_CREATED"] = "Automation.Created";
|
|
5247
5252
|
EEvents["AUTOMATION_UPDATED"] = "Automation.Updated";
|
|
5248
5253
|
EEvents["AUTOMATION_DELETED"] = "Automation.Deleted";
|
|
@@ -8264,7 +8269,6 @@ function Search(_a) {
|
|
|
8264
8269
|
else if (onChange) {
|
|
8265
8270
|
onChange(value);
|
|
8266
8271
|
}
|
|
8267
|
-
setValue("");
|
|
8268
8272
|
changeTimer("");
|
|
8269
8273
|
}
|
|
8270
8274
|
}
|
|
@@ -9726,6 +9730,16 @@ function getEmail(_a) {
|
|
|
9726
9730
|
});
|
|
9727
9731
|
}
|
|
9728
9732
|
|
|
9733
|
+
function createForm(_a) {
|
|
9734
|
+
var form = _a.form;
|
|
9735
|
+
return callApi({
|
|
9736
|
+
url: uiKitConfig.GATEWAY_PROXY + "/forms",
|
|
9737
|
+
fetchOptions: {
|
|
9738
|
+
body: form,
|
|
9739
|
+
method: exports.EMethods.post
|
|
9740
|
+
}
|
|
9741
|
+
});
|
|
9742
|
+
}
|
|
9729
9743
|
function listForms(_a) {
|
|
9730
9744
|
var useImpersonationTree = _a.useImpersonationTree, options = __rest(_a, ["useImpersonationTree"]);
|
|
9731
9745
|
return callApi({
|
|
@@ -9737,6 +9751,16 @@ function listForms(_a) {
|
|
|
9737
9751
|
useImpersonationTree: useImpersonationTree
|
|
9738
9752
|
});
|
|
9739
9753
|
}
|
|
9754
|
+
function patchForm(_a) {
|
|
9755
|
+
var id = _a.id, data = _a.data;
|
|
9756
|
+
return callApi({
|
|
9757
|
+
url: uiKitConfig.GATEWAY_PROXY + "/forms/" + id,
|
|
9758
|
+
fetchOptions: {
|
|
9759
|
+
method: exports.EMethods.patch,
|
|
9760
|
+
body: data
|
|
9761
|
+
}
|
|
9762
|
+
});
|
|
9763
|
+
}
|
|
9740
9764
|
function getForm(_a) {
|
|
9741
9765
|
var id = _a.id;
|
|
9742
9766
|
return callApi({
|
|
@@ -9746,6 +9770,52 @@ function getForm(_a) {
|
|
|
9746
9770
|
}
|
|
9747
9771
|
});
|
|
9748
9772
|
}
|
|
9773
|
+
function deleteForm(_a) {
|
|
9774
|
+
var id = _a.id;
|
|
9775
|
+
return callApi({
|
|
9776
|
+
url: uiKitConfig.GATEWAY_PROXY + "/forms/" + id,
|
|
9777
|
+
fetchOptions: {
|
|
9778
|
+
method: exports.EMethods.delete
|
|
9779
|
+
}
|
|
9780
|
+
});
|
|
9781
|
+
}
|
|
9782
|
+
function enableForm(_a) {
|
|
9783
|
+
var id = _a.id;
|
|
9784
|
+
return callApi({
|
|
9785
|
+
url: uiKitConfig.GATEWAY_PROXY + "/forms/" + id + "/enable",
|
|
9786
|
+
fetchOptions: {
|
|
9787
|
+
method: exports.EMethods.post
|
|
9788
|
+
}
|
|
9789
|
+
});
|
|
9790
|
+
}
|
|
9791
|
+
function disableForm(_a) {
|
|
9792
|
+
var id = _a.id;
|
|
9793
|
+
return callApi({
|
|
9794
|
+
url: uiKitConfig.GATEWAY_PROXY + "/forms/" + id + "/disable",
|
|
9795
|
+
fetchOptions: {
|
|
9796
|
+
method: exports.EMethods.post
|
|
9797
|
+
}
|
|
9798
|
+
});
|
|
9799
|
+
}
|
|
9800
|
+
function publishForm(_a) {
|
|
9801
|
+
var id = _a.id;
|
|
9802
|
+
return callApi({
|
|
9803
|
+
url: uiKitConfig.GATEWAY_PROXY + "/forms/" + id + "/publish",
|
|
9804
|
+
fetchOptions: {
|
|
9805
|
+
method: exports.EMethods.post
|
|
9806
|
+
}
|
|
9807
|
+
});
|
|
9808
|
+
}
|
|
9809
|
+
function renderForm(_a) {
|
|
9810
|
+
var id = _a.id, published = _a.published;
|
|
9811
|
+
return callApi({
|
|
9812
|
+
url: uiKitConfig.GATEWAY_PROXY + "/forms/" + id + "/render",
|
|
9813
|
+
query: camelCase({ published: published }),
|
|
9814
|
+
fetchOptions: {
|
|
9815
|
+
method: exports.EMethods.get
|
|
9816
|
+
}
|
|
9817
|
+
});
|
|
9818
|
+
}
|
|
9749
9819
|
|
|
9750
9820
|
function requestSupportService(_a) {
|
|
9751
9821
|
var requestOptions = __rest(_a, []);
|
|
@@ -16535,22 +16605,48 @@ var EmailAPIFactory = /** @class */ (function () {
|
|
|
16535
16605
|
return EmailAPIFactory;
|
|
16536
16606
|
}());
|
|
16537
16607
|
|
|
16538
|
-
var
|
|
16539
|
-
function
|
|
16540
|
-
var id = _a.id, name = _a.name,
|
|
16608
|
+
var CommonFormModel = /** @class */ (function () {
|
|
16609
|
+
function CommonFormModel(_a) {
|
|
16610
|
+
var id = _a.id, name = _a.name, list_id = _a.list_id, double_opt_in = _a.double_opt_in;
|
|
16541
16611
|
this.id = id;
|
|
16542
16612
|
this.name = name;
|
|
16543
|
-
this.status = status;
|
|
16544
|
-
this.content = content;
|
|
16545
|
-
this.language = language;
|
|
16546
|
-
this.created_on = created_on;
|
|
16547
|
-
this.last_updated_on = last_updated_on;
|
|
16548
|
-
this.url = url;
|
|
16549
|
-
this.thumbnail_url = thumbnail_url;
|
|
16550
|
-
this.redirections = redirections;
|
|
16551
16613
|
this.list_id = list_id;
|
|
16552
16614
|
this.double_opt_in = double_opt_in;
|
|
16553
16615
|
}
|
|
16616
|
+
CommonFormModel.prototype.toJson = function () {
|
|
16617
|
+
return modelToJson(this);
|
|
16618
|
+
};
|
|
16619
|
+
CommonFormModel.prototype.set = function (property, value) {
|
|
16620
|
+
modelSet(this, property, value);
|
|
16621
|
+
};
|
|
16622
|
+
CommonFormModel.prototype.delete = function () {
|
|
16623
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
16624
|
+
var _this = this;
|
|
16625
|
+
return __generator(this, function (_a) {
|
|
16626
|
+
return [2 /*return*/, deleteForm({ id: this.id.toString() }).then(function (data) {
|
|
16627
|
+
trackEvent(exports.EEvents.FORM_DELETED, { id: _this.id });
|
|
16628
|
+
return data;
|
|
16629
|
+
})];
|
|
16630
|
+
});
|
|
16631
|
+
});
|
|
16632
|
+
};
|
|
16633
|
+
return CommonFormModel;
|
|
16634
|
+
}());
|
|
16635
|
+
var FormModel = /** @class */ (function (_super) {
|
|
16636
|
+
__extends(FormModel, _super);
|
|
16637
|
+
function FormModel(_a) {
|
|
16638
|
+
var id = _a.id, name = _a.name, status = _a.status, content = _a.content, language = _a.language, created_on = _a.created_on, last_updated_on = _a.last_updated_on, url = _a.url, thumbnail_url = _a.thumbnail_url, redirections = _a.redirections, list_id = _a.list_id, double_opt_in = _a.double_opt_in;
|
|
16639
|
+
var _this = _super.call(this, { id: id, name: name, list_id: list_id, double_opt_in: double_opt_in }) || this;
|
|
16640
|
+
_this.status = status;
|
|
16641
|
+
_this.content = content;
|
|
16642
|
+
_this.language = language;
|
|
16643
|
+
_this.created_on = created_on;
|
|
16644
|
+
_this.last_updated_on = last_updated_on;
|
|
16645
|
+
_this.url = url;
|
|
16646
|
+
_this.thumbnail_url = thumbnail_url;
|
|
16647
|
+
_this.redirections = redirections;
|
|
16648
|
+
return _this;
|
|
16649
|
+
}
|
|
16554
16650
|
FormModel.prototype.toJson = function () {
|
|
16555
16651
|
return modelToJson(this);
|
|
16556
16652
|
};
|
|
@@ -16558,7 +16654,106 @@ var FormModel = /** @class */ (function () {
|
|
|
16558
16654
|
modelSet(this, property, value);
|
|
16559
16655
|
};
|
|
16560
16656
|
return FormModel;
|
|
16561
|
-
}());
|
|
16657
|
+
}(CommonFormModel));
|
|
16658
|
+
var SummaryEnhancedFormModel = /** @class */ (function (_super) {
|
|
16659
|
+
__extends(SummaryEnhancedFormModel, _super);
|
|
16660
|
+
function SummaryEnhancedFormModel(_a) {
|
|
16661
|
+
var id = _a.id, list_id = _a.list_id, enabled = _a.enabled, name = _a.name, description = _a.description, tags = _a.tags, post_redirect_url = _a.post_redirect_url, double_opt_in = _a.double_opt_in, double_opt_in_redirect_url = _a.double_opt_in_redirect_url, submission_url = _a.submission_url, async_processing = _a.async_processing, branding = _a.branding, created_at = _a.created_at, updated_at = _a.updated_at, published_at = _a.published_at, edited_by = _a.edited_by, thumbnail_url = _a.thumbnail_url, recaptcha = _a.recaptcha;
|
|
16662
|
+
var _this = _super.call(this, { id: id, name: name, list_id: list_id, double_opt_in: double_opt_in }) || this;
|
|
16663
|
+
_this.enabled = enabled;
|
|
16664
|
+
_this.description = description;
|
|
16665
|
+
_this.tags = tags;
|
|
16666
|
+
_this.post_redirect_url = post_redirect_url;
|
|
16667
|
+
_this.double_opt_in_redirect_url = double_opt_in_redirect_url;
|
|
16668
|
+
_this.submission_url = submission_url;
|
|
16669
|
+
_this.async_processing = async_processing;
|
|
16670
|
+
_this.branding = branding;
|
|
16671
|
+
_this.created_at = created_at;
|
|
16672
|
+
_this.updated_at = updated_at;
|
|
16673
|
+
_this.published_at = published_at;
|
|
16674
|
+
_this.edited_by = edited_by;
|
|
16675
|
+
_this.thumbnail_url = thumbnail_url;
|
|
16676
|
+
_this.recaptcha = recaptcha;
|
|
16677
|
+
return _this;
|
|
16678
|
+
}
|
|
16679
|
+
SummaryEnhancedFormModel.prototype.enable = function () {
|
|
16680
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
16681
|
+
var _this = this;
|
|
16682
|
+
return __generator(this, function (_a) {
|
|
16683
|
+
return [2 /*return*/, enableForm({ id: this.id.toString() }).then(function (data) {
|
|
16684
|
+
trackEvent(exports.EEvents.FORM_ENABLED, { id: _this.id });
|
|
16685
|
+
return data;
|
|
16686
|
+
})];
|
|
16687
|
+
});
|
|
16688
|
+
});
|
|
16689
|
+
};
|
|
16690
|
+
SummaryEnhancedFormModel.prototype.disable = function () {
|
|
16691
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
16692
|
+
var _this = this;
|
|
16693
|
+
return __generator(this, function (_a) {
|
|
16694
|
+
return [2 /*return*/, disableForm({ id: this.id.toString() }).then(function (data) {
|
|
16695
|
+
trackEvent(exports.EEvents.FORM_DISABLED, { id: _this.id });
|
|
16696
|
+
return data;
|
|
16697
|
+
})];
|
|
16698
|
+
});
|
|
16699
|
+
});
|
|
16700
|
+
};
|
|
16701
|
+
SummaryEnhancedFormModel.prototype.publish = function () {
|
|
16702
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
16703
|
+
var _this = this;
|
|
16704
|
+
return __generator(this, function (_a) {
|
|
16705
|
+
return [2 /*return*/, publishForm({ id: this.id.toString() }).then(function (data) {
|
|
16706
|
+
trackEvent(exports.EEvents.FORM_PUBLISHED, { id: _this.id });
|
|
16707
|
+
return data;
|
|
16708
|
+
})];
|
|
16709
|
+
});
|
|
16710
|
+
});
|
|
16711
|
+
};
|
|
16712
|
+
SummaryEnhancedFormModel.prototype.render = function () {
|
|
16713
|
+
return __awaiter(this, arguments, void 0, function (published) {
|
|
16714
|
+
var _this = this;
|
|
16715
|
+
if (published === void 0) { published = false; }
|
|
16716
|
+
return __generator(this, function (_a) {
|
|
16717
|
+
return [2 /*return*/, renderForm({ id: this.id.toString(), published: published }).then(function (data) {
|
|
16718
|
+
trackEvent(published ? exports.EEvents.FORM_RENDERED_PUBLISHED : exports.EEvents.FORM_RENDERED, { id: _this.id });
|
|
16719
|
+
return data;
|
|
16720
|
+
})];
|
|
16721
|
+
});
|
|
16722
|
+
});
|
|
16723
|
+
};
|
|
16724
|
+
SummaryEnhancedFormModel.prototype.save = function () {
|
|
16725
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
16726
|
+
var _this = this;
|
|
16727
|
+
return __generator(this, function (_a) {
|
|
16728
|
+
return [2 /*return*/, patchForm({ id: this.id.toString(), data: this.toJson() }).then(function (data) {
|
|
16729
|
+
trackEvent(exports.EEvents.FORM_UPDATED, { id: _this.id });
|
|
16730
|
+
return data;
|
|
16731
|
+
})];
|
|
16732
|
+
});
|
|
16733
|
+
});
|
|
16734
|
+
};
|
|
16735
|
+
SummaryEnhancedFormModel.prototype.toJson = function () {
|
|
16736
|
+
return modelToJson(this);
|
|
16737
|
+
};
|
|
16738
|
+
SummaryEnhancedFormModel.prototype.set = function (property, value) {
|
|
16739
|
+
modelSet(this, property, value);
|
|
16740
|
+
};
|
|
16741
|
+
return SummaryEnhancedFormModel;
|
|
16742
|
+
}(CommonFormModel));
|
|
16743
|
+
var EnhancedFormModel = /** @class */ (function (_super) {
|
|
16744
|
+
__extends(EnhancedFormModel, _super);
|
|
16745
|
+
function EnhancedFormModel(_a) {
|
|
16746
|
+
var _this = this;
|
|
16747
|
+
var content = _a.content, rest = __rest(_a, ["content"]);
|
|
16748
|
+
_this = _super.call(this, rest) || this;
|
|
16749
|
+
_this.content = content;
|
|
16750
|
+
return _this;
|
|
16751
|
+
}
|
|
16752
|
+
EnhancedFormModel.prototype.toJson = function () {
|
|
16753
|
+
return modelToJson(this);
|
|
16754
|
+
};
|
|
16755
|
+
return EnhancedFormModel;
|
|
16756
|
+
}(SummaryEnhancedFormModel));
|
|
16562
16757
|
|
|
16563
16758
|
var ListModel = /** @class */ (function () {
|
|
16564
16759
|
function ListModel(params) {
|
|
@@ -16757,6 +16952,9 @@ var FormsFactory = /** @class */ (function () {
|
|
|
16757
16952
|
var id = _b.id;
|
|
16758
16953
|
return __generator(this, function (_c) {
|
|
16759
16954
|
return [2 /*return*/, getForm({ id: id }).then(function (data) {
|
|
16955
|
+
if ("enabled" in data.data) {
|
|
16956
|
+
return new EnhancedFormModel(data.data);
|
|
16957
|
+
}
|
|
16760
16958
|
return new FormModel(data.data);
|
|
16761
16959
|
})];
|
|
16762
16960
|
});
|
|
@@ -16768,6 +16966,9 @@ var FormsFactory = /** @class */ (function () {
|
|
|
16768
16966
|
return __generator(this, function (_b) {
|
|
16769
16967
|
return [2 /*return*/, listForms(options).then(function (data) {
|
|
16770
16968
|
data.data = data.data.map(function (form) {
|
|
16969
|
+
if ("enabled" in form) {
|
|
16970
|
+
return new SummaryEnhancedFormModel(form);
|
|
16971
|
+
}
|
|
16771
16972
|
return new FormModel(form);
|
|
16772
16973
|
});
|
|
16773
16974
|
return data;
|
|
@@ -16775,6 +16976,19 @@ var FormsFactory = /** @class */ (function () {
|
|
|
16775
16976
|
});
|
|
16776
16977
|
});
|
|
16777
16978
|
};
|
|
16979
|
+
FormsFactory.create = function (_a) {
|
|
16980
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
16981
|
+
var form = _b.form;
|
|
16982
|
+
return __generator(this, function (_c) {
|
|
16983
|
+
return [2 /*return*/, createForm({ form: form }).then(function (data) {
|
|
16984
|
+
if ("enabled" in data.data) {
|
|
16985
|
+
return new EnhancedFormModel(data.data);
|
|
16986
|
+
}
|
|
16987
|
+
return new FormModel(data.data);
|
|
16988
|
+
})];
|
|
16989
|
+
});
|
|
16990
|
+
});
|
|
16991
|
+
};
|
|
16778
16992
|
return FormsFactory;
|
|
16779
16993
|
}());
|
|
16780
16994
|
|
|
@@ -17059,6 +17273,7 @@ exports.CircularProgress = CircularProgress;
|
|
|
17059
17273
|
exports.CodeInput = CodeInput;
|
|
17060
17274
|
exports.ColManager = ColManager;
|
|
17061
17275
|
exports.ColorTextField = ColorTextField;
|
|
17276
|
+
exports.CommonFormModel = CommonFormModel;
|
|
17062
17277
|
exports.ContactModel = ContactModel;
|
|
17063
17278
|
exports.ContactsFactory = ContactsFactory;
|
|
17064
17279
|
exports.ContentSectionContainer = ContentSectionContainer;
|
|
@@ -17085,6 +17300,7 @@ exports.ElementContains = ElementContains;
|
|
|
17085
17300
|
exports.Email = Email;
|
|
17086
17301
|
exports.EmailAPIFactory = EmailAPIFactory;
|
|
17087
17302
|
exports.EmptyContent = EmptyContent;
|
|
17303
|
+
exports.EnhancedFormModel = EnhancedFormModel;
|
|
17088
17304
|
exports.FileUpload = FileUpload;
|
|
17089
17305
|
exports.FilterBar = FilterBar;
|
|
17090
17306
|
exports.FormModel = FormModel;
|
|
@@ -17120,6 +17336,7 @@ exports.SideMenu = SideMenu;
|
|
|
17120
17336
|
exports.SideMenuContainer = SideMenuContainer;
|
|
17121
17337
|
exports.SideMenuItem = SideMenuItem;
|
|
17122
17338
|
exports.SubNav = SubNav;
|
|
17339
|
+
exports.SummaryEnhancedFormModel = SummaryEnhancedFormModel;
|
|
17123
17340
|
exports.SupportFactory = SupportFactory;
|
|
17124
17341
|
exports.SystemEmailsFactory = SystemEmailsFactory;
|
|
17125
17342
|
exports.SystemEmailsModel = SystemEmailsModel;
|
|
@@ -17154,18 +17371,22 @@ exports.createBrand = createBrand;
|
|
|
17154
17371
|
exports.createCampaign = createCampaign;
|
|
17155
17372
|
exports.createCampaignLogsExports = createCampaignLogsExports;
|
|
17156
17373
|
exports.createCampaignsReportsExport = createCampaignsReportsExport;
|
|
17374
|
+
exports.createForm = createForm;
|
|
17157
17375
|
exports.createTemplate = createTemplate;
|
|
17158
17376
|
exports.deepMergeObject = deepMergeObject;
|
|
17159
17377
|
exports.deleteCampaign = deleteCampaign;
|
|
17160
17378
|
exports.deleteCampaignsReportsExport = deleteCampaignsReportsExport;
|
|
17379
|
+
exports.deleteForm = deleteForm;
|
|
17161
17380
|
exports.deletePartialInformation = deletePartialInformation;
|
|
17162
17381
|
exports.deleteStorageItem = deleteStorageItem;
|
|
17163
17382
|
exports.deleteTemplate = deleteTemplate;
|
|
17164
17383
|
exports.descendingComparator = descendingComparator;
|
|
17384
|
+
exports.disableForm = disableForm;
|
|
17165
17385
|
exports.downloadCampaignLogExport = downloadCampaignLogExport;
|
|
17166
17386
|
exports.downloadCampaignsReportsExport = downloadCampaignsReportsExport;
|
|
17167
17387
|
exports.emptyAccountAddress = emptyAccountAddress;
|
|
17168
17388
|
exports.emptyAccountLimits = emptyAccountLimits;
|
|
17389
|
+
exports.enableForm = enableForm;
|
|
17169
17390
|
exports.enrichBrand = enrichBrand;
|
|
17170
17391
|
exports.enrichOrganization = enrichOrganization;
|
|
17171
17392
|
exports.enrichProfile = enrichProfile;
|
|
@@ -17248,13 +17469,16 @@ exports.miliToSecond = miliToSecond;
|
|
|
17248
17469
|
exports.modelSet = modelSet;
|
|
17249
17470
|
exports.modelToJson = modelToJson;
|
|
17250
17471
|
exports.originalBrand = originalBrand;
|
|
17472
|
+
exports.patchForm = patchForm;
|
|
17251
17473
|
exports.popImpersonificationTree = popImpersonificationTree;
|
|
17252
17474
|
exports.postMessage = postMessage;
|
|
17475
|
+
exports.publishForm = publishForm;
|
|
17253
17476
|
exports.reScheduleCampaign = reScheduleCampaign;
|
|
17254
17477
|
exports.removeEmptyProperties = removeEmptyProperties;
|
|
17255
17478
|
exports.removeQueryParams = removeQueryParams;
|
|
17256
17479
|
exports.removeTrailingChar = removeTrailingChar;
|
|
17257
17480
|
exports.renderCampaign = renderCampaign;
|
|
17481
|
+
exports.renderForm = renderForm;
|
|
17258
17482
|
exports.renderTemplate = renderTemplate;
|
|
17259
17483
|
exports.requestSupportService = requestSupportService;
|
|
17260
17484
|
exports.resumeCampaign = resumeCampaign;
|
|
@@ -1,8 +1,21 @@
|
|
|
1
|
-
import { EApiLanguages } from "../../types";
|
|
2
|
-
import { TFormModel } from "./types";
|
|
3
|
-
export declare class
|
|
4
|
-
readonly id:
|
|
1
|
+
import { EApiLanguages, TDeleteApiResource, TDisableApiResource, TEnableApiResource, TGenericReturn } from "../../types";
|
|
2
|
+
import { TEnhancedFormContent, TEnhancedFormEditedBy, TEnhancedFormModel, TEnhancedFormRecaptcha, TFormModel, TSummaryEnhancedFormModel } from "./types";
|
|
3
|
+
export declare class CommonFormModel {
|
|
4
|
+
readonly id: string;
|
|
5
5
|
name: string;
|
|
6
|
+
list_id: number;
|
|
7
|
+
double_opt_in: boolean;
|
|
8
|
+
constructor({ id, name, list_id, double_opt_in }: {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
list_id: number;
|
|
12
|
+
double_opt_in: boolean;
|
|
13
|
+
});
|
|
14
|
+
toJson(): any;
|
|
15
|
+
set<T extends keyof this>(property: T, value: this[T]): void;
|
|
16
|
+
delete(): Promise<TDeleteApiResource>;
|
|
17
|
+
}
|
|
18
|
+
export declare class FormModel extends CommonFormModel {
|
|
6
19
|
readonly status: string;
|
|
7
20
|
content: {
|
|
8
21
|
linked: string;
|
|
@@ -21,10 +34,37 @@ export declare class FormModel {
|
|
|
21
34
|
after_double_opt_in: string;
|
|
22
35
|
after_opt_out: string;
|
|
23
36
|
};
|
|
24
|
-
list_id: number;
|
|
25
|
-
double_opt_in: boolean;
|
|
26
37
|
constructor({ id, name, status, content, language, created_on, last_updated_on, url, thumbnail_url, redirections, list_id, double_opt_in, }: TFormModel);
|
|
27
38
|
toJson(): any;
|
|
28
39
|
set<T extends keyof this>(property: T, value: this[T]): void;
|
|
29
40
|
}
|
|
41
|
+
export declare class SummaryEnhancedFormModel extends CommonFormModel {
|
|
42
|
+
readonly enabled: boolean;
|
|
43
|
+
description: string;
|
|
44
|
+
tags: string[];
|
|
45
|
+
post_redirect_url: string;
|
|
46
|
+
double_opt_in_redirect_url: string;
|
|
47
|
+
submission_url: string;
|
|
48
|
+
async_processing: boolean;
|
|
49
|
+
branding: string;
|
|
50
|
+
readonly created_at: number;
|
|
51
|
+
readonly updated_at: number;
|
|
52
|
+
readonly published_at: number;
|
|
53
|
+
readonly edited_by: TEnhancedFormEditedBy;
|
|
54
|
+
readonly thumbnail_url: string;
|
|
55
|
+
recaptcha: TEnhancedFormRecaptcha;
|
|
56
|
+
constructor({ id, list_id, enabled, name, description, tags, post_redirect_url, double_opt_in, double_opt_in_redirect_url, submission_url, async_processing, branding, created_at, updated_at, published_at, edited_by, thumbnail_url, recaptcha, }: TSummaryEnhancedFormModel);
|
|
57
|
+
enable(): Promise<TEnableApiResource>;
|
|
58
|
+
disable(): Promise<TDisableApiResource>;
|
|
59
|
+
publish(): Promise<TGenericReturn<EnhancedFormModel>>;
|
|
60
|
+
render(published?: boolean): Promise<TGenericReturn<EnhancedFormModel>>;
|
|
61
|
+
save(): Promise<TGenericReturn<EnhancedFormModel>>;
|
|
62
|
+
toJson(): any;
|
|
63
|
+
set<T extends keyof this>(property: T, value: this[T]): void;
|
|
64
|
+
}
|
|
65
|
+
export declare class EnhancedFormModel extends SummaryEnhancedFormModel {
|
|
66
|
+
content: TEnhancedFormContent;
|
|
67
|
+
constructor({ content, ...rest }: TEnhancedFormModel);
|
|
68
|
+
toJson(): any;
|
|
69
|
+
}
|
|
30
70
|
export * from "./types";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EApiLanguages } from "../../types";
|
|
2
2
|
export type TFormModel = {
|
|
3
|
-
readonly id:
|
|
3
|
+
readonly id: string;
|
|
4
4
|
name: string;
|
|
5
5
|
readonly status: string;
|
|
6
6
|
content: {
|
|
@@ -23,3 +23,37 @@ export type TFormModel = {
|
|
|
23
23
|
list_id: number;
|
|
24
24
|
double_opt_in: boolean;
|
|
25
25
|
};
|
|
26
|
+
export type TEnhancedFormEditedBy = {
|
|
27
|
+
id: number;
|
|
28
|
+
email: string;
|
|
29
|
+
};
|
|
30
|
+
export type TEnhancedFormRecaptcha = {
|
|
31
|
+
secret: string;
|
|
32
|
+
domain: string;
|
|
33
|
+
};
|
|
34
|
+
export type TEnhancedFormContent = {
|
|
35
|
+
json: any;
|
|
36
|
+
};
|
|
37
|
+
export interface TSummaryEnhancedFormModel {
|
|
38
|
+
readonly id: string;
|
|
39
|
+
list_id: number;
|
|
40
|
+
readonly enabled: boolean;
|
|
41
|
+
name: string;
|
|
42
|
+
description: string;
|
|
43
|
+
tags: string[];
|
|
44
|
+
post_redirect_url: string;
|
|
45
|
+
double_opt_in: boolean;
|
|
46
|
+
double_opt_in_redirect_url: string;
|
|
47
|
+
submission_url: string;
|
|
48
|
+
async_processing: boolean;
|
|
49
|
+
branding: string;
|
|
50
|
+
readonly created_at: number;
|
|
51
|
+
readonly updated_at: number;
|
|
52
|
+
readonly published_at: number;
|
|
53
|
+
readonly edited_by: TEnhancedFormEditedBy;
|
|
54
|
+
readonly thumbnail_url: string;
|
|
55
|
+
recaptcha: TEnhancedFormRecaptcha;
|
|
56
|
+
}
|
|
57
|
+
export interface TEnhancedFormModel extends TSummaryEnhancedFormModel {
|
|
58
|
+
content: TEnhancedFormContent;
|
|
59
|
+
}
|
|
@@ -1,6 +1,30 @@
|
|
|
1
|
+
import { EnhancedFormModel, FormModel } from "../../models";
|
|
1
2
|
import { TGenericListParams } from "../../types";
|
|
3
|
+
export declare function createForm({ form }: {
|
|
4
|
+
form: Partial<FormModel | EnhancedFormModel>;
|
|
5
|
+
}): Promise<any>;
|
|
2
6
|
export declare function listForms({ useImpersonationTree, ...options }: TGenericListParams): Promise<any>;
|
|
7
|
+
export declare function patchForm({ id, data }: {
|
|
8
|
+
id: string;
|
|
9
|
+
data: Partial<FormModel | EnhancedFormModel>;
|
|
10
|
+
}): Promise<any>;
|
|
3
11
|
export declare function getForm({ id }: {
|
|
4
12
|
id: string;
|
|
5
13
|
}): Promise<any>;
|
|
14
|
+
export declare function deleteForm({ id }: {
|
|
15
|
+
id: string;
|
|
16
|
+
}): Promise<any>;
|
|
17
|
+
export declare function enableForm({ id }: {
|
|
18
|
+
id: string;
|
|
19
|
+
}): Promise<any>;
|
|
20
|
+
export declare function disableForm({ id }: {
|
|
21
|
+
id: string;
|
|
22
|
+
}): Promise<any>;
|
|
23
|
+
export declare function publishForm({ id }: {
|
|
24
|
+
id: string;
|
|
25
|
+
}): Promise<any>;
|
|
26
|
+
export declare function renderForm({ id, published }: {
|
|
27
|
+
id: string;
|
|
28
|
+
published: boolean;
|
|
29
|
+
}): Promise<any>;
|
|
6
30
|
export * from "./types";
|
|
@@ -90,6 +90,16 @@ export type TDeleteApiResource = {
|
|
|
90
90
|
object: string;
|
|
91
91
|
deleted: boolean;
|
|
92
92
|
};
|
|
93
|
+
export type TEnableApiResource = {
|
|
94
|
+
id: TNumStr;
|
|
95
|
+
object: string;
|
|
96
|
+
enabled: boolean;
|
|
97
|
+
};
|
|
98
|
+
export type TDisableApiResource = {
|
|
99
|
+
id: TNumStr;
|
|
100
|
+
object: string;
|
|
101
|
+
disabled: boolean;
|
|
102
|
+
};
|
|
93
103
|
export type TUpdateApiResource<T> = {
|
|
94
104
|
updated: boolean;
|
|
95
105
|
object: string;
|
|
@@ -88,6 +88,11 @@ export declare enum EEvents {
|
|
|
88
88
|
FORM_CREATED = "Form.Created",
|
|
89
89
|
FORM_UPDATED = "Form.Updated",
|
|
90
90
|
FORM_DELETED = "Form.Deleted",
|
|
91
|
+
FORM_ENABLED = "Form.Enabled",
|
|
92
|
+
FORM_DISABLED = "Form.Disabled",
|
|
93
|
+
FORM_PUBLISHED = "Form.Published",
|
|
94
|
+
FORM_RENDERED = "Form.Rendered",
|
|
95
|
+
FORM_RENDERED_PUBLISHED = "Form.Rendered.Published",
|
|
91
96
|
AUTOMATION_CREATED = "Automation.Created",
|
|
92
97
|
AUTOMATION_UPDATED = "Automation.Updated",
|
|
93
98
|
AUTOMATION_DELETED = "Automation.Deleted",
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { FormModel } from "../../models";
|
|
1
|
+
import { EnhancedFormModel, FormModel, SummaryEnhancedFormModel } from "../../models";
|
|
2
2
|
import { TGenericListParams, TGenericListReturn } from "../../types/services";
|
|
3
3
|
export declare class FormsFactory {
|
|
4
4
|
static get({ id }: {
|
|
5
5
|
id: string;
|
|
6
|
-
}): Promise<FormModel>;
|
|
7
|
-
static list({ ...options }: TGenericListParams): Promise<TGenericListReturn<FormModel>>;
|
|
6
|
+
}): Promise<FormModel | EnhancedFormModel>;
|
|
7
|
+
static list({ ...options }: TGenericListParams): Promise<TGenericListReturn<FormModel | SummaryEnhancedFormModel>>;
|
|
8
|
+
static create({ form }: {
|
|
9
|
+
form: Partial<FormModel | EnhancedFormModel>;
|
|
10
|
+
}): Promise<EnhancedFormModel | FormModel>;
|
|
8
11
|
}
|
|
9
12
|
export * from "./types";
|
package/dist/esm/index.js
CHANGED
|
@@ -5223,6 +5223,11 @@ var EEvents;
|
|
|
5223
5223
|
EEvents["FORM_CREATED"] = "Form.Created";
|
|
5224
5224
|
EEvents["FORM_UPDATED"] = "Form.Updated";
|
|
5225
5225
|
EEvents["FORM_DELETED"] = "Form.Deleted";
|
|
5226
|
+
EEvents["FORM_ENABLED"] = "Form.Enabled";
|
|
5227
|
+
EEvents["FORM_DISABLED"] = "Form.Disabled";
|
|
5228
|
+
EEvents["FORM_PUBLISHED"] = "Form.Published";
|
|
5229
|
+
EEvents["FORM_RENDERED"] = "Form.Rendered";
|
|
5230
|
+
EEvents["FORM_RENDERED_PUBLISHED"] = "Form.Rendered.Published";
|
|
5226
5231
|
EEvents["AUTOMATION_CREATED"] = "Automation.Created";
|
|
5227
5232
|
EEvents["AUTOMATION_UPDATED"] = "Automation.Updated";
|
|
5228
5233
|
EEvents["AUTOMATION_DELETED"] = "Automation.Deleted";
|
|
@@ -8244,7 +8249,6 @@ function Search(_a) {
|
|
|
8244
8249
|
else if (onChange) {
|
|
8245
8250
|
onChange(value);
|
|
8246
8251
|
}
|
|
8247
|
-
setValue("");
|
|
8248
8252
|
changeTimer("");
|
|
8249
8253
|
}
|
|
8250
8254
|
}
|
|
@@ -9706,6 +9710,16 @@ function getEmail(_a) {
|
|
|
9706
9710
|
});
|
|
9707
9711
|
}
|
|
9708
9712
|
|
|
9713
|
+
function createForm(_a) {
|
|
9714
|
+
var form = _a.form;
|
|
9715
|
+
return callApi({
|
|
9716
|
+
url: uiKitConfig.GATEWAY_PROXY + "/forms",
|
|
9717
|
+
fetchOptions: {
|
|
9718
|
+
body: form,
|
|
9719
|
+
method: EMethods.post
|
|
9720
|
+
}
|
|
9721
|
+
});
|
|
9722
|
+
}
|
|
9709
9723
|
function listForms(_a) {
|
|
9710
9724
|
var useImpersonationTree = _a.useImpersonationTree, options = __rest(_a, ["useImpersonationTree"]);
|
|
9711
9725
|
return callApi({
|
|
@@ -9717,6 +9731,16 @@ function listForms(_a) {
|
|
|
9717
9731
|
useImpersonationTree: useImpersonationTree
|
|
9718
9732
|
});
|
|
9719
9733
|
}
|
|
9734
|
+
function patchForm(_a) {
|
|
9735
|
+
var id = _a.id, data = _a.data;
|
|
9736
|
+
return callApi({
|
|
9737
|
+
url: uiKitConfig.GATEWAY_PROXY + "/forms/" + id,
|
|
9738
|
+
fetchOptions: {
|
|
9739
|
+
method: EMethods.patch,
|
|
9740
|
+
body: data
|
|
9741
|
+
}
|
|
9742
|
+
});
|
|
9743
|
+
}
|
|
9720
9744
|
function getForm(_a) {
|
|
9721
9745
|
var id = _a.id;
|
|
9722
9746
|
return callApi({
|
|
@@ -9726,6 +9750,52 @@ function getForm(_a) {
|
|
|
9726
9750
|
}
|
|
9727
9751
|
});
|
|
9728
9752
|
}
|
|
9753
|
+
function deleteForm(_a) {
|
|
9754
|
+
var id = _a.id;
|
|
9755
|
+
return callApi({
|
|
9756
|
+
url: uiKitConfig.GATEWAY_PROXY + "/forms/" + id,
|
|
9757
|
+
fetchOptions: {
|
|
9758
|
+
method: EMethods.delete
|
|
9759
|
+
}
|
|
9760
|
+
});
|
|
9761
|
+
}
|
|
9762
|
+
function enableForm(_a) {
|
|
9763
|
+
var id = _a.id;
|
|
9764
|
+
return callApi({
|
|
9765
|
+
url: uiKitConfig.GATEWAY_PROXY + "/forms/" + id + "/enable",
|
|
9766
|
+
fetchOptions: {
|
|
9767
|
+
method: EMethods.post
|
|
9768
|
+
}
|
|
9769
|
+
});
|
|
9770
|
+
}
|
|
9771
|
+
function disableForm(_a) {
|
|
9772
|
+
var id = _a.id;
|
|
9773
|
+
return callApi({
|
|
9774
|
+
url: uiKitConfig.GATEWAY_PROXY + "/forms/" + id + "/disable",
|
|
9775
|
+
fetchOptions: {
|
|
9776
|
+
method: EMethods.post
|
|
9777
|
+
}
|
|
9778
|
+
});
|
|
9779
|
+
}
|
|
9780
|
+
function publishForm(_a) {
|
|
9781
|
+
var id = _a.id;
|
|
9782
|
+
return callApi({
|
|
9783
|
+
url: uiKitConfig.GATEWAY_PROXY + "/forms/" + id + "/publish",
|
|
9784
|
+
fetchOptions: {
|
|
9785
|
+
method: EMethods.post
|
|
9786
|
+
}
|
|
9787
|
+
});
|
|
9788
|
+
}
|
|
9789
|
+
function renderForm(_a) {
|
|
9790
|
+
var id = _a.id, published = _a.published;
|
|
9791
|
+
return callApi({
|
|
9792
|
+
url: uiKitConfig.GATEWAY_PROXY + "/forms/" + id + "/render",
|
|
9793
|
+
query: camelCase({ published: published }),
|
|
9794
|
+
fetchOptions: {
|
|
9795
|
+
method: EMethods.get
|
|
9796
|
+
}
|
|
9797
|
+
});
|
|
9798
|
+
}
|
|
9729
9799
|
|
|
9730
9800
|
function requestSupportService(_a) {
|
|
9731
9801
|
var requestOptions = __rest(_a, []);
|
|
@@ -16515,22 +16585,48 @@ var EmailAPIFactory = /** @class */ (function () {
|
|
|
16515
16585
|
return EmailAPIFactory;
|
|
16516
16586
|
}());
|
|
16517
16587
|
|
|
16518
|
-
var
|
|
16519
|
-
function
|
|
16520
|
-
var id = _a.id, name = _a.name,
|
|
16588
|
+
var CommonFormModel = /** @class */ (function () {
|
|
16589
|
+
function CommonFormModel(_a) {
|
|
16590
|
+
var id = _a.id, name = _a.name, list_id = _a.list_id, double_opt_in = _a.double_opt_in;
|
|
16521
16591
|
this.id = id;
|
|
16522
16592
|
this.name = name;
|
|
16523
|
-
this.status = status;
|
|
16524
|
-
this.content = content;
|
|
16525
|
-
this.language = language;
|
|
16526
|
-
this.created_on = created_on;
|
|
16527
|
-
this.last_updated_on = last_updated_on;
|
|
16528
|
-
this.url = url;
|
|
16529
|
-
this.thumbnail_url = thumbnail_url;
|
|
16530
|
-
this.redirections = redirections;
|
|
16531
16593
|
this.list_id = list_id;
|
|
16532
16594
|
this.double_opt_in = double_opt_in;
|
|
16533
16595
|
}
|
|
16596
|
+
CommonFormModel.prototype.toJson = function () {
|
|
16597
|
+
return modelToJson(this);
|
|
16598
|
+
};
|
|
16599
|
+
CommonFormModel.prototype.set = function (property, value) {
|
|
16600
|
+
modelSet(this, property, value);
|
|
16601
|
+
};
|
|
16602
|
+
CommonFormModel.prototype.delete = function () {
|
|
16603
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
16604
|
+
var _this = this;
|
|
16605
|
+
return __generator(this, function (_a) {
|
|
16606
|
+
return [2 /*return*/, deleteForm({ id: this.id.toString() }).then(function (data) {
|
|
16607
|
+
trackEvent(EEvents.FORM_DELETED, { id: _this.id });
|
|
16608
|
+
return data;
|
|
16609
|
+
})];
|
|
16610
|
+
});
|
|
16611
|
+
});
|
|
16612
|
+
};
|
|
16613
|
+
return CommonFormModel;
|
|
16614
|
+
}());
|
|
16615
|
+
var FormModel = /** @class */ (function (_super) {
|
|
16616
|
+
__extends(FormModel, _super);
|
|
16617
|
+
function FormModel(_a) {
|
|
16618
|
+
var id = _a.id, name = _a.name, status = _a.status, content = _a.content, language = _a.language, created_on = _a.created_on, last_updated_on = _a.last_updated_on, url = _a.url, thumbnail_url = _a.thumbnail_url, redirections = _a.redirections, list_id = _a.list_id, double_opt_in = _a.double_opt_in;
|
|
16619
|
+
var _this = _super.call(this, { id: id, name: name, list_id: list_id, double_opt_in: double_opt_in }) || this;
|
|
16620
|
+
_this.status = status;
|
|
16621
|
+
_this.content = content;
|
|
16622
|
+
_this.language = language;
|
|
16623
|
+
_this.created_on = created_on;
|
|
16624
|
+
_this.last_updated_on = last_updated_on;
|
|
16625
|
+
_this.url = url;
|
|
16626
|
+
_this.thumbnail_url = thumbnail_url;
|
|
16627
|
+
_this.redirections = redirections;
|
|
16628
|
+
return _this;
|
|
16629
|
+
}
|
|
16534
16630
|
FormModel.prototype.toJson = function () {
|
|
16535
16631
|
return modelToJson(this);
|
|
16536
16632
|
};
|
|
@@ -16538,7 +16634,106 @@ var FormModel = /** @class */ (function () {
|
|
|
16538
16634
|
modelSet(this, property, value);
|
|
16539
16635
|
};
|
|
16540
16636
|
return FormModel;
|
|
16541
|
-
}());
|
|
16637
|
+
}(CommonFormModel));
|
|
16638
|
+
var SummaryEnhancedFormModel = /** @class */ (function (_super) {
|
|
16639
|
+
__extends(SummaryEnhancedFormModel, _super);
|
|
16640
|
+
function SummaryEnhancedFormModel(_a) {
|
|
16641
|
+
var id = _a.id, list_id = _a.list_id, enabled = _a.enabled, name = _a.name, description = _a.description, tags = _a.tags, post_redirect_url = _a.post_redirect_url, double_opt_in = _a.double_opt_in, double_opt_in_redirect_url = _a.double_opt_in_redirect_url, submission_url = _a.submission_url, async_processing = _a.async_processing, branding = _a.branding, created_at = _a.created_at, updated_at = _a.updated_at, published_at = _a.published_at, edited_by = _a.edited_by, thumbnail_url = _a.thumbnail_url, recaptcha = _a.recaptcha;
|
|
16642
|
+
var _this = _super.call(this, { id: id, name: name, list_id: list_id, double_opt_in: double_opt_in }) || this;
|
|
16643
|
+
_this.enabled = enabled;
|
|
16644
|
+
_this.description = description;
|
|
16645
|
+
_this.tags = tags;
|
|
16646
|
+
_this.post_redirect_url = post_redirect_url;
|
|
16647
|
+
_this.double_opt_in_redirect_url = double_opt_in_redirect_url;
|
|
16648
|
+
_this.submission_url = submission_url;
|
|
16649
|
+
_this.async_processing = async_processing;
|
|
16650
|
+
_this.branding = branding;
|
|
16651
|
+
_this.created_at = created_at;
|
|
16652
|
+
_this.updated_at = updated_at;
|
|
16653
|
+
_this.published_at = published_at;
|
|
16654
|
+
_this.edited_by = edited_by;
|
|
16655
|
+
_this.thumbnail_url = thumbnail_url;
|
|
16656
|
+
_this.recaptcha = recaptcha;
|
|
16657
|
+
return _this;
|
|
16658
|
+
}
|
|
16659
|
+
SummaryEnhancedFormModel.prototype.enable = function () {
|
|
16660
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
16661
|
+
var _this = this;
|
|
16662
|
+
return __generator(this, function (_a) {
|
|
16663
|
+
return [2 /*return*/, enableForm({ id: this.id.toString() }).then(function (data) {
|
|
16664
|
+
trackEvent(EEvents.FORM_ENABLED, { id: _this.id });
|
|
16665
|
+
return data;
|
|
16666
|
+
})];
|
|
16667
|
+
});
|
|
16668
|
+
});
|
|
16669
|
+
};
|
|
16670
|
+
SummaryEnhancedFormModel.prototype.disable = function () {
|
|
16671
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
16672
|
+
var _this = this;
|
|
16673
|
+
return __generator(this, function (_a) {
|
|
16674
|
+
return [2 /*return*/, disableForm({ id: this.id.toString() }).then(function (data) {
|
|
16675
|
+
trackEvent(EEvents.FORM_DISABLED, { id: _this.id });
|
|
16676
|
+
return data;
|
|
16677
|
+
})];
|
|
16678
|
+
});
|
|
16679
|
+
});
|
|
16680
|
+
};
|
|
16681
|
+
SummaryEnhancedFormModel.prototype.publish = function () {
|
|
16682
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
16683
|
+
var _this = this;
|
|
16684
|
+
return __generator(this, function (_a) {
|
|
16685
|
+
return [2 /*return*/, publishForm({ id: this.id.toString() }).then(function (data) {
|
|
16686
|
+
trackEvent(EEvents.FORM_PUBLISHED, { id: _this.id });
|
|
16687
|
+
return data;
|
|
16688
|
+
})];
|
|
16689
|
+
});
|
|
16690
|
+
});
|
|
16691
|
+
};
|
|
16692
|
+
SummaryEnhancedFormModel.prototype.render = function () {
|
|
16693
|
+
return __awaiter(this, arguments, void 0, function (published) {
|
|
16694
|
+
var _this = this;
|
|
16695
|
+
if (published === void 0) { published = false; }
|
|
16696
|
+
return __generator(this, function (_a) {
|
|
16697
|
+
return [2 /*return*/, renderForm({ id: this.id.toString(), published: published }).then(function (data) {
|
|
16698
|
+
trackEvent(published ? EEvents.FORM_RENDERED_PUBLISHED : EEvents.FORM_RENDERED, { id: _this.id });
|
|
16699
|
+
return data;
|
|
16700
|
+
})];
|
|
16701
|
+
});
|
|
16702
|
+
});
|
|
16703
|
+
};
|
|
16704
|
+
SummaryEnhancedFormModel.prototype.save = function () {
|
|
16705
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
16706
|
+
var _this = this;
|
|
16707
|
+
return __generator(this, function (_a) {
|
|
16708
|
+
return [2 /*return*/, patchForm({ id: this.id.toString(), data: this.toJson() }).then(function (data) {
|
|
16709
|
+
trackEvent(EEvents.FORM_UPDATED, { id: _this.id });
|
|
16710
|
+
return data;
|
|
16711
|
+
})];
|
|
16712
|
+
});
|
|
16713
|
+
});
|
|
16714
|
+
};
|
|
16715
|
+
SummaryEnhancedFormModel.prototype.toJson = function () {
|
|
16716
|
+
return modelToJson(this);
|
|
16717
|
+
};
|
|
16718
|
+
SummaryEnhancedFormModel.prototype.set = function (property, value) {
|
|
16719
|
+
modelSet(this, property, value);
|
|
16720
|
+
};
|
|
16721
|
+
return SummaryEnhancedFormModel;
|
|
16722
|
+
}(CommonFormModel));
|
|
16723
|
+
var EnhancedFormModel = /** @class */ (function (_super) {
|
|
16724
|
+
__extends(EnhancedFormModel, _super);
|
|
16725
|
+
function EnhancedFormModel(_a) {
|
|
16726
|
+
var _this = this;
|
|
16727
|
+
var content = _a.content, rest = __rest(_a, ["content"]);
|
|
16728
|
+
_this = _super.call(this, rest) || this;
|
|
16729
|
+
_this.content = content;
|
|
16730
|
+
return _this;
|
|
16731
|
+
}
|
|
16732
|
+
EnhancedFormModel.prototype.toJson = function () {
|
|
16733
|
+
return modelToJson(this);
|
|
16734
|
+
};
|
|
16735
|
+
return EnhancedFormModel;
|
|
16736
|
+
}(SummaryEnhancedFormModel));
|
|
16542
16737
|
|
|
16543
16738
|
var ListModel = /** @class */ (function () {
|
|
16544
16739
|
function ListModel(params) {
|
|
@@ -16737,6 +16932,9 @@ var FormsFactory = /** @class */ (function () {
|
|
|
16737
16932
|
var id = _b.id;
|
|
16738
16933
|
return __generator(this, function (_c) {
|
|
16739
16934
|
return [2 /*return*/, getForm({ id: id }).then(function (data) {
|
|
16935
|
+
if ("enabled" in data.data) {
|
|
16936
|
+
return new EnhancedFormModel(data.data);
|
|
16937
|
+
}
|
|
16740
16938
|
return new FormModel(data.data);
|
|
16741
16939
|
})];
|
|
16742
16940
|
});
|
|
@@ -16748,6 +16946,9 @@ var FormsFactory = /** @class */ (function () {
|
|
|
16748
16946
|
return __generator(this, function (_b) {
|
|
16749
16947
|
return [2 /*return*/, listForms(options).then(function (data) {
|
|
16750
16948
|
data.data = data.data.map(function (form) {
|
|
16949
|
+
if ("enabled" in form) {
|
|
16950
|
+
return new SummaryEnhancedFormModel(form);
|
|
16951
|
+
}
|
|
16751
16952
|
return new FormModel(form);
|
|
16752
16953
|
});
|
|
16753
16954
|
return data;
|
|
@@ -16755,6 +16956,19 @@ var FormsFactory = /** @class */ (function () {
|
|
|
16755
16956
|
});
|
|
16756
16957
|
});
|
|
16757
16958
|
};
|
|
16959
|
+
FormsFactory.create = function (_a) {
|
|
16960
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
16961
|
+
var form = _b.form;
|
|
16962
|
+
return __generator(this, function (_c) {
|
|
16963
|
+
return [2 /*return*/, createForm({ form: form }).then(function (data) {
|
|
16964
|
+
if ("enabled" in data.data) {
|
|
16965
|
+
return new EnhancedFormModel(data.data);
|
|
16966
|
+
}
|
|
16967
|
+
return new FormModel(data.data);
|
|
16968
|
+
})];
|
|
16969
|
+
});
|
|
16970
|
+
});
|
|
16971
|
+
};
|
|
16758
16972
|
return FormsFactory;
|
|
16759
16973
|
}());
|
|
16760
16974
|
|
|
@@ -17019,4 +17233,4 @@ var UsersFactory = /** @class */ (function () {
|
|
|
17019
17233
|
return UsersFactory;
|
|
17020
17234
|
}());
|
|
17021
17235
|
|
|
17022
|
-
export { AccountModel, AccountsFactory, ActionBarContainer, ActionBarContainerHandler, AssetManager, AutomationsFactory, Avatar, BillingFactory, BrandWrapper, BrandsFactory, Button, ButtonMenu, CampaignModel, CampaignsFactory, Checkbox, Chip, CircularProgress, CodeInput, ColManager, ColorTextField, ContactModel, ContactsFactory, ContentSectionContainer, CopyToClipboard, CountryDropdown, CustomerModel, DataTable, DataTableHead, DataTableRow, DateCalendar, DatePicker, DateTimeCalendar, DateTimePicker, Dialog, DialogActions, DialogHandler, DialogTitle, Divider, Drawer, DrawerHandler, DropMenu, Dropdown, EApiLanguages, ECampaignStatuses, EEMailSummaryStatuses, EEmailAttachementTypes, EEmailLogType, EEmailLogTypeParam, EEmailProviders, EEmailSummaryEngagement, EEvents, EMethods, EOperatorTypes, EPartialInfoPool, EStorageType, ElementContains, Email, EmailAPIFactory, EmptyContent, FileUpload, FilterBar, FormModel, FormsFactory, FullBar, GenericWrapper, GenericWrapperContext, GroupedActions, Header, Icon, IconPill, InformationGroup, InlineTextEdit, LinearProgress, ListCampaignModel, ListModel, ListTemplateModel, ListsFactory, LoadingContainer, LocationTextField, Logo, MD5, MetricCard, Modal, ModalHandler, ModalHeading, OverlayHandler, PhoneTextField, Search, SenderModel, SendersFactory, SideMenu, SideMenuContainer, SideMenuItem, SubNav, SupportFactory, SystemEmailsFactory, SystemEmailsModel, TemplateModel, TemplatesFactory, TextField, TimePicker, TimeSelector, Toggle, TopMenu, Typography, UserModel, UsersFactory, addPartialInformation, addToImpersonificationTree, amIImpersonating, amILoggedInService, archiveCampaign, areAllPropertiesEmpty, buildMUITheme, callApi, camelCase, camelToSnakeCase, cancelCampaign, capitalizeFirstLetter, cleanPostHogId, clearImpersonificationTree, clearStorage, connectToZendeskSupportService, createAccount, createBrand, createCampaign, createCampaignLogsExports, createCampaignsReportsExport, createTemplate, deepMergeObject, deleteCampaign, deleteCampaignsReportsExport, deletePartialInformation, deleteStorageItem, deleteTemplate, descendingComparator, downloadCampaignLogExport, downloadCampaignsReportsExport, emptyAccountAddress, emptyAccountLimits, enrichBrand, enrichOrganization, enrichProfile, eventCondition, eventIdentify, eventLogout, fetchRetry, fetchRoute, findNestedProperty, formatNumber, getAccount, getAccountReport, getAdjustedBillingCycle, getBestLocalMatch, getBrand, getBrandService, getBrandUrl, getCalendarFormat, getCampaign, getCampaignLinks, getCampaignLinksReport, getCampaignLogs, getCampaignLogsExports, getCampaignReport, getCampaignRevisions, getCampaignsReportsExport, getComparator, getCustomerProfile, getDate, getDomainFromEmail, getDomainsFromEmails, getDomainsService, getEmail, getEmailActivitySummary, getEmailReport, getEndOfDate, getForm, getHashQueryWithoutHistory, getIconSize, getList, getListLogs, getListReport, getNestedProperty, getPropertyValue, getSender, getStartOfDate, getStorage, getTColor, getTemplate, getUnixTime, getUrlQueryParam, getUser, getUtmCookies, googlePlacesMapper, hasDecimal, impersonateService, initFieldValidation, initPostHog, isColorLight, isDomainValidService, isSimpleType, isValidEmail, isValidString, isValidUrl, lisTEmailTags, listAccounts, listCampaigns, listCampaignsReportsExports, listContacts, listEmailLogs, listForms, listList, listSenders, listSystemEmails, listTemplates, listUsers, logOutService, loginService, miliToSecond, modelSet, modelToJson, originalBrand, popImpersonificationTree, postMessage, reScheduleCampaign, removeEmptyProperties, removeQueryParams, removeTrailingChar, renderCampaign, renderTemplate, requestSupportService, resumeCampaign, scheduleCampaign, searchCustomerProfiles, sendCampaignTest, setBrandHeadElements, setStorage, shareTemplate, splitArray, splitObject, stableSort, startPromisePool, suspendCampaign, trackEvent, truncateEmail, truncateText, uiKitConfig, unArchiveCampaign, unScheduleCampaign, unshareTemplate, updateAccount, updateAndClearUrlParams, updateCampaign, updateSystemEmails, updateTemplate, updateUser, validateColor, validateEmail, validateGenericInput, validateUrl, wait, whiteLabelBrand, whoAmi };
|
|
17236
|
+
export { AccountModel, AccountsFactory, ActionBarContainer, ActionBarContainerHandler, AssetManager, AutomationsFactory, Avatar, BillingFactory, BrandWrapper, BrandsFactory, Button, ButtonMenu, CampaignModel, CampaignsFactory, Checkbox, Chip, CircularProgress, CodeInput, ColManager, ColorTextField, CommonFormModel, ContactModel, ContactsFactory, ContentSectionContainer, CopyToClipboard, CountryDropdown, CustomerModel, DataTable, DataTableHead, DataTableRow, DateCalendar, DatePicker, DateTimeCalendar, DateTimePicker, Dialog, DialogActions, DialogHandler, DialogTitle, Divider, Drawer, DrawerHandler, DropMenu, Dropdown, EApiLanguages, ECampaignStatuses, EEMailSummaryStatuses, EEmailAttachementTypes, EEmailLogType, EEmailLogTypeParam, EEmailProviders, EEmailSummaryEngagement, EEvents, EMethods, EOperatorTypes, EPartialInfoPool, EStorageType, ElementContains, Email, EmailAPIFactory, EmptyContent, EnhancedFormModel, FileUpload, FilterBar, FormModel, FormsFactory, FullBar, GenericWrapper, GenericWrapperContext, GroupedActions, Header, Icon, IconPill, InformationGroup, InlineTextEdit, LinearProgress, ListCampaignModel, ListModel, ListTemplateModel, ListsFactory, LoadingContainer, LocationTextField, Logo, MD5, MetricCard, Modal, ModalHandler, ModalHeading, OverlayHandler, PhoneTextField, Search, SenderModel, SendersFactory, SideMenu, SideMenuContainer, SideMenuItem, SubNav, SummaryEnhancedFormModel, SupportFactory, SystemEmailsFactory, SystemEmailsModel, TemplateModel, TemplatesFactory, TextField, TimePicker, TimeSelector, Toggle, TopMenu, Typography, UserModel, UsersFactory, addPartialInformation, addToImpersonificationTree, amIImpersonating, amILoggedInService, archiveCampaign, areAllPropertiesEmpty, buildMUITheme, callApi, camelCase, camelToSnakeCase, cancelCampaign, capitalizeFirstLetter, cleanPostHogId, clearImpersonificationTree, clearStorage, connectToZendeskSupportService, createAccount, createBrand, createCampaign, createCampaignLogsExports, createCampaignsReportsExport, createForm, createTemplate, deepMergeObject, deleteCampaign, deleteCampaignsReportsExport, deleteForm, deletePartialInformation, deleteStorageItem, deleteTemplate, descendingComparator, disableForm, downloadCampaignLogExport, downloadCampaignsReportsExport, emptyAccountAddress, emptyAccountLimits, enableForm, enrichBrand, enrichOrganization, enrichProfile, eventCondition, eventIdentify, eventLogout, fetchRetry, fetchRoute, findNestedProperty, formatNumber, getAccount, getAccountReport, getAdjustedBillingCycle, getBestLocalMatch, getBrand, getBrandService, getBrandUrl, getCalendarFormat, getCampaign, getCampaignLinks, getCampaignLinksReport, getCampaignLogs, getCampaignLogsExports, getCampaignReport, getCampaignRevisions, getCampaignsReportsExport, getComparator, getCustomerProfile, getDate, getDomainFromEmail, getDomainsFromEmails, getDomainsService, getEmail, getEmailActivitySummary, getEmailReport, getEndOfDate, getForm, getHashQueryWithoutHistory, getIconSize, getList, getListLogs, getListReport, getNestedProperty, getPropertyValue, getSender, getStartOfDate, getStorage, getTColor, getTemplate, getUnixTime, getUrlQueryParam, getUser, getUtmCookies, googlePlacesMapper, hasDecimal, impersonateService, initFieldValidation, initPostHog, isColorLight, isDomainValidService, isSimpleType, isValidEmail, isValidString, isValidUrl, lisTEmailTags, listAccounts, listCampaigns, listCampaignsReportsExports, listContacts, listEmailLogs, listForms, listList, listSenders, listSystemEmails, listTemplates, listUsers, logOutService, loginService, miliToSecond, modelSet, modelToJson, originalBrand, patchForm, popImpersonificationTree, postMessage, publishForm, reScheduleCampaign, removeEmptyProperties, removeQueryParams, removeTrailingChar, renderCampaign, renderForm, renderTemplate, requestSupportService, resumeCampaign, scheduleCampaign, searchCustomerProfiles, sendCampaignTest, setBrandHeadElements, setStorage, shareTemplate, splitArray, splitObject, stableSort, startPromisePool, suspendCampaign, trackEvent, truncateEmail, truncateText, uiKitConfig, unArchiveCampaign, unScheduleCampaign, unshareTemplate, updateAccount, updateAndClearUrlParams, updateCampaign, updateSystemEmails, updateTemplate, updateUser, validateColor, validateEmail, validateGenericInput, validateUrl, wait, whiteLabelBrand, whoAmi };
|
|
@@ -1,8 +1,21 @@
|
|
|
1
|
-
import { EApiLanguages } from "../../types";
|
|
2
|
-
import { TFormModel } from "./types";
|
|
3
|
-
export declare class
|
|
4
|
-
readonly id:
|
|
1
|
+
import { EApiLanguages, TDeleteApiResource, TDisableApiResource, TEnableApiResource, TGenericReturn } from "../../types";
|
|
2
|
+
import { TEnhancedFormContent, TEnhancedFormEditedBy, TEnhancedFormModel, TEnhancedFormRecaptcha, TFormModel, TSummaryEnhancedFormModel } from "./types";
|
|
3
|
+
export declare class CommonFormModel {
|
|
4
|
+
readonly id: string;
|
|
5
5
|
name: string;
|
|
6
|
+
list_id: number;
|
|
7
|
+
double_opt_in: boolean;
|
|
8
|
+
constructor({ id, name, list_id, double_opt_in }: {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
list_id: number;
|
|
12
|
+
double_opt_in: boolean;
|
|
13
|
+
});
|
|
14
|
+
toJson(): any;
|
|
15
|
+
set<T extends keyof this>(property: T, value: this[T]): void;
|
|
16
|
+
delete(): Promise<TDeleteApiResource>;
|
|
17
|
+
}
|
|
18
|
+
export declare class FormModel extends CommonFormModel {
|
|
6
19
|
readonly status: string;
|
|
7
20
|
content: {
|
|
8
21
|
linked: string;
|
|
@@ -21,10 +34,37 @@ export declare class FormModel {
|
|
|
21
34
|
after_double_opt_in: string;
|
|
22
35
|
after_opt_out: string;
|
|
23
36
|
};
|
|
24
|
-
list_id: number;
|
|
25
|
-
double_opt_in: boolean;
|
|
26
37
|
constructor({ id, name, status, content, language, created_on, last_updated_on, url, thumbnail_url, redirections, list_id, double_opt_in, }: TFormModel);
|
|
27
38
|
toJson(): any;
|
|
28
39
|
set<T extends keyof this>(property: T, value: this[T]): void;
|
|
29
40
|
}
|
|
41
|
+
export declare class SummaryEnhancedFormModel extends CommonFormModel {
|
|
42
|
+
readonly enabled: boolean;
|
|
43
|
+
description: string;
|
|
44
|
+
tags: string[];
|
|
45
|
+
post_redirect_url: string;
|
|
46
|
+
double_opt_in_redirect_url: string;
|
|
47
|
+
submission_url: string;
|
|
48
|
+
async_processing: boolean;
|
|
49
|
+
branding: string;
|
|
50
|
+
readonly created_at: number;
|
|
51
|
+
readonly updated_at: number;
|
|
52
|
+
readonly published_at: number;
|
|
53
|
+
readonly edited_by: TEnhancedFormEditedBy;
|
|
54
|
+
readonly thumbnail_url: string;
|
|
55
|
+
recaptcha: TEnhancedFormRecaptcha;
|
|
56
|
+
constructor({ id, list_id, enabled, name, description, tags, post_redirect_url, double_opt_in, double_opt_in_redirect_url, submission_url, async_processing, branding, created_at, updated_at, published_at, edited_by, thumbnail_url, recaptcha, }: TSummaryEnhancedFormModel);
|
|
57
|
+
enable(): Promise<TEnableApiResource>;
|
|
58
|
+
disable(): Promise<TDisableApiResource>;
|
|
59
|
+
publish(): Promise<TGenericReturn<EnhancedFormModel>>;
|
|
60
|
+
render(published?: boolean): Promise<TGenericReturn<EnhancedFormModel>>;
|
|
61
|
+
save(): Promise<TGenericReturn<EnhancedFormModel>>;
|
|
62
|
+
toJson(): any;
|
|
63
|
+
set<T extends keyof this>(property: T, value: this[T]): void;
|
|
64
|
+
}
|
|
65
|
+
export declare class EnhancedFormModel extends SummaryEnhancedFormModel {
|
|
66
|
+
content: TEnhancedFormContent;
|
|
67
|
+
constructor({ content, ...rest }: TEnhancedFormModel);
|
|
68
|
+
toJson(): any;
|
|
69
|
+
}
|
|
30
70
|
export * from "./types";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EApiLanguages } from "../../types";
|
|
2
2
|
export type TFormModel = {
|
|
3
|
-
readonly id:
|
|
3
|
+
readonly id: string;
|
|
4
4
|
name: string;
|
|
5
5
|
readonly status: string;
|
|
6
6
|
content: {
|
|
@@ -23,3 +23,37 @@ export type TFormModel = {
|
|
|
23
23
|
list_id: number;
|
|
24
24
|
double_opt_in: boolean;
|
|
25
25
|
};
|
|
26
|
+
export type TEnhancedFormEditedBy = {
|
|
27
|
+
id: number;
|
|
28
|
+
email: string;
|
|
29
|
+
};
|
|
30
|
+
export type TEnhancedFormRecaptcha = {
|
|
31
|
+
secret: string;
|
|
32
|
+
domain: string;
|
|
33
|
+
};
|
|
34
|
+
export type TEnhancedFormContent = {
|
|
35
|
+
json: any;
|
|
36
|
+
};
|
|
37
|
+
export interface TSummaryEnhancedFormModel {
|
|
38
|
+
readonly id: string;
|
|
39
|
+
list_id: number;
|
|
40
|
+
readonly enabled: boolean;
|
|
41
|
+
name: string;
|
|
42
|
+
description: string;
|
|
43
|
+
tags: string[];
|
|
44
|
+
post_redirect_url: string;
|
|
45
|
+
double_opt_in: boolean;
|
|
46
|
+
double_opt_in_redirect_url: string;
|
|
47
|
+
submission_url: string;
|
|
48
|
+
async_processing: boolean;
|
|
49
|
+
branding: string;
|
|
50
|
+
readonly created_at: number;
|
|
51
|
+
readonly updated_at: number;
|
|
52
|
+
readonly published_at: number;
|
|
53
|
+
readonly edited_by: TEnhancedFormEditedBy;
|
|
54
|
+
readonly thumbnail_url: string;
|
|
55
|
+
recaptcha: TEnhancedFormRecaptcha;
|
|
56
|
+
}
|
|
57
|
+
export interface TEnhancedFormModel extends TSummaryEnhancedFormModel {
|
|
58
|
+
content: TEnhancedFormContent;
|
|
59
|
+
}
|
|
@@ -1,6 +1,30 @@
|
|
|
1
|
+
import { EnhancedFormModel, FormModel } from "../../models";
|
|
1
2
|
import { TGenericListParams } from "../../types";
|
|
3
|
+
export declare function createForm({ form }: {
|
|
4
|
+
form: Partial<FormModel | EnhancedFormModel>;
|
|
5
|
+
}): Promise<any>;
|
|
2
6
|
export declare function listForms({ useImpersonationTree, ...options }: TGenericListParams): Promise<any>;
|
|
7
|
+
export declare function patchForm({ id, data }: {
|
|
8
|
+
id: string;
|
|
9
|
+
data: Partial<FormModel | EnhancedFormModel>;
|
|
10
|
+
}): Promise<any>;
|
|
3
11
|
export declare function getForm({ id }: {
|
|
4
12
|
id: string;
|
|
5
13
|
}): Promise<any>;
|
|
14
|
+
export declare function deleteForm({ id }: {
|
|
15
|
+
id: string;
|
|
16
|
+
}): Promise<any>;
|
|
17
|
+
export declare function enableForm({ id }: {
|
|
18
|
+
id: string;
|
|
19
|
+
}): Promise<any>;
|
|
20
|
+
export declare function disableForm({ id }: {
|
|
21
|
+
id: string;
|
|
22
|
+
}): Promise<any>;
|
|
23
|
+
export declare function publishForm({ id }: {
|
|
24
|
+
id: string;
|
|
25
|
+
}): Promise<any>;
|
|
26
|
+
export declare function renderForm({ id, published }: {
|
|
27
|
+
id: string;
|
|
28
|
+
published: boolean;
|
|
29
|
+
}): Promise<any>;
|
|
6
30
|
export * from "./types";
|
|
@@ -90,6 +90,16 @@ export type TDeleteApiResource = {
|
|
|
90
90
|
object: string;
|
|
91
91
|
deleted: boolean;
|
|
92
92
|
};
|
|
93
|
+
export type TEnableApiResource = {
|
|
94
|
+
id: TNumStr;
|
|
95
|
+
object: string;
|
|
96
|
+
enabled: boolean;
|
|
97
|
+
};
|
|
98
|
+
export type TDisableApiResource = {
|
|
99
|
+
id: TNumStr;
|
|
100
|
+
object: string;
|
|
101
|
+
disabled: boolean;
|
|
102
|
+
};
|
|
93
103
|
export type TUpdateApiResource<T> = {
|
|
94
104
|
updated: boolean;
|
|
95
105
|
object: string;
|
|
@@ -88,6 +88,11 @@ export declare enum EEvents {
|
|
|
88
88
|
FORM_CREATED = "Form.Created",
|
|
89
89
|
FORM_UPDATED = "Form.Updated",
|
|
90
90
|
FORM_DELETED = "Form.Deleted",
|
|
91
|
+
FORM_ENABLED = "Form.Enabled",
|
|
92
|
+
FORM_DISABLED = "Form.Disabled",
|
|
93
|
+
FORM_PUBLISHED = "Form.Published",
|
|
94
|
+
FORM_RENDERED = "Form.Rendered",
|
|
95
|
+
FORM_RENDERED_PUBLISHED = "Form.Rendered.Published",
|
|
91
96
|
AUTOMATION_CREATED = "Automation.Created",
|
|
92
97
|
AUTOMATION_UPDATED = "Automation.Updated",
|
|
93
98
|
AUTOMATION_DELETED = "Automation.Deleted",
|