@adobe/aio-commerce-lib-auth 0.8.1 → 1.0.1
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/CHANGELOG.md +21 -0
- package/README.md +1 -4
- package/bin/cli.mjs +24 -0
- package/dist/cjs/chunk-DS2yp5vX.cjs +48 -0
- package/dist/cjs/commands/index.cjs +176 -84
- package/dist/cjs/commands/index.d.cts +14 -0
- package/dist/cjs/index.cjs +765 -1
- package/dist/cjs/index.d.cts +35 -1
- package/dist/es/commands/index.d.mts +14 -0
- package/dist/es/commands/index.mjs +171 -84
- package/dist/es/index.d.mts +35 -3
- package/dist/es/index.mjs +751 -1
- package/package.json +20 -8
- package/dist/cjs/chunk-YD6SZpHm.cjs +0 -1
package/dist/cjs/index.d.cts
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2026 Adobe. All rights reserved.
|
|
5
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
7
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
10
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
11
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12
|
+
* governing permissions and limitations under the License.
|
|
13
|
+
*/
|
|
14
|
+
|
|
1
15
|
import * as v from "valibot";
|
|
2
16
|
import { InferOutput } from "valibot";
|
|
3
17
|
|
|
@@ -241,6 +255,26 @@ declare function getImsAuthProvider(authParams: ImsAuthParams): {
|
|
|
241
255
|
* ```
|
|
242
256
|
*/
|
|
243
257
|
declare function assertImsAuthParams(config: Record<PropertyKey, unknown>): asserts config is ImsAuthParams;
|
|
258
|
+
/**
|
|
259
|
+
* Resolves an {@link ImsAuthParams} from the given App Builder action inputs.
|
|
260
|
+
* @param params The App Builder action inputs to resolve the IMS authentication parameters from.
|
|
261
|
+
* @throws {CommerceSdkValidationError} If the parameters are invalid and cannot be resolved.
|
|
262
|
+
*
|
|
263
|
+
* @example
|
|
264
|
+
* ```typescript
|
|
265
|
+
* // Some App Builder runtime action that needs IMS authentication
|
|
266
|
+
* export function main(params) {
|
|
267
|
+
* const imsAuthProvider = getImsAuthProvider(resolveImsAuthParams(params));
|
|
268
|
+
*
|
|
269
|
+
* // Get headers for API requests
|
|
270
|
+
* const headers = await authProvider.getHeaders();
|
|
271
|
+
* const response = await fetch('https://api.adobe.io/some-endpoint', {
|
|
272
|
+
* headers: await authProvider.getHeaders()
|
|
273
|
+
* });
|
|
274
|
+
* }
|
|
275
|
+
* ```
|
|
276
|
+
*/
|
|
277
|
+
declare function resolveImsAuthParams(params: Record<string, unknown>): ImsAuthParams;
|
|
244
278
|
//#endregion
|
|
245
279
|
//#region source/lib/integration-auth/schema.d.ts
|
|
246
280
|
/**
|
|
@@ -386,4 +420,4 @@ declare function resolveAuthParams(params: Record<string, unknown>): {
|
|
|
386
420
|
accessTokenSecret: string;
|
|
387
421
|
};
|
|
388
422
|
//#endregion
|
|
389
|
-
export { type ForwardedImsAuthSource, type ImsAuthEnv, type ImsAuthHeaders, type ImsAuthParams, type ImsAuthProvider, type IntegrationAuthParams, type IntegrationAuthProvider, assertImsAuthParams, assertIntegrationAuthParams, forwardImsAuthProvider, getForwardedImsAuthProvider, getImsAuthProvider, getIntegrationAuthProvider, isImsAuthProvider, isIntegrationAuthProvider, resolveAuthParams };
|
|
423
|
+
export { type ForwardedImsAuthSource, type ImsAuthEnv, type ImsAuthHeaders, type ImsAuthParams, type ImsAuthProvider, type IntegrationAuthParams, type IntegrationAuthProvider, assertImsAuthParams, assertIntegrationAuthParams, forwardImsAuthProvider, getForwardedImsAuthProvider, getImsAuthProvider, getIntegrationAuthProvider, isImsAuthProvider, isIntegrationAuthProvider, resolveAuthParams, resolveImsAuthParams };
|
|
@@ -1 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*
|
|
4
|
+
* Copyright 2026 Adobe. All rights reserved.
|
|
5
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
7
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
10
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
11
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12
|
+
* governing permissions and limitations under the License.
|
|
13
|
+
*/
|
|
14
|
+
|
|
1
15
|
export { };
|