@webex/webex-core 3.12.0 → 3.13.0-next.10
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/.repo-context.json +653 -0
- package/.sdd/manifest.json +615 -0
- package/AGENTS.md +209 -0
- package/README.md +6 -3
- package/dist/config.js +46 -1
- package/dist/config.js.map +1 -1
- package/dist/credentials-config.js +21 -1
- package/dist/credentials-config.js.map +1 -1
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/dist/interceptors/auth.js +10 -1
- package/dist/interceptors/auth.js.map +1 -1
- package/dist/interceptors/catalog-url.js +87 -0
- package/dist/interceptors/catalog-url.js.map +1 -0
- package/dist/interceptors/payload-transformer.js +25 -4
- package/dist/interceptors/payload-transformer.js.map +1 -1
- package/dist/lib/batcher.js +23 -7
- package/dist/lib/batcher.js.map +1 -1
- package/dist/lib/credentials/credentials.js +117 -5
- package/dist/lib/credentials/credentials.js.map +1 -1
- package/dist/lib/credentials/token.js +23 -9
- package/dist/lib/credentials/token.js.map +1 -1
- package/dist/lib/domains.js +90 -0
- package/dist/lib/domains.js.map +1 -0
- package/dist/lib/interceptors/service.js +5 -1
- package/dist/lib/interceptors/service.js.map +1 -1
- package/dist/lib/services/catalog-auth.js +114 -0
- package/dist/lib/services/catalog-auth.js.map +1 -0
- package/dist/lib/services/service-catalog.js +108 -18
- package/dist/lib/services/service-catalog.js.map +1 -1
- package/dist/lib/services/services.js +287 -40
- package/dist/lib/services/services.js.map +1 -1
- package/dist/lib/services-v2/service-catalog.js +14 -13
- package/dist/lib/services-v2/service-catalog.js.map +1 -1
- package/dist/lib/services-v2/services-v2.js +294 -44
- package/dist/lib/services-v2/services-v2.js.map +1 -1
- package/dist/lib/static-asset-loader.js +153 -0
- package/dist/lib/static-asset-loader.js.map +1 -0
- package/dist/plugins/logger.js +1 -1
- package/dist/webex-core.js +11 -3
- package/dist/webex-core.js.map +1 -1
- package/docs/adr/index.md +32 -0
- package/docs/architecture.md +298 -0
- package/docs/getting-started.md +96 -0
- package/docs/index.md +55 -0
- package/docs/specs/README.md +76 -0
- package/package.json +13 -13
- package/schemas/repo-context.schema.json +796 -0
- package/src/config.js +50 -1
- package/src/credentials-config.js +22 -0
- package/src/docs/README.md +732 -0
- package/src/index.js +2 -0
- package/src/interceptors/auth.js +14 -1
- package/src/interceptors/catalog-url.js +66 -0
- package/src/interceptors/docs/README.md +658 -0
- package/src/interceptors/payload-transformer.js +23 -1
- package/src/lib/batcher.js +25 -10
- package/src/lib/credentials/credentials.js +106 -4
- package/src/lib/credentials/docs/README.md +847 -0
- package/src/lib/credentials/token.js +15 -8
- package/src/lib/domains.ts +94 -0
- package/src/lib/interceptors/service.js +11 -3
- package/src/lib/services/catalog-auth.js +112 -0
- package/src/lib/services/docs/README.md +737 -0
- package/src/lib/services/service-catalog.js +112 -16
- package/src/lib/services/services.js +274 -24
- package/src/lib/services-v2/docs/README.md +751 -0
- package/src/lib/services-v2/service-catalog.ts +16 -12
- package/src/lib/services-v2/services-v2.ts +282 -26
- package/src/lib/static-asset-loader.ts +128 -0
- package/src/lib/storage/docs/README.md +646 -0
- package/src/webex-core.js +8 -0
- package/test/fixtures/activation-email.ts +22 -0
- package/test/integration/spec/credentials/credentials.js +3 -1
- package/test/integration/spec/credentials/token.js +8 -0
- package/test/integration/spec/services/service-catalog.js +5 -0
- package/test/integration/spec/services/services.js +183 -112
- package/test/integration/spec/services-v2/services-v2.js +169 -98
- package/test/integration/spec/unit-browser/token.js +7 -2
- package/test/unit/spec/credentials/credentials.js +326 -3
- package/test/unit/spec/credentials/token.js +259 -6
- package/test/unit/spec/interceptors/auth.js +92 -1
- package/test/unit/spec/interceptors/catalog-url.js +224 -0
- package/test/unit/spec/interceptors/payload-transformer.js +119 -1
- package/test/unit/spec/lib/batcher.js +56 -0
- package/test/unit/spec/services/interceptors/service.js +35 -1
- package/test/unit/spec/services/service-catalog.js +368 -11
- package/test/unit/spec/services/services.js +783 -10
- package/test/unit/spec/services-v2/service-catalog.ts +134 -11
- package/test/unit/spec/services-v2/services-v2.ts +825 -10
- package/test/unit/spec/static-asset-loader.ts +224 -0
- package/test/unit/spec/webex-core.js +77 -1
package/src/config.js
CHANGED
|
@@ -17,6 +17,13 @@ export default {
|
|
|
17
17
|
trackingIdSuffix: '',
|
|
18
18
|
AlternateLogger: undefined,
|
|
19
19
|
credentials: new CredentialsConfig(),
|
|
20
|
+
/**
|
|
21
|
+
* Explicitly selects the Webex environment. When omitted, the environment is inferred from the
|
|
22
|
+
* U2C discovery URL.
|
|
23
|
+
*
|
|
24
|
+
* @type {'integration'|'production'|undefined}
|
|
25
|
+
*/
|
|
26
|
+
environment: undefined,
|
|
20
27
|
fedramp: process.env.ENABLE_FEDRAMP || false,
|
|
21
28
|
services: {
|
|
22
29
|
/**
|
|
@@ -27,6 +34,33 @@ export default {
|
|
|
27
34
|
*/
|
|
28
35
|
useUserOnboardingServiceForActivations: false,
|
|
29
36
|
|
|
37
|
+
/**
|
|
38
|
+
* When true, requests the U2C catalog override.
|
|
39
|
+
*
|
|
40
|
+
* @type {boolean}
|
|
41
|
+
*/
|
|
42
|
+
useCatalogOverride: false,
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* When true, skips fetching the preauth catalog during initialization
|
|
46
|
+
* while the user is unauthenticated (no existing token). The catalog is
|
|
47
|
+
* expected to be collected manually later instead. When false (default),
|
|
48
|
+
* the preauth catalog is collected automatically during init.
|
|
49
|
+
*
|
|
50
|
+
* @type {boolean}
|
|
51
|
+
*/
|
|
52
|
+
skipPreauthCatalogOnUnauthenticated: false,
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Maximum time (in milliseconds) to wait for the initial service catalog
|
|
56
|
+
* collection when `waitForCatalogInit` is enabled, before letting
|
|
57
|
+
* `services.ready` (and therefore `webex.ready`) fire anyway. Prevents a
|
|
58
|
+
* hung catalog request from leaving the app on a permanent spinner.
|
|
59
|
+
*
|
|
60
|
+
* @type {number}
|
|
61
|
+
*/
|
|
62
|
+
catalogInitTimeout: 15000,
|
|
63
|
+
|
|
30
64
|
/**
|
|
31
65
|
* A list of services that are available prior to catalog collection.
|
|
32
66
|
*
|
|
@@ -50,7 +84,7 @@ export default {
|
|
|
50
84
|
*
|
|
51
85
|
* @type {string}
|
|
52
86
|
*/
|
|
53
|
-
u2c: process.env.U2C_SERVICE_URL || 'https://u2c.
|
|
87
|
+
u2c: process.env.U2C_SERVICE_URL || 'https://u2c.svc.webex.com/u2c/api/v1',
|
|
54
88
|
},
|
|
55
89
|
|
|
56
90
|
/**
|
|
@@ -60,6 +94,16 @@ export default {
|
|
|
60
94
|
*/
|
|
61
95
|
validateDomains: true,
|
|
62
96
|
|
|
97
|
+
/**
|
|
98
|
+
* When true, enables the CatalogUrlInterceptor which validates that all
|
|
99
|
+
* outbound request URLs are in the service catalog or allowed domains.
|
|
100
|
+
* This prevents SSRF attacks where attacker-controlled URLs could be
|
|
101
|
+
* sent to the SDK.
|
|
102
|
+
*
|
|
103
|
+
* @type {boolean}
|
|
104
|
+
*/
|
|
105
|
+
validateCatalogUrls: false,
|
|
106
|
+
|
|
63
107
|
/**
|
|
64
108
|
* services that don't need auth validation
|
|
65
109
|
*/
|
|
@@ -91,6 +135,11 @@ export default {
|
|
|
91
135
|
cacheU2C: false,
|
|
92
136
|
},
|
|
93
137
|
payloadTransformer: {
|
|
138
|
+
/**
|
|
139
|
+
* When true, inbound payload transforms run at most once for the same successful response object.
|
|
140
|
+
* This supports request flows that pass a response through more than one interceptor pipeline.
|
|
141
|
+
*/
|
|
142
|
+
skipRepeatedInboundTransforms: false,
|
|
94
143
|
predicates: [],
|
|
95
144
|
transforms: [],
|
|
96
145
|
},
|
|
@@ -110,6 +110,15 @@ const CredentialsConfig = AmpState.extend({
|
|
|
110
110
|
* @type {string}
|
|
111
111
|
*/
|
|
112
112
|
cisService: ['string', false, 'webex'],
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Whether the client is permitted to upgrade its refresh token scope
|
|
116
|
+
* Should only be set to true if client has extended feature 'refresh-token-scopes-upgrade-allowed'
|
|
117
|
+
* If true, the refresh token scope will be requested to be increased or decreased on refresh,
|
|
118
|
+
* to match the configured scope.
|
|
119
|
+
* @type {boolean}
|
|
120
|
+
*/
|
|
121
|
+
canUpgradeScope: ['boolean', false, false],
|
|
113
122
|
},
|
|
114
123
|
|
|
115
124
|
derived: {
|
|
@@ -195,6 +204,19 @@ const CredentialsConfig = AmpState.extend({
|
|
|
195
204
|
cache: false,
|
|
196
205
|
},
|
|
197
206
|
|
|
207
|
+
/**
|
|
208
|
+
* URL used to initiate the IdBroker third-party (social provider)
|
|
209
|
+
* sign-in flow.
|
|
210
|
+
* @type {string}
|
|
211
|
+
*/
|
|
212
|
+
thirdPartyLoginUrl: {
|
|
213
|
+
deps: ['idbroker.url'],
|
|
214
|
+
fn() {
|
|
215
|
+
return `${this.idbroker.url}/idb/ThirdPartyLogin`;
|
|
216
|
+
},
|
|
217
|
+
cache: false,
|
|
218
|
+
},
|
|
219
|
+
|
|
198
220
|
/**
|
|
199
221
|
* Set password URL
|
|
200
222
|
* @type {string}
|