@maxim_mazurok/gapi.client.chromepolicy-v1 0.0.20220811

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/index.d.ts ADDED
@@ -0,0 +1,895 @@
1
+ /* Type definitions for non-npm package Chrome Policy API v1 0.0 */
2
+ // Project: http://developers.google.com/chrome/policy
3
+ // Definitions by: Maxim Mazurok <https://github.com/Maxim-Mazurok>
4
+ // Nick Amoscato <https://github.com/namoscato>
5
+ // Declan Vong <https://github.com/declanvong>
6
+ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
7
+ // TypeScript Version: 2.8
8
+
9
+ // IMPORTANT
10
+ // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
11
+ // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
12
+ // Generated from: https://chromepolicy.googleapis.com/$discovery/rest?version=v1
13
+ // Revision: 20220811
14
+
15
+ /// <reference types="gapi.client" />
16
+
17
+ declare namespace gapi.client {
18
+ /** Load Chrome Policy API v1 */
19
+ function load(urlOrObject: "https://chromepolicy.googleapis.com/$discovery/rest?version=v1"): Promise<void>;
20
+ /** @deprecated Please load APIs with discovery documents. */
21
+ function load(name: "chromepolicy", version: "v1"): Promise<void>;
22
+ /** @deprecated Please load APIs with discovery documents. */
23
+ function load(name: "chromepolicy", version: "v1", callback: () => any): void;
24
+
25
+ namespace chromepolicy {
26
+ interface ChromeCrosDpanelAutosettingsProtoPolicyApiLifecycle {
27
+ /** Description about current life cycle. */
28
+ description?: string;
29
+ /** End supporting date for current policy. */
30
+ endSupport?: GoogleTypeDate;
31
+ /** Indicate current life cycle stage of the policy API. */
32
+ policyApiLifecycleStage?: string;
33
+ }
34
+ interface GoogleChromePolicyV1AdditionalTargetKeyName {
35
+ /** Key name. */
36
+ key?: string;
37
+ /** Key description. */
38
+ keyDescription?: string;
39
+ }
40
+ interface GoogleChromePolicyV1BatchDeleteGroupPoliciesRequest {
41
+ /**
42
+ * List of policies that will be deleted as defined by the `requests`. All requests in the list must follow these restrictions: 1. All schemas in the list must have the same root
43
+ * namespace. 2. All `policyTargetKey.targetResource` values must point to a group resource. 3. All `policyTargetKey` values must have the same `app_id` key name in the
44
+ * `additionalTargetKeys`. 4. No two modification requests can reference the same `policySchema` + ` policyTargetKey` pair.
45
+ */
46
+ requests?: GoogleChromePolicyV1DeleteGroupPolicyRequest[];
47
+ }
48
+ interface GoogleChromePolicyV1BatchInheritOrgUnitPoliciesRequest {
49
+ /**
50
+ * List of policies that have to inherit their values as defined by the `requests`. All requests in the list must follow these restrictions: 1. All schemas in the list must have the
51
+ * same root namespace. 2. All `policyTargetKey.targetResource` values must point to an org unit resource. 3. All `policyTargetKey` values must have the same key names in the `
52
+ * additionalTargetKeys`. This also means if one of the targets has an empty `additionalTargetKeys` map, all of the targets must have an empty `additionalTargetKeys` map. 4. No two
53
+ * modification requests can reference the same `policySchema` + ` policyTargetKey` pair.
54
+ */
55
+ requests?: GoogleChromePolicyV1InheritOrgUnitPolicyRequest[];
56
+ }
57
+ interface GoogleChromePolicyV1BatchModifyGroupPoliciesRequest {
58
+ /**
59
+ * List of policies to modify as defined by the `requests`. All requests in the list must follow these restrictions: 1. All schemas in the list must have the same root namespace. 2.
60
+ * All `policyTargetKey.targetResource` values must point to a group resource. 3. All `policyTargetKey` values must have the same `app_id` key name in the `additionalTargetKeys`. 4. No
61
+ * two modification requests can reference the same `policySchema` + ` policyTargetKey` pair.
62
+ */
63
+ requests?: GoogleChromePolicyV1ModifyGroupPolicyRequest[];
64
+ }
65
+ interface GoogleChromePolicyV1BatchModifyOrgUnitPoliciesRequest {
66
+ /**
67
+ * List of policies to modify as defined by the `requests`. All requests in the list must follow these restrictions: 1. All schemas in the list must have the same root namespace. 2.
68
+ * All `policyTargetKey.targetResource` values must point to an org unit resource. 3. All `policyTargetKey` values must have the same key names in the ` additionalTargetKeys`. This
69
+ * also means if one of the targets has an empty `additionalTargetKeys` map, all of the targets must have an empty `additionalTargetKeys` map. 4. No two modification requests can
70
+ * reference the same `policySchema` + ` policyTargetKey` pair.
71
+ */
72
+ requests?: GoogleChromePolicyV1ModifyOrgUnitPolicyRequest[];
73
+ }
74
+ interface GoogleChromePolicyV1DeleteGroupPolicyRequest {
75
+ /** The fully qualified name of the policy schema that is being inherited. */
76
+ policySchema?: string;
77
+ /** Required. The key of the target for which we want to modify a policy. The target resource must point to a Group. */
78
+ policyTargetKey?: GoogleChromePolicyV1PolicyTargetKey;
79
+ }
80
+ interface GoogleChromePolicyV1InheritOrgUnitPolicyRequest {
81
+ /** The fully qualified name of the policy schema that is being inherited. */
82
+ policySchema?: string;
83
+ /** Required. The key of the target for which we want to modify a policy. The target resource must point to an Org Unit. */
84
+ policyTargetKey?: GoogleChromePolicyV1PolicyTargetKey;
85
+ }
86
+ interface GoogleChromePolicyV1ListGroupPriorityOrderingRequest {
87
+ /** Required. The namespace of the policy type for the request. */
88
+ policyNamespace?: string;
89
+ /** Required. The key of the target for which we want to retrieve the group priority ordering. The target resource must point to an app. */
90
+ policyTargetKey?: GoogleChromePolicyV1PolicyTargetKey;
91
+ }
92
+ interface GoogleChromePolicyV1ListGroupPriorityOrderingResponse {
93
+ /** Output only. The group IDs, in priority ordering. */
94
+ groupIds?: string[];
95
+ /** Output only. The namespace of the policy type of the group IDs. */
96
+ policyNamespace?: string;
97
+ /** Output only. The target resource for which the group priority ordering has been retrieved. */
98
+ policyTargetKey?: GoogleChromePolicyV1PolicyTargetKey;
99
+ }
100
+ interface GoogleChromePolicyV1ListPolicySchemasResponse {
101
+ /** The page token used to get the next page of policy schemas. */
102
+ nextPageToken?: string;
103
+ /** The list of policy schemas that match the query. */
104
+ policySchemas?: GoogleChromePolicyV1PolicySchema[];
105
+ }
106
+ interface GoogleChromePolicyV1ModifyGroupPolicyRequest {
107
+ /** Required. The key of the target for which we want to modify a policy. The target resource must point to a Group. */
108
+ policyTargetKey?: GoogleChromePolicyV1PolicyTargetKey;
109
+ /** The new value for the policy. */
110
+ policyValue?: GoogleChromePolicyV1PolicyValue;
111
+ /**
112
+ * Required. Policy fields to update. Only fields in this mask will be updated; other fields in `policy_value` will be ignored (even if they have values). If a field is in this list it
113
+ * must have a value in 'policy_value'.
114
+ */
115
+ updateMask?: string;
116
+ }
117
+ interface GoogleChromePolicyV1ModifyOrgUnitPolicyRequest {
118
+ /** Required. The key of the target for which we want to modify a policy. The target resource must point to an Org Unit. */
119
+ policyTargetKey?: GoogleChromePolicyV1PolicyTargetKey;
120
+ /** The new value for the policy. */
121
+ policyValue?: GoogleChromePolicyV1PolicyValue;
122
+ /**
123
+ * Required. Policy fields to update. Only fields in this mask will be updated; other fields in `policy_value` will be ignored (even if they have values). If a field is in this list it
124
+ * must have a value in 'policy_value'.
125
+ */
126
+ updateMask?: string;
127
+ }
128
+ interface GoogleChromePolicyV1PolicySchema {
129
+ /** Output only. Specific access restrictions related to this policy. */
130
+ accessRestrictions?: string[];
131
+ /**
132
+ * Output only. Additional key names that will be used to identify the target of the policy value. When specifying a `policyTargetKey`, each of the additional keys specified here will
133
+ * have to be included in the `additionalTargetKeys` map.
134
+ */
135
+ additionalTargetKeyNames?: GoogleChromePolicyV1AdditionalTargetKeyName[];
136
+ /** Schema definition using proto descriptor. */
137
+ definition?: Proto2FileDescriptorProto;
138
+ /** Output only. Detailed description of each field that is part of the schema. */
139
+ fieldDescriptions?: GoogleChromePolicyV1PolicySchemaFieldDescription[];
140
+ /** Format: name=customers/{customer}/policySchemas/{schema_namespace} */
141
+ name?: string;
142
+ /** Output only. Special notice messages related to setting certain values in certain fields in the schema. */
143
+ notices?: GoogleChromePolicyV1PolicySchemaNoticeDescription[];
144
+ /** Output only. Current life cycle information. */
145
+ policyApiLifeycle?: ChromeCrosDpanelAutosettingsProtoPolicyApiLifecycle;
146
+ /** Output only. Description about the policy schema for user consumption. */
147
+ policyDescription?: string;
148
+ /**
149
+ * Output only. The fully qualified name of the policy schema. This value is used to fill the field `policy_schema` in PolicyValue when calling BatchInheritOrgUnitPolicies
150
+ * BatchModifyOrgUnitPolicies BatchModifyGroupPolicies or BatchDeleteGroupPolicies.
151
+ */
152
+ schemaName?: string;
153
+ /** Output only. URI to related support article for this schema. */
154
+ supportUri?: string;
155
+ /** Output only. Information about applicable target resources for the policy. */
156
+ validTargetResources?: string[];
157
+ }
158
+ interface GoogleChromePolicyV1PolicySchemaFieldDependencies {
159
+ /** The source field which this field depends on. */
160
+ sourceField?: string;
161
+ /** The value which the source field must have for this field to be allowed to be set. */
162
+ sourceFieldValue?: string;
163
+ }
164
+ interface GoogleChromePolicyV1PolicySchemaFieldDescription {
165
+ /** Output only. The description for the field. */
166
+ description?: string;
167
+ /** Output only. The name of the field for associated with this description. */
168
+ field?: string;
169
+ /** Output only. Provides a list of fields and values. At least one of the fields must have the corresponding value in order for this field to be allowed to be set. */
170
+ fieldDependencies?: GoogleChromePolicyV1PolicySchemaFieldDependencies[];
171
+ /** Output only. Any input constraints associated on the values for the field. */
172
+ inputConstraint?: string;
173
+ /** Output only. If the field has a set of known values, this field will provide a description for these values. */
174
+ knownValueDescriptions?: GoogleChromePolicyV1PolicySchemaFieldKnownValueDescription[];
175
+ /** Output only. Provides the description of the fields nested in this field, if the field is a message type that defines multiple fields. */
176
+ nestedFieldDescriptions?: GoogleChromePolicyV1PolicySchemaFieldDescription[];
177
+ /** Output only. Provides a list of fields that are required to be set if this field has a certain value. */
178
+ requiredItems?: GoogleChromePolicyV1PolicySchemaRequiredItems[];
179
+ }
180
+ interface GoogleChromePolicyV1PolicySchemaFieldKnownValueDescription {
181
+ /** Output only. Additional description for this value. */
182
+ description?: string;
183
+ /** Output only. The string represenstation of the value that can be set for the field. */
184
+ value?: string;
185
+ }
186
+ interface GoogleChromePolicyV1PolicySchemaNoticeDescription {
187
+ /** Output only. Whether the user needs to acknowledge the notice message before the value can be set. */
188
+ acknowledgementRequired?: boolean;
189
+ /** Output only. The field name associated with the notice. */
190
+ field?: string;
191
+ /** Output only. The notice message associate with the value of the field. */
192
+ noticeMessage?: string;
193
+ /**
194
+ * Output only. The value of the field that has a notice. When setting the field to this value, the user may be required to acknowledge the notice message in order for the value to be
195
+ * set.
196
+ */
197
+ noticeValue?: string;
198
+ }
199
+ interface GoogleChromePolicyV1PolicySchemaRequiredItems {
200
+ /** The value(s) of the field that provoke required field enforcement. An empty field_conditions implies that any value assigned to this field will provoke required field enforcement. */
201
+ fieldConditions?: string[];
202
+ /** The fields that are required as a consequence of the field conditions. */
203
+ requiredFields?: string[];
204
+ }
205
+ interface GoogleChromePolicyV1PolicyTargetKey {
206
+ /** Map containing the additional target key name and value pairs used to further identify the target of the policy. */
207
+ additionalTargetKeys?: { [P in string]: string };
208
+ /** The target resource on which this policy is applied. The following resources are supported: * Organizational Unit ("orgunits/{orgunit_id}") * Group ("groups/{group_id}") */
209
+ targetResource?: string;
210
+ }
211
+ interface GoogleChromePolicyV1PolicyValue {
212
+ /** The fully qualified name of the policy schema associated with this policy. */
213
+ policySchema?: string;
214
+ /** The value of the policy that is compatible with the schema that it is associated with. */
215
+ value?: { [P in string]: any };
216
+ }
217
+ interface GoogleChromePolicyV1ResolvedPolicy {
218
+ /**
219
+ * Output only. The added source key establishes at which level an entity was explicitly added for management. This is useful for certain type of policies that are only applied if they
220
+ * are explicitly added for management. For example: apps and networks. An entity can only be deleted from management in an Organizational Unit that it was explicitly added to. If this
221
+ * is not present it means that the policy is managed without the need to explicitly add an entity, for example: standard user or device policies.
222
+ */
223
+ addedSourceKey?: GoogleChromePolicyV1PolicyTargetKey;
224
+ /**
225
+ * Output only. The source resource from which this policy value is obtained. May be the same as `targetKey` if the policy is directly modified on the target, otherwise it would be
226
+ * another resource from which the policy gets its value (if applicable). If not present, the source is the default value for the customer.
227
+ */
228
+ sourceKey?: GoogleChromePolicyV1PolicyTargetKey;
229
+ /** Output only. The target resource for which the resolved policy value applies. */
230
+ targetKey?: GoogleChromePolicyV1PolicyTargetKey;
231
+ /** Output only. The resolved value of the policy. */
232
+ value?: GoogleChromePolicyV1PolicyValue;
233
+ }
234
+ interface GoogleChromePolicyV1ResolveRequest {
235
+ /** The maximum number of policies to return, defaults to 100 and has a maximum of 1000. */
236
+ pageSize?: number;
237
+ /** The page token used to retrieve a specific page of the request. */
238
+ pageToken?: string;
239
+ /**
240
+ * The schema filter to apply to the resolve request. Specify a schema name to view a particular schema, for example: chrome.users.ShowLogoutButton Wildcards are supported, but only in
241
+ * the leaf portion of the schema name. Wildcards cannot be used in namespace directly. Please read https://developers.google.com/chrome/policy/guides/policy-schemas for details on
242
+ * schema namepsaces. For example: Valid: "chrome.users.*", "chrome.users.apps.*", "chrome.printers.*" Invalid: "*", "*.users", "chrome.*", "chrome.*.apps.*"
243
+ */
244
+ policySchemaFilter?: string;
245
+ /** Required. The key of the target resource on which the policies should be resolved. The target resource must point to an Org Unit. */
246
+ policyTargetKey?: GoogleChromePolicyV1PolicyTargetKey;
247
+ }
248
+ interface GoogleChromePolicyV1ResolveResponse {
249
+ /** The page token used to get the next set of resolved policies found by the request. */
250
+ nextPageToken?: string;
251
+ /** The list of resolved policies found by the resolve request. */
252
+ resolvedPolicies?: GoogleChromePolicyV1ResolvedPolicy[];
253
+ }
254
+ interface GoogleChromePolicyV1UpdateGroupPriorityOrderingRequest {
255
+ /** Required. The group IDs, in desired priority ordering. */
256
+ groupIds?: string[];
257
+ /** Required. The namespace of the policy type for the request. */
258
+ policyNamespace?: string;
259
+ /** Required. The key of the target for which we want to update the group priority ordering. The target resource must point to an app. */
260
+ policyTargetKey?: GoogleChromePolicyV1PolicyTargetKey;
261
+ }
262
+ interface GoogleChromePolicyV1UploadPolicyFileRequest {
263
+ /** Required. The fully qualified policy schema and field name this file is uploaded for. This information will be used to validate the content type of the file. */
264
+ policyField?: string;
265
+ }
266
+ interface GoogleChromePolicyV1UploadPolicyFileResponse {
267
+ /** The uri for end user to download the file. */
268
+ downloadUri?: string;
269
+ }
270
+ // tslint:disable-next-line:no-empty-interface
271
+ interface GoogleProtobufEmpty {
272
+ }
273
+ interface GoogleTypeDate {
274
+ /** Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. */
275
+ day?: number;
276
+ /** Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. */
277
+ month?: number;
278
+ /** Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. */
279
+ year?: number;
280
+ }
281
+ interface Proto2DescriptorProto {
282
+ enumType?: Proto2EnumDescriptorProto[];
283
+ field?: Proto2FieldDescriptorProto[];
284
+ name?: string;
285
+ nestedType?: Proto2DescriptorProto[];
286
+ oneofDecl?: Proto2OneofDescriptorProto[];
287
+ }
288
+ interface Proto2EnumDescriptorProto {
289
+ name?: string;
290
+ value?: Proto2EnumValueDescriptorProto[];
291
+ }
292
+ interface Proto2EnumValueDescriptorProto {
293
+ name?: string;
294
+ number?: number;
295
+ }
296
+ interface Proto2FieldDescriptorProto {
297
+ /**
298
+ * For numeric types, contains the original text representation of the value. For booleans, "true" or "false". For strings, contains the default text contents (not escaped in any way).
299
+ * For bytes, contains the C escaped value. All bytes >= 128 are escaped.
300
+ */
301
+ defaultValue?: string;
302
+ /**
303
+ * JSON name of this field. The value is set by protocol compiler. If the user has set a "json_name" option on this field, that option's value will be used. Otherwise, it's deduced
304
+ * from the field's name by converting it to camelCase.
305
+ */
306
+ jsonName?: string;
307
+ label?: string;
308
+ name?: string;
309
+ number?: number;
310
+ /** If set, gives the index of a oneof in the containing type's oneof_decl list. This field is a member of that oneof. */
311
+ oneofIndex?: number;
312
+ /**
313
+ * If true, this is a proto3 "optional". When a proto3 field is optional, it tracks presence regardless of field type. When proto3_optional is true, this field must be belong to a
314
+ * oneof to signal to old proto3 clients that presence is tracked for this field. This oneof is known as a "synthetic" oneof, and this field must be its sole member (each proto3
315
+ * optional field gets its own synthetic oneof). Synthetic oneofs exist in the descriptor only, and do not generate any API. Synthetic oneofs must be ordered after all "real" oneofs.
316
+ * For message fields, proto3_optional doesn't create any semantic change, since non-repeated message fields always track presence. However it still indicates the semantic detail of
317
+ * whether the user wrote "optional" or not. This can be useful for round-tripping the .proto file. For consistency we give message fields a synthetic oneof also, even though it is not
318
+ * required to track presence. This is especially important because the parser can't tell if a field is a message or an enum, so it must always create a synthetic oneof. Proto2
319
+ * optional fields do not set this flag, because they already indicate optional with `LABEL_OPTIONAL`.
320
+ */
321
+ proto3Optional?: boolean;
322
+ /** If type_name is set, this need not be set. If both this and type_name are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. */
323
+ type?: string;
324
+ /**
325
+ * For message and enum types, this is the name of the type. If the name starts with a '.', it is fully-qualified. Otherwise, C++-like scoping rules are used to find the type (i.e.
326
+ * first the nested types within this message are searched, then within the parent, on up to the root namespace).
327
+ */
328
+ typeName?: string;
329
+ }
330
+ interface Proto2FileDescriptorProto {
331
+ enumType?: Proto2EnumDescriptorProto[];
332
+ /** All top-level definitions in this file. */
333
+ messageType?: Proto2DescriptorProto[];
334
+ /** file name, relative to root of source tree */
335
+ name?: string;
336
+ /** e.g. "foo", "foo.bar", etc. */
337
+ package?: string;
338
+ /** The syntax of the proto file. The supported values are "proto2", "proto3", and "editions". If `edition` is present, this value must be "editions". */
339
+ syntax?: string;
340
+ }
341
+ interface Proto2OneofDescriptorProto {
342
+ name?: string;
343
+ }
344
+ interface GroupsResource {
345
+ /**
346
+ * Delete multiple policy values that are applied to a specific group. All targets must have the same target format. That is to say that they must point to the same target resource and
347
+ * must have the same keys specified in `additionalTargetKeyNames`, though the values for those keys may be different. On failure the request will return the error details as part of
348
+ * the google.rpc.Status.
349
+ */
350
+ batchDelete(request: {
351
+ /** V1 error format. */
352
+ "$.xgafv"?: string;
353
+ /** OAuth access token. */
354
+ access_token?: string;
355
+ /** Data format for response. */
356
+ alt?: string;
357
+ /** JSONP */
358
+ callback?: string;
359
+ /** ID of the Google Workspace account or literal "my_customer" for the customer associated to the request. */
360
+ customer: string;
361
+ /** Selector specifying which fields to include in a partial response. */
362
+ fields?: string;
363
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
364
+ key?: string;
365
+ /** OAuth 2.0 token for the current user. */
366
+ oauth_token?: string;
367
+ /** Returns response with indentations and line breaks. */
368
+ prettyPrint?: boolean;
369
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
370
+ quotaUser?: string;
371
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
372
+ upload_protocol?: string;
373
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
374
+ uploadType?: string;
375
+ /** Request body */
376
+ resource: GoogleChromePolicyV1BatchDeleteGroupPoliciesRequest;
377
+ }): Request<{}>;
378
+ batchDelete(request: {
379
+ /** V1 error format. */
380
+ "$.xgafv"?: string;
381
+ /** OAuth access token. */
382
+ access_token?: string;
383
+ /** Data format for response. */
384
+ alt?: string;
385
+ /** JSONP */
386
+ callback?: string;
387
+ /** ID of the Google Workspace account or literal "my_customer" for the customer associated to the request. */
388
+ customer: string;
389
+ /** Selector specifying which fields to include in a partial response. */
390
+ fields?: string;
391
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
392
+ key?: string;
393
+ /** OAuth 2.0 token for the current user. */
394
+ oauth_token?: string;
395
+ /** Returns response with indentations and line breaks. */
396
+ prettyPrint?: boolean;
397
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
398
+ quotaUser?: string;
399
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
400
+ upload_protocol?: string;
401
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
402
+ uploadType?: string;
403
+ },
404
+ body: GoogleChromePolicyV1BatchDeleteGroupPoliciesRequest): Request<{}>;
405
+ /**
406
+ * Modify multiple policy values that are applied to a specific group. All targets must have the same target format. That is to say that they must point to the same target resource and
407
+ * must have the same keys specified in `additionalTargetKeyNames`, though the values for those keys may be different. On failure the request will return the error details as part of
408
+ * the google.rpc.Status.
409
+ */
410
+ batchModify(request: {
411
+ /** V1 error format. */
412
+ "$.xgafv"?: string;
413
+ /** OAuth access token. */
414
+ access_token?: string;
415
+ /** Data format for response. */
416
+ alt?: string;
417
+ /** JSONP */
418
+ callback?: string;
419
+ /** ID of the Google Workspace account or literal "my_customer" for the customer associated to the request. */
420
+ customer: string;
421
+ /** Selector specifying which fields to include in a partial response. */
422
+ fields?: string;
423
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
424
+ key?: string;
425
+ /** OAuth 2.0 token for the current user. */
426
+ oauth_token?: string;
427
+ /** Returns response with indentations and line breaks. */
428
+ prettyPrint?: boolean;
429
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
430
+ quotaUser?: string;
431
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
432
+ upload_protocol?: string;
433
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
434
+ uploadType?: string;
435
+ /** Request body */
436
+ resource: GoogleChromePolicyV1BatchModifyGroupPoliciesRequest;
437
+ }): Request<{}>;
438
+ batchModify(request: {
439
+ /** V1 error format. */
440
+ "$.xgafv"?: string;
441
+ /** OAuth access token. */
442
+ access_token?: string;
443
+ /** Data format for response. */
444
+ alt?: string;
445
+ /** JSONP */
446
+ callback?: string;
447
+ /** ID of the Google Workspace account or literal "my_customer" for the customer associated to the request. */
448
+ customer: string;
449
+ /** Selector specifying which fields to include in a partial response. */
450
+ fields?: string;
451
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
452
+ key?: string;
453
+ /** OAuth 2.0 token for the current user. */
454
+ oauth_token?: string;
455
+ /** Returns response with indentations and line breaks. */
456
+ prettyPrint?: boolean;
457
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
458
+ quotaUser?: string;
459
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
460
+ upload_protocol?: string;
461
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
462
+ uploadType?: string;
463
+ },
464
+ body: GoogleChromePolicyV1BatchModifyGroupPoliciesRequest): Request<{}>;
465
+ /**
466
+ * Retrieve a group priority ordering for an app. The target app must be supplied in `additionalTargetKeyNames` in the PolicyTargetKey. On failure the request will return the error
467
+ * details as part of the google.rpc.Status.
468
+ */
469
+ listGroupPriorityOrdering(request: {
470
+ /** V1 error format. */
471
+ "$.xgafv"?: string;
472
+ /** OAuth access token. */
473
+ access_token?: string;
474
+ /** Data format for response. */
475
+ alt?: string;
476
+ /** JSONP */
477
+ callback?: string;
478
+ /** Required. ID of the Google Workspace account or literal "my_customer" for the customer associated to the request. */
479
+ customer: string;
480
+ /** Selector specifying which fields to include in a partial response. */
481
+ fields?: string;
482
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
483
+ key?: string;
484
+ /** OAuth 2.0 token for the current user. */
485
+ oauth_token?: string;
486
+ /** Returns response with indentations and line breaks. */
487
+ prettyPrint?: boolean;
488
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
489
+ quotaUser?: string;
490
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
491
+ upload_protocol?: string;
492
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
493
+ uploadType?: string;
494
+ /** Request body */
495
+ resource: GoogleChromePolicyV1ListGroupPriorityOrderingRequest;
496
+ }): Request<GoogleChromePolicyV1ListGroupPriorityOrderingResponse>;
497
+ listGroupPriorityOrdering(request: {
498
+ /** V1 error format. */
499
+ "$.xgafv"?: string;
500
+ /** OAuth access token. */
501
+ access_token?: string;
502
+ /** Data format for response. */
503
+ alt?: string;
504
+ /** JSONP */
505
+ callback?: string;
506
+ /** Required. ID of the Google Workspace account or literal "my_customer" for the customer associated to the request. */
507
+ customer: string;
508
+ /** Selector specifying which fields to include in a partial response. */
509
+ fields?: string;
510
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
511
+ key?: string;
512
+ /** OAuth 2.0 token for the current user. */
513
+ oauth_token?: string;
514
+ /** Returns response with indentations and line breaks. */
515
+ prettyPrint?: boolean;
516
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
517
+ quotaUser?: string;
518
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
519
+ upload_protocol?: string;
520
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
521
+ uploadType?: string;
522
+ },
523
+ body: GoogleChromePolicyV1ListGroupPriorityOrderingRequest): Request<GoogleChromePolicyV1ListGroupPriorityOrderingResponse>;
524
+ /**
525
+ * Update a group priority ordering for an app. The target app must be supplied in `additionalTargetKeyNames` in the PolicyTargetKey. On failure the request will return the error
526
+ * details as part of the google.rpc.Status.
527
+ */
528
+ updateGroupPriorityOrdering(request: {
529
+ /** V1 error format. */
530
+ "$.xgafv"?: string;
531
+ /** OAuth access token. */
532
+ access_token?: string;
533
+ /** Data format for response. */
534
+ alt?: string;
535
+ /** JSONP */
536
+ callback?: string;
537
+ /** Required. ID of the Google Workspace account or literal "my_customer" for the customer associated to the request. */
538
+ customer: string;
539
+ /** Selector specifying which fields to include in a partial response. */
540
+ fields?: string;
541
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
542
+ key?: string;
543
+ /** OAuth 2.0 token for the current user. */
544
+ oauth_token?: string;
545
+ /** Returns response with indentations and line breaks. */
546
+ prettyPrint?: boolean;
547
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
548
+ quotaUser?: string;
549
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
550
+ upload_protocol?: string;
551
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
552
+ uploadType?: string;
553
+ /** Request body */
554
+ resource: GoogleChromePolicyV1UpdateGroupPriorityOrderingRequest;
555
+ }): Request<{}>;
556
+ updateGroupPriorityOrdering(request: {
557
+ /** V1 error format. */
558
+ "$.xgafv"?: string;
559
+ /** OAuth access token. */
560
+ access_token?: string;
561
+ /** Data format for response. */
562
+ alt?: string;
563
+ /** JSONP */
564
+ callback?: string;
565
+ /** Required. ID of the Google Workspace account or literal "my_customer" for the customer associated to the request. */
566
+ customer: string;
567
+ /** Selector specifying which fields to include in a partial response. */
568
+ fields?: string;
569
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
570
+ key?: string;
571
+ /** OAuth 2.0 token for the current user. */
572
+ oauth_token?: string;
573
+ /** Returns response with indentations and line breaks. */
574
+ prettyPrint?: boolean;
575
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
576
+ quotaUser?: string;
577
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
578
+ upload_protocol?: string;
579
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
580
+ uploadType?: string;
581
+ },
582
+ body: GoogleChromePolicyV1UpdateGroupPriorityOrderingRequest): Request<{}>;
583
+ }
584
+ interface OrgunitsResource {
585
+ /**
586
+ * Modify multiple policy values that are applied to a specific org unit so that they now inherit the value from a parent (if applicable). All targets must have the same target format.
587
+ * That is to say that they must point to the same target resource and must have the same keys specified in `additionalTargetKeyNames`, though the values for those keys may be
588
+ * different. On failure the request will return the error details as part of the google.rpc.Status.
589
+ */
590
+ batchInherit(request: {
591
+ /** V1 error format. */
592
+ "$.xgafv"?: string;
593
+ /** OAuth access token. */
594
+ access_token?: string;
595
+ /** Data format for response. */
596
+ alt?: string;
597
+ /** JSONP */
598
+ callback?: string;
599
+ /** ID of the G Suite account or literal "my_customer" for the customer associated to the request. */
600
+ customer: string;
601
+ /** Selector specifying which fields to include in a partial response. */
602
+ fields?: string;
603
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
604
+ key?: string;
605
+ /** OAuth 2.0 token for the current user. */
606
+ oauth_token?: string;
607
+ /** Returns response with indentations and line breaks. */
608
+ prettyPrint?: boolean;
609
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
610
+ quotaUser?: string;
611
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
612
+ upload_protocol?: string;
613
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
614
+ uploadType?: string;
615
+ /** Request body */
616
+ resource: GoogleChromePolicyV1BatchInheritOrgUnitPoliciesRequest;
617
+ }): Request<{}>;
618
+ batchInherit(request: {
619
+ /** V1 error format. */
620
+ "$.xgafv"?: string;
621
+ /** OAuth access token. */
622
+ access_token?: string;
623
+ /** Data format for response. */
624
+ alt?: string;
625
+ /** JSONP */
626
+ callback?: string;
627
+ /** ID of the G Suite account or literal "my_customer" for the customer associated to the request. */
628
+ customer: string;
629
+ /** Selector specifying which fields to include in a partial response. */
630
+ fields?: string;
631
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
632
+ key?: string;
633
+ /** OAuth 2.0 token for the current user. */
634
+ oauth_token?: string;
635
+ /** Returns response with indentations and line breaks. */
636
+ prettyPrint?: boolean;
637
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
638
+ quotaUser?: string;
639
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
640
+ upload_protocol?: string;
641
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
642
+ uploadType?: string;
643
+ },
644
+ body: GoogleChromePolicyV1BatchInheritOrgUnitPoliciesRequest): Request<{}>;
645
+ /**
646
+ * Modify multiple policy values that are applied to a specific org unit. All targets must have the same target format. That is to say that they must point to the same target resource
647
+ * and must have the same keys specified in `additionalTargetKeyNames`, though the values for those keys may be different. On failure the request will return the error details as part
648
+ * of the google.rpc.Status.
649
+ */
650
+ batchModify(request: {
651
+ /** V1 error format. */
652
+ "$.xgafv"?: string;
653
+ /** OAuth access token. */
654
+ access_token?: string;
655
+ /** Data format for response. */
656
+ alt?: string;
657
+ /** JSONP */
658
+ callback?: string;
659
+ /** ID of the G Suite account or literal "my_customer" for the customer associated to the request. */
660
+ customer: string;
661
+ /** Selector specifying which fields to include in a partial response. */
662
+ fields?: string;
663
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
664
+ key?: string;
665
+ /** OAuth 2.0 token for the current user. */
666
+ oauth_token?: string;
667
+ /** Returns response with indentations and line breaks. */
668
+ prettyPrint?: boolean;
669
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
670
+ quotaUser?: string;
671
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
672
+ upload_protocol?: string;
673
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
674
+ uploadType?: string;
675
+ /** Request body */
676
+ resource: GoogleChromePolicyV1BatchModifyOrgUnitPoliciesRequest;
677
+ }): Request<{}>;
678
+ batchModify(request: {
679
+ /** V1 error format. */
680
+ "$.xgafv"?: string;
681
+ /** OAuth access token. */
682
+ access_token?: string;
683
+ /** Data format for response. */
684
+ alt?: string;
685
+ /** JSONP */
686
+ callback?: string;
687
+ /** ID of the G Suite account or literal "my_customer" for the customer associated to the request. */
688
+ customer: string;
689
+ /** Selector specifying which fields to include in a partial response. */
690
+ fields?: string;
691
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
692
+ key?: string;
693
+ /** OAuth 2.0 token for the current user. */
694
+ oauth_token?: string;
695
+ /** Returns response with indentations and line breaks. */
696
+ prettyPrint?: boolean;
697
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
698
+ quotaUser?: string;
699
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
700
+ upload_protocol?: string;
701
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
702
+ uploadType?: string;
703
+ },
704
+ body: GoogleChromePolicyV1BatchModifyOrgUnitPoliciesRequest): Request<{}>;
705
+ }
706
+ interface PoliciesResource {
707
+ /** Gets the resolved policy values for a list of policies that match a search query. */
708
+ resolve(request: {
709
+ /** V1 error format. */
710
+ "$.xgafv"?: string;
711
+ /** OAuth access token. */
712
+ access_token?: string;
713
+ /** Data format for response. */
714
+ alt?: string;
715
+ /** JSONP */
716
+ callback?: string;
717
+ /** ID of the G Suite account or literal "my_customer" for the customer associated to the request. */
718
+ customer: string;
719
+ /** Selector specifying which fields to include in a partial response. */
720
+ fields?: string;
721
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
722
+ key?: string;
723
+ /** OAuth 2.0 token for the current user. */
724
+ oauth_token?: string;
725
+ /** Returns response with indentations and line breaks. */
726
+ prettyPrint?: boolean;
727
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
728
+ quotaUser?: string;
729
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
730
+ upload_protocol?: string;
731
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
732
+ uploadType?: string;
733
+ /** Request body */
734
+ resource: GoogleChromePolicyV1ResolveRequest;
735
+ }): Request<GoogleChromePolicyV1ResolveResponse>;
736
+ resolve(request: {
737
+ /** V1 error format. */
738
+ "$.xgafv"?: string;
739
+ /** OAuth access token. */
740
+ access_token?: string;
741
+ /** Data format for response. */
742
+ alt?: string;
743
+ /** JSONP */
744
+ callback?: string;
745
+ /** ID of the G Suite account or literal "my_customer" for the customer associated to the request. */
746
+ customer: string;
747
+ /** Selector specifying which fields to include in a partial response. */
748
+ fields?: string;
749
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
750
+ key?: string;
751
+ /** OAuth 2.0 token for the current user. */
752
+ oauth_token?: string;
753
+ /** Returns response with indentations and line breaks. */
754
+ prettyPrint?: boolean;
755
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
756
+ quotaUser?: string;
757
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
758
+ upload_protocol?: string;
759
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
760
+ uploadType?: string;
761
+ },
762
+ body: GoogleChromePolicyV1ResolveRequest): Request<GoogleChromePolicyV1ResolveResponse>;
763
+ groups: GroupsResource;
764
+ orgunits: OrgunitsResource;
765
+ }
766
+ interface PolicySchemasResource {
767
+ /** Get a specific policy schema for a customer by its resource name. */
768
+ get(request?: {
769
+ /** V1 error format. */
770
+ "$.xgafv"?: string;
771
+ /** OAuth access token. */
772
+ access_token?: string;
773
+ /** Data format for response. */
774
+ alt?: string;
775
+ /** JSONP */
776
+ callback?: string;
777
+ /** Selector specifying which fields to include in a partial response. */
778
+ fields?: string;
779
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
780
+ key?: string;
781
+ /** Required. The policy schema resource name to query. */
782
+ name: string;
783
+ /** OAuth 2.0 token for the current user. */
784
+ oauth_token?: string;
785
+ /** Returns response with indentations and line breaks. */
786
+ prettyPrint?: boolean;
787
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
788
+ quotaUser?: string;
789
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
790
+ upload_protocol?: string;
791
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
792
+ uploadType?: string;
793
+ }): Request<GoogleChromePolicyV1PolicySchema>;
794
+ /** Gets a list of policy schemas that match a specified filter value for a given customer. */
795
+ list(request?: {
796
+ /** V1 error format. */
797
+ "$.xgafv"?: string;
798
+ /** OAuth access token. */
799
+ access_token?: string;
800
+ /** Data format for response. */
801
+ alt?: string;
802
+ /** JSONP */
803
+ callback?: string;
804
+ /** Selector specifying which fields to include in a partial response. */
805
+ fields?: string;
806
+ /** The schema filter used to find a particular schema based on fields like its resource name, description and `additionalTargetKeyNames`. */
807
+ filter?: string;
808
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
809
+ key?: string;
810
+ /** OAuth 2.0 token for the current user. */
811
+ oauth_token?: string;
812
+ /** The maximum number of policy schemas to return. */
813
+ pageSize?: number;
814
+ /** The page token used to retrieve a specific page of the listing request. */
815
+ pageToken?: string;
816
+ /** Required. The customer for which the listing request will apply. */
817
+ parent: string;
818
+ /** Returns response with indentations and line breaks. */
819
+ prettyPrint?: boolean;
820
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
821
+ quotaUser?: string;
822
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
823
+ upload_protocol?: string;
824
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
825
+ uploadType?: string;
826
+ }): Request<GoogleChromePolicyV1ListPolicySchemasResponse>;
827
+ }
828
+ interface CustomersResource {
829
+ policies: PoliciesResource;
830
+ policySchemas: PolicySchemasResource;
831
+ }
832
+ interface MediaResource {
833
+ /** Creates an enterprise file from the content provided by user. Returns a public download url for end user. */
834
+ upload(request: {
835
+ /** V1 error format. */
836
+ "$.xgafv"?: string;
837
+ /** OAuth access token. */
838
+ access_token?: string;
839
+ /** Data format for response. */
840
+ alt?: string;
841
+ /** JSONP */
842
+ callback?: string;
843
+ /** Required. The customer for which the file upload will apply. */
844
+ customer: string;
845
+ /** Selector specifying which fields to include in a partial response. */
846
+ fields?: string;
847
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
848
+ key?: string;
849
+ /** OAuth 2.0 token for the current user. */
850
+ oauth_token?: string;
851
+ /** Returns response with indentations and line breaks. */
852
+ prettyPrint?: boolean;
853
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
854
+ quotaUser?: string;
855
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
856
+ upload_protocol?: string;
857
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
858
+ uploadType?: string;
859
+ /** Request body */
860
+ resource: GoogleChromePolicyV1UploadPolicyFileRequest;
861
+ }): Request<GoogleChromePolicyV1UploadPolicyFileResponse>;
862
+ upload(request: {
863
+ /** V1 error format. */
864
+ "$.xgafv"?: string;
865
+ /** OAuth access token. */
866
+ access_token?: string;
867
+ /** Data format for response. */
868
+ alt?: string;
869
+ /** JSONP */
870
+ callback?: string;
871
+ /** Required. The customer for which the file upload will apply. */
872
+ customer: string;
873
+ /** Selector specifying which fields to include in a partial response. */
874
+ fields?: string;
875
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
876
+ key?: string;
877
+ /** OAuth 2.0 token for the current user. */
878
+ oauth_token?: string;
879
+ /** Returns response with indentations and line breaks. */
880
+ prettyPrint?: boolean;
881
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
882
+ quotaUser?: string;
883
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
884
+ upload_protocol?: string;
885
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
886
+ uploadType?: string;
887
+ },
888
+ body: GoogleChromePolicyV1UploadPolicyFileRequest): Request<GoogleChromePolicyV1UploadPolicyFileResponse>;
889
+ }
890
+
891
+ const customers: CustomersResource;
892
+
893
+ const media: MediaResource;
894
+ }
895
+ }
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@maxim_mazurok/gapi.client.chromepolicy-v1",
3
+ "version": "0.0.20220811",
4
+ "description": "TypeScript typings for Chrome Policy API v1",
5
+ "license": "MIT",
6
+ "author": {
7
+ "email": "maxim@mazurok.com",
8
+ "name": "Maxim Mazurok",
9
+ "url": "https://maxim.mazurok.com"
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
14
+ },
15
+ "types": "index.d.ts",
16
+ "dependencies": {
17
+ "@types/gapi.client": "*",
18
+ "@types/gapi.client.discovery": "*"
19
+ }
20
+ }
package/readme.md ADDED
@@ -0,0 +1,76 @@
1
+ # TypeScript typings for Chrome Policy API v1
2
+
3
+ The Chrome Policy API is a suite of services that allows Chrome administrators to control the policies applied to their managed Chrome OS devices and Chrome browsers.
4
+ For detailed description please check [documentation](http://developers.google.com/chrome/policy).
5
+
6
+ ## Installing
7
+
8
+ Install typings for Chrome Policy API:
9
+
10
+ ```
11
+ npm install @types/gapi.client.chromepolicy-v1 --save-dev
12
+ ```
13
+
14
+ ## Usage
15
+
16
+ You need to initialize Google API client in your code:
17
+
18
+ ```typescript
19
+ gapi.load('client', () => {
20
+ // now we can use gapi.client
21
+ // ...
22
+ });
23
+ ```
24
+
25
+ Then load api client wrapper:
26
+
27
+ ```typescript
28
+ gapi.client.load('https://chromepolicy.googleapis.com/$discovery/rest?version=v1', () => {
29
+ // now we can use:
30
+ // gapi.client.chromepolicy
31
+ });
32
+ ```
33
+
34
+ ```typescript
35
+ // Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
36
+ gapi.client.load('chromepolicy', 'v1', () => {
37
+ // now we can use:
38
+ // gapi.client.chromepolicy
39
+ });
40
+ ```
41
+
42
+ Don't forget to authenticate your client before sending any request to resources:
43
+
44
+ ```typescript
45
+ // declare client_id registered in Google Developers Console
46
+ var client_id = '',
47
+ scope = [
48
+ // See, edit, create or delete policies applied to Chrome OS and Chrome Browsers managed within your organization
49
+ 'https://www.googleapis.com/auth/chrome.management.policy',
50
+
51
+ // See policies applied to Chrome OS and Chrome Browsers managed within your organization
52
+ 'https://www.googleapis.com/auth/chrome.management.policy.readonly',
53
+ ],
54
+ immediate = true;
55
+ // ...
56
+
57
+ gapi.auth.authorize(
58
+ { client_id: client_id, scope: scope, immediate: immediate },
59
+ authResult => {
60
+ if (authResult && !authResult.error) {
61
+ /* handle successful authorization */
62
+ } else {
63
+ /* handle authorization error */
64
+ }
65
+ });
66
+ ```
67
+
68
+ After that you can use Chrome Policy API resources: <!-- TODO: make this work for multiple namespaces -->
69
+
70
+ ```typescript
71
+
72
+ /*
73
+ Creates an enterprise file from the content provided by user. Returns a public download url for end user.
74
+ */
75
+ await gapi.client.chromepolicy.media.upload({ customer: "customer", });
76
+ ```
package/tests.ts ADDED
@@ -0,0 +1,191 @@
1
+ /* This is stub file for gapi.client.chromepolicy-v1 definition tests */
2
+ // IMPORTANT
3
+ // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
+ // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
+
6
+ // Revision: 20220811
7
+
8
+ gapi.load('client', async () => {
9
+ /** now we can use gapi.client */
10
+
11
+ await gapi.client.load('https://chromepolicy.googleapis.com/$discovery/rest?version=v1');
12
+ /** now we can use gapi.client.chromepolicy */
13
+
14
+ /** don't forget to authenticate your client before sending any request to resources: */
15
+ /** declare client_id registered in Google Developers Console */
16
+ const client_id = '<<PUT YOUR CLIENT ID HERE>>';
17
+ const scope = [
18
+ /** See, edit, create or delete policies applied to Chrome OS and Chrome Browsers managed within your organization */
19
+ 'https://www.googleapis.com/auth/chrome.management.policy',
20
+ /** See policies applied to Chrome OS and Chrome Browsers managed within your organization */
21
+ 'https://www.googleapis.com/auth/chrome.management.policy.readonly',
22
+ ];
23
+ const immediate = false;
24
+ gapi.auth.authorize({ client_id, scope, immediate }, authResult => {
25
+ if (authResult && !authResult.error) {
26
+ /** handle successful authorization */
27
+ run();
28
+ } else {
29
+ /** handle authorization error */
30
+ }
31
+ });
32
+
33
+ async function run() {
34
+ /** Gets the resolved policy values for a list of policies that match a search query. */
35
+ await gapi.client.chromepolicy.customers.policies.resolve({
36
+ customer: "Test string",
37
+ }, {
38
+ pageSize: 42,
39
+ pageToken: "Test string",
40
+ policySchemaFilter: "Test string",
41
+ policyTargetKey: {
42
+ additionalTargetKeys: {
43
+ A: "Test string"
44
+ },
45
+ targetResource: "Test string",
46
+ },
47
+ });
48
+ /**
49
+ * Delete multiple policy values that are applied to a specific group. All targets must have the same target format. That is to say that they must point to the same target resource and
50
+ * must have the same keys specified in `additionalTargetKeyNames`, though the values for those keys may be different. On failure the request will return the error details as part of the
51
+ * google.rpc.Status.
52
+ */
53
+ await gapi.client.chromepolicy.customers.policies.groups.batchDelete({
54
+ customer: "Test string",
55
+ }, {
56
+ requests: [
57
+ {
58
+ policySchema: "Test string",
59
+ policyTargetKey: {
60
+ additionalTargetKeys: {
61
+ A: "Test string"
62
+ },
63
+ targetResource: "Test string",
64
+ },
65
+ }
66
+ ],
67
+ });
68
+ /**
69
+ * Modify multiple policy values that are applied to a specific group. All targets must have the same target format. That is to say that they must point to the same target resource and
70
+ * must have the same keys specified in `additionalTargetKeyNames`, though the values for those keys may be different. On failure the request will return the error details as part of the
71
+ * google.rpc.Status.
72
+ */
73
+ await gapi.client.chromepolicy.customers.policies.groups.batchModify({
74
+ customer: "Test string",
75
+ }, {
76
+ requests: [
77
+ {
78
+ policyTargetKey: {
79
+ additionalTargetKeys: {
80
+ A: "Test string"
81
+ },
82
+ targetResource: "Test string",
83
+ },
84
+ policyValue: {
85
+ policySchema: "Test string",
86
+ value: {
87
+ A: 42
88
+ },
89
+ },
90
+ updateMask: "Test string",
91
+ }
92
+ ],
93
+ });
94
+ /**
95
+ * Retrieve a group priority ordering for an app. The target app must be supplied in `additionalTargetKeyNames` in the PolicyTargetKey. On failure the request will return the error details
96
+ * as part of the google.rpc.Status.
97
+ */
98
+ await gapi.client.chromepolicy.customers.policies.groups.listGroupPriorityOrdering({
99
+ customer: "Test string",
100
+ }, {
101
+ policyNamespace: "Test string",
102
+ policyTargetKey: {
103
+ additionalTargetKeys: {
104
+ A: "Test string"
105
+ },
106
+ targetResource: "Test string",
107
+ },
108
+ });
109
+ /**
110
+ * Update a group priority ordering for an app. The target app must be supplied in `additionalTargetKeyNames` in the PolicyTargetKey. On failure the request will return the error details
111
+ * as part of the google.rpc.Status.
112
+ */
113
+ await gapi.client.chromepolicy.customers.policies.groups.updateGroupPriorityOrdering({
114
+ customer: "Test string",
115
+ }, {
116
+ groupIds: [
117
+ "Test string"
118
+ ],
119
+ policyNamespace: "Test string",
120
+ policyTargetKey: {
121
+ additionalTargetKeys: {
122
+ A: "Test string"
123
+ },
124
+ targetResource: "Test string",
125
+ },
126
+ });
127
+ /**
128
+ * Modify multiple policy values that are applied to a specific org unit so that they now inherit the value from a parent (if applicable). All targets must have the same target format.
129
+ * That is to say that they must point to the same target resource and must have the same keys specified in `additionalTargetKeyNames`, though the values for those keys may be different.
130
+ * On failure the request will return the error details as part of the google.rpc.Status.
131
+ */
132
+ await gapi.client.chromepolicy.customers.policies.orgunits.batchInherit({
133
+ customer: "Test string",
134
+ }, {
135
+ requests: [
136
+ {
137
+ policySchema: "Test string",
138
+ policyTargetKey: {
139
+ additionalTargetKeys: {
140
+ A: "Test string"
141
+ },
142
+ targetResource: "Test string",
143
+ },
144
+ }
145
+ ],
146
+ });
147
+ /**
148
+ * Modify multiple policy values that are applied to a specific org unit. All targets must have the same target format. That is to say that they must point to the same target resource and
149
+ * must have the same keys specified in `additionalTargetKeyNames`, though the values for those keys may be different. On failure the request will return the error details as part of the
150
+ * google.rpc.Status.
151
+ */
152
+ await gapi.client.chromepolicy.customers.policies.orgunits.batchModify({
153
+ customer: "Test string",
154
+ }, {
155
+ requests: [
156
+ {
157
+ policyTargetKey: {
158
+ additionalTargetKeys: {
159
+ A: "Test string"
160
+ },
161
+ targetResource: "Test string",
162
+ },
163
+ policyValue: {
164
+ policySchema: "Test string",
165
+ value: {
166
+ A: 42
167
+ },
168
+ },
169
+ updateMask: "Test string",
170
+ }
171
+ ],
172
+ });
173
+ /** Get a specific policy schema for a customer by its resource name. */
174
+ await gapi.client.chromepolicy.customers.policySchemas.get({
175
+ name: "Test string",
176
+ });
177
+ /** Gets a list of policy schemas that match a specified filter value for a given customer. */
178
+ await gapi.client.chromepolicy.customers.policySchemas.list({
179
+ filter: "Test string",
180
+ pageSize: 42,
181
+ pageToken: "Test string",
182
+ parent: "Test string",
183
+ });
184
+ /** Creates an enterprise file from the content provided by user. Returns a public download url for end user. */
185
+ await gapi.client.chromepolicy.media.upload({
186
+ customer: "Test string",
187
+ }, {
188
+ policyField: "Test string",
189
+ });
190
+ }
191
+ });
package/tsconfig.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "compilerOptions": {
3
+ "module": "commonjs",
4
+ "lib": ["es6", "dom"],
5
+ "noImplicitAny": true,
6
+ "noImplicitThis": true,
7
+ "strictNullChecks": true,
8
+ "baseUrl": "../",
9
+ "typeRoots": [
10
+ "../"
11
+ ],
12
+ "types": [],
13
+ "noEmit": true,
14
+ "forceConsistentCasingInFileNames": true,
15
+ "strictFunctionTypes": true
16
+ },
17
+ "files": ["index.d.ts", "tests.ts"]
18
+ }
package/tslint.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "extends": "dtslint/dtslint.json",
3
+ "rules": {
4
+ "no-redundant-jsdoc": false
5
+ }
6
+ }