@maxim_mazurok/gapi.client.marketingplatformadmin-v1alpha 0.1.20251028 → 0.1.20251029
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 +220 -1
- package/package.json +1 -1
- package/readme.md +19 -0
package/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
10
10
|
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
11
11
|
// Generated from: https://marketingplatformadmin.googleapis.com/$discovery/rest?version=v1alpha
|
|
12
|
-
// Revision:
|
|
12
|
+
// Revision: 20251029
|
|
13
13
|
|
|
14
14
|
/// <reference types="gapi.client" />
|
|
15
15
|
|
|
@@ -41,19 +41,93 @@ declare namespace gapi.client {
|
|
|
41
41
|
/** Identifier. Resource name of this AnalyticsAccountLink. Note the resource ID is the same as the ID of the Analtyics account. Format: organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} Example: "organizations/xyz/analyticsAccountLinks/1234" */
|
|
42
42
|
name?: string;
|
|
43
43
|
}
|
|
44
|
+
interface BillInfo {
|
|
45
|
+
/** The amount of the monthly base fee. */
|
|
46
|
+
baseFee?: Money;
|
|
47
|
+
/** The amount of the event fee. */
|
|
48
|
+
eventFee?: Money;
|
|
49
|
+
/** The amount of the price protection credit, this is only available for eligible customers. */
|
|
50
|
+
priceProtectionCredit?: Money;
|
|
51
|
+
/** The total amount of the bill. */
|
|
52
|
+
total?: Money;
|
|
53
|
+
}
|
|
54
|
+
interface ClientData {
|
|
55
|
+
/** The end date of the contract between the sales org and the end client. */
|
|
56
|
+
endDate?: Date;
|
|
57
|
+
/** The end client that has/had contract with the requested sales org. */
|
|
58
|
+
organization?: Organization;
|
|
59
|
+
/** The start date of the contract between the sales org and the end client. */
|
|
60
|
+
startDate?: Date;
|
|
61
|
+
}
|
|
62
|
+
interface Date {
|
|
63
|
+
/** 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. */
|
|
64
|
+
day?: number;
|
|
65
|
+
/** Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. */
|
|
66
|
+
month?: number;
|
|
67
|
+
/** Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. */
|
|
68
|
+
year?: number;
|
|
69
|
+
}
|
|
44
70
|
interface Empty {}
|
|
71
|
+
interface FindSalesPartnerManagedClientsRequest {
|
|
72
|
+
/** Optional. If set, only active and just ended clients will be returned. */
|
|
73
|
+
isActive?: boolean;
|
|
74
|
+
}
|
|
75
|
+
interface FindSalesPartnerManagedClientsResponse {
|
|
76
|
+
/** The clients managed by the sales org. */
|
|
77
|
+
clientData?: ClientData[];
|
|
78
|
+
}
|
|
45
79
|
interface ListAnalyticsAccountLinksResponse {
|
|
46
80
|
/** Analytics account links in this organization. */
|
|
47
81
|
analyticsAccountLinks?: AnalyticsAccountLink[];
|
|
48
82
|
/** A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */
|
|
49
83
|
nextPageToken?: string;
|
|
50
84
|
}
|
|
85
|
+
interface ListOrganizationsResponse {
|
|
86
|
+
/** A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. */
|
|
87
|
+
nextPageToken?: string;
|
|
88
|
+
/** The Organization resource that the user has access to, which includes the org id and display name. */
|
|
89
|
+
organizations?: Organization[];
|
|
90
|
+
}
|
|
91
|
+
interface Money {
|
|
92
|
+
/** The three-letter currency code defined in ISO 4217. */
|
|
93
|
+
currencyCode?: string;
|
|
94
|
+
/** Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. */
|
|
95
|
+
nanos?: number;
|
|
96
|
+
/** The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. */
|
|
97
|
+
units?: string;
|
|
98
|
+
}
|
|
51
99
|
interface Organization {
|
|
52
100
|
/** The human-readable name for the organization. */
|
|
53
101
|
displayName?: string;
|
|
54
102
|
/** Identifier. The resource name of the GMP organization. Format: organizations/{org_id} */
|
|
55
103
|
name?: string;
|
|
56
104
|
}
|
|
105
|
+
interface PropertyUsage {
|
|
106
|
+
/** The ID of the property's parent account. */
|
|
107
|
+
accountId?: string;
|
|
108
|
+
/** The number of events for which the property is billed in the requested month. */
|
|
109
|
+
billableEventCount?: string;
|
|
110
|
+
/** The display name of the property. */
|
|
111
|
+
displayName?: string;
|
|
112
|
+
/** The name of the Google Analytics Admin API property resource. Format: analyticsadmin.googleapis.com/properties/{property_id} */
|
|
113
|
+
property?: string;
|
|
114
|
+
/** The subtype of the analytics property. This affects the billable event count. */
|
|
115
|
+
propertyType?: string;
|
|
116
|
+
/** The service level of the property. */
|
|
117
|
+
serviceLevel?: string;
|
|
118
|
+
/** Total event count that the property received during the requested month. */
|
|
119
|
+
totalEventCount?: string;
|
|
120
|
+
}
|
|
121
|
+
interface ReportPropertyUsageRequest {
|
|
122
|
+
/** Required. The target month to list property usages. Format: YYYY-MM. For example, "2025-05" */
|
|
123
|
+
month?: string;
|
|
124
|
+
}
|
|
125
|
+
interface ReportPropertyUsageResponse {
|
|
126
|
+
/** Bill amount in the specified organization and month. Will be empty if user only has access to usage data. */
|
|
127
|
+
billInfo?: BillInfo;
|
|
128
|
+
/** Usage data for all properties in the specified organization and month. */
|
|
129
|
+
propertyUsages?: PropertyUsage[];
|
|
130
|
+
}
|
|
57
131
|
interface SetPropertyServiceLevelRequest {
|
|
58
132
|
/** Required. The Analytics property to change the ServiceLevel setting. This field is the name of the Google Analytics Admin API property resource. Format: analyticsadmin.googleapis.com/properties/{property_id} */
|
|
59
133
|
analyticsProperty?: string;
|
|
@@ -238,6 +312,64 @@ declare namespace gapi.client {
|
|
|
238
312
|
): Request<{}>;
|
|
239
313
|
}
|
|
240
314
|
interface OrganizationsResource {
|
|
315
|
+
/** Returns a list of clients managed by the sales partner organization. User needs to be an OrgAdmin/BillingAdmin on the sales partner organization in order to view the end clients. */
|
|
316
|
+
findSalesPartnerManagedClients(request: {
|
|
317
|
+
/** V1 error format. */
|
|
318
|
+
'$.xgafv'?: string;
|
|
319
|
+
/** OAuth access token. */
|
|
320
|
+
access_token?: string;
|
|
321
|
+
/** Data format for response. */
|
|
322
|
+
alt?: string;
|
|
323
|
+
/** JSONP */
|
|
324
|
+
callback?: string;
|
|
325
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
326
|
+
fields?: string;
|
|
327
|
+
/** 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. */
|
|
328
|
+
key?: string;
|
|
329
|
+
/** OAuth 2.0 token for the current user. */
|
|
330
|
+
oauth_token?: string;
|
|
331
|
+
/** Required. The name of the sales partner organization. Format: organizations/{org_id} */
|
|
332
|
+
organization: string;
|
|
333
|
+
/** Returns response with indentations and line breaks. */
|
|
334
|
+
prettyPrint?: boolean;
|
|
335
|
+
/** 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. */
|
|
336
|
+
quotaUser?: string;
|
|
337
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
338
|
+
upload_protocol?: string;
|
|
339
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
340
|
+
uploadType?: string;
|
|
341
|
+
/** Request body */
|
|
342
|
+
resource: FindSalesPartnerManagedClientsRequest;
|
|
343
|
+
}): Request<FindSalesPartnerManagedClientsResponse>;
|
|
344
|
+
findSalesPartnerManagedClients(
|
|
345
|
+
request: {
|
|
346
|
+
/** V1 error format. */
|
|
347
|
+
'$.xgafv'?: string;
|
|
348
|
+
/** OAuth access token. */
|
|
349
|
+
access_token?: string;
|
|
350
|
+
/** Data format for response. */
|
|
351
|
+
alt?: string;
|
|
352
|
+
/** JSONP */
|
|
353
|
+
callback?: string;
|
|
354
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
355
|
+
fields?: string;
|
|
356
|
+
/** 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. */
|
|
357
|
+
key?: string;
|
|
358
|
+
/** OAuth 2.0 token for the current user. */
|
|
359
|
+
oauth_token?: string;
|
|
360
|
+
/** Required. The name of the sales partner organization. Format: organizations/{org_id} */
|
|
361
|
+
organization: string;
|
|
362
|
+
/** Returns response with indentations and line breaks. */
|
|
363
|
+
prettyPrint?: boolean;
|
|
364
|
+
/** 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. */
|
|
365
|
+
quotaUser?: string;
|
|
366
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
367
|
+
upload_protocol?: string;
|
|
368
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
369
|
+
uploadType?: string;
|
|
370
|
+
},
|
|
371
|
+
body: FindSalesPartnerManagedClientsRequest,
|
|
372
|
+
): Request<FindSalesPartnerManagedClientsResponse>;
|
|
241
373
|
/** Lookup for a single organization. */
|
|
242
374
|
get(request?: {
|
|
243
375
|
/** V1 error format. */
|
|
@@ -265,6 +397,93 @@ declare namespace gapi.client {
|
|
|
265
397
|
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
266
398
|
uploadType?: string;
|
|
267
399
|
}): Request<Organization>;
|
|
400
|
+
/** Returns a list of organizations that the user has access to. */
|
|
401
|
+
list(request?: {
|
|
402
|
+
/** V1 error format. */
|
|
403
|
+
'$.xgafv'?: string;
|
|
404
|
+
/** OAuth access token. */
|
|
405
|
+
access_token?: string;
|
|
406
|
+
/** Data format for response. */
|
|
407
|
+
alt?: string;
|
|
408
|
+
/** JSONP */
|
|
409
|
+
callback?: string;
|
|
410
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
411
|
+
fields?: string;
|
|
412
|
+
/** 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. */
|
|
413
|
+
key?: string;
|
|
414
|
+
/** OAuth 2.0 token for the current user. */
|
|
415
|
+
oauth_token?: string;
|
|
416
|
+
/** Optional. The maximum number of organizations to return in one call. The service may return fewer than this value. If unspecified, at most 50 organizations will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. */
|
|
417
|
+
pageSize?: number;
|
|
418
|
+
/** Optional. A page token, received from a previous ListOrganizations call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListOrganizations` must match the call that provided the page token. */
|
|
419
|
+
pageToken?: string;
|
|
420
|
+
/** Returns response with indentations and line breaks. */
|
|
421
|
+
prettyPrint?: boolean;
|
|
422
|
+
/** 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. */
|
|
423
|
+
quotaUser?: string;
|
|
424
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
425
|
+
upload_protocol?: string;
|
|
426
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
427
|
+
uploadType?: string;
|
|
428
|
+
}): Request<ListOrganizationsResponse>;
|
|
429
|
+
/** Get the usage and billing data for properties within the organization for the specified month. Per direct client org, user needs to be OrgAdmin/BillingAdmin on the organization in order to view the billing and usage data. Per sales partner client org, user needs to be OrgAdmin/BillingAdmin on the sales partner org in order to view the billing and usage data, or OrgAdmin/BillingAdmin on the sales partner client org in order to view the usage data only. */
|
|
430
|
+
reportPropertyUsage(request: {
|
|
431
|
+
/** V1 error format. */
|
|
432
|
+
'$.xgafv'?: string;
|
|
433
|
+
/** OAuth access token. */
|
|
434
|
+
access_token?: string;
|
|
435
|
+
/** Data format for response. */
|
|
436
|
+
alt?: string;
|
|
437
|
+
/** JSONP */
|
|
438
|
+
callback?: string;
|
|
439
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
440
|
+
fields?: string;
|
|
441
|
+
/** 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. */
|
|
442
|
+
key?: string;
|
|
443
|
+
/** OAuth 2.0 token for the current user. */
|
|
444
|
+
oauth_token?: string;
|
|
445
|
+
/** Required. Specifies the organization whose property usage will be listed. Format: organizations/{org_id} */
|
|
446
|
+
organization: string;
|
|
447
|
+
/** Returns response with indentations and line breaks. */
|
|
448
|
+
prettyPrint?: boolean;
|
|
449
|
+
/** 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. */
|
|
450
|
+
quotaUser?: string;
|
|
451
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
452
|
+
upload_protocol?: string;
|
|
453
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
454
|
+
uploadType?: string;
|
|
455
|
+
/** Request body */
|
|
456
|
+
resource: ReportPropertyUsageRequest;
|
|
457
|
+
}): Request<ReportPropertyUsageResponse>;
|
|
458
|
+
reportPropertyUsage(
|
|
459
|
+
request: {
|
|
460
|
+
/** V1 error format. */
|
|
461
|
+
'$.xgafv'?: string;
|
|
462
|
+
/** OAuth access token. */
|
|
463
|
+
access_token?: string;
|
|
464
|
+
/** Data format for response. */
|
|
465
|
+
alt?: string;
|
|
466
|
+
/** JSONP */
|
|
467
|
+
callback?: string;
|
|
468
|
+
/** Selector specifying which fields to include in a partial response. */
|
|
469
|
+
fields?: string;
|
|
470
|
+
/** 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. */
|
|
471
|
+
key?: string;
|
|
472
|
+
/** OAuth 2.0 token for the current user. */
|
|
473
|
+
oauth_token?: string;
|
|
474
|
+
/** Required. Specifies the organization whose property usage will be listed. Format: organizations/{org_id} */
|
|
475
|
+
organization: string;
|
|
476
|
+
/** Returns response with indentations and line breaks. */
|
|
477
|
+
prettyPrint?: boolean;
|
|
478
|
+
/** 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. */
|
|
479
|
+
quotaUser?: string;
|
|
480
|
+
/** Upload protocol for media (e.g. "raw", "multipart"). */
|
|
481
|
+
upload_protocol?: string;
|
|
482
|
+
/** Legacy upload protocol for media (e.g. "media", "multipart"). */
|
|
483
|
+
uploadType?: string;
|
|
484
|
+
},
|
|
485
|
+
body: ReportPropertyUsageRequest,
|
|
486
|
+
): Request<ReportPropertyUsageResponse>;
|
|
268
487
|
analyticsAccountLinks: AnalyticsAccountLinksResource;
|
|
269
488
|
}
|
|
270
489
|
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -72,10 +72,29 @@ gapi.auth.authorize(
|
|
|
72
72
|
After that you can use Google Marketing Platform Admin API resources: <!-- TODO: make this work for multiple namespaces -->
|
|
73
73
|
|
|
74
74
|
```typescript
|
|
75
|
+
/*
|
|
76
|
+
Returns a list of clients managed by the sales partner organization. User needs to be an OrgAdmin/BillingAdmin on the sales partner organization in order to view the end clients.
|
|
77
|
+
*/
|
|
78
|
+
await gapi.client.marketingplatformadmin.organizations.findSalesPartnerManagedClients(
|
|
79
|
+
{organization: 'organization'},
|
|
80
|
+
);
|
|
81
|
+
|
|
75
82
|
/*
|
|
76
83
|
Lookup for a single organization.
|
|
77
84
|
*/
|
|
78
85
|
await gapi.client.marketingplatformadmin.organizations.get({name: 'name'});
|
|
86
|
+
|
|
87
|
+
/*
|
|
88
|
+
Returns a list of organizations that the user has access to.
|
|
89
|
+
*/
|
|
90
|
+
await gapi.client.marketingplatformadmin.organizations.list({});
|
|
91
|
+
|
|
92
|
+
/*
|
|
93
|
+
Get the usage and billing data for properties within the organization for the specified month. Per direct client org, user needs to be OrgAdmin/BillingAdmin on the organization in order to view the billing and usage data. Per sales partner client org, user needs to be OrgAdmin/BillingAdmin on the sales partner org in order to view the billing and usage data, or OrgAdmin/BillingAdmin on the sales partner client org in order to view the usage data only.
|
|
94
|
+
*/
|
|
95
|
+
await gapi.client.marketingplatformadmin.organizations.reportPropertyUsage({
|
|
96
|
+
organization: 'organization',
|
|
97
|
+
});
|
|
79
98
|
```
|
|
80
99
|
|
|
81
100
|
For provenance information see [Provenance section on NPM](https://www.npmjs.com/package/@maxim_mazurok/gapi.client.marketingplatformadmin-v1alpha#Provenance:~:text=none-,Provenance,-Built%20and%20signed)
|