@cakemail-org/ui-components-v2 2.1.16 → 2.1.17
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.
|
@@ -5,9 +5,10 @@ export declare class FormsFactory {
|
|
|
5
5
|
id: string;
|
|
6
6
|
}): Promise<FormModel | EnhancedFormModel>;
|
|
7
7
|
static list({ ...options }: TGenericListParams): Promise<TGenericListReturn<FormModel | SummaryEnhancedFormModel>>;
|
|
8
|
-
static create({ form }: {
|
|
8
|
+
static create({ form, type }: {
|
|
9
9
|
form: Partial<TEnhancedFormModel>;
|
|
10
|
-
|
|
10
|
+
type: "enhanced" | "basic";
|
|
11
|
+
}): Promise<EnhancedFormModel | FormModel>;
|
|
11
12
|
static renderPublic({ token }: {
|
|
12
13
|
token: string;
|
|
13
14
|
}): Promise<string>;
|
package/dist/cjs/index.js
CHANGED
|
@@ -10169,11 +10169,11 @@ function getEmail(_a) {
|
|
|
10169
10169
|
}
|
|
10170
10170
|
|
|
10171
10171
|
function createForm(_a) {
|
|
10172
|
-
var form = _a.form;
|
|
10172
|
+
var form = _a.form, type = _a.type;
|
|
10173
10173
|
return callApi({
|
|
10174
10174
|
url: uiKitConfig.GATEWAY_PROXY + "/forms",
|
|
10175
10175
|
fetchOptions: {
|
|
10176
|
-
body: __assign(__assign({}, form), { type:
|
|
10176
|
+
body: __assign(__assign({}, form), { type: type }),
|
|
10177
10177
|
method: exports.EMethods.post
|
|
10178
10178
|
}
|
|
10179
10179
|
});
|
|
@@ -17554,10 +17554,13 @@ var FormsFactory = /** @class */ (function () {
|
|
|
17554
17554
|
};
|
|
17555
17555
|
FormsFactory.create = function (_a) {
|
|
17556
17556
|
return __awaiter(this, arguments, void 0, function (_b) {
|
|
17557
|
-
var form = _b.form;
|
|
17557
|
+
var form = _b.form, type = _b.type;
|
|
17558
17558
|
return __generator(this, function (_c) {
|
|
17559
|
-
return [2 /*return*/, createForm({ form: form }).then(function (data) {
|
|
17560
|
-
|
|
17559
|
+
return [2 /*return*/, createForm({ form: form, type: type }).then(function (data) {
|
|
17560
|
+
if ("enabled" in data.data) {
|
|
17561
|
+
return new EnhancedFormModel(data.data);
|
|
17562
|
+
}
|
|
17563
|
+
return new FormModel(data.data);
|
|
17561
17564
|
})];
|
|
17562
17565
|
});
|
|
17563
17566
|
});
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { EnhancedFormModel, FormModel } from "../../models";
|
|
2
2
|
import { TGenericListParams } from "../../types";
|
|
3
|
-
export declare function createForm({ form }: {
|
|
4
|
-
form: Partial<EnhancedFormModel>;
|
|
3
|
+
export declare function createForm({ form, type }: {
|
|
4
|
+
form: Partial<EnhancedFormModel | FormModel>;
|
|
5
|
+
type: "enhanced" | "basic";
|
|
5
6
|
}): Promise<any>;
|
|
6
7
|
export declare function listForms({ useImpersonationTree, ...options }: TGenericListParams): Promise<any>;
|
|
7
8
|
export declare function patchForm({ id, data }: {
|
|
@@ -5,9 +5,10 @@ export declare class FormsFactory {
|
|
|
5
5
|
id: string;
|
|
6
6
|
}): Promise<FormModel | EnhancedFormModel>;
|
|
7
7
|
static list({ ...options }: TGenericListParams): Promise<TGenericListReturn<FormModel | SummaryEnhancedFormModel>>;
|
|
8
|
-
static create({ form }: {
|
|
8
|
+
static create({ form, type }: {
|
|
9
9
|
form: Partial<TEnhancedFormModel>;
|
|
10
|
-
|
|
10
|
+
type: "enhanced" | "basic";
|
|
11
|
+
}): Promise<EnhancedFormModel | FormModel>;
|
|
11
12
|
static renderPublic({ token }: {
|
|
12
13
|
token: string;
|
|
13
14
|
}): Promise<string>;
|
package/dist/esm/index.js
CHANGED
|
@@ -10149,11 +10149,11 @@ function getEmail(_a) {
|
|
|
10149
10149
|
}
|
|
10150
10150
|
|
|
10151
10151
|
function createForm(_a) {
|
|
10152
|
-
var form = _a.form;
|
|
10152
|
+
var form = _a.form, type = _a.type;
|
|
10153
10153
|
return callApi({
|
|
10154
10154
|
url: uiKitConfig.GATEWAY_PROXY + "/forms",
|
|
10155
10155
|
fetchOptions: {
|
|
10156
|
-
body: __assign(__assign({}, form), { type:
|
|
10156
|
+
body: __assign(__assign({}, form), { type: type }),
|
|
10157
10157
|
method: EMethods.post
|
|
10158
10158
|
}
|
|
10159
10159
|
});
|
|
@@ -17534,10 +17534,13 @@ var FormsFactory = /** @class */ (function () {
|
|
|
17534
17534
|
};
|
|
17535
17535
|
FormsFactory.create = function (_a) {
|
|
17536
17536
|
return __awaiter(this, arguments, void 0, function (_b) {
|
|
17537
|
-
var form = _b.form;
|
|
17537
|
+
var form = _b.form, type = _b.type;
|
|
17538
17538
|
return __generator(this, function (_c) {
|
|
17539
|
-
return [2 /*return*/, createForm({ form: form }).then(function (data) {
|
|
17540
|
-
|
|
17539
|
+
return [2 /*return*/, createForm({ form: form, type: type }).then(function (data) {
|
|
17540
|
+
if ("enabled" in data.data) {
|
|
17541
|
+
return new EnhancedFormModel(data.data);
|
|
17542
|
+
}
|
|
17543
|
+
return new FormModel(data.data);
|
|
17541
17544
|
})];
|
|
17542
17545
|
});
|
|
17543
17546
|
});
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { EnhancedFormModel, FormModel } from "../../models";
|
|
2
2
|
import { TGenericListParams } from "../../types";
|
|
3
|
-
export declare function createForm({ form }: {
|
|
4
|
-
form: Partial<EnhancedFormModel>;
|
|
3
|
+
export declare function createForm({ form, type }: {
|
|
4
|
+
form: Partial<EnhancedFormModel | FormModel>;
|
|
5
|
+
type: "enhanced" | "basic";
|
|
5
6
|
}): Promise<any>;
|
|
6
7
|
export declare function listForms({ useImpersonationTree, ...options }: TGenericListParams): Promise<any>;
|
|
7
8
|
export declare function patchForm({ id, data }: {
|