@adobe/aio-commerce-lib-auth 0.3.2 → 0.3.3
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 +7 -0
- package/dist/es/index.d.ts +16 -16
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @adobe/aio-commerce-lib-auth
|
|
2
2
|
|
|
3
|
+
## 0.3.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`412af7a`](https://github.com/adobe/aio-commerce-sdk/commit/412af7a0b0a40f24b6fddafc7de76807de800724)]:
|
|
8
|
+
- @adobe/aio-commerce-lib-core@0.4.1
|
|
9
|
+
|
|
3
10
|
## 0.3.2
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
package/dist/es/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* governing permissions and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import * as
|
|
15
|
+
import * as valibot21 from "valibot";
|
|
16
16
|
import { InferOutput } from "valibot";
|
|
17
17
|
|
|
18
18
|
//#region source/lib/ims-auth/schema.d.ts
|
|
@@ -22,23 +22,23 @@ declare const IMS_AUTH_ENV: {
|
|
|
22
22
|
readonly STAGE: "stage";
|
|
23
23
|
};
|
|
24
24
|
/** Validation schema for IMS auth environment values. */
|
|
25
|
-
declare const ImsAuthEnvSchema:
|
|
25
|
+
declare const ImsAuthEnvSchema: valibot21.EnumSchema<{
|
|
26
26
|
readonly PROD: "prod";
|
|
27
27
|
readonly STAGE: "stage";
|
|
28
28
|
}, undefined>;
|
|
29
29
|
/** Defines the schema to validate the necessary parameters for the IMS auth service. */
|
|
30
|
-
declare const ImsAuthParamsSchema:
|
|
31
|
-
readonly clientId:
|
|
32
|
-
readonly clientSecrets:
|
|
33
|
-
readonly technicalAccountId:
|
|
34
|
-
readonly technicalAccountEmail:
|
|
35
|
-
readonly imsOrgId:
|
|
36
|
-
readonly environment:
|
|
30
|
+
declare const ImsAuthParamsSchema: valibot21.ObjectSchema<{
|
|
31
|
+
readonly clientId: valibot21.SchemaWithPipe<readonly [valibot21.StringSchema<`Expected a string value for the IMS auth parameter ${string}`>, valibot21.NonEmptyAction<string, `Expected a non-empty string value for the IMS auth parameter ${string}`>]>;
|
|
32
|
+
readonly clientSecrets: valibot21.SchemaWithPipe<readonly [valibot21.SchemaWithPipe<readonly [valibot21.ArraySchema<valibot21.StringSchema<undefined>, `Expected a string array value for the IMS auth parameter ${string}`>]>, valibot21.MinLengthAction<string[], 1, "Expected at least one client secret for IMS auth">]>;
|
|
33
|
+
readonly technicalAccountId: valibot21.SchemaWithPipe<readonly [valibot21.StringSchema<`Expected a string value for the IMS auth parameter ${string}`>, valibot21.NonEmptyAction<string, `Expected a non-empty string value for the IMS auth parameter ${string}`>]>;
|
|
34
|
+
readonly technicalAccountEmail: valibot21.SchemaWithPipe<readonly [valibot21.StringSchema<"Expected a string value for the IMS auth parameter technicalAccountEmail">, valibot21.EmailAction<string, "Expected a valid email format for technicalAccountEmail">]>;
|
|
35
|
+
readonly imsOrgId: valibot21.SchemaWithPipe<readonly [valibot21.StringSchema<`Expected a string value for the IMS auth parameter ${string}`>, valibot21.NonEmptyAction<string, `Expected a non-empty string value for the IMS auth parameter ${string}`>]>;
|
|
36
|
+
readonly environment: valibot21.SchemaWithPipe<readonly [valibot21.OptionalSchema<valibot21.EnumSchema<{
|
|
37
37
|
readonly PROD: "prod";
|
|
38
38
|
readonly STAGE: "stage";
|
|
39
39
|
}, undefined>, "prod">]>;
|
|
40
|
-
readonly context:
|
|
41
|
-
readonly scopes:
|
|
40
|
+
readonly context: valibot21.SchemaWithPipe<readonly [valibot21.OptionalSchema<valibot21.StringSchema<undefined>, undefined>]>;
|
|
41
|
+
readonly scopes: valibot21.SchemaWithPipe<readonly [valibot21.SchemaWithPipe<readonly [valibot21.ArraySchema<valibot21.StringSchema<undefined>, `Expected a string array value for the IMS auth parameter ${string}`>]>, valibot21.MinLengthAction<string[], 1, "Expected at least one scope for IMS auth">]>;
|
|
42
42
|
}, undefined>;
|
|
43
43
|
/** Defines the parameters for the IMS auth service. */
|
|
44
44
|
type ImsAuthParams = InferOutput<typeof ImsAuthParamsSchema>;
|
|
@@ -147,11 +147,11 @@ type HttpMethodInput = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
|
147
147
|
* The schema for the Commerce Integration parameters.
|
|
148
148
|
* This is used to validate the parameters passed to the Commerce Integration provider.
|
|
149
149
|
*/
|
|
150
|
-
declare const IntegrationAuthParamsSchema:
|
|
151
|
-
readonly consumerKey:
|
|
152
|
-
readonly consumerSecret:
|
|
153
|
-
readonly accessToken:
|
|
154
|
-
readonly accessTokenSecret:
|
|
150
|
+
declare const IntegrationAuthParamsSchema: valibot21.NonOptionalSchema<valibot21.ObjectSchema<{
|
|
151
|
+
readonly consumerKey: valibot21.SchemaWithPipe<readonly [valibot21.StringSchema<`Expected a string value for the Commerce Integration parameter ${string}`>, valibot21.NonEmptyAction<string, `Expected a non-empty string value for the Commerce Integration parameter ${string}`>]>;
|
|
152
|
+
readonly consumerSecret: valibot21.SchemaWithPipe<readonly [valibot21.StringSchema<`Expected a string value for the Commerce Integration parameter ${string}`>, valibot21.NonEmptyAction<string, `Expected a non-empty string value for the Commerce Integration parameter ${string}`>]>;
|
|
153
|
+
readonly accessToken: valibot21.SchemaWithPipe<readonly [valibot21.StringSchema<`Expected a string value for the Commerce Integration parameter ${string}`>, valibot21.NonEmptyAction<string, `Expected a non-empty string value for the Commerce Integration parameter ${string}`>]>;
|
|
154
|
+
readonly accessTokenSecret: valibot21.SchemaWithPipe<readonly [valibot21.StringSchema<`Expected a string value for the Commerce Integration parameter ${string}`>, valibot21.NonEmptyAction<string, `Expected a non-empty string value for the Commerce Integration parameter ${string}`>]>;
|
|
155
155
|
}, undefined>, undefined>;
|
|
156
156
|
/** Defines the parameters required for Commerce Integration authentication. */
|
|
157
157
|
type IntegrationAuthParams = InferOutput<typeof IntegrationAuthParamsSchema>;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@adobe/aio-commerce-lib-auth",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"author": "Adobe Inc.",
|
|
5
|
-
"version": "0.3.
|
|
5
|
+
"version": "0.3.3",
|
|
6
6
|
"private": false,
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=20 <=24"
|
|
@@ -51,13 +51,13 @@
|
|
|
51
51
|
"ansis": "^4.1.0",
|
|
52
52
|
"oauth-1.0a": "^2.2.6",
|
|
53
53
|
"valibot": "^1.1.0",
|
|
54
|
-
"@adobe/aio-commerce-lib-core": "0.4.
|
|
54
|
+
"@adobe/aio-commerce-lib-core": "0.4.1"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@aio-commerce-sdk/config-tsdown": "1.0.0",
|
|
58
57
|
"@aio-commerce-sdk/config-typedoc": "1.0.0",
|
|
59
|
-
"@aio-commerce-sdk/config-
|
|
60
|
-
"@aio-commerce-sdk/config-vitest": "1.0.0"
|
|
58
|
+
"@aio-commerce-sdk/config-tsdown": "1.0.0",
|
|
59
|
+
"@aio-commerce-sdk/config-vitest": "1.0.0",
|
|
60
|
+
"@aio-commerce-sdk/config-typescript": "1.0.0"
|
|
61
61
|
},
|
|
62
62
|
"sideEffects": false,
|
|
63
63
|
"scripts": {
|