@uappi/public-sdk 1.2.7 → 1.2.9
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/.husky/pre-push +1 -0
- package/eslint.config.mjs +19 -0
- package/modules/Api/endpoints/CustomerComposable.ts +1 -1
- package/modules/Api/endpoints/UpsellComposable.ts +0 -1
- package/modules/Api/types/context/api-config.types.ts +0 -1
- package/modules/Tracking/endpoints/CustomerComposable.ts +7 -4
- package/modules/Tracking/publicApiTracking.ts +0 -1
- package/package.json +18 -2
- package/shims.d.ts +5 -0
- package/tsconfig.json +17 -0
package/.husky/pre-push
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
npm run prepush
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import tseslint from 'typescript-eslint';
|
|
2
|
+
|
|
3
|
+
export default tseslint.config(
|
|
4
|
+
{
|
|
5
|
+
ignores: ['node_modules/**', 'package-lock.json'],
|
|
6
|
+
},
|
|
7
|
+
...tseslint.configs.recommended,
|
|
8
|
+
{
|
|
9
|
+
files: ['**/*.ts'],
|
|
10
|
+
rules: {
|
|
11
|
+
'@typescript-eslint/consistent-type-imports': [
|
|
12
|
+
'error',
|
|
13
|
+
{ prefer: 'type-imports', fixStyle: 'separate-type-imports' },
|
|
14
|
+
],
|
|
15
|
+
'@typescript-eslint/no-unused-vars': 'off',
|
|
16
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
);
|
|
@@ -42,7 +42,7 @@ import type {
|
|
|
42
42
|
AddProductToWishlistRequest,
|
|
43
43
|
RequestSendMFA
|
|
44
44
|
} from '../types';
|
|
45
|
-
import { SalesChannelByEmailResponse } from '../types/endpoints/customer/customer.interfaces';
|
|
45
|
+
import { type SalesChannelByEmailResponse } from '../types/endpoints/customer/customer.interfaces';
|
|
46
46
|
|
|
47
47
|
export function detail(
|
|
48
48
|
options?: Pick<
|
|
@@ -11,6 +11,7 @@ import type { CustomerLead } from '../types';
|
|
|
11
11
|
import type {
|
|
12
12
|
ApiParams,
|
|
13
13
|
CustomerConditionFields,
|
|
14
|
+
CustomerFields,
|
|
14
15
|
CustomerSortFields,
|
|
15
16
|
SigninCustomerByDocument,
|
|
16
17
|
SigninCustomerByEmail,
|
|
@@ -27,11 +28,13 @@ export function detail(
|
|
|
27
28
|
'condition' | 'fields' | 'order'
|
|
28
29
|
>,
|
|
29
30
|
) {
|
|
31
|
+
|
|
32
|
+
let fields: Array<CustomerFields> = ['addresses', 'flags'];
|
|
33
|
+
|
|
34
|
+
if (options?.fields) fields = [...options.fields, ...fields];
|
|
35
|
+
|
|
30
36
|
return publicApi.customer
|
|
31
|
-
.detail({
|
|
32
|
-
...options,
|
|
33
|
-
fields: ['addresses', 'flags'],
|
|
34
|
-
})
|
|
37
|
+
.detail({ ...options, fields })
|
|
35
38
|
.then(data => {
|
|
36
39
|
customerProfileAction(data);
|
|
37
40
|
|
package/package.json
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uappi/public-sdk",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.9",
|
|
4
4
|
"description": "Pacotes públicos para desenvolvimento do ecossistema Uappi",
|
|
5
5
|
"main": "main.ts",
|
|
6
6
|
"scripts": {
|
|
7
|
+
"lint": "eslint .",
|
|
8
|
+
"type-check": "tsc --noEmit",
|
|
9
|
+
"prepush": "npm run lint && npm run type-check",
|
|
10
|
+
"prepublishOnly": "npm run lint && npm run type-check",
|
|
11
|
+
"prepare": "husky",
|
|
7
12
|
"publish": "npm publish --access public"
|
|
8
13
|
},
|
|
9
14
|
"repository": {
|
|
@@ -23,5 +28,16 @@
|
|
|
23
28
|
"bugs": {
|
|
24
29
|
"url": "https://gitlab.com/agenciawebart/uappi/plataforma/frontend/packages/public/composables/use-public-api/issues"
|
|
25
30
|
},
|
|
26
|
-
"homepage": "https://gitlab.com/agenciawebart/uappi/plataforma/frontend/packages/public/composables/use-public-api#readme"
|
|
31
|
+
"homepage": "https://gitlab.com/agenciawebart/uappi/plataforma/frontend/packages/public/composables/use-public-api#readme",
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"axios": "^1.13.2"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"eslint": "^10.7.0",
|
|
37
|
+
"husky": "^9.1.7",
|
|
38
|
+
"typescript": "^6.0.3",
|
|
39
|
+
"typescript-eslint": "^8.63.0",
|
|
40
|
+
"vite": "^8.1.4",
|
|
41
|
+
"vue": "^3.5.39"
|
|
42
|
+
}
|
|
27
43
|
}
|
package/shims.d.ts
ADDED
package/tsconfig.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2021",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"moduleResolution": "Bundler",
|
|
6
|
+
"lib": ["ES2021", "DOM"],
|
|
7
|
+
"types": ["vite/client"],
|
|
8
|
+
"strict": false,
|
|
9
|
+
"verbatimModuleSyntax": true,
|
|
10
|
+
"isolatedModules": true,
|
|
11
|
+
"esModuleInterop": true,
|
|
12
|
+
"skipLibCheck": true,
|
|
13
|
+
"resolveJsonModule": true,
|
|
14
|
+
"noEmit": true
|
|
15
|
+
},
|
|
16
|
+
"include": ["main.ts", "modules/**/*.ts", "components/**/*.ts", "shims.d.ts"]
|
|
17
|
+
}
|