@maxim_mazurok/gapi.client.vault-v1 0.0.20231116 → 0.0.20231211

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/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.vault-v1",
3
- "version": "0.0.20231116",
3
+ "version": "0.0.20231211",
4
4
  "description": "TypeScript typings for Google Vault API v1",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
8
+ },
5
9
  "license": "MIT",
6
10
  "author": {
7
- "email": "maxim@mazurok.com",
8
11
  "name": "Maxim Mazurok",
12
+ "email": "maxim@mazurok.com",
9
13
  "url": "https://maxim.mazurok.com"
10
14
  },
11
- "repository": {
12
- "type": "git",
13
- "url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
14
- },
15
15
  "types": "index.d.ts",
16
16
  "dependencies": {
17
17
  "@types/gapi.client": "*",
package/readme.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # TypeScript typings for Google Vault API v1
2
2
 
3
- Retention and eDiscovery for Google Workspace. To work with Vault resources, the account must have the [required Vault privileges](https://support.google.com/vault/answer/2799699) and access to the matter. To access a matter, the account must have created the matter, have the matter shared with them, or have the **View All Matters** privilege. For example, to download an export, an account needs the **Manage Exports** privilege and the matter shared with them.
3
+ Retention and eDiscovery for Google Workspace. To work with Vault resources, the account must have the [required Vault privileges](https://support.google.com/vault/answer/2799699) and access to the matter. To access a matter, the account must have created the matter, have the matter shared with them, or have the **View All Matters** privilege. For example, to download an export, an account needs the **Manage Exports** privilege and the matter shared with them.
4
4
  For detailed description please check [documentation](https://developers.google.com/vault).
5
5
 
6
6
  ## Installing
@@ -25,10 +25,13 @@ gapi.load('client', () => {
25
25
  Then load api client wrapper:
26
26
 
27
27
  ```typescript
28
- gapi.client.load('https://vault.googleapis.com/$discovery/rest?version=v1', () => {
29
- // now we can use:
30
- // gapi.client.vault
31
- });
28
+ gapi.client.load(
29
+ 'https://vault.googleapis.com/$discovery/rest?version=v1',
30
+ () => {
31
+ // now we can use:
32
+ // gapi.client.vault
33
+ }
34
+ );
32
35
  ```
33
36
 
34
37
  ```typescript
@@ -45,102 +48,102 @@ Don't forget to authenticate your client before sending any request to resources
45
48
  // declare client_id registered in Google Developers Console
46
49
  var client_id = '',
47
50
  scope = [
48
- // Manage your eDiscovery data
49
- 'https://www.googleapis.com/auth/ediscovery',
51
+ // Manage your eDiscovery data
52
+ 'https://www.googleapis.com/auth/ediscovery',
50
53
 
51
- // View your eDiscovery data
52
- 'https://www.googleapis.com/auth/ediscovery.readonly',
53
- ],
54
- immediate = true;
54
+ // View your eDiscovery data
55
+ 'https://www.googleapis.com/auth/ediscovery.readonly',
56
+ ],
57
+ immediate = true;
55
58
  // ...
56
59
 
57
60
  gapi.auth.authorize(
58
- { client_id: client_id, scope: scope, immediate: immediate },
61
+ {client_id: client_id, scope: scope, immediate: immediate},
59
62
  authResult => {
60
63
  if (authResult && !authResult.error) {
61
- /* handle successful authorization */
64
+ /* handle successful authorization */
62
65
  } else {
63
- /* handle authorization error */
66
+ /* handle authorization error */
64
67
  }
65
- });
68
+ }
69
+ );
66
70
  ```
67
71
 
68
72
  After that you can use Google Vault API resources: <!-- TODO: make this work for multiple namespaces -->
69
73
 
70
74
  ```typescript
71
-
72
75
  /*
73
76
  Adds an account as a matter collaborator.
74
77
  */
75
- await gapi.client.vault.matters.addPermissions({ matterId: "matterId", });
78
+ await gapi.client.vault.matters.addPermissions({matterId: 'matterId'});
76
79
 
77
80
  /*
78
81
  Closes the specified matter. Returns the matter with updated state.
79
82
  */
80
- await gapi.client.vault.matters.close({ matterId: "matterId", });
83
+ await gapi.client.vault.matters.close({matterId: 'matterId'});
81
84
 
82
85
  /*
83
86
  Counts the accounts processed by the specified query.
84
87
  */
85
- await gapi.client.vault.matters.count({ matterId: "matterId", });
88
+ await gapi.client.vault.matters.count({matterId: 'matterId'});
86
89
 
87
90
  /*
88
91
  Creates a matter with the given name and description. The initial state is open, and the owner is the method caller. Returns the created matter with default view.
89
92
  */
90
- await gapi.client.vault.matters.create({ });
93
+ await gapi.client.vault.matters.create({});
91
94
 
92
95
  /*
93
96
  Deletes the specified matter. Returns the matter with updated state.
94
97
  */
95
- await gapi.client.vault.matters.delete({ matterId: "matterId", });
98
+ await gapi.client.vault.matters.delete({matterId: 'matterId'});
96
99
 
97
100
  /*
98
101
  Gets the specified matter.
99
102
  */
100
- await gapi.client.vault.matters.get({ matterId: "matterId", });
103
+ await gapi.client.vault.matters.get({matterId: 'matterId'});
101
104
 
102
105
  /*
103
106
  Lists matters the requestor has access to.
104
107
  */
105
- await gapi.client.vault.matters.list({ });
108
+ await gapi.client.vault.matters.list({});
106
109
 
107
110
  /*
108
111
  Removes an account as a matter collaborator.
109
112
  */
110
- await gapi.client.vault.matters.removePermissions({ matterId: "matterId", });
113
+ await gapi.client.vault.matters.removePermissions({matterId: 'matterId'});
111
114
 
112
115
  /*
113
116
  Reopens the specified matter. Returns the matter with updated state.
114
117
  */
115
- await gapi.client.vault.matters.reopen({ matterId: "matterId", });
118
+ await gapi.client.vault.matters.reopen({matterId: 'matterId'});
116
119
 
117
120
  /*
118
121
  Undeletes the specified matter. Returns the matter with updated state.
119
122
  */
120
- await gapi.client.vault.matters.undelete({ matterId: "matterId", });
123
+ await gapi.client.vault.matters.undelete({matterId: 'matterId'});
121
124
 
122
125
  /*
123
126
  Updates the specified matter. This updates only the name and description of the matter, identified by matter ID. Changes to any other fields are ignored. Returns the default view of the matter.
124
127
  */
125
- await gapi.client.vault.matters.update({ matterId: "matterId", });
128
+ await gapi.client.vault.matters.update({matterId: 'matterId'});
126
129
 
127
130
  /*
128
131
  Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
129
132
  */
130
- await gapi.client.vault.operations.cancel({ name: "name", });
133
+ await gapi.client.vault.operations.cancel({name: 'name'});
131
134
 
132
135
  /*
133
136
  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`.
134
137
  */
135
- await gapi.client.vault.operations.delete({ name: "name", });
138
+ await gapi.client.vault.operations.delete({name: 'name'});
136
139
 
137
140
  /*
138
141
  Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
139
142
  */
140
- await gapi.client.vault.operations.get({ name: "name", });
143
+ await gapi.client.vault.operations.get({name: 'name'});
141
144
 
142
145
  /*
143
146
  Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
144
147
  */
145
- await gapi.client.vault.operations.list({ name: "name", });
148
+ await gapi.client.vault.operations.list({name: 'name'});
146
149
  ```