New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

convex-selections

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

convex-selections - npm Package Compare versions

Comparing version 0.0.10 to 0.0.11

2

package.json

@@ -5,3 +5,3 @@ {

"type": "module",
"version": "0.0.10",
"version": "0.0.11",
"exports": {

@@ -8,0 +8,0 @@ ".": "./index.js",

import { GetIndexesFromTable } from '../types/index.js';
export declare function vRelation<$ForeignTable>(foreignTableName: string): {
withIndex<$Index extends keyof GetIndexesFromTable<$ForeignTable> & string, $IndexFields extends GetIndexesFromTable<$ForeignTable>[$Index]>(index: $Index, indexFields: $IndexFields): import("convex/values").Validator<`__RELATION__:${string}:${string}:${$Index}:${string}` | undefined, true, never>;
withIndex<$Index extends keyof GetIndexesFromTable<$ForeignTable> & string>(index: $Index): import("convex/values").Validator<`__RELATION__:${string}:${$Index}` | undefined, true, never>;
};
export declare function vRelationArray<$ForeignTable>(foreignTableName: string): {
withIndex<$Index extends keyof GetIndexesFromTable<$ForeignTable> & string, $IndexFields extends GetIndexesFromTable<$ForeignTable>[$Index], $IndexFieldsWithoutLast extends $IndexFields extends [...infer $IndexFieldsWithoutLast, infer _$LastIndexField] ? $IndexFieldsWithoutLast : never>(index: $Index, indexFields: $IndexFieldsWithoutLast): import("convex/values").Validator<`__RELATION__:${string}:${string}:${$Index}:${string}`[] | undefined, true, never>;
withIndex<$Index extends keyof GetIndexesFromTable<$ForeignTable> & string>(index: $Index): import("convex/values").Validator<`__RELATION__:${string}:${$Index}`[] | undefined, true, never>;
};
import { v } from 'convex/values';
export function vRelation(foreignTableName) {
return {
withIndex(index, indexFields) {
return v.optional(v.literal(`__RELATION__:${foreignTableName}:${foreignTableName}:${index}:${indexFields.join(',')}`));
withIndex(index) {
return v.optional(v.literal(`__RELATION__:${foreignTableName}:${index}`));
}

@@ -11,6 +11,6 @@ };

return {
withIndex(index, indexFields) {
return v.optional(v.array(v.literal(`__RELATION__:${foreignTableName}:${foreignTableName}:${index}:${indexFields.join(',')}`)));
withIndex(index) {
return v.optional(v.array(v.literal(`__RELATION__:${foreignTableName}:${index}`)));
}
};
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc