@rnaga/wp-node 1.3.1 → 1.3.2
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/package.json +1 -1
- package/types/crud.d.ts +28 -6
package/package.json
CHANGED
package/types/crud.d.ts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
+
import { CrudUtil } from "../core/utils/crud.util";
|
|
2
|
+
import { ApplicationPasswordsCrud } from "../crud/application-passwords.crud";
|
|
1
3
|
import { BlogCrud } from "../crud/blog.crud";
|
|
2
4
|
import { CommentCrud } from "../crud/comment.crud";
|
|
5
|
+
import { Crud } from "../crud/crud";
|
|
3
6
|
import { MetaCrud } from "../crud/meta.crud";
|
|
4
7
|
import { OptionsCrud } from "../crud/options.crud";
|
|
5
8
|
import { PostCrud } from "../crud/post.crud";
|
|
6
|
-
import { SiteCrud } from "../crud/site.crud";
|
|
7
|
-
import { SettingsCrud } from "../crud/settings.crud";
|
|
8
|
-
import { TermCrud } from "../crud/term.crud";
|
|
9
|
-
import { UserCrud } from "../crud/user.crud";
|
|
10
|
-
import { CrudUtil } from "../core/utils/crud.util";
|
|
11
|
-
import { Crud } from "../crud/crud";
|
|
12
9
|
import { RevisionCrud } from "../crud/revision.crud";
|
|
13
10
|
import { RolesCrud } from "../crud/roles.crud";
|
|
11
|
+
import { SettingsCrud } from "../crud/settings.crud";
|
|
12
|
+
import { SiteCrud } from "../crud/site.crud";
|
|
13
|
+
import { TermCrud } from "../crud/term.crud";
|
|
14
14
|
import { UserSelfRegistrationCrud } from "../crud/user-self-registration.crud";
|
|
15
|
+
import { UserCrud } from "../crud/user.crud";
|
|
15
16
|
|
|
16
17
|
export type ParseError = ReturnType<CrudUtil["parseError"]>;
|
|
17
18
|
|
|
@@ -39,6 +40,7 @@ export type CrudKeys =
|
|
|
39
40
|
type Context = "view" | "edit" | "embed";
|
|
40
41
|
|
|
41
42
|
interface CrudComponents {
|
|
43
|
+
applicationPasswords: ApplicationPasswordsCrud;
|
|
42
44
|
blog: BlogCrud;
|
|
43
45
|
comment: CommentCrud;
|
|
44
46
|
meta: MetaCrud;
|
|
@@ -97,6 +99,26 @@ export type BlogParams<T extends BlogOperations> = {
|
|
|
97
99
|
delete: Parameters<BlogCrud["delete"]>;
|
|
98
100
|
}[T];
|
|
99
101
|
|
|
102
|
+
export type ApplicationPasswordsOperations = Extract<
|
|
103
|
+
Operation,
|
|
104
|
+
"get" | "list" | "update" | "create" | "delete"
|
|
105
|
+
>;
|
|
106
|
+
|
|
107
|
+
export type ApplicationPasswordsParams<
|
|
108
|
+
T extends ApplicationPasswordsOperations
|
|
109
|
+
> = {
|
|
110
|
+
get: Parameters<ApplicationPasswordsCrud["get"]>;
|
|
111
|
+
update: Parameters<ApplicationPasswordsCrud["update"]>;
|
|
112
|
+
list: Parameters<ApplicationPasswordsCrud["list"]>;
|
|
113
|
+
create: Parameters<ApplicationPasswordsCrud["create"]>;
|
|
114
|
+
delete: Parameters<ApplicationPasswordsCrud["delete"]>;
|
|
115
|
+
}[T];
|
|
116
|
+
|
|
117
|
+
export type SettingsParams<T extends SettingsOperations> = {
|
|
118
|
+
get: Parameters<SettingsCrud["get"]>;
|
|
119
|
+
update: Parameters<SettingsCrud["update"]>;
|
|
120
|
+
}[T];
|
|
121
|
+
|
|
100
122
|
export type CommentOperations = Operation;
|
|
101
123
|
|
|
102
124
|
export type CommentParams<T extends CommentOperations> = {
|