@softruck/api-contracts 0.1.1-beta.3
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/README.md +0 -0
- package/dist/alerts/api.d.ts +9 -0
- package/dist/alerts/api.js +8 -0
- package/dist/alerts/index.d.ts +3 -0
- package/dist/alerts/index.js +3 -0
- package/dist/alerts/schemas.d.ts +65 -0
- package/dist/alerts/schemas.js +29 -0
- package/dist/alerts/types.d.ts +36 -0
- package/dist/alerts/types.js +1 -0
- package/dist/auth/api.d.ts +26 -0
- package/dist/auth/api.js +39 -0
- package/dist/auth/index.d.ts +3 -0
- package/dist/auth/index.js +3 -0
- package/dist/auth/schemas/access-codes.d.ts +16 -0
- package/dist/auth/schemas/access-codes.js +13 -0
- package/dist/auth/schemas/login.d.ts +13 -0
- package/dist/auth/schemas/login.js +9 -0
- package/dist/auth/schemas/passwords.d.ts +81 -0
- package/dist/auth/schemas/passwords.js +28 -0
- package/dist/auth/schemas/sessions.d.ts +3 -0
- package/dist/auth/schemas/sessions.js +2 -0
- package/dist/auth/schemas/tokens.d.ts +11 -0
- package/dist/auth/schemas/tokens.js +9 -0
- package/dist/auth/schemas.d.ts +5 -0
- package/dist/auth/schemas.js +5 -0
- package/dist/auth/types.d.ts +1 -0
- package/dist/auth/types.js +1 -0
- package/dist/checklist/api.d.ts +30 -0
- package/dist/checklist/api.js +15 -0
- package/dist/checklist/index.d.ts +3 -0
- package/dist/checklist/index.js +3 -0
- package/dist/checklist/schemas.d.ts +62 -0
- package/dist/checklist/schemas.js +46 -0
- package/dist/checklist/types.d.ts +76 -0
- package/dist/checklist/types.js +1 -0
- package/dist/chips/api.d.ts +17 -0
- package/dist/chips/api.js +8 -0
- package/dist/chips/connections/api.d.ts +13 -0
- package/dist/chips/connections/api.js +4 -0
- package/dist/chips/connections/index.d.ts +3 -0
- package/dist/chips/connections/index.js +3 -0
- package/dist/chips/connections/schemas.d.ts +31 -0
- package/dist/chips/connections/schemas.js +31 -0
- package/dist/chips/connections/types.d.ts +26 -0
- package/dist/chips/connections/types.js +1 -0
- package/dist/chips/index.d.ts +5 -0
- package/dist/chips/index.js +5 -0
- package/dist/chips/requirements/api.d.ts +13 -0
- package/dist/chips/requirements/api.js +4 -0
- package/dist/chips/requirements/index.d.ts +3 -0
- package/dist/chips/requirements/index.js +3 -0
- package/dist/chips/requirements/schemas.d.ts +21 -0
- package/dist/chips/requirements/schemas.js +21 -0
- package/dist/chips/requirements/types.d.ts +16 -0
- package/dist/chips/requirements/types.js +1 -0
- package/dist/chips/schemas.d.ts +78 -0
- package/dist/chips/schemas.js +72 -0
- package/dist/chips/types.d.ts +76 -0
- package/dist/chips/types.js +1 -0
- package/dist/core/client.d.ts +45 -0
- package/dist/core/client.js +42 -0
- package/dist/core/index.d.ts +4 -0
- package/dist/core/index.js +4 -0
- package/dist/core/query-builder.d.ts +34 -0
- package/dist/core/query-builder.js +86 -0
- package/dist/core/schemas.d.ts +80 -0
- package/dist/core/schemas.js +31 -0
- package/dist/core/types.d.ts +119 -0
- package/dist/core/types.js +2 -0
- package/dist/devices/activations/api.d.ts +20 -0
- package/dist/devices/activations/api.js +9 -0
- package/dist/devices/activations/index.d.ts +3 -0
- package/dist/devices/activations/index.js +3 -0
- package/dist/devices/activations/schemas.d.ts +42 -0
- package/dist/devices/activations/schemas.js +42 -0
- package/dist/devices/activations/types.d.ts +75 -0
- package/dist/devices/activations/types.js +1 -0
- package/dist/devices/api.d.ts +28 -0
- package/dist/devices/api.js +11 -0
- package/dist/devices/commands/api.d.ts +17 -0
- package/dist/devices/commands/api.js +8 -0
- package/dist/devices/commands/index.d.ts +3 -0
- package/dist/devices/commands/index.js +3 -0
- package/dist/devices/commands/schemas.d.ts +39 -0
- package/dist/devices/commands/schemas.js +33 -0
- package/dist/devices/commands/types.d.ts +58 -0
- package/dist/devices/commands/types.js +1 -0
- package/dist/devices/index.d.ts +5 -0
- package/dist/devices/index.js +5 -0
- package/dist/devices/schemas.d.ts +115 -0
- package/dist/devices/schemas.js +96 -0
- package/dist/devices/types.d.ts +142 -0
- package/dist/devices/types.js +1 -0
- package/dist/enterprises/api.d.ts +27 -0
- package/dist/enterprises/api.js +15 -0
- package/dist/enterprises/index.d.ts +3 -0
- package/dist/enterprises/index.js +3 -0
- package/dist/enterprises/schemas.d.ts +59 -0
- package/dist/enterprises/schemas.js +53 -0
- package/dist/enterprises/types.d.ts +160 -0
- package/dist/enterprises/types.js +1 -0
- package/dist/events/api.d.ts +18 -0
- package/dist/events/api.js +13 -0
- package/dist/events/index.d.ts +3 -0
- package/dist/events/index.js +3 -0
- package/dist/events/schemas.d.ts +262 -0
- package/dist/events/schemas.js +54 -0
- package/dist/events/types.d.ts +130 -0
- package/dist/events/types.js +1 -0
- package/dist/exports/api.d.ts +18 -0
- package/dist/exports/api.js +9 -0
- package/dist/exports/index.d.ts +3 -0
- package/dist/exports/index.js +3 -0
- package/dist/exports/schemas.d.ts +27 -0
- package/dist/exports/schemas.js +22 -0
- package/dist/exports/types.d.ts +47 -0
- package/dist/exports/types.js +1 -0
- package/dist/fuelings/api.d.ts +22 -0
- package/dist/fuelings/api.js +9 -0
- package/dist/fuelings/index.d.ts +3 -0
- package/dist/fuelings/index.js +3 -0
- package/dist/fuelings/schemas.d.ts +84 -0
- package/dist/fuelings/schemas.js +52 -0
- package/dist/fuelings/types.d.ts +80 -0
- package/dist/fuelings/types.js +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +22 -0
- package/dist/maintenances/api.d.ts +31 -0
- package/dist/maintenances/api.js +12 -0
- package/dist/maintenances/index.d.ts +3 -0
- package/dist/maintenances/index.js +3 -0
- package/dist/maintenances/schemas.d.ts +74 -0
- package/dist/maintenances/schemas.js +44 -0
- package/dist/maintenances/types.d.ts +69 -0
- package/dist/maintenances/types.js +1 -0
- package/dist/operation-logs/api.d.ts +13 -0
- package/dist/operation-logs/api.js +10 -0
- package/dist/operation-logs/index.d.ts +3 -0
- package/dist/operation-logs/index.js +3 -0
- package/dist/operation-logs/schemas.d.ts +34 -0
- package/dist/operation-logs/schemas.js +22 -0
- package/dist/operation-logs/types.d.ts +32 -0
- package/dist/operation-logs/types.js +1 -0
- package/dist/protocols/api.d.ts +34 -0
- package/dist/protocols/api.js +13 -0
- package/dist/protocols/index.d.ts +3 -0
- package/dist/protocols/index.js +3 -0
- package/dist/protocols/schemas.d.ts +66 -0
- package/dist/protocols/schemas.js +36 -0
- package/dist/protocols/types.d.ts +99 -0
- package/dist/protocols/types.js +1 -0
- package/dist/service-orders/api.d.ts +38 -0
- package/dist/service-orders/api.js +14 -0
- package/dist/service-orders/index.d.ts +3 -0
- package/dist/service-orders/index.js +3 -0
- package/dist/service-orders/schemas.d.ts +82 -0
- package/dist/service-orders/schemas.js +47 -0
- package/dist/service-orders/types.d.ts +84 -0
- package/dist/service-orders/types.js +1 -0
- package/dist/sharings/api.d.ts +17 -0
- package/dist/sharings/api.js +8 -0
- package/dist/sharings/index.d.ts +3 -0
- package/dist/sharings/index.js +3 -0
- package/dist/sharings/schemas.d.ts +47 -0
- package/dist/sharings/schemas.js +36 -0
- package/dist/sharings/types.d.ts +54 -0
- package/dist/sharings/types.js +1 -0
- package/dist/surveys/api.d.ts +2 -0
- package/dist/surveys/api.js +3 -0
- package/dist/surveys/index.d.ts +3 -0
- package/dist/surveys/index.js +3 -0
- package/dist/surveys/schemas.d.ts +33 -0
- package/dist/surveys/schemas.js +23 -0
- package/dist/surveys/types.d.ts +27 -0
- package/dist/surveys/types.js +1 -0
- package/dist/tags/api.d.ts +24 -0
- package/dist/tags/api.js +28 -0
- package/dist/tags/index.d.ts +3 -0
- package/dist/tags/index.js +3 -0
- package/dist/tags/schemas.d.ts +26 -0
- package/dist/tags/schemas.js +19 -0
- package/dist/tags/types.d.ts +16 -0
- package/dist/tags/types.js +1 -0
- package/dist/tracking/api.d.ts +2 -0
- package/dist/tracking/api.js +3 -0
- package/dist/tracking/index.d.ts +3 -0
- package/dist/tracking/index.js +3 -0
- package/dist/tracking/schemas.d.ts +12 -0
- package/dist/tracking/schemas.js +12 -0
- package/dist/tracking/types.d.ts +11 -0
- package/dist/tracking/types.js +1 -0
- package/dist/trajectories/api.d.ts +27 -0
- package/dist/trajectories/api.js +13 -0
- package/dist/trajectories/index.d.ts +3 -0
- package/dist/trajectories/index.js +3 -0
- package/dist/trajectories/schemas.d.ts +39 -0
- package/dist/trajectories/schemas.js +30 -0
- package/dist/trajectories/types.d.ts +58 -0
- package/dist/trajectories/types.js +1 -0
- package/dist/trips/api.d.ts +30 -0
- package/dist/trips/api.js +12 -0
- package/dist/trips/index.d.ts +3 -0
- package/dist/trips/index.js +3 -0
- package/dist/trips/schemas.d.ts +62 -0
- package/dist/trips/schemas.js +36 -0
- package/dist/trips/types.d.ts +65 -0
- package/dist/trips/types.js +1 -0
- package/dist/users/api.d.ts +533 -0
- package/dist/users/api.js +102 -0
- package/dist/users/configuration/api.d.ts +21 -0
- package/dist/users/configuration/api.js +16 -0
- package/dist/users/configuration/index.d.ts +3 -0
- package/dist/users/configuration/index.js +3 -0
- package/dist/users/configuration/schemas.d.ts +91 -0
- package/dist/users/configuration/schemas.js +42 -0
- package/dist/users/configuration/types.d.ts +36 -0
- package/dist/users/configuration/types.js +1 -0
- package/dist/users/index.d.ts +4 -0
- package/dist/users/index.js +4 -0
- package/dist/users/schemas/addresses.d.ts +136 -0
- package/dist/users/schemas/addresses.js +94 -0
- package/dist/users/schemas/authenticated-user.d.ts +30 -0
- package/dist/users/schemas/authenticated-user.js +21 -0
- package/dist/users/schemas/common.d.ts +28 -0
- package/dist/users/schemas/common.js +26 -0
- package/dist/users/schemas/documents.d.ts +40 -0
- package/dist/users/schemas/documents.js +53 -0
- package/dist/users/schemas/passwords.d.ts +10 -0
- package/dist/users/schemas/passwords.js +15 -0
- package/dist/users/schemas/roles.d.ts +60 -0
- package/dist/users/schemas/roles.js +9 -0
- package/dist/users/schemas/sessions.d.ts +84 -0
- package/dist/users/schemas/sessions.js +55 -0
- package/dist/users/schemas/usernames.d.ts +14 -0
- package/dist/users/schemas/usernames.js +12 -0
- package/dist/users/schemas/users.d.ts +648 -0
- package/dist/users/schemas/users.js +243 -0
- package/dist/users/schemas.d.ts +8 -0
- package/dist/users/schemas.js +8 -0
- package/dist/users/types.d.ts +1 -0
- package/dist/users/types.js +1 -0
- package/dist/vehicles/api.d.ts +28 -0
- package/dist/vehicles/api.js +13 -0
- package/dist/vehicles/index.d.ts +3 -0
- package/dist/vehicles/index.js +3 -0
- package/dist/vehicles/schemas.d.ts +88 -0
- package/dist/vehicles/schemas.js +71 -0
- package/dist/vehicles/types.d.ts +142 -0
- package/dist/vehicles/types.js +1 -0
- package/package.json +59 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const CommandSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
attributes: z.ZodObject<{
|
|
5
|
+
type: z.ZodNullable<z.ZodString>;
|
|
6
|
+
message: z.ZodNullable<z.ZodString>;
|
|
7
|
+
status: z.ZodNullable<z.ZodString>;
|
|
8
|
+
created_at: z.ZodNullable<z.ZodString>;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
relationships: z.ZodObject<{
|
|
11
|
+
enterprise: z.ZodNullable<z.ZodObject<{
|
|
12
|
+
attributes: z.ZodObject<{
|
|
13
|
+
name: z.ZodString;
|
|
14
|
+
cnpj: z.ZodNullable<z.ZodString>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
device: z.ZodNullable<z.ZodObject<{
|
|
18
|
+
attributes: z.ZodObject<{
|
|
19
|
+
name: z.ZodNullable<z.ZodString>;
|
|
20
|
+
imei: z.ZodNullable<z.ZodString>;
|
|
21
|
+
code: z.ZodNullable<z.ZodString>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
}, z.core.$strip>>;
|
|
24
|
+
user: z.ZodNullable<z.ZodObject<{
|
|
25
|
+
attributes: z.ZodObject<{
|
|
26
|
+
name: z.ZodString;
|
|
27
|
+
username: z.ZodNullable<z.ZodString>;
|
|
28
|
+
email: z.ZodNullable<z.ZodString>;
|
|
29
|
+
phone1: z.ZodNullable<z.ZodString>;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
}, z.core.$strip>>;
|
|
32
|
+
device_type: z.ZodNullable<z.ZodObject<{
|
|
33
|
+
attributes: z.ZodObject<{
|
|
34
|
+
alias: z.ZodNullable<z.ZodString>;
|
|
35
|
+
brand_alias: z.ZodNullable<z.ZodString>;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
}, z.core.$strip>>;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const CommandSchema = z.object({
|
|
3
|
+
id: z.string(),
|
|
4
|
+
attributes: z.object({
|
|
5
|
+
type: z.string().nullable(),
|
|
6
|
+
message: z.string().nullable(),
|
|
7
|
+
status: z.string().nullable(),
|
|
8
|
+
created_at: z.string().nullable(),
|
|
9
|
+
}),
|
|
10
|
+
relationships: z.object({
|
|
11
|
+
enterprise: z.object({
|
|
12
|
+
attributes: z.object({ name: z.string(), cnpj: z.string().nullable() }),
|
|
13
|
+
}).nullable(),
|
|
14
|
+
device: z.object({
|
|
15
|
+
attributes: z.object({
|
|
16
|
+
name: z.string().nullable(),
|
|
17
|
+
imei: z.string().nullable(),
|
|
18
|
+
code: z.string().nullable(),
|
|
19
|
+
}),
|
|
20
|
+
}).nullable(),
|
|
21
|
+
user: z.object({
|
|
22
|
+
attributes: z.object({
|
|
23
|
+
name: z.string(),
|
|
24
|
+
username: z.string().nullable(),
|
|
25
|
+
email: z.string().nullable(),
|
|
26
|
+
phone1: z.string().nullable(),
|
|
27
|
+
}),
|
|
28
|
+
}).nullable(),
|
|
29
|
+
device_type: z.object({
|
|
30
|
+
attributes: z.object({ alias: z.string().nullable(), brand_alias: z.string().nullable() }),
|
|
31
|
+
}).nullable(),
|
|
32
|
+
}),
|
|
33
|
+
});
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export interface CommandAttributes {
|
|
2
|
+
type: string | null;
|
|
3
|
+
message: string | null;
|
|
4
|
+
status: string | null;
|
|
5
|
+
created_at: string | null;
|
|
6
|
+
}
|
|
7
|
+
export interface Command {
|
|
8
|
+
id: string;
|
|
9
|
+
attributes: CommandAttributes;
|
|
10
|
+
relationships: {
|
|
11
|
+
enterprise: {
|
|
12
|
+
attributes: {
|
|
13
|
+
name: string;
|
|
14
|
+
cnpj: string | null;
|
|
15
|
+
};
|
|
16
|
+
} | null;
|
|
17
|
+
device: {
|
|
18
|
+
attributes: {
|
|
19
|
+
name: string | null;
|
|
20
|
+
imei: string | null;
|
|
21
|
+
code: string | null;
|
|
22
|
+
};
|
|
23
|
+
} | null;
|
|
24
|
+
user: {
|
|
25
|
+
attributes: {
|
|
26
|
+
name: string;
|
|
27
|
+
username: string | null;
|
|
28
|
+
email: string | null;
|
|
29
|
+
phone1: string | null;
|
|
30
|
+
};
|
|
31
|
+
} | null;
|
|
32
|
+
device_type: {
|
|
33
|
+
attributes: {
|
|
34
|
+
alias: string | null;
|
|
35
|
+
brand_alias: string | null;
|
|
36
|
+
};
|
|
37
|
+
} | null;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export interface CommandPanelRow {
|
|
41
|
+
attributes: {
|
|
42
|
+
status: string;
|
|
43
|
+
type: string;
|
|
44
|
+
command: string;
|
|
45
|
+
created_at: string;
|
|
46
|
+
count: string;
|
|
47
|
+
user: {
|
|
48
|
+
name: string | null;
|
|
49
|
+
} | null;
|
|
50
|
+
device: {
|
|
51
|
+
name: string | null;
|
|
52
|
+
} | null;
|
|
53
|
+
device_type: {
|
|
54
|
+
brand_alias: string | null;
|
|
55
|
+
alias: string | null;
|
|
56
|
+
} | null;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const DeviceTypeAttrSchema: z.ZodObject<{
|
|
3
|
+
brand_alias: z.ZodNullable<z.ZodString>;
|
|
4
|
+
alias: z.ZodNullable<z.ZodString>;
|
|
5
|
+
type: z.ZodNullable<z.ZodString>;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export declare const DeviceModelSchema: z.ZodObject<{
|
|
8
|
+
id: z.ZodString;
|
|
9
|
+
attributes: z.ZodObject<{
|
|
10
|
+
alias: z.ZodNullable<z.ZodString>;
|
|
11
|
+
supported: z.ZodNullable<z.ZodBoolean>;
|
|
12
|
+
brand_alias: z.ZodNullable<z.ZodString>;
|
|
13
|
+
type: z.ZodNullable<z.ZodString>;
|
|
14
|
+
protocol: z.ZodNullable<z.ZodString>;
|
|
15
|
+
imei_mask: z.ZodNullable<z.ZodString>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
export declare const DeviceSchema: z.ZodObject<{
|
|
19
|
+
id: z.ZodString;
|
|
20
|
+
attributes: z.ZodObject<{
|
|
21
|
+
name: z.ZodNullable<z.ZodString>;
|
|
22
|
+
imei: z.ZodNullable<z.ZodString>;
|
|
23
|
+
code: z.ZodNullable<z.ZodString>;
|
|
24
|
+
active: z.ZodNullable<z.ZodBoolean>;
|
|
25
|
+
from_softruck: z.ZodNullable<z.ZodBoolean>;
|
|
26
|
+
last_integration_source: z.ZodNullable<z.ZodString>;
|
|
27
|
+
last_integration_time: z.ZodNullable<z.ZodString>;
|
|
28
|
+
created_at: z.ZodNullable<z.ZodString>;
|
|
29
|
+
updated_at: z.ZodNullable<z.ZodString>;
|
|
30
|
+
deactivated_at: z.ZodNullable<z.ZodString>;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
relationships: z.ZodObject<{
|
|
33
|
+
enterprise: z.ZodNullable<z.ZodObject<{
|
|
34
|
+
attributes: z.ZodObject<{
|
|
35
|
+
name: z.ZodNullable<z.ZodString>;
|
|
36
|
+
cnpj: z.ZodNullable<z.ZodString>;
|
|
37
|
+
email: z.ZodNullable<z.ZodString>;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
}, z.core.$strip>>;
|
|
40
|
+
vehicle: z.ZodNullable<z.ZodObject<{
|
|
41
|
+
id: z.ZodString;
|
|
42
|
+
attributes: z.ZodObject<{
|
|
43
|
+
plate: z.ZodNullable<z.ZodString>;
|
|
44
|
+
vin: z.ZodNullable<z.ZodString>;
|
|
45
|
+
type_name: z.ZodNullable<z.ZodString>;
|
|
46
|
+
}, z.core.$strip>;
|
|
47
|
+
}, z.core.$strip>>;
|
|
48
|
+
chip: z.ZodNullable<z.ZodObject<{
|
|
49
|
+
id: z.ZodString;
|
|
50
|
+
attributes: z.ZodObject<{
|
|
51
|
+
serial: z.ZodNullable<z.ZodString>;
|
|
52
|
+
number: z.ZodNullable<z.ZodString>;
|
|
53
|
+
imsi: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
54
|
+
service_provider: z.ZodNullable<z.ZodString>;
|
|
55
|
+
carrier: z.ZodNullable<z.ZodString>;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
}, z.core.$strip>>;
|
|
58
|
+
type: z.ZodNullable<z.ZodObject<{
|
|
59
|
+
attributes: z.ZodObject<{
|
|
60
|
+
brand_alias: z.ZodNullable<z.ZodString>;
|
|
61
|
+
alias: z.ZodNullable<z.ZodString>;
|
|
62
|
+
type: z.ZodNullable<z.ZodString>;
|
|
63
|
+
}, z.core.$strip>;
|
|
64
|
+
}, z.core.$strip>>;
|
|
65
|
+
last_gps: z.ZodNullable<z.ZodObject<{
|
|
66
|
+
attributes: z.ZodObject<{
|
|
67
|
+
last_gps_time: z.ZodNullable<z.ZodString>;
|
|
68
|
+
last_connection_time: z.ZodNullable<z.ZodString>;
|
|
69
|
+
lat: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
70
|
+
lng: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
71
|
+
last_gps_raw: z.ZodNullable<z.ZodObject<{
|
|
72
|
+
lat: z.ZodNullable<z.ZodNumber>;
|
|
73
|
+
lng: z.ZodNullable<z.ZodNumber>;
|
|
74
|
+
pv: z.ZodNullable<z.ZodNumber>;
|
|
75
|
+
bl: z.ZodNullable<z.ZodNumber>;
|
|
76
|
+
dir: z.ZodNullable<z.ZodNumber>;
|
|
77
|
+
sc: z.ZodNullable<z.ZodNumber>;
|
|
78
|
+
org: z.ZodNullable<z.ZodString>;
|
|
79
|
+
ign: z.ZodNullable<z.ZodBoolean>;
|
|
80
|
+
}, z.core.$strip>>;
|
|
81
|
+
}, z.core.$strip>;
|
|
82
|
+
}, z.core.$strip>>;
|
|
83
|
+
users: z.ZodNullable<z.ZodObject<{
|
|
84
|
+
attributes: z.ZodObject<{
|
|
85
|
+
user_names: z.ZodNullable<z.ZodString>;
|
|
86
|
+
}, z.core.$strip>;
|
|
87
|
+
}, z.core.$strip>>;
|
|
88
|
+
tags: z.ZodArray<z.ZodObject<{
|
|
89
|
+
id: z.ZodString;
|
|
90
|
+
attributes: z.ZodObject<{
|
|
91
|
+
name: z.ZodString;
|
|
92
|
+
color: z.ZodNullable<z.ZodString>;
|
|
93
|
+
}, z.core.$strip>;
|
|
94
|
+
}, z.core.$strip>>;
|
|
95
|
+
}, z.core.$strip>;
|
|
96
|
+
}, z.core.$strip>;
|
|
97
|
+
export declare const CreateDevicePayloadSchema: z.ZodObject<{
|
|
98
|
+
attributes: z.ZodObject<{
|
|
99
|
+
name: z.ZodString;
|
|
100
|
+
imei: z.ZodString;
|
|
101
|
+
batch: z.ZodOptional<z.ZodString>;
|
|
102
|
+
code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
103
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
104
|
+
}, z.core.$strip>;
|
|
105
|
+
relationships: z.ZodObject<{
|
|
106
|
+
type: z.ZodObject<{
|
|
107
|
+
type: z.ZodLiteral<"type">;
|
|
108
|
+
id: z.ZodString;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
enterprise: z.ZodObject<{
|
|
111
|
+
type: z.ZodLiteral<"enterprise">;
|
|
112
|
+
id: z.ZodString;
|
|
113
|
+
}, z.core.$strip>;
|
|
114
|
+
}, z.core.$strip>;
|
|
115
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const DeviceTypeAttrSchema = z.object({
|
|
3
|
+
brand_alias: z.string().nullable(),
|
|
4
|
+
alias: z.string().nullable(),
|
|
5
|
+
type: z.string().nullable(),
|
|
6
|
+
});
|
|
7
|
+
export const DeviceModelSchema = z.object({
|
|
8
|
+
id: z.string(),
|
|
9
|
+
attributes: z.object({
|
|
10
|
+
alias: z.string().nullable(),
|
|
11
|
+
supported: z.boolean().nullable(),
|
|
12
|
+
brand_alias: z.string().nullable(),
|
|
13
|
+
type: z.string().nullable(),
|
|
14
|
+
protocol: z.string().nullable(),
|
|
15
|
+
imei_mask: z.string().nullable(),
|
|
16
|
+
}),
|
|
17
|
+
});
|
|
18
|
+
export const DeviceSchema = z.object({
|
|
19
|
+
id: z.string(),
|
|
20
|
+
attributes: z.object({
|
|
21
|
+
name: z.string().nullable(),
|
|
22
|
+
imei: z.string().nullable(),
|
|
23
|
+
code: z.string().nullable(),
|
|
24
|
+
active: z.boolean().nullable(),
|
|
25
|
+
from_softruck: z.boolean().nullable(),
|
|
26
|
+
last_integration_source: z.string().nullable(),
|
|
27
|
+
last_integration_time: z.string().nullable(),
|
|
28
|
+
created_at: z.string().nullable(),
|
|
29
|
+
updated_at: z.string().nullable(),
|
|
30
|
+
deactivated_at: z.string().nullable(),
|
|
31
|
+
}),
|
|
32
|
+
relationships: z.object({
|
|
33
|
+
enterprise: z.object({
|
|
34
|
+
attributes: z.object({
|
|
35
|
+
name: z.string().nullable(),
|
|
36
|
+
cnpj: z.string().nullable(),
|
|
37
|
+
email: z.string().nullable(),
|
|
38
|
+
}),
|
|
39
|
+
}).nullable(),
|
|
40
|
+
vehicle: z.object({
|
|
41
|
+
id: z.string(),
|
|
42
|
+
attributes: z.object({
|
|
43
|
+
plate: z.string().nullable(),
|
|
44
|
+
vin: z.string().nullable(),
|
|
45
|
+
type_name: z.string().nullable(),
|
|
46
|
+
}),
|
|
47
|
+
}).nullable(),
|
|
48
|
+
chip: z.object({
|
|
49
|
+
id: z.string(),
|
|
50
|
+
attributes: z.object({
|
|
51
|
+
serial: z.string().nullable(),
|
|
52
|
+
number: z.string().nullable(),
|
|
53
|
+
imsi: z.string().nullable().optional(),
|
|
54
|
+
service_provider: z.string().nullable(),
|
|
55
|
+
carrier: z.string().nullable(),
|
|
56
|
+
}),
|
|
57
|
+
}).nullable(),
|
|
58
|
+
type: z.object({ attributes: DeviceTypeAttrSchema }).nullable(),
|
|
59
|
+
last_gps: z.object({
|
|
60
|
+
attributes: z.object({
|
|
61
|
+
last_gps_time: z.string().nullable(),
|
|
62
|
+
last_connection_time: z.string().nullable(),
|
|
63
|
+
lat: z.string().nullable().optional(),
|
|
64
|
+
lng: z.string().nullable().optional(),
|
|
65
|
+
last_gps_raw: z.object({
|
|
66
|
+
lat: z.number().nullable(),
|
|
67
|
+
lng: z.number().nullable(),
|
|
68
|
+
pv: z.number().nullable(),
|
|
69
|
+
bl: z.number().nullable(),
|
|
70
|
+
dir: z.number().nullable(),
|
|
71
|
+
sc: z.number().nullable(),
|
|
72
|
+
org: z.string().nullable(),
|
|
73
|
+
ign: z.boolean().nullable(),
|
|
74
|
+
}).nullable(),
|
|
75
|
+
}),
|
|
76
|
+
}).nullable(),
|
|
77
|
+
users: z.object({ attributes: z.object({ user_names: z.string().nullable() }) }).nullable(),
|
|
78
|
+
tags: z.array(z.object({
|
|
79
|
+
id: z.string(),
|
|
80
|
+
attributes: z.object({ name: z.string(), color: z.string().nullable() }),
|
|
81
|
+
})),
|
|
82
|
+
}),
|
|
83
|
+
});
|
|
84
|
+
export const CreateDevicePayloadSchema = z.object({
|
|
85
|
+
attributes: z.object({
|
|
86
|
+
name: z.string().min(1),
|
|
87
|
+
imei: z.string().min(1),
|
|
88
|
+
batch: z.string().optional(),
|
|
89
|
+
code: z.string().nullable().optional(),
|
|
90
|
+
active: z.boolean().optional(),
|
|
91
|
+
}),
|
|
92
|
+
relationships: z.object({
|
|
93
|
+
type: z.object({ type: z.literal('type'), id: z.string() }),
|
|
94
|
+
enterprise: z.object({ type: z.literal('enterprise'), id: z.string() }),
|
|
95
|
+
}),
|
|
96
|
+
});
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import type { ChipRelAttr, Deactivatable, EnterpriseRelAttr, LastGpsAttr, Tag, VehicleRelAttr } from '../core/types';
|
|
2
|
+
export interface LastGpsRaw {
|
|
3
|
+
lat: number | null;
|
|
4
|
+
lng: number | null;
|
|
5
|
+
pv: number | null;
|
|
6
|
+
bl: number | null;
|
|
7
|
+
dir: number | null;
|
|
8
|
+
sc: number | null;
|
|
9
|
+
org: string | null;
|
|
10
|
+
ign: boolean | null;
|
|
11
|
+
}
|
|
12
|
+
export interface DeviceLastGpsAttr extends LastGpsAttr {
|
|
13
|
+
last_gps_raw: LastGpsRaw | null;
|
|
14
|
+
}
|
|
15
|
+
export interface DeviceTypeAttr {
|
|
16
|
+
brand_alias: string | null;
|
|
17
|
+
alias: string | null;
|
|
18
|
+
type: string | null;
|
|
19
|
+
}
|
|
20
|
+
export interface DeviceAttributes extends Deactivatable {
|
|
21
|
+
name: string | null;
|
|
22
|
+
imei: string | null;
|
|
23
|
+
code: string | null;
|
|
24
|
+
active: boolean | null;
|
|
25
|
+
from_softruck: boolean | null;
|
|
26
|
+
last_integration_source: string | null;
|
|
27
|
+
last_integration_time: string | null;
|
|
28
|
+
}
|
|
29
|
+
export interface Device {
|
|
30
|
+
id: string;
|
|
31
|
+
attributes: DeviceAttributes;
|
|
32
|
+
relationships: {
|
|
33
|
+
enterprise: {
|
|
34
|
+
id: string;
|
|
35
|
+
attributes: EnterpriseRelAttr;
|
|
36
|
+
} | null;
|
|
37
|
+
vehicle: {
|
|
38
|
+
id: string;
|
|
39
|
+
attributes: Pick<VehicleRelAttr, 'plate' | 'vin' | 'type_name'>;
|
|
40
|
+
} | null;
|
|
41
|
+
chip: {
|
|
42
|
+
id: string;
|
|
43
|
+
attributes: ChipRelAttr;
|
|
44
|
+
} | null;
|
|
45
|
+
type: {
|
|
46
|
+
attributes: DeviceTypeAttr;
|
|
47
|
+
} | null;
|
|
48
|
+
last_gps: {
|
|
49
|
+
attributes: DeviceLastGpsAttr;
|
|
50
|
+
} | null;
|
|
51
|
+
users: {
|
|
52
|
+
attributes: {
|
|
53
|
+
user_names: string | null;
|
|
54
|
+
};
|
|
55
|
+
} | null;
|
|
56
|
+
tags: Tag[];
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
export interface DeviceModel {
|
|
60
|
+
id: string;
|
|
61
|
+
attributes: {
|
|
62
|
+
alias: string | null;
|
|
63
|
+
supported: boolean | null;
|
|
64
|
+
brand_alias: string | null;
|
|
65
|
+
type: string | null;
|
|
66
|
+
protocol: string | null;
|
|
67
|
+
imei_mask: string | null;
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
export interface ActivationHistoryItem {
|
|
71
|
+
id: string;
|
|
72
|
+
attributes: {
|
|
73
|
+
created_at: string | null;
|
|
74
|
+
deleted_at: string | null;
|
|
75
|
+
};
|
|
76
|
+
relationships: {
|
|
77
|
+
activator: {
|
|
78
|
+
attributes: {
|
|
79
|
+
name: string | null;
|
|
80
|
+
};
|
|
81
|
+
} | null;
|
|
82
|
+
deactivator: {
|
|
83
|
+
attributes: {
|
|
84
|
+
name: string | null;
|
|
85
|
+
};
|
|
86
|
+
} | null;
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
export interface AssociationHistoryItem {
|
|
90
|
+
id: string;
|
|
91
|
+
attributes: {
|
|
92
|
+
created_at: string | null;
|
|
93
|
+
deleted_at: string | null;
|
|
94
|
+
};
|
|
95
|
+
relationships: {
|
|
96
|
+
vehicle: {
|
|
97
|
+
attributes: Pick<VehicleRelAttr, 'plate' | 'vin'> & {
|
|
98
|
+
deleted_at: string | null;
|
|
99
|
+
};
|
|
100
|
+
} | null;
|
|
101
|
+
enterprise: {
|
|
102
|
+
attributes: Pick<EnterpriseRelAttr, 'name' | 'cnpj'>;
|
|
103
|
+
} | null;
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
export interface CreateDevicePayload {
|
|
107
|
+
attributes: {
|
|
108
|
+
name: string;
|
|
109
|
+
imei: string;
|
|
110
|
+
batch?: string;
|
|
111
|
+
code?: string | null;
|
|
112
|
+
active?: boolean;
|
|
113
|
+
};
|
|
114
|
+
relationships: {
|
|
115
|
+
type: {
|
|
116
|
+
type: 'type';
|
|
117
|
+
id: string;
|
|
118
|
+
};
|
|
119
|
+
enterprise: {
|
|
120
|
+
type: 'enterprise';
|
|
121
|
+
id: string;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
export interface DevicePanelRow {
|
|
126
|
+
type: string;
|
|
127
|
+
attributes: {
|
|
128
|
+
created_at: {
|
|
129
|
+
day: string;
|
|
130
|
+
};
|
|
131
|
+
active: boolean;
|
|
132
|
+
count: string;
|
|
133
|
+
type: Pick<DeviceTypeAttr, 'brand_alias' | 'alias'> | null;
|
|
134
|
+
chip: {
|
|
135
|
+
service_provider: string | null;
|
|
136
|
+
} | null;
|
|
137
|
+
last_gps: {
|
|
138
|
+
last_connection_time: string | null;
|
|
139
|
+
} | null;
|
|
140
|
+
};
|
|
141
|
+
relationships: Record<string, unknown>;
|
|
142
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ApiClientLike } from '../core/client';
|
|
2
|
+
import type { QueryParams } from '../core/query-builder';
|
|
3
|
+
import type { Country, CreateEnterpriseAddressPayload, Enterprise, EnterpriseAddress, EnterpriseCustomization, EnterpriseOverviewSummary, EnterprisePublicResponse } from './types';
|
|
4
|
+
export declare function createEnterprisesApi(client: ApiClientLike): {
|
|
5
|
+
listCountries: (params?: Partial<QueryParams>, signal?: AbortSignal) => Promise<{
|
|
6
|
+
data: Country[];
|
|
7
|
+
}>;
|
|
8
|
+
getPublicBySubdomain: (subdomain: string, signal?: AbortSignal) => Promise<EnterprisePublicResponse>;
|
|
9
|
+
listAddresses: (enterpriseId: string, params?: Partial<QueryParams>, signal?: AbortSignal) => Promise<{
|
|
10
|
+
data: EnterpriseAddress[];
|
|
11
|
+
count: number;
|
|
12
|
+
}>;
|
|
13
|
+
createAddress: (enterpriseId: string, payload: CreateEnterpriseAddressPayload, signal?: AbortSignal) => Promise<{
|
|
14
|
+
data: EnterpriseAddress;
|
|
15
|
+
}>;
|
|
16
|
+
getCustomization: (enterpriseId: string, signal?: AbortSignal) => Promise<EnterpriseCustomization>;
|
|
17
|
+
getOverview: (signal?: AbortSignal) => Promise<Partial<EnterpriseOverviewSummary>>;
|
|
18
|
+
endpoint: string;
|
|
19
|
+
list: <R = Enterprise>(params?: Partial<QueryParams>, signal?: AbortSignal) => Promise<import("..").ListResponse<R>>;
|
|
20
|
+
get: <R = Enterprise>(id: string, params?: Partial<QueryParams>, signal?: AbortSignal) => Promise<{
|
|
21
|
+
data: R;
|
|
22
|
+
}>;
|
|
23
|
+
create: (payload: unknown) => Promise<undefined>;
|
|
24
|
+
update: (id: string, payload: unknown) => Promise<undefined>;
|
|
25
|
+
remove: (id: string) => Promise<undefined>;
|
|
26
|
+
removeMany: (payload: unknown, signal?: AbortSignal) => Promise<undefined>;
|
|
27
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createResourceApi } from '../core/client.js';
|
|
2
|
+
import { withQuery } from '../core/query-builder.js';
|
|
3
|
+
export function createEnterprisesApi(client) {
|
|
4
|
+
return {
|
|
5
|
+
...createResourceApi(client, '/v5/enterprises'),
|
|
6
|
+
listCountries: (params = {}, signal) => client.get(withQuery('/v5/enterprises/countries', params), { signal }).then(r => r.data),
|
|
7
|
+
getPublicBySubdomain: (subdomain, signal) => client.get(withQuery('/v5/enterprises/public', { any: { domain: { value: subdomain } } }), { signal }).then(r => r.data),
|
|
8
|
+
listAddresses: (enterpriseId, params = {}, signal) => client.get(withQuery(`/v5/enterprises/${enterpriseId}/addresses`, params), { signal }).then(r => r.data),
|
|
9
|
+
createAddress: (enterpriseId, payload, signal) => client.post(`/v5/enterprises/${enterpriseId}/addresses`, payload, { signal }).then(r => r.data),
|
|
10
|
+
getCustomization: (enterpriseId, signal) => client.get(`/v5/enterprises/${enterpriseId}/customizations`, { signal })
|
|
11
|
+
.then(r => r.data.data),
|
|
12
|
+
getOverview: (signal) => client.get('/v5/enterprises/reports/overview', { signal })
|
|
13
|
+
.then(r => r.data.data.attributes),
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const CountrySchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
attributes: z.ZodObject<{
|
|
5
|
+
name: z.ZodNullable<z.ZodString>;
|
|
6
|
+
timezones: z.ZodArray<z.ZodString>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export declare const EnterpriseSchema: z.ZodObject<{
|
|
10
|
+
id: z.ZodString;
|
|
11
|
+
attributes: z.ZodObject<{
|
|
12
|
+
name: z.ZodNullable<z.ZodString>;
|
|
13
|
+
fantasy_name: z.ZodNullable<z.ZodString>;
|
|
14
|
+
cnpj: z.ZodNullable<z.ZodString>;
|
|
15
|
+
email: z.ZodNullable<z.ZodString>;
|
|
16
|
+
phone1: z.ZodNullable<z.ZodString>;
|
|
17
|
+
phone2: z.ZodNullable<z.ZodString>;
|
|
18
|
+
assistance_emergency_tel: z.ZodNullable<z.ZodString>;
|
|
19
|
+
theft_emergency_tel: z.ZodNullable<z.ZodString>;
|
|
20
|
+
country: z.ZodNullable<z.ZodString>;
|
|
21
|
+
timezone: z.ZodNullable<z.ZodString>;
|
|
22
|
+
last_integration_source: z.ZodNullable<z.ZodString>;
|
|
23
|
+
last_integration_time: z.ZodNullable<z.ZodString>;
|
|
24
|
+
created_at: z.ZodNullable<z.ZodString>;
|
|
25
|
+
updated_at: z.ZodNullable<z.ZodString>;
|
|
26
|
+
deactivated_at: z.ZodNullable<z.ZodString>;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
relationships: z.ZodObject<{
|
|
29
|
+
country: z.ZodNullable<z.ZodObject<{
|
|
30
|
+
attributes: z.ZodObject<{
|
|
31
|
+
name: z.ZodNullable<z.ZodString>;
|
|
32
|
+
timezone: z.ZodNullable<z.ZodString>;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
}, z.core.$strip>>;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
export declare const CreateEnterprisePayloadSchema: z.ZodObject<{
|
|
38
|
+
attributes: z.ZodObject<{
|
|
39
|
+
name: z.ZodString;
|
|
40
|
+
cnpj: z.ZodString;
|
|
41
|
+
timezone: z.ZodString;
|
|
42
|
+
fantasy_name: z.ZodOptional<z.ZodString>;
|
|
43
|
+
phone1: z.ZodOptional<z.ZodString>;
|
|
44
|
+
phone2: z.ZodOptional<z.ZodString>;
|
|
45
|
+
email: z.ZodOptional<z.ZodString>;
|
|
46
|
+
description: z.ZodOptional<z.ZodString>;
|
|
47
|
+
contact_name: z.ZodOptional<z.ZodString>;
|
|
48
|
+
state_registration_no: z.ZodOptional<z.ZodString>;
|
|
49
|
+
webpage: z.ZodOptional<z.ZodString>;
|
|
50
|
+
assistance_emergency_tel: z.ZodOptional<z.ZodString>;
|
|
51
|
+
theft_emergency_tel: z.ZodOptional<z.ZodString>;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
relationships: z.ZodObject<{
|
|
54
|
+
country: z.ZodObject<{
|
|
55
|
+
type: z.ZodLiteral<"country">;
|
|
56
|
+
id: z.ZodString;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const CountrySchema = z.object({
|
|
3
|
+
id: z.string(),
|
|
4
|
+
attributes: z.object({
|
|
5
|
+
name: z.string().nullable(),
|
|
6
|
+
timezones: z.array(z.string()),
|
|
7
|
+
}),
|
|
8
|
+
});
|
|
9
|
+
export const EnterpriseSchema = z.object({
|
|
10
|
+
id: z.string(),
|
|
11
|
+
attributes: z.object({
|
|
12
|
+
name: z.string().nullable(),
|
|
13
|
+
fantasy_name: z.string().nullable(),
|
|
14
|
+
cnpj: z.string().nullable(),
|
|
15
|
+
email: z.string().nullable(),
|
|
16
|
+
phone1: z.string().nullable(),
|
|
17
|
+
phone2: z.string().nullable(),
|
|
18
|
+
assistance_emergency_tel: z.string().nullable(),
|
|
19
|
+
theft_emergency_tel: z.string().nullable(),
|
|
20
|
+
country: z.string().nullable(),
|
|
21
|
+
timezone: z.string().nullable(),
|
|
22
|
+
last_integration_source: z.string().nullable(),
|
|
23
|
+
last_integration_time: z.string().nullable(),
|
|
24
|
+
created_at: z.string().nullable(),
|
|
25
|
+
updated_at: z.string().nullable(),
|
|
26
|
+
deactivated_at: z.string().nullable(),
|
|
27
|
+
}),
|
|
28
|
+
relationships: z.object({
|
|
29
|
+
country: z.object({
|
|
30
|
+
attributes: z.object({ name: z.string().nullable(), timezone: z.string().nullable() }),
|
|
31
|
+
}).nullable(),
|
|
32
|
+
}),
|
|
33
|
+
});
|
|
34
|
+
export const CreateEnterprisePayloadSchema = z.object({
|
|
35
|
+
attributes: z.object({
|
|
36
|
+
name: z.string().min(1),
|
|
37
|
+
cnpj: z.string().min(1),
|
|
38
|
+
timezone: z.string().min(1),
|
|
39
|
+
fantasy_name: z.string().optional(),
|
|
40
|
+
phone1: z.string().optional(),
|
|
41
|
+
phone2: z.string().optional(),
|
|
42
|
+
email: z.string().email().optional(),
|
|
43
|
+
description: z.string().optional(),
|
|
44
|
+
contact_name: z.string().optional(),
|
|
45
|
+
state_registration_no: z.string().optional(),
|
|
46
|
+
webpage: z.string().optional(),
|
|
47
|
+
assistance_emergency_tel: z.string().optional(),
|
|
48
|
+
theft_emergency_tel: z.string().optional(),
|
|
49
|
+
}),
|
|
50
|
+
relationships: z.object({
|
|
51
|
+
country: z.object({ type: z.literal('country'), id: z.string() }),
|
|
52
|
+
}),
|
|
53
|
+
});
|