@acmekit/js-sdk 2.13.32 → 2.13.33
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/admin/api-key.d.ts +164 -0
- package/dist/admin/api-key.d.ts.map +1 -0
- package/dist/admin/api-key.js +202 -0
- package/dist/admin/api-key.js.map +1 -0
- package/dist/admin/index.d.ts +57 -0
- package/dist/admin/index.d.ts.map +1 -0
- package/dist/admin/index.js +29 -0
- package/dist/admin/index.js.map +1 -0
- package/dist/admin/invite.d.ts +182 -0
- package/dist/admin/invite.d.ts.map +1 -0
- package/dist/admin/invite.js +211 -0
- package/dist/admin/invite.js.map +1 -0
- package/dist/admin/locale.d.ts +95 -0
- package/dist/admin/locale.d.ts.map +1 -0
- package/dist/admin/locale.js +104 -0
- package/dist/admin/locale.js.map +1 -0
- package/dist/admin/notification.d.ts +96 -0
- package/dist/admin/notification.d.ts.map +1 -0
- package/dist/admin/notification.js +107 -0
- package/dist/admin/notification.js.map +1 -0
- package/dist/admin/plugin.d.ts +27 -0
- package/dist/admin/plugin.d.ts.map +1 -0
- package/dist/admin/plugin.js +31 -0
- package/dist/admin/plugin.js.map +1 -0
- package/dist/admin/translation.d.ts +253 -0
- package/dist/admin/translation.d.ts.map +1 -0
- package/dist/admin/translation.js +284 -0
- package/dist/admin/translation.js.map +1 -0
- package/dist/admin/upload.d.ts +97 -0
- package/dist/admin/upload.d.ts.map +1 -0
- package/dist/admin/upload.js +139 -0
- package/dist/admin/upload.js.map +1 -0
- package/dist/admin/user.d.ts +166 -0
- package/dist/admin/user.d.ts.map +1 -0
- package/dist/admin/user.js +192 -0
- package/dist/admin/user.js.map +1 -0
- package/dist/admin/views.d.ts +54 -0
- package/dist/admin/views.d.ts.map +1 -0
- package/dist/admin/views.js +96 -0
- package/dist/admin/views.js.map +1 -0
- package/dist/admin/workflow-execution.d.ts +78 -0
- package/dist/admin/workflow-execution.d.ts.map +1 -0
- package/dist/admin/workflow-execution.js +86 -0
- package/dist/admin/workflow-execution.js.map +1 -0
- package/dist/auth/index.d.ts +264 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +318 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/client.d.ts +65 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +315 -0
- package/dist/client.js.map +1 -0
- package/dist/esm/admin/api-key.d.ts +164 -0
- package/dist/esm/admin/api-key.d.ts.map +1 -0
- package/dist/esm/admin/api-key.js +221 -0
- package/dist/esm/admin/api-key.js.map +1 -0
- package/dist/esm/admin/index.d.ts +57 -0
- package/dist/esm/admin/index.d.ts.map +1 -0
- package/dist/esm/admin/index.js +25 -0
- package/dist/esm/admin/index.js.map +1 -0
- package/dist/esm/admin/invite.d.ts +182 -0
- package/dist/esm/admin/invite.d.ts.map +1 -0
- package/dist/esm/admin/invite.js +239 -0
- package/dist/esm/admin/invite.js.map +1 -0
- package/dist/esm/admin/locale.d.ts +95 -0
- package/dist/esm/admin/locale.d.ts.map +1 -0
- package/dist/esm/admin/locale.js +113 -0
- package/dist/esm/admin/locale.js.map +1 -0
- package/dist/esm/admin/notification.d.ts +96 -0
- package/dist/esm/admin/notification.d.ts.map +1 -0
- package/dist/esm/admin/notification.js +116 -0
- package/dist/esm/admin/notification.js.map +1 -0
- package/dist/esm/admin/plugin.d.ts +27 -0
- package/dist/esm/admin/plugin.d.ts.map +1 -0
- package/dist/esm/admin/plugin.js +38 -0
- package/dist/esm/admin/plugin.js.map +1 -0
- package/dist/esm/admin/translation.d.ts +253 -0
- package/dist/esm/admin/translation.d.ts.map +1 -0
- package/dist/esm/admin/translation.js +301 -0
- package/dist/esm/admin/translation.js.map +1 -0
- package/dist/esm/admin/upload.d.ts +97 -0
- package/dist/esm/admin/upload.d.ts.map +1 -0
- package/dist/esm/admin/upload.js +150 -0
- package/dist/esm/admin/upload.js.map +1 -0
- package/dist/esm/admin/user.d.ts +166 -0
- package/dist/esm/admin/user.d.ts.map +1 -0
- package/dist/esm/admin/user.js +207 -0
- package/dist/esm/admin/user.js.map +1 -0
- package/dist/esm/admin/views.d.ts +54 -0
- package/dist/esm/admin/views.d.ts.map +1 -0
- package/dist/esm/admin/views.js +117 -0
- package/dist/esm/admin/views.js.map +1 -0
- package/dist/esm/admin/workflow-execution.d.ts +78 -0
- package/dist/esm/admin/workflow-execution.d.ts.map +1 -0
- package/dist/esm/admin/workflow-execution.js +95 -0
- package/dist/esm/admin/workflow-execution.js.map +1 -0
- package/dist/esm/auth/index.d.ts +264 -0
- package/dist/esm/auth/index.d.ts.map +1 -0
- package/dist/esm/auth/index.js +325 -0
- package/dist/esm/auth/index.js.map +1 -0
- package/dist/esm/client.d.ts +65 -0
- package/dist/esm/client.d.ts.map +1 -0
- package/dist/esm/client.js +317 -0
- package/dist/esm/client.js.map +1 -0
- package/dist/esm/index.d.ts +18 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +21 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/types.d.ts +60 -0
- package/dist/esm/types.d.ts.map +1 -0
- package/dist/esm/types.js +2 -0
- package/dist/esm/types.js.map +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +60 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { HttpTypes, SelectParams } from "@acmekit/types";
|
|
2
|
+
import { Client } from "../client";
|
|
3
|
+
import { ClientHeaders } from "../types";
|
|
4
|
+
export declare class Upload {
|
|
5
|
+
/**
|
|
6
|
+
* @ignore
|
|
7
|
+
*/
|
|
8
|
+
private client;
|
|
9
|
+
/**
|
|
10
|
+
* @ignore
|
|
11
|
+
*/
|
|
12
|
+
constructor(client: Client);
|
|
13
|
+
/**
|
|
14
|
+
* This method creates a new upload. It sends a request to the
|
|
15
|
+
* [Upload Files](https://docs.acmekit.com/api/admin#uploads_postuploads)
|
|
16
|
+
* API route.
|
|
17
|
+
*
|
|
18
|
+
* @param body - The details of the files to upload.
|
|
19
|
+
* @param query - Configure the fields and relations to retrieve in the uploaded files.
|
|
20
|
+
* @param headers - Headers to pass in the request.
|
|
21
|
+
* @returns The upload files' details.
|
|
22
|
+
*
|
|
23
|
+
* @privateRemarks
|
|
24
|
+
*
|
|
25
|
+
* Note: The creation/upload flow be made more advanced, with support for streaming and progress, but for now we keep it simple
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* sdk.admin.upload.create(
|
|
29
|
+
* {
|
|
30
|
+
* files: [
|
|
31
|
+
* // file uploaded as a binary string
|
|
32
|
+
* {
|
|
33
|
+
* name: "test.txt",
|
|
34
|
+
* content: "test", // Should be the binary string of the file
|
|
35
|
+
* },
|
|
36
|
+
* // file uploaded as a File object
|
|
37
|
+
* new File(["test"], "test.txt", { type: "text/plain" })
|
|
38
|
+
* ],
|
|
39
|
+
* }
|
|
40
|
+
* )
|
|
41
|
+
* .then(({ files }) => {
|
|
42
|
+
* console.log(files)
|
|
43
|
+
* })
|
|
44
|
+
*/
|
|
45
|
+
create(body: HttpTypes.AdminUploadFile, query?: SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminFileListResponse>;
|
|
46
|
+
/**
|
|
47
|
+
* This method retrieves a file's details by its ID. It sends a request to the
|
|
48
|
+
* [Get File](https://docs.acmekit.com/api/admin#uploads_getuploadsid)
|
|
49
|
+
* API route.
|
|
50
|
+
*
|
|
51
|
+
* @param id - The ID of the file to retrieve.
|
|
52
|
+
* @param query - Query parameters to pass in the request.
|
|
53
|
+
* @param headers - Headers to pass in the request.
|
|
54
|
+
* @returns The file's details.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* sdk.admin.upload.retrieve("test.txt")
|
|
58
|
+
* .then(({ file }) => {
|
|
59
|
+
* console.log(file)
|
|
60
|
+
* })
|
|
61
|
+
*/
|
|
62
|
+
retrieve(id: string, query?: SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminFileResponse>;
|
|
63
|
+
/**
|
|
64
|
+
* This method deletes a file by its ID from the configured File Module Provider. It sends a request to the
|
|
65
|
+
* [Delete File](https://docs.acmekit.com/api/admin#uploads_deleteuploadsid)
|
|
66
|
+
* API route.
|
|
67
|
+
*
|
|
68
|
+
* @param id - The ID of the file to delete.
|
|
69
|
+
* @param headers - Headers to pass in the request.
|
|
70
|
+
* @returns The deletion's details.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* sdk.admin.upload.delete("test.txt")
|
|
74
|
+
* .then(({ deleted }) => {
|
|
75
|
+
* console.log(deleted)
|
|
76
|
+
* })
|
|
77
|
+
*/
|
|
78
|
+
delete(id: string, headers?: ClientHeaders): Promise<HttpTypes.AdminFileDeleteResponse>;
|
|
79
|
+
/**
|
|
80
|
+
* This method creates a presigned URL for a file upload. It sends a request to the
|
|
81
|
+
* `/admin/uploads/presigned-urls` API route.
|
|
82
|
+
*
|
|
83
|
+
* @param body - The details of the file to upload.
|
|
84
|
+
* @param query - Query parameters to pass in the request.
|
|
85
|
+
* @param headers - Headers to pass in the request.
|
|
86
|
+
* @returns The presigned URL for the file upload.
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* sdk.admin.upload.presignedUrl({
|
|
90
|
+
* name: "test.txt",
|
|
91
|
+
* size: 1000,
|
|
92
|
+
* type: "text/plain",
|
|
93
|
+
* }))
|
|
94
|
+
*/
|
|
95
|
+
presignedUrl(body: HttpTypes.AdminUploadPreSignedUrlRequest, query?: SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminUploadPreSignedUrlResponse>;
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=upload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../../src/admin/upload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,qBAAa,MAAM;IACjB;;OAEG;IACH,OAAO,CAAC,MAAM,CAAQ;IACtB;;OAEG;gBACS,MAAM,EAAE,MAAM;IAI1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACG,MAAM,CACV,IAAI,EAAE,SAAS,CAAC,eAAe,EAC/B,KAAK,CAAC,EAAE,YAAY,EACpB,OAAO,CAAC,EAAE,aAAa;IAoCzB;;;;;;;;;;;;;;;OAeG;IACG,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,aAAa;IAUxE;;;;;;;;;;;;;;OAcG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa;IAUhD;;;;;;;;;;;;;;;OAeG;IACG,YAAY,CAChB,IAAI,EAAE,SAAS,CAAC,8BAA8B,EAC9C,KAAK,CAAC,EAAE,YAAY,EACpB,OAAO,CAAC,EAAE,aAAa;CAY1B"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
export class Upload {
|
|
11
|
+
/**
|
|
12
|
+
* @ignore
|
|
13
|
+
*/
|
|
14
|
+
constructor(client) {
|
|
15
|
+
this.client = client;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* This method creates a new upload. It sends a request to the
|
|
19
|
+
* [Upload Files](https://docs.acmekit.com/api/admin#uploads_postuploads)
|
|
20
|
+
* API route.
|
|
21
|
+
*
|
|
22
|
+
* @param body - The details of the files to upload.
|
|
23
|
+
* @param query - Configure the fields and relations to retrieve in the uploaded files.
|
|
24
|
+
* @param headers - Headers to pass in the request.
|
|
25
|
+
* @returns The upload files' details.
|
|
26
|
+
*
|
|
27
|
+
* @privateRemarks
|
|
28
|
+
*
|
|
29
|
+
* Note: The creation/upload flow be made more advanced, with support for streaming and progress, but for now we keep it simple
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* sdk.admin.upload.create(
|
|
33
|
+
* {
|
|
34
|
+
* files: [
|
|
35
|
+
* // file uploaded as a binary string
|
|
36
|
+
* {
|
|
37
|
+
* name: "test.txt",
|
|
38
|
+
* content: "test", // Should be the binary string of the file
|
|
39
|
+
* },
|
|
40
|
+
* // file uploaded as a File object
|
|
41
|
+
* new File(["test"], "test.txt", { type: "text/plain" })
|
|
42
|
+
* ],
|
|
43
|
+
* }
|
|
44
|
+
* )
|
|
45
|
+
* .then(({ files }) => {
|
|
46
|
+
* console.log(files)
|
|
47
|
+
* })
|
|
48
|
+
*/
|
|
49
|
+
create(body, query, headers) {
|
|
50
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
+
const form = new FormData();
|
|
52
|
+
if (body instanceof FileList) {
|
|
53
|
+
Array.from(body).forEach((file) => {
|
|
54
|
+
form.append("files", file);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
body.files.forEach((file) => {
|
|
59
|
+
form.append("files", "content" in file
|
|
60
|
+
? new Blob([file.content], {
|
|
61
|
+
type: "text/plain",
|
|
62
|
+
})
|
|
63
|
+
: file, file.name);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
return this.client.fetch(`/admin/uploads`, {
|
|
67
|
+
method: "POST",
|
|
68
|
+
headers: Object.assign(Object.assign({}, headers), {
|
|
69
|
+
// Let the browser determine the content type.
|
|
70
|
+
"content-type": null }),
|
|
71
|
+
body: form,
|
|
72
|
+
query,
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* This method retrieves a file's details by its ID. It sends a request to the
|
|
78
|
+
* [Get File](https://docs.acmekit.com/api/admin#uploads_getuploadsid)
|
|
79
|
+
* API route.
|
|
80
|
+
*
|
|
81
|
+
* @param id - The ID of the file to retrieve.
|
|
82
|
+
* @param query - Query parameters to pass in the request.
|
|
83
|
+
* @param headers - Headers to pass in the request.
|
|
84
|
+
* @returns The file's details.
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* sdk.admin.upload.retrieve("test.txt")
|
|
88
|
+
* .then(({ file }) => {
|
|
89
|
+
* console.log(file)
|
|
90
|
+
* })
|
|
91
|
+
*/
|
|
92
|
+
retrieve(id, query, headers) {
|
|
93
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
94
|
+
return this.client.fetch(`/admin/uploads/${id}`, {
|
|
95
|
+
query,
|
|
96
|
+
headers,
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* This method deletes a file by its ID from the configured File Module Provider. It sends a request to the
|
|
102
|
+
* [Delete File](https://docs.acmekit.com/api/admin#uploads_deleteuploadsid)
|
|
103
|
+
* API route.
|
|
104
|
+
*
|
|
105
|
+
* @param id - The ID of the file to delete.
|
|
106
|
+
* @param headers - Headers to pass in the request.
|
|
107
|
+
* @returns The deletion's details.
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* sdk.admin.upload.delete("test.txt")
|
|
111
|
+
* .then(({ deleted }) => {
|
|
112
|
+
* console.log(deleted)
|
|
113
|
+
* })
|
|
114
|
+
*/
|
|
115
|
+
delete(id, headers) {
|
|
116
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
117
|
+
return this.client.fetch(`/admin/uploads/${id}`, {
|
|
118
|
+
method: "DELETE",
|
|
119
|
+
headers,
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* This method creates a presigned URL for a file upload. It sends a request to the
|
|
125
|
+
* `/admin/uploads/presigned-urls` API route.
|
|
126
|
+
*
|
|
127
|
+
* @param body - The details of the file to upload.
|
|
128
|
+
* @param query - Query parameters to pass in the request.
|
|
129
|
+
* @param headers - Headers to pass in the request.
|
|
130
|
+
* @returns The presigned URL for the file upload.
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* sdk.admin.upload.presignedUrl({
|
|
134
|
+
* name: "test.txt",
|
|
135
|
+
* size: 1000,
|
|
136
|
+
* type: "text/plain",
|
|
137
|
+
* }))
|
|
138
|
+
*/
|
|
139
|
+
presignedUrl(body, query, headers) {
|
|
140
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
141
|
+
return this.client.fetch(`/admin/uploads/presigned-urls`, {
|
|
142
|
+
method: "POST",
|
|
143
|
+
headers,
|
|
144
|
+
body,
|
|
145
|
+
query,
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=upload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload.js","sourceRoot":"","sources":["../../../src/admin/upload.ts"],"names":[],"mappings":";;;;;;;;;AAIA,MAAM,OAAO,MAAM;IAKjB;;OAEG;IACH,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACG,MAAM,CACV,IAA+B,EAC/B,KAAoB,EACpB,OAAuB;;YAEvB,MAAM,IAAI,GAAG,IAAI,QAAQ,EAAE,CAAA;YAC3B,IAAI,IAAI,YAAY,QAAQ,EAAE,CAAC;gBAC7B,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;oBAChC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;gBAC5B,CAAC,CAAC,CAAA;YACJ,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;oBAC1B,IAAI,CAAC,MAAM,CACT,OAAO,EACP,SAAS,IAAI,IAAI;wBACf,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE;4BACvB,IAAI,EAAE,YAAY;yBACnB,CAAC;wBACJ,CAAC,CAAC,IAAI,EACR,IAAI,CAAC,IAAI,CACV,CAAA;gBACH,CAAC,CAAC,CAAA;YACJ,CAAC;YAED,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CACtB,gBAAgB,EAChB;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO,kCACF,OAAO;oBACV,8CAA8C;oBAC9C,cAAc,EAAE,IAAI,GACrB;gBACD,IAAI,EAAE,IAAI;gBACV,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;IAED;;;;;;;;;;;;;;;OAeG;IACG,QAAQ,CAAC,EAAU,EAAE,KAAoB,EAAE,OAAuB;;YACtE,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CACtB,kBAAkB,EAAE,EAAE,EACtB;gBACE,KAAK;gBACL,OAAO;aACR,CACF,CAAA;QACH,CAAC;KAAA;IAED;;;;;;;;;;;;;;OAcG;IACG,MAAM,CAAC,EAAU,EAAE,OAAuB;;YAC9C,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CACtB,kBAAkB,EAAE,EAAE,EACtB;gBACE,MAAM,EAAE,QAAQ;gBAChB,OAAO;aACR,CACF,CAAA;QACH,CAAC;KAAA;IAED;;;;;;;;;;;;;;;OAeG;IACG,YAAY,CAChB,IAA8C,EAC9C,KAAoB,EACpB,OAAuB;;YAEvB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CACtB,+BAA+B,EAC/B;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,IAAI;gBACJ,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;CACF"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { HttpTypes } from "@acmekit/types";
|
|
2
|
+
import { Client } from "../client";
|
|
3
|
+
import { ClientHeaders } from "../types";
|
|
4
|
+
export declare class User {
|
|
5
|
+
/**
|
|
6
|
+
* @ignore
|
|
7
|
+
*/
|
|
8
|
+
private client;
|
|
9
|
+
/**
|
|
10
|
+
* @ignore
|
|
11
|
+
*/
|
|
12
|
+
constructor(client: Client);
|
|
13
|
+
/**
|
|
14
|
+
* This method updates a user. It sends a request to the
|
|
15
|
+
* [Update User](https://docs.acmekit.com/api/admin#users_postusersid)
|
|
16
|
+
* API route.
|
|
17
|
+
*
|
|
18
|
+
* @param id - The ID of the user to update.
|
|
19
|
+
* @param body - The details of the user to update.
|
|
20
|
+
* @param query - Configure the fields and relations to retrieve in the tax region.
|
|
21
|
+
* @param headers - Headers to pass in the request.
|
|
22
|
+
* @returns The user's details.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* sdk.admin.user.update("user_123", {
|
|
26
|
+
* first_name: "John",
|
|
27
|
+
* last_name: "Doe",
|
|
28
|
+
* })
|
|
29
|
+
* .then(({ user }) => {
|
|
30
|
+
* console.log(user)
|
|
31
|
+
* })
|
|
32
|
+
*/
|
|
33
|
+
update(id: string, body: HttpTypes.AdminUpdateUser, query?: HttpTypes.AdminUserParams, headers?: ClientHeaders): Promise<HttpTypes.AdminUserResponse>;
|
|
34
|
+
/**
|
|
35
|
+
* This method retrieves a list of users. It sends a request to the
|
|
36
|
+
* [List Users](https://docs.acmekit.com/api/admin#users_getusers)
|
|
37
|
+
* API route.
|
|
38
|
+
*
|
|
39
|
+
* @param queryParams - Filters and pagination configurations.
|
|
40
|
+
* @param headers - Headers to pass in the request.
|
|
41
|
+
* @returns The list of users.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* To retrieve the list of users:
|
|
45
|
+
*
|
|
46
|
+
* ```ts
|
|
47
|
+
* sdk.admin.user.list()
|
|
48
|
+
* .then(({ users, count, limit, offset }) => {
|
|
49
|
+
* console.log(users)
|
|
50
|
+
* })
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* To configure the pagination, pass the `limit` and `offset` query parameters.
|
|
54
|
+
*
|
|
55
|
+
* For example, to retrieve only 10 items and skip 10 items:
|
|
56
|
+
*
|
|
57
|
+
* ```ts
|
|
58
|
+
* sdk.admin.user.list({
|
|
59
|
+
* limit: 10,
|
|
60
|
+
* offset: 10
|
|
61
|
+
* })
|
|
62
|
+
* .then(({ users, count, limit, offset }) => {
|
|
63
|
+
* console.log(users)
|
|
64
|
+
* })
|
|
65
|
+
* ```
|
|
66
|
+
*
|
|
67
|
+
* Using the `fields` query parameter, you can specify the fields and relations to retrieve
|
|
68
|
+
* in each user:
|
|
69
|
+
*
|
|
70
|
+
* ```ts
|
|
71
|
+
* sdk.admin.user.list({
|
|
72
|
+
* fields: "id,email"
|
|
73
|
+
* })
|
|
74
|
+
* .then(({ users, count, limit, offset }) => {
|
|
75
|
+
* console.log(users)
|
|
76
|
+
* })
|
|
77
|
+
* ```
|
|
78
|
+
*
|
|
79
|
+
* Learn more about the `fields` property in the [API reference](https://docs.acmekit.com/api/admin#select-fields-and-relations).
|
|
80
|
+
*/
|
|
81
|
+
list(queryParams?: HttpTypes.AdminUserListParams, headers?: ClientHeaders): Promise<HttpTypes.AdminUserListResponse>;
|
|
82
|
+
/**
|
|
83
|
+
* This method retrieves a user. It sends a request to the
|
|
84
|
+
* [Get User](https://docs.acmekit.com/api/admin#users_getusersid)
|
|
85
|
+
* API route.
|
|
86
|
+
*
|
|
87
|
+
* @param id - The ID of the user to retrieve.
|
|
88
|
+
* @param query - Configure the fields and relations to retrieve in the user.
|
|
89
|
+
* @param headers - Headers to pass in the request.
|
|
90
|
+
* @returns The user's details.
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* To retrieve a user by its ID:
|
|
94
|
+
*
|
|
95
|
+
* ```ts
|
|
96
|
+
* sdk.admin.user.retrieve("user_123")
|
|
97
|
+
* .then(({ user }) => {
|
|
98
|
+
* console.log(user)
|
|
99
|
+
* })
|
|
100
|
+
* ```
|
|
101
|
+
*
|
|
102
|
+
* To specify the fields and relations to retrieve:
|
|
103
|
+
*
|
|
104
|
+
* ```ts
|
|
105
|
+
* sdk.admin.user.retrieve("user_123", {
|
|
106
|
+
* fields: "id,email"
|
|
107
|
+
* })
|
|
108
|
+
* .then(({ user }) => {
|
|
109
|
+
* console.log(user)
|
|
110
|
+
* })
|
|
111
|
+
* ```
|
|
112
|
+
*
|
|
113
|
+
* Learn more about the `fields` property in the [API reference](https://docs.acmekit.com/api/admin#select-fields-and-relations).
|
|
114
|
+
*/
|
|
115
|
+
retrieve(id: string, query?: HttpTypes.AdminUserParams, headers?: ClientHeaders): Promise<HttpTypes.AdminUserResponse>;
|
|
116
|
+
/**
|
|
117
|
+
* This method deletes a user. It sends a request to the
|
|
118
|
+
* [Delete User](https://docs.acmekit.com/api/admin#users_deleteusersid)
|
|
119
|
+
* API route.
|
|
120
|
+
*
|
|
121
|
+
* @param id - The ID of the user to delete.
|
|
122
|
+
* @param headers - Headers to pass in the request.
|
|
123
|
+
* @returns The deletion's details.
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* sdk.admin.user.delete("user_123")
|
|
127
|
+
* .then(({ deleted }) => {
|
|
128
|
+
* console.log(deleted)
|
|
129
|
+
* })
|
|
130
|
+
*/
|
|
131
|
+
delete(id: string, headers?: ClientHeaders): Promise<HttpTypes.AdminUserDeleteResponse>;
|
|
132
|
+
/**
|
|
133
|
+
* This method retrieves the currently authenticated user. It sends a request to the
|
|
134
|
+
* [Get Logged-In User](https://docs.acmekit.com/api/admin#users_getusersme)
|
|
135
|
+
* API route.
|
|
136
|
+
*
|
|
137
|
+
* @param query - Configure the fields and relations to retrieve in the user.
|
|
138
|
+
* @param headers - Headers to pass in the request.
|
|
139
|
+
* @returns The user's details.
|
|
140
|
+
*
|
|
141
|
+
* @example
|
|
142
|
+
* To retrieve the currently authenticated user:
|
|
143
|
+
*
|
|
144
|
+
* ```ts
|
|
145
|
+
* sdk.admin.user.me()
|
|
146
|
+
* .then(({ user }) => {
|
|
147
|
+
* console.log(user)
|
|
148
|
+
* })
|
|
149
|
+
* ```
|
|
150
|
+
*
|
|
151
|
+
* To specify the fields and relations to retrieve:
|
|
152
|
+
*
|
|
153
|
+
* ```ts
|
|
154
|
+
* sdk.admin.user.me({
|
|
155
|
+
* fields: "id,email"
|
|
156
|
+
* })
|
|
157
|
+
* .then(({ user }) => {
|
|
158
|
+
* console.log(user)
|
|
159
|
+
* })
|
|
160
|
+
* ```
|
|
161
|
+
*
|
|
162
|
+
* Learn more about the `fields` property in the [API reference](https://docs.acmekit.com/api/admin#select-fields-and-relations).
|
|
163
|
+
*/
|
|
164
|
+
me(query?: HttpTypes.AdminUserParams, headers?: ClientHeaders): Promise<HttpTypes.AdminUserResponse>;
|
|
165
|
+
}
|
|
166
|
+
//# sourceMappingURL=user.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../src/admin/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,qBAAa,IAAI;IACf;;OAEG;IACH,OAAO,CAAC,MAAM,CAAQ;IACtB;;OAEG;gBACS,MAAM,EAAE,MAAM;IAI1B;;;;;;;;;;;;;;;;;;;OAmBG;IACG,MAAM,CACV,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,SAAS,CAAC,eAAe,EAC/B,KAAK,CAAC,EAAE,SAAS,CAAC,eAAe,EACjC,OAAO,CAAC,EAAE,aAAa;IAazB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8CG;IACG,IAAI,CACR,WAAW,CAAC,EAAE,SAAS,CAAC,mBAAmB,EAC3C,OAAO,CAAC,EAAE,aAAa;IAQzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACG,QAAQ,CACZ,EAAE,EAAE,MAAM,EACV,KAAK,CAAC,EAAE,SAAS,CAAC,eAAe,EACjC,OAAO,CAAC,EAAE,aAAa;IAWzB;;;;;;;;;;;;;;OAcG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa;IAUhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACG,EAAE,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,eAAe,EAAE,OAAO,CAAC,EAAE,aAAa;CAMpE"}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
export class User {
|
|
11
|
+
/**
|
|
12
|
+
* @ignore
|
|
13
|
+
*/
|
|
14
|
+
constructor(client) {
|
|
15
|
+
this.client = client;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* This method updates a user. It sends a request to the
|
|
19
|
+
* [Update User](https://docs.acmekit.com/api/admin#users_postusersid)
|
|
20
|
+
* API route.
|
|
21
|
+
*
|
|
22
|
+
* @param id - The ID of the user to update.
|
|
23
|
+
* @param body - The details of the user to update.
|
|
24
|
+
* @param query - Configure the fields and relations to retrieve in the tax region.
|
|
25
|
+
* @param headers - Headers to pass in the request.
|
|
26
|
+
* @returns The user's details.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* sdk.admin.user.update("user_123", {
|
|
30
|
+
* first_name: "John",
|
|
31
|
+
* last_name: "Doe",
|
|
32
|
+
* })
|
|
33
|
+
* .then(({ user }) => {
|
|
34
|
+
* console.log(user)
|
|
35
|
+
* })
|
|
36
|
+
*/
|
|
37
|
+
update(id, body, query, headers) {
|
|
38
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
return this.client.fetch(`/admin/users/${id}`, {
|
|
40
|
+
method: "POST",
|
|
41
|
+
headers,
|
|
42
|
+
body,
|
|
43
|
+
query,
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* This method retrieves a list of users. It sends a request to the
|
|
49
|
+
* [List Users](https://docs.acmekit.com/api/admin#users_getusers)
|
|
50
|
+
* API route.
|
|
51
|
+
*
|
|
52
|
+
* @param queryParams - Filters and pagination configurations.
|
|
53
|
+
* @param headers - Headers to pass in the request.
|
|
54
|
+
* @returns The list of users.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* To retrieve the list of users:
|
|
58
|
+
*
|
|
59
|
+
* ```ts
|
|
60
|
+
* sdk.admin.user.list()
|
|
61
|
+
* .then(({ users, count, limit, offset }) => {
|
|
62
|
+
* console.log(users)
|
|
63
|
+
* })
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* To configure the pagination, pass the `limit` and `offset` query parameters.
|
|
67
|
+
*
|
|
68
|
+
* For example, to retrieve only 10 items and skip 10 items:
|
|
69
|
+
*
|
|
70
|
+
* ```ts
|
|
71
|
+
* sdk.admin.user.list({
|
|
72
|
+
* limit: 10,
|
|
73
|
+
* offset: 10
|
|
74
|
+
* })
|
|
75
|
+
* .then(({ users, count, limit, offset }) => {
|
|
76
|
+
* console.log(users)
|
|
77
|
+
* })
|
|
78
|
+
* ```
|
|
79
|
+
*
|
|
80
|
+
* Using the `fields` query parameter, you can specify the fields and relations to retrieve
|
|
81
|
+
* in each user:
|
|
82
|
+
*
|
|
83
|
+
* ```ts
|
|
84
|
+
* sdk.admin.user.list({
|
|
85
|
+
* fields: "id,email"
|
|
86
|
+
* })
|
|
87
|
+
* .then(({ users, count, limit, offset }) => {
|
|
88
|
+
* console.log(users)
|
|
89
|
+
* })
|
|
90
|
+
* ```
|
|
91
|
+
*
|
|
92
|
+
* Learn more about the `fields` property in the [API reference](https://docs.acmekit.com/api/admin#select-fields-and-relations).
|
|
93
|
+
*/
|
|
94
|
+
list(queryParams, headers) {
|
|
95
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
96
|
+
return this.client.fetch(`/admin/users`, {
|
|
97
|
+
headers,
|
|
98
|
+
query: queryParams,
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* This method retrieves a user. It sends a request to the
|
|
104
|
+
* [Get User](https://docs.acmekit.com/api/admin#users_getusersid)
|
|
105
|
+
* API route.
|
|
106
|
+
*
|
|
107
|
+
* @param id - The ID of the user to retrieve.
|
|
108
|
+
* @param query - Configure the fields and relations to retrieve in the user.
|
|
109
|
+
* @param headers - Headers to pass in the request.
|
|
110
|
+
* @returns The user's details.
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* To retrieve a user by its ID:
|
|
114
|
+
*
|
|
115
|
+
* ```ts
|
|
116
|
+
* sdk.admin.user.retrieve("user_123")
|
|
117
|
+
* .then(({ user }) => {
|
|
118
|
+
* console.log(user)
|
|
119
|
+
* })
|
|
120
|
+
* ```
|
|
121
|
+
*
|
|
122
|
+
* To specify the fields and relations to retrieve:
|
|
123
|
+
*
|
|
124
|
+
* ```ts
|
|
125
|
+
* sdk.admin.user.retrieve("user_123", {
|
|
126
|
+
* fields: "id,email"
|
|
127
|
+
* })
|
|
128
|
+
* .then(({ user }) => {
|
|
129
|
+
* console.log(user)
|
|
130
|
+
* })
|
|
131
|
+
* ```
|
|
132
|
+
*
|
|
133
|
+
* Learn more about the `fields` property in the [API reference](https://docs.acmekit.com/api/admin#select-fields-and-relations).
|
|
134
|
+
*/
|
|
135
|
+
retrieve(id, query, headers) {
|
|
136
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
137
|
+
return this.client.fetch(`/admin/users/${id}`, {
|
|
138
|
+
query,
|
|
139
|
+
headers,
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* This method deletes a user. It sends a request to the
|
|
145
|
+
* [Delete User](https://docs.acmekit.com/api/admin#users_deleteusersid)
|
|
146
|
+
* API route.
|
|
147
|
+
*
|
|
148
|
+
* @param id - The ID of the user to delete.
|
|
149
|
+
* @param headers - Headers to pass in the request.
|
|
150
|
+
* @returns The deletion's details.
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* sdk.admin.user.delete("user_123")
|
|
154
|
+
* .then(({ deleted }) => {
|
|
155
|
+
* console.log(deleted)
|
|
156
|
+
* })
|
|
157
|
+
*/
|
|
158
|
+
delete(id, headers) {
|
|
159
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
160
|
+
return this.client.fetch(`/admin/users/${id}`, {
|
|
161
|
+
method: "DELETE",
|
|
162
|
+
headers,
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* This method retrieves the currently authenticated user. It sends a request to the
|
|
168
|
+
* [Get Logged-In User](https://docs.acmekit.com/api/admin#users_getusersme)
|
|
169
|
+
* API route.
|
|
170
|
+
*
|
|
171
|
+
* @param query - Configure the fields and relations to retrieve in the user.
|
|
172
|
+
* @param headers - Headers to pass in the request.
|
|
173
|
+
* @returns The user's details.
|
|
174
|
+
*
|
|
175
|
+
* @example
|
|
176
|
+
* To retrieve the currently authenticated user:
|
|
177
|
+
*
|
|
178
|
+
* ```ts
|
|
179
|
+
* sdk.admin.user.me()
|
|
180
|
+
* .then(({ user }) => {
|
|
181
|
+
* console.log(user)
|
|
182
|
+
* })
|
|
183
|
+
* ```
|
|
184
|
+
*
|
|
185
|
+
* To specify the fields and relations to retrieve:
|
|
186
|
+
*
|
|
187
|
+
* ```ts
|
|
188
|
+
* sdk.admin.user.me({
|
|
189
|
+
* fields: "id,email"
|
|
190
|
+
* })
|
|
191
|
+
* .then(({ user }) => {
|
|
192
|
+
* console.log(user)
|
|
193
|
+
* })
|
|
194
|
+
* ```
|
|
195
|
+
*
|
|
196
|
+
* Learn more about the `fields` property in the [API reference](https://docs.acmekit.com/api/admin#select-fields-and-relations).
|
|
197
|
+
*/
|
|
198
|
+
me(query, headers) {
|
|
199
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
200
|
+
return this.client.fetch(`/admin/users/me`, {
|
|
201
|
+
query,
|
|
202
|
+
headers,
|
|
203
|
+
});
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
//# sourceMappingURL=user.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.js","sourceRoot":"","sources":["../../../src/admin/user.ts"],"names":[],"mappings":";;;;;;;;;AAIA,MAAM,OAAO,IAAI;IAKf;;OAEG;IACH,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACG,MAAM,CACV,EAAU,EACV,IAA+B,EAC/B,KAAiC,EACjC,OAAuB;;YAEvB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CACtB,gBAAgB,EAAE,EAAE,EACpB;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,IAAI;gBACJ,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8CG;IACG,IAAI,CACR,WAA2C,EAC3C,OAAuB;;YAEvB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAkC,cAAc,EAAE;gBACxE,OAAO;gBACP,KAAK,EAAE,WAAW;aACnB,CAAC,CAAA;QACJ,CAAC;KAAA;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACG,QAAQ,CACZ,EAAU,EACV,KAAiC,EACjC,OAAuB;;YAEvB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CACtB,gBAAgB,EAAE,EAAE,EACpB;gBACE,KAAK;gBACL,OAAO;aACR,CACF,CAAA;QACH,CAAC;KAAA;IAED;;;;;;;;;;;;;;OAcG;IACG,MAAM,CAAC,EAAU,EAAE,OAAuB;;YAC9C,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CACtB,gBAAgB,EAAE,EAAE,EACpB;gBACE,MAAM,EAAE,QAAQ;gBAChB,OAAO;aACR,CACF,CAAA;QACH,CAAC;KAAA;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACG,EAAE,CAAC,KAAiC,EAAE,OAAuB;;YACjE,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAA8B,iBAAiB,EAAE;gBACvE,KAAK;gBACL,OAAO;aACR,CAAC,CAAA;QACJ,CAAC;KAAA;CACF"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { HttpTypes, SelectParams } from "@acmekit/types";
|
|
2
|
+
import { Client } from "../client";
|
|
3
|
+
import { ClientHeaders } from "../types";
|
|
4
|
+
export declare class Views {
|
|
5
|
+
private client;
|
|
6
|
+
constructor(client: Client);
|
|
7
|
+
/**
|
|
8
|
+
* @since 2.10.3
|
|
9
|
+
* @featureFlag view_configurations
|
|
10
|
+
*/
|
|
11
|
+
columns(entity: string, query?: SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminViewsEntityColumnsResponse>;
|
|
12
|
+
/**
|
|
13
|
+
* @since 2.10.3
|
|
14
|
+
* @featureFlag view_configurations
|
|
15
|
+
*/
|
|
16
|
+
listConfigurations(entity: string, query?: HttpTypes.AdminGetViewConfigurationsParams, headers?: ClientHeaders): Promise<HttpTypes.AdminViewConfigurationListResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* @since 2.10.3
|
|
19
|
+
* @featureFlag view_configurations
|
|
20
|
+
*/
|
|
21
|
+
createConfiguration(entity: string, body: HttpTypes.AdminCreateViewConfiguration, headers?: ClientHeaders): Promise<HttpTypes.AdminViewConfigurationResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* @since 2.10.3
|
|
24
|
+
* @featureFlag view_configurations
|
|
25
|
+
*/
|
|
26
|
+
retrieveConfiguration(entity: string, id: string, query?: SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminViewConfigurationResponse>;
|
|
27
|
+
/**
|
|
28
|
+
* @since 2.10.3
|
|
29
|
+
* @featureFlag view_configurations
|
|
30
|
+
*/
|
|
31
|
+
updateConfiguration(entity: string, id: string, body: HttpTypes.AdminUpdateViewConfiguration, headers?: ClientHeaders): Promise<HttpTypes.AdminViewConfigurationResponse>;
|
|
32
|
+
/**
|
|
33
|
+
* @since 2.10.3
|
|
34
|
+
* @featureFlag view_configurations
|
|
35
|
+
*/
|
|
36
|
+
deleteConfiguration(entity: string, id: string, headers?: ClientHeaders): Promise<HttpTypes.AdminViewConfigurationDeleteResponse>;
|
|
37
|
+
/**
|
|
38
|
+
* @since 2.10.3
|
|
39
|
+
* @featureFlag view_configurations
|
|
40
|
+
*/
|
|
41
|
+
retrieveActiveConfiguration(entity: string, headers?: ClientHeaders): Promise<HttpTypes.AdminViewConfigurationResponse & {
|
|
42
|
+
active_view_configuration_id?: string | null;
|
|
43
|
+
}>;
|
|
44
|
+
/**
|
|
45
|
+
* @since 2.10.3
|
|
46
|
+
* @featureFlag view_configurations
|
|
47
|
+
*/
|
|
48
|
+
setActiveConfiguration(entity: string, body: {
|
|
49
|
+
view_configuration_id: string | null;
|
|
50
|
+
}, headers?: ClientHeaders): Promise<{
|
|
51
|
+
success: boolean;
|
|
52
|
+
}>;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=views.d.ts.map
|