@bunbase-ae/js 2.13.3-next.304.484953e → 2.14.0
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/package.json +1 -1
- package/src/admin.ts +17 -1
package/package.json
CHANGED
package/src/admin.ts
CHANGED
|
@@ -1099,11 +1099,27 @@ export interface NamedQueryParamDef {
|
|
|
1099
1099
|
required?: boolean;
|
|
1100
1100
|
}
|
|
1101
1101
|
|
|
1102
|
+
/**
|
|
1103
|
+
* Access rules valid for a named query.
|
|
1104
|
+
*
|
|
1105
|
+
* Named queries don't carry a record-level owner — `"owner"` (which is valid
|
|
1106
|
+
* on collections) has no per-row meaning here and is rejected at create/update
|
|
1107
|
+
* time. Use `"authenticated"` for logged-in-only access, or `{ role: "..." }`
|
|
1108
|
+
* for role-gated access.
|
|
1109
|
+
*/
|
|
1110
|
+
export type NamedQueryAccessRule = Exclude<AccessRule, "owner">;
|
|
1111
|
+
|
|
1102
1112
|
export interface NamedQuery {
|
|
1103
1113
|
name: string;
|
|
1104
1114
|
description: string | null;
|
|
1105
1115
|
sql: string;
|
|
1106
1116
|
params: Record<string, NamedQueryParamDef>;
|
|
1117
|
+
/**
|
|
1118
|
+
* The persisted access rule. New queries are restricted to
|
|
1119
|
+
* {@link NamedQueryAccessRule}; this remains the broader {@link AccessRule}
|
|
1120
|
+
* union so legacy rows persisted before the validator was tightened can
|
|
1121
|
+
* still be read.
|
|
1122
|
+
*/
|
|
1107
1123
|
access: AccessRule;
|
|
1108
1124
|
row_limit: number;
|
|
1109
1125
|
timeout_ms: number;
|
|
@@ -1124,7 +1140,7 @@ export interface CreateNamedQueryInput {
|
|
|
1124
1140
|
description?: string | null;
|
|
1125
1141
|
sql: string;
|
|
1126
1142
|
params?: Record<string, NamedQueryParamDef>;
|
|
1127
|
-
access?:
|
|
1143
|
+
access?: NamedQueryAccessRule;
|
|
1128
1144
|
row_limit?: number;
|
|
1129
1145
|
timeout_ms?: number;
|
|
1130
1146
|
result_cache_ttl_s?: number;
|