/
inputs.ts
105 lines (98 loc) · 2.65 KB
/
inputs.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
import { Adapty } from '../sdk/adapty';
/**
* Log levels for the SDK
*
* @remarks
* Logging is performed on a native side.
* So you are expected to watch logs in Xcode or Android Studio.
*/
export const LogLevel = Object.freeze({
/**
* Logs any additional information that may be useful during debugging,
* such as function calls, API queries, etc.
*/
VERBOSE: 'verbose',
/**
* Logs only errors
*/
ERROR: 'ERROR',
/**
* Logs messages from the SDK
* that do not cause critical errors,
* but are worth paying attention to
*/
WARN: 'warn',
/**
* Logs various information messages,
* such as those that log the lifecycle of various modules
*/
INFO: 'info',
});
export type LogLevel = typeof LogLevel[keyof typeof LogLevel];
export const AttributionSource = Object.freeze({
Adjust: 'Adjust',
AppsFlyer: 'AppsFlyer',
AppleSearchAds: 'AppleSearchAds',
Branch: 'Branch',
Custom: 'Custom',
});
export type AttributionSource =
typeof AttributionSource[keyof typeof AttributionSource];
export const FetchPolicy = Object.freeze({
/**
* The function will try
* to download the products anyway,
* although the `introductoryOfferEligibility` values may be unknown.
*/
DEFAULT: 'default',
/**
* The Adapty SDK will wait for the validation
* and the validation itself, only then the products will be returned.
*/
WAIT_FOR_RECEIPT_VALIDATION: 'wait_for_receipt_validation',
});
export type FetchPolicy = typeof FetchPolicy[keyof typeof FetchPolicy];
/**
* Describes optional parameters for the {@link Adapty.activate} method.
*/
export interface ActivateParamsInput {
/**
* Turn it on if you handle purchases and subscription status yourself
* and use Adapty for sending subscription events and analytics
*
* @defaultValue `false`
*/
observerMode?: boolean;
/**
* User identifier in your system
*
* @remarks
* If none of the parameters are passed, the SDK will generate an ID
* and use it for a current device.
* Use your own ID:
* 1. If you want to support a cross-device experience
* 2. If you have your own authentication system,
* and you want to associate adapty profile with your user
*/
customerUserId?: string;
/**
* Log level for the SDK
*
* @remarks
* Logging is performed on a native side.
* So you are expected to watch logs in Xcode or Android Studio.
*
* @defaultValue `VERBOSE`
*/
logLevel?: LogLevel;
/**
* Locks methods threads until the SDK is ready.
* @defaultValue `false`
*/
lockMethodsUntilReady?: boolean;
}
export interface GetPaywallProductsParamsInput {
ios?: {
fetchPolicy?: FetchPolicy;
};
}