@anduril-industries/lattice-sdk 4.11.0 → 4.13.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/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/errors/BadRequestError.js +1 -1
- package/dist/cjs/api/errors/ContentTooLargeError.js +1 -1
- package/dist/cjs/api/errors/InsufficientStorageError.js +1 -1
- package/dist/cjs/api/errors/InternalServerError.js +1 -1
- package/dist/cjs/api/errors/NotFoundError.js +1 -1
- package/dist/cjs/api/errors/RequestTimeoutError.js +1 -1
- package/dist/cjs/api/errors/TooManyRequestsError.js +1 -1
- package/dist/cjs/api/errors/UnauthorizedError.js +1 -1
- package/dist/cjs/api/resources/entities/client/Client.d.ts +0 -2
- package/dist/cjs/api/resources/entities/client/Client.js +0 -2
- package/dist/cjs/api/resources/oauth/client/Client.d.ts +0 -2
- package/dist/cjs/api/resources/oauth/client/Client.js +0 -2
- package/dist/cjs/api/resources/objects/client/Client.d.ts +0 -30
- package/dist/cjs/api/resources/objects/client/Client.js +0 -92
- package/dist/cjs/api/resources/objects/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/tasks/client/Client.d.ts +0 -8
- package/dist/cjs/api/resources/tasks/client/Client.js +0 -8
- package/dist/cjs/api/types/Color.d.ts +3 -3
- package/dist/cjs/api/types/GeoDetails.d.ts +1 -0
- package/dist/cjs/api/types/GeoVisualDetails.d.ts +10 -0
- package/dist/cjs/api/types/index.d.ts +1 -2
- package/dist/cjs/api/types/index.js +1 -2
- package/dist/cjs/core/fetcher/getResponseBody.js +11 -0
- package/dist/cjs/core/fetcher/signals.js +9 -1
- package/dist/cjs/errors/LatticeError.js +1 -1
- package/dist/cjs/errors/LatticeTimeoutError.js +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/errors/BadRequestError.mjs +1 -1
- package/dist/esm/api/errors/ContentTooLargeError.mjs +1 -1
- package/dist/esm/api/errors/InsufficientStorageError.mjs +1 -1
- package/dist/esm/api/errors/InternalServerError.mjs +1 -1
- package/dist/esm/api/errors/NotFoundError.mjs +1 -1
- package/dist/esm/api/errors/RequestTimeoutError.mjs +1 -1
- package/dist/esm/api/errors/TooManyRequestsError.mjs +1 -1
- package/dist/esm/api/errors/UnauthorizedError.mjs +1 -1
- package/dist/esm/api/resources/entities/client/Client.d.mts +0 -2
- package/dist/esm/api/resources/entities/client/Client.mjs +0 -2
- package/dist/esm/api/resources/oauth/client/Client.d.mts +0 -2
- package/dist/esm/api/resources/oauth/client/Client.mjs +0 -2
- package/dist/esm/api/resources/objects/client/Client.d.mts +0 -30
- package/dist/esm/api/resources/objects/client/Client.mjs +0 -92
- package/dist/esm/api/resources/objects/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/tasks/client/Client.d.mts +0 -8
- package/dist/esm/api/resources/tasks/client/Client.mjs +0 -8
- package/dist/esm/api/types/Color.d.mts +3 -3
- package/dist/esm/api/types/GeoDetails.d.mts +1 -0
- package/dist/esm/api/types/GeoVisualDetails.d.mts +10 -0
- package/dist/esm/api/types/index.d.mts +1 -2
- package/dist/esm/api/types/index.mjs +1 -2
- package/dist/esm/core/fetcher/getResponseBody.mjs +11 -0
- package/dist/esm/core/fetcher/signals.mjs +9 -1
- package/dist/esm/errors/LatticeError.mjs +1 -1
- package/dist/esm/errors/LatticeTimeoutError.mjs +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +0 -79
- package/dist/cjs/api/resources/objects/client/requests/ListDeletedObjectsRequest.d.ts +0 -10
- package/dist/cjs/api/types/DeletedObjectEntry.d.ts +0 -15
- package/dist/cjs/api/types/DeletedObjectEntry.js +0 -3
- package/dist/cjs/api/types/ListDeletedObjectsResponse.d.ts +0 -6
- package/dist/cjs/api/types/ListDeletedObjectsResponse.js +0 -3
- package/dist/esm/api/resources/objects/client/requests/ListDeletedObjectsRequest.d.mts +0 -10
- package/dist/esm/api/types/DeletedObjectEntry.d.mts +0 -15
- package/dist/esm/api/types/DeletedObjectEntry.mjs +0 -2
- package/dist/esm/api/types/ListDeletedObjectsResponse.d.mts +0 -6
- package/dist/esm/api/types/ListDeletedObjectsResponse.mjs +0 -2
- /package/dist/cjs/api/{resources/objects/client/requests/ListDeletedObjectsRequest.js → types/GeoVisualDetails.js} +0 -0
- /package/dist/esm/api/{resources/objects/client/requests/ListDeletedObjectsRequest.mjs → types/GeoVisualDetails.mjs} +0 -0
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "@anduril-industries/lattice-sdk",
|
|
46
|
-
"X-Fern-SDK-Version": "4.
|
|
47
|
-
"User-Agent": "@anduril-industries/lattice-sdk/4.
|
|
46
|
+
"X-Fern-SDK-Version": "4.13.0",
|
|
47
|
+
"User-Agent": "@anduril-industries/lattice-sdk/4.13.0",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -48,7 +48,7 @@ class BadRequestError extends errors.LatticeError {
|
|
|
48
48
|
if (Error.captureStackTrace) {
|
|
49
49
|
Error.captureStackTrace(this, this.constructor);
|
|
50
50
|
}
|
|
51
|
-
this.name =
|
|
51
|
+
this.name = "BadRequestError";
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
exports.BadRequestError = BadRequestError;
|
|
@@ -48,7 +48,7 @@ class ContentTooLargeError extends errors.LatticeError {
|
|
|
48
48
|
if (Error.captureStackTrace) {
|
|
49
49
|
Error.captureStackTrace(this, this.constructor);
|
|
50
50
|
}
|
|
51
|
-
this.name =
|
|
51
|
+
this.name = "ContentTooLargeError";
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
exports.ContentTooLargeError = ContentTooLargeError;
|
|
@@ -48,7 +48,7 @@ class InsufficientStorageError extends errors.LatticeError {
|
|
|
48
48
|
if (Error.captureStackTrace) {
|
|
49
49
|
Error.captureStackTrace(this, this.constructor);
|
|
50
50
|
}
|
|
51
|
-
this.name =
|
|
51
|
+
this.name = "InsufficientStorageError";
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
exports.InsufficientStorageError = InsufficientStorageError;
|
|
@@ -48,7 +48,7 @@ class InternalServerError extends errors.LatticeError {
|
|
|
48
48
|
if (Error.captureStackTrace) {
|
|
49
49
|
Error.captureStackTrace(this, this.constructor);
|
|
50
50
|
}
|
|
51
|
-
this.name =
|
|
51
|
+
this.name = "InternalServerError";
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
exports.InternalServerError = InternalServerError;
|
|
@@ -48,7 +48,7 @@ class NotFoundError extends errors.LatticeError {
|
|
|
48
48
|
if (Error.captureStackTrace) {
|
|
49
49
|
Error.captureStackTrace(this, this.constructor);
|
|
50
50
|
}
|
|
51
|
-
this.name =
|
|
51
|
+
this.name = "NotFoundError";
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
exports.NotFoundError = NotFoundError;
|
|
@@ -48,7 +48,7 @@ class RequestTimeoutError extends errors.LatticeError {
|
|
|
48
48
|
if (Error.captureStackTrace) {
|
|
49
49
|
Error.captureStackTrace(this, this.constructor);
|
|
50
50
|
}
|
|
51
|
-
this.name =
|
|
51
|
+
this.name = "RequestTimeoutError";
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
exports.RequestTimeoutError = RequestTimeoutError;
|
|
@@ -48,7 +48,7 @@ class TooManyRequestsError extends errors.LatticeError {
|
|
|
48
48
|
if (Error.captureStackTrace) {
|
|
49
49
|
Error.captureStackTrace(this, this.constructor);
|
|
50
50
|
}
|
|
51
|
-
this.name =
|
|
51
|
+
this.name = "TooManyRequestsError";
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
exports.TooManyRequestsError = TooManyRequestsError;
|
|
@@ -48,7 +48,7 @@ class UnauthorizedError extends errors.LatticeError {
|
|
|
48
48
|
if (Error.captureStackTrace) {
|
|
49
49
|
Error.captureStackTrace(this, this.constructor);
|
|
50
50
|
}
|
|
51
|
-
this.name =
|
|
51
|
+
this.name = "UnauthorizedError";
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
exports.UnauthorizedError = UnauthorizedError;
|
|
@@ -118,8 +118,6 @@ export declare class EntitiesClient {
|
|
|
118
118
|
longPollEntityEvents(request: Lattice.EntityEventRequest, requestOptions?: EntitiesClient.RequestOptions): core.HttpResponsePromise<Lattice.EntityEventResponse>;
|
|
119
119
|
private __longPollEntityEvents;
|
|
120
120
|
/**
|
|
121
|
-
* @beta This endpoint is in pre-release and may change.
|
|
122
|
-
*
|
|
123
121
|
* Establishes a server-sent events (SSE) connection that streams entity data in real-time.
|
|
124
122
|
* This is a one-way connection from server to client that follows the SSE protocol with text/event-stream content type.
|
|
125
123
|
*
|
|
@@ -383,8 +383,6 @@ class EntitiesClient {
|
|
|
383
383
|
});
|
|
384
384
|
}
|
|
385
385
|
/**
|
|
386
|
-
* @beta This endpoint is in pre-release and may change.
|
|
387
|
-
*
|
|
388
386
|
* Establishes a server-sent events (SSE) connection that streams entity data in real-time.
|
|
389
387
|
* This is a one-way connection from server to client that follows the SSE protocol with text/event-stream content type.
|
|
390
388
|
*
|
|
@@ -11,8 +11,6 @@ export declare class OauthClient {
|
|
|
11
11
|
protected readonly _options: NormalizedClientOptionsWithAuth<OauthClient.Options>;
|
|
12
12
|
constructor(options: OauthClient.Options);
|
|
13
13
|
/**
|
|
14
|
-
* @beta This endpoint is in pre-release and may change.
|
|
15
|
-
*
|
|
16
14
|
* Gets a new short-lived token using the specified client credentials
|
|
17
15
|
*
|
|
18
16
|
* @param {Lattice.GetTokenRequest} request
|
|
@@ -56,8 +56,6 @@ class OauthClient {
|
|
|
56
56
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
59
|
-
* @beta This endpoint is in pre-release and may change.
|
|
60
|
-
*
|
|
61
59
|
* Gets a new short-lived token using the specified client credentials
|
|
62
60
|
*
|
|
63
61
|
* @param {Lattice.GetTokenRequest} request
|
|
@@ -14,8 +14,6 @@ export declare class ObjectsClient {
|
|
|
14
14
|
protected readonly _options: NormalizedClientOptionsWithAuth<ObjectsClient.Options>;
|
|
15
15
|
constructor(options: ObjectsClient.Options);
|
|
16
16
|
/**
|
|
17
|
-
* @beta This endpoint is in pre-release and may change.
|
|
18
|
-
*
|
|
19
17
|
* Lists objects in your environment. You can define a prefix to list a subset of your objects. If you do not set a prefix, Lattice returns all available objects. By default this endpoint will list local objects only.
|
|
20
18
|
*
|
|
21
19
|
* @param {Lattice.ListObjectsRequest} request
|
|
@@ -30,28 +28,6 @@ export declare class ObjectsClient {
|
|
|
30
28
|
*/
|
|
31
29
|
listObjects(request?: Lattice.ListObjectsRequest, requestOptions?: ObjectsClient.RequestOptions): Promise<core.Page<Lattice.PathMetadata, Lattice.ListResponse>>;
|
|
32
30
|
/**
|
|
33
|
-
* @beta This endpoint is in pre-release and may change.
|
|
34
|
-
*
|
|
35
|
-
* Returns paginated records of force-distributed objects deleted on the
|
|
36
|
-
* local node. Useful for operators diagnosing why an object visible on
|
|
37
|
-
* one node is missing on another. Each record identifies the exact
|
|
38
|
-
* `(path, checksum)` pair suppressed from re-sync by the distribution
|
|
39
|
-
* manager. Node-scoped: each node returns only its own records.
|
|
40
|
-
*
|
|
41
|
-
* @param {Lattice.ListDeletedObjectsRequest} request
|
|
42
|
-
* @param {ObjectsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
43
|
-
*
|
|
44
|
-
* @throws {@link Lattice.BadRequestError}
|
|
45
|
-
* @throws {@link Lattice.UnauthorizedError}
|
|
46
|
-
* @throws {@link Lattice.InternalServerError}
|
|
47
|
-
*
|
|
48
|
-
* @example
|
|
49
|
-
* await client.objects.listDeletedObjects()
|
|
50
|
-
*/
|
|
51
|
-
listDeletedObjects(request?: Lattice.ListDeletedObjectsRequest, requestOptions?: ObjectsClient.RequestOptions): Promise<core.Page<Lattice.DeletedObjectEntry, Lattice.ListDeletedObjectsResponse>>;
|
|
52
|
-
/**
|
|
53
|
-
* @beta This endpoint is in pre-release and may change.
|
|
54
|
-
*
|
|
55
31
|
* Fetches an object from your environment using the objectPath path parameter.
|
|
56
32
|
*
|
|
57
33
|
* @throws {@link Lattice.BadRequestError}
|
|
@@ -62,8 +38,6 @@ export declare class ObjectsClient {
|
|
|
62
38
|
getObject(request: Lattice.GetObjectRequest, requestOptions?: ObjectsClient.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
|
|
63
39
|
private __getObject;
|
|
64
40
|
/**
|
|
65
|
-
* @beta This endpoint is in pre-release and may change.
|
|
66
|
-
*
|
|
67
41
|
* Uploads an object. The object must be 1 GiB or smaller.
|
|
68
42
|
*
|
|
69
43
|
* @param {core.file.Uploadable} uploadable
|
|
@@ -83,8 +57,6 @@ export declare class ObjectsClient {
|
|
|
83
57
|
uploadObject(uploadable: core.file.Uploadable, objectPath: string, requestOptions?: ObjectsClient.RequestOptions): core.HttpResponsePromise<Lattice.PathMetadata>;
|
|
84
58
|
private __uploadObject;
|
|
85
59
|
/**
|
|
86
|
-
* @beta This endpoint is in pre-release and may change.
|
|
87
|
-
*
|
|
88
60
|
* Deletes an object from your environment given the objectPath path parameter.
|
|
89
61
|
*
|
|
90
62
|
* @param {Lattice.DeleteObjectRequest} request
|
|
@@ -103,8 +75,6 @@ export declare class ObjectsClient {
|
|
|
103
75
|
deleteObject(request: Lattice.DeleteObjectRequest, requestOptions?: ObjectsClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
104
76
|
private __deleteObject;
|
|
105
77
|
/**
|
|
106
|
-
* @beta This endpoint is in pre-release and may change.
|
|
107
|
-
*
|
|
108
78
|
* Returns metadata for a specified object path. Use this to fetch metadata such as object size (size_bytes), its expiry time (expiry_time), or its latest update timestamp (last_updated_at).
|
|
109
79
|
*
|
|
110
80
|
* @param {Lattice.GetObjectMetadataRequest} request
|
|
@@ -59,8 +59,6 @@ class ObjectsClient {
|
|
|
59
59
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
|
-
* @beta This endpoint is in pre-release and may change.
|
|
63
|
-
*
|
|
64
62
|
* Lists objects in your environment. You can define a prefix to list a subset of your objects. If you do not set a prefix, Lattice returns all available objects. By default this endpoint will list local objects only.
|
|
65
63
|
*
|
|
66
64
|
* @param {Lattice.ListObjectsRequest} request
|
|
@@ -137,90 +135,6 @@ class ObjectsClient {
|
|
|
137
135
|
});
|
|
138
136
|
}
|
|
139
137
|
/**
|
|
140
|
-
* @beta This endpoint is in pre-release and may change.
|
|
141
|
-
*
|
|
142
|
-
* Returns paginated records of force-distributed objects deleted on the
|
|
143
|
-
* local node. Useful for operators diagnosing why an object visible on
|
|
144
|
-
* one node is missing on another. Each record identifies the exact
|
|
145
|
-
* `(path, checksum)` pair suppressed from re-sync by the distribution
|
|
146
|
-
* manager. Node-scoped: each node returns only its own records.
|
|
147
|
-
*
|
|
148
|
-
* @param {Lattice.ListDeletedObjectsRequest} request
|
|
149
|
-
* @param {ObjectsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
150
|
-
*
|
|
151
|
-
* @throws {@link Lattice.BadRequestError}
|
|
152
|
-
* @throws {@link Lattice.UnauthorizedError}
|
|
153
|
-
* @throws {@link Lattice.InternalServerError}
|
|
154
|
-
*
|
|
155
|
-
* @example
|
|
156
|
-
* await client.objects.listDeletedObjects()
|
|
157
|
-
*/
|
|
158
|
-
listDeletedObjects() {
|
|
159
|
-
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
160
|
-
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
161
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
162
|
-
const { pageToken, maxPageSize } = request;
|
|
163
|
-
const _queryParams = {
|
|
164
|
-
pageToken,
|
|
165
|
-
maxPageSize,
|
|
166
|
-
};
|
|
167
|
-
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
168
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
169
|
-
const _response = yield core.fetcher({
|
|
170
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LatticeEnvironment.Default, "api/v1/debug/deleted-objects"),
|
|
171
|
-
method: "GET",
|
|
172
|
-
headers: _headers,
|
|
173
|
-
queryString: core.url
|
|
174
|
-
.queryBuilder()
|
|
175
|
-
.addMany(_queryParams)
|
|
176
|
-
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
177
|
-
.build(),
|
|
178
|
-
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
179
|
-
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
180
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
181
|
-
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
182
|
-
logging: this._options.logging,
|
|
183
|
-
});
|
|
184
|
-
if (_response.ok) {
|
|
185
|
-
return {
|
|
186
|
-
data: _response.body,
|
|
187
|
-
rawResponse: _response.rawResponse,
|
|
188
|
-
};
|
|
189
|
-
}
|
|
190
|
-
if (_response.error.reason === "status-code") {
|
|
191
|
-
switch (_response.error.statusCode) {
|
|
192
|
-
case 400:
|
|
193
|
-
throw new Lattice.BadRequestError(_response.error.body, _response.rawResponse);
|
|
194
|
-
case 401:
|
|
195
|
-
throw new Lattice.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
196
|
-
case 500:
|
|
197
|
-
throw new Lattice.InternalServerError(_response.error.body, _response.rawResponse);
|
|
198
|
-
default:
|
|
199
|
-
throw new errors.LatticeError({
|
|
200
|
-
statusCode: _response.error.statusCode,
|
|
201
|
-
body: _response.error.body,
|
|
202
|
-
rawResponse: _response.rawResponse,
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/api/v1/debug/deleted-objects");
|
|
207
|
-
}));
|
|
208
|
-
const dataWithRawResponse = yield list(request).withRawResponse();
|
|
209
|
-
return new core.Page({
|
|
210
|
-
response: dataWithRawResponse.data,
|
|
211
|
-
rawResponse: dataWithRawResponse.rawResponse,
|
|
212
|
-
hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.next_page_token) != null &&
|
|
213
|
-
!(typeof (response === null || response === void 0 ? void 0 : response.next_page_token) === "string" && (response === null || response === void 0 ? void 0 : response.next_page_token) === ""),
|
|
214
|
-
getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.deleted_objects) !== null && _a !== void 0 ? _a : []; },
|
|
215
|
-
loadPage: (response) => {
|
|
216
|
-
return list(core.setObjectProperty(request, "pageToken", response === null || response === void 0 ? void 0 : response.next_page_token));
|
|
217
|
-
},
|
|
218
|
-
});
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
/**
|
|
222
|
-
* @beta This endpoint is in pre-release and may change.
|
|
223
|
-
*
|
|
224
138
|
* Fetches an object from your environment using the objectPath path parameter.
|
|
225
139
|
*
|
|
226
140
|
* @throws {@link Lattice.BadRequestError}
|
|
@@ -274,8 +188,6 @@ class ObjectsClient {
|
|
|
274
188
|
});
|
|
275
189
|
}
|
|
276
190
|
/**
|
|
277
|
-
* @beta This endpoint is in pre-release and may change.
|
|
278
|
-
*
|
|
279
191
|
* Uploads an object. The object must be 1 GiB or smaller.
|
|
280
192
|
*
|
|
281
193
|
* @param {core.file.Uploadable} uploadable
|
|
@@ -343,8 +255,6 @@ class ObjectsClient {
|
|
|
343
255
|
});
|
|
344
256
|
}
|
|
345
257
|
/**
|
|
346
|
-
* @beta This endpoint is in pre-release and may change.
|
|
347
|
-
*
|
|
348
258
|
* Deletes an object from your environment given the objectPath path parameter.
|
|
349
259
|
*
|
|
350
260
|
* @param {Lattice.DeleteObjectRequest} request
|
|
@@ -405,8 +315,6 @@ class ObjectsClient {
|
|
|
405
315
|
});
|
|
406
316
|
}
|
|
407
317
|
/**
|
|
408
|
-
* @beta This endpoint is in pre-release and may change.
|
|
409
|
-
*
|
|
410
318
|
* Returns metadata for a specified object path. Use this to fetch metadata such as object size (size_bytes), its expiry time (expiry_time), or its latest update timestamp (last_updated_at).
|
|
411
319
|
*
|
|
412
320
|
* @param {Lattice.GetObjectMetadataRequest} request
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export type { DeleteObjectRequest } from "./DeleteObjectRequest.js";
|
|
2
2
|
export type { GetObjectMetadataRequest } from "./GetObjectMetadataRequest.js";
|
|
3
3
|
export type { GetObjectRequest } from "./GetObjectRequest.js";
|
|
4
|
-
export type { ListDeletedObjectsRequest } from "./ListDeletedObjectsRequest.js";
|
|
5
4
|
export type { ListObjectsRequest } from "./ListObjectsRequest.js";
|
|
@@ -86,8 +86,6 @@ export declare class TasksClient {
|
|
|
86
86
|
updateTaskStatus(request: Lattice.TaskStatusUpdate, requestOptions?: TasksClient.RequestOptions): core.HttpResponsePromise<Lattice.Task>;
|
|
87
87
|
private __updateTaskStatus;
|
|
88
88
|
/**
|
|
89
|
-
* @beta This endpoint is in pre-release and may change.
|
|
90
|
-
*
|
|
91
89
|
* Cancels a task by marking it for cancellation in the system.
|
|
92
90
|
*
|
|
93
91
|
* This method initiates task cancellation based on the task's current state:
|
|
@@ -143,8 +141,6 @@ export declare class TasksClient {
|
|
|
143
141
|
queryTasks(request?: Lattice.TaskQuery, requestOptions?: TasksClient.RequestOptions): core.HttpResponsePromise<Lattice.TaskQueryResults>;
|
|
144
142
|
private __queryTasks;
|
|
145
143
|
/**
|
|
146
|
-
* @beta This endpoint is in pre-release and may change.
|
|
147
|
-
*
|
|
148
144
|
* Establishes a server streaming connection that delivers task updates in real-time using Server-Sent Events (SSE).
|
|
149
145
|
*
|
|
150
146
|
* The stream delivers all existing non-terminal tasks when first connected, followed by real-time
|
|
@@ -186,8 +182,6 @@ export declare class TasksClient {
|
|
|
186
182
|
listenAsAgent(request?: Lattice.AgentListener, requestOptions?: TasksClient.RequestOptions): core.HttpResponsePromise<Lattice.AgentRequest>;
|
|
187
183
|
private __listenAsAgent;
|
|
188
184
|
/**
|
|
189
|
-
* @beta This endpoint is in pre-release and may change.
|
|
190
|
-
*
|
|
191
185
|
* Establishes a server streaming connection that delivers tasks to taskable agents for execution
|
|
192
186
|
* using Server-Sent Events (SSE).
|
|
193
187
|
*
|
|
@@ -209,8 +203,6 @@ export declare class TasksClient {
|
|
|
209
203
|
streamAsAgent(request?: Lattice.AgentStreamRequest, requestOptions?: TasksClient.RequestOptions): core.HttpResponsePromise<core.Stream<Lattice.StreamAsAgentResponse>>;
|
|
210
204
|
private __streamAsAgent;
|
|
211
205
|
/**
|
|
212
|
-
* @beta This endpoint is in pre-release and may change.
|
|
213
|
-
*
|
|
214
206
|
* Establishes a server streaming connection that delivers manual control frames to agents
|
|
215
207
|
* using server-sent events (SSE).
|
|
216
208
|
*
|
|
@@ -265,8 +265,6 @@ class TasksClient {
|
|
|
265
265
|
});
|
|
266
266
|
}
|
|
267
267
|
/**
|
|
268
|
-
* @beta This endpoint is in pre-release and may change.
|
|
269
|
-
*
|
|
270
268
|
* Cancels a task by marking it for cancellation in the system.
|
|
271
269
|
*
|
|
272
270
|
* This method initiates task cancellation based on the task's current state:
|
|
@@ -407,8 +405,6 @@ class TasksClient {
|
|
|
407
405
|
});
|
|
408
406
|
}
|
|
409
407
|
/**
|
|
410
|
-
* @beta This endpoint is in pre-release and may change.
|
|
411
|
-
*
|
|
412
408
|
* Establishes a server streaming connection that delivers task updates in real-time using Server-Sent Events (SSE).
|
|
413
409
|
*
|
|
414
410
|
* The stream delivers all existing non-terminal tasks when first connected, followed by real-time
|
|
@@ -541,8 +537,6 @@ class TasksClient {
|
|
|
541
537
|
});
|
|
542
538
|
}
|
|
543
539
|
/**
|
|
544
|
-
* @beta This endpoint is in pre-release and may change.
|
|
545
|
-
*
|
|
546
540
|
* Establishes a server streaming connection that delivers tasks to taskable agents for execution
|
|
547
541
|
* using Server-Sent Events (SSE).
|
|
548
542
|
*
|
|
@@ -615,8 +609,6 @@ class TasksClient {
|
|
|
615
609
|
});
|
|
616
610
|
}
|
|
617
611
|
/**
|
|
618
|
-
* @beta This endpoint is in pre-release and may change.
|
|
619
|
-
*
|
|
620
612
|
* Establishes a server streaming connection that delivers manual control frames to agents
|
|
621
613
|
* using server-sent events (SSE).
|
|
622
614
|
*
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export interface Color {
|
|
2
|
-
/** The amount of red in the color as a value in the interval [0,
|
|
2
|
+
/** The amount of red in the color as a value in the interval [0, 255]. */
|
|
3
3
|
red?: number | undefined;
|
|
4
|
-
/** The amount of green in the color as a value in the interval [0,
|
|
4
|
+
/** The amount of green in the color as a value in the interval [0, 255]. */
|
|
5
5
|
green?: number | undefined;
|
|
6
|
-
/** The amount of blue in the color as a value in the interval [0,
|
|
6
|
+
/** The amount of blue in the color as a value in the interval [0, 255]. */
|
|
7
7
|
blue?: number | undefined;
|
|
8
8
|
/**
|
|
9
9
|
* The fraction of this color that should be applied to the pixel. That is,
|
|
@@ -6,6 +6,7 @@ export interface GeoDetails {
|
|
|
6
6
|
type?: GeoDetails.Type | undefined;
|
|
7
7
|
controlArea?: Lattice.ControlAreaDetails | undefined;
|
|
8
8
|
acm?: Lattice.AcmDetails | undefined;
|
|
9
|
+
visualDetails?: Lattice.GeoVisualDetails | undefined;
|
|
9
10
|
}
|
|
10
11
|
export declare namespace GeoDetails {
|
|
11
12
|
const Type: {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as Lattice from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Details specific to displaying a geo-entity
|
|
4
|
+
*/
|
|
5
|
+
export interface GeoVisualDetails {
|
|
6
|
+
/** Describes the fill color of a geo-entity. */
|
|
7
|
+
fillColor?: Lattice.Color | undefined;
|
|
8
|
+
/** Describes the line color of a geo-entity. */
|
|
9
|
+
lineColor?: Lattice.Color | undefined;
|
|
10
|
+
}
|
|
@@ -29,7 +29,6 @@ export * from "./CronWindow.js";
|
|
|
29
29
|
export * from "./DecorrelatedAll.js";
|
|
30
30
|
export * from "./DecorrelatedSingle.js";
|
|
31
31
|
export * from "./Decorrelation.js";
|
|
32
|
-
export * from "./DeletedObjectEntry.js";
|
|
33
32
|
export * from "./DeliveryConstraints.js";
|
|
34
33
|
export * from "./DeliveryError.js";
|
|
35
34
|
export * from "./DeliveryState.js";
|
|
@@ -62,6 +61,7 @@ export * from "./GeoPoint.js";
|
|
|
62
61
|
export * from "./GeoPolygon.js";
|
|
63
62
|
export * from "./GeoPolygonPosition.js";
|
|
64
63
|
export * from "./GeoShape.js";
|
|
64
|
+
export * from "./GeoVisualDetails.js";
|
|
65
65
|
export * from "./GoogleProtobufAny.js";
|
|
66
66
|
export * from "./GroupChild.js";
|
|
67
67
|
export * from "./GroupDetails.js";
|
|
@@ -73,7 +73,6 @@ export * from "./HighValueTargetMatch.js";
|
|
|
73
73
|
export * from "./Indicators.js";
|
|
74
74
|
export * from "./LinearRing.js";
|
|
75
75
|
export * from "./LineOfBearing.js";
|
|
76
|
-
export * from "./ListDeletedObjectsResponse.js";
|
|
77
76
|
export * from "./ListResponse.js";
|
|
78
77
|
export * from "./Lla.js";
|
|
79
78
|
export * from "./Location.js";
|
|
@@ -45,7 +45,6 @@ __exportStar(require("./CronWindow.js"), exports);
|
|
|
45
45
|
__exportStar(require("./DecorrelatedAll.js"), exports);
|
|
46
46
|
__exportStar(require("./DecorrelatedSingle.js"), exports);
|
|
47
47
|
__exportStar(require("./Decorrelation.js"), exports);
|
|
48
|
-
__exportStar(require("./DeletedObjectEntry.js"), exports);
|
|
49
48
|
__exportStar(require("./DeliveryConstraints.js"), exports);
|
|
50
49
|
__exportStar(require("./DeliveryError.js"), exports);
|
|
51
50
|
__exportStar(require("./DeliveryState.js"), exports);
|
|
@@ -78,6 +77,7 @@ __exportStar(require("./GeoPoint.js"), exports);
|
|
|
78
77
|
__exportStar(require("./GeoPolygon.js"), exports);
|
|
79
78
|
__exportStar(require("./GeoPolygonPosition.js"), exports);
|
|
80
79
|
__exportStar(require("./GeoShape.js"), exports);
|
|
80
|
+
__exportStar(require("./GeoVisualDetails.js"), exports);
|
|
81
81
|
__exportStar(require("./GoogleProtobufAny.js"), exports);
|
|
82
82
|
__exportStar(require("./GroupChild.js"), exports);
|
|
83
83
|
__exportStar(require("./GroupDetails.js"), exports);
|
|
@@ -89,7 +89,6 @@ __exportStar(require("./HighValueTargetMatch.js"), exports);
|
|
|
89
89
|
__exportStar(require("./Indicators.js"), exports);
|
|
90
90
|
__exportStar(require("./LinearRing.js"), exports);
|
|
91
91
|
__exportStar(require("./LineOfBearing.js"), exports);
|
|
92
|
-
__exportStar(require("./ListDeletedObjectsResponse.js"), exports);
|
|
93
92
|
__exportStar(require("./ListResponse.js"), exports);
|
|
94
93
|
__exportStar(require("./Lla.js"), exports);
|
|
95
94
|
__exportStar(require("./Location.js"), exports);
|
|
@@ -12,6 +12,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.getResponseBody = getResponseBody;
|
|
13
13
|
const json_js_1 = require("../json.js");
|
|
14
14
|
const BinaryResponse_js_1 = require("./BinaryResponse.js");
|
|
15
|
+
// Pins the upstream Response so undici's FinalizationRegistry can't GC it and cancel the body stream.
|
|
16
|
+
function retainResponse(target, response) {
|
|
17
|
+
Object.defineProperty(target, "__fern_response_ref", {
|
|
18
|
+
value: response,
|
|
19
|
+
enumerable: false,
|
|
20
|
+
configurable: true,
|
|
21
|
+
writable: false,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
15
24
|
function getResponseBody(response, responseType) {
|
|
16
25
|
return __awaiter(this, void 0, void 0, function* () {
|
|
17
26
|
switch (responseType) {
|
|
@@ -31,6 +40,7 @@ function getResponseBody(response, responseType) {
|
|
|
31
40
|
},
|
|
32
41
|
};
|
|
33
42
|
}
|
|
43
|
+
retainResponse(response.body, response);
|
|
34
44
|
return response.body;
|
|
35
45
|
case "streaming":
|
|
36
46
|
if (response.body == null) {
|
|
@@ -42,6 +52,7 @@ function getResponseBody(response, responseType) {
|
|
|
42
52
|
},
|
|
43
53
|
};
|
|
44
54
|
}
|
|
55
|
+
retainResponse(response.body, response);
|
|
45
56
|
return response.body;
|
|
46
57
|
case "text":
|
|
47
58
|
return yield response.text();
|
|
@@ -14,11 +14,19 @@ function anySignal(...args) {
|
|
|
14
14
|
for (const signal of signals) {
|
|
15
15
|
if (signal.aborted) {
|
|
16
16
|
controller.abort(signal === null || signal === void 0 ? void 0 : signal.reason);
|
|
17
|
-
|
|
17
|
+
return controller.signal;
|
|
18
18
|
}
|
|
19
19
|
signal.addEventListener("abort", () => controller.abort(signal === null || signal === void 0 ? void 0 : signal.reason), {
|
|
20
20
|
signal: controller.signal,
|
|
21
21
|
});
|
|
22
|
+
// Re-check after adding listener: the signal may have aborted
|
|
23
|
+
// between the initial `signal.aborted` check and the `addEventListener`
|
|
24
|
+
// call above. If it did, the abort event was already dispatched and
|
|
25
|
+
// the listener will never fire — we must manually abort.
|
|
26
|
+
if (signal.aborted) {
|
|
27
|
+
controller.abort(signal === null || signal === void 0 ? void 0 : signal.reason);
|
|
28
|
+
return controller.signal;
|
|
29
|
+
}
|
|
22
30
|
}
|
|
23
31
|
return controller.signal;
|
|
24
32
|
}
|
|
@@ -10,7 +10,7 @@ class LatticeError extends Error {
|
|
|
10
10
|
if (Error.captureStackTrace) {
|
|
11
11
|
Error.captureStackTrace(this, this.constructor);
|
|
12
12
|
}
|
|
13
|
-
this.name =
|
|
13
|
+
this.name = "LatticeError";
|
|
14
14
|
this.statusCode = statusCode;
|
|
15
15
|
this.body = body;
|
|
16
16
|
this.rawResponse = rawResponse;
|
|
@@ -9,7 +9,7 @@ class LatticeTimeoutError extends Error {
|
|
|
9
9
|
if (Error.captureStackTrace) {
|
|
10
10
|
Error.captureStackTrace(this, this.constructor);
|
|
11
11
|
}
|
|
12
|
-
this.name =
|
|
12
|
+
this.name = "LatticeTimeoutError";
|
|
13
13
|
if ((opts === null || opts === void 0 ? void 0 : opts.cause) != null) {
|
|
14
14
|
this.cause = opts.cause;
|
|
15
15
|
}
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "4.
|
|
1
|
+
export declare const SDK_VERSION = "4.13.0";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "@anduril-industries/lattice-sdk",
|
|
9
|
-
"X-Fern-SDK-Version": "4.
|
|
10
|
-
"User-Agent": "@anduril-industries/lattice-sdk/4.
|
|
9
|
+
"X-Fern-SDK-Version": "4.13.0",
|
|
10
|
+
"User-Agent": "@anduril-industries/lattice-sdk/4.13.0",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|