@datadog/mobile-react-native-code-push 3.0.3 → 3.1.0

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.
@@ -0,0 +1,3 @@
1
+ import type { DdFlagsType } from './types';
2
+ export declare const DdFlags: DdFlagsType;
3
+ //# sourceMappingURL=DdFlags.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DdFlags.d.ts","sourceRoot":"","sources":["../../../../../../core/src/flags/DdFlags.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,WAAW,EAAsB,MAAM,SAAS,CAAC;AA2C/D,eAAO,MAAM,OAAO,EAAE,WAGrB,CAAC"}
@@ -0,0 +1,114 @@
1
+ import type { JsonValue, EvaluationContext, FlagDetails } from './types';
2
+ export declare class FlagsClient {
3
+ private nativeFlags;
4
+ private clientName;
5
+ private evaluationContext;
6
+ private flagsCache;
7
+ constructor(clientName?: string);
8
+ /**
9
+ * Sets the evaluation context for the client.
10
+ *
11
+ * Should be called before evaluating any flags. Otherwise, the client will fall back to serving default flag values.
12
+ *
13
+ * Throws an error if there is an error setting the evaluation context and logs an error message.
14
+ *
15
+ * @param context The evaluation context to associate with the current client.
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * const flagsClient = DdFlags.getClient();
20
+ *
21
+ * await flagsClient.setEvaluationContext({
22
+ * targetingKey: 'user-123',
23
+ * attributes: {
24
+ * favoriteFruit: 'apple'
25
+ * }
26
+ * });
27
+ *
28
+ * const flagValue = flagsClient.getBooleanValue('new-feature', false);
29
+ * ```
30
+ */
31
+ setEvaluationContext: (context: EvaluationContext) => Promise<void>;
32
+ private track;
33
+ private getDetails;
34
+ /**
35
+ * Evaluate a boolean feature flag with detailed evaluation information.
36
+ *
37
+ * @param key The key of the flag to evaluate.
38
+ * @param defaultValue Fallback value for when flag evaluation fails, flag is not found, or the client does not have an evaluation context set.
39
+ */
40
+ getBooleanDetails: (key: string, defaultValue: boolean) => FlagDetails<boolean>;
41
+ /**
42
+ * Evaluate a string feature flag with detailed evaluation information.
43
+ *
44
+ * @param key The key of the flag to evaluate.
45
+ * @param defaultValue Fallback value for when flag evaluation fails, flag is not found, or the client does not have an evaluation context set.
46
+ */
47
+ getStringDetails: (key: string, defaultValue: string) => FlagDetails<string>;
48
+ /**
49
+ * Evaluate a number feature flag with detailed evaluation information.
50
+ *
51
+ * @param key The key of the flag to evaluate.
52
+ * @param defaultValue Fallback value for when flag evaluation fails, flag is not found, or the client does not have an evaluation context set.
53
+ */
54
+ getNumberDetails: (key: string, defaultValue: number) => FlagDetails<number>;
55
+ /**
56
+ * Evaluate a JSON feature flag with detailed evaluation information.
57
+ *
58
+ * Even though the `defaultValue` is typed as `JsonValue`, the flag value should be a valid JSON object.
59
+ * Please use other typed methods to evaluate flags with primitive values.
60
+ *
61
+ * @param key The key of the flag to evaluate.
62
+ * @param defaultValue Fallback value for when flag evaluation fails, flag is not found, or the client does not have an evaluation context set.
63
+ */
64
+ getObjectDetails: <T extends JsonValue>(key: string, defaultValue: T) => FlagDetails<T>;
65
+ /**
66
+ * Evaluate a boolean feature flag value.
67
+ *
68
+ * @param key The key of the flag to evaluate.
69
+ * @param defaultValue Fallback value for when flag evaluation fails, flag is not found, or the client does not have an evaluation context set.
70
+ *
71
+ * @example
72
+ * ```ts
73
+ * const isNewFeatureEnabled = flagsClient.getBooleanValue('new-feature-enabled', false);
74
+ * ```
75
+ */
76
+ getBooleanValue: (key: string, defaultValue: boolean) => boolean;
77
+ /**
78
+ * Evaluate a string feature flag value.
79
+ *
80
+ * @param key The key of the flag to evaluate.
81
+ * @param defaultValue Fallback value for when flag evaluation fails, flag is not found, or the client does not have an evaluation context set.
82
+ *
83
+ * @example
84
+ * ```ts
85
+ * const appTheme = flagsClient.getStringValue('app-theme', 'light');
86
+ * ```
87
+ */
88
+ getStringValue: (key: string, defaultValue: string) => string;
89
+ /**
90
+ * Evaluate a number feature flag value.
91
+ *
92
+ * @param key The key of the flag to evaluate.
93
+ * @param defaultValue Fallback value for when flag evaluation fails, flag is not found, or the client does not have an evaluation context set.
94
+ *
95
+ * @example
96
+ * ```ts
97
+ * const ctaButtonSize = flagsClient.getNumberValue('cta-button-size', 16);
98
+ * ```
99
+ */
100
+ getNumberValue: (key: string, defaultValue: number) => number;
101
+ /**
102
+ * Evaluate an object feature flag value.
103
+ *
104
+ * @param key The key of the flag to evaluate.
105
+ * @param defaultValue Fallback value for when flag evaluation fails, flag is not found, or the client does not have an evaluation context set.
106
+ *
107
+ * @example
108
+ * ```ts
109
+ * const pageCalloutOptions = flagsClient.getObjectValue('page-callout', { color: 'purple', text: 'Woof!' });
110
+ * ```
111
+ */
112
+ getObjectValue: <T extends JsonValue>(key: string, defaultValue: T) => T;
113
+ }
114
+ //# sourceMappingURL=FlagsClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FlagsClient.d.ts","sourceRoot":"","sources":["../../../../../../core/src/flags/FlagsClient.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEzE,qBAAa,WAAW;IAEpB,OAAO,CAAC,WAAW,CACN;IAEb,OAAO,CAAC,UAAU,CAAS;IAE3B,OAAO,CAAC,iBAAiB,CAA4C;IAErE,OAAO,CAAC,UAAU,CAAsC;gBAE5C,UAAU,GAAE,MAAkB;IAI1C;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,oBAAoB,YACP,iBAAiB,KAC3B,QAAQ,IAAI,CAAC,CAuBd;IAEF,OAAO,CAAC,KAAK,CAkBX;IAEF,OAAO,CAAC,UAAU,CAkDhB;IAEF;;;;;OAKG;IACH,iBAAiB,QACR,MAAM,gBACG,OAAO,KACtB,YAAY,OAAO,CAAC,CAErB;IAEF;;;;;OAKG;IACH,gBAAgB,QACP,MAAM,gBACG,MAAM,KACrB,YAAY,MAAM,CAAC,CAEpB;IAEF;;;;;OAKG;IACH,gBAAgB,QACP,MAAM,gBACG,MAAM,KACrB,YAAY,MAAM,CAAC,CAEpB;IAEF;;;;;;;;OAQG;IACH,gBAAgB,6BACP,MAAM,qCAIb;IAEF;;;;;;;;;;OAUG;IACH,eAAe,QAAS,MAAM,gBAAgB,OAAO,KAAG,OAAO,CAE7D;IAEF;;;;;;;;;;OAUG;IACH,cAAc,QAAS,MAAM,gBAAgB,MAAM,KAAG,MAAM,CAE1D;IAEF;;;;;;;;;;OAUG;IACH,cAAc,QAAS,MAAM,gBAAgB,MAAM,KAAG,MAAM,CAE1D;IAEF;;;;;;;;;;OAUG;IACH,cAAc,6BAA8B,MAAM,wBAEhD;CACL"}
@@ -0,0 +1,14 @@
1
+ import type { EvaluationContext } from './types';
2
+ export interface FlagCacheEntry {
3
+ key: string;
4
+ value: unknown;
5
+ allocationKey: string;
6
+ variationKey: string;
7
+ variationType: string;
8
+ variationValue: string;
9
+ reason: string;
10
+ doLog: boolean;
11
+ extraLogging: Record<string, unknown>;
12
+ }
13
+ export declare const processEvaluationContext: (context: EvaluationContext) => EvaluationContext;
14
+ //# sourceMappingURL=internal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../../../../core/src/flags/internal.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,iBAAiB,EAAkB,MAAM,SAAS,CAAC;AAEjE,MAAM,WAAW,cAAc;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,OAAO,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACzC;AAED,eAAO,MAAM,wBAAwB,YACxB,iBAAiB,KAC3B,iBAqCF,CAAC"}
@@ -0,0 +1,202 @@
1
+ import type { FlagsClient } from './FlagsClient';
2
+ export interface DdFlagsType {
3
+ /**
4
+ * Enables the Datadog Flags feature in your application.
5
+ *
6
+ * Call this method after initializing the Datadog SDK to enable feature flag evaluation.
7
+ * This method must be called before creating any `FlagsClient` instances via `DdFlags.getClient()`.
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * import { DdSdkReactNativeConfiguration, DdSdkReactNative, DdFlags } from '@datadog/mobile-react-native';
12
+ *
13
+ * // Initialize the Datadog SDK.
14
+ * await DdSdkReactNative.initialize(...);
15
+ *
16
+ * // Optinal flags configuration object.
17
+ * const flagsConfig = {
18
+ * customFlagsEndpoint: 'https://flags.example.com'
19
+ * };
20
+ *
21
+ * // Enable the feature.
22
+ * await DdFlags.enable(flagsConfig);
23
+ *
24
+ * // Retrieve the client and access feature flags.
25
+ * const flagsClient = DdFlags.getClient();
26
+ * const flagValue = await flagsClient.getBooleanValue('new-feature', false);
27
+ * ```
28
+ *
29
+ * @param configuration Configuration options for the Datadog Flags feature.
30
+ */
31
+ enable: (configuration?: FlagsConfiguration) => Promise<void>;
32
+ /**
33
+ * Returns a `FlagsClient` instance for further feature flag evaluation.
34
+ *
35
+ * For most applications, you would need only one client. If you need multiple clients,
36
+ * you can retrieve a couple of clients with different names.
37
+ *
38
+ * @param clientName An optional name of the client to retrieve. Defaults to `'default'`.
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * const flagsClient = DdFlags.getClient();
43
+ *
44
+ * // Set the evaluation context.
45
+ * await flagsClient.setEvaluationContext({
46
+ * targetingKey: 'user-123',
47
+ * attributes: {
48
+ * favoriteFruit: 'apple'
49
+ * }
50
+ * });
51
+ *
52
+ * const flagValue = flagsClient.getBooleanValue('new-feature', false);
53
+ * ```
54
+ */
55
+ getClient: (clientName?: string) => FlagsClient;
56
+ }
57
+ /**
58
+ * Configuration options for the Datadog Flags feature.
59
+ */
60
+ export interface FlagsConfiguration {
61
+ /**
62
+ * Custom server URL for retrieving flag assignments.
63
+ *
64
+ * The provided value should only include the base URL, and the endpoint will be appended automatically.
65
+ * For example, if you provide 'https://flags.example.com', the SDK will use 'https://flags.example.com/precompute-assignments'.
66
+ *
67
+ * If not set, the SDK uses the default Datadog Flags endpoint for the configured site.
68
+ *
69
+ * @default undefined
70
+ */
71
+ customFlagsEndpoint?: string;
72
+ /**
73
+ * Custom server URL for sending Flags exposure data.
74
+ *
75
+ * The provided value should only include the base URL, and the endpoint will be appended automatically.
76
+ * For example, if you provide 'https://flags.example.com', the SDK will use 'https://flags.example.com/api/v2/exposures'.
77
+ *
78
+ * If not set, the SDK uses the default Datadog Flags exposure endpoint.
79
+ *
80
+ * @default undefined
81
+ */
82
+ customExposureEndpoint?: string;
83
+ /**
84
+ * Enables exposure logging via the dedicated exposures intake endpoint.
85
+ *
86
+ * When enabled, flag evaluation events are sent to the exposures endpoint for analytics and monitoring.
87
+ *
88
+ * @default true
89
+ */
90
+ trackExposures?: boolean;
91
+ /**
92
+ * Enables the RUM integration.
93
+ *
94
+ * When enabled, flag evaluation events are sent to RUM for correlation with user sessions.
95
+ *
96
+ * @default true
97
+ */
98
+ rumIntegrationEnabled?: boolean;
99
+ }
100
+ export type PrimitiveValue = null | boolean | string | number;
101
+ type JsonObject = {
102
+ [key: string]: JsonValue;
103
+ };
104
+ type JsonArray = JsonValue[];
105
+ /**
106
+ * Represents a JSON node value.
107
+ */
108
+ export type JsonValue = PrimitiveValue | JsonObject | JsonArray;
109
+ /**
110
+ * Context information used for feature flag targeting and evaluation.
111
+ *
112
+ * Contains user or session information that determines which flag variations are returned.
113
+ * This typically includes a unique identifier (targeting key) and optional custom attributes
114
+ * for granular targeting.
115
+ *
116
+ * Note: Evaluation context should be set before flag evaluations.
117
+ *
118
+ * @example
119
+ * ```ts
120
+ * const context: EvaluationContext = {
121
+ * targetingKey: "user-123",
122
+ * attributes: {
123
+ * "region": "US",
124
+ * "plan": "premium",
125
+ * "age": 25,
126
+ * "beta_tester": true
127
+ * }
128
+ * };
129
+ *
130
+ * await client.setEvaluationContext(context);
131
+ * ```
132
+ */
133
+ export interface EvaluationContext {
134
+ /**
135
+ * The unique identifier used for targeting this user or session.
136
+ *
137
+ * This is typically a user ID, session ID, or device ID. The targeting key is used
138
+ * by the feature flag service to determine which variation to serve.
139
+ *
140
+ * Pass an empty string if you don't have such an identifier.
141
+ */
142
+ targetingKey: string;
143
+ /**
144
+ * Custom attributes for more granular targeting.
145
+ *
146
+ * Attributes can include user properties, session data, or any other contextual information
147
+ * needed for flag evaluation rules.
148
+ *
149
+ * NOTE: Nested object values are not supported and will be dropped from the evaluation context.
150
+ */
151
+ attributes?: Record<string, PrimitiveValue>;
152
+ }
153
+ /**
154
+ * An error that occurs during feature flag evaluation.
155
+ *
156
+ * Indicates why a flag evaluation may have failed or returned a default value.
157
+ */
158
+ type FlagErrorCode = 'PROVIDER_NOT_READY' | 'FLAG_NOT_FOUND' | 'PARSE_ERROR' | 'TYPE_MISMATCH';
159
+ /**
160
+ * Detailed information about a feature flag evaluation.
161
+ *
162
+ * Contains both the evaluated flag value and metadata about the evaluation,
163
+ * including the variant served, evaluation reason, and any errors that occurred.
164
+ */
165
+ export interface FlagDetails<T> {
166
+ /**
167
+ * The feature flag key that was evaluated.
168
+ */
169
+ key: string;
170
+ /**
171
+ * The evaluated flag value.
172
+ *
173
+ * Falls back to the default value if evaluation failed.
174
+ */
175
+ value: T;
176
+ /**
177
+ * The reason why this evaluation result was returned.
178
+ */
179
+ reason: string;
180
+ /**
181
+ * The variant key for the evaluated flag.
182
+ *
183
+ * Variants identify which version of the flag was served.
184
+ */
185
+ variant?: string;
186
+ /**
187
+ * The allocation key for the evaluated flag.
188
+ *
189
+ * Useful for debugging targeting rules.
190
+ */
191
+ allocationKey?: string;
192
+ /**
193
+ * Code of the error that occurred during evaluation, if any.
194
+ */
195
+ errorCode?: FlagErrorCode;
196
+ /**
197
+ * Detailed explanation of the occurred error, if any.
198
+ */
199
+ errorMessage?: string;
200
+ }
201
+ export {};
202
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../core/src/flags/types.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,MAAM,WAAW,WAAW;IACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,MAAM,EAAE,CAAC,aAAa,CAAC,EAAE,kBAAkB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9D;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,SAAS,EAAE,CAAC,UAAU,CAAC,EAAE,MAAM,KAAK,WAAW,CAAC;CACnD;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B;;;;;;;;;OASG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;;;;;;OASG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;;OAMG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACnC;AAED,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAC9D,KAAK,UAAU,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAC/C,KAAK,SAAS,GAAG,SAAS,EAAE,CAAC;AAC7B;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,cAAc,GAAG,UAAU,GAAG,SAAS,CAAC;AAEhE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;;;;;;OAOG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;CAC/C;AAED;;;;GAIG;AACH,KAAK,aAAa,GACZ,oBAAoB,GACpB,gBAAgB,GAChB,aAAa,GACb,eAAe,CAAC;AAEtB;;;;;GAKG;AACH,MAAM,WAAW,WAAW,CAAC,CAAC;IAC1B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,KAAK,EAAE,CAAC,CAAC;IACT;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB"}
@@ -16,6 +16,9 @@ import { ProxyConfiguration, ProxyType } from './config/types/ProxyConfiguration
16
16
  import { SdkVerbosity } from './config/types/SdkVerbosity';
17
17
  import { TrackingConsent } from './config/types/TrackingConsent';
18
18
  import { BatchProcessingLevel, BatchSize, InitializationMode, UploadFrequency, VitalsUpdateFrequency } from './config/types';
19
+ import { DdFlags } from './flags/DdFlags';
20
+ import type { FlagsClient } from './flags/FlagsClient';
21
+ import type { FlagsConfiguration, FlagDetails, EvaluationContext, PrimitiveValue } from './flags/types';
19
22
  import { DdLogs } from './logs/DdLogs';
20
23
  import { DdRum } from './rum/DdRum';
21
24
  import { DdBabelInteractionTracking } from './rum/instrumentation/interactionTracking/DdBabelInteractionTracking';
@@ -33,6 +36,6 @@ import { ErrorSource, FeatureOperationFailure } from './types';
33
36
  import { DefaultTimeProvider } from './utils/time-provider/DefaultTimeProvider';
34
37
  import type { Timestamp } from './utils/time-provider/TimeProvider';
35
38
  import { TimeProvider } from './utils/time-provider/TimeProvider';
36
- export { DatadogProvider, DatadogProviderConfiguration, FileBasedConfiguration, InitializationMode, DdLogs, DdTrace, DdRum, RumActionType, ErrorSource, FeatureOperationFailure, CoreConfiguration, RumConfiguration, LogsConfiguration, TraceConfiguration, DdSdkReactNative, DdSdk, InternalLog, ProxyConfiguration, ProxyType, TrackingConsent, SdkVerbosity, VitalsUpdateFrequency, PropagatorType, UploadFrequency, BatchSize, BatchProcessingLevel, TimeProvider, DefaultTimeProvider, DATADOG_GRAPH_QL_OPERATION_TYPE_HEADER, DATADOG_GRAPH_QL_OPERATION_NAME_HEADER, DATADOG_GRAPH_QL_VARIABLES_HEADER, TracingIdType, TracingIdFormat, DatadogTracingIdentifier, DatadogTracingContext, DdBabelInteractionTracking, __ddExtractText };
37
- export type { Timestamp, FirstPartyHost, AutoInstrumentationConfiguration, PartialInitializationConfiguration, CoreConfigurationOptions, RumConfigurationOptions, LogsConfigurationOptions, TraceConfigurationOptions };
39
+ export { DatadogProvider, DatadogProviderConfiguration, FileBasedConfiguration, InitializationMode, DdLogs, DdFlags, DdTrace, DdRum, RumActionType, ErrorSource, FeatureOperationFailure, CoreConfiguration, RumConfiguration, LogsConfiguration, TraceConfiguration, DdSdkReactNative, DdSdk, InternalLog, ProxyConfiguration, ProxyType, TrackingConsent, SdkVerbosity, VitalsUpdateFrequency, PropagatorType, UploadFrequency, BatchSize, BatchProcessingLevel, TimeProvider, DefaultTimeProvider, DATADOG_GRAPH_QL_OPERATION_TYPE_HEADER, DATADOG_GRAPH_QL_OPERATION_NAME_HEADER, DATADOG_GRAPH_QL_VARIABLES_HEADER, TracingIdType, TracingIdFormat, DatadogTracingIdentifier, DatadogTracingContext, DdBabelInteractionTracking, __ddExtractText };
40
+ export type { Timestamp, FirstPartyHost, AutoInstrumentationConfiguration, PartialInitializationConfiguration, CoreConfigurationOptions, RumConfigurationOptions, LogsConfigurationOptions, TraceConfigurationOptions, FlagsConfiguration, FlagsClient, EvaluationContext, PrimitiveValue, FlagDetails };
38
41
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../core/src/index.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD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ACL,aAAa,EACb,WAAW,EACX,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,KAAK,EACL,WAAW,EACX,kBAAkB,EAClB,SAAS,EACT,eAAe,EACf,YAAY,EACZ,qBAAqB,EACrB,cAAc,EACd,eAAe,EACf,SAAS,EACT,oBAAoB,EACpB,YAAY,EACZ,mBAAmB,EACnB,sCAAsC,EACtC,sCAAsC,EACtC,iCAAiC,EACjC,aAAa,EACb,eAAe,EACf,wBAAwB,EACxB,qBAAqB,EACrB,0BAA0B,EAC1B,eAAe,EAClB,CAAC;AACF,YAAY,EACR,SAAS,EACT,cAAc,EACd,gCAAgC,EAChC,kCAAkC,EAClC,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,EACxB,yBAAyB,EACzB,kBAAkB,EAClB,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,WAAW,EACd,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import type { DdSdkNativeConfiguration } from './config/features/CoreConfigurationNative';
2
+ import type { Spec as NativeDdFlags } from './specs/NativeDdFlags';
2
3
  import type { Spec as NativeDdLogs } from './specs/NativeDdLogs';
3
4
  import type { Spec as NativeDdRum } from './specs/NativeDdRum';
4
5
  import type { Spec as NativeDdSdk } from './specs/NativeDdSdk';
@@ -15,6 +16,10 @@ export type DdNativeLogsType = NativeDdLogs;
15
16
  * The entry point to use Datadog's Trace feature.
16
17
  */
17
18
  export type DdNativeTraceType = NativeDdTrace;
19
+ /**
20
+ * The entry point to use Datadog's Flags feature.
21
+ */
22
+ export type DdNativeFlagsType = NativeDdFlags;
18
23
  /**
19
24
  * The entry point to initialize Datadog's features.
20
25
  */
@@ -1 +1 @@
1
- {"version":3,"file":"nativeModulesTypes.d.ts","sourceRoot":"","sources":["../../../../../core/src/nativeModulesTypes.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAC1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ACpB,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;;;;;;;OAQG;IACH,QAAQ,CACJ,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,WAAW,EACnB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,GAAG,SAAS,GAChC,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB"}
@@ -0,0 +1,15 @@
1
+ import type { TurboModule } from 'react-native';
2
+ import type { FlagCacheEntry } from '../flags/internal';
3
+ /**
4
+ * Do not import this Spec directly, use DdNativeFlagsType instead.
5
+ */
6
+ export interface Spec extends TurboModule {
7
+ readonly enable: (configuration: Object) => Promise<void>;
8
+ readonly setEvaluationContext: (clientName: string, targetingKey: string, attributes: Object) => Promise<{
9
+ [key: string]: FlagCacheEntry;
10
+ }>;
11
+ readonly trackEvaluation: (clientName: string, key: string, rawFlag: Object, targetingKey: string, attributes: Object) => Promise<void>;
12
+ }
13
+ declare const _default: Spec | null;
14
+ export default _default;
15
+ //# sourceMappingURL=NativeDdFlags.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeDdFlags.d.ts","sourceRoot":"","sources":["../../../../../../core/src/specs/NativeDdFlags.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,IAAK,SAAQ,WAAW;IACrC,QAAQ,CAAC,MAAM,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1D,QAAQ,CAAC,oBAAoB,EAAE,CAC3B,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,KACjB,OAAO,CAAC;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAAA;KAAE,CAAC,CAAC;IAEhD,QAAQ,CAAC,eAAe,EAAE,CACtB,UAAU,EAAE,MAAM,EAClB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,KACjB,OAAO,CAAC,IAAI,CAAC,CAAC;CACtB;;AAGD,wBAAwD"}
@@ -1,2 +1,2 @@
1
- export declare const version = "3.0.3";
1
+ export declare const version = "3.1.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datadog/mobile-react-native-code-push",
3
- "version": "3.0.3",
3
+ "version": "3.1.0",
4
4
  "description": "A client-side React Native module to interact with Appcenter Codepush and Datadog",
5
5
  "keywords": [
6
6
  "datadog",
@@ -38,7 +38,7 @@
38
38
  "prepare": "rm -rf lib && yarn bob build"
39
39
  },
40
40
  "devDependencies": {
41
- "@datadog/mobile-react-native": "3.0.3",
41
+ "@datadog/mobile-react-native": "3.1.0",
42
42
  "@testing-library/react-native": "7.0.2",
43
43
  "react-native-builder-bob": "0.26.0",
44
44
  "react-native-code-push": "7.1.0"
@@ -78,5 +78,5 @@
78
78
  ]
79
79
  ]
80
80
  },
81
- "gitHead": "8bdc86971007bead67d1d72f6454677fce07a89f"
81
+ "gitHead": "fbb259da0575dba36fb1bb163aa21462d204940c"
82
82
  }