@grafikr/shopify-typescript 1.2.0 → 2.1.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 (71) hide show
  1. package/README.md +2 -2
  2. package/global/CustomEvents.d.ts +38 -0
  3. package/global/Shopify.d.ts +24 -0
  4. package/global/modules/customerPrivacy.d.ts +44 -0
  5. package/package.json +4 -10
  6. package/type/endpoints/BrowsingContextSuggestions.d.ts +3 -0
  7. package/type/endpoints/Cart.d.ts +22 -0
  8. package/type/endpoints/Collection.d.ts +14 -0
  9. package/type/endpoints/Page.d.ts +9 -0
  10. package/type/endpoints/Policy.d.ts +5 -0
  11. package/type/endpoints/Product.d.ts +14 -0
  12. package/type/endpoints/Search.d.ts +20 -0
  13. package/type/json/BrowsingContextSuggestions.d.ts +25 -0
  14. package/type/json/Cart.d.ts +33 -0
  15. package/type/json/Collection.d.ts +12 -0
  16. package/type/json/DiscountAllocation.d.ts +6 -0
  17. package/type/json/DiscountApplication.d.ts +13 -0
  18. package/type/json/FeaturedImage.d.ts +15 -0
  19. package/type/json/Image.d.ts +6 -0
  20. package/type/json/LineItem.d.ts +67 -0
  21. package/type/json/Page.d.ts +9 -0
  22. package/type/json/Policy.d.ts +7 -0
  23. package/type/json/Product.d.ts +22 -0
  24. package/type/json/ProductImage.d.ts +10 -0
  25. package/type/json/ProductOption.d.ts +7 -0
  26. package/type/json/ProductVariant.d.ts +23 -0
  27. package/type/json/Search/Article.d.ts +11 -0
  28. package/type/json/Search/Collection.d.ts +7 -0
  29. package/type/json/Search/Page.d.ts +6 -0
  30. package/type/json/Search/Product.d.ts +18 -0
  31. package/type/json/Search/ProductVariant.d.ts +12 -0
  32. package/type/json/Search/SearchItem.d.ts +7 -0
  33. package/type/liquid/Article.d.ts +18 -0
  34. package/type/liquid/Collection.d.ts +20 -0
  35. package/type/liquid/FeaturedVariantImage.d.ts +11 -0
  36. package/type/liquid/FeaturedVariantMedia.d.ts +8 -0
  37. package/type/liquid/Image.d.ts +7 -0
  38. package/type/{object/Pagination.ts → liquid/Pagination.d.ts} +6 -6
  39. package/type/liquid/PreviewImage.d.ts +6 -0
  40. package/type/liquid/Product.d.ts +29 -0
  41. package/type/liquid/ProductMedia.d.ts +13 -0
  42. package/type/liquid/ProductVariant.d.ts +29 -0
  43. package/global/Shopify.ts +0 -39
  44. package/global/modules/Image.ts +0 -7
  45. package/global/modules/customerPrivacy.ts +0 -15
  46. package/type/Cart.ts +0 -18
  47. package/type/Collection.ts +0 -12
  48. package/type/DiscountAllocations.ts +0 -6
  49. package/type/DiscountApplication.ts +0 -13
  50. package/type/Image.ts +0 -6
  51. package/type/LineItem.ts +0 -49
  52. package/type/Option.ts +0 -7
  53. package/type/Product.ts +0 -22
  54. package/type/ProductImage.ts +0 -10
  55. package/type/Variant.ts +0 -23
  56. package/type/object/Article.ts +0 -18
  57. package/type/object/Collection.ts +0 -17
  58. package/type/object/FeaturedMedia.ts +0 -8
  59. package/type/object/Image.ts +0 -7
  60. package/type/object/Media.ts +0 -13
  61. package/type/object/PreviewImage.ts +0 -6
  62. package/type/object/Product.ts +0 -29
  63. package/type/object/Rule.ts +0 -5
  64. package/type/object/Variant.ts +0 -24
  65. package/type/search/Article.ts +0 -12
  66. package/type/search/Collection.ts +0 -7
  67. package/type/search/FeaturedImage.ts +0 -7
  68. package/type/search/Item.ts +0 -7
  69. package/type/search/Page.ts +0 -6
  70. package/type/search/Product.ts +0 -17
  71. package/type/search/Result.ts +0 -13
package/README.md CHANGED
@@ -7,13 +7,13 @@ This packages adds TypeScript for all Shopify responses and objects.
7
7
  You can install the package using Yarn:
8
8
 
9
9
  ```
10
- $ yarn install @grafikr/shopify-typescript --save
10
+ $ yarn install @grafikr/shopify-typescript
11
11
  ```
12
12
 
13
13
  ### Usage
14
14
 
15
15
  ```ts
16
- import Product from '@grafikr/shopify-typescript/type/Product';
16
+ import type { Product } from '@grafikr/shopify-typescript/type/json/Product';
17
17
 
18
18
  const func = (data: Product) => {
19
19
  ...
@@ -0,0 +1,38 @@
1
+ export type CustomEvents = {
2
+ /** The theme editor preview inspector has been activated */
3
+ 'shopify:inspector:activate': undefined;
4
+
5
+ /** The theme editor preview inspector has been deactivated */
6
+ 'shopify:inspector:deactivate': undefined;
7
+
8
+ /** A section has been added or re-rendered */
9
+ 'shopify:section:load': { sectionId: string };
10
+
11
+ /** A section has been deleted or is being re-rendered */
12
+ 'shopify:section:unload': { sectionId: string };
13
+
14
+ /** The user has selected the section in the sidebar */
15
+ 'shopify:section:select': {
16
+ sectionId: string;
17
+ load: boolean;
18
+ };
19
+
20
+ /** The user has deselected the section in the sidebar. */
21
+ 'shopify:section:deselect': { sectionId: string };
22
+
23
+ /** A section has been reordered */
24
+ 'shopify:section:reorder': { sectionId: string };
25
+
26
+ /** The user has selected the block in the sidebar */
27
+ 'shopify:block:select': {
28
+ blockId: string;
29
+ sectionId: string;
30
+ load: boolean;
31
+ };
32
+
33
+ /** User has deselected the block in the sidebar */
34
+ 'shopify:block:deselect': {
35
+ blockId: string;
36
+ sectionId: string;
37
+ };
38
+ };
@@ -0,0 +1,24 @@
1
+ import type { CustomerPrivacy } from './modules/customerPrivacy';
2
+
3
+ export type Shopify = {
4
+ loadFeatures: (
5
+ features: Array<{ name: string; version: string }>,
6
+ callback: CallableFunction,
7
+ ) => void;
8
+ customerPrivacy?: CustomerPrivacy;
9
+ currency: {
10
+ active: string;
11
+ rate: string;
12
+ };
13
+ cdnHost: string;
14
+ country: string;
15
+ designMode: true | undefined;
16
+ locale: string;
17
+ shop: string;
18
+ recaptchaV3: {
19
+ siteKey: string;
20
+ };
21
+ routes: {
22
+ root: string;
23
+ };
24
+ };
@@ -0,0 +1,44 @@
1
+ type YesNo = '' | 'yes' | 'no';
2
+
3
+ export type CustomerPrivacy = {
4
+ analyticsProcessingAllowed(): boolean;
5
+ currentVisitorConsent(): {
6
+ marketing: YesNo;
7
+ analytics: YesNo;
8
+ preferences: YesNo;
9
+ sale_of_data: YesNo;
10
+ gpc: YesNo;
11
+ };
12
+ doesMerchantSupportGranularConsent(): boolean;
13
+ firstPartyMarketingAllowed(): boolean;
14
+ getCCPAConsent(): YesNo;
15
+ getRegulation(): string;
16
+ getShopPrefs(): { limit: Array<string> };
17
+ getTrackingConsent(): YesNo;
18
+ isRegulationEnforced(): boolean;
19
+ preferencesProcessingAllowed(): boolean;
20
+ saleOfDataRegion(): boolean;
21
+ setCCPAConsent(consent: boolean, callback: () => void): void;
22
+ setTrackingConsent(
23
+ consent: {
24
+ analytics?: boolean;
25
+ marketing?: boolean;
26
+ preferences?: boolean;
27
+ sale_of_data?: boolean;
28
+ },
29
+ callback: () => void,
30
+ ): void;
31
+ shouldShowBanner(): boolean;
32
+ thirdPartyMarketingAllowed(): boolean;
33
+
34
+ /** @deprecated Use consent as an object instead */
35
+ setTrackingConsent(consent: boolean, callback: () => void): void;
36
+ /** @deprecated Use saleOfDataRegion instead */
37
+ shouldShowCCPABanner(): boolean;
38
+ /** @deprecated Use shouldShowBanner instead */
39
+ shouldShowGDPRBanner(): boolean;
40
+ /** @deprecated */
41
+ userCanBeTracked(): boolean;
42
+ /** @deprecated */
43
+ userDataCanBeSold(): boolean;
44
+ };
package/package.json CHANGED
@@ -1,22 +1,16 @@
1
1
  {
2
2
  "name": "@grafikr/shopify-typescript",
3
- "version": "1.2.0",
3
+ "version": "2.1.0",
4
4
  "license": "MIT",
5
5
  "scripts": {
6
- "lint": "node_modules/.bin/eslint . --ext .js,.ts",
7
- "test": "yarn lint"
6
+ "format": "yarn prettier . --write"
8
7
  },
9
8
  "engines": {
10
9
  "node": ">=16.0.0"
11
10
  },
12
11
  "devDependencies": {
13
- "@typescript-eslint/eslint-plugin": "^5.0.0",
14
- "@typescript-eslint/parser": "^5.0.0",
15
- "eslint": "^8.4.0",
16
- "eslint-config-airbnb-base": "^15.0.0",
17
- "eslint-config-airbnb-typescript": "^17.0.0",
18
- "eslint-plugin-import": "^2.0.0",
19
- "typescript": "^5.0.2"
12
+ "prettier": "^3.0.0",
13
+ "typescript": "^5.0.0"
20
14
  },
21
15
  "repository": {
22
16
  "type": "git",
@@ -0,0 +1,3 @@
1
+ import type { BrowsingContextSuggestions as BrowsingContextSuggestionsType } from '../json/BrowsingContextSuggestions';
2
+
3
+ export type BrowsingContextSuggestions = BrowsingContextSuggestionsType;
@@ -0,0 +1,22 @@
1
+ import type {
2
+ Cart as CartType,
3
+ UpdatedCart as UpdatedCartType,
4
+ CartError as CartErrorType,
5
+ } from '../json/Cart';
6
+ import type { UpdatedLineItem } from '../json/LineItem';
7
+
8
+ export type Cart = CartType;
9
+
10
+ export type CartAdd =
11
+ | UpdatedLineItem
12
+ | {
13
+ items: Array<UpdatedLineItem>;
14
+ };
15
+
16
+ export type CartChange = UpdatedCartType;
17
+
18
+ export type CartClear = CartType;
19
+
20
+ export type CartUpdate = UpdatedCartType;
21
+
22
+ export type CartError = CartErrorType;
@@ -0,0 +1,14 @@
1
+ import type { Collection as CollectionType } from '../json/Collection';
2
+ import type { Product as ProductType } from '../json/Product';
3
+
4
+ export type Collection = {
5
+ collection: CollectionType;
6
+ };
7
+
8
+ export type Collections = {
9
+ collections: Array<CollectionType>;
10
+ };
11
+
12
+ export type Products = {
13
+ products: Array<ProductType>;
14
+ };
@@ -0,0 +1,9 @@
1
+ import type { Page as PageType } from '../json/Page';
2
+
3
+ export type Page = {
4
+ page: PageType;
5
+ };
6
+
7
+ export type Pages = {
8
+ pages: Array<PageType>;
9
+ };
@@ -0,0 +1,5 @@
1
+ import type { Policy as PolicyType } from '../json/Policy';
2
+
3
+ export type Policy = {
4
+ policy: PolicyType;
5
+ };
@@ -0,0 +1,14 @@
1
+ import type { Product as ProductType } from '../json/Product';
2
+
3
+ export type Product = {
4
+ product: ProductType;
5
+ };
6
+
7
+ export type Products = {
8
+ products: Array<ProductType>; // TODO: Fix types
9
+ };
10
+
11
+ export type Recommendations = {
12
+ products: Array<ProductType>;
13
+ intent: 'related' | 'complementary';
14
+ };
@@ -0,0 +1,20 @@
1
+ import type { Article as ArticleType } from '../json/Search/Article';
2
+ import type { Collection as CollectionType } from '../json/Search/Collection';
3
+ import type { Page as PageType } from '../json/Search/Page';
4
+ import type { Product as ProductType } from '../json/Search/Product';
5
+
6
+ export type Suggest = {
7
+ resources: {
8
+ results: {
9
+ queries?: Array<{
10
+ url: string;
11
+ text: string;
12
+ styled_text: string;
13
+ }>;
14
+ articles?: Array<ArticleType>;
15
+ collections?: Array<CollectionType>;
16
+ pages?: Array<PageType>;
17
+ products?: Array<ProductType>;
18
+ };
19
+ };
20
+ };
@@ -0,0 +1,25 @@
1
+ export type BrowsingContextSuggestions = {
2
+ detected_values: {
3
+ country: {
4
+ handle: string;
5
+ name: string;
6
+ };
7
+ };
8
+ suggestions: Array<{
9
+ parts: {
10
+ country: {
11
+ handle: string;
12
+ name: string;
13
+ confidence: number;
14
+ options: Record<string, string>;
15
+ };
16
+ language: {
17
+ handle: string;
18
+ name: string;
19
+ confidence: number;
20
+ options: Record<string, string>;
21
+ };
22
+ };
23
+ confidence: string;
24
+ }>;
25
+ };
@@ -0,0 +1,33 @@
1
+ import type { LineItem, UpdatedLineItem } from './LineItem';
2
+ import type { DiscountApplication } from './DiscountApplication';
3
+
4
+ export type Cart = {
5
+ token: string;
6
+ note: string | null;
7
+ attributes: Record<string, any>;
8
+ original_total_price: number;
9
+ total_price: number;
10
+ total_discount: number;
11
+ total_weight: number;
12
+ item_count: number;
13
+ items: Array<LineItem>;
14
+ requires_shipping: boolean;
15
+ currency: string;
16
+ items_subtotal_price: number;
17
+ cart_level_discount_applications: Array<DiscountApplication>;
18
+ };
19
+
20
+ export type UpdatedCart = Omit<Cart, 'cart_level_discount_applications'> & {
21
+ items_added: Array<UpdatedLineItem>;
22
+ items_removed: Array<UpdatedLineItem>;
23
+ cart_level_discount_applications: Array<{
24
+ amount: number;
25
+ discount_application: DiscountApplication;
26
+ }>;
27
+ };
28
+
29
+ export type CartError = {
30
+ description: string;
31
+ message: string;
32
+ status: number;
33
+ };
@@ -0,0 +1,12 @@
1
+ import type { Image } from './Image';
2
+
3
+ export type Collection = {
4
+ id: number;
5
+ title: string;
6
+ handle: string;
7
+ description: string;
8
+ published_at: string;
9
+ updated_at: string;
10
+ image: Image | null;
11
+ products_count: number;
12
+ };
@@ -0,0 +1,6 @@
1
+ import type { DiscountApplication } from './DiscountApplication';
2
+
3
+ export type DiscountAllocation = {
4
+ amount: number;
5
+ discount_application: DiscountApplication;
6
+ };
@@ -0,0 +1,13 @@
1
+ export type DiscountApplication = {
2
+ type: 'automatic' | 'discount_code' | 'manual' | 'script';
3
+ key: string;
4
+ title: string;
5
+ description: string | null;
6
+ value: string;
7
+ created_at: string;
8
+ value_type: 'fixed_amount' | 'percentage';
9
+ allocation_method: 'across' | 'each' | 'one';
10
+ target_selection: 'all' | 'entitled' | 'explicit';
11
+ target_type: 'line_item' | 'shipping_line';
12
+ total_allocated_amount: number;
13
+ };
@@ -0,0 +1,15 @@
1
+ export type FeaturedImage =
2
+ | {
3
+ aspect_ratio: number;
4
+ alt: string;
5
+ height: number;
6
+ url: string;
7
+ width: number;
8
+ }
9
+ | {
10
+ aspect_ratio: null;
11
+ alt: null;
12
+ height: null;
13
+ url: null;
14
+ width: null;
15
+ };
@@ -0,0 +1,6 @@
1
+ export type Image = {
2
+ id: number;
3
+ created_at: string;
4
+ src: string;
5
+ alt: string | null;
6
+ };
@@ -0,0 +1,67 @@
1
+ import type { DiscountAllocation } from './DiscountAllocation';
2
+ import type { FeaturedImage } from './FeaturedImage';
3
+
4
+ export type LineItem = {
5
+ id: number;
6
+ properties: Record<string, any>;
7
+ quantity: number;
8
+ variant_id: number;
9
+ key: string;
10
+ title: string;
11
+ original_price: number;
12
+ discounted_price: number;
13
+ original_line_price: number;
14
+ sku: string;
15
+ grams: number;
16
+ vendor: string;
17
+ taxable: boolean;
18
+ product_id: number;
19
+ product_has_only_default_variant: boolean;
20
+ gift_card: boolean;
21
+ final_price: number;
22
+ final_line_price: number;
23
+ url: string;
24
+ featured_image: FeaturedImage;
25
+ image: string | null;
26
+ handle: string;
27
+ requires_shipping: boolean;
28
+ product_type: string;
29
+ product_title: string;
30
+ product_description: string;
31
+ variant_title: string;
32
+ variant_options: Array<string>;
33
+ options_with_values: [
34
+ {
35
+ name: string;
36
+ value: string;
37
+ },
38
+ ];
39
+ line_level_discount_allocations: Array<DiscountAllocation>;
40
+ line_level_total_discount: number;
41
+ quantity_rule: {
42
+ min: number;
43
+ max: number | null;
44
+ increment: number;
45
+ };
46
+ has_components: boolean;
47
+
48
+ // Deprecated values
49
+ /** @deprecated Use line_level_discount_allocations instead */
50
+ discounts: [
51
+ {
52
+ amount: number;
53
+ title: string;
54
+ },
55
+ ];
56
+ /** @deprecated Use final_line_price instead */
57
+ line_price: number;
58
+ /** @deprecated Use final_price instead */
59
+ price: number;
60
+ /** @deprecated Use line_level_total_discount instead */
61
+ total_discount: number;
62
+ };
63
+
64
+ export type UpdatedLineItem = LineItem & {
65
+ untranslated_product_title: string;
66
+ untranslated_variant_title: string;
67
+ };
@@ -0,0 +1,9 @@
1
+ export type Page = {
2
+ id: number;
3
+ body_html: string;
4
+ created_at: string;
5
+ published_at: string;
6
+ updated_at: string;
7
+ handle: string;
8
+ title: string;
9
+ };
@@ -0,0 +1,7 @@
1
+ export type Policy = {
2
+ body: string;
3
+ created_at: string;
4
+ updated_at: string;
5
+ handle: string;
6
+ title: string;
7
+ };
@@ -0,0 +1,22 @@
1
+ import type { ProductVariant } from './ProductVariant';
2
+ import type { ProductOption } from './ProductOption';
3
+ import type { ProductImage } from './ProductImage';
4
+
5
+ export type Product = {
6
+ id: number;
7
+ title: string;
8
+ body_html: string | null;
9
+ vendor: string;
10
+ product_type: string;
11
+ created_at: string;
12
+ handle: string;
13
+ updated_at: string;
14
+ published_at: string;
15
+ template_suffix: string;
16
+ published_scope: string;
17
+ tags: string;
18
+ variants: Array<ProductVariant>;
19
+ options: Array<ProductOption>;
20
+ images: Array<ProductImage>;
21
+ image: ProductImage;
22
+ };
@@ -0,0 +1,10 @@
1
+ import type { Image } from './Image';
2
+
3
+ export type ProductImage = Image & {
4
+ product_id: number;
5
+ position: number;
6
+ updated_at: string;
7
+ width: number;
8
+ height: number;
9
+ variant_ids: Array<number>;
10
+ };
@@ -0,0 +1,7 @@
1
+ export type ProductOption = {
2
+ id: number;
3
+ product_id: number;
4
+ name: string;
5
+ position: number;
6
+ values: Array<string>;
7
+ };
@@ -0,0 +1,23 @@
1
+ export type ProductVariant = {
2
+ id: number;
3
+ product_id: number;
4
+ title: string;
5
+ price: string;
6
+ sku: string;
7
+ position: number;
8
+ compare_at_price: string;
9
+ fulfillment_service: string;
10
+ inventory_management: string;
11
+ option1: string | null;
12
+ option2: string | null;
13
+ option3: string | null;
14
+ created_at: string;
15
+ updated_at: string;
16
+ taxable: boolean;
17
+ barcode: string;
18
+ grams: number;
19
+ image_id: number | null;
20
+ weight: number;
21
+ weight_unit: 'g' | 'kg';
22
+ requires_shipping: boolean;
23
+ };
@@ -0,0 +1,11 @@
1
+ import type { SearchItem } from './SearchItem';
2
+ import type { FeaturedImage } from '../FeaturedImage';
3
+
4
+ export type Article = SearchItem & {
5
+ author: string;
6
+ image: string | null;
7
+ published_at: string;
8
+ summary_html: string;
9
+ tags: Array<string>;
10
+ featured_image: FeaturedImage;
11
+ };
@@ -0,0 +1,7 @@
1
+ import type { SearchItem } from './SearchItem';
2
+ import type { FeaturedImage } from '../FeaturedImage';
3
+
4
+ export type Collection = SearchItem & {
5
+ published_at: string;
6
+ featured_image: FeaturedImage;
7
+ };
@@ -0,0 +1,6 @@
1
+ import type { SearchItem } from './SearchItem';
2
+
3
+ export type Page = SearchItem & {
4
+ author: null;
5
+ published_at: string;
6
+ };
@@ -0,0 +1,18 @@
1
+ import type { FeaturedImage } from '../FeaturedImage';
2
+ import type { SearchItem } from './SearchItem';
3
+ import type { ProductVariant } from './ProductVariant';
4
+
5
+ export type Product = SearchItem & {
6
+ available: boolean;
7
+ compare_at_price_max: string;
8
+ compare_at_price_min: string;
9
+ image: string | null;
10
+ price: string;
11
+ price_max: string;
12
+ price_min: string;
13
+ tags: Array<string>;
14
+ type: string;
15
+ variants: Array<ProductVariant>;
16
+ vendor: string;
17
+ featured_image: FeaturedImage;
18
+ };
@@ -0,0 +1,12 @@
1
+ import type { FeaturedImage } from '../FeaturedImage';
2
+
3
+ export type ProductVariant = {
4
+ available: true;
5
+ compare_at_price: string | null;
6
+ id: number;
7
+ image: string | null;
8
+ price: string;
9
+ title: string;
10
+ url: string;
11
+ featured_image: FeaturedImage;
12
+ };
@@ -0,0 +1,7 @@
1
+ export type SearchItem = {
2
+ id: number;
3
+ handle: string;
4
+ url: string;
5
+ title: string;
6
+ body: string;
7
+ };
@@ -0,0 +1,18 @@
1
+ import type { Image } from './Image';
2
+
3
+ export type Article = {
4
+ id: number;
5
+ title: string;
6
+ created_at: string;
7
+ body_html: string;
8
+ blog_id: number;
9
+ author: string;
10
+ user_id: number;
11
+ published_at: string;
12
+ updated_at: string;
13
+ summary_html: string;
14
+ template_suffix: string;
15
+ handle: string;
16
+ tags: string;
17
+ image?: Image;
18
+ };
@@ -0,0 +1,20 @@
1
+ import type { Image } from './Image';
2
+
3
+ export type Collection = {
4
+ id: number;
5
+ handle: string;
6
+ title: string;
7
+ updated_at: string;
8
+ body_html: string;
9
+ published_at: string;
10
+ sort_order: string;
11
+ template_suffix: string;
12
+ disjunctive?: boolean;
13
+ rules?: Array<{
14
+ column: string;
15
+ relation: string;
16
+ condition: string;
17
+ }>;
18
+ published_scope: string;
19
+ image?: Image;
20
+ };
@@ -0,0 +1,11 @@
1
+ export type FeaturedVariantImage = {
2
+ alt: string | null;
3
+ created_at: string;
4
+ height: number;
5
+ id: number;
6
+ position: number;
7
+ product_id: number;
8
+ updated_at: string;
9
+ variant_ids: Array<number>;
10
+ width: number;
11
+ };
@@ -0,0 +1,8 @@
1
+ import type { PreviewImage } from './PreviewImage';
2
+
3
+ export type FeaturedVariantMedia = {
4
+ alt: string | null;
5
+ id: number;
6
+ position: number;
7
+ preview_image: PreviewImage;
8
+ };
@@ -0,0 +1,7 @@
1
+ export type Image = {
2
+ created_at: string;
3
+ alt: string | null;
4
+ width: number;
5
+ height: number;
6
+ src: string;
7
+ };