0.0.20240502 • Published 3 days ago

@maxim_mazurok/gapi.client.retail-v2 v0.0.20240502

Weekly downloads
-
License
MIT
Repository
github
Last release
3 days ago

TypeScript typings for Vertex AI Search for Retail API v2

Vertex AI Search for Retail API is made up of Retail Search, Browse and Recommendations. These discovery AI solutions help you implement personalized search, browse and recommendations, based on machine learning models, across your websites and mobile applications. For detailed description please check documentation.

Installing

Install typings for Vertex AI Search for Retail API:

npm install @types/gapi.client.retail-v2 --save-dev

Usage

You need to initialize Google API client in your code:

gapi.load('client', () => {
  // now we can use gapi.client
  // ...
});

Then load api client wrapper:

gapi.client.load(
  'https://retail.googleapis.com/$discovery/rest?version=v2',
  () => {
    // now we can use:
    // gapi.client.retail
  }
);
// Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
gapi.client.load('retail', 'v2', () => {
  // now we can use:
  // gapi.client.retail
});

Don't forget to authenticate your client before sending any request to resources:

// declare client_id registered in Google Developers Console
var client_id = '',
  scope = [
    // See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
    'https://www.googleapis.com/auth/cloud-platform',
  ],
  immediate = true;
// ...

gapi.auth.authorize(
  {client_id: client_id, scope: scope, immediate: immediate},
  authResult => {
    if (authResult && !authResult.error) {
      /* handle successful authorization */
    } else {
      /* handle authorization error */
    }
  }
);

After that you can use Vertex AI Search for Retail API resources:

0.0.20240502

3 days ago

0.0.20240430

9 days ago

0.0.20240425

10 days ago

0.0.20240418

17 days ago

0.0.20240411

24 days ago

0.0.20240401

1 month ago

0.0.20240319

2 months ago

0.0.20240315

2 months ago

0.0.20240307

2 months ago

0.0.20240229

2 months ago

0.0.20240222

3 months ago

0.0.20240212

3 months ago

0.0.20240207

3 months ago

0.0.20240205

3 months ago

0.0.20240129

3 months ago

0.0.20240118

4 months ago

0.0.20240111

4 months ago

0.0.20240109

4 months ago

0.0.20231214

5 months ago

0.0.20231207

5 months ago

0.0.20231130

5 months ago

0.0.20230810

9 months ago

0.0.20231109

6 months ago

0.0.20230928

7 months ago

0.0.20230805

9 months ago

0.0.20230921

8 months ago

0.0.20230720

10 months ago

0.0.20231019

7 months ago

0.0.20230727

9 months ago

0.0.20231102

6 months ago

0.0.20231026

6 months ago

0.0.20230831

8 months ago

0.0.20230914

8 months ago

0.0.20230713

10 months ago

0.0.20231012

7 months ago

0.0.20230906

8 months ago

0.0.20230907

8 months ago

0.0.20230706

10 months ago

0.0.20230629

10 months ago

0.0.20230905

8 months ago

0.0.20231005

7 months ago

0.0.20230622

11 months ago

0.0.20230518

12 months ago

0.0.20230516

12 months ago

0.0.20230620

11 months ago

0.0.20230609

11 months ago

0.0.20230525

11 months ago

0.0.20230504

1 year ago

0.0.20230427

1 year ago

0.0.20230413

1 year ago

0.0.20230314

1 year ago

0.0.20230223

1 year ago

0.0.20230420

1 year ago

0.0.20230321

1 year ago

0.0.20230309

1 year ago

0.0.20230306

1 year ago

0.0.20230406

1 year ago

0.0.20230330

1 year ago

0.0.20230202

1 year ago

0.0.20230126

1 year ago

0.0.20230209

1 year ago

0.0.20221130

1 year ago

0.0.20230117

1 year ago

0.0.20221214

1 year ago

0.0.20230105

1 year ago

0.0.20230119

1 year ago

0.0.20221110

1 year ago

0.0.20230102

1 year ago

0.0.20221208

1 year ago

0.0.20221107

2 years ago

0.0.20221205

1 year ago

0.0.20221028

2 years ago

0.0.20221014

2 years ago

0.0.20220922

2 years ago

0.0.20221024

2 years ago

0.0.20220917

2 years ago

0.0.20220909

2 years ago

0.0.20220822

2 years ago

0.0.20220901

2 years ago

0.0.20220825

2 years ago

0.0.20220811

2 years ago