adapty 0.8.8 → 0.8.9

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.
@@ -9,7 +9,6 @@ export default class AsaCampaignsCreate extends Command {
9
9
  'adam-id': import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
10
10
  'bidding-strategy': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
11
  'billing-event': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
12
- budget: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
12
  country: import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
14
13
  'daily-budget': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
15
14
  name: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
@@ -24,7 +24,6 @@ export default class AsaCampaignsCreate extends Command {
24
24
  options: ['MANUAL_CPT', 'MAX_CONVERSIONS'],
25
25
  }),
26
26
  'billing-event': Flags.string({ default: 'TAPS', description: 'Billing event', options: ['IMPRESSIONS', 'TAPS'] }),
27
- 'budget': moneyFlag('Lifetime budget'),
28
27
  'country': Flags.string({ description: 'Country or region code, repeatable', multiple: true, required: true }),
29
28
  'daily-budget': moneyFlag('Daily budget', { required: true }),
30
29
  'name': Flags.string({ description: 'Campaign name', required: true }),
@@ -54,7 +53,6 @@ export default class AsaCampaignsCreate extends Command {
54
53
  adam_id: flags['adam-id'],
55
54
  bidding_strategy: flags['bidding-strategy'],
56
55
  billing_event: flags['billing-event'],
57
- budget_amount: money(flags.budget, flags.currency),
58
56
  campaign_group_id: flags.org,
59
57
  countries_or_regions: flags.country,
60
58
  daily_budget_amount: money(flags['daily-budget'], flags.currency),
@@ -9,7 +9,6 @@ export default class AsaCampaignsUpdate extends Command {
9
9
  static examples: string[];
10
10
  static flags: {
11
11
  'bidding-strategy': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
- budget: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
12
  country: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
13
  'daily-budget': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
15
14
  name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
@@ -8,7 +8,7 @@ export default class AsaCampaignsUpdate extends Command {
8
8
  static args = {
9
9
  campaign_id: Args.string({ description: 'Campaign ID (UUID)', required: true }),
10
10
  };
11
- static description = 'Change a campaign: budgets, countries, status, schedule or Invoicing Options (all five --invoice-* flags together; they replace the stored set)';
11
+ static description = 'Change a campaign: daily budget, countries, status or Invoicing Options (all five --invoice-* flags together; they replace the stored set)';
12
12
  static enableJsonFlag = true;
13
13
  static examples = [
14
14
  '<%= config.bin %> asa campaigns update UUID --status PAUSED',
@@ -24,7 +24,6 @@ export default class AsaCampaignsUpdate extends Command {
24
24
  description: 'Bidding strategy',
25
25
  options: ['MANUAL_CPT', 'MAX_CONVERSIONS'],
26
26
  }),
27
- 'budget': moneyFlag('Lifetime budget'),
28
27
  'country': Flags.string({ description: 'Replace the country list, repeatable', multiple: true }),
29
28
  'daily-budget': moneyFlag('Daily budget'),
30
29
  'name': Flags.string({ description: 'Campaign name' }),
@@ -49,9 +48,6 @@ export default class AsaCampaignsUpdate extends Command {
49
48
  if (flags['daily-budget'] !== undefined) {
50
49
  body.daily_budget_amount = money(flags['daily-budget'], flags.currency);
51
50
  }
52
- if (flags.budget !== undefined) {
53
- body.budget_amount = money(flags.budget, flags.currency);
54
- }
55
51
  if (flags['target-cpa'] !== undefined) {
56
52
  body.target_cpa = money(flags['target-cpa'], flags.currency);
57
53
  }
@@ -218,15 +218,13 @@ export function locInvoiceDetails(flags) {
218
218
  const SERVING_HINTS = {
219
219
  AUTOMATED_KEYWORDS_REQUIRED_AD_GROUP_MISSING: campaignId => `Max Conversions campaign needs an automated ad group: adapty asa ad-groups create --campaign ${campaignId} --name "Automated Max Conv" --automated`,
220
220
  MISSING_BO_OR_INVOICING_FIELDS: campaignId => `This organization bills by line of credit — add Invoicing Options: adapty asa campaigns update ${campaignId} --invoice-advertiser ... --invoice-order-number ... --invoice-contact-name ... --invoice-contact-email ... --invoice-billing-email ...`,
221
+ PAUSED_BY_USER: campaignId => `Campaign is paused — to serve, enable it: adapty asa campaigns update ${campaignId} --status ENABLED; its ad groups and keywords must be enabled too: adapty asa ad-groups update ... --status ENABLED, adapty asa keywords update ... --status ACTIVE`,
221
222
  };
222
223
  export function reportServingState(campaign, warn) {
223
224
  if (campaign?.serving_status !== 'NOT_RUNNING' || !campaign.serving_state_reasons?.length) {
224
225
  return;
225
226
  }
226
227
  const reasons = campaign.serving_state_reasons;
227
- if (reasons.length === 1 && reasons[0] === 'PAUSED_BY_USER') {
228
- return;
229
- }
230
228
  for (const reason of reasons) {
231
229
  const hint = SERVING_HINTS[reason];
232
230
  if (hint) {