@shopperlabs/shopper-types 1.0.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.
Files changed (46) hide show
  1. package/README.md +67 -0
  2. package/dist/address.d.ts +43 -0
  3. package/dist/address.js +8 -0
  4. package/dist/attribute.d.ts +51 -0
  5. package/dist/attribute.js +13 -0
  6. package/dist/brand.d.ts +23 -0
  7. package/dist/brand.js +2 -0
  8. package/dist/carrier.d.ts +51 -0
  9. package/dist/carrier.js +2 -0
  10. package/dist/category.d.ts +27 -0
  11. package/dist/category.js +2 -0
  12. package/dist/channel.d.ts +22 -0
  13. package/dist/channel.js +2 -0
  14. package/dist/collection.d.ts +71 -0
  15. package/dist/collection.js +33 -0
  16. package/dist/common.d.ts +94 -0
  17. package/dist/common.js +24 -0
  18. package/dist/country.d.ts +33 -0
  19. package/dist/country.js +2 -0
  20. package/dist/currency.d.ts +18 -0
  21. package/dist/currency.js +2 -0
  22. package/dist/customer.d.ts +48 -0
  23. package/dist/customer.js +11 -0
  24. package/dist/discount.d.ts +70 -0
  25. package/dist/discount.js +23 -0
  26. package/dist/index.d.ts +21 -0
  27. package/dist/index.js +37 -0
  28. package/dist/inventory.d.ts +64 -0
  29. package/dist/inventory.js +2 -0
  30. package/dist/media.d.ts +6 -0
  31. package/dist/media.js +2 -0
  32. package/dist/order.d.ts +198 -0
  33. package/dist/order.js +29 -0
  34. package/dist/payment_method.d.ts +25 -0
  35. package/dist/payment_method.js +2 -0
  36. package/dist/product.d.ts +75 -0
  37. package/dist/product.js +10 -0
  38. package/dist/product_variant.d.ts +37 -0
  39. package/dist/product_variant.js +2 -0
  40. package/dist/review.d.ts +35 -0
  41. package/dist/review.js +2 -0
  42. package/dist/supplier.d.ts +26 -0
  43. package/dist/supplier.js +2 -0
  44. package/dist/zone.d.ts +43 -0
  45. package/dist/zone.js +2 -0
  46. package/package.json +31 -0
@@ -0,0 +1,26 @@
1
+ import type { Entity, Metadata } from './common';
2
+ /**
3
+ * Supplier model.
4
+ */
5
+ export interface Supplier extends Entity {
6
+ /** The name of the supplier. */
7
+ name: string;
8
+ /** The slug of the supplier. */
9
+ slug: string | null;
10
+ /** The email of the supplier. */
11
+ email: string | null;
12
+ /** The phone number of the supplier. */
13
+ phone: string | null;
14
+ /** The contact name at the supplier. */
15
+ contact_name: string | null;
16
+ /** The website URL of the supplier. */
17
+ website: string | null;
18
+ /** The description of the supplier. */
19
+ description: string | null;
20
+ /** Additional notes about the supplier. */
21
+ notes: string | null;
22
+ /** Whether the supplier is enabled. */
23
+ is_enabled: boolean;
24
+ /** The metadata of the supplier. */
25
+ metadata: Metadata;
26
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/dist/zone.d.ts ADDED
@@ -0,0 +1,43 @@
1
+ import type { Carrier, CarrierOption } from './carrier';
2
+ import type { Collection } from './collection';
3
+ import type { Entity, Metadata } from './common';
4
+ import type { Country } from './country';
5
+ import type { Currency } from './currency';
6
+ import type { PaymentMethod } from './payment_method';
7
+ /**
8
+ * Zone model.
9
+ */
10
+ export interface Zone extends Entity {
11
+ /** The name of the zone. */
12
+ name: string;
13
+ /** The slug of the zone. */
14
+ slug: string;
15
+ /** The code of the zone. */
16
+ code: string | null;
17
+ /** Whether the zone is enabled. */
18
+ is_enabled: boolean;
19
+ /** The currency ID of the zone. */
20
+ currency_id: number | null;
21
+ /** The metadata of the zone. */
22
+ metadata: Metadata;
23
+ /** Computed: carriers names joined. */
24
+ carriers_name?: string;
25
+ /** Computed: countries names joined. */
26
+ countries_name?: string;
27
+ /** Computed: payment methods names joined. */
28
+ payments_name?: string;
29
+ /** Computed: currency code. */
30
+ currency_code?: string;
31
+ /** The currency of the zone. */
32
+ currency?: Currency;
33
+ /** The carriers in this zone. */
34
+ carriers?: Carrier[];
35
+ /** The shipping options in this zone. */
36
+ shippingOptions?: CarrierOption[];
37
+ /** The payment methods in this zone. */
38
+ paymentMethods?: PaymentMethod[];
39
+ /** The countries in this zone. */
40
+ countries?: Country[];
41
+ /** The collections in this zone. */
42
+ collections?: Collection[];
43
+ }
package/dist/zone.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "@shopperlabs/shopper-types",
3
+ "version": "1.0.0",
4
+ "description": "TypeScript types for Laravel Shopper",
5
+ "author": "Arthur Monney <monneylobe@gmail.com> (https://arthurmonney.me)",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "license": "MIT",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/shopperlabs/shopper-types.git"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/shopperlabs/shopper-types/issues"
15
+ },
16
+ "homepage": "https://github.com/shopperlabs/shopper-types#readme",
17
+ "publishConfig": {
18
+ "access": "public"
19
+ },
20
+ "files": [
21
+ "dist"
22
+ ],
23
+ "scripts": {
24
+ "build": "tsc",
25
+ "watch": "tsc --watch",
26
+ "prepublishOnly": "npm run build"
27
+ },
28
+ "devDependencies": {
29
+ "typescript": "^5.2.2"
30
+ }
31
+ }