more-apartments-astro-integration 1.0.1 → 1.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.
package/dist/index.d.mts CHANGED
@@ -288,19 +288,28 @@ declare const PropertySchema: z.ZodObject<{
288
288
  check_out: z.ZodNullable<z.ZodString>;
289
289
  images: z.ZodOptional<z.ZodArray<z.ZodObject<{
290
290
  id: z.ZodNumber;
291
- url: z.ZodString;
292
- thumb_url: z.ZodString;
293
291
  alt: z.ZodString;
292
+ small_url: z.ZodString;
293
+ medium_url: z.ZodString;
294
+ large_url: z.ZodString;
295
+ srcset: z.ZodString;
296
+ url: z.ZodString;
294
297
  }, "strip", z.ZodTypeAny, {
295
298
  id: number;
296
- url: string;
297
- thumb_url: string;
298
299
  alt: string;
300
+ small_url: string;
301
+ medium_url: string;
302
+ large_url: string;
303
+ srcset: string;
304
+ url: string;
299
305
  }, {
300
306
  id: number;
301
- url: string;
302
- thumb_url: string;
303
307
  alt: string;
308
+ small_url: string;
309
+ medium_url: string;
310
+ large_url: string;
311
+ srcset: string;
312
+ url: string;
304
313
  }>, "many">>;
305
314
  status: z.ZodNullable<z.ZodString>;
306
315
  provider_name: z.ZodNullable<z.ZodString>;
@@ -390,9 +399,12 @@ declare const PropertySchema: z.ZodObject<{
390
399
  external_id?: number | undefined;
391
400
  images?: {
392
401
  id: number;
393
- url: string;
394
- thumb_url: string;
395
402
  alt: string;
403
+ small_url: string;
404
+ medium_url: string;
405
+ large_url: string;
406
+ srcset: string;
407
+ url: string;
396
408
  }[] | undefined;
397
409
  }, {
398
410
  type: string | null;
@@ -478,9 +490,12 @@ declare const PropertySchema: z.ZodObject<{
478
490
  external_id?: number | undefined;
479
491
  images?: {
480
492
  id: number;
481
- url: string;
482
- thumb_url: string;
483
493
  alt: string;
494
+ small_url: string;
495
+ medium_url: string;
496
+ large_url: string;
497
+ srcset: string;
498
+ url: string;
484
499
  }[] | undefined;
485
500
  }>;
486
501
  declare const AvailableDay: z.ZodObject<{
@@ -658,19 +673,28 @@ declare const PropertySearchResultSchema: z.ZodObject<{
658
673
  check_out: z.ZodNullable<z.ZodString>;
659
674
  images: z.ZodOptional<z.ZodArray<z.ZodObject<{
660
675
  id: z.ZodNumber;
661
- url: z.ZodString;
662
- thumb_url: z.ZodString;
663
676
  alt: z.ZodString;
677
+ small_url: z.ZodString;
678
+ medium_url: z.ZodString;
679
+ large_url: z.ZodString;
680
+ srcset: z.ZodString;
681
+ url: z.ZodString;
664
682
  }, "strip", z.ZodTypeAny, {
665
683
  id: number;
666
- url: string;
667
- thumb_url: string;
668
684
  alt: string;
685
+ small_url: string;
686
+ medium_url: string;
687
+ large_url: string;
688
+ srcset: string;
689
+ url: string;
669
690
  }, {
670
691
  id: number;
671
- url: string;
672
- thumb_url: string;
673
692
  alt: string;
693
+ small_url: string;
694
+ medium_url: string;
695
+ large_url: string;
696
+ srcset: string;
697
+ url: string;
674
698
  }>, "many">>;
675
699
  status: z.ZodNullable<z.ZodString>;
676
700
  provider_name: z.ZodNullable<z.ZodString>;
@@ -760,9 +784,12 @@ declare const PropertySearchResultSchema: z.ZodObject<{
760
784
  external_id?: number | undefined;
761
785
  images?: {
762
786
  id: number;
763
- url: string;
764
- thumb_url: string;
765
787
  alt: string;
788
+ small_url: string;
789
+ medium_url: string;
790
+ large_url: string;
791
+ srcset: string;
792
+ url: string;
766
793
  }[] | undefined;
767
794
  }, {
768
795
  type: string | null;
@@ -848,9 +875,12 @@ declare const PropertySearchResultSchema: z.ZodObject<{
848
875
  external_id?: number | undefined;
849
876
  images?: {
850
877
  id: number;
851
- url: string;
852
- thumb_url: string;
853
878
  alt: string;
879
+ small_url: string;
880
+ medium_url: string;
881
+ large_url: string;
882
+ srcset: string;
883
+ url: string;
854
884
  }[] | undefined;
855
885
  }>, "many">;
856
886
  }, "strip", z.ZodTypeAny, {
@@ -938,9 +968,12 @@ declare const PropertySearchResultSchema: z.ZodObject<{
938
968
  external_id?: number | undefined;
939
969
  images?: {
940
970
  id: number;
941
- url: string;
942
- thumb_url: string;
943
971
  alt: string;
972
+ small_url: string;
973
+ medium_url: string;
974
+ large_url: string;
975
+ srcset: string;
976
+ url: string;
944
977
  }[] | undefined;
945
978
  }[];
946
979
  }, {
@@ -1028,9 +1061,12 @@ declare const PropertySearchResultSchema: z.ZodObject<{
1028
1061
  external_id?: number | undefined;
1029
1062
  images?: {
1030
1063
  id: number;
1031
- url: string;
1032
- thumb_url: string;
1033
1064
  alt: string;
1065
+ small_url: string;
1066
+ medium_url: string;
1067
+ large_url: string;
1068
+ srcset: string;
1069
+ url: string;
1034
1070
  }[] | undefined;
1035
1071
  }[];
1036
1072
  }>;
@@ -2093,6 +2129,7 @@ declare class MoreApartmentsClient {
2093
2129
  declare function getPrimaryImageUrl(property: Property, fallbackUrl?: string): string;
2094
2130
  /**
2095
2131
  * Get thumbnail image URL from property
2132
+ * Uses small_url (400×300) for efficient thumbnails
2096
2133
  * @param property - Property object with optional images array
2097
2134
  * @param fallbackUrl - Optional fallback image URL
2098
2135
  * @returns Thumbnail URL string
@@ -2106,6 +2143,7 @@ declare function getThumbnailUrl(property: Property, fallbackUrl?: string): stri
2106
2143
  declare function getAllImageUrls(property: Property): string[];
2107
2144
  /**
2108
2145
  * Get all thumbnail URLs from property
2146
+ * Uses small_url (400×300) for efficient thumbnails
2109
2147
  * @param property - Property object with optional images array
2110
2148
  * @returns Array of thumbnail URL strings
2111
2149
  */
@@ -2275,9 +2313,12 @@ declare function fetchProperties(client: MoreApartmentsClient, params?: {
2275
2313
  external_id?: number | undefined;
2276
2314
  images?: {
2277
2315
  id: number;
2278
- url: string;
2279
- thumb_url: string;
2280
2316
  alt: string;
2317
+ small_url: string;
2318
+ medium_url: string;
2319
+ large_url: string;
2320
+ srcset: string;
2321
+ url: string;
2281
2322
  }[] | undefined;
2282
2323
  }> | {
2283
2324
  data: never[];
@@ -2380,9 +2421,12 @@ declare function fetchProperty(client: MoreApartmentsClient, idOrSlug: number |
2380
2421
  external_id?: number | undefined;
2381
2422
  images?: {
2382
2423
  id: number;
2383
- url: string;
2384
- thumb_url: string;
2385
2424
  alt: string;
2425
+ small_url: string;
2426
+ medium_url: string;
2427
+ large_url: string;
2428
+ srcset: string;
2429
+ url: string;
2386
2430
  }[] | undefined;
2387
2431
  } | null>;
2388
2432
  /**
@@ -2723,9 +2767,12 @@ declare function searchProperties(client: MoreApartmentsClient, params: Property
2723
2767
  external_id?: number | undefined;
2724
2768
  images?: {
2725
2769
  id: number;
2726
- url: string;
2727
- thumb_url: string;
2728
2770
  alt: string;
2771
+ small_url: string;
2772
+ medium_url: string;
2773
+ large_url: string;
2774
+ srcset: string;
2775
+ url: string;
2729
2776
  }[] | undefined;
2730
2777
  }[]>;
2731
2778
 
package/dist/index.d.ts CHANGED
@@ -288,19 +288,28 @@ declare const PropertySchema: z.ZodObject<{
288
288
  check_out: z.ZodNullable<z.ZodString>;
289
289
  images: z.ZodOptional<z.ZodArray<z.ZodObject<{
290
290
  id: z.ZodNumber;
291
- url: z.ZodString;
292
- thumb_url: z.ZodString;
293
291
  alt: z.ZodString;
292
+ small_url: z.ZodString;
293
+ medium_url: z.ZodString;
294
+ large_url: z.ZodString;
295
+ srcset: z.ZodString;
296
+ url: z.ZodString;
294
297
  }, "strip", z.ZodTypeAny, {
295
298
  id: number;
296
- url: string;
297
- thumb_url: string;
298
299
  alt: string;
300
+ small_url: string;
301
+ medium_url: string;
302
+ large_url: string;
303
+ srcset: string;
304
+ url: string;
299
305
  }, {
300
306
  id: number;
301
- url: string;
302
- thumb_url: string;
303
307
  alt: string;
308
+ small_url: string;
309
+ medium_url: string;
310
+ large_url: string;
311
+ srcset: string;
312
+ url: string;
304
313
  }>, "many">>;
305
314
  status: z.ZodNullable<z.ZodString>;
306
315
  provider_name: z.ZodNullable<z.ZodString>;
@@ -390,9 +399,12 @@ declare const PropertySchema: z.ZodObject<{
390
399
  external_id?: number | undefined;
391
400
  images?: {
392
401
  id: number;
393
- url: string;
394
- thumb_url: string;
395
402
  alt: string;
403
+ small_url: string;
404
+ medium_url: string;
405
+ large_url: string;
406
+ srcset: string;
407
+ url: string;
396
408
  }[] | undefined;
397
409
  }, {
398
410
  type: string | null;
@@ -478,9 +490,12 @@ declare const PropertySchema: z.ZodObject<{
478
490
  external_id?: number | undefined;
479
491
  images?: {
480
492
  id: number;
481
- url: string;
482
- thumb_url: string;
483
493
  alt: string;
494
+ small_url: string;
495
+ medium_url: string;
496
+ large_url: string;
497
+ srcset: string;
498
+ url: string;
484
499
  }[] | undefined;
485
500
  }>;
486
501
  declare const AvailableDay: z.ZodObject<{
@@ -658,19 +673,28 @@ declare const PropertySearchResultSchema: z.ZodObject<{
658
673
  check_out: z.ZodNullable<z.ZodString>;
659
674
  images: z.ZodOptional<z.ZodArray<z.ZodObject<{
660
675
  id: z.ZodNumber;
661
- url: z.ZodString;
662
- thumb_url: z.ZodString;
663
676
  alt: z.ZodString;
677
+ small_url: z.ZodString;
678
+ medium_url: z.ZodString;
679
+ large_url: z.ZodString;
680
+ srcset: z.ZodString;
681
+ url: z.ZodString;
664
682
  }, "strip", z.ZodTypeAny, {
665
683
  id: number;
666
- url: string;
667
- thumb_url: string;
668
684
  alt: string;
685
+ small_url: string;
686
+ medium_url: string;
687
+ large_url: string;
688
+ srcset: string;
689
+ url: string;
669
690
  }, {
670
691
  id: number;
671
- url: string;
672
- thumb_url: string;
673
692
  alt: string;
693
+ small_url: string;
694
+ medium_url: string;
695
+ large_url: string;
696
+ srcset: string;
697
+ url: string;
674
698
  }>, "many">>;
675
699
  status: z.ZodNullable<z.ZodString>;
676
700
  provider_name: z.ZodNullable<z.ZodString>;
@@ -760,9 +784,12 @@ declare const PropertySearchResultSchema: z.ZodObject<{
760
784
  external_id?: number | undefined;
761
785
  images?: {
762
786
  id: number;
763
- url: string;
764
- thumb_url: string;
765
787
  alt: string;
788
+ small_url: string;
789
+ medium_url: string;
790
+ large_url: string;
791
+ srcset: string;
792
+ url: string;
766
793
  }[] | undefined;
767
794
  }, {
768
795
  type: string | null;
@@ -848,9 +875,12 @@ declare const PropertySearchResultSchema: z.ZodObject<{
848
875
  external_id?: number | undefined;
849
876
  images?: {
850
877
  id: number;
851
- url: string;
852
- thumb_url: string;
853
878
  alt: string;
879
+ small_url: string;
880
+ medium_url: string;
881
+ large_url: string;
882
+ srcset: string;
883
+ url: string;
854
884
  }[] | undefined;
855
885
  }>, "many">;
856
886
  }, "strip", z.ZodTypeAny, {
@@ -938,9 +968,12 @@ declare const PropertySearchResultSchema: z.ZodObject<{
938
968
  external_id?: number | undefined;
939
969
  images?: {
940
970
  id: number;
941
- url: string;
942
- thumb_url: string;
943
971
  alt: string;
972
+ small_url: string;
973
+ medium_url: string;
974
+ large_url: string;
975
+ srcset: string;
976
+ url: string;
944
977
  }[] | undefined;
945
978
  }[];
946
979
  }, {
@@ -1028,9 +1061,12 @@ declare const PropertySearchResultSchema: z.ZodObject<{
1028
1061
  external_id?: number | undefined;
1029
1062
  images?: {
1030
1063
  id: number;
1031
- url: string;
1032
- thumb_url: string;
1033
1064
  alt: string;
1065
+ small_url: string;
1066
+ medium_url: string;
1067
+ large_url: string;
1068
+ srcset: string;
1069
+ url: string;
1034
1070
  }[] | undefined;
1035
1071
  }[];
1036
1072
  }>;
@@ -2093,6 +2129,7 @@ declare class MoreApartmentsClient {
2093
2129
  declare function getPrimaryImageUrl(property: Property, fallbackUrl?: string): string;
2094
2130
  /**
2095
2131
  * Get thumbnail image URL from property
2132
+ * Uses small_url (400×300) for efficient thumbnails
2096
2133
  * @param property - Property object with optional images array
2097
2134
  * @param fallbackUrl - Optional fallback image URL
2098
2135
  * @returns Thumbnail URL string
@@ -2106,6 +2143,7 @@ declare function getThumbnailUrl(property: Property, fallbackUrl?: string): stri
2106
2143
  declare function getAllImageUrls(property: Property): string[];
2107
2144
  /**
2108
2145
  * Get all thumbnail URLs from property
2146
+ * Uses small_url (400×300) for efficient thumbnails
2109
2147
  * @param property - Property object with optional images array
2110
2148
  * @returns Array of thumbnail URL strings
2111
2149
  */
@@ -2275,9 +2313,12 @@ declare function fetchProperties(client: MoreApartmentsClient, params?: {
2275
2313
  external_id?: number | undefined;
2276
2314
  images?: {
2277
2315
  id: number;
2278
- url: string;
2279
- thumb_url: string;
2280
2316
  alt: string;
2317
+ small_url: string;
2318
+ medium_url: string;
2319
+ large_url: string;
2320
+ srcset: string;
2321
+ url: string;
2281
2322
  }[] | undefined;
2282
2323
  }> | {
2283
2324
  data: never[];
@@ -2380,9 +2421,12 @@ declare function fetchProperty(client: MoreApartmentsClient, idOrSlug: number |
2380
2421
  external_id?: number | undefined;
2381
2422
  images?: {
2382
2423
  id: number;
2383
- url: string;
2384
- thumb_url: string;
2385
2424
  alt: string;
2425
+ small_url: string;
2426
+ medium_url: string;
2427
+ large_url: string;
2428
+ srcset: string;
2429
+ url: string;
2386
2430
  }[] | undefined;
2387
2431
  } | null>;
2388
2432
  /**
@@ -2723,9 +2767,12 @@ declare function searchProperties(client: MoreApartmentsClient, params: Property
2723
2767
  external_id?: number | undefined;
2724
2768
  images?: {
2725
2769
  id: number;
2726
- url: string;
2727
- thumb_url: string;
2728
2770
  alt: string;
2771
+ small_url: string;
2772
+ medium_url: string;
2773
+ large_url: string;
2774
+ srcset: string;
2775
+ url: string;
2729
2776
  }[] | undefined;
2730
2777
  }[]>;
2731
2778
 
package/dist/index.js CHANGED
@@ -136,9 +136,18 @@ var PropertySchema = zod.z.object({
136
136
  // Media
137
137
  images: zod.z.array(zod.z.object({
138
138
  id: zod.z.number(),
139
- url: zod.z.string(),
140
- thumb_url: zod.z.string(),
141
- alt: zod.z.string()
139
+ alt: zod.z.string(),
140
+ // Responsive image sizes
141
+ small_url: zod.z.string(),
142
+ // 400×300
143
+ medium_url: zod.z.string(),
144
+ // 800×600
145
+ large_url: zod.z.string(),
146
+ // 1200×900
147
+ srcset: zod.z.string(),
148
+ // Responsive srcset string
149
+ // Default fallback (backward compatibility)
150
+ url: zod.z.string()
142
151
  })).optional(),
143
152
  // Metadata
144
153
  status: zod.z.string().nullable(),
@@ -648,7 +657,7 @@ function getPrimaryImageUrl(property, fallbackUrl) {
648
657
  }
649
658
  function getThumbnailUrl(property, fallbackUrl) {
650
659
  if (property.images && property.images.length > 0) {
651
- return property.images[0].thumb_url;
660
+ return property.images[0].small_url;
652
661
  }
653
662
  if (fallbackUrl) {
654
663
  return fallbackUrl;
@@ -659,7 +668,7 @@ function getAllImageUrls(property) {
659
668
  return property.images?.map((img) => img.url) || [];
660
669
  }
661
670
  function getAllThumbnailUrls(property) {
662
- return property.images?.map((img) => img.thumb_url) || [];
671
+ return property.images?.map((img) => img.small_url) || [];
663
672
  }
664
673
  function getImageWithAlt(property, index = 0) {
665
674
  const image = property.images?.[index];