@happyvertical/smrt-subscriptions 0.39.4 → 0.39.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/AGENTS.md +2 -1
- package/dist/collections/TenantUsageMetricCollection.d.ts.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +653 -37
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +1305 -11
- package/dist/models/TenantUsageMetric.d.ts +4 -0
- package/dist/models/TenantUsageMetric.d.ts.map +1 -1
- package/dist/models/commercial.d.ts +81 -0
- package/dist/models/commercial.d.ts.map +1 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.d.ts.map +1 -1
- package/dist/services/commercial.d.ts +62 -0
- package/dist/services/commercial.d.ts.map +1 -0
- package/dist/services/index.d.ts +2 -0
- package/dist/services/index.d.ts.map +1 -1
- package/dist/smrt-knowledge.json +1067 -30
- package/dist/svelte/CommercialOverview.svelte +46 -0
- package/dist/svelte/CommercialOverview.svelte.d.ts +16 -0
- package/dist/svelte/CommercialOverview.svelte.d.ts.map +1 -0
- package/dist/svelte/i18n.d.ts +1 -0
- package/dist/svelte/i18n.d.ts.map +1 -1
- package/dist/svelte/i18n.js +1 -0
- package/dist/svelte/index.d.ts +2 -0
- package/dist/svelte/index.d.ts.map +1 -1
- package/dist/svelte/index.js +1 -0
- package/dist/types.d.ts +8 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils.d.ts +1 -0
- package/dist/utils.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/manifest.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "1.0.0",
|
|
3
|
-
"timestamp":
|
|
3
|
+
"timestamp": 1783875467496,
|
|
4
4
|
"packageName": "@happyvertical/smrt-subscriptions",
|
|
5
|
-
"packageVersion": "0.39.
|
|
5
|
+
"packageVersion": "0.39.7",
|
|
6
6
|
"objects": {
|
|
7
7
|
"@happyvertical/smrt-subscriptions:SubscriptionPlanCollection": {
|
|
8
8
|
"name": "subscriptionplancollection",
|
|
9
9
|
"className": "SubscriptionPlanCollection",
|
|
10
10
|
"qualifiedName": "@happyvertical/smrt-subscriptions:SubscriptionPlanCollection",
|
|
11
11
|
"collection": "subscriptionplans",
|
|
12
|
-
"filePath": "/home/runner/.local/share/pnpm/store/.workspaces/arc-happyvertical-node-phdrb-runner-
|
|
12
|
+
"filePath": "/home/runner/.local/share/pnpm/store/.workspaces/arc-happyvertical-node-phdrb-runner-w6dtf/smrt/smrt/packages/subscriptions/src/collections/SubscriptionPlanCollection.ts",
|
|
13
13
|
"packageName": "@happyvertical/smrt-subscriptions",
|
|
14
14
|
"fields": {},
|
|
15
15
|
"methods": {
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
"className": "TenantSubscriptionCollection",
|
|
112
112
|
"qualifiedName": "@happyvertical/smrt-subscriptions:TenantSubscriptionCollection",
|
|
113
113
|
"collection": "tenantsubscriptions",
|
|
114
|
-
"filePath": "/home/runner/.local/share/pnpm/store/.workspaces/arc-happyvertical-node-phdrb-runner-
|
|
114
|
+
"filePath": "/home/runner/.local/share/pnpm/store/.workspaces/arc-happyvertical-node-phdrb-runner-w6dtf/smrt/smrt/packages/subscriptions/src/collections/TenantSubscriptionCollection.ts",
|
|
115
115
|
"packageName": "@happyvertical/smrt-subscriptions",
|
|
116
116
|
"fields": {},
|
|
117
117
|
"methods": {
|
|
@@ -243,7 +243,7 @@
|
|
|
243
243
|
"className": "TenantUsageMetricCollection",
|
|
244
244
|
"qualifiedName": "@happyvertical/smrt-subscriptions:TenantUsageMetricCollection",
|
|
245
245
|
"collection": "tenantusagemetrics",
|
|
246
|
-
"filePath": "/home/runner/.local/share/pnpm/store/.workspaces/arc-happyvertical-node-phdrb-runner-
|
|
246
|
+
"filePath": "/home/runner/.local/share/pnpm/store/.workspaces/arc-happyvertical-node-phdrb-runner-w6dtf/smrt/smrt/packages/subscriptions/src/collections/TenantUsageMetricCollection.ts",
|
|
247
247
|
"packageName": "@happyvertical/smrt-subscriptions",
|
|
248
248
|
"fields": {},
|
|
249
249
|
"methods": {
|
|
@@ -384,7 +384,7 @@
|
|
|
384
384
|
"className": "SubscriptionPlan",
|
|
385
385
|
"qualifiedName": "@happyvertical/smrt-subscriptions:SubscriptionPlan",
|
|
386
386
|
"collection": "subscriptionplans",
|
|
387
|
-
"filePath": "/home/runner/.local/share/pnpm/store/.workspaces/arc-happyvertical-node-phdrb-runner-
|
|
387
|
+
"filePath": "/home/runner/.local/share/pnpm/store/.workspaces/arc-happyvertical-node-phdrb-runner-w6dtf/smrt/smrt/packages/subscriptions/src/models/SubscriptionPlan.ts",
|
|
388
388
|
"packageName": "@happyvertical/smrt-subscriptions",
|
|
389
389
|
"fields": {
|
|
390
390
|
"tenantId": {
|
|
@@ -730,7 +730,7 @@
|
|
|
730
730
|
"className": "TenantSubscription",
|
|
731
731
|
"qualifiedName": "@happyvertical/smrt-subscriptions:TenantSubscription",
|
|
732
732
|
"collection": "tenantsubscriptions",
|
|
733
|
-
"filePath": "/home/runner/.local/share/pnpm/store/.workspaces/arc-happyvertical-node-phdrb-runner-
|
|
733
|
+
"filePath": "/home/runner/.local/share/pnpm/store/.workspaces/arc-happyvertical-node-phdrb-runner-w6dtf/smrt/smrt/packages/subscriptions/src/models/TenantSubscription.ts",
|
|
734
734
|
"packageName": "@happyvertical/smrt-subscriptions",
|
|
735
735
|
"fields": {
|
|
736
736
|
"tenantId": {
|
|
@@ -1049,7 +1049,7 @@
|
|
|
1049
1049
|
"className": "TenantUsageMetric",
|
|
1050
1050
|
"qualifiedName": "@happyvertical/smrt-subscriptions:TenantUsageMetric",
|
|
1051
1051
|
"collection": "tenantusagemetrics",
|
|
1052
|
-
"filePath": "/home/runner/.local/share/pnpm/store/.workspaces/arc-happyvertical-node-phdrb-runner-
|
|
1052
|
+
"filePath": "/home/runner/.local/share/pnpm/store/.workspaces/arc-happyvertical-node-phdrb-runner-w6dtf/smrt/smrt/packages/subscriptions/src/models/TenantUsageMetric.ts",
|
|
1053
1053
|
"packageName": "@happyvertical/smrt-subscriptions",
|
|
1054
1054
|
"fields": {
|
|
1055
1055
|
"tenantId": {
|
|
@@ -1107,6 +1107,26 @@
|
|
|
1107
1107
|
"required": false,
|
|
1108
1108
|
"default": ""
|
|
1109
1109
|
},
|
|
1110
|
+
"projectId": {
|
|
1111
|
+
"type": "text",
|
|
1112
|
+
"required": false,
|
|
1113
|
+
"default": ""
|
|
1114
|
+
},
|
|
1115
|
+
"workRefType": {
|
|
1116
|
+
"type": "text",
|
|
1117
|
+
"required": false,
|
|
1118
|
+
"default": ""
|
|
1119
|
+
},
|
|
1120
|
+
"workRefId": {
|
|
1121
|
+
"type": "text",
|
|
1122
|
+
"required": false,
|
|
1123
|
+
"default": ""
|
|
1124
|
+
},
|
|
1125
|
+
"provider": {
|
|
1126
|
+
"type": "text",
|
|
1127
|
+
"required": false,
|
|
1128
|
+
"default": ""
|
|
1129
|
+
},
|
|
1110
1130
|
"dimensions": {
|
|
1111
1131
|
"type": "text",
|
|
1112
1132
|
"required": false,
|
|
@@ -1154,7 +1174,13 @@
|
|
|
1154
1174
|
"create"
|
|
1155
1175
|
]
|
|
1156
1176
|
},
|
|
1157
|
-
"cli":
|
|
1177
|
+
"cli": {
|
|
1178
|
+
"include": [
|
|
1179
|
+
"list",
|
|
1180
|
+
"get",
|
|
1181
|
+
"create"
|
|
1182
|
+
]
|
|
1183
|
+
},
|
|
1158
1184
|
"mcp": {
|
|
1159
1185
|
"include": [
|
|
1160
1186
|
"list",
|
|
@@ -1177,7 +1203,7 @@
|
|
|
1177
1203
|
],
|
|
1178
1204
|
"schema": {
|
|
1179
1205
|
"tableName": "_smrt_tenant_usage_metrics",
|
|
1180
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_tenant_usage_metrics\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"subscriber_kind\" TEXT DEFAULT 'tenant',\n \"subscriber_external_id\" TEXT DEFAULT '',\n \"metric_key\" TEXT DEFAULT '',\n \"quantity\" REAL DEFAULT 0,\n \"window_start\" TIMESTAMP,\n \"window_end\" TIMESTAMP,\n \"source\" TEXT DEFAULT '',\n \"source_id\" TEXT DEFAULT '',\n \"dimensions\" TEXT DEFAULT '{}'\n);",
|
|
1206
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_tenant_usage_metrics\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"subscriber_kind\" TEXT DEFAULT 'tenant',\n \"subscriber_external_id\" TEXT DEFAULT '',\n \"metric_key\" TEXT DEFAULT '',\n \"quantity\" REAL DEFAULT 0,\n \"window_start\" TIMESTAMP,\n \"window_end\" TIMESTAMP,\n \"source\" TEXT DEFAULT '',\n \"source_id\" TEXT DEFAULT '',\n \"project_id\" TEXT DEFAULT '',\n \"work_ref_type\" TEXT DEFAULT '',\n \"work_ref_id\" TEXT DEFAULT '',\n \"provider\" TEXT DEFAULT '',\n \"dimensions\" TEXT DEFAULT '{}'\n);",
|
|
1181
1207
|
"columns": {
|
|
1182
1208
|
"id": {
|
|
1183
1209
|
"type": "UUID",
|
|
@@ -1256,6 +1282,30 @@
|
|
|
1256
1282
|
"unique": false,
|
|
1257
1283
|
"default": ""
|
|
1258
1284
|
},
|
|
1285
|
+
"project_id": {
|
|
1286
|
+
"type": "TEXT",
|
|
1287
|
+
"notNull": false,
|
|
1288
|
+
"unique": false,
|
|
1289
|
+
"default": ""
|
|
1290
|
+
},
|
|
1291
|
+
"work_ref_type": {
|
|
1292
|
+
"type": "TEXT",
|
|
1293
|
+
"notNull": false,
|
|
1294
|
+
"unique": false,
|
|
1295
|
+
"default": ""
|
|
1296
|
+
},
|
|
1297
|
+
"work_ref_id": {
|
|
1298
|
+
"type": "TEXT",
|
|
1299
|
+
"notNull": false,
|
|
1300
|
+
"unique": false,
|
|
1301
|
+
"default": ""
|
|
1302
|
+
},
|
|
1303
|
+
"provider": {
|
|
1304
|
+
"type": "TEXT",
|
|
1305
|
+
"notNull": false,
|
|
1306
|
+
"unique": false,
|
|
1307
|
+
"default": ""
|
|
1308
|
+
},
|
|
1259
1309
|
"dimensions": {
|
|
1260
1310
|
"type": "TEXT",
|
|
1261
1311
|
"notNull": false,
|
|
@@ -1279,7 +1329,1251 @@
|
|
|
1279
1329
|
"unique": true
|
|
1280
1330
|
}
|
|
1281
1331
|
],
|
|
1282
|
-
"version": "
|
|
1332
|
+
"version": "b799c746"
|
|
1333
|
+
}
|
|
1334
|
+
},
|
|
1335
|
+
"@happyvertical/smrt-subscriptions:PricingRule": {
|
|
1336
|
+
"name": "pricingrule",
|
|
1337
|
+
"className": "PricingRule",
|
|
1338
|
+
"qualifiedName": "@happyvertical/smrt-subscriptions:PricingRule",
|
|
1339
|
+
"collection": "pricingrules",
|
|
1340
|
+
"filePath": "/home/runner/.local/share/pnpm/store/.workspaces/arc-happyvertical-node-phdrb-runner-w6dtf/smrt/smrt/packages/subscriptions/src/models/commercial.ts",
|
|
1341
|
+
"packageName": "@happyvertical/smrt-subscriptions",
|
|
1342
|
+
"fields": {
|
|
1343
|
+
"tenantId": {
|
|
1344
|
+
"type": "text",
|
|
1345
|
+
"required": true,
|
|
1346
|
+
"_meta": {
|
|
1347
|
+
"sqlType": "UUID",
|
|
1348
|
+
"__tenancy": {
|
|
1349
|
+
"isTenantIdField": true,
|
|
1350
|
+
"autoFilter": true,
|
|
1351
|
+
"required": true,
|
|
1352
|
+
"autoPopulate": true,
|
|
1353
|
+
"nullable": false,
|
|
1354
|
+
"mode": "required",
|
|
1355
|
+
"field": "tenantId",
|
|
1356
|
+
"allowSuperAdminBypass": false
|
|
1357
|
+
}
|
|
1358
|
+
}
|
|
1359
|
+
},
|
|
1360
|
+
"ruleKey": {
|
|
1361
|
+
"type": "text",
|
|
1362
|
+
"required": false,
|
|
1363
|
+
"default": ""
|
|
1364
|
+
},
|
|
1365
|
+
"metricKey": {
|
|
1366
|
+
"type": "text",
|
|
1367
|
+
"required": false,
|
|
1368
|
+
"default": ""
|
|
1369
|
+
},
|
|
1370
|
+
"serviceKey": {
|
|
1371
|
+
"type": "text",
|
|
1372
|
+
"required": false,
|
|
1373
|
+
"default": ""
|
|
1374
|
+
},
|
|
1375
|
+
"strategy": {
|
|
1376
|
+
"type": "text",
|
|
1377
|
+
"required": false,
|
|
1378
|
+
"default": "fixed_unit"
|
|
1379
|
+
},
|
|
1380
|
+
"currency": {
|
|
1381
|
+
"type": "text",
|
|
1382
|
+
"required": false,
|
|
1383
|
+
"default": "USD"
|
|
1384
|
+
},
|
|
1385
|
+
"effectiveFrom": {
|
|
1386
|
+
"type": "datetime",
|
|
1387
|
+
"required": false
|
|
1388
|
+
},
|
|
1389
|
+
"effectiveTo": {
|
|
1390
|
+
"type": "datetime",
|
|
1391
|
+
"required": false
|
|
1392
|
+
},
|
|
1393
|
+
"priority": {
|
|
1394
|
+
"type": "integer",
|
|
1395
|
+
"required": false,
|
|
1396
|
+
"default": 0
|
|
1397
|
+
},
|
|
1398
|
+
"terms": {
|
|
1399
|
+
"type": "text",
|
|
1400
|
+
"required": false,
|
|
1401
|
+
"default": "{}"
|
|
1402
|
+
},
|
|
1403
|
+
"active": {
|
|
1404
|
+
"type": "boolean",
|
|
1405
|
+
"required": false,
|
|
1406
|
+
"default": true
|
|
1407
|
+
}
|
|
1408
|
+
},
|
|
1409
|
+
"methods": {
|
|
1410
|
+
"getTerms": {
|
|
1411
|
+
"name": "getTerms",
|
|
1412
|
+
"async": false,
|
|
1413
|
+
"parameters": [],
|
|
1414
|
+
"returnType": "Record<string>",
|
|
1415
|
+
"isStatic": false,
|
|
1416
|
+
"isPublic": true
|
|
1417
|
+
},
|
|
1418
|
+
"setTerms": {
|
|
1419
|
+
"name": "setTerms",
|
|
1420
|
+
"async": false,
|
|
1421
|
+
"parameters": [
|
|
1422
|
+
{
|
|
1423
|
+
"name": "value",
|
|
1424
|
+
"type": "Record<string>",
|
|
1425
|
+
"optional": false
|
|
1426
|
+
}
|
|
1427
|
+
],
|
|
1428
|
+
"returnType": "void",
|
|
1429
|
+
"isStatic": false,
|
|
1430
|
+
"isPublic": true
|
|
1431
|
+
}
|
|
1432
|
+
},
|
|
1433
|
+
"decoratorConfig": {
|
|
1434
|
+
"tableName": "_smrt_pricing_rules",
|
|
1435
|
+
"api": true,
|
|
1436
|
+
"cli": true,
|
|
1437
|
+
"mcp": true,
|
|
1438
|
+
"tenantScoped": {
|
|
1439
|
+
"mode": "required"
|
|
1440
|
+
}
|
|
1441
|
+
},
|
|
1442
|
+
"extends": "SmrtObject",
|
|
1443
|
+
"exportName": "PricingRule",
|
|
1444
|
+
"collectionExportName": "PricingRuleCollection",
|
|
1445
|
+
"validationRules": [
|
|
1446
|
+
{
|
|
1447
|
+
"field": "tenantId",
|
|
1448
|
+
"rule": "required",
|
|
1449
|
+
"fieldType": "text"
|
|
1450
|
+
}
|
|
1451
|
+
],
|
|
1452
|
+
"schema": {
|
|
1453
|
+
"tableName": "_smrt_pricing_rules",
|
|
1454
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_pricing_rules\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"rule_key\" TEXT DEFAULT '',\n \"metric_key\" TEXT DEFAULT '',\n \"service_key\" TEXT DEFAULT '',\n \"strategy\" TEXT DEFAULT 'fixed_unit',\n \"currency\" TEXT DEFAULT 'USD',\n \"effective_from\" TIMESTAMP,\n \"effective_to\" TIMESTAMP,\n \"priority\" INTEGER DEFAULT 0,\n \"terms\" TEXT DEFAULT '{}',\n \"active\" BOOLEAN DEFAULT TRUE\n);",
|
|
1455
|
+
"columns": {
|
|
1456
|
+
"id": {
|
|
1457
|
+
"type": "UUID",
|
|
1458
|
+
"primaryKey": true,
|
|
1459
|
+
"referenceKind": "id",
|
|
1460
|
+
"notNull": true
|
|
1461
|
+
},
|
|
1462
|
+
"slug": {
|
|
1463
|
+
"type": "TEXT",
|
|
1464
|
+
"notNull": true
|
|
1465
|
+
},
|
|
1466
|
+
"context": {
|
|
1467
|
+
"type": "TEXT",
|
|
1468
|
+
"notNull": true,
|
|
1469
|
+
"default": ""
|
|
1470
|
+
},
|
|
1471
|
+
"created_at": {
|
|
1472
|
+
"type": "TIMESTAMP",
|
|
1473
|
+
"notNull": true,
|
|
1474
|
+
"default": "current_timestamp"
|
|
1475
|
+
},
|
|
1476
|
+
"updated_at": {
|
|
1477
|
+
"type": "TIMESTAMP",
|
|
1478
|
+
"notNull": true,
|
|
1479
|
+
"default": "current_timestamp"
|
|
1480
|
+
},
|
|
1481
|
+
"tenant_id": {
|
|
1482
|
+
"type": "UUID",
|
|
1483
|
+
"referenceKind": "tenantId",
|
|
1484
|
+
"notNull": true,
|
|
1485
|
+
"unique": false
|
|
1486
|
+
},
|
|
1487
|
+
"rule_key": {
|
|
1488
|
+
"type": "TEXT",
|
|
1489
|
+
"notNull": false,
|
|
1490
|
+
"unique": false,
|
|
1491
|
+
"default": ""
|
|
1492
|
+
},
|
|
1493
|
+
"metric_key": {
|
|
1494
|
+
"type": "TEXT",
|
|
1495
|
+
"notNull": false,
|
|
1496
|
+
"unique": false,
|
|
1497
|
+
"default": ""
|
|
1498
|
+
},
|
|
1499
|
+
"service_key": {
|
|
1500
|
+
"type": "TEXT",
|
|
1501
|
+
"notNull": false,
|
|
1502
|
+
"unique": false,
|
|
1503
|
+
"default": ""
|
|
1504
|
+
},
|
|
1505
|
+
"strategy": {
|
|
1506
|
+
"type": "TEXT",
|
|
1507
|
+
"notNull": false,
|
|
1508
|
+
"unique": false,
|
|
1509
|
+
"default": "fixed_unit"
|
|
1510
|
+
},
|
|
1511
|
+
"currency": {
|
|
1512
|
+
"type": "TEXT",
|
|
1513
|
+
"notNull": false,
|
|
1514
|
+
"unique": false,
|
|
1515
|
+
"default": "USD"
|
|
1516
|
+
},
|
|
1517
|
+
"effective_from": {
|
|
1518
|
+
"type": "TIMESTAMP",
|
|
1519
|
+
"notNull": false,
|
|
1520
|
+
"unique": false
|
|
1521
|
+
},
|
|
1522
|
+
"effective_to": {
|
|
1523
|
+
"type": "TIMESTAMP",
|
|
1524
|
+
"notNull": false,
|
|
1525
|
+
"unique": false
|
|
1526
|
+
},
|
|
1527
|
+
"priority": {
|
|
1528
|
+
"type": "INTEGER",
|
|
1529
|
+
"notNull": false,
|
|
1530
|
+
"unique": false,
|
|
1531
|
+
"default": 0
|
|
1532
|
+
},
|
|
1533
|
+
"terms": {
|
|
1534
|
+
"type": "TEXT",
|
|
1535
|
+
"notNull": false,
|
|
1536
|
+
"unique": false,
|
|
1537
|
+
"default": "{}"
|
|
1538
|
+
},
|
|
1539
|
+
"active": {
|
|
1540
|
+
"type": "BOOLEAN",
|
|
1541
|
+
"notNull": false,
|
|
1542
|
+
"unique": false,
|
|
1543
|
+
"default": true
|
|
1544
|
+
}
|
|
1545
|
+
},
|
|
1546
|
+
"indexes": [
|
|
1547
|
+
{
|
|
1548
|
+
"name": "_smrt_pricing_rules_id_idx",
|
|
1549
|
+
"columns": [
|
|
1550
|
+
"id"
|
|
1551
|
+
]
|
|
1552
|
+
},
|
|
1553
|
+
{
|
|
1554
|
+
"name": "_smrt_pricing_rules_slug_context_idx",
|
|
1555
|
+
"columns": [
|
|
1556
|
+
"slug",
|
|
1557
|
+
"context"
|
|
1558
|
+
],
|
|
1559
|
+
"unique": true
|
|
1560
|
+
}
|
|
1561
|
+
],
|
|
1562
|
+
"version": "88642897"
|
|
1563
|
+
}
|
|
1564
|
+
},
|
|
1565
|
+
"@happyvertical/smrt-subscriptions:ClientCharge": {
|
|
1566
|
+
"name": "clientcharge",
|
|
1567
|
+
"className": "ClientCharge",
|
|
1568
|
+
"qualifiedName": "@happyvertical/smrt-subscriptions:ClientCharge",
|
|
1569
|
+
"collection": "clientcharges",
|
|
1570
|
+
"filePath": "/home/runner/.local/share/pnpm/store/.workspaces/arc-happyvertical-node-phdrb-runner-w6dtf/smrt/smrt/packages/subscriptions/src/models/commercial.ts",
|
|
1571
|
+
"packageName": "@happyvertical/smrt-subscriptions",
|
|
1572
|
+
"fields": {
|
|
1573
|
+
"tenantId": {
|
|
1574
|
+
"type": "text",
|
|
1575
|
+
"required": true,
|
|
1576
|
+
"_meta": {
|
|
1577
|
+
"sqlType": "UUID",
|
|
1578
|
+
"__tenancy": {
|
|
1579
|
+
"isTenantIdField": true,
|
|
1580
|
+
"autoFilter": true,
|
|
1581
|
+
"required": true,
|
|
1582
|
+
"autoPopulate": true,
|
|
1583
|
+
"nullable": false,
|
|
1584
|
+
"mode": "required",
|
|
1585
|
+
"field": "tenantId",
|
|
1586
|
+
"allowSuperAdminBypass": false
|
|
1587
|
+
}
|
|
1588
|
+
}
|
|
1589
|
+
},
|
|
1590
|
+
"usageEventId": {
|
|
1591
|
+
"type": "foreignKey",
|
|
1592
|
+
"required": false,
|
|
1593
|
+
"related": "TenantUsageMetric"
|
|
1594
|
+
},
|
|
1595
|
+
"subscriberKind": {
|
|
1596
|
+
"type": "text",
|
|
1597
|
+
"required": false,
|
|
1598
|
+
"default": "tenant"
|
|
1599
|
+
},
|
|
1600
|
+
"subscriberExternalId": {
|
|
1601
|
+
"type": "text",
|
|
1602
|
+
"required": false,
|
|
1603
|
+
"default": ""
|
|
1604
|
+
},
|
|
1605
|
+
"projectId": {
|
|
1606
|
+
"type": "text",
|
|
1607
|
+
"required": false,
|
|
1608
|
+
"default": ""
|
|
1609
|
+
},
|
|
1610
|
+
"workRefType": {
|
|
1611
|
+
"type": "text",
|
|
1612
|
+
"required": false,
|
|
1613
|
+
"default": ""
|
|
1614
|
+
},
|
|
1615
|
+
"workRefId": {
|
|
1616
|
+
"type": "text",
|
|
1617
|
+
"required": false,
|
|
1618
|
+
"default": ""
|
|
1619
|
+
},
|
|
1620
|
+
"provider": {
|
|
1621
|
+
"type": "text",
|
|
1622
|
+
"required": false,
|
|
1623
|
+
"default": ""
|
|
1624
|
+
},
|
|
1625
|
+
"serviceKey": {
|
|
1626
|
+
"type": "text",
|
|
1627
|
+
"required": false,
|
|
1628
|
+
"default": ""
|
|
1629
|
+
},
|
|
1630
|
+
"metricKey": {
|
|
1631
|
+
"type": "text",
|
|
1632
|
+
"required": false,
|
|
1633
|
+
"default": ""
|
|
1634
|
+
},
|
|
1635
|
+
"quantity": {
|
|
1636
|
+
"type": "decimal",
|
|
1637
|
+
"required": false,
|
|
1638
|
+
"default": 0
|
|
1639
|
+
},
|
|
1640
|
+
"amount": {
|
|
1641
|
+
"type": "decimal",
|
|
1642
|
+
"required": false,
|
|
1643
|
+
"default": 0
|
|
1644
|
+
},
|
|
1645
|
+
"currency": {
|
|
1646
|
+
"type": "text",
|
|
1647
|
+
"required": false,
|
|
1648
|
+
"default": "USD"
|
|
1649
|
+
},
|
|
1650
|
+
"pricingRuleId": {
|
|
1651
|
+
"type": "foreignKey",
|
|
1652
|
+
"required": false,
|
|
1653
|
+
"related": "PricingRule"
|
|
1654
|
+
},
|
|
1655
|
+
"pricingSnapshot": {
|
|
1656
|
+
"type": "text",
|
|
1657
|
+
"required": false,
|
|
1658
|
+
"default": "{}"
|
|
1659
|
+
},
|
|
1660
|
+
"status": {
|
|
1661
|
+
"type": "text",
|
|
1662
|
+
"required": false,
|
|
1663
|
+
"default": "draft"
|
|
1664
|
+
},
|
|
1665
|
+
"approvedAt": {
|
|
1666
|
+
"type": "datetime",
|
|
1667
|
+
"required": false
|
|
1668
|
+
}
|
|
1669
|
+
},
|
|
1670
|
+
"methods": {
|
|
1671
|
+
"getPricingSnapshot": {
|
|
1672
|
+
"name": "getPricingSnapshot",
|
|
1673
|
+
"async": false,
|
|
1674
|
+
"parameters": [],
|
|
1675
|
+
"returnType": "Record<string>",
|
|
1676
|
+
"isStatic": false,
|
|
1677
|
+
"isPublic": true
|
|
1678
|
+
}
|
|
1679
|
+
},
|
|
1680
|
+
"decoratorConfig": {
|
|
1681
|
+
"tableName": "_smrt_client_charges",
|
|
1682
|
+
"api": {
|
|
1683
|
+
"include": [
|
|
1684
|
+
"list",
|
|
1685
|
+
"get"
|
|
1686
|
+
]
|
|
1687
|
+
},
|
|
1688
|
+
"cli": {
|
|
1689
|
+
"include": [
|
|
1690
|
+
"list",
|
|
1691
|
+
"get"
|
|
1692
|
+
]
|
|
1693
|
+
},
|
|
1694
|
+
"mcp": {
|
|
1695
|
+
"include": [
|
|
1696
|
+
"list",
|
|
1697
|
+
"get"
|
|
1698
|
+
]
|
|
1699
|
+
},
|
|
1700
|
+
"conflictColumns": [
|
|
1701
|
+
"usage_event_id"
|
|
1702
|
+
],
|
|
1703
|
+
"tenantScoped": {
|
|
1704
|
+
"mode": "required"
|
|
1705
|
+
}
|
|
1706
|
+
},
|
|
1707
|
+
"extends": "SmrtObject",
|
|
1708
|
+
"exportName": "ClientCharge",
|
|
1709
|
+
"collectionExportName": "ClientChargeCollection",
|
|
1710
|
+
"validationRules": [
|
|
1711
|
+
{
|
|
1712
|
+
"field": "tenantId",
|
|
1713
|
+
"rule": "required",
|
|
1714
|
+
"fieldType": "text"
|
|
1715
|
+
}
|
|
1716
|
+
],
|
|
1717
|
+
"schema": {
|
|
1718
|
+
"tableName": "_smrt_client_charges",
|
|
1719
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_client_charges\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"usage_event_id\" UUID,\n \"subscriber_kind\" TEXT DEFAULT 'tenant',\n \"subscriber_external_id\" TEXT DEFAULT '',\n \"project_id\" TEXT DEFAULT '',\n \"work_ref_type\" TEXT DEFAULT '',\n \"work_ref_id\" TEXT DEFAULT '',\n \"provider\" TEXT DEFAULT '',\n \"service_key\" TEXT DEFAULT '',\n \"metric_key\" TEXT DEFAULT '',\n \"quantity\" REAL DEFAULT 0,\n \"amount\" REAL DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"pricing_rule_id\" UUID,\n \"pricing_snapshot\" TEXT DEFAULT '{}',\n \"status\" TEXT DEFAULT 'draft',\n \"approved_at\" TIMESTAMP\n);",
|
|
1720
|
+
"columns": {
|
|
1721
|
+
"id": {
|
|
1722
|
+
"type": "UUID",
|
|
1723
|
+
"primaryKey": true,
|
|
1724
|
+
"referenceKind": "id",
|
|
1725
|
+
"notNull": true
|
|
1726
|
+
},
|
|
1727
|
+
"slug": {
|
|
1728
|
+
"type": "TEXT",
|
|
1729
|
+
"notNull": true
|
|
1730
|
+
},
|
|
1731
|
+
"context": {
|
|
1732
|
+
"type": "TEXT",
|
|
1733
|
+
"notNull": true,
|
|
1734
|
+
"default": ""
|
|
1735
|
+
},
|
|
1736
|
+
"created_at": {
|
|
1737
|
+
"type": "TIMESTAMP",
|
|
1738
|
+
"notNull": true,
|
|
1739
|
+
"default": "current_timestamp"
|
|
1740
|
+
},
|
|
1741
|
+
"updated_at": {
|
|
1742
|
+
"type": "TIMESTAMP",
|
|
1743
|
+
"notNull": true,
|
|
1744
|
+
"default": "current_timestamp"
|
|
1745
|
+
},
|
|
1746
|
+
"tenant_id": {
|
|
1747
|
+
"type": "UUID",
|
|
1748
|
+
"referenceKind": "tenantId",
|
|
1749
|
+
"notNull": true,
|
|
1750
|
+
"unique": false
|
|
1751
|
+
},
|
|
1752
|
+
"usage_event_id": {
|
|
1753
|
+
"type": "UUID",
|
|
1754
|
+
"referenceKind": "foreignKey",
|
|
1755
|
+
"notNull": false,
|
|
1756
|
+
"unique": false
|
|
1757
|
+
},
|
|
1758
|
+
"subscriber_kind": {
|
|
1759
|
+
"type": "TEXT",
|
|
1760
|
+
"notNull": false,
|
|
1761
|
+
"unique": false,
|
|
1762
|
+
"default": "tenant"
|
|
1763
|
+
},
|
|
1764
|
+
"subscriber_external_id": {
|
|
1765
|
+
"type": "TEXT",
|
|
1766
|
+
"notNull": false,
|
|
1767
|
+
"unique": false,
|
|
1768
|
+
"default": ""
|
|
1769
|
+
},
|
|
1770
|
+
"project_id": {
|
|
1771
|
+
"type": "TEXT",
|
|
1772
|
+
"notNull": false,
|
|
1773
|
+
"unique": false,
|
|
1774
|
+
"default": ""
|
|
1775
|
+
},
|
|
1776
|
+
"work_ref_type": {
|
|
1777
|
+
"type": "TEXT",
|
|
1778
|
+
"notNull": false,
|
|
1779
|
+
"unique": false,
|
|
1780
|
+
"default": ""
|
|
1781
|
+
},
|
|
1782
|
+
"work_ref_id": {
|
|
1783
|
+
"type": "TEXT",
|
|
1784
|
+
"notNull": false,
|
|
1785
|
+
"unique": false,
|
|
1786
|
+
"default": ""
|
|
1787
|
+
},
|
|
1788
|
+
"provider": {
|
|
1789
|
+
"type": "TEXT",
|
|
1790
|
+
"notNull": false,
|
|
1791
|
+
"unique": false,
|
|
1792
|
+
"default": ""
|
|
1793
|
+
},
|
|
1794
|
+
"service_key": {
|
|
1795
|
+
"type": "TEXT",
|
|
1796
|
+
"notNull": false,
|
|
1797
|
+
"unique": false,
|
|
1798
|
+
"default": ""
|
|
1799
|
+
},
|
|
1800
|
+
"metric_key": {
|
|
1801
|
+
"type": "TEXT",
|
|
1802
|
+
"notNull": false,
|
|
1803
|
+
"unique": false,
|
|
1804
|
+
"default": ""
|
|
1805
|
+
},
|
|
1806
|
+
"quantity": {
|
|
1807
|
+
"type": "REAL",
|
|
1808
|
+
"notNull": false,
|
|
1809
|
+
"unique": false,
|
|
1810
|
+
"default": 0
|
|
1811
|
+
},
|
|
1812
|
+
"amount": {
|
|
1813
|
+
"type": "REAL",
|
|
1814
|
+
"notNull": false,
|
|
1815
|
+
"unique": false,
|
|
1816
|
+
"default": 0
|
|
1817
|
+
},
|
|
1818
|
+
"currency": {
|
|
1819
|
+
"type": "TEXT",
|
|
1820
|
+
"notNull": false,
|
|
1821
|
+
"unique": false,
|
|
1822
|
+
"default": "USD"
|
|
1823
|
+
},
|
|
1824
|
+
"pricing_rule_id": {
|
|
1825
|
+
"type": "UUID",
|
|
1826
|
+
"referenceKind": "foreignKey",
|
|
1827
|
+
"notNull": false,
|
|
1828
|
+
"unique": false
|
|
1829
|
+
},
|
|
1830
|
+
"pricing_snapshot": {
|
|
1831
|
+
"type": "TEXT",
|
|
1832
|
+
"notNull": false,
|
|
1833
|
+
"unique": false,
|
|
1834
|
+
"default": "{}"
|
|
1835
|
+
},
|
|
1836
|
+
"status": {
|
|
1837
|
+
"type": "TEXT",
|
|
1838
|
+
"notNull": false,
|
|
1839
|
+
"unique": false,
|
|
1840
|
+
"default": "draft"
|
|
1841
|
+
},
|
|
1842
|
+
"approved_at": {
|
|
1843
|
+
"type": "TIMESTAMP",
|
|
1844
|
+
"notNull": false,
|
|
1845
|
+
"unique": false
|
|
1846
|
+
}
|
|
1847
|
+
},
|
|
1848
|
+
"indexes": [
|
|
1849
|
+
{
|
|
1850
|
+
"name": "_smrt_client_charges_id_idx",
|
|
1851
|
+
"columns": [
|
|
1852
|
+
"id"
|
|
1853
|
+
]
|
|
1854
|
+
},
|
|
1855
|
+
{
|
|
1856
|
+
"name": "_smrt_client_charges_usage_event_id_idx",
|
|
1857
|
+
"columns": [
|
|
1858
|
+
"usage_event_id"
|
|
1859
|
+
],
|
|
1860
|
+
"unique": true
|
|
1861
|
+
}
|
|
1862
|
+
],
|
|
1863
|
+
"version": "9bee0a3e"
|
|
1864
|
+
}
|
|
1865
|
+
},
|
|
1866
|
+
"@happyvertical/smrt-subscriptions:BillingAdjustment": {
|
|
1867
|
+
"name": "billingadjustment",
|
|
1868
|
+
"className": "BillingAdjustment",
|
|
1869
|
+
"qualifiedName": "@happyvertical/smrt-subscriptions:BillingAdjustment",
|
|
1870
|
+
"collection": "billingadjustments",
|
|
1871
|
+
"filePath": "/home/runner/.local/share/pnpm/store/.workspaces/arc-happyvertical-node-phdrb-runner-w6dtf/smrt/smrt/packages/subscriptions/src/models/commercial.ts",
|
|
1872
|
+
"packageName": "@happyvertical/smrt-subscriptions",
|
|
1873
|
+
"fields": {
|
|
1874
|
+
"tenantId": {
|
|
1875
|
+
"type": "text",
|
|
1876
|
+
"required": true,
|
|
1877
|
+
"_meta": {
|
|
1878
|
+
"sqlType": "UUID",
|
|
1879
|
+
"__tenancy": {
|
|
1880
|
+
"isTenantIdField": true,
|
|
1881
|
+
"autoFilter": true,
|
|
1882
|
+
"required": true,
|
|
1883
|
+
"autoPopulate": true,
|
|
1884
|
+
"nullable": false,
|
|
1885
|
+
"mode": "required",
|
|
1886
|
+
"field": "tenantId",
|
|
1887
|
+
"allowSuperAdminBypass": false
|
|
1888
|
+
}
|
|
1889
|
+
}
|
|
1890
|
+
},
|
|
1891
|
+
"clientChargeId": {
|
|
1892
|
+
"type": "foreignKey",
|
|
1893
|
+
"required": false,
|
|
1894
|
+
"related": "ClientCharge"
|
|
1895
|
+
},
|
|
1896
|
+
"amount": {
|
|
1897
|
+
"type": "decimal",
|
|
1898
|
+
"required": false,
|
|
1899
|
+
"default": 0
|
|
1900
|
+
},
|
|
1901
|
+
"currency": {
|
|
1902
|
+
"type": "text",
|
|
1903
|
+
"required": false,
|
|
1904
|
+
"default": "USD"
|
|
1905
|
+
},
|
|
1906
|
+
"reason": {
|
|
1907
|
+
"type": "text",
|
|
1908
|
+
"required": false,
|
|
1909
|
+
"default": ""
|
|
1910
|
+
},
|
|
1911
|
+
"source": {
|
|
1912
|
+
"type": "text",
|
|
1913
|
+
"required": false,
|
|
1914
|
+
"default": ""
|
|
1915
|
+
},
|
|
1916
|
+
"sourceId": {
|
|
1917
|
+
"type": "text",
|
|
1918
|
+
"required": false,
|
|
1919
|
+
"default": ""
|
|
1920
|
+
},
|
|
1921
|
+
"createdBy": {
|
|
1922
|
+
"type": "text",
|
|
1923
|
+
"required": false,
|
|
1924
|
+
"default": ""
|
|
1925
|
+
}
|
|
1926
|
+
},
|
|
1927
|
+
"methods": {},
|
|
1928
|
+
"decoratorConfig": {
|
|
1929
|
+
"tableName": "_smrt_billing_adjustments",
|
|
1930
|
+
"api": {
|
|
1931
|
+
"include": [
|
|
1932
|
+
"list",
|
|
1933
|
+
"get"
|
|
1934
|
+
]
|
|
1935
|
+
},
|
|
1936
|
+
"cli": {
|
|
1937
|
+
"include": [
|
|
1938
|
+
"list",
|
|
1939
|
+
"get"
|
|
1940
|
+
]
|
|
1941
|
+
},
|
|
1942
|
+
"mcp": {
|
|
1943
|
+
"include": [
|
|
1944
|
+
"list",
|
|
1945
|
+
"get"
|
|
1946
|
+
]
|
|
1947
|
+
},
|
|
1948
|
+
"tenantScoped": {
|
|
1949
|
+
"mode": "required"
|
|
1950
|
+
}
|
|
1951
|
+
},
|
|
1952
|
+
"extends": "SmrtObject",
|
|
1953
|
+
"exportName": "BillingAdjustment",
|
|
1954
|
+
"collectionExportName": "BillingAdjustmentCollection",
|
|
1955
|
+
"validationRules": [
|
|
1956
|
+
{
|
|
1957
|
+
"field": "tenantId",
|
|
1958
|
+
"rule": "required",
|
|
1959
|
+
"fieldType": "text"
|
|
1960
|
+
}
|
|
1961
|
+
],
|
|
1962
|
+
"schema": {
|
|
1963
|
+
"tableName": "_smrt_billing_adjustments",
|
|
1964
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_billing_adjustments\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"client_charge_id\" UUID,\n \"amount\" REAL DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"reason\" TEXT DEFAULT '',\n \"source\" TEXT DEFAULT '',\n \"source_id\" TEXT DEFAULT '',\n \"created_by\" TEXT DEFAULT ''\n);",
|
|
1965
|
+
"columns": {
|
|
1966
|
+
"id": {
|
|
1967
|
+
"type": "UUID",
|
|
1968
|
+
"primaryKey": true,
|
|
1969
|
+
"referenceKind": "id",
|
|
1970
|
+
"notNull": true
|
|
1971
|
+
},
|
|
1972
|
+
"slug": {
|
|
1973
|
+
"type": "TEXT",
|
|
1974
|
+
"notNull": true
|
|
1975
|
+
},
|
|
1976
|
+
"context": {
|
|
1977
|
+
"type": "TEXT",
|
|
1978
|
+
"notNull": true,
|
|
1979
|
+
"default": ""
|
|
1980
|
+
},
|
|
1981
|
+
"created_at": {
|
|
1982
|
+
"type": "TIMESTAMP",
|
|
1983
|
+
"notNull": true,
|
|
1984
|
+
"default": "current_timestamp"
|
|
1985
|
+
},
|
|
1986
|
+
"updated_at": {
|
|
1987
|
+
"type": "TIMESTAMP",
|
|
1988
|
+
"notNull": true,
|
|
1989
|
+
"default": "current_timestamp"
|
|
1990
|
+
},
|
|
1991
|
+
"tenant_id": {
|
|
1992
|
+
"type": "UUID",
|
|
1993
|
+
"referenceKind": "tenantId",
|
|
1994
|
+
"notNull": true,
|
|
1995
|
+
"unique": false
|
|
1996
|
+
},
|
|
1997
|
+
"client_charge_id": {
|
|
1998
|
+
"type": "UUID",
|
|
1999
|
+
"referenceKind": "foreignKey",
|
|
2000
|
+
"notNull": false,
|
|
2001
|
+
"unique": false
|
|
2002
|
+
},
|
|
2003
|
+
"amount": {
|
|
2004
|
+
"type": "REAL",
|
|
2005
|
+
"notNull": false,
|
|
2006
|
+
"unique": false,
|
|
2007
|
+
"default": 0
|
|
2008
|
+
},
|
|
2009
|
+
"currency": {
|
|
2010
|
+
"type": "TEXT",
|
|
2011
|
+
"notNull": false,
|
|
2012
|
+
"unique": false,
|
|
2013
|
+
"default": "USD"
|
|
2014
|
+
},
|
|
2015
|
+
"reason": {
|
|
2016
|
+
"type": "TEXT",
|
|
2017
|
+
"notNull": false,
|
|
2018
|
+
"unique": false,
|
|
2019
|
+
"default": ""
|
|
2020
|
+
},
|
|
2021
|
+
"source": {
|
|
2022
|
+
"type": "TEXT",
|
|
2023
|
+
"notNull": false,
|
|
2024
|
+
"unique": false,
|
|
2025
|
+
"default": ""
|
|
2026
|
+
},
|
|
2027
|
+
"source_id": {
|
|
2028
|
+
"type": "TEXT",
|
|
2029
|
+
"notNull": false,
|
|
2030
|
+
"unique": false,
|
|
2031
|
+
"default": ""
|
|
2032
|
+
},
|
|
2033
|
+
"created_by": {
|
|
2034
|
+
"type": "TEXT",
|
|
2035
|
+
"notNull": false,
|
|
2036
|
+
"unique": false,
|
|
2037
|
+
"default": ""
|
|
2038
|
+
}
|
|
2039
|
+
},
|
|
2040
|
+
"indexes": [
|
|
2041
|
+
{
|
|
2042
|
+
"name": "_smrt_billing_adjustments_id_idx",
|
|
2043
|
+
"columns": [
|
|
2044
|
+
"id"
|
|
2045
|
+
]
|
|
2046
|
+
},
|
|
2047
|
+
{
|
|
2048
|
+
"name": "_smrt_billing_adjustments_slug_context_idx",
|
|
2049
|
+
"columns": [
|
|
2050
|
+
"slug",
|
|
2051
|
+
"context"
|
|
2052
|
+
],
|
|
2053
|
+
"unique": true
|
|
2054
|
+
}
|
|
2055
|
+
],
|
|
2056
|
+
"version": "fefa2538"
|
|
2057
|
+
}
|
|
2058
|
+
},
|
|
2059
|
+
"@happyvertical/smrt-subscriptions:SpendingPolicy": {
|
|
2060
|
+
"name": "spendingpolicy",
|
|
2061
|
+
"className": "SpendingPolicy",
|
|
2062
|
+
"qualifiedName": "@happyvertical/smrt-subscriptions:SpendingPolicy",
|
|
2063
|
+
"collection": "spendingpolicies",
|
|
2064
|
+
"filePath": "/home/runner/.local/share/pnpm/store/.workspaces/arc-happyvertical-node-phdrb-runner-w6dtf/smrt/smrt/packages/subscriptions/src/models/commercial.ts",
|
|
2065
|
+
"packageName": "@happyvertical/smrt-subscriptions",
|
|
2066
|
+
"fields": {
|
|
2067
|
+
"tenantId": {
|
|
2068
|
+
"type": "text",
|
|
2069
|
+
"required": true,
|
|
2070
|
+
"_meta": {
|
|
2071
|
+
"sqlType": "UUID",
|
|
2072
|
+
"__tenancy": {
|
|
2073
|
+
"isTenantIdField": true,
|
|
2074
|
+
"autoFilter": true,
|
|
2075
|
+
"required": true,
|
|
2076
|
+
"autoPopulate": true,
|
|
2077
|
+
"nullable": false,
|
|
2078
|
+
"mode": "required",
|
|
2079
|
+
"field": "tenantId",
|
|
2080
|
+
"allowSuperAdminBypass": false
|
|
2081
|
+
}
|
|
2082
|
+
}
|
|
2083
|
+
},
|
|
2084
|
+
"name": {
|
|
2085
|
+
"type": "text",
|
|
2086
|
+
"required": false,
|
|
2087
|
+
"default": ""
|
|
2088
|
+
},
|
|
2089
|
+
"subscriberKind": {
|
|
2090
|
+
"type": "text",
|
|
2091
|
+
"required": false,
|
|
2092
|
+
"default": ""
|
|
2093
|
+
},
|
|
2094
|
+
"subscriberExternalId": {
|
|
2095
|
+
"type": "text",
|
|
2096
|
+
"required": false,
|
|
2097
|
+
"default": ""
|
|
2098
|
+
},
|
|
2099
|
+
"projectId": {
|
|
2100
|
+
"type": "text",
|
|
2101
|
+
"required": false,
|
|
2102
|
+
"default": ""
|
|
2103
|
+
},
|
|
2104
|
+
"serviceKey": {
|
|
2105
|
+
"type": "text",
|
|
2106
|
+
"required": false,
|
|
2107
|
+
"default": ""
|
|
2108
|
+
},
|
|
2109
|
+
"metricKey": {
|
|
2110
|
+
"type": "text",
|
|
2111
|
+
"required": false,
|
|
2112
|
+
"default": ""
|
|
2113
|
+
},
|
|
2114
|
+
"period": {
|
|
2115
|
+
"type": "text",
|
|
2116
|
+
"required": false,
|
|
2117
|
+
"default": "month"
|
|
2118
|
+
},
|
|
2119
|
+
"rollingSeconds": {
|
|
2120
|
+
"type": "integer",
|
|
2121
|
+
"required": false,
|
|
2122
|
+
"default": 0
|
|
2123
|
+
},
|
|
2124
|
+
"limitAmount": {
|
|
2125
|
+
"type": "decimal",
|
|
2126
|
+
"required": false,
|
|
2127
|
+
"default": 0
|
|
2128
|
+
},
|
|
2129
|
+
"currency": {
|
|
2130
|
+
"type": "text",
|
|
2131
|
+
"required": false,
|
|
2132
|
+
"default": "USD"
|
|
2133
|
+
},
|
|
2134
|
+
"behavior": {
|
|
2135
|
+
"type": "text",
|
|
2136
|
+
"required": false,
|
|
2137
|
+
"default": "observe"
|
|
2138
|
+
},
|
|
2139
|
+
"priority": {
|
|
2140
|
+
"type": "integer",
|
|
2141
|
+
"required": false,
|
|
2142
|
+
"default": 0
|
|
2143
|
+
},
|
|
2144
|
+
"active": {
|
|
2145
|
+
"type": "boolean",
|
|
2146
|
+
"required": false,
|
|
2147
|
+
"default": true
|
|
2148
|
+
}
|
|
2149
|
+
},
|
|
2150
|
+
"methods": {},
|
|
2151
|
+
"decoratorConfig": {
|
|
2152
|
+
"tableName": "_smrt_spending_policies",
|
|
2153
|
+
"conflictColumns": [
|
|
2154
|
+
"tenant_id",
|
|
2155
|
+
"subscriber_kind",
|
|
2156
|
+
"subscriber_external_id",
|
|
2157
|
+
"project_id",
|
|
2158
|
+
"service_key",
|
|
2159
|
+
"metric_key",
|
|
2160
|
+
"period",
|
|
2161
|
+
"name"
|
|
2162
|
+
],
|
|
2163
|
+
"api": true,
|
|
2164
|
+
"cli": true,
|
|
2165
|
+
"mcp": true,
|
|
2166
|
+
"tenantScoped": {
|
|
2167
|
+
"mode": "required"
|
|
2168
|
+
}
|
|
2169
|
+
},
|
|
2170
|
+
"extends": "SmrtObject",
|
|
2171
|
+
"exportName": "SpendingPolicy",
|
|
2172
|
+
"collectionExportName": "SpendingPolicyCollection",
|
|
2173
|
+
"validationRules": [
|
|
2174
|
+
{
|
|
2175
|
+
"field": "tenantId",
|
|
2176
|
+
"rule": "required",
|
|
2177
|
+
"fieldType": "text"
|
|
2178
|
+
}
|
|
2179
|
+
],
|
|
2180
|
+
"schema": {
|
|
2181
|
+
"tableName": "_smrt_spending_policies",
|
|
2182
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_spending_policies\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"name\" TEXT DEFAULT '',\n \"subscriber_kind\" TEXT DEFAULT '',\n \"subscriber_external_id\" TEXT DEFAULT '',\n \"project_id\" TEXT DEFAULT '',\n \"service_key\" TEXT DEFAULT '',\n \"metric_key\" TEXT DEFAULT '',\n \"period\" TEXT DEFAULT 'month',\n \"rolling_seconds\" INTEGER DEFAULT 0,\n \"limit_amount\" REAL DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"behavior\" TEXT DEFAULT 'observe',\n \"priority\" INTEGER DEFAULT 0,\n \"active\" BOOLEAN DEFAULT TRUE\n);",
|
|
2183
|
+
"columns": {
|
|
2184
|
+
"id": {
|
|
2185
|
+
"type": "UUID",
|
|
2186
|
+
"primaryKey": true,
|
|
2187
|
+
"referenceKind": "id",
|
|
2188
|
+
"notNull": true
|
|
2189
|
+
},
|
|
2190
|
+
"slug": {
|
|
2191
|
+
"type": "TEXT",
|
|
2192
|
+
"notNull": true
|
|
2193
|
+
},
|
|
2194
|
+
"context": {
|
|
2195
|
+
"type": "TEXT",
|
|
2196
|
+
"notNull": true,
|
|
2197
|
+
"default": ""
|
|
2198
|
+
},
|
|
2199
|
+
"created_at": {
|
|
2200
|
+
"type": "TIMESTAMP",
|
|
2201
|
+
"notNull": true,
|
|
2202
|
+
"default": "current_timestamp"
|
|
2203
|
+
},
|
|
2204
|
+
"updated_at": {
|
|
2205
|
+
"type": "TIMESTAMP",
|
|
2206
|
+
"notNull": true,
|
|
2207
|
+
"default": "current_timestamp"
|
|
2208
|
+
},
|
|
2209
|
+
"tenant_id": {
|
|
2210
|
+
"type": "UUID",
|
|
2211
|
+
"referenceKind": "tenantId",
|
|
2212
|
+
"notNull": true,
|
|
2213
|
+
"unique": false
|
|
2214
|
+
},
|
|
2215
|
+
"name": {
|
|
2216
|
+
"type": "TEXT",
|
|
2217
|
+
"notNull": false,
|
|
2218
|
+
"unique": false,
|
|
2219
|
+
"default": ""
|
|
2220
|
+
},
|
|
2221
|
+
"subscriber_kind": {
|
|
2222
|
+
"type": "TEXT",
|
|
2223
|
+
"notNull": false,
|
|
2224
|
+
"unique": false,
|
|
2225
|
+
"default": ""
|
|
2226
|
+
},
|
|
2227
|
+
"subscriber_external_id": {
|
|
2228
|
+
"type": "TEXT",
|
|
2229
|
+
"notNull": false,
|
|
2230
|
+
"unique": false,
|
|
2231
|
+
"default": ""
|
|
2232
|
+
},
|
|
2233
|
+
"project_id": {
|
|
2234
|
+
"type": "TEXT",
|
|
2235
|
+
"notNull": false,
|
|
2236
|
+
"unique": false,
|
|
2237
|
+
"default": ""
|
|
2238
|
+
},
|
|
2239
|
+
"service_key": {
|
|
2240
|
+
"type": "TEXT",
|
|
2241
|
+
"notNull": false,
|
|
2242
|
+
"unique": false,
|
|
2243
|
+
"default": ""
|
|
2244
|
+
},
|
|
2245
|
+
"metric_key": {
|
|
2246
|
+
"type": "TEXT",
|
|
2247
|
+
"notNull": false,
|
|
2248
|
+
"unique": false,
|
|
2249
|
+
"default": ""
|
|
2250
|
+
},
|
|
2251
|
+
"period": {
|
|
2252
|
+
"type": "TEXT",
|
|
2253
|
+
"notNull": false,
|
|
2254
|
+
"unique": false,
|
|
2255
|
+
"default": "month"
|
|
2256
|
+
},
|
|
2257
|
+
"rolling_seconds": {
|
|
2258
|
+
"type": "INTEGER",
|
|
2259
|
+
"notNull": false,
|
|
2260
|
+
"unique": false,
|
|
2261
|
+
"default": 0
|
|
2262
|
+
},
|
|
2263
|
+
"limit_amount": {
|
|
2264
|
+
"type": "REAL",
|
|
2265
|
+
"notNull": false,
|
|
2266
|
+
"unique": false,
|
|
2267
|
+
"default": 0
|
|
2268
|
+
},
|
|
2269
|
+
"currency": {
|
|
2270
|
+
"type": "TEXT",
|
|
2271
|
+
"notNull": false,
|
|
2272
|
+
"unique": false,
|
|
2273
|
+
"default": "USD"
|
|
2274
|
+
},
|
|
2275
|
+
"behavior": {
|
|
2276
|
+
"type": "TEXT",
|
|
2277
|
+
"notNull": false,
|
|
2278
|
+
"unique": false,
|
|
2279
|
+
"default": "observe"
|
|
2280
|
+
},
|
|
2281
|
+
"priority": {
|
|
2282
|
+
"type": "INTEGER",
|
|
2283
|
+
"notNull": false,
|
|
2284
|
+
"unique": false,
|
|
2285
|
+
"default": 0
|
|
2286
|
+
},
|
|
2287
|
+
"active": {
|
|
2288
|
+
"type": "BOOLEAN",
|
|
2289
|
+
"notNull": false,
|
|
2290
|
+
"unique": false,
|
|
2291
|
+
"default": true
|
|
2292
|
+
}
|
|
2293
|
+
},
|
|
2294
|
+
"indexes": [
|
|
2295
|
+
{
|
|
2296
|
+
"name": "_smrt_spending_policies_id_idx",
|
|
2297
|
+
"columns": [
|
|
2298
|
+
"id"
|
|
2299
|
+
]
|
|
2300
|
+
},
|
|
2301
|
+
{
|
|
2302
|
+
"name": "_smrt_spending_policies_tenant_id_subscriber_kind_idx",
|
|
2303
|
+
"columns": [
|
|
2304
|
+
"tenant_id",
|
|
2305
|
+
"subscriber_kind",
|
|
2306
|
+
"subscriber_external_id",
|
|
2307
|
+
"project_id",
|
|
2308
|
+
"service_key",
|
|
2309
|
+
"metric_key",
|
|
2310
|
+
"period",
|
|
2311
|
+
"name"
|
|
2312
|
+
],
|
|
2313
|
+
"unique": true
|
|
2314
|
+
}
|
|
2315
|
+
],
|
|
2316
|
+
"version": "af20dc21"
|
|
2317
|
+
}
|
|
2318
|
+
},
|
|
2319
|
+
"@happyvertical/smrt-subscriptions:PricingRuleCollection": {
|
|
2320
|
+
"name": "pricingrulecollection",
|
|
2321
|
+
"className": "PricingRuleCollection",
|
|
2322
|
+
"qualifiedName": "@happyvertical/smrt-subscriptions:PricingRuleCollection",
|
|
2323
|
+
"collection": "pricingrules",
|
|
2324
|
+
"filePath": "/home/runner/.local/share/pnpm/store/.workspaces/arc-happyvertical-node-phdrb-runner-w6dtf/smrt/smrt/packages/subscriptions/src/models/commercial.ts",
|
|
2325
|
+
"packageName": "@happyvertical/smrt-subscriptions",
|
|
2326
|
+
"fields": {},
|
|
2327
|
+
"methods": {},
|
|
2328
|
+
"decoratorConfig": {
|
|
2329
|
+
"tableName": "_smrt_pricing_rules"
|
|
2330
|
+
},
|
|
2331
|
+
"extends": "SmrtCollection",
|
|
2332
|
+
"extendsTypeArg": "PricingRule",
|
|
2333
|
+
"exportName": "PricingRuleCollection",
|
|
2334
|
+
"collectionExportName": "PricingRuleCollectionCollection",
|
|
2335
|
+
"schema": {
|
|
2336
|
+
"tableName": "_smrt_pricing_rules",
|
|
2337
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_pricing_rules\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
|
|
2338
|
+
"columns": {
|
|
2339
|
+
"id": {
|
|
2340
|
+
"type": "UUID",
|
|
2341
|
+
"primaryKey": true,
|
|
2342
|
+
"referenceKind": "id",
|
|
2343
|
+
"notNull": true
|
|
2344
|
+
},
|
|
2345
|
+
"slug": {
|
|
2346
|
+
"type": "TEXT",
|
|
2347
|
+
"notNull": true
|
|
2348
|
+
},
|
|
2349
|
+
"context": {
|
|
2350
|
+
"type": "TEXT",
|
|
2351
|
+
"notNull": true,
|
|
2352
|
+
"default": ""
|
|
2353
|
+
},
|
|
2354
|
+
"created_at": {
|
|
2355
|
+
"type": "TIMESTAMP",
|
|
2356
|
+
"notNull": true,
|
|
2357
|
+
"default": "current_timestamp"
|
|
2358
|
+
},
|
|
2359
|
+
"updated_at": {
|
|
2360
|
+
"type": "TIMESTAMP",
|
|
2361
|
+
"notNull": true,
|
|
2362
|
+
"default": "current_timestamp"
|
|
2363
|
+
}
|
|
2364
|
+
},
|
|
2365
|
+
"indexes": [
|
|
2366
|
+
{
|
|
2367
|
+
"name": "_smrt_pricing_rules_id_idx",
|
|
2368
|
+
"columns": [
|
|
2369
|
+
"id"
|
|
2370
|
+
]
|
|
2371
|
+
},
|
|
2372
|
+
{
|
|
2373
|
+
"name": "_smrt_pricing_rules_slug_context_idx",
|
|
2374
|
+
"columns": [
|
|
2375
|
+
"slug",
|
|
2376
|
+
"context"
|
|
2377
|
+
],
|
|
2378
|
+
"unique": true
|
|
2379
|
+
}
|
|
2380
|
+
],
|
|
2381
|
+
"version": "3fb55a6a"
|
|
2382
|
+
}
|
|
2383
|
+
},
|
|
2384
|
+
"@happyvertical/smrt-subscriptions:ClientChargeCollection": {
|
|
2385
|
+
"name": "clientchargecollection",
|
|
2386
|
+
"className": "ClientChargeCollection",
|
|
2387
|
+
"qualifiedName": "@happyvertical/smrt-subscriptions:ClientChargeCollection",
|
|
2388
|
+
"collection": "clientcharges",
|
|
2389
|
+
"filePath": "/home/runner/.local/share/pnpm/store/.workspaces/arc-happyvertical-node-phdrb-runner-w6dtf/smrt/smrt/packages/subscriptions/src/models/commercial.ts",
|
|
2390
|
+
"packageName": "@happyvertical/smrt-subscriptions",
|
|
2391
|
+
"fields": {},
|
|
2392
|
+
"methods": {},
|
|
2393
|
+
"decoratorConfig": {
|
|
2394
|
+
"tableName": "_smrt_client_charges"
|
|
2395
|
+
},
|
|
2396
|
+
"extends": "SmrtCollection",
|
|
2397
|
+
"extendsTypeArg": "ClientCharge",
|
|
2398
|
+
"exportName": "ClientChargeCollection",
|
|
2399
|
+
"collectionExportName": "ClientChargeCollectionCollection",
|
|
2400
|
+
"schema": {
|
|
2401
|
+
"tableName": "_smrt_client_charges",
|
|
2402
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_client_charges\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
|
|
2403
|
+
"columns": {
|
|
2404
|
+
"id": {
|
|
2405
|
+
"type": "UUID",
|
|
2406
|
+
"primaryKey": true,
|
|
2407
|
+
"referenceKind": "id",
|
|
2408
|
+
"notNull": true
|
|
2409
|
+
},
|
|
2410
|
+
"slug": {
|
|
2411
|
+
"type": "TEXT",
|
|
2412
|
+
"notNull": true
|
|
2413
|
+
},
|
|
2414
|
+
"context": {
|
|
2415
|
+
"type": "TEXT",
|
|
2416
|
+
"notNull": true,
|
|
2417
|
+
"default": ""
|
|
2418
|
+
},
|
|
2419
|
+
"created_at": {
|
|
2420
|
+
"type": "TIMESTAMP",
|
|
2421
|
+
"notNull": true,
|
|
2422
|
+
"default": "current_timestamp"
|
|
2423
|
+
},
|
|
2424
|
+
"updated_at": {
|
|
2425
|
+
"type": "TIMESTAMP",
|
|
2426
|
+
"notNull": true,
|
|
2427
|
+
"default": "current_timestamp"
|
|
2428
|
+
}
|
|
2429
|
+
},
|
|
2430
|
+
"indexes": [
|
|
2431
|
+
{
|
|
2432
|
+
"name": "_smrt_client_charges_id_idx",
|
|
2433
|
+
"columns": [
|
|
2434
|
+
"id"
|
|
2435
|
+
]
|
|
2436
|
+
},
|
|
2437
|
+
{
|
|
2438
|
+
"name": "_smrt_client_charges_slug_context_idx",
|
|
2439
|
+
"columns": [
|
|
2440
|
+
"slug",
|
|
2441
|
+
"context"
|
|
2442
|
+
],
|
|
2443
|
+
"unique": true
|
|
2444
|
+
}
|
|
2445
|
+
],
|
|
2446
|
+
"version": "96756a5d"
|
|
2447
|
+
}
|
|
2448
|
+
},
|
|
2449
|
+
"@happyvertical/smrt-subscriptions:BillingAdjustmentCollection": {
|
|
2450
|
+
"name": "billingadjustmentcollection",
|
|
2451
|
+
"className": "BillingAdjustmentCollection",
|
|
2452
|
+
"qualifiedName": "@happyvertical/smrt-subscriptions:BillingAdjustmentCollection",
|
|
2453
|
+
"collection": "billingadjustments",
|
|
2454
|
+
"filePath": "/home/runner/.local/share/pnpm/store/.workspaces/arc-happyvertical-node-phdrb-runner-w6dtf/smrt/smrt/packages/subscriptions/src/models/commercial.ts",
|
|
2455
|
+
"packageName": "@happyvertical/smrt-subscriptions",
|
|
2456
|
+
"fields": {},
|
|
2457
|
+
"methods": {},
|
|
2458
|
+
"decoratorConfig": {
|
|
2459
|
+
"tableName": "_smrt_billing_adjustments"
|
|
2460
|
+
},
|
|
2461
|
+
"extends": "SmrtCollection",
|
|
2462
|
+
"extendsTypeArg": "BillingAdjustment",
|
|
2463
|
+
"exportName": "BillingAdjustmentCollection",
|
|
2464
|
+
"collectionExportName": "BillingAdjustmentCollectionCollection",
|
|
2465
|
+
"schema": {
|
|
2466
|
+
"tableName": "_smrt_billing_adjustments",
|
|
2467
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_billing_adjustments\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
|
|
2468
|
+
"columns": {
|
|
2469
|
+
"id": {
|
|
2470
|
+
"type": "UUID",
|
|
2471
|
+
"primaryKey": true,
|
|
2472
|
+
"referenceKind": "id",
|
|
2473
|
+
"notNull": true
|
|
2474
|
+
},
|
|
2475
|
+
"slug": {
|
|
2476
|
+
"type": "TEXT",
|
|
2477
|
+
"notNull": true
|
|
2478
|
+
},
|
|
2479
|
+
"context": {
|
|
2480
|
+
"type": "TEXT",
|
|
2481
|
+
"notNull": true,
|
|
2482
|
+
"default": ""
|
|
2483
|
+
},
|
|
2484
|
+
"created_at": {
|
|
2485
|
+
"type": "TIMESTAMP",
|
|
2486
|
+
"notNull": true,
|
|
2487
|
+
"default": "current_timestamp"
|
|
2488
|
+
},
|
|
2489
|
+
"updated_at": {
|
|
2490
|
+
"type": "TIMESTAMP",
|
|
2491
|
+
"notNull": true,
|
|
2492
|
+
"default": "current_timestamp"
|
|
2493
|
+
}
|
|
2494
|
+
},
|
|
2495
|
+
"indexes": [
|
|
2496
|
+
{
|
|
2497
|
+
"name": "_smrt_billing_adjustments_id_idx",
|
|
2498
|
+
"columns": [
|
|
2499
|
+
"id"
|
|
2500
|
+
]
|
|
2501
|
+
},
|
|
2502
|
+
{
|
|
2503
|
+
"name": "_smrt_billing_adjustments_slug_context_idx",
|
|
2504
|
+
"columns": [
|
|
2505
|
+
"slug",
|
|
2506
|
+
"context"
|
|
2507
|
+
],
|
|
2508
|
+
"unique": true
|
|
2509
|
+
}
|
|
2510
|
+
],
|
|
2511
|
+
"version": "5ca89c74"
|
|
2512
|
+
}
|
|
2513
|
+
},
|
|
2514
|
+
"@happyvertical/smrt-subscriptions:SpendingPolicyCollection": {
|
|
2515
|
+
"name": "spendingpolicycollection",
|
|
2516
|
+
"className": "SpendingPolicyCollection",
|
|
2517
|
+
"qualifiedName": "@happyvertical/smrt-subscriptions:SpendingPolicyCollection",
|
|
2518
|
+
"collection": "spendingpolicies",
|
|
2519
|
+
"filePath": "/home/runner/.local/share/pnpm/store/.workspaces/arc-happyvertical-node-phdrb-runner-w6dtf/smrt/smrt/packages/subscriptions/src/models/commercial.ts",
|
|
2520
|
+
"packageName": "@happyvertical/smrt-subscriptions",
|
|
2521
|
+
"fields": {},
|
|
2522
|
+
"methods": {},
|
|
2523
|
+
"decoratorConfig": {
|
|
2524
|
+
"tableName": "_smrt_spending_policies"
|
|
2525
|
+
},
|
|
2526
|
+
"extends": "SmrtCollection",
|
|
2527
|
+
"extendsTypeArg": "SpendingPolicy",
|
|
2528
|
+
"exportName": "SpendingPolicyCollection",
|
|
2529
|
+
"collectionExportName": "SpendingPolicyCollectionCollection",
|
|
2530
|
+
"schema": {
|
|
2531
|
+
"tableName": "_smrt_spending_policies",
|
|
2532
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_spending_policies\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
|
|
2533
|
+
"columns": {
|
|
2534
|
+
"id": {
|
|
2535
|
+
"type": "UUID",
|
|
2536
|
+
"primaryKey": true,
|
|
2537
|
+
"referenceKind": "id",
|
|
2538
|
+
"notNull": true
|
|
2539
|
+
},
|
|
2540
|
+
"slug": {
|
|
2541
|
+
"type": "TEXT",
|
|
2542
|
+
"notNull": true
|
|
2543
|
+
},
|
|
2544
|
+
"context": {
|
|
2545
|
+
"type": "TEXT",
|
|
2546
|
+
"notNull": true,
|
|
2547
|
+
"default": ""
|
|
2548
|
+
},
|
|
2549
|
+
"created_at": {
|
|
2550
|
+
"type": "TIMESTAMP",
|
|
2551
|
+
"notNull": true,
|
|
2552
|
+
"default": "current_timestamp"
|
|
2553
|
+
},
|
|
2554
|
+
"updated_at": {
|
|
2555
|
+
"type": "TIMESTAMP",
|
|
2556
|
+
"notNull": true,
|
|
2557
|
+
"default": "current_timestamp"
|
|
2558
|
+
}
|
|
2559
|
+
},
|
|
2560
|
+
"indexes": [
|
|
2561
|
+
{
|
|
2562
|
+
"name": "_smrt_spending_policies_id_idx",
|
|
2563
|
+
"columns": [
|
|
2564
|
+
"id"
|
|
2565
|
+
]
|
|
2566
|
+
},
|
|
2567
|
+
{
|
|
2568
|
+
"name": "_smrt_spending_policies_slug_context_idx",
|
|
2569
|
+
"columns": [
|
|
2570
|
+
"slug",
|
|
2571
|
+
"context"
|
|
2572
|
+
],
|
|
2573
|
+
"unique": true
|
|
2574
|
+
}
|
|
2575
|
+
],
|
|
2576
|
+
"version": "4f25df0f"
|
|
1283
2577
|
}
|
|
1284
2578
|
}
|
|
1285
2579
|
},
|