@hectare/platform.clients.customers 1.1.33 → 1.1.35

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/index.d.ts CHANGED
@@ -1,6 +1,4 @@
1
1
  export type { AssuranceDetail } from './models/AssuranceDetail.js';
2
- export type { BusinessConnectionDetail } from './models/BusinessConnectionDetail.js';
3
- export type { BusinessConnectionsSummary } from './models/BusinessConnectionsSummary.js';
4
2
  export type { BusinessDetail } from './models/BusinessDetail.js';
5
3
  export type { BusinessUnitsDetail } from './models/BusinessUnitsDetail.js';
6
4
  export type { BusinessUnitsDetails } from './models/BusinessUnitsDetails.js';
@@ -9,11 +7,8 @@ export type { BusinessUnitSummary } from './models/BusinessUnitSummary.js';
9
7
  export type { BuyerPreferencesSchema } from './models/BuyerPreferencesSchema.js';
10
8
  export type { ChangeOwner } from './models/ChangeOwner.js';
11
9
  export type { ChangePassword } from './models/ChangePassword.js';
12
- export type { CheckBusinessConnectionRequestSchema } from './models/CheckBusinessConnectionRequestSchema.js';
13
- export type { CheckBusinessConnectionResponseSchema } from './models/CheckBusinessConnectionResponseSchema.js';
14
10
  export type { ConfirmSignup } from './models/ConfirmSignup.js';
15
11
  export type { ContactDetail } from './models/ContactDetail.js';
16
- export type { CreateBusinessConnection } from './models/CreateBusinessConnection.js';
17
12
  export type { CreateBusinessUnit } from './models/CreateBusinessUnit.js';
18
13
  export type { CreateBusinessUnits } from './models/CreateBusinessUnits.js';
19
14
  export type { CreateOrganisation } from './models/CreateOrganisation.js';
@@ -2,6 +2,7 @@ export type BusinessDetail = {
2
2
  id?: string;
3
3
  businessUnitId?: string;
4
4
  organisationId?: string;
5
+ primary?: boolean;
5
6
  location?: {
6
7
  what3words: string | null;
7
8
  address: {
@@ -21,6 +22,25 @@ export type BusinessDetail = {
21
22
  lon: number;
22
23
  } | null;
23
24
  } | null;
25
+ collectionLocation?: {
26
+ what3words: string | null;
27
+ address: {
28
+ name?: string | null;
29
+ line1: string;
30
+ line2?: string | null;
31
+ line3?: string | null;
32
+ city?: string | null;
33
+ region?: string | null;
34
+ regionISO?: string | null;
35
+ postcode: string;
36
+ countryName?: string | null;
37
+ countryISO: 'GB' | 'US' | 'ZA' | 'FR';
38
+ };
39
+ coordinates: {
40
+ lat: number;
41
+ lon: number;
42
+ } | null;
43
+ } | null;
24
44
  businessName?: string;
25
45
  name?: string;
26
46
  phone?: {
@@ -1,7 +1,7 @@
1
1
  export type BusinessUnitSummary = {
2
2
  id: string;
3
3
  name: string;
4
- type: 'farm' | 'stores' | 'region';
4
+ type?: string;
5
5
  business: string | null;
6
6
  region: string | null;
7
7
  tags: Array<string>;
@@ -2,12 +2,13 @@ export type BusinessUnitsDetail = {
2
2
  ordinal: number;
3
3
  id: string;
4
4
  name: string;
5
- type: 'farm' | 'stores' | 'region';
5
+ type: string;
6
6
  tags: Array<string>;
7
7
  business?: {
8
8
  id?: string;
9
9
  businessUnitId?: string;
10
10
  organisationId?: string;
11
+ primary?: boolean;
11
12
  location?: {
12
13
  what3words: string | null;
13
14
  address: {
@@ -27,6 +28,25 @@ export type BusinessUnitsDetail = {
27
28
  lon: number;
28
29
  } | null;
29
30
  } | null;
31
+ collectionLocation?: {
32
+ what3words: string | null;
33
+ address: {
34
+ name?: string | null;
35
+ line1: string;
36
+ line2?: string | null;
37
+ line3?: string | null;
38
+ city?: string | null;
39
+ region?: string | null;
40
+ regionISO?: string | null;
41
+ postcode: string;
42
+ countryName?: string | null;
43
+ countryISO: 'GB' | 'US' | 'ZA' | 'FR';
44
+ };
45
+ coordinates: {
46
+ lat: number;
47
+ lon: number;
48
+ } | null;
49
+ } | null;
30
50
  businessName?: string;
31
51
  name?: string;
32
52
  phone?: {
@@ -44,6 +64,4 @@ export type BusinessUnitsDetail = {
44
64
  body: 'RT' | 'SQC';
45
65
  } | null;
46
66
  };
47
- storeCount?: number;
48
- fieldCount?: number;
49
67
  };
@@ -11,12 +11,13 @@ export type BusinessUnitsDetails = {
11
11
  ordinal: number;
12
12
  id: string;
13
13
  name: string;
14
- type: 'farm' | 'stores' | 'region';
14
+ type: string;
15
15
  tags: Array<string>;
16
16
  business?: {
17
17
  id?: string;
18
18
  businessUnitId?: string;
19
19
  organisationId?: string;
20
+ primary?: boolean;
20
21
  location?: {
21
22
  what3words: string | null;
22
23
  address: {
@@ -36,6 +37,25 @@ export type BusinessUnitsDetails = {
36
37
  lon: number;
37
38
  } | null;
38
39
  } | null;
40
+ collectionLocation?: {
41
+ what3words: string | null;
42
+ address: {
43
+ name?: string | null;
44
+ line1: string;
45
+ line2?: string | null;
46
+ line3?: string | null;
47
+ city?: string | null;
48
+ region?: string | null;
49
+ regionISO?: string | null;
50
+ postcode: string;
51
+ countryName?: string | null;
52
+ countryISO: 'GB' | 'US' | 'ZA' | 'FR';
53
+ };
54
+ coordinates: {
55
+ lat: number;
56
+ lon: number;
57
+ } | null;
58
+ } | null;
39
59
  businessName?: string;
40
60
  name?: string;
41
61
  phone?: {
@@ -53,7 +73,5 @@ export type BusinessUnitsDetails = {
53
73
  body: 'RT' | 'SQC';
54
74
  } | null;
55
75
  };
56
- storeCount?: number;
57
- fieldCount?: number;
58
76
  }>;
59
77
  };
@@ -8,7 +8,7 @@ export type BusinessUnitsSummary = {
8
8
  businessUnits: Array<{
9
9
  id: string;
10
10
  name: string;
11
- type: 'farm' | 'stores' | 'region';
11
+ type?: string;
12
12
  business: string | null;
13
13
  region: string | null;
14
14
  tags: Array<string>;
@@ -1,8 +1,8 @@
1
1
  export type CreateBusinessUnit = {
2
2
  organisationId: string;
3
3
  name: string;
4
- type: 'farm' | 'stores' | 'region';
5
- business?: {
4
+ type?: string;
5
+ business: {
6
6
  location: {
7
7
  what3words: string | null;
8
8
  address: {
@@ -22,6 +22,25 @@ export type CreateBusinessUnit = {
22
22
  lon: number;
23
23
  } | null;
24
24
  } | null;
25
+ collectionLocation?: {
26
+ what3words: string | null;
27
+ address: {
28
+ name?: string | null;
29
+ line1: string;
30
+ line2?: string | null;
31
+ line3?: string | null;
32
+ city?: string | null;
33
+ region?: string | null;
34
+ regionISO?: string | null;
35
+ postcode: string;
36
+ countryName?: string | null;
37
+ countryISO: 'GB' | 'US' | 'ZA' | 'FR';
38
+ };
39
+ coordinates: {
40
+ lat: number;
41
+ lon: number;
42
+ } | null;
43
+ } | null;
25
44
  name: string;
26
45
  phoneNumber: string | null;
27
46
  email: string;
@@ -1,8 +1,8 @@
1
1
  export type CreateBusinessUnits = Array<{
2
2
  organisationId: string;
3
3
  name: string;
4
- type: 'farm' | 'stores' | 'region';
5
- business?: {
4
+ type?: string;
5
+ business: {
6
6
  location: {
7
7
  what3words: string | null;
8
8
  address: {
@@ -22,6 +22,25 @@ export type CreateBusinessUnits = Array<{
22
22
  lon: number;
23
23
  } | null;
24
24
  } | null;
25
+ collectionLocation?: {
26
+ what3words: string | null;
27
+ address: {
28
+ name?: string | null;
29
+ line1: string;
30
+ line2?: string | null;
31
+ line3?: string | null;
32
+ city?: string | null;
33
+ region?: string | null;
34
+ regionISO?: string | null;
35
+ postcode: string;
36
+ countryName?: string | null;
37
+ countryISO: 'GB' | 'US' | 'ZA' | 'FR';
38
+ };
39
+ coordinates: {
40
+ lat: number;
41
+ lon: number;
42
+ } | null;
43
+ } | null;
25
44
  name: string;
26
45
  phoneNumber: string | null;
27
46
  email: string;
@@ -61,7 +61,7 @@ export type CreateOrganisationResponse = {
61
61
  businessUnits?: Array<{
62
62
  id: string;
63
63
  name: string;
64
- type: 'farm' | 'stores' | 'region';
64
+ type?: string;
65
65
  business: string | null;
66
66
  region: string | null;
67
67
  tags: Array<string>;
@@ -210,7 +210,7 @@ export type CreateOrganisationResponse = {
210
210
  businessUnits?: Array<{
211
211
  id: string;
212
212
  name: string;
213
- type: 'farm' | 'stores' | 'region';
213
+ type?: string;
214
214
  business: string | null;
215
215
  region: string | null;
216
216
  tags: Array<string>;
@@ -60,7 +60,7 @@ export type OrganisationDetail = {
60
60
  businessUnits?: Array<{
61
61
  id: string;
62
62
  name: string;
63
- type: 'farm' | 'stores' | 'region';
63
+ type?: string;
64
64
  business: string | null;
65
65
  region: string | null;
66
66
  tags: Array<string>;
@@ -63,7 +63,7 @@ export type OrganisationExists = {
63
63
  businessUnits?: Array<{
64
64
  id: string;
65
65
  name: string;
66
- type: 'farm' | 'stores' | 'region';
66
+ type?: string;
67
67
  business: string | null;
68
68
  region: string | null;
69
69
  tags: Array<string>;
@@ -20,9 +20,29 @@ export type PatchBusinessUnit = {
20
20
  lon: number;
21
21
  } | null;
22
22
  } | null;
23
+ collectionLocation?: {
24
+ what3words: string | null;
25
+ address: {
26
+ name?: string | null;
27
+ line1: string;
28
+ line2?: string | null;
29
+ line3?: string | null;
30
+ city?: string | null;
31
+ region?: string | null;
32
+ regionISO?: string | null;
33
+ postcode: string;
34
+ countryName?: string | null;
35
+ countryISO: 'GB' | 'US' | 'ZA' | 'FR';
36
+ };
37
+ coordinates: {
38
+ lat: number;
39
+ lon: number;
40
+ } | null;
41
+ } | null;
23
42
  name?: string;
24
43
  phoneNumber?: string | null;
25
44
  email?: string;
45
+ primary?: boolean;
26
46
  locationTag?: string;
27
47
  managementTag?: string;
28
48
  holdingNumber?: string | null;
@@ -7,10 +7,10 @@ export type RedTractorCertificate = {
7
7
  }>;
8
8
  certificateExpiryDate?: string;
9
9
  certifiedSites?: Array<{
10
- siteIdentifiers?: Array<{
10
+ siteIdentifiers?: {
11
11
  identifierType?: string;
12
12
  identifier?: string;
13
- }>;
13
+ };
14
14
  isPrimary?: boolean;
15
15
  siteCountry?: string;
16
16
  sitePostcode?: string;
@@ -61,7 +61,7 @@ export type SearchResultsOrganisationDetailSchema = {
61
61
  businessUnits?: Array<{
62
62
  id: string;
63
63
  name: string;
64
- type: 'farm' | 'stores' | 'region';
64
+ type?: string;
65
65
  business: string | null;
66
66
  region: string | null;
67
67
  tags: Array<string>;
@@ -66,7 +66,7 @@ export type SearchResultsUserDetailSchema = {
66
66
  businessUnits?: Array<{
67
67
  id: string;
68
68
  name: string;
69
- type: 'farm' | 'stores' | 'region';
69
+ type?: string;
70
70
  business: string | null;
71
71
  region: string | null;
72
72
  tags: Array<string>;
@@ -65,7 +65,7 @@ export type UserDetail = {
65
65
  businessUnits?: Array<{
66
66
  id: string;
67
67
  name: string;
68
- type: 'farm' | 'stores' | 'region';
68
+ type?: string;
69
69
  business: string | null;
70
70
  region: string | null;
71
71
  tags: Array<string>;
@@ -61,7 +61,7 @@ export type UserProfile = {
61
61
  businessUnits?: Array<{
62
62
  id: string;
63
63
  name: string;
64
- type: 'farm' | 'stores' | 'region';
64
+ type?: string;
65
65
  business: string | null;
66
66
  region: string | null;
67
67
  tags: Array<string>;
@@ -210,7 +210,7 @@ export type UserProfile = {
210
210
  businessUnits?: Array<{
211
211
  id: string;
212
212
  name: string;
213
- type: 'farm' | 'stores' | 'region';
213
+ type?: string;
214
214
  business: string | null;
215
215
  region: string | null;
216
216
  tags: Array<string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hectare/platform.clients.customers",
3
- "version": "1.1.33",
3
+ "version": "1.1.35",
4
4
  "main": "index.js",
5
5
  "exported": true,
6
6
  "types": "index.d.ts",
@@ -1,51 +0,0 @@
1
- export type BusinessConnectionDetail = {
2
- organisationId?: string;
3
- organisationName?: string;
4
- relationship?: Array<string>;
5
- contacts?: Array<{
6
- givenName?: string;
7
- familyName?: string;
8
- phone?: {
9
- callingCode: string;
10
- number: string;
11
- };
12
- email?: string;
13
- id?: string;
14
- authPlatformId?: string;
15
- profile?: {
16
- organisationId: string;
17
- businessUnits: Array<string>;
18
- roles: Array<string>;
19
- } | null;
20
- }>;
21
- location?: {
22
- what3words: string | null;
23
- address: {
24
- name?: string | null;
25
- line1: string;
26
- line2?: string | null;
27
- line3?: string | null;
28
- city?: string | null;
29
- region?: string | null;
30
- regionISO?: string | null;
31
- postcode: string;
32
- countryName?: string | null;
33
- countryISO: 'GB' | 'US' | 'ZA' | 'FR';
34
- };
35
- coordinates: {
36
- lat: number;
37
- lon: number;
38
- } | null;
39
- } | null;
40
- countryISO?: 'GB' | 'US' | 'ZA' | 'FR';
41
- ownerContact?: {
42
- id?: string;
43
- email?: string;
44
- familyName?: string;
45
- givenName?: string;
46
- phone?: {
47
- callingCode: string;
48
- number: string;
49
- };
50
- };
51
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,54 +0,0 @@
1
- export type BusinessConnectionsSummary = {
2
- id?: string;
3
- connectedOrganisations?: Array<{
4
- organisationId?: string;
5
- organisationName?: string;
6
- relationship?: Array<string>;
7
- contacts?: Array<{
8
- givenName?: string;
9
- familyName?: string;
10
- phone?: {
11
- callingCode: string;
12
- number: string;
13
- };
14
- email?: string;
15
- id?: string;
16
- authPlatformId?: string;
17
- profile?: {
18
- organisationId: string;
19
- businessUnits: Array<string>;
20
- roles: Array<string>;
21
- } | null;
22
- }>;
23
- location?: {
24
- what3words: string | null;
25
- address: {
26
- name?: string | null;
27
- line1: string;
28
- line2?: string | null;
29
- line3?: string | null;
30
- city?: string | null;
31
- region?: string | null;
32
- regionISO?: string | null;
33
- postcode: string;
34
- countryName?: string | null;
35
- countryISO: 'GB' | 'US' | 'ZA' | 'FR';
36
- };
37
- coordinates: {
38
- lat: number;
39
- lon: number;
40
- } | null;
41
- } | null;
42
- countryISO?: 'GB' | 'US' | 'ZA' | 'FR';
43
- ownerContact?: {
44
- id?: string;
45
- email?: string;
46
- familyName?: string;
47
- givenName?: string;
48
- phone?: {
49
- callingCode: string;
50
- number: string;
51
- };
52
- };
53
- }>;
54
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- export type CheckBusinessConnectionRequestSchema = {
2
- organisationId: string;
3
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- export type CheckBusinessConnectionResponseSchema = {
2
- isInNetwork: boolean;
3
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,14 +0,0 @@
1
- export type CreateBusinessConnection = {
2
- id?: string | null;
3
- companyNumber?: string | null;
4
- countryISO?: 'GB' | 'US' | 'ZA' | 'FR';
5
- name?: string;
6
- relationship?: 'trading' | 'storage' | 'carrier' | 'organiser' | null;
7
- contacts: Array<{
8
- id?: string | null;
9
- givenName: string;
10
- familyName: string;
11
- email: string;
12
- phone: string | null;
13
- }>;
14
- };
@@ -1 +0,0 @@
1
- export {};