@maxim_mazurok/gapi.client.ces-v1 0.0.20260204

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 (3) hide show
  1. package/index.d.ts +4174 -0
  2. package/package.json +20 -0
  3. package/readme.md +77 -0
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@maxim_mazurok/gapi.client.ces-v1",
3
+ "version": "0.0.20260204",
4
+ "description": "TypeScript typings for Gemini Enterprise for Customer Experience API v1",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
8
+ },
9
+ "license": "MIT",
10
+ "author": {
11
+ "name": "Maxim Mazurok",
12
+ "email": "maxim@mazurok.com",
13
+ "url": "https://maxim.mazurok.com"
14
+ },
15
+ "types": "index.d.ts",
16
+ "dependencies": {
17
+ "@types/gapi.client": "*",
18
+ "@types/gapi.client.discovery-v1": "*"
19
+ }
20
+ }
package/readme.md ADDED
@@ -0,0 +1,77 @@
1
+ # TypeScript typings for Gemini Enterprise for Customer Experience API v1
2
+
3
+ For detailed description please check [documentation](https://cloud.google.com/customer-engagement-ai/conversational-agents/ps/reference).
4
+
5
+ ## Installing
6
+
7
+ Install typings for Gemini Enterprise for Customer Experience API:
8
+
9
+ ```
10
+ npm install @types/gapi.client.ces-v1 --save-dev
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ You need to initialize Google API client in your code:
16
+
17
+ ```typescript
18
+ gapi.load('client', () => {
19
+ // now we can use gapi.client
20
+ // ...
21
+ });
22
+ ```
23
+
24
+ Then load api client wrapper:
25
+
26
+ ```typescript
27
+ gapi.client.load(
28
+ 'https://ces.googleapis.com/$discovery/rest?version=v1',
29
+ () => {
30
+ // now we can use:
31
+ // gapi.client.ces
32
+ },
33
+ );
34
+ ```
35
+
36
+ ```typescript
37
+ // Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
38
+ gapi.client.load('ces', 'v1', () => {
39
+ // now we can use:
40
+ // gapi.client.ces
41
+ });
42
+ ```
43
+
44
+ Don't forget to authenticate your client before sending any request to resources:
45
+
46
+ ```typescript
47
+ // declare client_id registered in Google Developers Console
48
+ var client_id = '',
49
+ scope = [
50
+ // Create, update, delete, and manage your Next Gen Agents
51
+ 'https://www.googleapis.com/auth/ces',
52
+
53
+ // See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
54
+ 'https://www.googleapis.com/auth/cloud-platform',
55
+ ],
56
+ immediate = true;
57
+ // ...
58
+
59
+ gapi.auth.authorize(
60
+ {client_id: client_id, scope: scope, immediate: immediate},
61
+ authResult => {
62
+ if (authResult && !authResult.error) {
63
+ /* handle successful authorization */
64
+ } else {
65
+ /* handle authorization error */
66
+ }
67
+ },
68
+ );
69
+ ```
70
+
71
+ After that you can use Gemini Enterprise for Customer Experience API resources: <!-- TODO: make this work for multiple namespaces -->
72
+
73
+ ```typescript
74
+
75
+ ```
76
+
77
+ For provenance information see [Provenance section on NPM](https://www.npmjs.com/package/@maxim_mazurok/gapi.client.ces-v1#Provenance:~:text=none-,Provenance,-Built%20and%20signed)