🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

appwrite-utils

Package Overview
Dependencies
Maintainers
1
Versions
142
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

appwrite-utils - npm Package Compare versions

Comparing version

to
0.2.5

9

dist/schemas/appwriteConfig.d.ts

@@ -387,2 +387,3 @@ import { z } from "zod";

fieldToSet: z.ZodOptional<z.ZodString>;
targetFieldToMatch: z.ZodOptional<z.ZodString>;
targetField: z.ZodString;

@@ -395,2 +396,3 @@ targetCollection: z.ZodString;

fieldToSet?: string | undefined;
targetFieldToMatch?: string | undefined;
}, {

@@ -401,2 +403,3 @@ sourceField: string;

fieldToSet?: string | undefined;
targetFieldToMatch?: string | undefined;
}>, "many">>;

@@ -511,2 +514,3 @@ updateMapping: z.ZodOptional<z.ZodObject<{

fieldToSet?: string | undefined;
targetFieldToMatch?: string | undefined;
}[] | undefined;

@@ -545,2 +549,3 @@ updateMapping?: {

fieldToSet?: string | undefined;
targetFieldToMatch?: string | undefined;
}[] | undefined;

@@ -694,2 +699,3 @@ updateMapping?: {

fieldToSet?: string | undefined;
targetFieldToMatch?: string | undefined;
}[] | undefined;

@@ -849,2 +855,3 @@ updateMapping?: {

fieldToSet?: string | undefined;
targetFieldToMatch?: string | undefined;
}[] | undefined;

@@ -1017,2 +1024,3 @@ updateMapping?: {

fieldToSet?: string | undefined;
targetFieldToMatch?: string | undefined;
}[] | undefined;

@@ -1191,2 +1199,3 @@ updateMapping?: {

fieldToSet?: string | undefined;
targetFieldToMatch?: string | undefined;
}[] | undefined;

@@ -1193,0 +1202,0 @@ updateMapping?: {

@@ -5,2 +5,3 @@ import { z } from "zod";

fieldToSet: z.ZodOptional<z.ZodString>;
targetFieldToMatch: z.ZodOptional<z.ZodString>;
targetField: z.ZodString;

@@ -13,2 +14,3 @@ targetCollection: z.ZodString;

fieldToSet?: string | undefined;
targetFieldToMatch?: string | undefined;
}, {

@@ -19,2 +21,3 @@ sourceField: string;

fieldToSet?: string | undefined;
targetFieldToMatch?: string | undefined;
}>;

@@ -24,2 +27,3 @@ export declare const idMappingsSchema: z.ZodArray<z.ZodObject<{

fieldToSet: z.ZodOptional<z.ZodString>;
targetFieldToMatch: z.ZodOptional<z.ZodString>;
targetField: z.ZodString;

@@ -32,2 +36,3 @@ targetCollection: z.ZodString;

fieldToSet?: string | undefined;
targetFieldToMatch?: string | undefined;
}, {

@@ -38,4 +43,5 @@ sourceField: string;

fieldToSet?: string | undefined;
targetFieldToMatch?: string | undefined;
}>, "many">;
export type IdMappings = z.infer<typeof idMappingsSchema>;
export type IdMapping = z.infer<typeof idMappingSchema>;

8

dist/schemas/idMapping.js

@@ -9,6 +9,10 @@ import { z } from "zod";

.optional()
.describe("The field to set in the target collection, if different from sourceField"),
.describe("The field to set in the source collection, if different from sourceField"),
targetFieldToMatch: z
.string()
.optional()
.describe("The field in the target collection to match with sourceField that will then be updated"),
targetField: z
.string()
.describe("The field in the target collection to match with sourceField that will then be updated"),
.describe("The field in the target collection that, if targetFieldToMatch or this field matches, will be taken to update the sourceField/fieldToSet"),
targetCollection: z.string().describe("The collection to search"),

@@ -15,0 +19,0 @@ });

@@ -10,2 +10,3 @@ import { z } from "zod";

fieldToSet: z.ZodOptional<z.ZodString>;
targetFieldToMatch: z.ZodOptional<z.ZodString>;
targetField: z.ZodString;

@@ -18,2 +19,3 @@ targetCollection: z.ZodString;

fieldToSet?: string | undefined;
targetFieldToMatch?: string | undefined;
}, {

@@ -24,2 +26,3 @@ sourceField: string;

fieldToSet?: string | undefined;
targetFieldToMatch?: string | undefined;
}>, "many">>;

@@ -134,2 +137,3 @@ updateMapping: z.ZodOptional<z.ZodObject<{

fieldToSet?: string | undefined;
targetFieldToMatch?: string | undefined;
}[] | undefined;

@@ -168,2 +172,3 @@ updateMapping?: {

fieldToSet?: string | undefined;
targetFieldToMatch?: string | undefined;
}[] | undefined;

@@ -183,2 +188,3 @@ updateMapping?: {

fieldToSet: z.ZodOptional<z.ZodString>;
targetFieldToMatch: z.ZodOptional<z.ZodString>;
targetField: z.ZodString;

@@ -191,2 +197,3 @@ targetCollection: z.ZodString;

fieldToSet?: string | undefined;
targetFieldToMatch?: string | undefined;
}, {

@@ -197,2 +204,3 @@ sourceField: string;

fieldToSet?: string | undefined;
targetFieldToMatch?: string | undefined;
}>, "many">>;

@@ -307,2 +315,3 @@ updateMapping: z.ZodOptional<z.ZodObject<{

fieldToSet?: string | undefined;
targetFieldToMatch?: string | undefined;
}[] | undefined;

@@ -341,2 +350,3 @@ updateMapping?: {

fieldToSet?: string | undefined;
targetFieldToMatch?: string | undefined;
}[] | undefined;

@@ -343,0 +353,0 @@ updateMapping?: {

{
"name": "appwrite-utils",
"module": "dist/index.js",
"version": "0.2.4",
"version": "0.2.5",
"main": "dist/index.js",

@@ -6,0 +6,0 @@ "types": "dist/index.d.ts",

@@ -75,2 +75,3 @@ # appwrite-utils

- 0.2.5: Added `targetFieldToMatch` to the `idMappings` configuration which should allow more concise mapping of after-import fields
- 0.2.3: Added OpenAPI descriptions to AuthUserSchema, which also allows one to use the openapi package itself (`@asteasolutions/zod-to-openapi`) with the AuthUserSchema

@@ -77,0 +78,0 @@ - 0.2.2: Lots of updates, moved schemas and stuff here, fixed package, added export of AuthUser which got removed accidentally

@@ -0,0 +0,0 @@ import { z } from "zod";

@@ -0,0 +0,0 @@ import { z } from "zod";

@@ -13,9 +13,15 @@ import { z } from "zod";

.describe(
"The field to set in the target collection, if different from sourceField"
"The field to set in the source collection, if different from sourceField"
),
targetField: z
targetFieldToMatch: z
.string()
.optional()
.describe(
"The field in the target collection to match with sourceField that will then be updated"
),
targetField: z
.string()
.describe(
"The field in the target collection that, if targetFieldToMatch or this field matches, will be taken to update the sourceField/fieldToSet"
),
targetCollection: z.string().describe("The collection to search"),

@@ -22,0 +28,0 @@ });

Sorry, the diff of this file is too big to display