@adobe/exc-app 1.3.5 → 1.4.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.
- package/appapi.d.ts +1 -1
- package/appapi.js +1 -1
- package/appapi.js.map +1 -1
- package/featureflags.d.ts +33 -9
- package/featureflags.js +22 -4
- package/featureflags.js.map +1 -1
- package/package.json +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/appapi.d.ts
CHANGED
|
@@ -74,7 +74,7 @@ export declare enum AppIds {
|
|
|
74
74
|
GENSTUDIO = "GenStudio",
|
|
75
75
|
HEADLESS_CMS = "hcms",
|
|
76
76
|
JOURNEY_OPTIMIZER = "cjm-home",
|
|
77
|
-
JOURNEY_OPTIMIZER_B2B_EDITION = "
|
|
77
|
+
JOURNEY_OPTIMIZER_B2B_EDITION = "sapphireHome",
|
|
78
78
|
JOURNEY_ORCHESTRATION = "journeys",
|
|
79
79
|
LAUNCH_IMPLEMENT = "implement",
|
|
80
80
|
MARKETO = "marketo",
|
package/appapi.js
CHANGED
|
@@ -80,7 +80,7 @@ var AppIds;
|
|
|
80
80
|
AppIds["GENSTUDIO"] = "GenStudio";
|
|
81
81
|
AppIds["HEADLESS_CMS"] = "hcms";
|
|
82
82
|
AppIds["JOURNEY_OPTIMIZER"] = "cjm-home";
|
|
83
|
-
AppIds["JOURNEY_OPTIMIZER_B2B_EDITION"] = "
|
|
83
|
+
AppIds["JOURNEY_OPTIMIZER_B2B_EDITION"] = "sapphireHome";
|
|
84
84
|
AppIds["JOURNEY_ORCHESTRATION"] = "journeys";
|
|
85
85
|
AppIds["LAUNCH_IMPLEMENT"] = "implement";
|
|
86
86
|
AppIds["MARKETO"] = "marketo";
|
package/appapi.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appapi.js","sourceRoot":"","sources":["appapi.ts"],"names":[],"mappings":";AAAA;;;;;;;;;4EAS4E;;;AAE5E;;;;;;;;;;;;;;;;;;;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}
|
package/featureflags.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* written permission of Adobe.
|
|
10
10
|
**************************************************************************/
|
|
11
11
|
/**
|
|
12
|
-
* The Feature Flags API provides feature flag data from LaunchDarkly.
|
|
12
|
+
* The Feature Flags API provides feature flag data from LaunchDarkly and Floodgate.
|
|
13
13
|
*
|
|
14
14
|
* To consume this API, add the following import to your code.
|
|
15
15
|
*
|
|
@@ -29,18 +29,31 @@
|
|
|
29
29
|
* const featureFlags = await featureFlags.get(['cjm', 'experience-platform']);
|
|
30
30
|
* ```
|
|
31
31
|
*
|
|
32
|
+
* Feature flags can also be requested from Floodgate by:
|
|
33
|
+
* - including the provider in the options
|
|
34
|
+
* - including the clientIds in the options (instead of projectIds)
|
|
35
|
+
* If no provider is specified, the default provider is LaunchDarkly.
|
|
36
|
+
*
|
|
37
|
+
* ```typescript
|
|
38
|
+
* import featureFlags, {PROVIDERS} from '@adobe/exc-app/featureflags';
|
|
39
|
+
*
|
|
40
|
+
* const floodgateFlags = await featureFlags().get({clientIds: ['unified-shell'], provider: PROVIDERS.FLOODGATE});
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
32
43
|
* All feature flags can be requested using the key '*'
|
|
33
44
|
* ```typescript
|
|
34
|
-
* import featureFlags from '@adobe/exc-app/featureflags';
|
|
45
|
+
* import featureFlags, {PROVIDERS} from '@adobe/exc-app/featureflags';
|
|
35
46
|
*
|
|
36
47
|
* const featureFlags = await featureFlags.get(['*']);
|
|
37
48
|
*
|
|
49
|
+
* const featureFlags = await featureFlags.get({clientIds: ['*'], provider: PROVIDERS.FLOODGATE});
|
|
50
|
+
*
|
|
38
51
|
* ```
|
|
39
52
|
* In some cases you may want to include context options that are not already
|
|
40
53
|
* included in the current app's active context. For example, requesting feature
|
|
41
54
|
* flags for a project that uses sandboxes from an app that does not.
|
|
42
55
|
*
|
|
43
|
-
* To include options in the request, pass an object with projectIds and the context options.
|
|
56
|
+
* To include options in the request, pass an object with the projectIds or clientIds and the context options.
|
|
44
57
|
*
|
|
45
58
|
* ```typescript
|
|
46
59
|
* import featureFlags from '@adobe/exc-app/featureflags';
|
|
@@ -57,6 +70,10 @@ export declare enum PROVIDERS {
|
|
|
57
70
|
FLOODGATE = "Floodgate",
|
|
58
71
|
LAUNCH_DARKLY = "Launch Darkly"
|
|
59
72
|
}
|
|
73
|
+
export declare enum SANDBOX_TYPES {
|
|
74
|
+
development = "DEVELOPMENT",
|
|
75
|
+
production = "PRODUCTION"
|
|
76
|
+
}
|
|
60
77
|
export interface FeatureFlagConfig {
|
|
61
78
|
/**
|
|
62
79
|
* If true, the feature flags will be fetched from the server and not from the cache.
|
|
@@ -85,16 +102,23 @@ export interface FeatureFlagsResponse {
|
|
|
85
102
|
export interface SandboxOptions {
|
|
86
103
|
name: string;
|
|
87
104
|
region?: string;
|
|
105
|
+
type?: SANDBOX_TYPES;
|
|
88
106
|
}
|
|
89
|
-
|
|
90
|
-
* The data object when the projects and options are sent as a message through the API.
|
|
91
|
-
*/
|
|
92
|
-
export interface GetFlagsWithOptions {
|
|
107
|
+
export type GetFlagOptions<T> = T & {
|
|
93
108
|
config?: FeatureFlagConfig;
|
|
94
|
-
projectIds: string[];
|
|
95
|
-
sandbox?: SandboxOptions;
|
|
96
109
|
provider?: PROVIDERS;
|
|
110
|
+
sandbox?: SandboxOptions;
|
|
111
|
+
};
|
|
112
|
+
export interface FloodgateOptions {
|
|
113
|
+
clientIds: string[];
|
|
97
114
|
}
|
|
115
|
+
export interface LaunchDarklyOptions {
|
|
116
|
+
projectIds: string[];
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* The data object when the projects and options are sent as a message through the API.
|
|
120
|
+
*/
|
|
121
|
+
export type GetFlagsWithOptions = GetFlagOptions<FloodgateOptions> | GetFlagOptions<LaunchDarklyOptions>;
|
|
98
122
|
/**
|
|
99
123
|
* The input parameters for the feature flags API.
|
|
100
124
|
* This should be a list of LaunchDarkly project ids to get.
|
package/featureflags.js
CHANGED
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
* written permission of Adobe.
|
|
11
11
|
**************************************************************************/
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.PROVIDERS = void 0;
|
|
13
|
+
exports.SANDBOX_TYPES = exports.PROVIDERS = void 0;
|
|
14
14
|
/**
|
|
15
|
-
* The Feature Flags API provides feature flag data from LaunchDarkly.
|
|
15
|
+
* The Feature Flags API provides feature flag data from LaunchDarkly and Floodgate.
|
|
16
16
|
*
|
|
17
17
|
* To consume this API, add the following import to your code.
|
|
18
18
|
*
|
|
@@ -32,18 +32,31 @@ exports.PROVIDERS = void 0;
|
|
|
32
32
|
* const featureFlags = await featureFlags.get(['cjm', 'experience-platform']);
|
|
33
33
|
* ```
|
|
34
34
|
*
|
|
35
|
+
* Feature flags can also be requested from Floodgate by:
|
|
36
|
+
* - including the provider in the options
|
|
37
|
+
* - including the clientIds in the options (instead of projectIds)
|
|
38
|
+
* If no provider is specified, the default provider is LaunchDarkly.
|
|
39
|
+
*
|
|
40
|
+
* ```typescript
|
|
41
|
+
* import featureFlags, {PROVIDERS} from '@adobe/exc-app/featureflags';
|
|
42
|
+
*
|
|
43
|
+
* const floodgateFlags = await featureFlags().get({clientIds: ['unified-shell'], provider: PROVIDERS.FLOODGATE});
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
35
46
|
* All feature flags can be requested using the key '*'
|
|
36
47
|
* ```typescript
|
|
37
|
-
* import featureFlags from '@adobe/exc-app/featureflags';
|
|
48
|
+
* import featureFlags, {PROVIDERS} from '@adobe/exc-app/featureflags';
|
|
38
49
|
*
|
|
39
50
|
* const featureFlags = await featureFlags.get(['*']);
|
|
40
51
|
*
|
|
52
|
+
* const featureFlags = await featureFlags.get({clientIds: ['*'], provider: PROVIDERS.FLOODGATE});
|
|
53
|
+
*
|
|
41
54
|
* ```
|
|
42
55
|
* In some cases you may want to include context options that are not already
|
|
43
56
|
* included in the current app's active context. For example, requesting feature
|
|
44
57
|
* flags for a project that uses sandboxes from an app that does not.
|
|
45
58
|
*
|
|
46
|
-
* To include options in the request, pass an object with projectIds and the context options.
|
|
59
|
+
* To include options in the request, pass an object with the projectIds or clientIds and the context options.
|
|
47
60
|
*
|
|
48
61
|
* ```typescript
|
|
49
62
|
* import featureFlags from '@adobe/exc-app/featureflags';
|
|
@@ -61,6 +74,11 @@ var PROVIDERS;
|
|
|
61
74
|
PROVIDERS["FLOODGATE"] = "Floodgate";
|
|
62
75
|
PROVIDERS["LAUNCH_DARKLY"] = "Launch Darkly";
|
|
63
76
|
})(PROVIDERS = exports.PROVIDERS || (exports.PROVIDERS = {}));
|
|
77
|
+
var SANDBOX_TYPES;
|
|
78
|
+
(function (SANDBOX_TYPES) {
|
|
79
|
+
SANDBOX_TYPES["development"] = "DEVELOPMENT";
|
|
80
|
+
SANDBOX_TYPES["production"] = "PRODUCTION";
|
|
81
|
+
})(SANDBOX_TYPES = exports.SANDBOX_TYPES || (exports.SANDBOX_TYPES = {}));
|
|
64
82
|
const Global_1 = require("./src/Global");
|
|
65
83
|
const featureFlags = {
|
|
66
84
|
get: (params) => {
|
package/featureflags.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"featureflags.js","sourceRoot":"","sources":["featureflags.ts"],"names":[],"mappings":";AAAA;;;;;;;;;4EAS4E;;;AAE5E
|
|
1
|
+
{"version":3,"file":"featureflags.js","sourceRoot":"","sources":["featureflags.ts"],"names":[],"mappings":";AAAA;;;;;;;;;4EAS4E;;;AAE5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAEH,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,oCAAuB,CAAA;IACvB,4CAA+B,CAAA;AACjC,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGpB;AAED,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,4CAA2B,CAAA;IAC3B,0CAAyB,CAAA;AAC3B,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB;AAED,yCAAqC;AAgFrC,MAAM,YAAY,GAAoB;IACpC,GAAG,EAAE,CAAC,MAAkB,EAAE,EAAE;QAC1B,OAAO,IAAA,gBAAO,EAAC,cAAc,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC/C,CAAC;CACF,CAAC;AAEF,kBAAe,YAAY,CAAC"}
|
package/package.json
CHANGED
package/version.d.ts
CHANGED
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
* then your use, modification, or distribution of it requires the prior
|
|
9
9
|
* written permission of Adobe.
|
|
10
10
|
**************************************************************************/
|
|
11
|
-
declare const EXC_APP_VERSION = "1.
|
|
11
|
+
declare const EXC_APP_VERSION = "1.4.0";
|
|
12
12
|
export default EXC_APP_VERSION;
|
package/version.js
CHANGED
|
@@ -10,6 +10,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
* then your use, modification, or distribution of it requires the prior
|
|
11
11
|
* written permission of Adobe.
|
|
12
12
|
**************************************************************************/
|
|
13
|
-
const EXC_APP_VERSION = '1.
|
|
13
|
+
const EXC_APP_VERSION = '1.4.0';
|
|
14
14
|
exports.default = EXC_APP_VERSION;
|
|
15
15
|
//# sourceMappingURL=version.js.map
|