0.0.20240515 • Published 5 days ago

@maxim_mazurok/gapi.client.documentai-v1 v0.0.20240515

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

TypeScript typings for Cloud Document AI API v1

Service to parse structured information from unstructured or semi-structured documents using state-of-the-art Google AI such as natural language, computer vision, translation, and AutoML. For detailed description please check documentation.

Installing

Install typings for Cloud Document AI API:

npm install @types/gapi.client.documentai-v1 --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://documentai.googleapis.com/$discovery/rest?version=v1',
  () => {
    // now we can use:
    // gapi.client.documentai
  }
);
// 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('documentai', 'v1', () => {
  // now we can use:
  // gapi.client.documentai
});

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 Cloud Document AI API resources:

/*
Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
*/
await gapi.client.documentai.operations.delete({name: 'name'});
0.0.20240515

5 days ago

0.0.20240502

20 days ago

0.0.20240422

27 days ago

0.0.20240417

1 month ago

0.0.20240415

1 month ago

0.0.20240404

2 months ago

0.0.20240328

2 months ago

0.0.20240325

2 months ago

0.0.20240314

2 months ago

0.0.20240307

2 months ago

0.0.20240304

3 months ago

0.0.20240229

3 months ago

0.0.20240223

3 months ago

0.0.20240212

3 months ago

0.0.20240206

3 months ago

0.0.20240205

4 months ago

0.0.20240126

4 months ago

0.0.20240118

4 months ago

0.0.20240112

4 months ago

0.0.20240104

4 months ago

0.0.20231228

5 months ago

0.0.20231211

5 months ago

0.0.20231208

5 months ago

0.0.20231206

6 months ago

0.0.20231130

6 months ago

0.0.20230818

9 months ago

0.0.20231106

7 months ago

0.0.20230814

9 months ago

0.0.20231113

6 months ago

0.0.20231114

6 months ago

0.0.20230721

10 months ago

0.0.20230804

10 months ago

0.0.20230727

10 months ago

0.0.20230923

8 months ago

0.0.20231021

7 months ago

0.0.20231102

7 months ago

0.0.20231026

7 months ago

0.0.20230719

10 months ago

0.0.20231006

8 months ago

0.0.20230830

9 months ago

0.0.20230914

8 months ago

0.0.20230911

8 months ago

0.0.20230714

10 months ago

0.0.20231012

7 months ago

0.0.20230706

10 months ago

0.0.20231116

6 months ago

0.0.20230822

9 months ago

0.0.20230705

11 months ago

0.0.20230901

9 months ago

0.0.20231001

8 months ago

0.0.20230627

11 months ago

0.0.20230519

12 months ago

0.0.20230619

11 months ago

0.0.20230609

11 months ago

0.0.20230605

12 months ago

0.0.20230526

12 months ago

0.0.20230504

1 year ago

0.0.20230427

1 year ago

0.0.20230412

1 year ago

0.0.20230417

1 year ago

0.0.20230323

1 year ago

0.0.20230320

1 year ago

0.0.20230420

1 year ago

0.0.20230321

1 year ago

0.0.20230227

1 year ago

0.0.20230302

1 year ago

0.0.20230330

1 year ago

0.0.20230310

1 year ago

0.0.20230218

1 year ago

0.0.20230202

1 year ago

0.0.20230129

1 year ago

0.0.20230127

1 year ago

0.0.20230210

1 year ago

0.0.20230117

1 year ago

0.0.20221114

2 years ago

0.0.20221212

1 year ago

0.0.20230120

1 year ago

0.0.20221108

2 years ago

0.0.20221106

2 years ago

0.0.20230106

1 year ago

0.0.20221201

1 year ago

0.0.20230113

1 year ago

0.0.20221017

2 years ago

0.0.20221027

2 years ago

0.0.20221005

2 years ago

0.0.20221023

2 years ago

0.0.20220928

2 years ago

0.0.20220916

2 years ago

0.0.20220919

2 years ago

0.0.20220821

2 years ago

0.0.20220921

2 years ago

0.0.20220911

2 years ago

0.0.20220912

2 years ago

0.0.20220901

2 years ago

0.0.20220824

2 years ago

0.0.20220815

2 years ago

0.0.20220808

2 years ago