@happyvertical/smrt-subscriptions 0.60.9 → 0.60.10
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/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +193 -49
- package/dist/smrt-knowledge.json +3 -3
- package/dist/smrt-knowledge.okf.md +108 -0
- package/package.json +6 -6
package/dist/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"version": "1.0.0",
|
|
3
3
|
"timestamp": 0,
|
|
4
4
|
"packageName": "@happyvertical/smrt-subscriptions",
|
|
5
|
-
"packageVersion": "0.60.
|
|
5
|
+
"packageVersion": "0.60.10",
|
|
6
6
|
"objects": {
|
|
7
7
|
"@happyvertical/smrt-subscriptions:SubscriptionPlanCollection": {
|
|
8
8
|
"name": "subscriptionplancollection",
|
|
@@ -105,8 +105,14 @@
|
|
|
105
105
|
],
|
|
106
106
|
"schema": {
|
|
107
107
|
"tableName": "_smrt_subscription_plans",
|
|
108
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_subscription_plans\" (\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,\n \"plan_key\" TEXT DEFAULT '',\n \"name\" TEXT DEFAULT '',\n \"description\" TEXT DEFAULT '',\n \"status\" TEXT DEFAULT 'active',\n \"sort_order\" INTEGER DEFAULT 0,\n \"price_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"billing_interval\" TEXT DEFAULT 'month',\n \"pricing_mode\" TEXT DEFAULT 'fixed',\n \"minimum_amount\" INTEGER DEFAULT 0,\n \"suggested_amount\" INTEGER DEFAULT 0,\n \"external_provider\" TEXT,\n \"provider_product_id\" TEXT,\n \"provider_price_id\" TEXT,\n \"stripe_product_id\" TEXT,\n \"stripe_price_id\" TEXT,\n \"features\" TEXT DEFAULT '[]',\n \"thresholds\" TEXT DEFAULT '[]',\n \"metadata\" TEXT DEFAULT '{}'\n);",
|
|
108
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_subscription_plans\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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,\n \"plan_key\" TEXT DEFAULT '',\n \"name\" TEXT DEFAULT '',\n \"description\" TEXT DEFAULT '',\n \"status\" TEXT DEFAULT 'active',\n \"sort_order\" INTEGER DEFAULT 0,\n \"price_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"billing_interval\" TEXT DEFAULT 'month',\n \"pricing_mode\" TEXT DEFAULT 'fixed',\n \"minimum_amount\" INTEGER DEFAULT 0,\n \"suggested_amount\" INTEGER DEFAULT 0,\n \"external_provider\" TEXT,\n \"provider_product_id\" TEXT,\n \"provider_price_id\" TEXT,\n \"stripe_product_id\" TEXT,\n \"stripe_price_id\" TEXT,\n \"features\" TEXT DEFAULT '[]',\n \"thresholds\" TEXT DEFAULT '[]',\n \"metadata\" TEXT DEFAULT '{}'\n);",
|
|
109
109
|
"columns": {
|
|
110
|
+
"_sync_origin_device_id": {
|
|
111
|
+
"type": "TEXT"
|
|
112
|
+
},
|
|
113
|
+
"_sync_revision": {
|
|
114
|
+
"type": "INTEGER"
|
|
115
|
+
},
|
|
110
116
|
"id": {
|
|
111
117
|
"type": "UUID",
|
|
112
118
|
"primaryKey": true,
|
|
@@ -273,7 +279,7 @@
|
|
|
273
279
|
]
|
|
274
280
|
}
|
|
275
281
|
],
|
|
276
|
-
"version": "
|
|
282
|
+
"version": "458e59be"
|
|
277
283
|
},
|
|
278
284
|
"importPath": "@happyvertical/smrt-subscriptions"
|
|
279
285
|
},
|
|
@@ -395,8 +401,14 @@
|
|
|
395
401
|
],
|
|
396
402
|
"schema": {
|
|
397
403
|
"tableName": "_smrt_subscription_plan_versions",
|
|
398
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_subscription_plan_versions\" (\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,\n \"plan_id\" UUID,\n \"plan_key\" TEXT DEFAULT '',\n \"version\" INTEGER DEFAULT 0,\n \"effective_from\" TIMESTAMP,\n \"name\" TEXT DEFAULT '',\n \"status\" TEXT DEFAULT 'active',\n \"price_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"billing_interval\" TEXT DEFAULT 'month',\n \"pricing_mode\" TEXT DEFAULT 'fixed',\n \"minimum_amount\" INTEGER DEFAULT 0,\n \"suggested_amount\" INTEGER DEFAULT 0,\n \"features\" TEXT DEFAULT '[]',\n \"thresholds\" TEXT DEFAULT '[]'\n);",
|
|
404
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_subscription_plan_versions\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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,\n \"plan_id\" UUID,\n \"plan_key\" TEXT DEFAULT '',\n \"version\" INTEGER DEFAULT 0,\n \"effective_from\" TIMESTAMP,\n \"name\" TEXT DEFAULT '',\n \"status\" TEXT DEFAULT 'active',\n \"price_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"billing_interval\" TEXT DEFAULT 'month',\n \"pricing_mode\" TEXT DEFAULT 'fixed',\n \"minimum_amount\" INTEGER DEFAULT 0,\n \"suggested_amount\" INTEGER DEFAULT 0,\n \"features\" TEXT DEFAULT '[]',\n \"thresholds\" TEXT DEFAULT '[]'\n);",
|
|
399
405
|
"columns": {
|
|
406
|
+
"_sync_origin_device_id": {
|
|
407
|
+
"type": "TEXT"
|
|
408
|
+
},
|
|
409
|
+
"_sync_revision": {
|
|
410
|
+
"type": "INTEGER"
|
|
411
|
+
},
|
|
400
412
|
"id": {
|
|
401
413
|
"type": "UUID",
|
|
402
414
|
"primaryKey": true,
|
|
@@ -543,7 +555,7 @@
|
|
|
543
555
|
]
|
|
544
556
|
}
|
|
545
557
|
],
|
|
546
|
-
"version": "
|
|
558
|
+
"version": "f42156f9"
|
|
547
559
|
},
|
|
548
560
|
"importPath": "@happyvertical/smrt-subscriptions"
|
|
549
561
|
},
|
|
@@ -651,8 +663,14 @@
|
|
|
651
663
|
],
|
|
652
664
|
"schema": {
|
|
653
665
|
"tableName": "_smrt_tenant_subscriptions",
|
|
654
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_tenant_subscriptions\" (\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 \"plan_id\" UUID,\n \"status\" TEXT DEFAULT 'incomplete',\n \"started_at\" TIMESTAMP,\n \"current_period_start\" TIMESTAMP,\n \"current_period_end\" TIMESTAMP,\n \"trial_ends_at\" TIMESTAMP,\n \"cancel_at_period_end\" BOOLEAN DEFAULT FALSE,\n \"canceled_at\" TIMESTAMP,\n \"agreed_amount\" INTEGER,\n \"plan_version_id\" UUID,\n \"plan_version_pinned_at\" TIMESTAMP,\n \"plan_version_pin_reason\" TEXT,\n \"plan_version_pin_note\" TEXT DEFAULT '',\n \"retains_paid_period\" BOOLEAN DEFAULT FALSE,\n \"external_provider\" TEXT,\n \"stripe_customer_id\" TEXT DEFAULT '',\n \"stripe_subscription_id\" TEXT DEFAULT '',\n \"stripe_checkout_session_id\" TEXT DEFAULT '',\n \"metadata\" TEXT DEFAULT '{}'\n);",
|
|
666
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_tenant_subscriptions\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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 \"plan_id\" UUID,\n \"status\" TEXT DEFAULT 'incomplete',\n \"started_at\" TIMESTAMP,\n \"current_period_start\" TIMESTAMP,\n \"current_period_end\" TIMESTAMP,\n \"trial_ends_at\" TIMESTAMP,\n \"cancel_at_period_end\" BOOLEAN DEFAULT FALSE,\n \"canceled_at\" TIMESTAMP,\n \"agreed_amount\" INTEGER,\n \"plan_version_id\" UUID,\n \"plan_version_pinned_at\" TIMESTAMP,\n \"plan_version_pin_reason\" TEXT,\n \"plan_version_pin_note\" TEXT DEFAULT '',\n \"retains_paid_period\" BOOLEAN DEFAULT FALSE,\n \"external_provider\" TEXT,\n \"stripe_customer_id\" TEXT DEFAULT '',\n \"stripe_subscription_id\" TEXT DEFAULT '',\n \"stripe_checkout_session_id\" TEXT DEFAULT '',\n \"metadata\" TEXT DEFAULT '{}'\n);",
|
|
655
667
|
"columns": {
|
|
668
|
+
"_sync_origin_device_id": {
|
|
669
|
+
"type": "TEXT"
|
|
670
|
+
},
|
|
671
|
+
"_sync_revision": {
|
|
672
|
+
"type": "INTEGER"
|
|
673
|
+
},
|
|
656
674
|
"id": {
|
|
657
675
|
"type": "UUID",
|
|
658
676
|
"primaryKey": true,
|
|
@@ -852,7 +870,7 @@
|
|
|
852
870
|
]
|
|
853
871
|
}
|
|
854
872
|
],
|
|
855
|
-
"version": "
|
|
873
|
+
"version": "c281741d"
|
|
856
874
|
},
|
|
857
875
|
"importPath": "@happyvertical/smrt-subscriptions"
|
|
858
876
|
},
|
|
@@ -976,8 +994,14 @@
|
|
|
976
994
|
],
|
|
977
995
|
"schema": {
|
|
978
996
|
"tableName": "_smrt_tenant_usage_metrics",
|
|
979
|
-
"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);",
|
|
997
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_tenant_usage_metrics\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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);",
|
|
980
998
|
"columns": {
|
|
999
|
+
"_sync_origin_device_id": {
|
|
1000
|
+
"type": "TEXT"
|
|
1001
|
+
},
|
|
1002
|
+
"_sync_revision": {
|
|
1003
|
+
"type": "INTEGER"
|
|
1004
|
+
},
|
|
981
1005
|
"id": {
|
|
982
1006
|
"type": "UUID",
|
|
983
1007
|
"primaryKey": true,
|
|
@@ -1104,7 +1128,7 @@
|
|
|
1104
1128
|
]
|
|
1105
1129
|
}
|
|
1106
1130
|
],
|
|
1107
|
-
"version": "
|
|
1131
|
+
"version": "4884a70d"
|
|
1108
1132
|
},
|
|
1109
1133
|
"importPath": "@happyvertical/smrt-subscriptions"
|
|
1110
1134
|
},
|
|
@@ -1455,8 +1479,14 @@
|
|
|
1455
1479
|
"displayLabelField": "name",
|
|
1456
1480
|
"schema": {
|
|
1457
1481
|
"tableName": "_smrt_subscription_plans",
|
|
1458
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_subscription_plans\" (\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,\n \"plan_key\" TEXT DEFAULT '',\n \"name\" TEXT DEFAULT '',\n \"description\" TEXT DEFAULT '',\n \"status\" TEXT DEFAULT 'active',\n \"sort_order\" INTEGER DEFAULT 0,\n \"price_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"billing_interval\" TEXT DEFAULT 'month',\n \"pricing_mode\" TEXT DEFAULT 'fixed',\n \"minimum_amount\" INTEGER DEFAULT 0,\n \"suggested_amount\" INTEGER DEFAULT 0,\n \"external_provider\" TEXT,\n \"provider_product_id\" TEXT,\n \"provider_price_id\" TEXT,\n \"stripe_product_id\" TEXT,\n \"stripe_price_id\" TEXT,\n \"features\" TEXT DEFAULT '[]',\n \"thresholds\" TEXT DEFAULT '[]',\n \"metadata\" TEXT DEFAULT '{}'\n);",
|
|
1482
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_subscription_plans\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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,\n \"plan_key\" TEXT DEFAULT '',\n \"name\" TEXT DEFAULT '',\n \"description\" TEXT DEFAULT '',\n \"status\" TEXT DEFAULT 'active',\n \"sort_order\" INTEGER DEFAULT 0,\n \"price_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"billing_interval\" TEXT DEFAULT 'month',\n \"pricing_mode\" TEXT DEFAULT 'fixed',\n \"minimum_amount\" INTEGER DEFAULT 0,\n \"suggested_amount\" INTEGER DEFAULT 0,\n \"external_provider\" TEXT,\n \"provider_product_id\" TEXT,\n \"provider_price_id\" TEXT,\n \"stripe_product_id\" TEXT,\n \"stripe_price_id\" TEXT,\n \"features\" TEXT DEFAULT '[]',\n \"thresholds\" TEXT DEFAULT '[]',\n \"metadata\" TEXT DEFAULT '{}'\n);",
|
|
1459
1483
|
"columns": {
|
|
1484
|
+
"_sync_origin_device_id": {
|
|
1485
|
+
"type": "TEXT"
|
|
1486
|
+
},
|
|
1487
|
+
"_sync_revision": {
|
|
1488
|
+
"type": "INTEGER"
|
|
1489
|
+
},
|
|
1460
1490
|
"id": {
|
|
1461
1491
|
"type": "UUID",
|
|
1462
1492
|
"primaryKey": true,
|
|
@@ -1623,7 +1653,7 @@
|
|
|
1623
1653
|
]
|
|
1624
1654
|
}
|
|
1625
1655
|
],
|
|
1626
|
-
"version": "
|
|
1656
|
+
"version": "458e59be"
|
|
1627
1657
|
},
|
|
1628
1658
|
"importPath": "@happyvertical/smrt-subscriptions"
|
|
1629
1659
|
},
|
|
@@ -1867,8 +1897,14 @@
|
|
|
1867
1897
|
"displayLabelField": "name",
|
|
1868
1898
|
"schema": {
|
|
1869
1899
|
"tableName": "_smrt_subscription_plan_versions",
|
|
1870
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_subscription_plan_versions\" (\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,\n \"plan_id\" UUID,\n \"plan_key\" TEXT DEFAULT '',\n \"version\" INTEGER DEFAULT 0,\n \"effective_from\" TIMESTAMP,\n \"name\" TEXT DEFAULT '',\n \"status\" TEXT DEFAULT 'active',\n \"price_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"billing_interval\" TEXT DEFAULT 'month',\n \"pricing_mode\" TEXT DEFAULT 'fixed',\n \"minimum_amount\" INTEGER DEFAULT 0,\n \"suggested_amount\" INTEGER DEFAULT 0,\n \"features\" TEXT DEFAULT '[]',\n \"thresholds\" TEXT DEFAULT '[]'\n);",
|
|
1900
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_subscription_plan_versions\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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,\n \"plan_id\" UUID,\n \"plan_key\" TEXT DEFAULT '',\n \"version\" INTEGER DEFAULT 0,\n \"effective_from\" TIMESTAMP,\n \"name\" TEXT DEFAULT '',\n \"status\" TEXT DEFAULT 'active',\n \"price_amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"billing_interval\" TEXT DEFAULT 'month',\n \"pricing_mode\" TEXT DEFAULT 'fixed',\n \"minimum_amount\" INTEGER DEFAULT 0,\n \"suggested_amount\" INTEGER DEFAULT 0,\n \"features\" TEXT DEFAULT '[]',\n \"thresholds\" TEXT DEFAULT '[]'\n);",
|
|
1871
1901
|
"columns": {
|
|
1902
|
+
"_sync_origin_device_id": {
|
|
1903
|
+
"type": "TEXT"
|
|
1904
|
+
},
|
|
1905
|
+
"_sync_revision": {
|
|
1906
|
+
"type": "INTEGER"
|
|
1907
|
+
},
|
|
1872
1908
|
"id": {
|
|
1873
1909
|
"type": "UUID",
|
|
1874
1910
|
"primaryKey": true,
|
|
@@ -2015,7 +2051,7 @@
|
|
|
2015
2051
|
]
|
|
2016
2052
|
}
|
|
2017
2053
|
],
|
|
2018
|
-
"version": "
|
|
2054
|
+
"version": "f42156f9"
|
|
2019
2055
|
},
|
|
2020
2056
|
"importPath": "@happyvertical/smrt-subscriptions"
|
|
2021
2057
|
},
|
|
@@ -2303,8 +2339,14 @@
|
|
|
2303
2339
|
"validationRules": [],
|
|
2304
2340
|
"schema": {
|
|
2305
2341
|
"tableName": "_smrt_tenant_subscriptions",
|
|
2306
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_tenant_subscriptions\" (\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 \"plan_id\" UUID,\n \"status\" TEXT DEFAULT 'incomplete',\n \"started_at\" TIMESTAMP,\n \"current_period_start\" TIMESTAMP,\n \"current_period_end\" TIMESTAMP,\n \"trial_ends_at\" TIMESTAMP,\n \"cancel_at_period_end\" BOOLEAN DEFAULT FALSE,\n \"canceled_at\" TIMESTAMP,\n \"agreed_amount\" INTEGER,\n \"plan_version_id\" UUID,\n \"plan_version_pinned_at\" TIMESTAMP,\n \"plan_version_pin_reason\" TEXT,\n \"plan_version_pin_note\" TEXT DEFAULT '',\n \"retains_paid_period\" BOOLEAN DEFAULT FALSE,\n \"external_provider\" TEXT,\n \"stripe_customer_id\" TEXT DEFAULT '',\n \"stripe_subscription_id\" TEXT DEFAULT '',\n \"stripe_checkout_session_id\" TEXT DEFAULT '',\n \"metadata\" TEXT DEFAULT '{}'\n);",
|
|
2342
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_tenant_subscriptions\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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 \"plan_id\" UUID,\n \"status\" TEXT DEFAULT 'incomplete',\n \"started_at\" TIMESTAMP,\n \"current_period_start\" TIMESTAMP,\n \"current_period_end\" TIMESTAMP,\n \"trial_ends_at\" TIMESTAMP,\n \"cancel_at_period_end\" BOOLEAN DEFAULT FALSE,\n \"canceled_at\" TIMESTAMP,\n \"agreed_amount\" INTEGER,\n \"plan_version_id\" UUID,\n \"plan_version_pinned_at\" TIMESTAMP,\n \"plan_version_pin_reason\" TEXT,\n \"plan_version_pin_note\" TEXT DEFAULT '',\n \"retains_paid_period\" BOOLEAN DEFAULT FALSE,\n \"external_provider\" TEXT,\n \"stripe_customer_id\" TEXT DEFAULT '',\n \"stripe_subscription_id\" TEXT DEFAULT '',\n \"stripe_checkout_session_id\" TEXT DEFAULT '',\n \"metadata\" TEXT DEFAULT '{}'\n);",
|
|
2307
2343
|
"columns": {
|
|
2344
|
+
"_sync_origin_device_id": {
|
|
2345
|
+
"type": "TEXT"
|
|
2346
|
+
},
|
|
2347
|
+
"_sync_revision": {
|
|
2348
|
+
"type": "INTEGER"
|
|
2349
|
+
},
|
|
2308
2350
|
"id": {
|
|
2309
2351
|
"type": "UUID",
|
|
2310
2352
|
"primaryKey": true,
|
|
@@ -2504,7 +2546,7 @@
|
|
|
2504
2546
|
]
|
|
2505
2547
|
}
|
|
2506
2548
|
],
|
|
2507
|
-
"version": "
|
|
2549
|
+
"version": "c281741d"
|
|
2508
2550
|
},
|
|
2509
2551
|
"importPath": "@happyvertical/smrt-subscriptions"
|
|
2510
2552
|
},
|
|
@@ -2670,8 +2712,14 @@
|
|
|
2670
2712
|
"validationRules": [],
|
|
2671
2713
|
"schema": {
|
|
2672
2714
|
"tableName": "_smrt_tenant_usage_metrics",
|
|
2673
|
-
"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);",
|
|
2715
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_tenant_usage_metrics\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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);",
|
|
2674
2716
|
"columns": {
|
|
2717
|
+
"_sync_origin_device_id": {
|
|
2718
|
+
"type": "TEXT"
|
|
2719
|
+
},
|
|
2720
|
+
"_sync_revision": {
|
|
2721
|
+
"type": "INTEGER"
|
|
2722
|
+
},
|
|
2675
2723
|
"id": {
|
|
2676
2724
|
"type": "UUID",
|
|
2677
2725
|
"primaryKey": true,
|
|
@@ -2798,7 +2846,7 @@
|
|
|
2798
2846
|
]
|
|
2799
2847
|
}
|
|
2800
2848
|
],
|
|
2801
|
-
"version": "
|
|
2849
|
+
"version": "4884a70d"
|
|
2802
2850
|
},
|
|
2803
2851
|
"importPath": "@happyvertical/smrt-subscriptions"
|
|
2804
2852
|
},
|
|
@@ -2934,8 +2982,14 @@
|
|
|
2934
2982
|
"validationRules": [],
|
|
2935
2983
|
"schema": {
|
|
2936
2984
|
"tableName": "_smrt_pricing_rules",
|
|
2937
|
-
"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 \"price_book_id\" UUID\n);",
|
|
2985
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_pricing_rules\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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 \"price_book_id\" UUID\n);",
|
|
2938
2986
|
"columns": {
|
|
2987
|
+
"_sync_origin_device_id": {
|
|
2988
|
+
"type": "TEXT"
|
|
2989
|
+
},
|
|
2990
|
+
"_sync_revision": {
|
|
2991
|
+
"type": "INTEGER"
|
|
2992
|
+
},
|
|
2939
2993
|
"id": {
|
|
2940
2994
|
"type": "UUID",
|
|
2941
2995
|
"primaryKey": true,
|
|
@@ -3062,7 +3116,7 @@
|
|
|
3062
3116
|
]
|
|
3063
3117
|
}
|
|
3064
3118
|
],
|
|
3065
|
-
"version": "
|
|
3119
|
+
"version": "37fd6ea9"
|
|
3066
3120
|
},
|
|
3067
3121
|
"importPath": "@happyvertical/smrt-subscriptions"
|
|
3068
3122
|
},
|
|
@@ -3261,8 +3315,14 @@
|
|
|
3261
3315
|
"validationRules": [],
|
|
3262
3316
|
"schema": {
|
|
3263
3317
|
"tableName": "_smrt_client_charges",
|
|
3264
|
-
"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 \"usage_tenant_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\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"pricing_rule_id\" UUID,\n \"price_book_id\" UUID,\n \"pricing_snapshot\" TEXT DEFAULT '{}',\n \"status\" TEXT DEFAULT 'draft',\n \"approved_at\" TIMESTAMP\n);",
|
|
3318
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_client_charges\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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 \"usage_tenant_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\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"pricing_rule_id\" UUID,\n \"price_book_id\" UUID,\n \"pricing_snapshot\" TEXT DEFAULT '{}',\n \"status\" TEXT DEFAULT 'draft',\n \"approved_at\" TIMESTAMP\n);",
|
|
3265
3319
|
"columns": {
|
|
3320
|
+
"_sync_origin_device_id": {
|
|
3321
|
+
"type": "TEXT"
|
|
3322
|
+
},
|
|
3323
|
+
"_sync_revision": {
|
|
3324
|
+
"type": "INTEGER"
|
|
3325
|
+
},
|
|
3266
3326
|
"id": {
|
|
3267
3327
|
"type": "UUID",
|
|
3268
3328
|
"primaryKey": true,
|
|
@@ -3462,7 +3522,7 @@
|
|
|
3462
3522
|
]
|
|
3463
3523
|
}
|
|
3464
3524
|
],
|
|
3465
|
-
"version": "
|
|
3525
|
+
"version": "92fb8003"
|
|
3466
3526
|
},
|
|
3467
3527
|
"importPath": "@happyvertical/smrt-subscriptions"
|
|
3468
3528
|
},
|
|
@@ -3563,8 +3623,14 @@
|
|
|
3563
3623
|
"validationRules": [],
|
|
3564
3624
|
"schema": {
|
|
3565
3625
|
"tableName": "_smrt_billing_adjustments",
|
|
3566
|
-
"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\" INTEGER 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);",
|
|
3626
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_billing_adjustments\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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\" INTEGER 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);",
|
|
3567
3627
|
"columns": {
|
|
3628
|
+
"_sync_origin_device_id": {
|
|
3629
|
+
"type": "TEXT"
|
|
3630
|
+
},
|
|
3631
|
+
"_sync_revision": {
|
|
3632
|
+
"type": "INTEGER"
|
|
3633
|
+
},
|
|
3568
3634
|
"id": {
|
|
3569
3635
|
"type": "UUID",
|
|
3570
3636
|
"primaryKey": true,
|
|
@@ -3669,7 +3735,7 @@
|
|
|
3669
3735
|
]
|
|
3670
3736
|
}
|
|
3671
3737
|
],
|
|
3672
|
-
"version": "
|
|
3738
|
+
"version": "cfbd2832"
|
|
3673
3739
|
},
|
|
3674
3740
|
"importPath": "@happyvertical/smrt-subscriptions"
|
|
3675
3741
|
},
|
|
@@ -3827,8 +3893,14 @@
|
|
|
3827
3893
|
"validationRules": [],
|
|
3828
3894
|
"schema": {
|
|
3829
3895
|
"tableName": "_smrt_spending_policies",
|
|
3830
|
-
"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\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"behavior\" TEXT DEFAULT 'observe',\n \"priority\" INTEGER DEFAULT 0,\n \"active\" BOOLEAN DEFAULT TRUE,\n \"basis\" TEXT DEFAULT 'billed',\n \"set_by_tenant_id\" UUID,\n \"balance_from\" TIMESTAMP\n);",
|
|
3896
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_spending_policies\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"behavior\" TEXT DEFAULT 'observe',\n \"priority\" INTEGER DEFAULT 0,\n \"active\" BOOLEAN DEFAULT TRUE,\n \"basis\" TEXT DEFAULT 'billed',\n \"set_by_tenant_id\" UUID,\n \"balance_from\" TIMESTAMP\n);",
|
|
3831
3897
|
"columns": {
|
|
3898
|
+
"_sync_origin_device_id": {
|
|
3899
|
+
"type": "TEXT"
|
|
3900
|
+
},
|
|
3901
|
+
"_sync_revision": {
|
|
3902
|
+
"type": "INTEGER"
|
|
3903
|
+
},
|
|
3832
3904
|
"id": {
|
|
3833
3905
|
"type": "UUID",
|
|
3834
3906
|
"primaryKey": true,
|
|
@@ -3993,7 +4065,7 @@
|
|
|
3993
4065
|
]
|
|
3994
4066
|
}
|
|
3995
4067
|
],
|
|
3996
|
-
"version": "
|
|
4068
|
+
"version": "21fbbb20"
|
|
3997
4069
|
},
|
|
3998
4070
|
"importPath": "@happyvertical/smrt-subscriptions"
|
|
3999
4071
|
},
|
|
@@ -4016,8 +4088,14 @@
|
|
|
4016
4088
|
"collectionOf": "@happyvertical/smrt-subscriptions:PricingRule",
|
|
4017
4089
|
"schema": {
|
|
4018
4090
|
"tableName": "_smrt_pricing_rules",
|
|
4019
|
-
"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 \"price_book_id\" UUID\n);",
|
|
4091
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_pricing_rules\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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 \"price_book_id\" UUID\n);",
|
|
4020
4092
|
"columns": {
|
|
4093
|
+
"_sync_origin_device_id": {
|
|
4094
|
+
"type": "TEXT"
|
|
4095
|
+
},
|
|
4096
|
+
"_sync_revision": {
|
|
4097
|
+
"type": "INTEGER"
|
|
4098
|
+
},
|
|
4021
4099
|
"id": {
|
|
4022
4100
|
"type": "UUID",
|
|
4023
4101
|
"primaryKey": true,
|
|
@@ -4144,7 +4222,7 @@
|
|
|
4144
4222
|
]
|
|
4145
4223
|
}
|
|
4146
4224
|
],
|
|
4147
|
-
"version": "
|
|
4225
|
+
"version": "37fd6ea9"
|
|
4148
4226
|
},
|
|
4149
4227
|
"importPath": "@happyvertical/smrt-subscriptions"
|
|
4150
4228
|
},
|
|
@@ -4190,8 +4268,14 @@
|
|
|
4190
4268
|
],
|
|
4191
4269
|
"schema": {
|
|
4192
4270
|
"tableName": "_smrt_client_charges",
|
|
4193
|
-
"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 \"usage_tenant_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\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"pricing_rule_id\" UUID,\n \"price_book_id\" UUID,\n \"pricing_snapshot\" TEXT DEFAULT '{}',\n \"status\" TEXT DEFAULT 'draft',\n \"approved_at\" TIMESTAMP\n);",
|
|
4271
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_client_charges\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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 \"usage_tenant_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\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"pricing_rule_id\" UUID,\n \"price_book_id\" UUID,\n \"pricing_snapshot\" TEXT DEFAULT '{}',\n \"status\" TEXT DEFAULT 'draft',\n \"approved_at\" TIMESTAMP\n);",
|
|
4194
4272
|
"columns": {
|
|
4273
|
+
"_sync_origin_device_id": {
|
|
4274
|
+
"type": "TEXT"
|
|
4275
|
+
},
|
|
4276
|
+
"_sync_revision": {
|
|
4277
|
+
"type": "INTEGER"
|
|
4278
|
+
},
|
|
4195
4279
|
"id": {
|
|
4196
4280
|
"type": "UUID",
|
|
4197
4281
|
"primaryKey": true,
|
|
@@ -4391,7 +4475,7 @@
|
|
|
4391
4475
|
]
|
|
4392
4476
|
}
|
|
4393
4477
|
],
|
|
4394
|
-
"version": "
|
|
4478
|
+
"version": "92fb8003"
|
|
4395
4479
|
},
|
|
4396
4480
|
"importPath": "@happyvertical/smrt-subscriptions"
|
|
4397
4481
|
},
|
|
@@ -4437,8 +4521,14 @@
|
|
|
4437
4521
|
],
|
|
4438
4522
|
"schema": {
|
|
4439
4523
|
"tableName": "_smrt_billing_adjustments",
|
|
4440
|
-
"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\" INTEGER 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);",
|
|
4524
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_billing_adjustments\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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\" INTEGER 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);",
|
|
4441
4525
|
"columns": {
|
|
4526
|
+
"_sync_origin_device_id": {
|
|
4527
|
+
"type": "TEXT"
|
|
4528
|
+
},
|
|
4529
|
+
"_sync_revision": {
|
|
4530
|
+
"type": "INTEGER"
|
|
4531
|
+
},
|
|
4442
4532
|
"id": {
|
|
4443
4533
|
"type": "UUID",
|
|
4444
4534
|
"primaryKey": true,
|
|
@@ -4543,7 +4633,7 @@
|
|
|
4543
4633
|
]
|
|
4544
4634
|
}
|
|
4545
4635
|
],
|
|
4546
|
-
"version": "
|
|
4636
|
+
"version": "cfbd2832"
|
|
4547
4637
|
},
|
|
4548
4638
|
"importPath": "@happyvertical/smrt-subscriptions"
|
|
4549
4639
|
},
|
|
@@ -4566,8 +4656,14 @@
|
|
|
4566
4656
|
"collectionOf": "@happyvertical/smrt-subscriptions:SpendingPolicy",
|
|
4567
4657
|
"schema": {
|
|
4568
4658
|
"tableName": "_smrt_spending_policies",
|
|
4569
|
-
"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\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"behavior\" TEXT DEFAULT 'observe',\n \"priority\" INTEGER DEFAULT 0,\n \"active\" BOOLEAN DEFAULT TRUE,\n \"basis\" TEXT DEFAULT 'billed',\n \"set_by_tenant_id\" UUID,\n \"balance_from\" TIMESTAMP\n);",
|
|
4659
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_spending_policies\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"behavior\" TEXT DEFAULT 'observe',\n \"priority\" INTEGER DEFAULT 0,\n \"active\" BOOLEAN DEFAULT TRUE,\n \"basis\" TEXT DEFAULT 'billed',\n \"set_by_tenant_id\" UUID,\n \"balance_from\" TIMESTAMP\n);",
|
|
4570
4660
|
"columns": {
|
|
4661
|
+
"_sync_origin_device_id": {
|
|
4662
|
+
"type": "TEXT"
|
|
4663
|
+
},
|
|
4664
|
+
"_sync_revision": {
|
|
4665
|
+
"type": "INTEGER"
|
|
4666
|
+
},
|
|
4571
4667
|
"id": {
|
|
4572
4668
|
"type": "UUID",
|
|
4573
4669
|
"primaryKey": true,
|
|
@@ -4732,7 +4828,7 @@
|
|
|
4732
4828
|
]
|
|
4733
4829
|
}
|
|
4734
4830
|
],
|
|
4735
|
-
"version": "
|
|
4831
|
+
"version": "21fbbb20"
|
|
4736
4832
|
},
|
|
4737
4833
|
"importPath": "@happyvertical/smrt-subscriptions"
|
|
4738
4834
|
},
|
|
@@ -4808,8 +4904,14 @@
|
|
|
4808
4904
|
"validationRules": [],
|
|
4809
4905
|
"schema": {
|
|
4810
4906
|
"tableName": "_smrt_price_books",
|
|
4811
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_price_books\" (\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 \"book_key\" TEXT DEFAULT '',\n \"name\" TEXT DEFAULT '',\n \"kind\" TEXT DEFAULT 'retail',\n \"active\" BOOLEAN DEFAULT TRUE\n);",
|
|
4907
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_price_books\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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 \"book_key\" TEXT DEFAULT '',\n \"name\" TEXT DEFAULT '',\n \"kind\" TEXT DEFAULT 'retail',\n \"active\" BOOLEAN DEFAULT TRUE\n);",
|
|
4812
4908
|
"columns": {
|
|
4909
|
+
"_sync_origin_device_id": {
|
|
4910
|
+
"type": "TEXT"
|
|
4911
|
+
},
|
|
4912
|
+
"_sync_revision": {
|
|
4913
|
+
"type": "INTEGER"
|
|
4914
|
+
},
|
|
4813
4915
|
"id": {
|
|
4814
4916
|
"type": "UUID",
|
|
4815
4917
|
"primaryKey": true,
|
|
@@ -4891,7 +4993,7 @@
|
|
|
4891
4993
|
]
|
|
4892
4994
|
}
|
|
4893
4995
|
],
|
|
4894
|
-
"version": "
|
|
4996
|
+
"version": "56296d2f"
|
|
4895
4997
|
},
|
|
4896
4998
|
"importPath": "@happyvertical/smrt-subscriptions"
|
|
4897
4999
|
},
|
|
@@ -4968,8 +5070,14 @@
|
|
|
4968
5070
|
],
|
|
4969
5071
|
"schema": {
|
|
4970
5072
|
"tableName": "_smrt_price_book_assignments",
|
|
4971
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_price_book_assignments\" (\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 \"child_tenant_id\" UUID NOT NULL,\n \"reseller_tenant_id\" UUID NOT NULL,\n \"wholesale_price_book_id\" UUID,\n \"wholesale_currency\" TEXT DEFAULT '',\n \"retail_price_book_id\" UUID,\n \"retail_currency\" TEXT DEFAULT ''\n);",
|
|
5073
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_price_book_assignments\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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 \"child_tenant_id\" UUID NOT NULL,\n \"reseller_tenant_id\" UUID NOT NULL,\n \"wholesale_price_book_id\" UUID,\n \"wholesale_currency\" TEXT DEFAULT '',\n \"retail_price_book_id\" UUID,\n \"retail_currency\" TEXT DEFAULT ''\n);",
|
|
4972
5074
|
"columns": {
|
|
5075
|
+
"_sync_origin_device_id": {
|
|
5076
|
+
"type": "TEXT"
|
|
5077
|
+
},
|
|
5078
|
+
"_sync_revision": {
|
|
5079
|
+
"type": "INTEGER"
|
|
5080
|
+
},
|
|
4973
5081
|
"id": {
|
|
4974
5082
|
"type": "UUID",
|
|
4975
5083
|
"primaryKey": true,
|
|
@@ -5084,7 +5192,7 @@
|
|
|
5084
5192
|
]
|
|
5085
5193
|
}
|
|
5086
5194
|
],
|
|
5087
|
-
"version": "
|
|
5195
|
+
"version": "990da9b7"
|
|
5088
5196
|
},
|
|
5089
5197
|
"importPath": "@happyvertical/smrt-subscriptions"
|
|
5090
5198
|
},
|
|
@@ -5256,8 +5364,14 @@
|
|
|
5256
5364
|
"validationRules": [],
|
|
5257
5365
|
"schema": {
|
|
5258
5366
|
"tableName": "_smrt_retail_charges",
|
|
5259
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_retail_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 \"reseller_tenant_id\" UUID,\n \"usage_event_id\" UUID,\n \"client_charge_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\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"price_book_id\" UUID,\n \"pricing_rule_id\" UUID,\n \"pricing_snapshot\" TEXT DEFAULT '{}',\n \"status\" TEXT DEFAULT 'draft',\n \"approved_at\" TIMESTAMP\n);",
|
|
5367
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_retail_charges\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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 \"reseller_tenant_id\" UUID,\n \"usage_event_id\" UUID,\n \"client_charge_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\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"price_book_id\" UUID,\n \"pricing_rule_id\" UUID,\n \"pricing_snapshot\" TEXT DEFAULT '{}',\n \"status\" TEXT DEFAULT 'draft',\n \"approved_at\" TIMESTAMP\n);",
|
|
5260
5368
|
"columns": {
|
|
5369
|
+
"_sync_origin_device_id": {
|
|
5370
|
+
"type": "TEXT"
|
|
5371
|
+
},
|
|
5372
|
+
"_sync_revision": {
|
|
5373
|
+
"type": "INTEGER"
|
|
5374
|
+
},
|
|
5261
5375
|
"id": {
|
|
5262
5376
|
"type": "UUID",
|
|
5263
5377
|
"primaryKey": true,
|
|
@@ -5475,7 +5589,7 @@
|
|
|
5475
5589
|
]
|
|
5476
5590
|
}
|
|
5477
5591
|
],
|
|
5478
|
-
"version": "
|
|
5592
|
+
"version": "ad6930a8"
|
|
5479
5593
|
},
|
|
5480
5594
|
"importPath": "@happyvertical/smrt-subscriptions"
|
|
5481
5595
|
},
|
|
@@ -5580,8 +5694,14 @@
|
|
|
5580
5694
|
"validationRules": [],
|
|
5581
5695
|
"schema": {
|
|
5582
5696
|
"tableName": "_smrt_credit_grants",
|
|
5583
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_credit_grants\" (\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 \"spending_policy_id\" UUID,\n \"amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"reason\" TEXT DEFAULT '',\n \"source\" TEXT DEFAULT '',\n \"source_id\" TEXT DEFAULT '',\n \"granted_by_tenant_id\" UUID\n);",
|
|
5697
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_credit_grants\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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 \"spending_policy_id\" UUID,\n \"amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"reason\" TEXT DEFAULT '',\n \"source\" TEXT DEFAULT '',\n \"source_id\" TEXT DEFAULT '',\n \"granted_by_tenant_id\" UUID\n);",
|
|
5584
5698
|
"columns": {
|
|
5699
|
+
"_sync_origin_device_id": {
|
|
5700
|
+
"type": "TEXT"
|
|
5701
|
+
},
|
|
5702
|
+
"_sync_revision": {
|
|
5703
|
+
"type": "INTEGER"
|
|
5704
|
+
},
|
|
5585
5705
|
"id": {
|
|
5586
5706
|
"type": "UUID",
|
|
5587
5707
|
"primaryKey": true,
|
|
@@ -5692,7 +5812,7 @@
|
|
|
5692
5812
|
]
|
|
5693
5813
|
}
|
|
5694
5814
|
],
|
|
5695
|
-
"version": "
|
|
5815
|
+
"version": "e11305fc"
|
|
5696
5816
|
},
|
|
5697
5817
|
"importPath": "@happyvertical/smrt-subscriptions"
|
|
5698
5818
|
},
|
|
@@ -5723,8 +5843,14 @@
|
|
|
5723
5843
|
],
|
|
5724
5844
|
"schema": {
|
|
5725
5845
|
"tableName": "_smrt_price_books",
|
|
5726
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_price_books\" (\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 \"book_key\" TEXT DEFAULT '',\n \"name\" TEXT DEFAULT '',\n \"kind\" TEXT DEFAULT 'retail',\n \"active\" BOOLEAN DEFAULT TRUE\n);",
|
|
5846
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_price_books\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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 \"book_key\" TEXT DEFAULT '',\n \"name\" TEXT DEFAULT '',\n \"kind\" TEXT DEFAULT 'retail',\n \"active\" BOOLEAN DEFAULT TRUE\n);",
|
|
5727
5847
|
"columns": {
|
|
5848
|
+
"_sync_origin_device_id": {
|
|
5849
|
+
"type": "TEXT"
|
|
5850
|
+
},
|
|
5851
|
+
"_sync_revision": {
|
|
5852
|
+
"type": "INTEGER"
|
|
5853
|
+
},
|
|
5728
5854
|
"id": {
|
|
5729
5855
|
"type": "UUID",
|
|
5730
5856
|
"primaryKey": true,
|
|
@@ -5806,7 +5932,7 @@
|
|
|
5806
5932
|
]
|
|
5807
5933
|
}
|
|
5808
5934
|
],
|
|
5809
|
-
"version": "
|
|
5935
|
+
"version": "56296d2f"
|
|
5810
5936
|
},
|
|
5811
5937
|
"importPath": "@happyvertical/smrt-subscriptions"
|
|
5812
5938
|
},
|
|
@@ -5837,8 +5963,14 @@
|
|
|
5837
5963
|
],
|
|
5838
5964
|
"schema": {
|
|
5839
5965
|
"tableName": "_smrt_price_book_assignments",
|
|
5840
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_price_book_assignments\" (\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 \"child_tenant_id\" UUID NOT NULL,\n \"reseller_tenant_id\" UUID NOT NULL,\n \"wholesale_price_book_id\" UUID,\n \"wholesale_currency\" TEXT DEFAULT '',\n \"retail_price_book_id\" UUID,\n \"retail_currency\" TEXT DEFAULT ''\n);",
|
|
5966
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_price_book_assignments\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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 \"child_tenant_id\" UUID NOT NULL,\n \"reseller_tenant_id\" UUID NOT NULL,\n \"wholesale_price_book_id\" UUID,\n \"wholesale_currency\" TEXT DEFAULT '',\n \"retail_price_book_id\" UUID,\n \"retail_currency\" TEXT DEFAULT ''\n);",
|
|
5841
5967
|
"columns": {
|
|
5968
|
+
"_sync_origin_device_id": {
|
|
5969
|
+
"type": "TEXT"
|
|
5970
|
+
},
|
|
5971
|
+
"_sync_revision": {
|
|
5972
|
+
"type": "INTEGER"
|
|
5973
|
+
},
|
|
5842
5974
|
"id": {
|
|
5843
5975
|
"type": "UUID",
|
|
5844
5976
|
"primaryKey": true,
|
|
@@ -5953,7 +6085,7 @@
|
|
|
5953
6085
|
]
|
|
5954
6086
|
}
|
|
5955
6087
|
],
|
|
5956
|
-
"version": "
|
|
6088
|
+
"version": "990da9b7"
|
|
5957
6089
|
},
|
|
5958
6090
|
"importPath": "@happyvertical/smrt-subscriptions"
|
|
5959
6091
|
},
|
|
@@ -5999,8 +6131,14 @@
|
|
|
5999
6131
|
],
|
|
6000
6132
|
"schema": {
|
|
6001
6133
|
"tableName": "_smrt_retail_charges",
|
|
6002
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_retail_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 \"reseller_tenant_id\" UUID,\n \"usage_event_id\" UUID,\n \"client_charge_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\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"price_book_id\" UUID,\n \"pricing_rule_id\" UUID,\n \"pricing_snapshot\" TEXT DEFAULT '{}',\n \"status\" TEXT DEFAULT 'draft',\n \"approved_at\" TIMESTAMP\n);",
|
|
6134
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_retail_charges\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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 \"reseller_tenant_id\" UUID,\n \"usage_event_id\" UUID,\n \"client_charge_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\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"price_book_id\" UUID,\n \"pricing_rule_id\" UUID,\n \"pricing_snapshot\" TEXT DEFAULT '{}',\n \"status\" TEXT DEFAULT 'draft',\n \"approved_at\" TIMESTAMP\n);",
|
|
6003
6135
|
"columns": {
|
|
6136
|
+
"_sync_origin_device_id": {
|
|
6137
|
+
"type": "TEXT"
|
|
6138
|
+
},
|
|
6139
|
+
"_sync_revision": {
|
|
6140
|
+
"type": "INTEGER"
|
|
6141
|
+
},
|
|
6004
6142
|
"id": {
|
|
6005
6143
|
"type": "UUID",
|
|
6006
6144
|
"primaryKey": true,
|
|
@@ -6218,7 +6356,7 @@
|
|
|
6218
6356
|
]
|
|
6219
6357
|
}
|
|
6220
6358
|
],
|
|
6221
|
-
"version": "
|
|
6359
|
+
"version": "ad6930a8"
|
|
6222
6360
|
},
|
|
6223
6361
|
"importPath": "@happyvertical/smrt-subscriptions"
|
|
6224
6362
|
},
|
|
@@ -6264,8 +6402,14 @@
|
|
|
6264
6402
|
],
|
|
6265
6403
|
"schema": {
|
|
6266
6404
|
"tableName": "_smrt_credit_grants",
|
|
6267
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_credit_grants\" (\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 \"spending_policy_id\" UUID,\n \"amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"reason\" TEXT DEFAULT '',\n \"source\" TEXT DEFAULT '',\n \"source_id\" TEXT DEFAULT '',\n \"granted_by_tenant_id\" UUID\n);",
|
|
6405
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_credit_grants\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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 \"spending_policy_id\" UUID,\n \"amount\" INTEGER DEFAULT 0,\n \"currency\" TEXT DEFAULT 'USD',\n \"reason\" TEXT DEFAULT '',\n \"source\" TEXT DEFAULT '',\n \"source_id\" TEXT DEFAULT '',\n \"granted_by_tenant_id\" UUID\n);",
|
|
6268
6406
|
"columns": {
|
|
6407
|
+
"_sync_origin_device_id": {
|
|
6408
|
+
"type": "TEXT"
|
|
6409
|
+
},
|
|
6410
|
+
"_sync_revision": {
|
|
6411
|
+
"type": "INTEGER"
|
|
6412
|
+
},
|
|
6269
6413
|
"id": {
|
|
6270
6414
|
"type": "UUID",
|
|
6271
6415
|
"primaryKey": true,
|
|
@@ -6376,7 +6520,7 @@
|
|
|
6376
6520
|
]
|
|
6377
6521
|
}
|
|
6378
6522
|
],
|
|
6379
|
-
"version": "
|
|
6523
|
+
"version": "e11305fc"
|
|
6380
6524
|
},
|
|
6381
6525
|
"importPath": "@happyvertical/smrt-subscriptions"
|
|
6382
6526
|
}
|