adapty 0.8.7 → 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.
- package/README.md +30 -2
- package/dist/cli/base/adapty/adapty-command.d.ts +1 -4
- package/dist/cli/base/adapty/build.d.ts +2 -8
- package/dist/cli/base/adapty/index.d.ts +2 -3
- package/dist/cli/base/adapty/index.js +1 -1
- package/dist/cli/base/adapty/openSession.d.ts +2 -19
- package/dist/cli/base/adapty/openSession.js +6 -16
- package/dist/cli/base/attribution/attribution-command.d.ts +16 -0
- package/dist/cli/base/attribution/attribution-command.js +42 -0
- package/dist/cli/base/attribution/build.d.ts +5 -0
- package/dist/cli/base/attribution/build.js +12 -0
- package/dist/cli/base/attribution/flags.d.ts +16 -0
- package/dist/cli/base/attribution/flags.js +28 -0
- package/dist/cli/base/attribution/index.d.ts +4 -0
- package/dist/cli/base/attribution/index.js +4 -0
- package/dist/cli/base/attribution/openSession.d.ts +9 -0
- package/dist/cli/base/attribution/openSession.js +19 -0
- package/dist/cli/base/base-command.d.ts +7 -0
- package/dist/cli/base/session.d.ts +30 -0
- package/dist/cli/base/session.js +20 -0
- package/dist/cli/commands/attribution/dimensions.d.ts +7 -0
- package/dist/cli/commands/attribution/dimensions.js +18 -0
- package/dist/cli/commands/attribution/metrics.d.ts +7 -0
- package/dist/cli/commands/attribution/metrics.js +35 -0
- package/dist/cli/commands/attribution/report/index.d.ts +18 -0
- package/dist/cli/commands/attribution/report/index.js +93 -0
- package/dist/cli/commands/attribution/report/lib/render.d.ts +3 -0
- package/dist/cli/commands/attribution/report/lib/render.js +24 -0
- package/dist/cli/commands/attribution/values.d.ts +14 -0
- package/dist/cli/commands/attribution/values.js +44 -0
- package/dist/cli/errors.d.ts +12 -0
- package/dist/cli/errors.js +16 -0
- package/dist/cli/flags.d.ts +4 -0
- package/dist/cli/flags.js +14 -4
- package/dist/commands/access-levels/create.js +2 -2
- package/dist/commands/access-levels/get.js +3 -2
- package/dist/commands/access-levels/list.js +3 -2
- package/dist/commands/access-levels/update.js +3 -2
- package/dist/commands/asa/campaigns/create.d.ts +0 -1
- package/dist/commands/asa/campaigns/create.js +0 -2
- package/dist/commands/asa/campaigns/update.d.ts +0 -1
- package/dist/commands/asa/campaigns/update.js +1 -5
- package/dist/commands/attribution/dimensions.d.ts +1 -0
- package/dist/commands/attribution/dimensions.js +2 -0
- package/dist/commands/attribution/metrics.d.ts +1 -0
- package/dist/commands/attribution/metrics.js +2 -0
- package/dist/commands/attribution/report.d.ts +1 -0
- package/dist/commands/attribution/report.js +2 -0
- package/dist/commands/attribution/values.d.ts +1 -0
- package/dist/commands/attribution/values.js +2 -0
- package/dist/commands/flows/config/get.js +3 -2
- package/dist/commands/flows/config/update.js +3 -2
- package/dist/commands/flows/config/validate.js +3 -2
- package/dist/commands/flows/create.js +2 -2
- package/dist/commands/flows/get.js +3 -2
- package/dist/commands/flows/list.js +3 -2
- package/dist/commands/flows/media/upload.js +2 -2
- package/dist/commands/flows/publish.js +3 -2
- package/dist/commands/flows/update.js +3 -2
- package/dist/commands/paywalls/create.js +2 -2
- package/dist/commands/paywalls/get.js +3 -2
- package/dist/commands/paywalls/list.js +3 -2
- package/dist/commands/paywalls/placements.js +3 -2
- package/dist/commands/paywalls/update.js +3 -2
- package/dist/commands/placements/create.js +2 -2
- package/dist/commands/placements/get.js +3 -2
- package/dist/commands/placements/list.js +3 -2
- package/dist/commands/placements/update.js +3 -2
- package/dist/commands/products/create.js +2 -2
- package/dist/commands/products/get.js +3 -2
- package/dist/commands/products/list.js +3 -2
- package/dist/commands/products/update.js +3 -2
- package/dist/commands/segments/get.js +3 -2
- package/dist/commands/segments/list.js +3 -2
- package/dist/lib/asa-flags.js +1 -3
- package/dist/lib/flags.d.ts +0 -3
- package/dist/lib/flags.js +0 -13
- package/dist/sdk/attribution/catalog.d.ts +51 -0
- package/dist/sdk/attribution/catalog.js +6 -0
- package/dist/sdk/attribution/errors.d.ts +10 -0
- package/dist/sdk/attribution/errors.js +43 -0
- package/dist/sdk/attribution/index.d.ts +30 -0
- package/dist/sdk/attribution/index.js +33 -0
- package/dist/sdk/attribution/report.d.ts +75 -0
- package/dist/sdk/attribution/report.js +81 -0
- package/dist/sdk/attribution/resource.d.ts +30 -0
- package/dist/sdk/attribution/resource.js +51 -0
- package/dist/sdk/attribution/values.d.ts +39 -0
- package/dist/sdk/attribution/values.js +21 -0
- package/oclif.manifest.json +714 -459
- package/package.json +4 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { RevenueBasis } from './report.js';
|
|
2
|
+
import type { Issue } from '../core/errors.js';
|
|
3
|
+
/** The values a dimension takes over a day range: what a report filter can be given. */
|
|
4
|
+
export type ValuesInput = {
|
|
5
|
+
appId: string;
|
|
6
|
+
dateFrom: string;
|
|
7
|
+
dateTo: string;
|
|
8
|
+
dimension: string;
|
|
9
|
+
revenueBasis?: RevenueBasis | undefined;
|
|
10
|
+
};
|
|
11
|
+
type ValuesRequest = {
|
|
12
|
+
app_id: string;
|
|
13
|
+
date_from: string;
|
|
14
|
+
date_to: string;
|
|
15
|
+
dimension: string;
|
|
16
|
+
revenue_basis?: RevenueBasis;
|
|
17
|
+
};
|
|
18
|
+
/** An item of a dimension whose catalog identity is `value`. */
|
|
19
|
+
export type ValuesItemByValue = {
|
|
20
|
+
/** null for rows the backend could not attribute to any value. */
|
|
21
|
+
value: null | string;
|
|
22
|
+
};
|
|
23
|
+
/** An item of a dimension whose catalog identity is `id`: an entity of one ad network. */
|
|
24
|
+
export type ValuesItemById = {
|
|
25
|
+
channel: null | string;
|
|
26
|
+
id: null | string;
|
|
27
|
+
name: null | string;
|
|
28
|
+
};
|
|
29
|
+
export type ValuesData = {
|
|
30
|
+
dimension: string;
|
|
31
|
+
items: (ValuesItemById | ValuesItemByValue)[];
|
|
32
|
+
};
|
|
33
|
+
export type ValuesMeta = {
|
|
34
|
+
query: Record<string, unknown>;
|
|
35
|
+
};
|
|
36
|
+
/** Whether the dimension exists is the catalog's knowledge, so the backend checks that. */
|
|
37
|
+
export declare const validateValues: (input: ValuesInput) => Issue[];
|
|
38
|
+
export declare const toValuesRequest: (input: ValuesInput) => ValuesRequest;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { validateDateRange } from './report.js';
|
|
2
|
+
/** Whether the dimension exists is the catalog's knowledge, so the backend checks that. */
|
|
3
|
+
export const validateValues = (input) => {
|
|
4
|
+
const issues = validateDateRange(input);
|
|
5
|
+
if (input.dimension.trim() === '') {
|
|
6
|
+
issues.push({ message: 'must not be empty', path: 'dimension' });
|
|
7
|
+
}
|
|
8
|
+
return issues;
|
|
9
|
+
};
|
|
10
|
+
export const toValuesRequest = (input) => {
|
|
11
|
+
const body = {
|
|
12
|
+
app_id: input.appId,
|
|
13
|
+
date_from: input.dateFrom,
|
|
14
|
+
date_to: input.dateTo,
|
|
15
|
+
dimension: input.dimension,
|
|
16
|
+
};
|
|
17
|
+
if (input.revenueBasis !== undefined) {
|
|
18
|
+
body.revenue_basis = input.revenueBasis;
|
|
19
|
+
}
|
|
20
|
+
return body;
|
|
21
|
+
};
|