@getlatedev/node 0.1.50 → 0.1.51

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
@@ -4042,7 +4042,7 @@ type GetGoogleBusinessLocationDetailsData = {
4042
4042
  */
4043
4043
  locationId?: string;
4044
4044
  /**
4045
- * Comma-separated fields to return. Available: name, title, phoneNumbers, categories, storefrontAddress, websiteUri, regularHours, specialHours, serviceArea, profile, openInfo, metadata, moreHours.
4045
+ * Comma-separated fields to return. Available: name, title, phoneNumbers, categories, storefrontAddress, websiteUri, regularHours, specialHours, serviceArea, serviceItems, profile, openInfo, metadata, moreHours.
4046
4046
  */
4047
4047
  readMask?: string;
4048
4048
  };
@@ -4094,6 +4094,46 @@ type GetGoogleBusinessLocationDetailsResponse = ({
4094
4094
  primaryPhone?: string;
4095
4095
  additionalPhones?: Array<(string)>;
4096
4096
  };
4097
+ /**
4098
+ * Business categories (returned when readMask includes 'categories')
4099
+ */
4100
+ categories?: {
4101
+ primaryCategory?: {
4102
+ /**
4103
+ * Category resource name
4104
+ */
4105
+ name?: string;
4106
+ /**
4107
+ * Human-readable category name
4108
+ */
4109
+ displayName?: string;
4110
+ };
4111
+ additionalCategories?: Array<{
4112
+ name?: string;
4113
+ displayName?: string;
4114
+ }>;
4115
+ };
4116
+ /**
4117
+ * Services offered (returned when readMask includes 'serviceItems')
4118
+ */
4119
+ serviceItems?: Array<{
4120
+ structuredServiceItem?: {
4121
+ serviceTypeId?: string;
4122
+ description?: string;
4123
+ };
4124
+ freeFormServiceItem?: {
4125
+ category?: string;
4126
+ label?: {
4127
+ displayName?: string;
4128
+ languageCode?: string;
4129
+ };
4130
+ };
4131
+ price?: {
4132
+ currencyCode?: string;
4133
+ units?: string;
4134
+ nanos?: number;
4135
+ };
4136
+ }>;
4097
4137
  });
4098
4138
  type GetGoogleBusinessLocationDetailsError = (ErrorResponse | {
4099
4139
  error?: string;
@@ -4101,7 +4141,7 @@ type GetGoogleBusinessLocationDetailsError = (ErrorResponse | {
4101
4141
  type UpdateGoogleBusinessLocationDetailsData = {
4102
4142
  body: {
4103
4143
  /**
4104
- * Required. Comma-separated fields to update (e.g. 'regularHours', 'specialHours', 'profile.description')
4144
+ * Required. Comma-separated fields to update (e.g. 'regularHours', 'specialHours', 'profile.description', 'categories', 'serviceItems'). Any valid Google Business Information API updateMask field is supported.
4105
4145
  */
4106
4146
  updateMask: string;
4107
4147
  regularHours?: {
@@ -4137,6 +4177,77 @@ type UpdateGoogleBusinessLocationDetailsData = {
4137
4177
  primaryPhone?: string;
4138
4178
  additionalPhones?: Array<(string)>;
4139
4179
  };
4180
+ /**
4181
+ * Primary and additional business categories. Use updateMask='categories' to update.
4182
+ */
4183
+ categories?: {
4184
+ primaryCategory?: {
4185
+ /**
4186
+ * Category resource name (e.g. 'categories/gcid:laundromat'). Use Google's Categories API to look up valid IDs.
4187
+ */
4188
+ name?: string;
4189
+ };
4190
+ additionalCategories?: Array<{
4191
+ /**
4192
+ * Category resource name (e.g. 'categories/gcid:dry_cleaner')
4193
+ */
4194
+ name?: string;
4195
+ }>;
4196
+ };
4197
+ /**
4198
+ * Services offered by the business. Use updateMask='serviceItems' to update.
4199
+ */
4200
+ serviceItems?: Array<{
4201
+ /**
4202
+ * A predefined service from Google's service type catalog
4203
+ */
4204
+ structuredServiceItem?: {
4205
+ /**
4206
+ * Service type ID from Google's catalog (e.g. 'job_type_id:plumbing_drain_repair')
4207
+ */
4208
+ serviceTypeId?: string;
4209
+ /**
4210
+ * Optional description of the service
4211
+ */
4212
+ description?: string;
4213
+ };
4214
+ /**
4215
+ * A custom service not in Google's catalog
4216
+ */
4217
+ freeFormServiceItem?: {
4218
+ /**
4219
+ * Category resource name this service belongs to (e.g. 'categories/gcid:laundromat')
4220
+ */
4221
+ category?: string;
4222
+ label?: {
4223
+ /**
4224
+ * Service name as displayed to users
4225
+ */
4226
+ displayName?: string;
4227
+ /**
4228
+ * Language code (e.g. 'en')
4229
+ */
4230
+ languageCode?: string;
4231
+ };
4232
+ };
4233
+ /**
4234
+ * Optional price for the service
4235
+ */
4236
+ price?: {
4237
+ /**
4238
+ * ISO 4217 currency code (e.g. 'USD')
4239
+ */
4240
+ currencyCode?: string;
4241
+ /**
4242
+ * Whole units of the amount
4243
+ */
4244
+ units?: string;
4245
+ /**
4246
+ * Nano units (10^-9) of the amount
4247
+ */
4248
+ nanos?: number;
4249
+ };
4250
+ }>;
4140
4251
  };
4141
4252
  path: {
4142
4253
  /**
package/dist/index.d.ts CHANGED
@@ -4042,7 +4042,7 @@ type GetGoogleBusinessLocationDetailsData = {
4042
4042
  */
4043
4043
  locationId?: string;
4044
4044
  /**
4045
- * Comma-separated fields to return. Available: name, title, phoneNumbers, categories, storefrontAddress, websiteUri, regularHours, specialHours, serviceArea, profile, openInfo, metadata, moreHours.
4045
+ * Comma-separated fields to return. Available: name, title, phoneNumbers, categories, storefrontAddress, websiteUri, regularHours, specialHours, serviceArea, serviceItems, profile, openInfo, metadata, moreHours.
4046
4046
  */
4047
4047
  readMask?: string;
4048
4048
  };
@@ -4094,6 +4094,46 @@ type GetGoogleBusinessLocationDetailsResponse = ({
4094
4094
  primaryPhone?: string;
4095
4095
  additionalPhones?: Array<(string)>;
4096
4096
  };
4097
+ /**
4098
+ * Business categories (returned when readMask includes 'categories')
4099
+ */
4100
+ categories?: {
4101
+ primaryCategory?: {
4102
+ /**
4103
+ * Category resource name
4104
+ */
4105
+ name?: string;
4106
+ /**
4107
+ * Human-readable category name
4108
+ */
4109
+ displayName?: string;
4110
+ };
4111
+ additionalCategories?: Array<{
4112
+ name?: string;
4113
+ displayName?: string;
4114
+ }>;
4115
+ };
4116
+ /**
4117
+ * Services offered (returned when readMask includes 'serviceItems')
4118
+ */
4119
+ serviceItems?: Array<{
4120
+ structuredServiceItem?: {
4121
+ serviceTypeId?: string;
4122
+ description?: string;
4123
+ };
4124
+ freeFormServiceItem?: {
4125
+ category?: string;
4126
+ label?: {
4127
+ displayName?: string;
4128
+ languageCode?: string;
4129
+ };
4130
+ };
4131
+ price?: {
4132
+ currencyCode?: string;
4133
+ units?: string;
4134
+ nanos?: number;
4135
+ };
4136
+ }>;
4097
4137
  });
4098
4138
  type GetGoogleBusinessLocationDetailsError = (ErrorResponse | {
4099
4139
  error?: string;
@@ -4101,7 +4141,7 @@ type GetGoogleBusinessLocationDetailsError = (ErrorResponse | {
4101
4141
  type UpdateGoogleBusinessLocationDetailsData = {
4102
4142
  body: {
4103
4143
  /**
4104
- * Required. Comma-separated fields to update (e.g. 'regularHours', 'specialHours', 'profile.description')
4144
+ * Required. Comma-separated fields to update (e.g. 'regularHours', 'specialHours', 'profile.description', 'categories', 'serviceItems'). Any valid Google Business Information API updateMask field is supported.
4105
4145
  */
4106
4146
  updateMask: string;
4107
4147
  regularHours?: {
@@ -4137,6 +4177,77 @@ type UpdateGoogleBusinessLocationDetailsData = {
4137
4177
  primaryPhone?: string;
4138
4178
  additionalPhones?: Array<(string)>;
4139
4179
  };
4180
+ /**
4181
+ * Primary and additional business categories. Use updateMask='categories' to update.
4182
+ */
4183
+ categories?: {
4184
+ primaryCategory?: {
4185
+ /**
4186
+ * Category resource name (e.g. 'categories/gcid:laundromat'). Use Google's Categories API to look up valid IDs.
4187
+ */
4188
+ name?: string;
4189
+ };
4190
+ additionalCategories?: Array<{
4191
+ /**
4192
+ * Category resource name (e.g. 'categories/gcid:dry_cleaner')
4193
+ */
4194
+ name?: string;
4195
+ }>;
4196
+ };
4197
+ /**
4198
+ * Services offered by the business. Use updateMask='serviceItems' to update.
4199
+ */
4200
+ serviceItems?: Array<{
4201
+ /**
4202
+ * A predefined service from Google's service type catalog
4203
+ */
4204
+ structuredServiceItem?: {
4205
+ /**
4206
+ * Service type ID from Google's catalog (e.g. 'job_type_id:plumbing_drain_repair')
4207
+ */
4208
+ serviceTypeId?: string;
4209
+ /**
4210
+ * Optional description of the service
4211
+ */
4212
+ description?: string;
4213
+ };
4214
+ /**
4215
+ * A custom service not in Google's catalog
4216
+ */
4217
+ freeFormServiceItem?: {
4218
+ /**
4219
+ * Category resource name this service belongs to (e.g. 'categories/gcid:laundromat')
4220
+ */
4221
+ category?: string;
4222
+ label?: {
4223
+ /**
4224
+ * Service name as displayed to users
4225
+ */
4226
+ displayName?: string;
4227
+ /**
4228
+ * Language code (e.g. 'en')
4229
+ */
4230
+ languageCode?: string;
4231
+ };
4232
+ };
4233
+ /**
4234
+ * Optional price for the service
4235
+ */
4236
+ price?: {
4237
+ /**
4238
+ * ISO 4217 currency code (e.g. 'USD')
4239
+ */
4240
+ currencyCode?: string;
4241
+ /**
4242
+ * Whole units of the amount
4243
+ */
4244
+ units?: string;
4245
+ /**
4246
+ * Nano units (10^-9) of the amount
4247
+ */
4248
+ nanos?: number;
4249
+ };
4250
+ }>;
4140
4251
  };
4141
4252
  path: {
4142
4253
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getlatedev/node",
3
- "version": "0.1.50",
3
+ "version": "0.1.51",
4
4
  "description": "The official Node.js library for the Late API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -773,7 +773,7 @@ export const updateGoogleBusinessFoodMenus = <ThrowOnError extends boolean = fal
773
773
 
774
774
  /**
775
775
  * Get location details
776
- * Returns detailed GBP location info (hours, description, phone, website, categories). Use readMask to request specific fields.
776
+ * Returns detailed GBP location info (hours, description, phone, website, categories, services). Use readMask to request specific fields.
777
777
  */
778
778
  export const getGoogleBusinessLocationDetails = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetGoogleBusinessLocationDetailsData, ThrowOnError>) => {
779
779
  return (options?.client ?? client).get<GetGoogleBusinessLocationDetailsResponse, GetGoogleBusinessLocationDetailsError, ThrowOnError>({
@@ -784,7 +784,10 @@ export const getGoogleBusinessLocationDetails = <ThrowOnError extends boolean =
784
784
 
785
785
  /**
786
786
  * Update location details
787
- * Updates GBP location details (hours, description, phone, website). The updateMask field is required and specifies which fields to update.
787
+ * Updates GBP location details. The updateMask field is required and specifies which fields to update.
788
+ * This endpoint proxies Google's Business Information API locations.patch, so any valid updateMask field is supported.
789
+ * Common fields: regularHours, specialHours, profile.description, websiteUri, phoneNumbers, categories, serviceItems.
790
+ *
788
791
  */
789
792
  export const updateGoogleBusinessLocationDetails = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateGoogleBusinessLocationDetailsData, ThrowOnError>) => {
790
793
  return (options?.client ?? client).put<UpdateGoogleBusinessLocationDetailsResponse, UpdateGoogleBusinessLocationDetailsError, ThrowOnError>({
@@ -3894,7 +3894,7 @@ export type GetGoogleBusinessLocationDetailsData = {
3894
3894
  */
3895
3895
  locationId?: string;
3896
3896
  /**
3897
- * Comma-separated fields to return. Available: name, title, phoneNumbers, categories, storefrontAddress, websiteUri, regularHours, specialHours, serviceArea, profile, openInfo, metadata, moreHours.
3897
+ * Comma-separated fields to return. Available: name, title, phoneNumbers, categories, storefrontAddress, websiteUri, regularHours, specialHours, serviceArea, serviceItems, profile, openInfo, metadata, moreHours.
3898
3898
  */
3899
3899
  readMask?: string;
3900
3900
  };
@@ -3947,6 +3947,46 @@ export type GetGoogleBusinessLocationDetailsResponse = ({
3947
3947
  primaryPhone?: string;
3948
3948
  additionalPhones?: Array<(string)>;
3949
3949
  };
3950
+ /**
3951
+ * Business categories (returned when readMask includes 'categories')
3952
+ */
3953
+ categories?: {
3954
+ primaryCategory?: {
3955
+ /**
3956
+ * Category resource name
3957
+ */
3958
+ name?: string;
3959
+ /**
3960
+ * Human-readable category name
3961
+ */
3962
+ displayName?: string;
3963
+ };
3964
+ additionalCategories?: Array<{
3965
+ name?: string;
3966
+ displayName?: string;
3967
+ }>;
3968
+ };
3969
+ /**
3970
+ * Services offered (returned when readMask includes 'serviceItems')
3971
+ */
3972
+ serviceItems?: Array<{
3973
+ structuredServiceItem?: {
3974
+ serviceTypeId?: string;
3975
+ description?: string;
3976
+ };
3977
+ freeFormServiceItem?: {
3978
+ category?: string;
3979
+ label?: {
3980
+ displayName?: string;
3981
+ languageCode?: string;
3982
+ };
3983
+ };
3984
+ price?: {
3985
+ currencyCode?: string;
3986
+ units?: string;
3987
+ nanos?: number;
3988
+ };
3989
+ }>;
3950
3990
  });
3951
3991
 
3952
3992
  export type GetGoogleBusinessLocationDetailsError = (ErrorResponse | {
@@ -3956,7 +3996,7 @@ export type GetGoogleBusinessLocationDetailsError = (ErrorResponse | {
3956
3996
  export type UpdateGoogleBusinessLocationDetailsData = {
3957
3997
  body: {
3958
3998
  /**
3959
- * Required. Comma-separated fields to update (e.g. 'regularHours', 'specialHours', 'profile.description')
3999
+ * Required. Comma-separated fields to update (e.g. 'regularHours', 'specialHours', 'profile.description', 'categories', 'serviceItems'). Any valid Google Business Information API updateMask field is supported.
3960
4000
  */
3961
4001
  updateMask: string;
3962
4002
  regularHours?: {
@@ -3992,6 +4032,77 @@ export type UpdateGoogleBusinessLocationDetailsData = {
3992
4032
  primaryPhone?: string;
3993
4033
  additionalPhones?: Array<(string)>;
3994
4034
  };
4035
+ /**
4036
+ * Primary and additional business categories. Use updateMask='categories' to update.
4037
+ */
4038
+ categories?: {
4039
+ primaryCategory?: {
4040
+ /**
4041
+ * Category resource name (e.g. 'categories/gcid:laundromat'). Use Google's Categories API to look up valid IDs.
4042
+ */
4043
+ name?: string;
4044
+ };
4045
+ additionalCategories?: Array<{
4046
+ /**
4047
+ * Category resource name (e.g. 'categories/gcid:dry_cleaner')
4048
+ */
4049
+ name?: string;
4050
+ }>;
4051
+ };
4052
+ /**
4053
+ * Services offered by the business. Use updateMask='serviceItems' to update.
4054
+ */
4055
+ serviceItems?: Array<{
4056
+ /**
4057
+ * A predefined service from Google's service type catalog
4058
+ */
4059
+ structuredServiceItem?: {
4060
+ /**
4061
+ * Service type ID from Google's catalog (e.g. 'job_type_id:plumbing_drain_repair')
4062
+ */
4063
+ serviceTypeId?: string;
4064
+ /**
4065
+ * Optional description of the service
4066
+ */
4067
+ description?: string;
4068
+ };
4069
+ /**
4070
+ * A custom service not in Google's catalog
4071
+ */
4072
+ freeFormServiceItem?: {
4073
+ /**
4074
+ * Category resource name this service belongs to (e.g. 'categories/gcid:laundromat')
4075
+ */
4076
+ category?: string;
4077
+ label?: {
4078
+ /**
4079
+ * Service name as displayed to users
4080
+ */
4081
+ displayName?: string;
4082
+ /**
4083
+ * Language code (e.g. 'en')
4084
+ */
4085
+ languageCode?: string;
4086
+ };
4087
+ };
4088
+ /**
4089
+ * Optional price for the service
4090
+ */
4091
+ price?: {
4092
+ /**
4093
+ * ISO 4217 currency code (e.g. 'USD')
4094
+ */
4095
+ currencyCode?: string;
4096
+ /**
4097
+ * Whole units of the amount
4098
+ */
4099
+ units?: string;
4100
+ /**
4101
+ * Nano units (10^-9) of the amount
4102
+ */
4103
+ nanos?: number;
4104
+ };
4105
+ }>;
3995
4106
  };
3996
4107
  path: {
3997
4108
  /**