@shdan/submesh 0.1.0
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/LICENSE +21 -0
- package/README.md +62 -0
- package/dist/contracts.d.ts +191 -0
- package/dist/contracts.d.ts.map +1 -0
- package/dist/contracts.js +2 -0
- package/dist/contracts.js.map +1 -0
- package/dist/drizzle/catalog-mapping-repository.d.ts +280 -0
- package/dist/drizzle/catalog-mapping-repository.d.ts.map +1 -0
- package/dist/drizzle/catalog-mapping-repository.js +62 -0
- package/dist/drizzle/catalog-mapping-repository.js.map +1 -0
- package/dist/drizzle/ensure-schema.d.ts +3 -0
- package/dist/drizzle/ensure-schema.d.ts.map +1 -0
- package/dist/drizzle/ensure-schema.js +100 -0
- package/dist/drizzle/ensure-schema.js.map +1 -0
- package/dist/drizzle/inbound-event-repository.d.ts +960 -0
- package/dist/drizzle/inbound-event-repository.d.ts.map +1 -0
- package/dist/drizzle/inbound-event-repository.js +148 -0
- package/dist/drizzle/inbound-event-repository.js.map +1 -0
- package/dist/drizzle/index.d.ts +40 -0
- package/dist/drizzle/index.d.ts.map +1 -0
- package/dist/drizzle/index.js +57 -0
- package/dist/drizzle/index.js.map +1 -0
- package/dist/drizzle/migrate.d.ts +11 -0
- package/dist/drizzle/migrate.d.ts.map +1 -0
- package/dist/drizzle/migrate.js +22 -0
- package/dist/drizzle/migrate.js.map +1 -0
- package/dist/drizzle/plan-repository.d.ts +497 -0
- package/dist/drizzle/plan-repository.d.ts.map +1 -0
- package/dist/drizzle/plan-repository.js +70 -0
- package/dist/drizzle/plan-repository.js.map +1 -0
- package/dist/drizzle/plugin-installation-repository.d.ts +26 -0
- package/dist/drizzle/plugin-installation-repository.d.ts.map +1 -0
- package/dist/drizzle/plugin-installation-repository.js +71 -0
- package/dist/drizzle/plugin-installation-repository.js.map +1 -0
- package/dist/drizzle/repository-set.d.ts +4 -0
- package/dist/drizzle/repository-set.d.ts.map +1 -0
- package/dist/drizzle/repository-set.js +19 -0
- package/dist/drizzle/repository-set.js.map +1 -0
- package/dist/drizzle/schema.d.ts +2370 -0
- package/dist/drizzle/schema.d.ts.map +1 -0
- package/dist/drizzle/schema.js +103 -0
- package/dist/drizzle/schema.js.map +1 -0
- package/dist/drizzle/subject-repository.d.ts +295 -0
- package/dist/drizzle/subject-repository.d.ts.map +1 -0
- package/dist/drizzle/subject-repository.js +76 -0
- package/dist/drizzle/subject-repository.js.map +1 -0
- package/dist/drizzle/subscription-repository.d.ts +60 -0
- package/dist/drizzle/subscription-repository.d.ts.map +1 -0
- package/dist/drizzle/subscription-repository.js +128 -0
- package/dist/drizzle/subscription-repository.js.map +1 -0
- package/dist/drizzle/summary-repository.d.ts +9 -0
- package/dist/drizzle/summary-repository.d.ts.map +1 -0
- package/dist/drizzle/summary-repository.js +25 -0
- package/dist/drizzle/summary-repository.js.map +1 -0
- package/dist/drizzle/types.d.ts +4 -0
- package/dist/drizzle/types.d.ts.map +1 -0
- package/dist/drizzle/types.js +2 -0
- package/dist/drizzle/types.js.map +1 -0
- package/dist/errors.d.ts +10 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +13 -0
- package/dist/errors.js.map +1 -0
- package/dist/hooks.d.ts +24 -0
- package/dist/hooks.d.ts.map +1 -0
- package/dist/hooks.js +2 -0
- package/dist/hooks.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/logger.d.ts +16 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +8 -0
- package/dist/logger.js.map +1 -0
- package/dist/plugins/builtin-plugins.d.ts +3 -0
- package/dist/plugins/builtin-plugins.d.ts.map +1 -0
- package/dist/plugins/builtin-plugins.js +7 -0
- package/dist/plugins/builtin-plugins.js.map +1 -0
- package/dist/plugins/hash-payload.d.ts +2 -0
- package/dist/plugins/hash-payload.d.ts.map +1 -0
- package/dist/plugins/hash-payload.js +5 -0
- package/dist/plugins/hash-payload.js.map +1 -0
- package/dist/plugins/manual.d.ts +12 -0
- package/dist/plugins/manual.d.ts.map +1 -0
- package/dist/plugins/manual.js +87 -0
- package/dist/plugins/manual.js.map +1 -0
- package/dist/plugins/plan-provisioning.d.ts +18 -0
- package/dist/plugins/plan-provisioning.d.ts.map +1 -0
- package/dist/plugins/plan-provisioning.js +159 -0
- package/dist/plugins/plan-provisioning.js.map +1 -0
- package/dist/plugins/plugin-registry.d.ts +9 -0
- package/dist/plugins/plugin-registry.d.ts.map +1 -0
- package/dist/plugins/plugin-registry.js +18 -0
- package/dist/plugins/plugin-registry.js.map +1 -0
- package/dist/providers/apple/plugin/app-store-plan-sync.d.ts +4 -0
- package/dist/providers/apple/plugin/app-store-plan-sync.d.ts.map +1 -0
- package/dist/providers/apple/plugin/app-store-plan-sync.js +85 -0
- package/dist/providers/apple/plugin/app-store-plan-sync.js.map +1 -0
- package/dist/providers/apple/plugin/app-store.d.ts +20 -0
- package/dist/providers/apple/plugin/app-store.d.ts.map +1 -0
- package/dist/providers/apple/plugin/app-store.js +397 -0
- package/dist/providers/apple/plugin/app-store.js.map +1 -0
- package/dist/providers/apple/security/app-store-verification.d.ts +4 -0
- package/dist/providers/apple/security/app-store-verification.d.ts.map +1 -0
- package/dist/providers/apple/security/app-store-verification.js +100 -0
- package/dist/providers/apple/security/app-store-verification.js.map +1 -0
- package/dist/providers/apple/services/app-store-subscription-verification-service.d.ts +3 -0
- package/dist/providers/apple/services/app-store-subscription-verification-service.d.ts.map +1 -0
- package/dist/providers/apple/services/app-store-subscription-verification-service.js +155 -0
- package/dist/providers/apple/services/app-store-subscription-verification-service.js.map +1 -0
- package/dist/providers/google/plugin/play-plan-sync.d.ts +4 -0
- package/dist/providers/google/plugin/play-plan-sync.d.ts.map +1 -0
- package/dist/providers/google/plugin/play-plan-sync.js +270 -0
- package/dist/providers/google/plugin/play-plan-sync.js.map +1 -0
- package/dist/providers/google/plugin/play.d.ts +20 -0
- package/dist/providers/google/plugin/play.d.ts.map +1 -0
- package/dist/providers/google/plugin/play.js +460 -0
- package/dist/providers/google/plugin/play.js.map +1 -0
- package/dist/providers/google/security/oauth.d.ts +10 -0
- package/dist/providers/google/security/oauth.d.ts.map +1 -0
- package/dist/providers/google/security/oauth.js +116 -0
- package/dist/providers/google/security/oauth.js.map +1 -0
- package/dist/providers/google/security/pubsub-verification.d.ts +3 -0
- package/dist/providers/google/security/pubsub-verification.d.ts.map +1 -0
- package/dist/providers/google/security/pubsub-verification.js +229 -0
- package/dist/providers/google/security/pubsub-verification.js.map +1 -0
- package/dist/providers/google/services/play-subscription-verification-service.d.ts +3 -0
- package/dist/providers/google/services/play-subscription-verification-service.d.ts.map +1 -0
- package/dist/providers/google/services/play-subscription-verification-service.js +96 -0
- package/dist/providers/google/services/play-subscription-verification-service.js.map +1 -0
- package/dist/repositories/catalog-mapping-repository.d.ts +9 -0
- package/dist/repositories/catalog-mapping-repository.d.ts.map +1 -0
- package/dist/repositories/catalog-mapping-repository.js +2 -0
- package/dist/repositories/catalog-mapping-repository.js.map +1 -0
- package/dist/repositories/inbound-event-repository.d.ts +23 -0
- package/dist/repositories/inbound-event-repository.d.ts.map +1 -0
- package/dist/repositories/inbound-event-repository.js +2 -0
- package/dist/repositories/inbound-event-repository.js.map +1 -0
- package/dist/repositories/index.d.ts +30 -0
- package/dist/repositories/index.d.ts.map +1 -0
- package/dist/repositories/index.js +2 -0
- package/dist/repositories/index.js.map +1 -0
- package/dist/repositories/plan-repository.d.ts +10 -0
- package/dist/repositories/plan-repository.d.ts.map +1 -0
- package/dist/repositories/plan-repository.js +2 -0
- package/dist/repositories/plan-repository.js.map +1 -0
- package/dist/repositories/plugin-installation-repository.d.ts +13 -0
- package/dist/repositories/plugin-installation-repository.d.ts.map +1 -0
- package/dist/repositories/plugin-installation-repository.js +2 -0
- package/dist/repositories/plugin-installation-repository.js.map +1 -0
- package/dist/repositories/subject-repository.d.ts +10 -0
- package/dist/repositories/subject-repository.d.ts.map +1 -0
- package/dist/repositories/subject-repository.js +2 -0
- package/dist/repositories/subject-repository.js.map +1 -0
- package/dist/repositories/subscription-repository.d.ts +24 -0
- package/dist/repositories/subscription-repository.d.ts.map +1 -0
- package/dist/repositories/subscription-repository.js +2 -0
- package/dist/repositories/subscription-repository.js.map +1 -0
- package/dist/security/jwt.d.ts +22 -0
- package/dist/security/jwt.d.ts.map +1 -0
- package/dist/security/jwt.js +132 -0
- package/dist/security/jwt.js.map +1 -0
- package/dist/security/plugin-webhook-verification.d.ts +3 -0
- package/dist/security/plugin-webhook-verification.d.ts.map +1 -0
- package/dist/security/plugin-webhook-verification.js +44 -0
- package/dist/security/plugin-webhook-verification.js.map +1 -0
- package/dist/security/relay-signature.d.ts +12 -0
- package/dist/security/relay-signature.d.ts.map +1 -0
- package/dist/security/relay-signature.js +39 -0
- package/dist/security/relay-signature.js.map +1 -0
- package/dist/services/canonical-subscription-service.d.ts +4 -0
- package/dist/services/canonical-subscription-service.d.ts.map +1 -0
- package/dist/services/canonical-subscription-service.js +20 -0
- package/dist/services/canonical-subscription-service.js.map +1 -0
- package/dist/services/managed-subscription-service.d.ts +5 -0
- package/dist/services/managed-subscription-service.d.ts.map +1 -0
- package/dist/services/managed-subscription-service.js +24 -0
- package/dist/services/managed-subscription-service.js.map +1 -0
- package/dist/services/plan-provisioning-service.d.ts +5 -0
- package/dist/services/plan-provisioning-service.d.ts.map +1 -0
- package/dist/services/plan-provisioning-service.js +100 -0
- package/dist/services/plan-provisioning-service.js.map +1 -0
- package/dist/services/plan-resolution.d.ts +4 -0
- package/dist/services/plan-resolution.d.ts.map +1 -0
- package/dist/services/plan-resolution.js +33 -0
- package/dist/services/plan-resolution.js.map +1 -0
- package/dist/services/plugin-installation-service.d.ts +6 -0
- package/dist/services/plugin-installation-service.d.ts.map +1 -0
- package/dist/services/plugin-installation-service.js +19 -0
- package/dist/services/plugin-installation-service.js.map +1 -0
- package/dist/services/provider-subscription-sync-service.d.ts +4 -0
- package/dist/services/provider-subscription-sync-service.d.ts.map +1 -0
- package/dist/services/provider-subscription-sync-service.js +13 -0
- package/dist/services/provider-subscription-sync-service.js.map +1 -0
- package/dist/services/subject-resolution.d.ts +4 -0
- package/dist/services/subject-resolution.d.ts.map +1 -0
- package/dist/services/subject-resolution.js +48 -0
- package/dist/services/subject-resolution.js.map +1 -0
- package/dist/services/webhook-ingestion-service.d.ts +14 -0
- package/dist/services/webhook-ingestion-service.d.ts.map +1 -0
- package/dist/services/webhook-ingestion-service.js +149 -0
- package/dist/services/webhook-ingestion-service.js.map +1 -0
- package/dist/submesh.d.ts +265 -0
- package/dist/submesh.d.ts.map +1 -0
- package/dist/submesh.js +602 -0
- package/dist/submesh.js.map +1 -0
- package/dist/utils/canonical.d.ts +7 -0
- package/dist/utils/canonical.d.ts.map +1 -0
- package/dist/utils/canonical.js +8 -0
- package/dist/utils/canonical.js.map +1 -0
- package/dist/utils/parse.d.ts +42 -0
- package/dist/utils/parse.d.ts.map +1 -0
- package/dist/utils/parse.js +74 -0
- package/dist/utils/parse.js.map +1 -0
- package/dist/utils/records.d.ts +2 -0
- package/dist/utils/records.d.ts.map +1 -0
- package/dist/utils/records.js +7 -0
- package/dist/utils/records.js.map +1 -0
- package/dist/utils/time.d.ts +2 -0
- package/dist/utils/time.d.ts.map +1 -0
- package/dist/utils/time.js +4 -0
- package/dist/utils/time.js.map +1 -0
- package/dist/utils/validation.d.ts +10 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +19 -0
- package/dist/utils/validation.js.map +1 -0
- package/drizzle/0000_cute_the_order.sql +94 -0
- package/drizzle/meta/0000_snapshot.json +559 -0
- package/drizzle/meta/_journal.json +13 -0
- package/package.json +54 -0
|
@@ -0,0 +1,559 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "a4c8d993-cf50-49e4-aaee-d2af8d82c706",
|
|
3
|
+
"prevId": "00000000-0000-0000-0000-000000000000",
|
|
4
|
+
"version": "7",
|
|
5
|
+
"dialect": "postgresql",
|
|
6
|
+
"tables": {
|
|
7
|
+
"public.catalog_mappings": {
|
|
8
|
+
"name": "catalog_mappings",
|
|
9
|
+
"schema": "",
|
|
10
|
+
"columns": {
|
|
11
|
+
"id": {
|
|
12
|
+
"name": "id",
|
|
13
|
+
"type": "text",
|
|
14
|
+
"primaryKey": true,
|
|
15
|
+
"notNull": true
|
|
16
|
+
},
|
|
17
|
+
"plugin_key": {
|
|
18
|
+
"name": "plugin_key",
|
|
19
|
+
"type": "text",
|
|
20
|
+
"primaryKey": false,
|
|
21
|
+
"notNull": true
|
|
22
|
+
},
|
|
23
|
+
"external_product_id": {
|
|
24
|
+
"name": "external_product_id",
|
|
25
|
+
"type": "text",
|
|
26
|
+
"primaryKey": false,
|
|
27
|
+
"notNull": true
|
|
28
|
+
},
|
|
29
|
+
"plan_code": {
|
|
30
|
+
"name": "plan_code",
|
|
31
|
+
"type": "text",
|
|
32
|
+
"primaryKey": false,
|
|
33
|
+
"notNull": true
|
|
34
|
+
},
|
|
35
|
+
"metadata": {
|
|
36
|
+
"name": "metadata",
|
|
37
|
+
"type": "jsonb",
|
|
38
|
+
"primaryKey": false,
|
|
39
|
+
"notNull": true
|
|
40
|
+
},
|
|
41
|
+
"created_at": {
|
|
42
|
+
"name": "created_at",
|
|
43
|
+
"type": "text",
|
|
44
|
+
"primaryKey": false,
|
|
45
|
+
"notNull": true
|
|
46
|
+
},
|
|
47
|
+
"updated_at": {
|
|
48
|
+
"name": "updated_at",
|
|
49
|
+
"type": "text",
|
|
50
|
+
"primaryKey": false,
|
|
51
|
+
"notNull": true
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"indexes": {},
|
|
55
|
+
"foreignKeys": {},
|
|
56
|
+
"compositePrimaryKeys": {},
|
|
57
|
+
"uniqueConstraints": {
|
|
58
|
+
"catalog_mappings_plugin_key_external_product_id_unique": {
|
|
59
|
+
"name": "catalog_mappings_plugin_key_external_product_id_unique",
|
|
60
|
+
"nullsNotDistinct": false,
|
|
61
|
+
"columns": ["plugin_key", "external_product_id"]
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"policies": {},
|
|
65
|
+
"checkConstraints": {},
|
|
66
|
+
"isRLSEnabled": false
|
|
67
|
+
},
|
|
68
|
+
"public.inbound_events": {
|
|
69
|
+
"name": "inbound_events",
|
|
70
|
+
"schema": "",
|
|
71
|
+
"columns": {
|
|
72
|
+
"id": {
|
|
73
|
+
"name": "id",
|
|
74
|
+
"type": "text",
|
|
75
|
+
"primaryKey": true,
|
|
76
|
+
"notNull": true
|
|
77
|
+
},
|
|
78
|
+
"plugin_key": {
|
|
79
|
+
"name": "plugin_key",
|
|
80
|
+
"type": "text",
|
|
81
|
+
"primaryKey": false,
|
|
82
|
+
"notNull": true
|
|
83
|
+
},
|
|
84
|
+
"event_key": {
|
|
85
|
+
"name": "event_key",
|
|
86
|
+
"type": "text",
|
|
87
|
+
"primaryKey": false,
|
|
88
|
+
"notNull": true
|
|
89
|
+
},
|
|
90
|
+
"event_type": {
|
|
91
|
+
"name": "event_type",
|
|
92
|
+
"type": "text",
|
|
93
|
+
"primaryKey": false,
|
|
94
|
+
"notNull": true
|
|
95
|
+
},
|
|
96
|
+
"source_ref": {
|
|
97
|
+
"name": "source_ref",
|
|
98
|
+
"type": "text",
|
|
99
|
+
"primaryKey": false,
|
|
100
|
+
"notNull": false
|
|
101
|
+
},
|
|
102
|
+
"payload": {
|
|
103
|
+
"name": "payload",
|
|
104
|
+
"type": "jsonb",
|
|
105
|
+
"primaryKey": false,
|
|
106
|
+
"notNull": true
|
|
107
|
+
},
|
|
108
|
+
"status": {
|
|
109
|
+
"name": "status",
|
|
110
|
+
"type": "text",
|
|
111
|
+
"primaryKey": false,
|
|
112
|
+
"notNull": true
|
|
113
|
+
},
|
|
114
|
+
"processed_count": {
|
|
115
|
+
"name": "processed_count",
|
|
116
|
+
"type": "integer",
|
|
117
|
+
"primaryKey": false,
|
|
118
|
+
"notNull": true
|
|
119
|
+
},
|
|
120
|
+
"error_message": {
|
|
121
|
+
"name": "error_message",
|
|
122
|
+
"type": "text",
|
|
123
|
+
"primaryKey": false,
|
|
124
|
+
"notNull": false
|
|
125
|
+
},
|
|
126
|
+
"processed_at": {
|
|
127
|
+
"name": "processed_at",
|
|
128
|
+
"type": "text",
|
|
129
|
+
"primaryKey": false,
|
|
130
|
+
"notNull": false
|
|
131
|
+
},
|
|
132
|
+
"created_at": {
|
|
133
|
+
"name": "created_at",
|
|
134
|
+
"type": "text",
|
|
135
|
+
"primaryKey": false,
|
|
136
|
+
"notNull": true
|
|
137
|
+
},
|
|
138
|
+
"updated_at": {
|
|
139
|
+
"name": "updated_at",
|
|
140
|
+
"type": "text",
|
|
141
|
+
"primaryKey": false,
|
|
142
|
+
"notNull": true
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"indexes": {},
|
|
146
|
+
"foreignKeys": {},
|
|
147
|
+
"compositePrimaryKeys": {},
|
|
148
|
+
"uniqueConstraints": {
|
|
149
|
+
"inbound_events_plugin_key_event_key_unique": {
|
|
150
|
+
"name": "inbound_events_plugin_key_event_key_unique",
|
|
151
|
+
"nullsNotDistinct": false,
|
|
152
|
+
"columns": ["plugin_key", "event_key"]
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"policies": {},
|
|
156
|
+
"checkConstraints": {},
|
|
157
|
+
"isRLSEnabled": false
|
|
158
|
+
},
|
|
159
|
+
"public.plans": {
|
|
160
|
+
"name": "plans",
|
|
161
|
+
"schema": "",
|
|
162
|
+
"columns": {
|
|
163
|
+
"id": {
|
|
164
|
+
"name": "id",
|
|
165
|
+
"type": "text",
|
|
166
|
+
"primaryKey": true,
|
|
167
|
+
"notNull": true
|
|
168
|
+
},
|
|
169
|
+
"code": {
|
|
170
|
+
"name": "code",
|
|
171
|
+
"type": "text",
|
|
172
|
+
"primaryKey": false,
|
|
173
|
+
"notNull": true
|
|
174
|
+
},
|
|
175
|
+
"name": {
|
|
176
|
+
"name": "name",
|
|
177
|
+
"type": "text",
|
|
178
|
+
"primaryKey": false,
|
|
179
|
+
"notNull": true
|
|
180
|
+
},
|
|
181
|
+
"description": {
|
|
182
|
+
"name": "description",
|
|
183
|
+
"type": "text",
|
|
184
|
+
"primaryKey": false,
|
|
185
|
+
"notNull": false
|
|
186
|
+
},
|
|
187
|
+
"interval_unit": {
|
|
188
|
+
"name": "interval_unit",
|
|
189
|
+
"type": "text",
|
|
190
|
+
"primaryKey": false,
|
|
191
|
+
"notNull": true
|
|
192
|
+
},
|
|
193
|
+
"price_amount": {
|
|
194
|
+
"name": "price_amount",
|
|
195
|
+
"type": "integer",
|
|
196
|
+
"primaryKey": false,
|
|
197
|
+
"notNull": true
|
|
198
|
+
},
|
|
199
|
+
"currency": {
|
|
200
|
+
"name": "currency",
|
|
201
|
+
"type": "text",
|
|
202
|
+
"primaryKey": false,
|
|
203
|
+
"notNull": true
|
|
204
|
+
},
|
|
205
|
+
"entitlements": {
|
|
206
|
+
"name": "entitlements",
|
|
207
|
+
"type": "text[]",
|
|
208
|
+
"primaryKey": false,
|
|
209
|
+
"notNull": true
|
|
210
|
+
},
|
|
211
|
+
"metadata": {
|
|
212
|
+
"name": "metadata",
|
|
213
|
+
"type": "jsonb",
|
|
214
|
+
"primaryKey": false,
|
|
215
|
+
"notNull": true
|
|
216
|
+
},
|
|
217
|
+
"created_at": {
|
|
218
|
+
"name": "created_at",
|
|
219
|
+
"type": "text",
|
|
220
|
+
"primaryKey": false,
|
|
221
|
+
"notNull": true
|
|
222
|
+
},
|
|
223
|
+
"updated_at": {
|
|
224
|
+
"name": "updated_at",
|
|
225
|
+
"type": "text",
|
|
226
|
+
"primaryKey": false,
|
|
227
|
+
"notNull": true
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
"indexes": {},
|
|
231
|
+
"foreignKeys": {},
|
|
232
|
+
"compositePrimaryKeys": {},
|
|
233
|
+
"uniqueConstraints": {
|
|
234
|
+
"plans_code_unique": {
|
|
235
|
+
"name": "plans_code_unique",
|
|
236
|
+
"nullsNotDistinct": false,
|
|
237
|
+
"columns": ["code"]
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
"policies": {},
|
|
241
|
+
"checkConstraints": {},
|
|
242
|
+
"isRLSEnabled": false
|
|
243
|
+
},
|
|
244
|
+
"public.plugin_installations": {
|
|
245
|
+
"name": "plugin_installations",
|
|
246
|
+
"schema": "",
|
|
247
|
+
"columns": {
|
|
248
|
+
"id": {
|
|
249
|
+
"name": "id",
|
|
250
|
+
"type": "text",
|
|
251
|
+
"primaryKey": true,
|
|
252
|
+
"notNull": true
|
|
253
|
+
},
|
|
254
|
+
"plugin_key": {
|
|
255
|
+
"name": "plugin_key",
|
|
256
|
+
"type": "text",
|
|
257
|
+
"primaryKey": false,
|
|
258
|
+
"notNull": true
|
|
259
|
+
},
|
|
260
|
+
"display_name": {
|
|
261
|
+
"name": "display_name",
|
|
262
|
+
"type": "text",
|
|
263
|
+
"primaryKey": false,
|
|
264
|
+
"notNull": true
|
|
265
|
+
},
|
|
266
|
+
"enabled": {
|
|
267
|
+
"name": "enabled",
|
|
268
|
+
"type": "integer",
|
|
269
|
+
"primaryKey": false,
|
|
270
|
+
"notNull": true
|
|
271
|
+
},
|
|
272
|
+
"config": {
|
|
273
|
+
"name": "config",
|
|
274
|
+
"type": "jsonb",
|
|
275
|
+
"primaryKey": false,
|
|
276
|
+
"notNull": true
|
|
277
|
+
},
|
|
278
|
+
"created_at": {
|
|
279
|
+
"name": "created_at",
|
|
280
|
+
"type": "text",
|
|
281
|
+
"primaryKey": false,
|
|
282
|
+
"notNull": true
|
|
283
|
+
},
|
|
284
|
+
"updated_at": {
|
|
285
|
+
"name": "updated_at",
|
|
286
|
+
"type": "text",
|
|
287
|
+
"primaryKey": false,
|
|
288
|
+
"notNull": true
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
"indexes": {},
|
|
292
|
+
"foreignKeys": {},
|
|
293
|
+
"compositePrimaryKeys": {},
|
|
294
|
+
"uniqueConstraints": {
|
|
295
|
+
"plugin_installations_plugin_key_unique": {
|
|
296
|
+
"name": "plugin_installations_plugin_key_unique",
|
|
297
|
+
"nullsNotDistinct": false,
|
|
298
|
+
"columns": ["plugin_key"]
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
"policies": {},
|
|
302
|
+
"checkConstraints": {},
|
|
303
|
+
"isRLSEnabled": false
|
|
304
|
+
},
|
|
305
|
+
"public.subject_identities": {
|
|
306
|
+
"name": "subject_identities",
|
|
307
|
+
"schema": "",
|
|
308
|
+
"columns": {
|
|
309
|
+
"id": {
|
|
310
|
+
"name": "id",
|
|
311
|
+
"type": "text",
|
|
312
|
+
"primaryKey": true,
|
|
313
|
+
"notNull": true
|
|
314
|
+
},
|
|
315
|
+
"subject_id": {
|
|
316
|
+
"name": "subject_id",
|
|
317
|
+
"type": "text",
|
|
318
|
+
"primaryKey": false,
|
|
319
|
+
"notNull": true
|
|
320
|
+
},
|
|
321
|
+
"provider": {
|
|
322
|
+
"name": "provider",
|
|
323
|
+
"type": "text",
|
|
324
|
+
"primaryKey": false,
|
|
325
|
+
"notNull": true
|
|
326
|
+
},
|
|
327
|
+
"external_id": {
|
|
328
|
+
"name": "external_id",
|
|
329
|
+
"type": "text",
|
|
330
|
+
"primaryKey": false,
|
|
331
|
+
"notNull": true
|
|
332
|
+
},
|
|
333
|
+
"metadata": {
|
|
334
|
+
"name": "metadata",
|
|
335
|
+
"type": "jsonb",
|
|
336
|
+
"primaryKey": false,
|
|
337
|
+
"notNull": true
|
|
338
|
+
},
|
|
339
|
+
"created_at": {
|
|
340
|
+
"name": "created_at",
|
|
341
|
+
"type": "text",
|
|
342
|
+
"primaryKey": false,
|
|
343
|
+
"notNull": true
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
"indexes": {},
|
|
347
|
+
"foreignKeys": {
|
|
348
|
+
"subject_identities_subject_id_subjects_id_fk": {
|
|
349
|
+
"name": "subject_identities_subject_id_subjects_id_fk",
|
|
350
|
+
"tableFrom": "subject_identities",
|
|
351
|
+
"tableTo": "subjects",
|
|
352
|
+
"columnsFrom": ["subject_id"],
|
|
353
|
+
"columnsTo": ["id"],
|
|
354
|
+
"onDelete": "cascade",
|
|
355
|
+
"onUpdate": "no action"
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
"compositePrimaryKeys": {},
|
|
359
|
+
"uniqueConstraints": {
|
|
360
|
+
"subject_identities_provider_external_id_unique": {
|
|
361
|
+
"name": "subject_identities_provider_external_id_unique",
|
|
362
|
+
"nullsNotDistinct": false,
|
|
363
|
+
"columns": ["provider", "external_id"]
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
"policies": {},
|
|
367
|
+
"checkConstraints": {},
|
|
368
|
+
"isRLSEnabled": false
|
|
369
|
+
},
|
|
370
|
+
"public.subjects": {
|
|
371
|
+
"name": "subjects",
|
|
372
|
+
"schema": "",
|
|
373
|
+
"columns": {
|
|
374
|
+
"id": {
|
|
375
|
+
"name": "id",
|
|
376
|
+
"type": "text",
|
|
377
|
+
"primaryKey": true,
|
|
378
|
+
"notNull": true
|
|
379
|
+
},
|
|
380
|
+
"email": {
|
|
381
|
+
"name": "email",
|
|
382
|
+
"type": "text",
|
|
383
|
+
"primaryKey": false,
|
|
384
|
+
"notNull": false
|
|
385
|
+
},
|
|
386
|
+
"name": {
|
|
387
|
+
"name": "name",
|
|
388
|
+
"type": "text",
|
|
389
|
+
"primaryKey": false,
|
|
390
|
+
"notNull": false
|
|
391
|
+
},
|
|
392
|
+
"external_ref": {
|
|
393
|
+
"name": "external_ref",
|
|
394
|
+
"type": "text",
|
|
395
|
+
"primaryKey": false,
|
|
396
|
+
"notNull": false
|
|
397
|
+
},
|
|
398
|
+
"metadata": {
|
|
399
|
+
"name": "metadata",
|
|
400
|
+
"type": "jsonb",
|
|
401
|
+
"primaryKey": false,
|
|
402
|
+
"notNull": true
|
|
403
|
+
},
|
|
404
|
+
"created_at": {
|
|
405
|
+
"name": "created_at",
|
|
406
|
+
"type": "text",
|
|
407
|
+
"primaryKey": false,
|
|
408
|
+
"notNull": true
|
|
409
|
+
},
|
|
410
|
+
"updated_at": {
|
|
411
|
+
"name": "updated_at",
|
|
412
|
+
"type": "text",
|
|
413
|
+
"primaryKey": false,
|
|
414
|
+
"notNull": true
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
"indexes": {},
|
|
418
|
+
"foreignKeys": {},
|
|
419
|
+
"compositePrimaryKeys": {},
|
|
420
|
+
"uniqueConstraints": {},
|
|
421
|
+
"policies": {},
|
|
422
|
+
"checkConstraints": {},
|
|
423
|
+
"isRLSEnabled": false
|
|
424
|
+
},
|
|
425
|
+
"public.subscriptions": {
|
|
426
|
+
"name": "subscriptions",
|
|
427
|
+
"schema": "",
|
|
428
|
+
"columns": {
|
|
429
|
+
"id": {
|
|
430
|
+
"name": "id",
|
|
431
|
+
"type": "text",
|
|
432
|
+
"primaryKey": true,
|
|
433
|
+
"notNull": true
|
|
434
|
+
},
|
|
435
|
+
"subject_id": {
|
|
436
|
+
"name": "subject_id",
|
|
437
|
+
"type": "text",
|
|
438
|
+
"primaryKey": false,
|
|
439
|
+
"notNull": true
|
|
440
|
+
},
|
|
441
|
+
"plan_id": {
|
|
442
|
+
"name": "plan_id",
|
|
443
|
+
"type": "text",
|
|
444
|
+
"primaryKey": false,
|
|
445
|
+
"notNull": true
|
|
446
|
+
},
|
|
447
|
+
"plugin_key": {
|
|
448
|
+
"name": "plugin_key",
|
|
449
|
+
"type": "text",
|
|
450
|
+
"primaryKey": false,
|
|
451
|
+
"notNull": true
|
|
452
|
+
},
|
|
453
|
+
"source_type": {
|
|
454
|
+
"name": "source_type",
|
|
455
|
+
"type": "text",
|
|
456
|
+
"primaryKey": false,
|
|
457
|
+
"notNull": true
|
|
458
|
+
},
|
|
459
|
+
"source_ref": {
|
|
460
|
+
"name": "source_ref",
|
|
461
|
+
"type": "text",
|
|
462
|
+
"primaryKey": false,
|
|
463
|
+
"notNull": true
|
|
464
|
+
},
|
|
465
|
+
"status": {
|
|
466
|
+
"name": "status",
|
|
467
|
+
"type": "text",
|
|
468
|
+
"primaryKey": false,
|
|
469
|
+
"notNull": true
|
|
470
|
+
},
|
|
471
|
+
"current_period_start": {
|
|
472
|
+
"name": "current_period_start",
|
|
473
|
+
"type": "text",
|
|
474
|
+
"primaryKey": false,
|
|
475
|
+
"notNull": false
|
|
476
|
+
},
|
|
477
|
+
"current_period_end": {
|
|
478
|
+
"name": "current_period_end",
|
|
479
|
+
"type": "text",
|
|
480
|
+
"primaryKey": false,
|
|
481
|
+
"notNull": false
|
|
482
|
+
},
|
|
483
|
+
"trial_end_at": {
|
|
484
|
+
"name": "trial_end_at",
|
|
485
|
+
"type": "text",
|
|
486
|
+
"primaryKey": false,
|
|
487
|
+
"notNull": false
|
|
488
|
+
},
|
|
489
|
+
"cancel_at": {
|
|
490
|
+
"name": "cancel_at",
|
|
491
|
+
"type": "text",
|
|
492
|
+
"primaryKey": false,
|
|
493
|
+
"notNull": false
|
|
494
|
+
},
|
|
495
|
+
"metadata": {
|
|
496
|
+
"name": "metadata",
|
|
497
|
+
"type": "jsonb",
|
|
498
|
+
"primaryKey": false,
|
|
499
|
+
"notNull": true
|
|
500
|
+
},
|
|
501
|
+
"created_at": {
|
|
502
|
+
"name": "created_at",
|
|
503
|
+
"type": "text",
|
|
504
|
+
"primaryKey": false,
|
|
505
|
+
"notNull": true
|
|
506
|
+
},
|
|
507
|
+
"updated_at": {
|
|
508
|
+
"name": "updated_at",
|
|
509
|
+
"type": "text",
|
|
510
|
+
"primaryKey": false,
|
|
511
|
+
"notNull": true
|
|
512
|
+
}
|
|
513
|
+
},
|
|
514
|
+
"indexes": {},
|
|
515
|
+
"foreignKeys": {
|
|
516
|
+
"subscriptions_subject_id_subjects_id_fk": {
|
|
517
|
+
"name": "subscriptions_subject_id_subjects_id_fk",
|
|
518
|
+
"tableFrom": "subscriptions",
|
|
519
|
+
"tableTo": "subjects",
|
|
520
|
+
"columnsFrom": ["subject_id"],
|
|
521
|
+
"columnsTo": ["id"],
|
|
522
|
+
"onDelete": "cascade",
|
|
523
|
+
"onUpdate": "no action"
|
|
524
|
+
},
|
|
525
|
+
"subscriptions_plan_id_plans_id_fk": {
|
|
526
|
+
"name": "subscriptions_plan_id_plans_id_fk",
|
|
527
|
+
"tableFrom": "subscriptions",
|
|
528
|
+
"tableTo": "plans",
|
|
529
|
+
"columnsFrom": ["plan_id"],
|
|
530
|
+
"columnsTo": ["id"],
|
|
531
|
+
"onDelete": "restrict",
|
|
532
|
+
"onUpdate": "no action"
|
|
533
|
+
}
|
|
534
|
+
},
|
|
535
|
+
"compositePrimaryKeys": {},
|
|
536
|
+
"uniqueConstraints": {
|
|
537
|
+
"subscriptions_plugin_key_source_ref_unique": {
|
|
538
|
+
"name": "subscriptions_plugin_key_source_ref_unique",
|
|
539
|
+
"nullsNotDistinct": false,
|
|
540
|
+
"columns": ["plugin_key", "source_ref"]
|
|
541
|
+
}
|
|
542
|
+
},
|
|
543
|
+
"policies": {},
|
|
544
|
+
"checkConstraints": {},
|
|
545
|
+
"isRLSEnabled": false
|
|
546
|
+
}
|
|
547
|
+
},
|
|
548
|
+
"enums": {},
|
|
549
|
+
"schemas": {},
|
|
550
|
+
"sequences": {},
|
|
551
|
+
"roles": {},
|
|
552
|
+
"policies": {},
|
|
553
|
+
"views": {},
|
|
554
|
+
"_meta": {
|
|
555
|
+
"columns": {},
|
|
556
|
+
"schemas": {},
|
|
557
|
+
"tables": {}
|
|
558
|
+
}
|
|
559
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@shdan/submesh",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Submesh SDK for embedding subscription infrastructure into backend services.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Shdan <hello@shdan.in> (https://shdan.in)",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/shdan-in/submesh.git",
|
|
10
|
+
"directory": "packages/submesh"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://submesh.shdan.in",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/shdan-in/submesh/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"subscription",
|
|
18
|
+
"entitlement",
|
|
19
|
+
"billing",
|
|
20
|
+
"saas",
|
|
21
|
+
"sdk",
|
|
22
|
+
"google-play",
|
|
23
|
+
"app-store"
|
|
24
|
+
],
|
|
25
|
+
"type": "module",
|
|
26
|
+
"sideEffects": false,
|
|
27
|
+
"main": "./dist/index.js",
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"exports": {
|
|
30
|
+
".": {
|
|
31
|
+
"types": "./dist/index.d.ts",
|
|
32
|
+
"import": "./dist/index.js"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"files": [
|
|
36
|
+
"dist",
|
|
37
|
+
"drizzle"
|
|
38
|
+
],
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=20"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"drizzle-orm": "^0.44.5",
|
|
44
|
+
"postgres": "^3.4.7",
|
|
45
|
+
"@shdan/submesh-core": "0.1.0"
|
|
46
|
+
},
|
|
47
|
+
"publishConfig": {
|
|
48
|
+
"access": "public"
|
|
49
|
+
},
|
|
50
|
+
"scripts": {
|
|
51
|
+
"build": "tsc -p tsconfig.build.json",
|
|
52
|
+
"typecheck": "tsc -p tsconfig.json"
|
|
53
|
+
}
|
|
54
|
+
}
|