@atomic-solutions/wordpress-api-client 0.1.1 → 0.1.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/dist/client/index.cjs +321 -10
- package/dist/client/index.cjs.map +1 -1
- package/dist/client/index.js +312 -1
- package/dist/client/index.js.map +1 -1
- package/dist/index.cjs +438 -137
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +403 -4
- package/dist/index.js.map +1 -1
- package/dist/testing/index.cjs +321 -10
- package/dist/testing/index.cjs.map +1 -1
- package/dist/testing/index.js +312 -1
- package/dist/testing/index.js.map +1 -1
- package/package.json +4 -6
package/dist/index.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import axios, { isAxiosError } from 'axios';
|
|
2
|
-
import {
|
|
3
|
-
export { AvatarUrlsSchema, CategoriesListSchema, CategoryParamsSchema, CategorySchema, CurrentUserSchema, EmbeddedPostSchema, EmbeddedPostsListSchema, GuidSchema, HalLinkItemSchema, HalLinksSchema, ImageMetaSchema, JwtErrorResponseSchema, JwtLoginInputSchema, JwtTokenResponseSchema, JwtValidateResponseSchema, MediaDetailsSchema, MediaListSchema, MediaSchema, MediaSizeSchema, MediaSizesSchema, PostParamsSchema, PostSchema, PostStatusSchema, PostsListSchema, RenderedContentSchema, TagSchema, TagsListSchema, UserSchema, UsersListSchema, WordPressBaseSchema } from '@atomic-solutions/schemas/wordpress';
|
|
4
|
-
export { addressSchema as AddressSchema, moneySchema as MoneySchema, paginationParamsSchema as PaginationParamsSchema } from '@atomic-solutions/schemas/common';
|
|
2
|
+
import { z } from 'zod';
|
|
5
3
|
|
|
6
4
|
// src/client/createClient.ts
|
|
7
5
|
|
|
@@ -694,6 +692,309 @@ var setupErrorInterceptor = (axiosInstance, config, client) => {
|
|
|
694
692
|
}
|
|
695
693
|
);
|
|
696
694
|
};
|
|
695
|
+
var JwtLoginInputSchema = z.object({
|
|
696
|
+
username: z.string(),
|
|
697
|
+
password: z.string()
|
|
698
|
+
});
|
|
699
|
+
var JwtTokenResponseSchema = z.object({
|
|
700
|
+
token: z.string(),
|
|
701
|
+
user_email: z.string(),
|
|
702
|
+
user_nicename: z.string(),
|
|
703
|
+
user_display_name: z.string()
|
|
704
|
+
});
|
|
705
|
+
var JwtValidateResponseSchema = z.object({
|
|
706
|
+
code: z.string(),
|
|
707
|
+
data: z.object({
|
|
708
|
+
status: z.number()
|
|
709
|
+
})
|
|
710
|
+
});
|
|
711
|
+
var JwtErrorResponseSchema = z.object({
|
|
712
|
+
code: z.string(),
|
|
713
|
+
message: z.string(),
|
|
714
|
+
data: z.object({
|
|
715
|
+
status: z.number()
|
|
716
|
+
}).optional()
|
|
717
|
+
});
|
|
718
|
+
var RenderedContentSchema = z.object({
|
|
719
|
+
rendered: z.string(),
|
|
720
|
+
protected: z.boolean().optional()
|
|
721
|
+
});
|
|
722
|
+
var GuidSchema = z.object({
|
|
723
|
+
rendered: z.string()
|
|
724
|
+
});
|
|
725
|
+
var PostStatusSchema = z.enum([
|
|
726
|
+
"publish",
|
|
727
|
+
"future",
|
|
728
|
+
"draft",
|
|
729
|
+
"pending",
|
|
730
|
+
"private",
|
|
731
|
+
"trash",
|
|
732
|
+
"auto-draft",
|
|
733
|
+
"inherit"
|
|
734
|
+
]);
|
|
735
|
+
var HalLinkItemSchema = z.object({
|
|
736
|
+
href: z.string(),
|
|
737
|
+
embeddable: z.boolean().optional(),
|
|
738
|
+
templated: z.boolean().optional()
|
|
739
|
+
});
|
|
740
|
+
var HalLinksSchema = z.object({
|
|
741
|
+
self: z.array(HalLinkItemSchema).optional(),
|
|
742
|
+
collection: z.array(HalLinkItemSchema).optional(),
|
|
743
|
+
about: z.array(HalLinkItemSchema).optional(),
|
|
744
|
+
author: z.array(HalLinkItemSchema).optional(),
|
|
745
|
+
replies: z.array(HalLinkItemSchema).optional(),
|
|
746
|
+
"wp:featuredmedia": z.array(HalLinkItemSchema).optional(),
|
|
747
|
+
"wp:attachment": z.array(HalLinkItemSchema).optional(),
|
|
748
|
+
"wp:term": z.array(HalLinkItemSchema).optional(),
|
|
749
|
+
"wp:post_type": z.array(HalLinkItemSchema).optional(),
|
|
750
|
+
curies: z.array(
|
|
751
|
+
z.object({
|
|
752
|
+
name: z.string(),
|
|
753
|
+
href: z.string(),
|
|
754
|
+
templated: z.boolean()
|
|
755
|
+
})
|
|
756
|
+
).optional()
|
|
757
|
+
}).passthrough();
|
|
758
|
+
var WordPressBaseSchema = z.object({
|
|
759
|
+
id: z.number(),
|
|
760
|
+
date: z.string(),
|
|
761
|
+
date_gmt: z.string(),
|
|
762
|
+
modified: z.string(),
|
|
763
|
+
modified_gmt: z.string(),
|
|
764
|
+
slug: z.string(),
|
|
765
|
+
status: z.string(),
|
|
766
|
+
type: z.string(),
|
|
767
|
+
link: z.string(),
|
|
768
|
+
_links: HalLinksSchema.optional()
|
|
769
|
+
});
|
|
770
|
+
var paginationParamsSchema = z.object({
|
|
771
|
+
/** Current page number */
|
|
772
|
+
page: z.number().int().positive().optional(),
|
|
773
|
+
/** Items per page */
|
|
774
|
+
per_page: z.number().int().positive().max(100).optional(),
|
|
775
|
+
/** Offset for pagination */
|
|
776
|
+
offset: z.number().int().nonnegative().optional(),
|
|
777
|
+
/** Sort order */
|
|
778
|
+
order: z.enum(["asc", "desc"]).optional(),
|
|
779
|
+
/** Field to sort by */
|
|
780
|
+
orderby: z.string().optional()
|
|
781
|
+
});
|
|
782
|
+
z.object({
|
|
783
|
+
/** Total number of items */
|
|
784
|
+
total: z.number(),
|
|
785
|
+
/** Total number of pages */
|
|
786
|
+
totalPages: z.number(),
|
|
787
|
+
/** Current page */
|
|
788
|
+
currentPage: z.number(),
|
|
789
|
+
/** Items per page */
|
|
790
|
+
perPage: z.number()
|
|
791
|
+
});
|
|
792
|
+
var CategorySchema = z.object({
|
|
793
|
+
id: z.number(),
|
|
794
|
+
count: z.number(),
|
|
795
|
+
description: z.string().optional(),
|
|
796
|
+
link: z.string(),
|
|
797
|
+
name: z.string(),
|
|
798
|
+
slug: z.string(),
|
|
799
|
+
taxonomy: z.string(),
|
|
800
|
+
parent: z.number(),
|
|
801
|
+
meta: z.any().optional(),
|
|
802
|
+
_links: HalLinksSchema.optional()
|
|
803
|
+
});
|
|
804
|
+
var CategoriesListSchema = z.array(CategorySchema);
|
|
805
|
+
var CategoryParamsSchema = paginationParamsSchema.extend({
|
|
806
|
+
context: z.enum(["view", "embed", "edit"]).optional(),
|
|
807
|
+
search: z.string().optional(),
|
|
808
|
+
exclude: z.array(z.number()).optional(),
|
|
809
|
+
include: z.array(z.number()).optional(),
|
|
810
|
+
hide_empty: z.boolean().optional(),
|
|
811
|
+
parent: z.number().optional(),
|
|
812
|
+
post: z.number().optional(),
|
|
813
|
+
slug: z.string().optional()
|
|
814
|
+
});
|
|
815
|
+
var TagSchema = z.object({
|
|
816
|
+
id: z.number(),
|
|
817
|
+
count: z.number(),
|
|
818
|
+
description: z.string().optional(),
|
|
819
|
+
link: z.string(),
|
|
820
|
+
name: z.string(),
|
|
821
|
+
slug: z.string(),
|
|
822
|
+
taxonomy: z.string(),
|
|
823
|
+
meta: z.any().optional(),
|
|
824
|
+
_links: HalLinksSchema.optional()
|
|
825
|
+
});
|
|
826
|
+
var TagsListSchema = z.array(TagSchema);
|
|
827
|
+
var MediaSizeSchema = z.object({
|
|
828
|
+
file: z.string(),
|
|
829
|
+
width: z.number(),
|
|
830
|
+
height: z.number(),
|
|
831
|
+
filesize: z.number().optional(),
|
|
832
|
+
mime_type: z.string(),
|
|
833
|
+
source_url: z.string()
|
|
834
|
+
});
|
|
835
|
+
var MediaSizesSchema = z.object({
|
|
836
|
+
thumbnail: MediaSizeSchema.optional(),
|
|
837
|
+
medium: MediaSizeSchema.optional(),
|
|
838
|
+
medium_large: MediaSizeSchema.optional(),
|
|
839
|
+
large: MediaSizeSchema.optional(),
|
|
840
|
+
full: MediaSizeSchema.optional()
|
|
841
|
+
}).passthrough();
|
|
842
|
+
var ImageMetaSchema = z.object({
|
|
843
|
+
aperture: z.string().optional(),
|
|
844
|
+
credit: z.string().optional(),
|
|
845
|
+
camera: z.string().optional(),
|
|
846
|
+
caption: z.string().optional(),
|
|
847
|
+
created_timestamp: z.string().optional(),
|
|
848
|
+
copyright: z.string().optional(),
|
|
849
|
+
focal_length: z.string().optional(),
|
|
850
|
+
iso: z.string().optional(),
|
|
851
|
+
shutter_speed: z.string().optional(),
|
|
852
|
+
title: z.string().optional(),
|
|
853
|
+
orientation: z.string().optional(),
|
|
854
|
+
keywords: z.array(z.string()).optional()
|
|
855
|
+
});
|
|
856
|
+
var MediaDetailsSchema = z.object({
|
|
857
|
+
width: z.number(),
|
|
858
|
+
height: z.number(),
|
|
859
|
+
file: z.string(),
|
|
860
|
+
filesize: z.number().optional(),
|
|
861
|
+
sizes: MediaSizesSchema,
|
|
862
|
+
image_meta: ImageMetaSchema.optional()
|
|
863
|
+
});
|
|
864
|
+
var MediaSchema = z.object({
|
|
865
|
+
id: z.number(),
|
|
866
|
+
date: z.string(),
|
|
867
|
+
date_gmt: z.string(),
|
|
868
|
+
guid: GuidSchema,
|
|
869
|
+
modified: z.string(),
|
|
870
|
+
modified_gmt: z.string(),
|
|
871
|
+
slug: z.string(),
|
|
872
|
+
status: z.string(),
|
|
873
|
+
type: z.string(),
|
|
874
|
+
link: z.string(),
|
|
875
|
+
title: RenderedContentSchema,
|
|
876
|
+
author: z.number(),
|
|
877
|
+
comment_status: z.string(),
|
|
878
|
+
ping_status: z.string(),
|
|
879
|
+
template: z.string().optional(),
|
|
880
|
+
meta: z.any().optional(),
|
|
881
|
+
description: RenderedContentSchema,
|
|
882
|
+
caption: RenderedContentSchema,
|
|
883
|
+
alt_text: z.string(),
|
|
884
|
+
media_type: z.string(),
|
|
885
|
+
mime_type: z.string(),
|
|
886
|
+
media_details: MediaDetailsSchema,
|
|
887
|
+
post: z.number().nullable(),
|
|
888
|
+
source_url: z.string(),
|
|
889
|
+
_links: HalLinksSchema.optional()
|
|
890
|
+
});
|
|
891
|
+
var MediaListSchema = z.array(MediaSchema);
|
|
892
|
+
var PostSchema = z.object({
|
|
893
|
+
id: z.number(),
|
|
894
|
+
date: z.string(),
|
|
895
|
+
date_gmt: z.string(),
|
|
896
|
+
guid: GuidSchema,
|
|
897
|
+
modified: z.string(),
|
|
898
|
+
modified_gmt: z.string(),
|
|
899
|
+
slug: z.string(),
|
|
900
|
+
status: z.string(),
|
|
901
|
+
type: z.string(),
|
|
902
|
+
link: z.string(),
|
|
903
|
+
title: RenderedContentSchema,
|
|
904
|
+
content: RenderedContentSchema,
|
|
905
|
+
excerpt: RenderedContentSchema,
|
|
906
|
+
author: z.number(),
|
|
907
|
+
featured_media: z.number(),
|
|
908
|
+
comment_status: z.string(),
|
|
909
|
+
ping_status: z.string(),
|
|
910
|
+
sticky: z.boolean(),
|
|
911
|
+
template: z.string(),
|
|
912
|
+
format: z.string(),
|
|
913
|
+
meta: z.any().optional(),
|
|
914
|
+
categories: z.array(z.number()),
|
|
915
|
+
tags: z.array(z.number()).optional(),
|
|
916
|
+
_links: HalLinksSchema.optional()
|
|
917
|
+
});
|
|
918
|
+
var PostsListSchema = z.array(PostSchema);
|
|
919
|
+
var PostParamsSchema = paginationParamsSchema.extend({
|
|
920
|
+
context: z.enum(["view", "embed", "edit"]).optional(),
|
|
921
|
+
search: z.string().optional(),
|
|
922
|
+
after: z.string().optional(),
|
|
923
|
+
before: z.string().optional(),
|
|
924
|
+
author: z.union([z.number(), z.array(z.number())]).optional(),
|
|
925
|
+
author_exclude: z.array(z.number()).optional(),
|
|
926
|
+
exclude: z.array(z.number()).optional(),
|
|
927
|
+
include: z.array(z.number()).optional(),
|
|
928
|
+
categories: z.union([z.number(), z.array(z.number())]).optional(),
|
|
929
|
+
categories_exclude: z.array(z.number()).optional(),
|
|
930
|
+
tags: z.union([z.number(), z.array(z.number())]).optional(),
|
|
931
|
+
tags_exclude: z.array(z.number()).optional(),
|
|
932
|
+
sticky: z.boolean().optional()
|
|
933
|
+
});
|
|
934
|
+
var EmbeddedPostSchema = z.object({
|
|
935
|
+
id: z.number(),
|
|
936
|
+
title: z.string(),
|
|
937
|
+
content: z.string(),
|
|
938
|
+
featured_image: z.string().optional(),
|
|
939
|
+
published_date: z.string(),
|
|
940
|
+
categories: z.array(
|
|
941
|
+
z.object({
|
|
942
|
+
id: z.number(),
|
|
943
|
+
name: z.string(),
|
|
944
|
+
slug: z.string(),
|
|
945
|
+
taxonomy: z.string().optional(),
|
|
946
|
+
description: z.string().optional(),
|
|
947
|
+
parent: z.number().optional(),
|
|
948
|
+
count: z.number().optional()
|
|
949
|
+
})
|
|
950
|
+
).optional()
|
|
951
|
+
});
|
|
952
|
+
var EmbeddedPostsListSchema = z.array(EmbeddedPostSchema);
|
|
953
|
+
var AvatarUrlsSchema = z.object({
|
|
954
|
+
"24": z.string().optional(),
|
|
955
|
+
"48": z.string().optional(),
|
|
956
|
+
"96": z.string().optional()
|
|
957
|
+
});
|
|
958
|
+
var UserSchema = z.object({
|
|
959
|
+
id: z.number(),
|
|
960
|
+
username: z.string().optional(),
|
|
961
|
+
// Only in edit context
|
|
962
|
+
name: z.string(),
|
|
963
|
+
first_name: z.string().optional(),
|
|
964
|
+
last_name: z.string().optional(),
|
|
965
|
+
email: z.string().optional(),
|
|
966
|
+
// Only for current user or admin
|
|
967
|
+
url: z.string(),
|
|
968
|
+
description: z.string(),
|
|
969
|
+
link: z.string(),
|
|
970
|
+
locale: z.string().optional(),
|
|
971
|
+
// Only for current user
|
|
972
|
+
nickname: z.string().optional(),
|
|
973
|
+
// Only in edit context
|
|
974
|
+
slug: z.string(),
|
|
975
|
+
registered_date: z.string().optional(),
|
|
976
|
+
// Only in edit context
|
|
977
|
+
roles: z.array(z.string()).optional(),
|
|
978
|
+
// Only in edit context
|
|
979
|
+
capabilities: z.record(z.boolean()).optional(),
|
|
980
|
+
// Only in edit context
|
|
981
|
+
extra_capabilities: z.record(z.boolean()).optional(),
|
|
982
|
+
// Only in edit context
|
|
983
|
+
avatar_urls: AvatarUrlsSchema.optional(),
|
|
984
|
+
meta: z.any().optional(),
|
|
985
|
+
_links: HalLinksSchema.optional()
|
|
986
|
+
});
|
|
987
|
+
var UsersListSchema = z.array(UserSchema);
|
|
988
|
+
var CurrentUserSchema = UserSchema.extend({
|
|
989
|
+
username: z.string(),
|
|
990
|
+
email: z.string(),
|
|
991
|
+
locale: z.string(),
|
|
992
|
+
nickname: z.string(),
|
|
993
|
+
registered_date: z.string(),
|
|
994
|
+
roles: z.array(z.string())
|
|
995
|
+
});
|
|
996
|
+
|
|
997
|
+
// src/api/auth.ts
|
|
697
998
|
var createAuthAPI = (axios2, options) => ({
|
|
698
999
|
/**
|
|
699
1000
|
* Login with username/password and get JWT token
|
|
@@ -716,6 +1017,8 @@ var createAuthAPI = (axios2, options) => ({
|
|
|
716
1017
|
}
|
|
717
1018
|
}
|
|
718
1019
|
});
|
|
1020
|
+
|
|
1021
|
+
// src/api/categories.ts
|
|
719
1022
|
var createCategoriesAPI = (axios2, options) => ({
|
|
720
1023
|
/**
|
|
721
1024
|
* Get list of categories with pagination
|
|
@@ -732,6 +1035,8 @@ var createCategoriesAPI = (axios2, options) => ({
|
|
|
732
1035
|
return handleApiResponse(response, CategorySchema, options);
|
|
733
1036
|
}
|
|
734
1037
|
});
|
|
1038
|
+
|
|
1039
|
+
// src/api/media.ts
|
|
735
1040
|
var createMediaAPI = (axios2, options) => ({
|
|
736
1041
|
/**
|
|
737
1042
|
* Get single media item by ID
|
|
@@ -741,6 +1046,8 @@ var createMediaAPI = (axios2, options) => ({
|
|
|
741
1046
|
return handleApiResponse(response, MediaSchema, options);
|
|
742
1047
|
}
|
|
743
1048
|
});
|
|
1049
|
+
|
|
1050
|
+
// src/api/posts.ts
|
|
744
1051
|
var createPostsAPI = (axios2, options) => ({
|
|
745
1052
|
/**
|
|
746
1053
|
* Get list of posts with pagination
|
|
@@ -767,6 +1074,8 @@ var createPostsAPI = (axios2, options) => ({
|
|
|
767
1074
|
return posts[0] || null;
|
|
768
1075
|
}
|
|
769
1076
|
});
|
|
1077
|
+
|
|
1078
|
+
// src/api/users.ts
|
|
770
1079
|
var createUsersAPI = (axios2, options) => ({
|
|
771
1080
|
/**
|
|
772
1081
|
* Get current authenticated user
|
|
@@ -822,7 +1131,97 @@ var createClient = (config) => {
|
|
|
822
1131
|
setupErrorInterceptor(axiosInstance, fullConfig, client);
|
|
823
1132
|
return client;
|
|
824
1133
|
};
|
|
1134
|
+
var addressSchema = z.object({
|
|
1135
|
+
/** First name */
|
|
1136
|
+
first_name: z.string().min(1, "First name is required"),
|
|
1137
|
+
/** Last name */
|
|
1138
|
+
last_name: z.string().min(1, "Last name is required"),
|
|
1139
|
+
/** Company name (optional) */
|
|
1140
|
+
company: z.string(),
|
|
1141
|
+
/** Address line 1 */
|
|
1142
|
+
address_1: z.string().min(1, "Address is required"),
|
|
1143
|
+
/** Address line 2 (optional) */
|
|
1144
|
+
address_2: z.string(),
|
|
1145
|
+
/** City */
|
|
1146
|
+
city: z.string().min(1, "City is required"),
|
|
1147
|
+
/** State/Province/Region */
|
|
1148
|
+
state: z.string(),
|
|
1149
|
+
/** Postal code */
|
|
1150
|
+
postcode: z.string().min(1, "Postal code is required"),
|
|
1151
|
+
/** Country code (ISO 3166-1 alpha-2) */
|
|
1152
|
+
country: z.string(),
|
|
1153
|
+
/** Phone number */
|
|
1154
|
+
phone: z.string().min(1, "Phone number is required")
|
|
1155
|
+
});
|
|
1156
|
+
var addressSchemaNonMandatory = z.object({
|
|
1157
|
+
/** First name */
|
|
1158
|
+
first_name: z.string(),
|
|
1159
|
+
/** Last name */
|
|
1160
|
+
last_name: z.string(),
|
|
1161
|
+
/** Company name (optional) */
|
|
1162
|
+
company: z.string(),
|
|
1163
|
+
/** Address line 1 */
|
|
1164
|
+
address_1: z.string(),
|
|
1165
|
+
/** Address line 2 (optional) */
|
|
1166
|
+
address_2: z.string(),
|
|
1167
|
+
/** City */
|
|
1168
|
+
city: z.string(),
|
|
1169
|
+
/** State/Province/Region */
|
|
1170
|
+
state: z.string(),
|
|
1171
|
+
/** Postal code */
|
|
1172
|
+
postcode: z.string(),
|
|
1173
|
+
/** Country code (ISO 3166-1 alpha-2) */
|
|
1174
|
+
country: z.string(),
|
|
1175
|
+
/** Phone number */
|
|
1176
|
+
phone: z.string()
|
|
1177
|
+
});
|
|
1178
|
+
addressSchema.extend({
|
|
1179
|
+
/** Email address (required for billing) */
|
|
1180
|
+
email: z.string().email("Valid email is required")
|
|
1181
|
+
});
|
|
1182
|
+
addressSchemaNonMandatory.extend({
|
|
1183
|
+
/** Email address (can be null for guest carts) */
|
|
1184
|
+
email: z.string().nullable()
|
|
1185
|
+
});
|
|
1186
|
+
var moneySchema = z.object({
|
|
1187
|
+
/** Currency code (e.g., 'USD', 'EUR', 'BAM') */
|
|
1188
|
+
currency_code: z.string(),
|
|
1189
|
+
/** Currency symbol (e.g., '$', '€', 'KM') */
|
|
1190
|
+
currency_symbol: z.string(),
|
|
1191
|
+
/** Number of decimal places (e.g., 2 for dollars/euros) */
|
|
1192
|
+
currency_minor_unit: z.number(),
|
|
1193
|
+
/** Decimal separator character (e.g., '.', ',') */
|
|
1194
|
+
currency_decimal_separator: z.string(),
|
|
1195
|
+
/** Thousands separator character (e.g., ',', '.') */
|
|
1196
|
+
currency_thousand_separator: z.string(),
|
|
1197
|
+
/** Currency symbol prefix (empty if symbol is suffix) */
|
|
1198
|
+
currency_prefix: z.string(),
|
|
1199
|
+
/** Currency symbol suffix (empty if symbol is prefix) */
|
|
1200
|
+
currency_suffix: z.string()
|
|
1201
|
+
});
|
|
1202
|
+
var paginationParamsSchema2 = z.object({
|
|
1203
|
+
/** Current page number */
|
|
1204
|
+
page: z.number().int().positive().optional(),
|
|
1205
|
+
/** Items per page */
|
|
1206
|
+
per_page: z.number().int().positive().max(100).optional(),
|
|
1207
|
+
/** Offset for pagination */
|
|
1208
|
+
offset: z.number().int().nonnegative().optional(),
|
|
1209
|
+
/** Sort order */
|
|
1210
|
+
order: z.enum(["asc", "desc"]).optional(),
|
|
1211
|
+
/** Field to sort by */
|
|
1212
|
+
orderby: z.string().optional()
|
|
1213
|
+
});
|
|
1214
|
+
z.object({
|
|
1215
|
+
/** Total number of items */
|
|
1216
|
+
total: z.number(),
|
|
1217
|
+
/** Total number of pages */
|
|
1218
|
+
totalPages: z.number(),
|
|
1219
|
+
/** Current page */
|
|
1220
|
+
currentPage: z.number(),
|
|
1221
|
+
/** Items per page */
|
|
1222
|
+
perPage: z.number()
|
|
1223
|
+
});
|
|
825
1224
|
|
|
826
|
-
export { BaseError, ENDPOINTS, WordPressApiError, WordPressDataValidationError, calculatePagination, createClient, getPaginationMeta, mapWordPressCode };
|
|
1225
|
+
export { addressSchema as AddressSchema, AvatarUrlsSchema, BaseError, CategoriesListSchema, CategoryParamsSchema, CategorySchema, CurrentUserSchema, ENDPOINTS, EmbeddedPostSchema, EmbeddedPostsListSchema, GuidSchema, HalLinkItemSchema, HalLinksSchema, ImageMetaSchema, JwtErrorResponseSchema, JwtLoginInputSchema, JwtTokenResponseSchema, JwtValidateResponseSchema, MediaDetailsSchema, MediaListSchema, MediaSchema, MediaSizeSchema, MediaSizesSchema, moneySchema as MoneySchema, paginationParamsSchema2 as PaginationParamsSchema, PostParamsSchema, PostSchema, PostStatusSchema, PostsListSchema, RenderedContentSchema, TagSchema, TagsListSchema, UserSchema, UsersListSchema, WordPressApiError, WordPressBaseSchema, WordPressDataValidationError, calculatePagination, createClient, getPaginationMeta, mapWordPressCode };
|
|
827
1226
|
//# sourceMappingURL=index.js.map
|
|
828
1227
|
//# sourceMappingURL=index.js.map
|