@maxim_mazurok/gapi.client.datamanager-v1 0.0.20251006

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 +557 -0
  2. package/package.json +20 -0
  3. package/readme.md +93 -0
package/index.d.ts ADDED
@@ -0,0 +1,557 @@
1
+ /* Type definitions for non-npm package Data Manager API v1 0.0 */
2
+ // Project: https://developers.google.com/data-manager
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
+
8
+ // IMPORTANT
9
+ // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
10
+ // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
11
+ // Generated from: https://datamanager.googleapis.com/$discovery/rest?version=v1
12
+ // Revision: 20251006
13
+
14
+ /// <reference types="gapi.client" />
15
+
16
+ declare namespace gapi.client {
17
+ /** Load Data Manager API v1 */
18
+ function load(
19
+ urlOrObject: 'https://datamanager.googleapis.com/$discovery/rest?version=v1',
20
+ ): Promise<void>;
21
+ /** @deprecated Please load APIs with discovery documents. */
22
+ function load(name: 'datamanager', version: 'v1'): Promise<void>;
23
+ /** @deprecated Please load APIs with discovery documents. */
24
+ function load(name: 'datamanager', version: 'v1', callback: () => any): void;
25
+
26
+ namespace datamanager {
27
+ interface AddressInfo {
28
+ /** Required. Family (last) name of the user, all lowercase, with no punctuation, no leading or trailing whitespace, and hashed as SHA-256. */
29
+ familyName?: string;
30
+ /** Required. Given (first) name of the user, all lowercase, with no punctuation, no leading or trailing whitespace, and hashed as SHA-256. */
31
+ givenName?: string;
32
+ /** Required. The postal code of the user's address. */
33
+ postalCode?: string;
34
+ /** Required. The 2-letter region code in ISO-3166-1 alpha-2 of the user's address. */
35
+ regionCode?: string;
36
+ }
37
+ interface AdIdentifiers {
38
+ /** Optional. The click identifier for clicks associated with app events and originating from iOS devices starting with iOS14. */
39
+ gbraid?: string;
40
+ /** Optional. The Google click ID (gclid) associated with this event. */
41
+ gclid?: string;
42
+ /** Optional. Information gathered about the device being used (if any) at the time of landing onto the advertiser’s site after interacting with the ad. */
43
+ landingPageDeviceInfo?: DeviceInfo;
44
+ /** Optional. Session attributes for event attribution and modeling. */
45
+ sessionAttributes?: string;
46
+ /** Optional. The click identifier for clicks associated with web events and originating from iOS devices starting with iOS14. */
47
+ wbraid?: string;
48
+ }
49
+ interface AudienceMember {
50
+ /** Optional. The consent setting for the user. */
51
+ consent?: Consent;
52
+ /** Optional. Defines which Destination to send the audience member to. */
53
+ destinationReferences?: string[];
54
+ /** Data identifying the user's mobile devices. */
55
+ mobileData?: MobileData;
56
+ /** [Publisher Advertiser Identity Reconciliation (PAIR) IDs](//support.google.com/admanager/answer/15067908). */
57
+ pairData?: PairData;
58
+ /** User-provided data that identifies the user. */
59
+ userData?: UserData;
60
+ }
61
+ interface CartData {
62
+ /** Optional. The list of items associated with the event. */
63
+ items?: Item[];
64
+ /** Optional. The Merchant Center feed label associated with the feed of the items. */
65
+ merchantFeedLabel?: string;
66
+ /** Optional. The language code in ISO 639-1 associated with the Merchant Center feed of the items.where your items are uploaded. */
67
+ merchantFeedLanguageCode?: string;
68
+ /** Optional. The Merchant Center ID associated with the items. */
69
+ merchantId?: string;
70
+ /** Optional. The sum of all discounts associated with the transaction. */
71
+ transactionDiscount?: number;
72
+ }
73
+ interface Consent {
74
+ /** Optional. Represents if the user consents to ad personalization. */
75
+ adPersonalization?: string;
76
+ /** Optional. Represents if the user consents to ad user data. */
77
+ adUserData?: string;
78
+ }
79
+ interface CustomVariable {
80
+ /** Optional. Reference string used to determine which of the Event.destination_references the custom variable should be sent to. If empty, the Event.destination_references will be used. */
81
+ destinationReferences?: string[];
82
+ /** Optional. The value to store for the custom variable. */
83
+ value?: string;
84
+ /** Optional. The name of the custom variable to set. If the variable is not found for the given destination, it will be ignored. */
85
+ variable?: string;
86
+ }
87
+ interface Destination {
88
+ /** Optional. An account that the calling user's `login_account` has access to, through an established account link. For example, a data partner's `login_account` might have access to a client's `linked_account`. The partner might use this field to send data from the `linked_account` to another `operating_account`. */
89
+ linkedAccount?: ProductAccount;
90
+ /** Optional. The account used to make this API call. To add or remove data from the `operating_account`, this `login_account` must have write access to the `operating_account`. For example, a manager account of the `operating_account`, or an account with an established link to the `operating_account`. */
91
+ loginAccount?: ProductAccount;
92
+ /** Required. The account to send the data to or remove the data from. */
93
+ operatingAccount?: ProductAccount;
94
+ /** Required. The object within the product account to ingest into. For example, a Google Ads audience ID, a Display & Video 360 audience ID or a Google Ads conversion action ID. */
95
+ productDestinationId?: string;
96
+ /** Optional. ID for this `Destination` resource, unique within the request. Use to reference this `Destination` in the IngestEventsRequest and IngestAudienceMembersRequest. */
97
+ reference?: string;
98
+ }
99
+ interface DeviceInfo {
100
+ /** Optional. The IP address of the device for the given context. **Note:** Google Ads does not support IP address matching for end users in the European Economic Area (EEA), United Kingdom (UK), or Switzerland (CH). Add logic to conditionally exclude sharing IP addresses from users from these regions and ensure that you provide users with clear and comprehensive information about the data you collect on your sites, apps, and other properties and get consent where required by law or any applicable Google policies. See the [About offline conversion imports](https://support.google.com/google-ads/answer/2998031) page for more details. */
101
+ ipAddress?: string;
102
+ /** Optional. The user-agent string of the device for the given context. */
103
+ userAgent?: string;
104
+ }
105
+ interface EncryptionInfo {
106
+ /** Google Cloud Platform wrapped key information. */
107
+ gcpWrappedKeyInfo?: GcpWrappedKeyInfo;
108
+ }
109
+ interface ErrorCount {
110
+ /** The error reason of the failed records. */
111
+ reason?: string;
112
+ /** The count of records that failed to upload for a given reason. */
113
+ recordCount?: string;
114
+ }
115
+ interface ErrorInfo {
116
+ /** A list of errors and counts per error reason. May not be populated in all cases. */
117
+ errorCounts?: ErrorCount[];
118
+ }
119
+ interface Event {
120
+ /** Optional. Identifiers and other information used to match the conversion event with other online activity (such as ad clicks). */
121
+ adIdentifiers?: AdIdentifiers;
122
+ /** Optional. Information about the transaction and items associated with the event. */
123
+ cartData?: CartData;
124
+ /** Optional. Information about whether the associated user has provided different types of consent. */
125
+ consent?: Consent;
126
+ /** Optional. The conversion value associated with the event, for value-based conversions. */
127
+ conversionValue?: number;
128
+ /** Optional. The currency code associated with all monetary values within this event. */
129
+ currency?: string;
130
+ /** Optional. Additional key/value pair information to send to the conversion containers (conversion action or FL activity). */
131
+ customVariables?: CustomVariable[];
132
+ /** Optional. Reference string used to determine the destination. If empty, the event will be sent to all destinations in the request. */
133
+ destinationReferences?: string[];
134
+ /** Optional. Information gathered about the device being used (if any) when the event happened. */
135
+ eventDeviceInfo?: DeviceInfo;
136
+ /** Optional. Signal for where the event happened (web, app, in-store, etc.). */
137
+ eventSource?: string;
138
+ /** Required. The time the event occurred. */
139
+ eventTimestamp?: string;
140
+ /** Optional. A list of key/value pairs for experimental fields that may eventually be promoted to be part of the API. */
141
+ experimentalFields?: ExperimentalField[];
142
+ /** Optional. The last time the event was updated. */
143
+ lastUpdatedTimestamp?: string;
144
+ /** Optional. The unique identifier for this event. Required for conversions using multiple data sources. */
145
+ transactionId?: string;
146
+ /** Optional. Pieces of user provided data, representing the user the event is associated with. */
147
+ userData?: UserData;
148
+ /** Optional. Advertiser-assessed information about the user at the time that the event happened. */
149
+ userProperties?: UserProperties;
150
+ }
151
+ interface ExperimentalField {
152
+ /** Optional. The name of the field to use. */
153
+ field?: string;
154
+ /** Optional. The value the field to set. */
155
+ value?: string;
156
+ }
157
+ interface GcpWrappedKeyInfo {
158
+ /** Required. The base64 encoded encrypted data encryption key. */
159
+ encryptedDek?: string;
160
+ /** Required. Google Cloud Platform [Cloud Key Management Service resource ID](//cloud.google.com/kms/docs/getting-resource-ids). Should be in the format of "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{key}". */
161
+ kekUri?: string;
162
+ /** Required. The type of algorithm used to encrypt the data. */
163
+ keyType?: string;
164
+ /** Required. The [Workload Identity](//cloud.google.com/iam/docs/workload-identity-federation) pool provider required to use KEK. */
165
+ wipProvider?: string;
166
+ }
167
+ interface IngestAudienceMembersRequest {
168
+ /** Required. The list of users to send to the specified destinations. At most 10000 AudienceMember resources can be sent in a single request. */
169
+ audienceMembers?: AudienceMember[];
170
+ /** Optional. Request-level consent to apply to all users in the request. User-level consent overrides request-level consent, and can be specified in each AudienceMember. */
171
+ consent?: Consent;
172
+ /** Required. The list of destinations to send the audience members to. */
173
+ destinations?: Destination[];
174
+ /** Optional. Required for UserData uploads. The encoding type of the user identifiers. For hashed user identifiers, this is the encoding type of the hashed string. For encrypted hashed user identifiers, this is the encoding type of the outer encrypted string, but not necessarily the inner hashed string, meaning the inner hashed string could be encoded in a different way than the outer encrypted string. For non `UserData` uploads, this field is ignored. */
175
+ encoding?: string;
176
+ /** Optional. Encryption information for UserData uploads. If not set, it's assumed that uploaded identifying information is hashed but not encrypted. For non `UserData` uploads, this field is ignored. */
177
+ encryptionInfo?: EncryptionInfo;
178
+ /** Optional. The terms of service that the user has accepted/rejected. */
179
+ termsOfService?: TermsOfService;
180
+ /** Optional. For testing purposes. If `true`, the request is validated but not executed. Only errors are returned, not results. */
181
+ validateOnly?: boolean;
182
+ }
183
+ interface IngestAudienceMembersResponse {
184
+ /** The auto-generated ID of the request. */
185
+ requestId?: string;
186
+ }
187
+ interface IngestAudienceMembersStatus {
188
+ /** The status of the mobile data ingestion to the destination. */
189
+ mobileDataIngestionStatus?: IngestMobileDataStatus;
190
+ /** The status of the pair data ingestion to the destination. */
191
+ pairDataIngestionStatus?: IngestPairDataStatus;
192
+ /** The status of the user data ingestion to the destination. */
193
+ userDataIngestionStatus?: IngestUserDataStatus;
194
+ }
195
+ interface IngestEventsRequest {
196
+ /** Optional. Request-level consent to apply to all users in the request. User-level consent overrides request-level consent, and can be specified in each Event. */
197
+ consent?: Consent;
198
+ /** Required. The list of destinations to send the events to. */
199
+ destinations?: Destination[];
200
+ /** Optional. Required for UserData uploads. The encoding type of the user identifiers. For hashed user identifiers, this is the encoding type of the hashed string. For encrypted hashed user identifiers, this is the encoding type of the outer encrypted string, but not necessarily the inner hashed string, meaning the inner hashed string could be encoded in a different way than the outer encrypted string. For non `UserData` uploads, this field is ignored. */
201
+ encoding?: string;
202
+ /** Optional. Encryption information for UserData uploads. If not set, it's assumed that uploaded identifying information is hashed but not encrypted. For non `UserData` uploads, this field is ignored. */
203
+ encryptionInfo?: EncryptionInfo;
204
+ /** Required. The list of events to send to the specified destinations. At most 2000 Event resources can be sent in a single request. */
205
+ events?: Event[];
206
+ /** Optional. For testing purposes. If `true`, the request is validated but not executed. Only errors are returned, not results. */
207
+ validateOnly?: boolean;
208
+ }
209
+ interface IngestEventsResponse {
210
+ /** The auto-generated ID of the request. */
211
+ requestId?: string;
212
+ }
213
+ interface IngestEventsStatus {
214
+ /** The total count of events sent in the upload request. Includes all events in the request, regardless of whether they were successfully ingested or not. */
215
+ recordCount?: string;
216
+ }
217
+ interface IngestMobileDataStatus {
218
+ /** The total count of mobile ids sent in the upload request for the destination. Includes all mobile ids in the request, regardless of whether they were successfully ingested or not. */
219
+ mobileIdCount?: string;
220
+ /** The total count of audience members sent in the upload request for the destination. Includes all audience members in the request, regardless of whether they were successfully ingested or not. */
221
+ recordCount?: string;
222
+ }
223
+ interface IngestPairDataStatus {
224
+ /** The total count of pair ids sent in the upload request for the destination. Includes all pair ids in the request, regardless of whether they were successfully ingested or not. */
225
+ pairIdCount?: string;
226
+ /** The total count of audience members sent in the upload request for the destination. Includes all audience members in the request, regardless of whether they were successfully ingested or not. */
227
+ recordCount?: string;
228
+ }
229
+ interface IngestUserDataStatus {
230
+ /** The total count of audience members sent in the upload request for the destination. Includes all audience members in the request, regardless of whether they were successfully ingested or not. */
231
+ recordCount?: string;
232
+ /** The match rate range of the upload. */
233
+ uploadMatchRateRange?: string;
234
+ /** The total count of user identifiers sent in the upload request for the destination. Includes all user identifiers in the request, regardless of whether they were successfully ingested or not. */
235
+ userIdentifierCount?: string;
236
+ }
237
+ interface Item {
238
+ /** Optional. The product ID within the Merchant Center account. */
239
+ merchantProductId?: string;
240
+ /** Optional. The number of this item associated with the event. */
241
+ quantity?: string;
242
+ /** Optional. The unit price excluding tax, shipping, and any transaction level discounts. */
243
+ unitPrice?: number;
244
+ }
245
+ interface MobileData {
246
+ /** Required. The list of mobile device IDs (advertising ID/IDFA). At most 10 `mobileIds` can be provided in a single AudienceMember. */
247
+ mobileIds?: string[];
248
+ }
249
+ interface PairData {
250
+ /** Required. Cleanroom-provided PII data, hashed with SHA256, and encrypted with an EC commutative cipher using publisher key for the [PAIR]((//support.google.com/admanager/answer/15067908)) user list. At most 10 `pairIds` can be provided in a single AudienceMember. */
251
+ pairIds?: string[];
252
+ }
253
+ interface ProductAccount {
254
+ /** Required. The ID of the account. For example, your Google Ads account ID. */
255
+ accountId?: string;
256
+ /** Optional. The type of the account. For example, `GOOGLE_ADS`. Either `account_type` or the deprecated `product` is required. If both are set, the values must match. */
257
+ accountType?: string;
258
+ /** Deprecated. Use `account_type` instead. */
259
+ product?: string;
260
+ }
261
+ interface RemoveAudienceMembersRequest {
262
+ /** Required. The list of users to remove. */
263
+ audienceMembers?: AudienceMember[];
264
+ /** Required. The list of destinations to remove the users from. */
265
+ destinations?: Destination[];
266
+ /** Optional. Required for UserData uploads. The encoding type of the user identifiers. Applies to only the outer encoding for encrypted user identifiers. For non `UserData` uploads, this field is ignored. */
267
+ encoding?: string;
268
+ /** Optional. Encryption information for UserData uploads. If not set, it's assumed that uploaded identifying information is hashed but not encrypted. For non `UserData` uploads, this field is ignored. */
269
+ encryptionInfo?: EncryptionInfo;
270
+ /** Optional. For testing purposes. If `true`, the request is validated but not executed. Only errors are returned, not results. */
271
+ validateOnly?: boolean;
272
+ }
273
+ interface RemoveAudienceMembersResponse {
274
+ /** The auto-generated ID of the request. */
275
+ requestId?: string;
276
+ }
277
+ interface RemoveAudienceMembersStatus {
278
+ /** The status of the mobile data removal from the destination. */
279
+ mobileDataRemovalStatus?: RemoveMobileDataStatus;
280
+ /** The status of the pair data removal from the destination. */
281
+ pairDataRemovalStatus?: RemovePairDataStatus;
282
+ /** The status of the user data removal from the destination. */
283
+ userDataRemovalStatus?: RemoveUserDataStatus;
284
+ }
285
+ interface RemoveMobileDataStatus {
286
+ /** The total count of mobile Ids sent in the removal request. Includes all mobile ids in the request, regardless of whether they were successfully removed or not. */
287
+ mobileIdCount?: string;
288
+ /** The total count of audience members sent in the removal request. Includes all audience members in the request, regardless of whether they were successfully removed or not. */
289
+ recordCount?: string;
290
+ }
291
+ interface RemovePairDataStatus {
292
+ /** The total count of pair ids sent in the removal request. Includes all pair ids in the request, regardless of whether they were successfully removed or not. */
293
+ pairIdCount?: string;
294
+ /** The total count of audience members sent in the removal request. Includes all audience members in the request, regardless of whether they were successfully removed or not. */
295
+ recordCount?: string;
296
+ }
297
+ interface RemoveUserDataStatus {
298
+ /** The total count of audience members sent in the removal request. Includes all audience members in the request, regardless of whether they were successfully removed or not. */
299
+ recordCount?: string;
300
+ /** The total count of user identifiers sent in the removal request. Includes all user identifiers in the request, regardless of whether they were successfully removed or not. */
301
+ userIdentifierCount?: string;
302
+ }
303
+ interface RequestStatusPerDestination {
304
+ /** The status of the ingest audience members request. */
305
+ audienceMembersIngestionStatus?: IngestAudienceMembersStatus;
306
+ /** The status of the remove audience members request. */
307
+ audienceMembersRemovalStatus?: RemoveAudienceMembersStatus;
308
+ /** A destination within a DM API request. */
309
+ destination?: Destination;
310
+ /** An error info error containing the error reason and error counts related to the upload. */
311
+ errorInfo?: ErrorInfo;
312
+ /** The status of the ingest events request. */
313
+ eventsIngestionStatus?: IngestEventsStatus;
314
+ /** The request status of the destination. */
315
+ requestStatus?: string;
316
+ /** A warning info containing the warning reason and warning counts related to the upload. */
317
+ warningInfo?: WarningInfo;
318
+ }
319
+ interface RetrieveRequestStatusResponse {
320
+ /** A list of request statuses per destination. The order of the statuses matches the order of the destinations in the original request. */
321
+ requestStatusPerDestination?: RequestStatusPerDestination[];
322
+ }
323
+ interface TermsOfService {
324
+ /** Optional. The Customer Match terms of service: https://support.google.com/adspolicy/answer/6299717. This must be accepted when ingesting UserData or MobileData. This field is not required for Partner Match User list. */
325
+ customerMatchTermsOfServiceStatus?: string;
326
+ }
327
+ interface UserData {
328
+ /** Required. The identifiers for the user. It's possible to provide multiple instances of the same type of data (for example, multiple email addresses). To increase the likelihood of a match, provide as many identifiers as possible. At most 10 `userIdentifiers` can be provided in a single AudienceMember or Event. */
329
+ userIdentifiers?: UserIdentifier[];
330
+ }
331
+ interface UserIdentifier {
332
+ /** The known components of a user's address. Holds a grouping of identifiers that are matched all at once. */
333
+ address?: AddressInfo;
334
+ /** Hashed email address using SHA-256 hash function after normalization. */
335
+ emailAddress?: string;
336
+ /** Hashed phone number using SHA-256 hash function after normalization (E164 standard). */
337
+ phoneNumber?: string;
338
+ }
339
+ interface UserProperties {
340
+ /** Optional. Type of the customer associated with the event. */
341
+ customerType?: string;
342
+ /** Optional. The advertiser-assessed value of the customer. */
343
+ customerValueBucket?: string;
344
+ }
345
+ interface WarningCount {
346
+ /** The warning reason. */
347
+ reason?: string;
348
+ /** The count of records that have a warning. */
349
+ recordCount?: string;
350
+ }
351
+ interface WarningInfo {
352
+ /** A list of warnings and counts per warning reason. */
353
+ warningCounts?: WarningCount[];
354
+ }
355
+ interface AudienceMembersResource {
356
+ /** Uploads a list of AudienceMember resources to the provided Destination. */
357
+ ingest(request: {
358
+ /** V1 error format. */
359
+ '$.xgafv'?: string;
360
+ /** OAuth access token. */
361
+ access_token?: string;
362
+ /** Data format for response. */
363
+ alt?: string;
364
+ /** JSONP */
365
+ callback?: string;
366
+ /** Selector specifying which fields to include in a partial response. */
367
+ fields?: string;
368
+ /** 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. */
369
+ key?: string;
370
+ /** OAuth 2.0 token for the current user. */
371
+ oauth_token?: string;
372
+ /** Returns response with indentations and line breaks. */
373
+ prettyPrint?: boolean;
374
+ /** 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. */
375
+ quotaUser?: string;
376
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
377
+ upload_protocol?: string;
378
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
379
+ uploadType?: string;
380
+ /** Request body */
381
+ resource: IngestAudienceMembersRequest;
382
+ }): Request<IngestAudienceMembersResponse>;
383
+ ingest(
384
+ request: {
385
+ /** V1 error format. */
386
+ '$.xgafv'?: string;
387
+ /** OAuth access token. */
388
+ access_token?: string;
389
+ /** Data format for response. */
390
+ alt?: string;
391
+ /** JSONP */
392
+ callback?: string;
393
+ /** Selector specifying which fields to include in a partial response. */
394
+ fields?: string;
395
+ /** 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. */
396
+ key?: string;
397
+ /** OAuth 2.0 token for the current user. */
398
+ oauth_token?: string;
399
+ /** Returns response with indentations and line breaks. */
400
+ prettyPrint?: boolean;
401
+ /** 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. */
402
+ quotaUser?: string;
403
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
404
+ upload_protocol?: string;
405
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
406
+ uploadType?: string;
407
+ },
408
+ body: IngestAudienceMembersRequest,
409
+ ): Request<IngestAudienceMembersResponse>;
410
+ /** Removes a list of AudienceMember resources from the provided Destination. */
411
+ remove(request: {
412
+ /** V1 error format. */
413
+ '$.xgafv'?: string;
414
+ /** OAuth access token. */
415
+ access_token?: string;
416
+ /** Data format for response. */
417
+ alt?: string;
418
+ /** JSONP */
419
+ callback?: string;
420
+ /** Selector specifying which fields to include in a partial response. */
421
+ fields?: string;
422
+ /** 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. */
423
+ key?: string;
424
+ /** OAuth 2.0 token for the current user. */
425
+ oauth_token?: string;
426
+ /** Returns response with indentations and line breaks. */
427
+ prettyPrint?: boolean;
428
+ /** 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. */
429
+ quotaUser?: string;
430
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
431
+ upload_protocol?: string;
432
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
433
+ uploadType?: string;
434
+ /** Request body */
435
+ resource: RemoveAudienceMembersRequest;
436
+ }): Request<RemoveAudienceMembersResponse>;
437
+ remove(
438
+ 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
+ /** Selector specifying which fields to include in a partial response. */
448
+ fields?: string;
449
+ /** 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. */
450
+ key?: string;
451
+ /** OAuth 2.0 token for the current user. */
452
+ oauth_token?: string;
453
+ /** Returns response with indentations and line breaks. */
454
+ prettyPrint?: boolean;
455
+ /** 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. */
456
+ quotaUser?: string;
457
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
458
+ upload_protocol?: string;
459
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
460
+ uploadType?: string;
461
+ },
462
+ body: RemoveAudienceMembersRequest,
463
+ ): Request<RemoveAudienceMembersResponse>;
464
+ }
465
+ interface EventsResource {
466
+ /** Uploads a list of Event resources from the provided Destination. */
467
+ ingest(request: {
468
+ /** V1 error format. */
469
+ '$.xgafv'?: string;
470
+ /** OAuth access token. */
471
+ access_token?: string;
472
+ /** Data format for response. */
473
+ alt?: string;
474
+ /** JSONP */
475
+ callback?: string;
476
+ /** Selector specifying which fields to include in a partial response. */
477
+ fields?: string;
478
+ /** 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. */
479
+ key?: string;
480
+ /** OAuth 2.0 token for the current user. */
481
+ oauth_token?: string;
482
+ /** Returns response with indentations and line breaks. */
483
+ prettyPrint?: boolean;
484
+ /** 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. */
485
+ quotaUser?: string;
486
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
487
+ upload_protocol?: string;
488
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
489
+ uploadType?: string;
490
+ /** Request body */
491
+ resource: IngestEventsRequest;
492
+ }): Request<IngestEventsResponse>;
493
+ ingest(
494
+ request: {
495
+ /** V1 error format. */
496
+ '$.xgafv'?: string;
497
+ /** OAuth access token. */
498
+ access_token?: string;
499
+ /** Data format for response. */
500
+ alt?: string;
501
+ /** JSONP */
502
+ callback?: string;
503
+ /** Selector specifying which fields to include in a partial response. */
504
+ fields?: string;
505
+ /** 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. */
506
+ key?: string;
507
+ /** OAuth 2.0 token for the current user. */
508
+ oauth_token?: string;
509
+ /** Returns response with indentations and line breaks. */
510
+ prettyPrint?: boolean;
511
+ /** 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. */
512
+ quotaUser?: string;
513
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
514
+ upload_protocol?: string;
515
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
516
+ uploadType?: string;
517
+ },
518
+ body: IngestEventsRequest,
519
+ ): Request<IngestEventsResponse>;
520
+ }
521
+ interface RequestStatusResource {
522
+ /** Gets the status of a request given request id. */
523
+ retrieve(request?: {
524
+ /** V1 error format. */
525
+ '$.xgafv'?: string;
526
+ /** OAuth access token. */
527
+ access_token?: string;
528
+ /** Data format for response. */
529
+ alt?: string;
530
+ /** JSONP */
531
+ callback?: string;
532
+ /** Selector specifying which fields to include in a partial response. */
533
+ fields?: string;
534
+ /** 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. */
535
+ key?: string;
536
+ /** OAuth 2.0 token for the current user. */
537
+ oauth_token?: string;
538
+ /** Returns response with indentations and line breaks. */
539
+ prettyPrint?: boolean;
540
+ /** 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. */
541
+ quotaUser?: string;
542
+ /** Required. Required. The request ID of the Data Manager API request. */
543
+ requestId?: string;
544
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
545
+ upload_protocol?: string;
546
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
547
+ uploadType?: string;
548
+ }): Request<RetrieveRequestStatusResponse>;
549
+ }
550
+
551
+ const audienceMembers: AudienceMembersResource;
552
+
553
+ const events: EventsResource;
554
+
555
+ const requestStatus: RequestStatusResource;
556
+ }
557
+ }
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@maxim_mazurok/gapi.client.datamanager-v1",
3
+ "version": "0.0.20251006",
4
+ "description": "TypeScript typings for Data Manager 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,93 @@
1
+ # TypeScript typings for Data Manager API v1
2
+
3
+ A unified ingestion API for data partners, agencies and advertisers to connect first-party data across Google advertising products.
4
+ For detailed description please check [documentation](https://developers.google.com/data-manager).
5
+
6
+ ## Installing
7
+
8
+ Install typings for Data Manager API:
9
+
10
+ ```
11
+ npm install @types/gapi.client.datamanager-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(
29
+ 'https://datamanager.googleapis.com/$discovery/rest?version=v1',
30
+ () => {
31
+ // now we can use:
32
+ // gapi.client.datamanager
33
+ },
34
+ );
35
+ ```
36
+
37
+ ```typescript
38
+ // Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
39
+ gapi.client.load('datamanager', 'v1', () => {
40
+ // now we can use:
41
+ // gapi.client.datamanager
42
+ });
43
+ ```
44
+
45
+ Don't forget to authenticate your client before sending any request to resources:
46
+
47
+ ```typescript
48
+ // declare client_id registered in Google Developers Console
49
+ var client_id = '',
50
+ scope = [
51
+ // See, edit, create, import, or delete your customer data in Google Ads, Google Marketing Platform (Campaign Manager 360, Search Ads 360, Display & Video 360), and Google Analytics
52
+ 'https://www.googleapis.com/auth/datamanager',
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
+
69
+ After that you can use Data Manager API resources: <!-- TODO: make this work for multiple namespaces -->
70
+
71
+ ```typescript
72
+ /*
73
+ Uploads a list of AudienceMember resources to the provided Destination.
74
+ */
75
+ await gapi.client.datamanager.audienceMembers.ingest({});
76
+
77
+ /*
78
+ Removes a list of AudienceMember resources from the provided Destination.
79
+ */
80
+ await gapi.client.datamanager.audienceMembers.remove({});
81
+
82
+ /*
83
+ Uploads a list of Event resources from the provided Destination.
84
+ */
85
+ await gapi.client.datamanager.events.ingest({});
86
+
87
+ /*
88
+ Gets the status of a request given request id.
89
+ */
90
+ await gapi.client.datamanager.requestStatus.retrieve({});
91
+ ```
92
+
93
+ For provenance information see [Provenance section on NPM](https://www.npmjs.com/package/@maxim_mazurok/gapi.client.datamanager-v1#Provenance:~:text=none-,Provenance,-Built%20and%20signed)