@googlemaps/places 1.10.0 → 2.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 (29) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +2 -2
  3. package/build/protos/google/geo/type/viewport.proto +1 -1
  4. package/build/protos/google/maps/places/v1/attribution.proto +1 -1
  5. package/build/protos/google/maps/places/v1/content_block.proto +1 -1
  6. package/build/protos/google/maps/places/v1/contextual_content.proto +1 -1
  7. package/build/protos/google/maps/places/v1/ev_charging.proto +1 -1
  8. package/build/protos/google/maps/places/v1/fuel_options.proto +1 -1
  9. package/build/protos/google/maps/places/v1/geometry.proto +1 -1
  10. package/build/protos/google/maps/places/v1/photo.proto +1 -1
  11. package/build/protos/google/maps/places/v1/place.proto +18 -4
  12. package/build/protos/google/maps/places/v1/places_service.proto +1 -1
  13. package/build/protos/google/maps/places/v1/polyline.proto +1 -1
  14. package/build/protos/google/maps/places/v1/price_range.proto +1 -1
  15. package/build/protos/google/maps/places/v1/reference.proto +1 -1
  16. package/build/protos/google/maps/places/v1/review.proto +1 -1
  17. package/build/protos/google/maps/places/v1/route_modifiers.proto +1 -1
  18. package/build/protos/google/maps/places/v1/routing_preference.proto +1 -1
  19. package/build/protos/google/maps/places/v1/routing_summary.proto +1 -1
  20. package/build/protos/google/maps/places/v1/travel_mode.proto +1 -1
  21. package/build/protos/protos.d.ts +420 -0
  22. package/build/protos/protos.js +1176 -0
  23. package/build/protos/protos.json +120 -5
  24. package/build/src/v1/gapic_metadata.json +73 -0
  25. package/build/src/v1/places_client.d.ts +2 -1
  26. package/build/src/v1/places_client.js +104 -27
  27. package/build/src/v1/places_client.js.map +1 -1
  28. package/build/src/v1/places_proto_list.json +20 -0
  29. package/package.json +16 -16
@@ -554,6 +554,414 @@ export namespace google {
554
554
  */
555
555
  public static getTypeUrl(typeUrlPrefix?: string): string;
556
556
  }
557
+
558
+ /** Properties of a DateTime. */
559
+ interface IDateTime {
560
+
561
+ /** DateTime year */
562
+ year?: (number|null);
563
+
564
+ /** DateTime month */
565
+ month?: (number|null);
566
+
567
+ /** DateTime day */
568
+ day?: (number|null);
569
+
570
+ /** DateTime hours */
571
+ hours?: (number|null);
572
+
573
+ /** DateTime minutes */
574
+ minutes?: (number|null);
575
+
576
+ /** DateTime seconds */
577
+ seconds?: (number|null);
578
+
579
+ /** DateTime nanos */
580
+ nanos?: (number|null);
581
+
582
+ /** DateTime utcOffset */
583
+ utcOffset?: (google.protobuf.IDuration|null);
584
+
585
+ /** DateTime timeZone */
586
+ timeZone?: (google.type.ITimeZone|null);
587
+ }
588
+
589
+ /** Represents a DateTime. */
590
+ class DateTime implements IDateTime {
591
+
592
+ /**
593
+ * Constructs a new DateTime.
594
+ * @param [properties] Properties to set
595
+ */
596
+ constructor(properties?: google.type.IDateTime);
597
+
598
+ /** DateTime year. */
599
+ public year: number;
600
+
601
+ /** DateTime month. */
602
+ public month: number;
603
+
604
+ /** DateTime day. */
605
+ public day: number;
606
+
607
+ /** DateTime hours. */
608
+ public hours: number;
609
+
610
+ /** DateTime minutes. */
611
+ public minutes: number;
612
+
613
+ /** DateTime seconds. */
614
+ public seconds: number;
615
+
616
+ /** DateTime nanos. */
617
+ public nanos: number;
618
+
619
+ /** DateTime utcOffset. */
620
+ public utcOffset?: (google.protobuf.IDuration|null);
621
+
622
+ /** DateTime timeZone. */
623
+ public timeZone?: (google.type.ITimeZone|null);
624
+
625
+ /** DateTime timeOffset. */
626
+ public timeOffset?: ("utcOffset"|"timeZone");
627
+
628
+ /**
629
+ * Creates a new DateTime instance using the specified properties.
630
+ * @param [properties] Properties to set
631
+ * @returns DateTime instance
632
+ */
633
+ public static create(properties?: google.type.IDateTime): google.type.DateTime;
634
+
635
+ /**
636
+ * Encodes the specified DateTime message. Does not implicitly {@link google.type.DateTime.verify|verify} messages.
637
+ * @param message DateTime message or plain object to encode
638
+ * @param [writer] Writer to encode to
639
+ * @returns Writer
640
+ */
641
+ public static encode(message: google.type.IDateTime, writer?: $protobuf.Writer): $protobuf.Writer;
642
+
643
+ /**
644
+ * Encodes the specified DateTime message, length delimited. Does not implicitly {@link google.type.DateTime.verify|verify} messages.
645
+ * @param message DateTime message or plain object to encode
646
+ * @param [writer] Writer to encode to
647
+ * @returns Writer
648
+ */
649
+ public static encodeDelimited(message: google.type.IDateTime, writer?: $protobuf.Writer): $protobuf.Writer;
650
+
651
+ /**
652
+ * Decodes a DateTime message from the specified reader or buffer.
653
+ * @param reader Reader or buffer to decode from
654
+ * @param [length] Message length if known beforehand
655
+ * @returns DateTime
656
+ * @throws {Error} If the payload is not a reader or valid buffer
657
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
658
+ */
659
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.DateTime;
660
+
661
+ /**
662
+ * Decodes a DateTime message from the specified reader or buffer, length delimited.
663
+ * @param reader Reader or buffer to decode from
664
+ * @returns DateTime
665
+ * @throws {Error} If the payload is not a reader or valid buffer
666
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
667
+ */
668
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.DateTime;
669
+
670
+ /**
671
+ * Verifies a DateTime message.
672
+ * @param message Plain object to verify
673
+ * @returns `null` if valid, otherwise the reason why it is not
674
+ */
675
+ public static verify(message: { [k: string]: any }): (string|null);
676
+
677
+ /**
678
+ * Creates a DateTime message from a plain object. Also converts values to their respective internal types.
679
+ * @param object Plain object
680
+ * @returns DateTime
681
+ */
682
+ public static fromObject(object: { [k: string]: any }): google.type.DateTime;
683
+
684
+ /**
685
+ * Creates a plain object from a DateTime message. Also converts values to other types if specified.
686
+ * @param message DateTime
687
+ * @param [options] Conversion options
688
+ * @returns Plain object
689
+ */
690
+ public static toObject(message: google.type.DateTime, options?: $protobuf.IConversionOptions): { [k: string]: any };
691
+
692
+ /**
693
+ * Converts this DateTime to JSON.
694
+ * @returns JSON object
695
+ */
696
+ public toJSON(): { [k: string]: any };
697
+
698
+ /**
699
+ * Gets the default type url for DateTime
700
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
701
+ * @returns The default type url
702
+ */
703
+ public static getTypeUrl(typeUrlPrefix?: string): string;
704
+ }
705
+
706
+ /** Properties of a TimeZone. */
707
+ interface ITimeZone {
708
+
709
+ /** TimeZone id */
710
+ id?: (string|null);
711
+
712
+ /** TimeZone version */
713
+ version?: (string|null);
714
+ }
715
+
716
+ /** Represents a TimeZone. */
717
+ class TimeZone implements ITimeZone {
718
+
719
+ /**
720
+ * Constructs a new TimeZone.
721
+ * @param [properties] Properties to set
722
+ */
723
+ constructor(properties?: google.type.ITimeZone);
724
+
725
+ /** TimeZone id. */
726
+ public id: string;
727
+
728
+ /** TimeZone version. */
729
+ public version: string;
730
+
731
+ /**
732
+ * Creates a new TimeZone instance using the specified properties.
733
+ * @param [properties] Properties to set
734
+ * @returns TimeZone instance
735
+ */
736
+ public static create(properties?: google.type.ITimeZone): google.type.TimeZone;
737
+
738
+ /**
739
+ * Encodes the specified TimeZone message. Does not implicitly {@link google.type.TimeZone.verify|verify} messages.
740
+ * @param message TimeZone message or plain object to encode
741
+ * @param [writer] Writer to encode to
742
+ * @returns Writer
743
+ */
744
+ public static encode(message: google.type.ITimeZone, writer?: $protobuf.Writer): $protobuf.Writer;
745
+
746
+ /**
747
+ * Encodes the specified TimeZone message, length delimited. Does not implicitly {@link google.type.TimeZone.verify|verify} messages.
748
+ * @param message TimeZone message or plain object to encode
749
+ * @param [writer] Writer to encode to
750
+ * @returns Writer
751
+ */
752
+ public static encodeDelimited(message: google.type.ITimeZone, writer?: $protobuf.Writer): $protobuf.Writer;
753
+
754
+ /**
755
+ * Decodes a TimeZone message from the specified reader or buffer.
756
+ * @param reader Reader or buffer to decode from
757
+ * @param [length] Message length if known beforehand
758
+ * @returns TimeZone
759
+ * @throws {Error} If the payload is not a reader or valid buffer
760
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
761
+ */
762
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.TimeZone;
763
+
764
+ /**
765
+ * Decodes a TimeZone message from the specified reader or buffer, length delimited.
766
+ * @param reader Reader or buffer to decode from
767
+ * @returns TimeZone
768
+ * @throws {Error} If the payload is not a reader or valid buffer
769
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
770
+ */
771
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.TimeZone;
772
+
773
+ /**
774
+ * Verifies a TimeZone message.
775
+ * @param message Plain object to verify
776
+ * @returns `null` if valid, otherwise the reason why it is not
777
+ */
778
+ public static verify(message: { [k: string]: any }): (string|null);
779
+
780
+ /**
781
+ * Creates a TimeZone message from a plain object. Also converts values to their respective internal types.
782
+ * @param object Plain object
783
+ * @returns TimeZone
784
+ */
785
+ public static fromObject(object: { [k: string]: any }): google.type.TimeZone;
786
+
787
+ /**
788
+ * Creates a plain object from a TimeZone message. Also converts values to other types if specified.
789
+ * @param message TimeZone
790
+ * @param [options] Conversion options
791
+ * @returns Plain object
792
+ */
793
+ public static toObject(message: google.type.TimeZone, options?: $protobuf.IConversionOptions): { [k: string]: any };
794
+
795
+ /**
796
+ * Converts this TimeZone to JSON.
797
+ * @returns JSON object
798
+ */
799
+ public toJSON(): { [k: string]: any };
800
+
801
+ /**
802
+ * Gets the default type url for TimeZone
803
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
804
+ * @returns The default type url
805
+ */
806
+ public static getTypeUrl(typeUrlPrefix?: string): string;
807
+ }
808
+
809
+ /** Properties of a PostalAddress. */
810
+ interface IPostalAddress {
811
+
812
+ /** PostalAddress revision */
813
+ revision?: (number|null);
814
+
815
+ /** PostalAddress regionCode */
816
+ regionCode?: (string|null);
817
+
818
+ /** PostalAddress languageCode */
819
+ languageCode?: (string|null);
820
+
821
+ /** PostalAddress postalCode */
822
+ postalCode?: (string|null);
823
+
824
+ /** PostalAddress sortingCode */
825
+ sortingCode?: (string|null);
826
+
827
+ /** PostalAddress administrativeArea */
828
+ administrativeArea?: (string|null);
829
+
830
+ /** PostalAddress locality */
831
+ locality?: (string|null);
832
+
833
+ /** PostalAddress sublocality */
834
+ sublocality?: (string|null);
835
+
836
+ /** PostalAddress addressLines */
837
+ addressLines?: (string[]|null);
838
+
839
+ /** PostalAddress recipients */
840
+ recipients?: (string[]|null);
841
+
842
+ /** PostalAddress organization */
843
+ organization?: (string|null);
844
+ }
845
+
846
+ /** Represents a PostalAddress. */
847
+ class PostalAddress implements IPostalAddress {
848
+
849
+ /**
850
+ * Constructs a new PostalAddress.
851
+ * @param [properties] Properties to set
852
+ */
853
+ constructor(properties?: google.type.IPostalAddress);
854
+
855
+ /** PostalAddress revision. */
856
+ public revision: number;
857
+
858
+ /** PostalAddress regionCode. */
859
+ public regionCode: string;
860
+
861
+ /** PostalAddress languageCode. */
862
+ public languageCode: string;
863
+
864
+ /** PostalAddress postalCode. */
865
+ public postalCode: string;
866
+
867
+ /** PostalAddress sortingCode. */
868
+ public sortingCode: string;
869
+
870
+ /** PostalAddress administrativeArea. */
871
+ public administrativeArea: string;
872
+
873
+ /** PostalAddress locality. */
874
+ public locality: string;
875
+
876
+ /** PostalAddress sublocality. */
877
+ public sublocality: string;
878
+
879
+ /** PostalAddress addressLines. */
880
+ public addressLines: string[];
881
+
882
+ /** PostalAddress recipients. */
883
+ public recipients: string[];
884
+
885
+ /** PostalAddress organization. */
886
+ public organization: string;
887
+
888
+ /**
889
+ * Creates a new PostalAddress instance using the specified properties.
890
+ * @param [properties] Properties to set
891
+ * @returns PostalAddress instance
892
+ */
893
+ public static create(properties?: google.type.IPostalAddress): google.type.PostalAddress;
894
+
895
+ /**
896
+ * Encodes the specified PostalAddress message. Does not implicitly {@link google.type.PostalAddress.verify|verify} messages.
897
+ * @param message PostalAddress message or plain object to encode
898
+ * @param [writer] Writer to encode to
899
+ * @returns Writer
900
+ */
901
+ public static encode(message: google.type.IPostalAddress, writer?: $protobuf.Writer): $protobuf.Writer;
902
+
903
+ /**
904
+ * Encodes the specified PostalAddress message, length delimited. Does not implicitly {@link google.type.PostalAddress.verify|verify} messages.
905
+ * @param message PostalAddress message or plain object to encode
906
+ * @param [writer] Writer to encode to
907
+ * @returns Writer
908
+ */
909
+ public static encodeDelimited(message: google.type.IPostalAddress, writer?: $protobuf.Writer): $protobuf.Writer;
910
+
911
+ /**
912
+ * Decodes a PostalAddress message from the specified reader or buffer.
913
+ * @param reader Reader or buffer to decode from
914
+ * @param [length] Message length if known beforehand
915
+ * @returns PostalAddress
916
+ * @throws {Error} If the payload is not a reader or valid buffer
917
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
918
+ */
919
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.PostalAddress;
920
+
921
+ /**
922
+ * Decodes a PostalAddress message from the specified reader or buffer, length delimited.
923
+ * @param reader Reader or buffer to decode from
924
+ * @returns PostalAddress
925
+ * @throws {Error} If the payload is not a reader or valid buffer
926
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
927
+ */
928
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.PostalAddress;
929
+
930
+ /**
931
+ * Verifies a PostalAddress message.
932
+ * @param message Plain object to verify
933
+ * @returns `null` if valid, otherwise the reason why it is not
934
+ */
935
+ public static verify(message: { [k: string]: any }): (string|null);
936
+
937
+ /**
938
+ * Creates a PostalAddress message from a plain object. Also converts values to their respective internal types.
939
+ * @param object Plain object
940
+ * @returns PostalAddress
941
+ */
942
+ public static fromObject(object: { [k: string]: any }): google.type.PostalAddress;
943
+
944
+ /**
945
+ * Creates a plain object from a PostalAddress message. Also converts values to other types if specified.
946
+ * @param message PostalAddress
947
+ * @param [options] Conversion options
948
+ * @returns Plain object
949
+ */
950
+ public static toObject(message: google.type.PostalAddress, options?: $protobuf.IConversionOptions): { [k: string]: any };
951
+
952
+ /**
953
+ * Converts this PostalAddress to JSON.
954
+ * @returns JSON object
955
+ */
956
+ public toJSON(): { [k: string]: any };
957
+
958
+ /**
959
+ * Gets the default type url for PostalAddress
960
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
961
+ * @returns The default type url
962
+ */
963
+ public static getTypeUrl(typeUrlPrefix?: string): string;
964
+ }
557
965
  }
558
966
 
559
967
  /** Namespace maps. */
@@ -2406,6 +2814,9 @@ export namespace google {
2406
2814
  /** Place shortFormattedAddress */
2407
2815
  shortFormattedAddress?: (string|null);
2408
2816
 
2817
+ /** Place postalAddress */
2818
+ postalAddress?: (google.type.IPostalAddress|null);
2819
+
2409
2820
  /** Place addressComponents */
2410
2821
  addressComponents?: (google.maps.places.v1.Place.IAddressComponent[]|null);
2411
2822
 
@@ -2436,6 +2847,9 @@ export namespace google {
2436
2847
  /** Place utcOffsetMinutes */
2437
2848
  utcOffsetMinutes?: (number|null);
2438
2849
 
2850
+ /** Place timeZone */
2851
+ timeZone?: (google.type.ITimeZone|null);
2852
+
2439
2853
  /** Place photos */
2440
2854
  photos?: (google.maps.places.v1.IPhoto[]|null);
2441
2855
 
@@ -2614,6 +3028,9 @@ export namespace google {
2614
3028
  /** Place shortFormattedAddress. */
2615
3029
  public shortFormattedAddress: string;
2616
3030
 
3031
+ /** Place postalAddress. */
3032
+ public postalAddress?: (google.type.IPostalAddress|null);
3033
+
2617
3034
  /** Place addressComponents. */
2618
3035
  public addressComponents: google.maps.places.v1.Place.IAddressComponent[];
2619
3036
 
@@ -2644,6 +3061,9 @@ export namespace google {
2644
3061
  /** Place utcOffsetMinutes. */
2645
3062
  public utcOffsetMinutes?: (number|null);
2646
3063
 
3064
+ /** Place timeZone. */
3065
+ public timeZone?: (google.type.ITimeZone|null);
3066
+
2647
3067
  /** Place photos. */
2648
3068
  public photos: google.maps.places.v1.IPhoto[];
2649
3069