Skip to content

Commit d1c5a00

Browse files
🌿 Fern Regeneration -- September 25, 2025 (anduril#130)
Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Co-authored-by: Armin Fard <[email protected]>
1 parent f9e8df0 commit d1c5a00

30 files changed

+1856
-283
lines changed

.npmignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ tests
66
.fernignore
77
.prettierrc.yml
88
tsconfig.json
9-
yarn.lock
9+
yarn.lock
10+
pnpm-lock.yaml

README.md

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Anduril TypeScript Library
1+
# Lattice SDK TypeScript Library
22

33
![](https://www.anduril.com/lattice-sdk/)
44

55
[![npm shield](https://img.shields.io/npm/v/@anduril-industries/lattice-sdk)](https://www.npmjs.com/package/@anduril-industries/lattice-sdk)
66

7-
The Lattice SDK TypeScript library provides convenient access to the Lattice API from TypeScript.
7+
The Lattice SDK TypeScript library provides convenient access to the Lattice SDK APIs from TypeScript.
88

99
## Documentation
1010

@@ -522,13 +522,23 @@ List endpoints are paginated. The SDK provides an iterator so that you can simpl
522522
import { LatticeClient } from "@anduril-industries/lattice-sdk";
523523

524524
const client = new LatticeClient({ token: "YOUR_TOKEN" });
525-
const response = await client.objects.listObjects();
525+
const response = await client.objects.listObjects({
526+
prefix: "prefix",
527+
sinceTimestamp: "2024-01-15T09:30:00Z",
528+
pageToken: "pageToken",
529+
allObjectsInMesh: true,
530+
});
526531
for await (const item of response) {
527532
console.log(item);
528533
}
529534

530535
// Or you can manually iterate page-by-page
531-
let page = await client.objects.listObjects();
536+
let page = await client.objects.listObjects({
537+
prefix: "prefix",
538+
sinceTimestamp: "2024-01-15T09:30:00Z",
539+
pageToken: "pageToken",
540+
allObjectsInMesh: true,
541+
});
532542
while (page.hasNextPage()) {
533543
page = page.getNextPage();
534544
}
@@ -548,6 +558,18 @@ const response = await client.entities.longPollEntityEvents(..., {
548558
});
549559
```
550560

561+
### Additional Query String Parameters
562+
563+
If you would like to send additional query string parameters as part of the request, use the `queryParams` request option.
564+
565+
```typescript
566+
const response = await client.entities.longPollEntityEvents(..., {
567+
queryParams: {
568+
'customQueryParamKey': 'custom query param value'
569+
}
570+
});
571+
```
572+
551573
### Retries
552574

553575
The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@anduril-industries/lattice-sdk",
3-
"version": "2.2.0",
3+
"version": "2.3.0",
44
"private": false,
55
"repository": "github:anduril/lattice-sdk-javascript",
66
"license": "See LICENSE",

reference.md

Lines changed: 83 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -757,13 +757,23 @@ Lists objects in your environment. You can define a prefix to list a subset of y
757757
<dd>
758758

759759
```typescript
760-
const response = await client.objects.listObjects();
760+
const response = await client.objects.listObjects({
761+
prefix: "prefix",
762+
sinceTimestamp: "2024-01-15T09:30:00Z",
763+
pageToken: "pageToken",
764+
allObjectsInMesh: true,
765+
});
761766
for await (const item of response) {
762767
console.log(item);
763768
}
764769

765770
// Or you can manually iterate page-by-page
766-
let page = await client.objects.listObjects();
771+
let page = await client.objects.listObjects({
772+
prefix: "prefix",
773+
sinceTimestamp: "2024-01-15T09:30:00Z",
774+
pageToken: "pageToken",
775+
allObjectsInMesh: true,
776+
});
767777
while (page.hasNextPage()) {
768778
page = page.getNextPage();
769779
}
@@ -801,6 +811,77 @@ while (page.hasNextPage()) {
801811
</dl>
802812
</details>
803813

814+
<details><summary><code>client.objects.<a href="/src/api/resources/objects/client/Client.ts">getObject</a>(objectPath, { ...params }) -> core.BinaryResponse</code></summary>
815+
<dl>
816+
<dd>
817+
818+
#### 📝 Description
819+
820+
<dl>
821+
<dd>
822+
823+
<dl>
824+
<dd>
825+
826+
Fetches an object from your environment using the objectPath path parameter.
827+
828+
</dd>
829+
</dl>
830+
</dd>
831+
</dl>
832+
833+
#### 🔌 Usage
834+
835+
<dl>
836+
<dd>
837+
838+
<dl>
839+
<dd>
840+
841+
```typescript
842+
await client.objects.getObject("objectPath");
843+
```
844+
845+
</dd>
846+
</dl>
847+
</dd>
848+
</dl>
849+
850+
#### ⚙️ Parameters
851+
852+
<dl>
853+
<dd>
854+
855+
<dl>
856+
<dd>
857+
858+
**objectPath:** `string` — The path of the object to fetch.
859+
860+
</dd>
861+
</dl>
862+
863+
<dl>
864+
<dd>
865+
866+
**request:** `Lattice.GetObjectRequest`
867+
868+
</dd>
869+
</dl>
870+
871+
<dl>
872+
<dd>
873+
874+
**requestOptions:** `Objects.RequestOptions`
875+
876+
</dd>
877+
</dl>
878+
</dd>
879+
</dl>
880+
881+
</dd>
882+
</dl>
883+
</details>
884+
804885
<details><summary><code>client.objects.<a href="/src/api/resources/objects/client/Client.ts">deleteObject</a>(objectPath) -> void</code></summary>
805886
<dl>
806887
<dd>

src/Client.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export declare namespace LatticeClient {
1616
baseUrl?: core.Supplier<string>;
1717
token?: core.Supplier<core.BearerToken | undefined>;
1818
/** Additional headers to include in requests. */
19-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
19+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
2020
}
2121

2222
export interface RequestOptions {
@@ -26,8 +26,10 @@ export declare namespace LatticeClient {
2626
maxRetries?: number;
2727
/** A hook to abort the request. */
2828
abortSignal?: AbortSignal;
29+
/** Additional query string parameters to include in the request. */
30+
queryParams?: Record<string, unknown>;
2931
/** Additional headers to include in the request. */
30-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
32+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
3133
}
3234
}
3335

@@ -44,8 +46,8 @@ export class LatticeClient {
4446
{
4547
"X-Fern-Language": "JavaScript",
4648
"X-Fern-SDK-Name": "@anduril-industries/lattice-sdk",
47-
"X-Fern-SDK-Version": "2.2.0",
48-
"User-Agent": "@anduril-industries/lattice-sdk/2.2.0",
49+
"X-Fern-SDK-Version": "2.3.0",
50+
"User-Agent": "@anduril-industries/lattice-sdk/2.3.0",
4951
"X-Fern-Runtime": core.RUNTIME.type,
5052
"X-Fern-Runtime-Version": core.RUNTIME.version,
5153
},

src/api/resources/entities/client/Client.ts

Lines changed: 46 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export declare namespace Entities {
1515
baseUrl?: core.Supplier<string>;
1616
token?: core.Supplier<core.BearerToken | undefined>;
1717
/** Additional headers to include in requests. */
18-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
18+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
1919
}
2020

2121
export interface RequestOptions {
@@ -25,8 +25,10 @@ export declare namespace Entities {
2525
maxRetries?: number;
2626
/** A hook to abort the request. */
2727
abortSignal?: AbortSignal;
28+
/** Additional query string parameters to include in the request. */
29+
queryParams?: Record<string, unknown>;
2830
/** Additional headers to include in the request. */
29-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
31+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
3032
}
3133
}
3234

@@ -69,6 +71,11 @@ export class Entities {
6971
request: Lattice.Entity,
7072
requestOptions?: Entities.RequestOptions,
7173
): Promise<core.WithRawResponse<Lattice.Entity>> {
74+
let _headers: core.Fetcher.Args["headers"] = mergeHeaders(
75+
this._options?.headers,
76+
mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }),
77+
requestOptions?.headers,
78+
);
7279
const _response = await core.fetcher({
7380
url: core.url.join(
7481
(await core.Supplier.get(this._options.baseUrl)) ??
@@ -77,12 +84,9 @@ export class Entities {
7784
"api/v1/entities",
7885
),
7986
method: "PUT",
80-
headers: mergeHeaders(
81-
this._options?.headers,
82-
mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }),
83-
requestOptions?.headers,
84-
),
87+
headers: _headers,
8588
contentType: "application/json",
89+
queryParameters: requestOptions?.queryParams,
8690
requestType: "json",
8791
body: request,
8892
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -147,6 +151,11 @@ export class Entities {
147151
entityId: string,
148152
requestOptions?: Entities.RequestOptions,
149153
): Promise<core.WithRawResponse<Lattice.Entity>> {
154+
let _headers: core.Fetcher.Args["headers"] = mergeHeaders(
155+
this._options?.headers,
156+
mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }),
157+
requestOptions?.headers,
158+
);
150159
const _response = await core.fetcher({
151160
url: core.url.join(
152161
(await core.Supplier.get(this._options.baseUrl)) ??
@@ -155,11 +164,8 @@ export class Entities {
155164
`api/v1/entities/${encodeURIComponent(entityId)}`,
156165
),
157166
method: "GET",
158-
headers: mergeHeaders(
159-
this._options?.headers,
160-
mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }),
161-
requestOptions?.headers,
162-
),
167+
headers: _headers,
168+
queryParameters: requestOptions?.queryParams,
163169
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
164170
maxRetries: requestOptions?.maxRetries,
165171
abortSignal: requestOptions?.abortSignal,
@@ -240,6 +246,11 @@ export class Entities {
240246
request: Lattice.EntityOverride = {},
241247
requestOptions?: Entities.RequestOptions,
242248
): Promise<core.WithRawResponse<Lattice.Entity>> {
249+
let _headers: core.Fetcher.Args["headers"] = mergeHeaders(
250+
this._options?.headers,
251+
mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }),
252+
requestOptions?.headers,
253+
);
243254
const _response = await core.fetcher({
244255
url: core.url.join(
245256
(await core.Supplier.get(this._options.baseUrl)) ??
@@ -248,12 +259,9 @@ export class Entities {
248259
`api/v1/entities/${encodeURIComponent(entityId)}/override/${encodeURIComponent(fieldPath)}`,
249260
),
250261
method: "PUT",
251-
headers: mergeHeaders(
252-
this._options?.headers,
253-
mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }),
254-
requestOptions?.headers,
255-
),
262+
headers: _headers,
256263
contentType: "application/json",
264+
queryParameters: requestOptions?.queryParams,
257265
requestType: "json",
258266
body: request,
259267
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -327,6 +335,11 @@ export class Entities {
327335
fieldPath: string,
328336
requestOptions?: Entities.RequestOptions,
329337
): Promise<core.WithRawResponse<Lattice.Entity>> {
338+
let _headers: core.Fetcher.Args["headers"] = mergeHeaders(
339+
this._options?.headers,
340+
mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }),
341+
requestOptions?.headers,
342+
);
330343
const _response = await core.fetcher({
331344
url: core.url.join(
332345
(await core.Supplier.get(this._options.baseUrl)) ??
@@ -335,11 +348,8 @@ export class Entities {
335348
`api/v1/entities/${encodeURIComponent(entityId)}/override/${encodeURIComponent(fieldPath)}`,
336349
),
337350
method: "DELETE",
338-
headers: mergeHeaders(
339-
this._options?.headers,
340-
mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }),
341-
requestOptions?.headers,
342-
),
351+
headers: _headers,
352+
queryParameters: requestOptions?.queryParams,
343353
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
344354
maxRetries: requestOptions?.maxRetries,
345355
abortSignal: requestOptions?.abortSignal,
@@ -420,6 +430,11 @@ export class Entities {
420430
request: Lattice.EntityEventRequest,
421431
requestOptions?: Entities.RequestOptions,
422432
): Promise<core.WithRawResponse<Lattice.EntityEventResponse>> {
433+
let _headers: core.Fetcher.Args["headers"] = mergeHeaders(
434+
this._options?.headers,
435+
mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }),
436+
requestOptions?.headers,
437+
);
423438
const _response = await core.fetcher({
424439
url: core.url.join(
425440
(await core.Supplier.get(this._options.baseUrl)) ??
@@ -428,12 +443,9 @@ export class Entities {
428443
"api/v1/entities/events",
429444
),
430445
method: "POST",
431-
headers: mergeHeaders(
432-
this._options?.headers,
433-
mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }),
434-
requestOptions?.headers,
435-
),
446+
headers: _headers,
436447
contentType: "application/json",
448+
queryParameters: requestOptions?.queryParams,
437449
requestType: "json",
438450
body: request,
439451
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -496,6 +508,11 @@ export class Entities {
496508
request: Lattice.EntityStreamRequest = {},
497509
requestOptions?: Entities.RequestOptions,
498510
): Promise<core.WithRawResponse<core.Stream<Lattice.StreamEntitiesResponse>>> {
511+
let _headers: core.Fetcher.Args["headers"] = mergeHeaders(
512+
this._options?.headers,
513+
mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }),
514+
requestOptions?.headers,
515+
);
499516
const _response = await core.fetcher<ReadableStream>({
500517
url: core.url.join(
501518
(await core.Supplier.get(this._options.baseUrl)) ??
@@ -504,12 +521,9 @@ export class Entities {
504521
"api/v1/entities/stream",
505522
),
506523
method: "POST",
507-
headers: mergeHeaders(
508-
this._options?.headers,
509-
mergeOnlyDefinedHeaders({ Authorization: await this._getAuthorizationHeader() }),
510-
requestOptions?.headers,
511-
),
524+
headers: _headers,
512525
contentType: "application/json",
526+
queryParameters: requestOptions?.queryParams,
513527
requestType: "json",
514528
body: request,
515529
responseType: "sse",

0 commit comments

Comments
 (0)