@coursebuilder/adapter-drizzle 1.0.4 → 1.0.7
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/{chunk-KPBVZ44W.js → chunk-2I7NIOKI.js} +2 -2
- package/dist/chunk-2X5XVNDN.js +12 -0
- package/dist/{chunk-3GONHHMY.js → chunk-3RQH7IPC.js} +4 -4
- package/dist/{chunk-BLDW3QUS.js → chunk-5NNBQJUP.js} +2 -2
- package/dist/{chunk-HWIQUI7O.js → chunk-5WMUBNWJ.js} +6 -5
- package/dist/{chunk-WJWJ6E5Y.js → chunk-65H5Y4PD.js} +2 -2
- package/dist/{chunk-MP4CUWYC.js → chunk-6SJORFGN.js} +2 -2
- package/dist/chunk-6XFVP2Q4.js +101 -0
- package/dist/chunk-7223HR2E.js +112 -0
- package/dist/{chunk-ET3QAIY7.js → chunk-CCXVDMTA.js} +2 -2
- package/dist/{chunk-DKJO4Y3K.js → chunk-DNBW5D64.js} +2 -2
- package/dist/{chunk-ARHWIBFG.js → chunk-DP6YPJZ4.js} +2804 -1252
- package/dist/{chunk-OBUGOZKM.js → chunk-EJ7UDN4T.js} +6 -5
- package/dist/{chunk-YQNIXCD3.js → chunk-ENIKVP6O.js} +6 -5
- package/dist/chunk-HEQ5MII4.js +12764 -0
- package/dist/{chunk-LPJ2P2KJ.js → chunk-JX53ECWI.js} +69 -48
- package/dist/chunk-LV3LIBNU.js +12764 -0
- package/dist/chunk-MQSLKVLJ.js +101 -0
- package/dist/chunk-MUFYDXA7.js +2143 -0
- package/dist/{chunk-WPJZAYX7.js → chunk-NON5CXDH.js} +4 -3
- package/dist/{chunk-FPAQINSA.js → chunk-O4PMFTPJ.js} +3 -3
- package/dist/{chunk-ORRM7KVW.js → chunk-OFZECDCQ.js} +2 -2
- package/dist/chunk-OK4NHV6Z.js +58 -0
- package/dist/{chunk-LERR6HQ3.js → chunk-OUJPUONP.js} +2 -2
- package/dist/{chunk-PBTEHA7F.js → chunk-P76GFFVH.js} +6 -5
- package/dist/{chunk-MGZMGDQ5.js → chunk-PMCOC5PM.js} +2 -2
- package/dist/{chunk-EHRARBRS.js → chunk-QKFITIXC.js} +2 -2
- package/dist/{chunk-6MRFUIH5.js → chunk-SIZFEXIS.js} +2 -2
- package/dist/chunk-SOOAUY4E.js +63 -0
- package/dist/chunk-SUOPB24V.js +78 -0
- package/dist/{chunk-253RMSB3.js → chunk-U6XVAMCK.js} +6 -5
- package/dist/chunk-UIQCNODZ.js +100 -0
- package/dist/{chunk-LZHZDFNZ.js → chunk-UWUDJCJM.js} +2 -2
- package/dist/{chunk-6YPHJWS2.js → chunk-WMCZWSAG.js} +2 -2
- package/dist/chunk-XKCPXM63.js +79 -0
- package/dist/chunk-XM5PWOCV.js +63 -0
- package/dist/chunk-YMVONZZW.js +49 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +26 -24
- package/dist/lib/mysql/index.cjs +3243 -1533
- package/dist/lib/mysql/index.cjs.map +1 -1
- package/dist/lib/mysql/index.d.cts +759 -238
- package/dist/lib/mysql/index.d.ts +759 -238
- package/dist/lib/mysql/index.js +30 -26
- package/dist/lib/mysql/schemas/auth/accounts.cjs +3 -2
- package/dist/lib/mysql/schemas/auth/accounts.cjs.map +1 -1
- package/dist/lib/mysql/schemas/auth/accounts.d.cts +2 -1
- package/dist/lib/mysql/schemas/auth/accounts.d.ts +2 -1
- package/dist/lib/mysql/schemas/auth/accounts.js +12 -12
- package/dist/lib/mysql/schemas/auth/device-access-token.cjs +3 -2
- package/dist/lib/mysql/schemas/auth/device-access-token.cjs.map +1 -1
- package/dist/lib/mysql/schemas/auth/device-access-token.d.cts +2 -1
- package/dist/lib/mysql/schemas/auth/device-access-token.d.ts +2 -1
- package/dist/lib/mysql/schemas/auth/device-access-token.js +13 -13
- package/dist/lib/mysql/schemas/auth/device-verification.cjs +3 -2
- package/dist/lib/mysql/schemas/auth/device-verification.cjs.map +1 -1
- package/dist/lib/mysql/schemas/auth/device-verification.d.cts +2 -1
- package/dist/lib/mysql/schemas/auth/device-verification.d.ts +2 -1
- package/dist/lib/mysql/schemas/auth/device-verification.js +13 -13
- package/dist/lib/mysql/schemas/auth/permissions.js +2 -2
- package/dist/lib/mysql/schemas/auth/profiles.cjs +3 -2
- package/dist/lib/mysql/schemas/auth/profiles.cjs.map +1 -1
- package/dist/lib/mysql/schemas/auth/profiles.d.cts +2 -1
- package/dist/lib/mysql/schemas/auth/profiles.d.ts +2 -1
- package/dist/lib/mysql/schemas/auth/profiles.js +12 -12
- package/dist/lib/mysql/schemas/auth/role-permissions.cjs.map +1 -1
- package/dist/lib/mysql/schemas/auth/role-permissions.js +13 -13
- package/dist/lib/mysql/schemas/auth/roles.cjs.map +1 -1
- package/dist/lib/mysql/schemas/auth/roles.js +12 -12
- package/dist/lib/mysql/schemas/auth/sessions.cjs +3 -2
- package/dist/lib/mysql/schemas/auth/sessions.cjs.map +1 -1
- package/dist/lib/mysql/schemas/auth/sessions.d.cts +2 -1
- package/dist/lib/mysql/schemas/auth/sessions.d.ts +2 -1
- package/dist/lib/mysql/schemas/auth/sessions.js +13 -13
- package/dist/lib/mysql/schemas/auth/user-permissions.cjs +3 -2
- package/dist/lib/mysql/schemas/auth/user-permissions.cjs.map +1 -1
- package/dist/lib/mysql/schemas/auth/user-permissions.d.cts +2 -1
- package/dist/lib/mysql/schemas/auth/user-permissions.d.ts +2 -1
- package/dist/lib/mysql/schemas/auth/user-permissions.js +12 -12
- package/dist/lib/mysql/schemas/auth/user-prefs.cjs +3 -2
- package/dist/lib/mysql/schemas/auth/user-prefs.cjs.map +1 -1
- package/dist/lib/mysql/schemas/auth/user-prefs.d.cts +2 -1
- package/dist/lib/mysql/schemas/auth/user-prefs.d.ts +2 -1
- package/dist/lib/mysql/schemas/auth/user-prefs.js +12 -12
- package/dist/lib/mysql/schemas/auth/user-roles.cjs +3 -2
- package/dist/lib/mysql/schemas/auth/user-roles.cjs.map +1 -1
- package/dist/lib/mysql/schemas/auth/user-roles.d.cts +2 -1
- package/dist/lib/mysql/schemas/auth/user-roles.d.ts +2 -1
- package/dist/lib/mysql/schemas/auth/user-roles.js +12 -12
- package/dist/lib/mysql/schemas/auth/users.cjs +11 -3
- package/dist/lib/mysql/schemas/auth/users.cjs.map +1 -1
- package/dist/lib/mysql/schemas/auth/users.d.cts +5 -2
- package/dist/lib/mysql/schemas/auth/users.d.ts +5 -2
- package/dist/lib/mysql/schemas/auth/users.js +12 -12
- package/dist/lib/mysql/schemas/auth/verification-tokens.js +2 -2
- package/dist/lib/mysql/schemas/commerce/coupon.cjs +4 -2
- package/dist/lib/mysql/schemas/commerce/coupon.cjs.map +1 -1
- package/dist/lib/mysql/schemas/commerce/coupon.d.cts +17 -1
- package/dist/lib/mysql/schemas/commerce/coupon.d.ts +17 -1
- package/dist/lib/mysql/schemas/commerce/coupon.js +12 -12
- package/dist/lib/mysql/schemas/commerce/merchant-account.js +2 -2
- package/dist/lib/mysql/schemas/commerce/merchant-charge.cjs.map +1 -1
- package/dist/lib/mysql/schemas/commerce/merchant-charge.js +12 -12
- package/dist/lib/mysql/schemas/commerce/merchant-coupon.cjs +2 -1
- package/dist/lib/mysql/schemas/commerce/merchant-coupon.cjs.map +1 -1
- package/dist/lib/mysql/schemas/commerce/merchant-coupon.d.cts +17 -1
- package/dist/lib/mysql/schemas/commerce/merchant-coupon.d.ts +17 -1
- package/dist/lib/mysql/schemas/commerce/merchant-coupon.js +2 -2
- package/dist/lib/mysql/schemas/commerce/merchant-customer.js +2 -2
- package/dist/lib/mysql/schemas/commerce/merchant-events.cjs +120 -0
- package/dist/lib/mysql/schemas/commerce/merchant-events.cjs.map +1 -0
- package/dist/lib/mysql/schemas/commerce/merchant-events.d.cts +101 -0
- package/dist/lib/mysql/schemas/commerce/merchant-events.d.ts +101 -0
- package/dist/lib/mysql/schemas/commerce/merchant-events.js +11 -0
- package/dist/lib/mysql/schemas/commerce/merchant-events.js.map +1 -0
- package/dist/lib/mysql/schemas/commerce/merchant-price.js +2 -2
- package/dist/lib/mysql/schemas/commerce/merchant-product.js +2 -2
- package/dist/lib/mysql/schemas/commerce/merchant-session.js +2 -2
- package/dist/lib/mysql/schemas/commerce/merchant-subscription.cjs.map +1 -1
- package/dist/lib/mysql/schemas/commerce/merchant-subscription.js +12 -12
- package/dist/lib/mysql/schemas/commerce/price.cjs.map +1 -1
- package/dist/lib/mysql/schemas/commerce/price.js +12 -12
- package/dist/lib/mysql/schemas/commerce/product.cjs.map +1 -1
- package/dist/lib/mysql/schemas/commerce/product.js +12 -12
- package/dist/lib/mysql/schemas/commerce/purchase-user-transfer.cjs +3 -2
- package/dist/lib/mysql/schemas/commerce/purchase-user-transfer.cjs.map +1 -1
- package/dist/lib/mysql/schemas/commerce/purchase-user-transfer.d.cts +2 -1
- package/dist/lib/mysql/schemas/commerce/purchase-user-transfer.d.ts +2 -1
- package/dist/lib/mysql/schemas/commerce/purchase-user-transfer.js +13 -13
- package/dist/lib/mysql/schemas/commerce/purchase.cjs +5 -3
- package/dist/lib/mysql/schemas/commerce/purchase.cjs.map +1 -1
- package/dist/lib/mysql/schemas/commerce/purchase.d.cts +2 -1
- package/dist/lib/mysql/schemas/commerce/purchase.d.ts +2 -1
- package/dist/lib/mysql/schemas/commerce/purchase.js +12 -12
- package/dist/lib/mysql/schemas/commerce/subscription.cjs.map +1 -1
- package/dist/lib/mysql/schemas/commerce/subscription.js +12 -12
- package/dist/lib/mysql/schemas/commerce/upgradable-products.cjs.map +1 -1
- package/dist/lib/mysql/schemas/commerce/upgradable-products.js +13 -13
- package/dist/lib/mysql/schemas/communication/comment.cjs +3 -2
- package/dist/lib/mysql/schemas/communication/comment.cjs.map +1 -1
- package/dist/lib/mysql/schemas/communication/comment.d.cts +2 -1
- package/dist/lib/mysql/schemas/communication/comment.d.ts +2 -1
- package/dist/lib/mysql/schemas/communication/comment.js +12 -12
- package/dist/lib/mysql/schemas/communication/communication-channel.js +2 -2
- package/dist/lib/mysql/schemas/communication/communication-preference-types.js +2 -2
- package/dist/lib/mysql/schemas/communication/communication-preferences.cjs +3 -2
- package/dist/lib/mysql/schemas/communication/communication-preferences.cjs.map +1 -1
- package/dist/lib/mysql/schemas/communication/communication-preferences.d.cts +2 -1
- package/dist/lib/mysql/schemas/communication/communication-preferences.d.ts +2 -1
- package/dist/lib/mysql/schemas/communication/communication-preferences.js +12 -12
- package/dist/lib/mysql/schemas/communication/question-response.cjs +351 -0
- package/dist/lib/mysql/schemas/communication/question-response.cjs.map +1 -0
- package/dist/lib/mysql/schemas/communication/question-response.d.cts +200 -0
- package/dist/lib/mysql/schemas/communication/question-response.d.ts +200 -0
- package/dist/lib/mysql/schemas/communication/question-response.js +21 -0
- package/dist/lib/mysql/schemas/communication/question-response.js.map +1 -0
- package/dist/lib/mysql/schemas/content/content-contributions.cjs +11 -3
- package/dist/lib/mysql/schemas/content/content-contributions.cjs.map +1 -1
- package/dist/lib/mysql/schemas/content/content-contributions.d.cts +2 -1
- package/dist/lib/mysql/schemas/content/content-contributions.d.ts +2 -1
- package/dist/lib/mysql/schemas/content/content-contributions.js +12 -12
- package/dist/lib/mysql/schemas/content/content-resource-product.cjs +8 -1
- package/dist/lib/mysql/schemas/content/content-resource-product.cjs.map +1 -1
- package/dist/lib/mysql/schemas/content/content-resource-product.js +12 -12
- package/dist/lib/mysql/schemas/content/content-resource-resource.cjs +8 -1
- package/dist/lib/mysql/schemas/content/content-resource-resource.cjs.map +1 -1
- package/dist/lib/mysql/schemas/content/content-resource-resource.js +12 -12
- package/dist/lib/mysql/schemas/content/content-resource-tag.cjs +8 -1
- package/dist/lib/mysql/schemas/content/content-resource-tag.cjs.map +1 -1
- package/dist/lib/mysql/schemas/content/content-resource-tag.js +12 -12
- package/dist/lib/mysql/schemas/content/content-resource-version.cjs +11 -3
- package/dist/lib/mysql/schemas/content/content-resource-version.cjs.map +1 -1
- package/dist/lib/mysql/schemas/content/content-resource-version.d.cts +2 -1
- package/dist/lib/mysql/schemas/content/content-resource-version.d.ts +2 -1
- package/dist/lib/mysql/schemas/content/content-resource-version.js +12 -12
- package/dist/lib/mysql/schemas/content/content-resource.cjs +11 -3
- package/dist/lib/mysql/schemas/content/content-resource.cjs.map +1 -1
- package/dist/lib/mysql/schemas/content/content-resource.d.cts +18 -1
- package/dist/lib/mysql/schemas/content/content-resource.d.ts +18 -1
- package/dist/lib/mysql/schemas/content/content-resource.js +12 -12
- package/dist/lib/mysql/schemas/content/contribution-types.js +2 -2
- package/dist/lib/mysql/schemas/content/lesson-progress.js +2 -2
- package/dist/lib/mysql/schemas/content/resource-progress.js +2 -2
- package/dist/lib/mysql/schemas/content/tag-tag.cjs.map +1 -1
- package/dist/lib/mysql/schemas/content/tag-tag.js +12 -12
- package/dist/lib/mysql/schemas/content/tag.cjs.map +1 -1
- package/dist/lib/mysql/schemas/content/tag.js +12 -12
- package/dist/lib/mysql/schemas/entitlements/entitlement-type.js +2 -2
- package/dist/lib/mysql/schemas/entitlements/entitlement.cjs +3 -2
- package/dist/lib/mysql/schemas/entitlements/entitlement.cjs.map +1 -1
- package/dist/lib/mysql/schemas/entitlements/entitlement.d.cts +2 -1
- package/dist/lib/mysql/schemas/entitlements/entitlement.d.ts +2 -1
- package/dist/lib/mysql/schemas/entitlements/entitlement.js +13 -13
- package/dist/lib/mysql/schemas/org/organization-membership-roles.cjs.map +1 -1
- package/dist/lib/mysql/schemas/org/organization-membership-roles.js +12 -12
- package/dist/lib/mysql/schemas/org/organization-memberships.cjs +3 -2
- package/dist/lib/mysql/schemas/org/organization-memberships.cjs.map +1 -1
- package/dist/lib/mysql/schemas/org/organization-memberships.d.cts +2 -1
- package/dist/lib/mysql/schemas/org/organization-memberships.d.ts +2 -1
- package/dist/lib/mysql/schemas/org/organization-memberships.js +12 -12
- package/dist/lib/mysql/schemas/org/organizations.cjs.map +1 -1
- package/dist/lib/mysql/schemas/org/organizations.js +12 -12
- package/dist/lib/mysql/utils.js +1 -1
- package/dist/lib/utils.d.cts +1 -0
- package/dist/lib/utils.d.ts +1 -0
- package/dist/lib/utils.js +1 -1
- package/package.json +7 -7
- package/src/lib/mysql/index.ts +1887 -153
- package/src/lib/mysql/schemas/auth/accounts.ts +7 -3
- package/src/lib/mysql/schemas/auth/device-access-token.ts +7 -3
- package/src/lib/mysql/schemas/auth/device-verification.ts +7 -3
- package/src/lib/mysql/schemas/auth/profiles.ts +7 -3
- package/src/lib/mysql/schemas/auth/sessions.ts +7 -3
- package/src/lib/mysql/schemas/auth/user-permissions.ts +7 -3
- package/src/lib/mysql/schemas/auth/user-prefs.ts +7 -3
- package/src/lib/mysql/schemas/auth/user-roles.ts +7 -3
- package/src/lib/mysql/schemas/auth/users.ts +17 -3
- package/src/lib/mysql/schemas/commerce/coupon.ts +2 -1
- package/src/lib/mysql/schemas/commerce/merchant-coupon.ts +2 -1
- package/src/lib/mysql/schemas/commerce/merchant-events.ts +62 -0
- package/src/lib/mysql/schemas/commerce/purchase-user-transfer.ts +4 -2
- package/src/lib/mysql/schemas/commerce/purchase.ts +7 -3
- package/src/lib/mysql/schemas/communication/comment.ts +7 -3
- package/src/lib/mysql/schemas/communication/communication-preferences.ts +4 -2
- package/src/lib/mysql/schemas/communication/question-response.ts +90 -0
- package/src/lib/mysql/schemas/content/content-contributions.ts +4 -2
- package/src/lib/mysql/schemas/content/content-resource-version.ts +4 -2
- package/src/lib/mysql/schemas/content/content-resource.ts +13 -3
- package/src/lib/mysql/schemas/entitlements/entitlement.ts +7 -3
- package/src/lib/mysql/schemas/org/organization-memberships.ts +4 -2
- package/dist/chunk-H736K5TN.js +0 -7
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import * as drizzle_orm from 'drizzle-orm';
|
|
2
|
+
import * as drizzle_orm_mysql_core from 'drizzle-orm/mysql-core';
|
|
3
|
+
import { MySqlTableFn } from 'drizzle-orm/mysql-core';
|
|
4
|
+
import { UsersSchemaOverrides } from '../auth/users.cjs';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Question response table - stores individual question responses
|
|
8
|
+
* Supports surveys, quizzes, polls, and other question-based interactions
|
|
9
|
+
* Works for both authenticated users and anonymous email subscribers
|
|
10
|
+
*/
|
|
11
|
+
declare function getQuestionResponseSchema(mysqlTable: MySqlTableFn): drizzle_orm_mysql_core.MySqlTableWithColumns<{
|
|
12
|
+
name: "QuestionResponse";
|
|
13
|
+
schema: undefined;
|
|
14
|
+
columns: {
|
|
15
|
+
id: drizzle_orm_mysql_core.MySqlColumn<{
|
|
16
|
+
name: "id";
|
|
17
|
+
tableName: "QuestionResponse";
|
|
18
|
+
dataType: "string";
|
|
19
|
+
columnType: "MySqlVarChar";
|
|
20
|
+
data: string;
|
|
21
|
+
driverParam: string | number;
|
|
22
|
+
notNull: true;
|
|
23
|
+
hasDefault: false;
|
|
24
|
+
isPrimaryKey: true;
|
|
25
|
+
isAutoincrement: false;
|
|
26
|
+
hasRuntimeDefault: false;
|
|
27
|
+
enumValues: [string, ...string[]];
|
|
28
|
+
baseColumn: never;
|
|
29
|
+
generated: undefined;
|
|
30
|
+
}, object>;
|
|
31
|
+
surveyId: drizzle_orm_mysql_core.MySqlColumn<{
|
|
32
|
+
name: "surveyId";
|
|
33
|
+
tableName: "QuestionResponse";
|
|
34
|
+
dataType: "string";
|
|
35
|
+
columnType: "MySqlVarChar";
|
|
36
|
+
data: string;
|
|
37
|
+
driverParam: string | number;
|
|
38
|
+
notNull: true;
|
|
39
|
+
hasDefault: false;
|
|
40
|
+
isPrimaryKey: false;
|
|
41
|
+
isAutoincrement: false;
|
|
42
|
+
hasRuntimeDefault: false;
|
|
43
|
+
enumValues: [string, ...string[]];
|
|
44
|
+
baseColumn: never;
|
|
45
|
+
generated: undefined;
|
|
46
|
+
}, object>;
|
|
47
|
+
questionId: drizzle_orm_mysql_core.MySqlColumn<{
|
|
48
|
+
name: "questionId";
|
|
49
|
+
tableName: "QuestionResponse";
|
|
50
|
+
dataType: "string";
|
|
51
|
+
columnType: "MySqlVarChar";
|
|
52
|
+
data: string;
|
|
53
|
+
driverParam: string | number;
|
|
54
|
+
notNull: true;
|
|
55
|
+
hasDefault: false;
|
|
56
|
+
isPrimaryKey: false;
|
|
57
|
+
isAutoincrement: false;
|
|
58
|
+
hasRuntimeDefault: false;
|
|
59
|
+
enumValues: [string, ...string[]];
|
|
60
|
+
baseColumn: never;
|
|
61
|
+
generated: undefined;
|
|
62
|
+
}, object>;
|
|
63
|
+
respondentKey: drizzle_orm_mysql_core.MySqlColumn<{
|
|
64
|
+
name: "respondentKey";
|
|
65
|
+
tableName: "QuestionResponse";
|
|
66
|
+
dataType: "string";
|
|
67
|
+
columnType: "MySqlVarChar";
|
|
68
|
+
data: string;
|
|
69
|
+
driverParam: string | number;
|
|
70
|
+
notNull: false;
|
|
71
|
+
hasDefault: false;
|
|
72
|
+
isPrimaryKey: false;
|
|
73
|
+
isAutoincrement: false;
|
|
74
|
+
hasRuntimeDefault: false;
|
|
75
|
+
enumValues: [string, ...string[]];
|
|
76
|
+
baseColumn: never;
|
|
77
|
+
generated: undefined;
|
|
78
|
+
}, object>;
|
|
79
|
+
surveySessionId: drizzle_orm_mysql_core.MySqlColumn<{
|
|
80
|
+
name: "surveySessionId";
|
|
81
|
+
tableName: "QuestionResponse";
|
|
82
|
+
dataType: "string";
|
|
83
|
+
columnType: "MySqlVarChar";
|
|
84
|
+
data: string;
|
|
85
|
+
driverParam: string | number;
|
|
86
|
+
notNull: false;
|
|
87
|
+
hasDefault: false;
|
|
88
|
+
isPrimaryKey: false;
|
|
89
|
+
isAutoincrement: false;
|
|
90
|
+
hasRuntimeDefault: false;
|
|
91
|
+
enumValues: [string, ...string[]];
|
|
92
|
+
baseColumn: never;
|
|
93
|
+
generated: undefined;
|
|
94
|
+
}, object>;
|
|
95
|
+
userId: drizzle_orm_mysql_core.MySqlColumn<{
|
|
96
|
+
name: "userId";
|
|
97
|
+
tableName: "QuestionResponse";
|
|
98
|
+
dataType: "string";
|
|
99
|
+
columnType: "MySqlVarChar";
|
|
100
|
+
data: string;
|
|
101
|
+
driverParam: string | number;
|
|
102
|
+
notNull: false;
|
|
103
|
+
hasDefault: false;
|
|
104
|
+
isPrimaryKey: false;
|
|
105
|
+
isAutoincrement: false;
|
|
106
|
+
hasRuntimeDefault: false;
|
|
107
|
+
enumValues: [string, ...string[]];
|
|
108
|
+
baseColumn: never;
|
|
109
|
+
generated: undefined;
|
|
110
|
+
}, object>;
|
|
111
|
+
emailListSubscriberId: drizzle_orm_mysql_core.MySqlColumn<{
|
|
112
|
+
name: "emailListSubscriberId";
|
|
113
|
+
tableName: "QuestionResponse";
|
|
114
|
+
dataType: "string";
|
|
115
|
+
columnType: "MySqlVarChar";
|
|
116
|
+
data: string;
|
|
117
|
+
driverParam: string | number;
|
|
118
|
+
notNull: false;
|
|
119
|
+
hasDefault: false;
|
|
120
|
+
isPrimaryKey: false;
|
|
121
|
+
isAutoincrement: false;
|
|
122
|
+
hasRuntimeDefault: false;
|
|
123
|
+
enumValues: [string, ...string[]];
|
|
124
|
+
baseColumn: never;
|
|
125
|
+
generated: undefined;
|
|
126
|
+
}, object>;
|
|
127
|
+
fields: drizzle_orm_mysql_core.MySqlColumn<{
|
|
128
|
+
name: "fields";
|
|
129
|
+
tableName: "QuestionResponse";
|
|
130
|
+
dataType: "json";
|
|
131
|
+
columnType: "MySqlJson";
|
|
132
|
+
data: Record<string, any>;
|
|
133
|
+
driverParam: string;
|
|
134
|
+
notNull: false;
|
|
135
|
+
hasDefault: true;
|
|
136
|
+
isPrimaryKey: false;
|
|
137
|
+
isAutoincrement: false;
|
|
138
|
+
hasRuntimeDefault: false;
|
|
139
|
+
enumValues: undefined;
|
|
140
|
+
baseColumn: never;
|
|
141
|
+
generated: undefined;
|
|
142
|
+
}, object>;
|
|
143
|
+
createdAt: drizzle_orm_mysql_core.MySqlColumn<{
|
|
144
|
+
name: "createdAt";
|
|
145
|
+
tableName: "QuestionResponse";
|
|
146
|
+
dataType: "date";
|
|
147
|
+
columnType: "MySqlTimestamp";
|
|
148
|
+
data: Date;
|
|
149
|
+
driverParam: string | number;
|
|
150
|
+
notNull: false;
|
|
151
|
+
hasDefault: true;
|
|
152
|
+
isPrimaryKey: false;
|
|
153
|
+
isAutoincrement: false;
|
|
154
|
+
hasRuntimeDefault: false;
|
|
155
|
+
enumValues: undefined;
|
|
156
|
+
baseColumn: never;
|
|
157
|
+
generated: undefined;
|
|
158
|
+
}, object>;
|
|
159
|
+
updatedAt: drizzle_orm_mysql_core.MySqlColumn<{
|
|
160
|
+
name: "updatedAt";
|
|
161
|
+
tableName: "QuestionResponse";
|
|
162
|
+
dataType: "date";
|
|
163
|
+
columnType: "MySqlTimestamp";
|
|
164
|
+
data: Date;
|
|
165
|
+
driverParam: string | number;
|
|
166
|
+
notNull: false;
|
|
167
|
+
hasDefault: true;
|
|
168
|
+
isPrimaryKey: false;
|
|
169
|
+
isAutoincrement: false;
|
|
170
|
+
hasRuntimeDefault: false;
|
|
171
|
+
enumValues: undefined;
|
|
172
|
+
baseColumn: never;
|
|
173
|
+
generated: undefined;
|
|
174
|
+
}, object>;
|
|
175
|
+
deletedAt: drizzle_orm_mysql_core.MySqlColumn<{
|
|
176
|
+
name: "deletedAt";
|
|
177
|
+
tableName: "QuestionResponse";
|
|
178
|
+
dataType: "date";
|
|
179
|
+
columnType: "MySqlTimestamp";
|
|
180
|
+
data: Date;
|
|
181
|
+
driverParam: string | number;
|
|
182
|
+
notNull: false;
|
|
183
|
+
hasDefault: false;
|
|
184
|
+
isPrimaryKey: false;
|
|
185
|
+
isAutoincrement: false;
|
|
186
|
+
hasRuntimeDefault: false;
|
|
187
|
+
enumValues: undefined;
|
|
188
|
+
baseColumn: never;
|
|
189
|
+
generated: undefined;
|
|
190
|
+
}, object>;
|
|
191
|
+
};
|
|
192
|
+
dialect: "mysql";
|
|
193
|
+
}>;
|
|
194
|
+
declare function getQuestionResponseRelationsSchema(mysqlTable: MySqlTableFn, overrides?: UsersSchemaOverrides): drizzle_orm.Relations<"QuestionResponse", {
|
|
195
|
+
user: drizzle_orm.One<"User", false>;
|
|
196
|
+
survey: drizzle_orm.One<"ContentResource", true>;
|
|
197
|
+
question: drizzle_orm.One<"ContentResource", true>;
|
|
198
|
+
}>;
|
|
199
|
+
|
|
200
|
+
export { getQuestionResponseRelationsSchema, getQuestionResponseSchema };
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import * as drizzle_orm from 'drizzle-orm';
|
|
2
|
+
import * as drizzle_orm_mysql_core from 'drizzle-orm/mysql-core';
|
|
3
|
+
import { MySqlTableFn } from 'drizzle-orm/mysql-core';
|
|
4
|
+
import { UsersSchemaOverrides } from '../auth/users.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Question response table - stores individual question responses
|
|
8
|
+
* Supports surveys, quizzes, polls, and other question-based interactions
|
|
9
|
+
* Works for both authenticated users and anonymous email subscribers
|
|
10
|
+
*/
|
|
11
|
+
declare function getQuestionResponseSchema(mysqlTable: MySqlTableFn): drizzle_orm_mysql_core.MySqlTableWithColumns<{
|
|
12
|
+
name: "QuestionResponse";
|
|
13
|
+
schema: undefined;
|
|
14
|
+
columns: {
|
|
15
|
+
id: drizzle_orm_mysql_core.MySqlColumn<{
|
|
16
|
+
name: "id";
|
|
17
|
+
tableName: "QuestionResponse";
|
|
18
|
+
dataType: "string";
|
|
19
|
+
columnType: "MySqlVarChar";
|
|
20
|
+
data: string;
|
|
21
|
+
driverParam: string | number;
|
|
22
|
+
notNull: true;
|
|
23
|
+
hasDefault: false;
|
|
24
|
+
isPrimaryKey: true;
|
|
25
|
+
isAutoincrement: false;
|
|
26
|
+
hasRuntimeDefault: false;
|
|
27
|
+
enumValues: [string, ...string[]];
|
|
28
|
+
baseColumn: never;
|
|
29
|
+
generated: undefined;
|
|
30
|
+
}, object>;
|
|
31
|
+
surveyId: drizzle_orm_mysql_core.MySqlColumn<{
|
|
32
|
+
name: "surveyId";
|
|
33
|
+
tableName: "QuestionResponse";
|
|
34
|
+
dataType: "string";
|
|
35
|
+
columnType: "MySqlVarChar";
|
|
36
|
+
data: string;
|
|
37
|
+
driverParam: string | number;
|
|
38
|
+
notNull: true;
|
|
39
|
+
hasDefault: false;
|
|
40
|
+
isPrimaryKey: false;
|
|
41
|
+
isAutoincrement: false;
|
|
42
|
+
hasRuntimeDefault: false;
|
|
43
|
+
enumValues: [string, ...string[]];
|
|
44
|
+
baseColumn: never;
|
|
45
|
+
generated: undefined;
|
|
46
|
+
}, object>;
|
|
47
|
+
questionId: drizzle_orm_mysql_core.MySqlColumn<{
|
|
48
|
+
name: "questionId";
|
|
49
|
+
tableName: "QuestionResponse";
|
|
50
|
+
dataType: "string";
|
|
51
|
+
columnType: "MySqlVarChar";
|
|
52
|
+
data: string;
|
|
53
|
+
driverParam: string | number;
|
|
54
|
+
notNull: true;
|
|
55
|
+
hasDefault: false;
|
|
56
|
+
isPrimaryKey: false;
|
|
57
|
+
isAutoincrement: false;
|
|
58
|
+
hasRuntimeDefault: false;
|
|
59
|
+
enumValues: [string, ...string[]];
|
|
60
|
+
baseColumn: never;
|
|
61
|
+
generated: undefined;
|
|
62
|
+
}, object>;
|
|
63
|
+
respondentKey: drizzle_orm_mysql_core.MySqlColumn<{
|
|
64
|
+
name: "respondentKey";
|
|
65
|
+
tableName: "QuestionResponse";
|
|
66
|
+
dataType: "string";
|
|
67
|
+
columnType: "MySqlVarChar";
|
|
68
|
+
data: string;
|
|
69
|
+
driverParam: string | number;
|
|
70
|
+
notNull: false;
|
|
71
|
+
hasDefault: false;
|
|
72
|
+
isPrimaryKey: false;
|
|
73
|
+
isAutoincrement: false;
|
|
74
|
+
hasRuntimeDefault: false;
|
|
75
|
+
enumValues: [string, ...string[]];
|
|
76
|
+
baseColumn: never;
|
|
77
|
+
generated: undefined;
|
|
78
|
+
}, object>;
|
|
79
|
+
surveySessionId: drizzle_orm_mysql_core.MySqlColumn<{
|
|
80
|
+
name: "surveySessionId";
|
|
81
|
+
tableName: "QuestionResponse";
|
|
82
|
+
dataType: "string";
|
|
83
|
+
columnType: "MySqlVarChar";
|
|
84
|
+
data: string;
|
|
85
|
+
driverParam: string | number;
|
|
86
|
+
notNull: false;
|
|
87
|
+
hasDefault: false;
|
|
88
|
+
isPrimaryKey: false;
|
|
89
|
+
isAutoincrement: false;
|
|
90
|
+
hasRuntimeDefault: false;
|
|
91
|
+
enumValues: [string, ...string[]];
|
|
92
|
+
baseColumn: never;
|
|
93
|
+
generated: undefined;
|
|
94
|
+
}, object>;
|
|
95
|
+
userId: drizzle_orm_mysql_core.MySqlColumn<{
|
|
96
|
+
name: "userId";
|
|
97
|
+
tableName: "QuestionResponse";
|
|
98
|
+
dataType: "string";
|
|
99
|
+
columnType: "MySqlVarChar";
|
|
100
|
+
data: string;
|
|
101
|
+
driverParam: string | number;
|
|
102
|
+
notNull: false;
|
|
103
|
+
hasDefault: false;
|
|
104
|
+
isPrimaryKey: false;
|
|
105
|
+
isAutoincrement: false;
|
|
106
|
+
hasRuntimeDefault: false;
|
|
107
|
+
enumValues: [string, ...string[]];
|
|
108
|
+
baseColumn: never;
|
|
109
|
+
generated: undefined;
|
|
110
|
+
}, object>;
|
|
111
|
+
emailListSubscriberId: drizzle_orm_mysql_core.MySqlColumn<{
|
|
112
|
+
name: "emailListSubscriberId";
|
|
113
|
+
tableName: "QuestionResponse";
|
|
114
|
+
dataType: "string";
|
|
115
|
+
columnType: "MySqlVarChar";
|
|
116
|
+
data: string;
|
|
117
|
+
driverParam: string | number;
|
|
118
|
+
notNull: false;
|
|
119
|
+
hasDefault: false;
|
|
120
|
+
isPrimaryKey: false;
|
|
121
|
+
isAutoincrement: false;
|
|
122
|
+
hasRuntimeDefault: false;
|
|
123
|
+
enumValues: [string, ...string[]];
|
|
124
|
+
baseColumn: never;
|
|
125
|
+
generated: undefined;
|
|
126
|
+
}, object>;
|
|
127
|
+
fields: drizzle_orm_mysql_core.MySqlColumn<{
|
|
128
|
+
name: "fields";
|
|
129
|
+
tableName: "QuestionResponse";
|
|
130
|
+
dataType: "json";
|
|
131
|
+
columnType: "MySqlJson";
|
|
132
|
+
data: Record<string, any>;
|
|
133
|
+
driverParam: string;
|
|
134
|
+
notNull: false;
|
|
135
|
+
hasDefault: true;
|
|
136
|
+
isPrimaryKey: false;
|
|
137
|
+
isAutoincrement: false;
|
|
138
|
+
hasRuntimeDefault: false;
|
|
139
|
+
enumValues: undefined;
|
|
140
|
+
baseColumn: never;
|
|
141
|
+
generated: undefined;
|
|
142
|
+
}, object>;
|
|
143
|
+
createdAt: drizzle_orm_mysql_core.MySqlColumn<{
|
|
144
|
+
name: "createdAt";
|
|
145
|
+
tableName: "QuestionResponse";
|
|
146
|
+
dataType: "date";
|
|
147
|
+
columnType: "MySqlTimestamp";
|
|
148
|
+
data: Date;
|
|
149
|
+
driverParam: string | number;
|
|
150
|
+
notNull: false;
|
|
151
|
+
hasDefault: true;
|
|
152
|
+
isPrimaryKey: false;
|
|
153
|
+
isAutoincrement: false;
|
|
154
|
+
hasRuntimeDefault: false;
|
|
155
|
+
enumValues: undefined;
|
|
156
|
+
baseColumn: never;
|
|
157
|
+
generated: undefined;
|
|
158
|
+
}, object>;
|
|
159
|
+
updatedAt: drizzle_orm_mysql_core.MySqlColumn<{
|
|
160
|
+
name: "updatedAt";
|
|
161
|
+
tableName: "QuestionResponse";
|
|
162
|
+
dataType: "date";
|
|
163
|
+
columnType: "MySqlTimestamp";
|
|
164
|
+
data: Date;
|
|
165
|
+
driverParam: string | number;
|
|
166
|
+
notNull: false;
|
|
167
|
+
hasDefault: true;
|
|
168
|
+
isPrimaryKey: false;
|
|
169
|
+
isAutoincrement: false;
|
|
170
|
+
hasRuntimeDefault: false;
|
|
171
|
+
enumValues: undefined;
|
|
172
|
+
baseColumn: never;
|
|
173
|
+
generated: undefined;
|
|
174
|
+
}, object>;
|
|
175
|
+
deletedAt: drizzle_orm_mysql_core.MySqlColumn<{
|
|
176
|
+
name: "deletedAt";
|
|
177
|
+
tableName: "QuestionResponse";
|
|
178
|
+
dataType: "date";
|
|
179
|
+
columnType: "MySqlTimestamp";
|
|
180
|
+
data: Date;
|
|
181
|
+
driverParam: string | number;
|
|
182
|
+
notNull: false;
|
|
183
|
+
hasDefault: false;
|
|
184
|
+
isPrimaryKey: false;
|
|
185
|
+
isAutoincrement: false;
|
|
186
|
+
hasRuntimeDefault: false;
|
|
187
|
+
enumValues: undefined;
|
|
188
|
+
baseColumn: never;
|
|
189
|
+
generated: undefined;
|
|
190
|
+
}, object>;
|
|
191
|
+
};
|
|
192
|
+
dialect: "mysql";
|
|
193
|
+
}>;
|
|
194
|
+
declare function getQuestionResponseRelationsSchema(mysqlTable: MySqlTableFn, overrides?: UsersSchemaOverrides): drizzle_orm.Relations<"QuestionResponse", {
|
|
195
|
+
user: drizzle_orm.One<"User", false>;
|
|
196
|
+
survey: drizzle_orm.One<"ContentResource", true>;
|
|
197
|
+
question: drizzle_orm.One<"ContentResource", true>;
|
|
198
|
+
}>;
|
|
199
|
+
|
|
200
|
+
export { getQuestionResponseRelationsSchema, getQuestionResponseSchema };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getQuestionResponseRelationsSchema,
|
|
3
|
+
getQuestionResponseSchema
|
|
4
|
+
} from "../../../../chunk-MQSLKVLJ.js";
|
|
5
|
+
import "../../../../chunk-MUFYDXA7.js";
|
|
6
|
+
import "../../../../chunk-6SJORFGN.js";
|
|
7
|
+
import "../../../../chunk-65H5Y4PD.js";
|
|
8
|
+
import "../../../../chunk-QKFITIXC.js";
|
|
9
|
+
import "../../../../chunk-2I7NIOKI.js";
|
|
10
|
+
import "../../../../chunk-5NNBQJUP.js";
|
|
11
|
+
import "../../../../chunk-NON5CXDH.js";
|
|
12
|
+
import "../../../../chunk-SIZFEXIS.js";
|
|
13
|
+
import "../../../../chunk-DNBW5D64.js";
|
|
14
|
+
import "../../../../chunk-PMCOC5PM.js";
|
|
15
|
+
import "../../../../chunk-UWUDJCJM.js";
|
|
16
|
+
import "../../../../chunk-2X5XVNDN.js";
|
|
17
|
+
export {
|
|
18
|
+
getQuestionResponseRelationsSchema,
|
|
19
|
+
getQuestionResponseSchema
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=question-response.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -131,6 +131,12 @@ function getContentResourceSchema(mysqlTable) {
|
|
|
131
131
|
length: 255
|
|
132
132
|
}).notNull(),
|
|
133
133
|
fields: (0, import_mysql_core13.json)("fields").$type().default({}),
|
|
134
|
+
// Generated column for indexing JSON slug field
|
|
135
|
+
slug: (0, import_mysql_core13.varchar)("slug", {
|
|
136
|
+
length: 255
|
|
137
|
+
}).generatedAlwaysAs(import_drizzle_orm13.sql`(fields->>'$.slug')`, {
|
|
138
|
+
mode: "stored"
|
|
139
|
+
}),
|
|
134
140
|
currentVersionId: (0, import_mysql_core13.varchar)("currentVersionId", {
|
|
135
141
|
length: 255
|
|
136
142
|
}),
|
|
@@ -151,7 +157,8 @@ function getContentResourceSchema(mysqlTable) {
|
|
|
151
157
|
createdByIdx: (0, import_mysql_core13.index)("createdById_idx").on(cm.createdById),
|
|
152
158
|
createdAtIdx: (0, import_mysql_core13.index)("createdAt_idx").on(cm.createdAt),
|
|
153
159
|
currentVersionIdIdx: (0, import_mysql_core13.index)("currentVersionId_idx").on(cm.currentVersionId),
|
|
154
|
-
createdByOrganizationMembershipIdIdx: (0, import_mysql_core13.index)("createdByOrganizationMembershipId_idx").on(cm.createdByOrganizationMembershipId)
|
|
160
|
+
createdByOrganizationMembershipIdIdx: (0, import_mysql_core13.index)("createdByOrganizationMembershipId_idx").on(cm.createdByOrganizationMembershipId),
|
|
161
|
+
slugIdx: (0, import_mysql_core13.index)("slug_idx").on(cm.slug)
|
|
155
162
|
}));
|
|
156
163
|
}
|
|
157
164
|
__name(getContentResourceSchema, "getContentResourceSchema");
|
|
@@ -355,9 +362,10 @@ function getContentContributionsSchema(mysqlTable) {
|
|
|
355
362
|
}));
|
|
356
363
|
}
|
|
357
364
|
__name(getContentContributionsSchema, "getContentContributionsSchema");
|
|
358
|
-
function getContentContributionRelationsSchema(mysqlTable) {
|
|
365
|
+
function getContentContributionRelationsSchema(mysqlTable, overrides = {}) {
|
|
359
366
|
const contentContributions = getContentContributionsSchema(mysqlTable);
|
|
360
|
-
const
|
|
367
|
+
const resolveUsersSchema = overrides.getUsersSchema ?? getUsersSchema;
|
|
368
|
+
const users = resolveUsersSchema(mysqlTable);
|
|
361
369
|
const contentResource = getContentResourceSchema(mysqlTable);
|
|
362
370
|
const contributionTypes = getContributionTypesSchema(mysqlTable);
|
|
363
371
|
const organizationMemberships = getOrganizationMembershipsSchema(mysqlTable);
|