nextpress-core 1.0.1 → 1.0.3
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/acf-functions/core/acf-builder.d.ts +1 -0
- package/dist/acf-functions/core/acf-field-group-autoloader.d.ts +1 -0
- package/dist/acf-functions/field-props.d.ts +196 -0
- package/dist/acf-functions/field-props.js +1 -0
- package/dist/acf-functions/services/define-field-group.d.ts +1 -0
- package/dist/acf-functions/services/define-layout.d.ts +1 -0
- package/dist/acf-functions/services/map-fields/helpers/map-choice-object.d.ts +1 -1
- package/dist/acf-functions/services/map-fields/map-fields.d.ts +3 -0
- package/dist/acf-functions/types/acf-field-group.d.ts +99 -0
- package/dist/acf-functions/types/acf-field-group.js +1 -0
- package/dist/acf-functions/types/acf-field.d.ts +2813 -0
- package/dist/acf-functions/types/acf-field.js +1 -0
- package/dist/acf-functions/types/acf-layout.d.ts +19 -0
- package/dist/acf-functions/types/acf-layout.js +1 -0
- package/dist/acf-functions/types/acf-values.d.ts +4 -0
- package/dist/acf-functions/types/acf-values.js +1 -0
- package/dist/acf-functions/types/components/field-props.d.ts +196 -0
- package/dist/acf-functions/types/components/field-props.js +1 -0
- package/dist/acf-functions/types/components/nextpress-component.d.ts +11 -0
- package/dist/acf-functions/types/components/nextpress-component.js +1 -0
- package/dist/entities/common.d.ts +28 -0
- package/dist/entities/common.js +1 -0
- package/dist/entities/option/option.interface.d.ts +7 -0
- package/dist/entities/option/option.interface.js +2 -0
- package/dist/entities/post/post.interface.d.ts +67 -0
- package/dist/entities/post/post.interface.js +2 -0
- package/dist/entities/term/term.interface.d.ts +8 -0
- package/dist/entities/term/term.interface.js +1 -0
- package/dist/entities/user/user.interface.d.ts +9 -0
- package/dist/entities/user/user.interface.js +1 -0
- package/dist/globals/entity-loader/entity-loader-base.d.ts +1 -1
- package/dist/globals/entity-loader/entity-loader.interface.d.ts +52 -0
- package/dist/globals/entity-loader/entity-loader.interface.js +1 -0
- package/dist/globals/entity-loader/option-loader.d.ts +1 -1
- package/dist/globals/entity-loader/post-loader.d.ts +1 -1
- package/dist/globals/entity-loader/term-loader.d.ts +1 -1
- package/dist/globals/entity-loader/user-loader.d.ts +1 -1
- package/dist/globals/get-field/get-field.d.ts +2 -1
- package/dist/globals/nextpress-config/nextpress-config.interface.d.ts +14 -0
- package/dist/globals/nextpress-config/nextpress-config.interface.js +1 -0
- package/dist/repository/optionquery/option-query-args.d.ts +19 -0
- package/dist/repository/optionquery/option-query-args.js +1 -0
- package/dist/repository/optionquery/option-query.d.ts +1 -1
- package/dist/repository/postquery/post-query-args.d.ts +104 -0
- package/dist/repository/postquery/post-query-args.js +1 -0
- package/dist/repository/postquery/post-query.d.ts +1 -1
- package/dist/repository/termquery/term-query-args.d.ts +51 -0
- package/dist/repository/termquery/term-query-args.js +1 -0
- package/dist/repository/termquery/term-query.d.ts +1 -1
- package/dist/repository/userquery/user-query-args.d.ts +63 -0
- package/dist/repository/userquery/user-query-args.js +1 -0
- package/dist/repository/userquery/user-query.d.ts +1 -1
- package/dist/router/types.d.ts +8 -0
- package/dist/router/types.js +1 -0
- package/dist/ui/render-components.d.ts +1 -1
- package/dist/wpdb/wpdb.interface.d.ts +152 -0
- package/dist/wpdb/wpdb.interface.js +5 -0
- package/package.json +1 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines the arguments for querying terms.
|
|
3
|
+
* Maps standard WordPress WP_Term_Query parameters.
|
|
4
|
+
*/
|
|
5
|
+
interface TermQueryArgs {
|
|
6
|
+
/** Taxonomy name, or array of taxonomy names, to which results should be limited. */
|
|
7
|
+
taxonomy?: string | string[];
|
|
8
|
+
/** Taxonomy ID, or array of term taxonomy IDs, to match when querying terms. */
|
|
9
|
+
taxonomyId?: number | number[];
|
|
10
|
+
/** TermId or array of term IDs to include along with all of their descendant terms. */
|
|
11
|
+
termId?: number | number[];
|
|
12
|
+
/** TermId or array of term IDs to exclude along with all of their descendant terms. */
|
|
13
|
+
termIdNot?: number | number[];
|
|
14
|
+
/** Slug or array of slugs to return term(s) for. Default empty. */
|
|
15
|
+
termSlug?: string | string[];
|
|
16
|
+
/** Slug or array of slugs to return term(s) for. Default empty. */
|
|
17
|
+
termSlugNot?: string | string[];
|
|
18
|
+
/** Name or array of names to return term(s) for. Default empty. */
|
|
19
|
+
termName?: string | string[];
|
|
20
|
+
/** Nextpress path to the term */
|
|
21
|
+
path?: string;
|
|
22
|
+
/** Whether to hide terms not assigned to any posts. Default true. */
|
|
23
|
+
hideEmpty?: boolean;
|
|
24
|
+
/** Field(s) to order terms by. Default 'none'. */
|
|
25
|
+
orderBy?: 'term_id' | 'name' | 'slug' | 'term_group' | 'description' | 'parent' | 'term_order' | 'count' | 'none' | string;
|
|
26
|
+
/** Whether to order terms in ascending or descending order. Default 'ASC'. */
|
|
27
|
+
order?: 'ASC' | 'DESC';
|
|
28
|
+
/** Maximum number of terms to return. Accepts 0 (all) or any positive number. Default 0 (all). */
|
|
29
|
+
number?: number;
|
|
30
|
+
/** The number by which to offset the terms query. Default empty. */
|
|
31
|
+
offset?: number;
|
|
32
|
+
/** Parent term ID to retrieve direct-child terms of. Default empty. */
|
|
33
|
+
parent?: number;
|
|
34
|
+
/** True to limit results to terms that have no children. This parameter has no effect on non-hierarchical taxonomies. Default false. */
|
|
35
|
+
childless?: boolean;
|
|
36
|
+
/** Search criteria to match terms. Will be SQL-formatted with wildcards before and after. Default empty. */
|
|
37
|
+
search?: string;
|
|
38
|
+
/** Retrieve terms with criteria by which a term is LIKE `$nameLike`. Default empty. */
|
|
39
|
+
nameLike?: string;
|
|
40
|
+
/** Retrieve terms where the description is LIKE `$descriptionLike`. Default empty. */
|
|
41
|
+
descriptionLike?: string;
|
|
42
|
+
/** Meta query */
|
|
43
|
+
metaQuery?: {
|
|
44
|
+
/** Meta key */
|
|
45
|
+
metaKey: string;
|
|
46
|
+
/** Variable name to save result to */
|
|
47
|
+
as: string;
|
|
48
|
+
}[];
|
|
49
|
+
/** Whether to get multiple, default true */
|
|
50
|
+
multiple?: boolean;
|
|
51
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EntityQuery } from "../../globals/entity-loader/entity-loader";
|
|
1
|
+
import { EntityQuery } from "../../globals/entity-loader/entity-loader.interface";
|
|
2
2
|
import { ITerm } from "../../entities/term/term.interface";
|
|
3
3
|
/**
|
|
4
4
|
* Executes database queries to retrieve term IDs based on provided arguments.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines the arguments for querying users.
|
|
3
|
+
* Maps standard WordPress WP_User_Query parameters.
|
|
4
|
+
*/
|
|
5
|
+
interface UserQueryArgs {
|
|
6
|
+
/** User ID, or array of user IDs, to match when querying terms. */
|
|
7
|
+
userId?: number | number[];
|
|
8
|
+
/** An array of user IDs to exclude. Default empty array. */
|
|
9
|
+
userIdsNotIn?: number[];
|
|
10
|
+
/** The user nicename. Default empty. */
|
|
11
|
+
nicename?: string;
|
|
12
|
+
/** An array of nicenames to include. Default empty array. */
|
|
13
|
+
nicenameIn?: string[];
|
|
14
|
+
/** An array of nicenames to exclude. Default empty array. */
|
|
15
|
+
nicenameNotIn?: string[];
|
|
16
|
+
/** The user display name. Default empty. */
|
|
17
|
+
displayName?: string;
|
|
18
|
+
/** An array of display names to include. Default empty array. */
|
|
19
|
+
displayNameIn?: string[];
|
|
20
|
+
/** An array of display names to exclude. Default empty array. */
|
|
21
|
+
displayNameNotIn?: string[];
|
|
22
|
+
/** The user login. Default empty. */
|
|
23
|
+
login?: string;
|
|
24
|
+
/** An array of logins to include. Default empty array. */
|
|
25
|
+
loginIn?: string[];
|
|
26
|
+
/** An array of logins to exclude. Default empty array. */
|
|
27
|
+
loginNotIn?: string[];
|
|
28
|
+
/** An array of role names. Matched users must have at least one of these roles. Default empty array. */
|
|
29
|
+
roleIn?: string[];
|
|
30
|
+
/** An array of role names that users must match to be included in results. Note that this is an inclusive list: users must match *each* role. Default empty. */
|
|
31
|
+
roleAnd?: string[];
|
|
32
|
+
/** An array of role names to exclude. Users matching one or more of these roles will not be included in results. Default empty array. */
|
|
33
|
+
roleNotIn?: string[];
|
|
34
|
+
/** Search keyword. Searches for possible string matches on columns. */
|
|
35
|
+
search?: string;
|
|
36
|
+
/** Array of column names to be searched. */
|
|
37
|
+
search_columns?: ('ID' | 'userLogin' | 'userEmail' | 'userUrl' | 'userNicename' | 'displayName')[];
|
|
38
|
+
/** Field(s) to order terms by. Default 'none'. */
|
|
39
|
+
orderBy?: 'ID' | 'name' | 'login' | 'nicename' | 'first_name' | 'last_name' | 'email' | 'registered' | 'post_count' | 'count' | 'none' | string;
|
|
40
|
+
/** Designates ascending or descending order of users. Accepts 'ASC', 'DESC'. Default 'ASC'. */
|
|
41
|
+
order?: 'ASC' | 'DESC';
|
|
42
|
+
/** Number of users to offset in retrieved results. Can be used in conjunction with pagination. Default 0. */
|
|
43
|
+
offset?: number;
|
|
44
|
+
/** Number of users to limit the query for. Value -1 (all) is supported. Default -1. */
|
|
45
|
+
usersPerPage?: number;
|
|
46
|
+
/** Show users that would show up on page. */
|
|
47
|
+
page?: number;
|
|
48
|
+
/** Show all posts (true) or paginate (false). Default false. */
|
|
49
|
+
noPaging?: boolean;
|
|
50
|
+
/** Whether to skip counting the total rows found. Default false. */
|
|
51
|
+
noFoundRows?: boolean;
|
|
52
|
+
/** Pass an array of post types to filter results to users who have published posts in those post types. `true` is an alias for all public post types. */
|
|
53
|
+
hasPublishedPosts?: boolean | string[];
|
|
54
|
+
/** Meta query */
|
|
55
|
+
metaQuery?: {
|
|
56
|
+
/** Meta key */
|
|
57
|
+
metaKey: string;
|
|
58
|
+
/** Variable name to save result to */
|
|
59
|
+
as: string;
|
|
60
|
+
}[];
|
|
61
|
+
/** Whether to get multiple, default false */
|
|
62
|
+
multiple?: boolean;
|
|
63
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IUser } from "../../entities/user/user.interface";
|
|
2
|
-
import { EntityQuery } from "../../globals/entity-loader/entity-loader";
|
|
2
|
+
import { EntityQuery } from "../../globals/entity-loader/entity-loader.interface";
|
|
3
3
|
/**
|
|
4
4
|
* Executes database queries to retrieve user IDs and counts based on provided arguments.
|
|
5
5
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was generated by kysely-codegen.
|
|
3
|
+
* Please do not edit it manually.
|
|
4
|
+
*/
|
|
5
|
+
import type { ColumnType } from "kysely";
|
|
6
|
+
export type Generated<T> = T extends ColumnType<infer S, infer I, infer U> ? ColumnType<S, I | undefined, U> : ColumnType<T, T | undefined, T>;
|
|
7
|
+
export interface WpCommentmeta {
|
|
8
|
+
commentId: Generated<number>;
|
|
9
|
+
metaId: Generated<number>;
|
|
10
|
+
metaKey: string | null;
|
|
11
|
+
metaValue: string | null;
|
|
12
|
+
}
|
|
13
|
+
export interface WpComment {
|
|
14
|
+
commentAgent: Generated<string>;
|
|
15
|
+
commentApproved: Generated<string>;
|
|
16
|
+
commentAuthor: string;
|
|
17
|
+
commentAuthorEmail: Generated<string>;
|
|
18
|
+
commentAuthorIP: Generated<string>;
|
|
19
|
+
commentAuthorUrl: Generated<string>;
|
|
20
|
+
commentContent: string;
|
|
21
|
+
commentDate: Generated<Date>;
|
|
22
|
+
commentDateGmt: Generated<Date>;
|
|
23
|
+
commentID: Generated<number>;
|
|
24
|
+
commentKarma: Generated<number>;
|
|
25
|
+
commentParent: Generated<number>;
|
|
26
|
+
commentPostID: Generated<number>;
|
|
27
|
+
commentType: Generated<string>;
|
|
28
|
+
userId: Generated<number>;
|
|
29
|
+
}
|
|
30
|
+
export interface WpLink {
|
|
31
|
+
linkDescription: Generated<string>;
|
|
32
|
+
linkId: Generated<number>;
|
|
33
|
+
linkImage: Generated<string>;
|
|
34
|
+
linkName: Generated<string>;
|
|
35
|
+
linkNotes: string;
|
|
36
|
+
linkOwner: Generated<number>;
|
|
37
|
+
linkRating: Generated<number>;
|
|
38
|
+
linkRel: Generated<string>;
|
|
39
|
+
linkRss: Generated<string>;
|
|
40
|
+
linkTarget: Generated<string>;
|
|
41
|
+
linkUpdated: Generated<Date>;
|
|
42
|
+
linkUrl: Generated<string>;
|
|
43
|
+
linkVisible: Generated<string>;
|
|
44
|
+
}
|
|
45
|
+
export interface WpNextpressPostmeta {
|
|
46
|
+
metaId: Generated<number>;
|
|
47
|
+
metaKey: string | null;
|
|
48
|
+
metaValue: string | null;
|
|
49
|
+
objectId: Generated<number>;
|
|
50
|
+
}
|
|
51
|
+
export interface WpNextpressTermmeta {
|
|
52
|
+
metaId: Generated<number>;
|
|
53
|
+
metaKey: string | null;
|
|
54
|
+
metaValue: string | null;
|
|
55
|
+
objectId: Generated<number>;
|
|
56
|
+
}
|
|
57
|
+
export interface WpOption {
|
|
58
|
+
autoload: Generated<string>;
|
|
59
|
+
optionId: Generated<number>;
|
|
60
|
+
optionName: Generated<string>;
|
|
61
|
+
optionValue: string;
|
|
62
|
+
}
|
|
63
|
+
export interface WpPostmeta {
|
|
64
|
+
metaId: Generated<number>;
|
|
65
|
+
metaKey: string | null;
|
|
66
|
+
metaValue: string | null;
|
|
67
|
+
postId: Generated<number>;
|
|
68
|
+
}
|
|
69
|
+
export interface WpPost {
|
|
70
|
+
commentCount: Generated<number>;
|
|
71
|
+
commentStatus: Generated<string>;
|
|
72
|
+
guid: Generated<string>;
|
|
73
|
+
ID: Generated<number>;
|
|
74
|
+
menuOrder: Generated<number>;
|
|
75
|
+
pinged: string;
|
|
76
|
+
pingStatus: Generated<string>;
|
|
77
|
+
postAuthor: Generated<number>;
|
|
78
|
+
postContent: string;
|
|
79
|
+
postContentFiltered: string;
|
|
80
|
+
postDate: Generated<Date>;
|
|
81
|
+
postDateGmt: Generated<Date>;
|
|
82
|
+
postExcerpt: string;
|
|
83
|
+
postMimeType: Generated<string>;
|
|
84
|
+
postModified: Generated<Date>;
|
|
85
|
+
postModifiedGmt: Generated<Date>;
|
|
86
|
+
postName: Generated<string>;
|
|
87
|
+
postParent: Generated<number>;
|
|
88
|
+
postPassword: Generated<string>;
|
|
89
|
+
postStatus: Generated<string>;
|
|
90
|
+
postTitle: string;
|
|
91
|
+
postType: Generated<string>;
|
|
92
|
+
toPing: string;
|
|
93
|
+
}
|
|
94
|
+
export interface WpTermmeta {
|
|
95
|
+
metaId: Generated<number>;
|
|
96
|
+
metaKey: string | null;
|
|
97
|
+
metaValue: string | null;
|
|
98
|
+
termId: Generated<number>;
|
|
99
|
+
}
|
|
100
|
+
export interface WpTermRelationship {
|
|
101
|
+
objectId: Generated<number>;
|
|
102
|
+
termOrder: Generated<number>;
|
|
103
|
+
termTaxonomyId: Generated<number>;
|
|
104
|
+
}
|
|
105
|
+
export interface WpTerm {
|
|
106
|
+
name: Generated<string>;
|
|
107
|
+
slug: Generated<string>;
|
|
108
|
+
termGroup: Generated<number>;
|
|
109
|
+
termId: Generated<number>;
|
|
110
|
+
}
|
|
111
|
+
export interface WpTermTaxonomy {
|
|
112
|
+
count: Generated<number>;
|
|
113
|
+
description: string;
|
|
114
|
+
parent: Generated<number>;
|
|
115
|
+
taxonomy: Generated<string>;
|
|
116
|
+
termId: Generated<number>;
|
|
117
|
+
termTaxonomyId: Generated<number>;
|
|
118
|
+
}
|
|
119
|
+
export interface WpUsermeta {
|
|
120
|
+
metaKey: string | null;
|
|
121
|
+
metaValue: string | null;
|
|
122
|
+
umetaId: Generated<number>;
|
|
123
|
+
userId: Generated<number>;
|
|
124
|
+
}
|
|
125
|
+
export interface WpUser {
|
|
126
|
+
displayName: Generated<string>;
|
|
127
|
+
ID: Generated<number>;
|
|
128
|
+
userActivationKey: Generated<string>;
|
|
129
|
+
userEmail: Generated<string>;
|
|
130
|
+
userLogin: Generated<string>;
|
|
131
|
+
userNicename: Generated<string>;
|
|
132
|
+
userPass: Generated<string>;
|
|
133
|
+
userRegistered: Generated<Date>;
|
|
134
|
+
userStatus: Generated<number>;
|
|
135
|
+
userUrl: Generated<string>;
|
|
136
|
+
}
|
|
137
|
+
export interface DB {
|
|
138
|
+
wpCommentmeta: WpCommentmeta;
|
|
139
|
+
wpComments: WpComment;
|
|
140
|
+
wpLinks: WpLink;
|
|
141
|
+
wpNextpressPostmeta: WpNextpressPostmeta;
|
|
142
|
+
wpNextpressTermmeta: WpNextpressTermmeta;
|
|
143
|
+
wpOptions: WpOption;
|
|
144
|
+
wpPostmeta: WpPostmeta;
|
|
145
|
+
wpPosts: WpPost;
|
|
146
|
+
wpTermmeta: WpTermmeta;
|
|
147
|
+
wpTermRelationships: WpTermRelationship;
|
|
148
|
+
wpTerms: WpTerm;
|
|
149
|
+
wpTermTaxonomy: WpTermTaxonomy;
|
|
150
|
+
wpUsermeta: WpUsermeta;
|
|
151
|
+
wpUsers: WpUser;
|
|
152
|
+
}
|