Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nexeraprotocol/nexera-id-schemas

Package Overview
Dependencies
Maintainers
1
Versions
385
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nexeraprotocol/nexera-id-schemas - npm Package Compare versions

Comparing version 1.0.24 to 1.0.25

77

api/dist/nexeraprotocol-nexera-id-schemas-api.cjs.dev.js

@@ -28,28 +28,7 @@ 'use strict';

});
zod.z.object({
address: zod.z.string()
});
zod.z.object({
id: zod.z.string().uuid()
});
zod.z.object({
id: zod.z.string().uuid(),
journeyId: zod.z.string().uuid().describe("journeyId is generated by GBG sdk and passed to us on the frontend")
});
zod.z.object({
id: zod.z.string().uuid(),
did: zod.z.string().uuid(),
journeyId: zod.z.string().uuid()
});
zod.z.object({
id: zod.z.string().uuid(),
did: zod.z.string().uuid(),
journeyId: zod.z.string().uuid()
});
zod.z.object({
msg: zod.z.string()
});
var LogDataTopics = ["KYC_AUTH_ACCESS_TOKEN", "KYC_JOURNEY_GBG_END", "KYC_JOURNEY_GBG_STARTED", "KYC_JOURNEY_GBG_IDSCAN_COMPLETED", "KYC_JOURNEY_GBG_ID3_COMPLETED", "KYC_JOURNEY_DATA_SUBMITTED"];
var LogDataTopicSchema = zod.z["enum"](LogDataTopics);
/**
* Helper type to get the log data type for a given topic
* Different types of log data that can be sent to the logger and that are parsed by the data pipeline
* @example

@@ -65,4 +44,54 @@ * ```ts

*/
var LogDataSchema = zod.z.union([zod.z.object({
topic: zod.z.literal("KYC_AUTH_ACCESS_TOKEN"),
data: zod.z.object({
address: dist_nexeraprotocolNexeraIdSchemas.AddressSchema
})
}), zod.z.object({
topic: zod.z.literal("KYC_JOURNEY_GBG_STARTED"),
data: zod.z.object({
sessionId: zod.z.string().uuid()
})
}), zod.z.object({
topic: zod.z.literal("KYC_JOURNEY_GBG_END"),
data: zod.z.object({
sessionId: zod.z.string().uuid(),
gbgJourneyId: zod.z.string().uuid().describe("journeyId is generated by GBG sdk and passed to us on the frontend")
})
}), zod.z.object({
topic: zod.z.literal("KYC_JOURNEY_GBG_IDSCAN_COMPLETED"),
data: zod.z.object({
sessionId: zod.z.string().uuid(),
gbgJourneyId: zod.z.string().uuid(),
did: zod.z.string().uuid()
})
}), zod.z.object({
topic: zod.z.literal("KYC_JOURNEY_GBG_ID3_COMPLETED"),
data: zod.z.object({
sessionId: zod.z.string().uuid(),
gbgJourneyId: zod.z.string().uuid(),
did: zod.z.string().uuid()
})
}), zod.z.object({
topic: zod.z.literal("KYC_JOURNEY_DATA_SUBMITTED"),
data: zod.z.object({
address: dist_nexeraprotocolNexeraIdSchemas.AddressSchema
})
})]);
/**
* Logger schema used by request logger middleware that logs all requests
*/
var RequestLoggerSchema = zod.z.object({
status: zod.z["enum"](["✅OK", "❌Non-OK"]),
type: zod.z["enum"](["query", "mutation", "subscription"]),
path: zod.z.string(),
durationMs: zod.z.number(),
url: zod.z.string()
});
exports.ApiSessionDataSchema = ApiSessionDataSchema;
exports.CmsSessionDataSchema = CmsSessionDataSchema;
exports.LogDataSchema = LogDataSchema;
exports.LogDataTopicSchema = LogDataTopicSchema;
exports.LogDataTopics = LogDataTopics;
exports.RequestLoggerSchema = RequestLoggerSchema;

@@ -28,28 +28,7 @@ 'use strict';

});
zod.z.object({
address: zod.z.string()
});
zod.z.object({
id: zod.z.string().uuid()
});
zod.z.object({
id: zod.z.string().uuid(),
journeyId: zod.z.string().uuid().describe("journeyId is generated by GBG sdk and passed to us on the frontend")
});
zod.z.object({
id: zod.z.string().uuid(),
did: zod.z.string().uuid(),
journeyId: zod.z.string().uuid()
});
zod.z.object({
id: zod.z.string().uuid(),
did: zod.z.string().uuid(),
journeyId: zod.z.string().uuid()
});
zod.z.object({
msg: zod.z.string()
});
var LogDataTopics = ["KYC_AUTH_ACCESS_TOKEN", "KYC_JOURNEY_GBG_END", "KYC_JOURNEY_GBG_STARTED", "KYC_JOURNEY_GBG_IDSCAN_COMPLETED", "KYC_JOURNEY_GBG_ID3_COMPLETED", "KYC_JOURNEY_DATA_SUBMITTED"];
var LogDataTopicSchema = zod.z["enum"](LogDataTopics);
/**
* Helper type to get the log data type for a given topic
* Different types of log data that can be sent to the logger and that are parsed by the data pipeline
* @example

@@ -65,4 +44,54 @@ * ```ts

*/
var LogDataSchema = zod.z.union([zod.z.object({
topic: zod.z.literal("KYC_AUTH_ACCESS_TOKEN"),
data: zod.z.object({
address: dist_nexeraprotocolNexeraIdSchemas.AddressSchema
})
}), zod.z.object({
topic: zod.z.literal("KYC_JOURNEY_GBG_STARTED"),
data: zod.z.object({
sessionId: zod.z.string().uuid()
})
}), zod.z.object({
topic: zod.z.literal("KYC_JOURNEY_GBG_END"),
data: zod.z.object({
sessionId: zod.z.string().uuid(),
gbgJourneyId: zod.z.string().uuid().describe("journeyId is generated by GBG sdk and passed to us on the frontend")
})
}), zod.z.object({
topic: zod.z.literal("KYC_JOURNEY_GBG_IDSCAN_COMPLETED"),
data: zod.z.object({
sessionId: zod.z.string().uuid(),
gbgJourneyId: zod.z.string().uuid(),
did: zod.z.string().uuid()
})
}), zod.z.object({
topic: zod.z.literal("KYC_JOURNEY_GBG_ID3_COMPLETED"),
data: zod.z.object({
sessionId: zod.z.string().uuid(),
gbgJourneyId: zod.z.string().uuid(),
did: zod.z.string().uuid()
})
}), zod.z.object({
topic: zod.z.literal("KYC_JOURNEY_DATA_SUBMITTED"),
data: zod.z.object({
address: dist_nexeraprotocolNexeraIdSchemas.AddressSchema
})
})]);
/**
* Logger schema used by request logger middleware that logs all requests
*/
var RequestLoggerSchema = zod.z.object({
status: zod.z["enum"](["✅OK", "❌Non-OK"]),
type: zod.z["enum"](["query", "mutation", "subscription"]),
path: zod.z.string(),
durationMs: zod.z.number(),
url: zod.z.string()
});
exports.ApiSessionDataSchema = ApiSessionDataSchema;
exports.CmsSessionDataSchema = CmsSessionDataSchema;
exports.LogDataSchema = LogDataSchema;
exports.LogDataTopicSchema = LogDataTopicSchema;
exports.LogDataTopics = LogDataTopics;
exports.RequestLoggerSchema = RequestLoggerSchema;

@@ -24,28 +24,7 @@ import { z } from 'zod';

});
z.object({
address: z.string()
});
z.object({
id: z.string().uuid()
});
z.object({
id: z.string().uuid(),
journeyId: z.string().uuid().describe("journeyId is generated by GBG sdk and passed to us on the frontend")
});
z.object({
id: z.string().uuid(),
did: z.string().uuid(),
journeyId: z.string().uuid()
});
z.object({
id: z.string().uuid(),
did: z.string().uuid(),
journeyId: z.string().uuid()
});
z.object({
msg: z.string()
});
var LogDataTopics = ["KYC_AUTH_ACCESS_TOKEN", "KYC_JOURNEY_GBG_END", "KYC_JOURNEY_GBG_STARTED", "KYC_JOURNEY_GBG_IDSCAN_COMPLETED", "KYC_JOURNEY_GBG_ID3_COMPLETED", "KYC_JOURNEY_DATA_SUBMITTED"];
var LogDataTopicSchema = z["enum"](LogDataTopics);
/**
* Helper type to get the log data type for a given topic
* Different types of log data that can be sent to the logger and that are parsed by the data pipeline
* @example

@@ -61,3 +40,49 @@ * ```ts

*/
var LogDataSchema = z.union([z.object({
topic: z.literal("KYC_AUTH_ACCESS_TOKEN"),
data: z.object({
address: AddressSchema
})
}), z.object({
topic: z.literal("KYC_JOURNEY_GBG_STARTED"),
data: z.object({
sessionId: z.string().uuid()
})
}), z.object({
topic: z.literal("KYC_JOURNEY_GBG_END"),
data: z.object({
sessionId: z.string().uuid(),
gbgJourneyId: z.string().uuid().describe("journeyId is generated by GBG sdk and passed to us on the frontend")
})
}), z.object({
topic: z.literal("KYC_JOURNEY_GBG_IDSCAN_COMPLETED"),
data: z.object({
sessionId: z.string().uuid(),
gbgJourneyId: z.string().uuid(),
did: z.string().uuid()
})
}), z.object({
topic: z.literal("KYC_JOURNEY_GBG_ID3_COMPLETED"),
data: z.object({
sessionId: z.string().uuid(),
gbgJourneyId: z.string().uuid(),
did: z.string().uuid()
})
}), z.object({
topic: z.literal("KYC_JOURNEY_DATA_SUBMITTED"),
data: z.object({
address: AddressSchema
})
})]);
/**
* Logger schema used by request logger middleware that logs all requests
*/
var RequestLoggerSchema = z.object({
status: z["enum"](["✅OK", "❌Non-OK"]),
type: z["enum"](["query", "mutation", "subscription"]),
path: z.string(),
durationMs: z.number(),
url: z.string()
});
export { ApiSessionDataSchema, CmsSessionDataSchema };
export { ApiSessionDataSchema, CmsSessionDataSchema, LogDataSchema, LogDataTopicSchema, LogDataTopics, RequestLoggerSchema };

@@ -146,86 +146,180 @@ import { z } from "zod";

export type ApiSessionData = z.infer<typeof ApiSessionDataSchema>;
declare const KYC_AUTH_ACCESS_TOKEN_Schema: z.ZodObject<{
address: z.ZodString;
export declare const LogDataTopics: readonly ["KYC_AUTH_ACCESS_TOKEN", "KYC_JOURNEY_GBG_END", "KYC_JOURNEY_GBG_STARTED", "KYC_JOURNEY_GBG_IDSCAN_COMPLETED", "KYC_JOURNEY_GBG_ID3_COMPLETED", "KYC_JOURNEY_DATA_SUBMITTED"];
export type LogDataTopic = (typeof LogDataTopics)[number];
export declare const LogDataTopicSchema: z.ZodEnum<["KYC_AUTH_ACCESS_TOKEN", "KYC_JOURNEY_GBG_END", "KYC_JOURNEY_GBG_STARTED", "KYC_JOURNEY_GBG_IDSCAN_COMPLETED", "KYC_JOURNEY_GBG_ID3_COMPLETED", "KYC_JOURNEY_DATA_SUBMITTED"]>;
/**
* Different types of log data that can be sent to the logger and that are parsed by the data pipeline
* @example
* ```ts
* const logData: LogData = {
* topic: "KYC_JOURNEY_GBG_STARTED",
* data: {
* journeyId: newJourneySession.id,
* },
* };
* ```
*/
export declare const LogDataSchema: z.ZodUnion<[z.ZodObject<{
topic: z.ZodLiteral<"KYC_AUTH_ACCESS_TOKEN">;
data: z.ZodObject<{
address: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
}, "strip", z.ZodTypeAny, {
address: string;
}, {
address: string;
}>;
}, "strip", z.ZodTypeAny, {
address: string;
data: {
address: string;
};
topic: "KYC_AUTH_ACCESS_TOKEN";
}, {
address: string;
}>;
declare const KYC_JOURNEY_GBG_STARTED_Schema: z.ZodObject<{
id: z.ZodString;
data: {
address: string;
};
topic: "KYC_AUTH_ACCESS_TOKEN";
}>, z.ZodObject<{
topic: z.ZodLiteral<"KYC_JOURNEY_GBG_STARTED">;
data: z.ZodObject<{
sessionId: z.ZodString;
}, "strip", z.ZodTypeAny, {
sessionId: string;
}, {
sessionId: string;
}>;
}, "strip", z.ZodTypeAny, {
id: string;
data: {
sessionId: string;
};
topic: "KYC_JOURNEY_GBG_STARTED";
}, {
id: string;
}>;
declare const KYC_JOURNEY_GBG_END_Schema: z.ZodObject<{
id: z.ZodString;
journeyId: z.ZodString;
data: {
sessionId: string;
};
topic: "KYC_JOURNEY_GBG_STARTED";
}>, z.ZodObject<{
topic: z.ZodLiteral<"KYC_JOURNEY_GBG_END">;
data: z.ZodObject<{
sessionId: z.ZodString;
gbgJourneyId: z.ZodString;
}, "strip", z.ZodTypeAny, {
sessionId: string;
gbgJourneyId: string;
}, {
sessionId: string;
gbgJourneyId: string;
}>;
}, "strip", z.ZodTypeAny, {
id: string;
journeyId: string;
data: {
sessionId: string;
gbgJourneyId: string;
};
topic: "KYC_JOURNEY_GBG_END";
}, {
id: string;
journeyId: string;
}>;
declare const KYC_JOURNEY_GBG_IDSCAN_COMPLETED_Schema: z.ZodObject<{
id: z.ZodString;
did: z.ZodString;
journeyId: z.ZodString;
data: {
sessionId: string;
gbgJourneyId: string;
};
topic: "KYC_JOURNEY_GBG_END";
}>, z.ZodObject<{
topic: z.ZodLiteral<"KYC_JOURNEY_GBG_IDSCAN_COMPLETED">;
data: z.ZodObject<{
sessionId: z.ZodString;
gbgJourneyId: z.ZodString;
did: z.ZodString;
}, "strip", z.ZodTypeAny, {
sessionId: string;
gbgJourneyId: string;
did: string;
}, {
sessionId: string;
gbgJourneyId: string;
did: string;
}>;
}, "strip", z.ZodTypeAny, {
id: string;
journeyId: string;
did: string;
data: {
sessionId: string;
gbgJourneyId: string;
did: string;
};
topic: "KYC_JOURNEY_GBG_IDSCAN_COMPLETED";
}, {
id: string;
journeyId: string;
did: string;
}>;
declare const KYC_JOURNEY_GBG_ID3_COMPLETED_Schema: z.ZodObject<{
id: z.ZodString;
did: z.ZodString;
journeyId: z.ZodString;
data: {
sessionId: string;
gbgJourneyId: string;
did: string;
};
topic: "KYC_JOURNEY_GBG_IDSCAN_COMPLETED";
}>, z.ZodObject<{
topic: z.ZodLiteral<"KYC_JOURNEY_GBG_ID3_COMPLETED">;
data: z.ZodObject<{
sessionId: z.ZodString;
gbgJourneyId: z.ZodString;
did: z.ZodString;
}, "strip", z.ZodTypeAny, {
sessionId: string;
gbgJourneyId: string;
did: string;
}, {
sessionId: string;
gbgJourneyId: string;
did: string;
}>;
}, "strip", z.ZodTypeAny, {
id: string;
journeyId: string;
did: string;
data: {
sessionId: string;
gbgJourneyId: string;
did: string;
};
topic: "KYC_JOURNEY_GBG_ID3_COMPLETED";
}, {
id: string;
journeyId: string;
did: string;
}>;
declare const KYC_JOURNEY_DATA_SUBMITTED_Schema: z.ZodObject<{
msg: z.ZodString;
data: {
sessionId: string;
gbgJourneyId: string;
did: string;
};
topic: "KYC_JOURNEY_GBG_ID3_COMPLETED";
}>, z.ZodObject<{
topic: z.ZodLiteral<"KYC_JOURNEY_DATA_SUBMITTED">;
data: z.ZodObject<{
address: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
}, "strip", z.ZodTypeAny, {
address: string;
}, {
address: string;
}>;
}, "strip", z.ZodTypeAny, {
msg: string;
data: {
address: string;
};
topic: "KYC_JOURNEY_DATA_SUBMITTED";
}, {
msg: string;
}>;
type LogSchemas = {
KYC_AUTH_ACCESS_TOKEN: z.infer<typeof KYC_AUTH_ACCESS_TOKEN_Schema>;
KYC_JOURNEY_GBG_END: z.infer<typeof KYC_JOURNEY_GBG_END_Schema>;
KYC_JOURNEY_GBG_STARTED: z.infer<typeof KYC_JOURNEY_GBG_STARTED_Schema>;
KYC_JOURNEY_GBG_IDSCAN_COMPLETED: z.infer<typeof KYC_JOURNEY_GBG_IDSCAN_COMPLETED_Schema>;
KYC_JOURNEY_GBG_ID3_COMPLETED: z.infer<typeof KYC_JOURNEY_GBG_ID3_COMPLETED_Schema>;
KYC_JOURNEY_DATA_SUBMITTED: z.infer<typeof KYC_JOURNEY_DATA_SUBMITTED_Schema>;
};
type LogTopic = keyof LogSchemas;
data: {
address: string;
};
topic: "KYC_JOURNEY_DATA_SUBMITTED";
}>]>;
export type LogData = z.infer<typeof LogDataSchema>;
/**
* Helper type to get the log data type for a given topic
* @example
* ```ts
* const logData: LogData = {
* topic: "KYC_JOURNEY_GBG_STARTED",
* data: {
* journeyId: newJourneySession.id,
* },
* };
* ```
* Logger schema used by request logger middleware that logs all requests
*/
export type LogData = {
[P in LogTopic]: {
topic: P;
data: LogSchemas[P];
};
}[LogTopic];
export {};
export declare const RequestLoggerSchema: z.ZodObject<{
status: z.ZodEnum<["✅OK", "❌Non-OK"]>;
type: z.ZodEnum<["query", "mutation", "subscription"]>;
path: z.ZodString;
durationMs: z.ZodNumber;
url: z.ZodString;
}, "strip", z.ZodTypeAny, {
path: string;
type: "query" | "mutation" | "subscription";
status: "✅OK" | "❌Non-OK";
durationMs: number;
url: string;
}, {
path: string;
type: "query" | "mutation" | "subscription";
status: "✅OK" | "❌Non-OK";
durationMs: number;
url: string;
}>;
export type RequestLogger = z.infer<typeof RequestLoggerSchema>;

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

id: string;
name: string;
journeyId: string;
name: string;
documentType: string;

@@ -17,6 +17,6 @@ base64: string;

id: string;
name: string;
journeyId: string;
name: string;
documentType: string;
base64: string;
}>;

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

id: string;
name: string;
journeyId: string;
name: string;
documentType: string;

@@ -17,6 +17,6 @@ base64: string;

id: string;
name: string;
journeyId: string;
name: string;
documentType: string;
base64: string;
}>;

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

id: string;
name: string;
journeyId: string;
name: string;
country: string;

@@ -19,4 +19,4 @@ documentType: string;

id: string;
name: string;
journeyId: string;
name: string;
country: string;

@@ -23,0 +23,0 @@ documentType: string;

{
"name": "@nexeraprotocol/nexera-id-schemas",
"version": "1.0.24",
"version": "1.0.25",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/nexeraprotocol-nexera-id-schemas.cjs.js",

{
"name": "@nexeraprotocol/nexera-id-schemas",
"version": "1.0.24",
"version": "1.0.25",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/nexeraprotocol-nexera-id-schemas.cjs.js",

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

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