@uappi/public-sdk 1.2.7 → 1.2.8

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.
@@ -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,6 +1,6 @@
1
1
  {
2
2
  "name": "@uappi/public-sdk",
3
- "version": "1.2.7",
3
+ "version": "1.2.8",
4
4
  "description": "Pacotes públicos para desenvolvimento do ecossistema Uappi",
5
5
  "main": "main.ts",
6
6
  "scripts": {