@proveanything/smartlinks 1.0.18 → 1.0.19
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/api/form.js +5 -5
- package/package.json +1 -1
- package/src/api/form.ts +5 -5
package/dist/api/form.js
CHANGED
|
@@ -9,7 +9,7 @@ export var form;
|
|
|
9
9
|
*/
|
|
10
10
|
async function get(collectionId, formId, admin) {
|
|
11
11
|
const base = admin ? '/admin' : '/public';
|
|
12
|
-
const path = `${base}/${encodeURIComponent(collectionId)}/form/${encodeURIComponent(formId)}`;
|
|
12
|
+
const path = `${base}/collection/${encodeURIComponent(collectionId)}/form/${encodeURIComponent(formId)}`;
|
|
13
13
|
return request(path);
|
|
14
14
|
}
|
|
15
15
|
form.get = get;
|
|
@@ -20,7 +20,7 @@ export var form;
|
|
|
20
20
|
*/
|
|
21
21
|
async function list(collectionId, admin) {
|
|
22
22
|
const base = admin ? '/admin' : '/public';
|
|
23
|
-
const path = `${base}/${encodeURIComponent(collectionId)}/form`;
|
|
23
|
+
const path = `${base}/collection/${encodeURIComponent(collectionId)}/form`;
|
|
24
24
|
return request(path);
|
|
25
25
|
}
|
|
26
26
|
form.list = list;
|
|
@@ -30,7 +30,7 @@ export var form;
|
|
|
30
30
|
* @param data – The form data
|
|
31
31
|
*/
|
|
32
32
|
async function create(collectionId, data) {
|
|
33
|
-
const path = `/admin/${encodeURIComponent(collectionId)}/form`;
|
|
33
|
+
const path = `/admin/collection/${encodeURIComponent(collectionId)}/form`;
|
|
34
34
|
return post(path, data);
|
|
35
35
|
}
|
|
36
36
|
form.create = create;
|
|
@@ -41,7 +41,7 @@ export var form;
|
|
|
41
41
|
* @param data – The form data
|
|
42
42
|
*/
|
|
43
43
|
async function update(collectionId, formId, data) {
|
|
44
|
-
const path = `/admin/${encodeURIComponent(collectionId)}/form/${encodeURIComponent(formId)}`;
|
|
44
|
+
const path = `/admin/collection/${encodeURIComponent(collectionId)}/form/${encodeURIComponent(formId)}`;
|
|
45
45
|
return put(path, data);
|
|
46
46
|
}
|
|
47
47
|
form.update = update;
|
|
@@ -51,7 +51,7 @@ export var form;
|
|
|
51
51
|
* @param formId – The form identifier
|
|
52
52
|
*/
|
|
53
53
|
async function remove(collectionId, formId) {
|
|
54
|
-
const path = `/admin/${encodeURIComponent(collectionId)}/form/${encodeURIComponent(formId)}`;
|
|
54
|
+
const path = `/admin/collection/${encodeURIComponent(collectionId)}/form/${encodeURIComponent(formId)}`;
|
|
55
55
|
return del(path);
|
|
56
56
|
}
|
|
57
57
|
form.remove = remove;
|
package/package.json
CHANGED
package/src/api/form.ts
CHANGED
|
@@ -9,7 +9,7 @@ export namespace form {
|
|
|
9
9
|
*/
|
|
10
10
|
export async function get(collectionId: string, formId: string, admin?: boolean): Promise<any> {
|
|
11
11
|
const base = admin ? '/admin' : '/public';
|
|
12
|
-
const path = `${base}/${encodeURIComponent(collectionId)}/form/${encodeURIComponent(formId)}`;
|
|
12
|
+
const path = `${base}/collection/${encodeURIComponent(collectionId)}/form/${encodeURIComponent(formId)}`;
|
|
13
13
|
return request<any>(path);
|
|
14
14
|
}
|
|
15
15
|
|
|
@@ -20,7 +20,7 @@ export namespace form {
|
|
|
20
20
|
*/
|
|
21
21
|
export async function list(collectionId: string, admin?: boolean): Promise<any[]> {
|
|
22
22
|
const base = admin ? '/admin' : '/public';
|
|
23
|
-
const path = `${base}/${encodeURIComponent(collectionId)}/form`;
|
|
23
|
+
const path = `${base}/collection/${encodeURIComponent(collectionId)}/form`;
|
|
24
24
|
return request<any[]>(path);
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -30,7 +30,7 @@ export namespace form {
|
|
|
30
30
|
* @param data – The form data
|
|
31
31
|
*/
|
|
32
32
|
export async function create(collectionId: string, data: any): Promise<any> {
|
|
33
|
-
const path = `/admin/${encodeURIComponent(collectionId)}/form`;
|
|
33
|
+
const path = `/admin/collection/${encodeURIComponent(collectionId)}/form`;
|
|
34
34
|
return post<any>(path, data);
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -41,7 +41,7 @@ export namespace form {
|
|
|
41
41
|
* @param data – The form data
|
|
42
42
|
*/
|
|
43
43
|
export async function update(collectionId: string, formId: string, data: any): Promise<any> {
|
|
44
|
-
const path = `/admin/${encodeURIComponent(collectionId)}/form/${encodeURIComponent(formId)}`;
|
|
44
|
+
const path = `/admin/collection/${encodeURIComponent(collectionId)}/form/${encodeURIComponent(formId)}`;
|
|
45
45
|
return put<any>(path, data);
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -51,7 +51,7 @@ export namespace form {
|
|
|
51
51
|
* @param formId – The form identifier
|
|
52
52
|
*/
|
|
53
53
|
export async function remove(collectionId: string, formId: string): Promise<void> {
|
|
54
|
-
const path = `/admin/${encodeURIComponent(collectionId)}/form/${encodeURIComponent(formId)}`;
|
|
54
|
+
const path = `/admin/collection/${encodeURIComponent(collectionId)}/form/${encodeURIComponent(formId)}`;
|
|
55
55
|
return del<void>(path);
|
|
56
56
|
}
|
|
57
57
|
}
|