@porulle/core 0.31.0 → 0.33.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/dist/auth/auth-schema-guard.d.ts +4 -0
- package/dist/auth/auth-schema-guard.d.ts.map +1 -1
- package/dist/auth/auth-schema-guard.js +1 -0
- package/dist/auth/auth-schema.d.ts +17 -0
- package/dist/auth/auth-schema.d.ts.map +1 -1
- package/dist/auth/auth-schema.js +6 -0
- package/dist/auth/setup.d.ts.map +1 -1
- package/dist/auth/setup.js +1 -0
- package/package.json +1 -1
- package/src/auth/auth-schema-guard.ts +1 -0
- package/src/auth/auth-schema.ts +6 -0
- package/src/auth/setup.ts +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-schema-guard.d.ts","sourceRoot":"","sources":["../../src/auth/auth-schema-guard.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAKrD;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"auth-schema-guard.d.ts","sourceRoot":"","sources":["../../src/auth/auth-schema-guard.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAKrD;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCA4Hd,CAAC;qCAAkD,CAAC;;;;;;;;;iC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AAE,iBAA6C,GACrD,wBAAwB,EAAE,CA4C5B;AAED,wBAAgB,sBAAsB,CACpC,OAAO,GAAE,iBAA6C,GACrD,IAAI,CAUN"}
|
|
@@ -155,6 +155,23 @@ export declare const user: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
155
155
|
identity: undefined;
|
|
156
156
|
generated: undefined;
|
|
157
157
|
}, {}, {}>;
|
|
158
|
+
dateOfBirth: import("drizzle-orm/pg-core").PgColumn<{
|
|
159
|
+
name: "date_of_birth";
|
|
160
|
+
tableName: "user";
|
|
161
|
+
dataType: "string";
|
|
162
|
+
columnType: "PgText";
|
|
163
|
+
data: string;
|
|
164
|
+
driverParam: string;
|
|
165
|
+
notNull: false;
|
|
166
|
+
hasDefault: false;
|
|
167
|
+
isPrimaryKey: false;
|
|
168
|
+
isAutoincrement: false;
|
|
169
|
+
hasRuntimeDefault: false;
|
|
170
|
+
enumValues: [string, ...string[]];
|
|
171
|
+
baseColumn: never;
|
|
172
|
+
identity: undefined;
|
|
173
|
+
generated: undefined;
|
|
174
|
+
}, {}, {}>;
|
|
158
175
|
twoFactorEnabled: import("drizzle-orm/pg-core").PgColumn<{
|
|
159
176
|
name: "two_factor_enabled";
|
|
160
177
|
tableName: "user";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-schema.d.ts","sourceRoot":"","sources":["../../src/auth/auth-schema.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,IAAI
|
|
1
|
+
{"version":3,"file":"auth-schema.d.ts","sourceRoot":"","sources":["../../src/auth/auth-schema.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAarB,CAAC;AAEH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBjB,CAAC;AAEH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQf,CAAC;AAEH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUpB,CAAC"}
|
package/dist/auth/auth-schema.js
CHANGED
|
@@ -12,6 +12,12 @@ export const user = pgTable("user", {
|
|
|
12
12
|
.notNull(),
|
|
13
13
|
vendorId: text("vendor_id"),
|
|
14
14
|
posOperatorPin: text("pos_operator_pin"),
|
|
15
|
+
// Self-declared, "YYYY-MM-DD", optional: a storefront selling age-restricted
|
|
16
|
+
// goods needs it, and one selling anything else must not be made to collect
|
|
17
|
+
// it. Stored as text rather than a date so the value a shopper typed is the
|
|
18
|
+
// value that is read back — a timestamp column would silently apply a
|
|
19
|
+
// timezone to a day that has none.
|
|
20
|
+
dateOfBirth: text("date_of_birth"),
|
|
15
21
|
// Contributed by the twoFactor and phoneNumber plugins. Declared
|
|
16
22
|
// unconditionally: the plugins are config-gated, but one shipped schema has
|
|
17
23
|
// to satisfy every configuration a merchant can choose.
|
package/dist/auth/setup.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/auth/setup.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAkBrE;;;;;GAKG;AACH,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC;IACjD,OAAO,EAAE;QACP,UAAU,CAAC,OAAO,YAAY,CAAC;QAC/B,UAAU,CAAC,OAAO,MAAM,CAAC;QACzB,UAAU,CAAC,OAAO,GAAG,CAAC;QACtB,UAAU,CAAC,OAAO,SAAS,CAAC;QAC5B,UAAU,CAAC,OAAO,MAAM,CAAC;QACzB,UAAU,CAAC,OAAO,WAAW,CAAC;KAC/B,CAAC;CACH,CAAC,CAAC,CAAC;AAEJ;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,cAAc,CAAC;AAE1C,wBAAgB,UAAU,CACxB,EAAE,EAAE,eAAe,EACnB,MAAM,EAAE,cAAc,GACrB,YAAY,
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/auth/setup.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAkBrE;;;;;GAKG;AACH,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC;IACjD,OAAO,EAAE;QACP,UAAU,CAAC,OAAO,YAAY,CAAC;QAC/B,UAAU,CAAC,OAAO,MAAM,CAAC;QACzB,UAAU,CAAC,OAAO,GAAG,CAAC;QACtB,UAAU,CAAC,OAAO,SAAS,CAAC;QAC5B,UAAU,CAAC,OAAO,MAAM,CAAC;QACzB,UAAU,CAAC,OAAO,WAAW,CAAC;KAC/B,CAAC;CACH,CAAC,CAAC,CAAC;AAEJ;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,cAAc,CAAC;AAE1C,wBAAgB,UAAU,CACxB,EAAE,EAAE,eAAe,EACnB,MAAM,EAAE,cAAc,GACrB,YAAY,CAoKd"}
|
package/dist/auth/setup.js
CHANGED
|
@@ -144,6 +144,7 @@ export function createAuth(db, config) {
|
|
|
144
144
|
additionalFields: {
|
|
145
145
|
vendorId: { type: "string", required: false },
|
|
146
146
|
posOperatorPin: { type: "string", required: false },
|
|
147
|
+
dateOfBirth: { type: "string", required: false, input: true },
|
|
147
148
|
},
|
|
148
149
|
},
|
|
149
150
|
});
|
package/package.json
CHANGED
|
@@ -31,6 +31,7 @@ export const AUTH_SCHEMA_GUARD_OPTIONS = {
|
|
|
31
31
|
additionalFields: {
|
|
32
32
|
vendorId: { type: "string", required: false },
|
|
33
33
|
posOperatorPin: { type: "string", required: false },
|
|
34
|
+
dateOfBirth: { type: "string", required: false },
|
|
34
35
|
},
|
|
35
36
|
},
|
|
36
37
|
} satisfies BetterAuthOptions;
|
package/src/auth/auth-schema.ts
CHANGED
|
@@ -20,6 +20,12 @@ export const user = pgTable("user", {
|
|
|
20
20
|
.notNull(),
|
|
21
21
|
vendorId: text("vendor_id"),
|
|
22
22
|
posOperatorPin: text("pos_operator_pin"),
|
|
23
|
+
// Self-declared, "YYYY-MM-DD", optional: a storefront selling age-restricted
|
|
24
|
+
// goods needs it, and one selling anything else must not be made to collect
|
|
25
|
+
// it. Stored as text rather than a date so the value a shopper typed is the
|
|
26
|
+
// value that is read back — a timestamp column would silently apply a
|
|
27
|
+
// timezone to a day that has none.
|
|
28
|
+
dateOfBirth: text("date_of_birth"),
|
|
23
29
|
// Contributed by the twoFactor and phoneNumber plugins. Declared
|
|
24
30
|
// unconditionally: the plugins are config-gated, but one shipped schema has
|
|
25
31
|
// to satisfy every configuration a merchant can choose.
|
package/src/auth/setup.ts
CHANGED