Skip to content

Commit a663fbe

Browse files
refactor(types): replace Record with mapped types
1 parent 7147437 commit a663fbe

File tree

9 files changed

+24
-20
lines changed

9 files changed

+24
-20
lines changed

src/resources/agents/agents.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ export interface AgentUpdateParams {
222222
export interface AgentListParams extends OffsetPaginationParams {
223223
direction?: 'asc' | 'desc';
224224

225-
metadata_filter?: Record<string, unknown>;
225+
metadata_filter?: { [key: string]: unknown };
226226

227227
sort_by?: 'created_at' | 'updated_at';
228228
}

src/resources/agents/docs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export interface DocCreateParams {
140140
export interface DocListParams extends OffsetPaginationParams {
141141
direction?: 'asc' | 'desc';
142142

143-
metadata_filter?: Record<string, unknown>;
143+
metadata_filter?: { [key: string]: unknown };
144144

145145
sort_by?: 'created_at' | 'updated_at';
146146
}

src/resources/agents/tools.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -538,15 +538,15 @@ export namespace ToolUpdateParams {
538538
export interface APICall {
539539
content?: string | null;
540540

541-
cookies?: Record<string, string> | null;
541+
cookies?: { [key: string]: string } | null;
542542

543543
data?: unknown | null;
544544

545545
files?: unknown | null;
546546

547547
follow_redirects?: boolean | null;
548548

549-
headers?: Record<string, string> | null;
549+
headers?: { [key: string]: string } | null;
550550

551551
include_response_content?: boolean;
552552

@@ -558,7 +558,7 @@ export namespace ToolUpdateParams {
558558

559559
schema?: unknown | null;
560560

561-
secrets?: Record<string, APICall.Secrets> | null;
561+
secrets?: { [key: string]: APICall.Secrets } | null;
562562

563563
timeout?: number | null;
564564

src/resources/projects.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export interface ProjectCreateParams {
8181
export interface ProjectListParams extends OffsetPaginationParams {
8282
direction?: 'asc' | 'desc';
8383

84-
metadata_filter?: Record<string, unknown>;
84+
metadata_filter?: { [key: string]: unknown };
8585

8686
sort_by?: 'created_at' | 'updated_at';
8787
}

src/resources/sessions.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ export interface ChatInput {
153153

154154
length_penalty?: number | null;
155155

156-
logit_bias?: Record<string, number> | null;
156+
logit_bias?: { [key: string]: number } | null;
157157

158158
max_tokens?: number | null;
159159

@@ -1584,7 +1584,7 @@ export namespace SessionUpdateParams {
15841584
export interface SessionListParams extends OffsetPaginationParams {
15851585
direction?: 'asc' | 'desc';
15861586

1587-
metadata_filter?: Record<string, unknown>;
1587+
metadata_filter?: { [key: string]: unknown };
15881588

15891589
sort_by?: 'created_at' | 'updated_at';
15901590
}
@@ -1618,7 +1618,7 @@ export interface SessionChatParams {
16181618
/**
16191619
* Body param:
16201620
*/
1621-
logit_bias?: Record<string, number> | null;
1621+
logit_bias?: { [key: string]: number } | null;
16221622

16231623
/**
16241624
* Body param:
@@ -1907,7 +1907,7 @@ export interface SessionRenderParams {
19071907

19081908
length_penalty?: number | null;
19091909

1910-
logit_bias?: Record<string, number> | null;
1910+
logit_bias?: { [key: string]: number } | null;
19111911

19121912
max_tokens?: number | null;
19131913

src/resources/shared.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ export interface APICallDef {
5656

5757
content?: string | null;
5858

59-
cookies?: Record<string, string> | null;
59+
cookies?: { [key: string]: string } | null;
6060

6161
data?: unknown | null;
6262

6363
files?: unknown | null;
6464

6565
follow_redirects?: boolean | null;
6666

67-
headers?: Record<string, string> | null;
67+
headers?: { [key: string]: string } | null;
6868

6969
include_response_content?: boolean;
7070

@@ -74,7 +74,7 @@ export interface APICallDef {
7474

7575
schema?: unknown | null;
7676

77-
secrets?: Record<string, SecretRef> | null;
77+
secrets?: { [key: string]: SecretRef } | null;
7878

7979
timeout?: number | null;
8080
}

src/resources/tasks.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export interface ErrorWorkflowStep {
8484
}
8585

8686
export interface EvaluateStep {
87-
evaluate: Record<string, unknown | string>;
87+
evaluate: { [key: string]: unknown | string };
8888

8989
kind_?: 'evaluate';
9090

@@ -348,15 +348,17 @@ export namespace PromptStepOutput {
348348
}
349349

350350
export interface ReturnStep {
351-
return: Record<string, Array<string> | Record<string, string> | Array<Record<string, string>> | string>;
351+
return: {
352+
[key: string]: Array<string> | { [key: string]: string } | Array<{ [key: string]: string }> | string;
353+
};
352354

353355
kind_?: 'return';
354356

355357
label?: string | null;
356358
}
357359

358360
export interface SetStep {
359-
set: Record<string, unknown | string>;
361+
set: { [key: string]: unknown | string };
360362

361363
kind_?: 'set';
362364

@@ -537,7 +539,9 @@ export interface ToolCallStep {
537539
}
538540

539541
export interface WaitForInputInfo {
540-
info: Record<string, Array<string> | Record<string, string> | Array<Record<string, string>> | string>;
542+
info: {
543+
[key: string]: Array<string> | { [key: string]: string } | Array<{ [key: string]: string }> | string;
544+
};
541545
}
542546

543547
export interface WaitForInputStep {
@@ -552,7 +556,7 @@ export interface YieldStep {
552556
workflow: string;
553557

554558
arguments?:
555-
| Record<string, Array<string> | Record<string, string> | Array<Record<string, string>> | string>
559+
| { [key: string]: Array<string> | { [key: string]: string } | Array<{ [key: string]: string }> | string }
556560
| '_';
557561

558562
kind_?: 'yield';

src/resources/users/docs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export interface DocCreateParams {
146146
export interface DocListParams extends OffsetPaginationParams {
147147
direction?: 'asc' | 'desc';
148148

149-
metadata_filter?: Record<string, unknown>;
149+
metadata_filter?: { [key: string]: unknown };
150150

151151
sort_by?: 'created_at' | 'updated_at';
152152
}

src/resources/users/users.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export interface UserUpdateParams {
130130
export interface UserListParams extends OffsetPaginationParams {
131131
direction?: 'asc' | 'desc';
132132

133-
metadata_filter?: Record<string, unknown>;
133+
metadata_filter?: { [key: string]: unknown };
134134

135135
sort_by?: 'created_at' | 'updated_at';
136136
}

0 commit comments

Comments
 (0)