@alphabite/medusa-sdk 0.6.9 → 0.6.11
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.d.mts +91 -27
- package/dist/index.d.ts +91 -27
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -346,9 +346,9 @@ interface EcontCity {
|
|
|
346
346
|
*/
|
|
347
347
|
id: string;
|
|
348
348
|
/**
|
|
349
|
-
* Econt API ID
|
|
349
|
+
* Econt API ID (stored as string)
|
|
350
350
|
*/
|
|
351
|
-
econtId:
|
|
351
|
+
econtId: string;
|
|
352
352
|
/**
|
|
353
353
|
* City name in local language
|
|
354
354
|
*/
|
|
@@ -387,9 +387,9 @@ interface EcontQuarter {
|
|
|
387
387
|
*/
|
|
388
388
|
nameEn: string;
|
|
389
389
|
/**
|
|
390
|
-
* Econt city ID
|
|
390
|
+
* Econt city ID (stored as string)
|
|
391
391
|
*/
|
|
392
|
-
econtCityId:
|
|
392
|
+
econtCityId: string;
|
|
393
393
|
}
|
|
394
394
|
/**
|
|
395
395
|
* Econt Office entity returned from the API
|
|
@@ -400,13 +400,9 @@ interface EcontOffice {
|
|
|
400
400
|
*/
|
|
401
401
|
id: string;
|
|
402
402
|
/**
|
|
403
|
-
* Econt office ID
|
|
404
|
-
*/
|
|
405
|
-
econtId: number;
|
|
406
|
-
/**
|
|
407
|
-
* Econt office code
|
|
403
|
+
* Econt office ID (stored as string)
|
|
408
404
|
*/
|
|
409
|
-
|
|
405
|
+
econtId: string;
|
|
410
406
|
/**
|
|
411
407
|
* Office name in local language
|
|
412
408
|
*/
|
|
@@ -416,11 +412,11 @@ interface EcontOffice {
|
|
|
416
412
|
*/
|
|
417
413
|
nameEn: string;
|
|
418
414
|
/**
|
|
419
|
-
* Econt city ID
|
|
415
|
+
* Econt city ID (stored as string)
|
|
420
416
|
*/
|
|
421
|
-
econtCityId:
|
|
417
|
+
econtCityId: string;
|
|
422
418
|
/**
|
|
423
|
-
* Econt quarter ID
|
|
419
|
+
* Econt quarter ID (can be null)
|
|
424
420
|
*/
|
|
425
421
|
econtQuarterId?: string | null;
|
|
426
422
|
/**
|
|
@@ -448,21 +444,21 @@ interface EcontOffice {
|
|
|
448
444
|
*/
|
|
449
445
|
info?: string | null;
|
|
450
446
|
/**
|
|
451
|
-
* Normal business hours start time
|
|
447
|
+
* Normal business hours start time
|
|
452
448
|
*/
|
|
453
|
-
normalBusinessHoursFrom:
|
|
449
|
+
normalBusinessHoursFrom: Date;
|
|
454
450
|
/**
|
|
455
|
-
* Normal business hours end time
|
|
451
|
+
* Normal business hours end time
|
|
456
452
|
*/
|
|
457
|
-
normalBusinessHoursTo:
|
|
453
|
+
normalBusinessHoursTo: Date;
|
|
458
454
|
/**
|
|
459
|
-
* Half day business hours start time
|
|
455
|
+
* Half day business hours start time
|
|
460
456
|
*/
|
|
461
|
-
halfDayBusinessHoursFrom?:
|
|
457
|
+
halfDayBusinessHoursFrom?: Date | null;
|
|
462
458
|
/**
|
|
463
|
-
* Half day business hours end time
|
|
459
|
+
* Half day business hours end time
|
|
464
460
|
*/
|
|
465
|
-
halfDayBusinessHoursTo?:
|
|
461
|
+
halfDayBusinessHoursTo?: Date | null;
|
|
466
462
|
}
|
|
467
463
|
/**
|
|
468
464
|
* Econt Street entity returned from the API
|
|
@@ -473,13 +469,13 @@ interface EcontStreet {
|
|
|
473
469
|
*/
|
|
474
470
|
id: string;
|
|
475
471
|
/**
|
|
476
|
-
* Econt street ID
|
|
472
|
+
* Econt street ID (stored as string)
|
|
477
473
|
*/
|
|
478
|
-
econtId:
|
|
474
|
+
econtId: string;
|
|
479
475
|
/**
|
|
480
|
-
* Econt city ID
|
|
476
|
+
* Econt city ID (stored as string)
|
|
481
477
|
*/
|
|
482
|
-
econtCityId:
|
|
478
|
+
econtCityId: string;
|
|
483
479
|
/**
|
|
484
480
|
* Street name in local language
|
|
485
481
|
*/
|
|
@@ -489,6 +485,23 @@ interface EcontStreet {
|
|
|
489
485
|
*/
|
|
490
486
|
nameEn: string | null;
|
|
491
487
|
}
|
|
488
|
+
/**
|
|
489
|
+
* Econt Region entity returned from the API
|
|
490
|
+
*/
|
|
491
|
+
interface EcontRegion {
|
|
492
|
+
/**
|
|
493
|
+
* Medusa-generated ID with prefix (e.g., "ereg_...")
|
|
494
|
+
*/
|
|
495
|
+
id: string;
|
|
496
|
+
/**
|
|
497
|
+
* Region name in local language
|
|
498
|
+
*/
|
|
499
|
+
name: string;
|
|
500
|
+
/**
|
|
501
|
+
* Region name in English
|
|
502
|
+
*/
|
|
503
|
+
nameEn: string;
|
|
504
|
+
}
|
|
492
505
|
/**
|
|
493
506
|
* Address city information for validation
|
|
494
507
|
*/
|
|
@@ -750,7 +763,7 @@ interface ListOfficesInput {
|
|
|
750
763
|
interface ListOfficesOutput {
|
|
751
764
|
/**
|
|
752
765
|
* Array of offices with standard fields
|
|
753
|
-
* Includes: id, econtId,
|
|
766
|
+
* Includes: id, econtId, name, nameEn, econtCityId, econtQuarterId, fullAddress, etc.
|
|
754
767
|
*/
|
|
755
768
|
offices: EcontOffice[];
|
|
756
769
|
/**
|
|
@@ -817,6 +830,53 @@ interface ListStreetsOutput {
|
|
|
817
830
|
*/
|
|
818
831
|
offset: number;
|
|
819
832
|
}
|
|
833
|
+
/**
|
|
834
|
+
* Input for listing Econt regions with optional filtering
|
|
835
|
+
*/
|
|
836
|
+
interface ListRegionsInput {
|
|
837
|
+
/**
|
|
838
|
+
* Search query to filter regions by name or nameEn
|
|
839
|
+
*/
|
|
840
|
+
q?: string;
|
|
841
|
+
/**
|
|
842
|
+
* Comma-separated list of fields to include
|
|
843
|
+
*/
|
|
844
|
+
fields?: string;
|
|
845
|
+
/**
|
|
846
|
+
* Maximum number of results (1-500, default: 15)
|
|
847
|
+
*/
|
|
848
|
+
limit?: number;
|
|
849
|
+
/**
|
|
850
|
+
* Number of results to skip (default: 0)
|
|
851
|
+
*/
|
|
852
|
+
offset?: number;
|
|
853
|
+
/**
|
|
854
|
+
* Sort order (e.g., "name", "-name" for descending)
|
|
855
|
+
*/
|
|
856
|
+
order?: string;
|
|
857
|
+
}
|
|
858
|
+
/**
|
|
859
|
+
* Response containing list of Econt regions
|
|
860
|
+
*/
|
|
861
|
+
interface ListRegionsOutput {
|
|
862
|
+
/**
|
|
863
|
+
* Array of regions with standard fields
|
|
864
|
+
* Includes: id, name, nameEn
|
|
865
|
+
*/
|
|
866
|
+
regions: EcontRegion[];
|
|
867
|
+
/**
|
|
868
|
+
* Total count of regions matching the query
|
|
869
|
+
*/
|
|
870
|
+
count: number;
|
|
871
|
+
/**
|
|
872
|
+
* Maximum number of results per page
|
|
873
|
+
*/
|
|
874
|
+
limit: number;
|
|
875
|
+
/**
|
|
876
|
+
* Number of results skipped
|
|
877
|
+
*/
|
|
878
|
+
offset: number;
|
|
879
|
+
}
|
|
820
880
|
/**
|
|
821
881
|
* Available Econt plugin endpoints
|
|
822
882
|
*/
|
|
@@ -847,6 +907,10 @@ type EcontEndpoints = {
|
|
|
847
907
|
* Requires econtCityId to filter streets by city
|
|
848
908
|
*/
|
|
849
909
|
listStreets: (input: ListStreetsInput, headers?: ClientHeaders) => Promise<ListStreetsOutput>;
|
|
910
|
+
/**
|
|
911
|
+
* Lists Econt regions with optional filtering and pagination
|
|
912
|
+
*/
|
|
913
|
+
listRegions: (input: ListRegionsInput, headers?: ClientHeaders) => Promise<ListRegionsOutput>;
|
|
850
914
|
};
|
|
851
915
|
/**
|
|
852
916
|
* Econt fulfillment provider plugin
|
|
@@ -921,4 +985,4 @@ declare class AlphabiteMedusaSdk<TPlugins extends readonly Plugin<any, any>[], T
|
|
|
921
985
|
constructor(medusaOptions: AlphabiteMedusaConfig, plugins: TPlugins, options?: TOptions);
|
|
922
986
|
}
|
|
923
987
|
|
|
924
|
-
export { type AddItemToWishlistInput, type AddItemToWishlistOutput, type AggregateCounts, type AggregateCountsInput, type AggregateCountsOutput, type AlphabiteClientOptions, type AlphabiteMedusaConfig, AlphabiteMedusaSdk, type CountryCode, type CreateClientTokenOutput, type CreateReviewInput, type CreateReviewOutput, type CreateWishlistInput, type CreateWishlistOutput, type DeleteReviewInput, type DeleteReviewOutput, type DeleteWishlistInput, type DeleteWishlistOutput, type EcontCity, type EcontOffice, type EcontQuarter, type EcontStreet, type ImportWishlistInput, type ImportWishlistOutput, type ListCitiesInput, type ListCitiesOutput, type ListItemsInput, type ListItemsOutput, type ListOfficesInput, type ListOfficesOutput, type ListProductReviewsInput, type ListProductReviewsOutput, type ListQuartersInput, type ListQuartersOutput, type ListReviewsInput, type ListReviewsOutput, type ListStreetsInput, type ListStreetsOutput, type ListWishlistsInput, type ListWishlistsOutput, type PaypalPaymentSessionInputData, type Plugin, type PluginsToAlphabite, type ProductCategoryImage, type ProductCollectionImage, type ProductVariantImage, type RemoveItemFromWishlistInput, type RemoveItemFromWishlistOutput, type RetrieveWishlistInput, type RetrieveWishlistOutput, type Review, type ShareWishlistInput, type ShareWishlistOutput, type TotalItemsCountInput, type TotalItemsCountOutput, type TransferWishlistInput, type TransferWishlistOutput, type UpdateWishlistInput, type UpdateWishlistOutput, type UploadImageFilesInput, type ValidateAddressCity, type ValidateAddressInput, type ValidateAddressInputAddress, type ValidateAddressLocation, type ValidateAddressOutput, type ValidatedAddress, type Wishlist, type WishlistItem, econtPlugin, paypalPlugin, reviewsPlugin, wishlistPlugin };
|
|
988
|
+
export { type AddItemToWishlistInput, type AddItemToWishlistOutput, type AggregateCounts, type AggregateCountsInput, type AggregateCountsOutput, type AlphabiteClientOptions, type AlphabiteMedusaConfig, AlphabiteMedusaSdk, type CountryCode, type CreateClientTokenOutput, type CreateReviewInput, type CreateReviewOutput, type CreateWishlistInput, type CreateWishlistOutput, type DeleteReviewInput, type DeleteReviewOutput, type DeleteWishlistInput, type DeleteWishlistOutput, type EcontCity, type EcontOffice, type EcontQuarter, type EcontRegion, type EcontStreet, type ImportWishlistInput, type ImportWishlistOutput, type ListCitiesInput, type ListCitiesOutput, type ListItemsInput, type ListItemsOutput, type ListOfficesInput, type ListOfficesOutput, type ListProductReviewsInput, type ListProductReviewsOutput, type ListQuartersInput, type ListQuartersOutput, type ListRegionsInput, type ListRegionsOutput, type ListReviewsInput, type ListReviewsOutput, type ListStreetsInput, type ListStreetsOutput, type ListWishlistsInput, type ListWishlistsOutput, type PaypalPaymentSessionInputData, type Plugin, type PluginsToAlphabite, type ProductCategoryImage, type ProductCollectionImage, type ProductVariantImage, type RemoveItemFromWishlistInput, type RemoveItemFromWishlistOutput, type RetrieveWishlistInput, type RetrieveWishlistOutput, type Review, type ShareWishlistInput, type ShareWishlistOutput, type TotalItemsCountInput, type TotalItemsCountOutput, type TransferWishlistInput, type TransferWishlistOutput, type UpdateWishlistInput, type UpdateWishlistOutput, type UploadImageFilesInput, type ValidateAddressCity, type ValidateAddressInput, type ValidateAddressInputAddress, type ValidateAddressLocation, type ValidateAddressOutput, type ValidatedAddress, type Wishlist, type WishlistItem, econtPlugin, paypalPlugin, reviewsPlugin, wishlistPlugin };
|
package/dist/index.d.ts
CHANGED
|
@@ -346,9 +346,9 @@ interface EcontCity {
|
|
|
346
346
|
*/
|
|
347
347
|
id: string;
|
|
348
348
|
/**
|
|
349
|
-
* Econt API ID
|
|
349
|
+
* Econt API ID (stored as string)
|
|
350
350
|
*/
|
|
351
|
-
econtId:
|
|
351
|
+
econtId: string;
|
|
352
352
|
/**
|
|
353
353
|
* City name in local language
|
|
354
354
|
*/
|
|
@@ -387,9 +387,9 @@ interface EcontQuarter {
|
|
|
387
387
|
*/
|
|
388
388
|
nameEn: string;
|
|
389
389
|
/**
|
|
390
|
-
* Econt city ID
|
|
390
|
+
* Econt city ID (stored as string)
|
|
391
391
|
*/
|
|
392
|
-
econtCityId:
|
|
392
|
+
econtCityId: string;
|
|
393
393
|
}
|
|
394
394
|
/**
|
|
395
395
|
* Econt Office entity returned from the API
|
|
@@ -400,13 +400,9 @@ interface EcontOffice {
|
|
|
400
400
|
*/
|
|
401
401
|
id: string;
|
|
402
402
|
/**
|
|
403
|
-
* Econt office ID
|
|
404
|
-
*/
|
|
405
|
-
econtId: number;
|
|
406
|
-
/**
|
|
407
|
-
* Econt office code
|
|
403
|
+
* Econt office ID (stored as string)
|
|
408
404
|
*/
|
|
409
|
-
|
|
405
|
+
econtId: string;
|
|
410
406
|
/**
|
|
411
407
|
* Office name in local language
|
|
412
408
|
*/
|
|
@@ -416,11 +412,11 @@ interface EcontOffice {
|
|
|
416
412
|
*/
|
|
417
413
|
nameEn: string;
|
|
418
414
|
/**
|
|
419
|
-
* Econt city ID
|
|
415
|
+
* Econt city ID (stored as string)
|
|
420
416
|
*/
|
|
421
|
-
econtCityId:
|
|
417
|
+
econtCityId: string;
|
|
422
418
|
/**
|
|
423
|
-
* Econt quarter ID
|
|
419
|
+
* Econt quarter ID (can be null)
|
|
424
420
|
*/
|
|
425
421
|
econtQuarterId?: string | null;
|
|
426
422
|
/**
|
|
@@ -448,21 +444,21 @@ interface EcontOffice {
|
|
|
448
444
|
*/
|
|
449
445
|
info?: string | null;
|
|
450
446
|
/**
|
|
451
|
-
* Normal business hours start time
|
|
447
|
+
* Normal business hours start time
|
|
452
448
|
*/
|
|
453
|
-
normalBusinessHoursFrom:
|
|
449
|
+
normalBusinessHoursFrom: Date;
|
|
454
450
|
/**
|
|
455
|
-
* Normal business hours end time
|
|
451
|
+
* Normal business hours end time
|
|
456
452
|
*/
|
|
457
|
-
normalBusinessHoursTo:
|
|
453
|
+
normalBusinessHoursTo: Date;
|
|
458
454
|
/**
|
|
459
|
-
* Half day business hours start time
|
|
455
|
+
* Half day business hours start time
|
|
460
456
|
*/
|
|
461
|
-
halfDayBusinessHoursFrom?:
|
|
457
|
+
halfDayBusinessHoursFrom?: Date | null;
|
|
462
458
|
/**
|
|
463
|
-
* Half day business hours end time
|
|
459
|
+
* Half day business hours end time
|
|
464
460
|
*/
|
|
465
|
-
halfDayBusinessHoursTo?:
|
|
461
|
+
halfDayBusinessHoursTo?: Date | null;
|
|
466
462
|
}
|
|
467
463
|
/**
|
|
468
464
|
* Econt Street entity returned from the API
|
|
@@ -473,13 +469,13 @@ interface EcontStreet {
|
|
|
473
469
|
*/
|
|
474
470
|
id: string;
|
|
475
471
|
/**
|
|
476
|
-
* Econt street ID
|
|
472
|
+
* Econt street ID (stored as string)
|
|
477
473
|
*/
|
|
478
|
-
econtId:
|
|
474
|
+
econtId: string;
|
|
479
475
|
/**
|
|
480
|
-
* Econt city ID
|
|
476
|
+
* Econt city ID (stored as string)
|
|
481
477
|
*/
|
|
482
|
-
econtCityId:
|
|
478
|
+
econtCityId: string;
|
|
483
479
|
/**
|
|
484
480
|
* Street name in local language
|
|
485
481
|
*/
|
|
@@ -489,6 +485,23 @@ interface EcontStreet {
|
|
|
489
485
|
*/
|
|
490
486
|
nameEn: string | null;
|
|
491
487
|
}
|
|
488
|
+
/**
|
|
489
|
+
* Econt Region entity returned from the API
|
|
490
|
+
*/
|
|
491
|
+
interface EcontRegion {
|
|
492
|
+
/**
|
|
493
|
+
* Medusa-generated ID with prefix (e.g., "ereg_...")
|
|
494
|
+
*/
|
|
495
|
+
id: string;
|
|
496
|
+
/**
|
|
497
|
+
* Region name in local language
|
|
498
|
+
*/
|
|
499
|
+
name: string;
|
|
500
|
+
/**
|
|
501
|
+
* Region name in English
|
|
502
|
+
*/
|
|
503
|
+
nameEn: string;
|
|
504
|
+
}
|
|
492
505
|
/**
|
|
493
506
|
* Address city information for validation
|
|
494
507
|
*/
|
|
@@ -750,7 +763,7 @@ interface ListOfficesInput {
|
|
|
750
763
|
interface ListOfficesOutput {
|
|
751
764
|
/**
|
|
752
765
|
* Array of offices with standard fields
|
|
753
|
-
* Includes: id, econtId,
|
|
766
|
+
* Includes: id, econtId, name, nameEn, econtCityId, econtQuarterId, fullAddress, etc.
|
|
754
767
|
*/
|
|
755
768
|
offices: EcontOffice[];
|
|
756
769
|
/**
|
|
@@ -817,6 +830,53 @@ interface ListStreetsOutput {
|
|
|
817
830
|
*/
|
|
818
831
|
offset: number;
|
|
819
832
|
}
|
|
833
|
+
/**
|
|
834
|
+
* Input for listing Econt regions with optional filtering
|
|
835
|
+
*/
|
|
836
|
+
interface ListRegionsInput {
|
|
837
|
+
/**
|
|
838
|
+
* Search query to filter regions by name or nameEn
|
|
839
|
+
*/
|
|
840
|
+
q?: string;
|
|
841
|
+
/**
|
|
842
|
+
* Comma-separated list of fields to include
|
|
843
|
+
*/
|
|
844
|
+
fields?: string;
|
|
845
|
+
/**
|
|
846
|
+
* Maximum number of results (1-500, default: 15)
|
|
847
|
+
*/
|
|
848
|
+
limit?: number;
|
|
849
|
+
/**
|
|
850
|
+
* Number of results to skip (default: 0)
|
|
851
|
+
*/
|
|
852
|
+
offset?: number;
|
|
853
|
+
/**
|
|
854
|
+
* Sort order (e.g., "name", "-name" for descending)
|
|
855
|
+
*/
|
|
856
|
+
order?: string;
|
|
857
|
+
}
|
|
858
|
+
/**
|
|
859
|
+
* Response containing list of Econt regions
|
|
860
|
+
*/
|
|
861
|
+
interface ListRegionsOutput {
|
|
862
|
+
/**
|
|
863
|
+
* Array of regions with standard fields
|
|
864
|
+
* Includes: id, name, nameEn
|
|
865
|
+
*/
|
|
866
|
+
regions: EcontRegion[];
|
|
867
|
+
/**
|
|
868
|
+
* Total count of regions matching the query
|
|
869
|
+
*/
|
|
870
|
+
count: number;
|
|
871
|
+
/**
|
|
872
|
+
* Maximum number of results per page
|
|
873
|
+
*/
|
|
874
|
+
limit: number;
|
|
875
|
+
/**
|
|
876
|
+
* Number of results skipped
|
|
877
|
+
*/
|
|
878
|
+
offset: number;
|
|
879
|
+
}
|
|
820
880
|
/**
|
|
821
881
|
* Available Econt plugin endpoints
|
|
822
882
|
*/
|
|
@@ -847,6 +907,10 @@ type EcontEndpoints = {
|
|
|
847
907
|
* Requires econtCityId to filter streets by city
|
|
848
908
|
*/
|
|
849
909
|
listStreets: (input: ListStreetsInput, headers?: ClientHeaders) => Promise<ListStreetsOutput>;
|
|
910
|
+
/**
|
|
911
|
+
* Lists Econt regions with optional filtering and pagination
|
|
912
|
+
*/
|
|
913
|
+
listRegions: (input: ListRegionsInput, headers?: ClientHeaders) => Promise<ListRegionsOutput>;
|
|
850
914
|
};
|
|
851
915
|
/**
|
|
852
916
|
* Econt fulfillment provider plugin
|
|
@@ -921,4 +985,4 @@ declare class AlphabiteMedusaSdk<TPlugins extends readonly Plugin<any, any>[], T
|
|
|
921
985
|
constructor(medusaOptions: AlphabiteMedusaConfig, plugins: TPlugins, options?: TOptions);
|
|
922
986
|
}
|
|
923
987
|
|
|
924
|
-
export { type AddItemToWishlistInput, type AddItemToWishlistOutput, type AggregateCounts, type AggregateCountsInput, type AggregateCountsOutput, type AlphabiteClientOptions, type AlphabiteMedusaConfig, AlphabiteMedusaSdk, type CountryCode, type CreateClientTokenOutput, type CreateReviewInput, type CreateReviewOutput, type CreateWishlistInput, type CreateWishlistOutput, type DeleteReviewInput, type DeleteReviewOutput, type DeleteWishlistInput, type DeleteWishlistOutput, type EcontCity, type EcontOffice, type EcontQuarter, type EcontStreet, type ImportWishlistInput, type ImportWishlistOutput, type ListCitiesInput, type ListCitiesOutput, type ListItemsInput, type ListItemsOutput, type ListOfficesInput, type ListOfficesOutput, type ListProductReviewsInput, type ListProductReviewsOutput, type ListQuartersInput, type ListQuartersOutput, type ListReviewsInput, type ListReviewsOutput, type ListStreetsInput, type ListStreetsOutput, type ListWishlistsInput, type ListWishlistsOutput, type PaypalPaymentSessionInputData, type Plugin, type PluginsToAlphabite, type ProductCategoryImage, type ProductCollectionImage, type ProductVariantImage, type RemoveItemFromWishlistInput, type RemoveItemFromWishlistOutput, type RetrieveWishlistInput, type RetrieveWishlistOutput, type Review, type ShareWishlistInput, type ShareWishlistOutput, type TotalItemsCountInput, type TotalItemsCountOutput, type TransferWishlistInput, type TransferWishlistOutput, type UpdateWishlistInput, type UpdateWishlistOutput, type UploadImageFilesInput, type ValidateAddressCity, type ValidateAddressInput, type ValidateAddressInputAddress, type ValidateAddressLocation, type ValidateAddressOutput, type ValidatedAddress, type Wishlist, type WishlistItem, econtPlugin, paypalPlugin, reviewsPlugin, wishlistPlugin };
|
|
988
|
+
export { type AddItemToWishlistInput, type AddItemToWishlistOutput, type AggregateCounts, type AggregateCountsInput, type AggregateCountsOutput, type AlphabiteClientOptions, type AlphabiteMedusaConfig, AlphabiteMedusaSdk, type CountryCode, type CreateClientTokenOutput, type CreateReviewInput, type CreateReviewOutput, type CreateWishlistInput, type CreateWishlistOutput, type DeleteReviewInput, type DeleteReviewOutput, type DeleteWishlistInput, type DeleteWishlistOutput, type EcontCity, type EcontOffice, type EcontQuarter, type EcontRegion, type EcontStreet, type ImportWishlistInput, type ImportWishlistOutput, type ListCitiesInput, type ListCitiesOutput, type ListItemsInput, type ListItemsOutput, type ListOfficesInput, type ListOfficesOutput, type ListProductReviewsInput, type ListProductReviewsOutput, type ListQuartersInput, type ListQuartersOutput, type ListRegionsInput, type ListRegionsOutput, type ListReviewsInput, type ListReviewsOutput, type ListStreetsInput, type ListStreetsOutput, type ListWishlistsInput, type ListWishlistsOutput, type PaypalPaymentSessionInputData, type Plugin, type PluginsToAlphabite, type ProductCategoryImage, type ProductCollectionImage, type ProductVariantImage, type RemoveItemFromWishlistInput, type RemoveItemFromWishlistOutput, type RetrieveWishlistInput, type RetrieveWishlistOutput, type Review, type ShareWishlistInput, type ShareWishlistOutput, type TotalItemsCountInput, type TotalItemsCountOutput, type TransferWishlistInput, type TransferWishlistOutput, type UpdateWishlistInput, type UpdateWishlistOutput, type UploadImageFilesInput, type ValidateAddressCity, type ValidateAddressInput, type ValidateAddressInputAddress, type ValidateAddressLocation, type ValidateAddressOutput, type ValidatedAddress, type Wishlist, type WishlistItem, econtPlugin, paypalPlugin, reviewsPlugin, wishlistPlugin };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var u=require('@medusajs/js-sdk');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var u__default=/*#__PURE__*/_interopDefault(u);var l={name:"wishlist",endpoints:(r,s)=>({create:async({...t},e)=>r.client.fetch("/store/wishlists",{method:"POST",body:t,headers:{...await s?.getAuthHeader?.(),...e}}),list:async({limit:t=10,offset:e=0,...i},n)=>r.client.fetch("/store/wishlists",{method:"GET",headers:{...await s?.getAuthHeader?.(),...n},query:{limit:t,offset:e,...i}}),retrieve:async({id:t,...e},i)=>r.client.fetch(`/store/wishlists/${t}`,{method:"GET",headers:{...await s?.getAuthHeader?.(),...i},query:e}),update:async({id:t,...e},i)=>r.client.fetch(`/store/wishlists/${t}`,{method:"PUT",body:e,headers:{...await s?.getAuthHeader?.(),...i}}),delete:async({id:t},e)=>r.client.fetch(`/store/wishlists/${t}`,{method:"DELETE",headers:{...await s?.getAuthHeader?.(),...e}}),totalItemsCount:async({wishlist_id:t},e)=>r.client.fetch("store/wishlists/total-items-count",{method:"GET",headers:{...await s?.getAuthHeader?.(),...e},query:{wishlist_id:t}}),transfer:async({id:t},e)=>r.client.fetch(`/store/wishlists/${t}/transfer`,{method:"POST",headers:{...await s?.getAuthHeader?.(),...e}}),share:async({id:t},e)=>r.client.fetch(`/store/wishlists/${t}/share`,{method:"POST",headers:{...await s?.getAuthHeader?.(),...e}}),import:async(t,e)=>r.client.fetch("/store/wishlists/import",{method:"POST",body:t,headers:{...await s?.getAuthHeader?.(),...e}}),addItem:async({id:t,...e},i)=>r.client.fetch(`/store/wishlists/${t}/add-item`,{method:"POST",body:e,headers:{...await s?.getAuthHeader?.(),...i}}),listItems:async({id:t,limit:e=10,offset:i=0,...n},a)=>r.client.fetch(`/store/wishlists/${t}/items`,{method:"GET",headers:{...await s?.getAuthHeader?.(),...a},query:{limit:e,offset:i,...n}}),removeItem:async({wishlist_item_id:t,id:e},i)=>r.client.fetch(`/store/wishlists/${e}/items/${t}`,{method:"DELETE",headers:{...await s?.getAuthHeader?.(),...i}})})};var c={name:"paypal",endpoints:(r,s)=>({createClientToken:async t=>r.client.fetch("/store/paypal/client-token",{method:"POST",headers:{...await s?.getAuthHeader?.(),...t}})})};var h={name:"reviews",endpoints:(r,s,t)=>({create:async(e,i)=>r.client.fetch("/store/reviews",{method:"POST",body:e,headers:{...await s?.getAuthHeader?.(),...i}}),list:async({...e},i)=>r.client.fetch("/store/products/reviews",{method:"GET",headers:{...await s?.getAuthHeader?.(),...i},query:e}),listProductReviews:async({product_id:e,...i},n)=>r.client.fetch(`/store/reviews/product/${e}`,{method:"GET",query:i,headers:{...await s?.getAuthHeader?.(),...n}}),aggregateCounts:async({product_id:e,...i},n)=>r.client.fetch(`/store/reviews/product/${e}/aggregate-counts`,{method:"GET",query:i,headers:{...await s?.getAuthHeader?.(),...n}}),delete:async({id:e},i)=>r.client.fetch(`/store/reviews/${e}`,{method:"DELETE",headers:{...await s?.getAuthHeader?.(),...i}}),uploadImageFiles:async(e,i)=>{let n=t?.baseUrl,a=t?.publishableKey;if(!n||!a)throw new Error("Missing baseUrl or publishableKey");return await(await fetch(`${n}/store/reviews/files/images/upload`,{method:"POST",body:e.formData,headers:{...i,"x-publishable-api-key":a}})).json()}})};var f={name:"econt",endpoints:(r,s)=>({validateAddress:async(t,e)=>r.client.fetch("/store/econt/validate-address",{method:"POST",body:t,headers:{...await s?.getAuthHeader?.(),...e}}),listCities:async({countryCode:t="BGR",...e},i)=>r.client.fetch("/store/econt/cities",{method:"GET",headers:{...await s?.getAuthHeader?.(),...i},query:{countryCode:t,...e}}),listQuarters:async({econtCityId:t,countryCode:e="BGR",...i},n)=>r.client.fetch("/store/econt/quarters",{method:"GET",headers:{...await s?.getAuthHeader?.(),...n},query:{econtCityId:t,countryCode:e,...i}}),listOffices:async({countryCode:t="BGR",...e},i)=>r.client.fetch("/store/econt/offices",{method:"GET",headers:{...await s?.getAuthHeader?.(),...i},query:{countryCode:t,...e}}),listStreets:async(t,e)=>r.client.fetch("/store/econt/streets",{method:"GET",headers:{...await s?.getAuthHeader?.(),...e},query:t})})};var o=class extends u__default.default{constructor(s,t,e){super(s),this.options=e,this.medusaConfig=s;let i={};t.forEach(n=>{i[n.name]=n.endpoints(this,this.options,this.medusaConfig);}),this.alphabite=i;}};exports.AlphabiteMedusaSdk=o;exports.econtPlugin=f;exports.paypalPlugin=c;exports.reviewsPlugin=h;exports.wishlistPlugin=l;
|
|
1
|
+
'use strict';var u=require('@medusajs/js-sdk');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var u__default=/*#__PURE__*/_interopDefault(u);var l={name:"wishlist",endpoints:(r,s)=>({create:async({...t},e)=>r.client.fetch("/store/wishlists",{method:"POST",body:t,headers:{...await s?.getAuthHeader?.(),...e}}),list:async({limit:t=10,offset:e=0,...i},n)=>r.client.fetch("/store/wishlists",{method:"GET",headers:{...await s?.getAuthHeader?.(),...n},query:{limit:t,offset:e,...i}}),retrieve:async({id:t,...e},i)=>r.client.fetch(`/store/wishlists/${t}`,{method:"GET",headers:{...await s?.getAuthHeader?.(),...i},query:e}),update:async({id:t,...e},i)=>r.client.fetch(`/store/wishlists/${t}`,{method:"PUT",body:e,headers:{...await s?.getAuthHeader?.(),...i}}),delete:async({id:t},e)=>r.client.fetch(`/store/wishlists/${t}`,{method:"DELETE",headers:{...await s?.getAuthHeader?.(),...e}}),totalItemsCount:async({wishlist_id:t},e)=>r.client.fetch("store/wishlists/total-items-count",{method:"GET",headers:{...await s?.getAuthHeader?.(),...e},query:{wishlist_id:t}}),transfer:async({id:t},e)=>r.client.fetch(`/store/wishlists/${t}/transfer`,{method:"POST",headers:{...await s?.getAuthHeader?.(),...e}}),share:async({id:t},e)=>r.client.fetch(`/store/wishlists/${t}/share`,{method:"POST",headers:{...await s?.getAuthHeader?.(),...e}}),import:async(t,e)=>r.client.fetch("/store/wishlists/import",{method:"POST",body:t,headers:{...await s?.getAuthHeader?.(),...e}}),addItem:async({id:t,...e},i)=>r.client.fetch(`/store/wishlists/${t}/add-item`,{method:"POST",body:e,headers:{...await s?.getAuthHeader?.(),...i}}),listItems:async({id:t,limit:e=10,offset:i=0,...n},a)=>r.client.fetch(`/store/wishlists/${t}/items`,{method:"GET",headers:{...await s?.getAuthHeader?.(),...a},query:{limit:e,offset:i,...n}}),removeItem:async({wishlist_item_id:t,id:e},i)=>r.client.fetch(`/store/wishlists/${e}/items/${t}`,{method:"DELETE",headers:{...await s?.getAuthHeader?.(),...i}})})};var c={name:"paypal",endpoints:(r,s)=>({createClientToken:async t=>r.client.fetch("/store/paypal/client-token",{method:"POST",headers:{...await s?.getAuthHeader?.(),...t}})})};var h={name:"reviews",endpoints:(r,s,t)=>({create:async(e,i)=>r.client.fetch("/store/reviews",{method:"POST",body:e,headers:{...await s?.getAuthHeader?.(),...i}}),list:async({...e},i)=>r.client.fetch("/store/products/reviews",{method:"GET",headers:{...await s?.getAuthHeader?.(),...i},query:e}),listProductReviews:async({product_id:e,...i},n)=>r.client.fetch(`/store/reviews/product/${e}`,{method:"GET",query:i,headers:{...await s?.getAuthHeader?.(),...n}}),aggregateCounts:async({product_id:e,...i},n)=>r.client.fetch(`/store/reviews/product/${e}/aggregate-counts`,{method:"GET",query:i,headers:{...await s?.getAuthHeader?.(),...n}}),delete:async({id:e},i)=>r.client.fetch(`/store/reviews/${e}`,{method:"DELETE",headers:{...await s?.getAuthHeader?.(),...i}}),uploadImageFiles:async(e,i)=>{let n=t?.baseUrl,a=t?.publishableKey;if(!n||!a)throw new Error("Missing baseUrl or publishableKey");return await(await fetch(`${n}/store/reviews/files/images/upload`,{method:"POST",body:e.formData,headers:{...i,"x-publishable-api-key":a}})).json()}})};var f={name:"econt",endpoints:(r,s)=>({validateAddress:async(t,e)=>r.client.fetch("/store/econt/validate-address",{method:"POST",body:t,headers:{...await s?.getAuthHeader?.(),...e}}),listCities:async({countryCode:t="BGR",...e},i)=>r.client.fetch("/store/econt/cities",{method:"GET",headers:{...await s?.getAuthHeader?.(),...i},query:{countryCode:t,...e}}),listQuarters:async({econtCityId:t,countryCode:e="BGR",...i},n)=>r.client.fetch("/store/econt/quarters",{method:"GET",headers:{...await s?.getAuthHeader?.(),...n},query:{econtCityId:t,countryCode:e,...i}}),listOffices:async({countryCode:t="BGR",...e},i)=>r.client.fetch("/store/econt/offices",{method:"GET",headers:{...await s?.getAuthHeader?.(),...i},query:{countryCode:t,...e}}),listStreets:async(t,e)=>r.client.fetch("/store/econt/streets",{method:"GET",headers:{...await s?.getAuthHeader?.(),...e},query:t}),listRegions:async(t,e)=>r.client.fetch("/store/econt/regions",{method:"GET",headers:{...await s?.getAuthHeader?.(),...e},query:t})})};var o=class extends u__default.default{constructor(s,t,e){super(s),this.options=e,this.medusaConfig=s;let i={};t.forEach(n=>{i[n.name]=n.endpoints(this,this.options,this.medusaConfig);}),this.alphabite=i;}};exports.AlphabiteMedusaSdk=o;exports.econtPlugin=f;exports.paypalPlugin=c;exports.reviewsPlugin=h;exports.wishlistPlugin=l;
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import u from'@medusajs/js-sdk';var l={name:"wishlist",endpoints:(r,s)=>({create:async({...t},e)=>r.client.fetch("/store/wishlists",{method:"POST",body:t,headers:{...await s?.getAuthHeader?.(),...e}}),list:async({limit:t=10,offset:e=0,...i},n)=>r.client.fetch("/store/wishlists",{method:"GET",headers:{...await s?.getAuthHeader?.(),...n},query:{limit:t,offset:e,...i}}),retrieve:async({id:t,...e},i)=>r.client.fetch(`/store/wishlists/${t}`,{method:"GET",headers:{...await s?.getAuthHeader?.(),...i},query:e}),update:async({id:t,...e},i)=>r.client.fetch(`/store/wishlists/${t}`,{method:"PUT",body:e,headers:{...await s?.getAuthHeader?.(),...i}}),delete:async({id:t},e)=>r.client.fetch(`/store/wishlists/${t}`,{method:"DELETE",headers:{...await s?.getAuthHeader?.(),...e}}),totalItemsCount:async({wishlist_id:t},e)=>r.client.fetch("store/wishlists/total-items-count",{method:"GET",headers:{...await s?.getAuthHeader?.(),...e},query:{wishlist_id:t}}),transfer:async({id:t},e)=>r.client.fetch(`/store/wishlists/${t}/transfer`,{method:"POST",headers:{...await s?.getAuthHeader?.(),...e}}),share:async({id:t},e)=>r.client.fetch(`/store/wishlists/${t}/share`,{method:"POST",headers:{...await s?.getAuthHeader?.(),...e}}),import:async(t,e)=>r.client.fetch("/store/wishlists/import",{method:"POST",body:t,headers:{...await s?.getAuthHeader?.(),...e}}),addItem:async({id:t,...e},i)=>r.client.fetch(`/store/wishlists/${t}/add-item`,{method:"POST",body:e,headers:{...await s?.getAuthHeader?.(),...i}}),listItems:async({id:t,limit:e=10,offset:i=0,...n},a)=>r.client.fetch(`/store/wishlists/${t}/items`,{method:"GET",headers:{...await s?.getAuthHeader?.(),...a},query:{limit:e,offset:i,...n}}),removeItem:async({wishlist_item_id:t,id:e},i)=>r.client.fetch(`/store/wishlists/${e}/items/${t}`,{method:"DELETE",headers:{...await s?.getAuthHeader?.(),...i}})})};var c={name:"paypal",endpoints:(r,s)=>({createClientToken:async t=>r.client.fetch("/store/paypal/client-token",{method:"POST",headers:{...await s?.getAuthHeader?.(),...t}})})};var h={name:"reviews",endpoints:(r,s,t)=>({create:async(e,i)=>r.client.fetch("/store/reviews",{method:"POST",body:e,headers:{...await s?.getAuthHeader?.(),...i}}),list:async({...e},i)=>r.client.fetch("/store/products/reviews",{method:"GET",headers:{...await s?.getAuthHeader?.(),...i},query:e}),listProductReviews:async({product_id:e,...i},n)=>r.client.fetch(`/store/reviews/product/${e}`,{method:"GET",query:i,headers:{...await s?.getAuthHeader?.(),...n}}),aggregateCounts:async({product_id:e,...i},n)=>r.client.fetch(`/store/reviews/product/${e}/aggregate-counts`,{method:"GET",query:i,headers:{...await s?.getAuthHeader?.(),...n}}),delete:async({id:e},i)=>r.client.fetch(`/store/reviews/${e}`,{method:"DELETE",headers:{...await s?.getAuthHeader?.(),...i}}),uploadImageFiles:async(e,i)=>{let n=t?.baseUrl,a=t?.publishableKey;if(!n||!a)throw new Error("Missing baseUrl or publishableKey");return await(await fetch(`${n}/store/reviews/files/images/upload`,{method:"POST",body:e.formData,headers:{...i,"x-publishable-api-key":a}})).json()}})};var f={name:"econt",endpoints:(r,s)=>({validateAddress:async(t,e)=>r.client.fetch("/store/econt/validate-address",{method:"POST",body:t,headers:{...await s?.getAuthHeader?.(),...e}}),listCities:async({countryCode:t="BGR",...e},i)=>r.client.fetch("/store/econt/cities",{method:"GET",headers:{...await s?.getAuthHeader?.(),...i},query:{countryCode:t,...e}}),listQuarters:async({econtCityId:t,countryCode:e="BGR",...i},n)=>r.client.fetch("/store/econt/quarters",{method:"GET",headers:{...await s?.getAuthHeader?.(),...n},query:{econtCityId:t,countryCode:e,...i}}),listOffices:async({countryCode:t="BGR",...e},i)=>r.client.fetch("/store/econt/offices",{method:"GET",headers:{...await s?.getAuthHeader?.(),...i},query:{countryCode:t,...e}}),listStreets:async(t,e)=>r.client.fetch("/store/econt/streets",{method:"GET",headers:{...await s?.getAuthHeader?.(),...e},query:t})})};var o=class extends u{constructor(s,t,e){super(s),this.options=e,this.medusaConfig=s;let i={};t.forEach(n=>{i[n.name]=n.endpoints(this,this.options,this.medusaConfig);}),this.alphabite=i;}};export{o as AlphabiteMedusaSdk,f as econtPlugin,c as paypalPlugin,h as reviewsPlugin,l as wishlistPlugin};
|
|
1
|
+
import u from'@medusajs/js-sdk';var l={name:"wishlist",endpoints:(r,s)=>({create:async({...t},e)=>r.client.fetch("/store/wishlists",{method:"POST",body:t,headers:{...await s?.getAuthHeader?.(),...e}}),list:async({limit:t=10,offset:e=0,...i},n)=>r.client.fetch("/store/wishlists",{method:"GET",headers:{...await s?.getAuthHeader?.(),...n},query:{limit:t,offset:e,...i}}),retrieve:async({id:t,...e},i)=>r.client.fetch(`/store/wishlists/${t}`,{method:"GET",headers:{...await s?.getAuthHeader?.(),...i},query:e}),update:async({id:t,...e},i)=>r.client.fetch(`/store/wishlists/${t}`,{method:"PUT",body:e,headers:{...await s?.getAuthHeader?.(),...i}}),delete:async({id:t},e)=>r.client.fetch(`/store/wishlists/${t}`,{method:"DELETE",headers:{...await s?.getAuthHeader?.(),...e}}),totalItemsCount:async({wishlist_id:t},e)=>r.client.fetch("store/wishlists/total-items-count",{method:"GET",headers:{...await s?.getAuthHeader?.(),...e},query:{wishlist_id:t}}),transfer:async({id:t},e)=>r.client.fetch(`/store/wishlists/${t}/transfer`,{method:"POST",headers:{...await s?.getAuthHeader?.(),...e}}),share:async({id:t},e)=>r.client.fetch(`/store/wishlists/${t}/share`,{method:"POST",headers:{...await s?.getAuthHeader?.(),...e}}),import:async(t,e)=>r.client.fetch("/store/wishlists/import",{method:"POST",body:t,headers:{...await s?.getAuthHeader?.(),...e}}),addItem:async({id:t,...e},i)=>r.client.fetch(`/store/wishlists/${t}/add-item`,{method:"POST",body:e,headers:{...await s?.getAuthHeader?.(),...i}}),listItems:async({id:t,limit:e=10,offset:i=0,...n},a)=>r.client.fetch(`/store/wishlists/${t}/items`,{method:"GET",headers:{...await s?.getAuthHeader?.(),...a},query:{limit:e,offset:i,...n}}),removeItem:async({wishlist_item_id:t,id:e},i)=>r.client.fetch(`/store/wishlists/${e}/items/${t}`,{method:"DELETE",headers:{...await s?.getAuthHeader?.(),...i}})})};var c={name:"paypal",endpoints:(r,s)=>({createClientToken:async t=>r.client.fetch("/store/paypal/client-token",{method:"POST",headers:{...await s?.getAuthHeader?.(),...t}})})};var h={name:"reviews",endpoints:(r,s,t)=>({create:async(e,i)=>r.client.fetch("/store/reviews",{method:"POST",body:e,headers:{...await s?.getAuthHeader?.(),...i}}),list:async({...e},i)=>r.client.fetch("/store/products/reviews",{method:"GET",headers:{...await s?.getAuthHeader?.(),...i},query:e}),listProductReviews:async({product_id:e,...i},n)=>r.client.fetch(`/store/reviews/product/${e}`,{method:"GET",query:i,headers:{...await s?.getAuthHeader?.(),...n}}),aggregateCounts:async({product_id:e,...i},n)=>r.client.fetch(`/store/reviews/product/${e}/aggregate-counts`,{method:"GET",query:i,headers:{...await s?.getAuthHeader?.(),...n}}),delete:async({id:e},i)=>r.client.fetch(`/store/reviews/${e}`,{method:"DELETE",headers:{...await s?.getAuthHeader?.(),...i}}),uploadImageFiles:async(e,i)=>{let n=t?.baseUrl,a=t?.publishableKey;if(!n||!a)throw new Error("Missing baseUrl or publishableKey");return await(await fetch(`${n}/store/reviews/files/images/upload`,{method:"POST",body:e.formData,headers:{...i,"x-publishable-api-key":a}})).json()}})};var f={name:"econt",endpoints:(r,s)=>({validateAddress:async(t,e)=>r.client.fetch("/store/econt/validate-address",{method:"POST",body:t,headers:{...await s?.getAuthHeader?.(),...e}}),listCities:async({countryCode:t="BGR",...e},i)=>r.client.fetch("/store/econt/cities",{method:"GET",headers:{...await s?.getAuthHeader?.(),...i},query:{countryCode:t,...e}}),listQuarters:async({econtCityId:t,countryCode:e="BGR",...i},n)=>r.client.fetch("/store/econt/quarters",{method:"GET",headers:{...await s?.getAuthHeader?.(),...n},query:{econtCityId:t,countryCode:e,...i}}),listOffices:async({countryCode:t="BGR",...e},i)=>r.client.fetch("/store/econt/offices",{method:"GET",headers:{...await s?.getAuthHeader?.(),...i},query:{countryCode:t,...e}}),listStreets:async(t,e)=>r.client.fetch("/store/econt/streets",{method:"GET",headers:{...await s?.getAuthHeader?.(),...e},query:t}),listRegions:async(t,e)=>r.client.fetch("/store/econt/regions",{method:"GET",headers:{...await s?.getAuthHeader?.(),...e},query:t})})};var o=class extends u{constructor(s,t,e){super(s),this.options=e,this.medusaConfig=s;let i={};t.forEach(n=>{i[n.name]=n.endpoints(this,this.options,this.medusaConfig);}),this.alphabite=i;}};export{o as AlphabiteMedusaSdk,f as econtPlugin,c as paypalPlugin,h as reviewsPlugin,l as wishlistPlugin};
|