@dench.com/cli 3.11.60-staging.1143 → 3.11.61-staging.1175
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/lib/api-schemas.ts +19 -0
- package/package.json +1 -1
package/lib/api-schemas.ts
CHANGED
|
@@ -6914,6 +6914,22 @@ export type ConvexExtras = {
|
|
|
6914
6914
|
transformArgs?: (input: Record<string, unknown>) => Record<string, unknown>;
|
|
6915
6915
|
};
|
|
6916
6916
|
|
|
6917
|
+
/**
|
|
6918
|
+
* Convex's wire format rejects `$`-prefixed object keys, and the query DSL's
|
|
6919
|
+
* operators are made of them (`$lte`, `$in`, `$or`): an object `dsl` holding
|
|
6920
|
+
* one fails in the Convex client before the request leaves, as a 500. Send
|
|
6921
|
+
* it as the `dslJson` string the query functions also take. A `dslJson` the
|
|
6922
|
+
* caller sent already wins, as it does in `parseQueryDsl`.
|
|
6923
|
+
*/
|
|
6924
|
+
export function dslAsJson(
|
|
6925
|
+
input: Record<string, unknown>,
|
|
6926
|
+
): Record<string, unknown> {
|
|
6927
|
+
const { dsl, ...rest } = input;
|
|
6928
|
+
if (dsl === undefined || dsl === null || typeof rest.dslJson === "string")
|
|
6929
|
+
return rest;
|
|
6930
|
+
return { ...rest, dslJson: JSON.stringify(dsl) };
|
|
6931
|
+
}
|
|
6932
|
+
|
|
6917
6933
|
export const convexExtras: Record<string, ConvexExtras> = {
|
|
6918
6934
|
"campaigns.list": {
|
|
6919
6935
|
withReferencesFunctionName:
|
|
@@ -6928,7 +6944,10 @@ export const convexExtras: Record<string, ConvexExtras> = {
|
|
|
6928
6944
|
"crm.query": {
|
|
6929
6945
|
withReferencesFunctionName:
|
|
6930
6946
|
"functions/crm/query:runQueryEntriesWithReferences",
|
|
6947
|
+
transformArgs: (input) => dslAsJson(input),
|
|
6931
6948
|
},
|
|
6949
|
+
"crm.queryPage": { transformArgs: (input) => dslAsJson(input) },
|
|
6950
|
+
"crm.sql": { transformArgs: (input) => dslAsJson(input) },
|
|
6932
6951
|
"crm.search": {
|
|
6933
6952
|
withReferencesFunctionName: "functions/crm/query:searchWithReferences",
|
|
6934
6953
|
},
|