Skip to content

Commit 2ecce01

Browse files
feat: query param validation block label, name, and search
1 parent 68da8fa commit 2ecce01

File tree

3 files changed

+17
-16
lines changed

3 files changed

+17
-16
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 120
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/letta-ai%2Fletta-sdk-afdf4ae7c1cb0b39ce5335cba48c323f3c2a9bbc7b45fece5e34808b653d719a.yml
3-
openapi_spec_hash: 09eed5aba1df735c4ef61f9a2aa893be
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/letta-ai%2Fletta-sdk-425729f06b756964361130ca46d9dec782de4ea1c06a1691d6be19965667ff9e.yml
3+
openapi_spec_hash: 9fe0eda067aeafb8645187fefbe315b3
44
config_hash: 87d5500eb085219e03a7ac7cddc146fc

src/resources/blocks/blocks.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,8 @@ export interface BlockListParams extends ArrayPageParams {
394394
connected_to_agents_count_lt?: number | null;
395395

396396
/**
397-
* Search blocks by description. If provided, returns blocks that match this
398-
* description. This is a full-text search on block descriptions.
397+
* Search blocks by description. If provided, returns blocks whose description
398+
* matches the search query. This is a full-text search on block descriptions.
399399
*/
400400
description_search?: string | null;
401401

@@ -405,23 +405,23 @@ export interface BlockListParams extends ArrayPageParams {
405405
identifier_keys?: Array<string> | null;
406406

407407
/**
408-
* Search agents by identifier id
408+
* The ID of the identity in the format 'identity-<uuid4>'
409409
*/
410410
identity_id?: string | null;
411411

412412
/**
413-
* Labels to include (e.g. human, persona)
413+
* Label to include (alphanumeric, hyphens, underscores only)
414414
*/
415415
label?: string | null;
416416

417417
/**
418-
* Search blocks by label. If provided, returns blocks that match this label. This
419-
* is a full-text search on labels.
418+
* Search blocks by label. If provided, returns blocks whose label matches the
419+
* search query. This is a full-text search on block labels.
420420
*/
421421
label_search?: string | null;
422422

423423
/**
424-
* Name of the block
424+
* Name filter (alphanumeric, spaces, hyphens, underscores)
425425
*/
426426
name?: string | null;
427427

@@ -436,7 +436,8 @@ export interface BlockListParams extends ArrayPageParams {
436436
templates_only?: boolean;
437437

438438
/**
439-
* Search blocks by value. If provided, returns blocks that match this value.
439+
* Search blocks by value. If provided, returns blocks whose value matches the
440+
* search query. This is a full-text search on block values.
440441
*/
441442
value_search?: string | null;
442443
}

tests/api-resources/blocks/blocks.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,18 +88,18 @@ describe('resource blocks', () => {
8888
connected_to_agents_count_eq: [0, 0],
8989
connected_to_agents_count_gt: 0,
9090
connected_to_agents_count_lt: 0,
91-
description_search: 'description_search',
91+
description_search: 'x',
9292
identifier_keys: ['string', 'string'],
93-
identity_id: 'identity_id',
94-
label: 'label',
95-
label_search: 'label_search',
93+
identity_id: 'identity-123e4567-e89b-42d3-8456-426614174000',
94+
label: 'human',
95+
label_search: 'human',
9696
limit: 0,
97-
name: 'name',
97+
name: 'My Agent',
9898
order: 'asc',
9999
order_by: 'created_at',
100100
project_id: 'project_id',
101101
templates_only: true,
102-
value_search: 'value_search',
102+
value_search: 'x',
103103
},
104104
{ path: '/_stainless_unknown_path' },
105105
),

0 commit comments

Comments
 (0)