nextemos 4.5.6 → 4.5.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.
@@ -43,27 +43,25 @@ const fetchRequest = () => {
43
43
  console.log(`Fetch Request: ${method} ${apiURL}`, requestOptions);
44
44
  try {
45
45
  const response = yield fetch(apiURL.toString(), requestOptions);
46
- // Headers nesnesini Object'e dönüştürme
47
- const headers = {};
48
- if (response === null || response === void 0 ? void 0 : response.headers) {
49
- response.headers.forEach((value, name) => {
50
- headers[name] = value;
51
- });
52
- }
53
46
  if (!response.ok) {
54
47
  const errorDetail = yield response.text();
55
48
  console.log("Fetch Error: ", {
56
49
  api: apiURL,
57
50
  status: response.status,
58
51
  errorMessage: errorDetail,
59
- headers
60
52
  });
61
53
  return {
62
54
  status: response.status,
63
55
  errorMessage: errorDetail,
64
- headers
65
56
  };
66
57
  }
58
+ // Headers nesnesini Object'e dönüştürme
59
+ const headers = {};
60
+ if (response === null || response === void 0 ? void 0 : response.headers) {
61
+ response.headers.forEach((value, name) => {
62
+ headers[name] = value;
63
+ });
64
+ }
67
65
  let responseModel;
68
66
  if (Object.keys(headers).length > 0 &&
69
67
  headers.hasOwnProperty('content-type') &&
@@ -34,19 +34,19 @@ export interface IAddress {
34
34
  }
35
35
  export interface IAddressPart {
36
36
  addressPartTypeId: number;
37
- addressPartTypeName: string;
38
- referenceId: number;
39
- inputType: string;
40
- valueText: string;
41
- valueId: number;
42
- valueIntegrationCode: string;
37
+ addressPartTypeName?: string;
38
+ referenceId?: number;
39
+ inputType?: string;
40
+ valueText?: string;
41
+ valueId?: number;
42
+ valueIntegrationCode?: string;
43
43
  }
44
44
  export interface IAddressField {
45
45
  id: number;
46
46
  name: string;
47
47
  addressPartTypeId: number;
48
48
  inputTypeId: number;
49
- fieldTypeId?: number;
49
+ fieldTypeId: number;
50
50
  isRequired: boolean;
51
51
  order: number;
52
52
  tenantId: string;
@@ -7,6 +7,7 @@ export interface IRequestOptions extends RequestInit {
7
7
  }
8
8
  export interface IRequestInit extends RequestInit {
9
9
  useClient?: boolean;
10
+ CaptchaToken?: string;
10
11
  }
11
12
  export interface IApiResponse<T = any> {
12
13
  data?: T;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nextemos",
3
- "version": "4.5.6",
3
+ "version": "4.5.8",
4
4
  "description": "For helpers and hooks used in NextJS projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "./dist/index.d.ts",