@atomic-solutions/wordpress-api-client 0.1.0 → 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/index.cjs CHANGED
@@ -698,96 +698,6 @@ var setupErrorInterceptor = (axiosInstance, config, client) => {
698
698
  }
699
699
  );
700
700
  };
701
- var addressSchema = zod.z.object({
702
- /** First name */
703
- first_name: zod.z.string().min(1, "First name is required"),
704
- /** Last name */
705
- last_name: zod.z.string().min(1, "Last name is required"),
706
- /** Company name (optional) */
707
- company: zod.z.string(),
708
- /** Address line 1 */
709
- address_1: zod.z.string().min(1, "Address is required"),
710
- /** Address line 2 (optional) */
711
- address_2: zod.z.string(),
712
- /** City */
713
- city: zod.z.string().min(1, "City is required"),
714
- /** State/Province/Region */
715
- state: zod.z.string(),
716
- /** Postal code */
717
- postcode: zod.z.string().min(1, "Postal code is required"),
718
- /** Country code (ISO 3166-1 alpha-2) */
719
- country: zod.z.string(),
720
- /** Phone number */
721
- phone: zod.z.string().min(1, "Phone number is required")
722
- });
723
- var addressSchemaNonMandatory = zod.z.object({
724
- /** First name */
725
- first_name: zod.z.string(),
726
- /** Last name */
727
- last_name: zod.z.string(),
728
- /** Company name (optional) */
729
- company: zod.z.string(),
730
- /** Address line 1 */
731
- address_1: zod.z.string(),
732
- /** Address line 2 (optional) */
733
- address_2: zod.z.string(),
734
- /** City */
735
- city: zod.z.string(),
736
- /** State/Province/Region */
737
- state: zod.z.string(),
738
- /** Postal code */
739
- postcode: zod.z.string(),
740
- /** Country code (ISO 3166-1 alpha-2) */
741
- country: zod.z.string(),
742
- /** Phone number */
743
- phone: zod.z.string()
744
- });
745
- addressSchema.extend({
746
- /** Email address (required for billing) */
747
- email: zod.z.string().email("Valid email is required")
748
- });
749
- addressSchemaNonMandatory.extend({
750
- /** Email address (can be null for guest carts) */
751
- email: zod.z.string().nullable()
752
- });
753
- var moneySchema = zod.z.object({
754
- /** Currency code (e.g., 'USD', 'EUR', 'BAM') */
755
- currency_code: zod.z.string(),
756
- /** Currency symbol (e.g., '$', '€', 'KM') */
757
- currency_symbol: zod.z.string(),
758
- /** Number of decimal places (e.g., 2 for dollars/euros) */
759
- currency_minor_unit: zod.z.number(),
760
- /** Decimal separator character (e.g., '.', ',') */
761
- currency_decimal_separator: zod.z.string(),
762
- /** Thousands separator character (e.g., ',', '.') */
763
- currency_thousand_separator: zod.z.string(),
764
- /** Currency symbol prefix (empty if symbol is suffix) */
765
- currency_prefix: zod.z.string(),
766
- /** Currency symbol suffix (empty if symbol is prefix) */
767
- currency_suffix: zod.z.string()
768
- });
769
- var paginationParamsSchema = zod.z.object({
770
- /** Current page number */
771
- page: zod.z.number().int().positive().optional(),
772
- /** Items per page */
773
- per_page: zod.z.number().int().positive().max(100).optional(),
774
- /** Offset for pagination */
775
- offset: zod.z.number().int().nonnegative().optional(),
776
- /** Sort order */
777
- order: zod.z.enum(["asc", "desc"]).optional(),
778
- /** Field to sort by */
779
- orderby: zod.z.string().optional()
780
- });
781
- zod.z.object({
782
- /** Total number of items */
783
- total: zod.z.number(),
784
- /** Total number of pages */
785
- totalPages: zod.z.number(),
786
- /** Current page */
787
- currentPage: zod.z.number(),
788
- /** Items per page */
789
- perPage: zod.z.number()
790
- });
791
701
  var JwtLoginInputSchema = zod.z.object({
792
702
  username: zod.z.string(),
793
703
  password: zod.z.string()
@@ -863,6 +773,28 @@ var WordPressBaseSchema = zod.z.object({
863
773
  link: zod.z.string(),
864
774
  _links: HalLinksSchema.optional()
865
775
  });
776
+ var paginationParamsSchema = zod.z.object({
777
+ /** Current page number */
778
+ page: zod.z.number().int().positive().optional(),
779
+ /** Items per page */
780
+ per_page: zod.z.number().int().positive().max(100).optional(),
781
+ /** Offset for pagination */
782
+ offset: zod.z.number().int().nonnegative().optional(),
783
+ /** Sort order */
784
+ order: zod.z.enum(["asc", "desc"]).optional(),
785
+ /** Field to sort by */
786
+ orderby: zod.z.string().optional()
787
+ });
788
+ zod.z.object({
789
+ /** Total number of items */
790
+ total: zod.z.number(),
791
+ /** Total number of pages */
792
+ totalPages: zod.z.number(),
793
+ /** Current page */
794
+ currentPage: zod.z.number(),
795
+ /** Items per page */
796
+ perPage: zod.z.number()
797
+ });
866
798
  var CategorySchema = zod.z.object({
867
799
  id: zod.z.number(),
868
800
  count: zod.z.number(),
@@ -1205,6 +1137,96 @@ var createClient = (config) => {
1205
1137
  setupErrorInterceptor(axiosInstance, fullConfig, client);
1206
1138
  return client;
1207
1139
  };
1140
+ var addressSchema = zod.z.object({
1141
+ /** First name */
1142
+ first_name: zod.z.string().min(1, "First name is required"),
1143
+ /** Last name */
1144
+ last_name: zod.z.string().min(1, "Last name is required"),
1145
+ /** Company name (optional) */
1146
+ company: zod.z.string(),
1147
+ /** Address line 1 */
1148
+ address_1: zod.z.string().min(1, "Address is required"),
1149
+ /** Address line 2 (optional) */
1150
+ address_2: zod.z.string(),
1151
+ /** City */
1152
+ city: zod.z.string().min(1, "City is required"),
1153
+ /** State/Province/Region */
1154
+ state: zod.z.string(),
1155
+ /** Postal code */
1156
+ postcode: zod.z.string().min(1, "Postal code is required"),
1157
+ /** Country code (ISO 3166-1 alpha-2) */
1158
+ country: zod.z.string(),
1159
+ /** Phone number */
1160
+ phone: zod.z.string().min(1, "Phone number is required")
1161
+ });
1162
+ var addressSchemaNonMandatory = zod.z.object({
1163
+ /** First name */
1164
+ first_name: zod.z.string(),
1165
+ /** Last name */
1166
+ last_name: zod.z.string(),
1167
+ /** Company name (optional) */
1168
+ company: zod.z.string(),
1169
+ /** Address line 1 */
1170
+ address_1: zod.z.string(),
1171
+ /** Address line 2 (optional) */
1172
+ address_2: zod.z.string(),
1173
+ /** City */
1174
+ city: zod.z.string(),
1175
+ /** State/Province/Region */
1176
+ state: zod.z.string(),
1177
+ /** Postal code */
1178
+ postcode: zod.z.string(),
1179
+ /** Country code (ISO 3166-1 alpha-2) */
1180
+ country: zod.z.string(),
1181
+ /** Phone number */
1182
+ phone: zod.z.string()
1183
+ });
1184
+ addressSchema.extend({
1185
+ /** Email address (required for billing) */
1186
+ email: zod.z.string().email("Valid email is required")
1187
+ });
1188
+ addressSchemaNonMandatory.extend({
1189
+ /** Email address (can be null for guest carts) */
1190
+ email: zod.z.string().nullable()
1191
+ });
1192
+ var moneySchema = zod.z.object({
1193
+ /** Currency code (e.g., 'USD', 'EUR', 'BAM') */
1194
+ currency_code: zod.z.string(),
1195
+ /** Currency symbol (e.g., '$', '€', 'KM') */
1196
+ currency_symbol: zod.z.string(),
1197
+ /** Number of decimal places (e.g., 2 for dollars/euros) */
1198
+ currency_minor_unit: zod.z.number(),
1199
+ /** Decimal separator character (e.g., '.', ',') */
1200
+ currency_decimal_separator: zod.z.string(),
1201
+ /** Thousands separator character (e.g., ',', '.') */
1202
+ currency_thousand_separator: zod.z.string(),
1203
+ /** Currency symbol prefix (empty if symbol is suffix) */
1204
+ currency_prefix: zod.z.string(),
1205
+ /** Currency symbol suffix (empty if symbol is prefix) */
1206
+ currency_suffix: zod.z.string()
1207
+ });
1208
+ var paginationParamsSchema2 = zod.z.object({
1209
+ /** Current page number */
1210
+ page: zod.z.number().int().positive().optional(),
1211
+ /** Items per page */
1212
+ per_page: zod.z.number().int().positive().max(100).optional(),
1213
+ /** Offset for pagination */
1214
+ offset: zod.z.number().int().nonnegative().optional(),
1215
+ /** Sort order */
1216
+ order: zod.z.enum(["asc", "desc"]).optional(),
1217
+ /** Field to sort by */
1218
+ orderby: zod.z.string().optional()
1219
+ });
1220
+ zod.z.object({
1221
+ /** Total number of items */
1222
+ total: zod.z.number(),
1223
+ /** Total number of pages */
1224
+ totalPages: zod.z.number(),
1225
+ /** Current page */
1226
+ currentPage: zod.z.number(),
1227
+ /** Items per page */
1228
+ perPage: zod.z.number()
1229
+ });
1208
1230
 
1209
1231
  exports.AddressSchema = addressSchema;
1210
1232
  exports.AvatarUrlsSchema = AvatarUrlsSchema;
@@ -1230,7 +1252,7 @@ exports.MediaSchema = MediaSchema;
1230
1252
  exports.MediaSizeSchema = MediaSizeSchema;
1231
1253
  exports.MediaSizesSchema = MediaSizesSchema;
1232
1254
  exports.MoneySchema = moneySchema;
1233
- exports.PaginationParamsSchema = paginationParamsSchema;
1255
+ exports.PaginationParamsSchema = paginationParamsSchema2;
1234
1256
  exports.PostParamsSchema = PostParamsSchema;
1235
1257
  exports.PostSchema = PostSchema;
1236
1258
  exports.PostStatusSchema = PostStatusSchema;