Skip to content

Commit bc8ec8e

Browse files
committed
[REF] perform actions implemented
1 parent 1a3b3dc commit bc8ec8e

File tree

125 files changed

+1215
-363
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+1215
-363
lines changed

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v16.14.0
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* Represents the actions that can be performed on AdRule objects.
3+
*/
4+
export abstract class AdRuleAction {}
5+
6+
/**
7+
* The action used for resuming AdRule objects.
8+
*/
9+
export class ActivateAdRules implements AdRuleAction {}
10+
11+
/**
12+
* The action used for pausing AdRule objects.
13+
*/
14+
export class DeactivateAdRules implements AdRuleAction {}
15+
16+
/**
17+
* The action used for deleting AdRule objects.
18+
*/
19+
export class DeleteAdRules implements AdRuleAction {}

lib/client/services/adRule/adRule.service.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import { Client } from 'soap';
33
import { AdRuleServiceOperations } from './adRuleService.interface';
44
import { Statement, UpdateResult } from '../../../common/types';
55
import { AdSpot, AdSpotPage } from './adSpot.type';
6-
import { AdRule, AdRulePage, BreakTemplate, BreakTemplatePage, AdRuleAction } from './adRule.type';
6+
import { AdRule, AdRulePage, BreakTemplate, BreakTemplatePage } from './adRule.type';
7+
import { AdRuleAction } from './adRule.action';
78

89
export class AdRuleService implements AdRuleServiceOperations {
910
private _client: Client;
@@ -46,7 +47,7 @@ export class AdRuleService implements AdRuleServiceOperations {
4647
return this._client.performAdRuleAction({
4748
adRuleAction: {
4849
attributes: {
49-
'xsi:type': adRuleAction,
50+
'xsi:type': adRuleAction.constructor.name,
5051
},
5152
},
5253
filterStatement,

lib/client/services/adRule/adRule.type.ts

-5
Original file line numberDiff line numberDiff line change
@@ -219,11 +219,6 @@ export type BreakTemplate = {
219219
breakTemplateMembers: BreakTemplateMember[];
220220
};
221221

222-
/**
223-
* Represents the actions that can be performed on AdRule objects.
224-
*/
225-
export type AdRuleAction = 'ActivateAdRules' | 'DeactivateAdRules' | 'DeleteAdRules';
226-
227222
/**
228223
* Captures a page of {@link https://developers.google.com/ad-manager/api/reference/v202202/AdRuleService.AdRule AdRule} objects.
229224
*/

lib/client/services/adRule/adRuleService.interface.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Statement, UpdateResult } from '../../../common/types';
22
import { AdSpot, AdSpotPage } from './adSpot.type';
3-
import { AdRule, BreakTemplate, AdRulePage, BreakTemplatePage, AdRuleAction } from './adRule.type';
3+
import { AdRule, BreakTemplate, AdRulePage, BreakTemplatePage } from './adRule.type';
4+
import { AdRuleAction } from './adRule.action';
45

56
/**
67
* Provides methods for creating, updating and retrieving AdRule objects.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/**
2+
* Represents the actions that can be performed on ForecastAdjustment objects.
3+
*/
4+
export abstract class ForecastAdjustmentAction {}
5+
6+
/**
7+
* The action used for activating ForecastAdjustment objects.
8+
*/
9+
export class ActivateForecastAdjustments implements ForecastAdjustmentAction {}
10+
11+
/**
12+
* DeactivateForecastAdjustments
13+
*/
14+
export class DeactivateForecastAdjustments implements ForecastAdjustmentAction {}

lib/client/services/adjustment/adjustment.service.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import {
77
ForecastAdjustmentPage,
88
TrafficForecastSegment,
99
TrafficForecastSegmentPage,
10-
ForecastAdjustmentAction,
1110
} from './adjustment.type';
11+
import { ForecastAdjustmentAction } from './adjustment.action';
1212

1313
export class AdjustmentService implements AdjustmentServiceOperations {
1414
private _client: Client;
@@ -57,7 +57,7 @@ export class AdjustmentService implements AdjustmentServiceOperations {
5757
const res = this._client.performForecastAdjustmentAction({
5858
forecastAdjustmentAction: {
5959
attributes: {
60-
'xsi:type': forecastAdjustmentAction,
60+
'xsi:type': forecastAdjustmentAction.constructor.name,
6161
},
6262
},
6363
filterStatement,

lib/client/services/adjustment/adjustment.type.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import { ForecastAdjustmentStatus, ForecastAdjustmentVolumeType } from './adjustment.enum';
12
import { DateRange, DateTime, PageResult } from '../../../common/types';
23
import { Targeting } from '../../common/types';
3-
import { ForecastAdjustmentStatus, ForecastAdjustmentVolumeType } from './adjustment.enum';
44

55
/**
66
* Settings to specify daily ad opportunity counts that will be used as the expected future traffic volume for a forecast adjustment.
@@ -169,8 +169,6 @@ export type TrafficForecastSegment = {
169169
creationDateTime: DateTime;
170170
};
171171

172-
export type ForecastAdjustmentAction = 'ActivateForecastAdjustments' | 'DeactivateForecastAdjustments';
173-
174172
/**
175173
* A page of **`ForecastAdjustmentDto`** objects.
176174
*/

lib/client/services/adjustment/adjustmentService.interface.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Statement, UpdateResult } from '../../../common/types';
2+
import { ForecastAdjustmentAction } from './adjustment.action';
23
import {
34
ForecastAdjustment,
4-
ForecastAdjustmentAction,
55
ForecastAdjustmentPage,
66
TrafficForecastSegment,
77
TrafficForecastSegmentPage,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/**
2+
* Action that can be performed on {@link https://developers.google.com/ad-manager/api/reference/v202202/AudienceSegmentService.AudienceSegment AudienceSegment} objects.
3+
*/
4+
export abstract class AudienceSegmentAction {}
5+
6+
/**
7+
* Action that can be performed on {@link https://developers.google.com/ad-manager/api/reference/v202202/AudienceSegmentService.FirstPartyAudienceSegment FirstPartyAudienceSegment} objects to activate them.
8+
*/
9+
export class ActivateAudienceSegments implements AudienceSegmentAction {}
10+
11+
/**
12+
* Action that can be performed on {@link https://developers.google.com/ad-manager/api/reference/v202202/AudienceSegmentService.ThirdPartyAudienceSegment ThirdPartyAudienceSegment} objects to approve them.
13+
*/
14+
export class ApproveAudienceSegments implements AudienceSegmentAction {}
15+
16+
/**
17+
* Action that can be performed on {@link https://developers.google.com/ad-manager/api/reference/v202202/AudienceSegmentService.FirstPartyAudienceSegment FirstPartyAudienceSegment} objects to deactivate them.
18+
*/
19+
export class DeactivateAudienceSegments implements AudienceSegmentAction {}
20+
21+
/**
22+
* Action that can be performed on {@link https://developers.google.com/ad-manager/api/reference/v202202/AudienceSegmentService.FirstPartyAudienceSegment FirstPartyAudienceSegment} objects to populate them based on last 30 days of traffic.
23+
*/
24+
export class PopulateAudienceSegments implements AudienceSegmentAction {}
25+
26+
/**
27+
* Action that can be performed on {@link https://developers.google.com/ad-manager/api/reference/v202202/AudienceSegmentService.ThirdPartyAudienceSegment ThirdPartyAudienceSegment} objects to reject them.
28+
*/
29+
export class RejectAudienceSegments implements AudienceSegmentAction {}

lib/client/services/audienceSegment/audienceSegment.service.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import { Client } from 'soap';
22

33
import { AudienceSegmentServiceOperations } from './audienceSegmentService.interface';
44
import { Statement, UpdateResult } from '../../../common/types';
5-
import { AudienceSegmentAction, AudienceSegmentPage, FirstPartyAudienceSegment } from './audienceSegment.type';
5+
import { AudienceSegmentPage, FirstPartyAudienceSegment } from './audienceSegment.type';
6+
import { AudienceSegmentAction } from './audienceSegment.action';
67

78
export class AudienceSegmentService implements AudienceSegmentServiceOperations {
89
private _client: Client;
@@ -25,7 +26,7 @@ export class AudienceSegmentService implements AudienceSegmentServiceOperations
2526
return this._client.performAudienceSegmentAction({
2627
action: {
2728
attributes: {
28-
'xsi:type': action,
29+
'xsi:type': action.constructor.name,
2930
},
3031
},
3132
filterStatement,

lib/client/services/audienceSegment/audienceSegment.type.ts

-10
Original file line numberDiff line numberDiff line change
@@ -157,16 +157,6 @@ export type FirstPartyAudienceSegment =
157157
| NonRuleBasedFirstPartyAudienceSegment
158158
| RuleBasedFirstPartyAudienceSegmentSummary;
159159

160-
/**
161-
* Action that can be performed on {@link https://developers.google.com/ad-manager/api/reference/v202202/AudienceSegmentService.AudienceSegment AudienceSegment} objects.
162-
*/
163-
export type AudienceSegmentAction =
164-
| 'ActivateAudienceSegments'
165-
| 'ApproveAudienceSegments'
166-
| 'DeactivateAudienceSegments'
167-
| 'PopulateAudienceSegments'
168-
| 'RejectAudienceSegments';
169-
170160
/**
171161
* Represents a page of {@link https://developers.google.com/ad-manager/api/reference/v202202/AudienceSegmentService.AudienceSegment AudienceSegment} objects.
172162
*/

lib/client/services/audienceSegment/audienceSegmentService.interface.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Statement, UpdateResult } from '../../../common/types';
2-
import { AudienceSegmentAction, AudienceSegmentPage, FirstPartyAudienceSegment } from './audienceSegment.type';
2+
import { AudienceSegmentAction } from './audienceSegment.action';
3+
import { AudienceSegmentPage, FirstPartyAudienceSegment } from './audienceSegment.type';
34

45
/**
56
* Provides operations for creating, updating and retrieving
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/**
2+
* Represents the actions that can be performed on {@link https://developers.google.com/ad-manager/api/reference/v202202/CdnConfigurationService.CdnConfiguration CdnConfiguration} objects.
3+
*/
4+
export abstract class CdnConfigurationAction {}
5+
6+
/**
7+
* The action used for activating {@link https://developers.google.com/ad-manager/api/reference/v202202/CdnConfigurationService.CdnConfiguration CdnConfiguration} objects.
8+
*/
9+
export class ActivateCdnConfigurations implements CdnConfigurationAction {}
10+
11+
/**
12+
* The action used for archiving {@link https://developers.google.com/ad-manager/api/reference/v202202/CdnConfigurationService.CdnConfiguration CdnConfiguration} objects.
13+
*/
14+
export class ArchiveCdnConfigurations implements CdnConfigurationAction {}

lib/client/services/cdnConfiguration/cdnConfiguration.interface.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
import { CdnConfiguration, CdnConfigurationPage } from './cdnConfiguration.type';
2+
import { CdnConfigurationAction } from './cdnConfiguration.action';
13
import { Statement, UpdateResult } from '../../../common/types';
2-
import { CdnConfiguration, CdnConfigurationAction, CdnConfigurationPage } from './cdnConfiguration.type';
34

45
/**
56
* Provides methods for creating, updating and retrieving

lib/client/services/cdnConfiguration/cdnConfiguration.service.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { Client } from 'soap';
22

33
import { CdnConfigurationServiceOperations } from './cdnConfiguration.interface';
4+
import { CdnConfiguration, CdnConfigurationPage } from './cdnConfiguration.type';
5+
import { CdnConfigurationAction } from './cdnConfiguration.action';
46
import { Statement, UpdateResult } from '../../../common/types';
5-
import { CdnConfiguration, CdnConfigurationAction, CdnConfigurationPage } from './cdnConfiguration.type';
67

78
export class CdnConfigurationService implements CdnConfigurationServiceOperations {
89
private _client: Client;
@@ -28,7 +29,7 @@ export class CdnConfigurationService implements CdnConfigurationServiceOperation
2829
return this._client.performCdnConfigurationAction({
2930
cdnConfigurationAction: {
3031
attributes: {
31-
'xsi:type': cdnConfigurationAction,
32+
'xsi:type': cdnConfigurationAction.constructor.name,
3233
},
3334
},
3435
filterStatement,

lib/client/services/cdnConfiguration/cdnConfiguration.type.ts

-6
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,6 @@ export type CdnConfiguration = {
112112
cdnConfigurationStatus: CdnConfigurationStatus;
113113
};
114114

115-
/**
116-
* Represents the actions that can be performed on
117-
* {@link https://developers.google.com/ad-manager/api/reference/v202202/CdnConfigurationService.CdnConfiguration CdnConfiguration} objects.
118-
*/
119-
export type CdnConfigurationAction = 'ActivateCdnConfigurations' | 'ArchiveCdnConfigurations';
120-
121115
/**
122116
* Captures a page of {@link https://developers.google.com/ad-manager/api/reference/v202202/CdnConfigurationService.CdnConfiguration CdnConfiguration} objects.
123117
*/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/**
2+
* Represents the actions that can be performed on
3+
* {@link https://developers.google.com/ad-manager/api/reference/v202202/CmsMetadataService.CmsMetadataKey CmsMetadataKey} objects.
4+
*/
5+
export abstract class CmsMetadataKeyAction {}
6+
7+
/**
8+
* The action used for activating {@link https://developers.google.com/ad-manager/api/reference/v202202/CmsMetadataService.CmsMetadataKey CmsMetadataKey} objects.
9+
*/
10+
export class ActivateCmsMetadataKeys implements CmsMetadataKeyAction {}
11+
12+
/**
13+
* The action used for deactivating {@link https://developers.google.com/ad-manager/api/reference/v202202/CmsMetadataService.CmsMetadataKey CmsMetadataKey} objects.
14+
*/
15+
export class DeactivateCmsMetadataKeys implements CmsMetadataKeyAction {}
16+
17+
/**
18+
* Represents the actions that can be performed on
19+
* {@link https://developers.google.com/ad-manager/api/reference/v202202/CmsMetadataService.CmsMetadataValue CmsMetadataValue} objects.
20+
*/
21+
export abstract class CmsMetadataValueAction {}
22+
23+
/**
24+
* The action used for activating {@link https://developers.google.com/ad-manager/api/reference/v202202/CmsMetadataService.CmsMetadataValue CmsMetadataValue} objects.
25+
*/
26+
export class ActivateCmsMetadataValues implements CmsMetadataValueAction {}
27+
28+
/**
29+
* The action used for deactivating {@link https://developers.google.com/ad-manager/api/reference/v202202/CmsMetadataService.CmsMetadataValue CmsMetadataValue} objects.
30+
*/
31+
export class DeactivateCmsMetadataValues implements CmsMetadataValueAction {}

lib/client/services/cmsMetadata/cmsMetadata.service.ts

+4-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
import { Client } from 'soap';
22

3+
import { CmsMetadataKeyAction, CmsMetadataValueAction } from './cmsMetadata.action';
34
import { CmsMetadataServiceOperations } from './cmsMetadataService.interface';
5+
import { CmsMetadataKeyPage, CmsMetadataValuePage } from './cmsMetadata.type';
46
import { Statement, UpdateResult } from '../../../common/types';
5-
import {
6-
CmsMetadataKeyAction,
7-
CmsMetadataKeyPage,
8-
CmsMetadataValueAction,
9-
CmsMetadataValuePage,
10-
} from './cmsMetadata.type';
117

128
export class CmsMetadataService implements CmsMetadataServiceOperations {
139
private _client: Client;
@@ -35,7 +31,7 @@ export class CmsMetadataService implements CmsMetadataServiceOperations {
3531
return this._client.performCmsMetadataKeyAction({
3632
cmsMetadataKeyAction: {
3733
attributes: {
38-
'xsi:type': cmsMetadataKeyAction,
34+
'xsi:type': cmsMetadataKeyAction.constructor.name,
3935
},
4036
},
4137
filterStatement,
@@ -49,7 +45,7 @@ export class CmsMetadataService implements CmsMetadataServiceOperations {
4945
return this._client.performCmsMetadataValueAction({
5046
cmsMetadataValueAction: {
5147
attributes: {
52-
'xsi:type': cmsMetadataValueAction,
48+
'xsi:type': cmsMetadataValueAction.constructor.name,
5349
},
5450
},
5551
filterStatement,

lib/client/services/cmsMetadata/cmsMetadata.type.ts

-12
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@ type CmsMetadataKey = {
1919
status: CmsMetadataKeyStatus;
2020
};
2121

22-
/**
23-
* Represents the actions that can be performed on
24-
* {@link https://developers.google.com/ad-manager/api/reference/v202202/CmsMetadataService.CmsMetadataKey CmsMetadataKey} objects.
25-
*/
26-
export type CmsMetadataKeyAction = 'ActivateCmsMetadataKeys' | 'DeactivateCmsMetadataKeys';
27-
2822
/**
2923
* Captures a page of CMS metadata key objects.
3024
*/
@@ -50,12 +44,6 @@ type CmsMetadataValue = {
5044
status: CmsMetadataValueStatus;
5145
};
5246

53-
/**
54-
* Represents the actions that can be performed on
55-
* {@link https://developers.google.com/ad-manager/api/reference/v202202/CmsMetadataService.CmsMetadataValue CmsMetadataValue} objects.
56-
*/
57-
export type CmsMetadataValueAction = 'ActivateCmsMetadataValues' | 'DeactivateCmsMetadataValues';
58-
5947
/**
6048
* Captures a page of CMS metadata value objects.
6149
*/

lib/client/services/cmsMetadata/cmsMetadataService.interface.ts

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1+
import { CmsMetadataKeyAction, CmsMetadataValueAction } from './cmsMetadata.action';
2+
import { CmsMetadataKeyPage, CmsMetadataValuePage } from './cmsMetadata.type';
13
import { Statement, UpdateResult } from '../../../common/types';
2-
import {
3-
CmsMetadataKeyAction,
4-
CmsMetadataKeyPage,
5-
CmsMetadataValueAction,
6-
CmsMetadataValuePage,
7-
} from './cmsMetadata.type';
84

95
/**
106
* Provides methods for querying CMS metadata keys and values.

0 commit comments

Comments
 (0)