deere-sdk 0.1.0
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/CHANGELOG.md +38 -0
- package/LICENSE +21 -0
- package/README.md +253 -0
- package/dist/api/assets.d.ts +78 -0
- package/dist/api/assets.d.ts.map +1 -0
- package/dist/api/assets.js +115 -0
- package/dist/api/assets.js.map +1 -0
- package/dist/api/boundaries.d.ts +69 -0
- package/dist/api/boundaries.d.ts.map +1 -0
- package/dist/api/boundaries.js +102 -0
- package/dist/api/boundaries.js.map +1 -0
- package/dist/api/clients.d.ts +71 -0
- package/dist/api/clients.d.ts.map +1 -0
- package/dist/api/clients.js +104 -0
- package/dist/api/clients.js.map +1 -0
- package/dist/api/connection-management.d.ts +41 -0
- package/dist/api/connection-management.d.ts.map +1 -0
- package/dist/api/connection-management.js +56 -0
- package/dist/api/connection-management.js.map +1 -0
- package/dist/api/crop-types.d.ts +48 -0
- package/dist/api/crop-types.d.ts.map +1 -0
- package/dist/api/crop-types.js +69 -0
- package/dist/api/crop-types.js.map +1 -0
- package/dist/api/equipment.d.ts +138 -0
- package/dist/api/equipment.d.ts.map +1 -0
- package/dist/api/equipment.js +214 -0
- package/dist/api/equipment.js.map +1 -0
- package/dist/api/farms.d.ts +69 -0
- package/dist/api/farms.d.ts.map +1 -0
- package/dist/api/farms.js +100 -0
- package/dist/api/farms.js.map +1 -0
- package/dist/api/field-operations-api.d.ts +56 -0
- package/dist/api/field-operations-api.d.ts.map +1 -0
- package/dist/api/field-operations-api.js +88 -0
- package/dist/api/field-operations-api.js.map +1 -0
- package/dist/api/field-operations.d.ts +83 -0
- package/dist/api/field-operations.d.ts.map +1 -0
- package/dist/api/field-operations.js +134 -0
- package/dist/api/field-operations.js.map +1 -0
- package/dist/api/fields.d.ts +73 -0
- package/dist/api/fields.d.ts.map +1 -0
- package/dist/api/fields.js +113 -0
- package/dist/api/fields.js.map +1 -0
- package/dist/api/files.d.ts +63 -0
- package/dist/api/files.d.ts.map +1 -0
- package/dist/api/files.js +96 -0
- package/dist/api/files.js.map +1 -0
- package/dist/api/flags.d.ts +96 -0
- package/dist/api/flags.d.ts.map +1 -0
- package/dist/api/flags.js +159 -0
- package/dist/api/flags.js.map +1 -0
- package/dist/api/guidance-lines.d.ts +52 -0
- package/dist/api/guidance-lines.d.ts.map +1 -0
- package/dist/api/guidance-lines.js +77 -0
- package/dist/api/guidance-lines.js.map +1 -0
- package/dist/api/index.d.ts +43 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +25 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/map-layers.d.ts +49 -0
- package/dist/api/map-layers.d.ts.map +1 -0
- package/dist/api/map-layers.js +69 -0
- package/dist/api/map-layers.js.map +1 -0
- package/dist/api/operators.d.ts +67 -0
- package/dist/api/operators.d.ts.map +1 -0
- package/dist/api/operators.js +99 -0
- package/dist/api/operators.js.map +1 -0
- package/dist/api/organizations.d.ts +45 -0
- package/dist/api/organizations.d.ts.map +1 -0
- package/dist/api/organizations.js +64 -0
- package/dist/api/organizations.js.map +1 -0
- package/dist/api/products.d.ts +88 -0
- package/dist/api/products.d.ts.map +1 -0
- package/dist/api/products.js +132 -0
- package/dist/api/products.js.map +1 -0
- package/dist/api/users.d.ts +22 -0
- package/dist/api/users.d.ts.map +1 -0
- package/dist/api/users.js +26 -0
- package/dist/api/users.js.map +1 -0
- package/dist/api/webhook.d.ts +42 -0
- package/dist/api/webhook.d.ts.map +1 -0
- package/dist/api/webhook.js +57 -0
- package/dist/api/webhook.js.map +1 -0
- package/dist/client.d.ts +114 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +224 -0
- package/dist/client.js.map +1 -0
- package/dist/deere.d.ts +98 -0
- package/dist/deere.d.ts.map +1 -0
- package/dist/deere.js +120 -0
- package/dist/deere.js.map +1 -0
- package/dist/index.d.ts +36 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +39 -0
- package/dist/index.js.map +1 -0
- package/dist/types/generated/assets.d.ts +839 -0
- package/dist/types/generated/assets.d.ts.map +1 -0
- package/dist/types/generated/assets.js +6 -0
- package/dist/types/generated/assets.js.map +1 -0
- package/dist/types/generated/boundaries.d.ts +734 -0
- package/dist/types/generated/boundaries.d.ts.map +1 -0
- package/dist/types/generated/boundaries.js +6 -0
- package/dist/types/generated/boundaries.js.map +1 -0
- package/dist/types/generated/clients.d.ts +602 -0
- package/dist/types/generated/clients.d.ts.map +1 -0
- package/dist/types/generated/clients.js +6 -0
- package/dist/types/generated/clients.js.map +1 -0
- package/dist/types/generated/connection-management.d.ts +210 -0
- package/dist/types/generated/connection-management.d.ts.map +1 -0
- package/dist/types/generated/connection-management.js +6 -0
- package/dist/types/generated/connection-management.js.map +1 -0
- package/dist/types/generated/crop-types.d.ts +541 -0
- package/dist/types/generated/crop-types.d.ts.map +1 -0
- package/dist/types/generated/crop-types.js +6 -0
- package/dist/types/generated/crop-types.js.map +1 -0
- package/dist/types/generated/equipment.d.ts +2599 -0
- package/dist/types/generated/equipment.d.ts.map +1 -0
- package/dist/types/generated/equipment.js +6 -0
- package/dist/types/generated/equipment.js.map +1 -0
- package/dist/types/generated/farms.d.ts +520 -0
- package/dist/types/generated/farms.d.ts.map +1 -0
- package/dist/types/generated/farms.js +6 -0
- package/dist/types/generated/farms.js.map +1 -0
- package/dist/types/generated/field-operations-api.d.ts +1724 -0
- package/dist/types/generated/field-operations-api.d.ts.map +1 -0
- package/dist/types/generated/field-operations-api.js +6 -0
- package/dist/types/generated/field-operations-api.js.map +1 -0
- package/dist/types/generated/fields.d.ts +904 -0
- package/dist/types/generated/fields.d.ts.map +1 -0
- package/dist/types/generated/fields.js +6 -0
- package/dist/types/generated/fields.js.map +1 -0
- package/dist/types/generated/files.d.ts +598 -0
- package/dist/types/generated/files.d.ts.map +1 -0
- package/dist/types/generated/files.js +6 -0
- package/dist/types/generated/files.js.map +1 -0
- package/dist/types/generated/flags.d.ts +593 -0
- package/dist/types/generated/flags.d.ts.map +1 -0
- package/dist/types/generated/flags.js +6 -0
- package/dist/types/generated/flags.js.map +1 -0
- package/dist/types/generated/guidance-lines.d.ts +405 -0
- package/dist/types/generated/guidance-lines.d.ts.map +1 -0
- package/dist/types/generated/guidance-lines.js +6 -0
- package/dist/types/generated/guidance-lines.js.map +1 -0
- package/dist/types/generated/index.d.ts +44 -0
- package/dist/types/generated/index.d.ts.map +1 -0
- package/dist/types/generated/index.js +26 -0
- package/dist/types/generated/index.js.map +1 -0
- package/dist/types/generated/map-layers.d.ts +696 -0
- package/dist/types/generated/map-layers.d.ts.map +1 -0
- package/dist/types/generated/map-layers.js +6 -0
- package/dist/types/generated/map-layers.js.map +1 -0
- package/dist/types/generated/operators.d.ts +361 -0
- package/dist/types/generated/operators.d.ts.map +1 -0
- package/dist/types/generated/operators.js +6 -0
- package/dist/types/generated/operators.js.map +1 -0
- package/dist/types/generated/organizations.d.ts +308 -0
- package/dist/types/generated/organizations.d.ts.map +1 -0
- package/dist/types/generated/organizations.js +6 -0
- package/dist/types/generated/organizations.js.map +1 -0
- package/dist/types/generated/products.d.ts +1165 -0
- package/dist/types/generated/products.d.ts.map +1 -0
- package/dist/types/generated/products.js +6 -0
- package/dist/types/generated/products.js.map +1 -0
- package/dist/types/generated/users.d.ts +96 -0
- package/dist/types/generated/users.d.ts.map +1 -0
- package/dist/types/generated/users.js +6 -0
- package/dist/types/generated/users.js.map +1 -0
- package/dist/types/generated/webhook.d.ts +475 -0
- package/dist/types/generated/webhook.d.ts.map +1 -0
- package/dist/types/generated/webhook.js +6 -0
- package/dist/types/generated/webhook.js.map +1 -0
- package/dist/types/index.d.ts +25 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +25 -0
- package/dist/types/index.js.map +1 -0
- package/package.json +70 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EquipmentApi
|
|
3
|
+
*
|
|
4
|
+
* Auto-generated SDK wrapper for John Deere equipment API.
|
|
5
|
+
* @generated from equipment.yaml
|
|
6
|
+
*/
|
|
7
|
+
import type { DeereClient, RequestOptions, PaginatedResponse } from '../client.js';
|
|
8
|
+
import type { components } from '../types/generated/equipment.js';
|
|
9
|
+
export declare class EquipmentApi {
|
|
10
|
+
private readonly client;
|
|
11
|
+
constructor(client: DeereClient);
|
|
12
|
+
/**
|
|
13
|
+
* Get equipment
|
|
14
|
+
* @description This resource allows the client to view the list of a user's equipment. It can be called with a filter for specific organizations, machine or implement types, but can also be called without a filter to provide a list of all equipment accessible by the user across each organization the user has access to. Equipment will only be returned from organizations the user has access to and are connected to the calling application. If the client requests multiple organizations in the filter, and a user or the client does not have access to that organization, the entire response will be a 403 Forbidden. Please see the OAuth 2 documentation <a href='#oAuth2' target='_blank'>here</a> for more details on obtaining a user token and connecting the user’s organizations to your application..
|
|
15
|
+
* @generated from GET /equipment
|
|
16
|
+
*/
|
|
17
|
+
get(params?: {
|
|
18
|
+
ids?: number[];
|
|
19
|
+
serialNumbers?: string[];
|
|
20
|
+
organizationIds?: number[];
|
|
21
|
+
principalIds?: number[];
|
|
22
|
+
capableOf?: 'Connectivity' | '!Connectivity';
|
|
23
|
+
categories?: 'Machine' | 'Implement';
|
|
24
|
+
organizationRoleType?: 'Controlling' | 'NonControlling';
|
|
25
|
+
archived?: boolean;
|
|
26
|
+
embed?: 'devices' | 'equipment' | 'icon' | 'pairingDetails';
|
|
27
|
+
pageOffset?: number;
|
|
28
|
+
itemLimit?: number;
|
|
29
|
+
}, options?: RequestOptions): Promise<unknown>;
|
|
30
|
+
/**
|
|
31
|
+
* Create equipment
|
|
32
|
+
* @description This resource allows the client to create a piece of equipment within a user’s organization. <br><br> <b>Getting Started</b><br>The process of contributing equipment to John Deere can be broken down into three primary steps. <ol> <li> Determine the Equipment’s model IDs</li> <li> Create the Equipment</li> <li> Contribute Measurements. Please see the <a href='/dev-docs/equipment-measurement' target='_blank'>Equipment Measurements (POST) API</a> for more information on uploading measurements for the created equipment.</li> </ol> <b>Determining the Equipment’s model</b> <ol> <li> Call the GET /equipmentMakes API endpoint to get a list of all equipment makes and a respective “id” of the equipment make you require.</li> <li> Call the GET /equipmentMakes/{id}/equipmentISGTypes endpoint to get a list of associated equipment ISG types for that specific equipment make and obtain a respective “id” for a specific ISG type you require.</li> <li> Call the GET /equipmentMakes/{id}/equipmentISGTypes/{id}/equipmentModels to obtain the final “id” of the equipment model you require.</li> <li> Alternatively, you may call the GET /equipmentModels endpoint if you know the model name you are searching for. For example /equipmentModels?equipmentModelName=9RX*&embed=make,isgType which will include all models with search string results and include make and isgType “id” as well as model “id”.</li> </ol> <b>Creating the Equipment</b><br/> Make a POST request to the /organizations/{orgId}/equipment API to create the piece of equipment in the user’s org. <ul> <li>In this request you will provide the type of the equipment, a serialNumber (optional), name (displayed to the user in Operations Center), and the equipment model IDs.</li> <ul> <li><b>type:</b> Machine or Implement</li> <li><b>serialNumber:</b> A string identifier that is 30 characters or fewer. Must be unique within an organization.</li> <li><b>name:</b> The name displayed in Operation Center, 30 characters or fewer. Must be unique within an organization.</li> <li><b>model:</b> The id for the Model of the vehicle, found from the API in the previous step of this document. </li> </ul> <li> A successful POST will result in a 201 Created response. The “location” header in the response will contain the URI to the new equipment, with the final segment being the organization specific machine ID (ie “https://equipmentapi.deere.com/isg/equipment/12345” is a link to the machine 12345).</li> <li>If you attempt to create a machine with a serialNumber that already exists in that organization, you get a response code 400 Bad Request. The body will include the error information.</li> </ul>
|
|
33
|
+
* @generated from POST /organizations/{organizationId}/equipment
|
|
34
|
+
*/
|
|
35
|
+
create(organizationId: string, data: Record<string, unknown>, options?: RequestOptions): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* View equipment details by Id
|
|
38
|
+
* @description This resource allows the client to view the details of one piece of equipment.
|
|
39
|
+
* @generated from GET /equipment/{id}
|
|
40
|
+
*/
|
|
41
|
+
getEquipment(id: string, params?: {
|
|
42
|
+
embed?: 'devices' | 'equipment' | 'pairingDetails' | 'icon' | 'offsets' | 'capabilities';
|
|
43
|
+
}, options?: RequestOptions): Promise<unknown>;
|
|
44
|
+
/**
|
|
45
|
+
* Update equipment
|
|
46
|
+
* @description This resource allows the client to update a piece of equipment within a user’s organization. Clients will only be able to update a piece of equipment that was contributed via the POST /equipment API. John Deere controlled equipment can only be managed via the Equipment application in Operations Center.
|
|
47
|
+
* @generated from PUT /equipment/{id}
|
|
48
|
+
*/
|
|
49
|
+
update(id: string, data: Record<string, unknown>, options?: RequestOptions): Promise<void>;
|
|
50
|
+
/**
|
|
51
|
+
* Delete equipment
|
|
52
|
+
* @description This resource allows the client to delete a piece of equipment within a user’s organization. Clients will only be able to delete a piece of equipment that was contributed via the POST /equipment API. John Deere controlled equipment can only be managed via the Equipment application in Operations Center.
|
|
53
|
+
* @generated from DELETE /equipment/{id}
|
|
54
|
+
*/
|
|
55
|
+
delete(id: string, options?: RequestOptions): Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* Get equipment makes
|
|
58
|
+
* @description This resource allows the client to view equipment makes and their associated IDs and names.
|
|
59
|
+
* @generated from GET /equipmentMakes
|
|
60
|
+
*/
|
|
61
|
+
list(options?: RequestOptions): Promise<unknown>;
|
|
62
|
+
/**
|
|
63
|
+
* Get all items (follows pagination automatically)
|
|
64
|
+
* @generated from GET /equipmentMakes
|
|
65
|
+
*/
|
|
66
|
+
listAll(options?: RequestOptions): Promise<unknown[]>;
|
|
67
|
+
/**
|
|
68
|
+
* View equipment by make Id
|
|
69
|
+
* @description This resource allows the client to view equipment makes by an equipment make ID.
|
|
70
|
+
* @generated from GET /equipmentMakes/{equipmentMakeId}
|
|
71
|
+
*/
|
|
72
|
+
getEquipmentmakes(equipmentMakeId: string, options?: RequestOptions): Promise<components['schemas']['equipment-make']>;
|
|
73
|
+
/**
|
|
74
|
+
* Get equipment types by make id
|
|
75
|
+
* @description This resource allows the client to view equipment types by providing an equipment make ID.
|
|
76
|
+
* @generated from GET /equipmentMakes/{equipmentMakeId}/equipmentTypes
|
|
77
|
+
*/
|
|
78
|
+
getEquipmenttypes(equipmentMakeId: string, options?: RequestOptions): Promise<PaginatedResponse<components['schemas']['equipment-type']>>;
|
|
79
|
+
/**
|
|
80
|
+
* Get equipment types
|
|
81
|
+
* @description This resource allows the client to view equipment types and their associated IDs and names.
|
|
82
|
+
* @generated from GET /equipmentTypes
|
|
83
|
+
*/
|
|
84
|
+
listEquipmenttypes(options?: RequestOptions): Promise<PaginatedResponse<components['schemas']['equipment-type']>>;
|
|
85
|
+
/**
|
|
86
|
+
* Get equipment models
|
|
87
|
+
* @description This resource allows the client to view equipment models in our reference database and their associated IDs and names.
|
|
88
|
+
* @generated from GET /equipmentModels
|
|
89
|
+
*/
|
|
90
|
+
listEquipmentmodels(params?: {
|
|
91
|
+
embed?: 'make' | 'type' | 'isgType';
|
|
92
|
+
equipmentModelName?: 'string or partial string with * wildcard search';
|
|
93
|
+
}, options?: RequestOptions): Promise<unknown>;
|
|
94
|
+
/**
|
|
95
|
+
* Get equipment ISG types
|
|
96
|
+
* @description This operation retrieves a list of Equipment ISG Types based on the supplied query parameters.
|
|
97
|
+
* @generated from GET /equipmentISGTypes
|
|
98
|
+
*/
|
|
99
|
+
listEquipmentisgtypes(params?: {
|
|
100
|
+
category?: 'machine' | 'implement';
|
|
101
|
+
deprecated?: 'false' | 'true' | 'all';
|
|
102
|
+
embed?: 'equipmentModels' | 'recordMetadata';
|
|
103
|
+
}, options?: RequestOptions): Promise<PaginatedResponse<components['schemas']['equipment-isg-type']>>;
|
|
104
|
+
/**
|
|
105
|
+
* Get equipment ISG types by make id
|
|
106
|
+
* @description This operation retrieves a list of Equipment ISG Types for given makeId. <br/>
|
|
107
|
+
* @generated from GET /equipmentMakes/{equipmentMakeId}/equipmentISGTypes
|
|
108
|
+
*/
|
|
109
|
+
getEquipmentisgtypes(equipmentMakeId: string, params?: {
|
|
110
|
+
deprecated?: 'false' | 'true' | 'all';
|
|
111
|
+
embed?: 'equipmentModels' | 'recordMetadata';
|
|
112
|
+
}, options?: RequestOptions): Promise<PaginatedResponse<components['schemas']['equipment-isg-type']>>;
|
|
113
|
+
/**
|
|
114
|
+
* Get equipment ISG type by make id and ISG type id
|
|
115
|
+
* @description This operation retrieves a single Equipment ISG Type for given makeId and isgTypeId.. <br/>
|
|
116
|
+
* @generated from GET /equipmentMakes/{equipmentMakeId}/equipmentISGTypes/{equipmentISGTypeId}
|
|
117
|
+
*/
|
|
118
|
+
getEquipmentisgtypes2(equipmentMakeId: string, equipmentISGTypeId: string, params?: {
|
|
119
|
+
embed?: 'equipmentModels' | 'recordMetadata';
|
|
120
|
+
}, options?: RequestOptions): Promise<components['schemas']['equipment-isg-type']>;
|
|
121
|
+
/**
|
|
122
|
+
* Get equipment models by make id and ISG type id
|
|
123
|
+
* @description This operation retrieves a list of Equipment Models based on given makeId and ISGtypeId.
|
|
124
|
+
* @generated from GET /equipmentMakes/{equipmentMakeId}/equipmentISGTypes/{equipmentISGTypeId}/equipmentModels
|
|
125
|
+
*/
|
|
126
|
+
getEquipmentmodels(equipmentMakeId: string, equipmentISGTypeId: string, params?: {
|
|
127
|
+
deprecated?: 'false' | 'true' | 'all';
|
|
128
|
+
organizationIds?: number[];
|
|
129
|
+
}, options?: RequestOptions): Promise<PaginatedResponse<components['schemas']['equipment-model']>>;
|
|
130
|
+
/**
|
|
131
|
+
* Get equipment model by make id, ISG type id and model id
|
|
132
|
+
* @description This operation retrieves a single Equipment Model based on given makeId, isgTypeId and modelId.
|
|
133
|
+
* @generated from GET /equipmentMakes/{equipmentMakeId}/equipmentISGTypes/{equipmentISGTypeId}/equipmentModels/{equipmentModelId}
|
|
134
|
+
*/
|
|
135
|
+
getEquipmentmodels2(equipmentMakeId: string, equipmentISGTypeId: string, equipmentModelId: string, options?: RequestOptions): Promise<components['schemas']['equipment-model']>;
|
|
136
|
+
}
|
|
137
|
+
export type { components as EquipmentTypes } from '../types/generated/equipment.js';
|
|
138
|
+
//# sourceMappingURL=equipment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":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AAC,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAS7P;;;;OAIG;IACG,mBAAmB,CAAC,eAAe,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,iBAAiB,CAAC,CAAC;CAItL;AAGD,YAAY,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EquipmentApi
|
|
3
|
+
*
|
|
4
|
+
* Auto-generated SDK wrapper for John Deere equipment API.
|
|
5
|
+
* @generated from equipment.yaml
|
|
6
|
+
*/
|
|
7
|
+
export class EquipmentApi {
|
|
8
|
+
client;
|
|
9
|
+
constructor(client) {
|
|
10
|
+
this.client = client;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Get equipment
|
|
14
|
+
* @description This resource allows the client to view the list of a user's equipment. It can be called with a filter for specific organizations, machine or implement types, but can also be called without a filter to provide a list of all equipment accessible by the user across each organization the user has access to. Equipment will only be returned from organizations the user has access to and are connected to the calling application. If the client requests multiple organizations in the filter, and a user or the client does not have access to that organization, the entire response will be a 403 Forbidden. Please see the OAuth 2 documentation <a href='#oAuth2' target='_blank'>here</a> for more details on obtaining a user token and connecting the user’s organizations to your application..
|
|
15
|
+
* @generated from GET /equipment
|
|
16
|
+
*/
|
|
17
|
+
async get(params, options) {
|
|
18
|
+
const query = new URLSearchParams();
|
|
19
|
+
if (params?.ids !== undefined)
|
|
20
|
+
query.set('ids', String(params.ids));
|
|
21
|
+
if (params?.serialNumbers !== undefined)
|
|
22
|
+
query.set('serialNumbers', String(params.serialNumbers));
|
|
23
|
+
if (params?.organizationIds !== undefined)
|
|
24
|
+
query.set('organizationIds', String(params.organizationIds));
|
|
25
|
+
if (params?.principalIds !== undefined)
|
|
26
|
+
query.set('principalIds', String(params.principalIds));
|
|
27
|
+
if (params?.capableOf !== undefined)
|
|
28
|
+
query.set('capableOf', String(params.capableOf));
|
|
29
|
+
if (params?.categories !== undefined)
|
|
30
|
+
query.set('categories', String(params.categories));
|
|
31
|
+
if (params?.organizationRoleType !== undefined)
|
|
32
|
+
query.set('organizationRole.type', String(params.organizationRoleType));
|
|
33
|
+
if (params?.archived !== undefined)
|
|
34
|
+
query.set('archived', String(params.archived));
|
|
35
|
+
if (params?.embed !== undefined)
|
|
36
|
+
query.set('embed', String(params.embed));
|
|
37
|
+
if (params?.pageOffset !== undefined)
|
|
38
|
+
query.set('pageOffset', String(params.pageOffset));
|
|
39
|
+
if (params?.itemLimit !== undefined)
|
|
40
|
+
query.set('itemLimit', String(params.itemLimit));
|
|
41
|
+
const queryString = query.toString();
|
|
42
|
+
const path = `/equipment${queryString ? `?${queryString}` : ''}`;
|
|
43
|
+
return this.client.get(path, options);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Create equipment
|
|
47
|
+
* @description This resource allows the client to create a piece of equipment within a user’s organization. <br><br> <b>Getting Started</b><br>The process of contributing equipment to John Deere can be broken down into three primary steps. <ol> <li> Determine the Equipment’s model IDs</li> <li> Create the Equipment</li> <li> Contribute Measurements. Please see the <a href='/dev-docs/equipment-measurement' target='_blank'>Equipment Measurements (POST) API</a> for more information on uploading measurements for the created equipment.</li> </ol> <b>Determining the Equipment’s model</b> <ol> <li> Call the GET /equipmentMakes API endpoint to get a list of all equipment makes and a respective “id” of the equipment make you require.</li> <li> Call the GET /equipmentMakes/{id}/equipmentISGTypes endpoint to get a list of associated equipment ISG types for that specific equipment make and obtain a respective “id” for a specific ISG type you require.</li> <li> Call the GET /equipmentMakes/{id}/equipmentISGTypes/{id}/equipmentModels to obtain the final “id” of the equipment model you require.</li> <li> Alternatively, you may call the GET /equipmentModels endpoint if you know the model name you are searching for. For example /equipmentModels?equipmentModelName=9RX*&embed=make,isgType which will include all models with search string results and include make and isgType “id” as well as model “id”.</li> </ol> <b>Creating the Equipment</b><br/> Make a POST request to the /organizations/{orgId}/equipment API to create the piece of equipment in the user’s org. <ul> <li>In this request you will provide the type of the equipment, a serialNumber (optional), name (displayed to the user in Operations Center), and the equipment model IDs.</li> <ul> <li><b>type:</b> Machine or Implement</li> <li><b>serialNumber:</b> A string identifier that is 30 characters or fewer. Must be unique within an organization.</li> <li><b>name:</b> The name displayed in Operation Center, 30 characters or fewer. Must be unique within an organization.</li> <li><b>model:</b> The id for the Model of the vehicle, found from the API in the previous step of this document. </li> </ul> <li> A successful POST will result in a 201 Created response. The “location” header in the response will contain the URI to the new equipment, with the final segment being the organization specific machine ID (ie “https://equipmentapi.deere.com/isg/equipment/12345” is a link to the machine 12345).</li> <li>If you attempt to create a machine with a serialNumber that already exists in that organization, you get a response code 400 Bad Request. The body will include the error information.</li> </ul>
|
|
48
|
+
* @generated from POST /organizations/{organizationId}/equipment
|
|
49
|
+
*/
|
|
50
|
+
async create(organizationId, data, options) {
|
|
51
|
+
const path = `/organizations/${organizationId}/equipment`;
|
|
52
|
+
await this.client.post(path, data, options);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* View equipment details by Id
|
|
56
|
+
* @description This resource allows the client to view the details of one piece of equipment.
|
|
57
|
+
* @generated from GET /equipment/{id}
|
|
58
|
+
*/
|
|
59
|
+
async getEquipment(id, params, options) {
|
|
60
|
+
const query = new URLSearchParams();
|
|
61
|
+
if (params?.embed !== undefined)
|
|
62
|
+
query.set('embed', String(params.embed));
|
|
63
|
+
const queryString = query.toString();
|
|
64
|
+
const path = `/equipment/${id}${queryString ? `?${queryString}` : ''}`;
|
|
65
|
+
return this.client.get(path, options);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Update equipment
|
|
69
|
+
* @description This resource allows the client to update a piece of equipment within a user’s organization. Clients will only be able to update a piece of equipment that was contributed via the POST /equipment API. John Deere controlled equipment can only be managed via the Equipment application in Operations Center.
|
|
70
|
+
* @generated from PUT /equipment/{id}
|
|
71
|
+
*/
|
|
72
|
+
async update(id, data, options) {
|
|
73
|
+
const path = `/equipment/${id}`;
|
|
74
|
+
await this.client.put(path, data, options);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Delete equipment
|
|
78
|
+
* @description This resource allows the client to delete a piece of equipment within a user’s organization. Clients will only be able to delete a piece of equipment that was contributed via the POST /equipment API. John Deere controlled equipment can only be managed via the Equipment application in Operations Center.
|
|
79
|
+
* @generated from DELETE /equipment/{id}
|
|
80
|
+
*/
|
|
81
|
+
async delete(id, options) {
|
|
82
|
+
const path = `/equipment/${id}`;
|
|
83
|
+
await this.client.delete(path, options);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Get equipment makes
|
|
87
|
+
* @description This resource allows the client to view equipment makes and their associated IDs and names.
|
|
88
|
+
* @generated from GET /equipmentMakes
|
|
89
|
+
*/
|
|
90
|
+
async list(options) {
|
|
91
|
+
const path = `/equipmentMakes`;
|
|
92
|
+
return this.client.get(path, options);
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Get all items (follows pagination automatically)
|
|
96
|
+
* @generated from GET /equipmentMakes
|
|
97
|
+
*/
|
|
98
|
+
async listAll(options) {
|
|
99
|
+
const path = `/equipmentMakes`;
|
|
100
|
+
return this.client.getAll(path, options);
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* View equipment by make Id
|
|
104
|
+
* @description This resource allows the client to view equipment makes by an equipment make ID.
|
|
105
|
+
* @generated from GET /equipmentMakes/{equipmentMakeId}
|
|
106
|
+
*/
|
|
107
|
+
async getEquipmentmakes(equipmentMakeId, options) {
|
|
108
|
+
const path = `/equipmentMakes/${equipmentMakeId}`;
|
|
109
|
+
return this.client.get(path, options);
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Get equipment types by make id
|
|
113
|
+
* @description This resource allows the client to view equipment types by providing an equipment make ID.
|
|
114
|
+
* @generated from GET /equipmentMakes/{equipmentMakeId}/equipmentTypes
|
|
115
|
+
*/
|
|
116
|
+
async getEquipmenttypes(equipmentMakeId, options) {
|
|
117
|
+
const path = `/equipmentMakes/${equipmentMakeId}/equipmentTypes`;
|
|
118
|
+
return this.client.get(path, options);
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Get equipment types
|
|
122
|
+
* @description This resource allows the client to view equipment types and their associated IDs and names.
|
|
123
|
+
* @generated from GET /equipmentTypes
|
|
124
|
+
*/
|
|
125
|
+
async listEquipmenttypes(options) {
|
|
126
|
+
const path = `/equipmentTypes`;
|
|
127
|
+
return this.client.get(path, options);
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Get equipment models
|
|
131
|
+
* @description This resource allows the client to view equipment models in our reference database and their associated IDs and names.
|
|
132
|
+
* @generated from GET /equipmentModels
|
|
133
|
+
*/
|
|
134
|
+
async listEquipmentmodels(params, options) {
|
|
135
|
+
const query = new URLSearchParams();
|
|
136
|
+
if (params?.embed !== undefined)
|
|
137
|
+
query.set('embed', String(params.embed));
|
|
138
|
+
if (params?.equipmentModelName !== undefined)
|
|
139
|
+
query.set('equipmentModelName', String(params.equipmentModelName));
|
|
140
|
+
const queryString = query.toString();
|
|
141
|
+
const path = `/equipmentModels${queryString ? `?${queryString}` : ''}`;
|
|
142
|
+
return this.client.get(path, options);
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Get equipment ISG types
|
|
146
|
+
* @description This operation retrieves a list of Equipment ISG Types based on the supplied query parameters.
|
|
147
|
+
* @generated from GET /equipmentISGTypes
|
|
148
|
+
*/
|
|
149
|
+
async listEquipmentisgtypes(params, options) {
|
|
150
|
+
const query = new URLSearchParams();
|
|
151
|
+
if (params?.category !== undefined)
|
|
152
|
+
query.set('category', String(params.category));
|
|
153
|
+
if (params?.deprecated !== undefined)
|
|
154
|
+
query.set('deprecated', String(params.deprecated));
|
|
155
|
+
if (params?.embed !== undefined)
|
|
156
|
+
query.set('embed', String(params.embed));
|
|
157
|
+
const queryString = query.toString();
|
|
158
|
+
const path = `/equipmentISGTypes${queryString ? `?${queryString}` : ''}`;
|
|
159
|
+
return this.client.get(path, options);
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Get equipment ISG types by make id
|
|
163
|
+
* @description This operation retrieves a list of Equipment ISG Types for given makeId. <br/>
|
|
164
|
+
* @generated from GET /equipmentMakes/{equipmentMakeId}/equipmentISGTypes
|
|
165
|
+
*/
|
|
166
|
+
async getEquipmentisgtypes(equipmentMakeId, params, options) {
|
|
167
|
+
const query = new URLSearchParams();
|
|
168
|
+
if (params?.deprecated !== undefined)
|
|
169
|
+
query.set('deprecated', String(params.deprecated));
|
|
170
|
+
if (params?.embed !== undefined)
|
|
171
|
+
query.set('embed', String(params.embed));
|
|
172
|
+
const queryString = query.toString();
|
|
173
|
+
const path = `/equipmentMakes/${equipmentMakeId}/equipmentISGTypes${queryString ? `?${queryString}` : ''}`;
|
|
174
|
+
return this.client.get(path, options);
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Get equipment ISG type by make id and ISG type id
|
|
178
|
+
* @description This operation retrieves a single Equipment ISG Type for given makeId and isgTypeId.. <br/>
|
|
179
|
+
* @generated from GET /equipmentMakes/{equipmentMakeId}/equipmentISGTypes/{equipmentISGTypeId}
|
|
180
|
+
*/
|
|
181
|
+
async getEquipmentisgtypes2(equipmentMakeId, equipmentISGTypeId, params, options) {
|
|
182
|
+
const query = new URLSearchParams();
|
|
183
|
+
if (params?.embed !== undefined)
|
|
184
|
+
query.set('embed', String(params.embed));
|
|
185
|
+
const queryString = query.toString();
|
|
186
|
+
const path = `/equipmentMakes/${equipmentMakeId}/equipmentISGTypes/${equipmentISGTypeId}${queryString ? `?${queryString}` : ''}`;
|
|
187
|
+
return this.client.get(path, options);
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Get equipment models by make id and ISG type id
|
|
191
|
+
* @description This operation retrieves a list of Equipment Models based on given makeId and ISGtypeId.
|
|
192
|
+
* @generated from GET /equipmentMakes/{equipmentMakeId}/equipmentISGTypes/{equipmentISGTypeId}/equipmentModels
|
|
193
|
+
*/
|
|
194
|
+
async getEquipmentmodels(equipmentMakeId, equipmentISGTypeId, params, options) {
|
|
195
|
+
const query = new URLSearchParams();
|
|
196
|
+
if (params?.deprecated !== undefined)
|
|
197
|
+
query.set('deprecated', String(params.deprecated));
|
|
198
|
+
if (params?.organizationIds !== undefined)
|
|
199
|
+
query.set('organizationIds', String(params.organizationIds));
|
|
200
|
+
const queryString = query.toString();
|
|
201
|
+
const path = `/equipmentMakes/${equipmentMakeId}/equipmentISGTypes/${equipmentISGTypeId}/equipmentModels${queryString ? `?${queryString}` : ''}`;
|
|
202
|
+
return this.client.get(path, options);
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Get equipment model by make id, ISG type id and model id
|
|
206
|
+
* @description This operation retrieves a single Equipment Model based on given makeId, isgTypeId and modelId.
|
|
207
|
+
* @generated from GET /equipmentMakes/{equipmentMakeId}/equipmentISGTypes/{equipmentISGTypeId}/equipmentModels/{equipmentModelId}
|
|
208
|
+
*/
|
|
209
|
+
async getEquipmentmodels2(equipmentMakeId, equipmentISGTypeId, equipmentModelId, options) {
|
|
210
|
+
const path = `/equipmentMakes/${equipmentMakeId}/equipmentISGTypes/${equipmentISGTypeId}/equipmentModels/${equipmentModelId}`;
|
|
211
|
+
return this.client.get(path, options);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
//# sourceMappingURL=equipment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"equipment.js","sourceRoot":"","sources":["../../src/api/equipment.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,MAAM,OAAO,YAAY;IACM;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IAEpD;;;;OAIG;IACH,KAAK,CAAC,GAAG,CAAC,MAAiX,EAAE,OAAwB;Q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mBAAmB,eAAe,sBAAsB,kBAAkB,oBAAoB,gBAAgB,EAAE,CAAC;QAC9H,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAA2C,IAAI,EAAE,OAAO,CAAC,CAAC;IAClF,CAAC;CACF"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FarmsApi
|
|
3
|
+
*
|
|
4
|
+
* Auto-generated SDK wrapper for John Deere farms API.
|
|
5
|
+
* @generated from farms.yaml
|
|
6
|
+
*/
|
|
7
|
+
import type { DeereClient, RequestOptions, PaginatedResponse } from '../client.js';
|
|
8
|
+
import type { components } from '../types/generated/farms.js';
|
|
9
|
+
export declare class FarmsApi {
|
|
10
|
+
private readonly client;
|
|
11
|
+
constructor(client: DeereClient);
|
|
12
|
+
/**
|
|
13
|
+
* View Farms in an Org
|
|
14
|
+
* @description Retrieve all of the farms for an organization
|
|
15
|
+
* @generated from GET /organizations/{orgId}/farms
|
|
16
|
+
*/
|
|
17
|
+
list(orgId: string, params?: {
|
|
18
|
+
embed?: string;
|
|
19
|
+
recordFilter?: 'available' | 'archived' | 'all';
|
|
20
|
+
}, options?: RequestOptions): Promise<unknown>;
|
|
21
|
+
/**
|
|
22
|
+
* Get all items (follows pagination automatically)
|
|
23
|
+
* @generated from GET /organizations/{orgId}/farms
|
|
24
|
+
*/
|
|
25
|
+
listAll(orgId: string, params?: {
|
|
26
|
+
embed?: string;
|
|
27
|
+
recordFilter?: 'available' | 'archived' | 'all';
|
|
28
|
+
}, options?: RequestOptions): Promise<unknown[]>;
|
|
29
|
+
/**
|
|
30
|
+
* Create Farm
|
|
31
|
+
* @description Create a farm for a given organization
|
|
32
|
+
* @generated from POST /organizations/{orgId}/farms
|
|
33
|
+
*/
|
|
34
|
+
create(orgId: string, data: Record<string, unknown>, options?: RequestOptions): Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* View a Farm
|
|
37
|
+
* @description Get farm by organization and farmId
|
|
38
|
+
* @generated from GET /organizations/{orgId}/farms/{farmId}
|
|
39
|
+
*/
|
|
40
|
+
get(orgId: string, farmId: string, params?: {
|
|
41
|
+
embed?: string;
|
|
42
|
+
}, options?: RequestOptions): Promise<unknown>;
|
|
43
|
+
/**
|
|
44
|
+
* Update a Farm
|
|
45
|
+
* @description Update farm by Id
|
|
46
|
+
* @generated from PUT /organizations/{orgId}/farms/{farmId}
|
|
47
|
+
*/
|
|
48
|
+
update(orgId: string, farmId: string, data: Record<string, unknown>, options?: RequestOptions): Promise<void>;
|
|
49
|
+
/**
|
|
50
|
+
* Delete a Farm
|
|
51
|
+
* @description Delete a farm by Id
|
|
52
|
+
* @generated from DELETE /organizations/{orgId}/farms/{farmId}
|
|
53
|
+
*/
|
|
54
|
+
delete(orgId: string, farmId: string, options?: RequestOptions): Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* View Clients that Own a Farm
|
|
57
|
+
* @description Get clients by organization and farmId
|
|
58
|
+
* @generated from GET /organizations/{orgId}/farms/{farmId}/clients
|
|
59
|
+
*/
|
|
60
|
+
listClients(orgId: string, farmId: string, options?: RequestOptions): Promise<unknown>;
|
|
61
|
+
/**
|
|
62
|
+
* View a Farm's Field
|
|
63
|
+
* @description View details on the field to which a specified farm belongs. The response will link to the following resources: <ul> <li><b>boundaries:</b> View the boundaries of this field.</li> <li><b>clients:</b> View the clients associated with this field.</li> <li><b>farms:</b> View the farms belonging to this field.</li> <li><b>owningOrganization:</b> View the organization that owns the field.</li> <li><b>activeBoundary:</b> View the active boundary of this field.</li> </ul>
|
|
64
|
+
* @generated from GET /organizations/{orgID}/farms/{id}/fields
|
|
65
|
+
*/
|
|
66
|
+
listFields(orgID: string, id: string, options?: RequestOptions): Promise<PaginatedResponse<components['schemas']['FieldResponse2']>>;
|
|
67
|
+
}
|
|
68
|
+
export type { components as FarmsTypes } from '../types/generated/farms.js';
|
|
69
|
+
//# sourceMappingURL=farms.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"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AE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAKnH;;;;OAIG;IACG,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAKpF;;;;OAIG;IACG,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC;IAK5F;;;;OAIG;IACG,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,iBAAiB,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC;CAI3I;AAGD,YAAY,EAAE,UAAU,IAAI,UAAU,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FarmsApi
|
|
3
|
+
*
|
|
4
|
+
* Auto-generated SDK wrapper for John Deere farms API.
|
|
5
|
+
* @generated from farms.yaml
|
|
6
|
+
*/
|
|
7
|
+
export class FarmsApi {
|
|
8
|
+
client;
|
|
9
|
+
constructor(client) {
|
|
10
|
+
this.client = client;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* View Farms in an Org
|
|
14
|
+
* @description Retrieve all of the farms for an organization
|
|
15
|
+
* @generated from GET /organizations/{orgId}/farms
|
|
16
|
+
*/
|
|
17
|
+
async list(orgId, params, options) {
|
|
18
|
+
const query = new URLSearchParams();
|
|
19
|
+
if (params?.embed !== undefined)
|
|
20
|
+
query.set('embed', String(params.embed));
|
|
21
|
+
if (params?.recordFilter !== undefined)
|
|
22
|
+
query.set('recordFilter', String(params.recordFilter));
|
|
23
|
+
const queryString = query.toString();
|
|
24
|
+
const path = `/organizations/${orgId}/farms${queryString ? `?${queryString}` : ''}`;
|
|
25
|
+
return this.client.get(path, options);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Get all items (follows pagination automatically)
|
|
29
|
+
* @generated from GET /organizations/{orgId}/farms
|
|
30
|
+
*/
|
|
31
|
+
async listAll(orgId, params, options) {
|
|
32
|
+
const query = new URLSearchParams();
|
|
33
|
+
if (params?.embed !== undefined)
|
|
34
|
+
query.set('embed', String(params.embed));
|
|
35
|
+
if (params?.recordFilter !== undefined)
|
|
36
|
+
query.set('recordFilter', String(params.recordFilter));
|
|
37
|
+
const queryString = query.toString();
|
|
38
|
+
const path = `/organizations/${orgId}/farms${queryString ? `?${queryString}` : ''}`;
|
|
39
|
+
return this.client.getAll(path, options);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Create Farm
|
|
43
|
+
* @description Create a farm for a given organization
|
|
44
|
+
* @generated from POST /organizations/{orgId}/farms
|
|
45
|
+
*/
|
|
46
|
+
async create(orgId, data, options) {
|
|
47
|
+
const path = `/organizations/${orgId}/farms`;
|
|
48
|
+
await this.client.post(path, data, options);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* View a Farm
|
|
52
|
+
* @description Get farm by organization and farmId
|
|
53
|
+
* @generated from GET /organizations/{orgId}/farms/{farmId}
|
|
54
|
+
*/
|
|
55
|
+
async get(orgId, farmId, params, options) {
|
|
56
|
+
const query = new URLSearchParams();
|
|
57
|
+
if (params?.embed !== undefined)
|
|
58
|
+
query.set('embed', String(params.embed));
|
|
59
|
+
const queryString = query.toString();
|
|
60
|
+
const path = `/organizations/${orgId}/farms/${farmId}${queryString ? `?${queryString}` : ''}`;
|
|
61
|
+
return this.client.get(path, options);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Update a Farm
|
|
65
|
+
* @description Update farm by Id
|
|
66
|
+
* @generated from PUT /organizations/{orgId}/farms/{farmId}
|
|
67
|
+
*/
|
|
68
|
+
async update(orgId, farmId, data, options) {
|
|
69
|
+
const path = `/organizations/${orgId}/farms/${farmId}`;
|
|
70
|
+
await this.client.put(path, data, options);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Delete a Farm
|
|
74
|
+
* @description Delete a farm by Id
|
|
75
|
+
* @generated from DELETE /organizations/{orgId}/farms/{farmId}
|
|
76
|
+
*/
|
|
77
|
+
async delete(orgId, farmId, options) {
|
|
78
|
+
const path = `/organizations/${orgId}/farms/${farmId}`;
|
|
79
|
+
await this.client.delete(path, options);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* View Clients that Own a Farm
|
|
83
|
+
* @description Get clients by organization and farmId
|
|
84
|
+
* @generated from GET /organizations/{orgId}/farms/{farmId}/clients
|
|
85
|
+
*/
|
|
86
|
+
async listClients(orgId, farmId, options) {
|
|
87
|
+
const path = `/organizations/${orgId}/farms/${farmId}/clients`;
|
|
88
|
+
return this.client.get(path, options);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* View a Farm's Field
|
|
92
|
+
* @description View details on the field to which a specified farm belongs. The response will link to the following resources: <ul> <li><b>boundaries:</b> View the boundaries of this field.</li> <li><b>clients:</b> View the clients associated with this field.</li> <li><b>farms:</b> View the farms belonging to this field.</li> <li><b>owningOrganization:</b> View the organization that owns the field.</li> <li><b>activeBoundary:</b> View the active boundary of this field.</li> </ul>
|
|
93
|
+
* @generated from GET /organizations/{orgID}/farms/{id}/fields
|
|
94
|
+
*/
|
|
95
|
+
async listFields(orgID, id, options) {
|
|
96
|
+
const path = `/organizations/${orgID}/farms/${id}/fields`;
|
|
97
|
+
return this.client.get(path, options);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=farms.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"farms.js","sourceRoot":"","sources":["../../src/api/farms.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,MAA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KAAK,CAAC,MAAM,CAAC,KAAa,EAAE,MAAc,EAAE,OAAwB;QAClE,MAAM,IAAI,GAAG,kBAAkB,KAAK,UAAU,MAAM,EAAE,CAAC;QACvD,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC1C,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,WAAW,CAAC,KAAa,EAAE,MAAc,EAAE,OAAwB;QACvE,MAAM,IAAI,GAAG,kBAAkB,KAAK,UAAU,MAAM,UAAU,CAAC;QAC/D,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAU,IAAI,EAAE,OAAO,CAAC,CAAC;IACjD,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,UAAU,CAAC,KAAa,EAAE,EAAU,EAAE,OAAwB;QAClE,MAAM,IAAI,GAAG,kBAAkB,KAAK,UAAU,EAAE,SAAS,CAAC;QAC1D,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAA6D,IAAI,EAAE,OAAO,CAAC,CAAC;IACpG,CAAC;CACF"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FieldOperationsApi
|
|
3
|
+
*
|
|
4
|
+
* Auto-generated SDK wrapper for John Deere field-operations-api API.
|
|
5
|
+
* @generated from field-operations-api.yaml
|
|
6
|
+
*/
|
|
7
|
+
import type { DeereClient, RequestOptions } from '../client.js';
|
|
8
|
+
export declare class FieldOperationsApi {
|
|
9
|
+
private readonly client;
|
|
10
|
+
constructor(client: DeereClient);
|
|
11
|
+
/**
|
|
12
|
+
* List Field Operations
|
|
13
|
+
* @description This resource returns logical data structures representing the agronomic operations performed in a field. Supported field operation types include Seeding, Application, and Harvest. A single field operation may potentially span consecutive days depending on the type of operation. Each field operation may have one or more measurements, listed as links from the field operation itself. Each field operation will include links to: <br/> <ul> <li><b>organization:</b> The organization which owns this data.</li> <li><b>field:</b> The field in which this operation was performed.</li> <li><b>self:</b> The field operation.</li> </ul>
|
|
14
|
+
* @generated from GET /organizations/{orgId}/fields/{fieldId}/fieldOperations
|
|
15
|
+
*/
|
|
16
|
+
list(orgId: string, fieldId: string, params?: {
|
|
17
|
+
cropSeason?: string;
|
|
18
|
+
fieldOperationType?: string;
|
|
19
|
+
startDate?: string;
|
|
20
|
+
endDate?: string;
|
|
21
|
+
embed?: 'measurementTypes';
|
|
22
|
+
workPlanIds?: unknown;
|
|
23
|
+
}, options?: RequestOptions): Promise<unknown>;
|
|
24
|
+
/**
|
|
25
|
+
* Get all items (follows pagination automatically)
|
|
26
|
+
* @generated from GET /organizations/{orgId}/fields/{fieldId}/fieldOperations
|
|
27
|
+
*/
|
|
28
|
+
listAll(orgId: string, fieldId: string, params?: {
|
|
29
|
+
cropSeason?: string;
|
|
30
|
+
fieldOperationType?: string;
|
|
31
|
+
startDate?: string;
|
|
32
|
+
endDate?: string;
|
|
33
|
+
embed?: 'measurementTypes';
|
|
34
|
+
workPlanIds?: unknown;
|
|
35
|
+
}, options?: RequestOptions): Promise<unknown[]>;
|
|
36
|
+
/**
|
|
37
|
+
* View a Field Operation
|
|
38
|
+
* @description View a single field operation. The response will include links to: <br/> <ul> <li><b>organization:</b> The organization which owns this data.</li> <li><b>field:</b> The field in which this operation was performed.</li> <li><b>self:</b> The field operation.</li> <ul>
|
|
39
|
+
* @generated from GET /fieldOperations/{operationId}
|
|
40
|
+
*/
|
|
41
|
+
get(operationId: string, params?: {
|
|
42
|
+
embed?: 'measurementTypes';
|
|
43
|
+
}, options?: RequestOptions): Promise<unknown>;
|
|
44
|
+
/**
|
|
45
|
+
* Asynchronous Shapefile Download
|
|
46
|
+
* @description An ESRI Shapefile is available for each Field Operation. <b>Please see the <a href=/dev-docs/field-operations#shapefile-overview>shapefiles overview</a> for details</b> on the shapefile format and how to consume it.<p>The expected response codes are:</p> <ul> <li><b>202 Accepted – </b>The request was received and is being processed. Call back later to check for completion. <ul> <li>This API does not currently support webhooks. To check for completion, repeat the same API call until you get an HTTP 307.</li> <li>Processing may take up to 30 minutes, depending on the size of data. Applications should poll the API using a backoff loop. Polling intervals should start at 5 seconds and double with each attempt: <mark>secondsToWait = 5 * 2 ^ (numberOfAttempts - 1)</mark></li> </ul> </li> <li><b>307 Temporary Redirect – </b>The shapefile is ready to download. This response contains a location header. The location is a pre-signed URL that is valid for no less than one hour. To download the file, perform a GET request to the URL in the location header. Do not apply OAuth signing or other authorization to this request - it will cause the call to fail. </li> <li><b>406 Not Acceptable - </b>A shapefile cannot be generated. </li> </ul> Note the initial call for a shapefile may receive either a 202 or a 307 response, depending upon whether an up-to-date file already exists for the specified field operation. <br/><br/>For a sample integration, see our <a href=https://github.com/JohnDeere/MyJohnDeereAPI-OAuth2-Java-Example>Java sample code</a>.
|
|
47
|
+
* @generated from GET /fieldOps/{operationId}
|
|
48
|
+
*/
|
|
49
|
+
getFieldops(operationId: string, params?: {
|
|
50
|
+
splitShapeFile?: boolean;
|
|
51
|
+
shapeType?: 'Point' | 'Polygon';
|
|
52
|
+
resolution?: 'EachSection' | 'EachSensor' | 'OneHertz';
|
|
53
|
+
}, options?: RequestOptions): Promise<unknown>;
|
|
54
|
+
}
|
|
55
|
+
export type { components as FieldOperationsApiTypes } from '../types/generated/field-operations-api.js';
|
|
56
|
+
//# sourceMappingURL=field-operations-api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-operations-api.d.ts","sourceRoot":"","sources":["../../src/api/field-operations-api.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAqB,MAAM,cAAc,CAAC;AAGnF,qBAAa,kBAAkB;IACjB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,WAAW;IAEhD;;;;OAIG;IACG,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAA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