Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,7 @@ export namespace Models {
*/
requestPath: string;
/**
* HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.
* HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.
*/
requestHeaders: Headers[];
Comment on lines +1025 to 1027
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick

Doc wording mismatch with type (array vs key-value object).

requestHeaders is Headers[], not a key-value object. Update the JSDoc to reflect an array of {name, value} pairs. Similarly adjust responseHeaders (Line 1037) for consistency.

Apply:

- * HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.
+ * List of HTTP request headers as name/value pairs. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.

And for response headers (near Line 1037):

- * HTTP response headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.
+ * List of HTTP response headers as name/value pairs. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
* HTTP request headers as a key-value object. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.
*/
requestHeaders: Headers[];
* List of HTTP request headers as name/value pairs. This will return only whitelisted headers. All headers are returned if execution is created as synchronous.
*/
requestHeaders: Headers[];
🤖 Prompt for AI Agents
In src/models.ts around lines 1025-1027 (and similarly near line 1037 for
responseHeaders), the JSDoc incorrectly describes requestHeaders/responseHeaders
as a key-value object while the actual type is Headers[]; update the JSDoc
comments to state that these fields are arrays of header objects (e.g., an array
of { name: string, value: string } pairs), mention that only whitelisted headers
are included unless execution is synchronous, and ensure the wording matches the
Headers[] type for consistency.

/**
Expand Down
7 changes: 5 additions & 2 deletions src/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ export class Query {
});
}

static equal = (attribute: string, value: QueryTypes | any[]): string =>
static equal = (attribute: string, value: QueryTypes): string =>
new Query("equal", attribute, value).toString();

static notEqual = (attribute: string, value: QueryTypes | any[]): string =>
static notEqual = (attribute: string, value: QueryTypes): string =>
new Query("notEqual", attribute, value).toString();

static lessThan = (attribute: string, value: QueryTypes): string =>
Expand Down Expand Up @@ -78,6 +78,9 @@ export class Query {
static orderAsc = (attribute: string): string =>
new Query("orderAsc", attribute).toString();

static orderRandom = (): string =>
new Query("orderRandom").toString();

static cursorAfter = (documentId: string): string =>
new Query("cursorAfter", undefined, documentId).toString();

Expand Down