@open-mercato/core 0.6.1-develop.3287.1.450f4ffb56 → 0.6.1-develop.3306.1.9ad9ff2526

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.
Files changed (122) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/AGENTS.md +14 -0
  3. package/dist/modules/auth/backend/roles/[id]/edit/page.js +2 -1
  4. package/dist/modules/auth/backend/roles/[id]/edit/page.js.map +2 -2
  5. package/dist/modules/auth/backend/users/[id]/edit/page.js +2 -5
  6. package/dist/modules/auth/backend/users/[id]/edit/page.js.map +2 -2
  7. package/dist/modules/catalog/ai-agents.js +47 -5
  8. package/dist/modules/catalog/ai-agents.js.map +2 -2
  9. package/dist/modules/catalog/backend/catalog/categories/[id]/edit/page.js +2 -5
  10. package/dist/modules/catalog/backend/catalog/categories/[id]/edit/page.js.map +2 -2
  11. package/dist/modules/catalog/backend/catalog/products/MerchandisingAssistantSheet.js +4 -3
  12. package/dist/modules/catalog/backend/catalog/products/MerchandisingAssistantSheet.js.map +2 -2
  13. package/dist/modules/catalog/backend/catalog/products/[id]/page.js +2 -9
  14. package/dist/modules/catalog/backend/catalog/products/[id]/page.js.map +2 -2
  15. package/dist/modules/catalog/backend/catalog/products/[productId]/variants/[variantId]/page.js +2 -9
  16. package/dist/modules/catalog/backend/catalog/products/[productId]/variants/[variantId]/page.js.map +2 -2
  17. package/dist/modules/customers/ai-agents.js +174 -1
  18. package/dist/modules/customers/ai-agents.js.map +2 -2
  19. package/dist/modules/customers/ai-tools/deal-analyzer-pack.js +196 -0
  20. package/dist/modules/customers/ai-tools/deal-analyzer-pack.js.map +7 -0
  21. package/dist/modules/customers/ai-tools.js +3 -1
  22. package/dist/modules/customers/ai-tools.js.map +2 -2
  23. package/dist/modules/customers/backend/customers/companies/page.js +11 -1
  24. package/dist/modules/customers/backend/customers/companies/page.js.map +2 -2
  25. package/dist/modules/customers/backend/customers/deals/page.js +11 -1
  26. package/dist/modules/customers/backend/customers/deals/page.js.map +2 -2
  27. package/dist/modules/customers/backend/customers/people/page.js +11 -1
  28. package/dist/modules/customers/backend/customers/people/page.js.map +2 -2
  29. package/dist/modules/customers/commands/companies.js +37 -15
  30. package/dist/modules/customers/commands/companies.js.map +2 -2
  31. package/dist/modules/customers/components/detail/AiActionChips.js +2 -2
  32. package/dist/modules/customers/components/detail/AiActionChips.js.map +2 -2
  33. package/dist/modules/customers/components/detail/ChangelogTab.js +3 -9
  34. package/dist/modules/customers/components/detail/ChangelogTab.js.map +2 -2
  35. package/dist/modules/customers/components/detail/changelogValues.js +35 -0
  36. package/dist/modules/customers/components/detail/changelogValues.js.map +7 -0
  37. package/dist/modules/customers/components/detail/customFieldUtils.js +1 -1
  38. package/dist/modules/customers/components/detail/customFieldUtils.js.map +1 -1
  39. package/dist/modules/customers/components/formConfig.js +3 -2
  40. package/dist/modules/customers/components/formConfig.js.map +2 -2
  41. package/dist/modules/customers/widgets/injection/ai-assistant-trigger/widget.client.js +4 -9
  42. package/dist/modules/customers/widgets/injection/ai-assistant-trigger/widget.client.js.map +2 -2
  43. package/dist/modules/customers/widgets/injection/ai-deal-analyzer-trigger/widget.client.js +302 -0
  44. package/dist/modules/customers/widgets/injection/ai-deal-analyzer-trigger/widget.client.js.map +7 -0
  45. package/dist/modules/customers/widgets/injection/ai-deal-analyzer-trigger/widget.js +17 -0
  46. package/dist/modules/customers/widgets/injection/ai-deal-analyzer-trigger/widget.js.map +7 -0
  47. package/dist/modules/customers/widgets/injection/ai-deal-detail-trigger/widget.client.js +2 -2
  48. package/dist/modules/customers/widgets/injection/ai-deal-detail-trigger/widget.client.js.map +2 -2
  49. package/dist/modules/customers/widgets/injection-table.js +2 -2
  50. package/dist/modules/customers/widgets/injection-table.js.map +2 -2
  51. package/dist/modules/directory/backend/directory/organizations/[id]/edit/page.js +2 -5
  52. package/dist/modules/directory/backend/directory/organizations/[id]/edit/page.js.map +2 -2
  53. package/dist/modules/directory/backend/directory/tenants/[id]/edit/page.js +2 -5
  54. package/dist/modules/directory/backend/directory/tenants/[id]/edit/page.js.map +2 -2
  55. package/dist/modules/resources/backend/resources/resources/[id]/page.js +2 -5
  56. package/dist/modules/resources/backend/resources/resources/[id]/page.js.map +2 -2
  57. package/dist/modules/sales/backend/sales/channels/[channelId]/edit/page.js +2 -25
  58. package/dist/modules/sales/backend/sales/channels/[channelId]/edit/page.js.map +2 -2
  59. package/dist/modules/sales/components/channels/ChannelOfferForm.js +2 -43
  60. package/dist/modules/sales/components/channels/ChannelOfferForm.js.map +2 -2
  61. package/dist/modules/sales/components/documents/LineItemDialog.js +162 -42
  62. package/dist/modules/sales/components/documents/LineItemDialog.js.map +2 -2
  63. package/dist/modules/sales/components/documents/customFieldHelpers.js +4 -31
  64. package/dist/modules/sales/components/documents/customFieldHelpers.js.map +2 -2
  65. package/package.json +15 -6
  66. package/src/modules/auth/backend/roles/[id]/edit/page.tsx +2 -1
  67. package/src/modules/auth/backend/users/[id]/edit/page.tsx +2 -5
  68. package/src/modules/business_rules/migrations/.snapshot-open-mercato.json +746 -394
  69. package/src/modules/catalog/ai-agents.ts +62 -4
  70. package/src/modules/catalog/backend/catalog/categories/[id]/edit/page.tsx +2 -5
  71. package/src/modules/catalog/backend/catalog/products/MerchandisingAssistantSheet.tsx +4 -3
  72. package/src/modules/catalog/backend/catalog/products/[id]/page.tsx +2 -12
  73. package/src/modules/catalog/backend/catalog/products/[productId]/variants/[variantId]/page.tsx +2 -10
  74. package/src/modules/catalog/migrations/.snapshot-open-mercato.json +2519 -1307
  75. package/src/modules/customer_accounts/migrations/.snapshot-open-mercato.json +828 -834
  76. package/src/modules/customers/AGENTS.md +6 -1
  77. package/src/modules/customers/ai-agents.ts +213 -6
  78. package/src/modules/customers/ai-tools/deal-analyzer-pack.ts +286 -0
  79. package/src/modules/customers/ai-tools.ts +2 -0
  80. package/src/modules/customers/backend/customers/companies/page.tsx +10 -0
  81. package/src/modules/customers/backend/customers/deals/page.tsx +10 -0
  82. package/src/modules/customers/backend/customers/people/page.tsx +10 -0
  83. package/src/modules/customers/commands/companies.ts +38 -14
  84. package/src/modules/customers/components/detail/AiActionChips.tsx +2 -2
  85. package/src/modules/customers/components/detail/ChangelogTab.tsx +3 -10
  86. package/src/modules/customers/components/detail/changelogValues.ts +42 -0
  87. package/src/modules/customers/components/detail/customFieldUtils.ts +1 -1
  88. package/src/modules/customers/components/formConfig.tsx +3 -2
  89. package/src/modules/customers/i18n/de.json +7 -0
  90. package/src/modules/customers/i18n/en.json +7 -0
  91. package/src/modules/customers/i18n/es.json +7 -0
  92. package/src/modules/customers/i18n/pl.json +7 -0
  93. package/src/modules/customers/migrations/.snapshot-open-mercato.json +2313 -2336
  94. package/src/modules/customers/widgets/injection/ai-assistant-trigger/widget.client.tsx +4 -6
  95. package/src/modules/customers/widgets/injection/ai-deal-analyzer-trigger/widget.client.tsx +358 -0
  96. package/src/modules/customers/widgets/injection/ai-deal-analyzer-trigger/widget.ts +34 -0
  97. package/src/modules/customers/widgets/injection/ai-deal-detail-trigger/widget.client.tsx +2 -2
  98. package/src/modules/customers/widgets/injection-table.ts +12 -9
  99. package/src/modules/data_sync/migrations/.snapshot-open-mercato.json +554 -210
  100. package/src/modules/dictionaries/migrations/.snapshot-open-mercato.json +146 -146
  101. package/src/modules/directory/backend/directory/organizations/[id]/edit/page.tsx +2 -5
  102. package/src/modules/directory/backend/directory/tenants/[id]/edit/page.tsx +2 -5
  103. package/src/modules/directory/migrations/.snapshot-open-mercato.json +273 -140
  104. package/src/modules/feature_toggles/migrations/.snapshot-open-mercato.json +242 -137
  105. package/src/modules/integrations/migrations/.snapshot-open-mercato.json +498 -195
  106. package/src/modules/payment_gateways/migrations/.snapshot-open-mercato.json +158 -157
  107. package/src/modules/perspectives/migrations/.snapshot-open-mercato.json +274 -129
  108. package/src/modules/planner/migrations/.snapshot-open-mercato.json +327 -157
  109. package/src/modules/progress/AGENTS.md +72 -0
  110. package/src/modules/resources/backend/resources/resources/[id]/page.tsx +2 -5
  111. package/src/modules/resources/migrations/.snapshot-open-mercato.json +920 -470
  112. package/src/modules/sales/backend/sales/channels/[channelId]/edit/page.tsx +2 -27
  113. package/src/modules/sales/components/channels/ChannelOfferForm.tsx +2 -49
  114. package/src/modules/sales/components/documents/LineItemDialog.tsx +214 -78
  115. package/src/modules/sales/components/documents/customFieldHelpers.ts +4 -43
  116. package/src/modules/sales/i18n/de.json +3 -0
  117. package/src/modules/sales/i18n/en.json +3 -0
  118. package/src/modules/sales/i18n/es.json +3 -0
  119. package/src/modules/sales/i18n/pl.json +3 -0
  120. package/src/modules/sales/migrations/.snapshot-open-mercato.json +4740 -4778
  121. package/src/modules/shipping_carriers/migrations/.snapshot-open-mercato.json +340 -81
  122. package/src/modules/staff/migrations/.snapshot-open-mercato.json +1439 -729
@@ -1,34 +1,36 @@
1
1
  {
2
+ "name": "public",
2
3
  "namespaces": [
3
4
  "public"
4
5
  ],
5
- "name": "public",
6
6
  "tables": [
7
7
  {
8
+ "name": "gateway_transactions",
9
+ "schema": "public",
8
10
  "columns": {
9
- "id": {
10
- "name": "id",
11
- "type": "uuid",
11
+ "amount": {
12
+ "name": "amount",
13
+ "type": "numeric(18,4)",
12
14
  "unsigned": false,
13
15
  "autoincrement": false,
14
- "primary": true,
16
+ "primary": false,
15
17
  "nullable": false,
16
18
  "unique": false,
17
19
  "length": null,
18
- "precision": null,
19
- "scale": null,
20
- "default": "gen_random_uuid()",
20
+ "precision": 18,
21
+ "scale": 4,
22
+ "default": null,
21
23
  "comment": null,
22
24
  "enumItems": [],
23
- "mappedType": "uuid"
25
+ "mappedType": "decimal"
24
26
  },
25
- "payment_id": {
26
- "name": "payment_id",
27
- "type": "uuid",
27
+ "client_secret": {
28
+ "name": "client_secret",
29
+ "type": "text",
28
30
  "unsigned": false,
29
31
  "autoincrement": false,
30
32
  "primary": false,
31
- "nullable": false,
33
+ "nullable": true,
32
34
  "unique": false,
33
35
  "length": null,
34
36
  "precision": null,
@@ -36,31 +38,31 @@
36
38
  "default": null,
37
39
  "comment": null,
38
40
  "enumItems": [],
39
- "mappedType": "uuid"
41
+ "mappedType": "text"
40
42
  },
41
- "provider_key": {
42
- "name": "provider_key",
43
- "type": "text",
43
+ "created_at": {
44
+ "name": "created_at",
45
+ "type": "timestamptz(6)",
44
46
  "unsigned": false,
45
47
  "autoincrement": false,
46
48
  "primary": false,
47
49
  "nullable": false,
48
50
  "unique": false,
49
- "length": null,
51
+ "length": 6,
50
52
  "precision": null,
51
53
  "scale": null,
52
54
  "default": null,
53
55
  "comment": null,
54
56
  "enumItems": [],
55
- "mappedType": "text"
57
+ "mappedType": "datetime"
56
58
  },
57
- "provider_session_id": {
58
- "name": "provider_session_id",
59
+ "currency_code": {
60
+ "name": "currency_code",
59
61
  "type": "text",
60
62
  "unsigned": false,
61
63
  "autoincrement": false,
62
64
  "primary": false,
63
- "nullable": true,
65
+ "nullable": false,
64
66
  "unique": false,
65
67
  "length": null,
66
68
  "precision": null,
@@ -70,56 +72,56 @@
70
72
  "enumItems": [],
71
73
  "mappedType": "text"
72
74
  },
73
- "gateway_payment_id": {
74
- "name": "gateway_payment_id",
75
- "type": "text",
75
+ "deleted_at": {
76
+ "name": "deleted_at",
77
+ "type": "timestamptz(6)",
76
78
  "unsigned": false,
77
79
  "autoincrement": false,
78
80
  "primary": false,
79
81
  "nullable": true,
80
82
  "unique": false,
81
- "length": null,
83
+ "length": 6,
82
84
  "precision": null,
83
85
  "scale": null,
84
86
  "default": null,
85
87
  "comment": null,
86
88
  "enumItems": [],
87
- "mappedType": "text"
89
+ "mappedType": "datetime"
88
90
  },
89
- "gateway_refund_id": {
90
- "name": "gateway_refund_id",
91
- "type": "text",
91
+ "expires_at": {
92
+ "name": "expires_at",
93
+ "type": "timestamptz(6)",
92
94
  "unsigned": false,
93
95
  "autoincrement": false,
94
96
  "primary": false,
95
97
  "nullable": true,
96
98
  "unique": false,
97
- "length": null,
99
+ "length": 6,
98
100
  "precision": null,
99
101
  "scale": null,
100
102
  "default": null,
101
103
  "comment": null,
102
104
  "enumItems": [],
103
- "mappedType": "text"
105
+ "mappedType": "datetime"
104
106
  },
105
- "unified_status": {
106
- "name": "unified_status",
107
- "type": "text",
107
+ "gateway_metadata": {
108
+ "name": "gateway_metadata",
109
+ "type": "jsonb",
108
110
  "unsigned": false,
109
111
  "autoincrement": false,
110
112
  "primary": false,
111
- "nullable": false,
113
+ "nullable": true,
112
114
  "unique": false,
113
115
  "length": null,
114
116
  "precision": null,
115
117
  "scale": null,
116
- "default": "'pending'",
118
+ "default": null,
117
119
  "comment": null,
118
120
  "enumItems": [],
119
- "mappedType": "text"
121
+ "mappedType": "json"
120
122
  },
121
- "gateway_status": {
122
- "name": "gateway_status",
123
+ "gateway_payment_id": {
124
+ "name": "gateway_payment_id",
123
125
  "type": "text",
124
126
  "unsigned": false,
125
127
  "autoincrement": false,
@@ -134,8 +136,8 @@
134
136
  "enumItems": [],
135
137
  "mappedType": "text"
136
138
  },
137
- "redirect_url": {
138
- "name": "redirect_url",
139
+ "gateway_refund_id": {
140
+ "name": "gateway_refund_id",
139
141
  "type": "text",
140
142
  "unsigned": false,
141
143
  "autoincrement": false,
@@ -150,8 +152,8 @@
150
152
  "enumItems": [],
151
153
  "mappedType": "text"
152
154
  },
153
- "client_secret": {
154
- "name": "client_secret",
155
+ "gateway_status": {
156
+ "name": "gateway_status",
155
157
  "type": "text",
156
158
  "unsigned": false,
157
159
  "autoincrement": false,
@@ -166,61 +168,61 @@
166
168
  "enumItems": [],
167
169
  "mappedType": "text"
168
170
  },
169
- "amount": {
170
- "name": "amount",
171
- "type": "numeric(18,4)",
171
+ "id": {
172
+ "name": "id",
173
+ "type": "uuid",
172
174
  "unsigned": false,
173
175
  "autoincrement": false,
174
- "primary": false,
176
+ "primary": true,
175
177
  "nullable": false,
176
178
  "unique": false,
177
179
  "length": null,
178
- "precision": 18,
179
- "scale": 4,
180
- "default": null,
180
+ "precision": null,
181
+ "scale": null,
182
+ "default": "gen_random_uuid()",
181
183
  "comment": null,
182
184
  "enumItems": [],
183
- "mappedType": "decimal"
185
+ "mappedType": "uuid"
184
186
  },
185
- "currency_code": {
186
- "name": "currency_code",
187
- "type": "text",
187
+ "last_polled_at": {
188
+ "name": "last_polled_at",
189
+ "type": "timestamptz(6)",
188
190
  "unsigned": false,
189
191
  "autoincrement": false,
190
192
  "primary": false,
191
- "nullable": false,
193
+ "nullable": true,
192
194
  "unique": false,
193
- "length": null,
195
+ "length": 6,
194
196
  "precision": null,
195
197
  "scale": null,
196
198
  "default": null,
197
199
  "comment": null,
198
200
  "enumItems": [],
199
- "mappedType": "text"
201
+ "mappedType": "datetime"
200
202
  },
201
- "gateway_metadata": {
202
- "name": "gateway_metadata",
203
- "type": "jsonb",
203
+ "last_webhook_at": {
204
+ "name": "last_webhook_at",
205
+ "type": "timestamptz(6)",
204
206
  "unsigned": false,
205
207
  "autoincrement": false,
206
208
  "primary": false,
207
209
  "nullable": true,
208
210
  "unique": false,
209
- "length": null,
211
+ "length": 6,
210
212
  "precision": null,
211
213
  "scale": null,
212
214
  "default": null,
213
215
  "comment": null,
214
216
  "enumItems": [],
215
- "mappedType": "json"
217
+ "mappedType": "datetime"
216
218
  },
217
- "webhook_log": {
218
- "name": "webhook_log",
219
- "type": "jsonb",
219
+ "organization_id": {
220
+ "name": "organization_id",
221
+ "type": "uuid",
220
222
  "unsigned": false,
221
223
  "autoincrement": false,
222
224
  "primary": false,
223
- "nullable": true,
225
+ "nullable": false,
224
226
  "unique": false,
225
227
  "length": null,
226
228
  "precision": null,
@@ -228,63 +230,63 @@
228
230
  "default": null,
229
231
  "comment": null,
230
232
  "enumItems": [],
231
- "mappedType": "json"
233
+ "mappedType": "uuid"
232
234
  },
233
- "last_webhook_at": {
234
- "name": "last_webhook_at",
235
- "type": "timestamptz",
235
+ "payment_id": {
236
+ "name": "payment_id",
237
+ "type": "uuid",
236
238
  "unsigned": false,
237
239
  "autoincrement": false,
238
240
  "primary": false,
239
- "nullable": true,
241
+ "nullable": false,
240
242
  "unique": false,
241
- "length": 6,
243
+ "length": null,
242
244
  "precision": null,
243
245
  "scale": null,
244
246
  "default": null,
245
247
  "comment": null,
246
248
  "enumItems": [],
247
- "mappedType": "datetime"
249
+ "mappedType": "uuid"
248
250
  },
249
- "last_polled_at": {
250
- "name": "last_polled_at",
251
- "type": "timestamptz",
251
+ "provider_key": {
252
+ "name": "provider_key",
253
+ "type": "text",
252
254
  "unsigned": false,
253
255
  "autoincrement": false,
254
256
  "primary": false,
255
- "nullable": true,
257
+ "nullable": false,
256
258
  "unique": false,
257
- "length": 6,
259
+ "length": null,
258
260
  "precision": null,
259
261
  "scale": null,
260
262
  "default": null,
261
263
  "comment": null,
262
264
  "enumItems": [],
263
- "mappedType": "datetime"
265
+ "mappedType": "text"
264
266
  },
265
- "expires_at": {
266
- "name": "expires_at",
267
- "type": "timestamptz",
267
+ "provider_session_id": {
268
+ "name": "provider_session_id",
269
+ "type": "text",
268
270
  "unsigned": false,
269
271
  "autoincrement": false,
270
272
  "primary": false,
271
273
  "nullable": true,
272
274
  "unique": false,
273
- "length": 6,
275
+ "length": null,
274
276
  "precision": null,
275
277
  "scale": null,
276
278
  "default": null,
277
279
  "comment": null,
278
280
  "enumItems": [],
279
- "mappedType": "datetime"
281
+ "mappedType": "text"
280
282
  },
281
- "organization_id": {
282
- "name": "organization_id",
283
- "type": "uuid",
283
+ "redirect_url": {
284
+ "name": "redirect_url",
285
+ "type": "text",
284
286
  "unsigned": false,
285
287
  "autoincrement": false,
286
288
  "primary": false,
287
- "nullable": false,
289
+ "nullable": true,
288
290
  "unique": false,
289
291
  "length": null,
290
292
  "precision": null,
@@ -292,7 +294,7 @@
292
294
  "default": null,
293
295
  "comment": null,
294
296
  "enumItems": [],
295
- "mappedType": "uuid"
297
+ "mappedType": "text"
296
298
  },
297
299
  "tenant_id": {
298
300
  "name": "tenant_id",
@@ -310,25 +312,25 @@
310
312
  "enumItems": [],
311
313
  "mappedType": "uuid"
312
314
  },
313
- "created_at": {
314
- "name": "created_at",
315
- "type": "timestamptz",
315
+ "unified_status": {
316
+ "name": "unified_status",
317
+ "type": "text",
316
318
  "unsigned": false,
317
319
  "autoincrement": false,
318
320
  "primary": false,
319
321
  "nullable": false,
320
322
  "unique": false,
321
- "length": 6,
323
+ "length": null,
322
324
  "precision": null,
323
325
  "scale": null,
324
- "default": null,
326
+ "default": "'pending'",
325
327
  "comment": null,
326
328
  "enumItems": [],
327
- "mappedType": "datetime"
329
+ "mappedType": "text"
328
330
  },
329
331
  "updated_at": {
330
332
  "name": "updated_at",
331
- "type": "timestamptz",
333
+ "type": "timestamptz(6)",
332
334
  "unsigned": false,
333
335
  "autoincrement": false,
334
336
  "primary": false,
@@ -342,28 +344,25 @@
342
344
  "enumItems": [],
343
345
  "mappedType": "datetime"
344
346
  },
345
- "deleted_at": {
346
- "name": "deleted_at",
347
- "type": "timestamptz",
347
+ "webhook_log": {
348
+ "name": "webhook_log",
349
+ "type": "jsonb",
348
350
  "unsigned": false,
349
351
  "autoincrement": false,
350
352
  "primary": false,
351
353
  "nullable": true,
352
354
  "unique": false,
353
- "length": 6,
355
+ "length": null,
354
356
  "precision": null,
355
357
  "scale": null,
356
358
  "default": null,
357
359
  "comment": null,
358
360
  "enumItems": [],
359
- "mappedType": "datetime"
361
+ "mappedType": "json"
360
362
  }
361
363
  },
362
- "name": "gateway_transactions",
363
- "schema": "public",
364
364
  "indexes": [
365
365
  {
366
- "keyName": "gateway_transactions_organization_id_tenant_id_uni_5a9b9_index",
367
366
  "columnNames": [
368
367
  "organization_id",
369
368
  "tenant_id",
@@ -371,23 +370,11 @@
371
370
  ],
372
371
  "composite": true,
373
372
  "constraint": false,
373
+ "keyName": "gateway_transactions_organization_id_tenant_id_uni_358ac_index",
374
374
  "primary": false,
375
375
  "unique": false
376
376
  },
377
377
  {
378
- "keyName": "gateway_transactions_provider_key_provider_session_d8577_index",
379
- "columnNames": [
380
- "provider_key",
381
- "provider_session_id",
382
- "organization_id"
383
- ],
384
- "composite": true,
385
- "constraint": false,
386
- "primary": false,
387
- "unique": false
388
- },
389
- {
390
- "keyName": "gateway_transactions_payment_id_organization_id_tenant_id_index",
391
378
  "columnNames": [
392
379
  "payment_id",
393
380
  "organization_id",
@@ -395,57 +382,72 @@
395
382
  ],
396
383
  "composite": true,
397
384
  "constraint": false,
385
+ "keyName": "gateway_transactions_payment_id_organization_id_tenant_id_index",
398
386
  "primary": false,
399
387
  "unique": false
400
388
  },
401
389
  {
402
- "keyName": "gateway_transactions_pkey",
403
390
  "columnNames": [
404
391
  "id"
405
392
  ],
406
393
  "composite": false,
407
394
  "constraint": true,
395
+ "keyName": "gateway_transactions_pkey",
408
396
  "primary": true,
409
397
  "unique": true
398
+ },
399
+ {
400
+ "columnNames": [
401
+ "provider_key",
402
+ "provider_session_id",
403
+ "organization_id"
404
+ ],
405
+ "composite": true,
406
+ "constraint": false,
407
+ "keyName": "gateway_transactions_provider_key_provider_session_750f8_index",
408
+ "primary": false,
409
+ "unique": false
410
410
  }
411
411
  ],
412
412
  "checks": [],
413
413
  "foreignKeys": {},
414
- "nativeEnums": {}
414
+ "comment": null
415
415
  },
416
416
  {
417
+ "name": "gateway_webhook_events",
418
+ "schema": "public",
417
419
  "columns": {
418
- "id": {
419
- "name": "id",
420
- "type": "uuid",
420
+ "event_type": {
421
+ "name": "event_type",
422
+ "type": "text",
421
423
  "unsigned": false,
422
424
  "autoincrement": false,
423
- "primary": true,
425
+ "primary": false,
424
426
  "nullable": false,
425
427
  "unique": false,
426
428
  "length": null,
427
429
  "precision": null,
428
430
  "scale": null,
429
- "default": "gen_random_uuid()",
431
+ "default": null,
430
432
  "comment": null,
431
433
  "enumItems": [],
432
- "mappedType": "uuid"
434
+ "mappedType": "text"
433
435
  },
434
- "provider_key": {
435
- "name": "provider_key",
436
- "type": "text",
436
+ "id": {
437
+ "name": "id",
438
+ "type": "uuid",
437
439
  "unsigned": false,
438
440
  "autoincrement": false,
439
- "primary": false,
441
+ "primary": true,
440
442
  "nullable": false,
441
443
  "unique": false,
442
444
  "length": null,
443
445
  "precision": null,
444
446
  "scale": null,
445
- "default": null,
447
+ "default": "gen_random_uuid()",
446
448
  "comment": null,
447
449
  "enumItems": [],
448
- "mappedType": "text"
450
+ "mappedType": "uuid"
449
451
  },
450
452
  "idempotency_key": {
451
453
  "name": "idempotency_key",
@@ -454,7 +456,7 @@
454
456
  "autoincrement": false,
455
457
  "primary": false,
456
458
  "nullable": false,
457
- "unique": false,
459
+ "unique": true,
458
460
  "length": null,
459
461
  "precision": null,
460
462
  "scale": null,
@@ -463,9 +465,9 @@
463
465
  "enumItems": [],
464
466
  "mappedType": "text"
465
467
  },
466
- "event_type": {
467
- "name": "event_type",
468
- "type": "text",
468
+ "organization_id": {
469
+ "name": "organization_id",
470
+ "type": "uuid",
469
471
  "unsigned": false,
470
472
  "autoincrement": false,
471
473
  "primary": false,
@@ -477,27 +479,27 @@
477
479
  "default": null,
478
480
  "comment": null,
479
481
  "enumItems": [],
480
- "mappedType": "text"
482
+ "mappedType": "uuid"
481
483
  },
482
- "organization_id": {
483
- "name": "organization_id",
484
- "type": "uuid",
484
+ "processed_at": {
485
+ "name": "processed_at",
486
+ "type": "timestamptz(6)",
485
487
  "unsigned": false,
486
488
  "autoincrement": false,
487
489
  "primary": false,
488
490
  "nullable": false,
489
491
  "unique": false,
490
- "length": null,
492
+ "length": 6,
491
493
  "precision": null,
492
494
  "scale": null,
493
495
  "default": null,
494
496
  "comment": null,
495
497
  "enumItems": [],
496
- "mappedType": "uuid"
498
+ "mappedType": "datetime"
497
499
  },
498
- "tenant_id": {
499
- "name": "tenant_id",
500
- "type": "uuid",
500
+ "provider_key": {
501
+ "name": "provider_key",
502
+ "type": "text",
501
503
  "unsigned": false,
502
504
  "autoincrement": false,
503
505
  "primary": false,
@@ -509,30 +511,27 @@
509
511
  "default": null,
510
512
  "comment": null,
511
513
  "enumItems": [],
512
- "mappedType": "uuid"
514
+ "mappedType": "text"
513
515
  },
514
- "processed_at": {
515
- "name": "processed_at",
516
- "type": "timestamptz",
516
+ "tenant_id": {
517
+ "name": "tenant_id",
518
+ "type": "uuid",
517
519
  "unsigned": false,
518
520
  "autoincrement": false,
519
521
  "primary": false,
520
522
  "nullable": false,
521
523
  "unique": false,
522
- "length": 6,
524
+ "length": null,
523
525
  "precision": null,
524
526
  "scale": null,
525
527
  "default": null,
526
528
  "comment": null,
527
529
  "enumItems": [],
528
- "mappedType": "datetime"
530
+ "mappedType": "uuid"
529
531
  }
530
532
  },
531
- "name": "gateway_webhook_events",
532
- "schema": "public",
533
533
  "indexes": [
534
534
  {
535
- "keyName": "gateway_webhook_events_idempotency_unique",
536
535
  "columnNames": [
537
536
  "idempotency_key",
538
537
  "provider_key",
@@ -541,24 +540,26 @@
541
540
  ],
542
541
  "composite": true,
543
542
  "constraint": true,
543
+ "keyName": "gateway_webhook_events_idempotency_unique",
544
544
  "primary": false,
545
545
  "unique": true
546
546
  },
547
547
  {
548
- "keyName": "gateway_webhook_events_pkey",
549
548
  "columnNames": [
550
549
  "id"
551
550
  ],
552
551
  "composite": false,
553
552
  "constraint": true,
553
+ "keyName": "gateway_webhook_events_pkey",
554
554
  "primary": true,
555
555
  "unique": true
556
556
  }
557
557
  ],
558
558
  "checks": [],
559
559
  "foreignKeys": {},
560
- "nativeEnums": {}
560
+ "comment": null
561
561
  }
562
562
  ],
563
+ "views": [],
563
564
  "nativeEnums": {}
564
- }
565
+ }