nextemos 5.9.1 → 5.9.2

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.
@@ -3,19 +3,28 @@ import { IResponse } from "./response";
3
3
  export interface IAddressSourceDataResponse extends IResponse {
4
4
  data: IAddressSourceData[];
5
5
  }
6
+ export interface IGetAddressSourceDataResponse extends IResponse {
7
+ data: IAddressSourceData;
8
+ }
6
9
  export interface IAddressSchemaResponse extends IResponse {
7
10
  data: IAddressField[];
8
11
  }
9
12
  export interface IAddressSourceData {
10
13
  id?: number;
11
- addressPartTypeId?: number;
14
+ addressPartTypeId?: string | AddressPartType;
12
15
  value?: string;
16
+ longitude?: number;
17
+ latitude?: number;
13
18
  parentId?: number;
19
+ code?: string;
20
+ isApproved?: boolean;
14
21
  integrationCode?: string;
22
+ zipCode?: string;
23
+ order?: number;
15
24
  }
16
25
  export interface IAddress {
17
26
  addressTypeId: number;
18
- addressType: 'Corporate' | 'Individual' | 'Other';
27
+ addressType: "Corporate" | "Individual" | "Other";
19
28
  createdAtUtc: string;
20
29
  createdBy: number;
21
30
  id: number;
@@ -1,5 +1,5 @@
1
- import { IAddressSchemaResponse, IAddressSourceDataResponse, IApiResponse, IRequestBase, IRequestInit, IService } from '../..';
2
- export type TAddressPartTypeId = 'Continent' | 'Country' | 'GoverningDistrict' | 'City' | 'County' | 'Town' | 'Neighbourhood' | 'PostalCode' | 'Street' | 'Complex' | 'Apartment' | 'Description' | 'TelephoneNumber' | 'Name' | 'Surname' | 'CorporationName' | 'MobilePhone';
1
+ import { IAddressSchemaResponse, IAddressSourceDataResponse, IApiResponse, IGetAddressSourceDataResponse, IRequestBase, IRequestInit, IService } from "../..";
2
+ export type TAddressPartTypeId = "Continent" | "Country" | "GoverningDistrict" | "City" | "County" | "Town" | "Neighbourhood" | "PostalCode" | "Street" | "Complex" | "Apartment" | "Description" | "TelephoneNumber" | "Name" | "Surname" | "CorporationName" | "MobilePhone";
3
3
  export interface IAddressSourceDataRequest extends IRequestBase {
4
4
  addressPartTypeId: TAddressPartTypeId;
5
5
  value?: string;
@@ -7,11 +7,15 @@ export interface IAddressSourceDataRequest extends IRequestBase {
7
7
  }
8
8
  export interface IAddressSchemaRequest extends IRequestBase {
9
9
  name?: string;
10
- inputTypeId?: 'DataBasedFreeText' | 'FreeText' | 'Data';
10
+ inputTypeId?: "DataBasedFreeText" | "FreeText" | "Data";
11
11
  addressPartTypeId?: TAddressPartTypeId;
12
12
  TenantId?: string;
13
13
  }
14
+ export interface IGetAddressSourceDataRequest extends IRequestBase {
15
+ id: number;
16
+ }
14
17
  export interface IAddressService extends IService {
15
18
  AddressSourceData: (data: IAddressSourceDataRequest, options?: IRequestInit) => Promise<IApiResponse<IAddressSourceDataResponse>>;
16
19
  AddressSchema: (data: IAddressSchemaRequest, options?: IRequestInit) => Promise<IApiResponse<IAddressSchemaResponse>>;
20
+ GetAddressSourceData: (data: IGetAddressSourceDataRequest, options?: IRequestInit) => Promise<IApiResponse<IGetAddressSourceDataResponse>>;
17
21
  }
@@ -55,6 +55,9 @@ exports.AddressService = {
55
55
  AddressSourceData: (data, options) => __awaiter(void 0, void 0, void 0, function* () {
56
56
  return (0, __1.fetchRequest)().get(exports.AddressService.Url(urls_1.default.Address.AddressSourceData.All, options, data === null || data === void 0 ? void 0 : data.language), Object.assign(Object.assign({}, options), { params: data }));
57
57
  }),
58
+ GetAddressSourceData: (data, options) => __awaiter(void 0, void 0, void 0, function* () {
59
+ return (0, __1.fetchRequest)().get(exports.AddressService.Url(urls_1.default.Address.AddressSourceData.GetAddressSourceData, options, data === null || data === void 0 ? void 0 : data.language), Object.assign(Object.assign({}, options), { params: data }));
60
+ }),
58
61
  AddressSchema: (data, options) => __awaiter(void 0, void 0, void 0, function* () {
59
62
  return (0, __1.fetchRequest)().get(exports.AddressService.Url(urls_1.default.Address.AddressSchemaForTenants.All, options, data === null || data === void 0 ? void 0 : data.language), Object.assign(Object.assign({}, options), { params: data }));
60
63
  }),
@@ -118,6 +118,7 @@ declare const _default: {
118
118
  Address: {
119
119
  AddressSourceData: {
120
120
  All: string;
121
+ GetAddressSourceData: string;
121
122
  };
122
123
  AddressSchemaForTenants: {
123
124
  All: string;
@@ -129,6 +129,7 @@ exports.default = {
129
129
  Address: {
130
130
  AddressSourceData: {
131
131
  All: "/{language}/AddressSourceData/v1/All",
132
+ GetAddressSourceData: "/{language}/AddressSourceData/v1",
132
133
  },
133
134
  AddressSchemaForTenants: {
134
135
  All: "/{language}/AddressSchemaForTenants/v1/All",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nextemos",
3
- "version": "5.9.1",
3
+ "version": "5.9.2",
4
4
  "description": "For helpers and hooks used in NextJS projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "./dist/index.d.ts",