@coursebuilder/adapter-drizzle 0.1.1 → 0.1.2
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.
|
@@ -3889,6 +3889,28 @@ var z2 = /* @__PURE__ */ Object.freeze({
|
|
|
3889
3889
|
ZodError
|
|
3890
3890
|
});
|
|
3891
3891
|
|
|
3892
|
+
// ../core/dist/chunk-625UEV4B.js
|
|
3893
|
+
var purchaseUserTransferSchema = z.object({
|
|
3894
|
+
id: z.string().max(191),
|
|
3895
|
+
transferState: z.enum([
|
|
3896
|
+
"AVAILABLE",
|
|
3897
|
+
"INITIATED",
|
|
3898
|
+
"VERIFIED",
|
|
3899
|
+
"CANCELED",
|
|
3900
|
+
"EXPIRED",
|
|
3901
|
+
"CONFIRMED",
|
|
3902
|
+
"COMPLETED"
|
|
3903
|
+
]).default("AVAILABLE"),
|
|
3904
|
+
purchaseId: z.string().max(191),
|
|
3905
|
+
sourceUserId: z.string().max(191),
|
|
3906
|
+
targetUserId: z.string().max(191).optional(),
|
|
3907
|
+
createdAt: z.date().nullable(),
|
|
3908
|
+
expiresAt: z.date().nullable(),
|
|
3909
|
+
canceledAt: z.date().nullable(),
|
|
3910
|
+
confirmedAt: z.date().nullable(),
|
|
3911
|
+
completedAt: z.date().nullable()
|
|
3912
|
+
});
|
|
3913
|
+
|
|
3892
3914
|
// ../core/dist/chunk-NH6Z6YIN.js
|
|
3893
3915
|
var resourceProgressSchema = z.object({
|
|
3894
3916
|
userId: z.string().max(191),
|
|
@@ -3932,6 +3954,18 @@ var VideoResourceSchema = z.object({
|
|
|
3932
3954
|
])
|
|
3933
3955
|
});
|
|
3934
3956
|
|
|
3957
|
+
// ../core/dist/chunk-AYRXRIAF.js
|
|
3958
|
+
var merchantChargeSchema = z.object({
|
|
3959
|
+
id: z.string().length(191),
|
|
3960
|
+
status: z.number().int().default(0),
|
|
3961
|
+
identifier: z.string().length(191),
|
|
3962
|
+
userId: z.string().length(191),
|
|
3963
|
+
merchantAccountId: z.string().length(191),
|
|
3964
|
+
merchantProductId: z.string().length(191),
|
|
3965
|
+
createdAt: z.date().nullable(),
|
|
3966
|
+
merchantCustomerId: z.string().length(191)
|
|
3967
|
+
});
|
|
3968
|
+
|
|
3935
3969
|
// ../core/dist/chunk-NTKCZFHE.js
|
|
3936
3970
|
var merchantCouponSchema = z.object({
|
|
3937
3971
|
id: z.string().max(191),
|
|
@@ -4051,40 +4085,6 @@ var purchaseSchema = z.object({
|
|
|
4051
4085
|
product: productSchema.optional().nullable()
|
|
4052
4086
|
});
|
|
4053
4087
|
|
|
4054
|
-
// ../core/dist/chunk-625UEV4B.js
|
|
4055
|
-
var purchaseUserTransferSchema = z.object({
|
|
4056
|
-
id: z.string().max(191),
|
|
4057
|
-
transferState: z.enum([
|
|
4058
|
-
"AVAILABLE",
|
|
4059
|
-
"INITIATED",
|
|
4060
|
-
"VERIFIED",
|
|
4061
|
-
"CANCELED",
|
|
4062
|
-
"EXPIRED",
|
|
4063
|
-
"CONFIRMED",
|
|
4064
|
-
"COMPLETED"
|
|
4065
|
-
]).default("AVAILABLE"),
|
|
4066
|
-
purchaseId: z.string().max(191),
|
|
4067
|
-
sourceUserId: z.string().max(191),
|
|
4068
|
-
targetUserId: z.string().max(191).optional(),
|
|
4069
|
-
createdAt: z.date().nullable(),
|
|
4070
|
-
expiresAt: z.date().nullable(),
|
|
4071
|
-
canceledAt: z.date().nullable(),
|
|
4072
|
-
confirmedAt: z.date().nullable(),
|
|
4073
|
-
completedAt: z.date().nullable()
|
|
4074
|
-
});
|
|
4075
|
-
|
|
4076
|
-
// ../core/dist/chunk-AYRXRIAF.js
|
|
4077
|
-
var merchantChargeSchema = z.object({
|
|
4078
|
-
id: z.string().length(191),
|
|
4079
|
-
status: z.number().int().default(0),
|
|
4080
|
-
identifier: z.string().length(191),
|
|
4081
|
-
userId: z.string().length(191),
|
|
4082
|
-
merchantAccountId: z.string().length(191),
|
|
4083
|
-
merchantProductId: z.string().length(191),
|
|
4084
|
-
createdAt: z.date().nullable(),
|
|
4085
|
-
merchantCustomerId: z.string().length(191)
|
|
4086
|
-
});
|
|
4087
|
-
|
|
4088
4088
|
// src/lib/mysql/index.ts
|
|
4089
4089
|
function getCourseBuilderSchema(mysqlTable) {
|
|
4090
4090
|
return {
|
|
@@ -4488,7 +4488,7 @@ function mySqlDrizzleAdapter(client, tableFn = defaultMySqlTableFn) {
|
|
|
4488
4488
|
},
|
|
4489
4489
|
async getVideoResource(id) {
|
|
4490
4490
|
if (!id) {
|
|
4491
|
-
|
|
4491
|
+
return null;
|
|
4492
4492
|
}
|
|
4493
4493
|
const query = sql`
|
|
4494
4494
|
SELECT
|
|
@@ -4676,4 +4676,4 @@ export {
|
|
|
4676
4676
|
createTables,
|
|
4677
4677
|
mySqlDrizzleAdapter
|
|
4678
4678
|
};
|
|
4679
|
-
//# sourceMappingURL=chunk-
|
|
4679
|
+
//# sourceMappingURL=chunk-DHYYRN35.js.map
|
package/dist/index.js
CHANGED
package/dist/lib/mysql/index.cjs
CHANGED
|
@@ -7914,6 +7914,28 @@ var z2 = /* @__PURE__ */ Object.freeze({
|
|
|
7914
7914
|
ZodError: ZodError2
|
|
7915
7915
|
});
|
|
7916
7916
|
|
|
7917
|
+
// ../core/dist/chunk-625UEV4B.js
|
|
7918
|
+
var purchaseUserTransferSchema = z2.object({
|
|
7919
|
+
id: z2.string().max(191),
|
|
7920
|
+
transferState: z2.enum([
|
|
7921
|
+
"AVAILABLE",
|
|
7922
|
+
"INITIATED",
|
|
7923
|
+
"VERIFIED",
|
|
7924
|
+
"CANCELED",
|
|
7925
|
+
"EXPIRED",
|
|
7926
|
+
"CONFIRMED",
|
|
7927
|
+
"COMPLETED"
|
|
7928
|
+
]).default("AVAILABLE"),
|
|
7929
|
+
purchaseId: z2.string().max(191),
|
|
7930
|
+
sourceUserId: z2.string().max(191),
|
|
7931
|
+
targetUserId: z2.string().max(191).optional(),
|
|
7932
|
+
createdAt: z2.date().nullable(),
|
|
7933
|
+
expiresAt: z2.date().nullable(),
|
|
7934
|
+
canceledAt: z2.date().nullable(),
|
|
7935
|
+
confirmedAt: z2.date().nullable(),
|
|
7936
|
+
completedAt: z2.date().nullable()
|
|
7937
|
+
});
|
|
7938
|
+
|
|
7917
7939
|
// ../core/dist/chunk-NH6Z6YIN.js
|
|
7918
7940
|
var resourceProgressSchema = z2.object({
|
|
7919
7941
|
userId: z2.string().max(191),
|
|
@@ -7957,6 +7979,18 @@ var VideoResourceSchema = z2.object({
|
|
|
7957
7979
|
])
|
|
7958
7980
|
});
|
|
7959
7981
|
|
|
7982
|
+
// ../core/dist/chunk-AYRXRIAF.js
|
|
7983
|
+
var merchantChargeSchema = z2.object({
|
|
7984
|
+
id: z2.string().length(191),
|
|
7985
|
+
status: z2.number().int().default(0),
|
|
7986
|
+
identifier: z2.string().length(191),
|
|
7987
|
+
userId: z2.string().length(191),
|
|
7988
|
+
merchantAccountId: z2.string().length(191),
|
|
7989
|
+
merchantProductId: z2.string().length(191),
|
|
7990
|
+
createdAt: z2.date().nullable(),
|
|
7991
|
+
merchantCustomerId: z2.string().length(191)
|
|
7992
|
+
});
|
|
7993
|
+
|
|
7960
7994
|
// ../core/dist/chunk-NTKCZFHE.js
|
|
7961
7995
|
var merchantCouponSchema = z2.object({
|
|
7962
7996
|
id: z2.string().max(191),
|
|
@@ -8076,40 +8110,6 @@ var purchaseSchema = z2.object({
|
|
|
8076
8110
|
product: productSchema.optional().nullable()
|
|
8077
8111
|
});
|
|
8078
8112
|
|
|
8079
|
-
// ../core/dist/chunk-625UEV4B.js
|
|
8080
|
-
var purchaseUserTransferSchema = z2.object({
|
|
8081
|
-
id: z2.string().max(191),
|
|
8082
|
-
transferState: z2.enum([
|
|
8083
|
-
"AVAILABLE",
|
|
8084
|
-
"INITIATED",
|
|
8085
|
-
"VERIFIED",
|
|
8086
|
-
"CANCELED",
|
|
8087
|
-
"EXPIRED",
|
|
8088
|
-
"CONFIRMED",
|
|
8089
|
-
"COMPLETED"
|
|
8090
|
-
]).default("AVAILABLE"),
|
|
8091
|
-
purchaseId: z2.string().max(191),
|
|
8092
|
-
sourceUserId: z2.string().max(191),
|
|
8093
|
-
targetUserId: z2.string().max(191).optional(),
|
|
8094
|
-
createdAt: z2.date().nullable(),
|
|
8095
|
-
expiresAt: z2.date().nullable(),
|
|
8096
|
-
canceledAt: z2.date().nullable(),
|
|
8097
|
-
confirmedAt: z2.date().nullable(),
|
|
8098
|
-
completedAt: z2.date().nullable()
|
|
8099
|
-
});
|
|
8100
|
-
|
|
8101
|
-
// ../core/dist/chunk-AYRXRIAF.js
|
|
8102
|
-
var merchantChargeSchema = z2.object({
|
|
8103
|
-
id: z2.string().length(191),
|
|
8104
|
-
status: z2.number().int().default(0),
|
|
8105
|
-
identifier: z2.string().length(191),
|
|
8106
|
-
userId: z2.string().length(191),
|
|
8107
|
-
merchantAccountId: z2.string().length(191),
|
|
8108
|
-
merchantProductId: z2.string().length(191),
|
|
8109
|
-
createdAt: z2.date().nullable(),
|
|
8110
|
-
merchantCustomerId: z2.string().length(191)
|
|
8111
|
-
});
|
|
8112
|
-
|
|
8113
8113
|
// ../core/dist/schemas/content-resource-schema.js
|
|
8114
8114
|
var ContentResourceResourceSchema = z2.object({
|
|
8115
8115
|
resourceId: z2.string(),
|
|
@@ -10060,7 +10060,7 @@ function mySqlDrizzleAdapter(client, tableFn = import_mysql_core31.mysqlTable) {
|
|
|
10060
10060
|
},
|
|
10061
10061
|
async getVideoResource(id) {
|
|
10062
10062
|
if (!id) {
|
|
10063
|
-
|
|
10063
|
+
return null;
|
|
10064
10064
|
}
|
|
10065
10065
|
const query = import_drizzle_orm26.sql`
|
|
10066
10066
|
SELECT
|