@arascreative/erp-client 3.2.0 → 3.3.0

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.
@@ -968,6 +968,143 @@ export type CreateBatch409 = {
968
968
  instance?: string;
969
969
  errors?: CreateBatch409Errors;
970
970
  };
971
+ export type CreateProductBodyCatalogVariantsItemAttributesItem = {
972
+ name: string;
973
+ value: string;
974
+ };
975
+ export type CreateProductBodyCatalogVariantsItemSourcesItem = {
976
+ warehouseId: string;
977
+ masterItemId: string;
978
+ quantityPerUnit: number;
979
+ };
980
+ export type CreateProductBodyCatalogVariantsItemWeightAnyOf = {
981
+ value: number;
982
+ unit: string;
983
+ };
984
+ export type CreateProductBodyCatalogVariantsItemWeight = CreateProductBodyCatalogVariantsItemWeightAnyOf | null;
985
+ export type CreateProductBodyCatalogVariantsItemPricingSaleAnyOf = {
986
+ amount: number;
987
+ currency: string;
988
+ startAt: string;
989
+ endAt: string;
990
+ };
991
+ export type CreateProductBodyCatalogVariantsItemPricingSale = CreateProductBodyCatalogVariantsItemPricingSaleAnyOf | null;
992
+ export type CreateProductBodyCatalogVariantsItemPricingWholesaleItem = {
993
+ minQty: number;
994
+ amount: number;
995
+ currency: string;
996
+ };
997
+ export type CreateProductBodyCatalogVariantsItemPricing = {
998
+ baseAmount: number;
999
+ baseCurrency: string;
1000
+ sale?: CreateProductBodyCatalogVariantsItemPricingSale;
1001
+ wholesale: CreateProductBodyCatalogVariantsItemPricingWholesaleItem[];
1002
+ };
1003
+ export type CreateProductBodyCatalogVariantsItem = {
1004
+ code: string;
1005
+ attributes: CreateProductBodyCatalogVariantsItemAttributesItem[];
1006
+ sources: CreateProductBodyCatalogVariantsItemSourcesItem[];
1007
+ weight?: CreateProductBodyCatalogVariantsItemWeight;
1008
+ pricing: CreateProductBodyCatalogVariantsItemPricing;
1009
+ };
1010
+ export type CreateProductBodyCatalogImagesItem = {
1011
+ fileId: string;
1012
+ sortOrder: number;
1013
+ };
1014
+ export type CreateProductBodyCatalog = {
1015
+ categoryId: string;
1016
+ name: string;
1017
+ slug: string;
1018
+ classification: string;
1019
+ variants: CreateProductBodyCatalogVariantsItem[];
1020
+ images: CreateProductBodyCatalogImagesItem[];
1021
+ };
1022
+ export type CreateProductBodyShippingServicesItem = {
1023
+ code: string;
1024
+ enabled: boolean;
1025
+ couriers: string[];
1026
+ };
1027
+ export type CreateProductBodyShippingDiscount = unknown | null;
1028
+ export type CreateProductBodyShippingDisplay = {
1029
+ mergeExtraFee: boolean;
1030
+ showOriginalPrice: boolean;
1031
+ hideCouriers: boolean;
1032
+ hideOrigin: boolean;
1033
+ };
1034
+ export type CreateProductBodyShippingCoverageCheck = {
1035
+ enabled: boolean;
1036
+ onUncovered: string;
1037
+ };
1038
+ export type CreateProductBodyShipping = {
1039
+ mode: string;
1040
+ flatAmount: number;
1041
+ useStoreDefaults: boolean;
1042
+ services: CreateProductBodyShippingServicesItem[];
1043
+ extraFee: number;
1044
+ discount?: CreateProductBodyShippingDiscount;
1045
+ display: CreateProductBodyShippingDisplay;
1046
+ coverageCheck: CreateProductBodyShippingCoverageCheck;
1047
+ };
1048
+ export type CreateProductBodyPaymentsTax = {
1049
+ enabled: boolean;
1050
+ ratePercent: number;
1051
+ priceIncludesTax: boolean;
1052
+ };
1053
+ export type CreateProductBodyPayments = {
1054
+ useStoreDefaults: boolean;
1055
+ methods: unknown[];
1056
+ tax: CreateProductBodyPaymentsTax;
1057
+ };
1058
+ export type CreateProductBodyAssignmentMembersItem = {
1059
+ userId: string;
1060
+ value: number;
1061
+ };
1062
+ export type CreateProductBodyAssignment = {
1063
+ distribution: string;
1064
+ members: CreateProductBodyAssignmentMembersItem[];
1065
+ };
1066
+ export type CreateProductBody = {
1067
+ requestedStatus: string;
1068
+ catalog: CreateProductBodyCatalog;
1069
+ shipping: CreateProductBodyShipping;
1070
+ payments: CreateProductBodyPayments;
1071
+ assignment: CreateProductBodyAssignment;
1072
+ };
1073
+ export type CreateProduct201 = {
1074
+ id: string;
1075
+ };
1076
+ export type CreateProduct400Errors = {
1077
+ [key: string]: string[];
1078
+ };
1079
+ export type CreateProduct400 = {
1080
+ type: string;
1081
+ title: string;
1082
+ status: number;
1083
+ detail?: string;
1084
+ instance?: string;
1085
+ errors?: CreateProduct400Errors;
1086
+ };
1087
+ export type CreateProduct501Errors = {
1088
+ [key: string]: string[];
1089
+ };
1090
+ export type CreateProduct501 = {
1091
+ type: string;
1092
+ title: string;
1093
+ status: number;
1094
+ detail?: string;
1095
+ instance?: string;
1096
+ errors?: CreateProduct501Errors;
1097
+ };
1098
+ export type ListCouriers200Item = {
1099
+ code: string;
1100
+ name: string;
1101
+ services: string[];
1102
+ };
1103
+ export type ListBankCodes200ItemName = string | null;
1104
+ export type ListBankCodes200Item = {
1105
+ code: string;
1106
+ name: ListBankCodes200ItemName;
1107
+ };
971
1108
  export type GetHealth200 = {
972
1109
  status: string;
973
1110
  timestamp: string;
@@ -2278,6 +2415,173 @@ export declare const useCreateBatch: <TError = CreateBatch400 | CreateBatch404 |
2278
2415
  }, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof createBatch>>, TError, {
2279
2416
  data: CreateBatchBody;
2280
2417
  }, TContext>;
2418
+ /**
2419
+ * Product setup contract covering catalog, shipping, payments, and assignment. Not implemented yet.
2420
+ * @summary Create a product
2421
+ */
2422
+ export type createProductResponse201 = {
2423
+ data: CreateProduct201;
2424
+ status: 201;
2425
+ };
2426
+ export type createProductResponse400 = {
2427
+ data: CreateProduct400;
2428
+ status: 400;
2429
+ };
2430
+ export type createProductResponse501 = {
2431
+ data: CreateProduct501;
2432
+ status: 501;
2433
+ };
2434
+ export type createProductResponseSuccess = (createProductResponse201) & {
2435
+ headers: Headers;
2436
+ };
2437
+ export type createProductResponseError = (createProductResponse400 | createProductResponse501) & {
2438
+ headers: Headers;
2439
+ };
2440
+ export type createProductResponse = (createProductResponseSuccess | createProductResponseError);
2441
+ export declare const getCreateProductUrl: () => string;
2442
+ export declare const createProduct: (createProductBody: CreateProductBody, options?: RequestInit) => Promise<createProductResponse>;
2443
+ export declare const getCreateProductMutationOptions: <TError = CreateProduct400 | CreateProduct501, TContext = unknown>(options?: {
2444
+ mutation?: UseMutationOptions<Awaited<ReturnType<typeof createProduct>>, TError, {
2445
+ data: CreateProductBody;
2446
+ }, TContext>;
2447
+ fetch?: RequestInit;
2448
+ }) => UseMutationOptions<Awaited<ReturnType<typeof createProduct>>, TError, {
2449
+ data: CreateProductBody;
2450
+ }, TContext>;
2451
+ export type CreateProductMutationResult = NonNullable<Awaited<ReturnType<typeof createProduct>>>;
2452
+ export type CreateProductMutationBody = CreateProductBody;
2453
+ export type CreateProductMutationError = CreateProduct400 | CreateProduct501;
2454
+ /**
2455
+ * @summary Create a product
2456
+ */
2457
+ export declare const useCreateProduct: <TError = CreateProduct400 | CreateProduct501, TContext = unknown>(options?: {
2458
+ mutation?: UseMutationOptions<Awaited<ReturnType<typeof createProduct>>, TError, {
2459
+ data: CreateProductBody;
2460
+ }, TContext>;
2461
+ fetch?: RequestInit;
2462
+ }, queryClient?: QueryClient) => UseMutationResult<Awaited<ReturnType<typeof createProduct>>, TError, {
2463
+ data: CreateProductBody;
2464
+ }, TContext>;
2465
+ /**
2466
+ * @summary List supported couriers and their services
2467
+ */
2468
+ export type listCouriersResponse200 = {
2469
+ data: ListCouriers200Item[];
2470
+ status: 200;
2471
+ };
2472
+ export type listCouriersResponseSuccess = (listCouriersResponse200) & {
2473
+ headers: Headers;
2474
+ };
2475
+ export type listCouriersResponse = (listCouriersResponseSuccess);
2476
+ export declare const getListCouriersUrl: () => string;
2477
+ export declare const listCouriers: (options?: RequestInit) => Promise<listCouriersResponse>;
2478
+ export declare const getListCouriersQueryKey: () => readonly ["/api/v1/couriers"];
2479
+ export declare const getListCouriersQueryOptions: <TData = Awaited<ReturnType<typeof listCouriers>>, TError = unknown>(options?: {
2480
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listCouriers>>, TError, TData>>;
2481
+ fetch?: RequestInit;
2482
+ }) => UseQueryOptions<Awaited<ReturnType<typeof listCouriers>>, TError, TData> & {
2483
+ queryKey: DataTag<QueryKey, TData, TError>;
2484
+ };
2485
+ export type ListCouriersQueryResult = NonNullable<Awaited<ReturnType<typeof listCouriers>>>;
2486
+ export type ListCouriersQueryError = unknown;
2487
+ export declare function useListCouriers<TData = Awaited<ReturnType<typeof listCouriers>>, TError = unknown>(options: {
2488
+ query: Partial<UseQueryOptions<Awaited<ReturnType<typeof listCouriers>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof listCouriers>>, TError, Awaited<ReturnType<typeof listCouriers>>>, 'initialData'>;
2489
+ fetch?: RequestInit;
2490
+ }, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
2491
+ queryKey: DataTag<QueryKey, TData, TError>;
2492
+ };
2493
+ export declare function useListCouriers<TData = Awaited<ReturnType<typeof listCouriers>>, TError = unknown>(options?: {
2494
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listCouriers>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof listCouriers>>, TError, Awaited<ReturnType<typeof listCouriers>>>, 'initialData'>;
2495
+ fetch?: RequestInit;
2496
+ }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
2497
+ queryKey: DataTag<QueryKey, TData, TError>;
2498
+ };
2499
+ export declare function useListCouriers<TData = Awaited<ReturnType<typeof listCouriers>>, TError = unknown>(options?: {
2500
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listCouriers>>, TError, TData>>;
2501
+ fetch?: RequestInit;
2502
+ }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
2503
+ queryKey: DataTag<QueryKey, TData, TError>;
2504
+ };
2505
+ /**
2506
+ * @summary List supported bank codes and names
2507
+ */
2508
+ export type listBankCodesResponse200 = {
2509
+ data: ListBankCodes200Item[];
2510
+ status: 200;
2511
+ };
2512
+ export type listBankCodesResponseSuccess = (listBankCodesResponse200) & {
2513
+ headers: Headers;
2514
+ };
2515
+ export type listBankCodesResponse = (listBankCodesResponseSuccess);
2516
+ export declare const getListBankCodesUrl: () => string;
2517
+ export declare const listBankCodes: (options?: RequestInit) => Promise<listBankCodesResponse>;
2518
+ export declare const getListBankCodesQueryKey: () => readonly ["/api/v1/banks"];
2519
+ export declare const getListBankCodesQueryOptions: <TData = Awaited<ReturnType<typeof listBankCodes>>, TError = unknown>(options?: {
2520
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listBankCodes>>, TError, TData>>;
2521
+ fetch?: RequestInit;
2522
+ }) => UseQueryOptions<Awaited<ReturnType<typeof listBankCodes>>, TError, TData> & {
2523
+ queryKey: DataTag<QueryKey, TData, TError>;
2524
+ };
2525
+ export type ListBankCodesQueryResult = NonNullable<Awaited<ReturnType<typeof listBankCodes>>>;
2526
+ export type ListBankCodesQueryError = unknown;
2527
+ export declare function useListBankCodes<TData = Awaited<ReturnType<typeof listBankCodes>>, TError = unknown>(options: {
2528
+ query: Partial<UseQueryOptions<Awaited<ReturnType<typeof listBankCodes>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof listBankCodes>>, TError, Awaited<ReturnType<typeof listBankCodes>>>, 'initialData'>;
2529
+ fetch?: RequestInit;
2530
+ }, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
2531
+ queryKey: DataTag<QueryKey, TData, TError>;
2532
+ };
2533
+ export declare function useListBankCodes<TData = Awaited<ReturnType<typeof listBankCodes>>, TError = unknown>(options?: {
2534
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listBankCodes>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof listBankCodes>>, TError, Awaited<ReturnType<typeof listBankCodes>>>, 'initialData'>;
2535
+ fetch?: RequestInit;
2536
+ }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
2537
+ queryKey: DataTag<QueryKey, TData, TError>;
2538
+ };
2539
+ export declare function useListBankCodes<TData = Awaited<ReturnType<typeof listBankCodes>>, TError = unknown>(options?: {
2540
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listBankCodes>>, TError, TData>>;
2541
+ fetch?: RequestInit;
2542
+ }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
2543
+ queryKey: DataTag<QueryKey, TData, TError>;
2544
+ };
2545
+ /**
2546
+ * @summary List supported payment channel codes
2547
+ */
2548
+ export type listPaymentChannelsResponse200 = {
2549
+ data: string[];
2550
+ status: 200;
2551
+ };
2552
+ export type listPaymentChannelsResponseSuccess = (listPaymentChannelsResponse200) & {
2553
+ headers: Headers;
2554
+ };
2555
+ export type listPaymentChannelsResponse = (listPaymentChannelsResponseSuccess);
2556
+ export declare const getListPaymentChannelsUrl: () => string;
2557
+ export declare const listPaymentChannels: (options?: RequestInit) => Promise<listPaymentChannelsResponse>;
2558
+ export declare const getListPaymentChannelsQueryKey: () => readonly ["/api/v1/payment-channels"];
2559
+ export declare const getListPaymentChannelsQueryOptions: <TData = Awaited<ReturnType<typeof listPaymentChannels>>, TError = unknown>(options?: {
2560
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listPaymentChannels>>, TError, TData>>;
2561
+ fetch?: RequestInit;
2562
+ }) => UseQueryOptions<Awaited<ReturnType<typeof listPaymentChannels>>, TError, TData> & {
2563
+ queryKey: DataTag<QueryKey, TData, TError>;
2564
+ };
2565
+ export type ListPaymentChannelsQueryResult = NonNullable<Awaited<ReturnType<typeof listPaymentChannels>>>;
2566
+ export type ListPaymentChannelsQueryError = unknown;
2567
+ export declare function useListPaymentChannels<TData = Awaited<ReturnType<typeof listPaymentChannels>>, TError = unknown>(options: {
2568
+ query: Partial<UseQueryOptions<Awaited<ReturnType<typeof listPaymentChannels>>, TError, TData>> & Pick<DefinedInitialDataOptions<Awaited<ReturnType<typeof listPaymentChannels>>, TError, Awaited<ReturnType<typeof listPaymentChannels>>>, 'initialData'>;
2569
+ fetch?: RequestInit;
2570
+ }, queryClient?: QueryClient): DefinedUseQueryResult<TData, TError> & {
2571
+ queryKey: DataTag<QueryKey, TData, TError>;
2572
+ };
2573
+ export declare function useListPaymentChannels<TData = Awaited<ReturnType<typeof listPaymentChannels>>, TError = unknown>(options?: {
2574
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listPaymentChannels>>, TError, TData>> & Pick<UndefinedInitialDataOptions<Awaited<ReturnType<typeof listPaymentChannels>>, TError, Awaited<ReturnType<typeof listPaymentChannels>>>, 'initialData'>;
2575
+ fetch?: RequestInit;
2576
+ }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
2577
+ queryKey: DataTag<QueryKey, TData, TError>;
2578
+ };
2579
+ export declare function useListPaymentChannels<TData = Awaited<ReturnType<typeof listPaymentChannels>>, TError = unknown>(options?: {
2580
+ query?: Partial<UseQueryOptions<Awaited<ReturnType<typeof listPaymentChannels>>, TError, TData>>;
2581
+ fetch?: RequestInit;
2582
+ }, queryClient?: QueryClient): UseQueryResult<TData, TError> & {
2583
+ queryKey: DataTag<QueryKey, TData, TError>;
2584
+ };
2281
2585
  /**
2282
2586
  * @summary Health check
2283
2587
  */