/
v1.4.ts
5112 lines (4812 loc) · 173 KB
/
v1.4.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {AxiosPromise} from 'axios';
import {Compute, JWT, OAuth2Client, UserRefreshClient} from 'google-auth-library';
import {BodyResponseCallback, createAPIRequest, GlobalOptions, GoogleConfigurable, MethodOptions} from 'googleapis-common';
// tslint:disable: no-any
// tslint:disable: class-name
// tslint:disable: variable-name
// tslint:disable: jsdoc-format
// tslint:disable: no-namespace
export namespace adexchangebuyer_v1_4 {
export interface Options extends GlobalOptions {
version: 'v1_4';
}
/**
* Ad Exchange Buyer API
*
* Accesses your bidding-account information, submits creatives for
* validation, finds available direct deals, and retrieves performance
* reports.
*
* @example
* const {google} = require('googleapis');
* const adexchangebuyer = google.adexchangebuyer('v1.4');
*
* @namespace adexchangebuyer
* @type {Function}
* @version v1.4
* @variation v1.4
* @param {object=} options Options for Adexchangebuyer
*/
export class Adexchangebuyer {
_options: GlobalOptions;
google?: GoogleConfigurable;
root = this;
accounts: Resource$Accounts;
billingInfo: Resource$Billinginfo;
budget: Resource$Budget;
creatives: Resource$Creatives;
marketplacedeals: Resource$Marketplacedeals;
marketplacenotes: Resource$Marketplacenotes;
marketplaceprivateauction: Resource$Marketplaceprivateauction;
performanceReport: Resource$Performancereport;
pretargetingConfig: Resource$Pretargetingconfig;
products: Resource$Products;
proposals: Resource$Proposals;
pubprofiles: Resource$Pubprofiles;
constructor(options: GlobalOptions, google?: GoogleConfigurable) {
this._options = options || {};
this.google = google;
this.getRoot.bind(this);
this.accounts = new Resource$Accounts(this);
this.billingInfo = new Resource$Billinginfo(this);
this.budget = new Resource$Budget(this);
this.creatives = new Resource$Creatives(this);
this.marketplacedeals = new Resource$Marketplacedeals(this);
this.marketplacenotes = new Resource$Marketplacenotes(this);
this.marketplaceprivateauction =
new Resource$Marketplaceprivateauction(this);
this.performanceReport = new Resource$Performancereport(this);
this.pretargetingConfig = new Resource$Pretargetingconfig(this);
this.products = new Resource$Products(this);
this.proposals = new Resource$Proposals(this);
this.pubprofiles = new Resource$Pubprofiles(this);
}
getRoot() {
return this.root;
}
}
/**
* Configuration data for an Ad Exchange buyer account.
*/
export interface Schema$Account {
/**
* When this is false, bid requests that include a deal ID for a private
* auction or preferred deal are always sent to your bidder. When true, all
* active pretargeting configs will be applied to private auctions and
* preferred deals. Programmatic Guaranteed deals (when enabled) are always
* sent to your bidder.
*/
applyPretargetingToNonGuaranteedDeals?: boolean;
/**
* Your bidder locations that have distinct URLs.
*/
bidderLocation?: any[];
/**
* The nid parameter value used in cookie match requests. Please contact
* your technical account manager if you need to change this.
*/
cookieMatchingNid?: string;
/**
* The base URL used in cookie match requests.
*/
cookieMatchingUrl?: string;
/**
* Account id.
*/
id?: number;
/**
* Resource type.
*/
kind?: string;
/**
* The maximum number of active creatives that an account can have, where a
* creative is active if it was inserted or bid with in the last 30 days.
* Please contact your technical account manager if you need to change this.
*/
maximumActiveCreatives?: number;
/**
* The sum of all bidderLocation.maximumQps values cannot exceed this.
* Please contact your technical account manager if you need to change this.
*/
maximumTotalQps?: number;
/**
* The number of creatives that this account inserted or bid with in the
* last 30 days.
*/
numberActiveCreatives?: number;
}
/**
* An account feed lists Ad Exchange buyer accounts that the user has access
* to. Each entry in the feed corresponds to a single buyer account.
*/
export interface Schema$AccountsList {
/**
* A list of accounts.
*/
items?: Schema$Account[];
/**
* Resource type.
*/
kind?: string;
}
export interface Schema$AddOrderDealsRequest {
/**
* The list of deals to add
*/
deals?: Schema$MarketplaceDeal[];
/**
* The last known proposal revision number.
*/
proposalRevisionNumber?: string;
/**
* Indicates an optional action to take on the proposal
*/
updateAction?: string;
}
export interface Schema$AddOrderDealsResponse {
/**
* List of deals added (in the same proposal as passed in the request)
*/
deals?: Schema$MarketplaceDeal[];
/**
* The updated revision number for the proposal.
*/
proposalRevisionNumber?: string;
}
export interface Schema$AddOrderNotesRequest {
/**
* The list of notes to add.
*/
notes?: Schema$MarketplaceNote[];
}
export interface Schema$AddOrderNotesResponse {
notes?: Schema$MarketplaceNote[];
}
/**
* The configuration data for an Ad Exchange billing info.
*/
export interface Schema$BillingInfo {
/**
* Account id.
*/
accountId?: number;
/**
* Account name.
*/
accountName?: string;
/**
* A list of adgroup IDs associated with this particular account. These IDs
* may show up as part of a realtime bidding BidRequest, which indicates a
* bid request for this account.
*/
billingId?: string[];
/**
* Resource type.
*/
kind?: string;
}
/**
* A billing info feed lists Billing Info the Ad Exchange buyer account has
* access to. Each entry in the feed corresponds to a single billing info.
*/
export interface Schema$BillingInfoList {
/**
* A list of billing info relevant for your account.
*/
items?: Schema$BillingInfo[];
/**
* Resource type.
*/
kind?: string;
}
/**
* The configuration data for Ad Exchange RTB - Budget API.
*/
export interface Schema$Budget {
/**
* The id of the account. This is required for get and update requests.
*/
accountId?: string;
/**
* The billing id to determine which adgroup to provide budget information
* for. This is required for get and update requests.
*/
billingId?: string;
/**
* The daily budget amount in unit amount of the account currency to apply
* for the billingId provided. This is required for update requests.
*/
budgetAmount?: string;
/**
* The currency code for the buyer. This cannot be altered here.
*/
currencyCode?: string;
/**
* The unique id that describes this item.
*/
id?: string;
/**
* The kind of the resource, i.e. "adexchangebuyer#budget".
*/
kind?: string;
}
export interface Schema$Buyer {
/**
* Adx account id of the buyer.
*/
accountId?: string;
}
export interface Schema$ContactInformation {
/**
* Email address of the contact.
*/
email?: string;
/**
* The name of the contact.
*/
name?: string;
}
export interface Schema$CreateOrdersRequest {
/**
* The list of proposals to create.
*/
proposals?: Schema$Proposal[];
/**
* Web property id of the seller creating these orders
*/
webPropertyCode?: string;
}
export interface Schema$CreateOrdersResponse {
/**
* The list of proposals successfully created.
*/
proposals?: Schema$Proposal[];
}
/**
* A creative and its classification data.
*/
export interface Schema$Creative {
/**
* Account id.
*/
accountId?: number;
/**
* The link to the Ad Preferences page. This is only supported for native
* ads.
*/
adChoicesDestinationUrl?: string;
/**
* Detected advertiser id, if any. Read-only. This field should not be set
* in requests.
*/
advertiserId?: string[];
/**
* The name of the company being advertised in the creative. The value
* provided must exist in the advertisers.txt file.
*/
advertiserName?: string;
/**
* The agency id for this creative.
*/
agencyId?: string;
/**
* The last upload timestamp of this creative if it was uploaded via API.
* Read-only. The value of this field is generated, and will be ignored for
* uploads. (formatted RFC 3339 timestamp).
*/
apiUploadTimestamp?: string;
/**
* List of buyer selectable attributes for the ads that may be shown from
* this snippet. Each attribute is represented by an integer as defined in
* buyer-declarable-creative-attributes.txt.
*/
attribute?: number[];
/**
* A buyer-specific id identifying the creative in this ad.
*/
buyerCreativeId?: string;
/**
* The set of destination urls for the snippet.
*/
clickThroughUrl?: string[];
/**
* Shows any corrections that were applied to this creative. Read-only. This
* field should not be set in requests.
*/
corrections?: any[];
/**
* Top-level deals status. Read-only. This field should not be set in
* requests. If disapproved, an entry for auctionType=DIRECT_DEALS (or ALL)
* in servingRestrictions will also exist. Note that this may be nuanced
* with other contextual restrictions, in which case it may be preferable to
* read from servingRestrictions directly.
*/
dealsStatus?: string;
/**
* Detected domains for this creative. Read-only. This field should not be
* set in requests.
*/
detectedDomains?: string[];
/**
* The filtering reasons for the creative. Read-only. This field should not
* be set in requests.
*/
filteringReasons?: any;
/**
* Ad height.
*/
height?: number;
/**
* The HTML snippet that displays the ad when inserted in the web page. If
* set, videoURL, videoVastXML, and nativeAd should not be set.
*/
HTMLSnippet?: string;
/**
* The set of urls to be called to record an impression.
*/
impressionTrackingUrl?: string[];
/**
* Resource type.
*/
kind?: string;
/**
* Detected languages for this creative. Read-only. This field should not be
* set in requests.
*/
languages?: string[];
/**
* If nativeAd is set, HTMLSnippet, videoVastXML, and the videoURL outside
* of nativeAd should not be set. (The videoURL inside nativeAd can be set.)
*/
nativeAd?: any;
/**
* Top-level open auction status. Read-only. This field should not be set in
* requests. If disapproved, an entry for auctionType=OPEN_AUCTION (or ALL)
* in servingRestrictions will also exist. Note that this may be nuanced
* with other contextual restrictions, in which case it may be preferable to
* read from ServingRestrictions directly.
*/
openAuctionStatus?: string;
/**
* Detected product categories, if any. Each category is represented by an
* integer as defined in ad-product-categories.txt. Read-only. This field
* should not be set in requests.
*/
productCategories?: number[];
/**
* All restricted categories for the ads that may be shown from this
* snippet. Each category is represented by an integer as defined in the
* ad-restricted-categories.txt.
*/
restrictedCategories?: number[];
/**
* Detected sensitive categories, if any. Each category is represented by an
* integer as defined in ad-sensitive-categories.txt. Read-only. This field
* should not be set in requests.
*/
sensitiveCategories?: number[];
/**
* The granular status of this ad in specific contexts. A context here
* relates to where something ultimately serves (for example, a physical
* location, a platform, an HTTPS vs HTTP request, or the type of auction).
* Read-only. This field should not be set in requests. See the examples in
* the Creatives guide for more details.
*/
servingRestrictions?: any[];
/**
* List of vendor types for the ads that may be shown from this snippet.
* Each vendor type is represented by an integer as defined in vendors.txt.
*/
vendorType?: number[];
/**
* The version for this creative. Read-only. This field should not be set in
* requests.
*/
version?: number;
/**
* The URL to fetch a video ad. If set, HTMLSnippet, videoVastXML, and
* nativeAd should not be set. Note, this is different from
* resource.native_ad.video_url above.
*/
videoURL?: string;
/**
* The contents of a VAST document for a video ad. This document should
* conform to the VAST 2.0 or 3.0 standard. If set, HTMLSnippet, videoURL,
* and nativeAd and should not be set.
*/
videoVastXML?: string;
/**
* Ad width.
*/
width?: number;
}
/**
* The external deal ids associated with a creative.
*/
export interface Schema$CreativeDealIds {
/**
* A list of external deal ids and ARC approval status.
*/
dealStatuses?: any[];
/**
* Resource type.
*/
kind?: string;
}
/**
* The creatives feed lists the active creatives for the Ad Exchange buyer
* accounts that the user has access to. Each entry in the feed corresponds to
* a single creative.
*/
export interface Schema$CreativesList {
/**
* A list of creatives.
*/
items?: Schema$Creative[];
/**
* Resource type.
*/
kind?: string;
/**
* Continuation token used to page through creatives. To retrieve the next
* page of results, set the next request's "pageToken" value
* to this.
*/
nextPageToken?: string;
}
export interface Schema$DealServingMetadata {
/**
* True if alcohol ads are allowed for this deal (read-only). This field is
* only populated when querying for finalized orders using the method
* GetFinalizedOrderDeals
*/
alcoholAdsAllowed?: boolean;
/**
* Tracks which parties (if any) have paused a deal. (readonly, except via
* PauseResumeOrderDeals action)
*/
dealPauseStatus?: Schema$DealServingMetadataDealPauseStatus;
}
/**
* Tracks which parties (if any) have paused a deal. The deal is considered
* paused if has_buyer_paused || has_seller_paused. Each of the
* has_buyer_paused or the has_seller_paused bits can be set independently.
*/
export interface Schema$DealServingMetadataDealPauseStatus {
buyerPauseReason?: string;
/**
* If the deal is paused, records which party paused the deal first.
*/
firstPausedBy?: string;
hasBuyerPaused?: boolean;
hasSellerPaused?: boolean;
sellerPauseReason?: string;
}
export interface Schema$DealTerms {
/**
* Visibilty of the URL in bid requests.
*/
brandingType?: string;
/**
* Indicates that this ExternalDealId exists under at least two different
* AdxInventoryDeals. Currently, the only case that the same ExternalDealId
* will exist is programmatic cross sell case.
*/
crossListedExternalDealIdType?: string;
/**
* Description for the proposed terms of the deal.
*/
description?: string;
/**
* Non-binding estimate of the estimated gross spend for this deal Can be
* set by buyer or seller.
*/
estimatedGrossSpend?: Schema$Price;
/**
* Non-binding estimate of the impressions served per day Can be set by
* buyer or seller.
*/
estimatedImpressionsPerDay?: string;
/**
* The terms for guaranteed fixed price deals.
*/
guaranteedFixedPriceTerms?: Schema$DealTermsGuaranteedFixedPriceTerms;
/**
* The terms for non-guaranteed auction deals.
*/
nonGuaranteedAuctionTerms?: Schema$DealTermsNonGuaranteedAuctionTerms;
/**
* The terms for non-guaranteed fixed price deals.
*/
nonGuaranteedFixedPriceTerms?: Schema$DealTermsNonGuaranteedFixedPriceTerms;
/**
* The terms for rubicon non-guaranteed deals.
*/
rubiconNonGuaranteedTerms?: Schema$DealTermsRubiconNonGuaranteedTerms;
/**
* For deals with Cost Per Day billing, defines the timezone used to mark
* the boundaries of a day (buyer-readonly)
*/
sellerTimeZone?: string;
}
export interface Schema$DealTermsGuaranteedFixedPriceTerms {
/**
* External billing info for this Deal. This field is relevant when external
* billing info such as price has a different currency code than DFP/AdX.
*/
billingInfo?: Schema$DealTermsGuaranteedFixedPriceTermsBillingInfo;
/**
* Fixed price for the specified buyer.
*/
fixedPrices?: Schema$PricePerBuyer[];
/**
* Guaranteed impressions as a percentage. This is the percentage of
* guaranteed looks that the buyer is guaranteeing to buy.
*/
guaranteedImpressions?: string;
/**
* Count of guaranteed looks. Required for deal, optional for product. For
* CPD deals, buyer changes to guaranteed_looks will be ignored.
*/
guaranteedLooks?: string;
/**
* Count of minimum daily looks for a CPD deal. For CPD deals, buyer should
* negotiate on this field instead of guaranteed_looks.
*/
minimumDailyLooks?: string;
}
export interface Schema$DealTermsGuaranteedFixedPriceTermsBillingInfo {
/**
* The timestamp (in ms since epoch) when the original reservation price for
* the deal was first converted to DFP currency. This is used to convert the
* contracted price into buyer's currency without discrepancy.
*/
currencyConversionTimeMs?: string;
/**
* The DFP line item id associated with this deal. For features like CPD,
* buyers can retrieve the DFP line item for billing reconciliation.
*/
dfpLineItemId?: string;
/**
* The original contracted quantity (# impressions) for this deal. To ensure
* delivery, sometimes the publisher will book the deal with a impression
* buffer, such that guaranteed_looks is greater than the contracted
* quantity. However clients are billed using the original contracted
* quantity.
*/
originalContractedQuantity?: string;
/**
* The original reservation price for the deal, if the currency code is
* different from the one used in negotiation.
*/
price?: Schema$Price;
}
export interface Schema$DealTermsNonGuaranteedAuctionTerms {
/**
* True if open auction buyers are allowed to compete with invited buyers in
* this private auction (buyer-readonly).
*/
autoOptimizePrivateAuction?: boolean;
/**
* Reserve price for the specified buyer.
*/
reservePricePerBuyers?: Schema$PricePerBuyer[];
}
export interface Schema$DealTermsNonGuaranteedFixedPriceTerms {
/**
* Fixed price for the specified buyer.
*/
fixedPrices?: Schema$PricePerBuyer[];
}
export interface Schema$DealTermsRubiconNonGuaranteedTerms {
/**
* Optional price for Rubicon priority access in the auction.
*/
priorityPrice?: Schema$Price;
/**
* Optional price for Rubicon standard access in the auction.
*/
standardPrice?: Schema$Price;
}
export interface Schema$DeleteOrderDealsRequest {
/**
* List of deals to delete for a given proposal
*/
dealIds?: string[];
/**
* The last known proposal revision number.
*/
proposalRevisionNumber?: string;
/**
* Indicates an optional action to take on the proposal
*/
updateAction?: string;
}
export interface Schema$DeleteOrderDealsResponse {
/**
* List of deals deleted (in the same proposal as passed in the request)
*/
deals?: Schema$MarketplaceDeal[];
/**
* The updated revision number for the proposal.
*/
proposalRevisionNumber?: string;
}
export interface Schema$DeliveryControl {
creativeBlockingLevel?: string;
deliveryRateType?: string;
frequencyCaps?: Schema$DeliveryControlFrequencyCap[];
}
export interface Schema$DeliveryControlFrequencyCap {
maxImpressions?: number;
numTimeUnits?: number;
timeUnitType?: string;
}
/**
* This message carries publisher provided breakdown. E.g. {dimension_type:
* 'COUNTRY', [{dimension_value: {id: 1, name: 'US'}},
* {dimension_value: {id: 2, name: 'UK'}}]}
*/
export interface Schema$Dimension {
dimensionType?: string;
dimensionValues?: Schema$DimensionDimensionValue[];
}
/**
* Value of the dimension.
*/
export interface Schema$DimensionDimensionValue {
/**
* Id of the dimension.
*/
id?: number;
/**
* Name of the dimension mainly for debugging purposes, except for the case
* of CREATIVE_SIZE. For CREATIVE_SIZE, strings are used instead of ids.
*/
name?: string;
/**
* Percent of total impressions for a dimension type. e.g. {dimension_type:
* 'GENDER', [{dimension_value: {id: 1, name: 'MALE',
* percentage: 60}}]} Gender MALE is 60% of all impressions which have
* gender.
*/
percentage?: number;
}
export interface Schema$EditAllOrderDealsRequest {
/**
* List of deals to edit. Service may perform 3 different operations based
* on comparison of deals in this list vs deals already persisted in
* database: 1. Add new deal to proposal If a deal in this list does not
* exist in the proposal, the service will create a new deal and add it to
* the proposal. Validation will follow AddOrderDealsRequest. 2. Update
* existing deal in the proposal If a deal in this list already exist in the
* proposal, the service will update that existing deal to this new deal in
* the request. Validation will follow UpdateOrderDealsRequest. 3. Delete
* deals from the proposal (just need the id) If a existing deal in the
* proposal is not present in this list, the service will delete that deal
* from the proposal. Validation will follow DeleteOrderDealsRequest.
*/
deals?: Schema$MarketplaceDeal[];
/**
* If specified, also updates the proposal in the batch transaction. This is
* useful when the proposal and the deals need to be updated in one
* transaction.
*/
proposal?: Schema$Proposal;
/**
* The last known revision number for the proposal.
*/
proposalRevisionNumber?: string;
/**
* Indicates an optional action to take on the proposal
*/
updateAction?: string;
}
export interface Schema$EditAllOrderDealsResponse {
/**
* List of all deals in the proposal after edit.
*/
deals?: Schema$MarketplaceDeal[];
/**
* The latest revision number after the update has been applied.
*/
orderRevisionNumber?: string;
}
export interface Schema$GetOffersResponse {
/**
* The returned list of products.
*/
products?: Schema$Product[];
}
export interface Schema$GetOrderDealsResponse {
/**
* List of deals for the proposal
*/
deals?: Schema$MarketplaceDeal[];
}
export interface Schema$GetOrderNotesResponse {
/**
* The list of matching notes. The notes for a proposal are ordered from
* oldest to newest. If the notes span multiple proposals, they will be
* grouped by proposal, with the notes for the most recently modified
* proposal appearing first.
*/
notes?: Schema$MarketplaceNote[];
}
export interface Schema$GetOrdersResponse {
/**
* The list of matching proposals.
*/
proposals?: Schema$Proposal[];
}
export interface Schema$GetPublisherProfilesByAccountIdResponse {
/**
* Profiles for the requested publisher
*/
profiles?: Schema$PublisherProfileApiProto[];
}
/**
* A proposal can contain multiple deals. A deal contains the terms and
* targeting information that is used for serving.
*/
export interface Schema$MarketplaceDeal {
/**
* Buyer private data (hidden from seller).
*/
buyerPrivateData?: Schema$PrivateData;
/**
* The time (ms since epoch) of the deal creation. (readonly)
*/
creationTimeMs?: string;
/**
* Specifies the creative pre-approval policy (buyer-readonly)
*/
creativePreApprovalPolicy?: string;
/**
* Specifies whether the creative is safeFrame compatible (buyer-readonly)
*/
creativeSafeFrameCompatibility?: string;
/**
* A unique deal-id for the deal (readonly).
*/
dealId?: string;
/**
* Metadata about the serving status of this deal (readonly, writes via
* custom actions)
*/
dealServingMetadata?: Schema$DealServingMetadata;
/**
* The set of fields around delivery control that are interesting for a
* buyer to see but are non-negotiable. These are set by the publisher. This
* message is assigned an id of 100 since some day we would want to model
* this as a protobuf extension.
*/
deliveryControl?: Schema$DeliveryControl;
/**
* The external deal id assigned to this deal once the deal is finalized.
* This is the deal-id that shows up in serving/reporting etc. (readonly)
*/
externalDealId?: string;
/**
* Proposed flight end time of the deal (ms since epoch) This will generally
* be stored in a granularity of a second. (updatable)
*/
flightEndTimeMs?: string;
/**
* Proposed flight start time of the deal (ms since epoch) This will
* generally be stored in a granularity of a second. (updatable)
*/
flightStartTimeMs?: string;
/**
* Description for the deal terms. (buyer-readonly)
*/
inventoryDescription?: string;
/**
* Indicates whether the current deal is a RFP template. RFP template is
* created by buyer and not based on seller created products.
*/
isRfpTemplate?: boolean;
/**
* True, if the buyside inventory setup is complete for this deal.
* (readonly, except via OrderSetupCompleted action)
*/
isSetupComplete?: boolean;
/**
* Identifies what kind of resource this is. Value: the fixed string
* "adexchangebuyer#marketplaceDeal".
*/
kind?: string;
/**
* The time (ms since epoch) when the deal was last updated. (readonly)
*/
lastUpdateTimeMs?: string;
/**
* The name of the deal. (updatable)
*/
name?: string;
/**
* The product-id from which this deal was created. (readonly, except on
* create)
*/
productId?: string;
/**
* The revision number of the product that the deal was created from
* (readonly, except on create)
*/
productRevisionNumber?: string;
/**
* Specifies the creative source for programmatic deals, PUBLISHER means
* creative is provided by seller and ADVERTISR means creative is provided
* by buyer. (buyer-readonly)
*/
programmaticCreativeSource?: string;
proposalId?: string;
/**
* Optional Seller contact information for the deal (buyer-readonly)
*/
sellerContacts?: Schema$ContactInformation[];
/**
* The shared targeting visible to buyers and sellers. Each shared targeting
* entity is AND'd together. (updatable)
*/
sharedTargetings?: Schema$SharedTargeting[];
/**
* The syndication product associated with the deal. (readonly, except on
* create)
*/
syndicationProduct?: string;
/**
* The negotiable terms of the deal. (updatable)
*/
terms?: Schema$DealTerms;
webPropertyCode?: string;
}
export interface Schema$MarketplaceDealParty {
/**
* The buyer/seller associated with the deal. One of buyer/seller is
* specified for a deal-party.
*/
buyer?: Schema$Buyer;
/**
* The buyer/seller associated with the deal. One of buyer/seller is
* specified for a deal party.
*/
seller?: Schema$Seller;
}
export interface Schema$MarketplaceLabel {
/**
* The accountId of the party that created the label.
*/
accountId?: string;
/**
* The creation time (in ms since epoch) for the label.
*/
createTimeMs?: string;
/**
* Information about the party that created the label.
*/
deprecatedMarketplaceDealParty?: Schema$MarketplaceDealParty;
/**
* The label to use.
*/
label?: string;
}
/**
* A proposal is associated with a bunch of notes which may optionally be
* associated with a deal and/or revision number.
*/
export interface Schema$MarketplaceNote {
/**
* The role of the person (buyer/seller) creating the note. (readonly)
*/
creatorRole?: string;
/**
* Notes can optionally be associated with a deal. (readonly, except on
* create)
*/
dealId?: string;
/**
* Identifies what kind of resource this is. Value: the fixed string
* "adexchangebuyer#marketplaceNote".
*/
kind?: string;
/**
* The actual note to attach. (readonly, except on create)
*/
note?: string;
/**
* The unique id for the note. (readonly)
*/
noteId?: string;
/**
* The proposalId that a note is attached to. (readonly)
*/
proposalId?: string;
/**
* If the note is associated with a proposal revision number, then store
* that here. (readonly, except on create)
*/
proposalRevisionNumber?: string;
/**
* The timestamp (ms since epoch) that this note was created. (readonly)
*/
timestampMs?: string;
}
/**
* The configuration data for an Ad Exchange performance report list.
*/
export interface Schema$PerformanceReport {
/**
* The number of bid responses with an ad.
*/
bidRate?: number;
/**
* The number of bid requests sent to your bidder.
*/
bidRequestRate?: number;
/**
* Rate of various prefiltering statuses per match. Please refer to the
* callout-status-codes.txt file for different statuses.
*/
calloutStatusRate?: any[];
/**
* Average QPS for cookie matcher operations.
*/
cookieMatcherStatusRate?: any[];
/**
* Rate of ads with a given status. Please refer to the
* creative-status-codes.txt file for different statuses.
*/
creativeStatusRate?: any[];
/**
* The number of bid responses that were filtered due to a policy violation
* or other errors.
*/
filteredBidRate?: number;
/**
* Average QPS for hosted match operations.
*/
hostedMatchStatusRate?: any[];
/**
* The number of potential queries based on your pretargeting settings.
*/
inventoryMatchRate?: number;
/**
* Resource type.