@simplelayer/graniteer-core 0.4.3 → 0.5.0-rc.1
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 +4 -0
- package/dist/bookingAgreementEmail.d.ts +34 -3
- package/dist/bookingAgreementEmail.js +100 -1
- package/dist/bookingEffects.d.ts +3 -1
- package/dist/bookingEffects.js +4 -3
- package/dist/bookingSource.d.ts +2 -0
- package/dist/bookingSource.js +11 -0
- package/dist/businessHours.d.ts +11 -0
- package/dist/businessHours.js +55 -0
- package/dist/checkoutSessionParams.d.ts +33 -0
- package/dist/checkoutSessionParams.js +71 -0
- package/dist/commonsSignedUnpaidCancellation.d.ts +154 -0
- package/dist/commonsSignedUnpaidCancellation.js +650 -0
- package/dist/connectBookingCharge.d.ts +49 -0
- package/dist/connectBookingCharge.js +72 -0
- package/dist/entitlements.d.ts +1 -1
- package/dist/entitlements.js +6 -1
- package/dist/functions/admin-acknowledge-contract-violation.d.ts +1 -0
- package/dist/functions/admin-acknowledge-contract-violation.js +120 -0
- package/dist/functions/admin-cancel-membership.js +109 -13
- package/dist/functions/admin-change-membership-plan.js +74 -18
- package/dist/functions/admin-charge-guest-print.d.ts +3 -1
- package/dist/functions/admin-charge-guest-print.js +8 -1
- package/dist/functions/admin-create-booking.d.ts +8 -3
- package/dist/functions/admin-create-booking.js +15 -2
- package/dist/functions/admin-create-commons-event.d.ts +3 -1
- package/dist/functions/admin-create-commons-event.js +8 -1
- package/dist/functions/admin-door-write.d.ts +3 -1
- package/dist/functions/admin-door-write.js +8 -1
- package/dist/functions/admin-issue-day-pass.d.ts +1 -0
- package/dist/functions/admin-issue-day-pass.js +8 -1
- package/dist/functions/admin-mark-booking-paid.d.ts +6 -1
- package/dist/functions/admin-mark-booking-paid.js +27 -3
- package/dist/functions/admin-request-trial.js +22 -1
- package/dist/functions/auth-email-hook.js +42 -2
- package/dist/functions/booking-access-revoke-backstop.d.ts +11 -0
- package/dist/functions/booking-access-revoke-backstop.js +121 -0
- package/dist/functions/booking-access-revoke-door-state.d.ts +22 -0
- package/dist/functions/booking-access-revoke-door-state.js +61 -0
- package/dist/functions/booking-access-revoke.d.ts +35 -0
- package/dist/functions/booking-access-revoke.js +280 -0
- package/dist/functions/booking-availability.d.ts +2 -1
- package/dist/functions/booking-availability.js +14 -5
- package/dist/functions/conductor.js +39 -16
- package/dist/functions/create-booking.d.ts +10 -3
- package/dist/functions/create-booking.js +22 -4
- package/dist/functions/create-day-pass-checkout.d.ts +1 -0
- package/dist/functions/create-day-pass-checkout.js +6 -0
- package/dist/functions/create-subscription-checkout.js +7 -2
- package/dist/functions/event-access-admin.d.ts +1 -0
- package/dist/functions/event-access-admin.js +23 -1
- package/dist/functions/event-access-store.js +18 -0
- package/dist/functions/guest-print-setup-confirm.d.ts +3 -1
- package/dist/functions/guest-print-setup-confirm.js +8 -1
- package/dist/functions/guest-print-submit.d.ts +3 -1
- package/dist/functions/guest-print-submit.js +8 -1
- package/dist/functions/manage-booking.d.ts +24 -1
- package/dist/functions/manage-booking.js +151 -16
- package/dist/functions/mcp.d.ts +2 -2
- package/dist/functions/mcp.js +2 -2
- package/dist/functions/member-door-action.d.ts +3 -1
- package/dist/functions/member-door-action.js +9 -2
- package/dist/functions/membership-door-sync.d.ts +18 -0
- package/dist/functions/membership-door-sync.js +76 -6
- package/dist/functions/office-assignment-end.d.ts +3 -1
- package/dist/functions/office-assignment-end.js +8 -1
- package/dist/functions/portal-submit-event.d.ts +1 -0
- package/dist/functions/portal-submit-event.js +4 -0
- package/dist/functions/reschedule-booking.d.ts +11 -4
- package/dist/functions/reschedule-booking.js +39 -2
- package/dist/functions/review-ratings.js +1 -1
- package/dist/functions/space-availability-range.d.ts +2 -1
- package/dist/functions/space-availability-range.js +8 -1
- package/dist/functions/stripe-db-reconcile.js +8 -1
- package/dist/functions/stripe-webhook.d.ts +4 -0
- package/dist/functions/stripe-webhook.js +328 -17
- package/dist/functions/sync-gcal-blackouts.js +1 -1
- package/dist/functions/timetable-event-register.d.ts +3 -1
- package/dist/functions/timetable-event-register.js +8 -1
- package/dist/functions/touch-pass-signup.d.ts +3 -1
- package/dist/functions/touch-pass-signup.js +9 -2
- package/dist/functions/voice-booking.d.ts +1 -1
- package/dist/functions/voice-day-pass.d.ts +2 -1
- package/dist/functions/voice-day-pass.js +4 -0
- package/dist/functions/voice-inquiry.d.ts +3 -1
- package/dist/functions/voice-inquiry.js +9 -2
- package/dist/functions/voice-membership-signup.d.ts +2 -2
- package/dist/functions/voice-tour-booking.d.ts +1 -1
- package/dist/gcalBookingEvents.d.ts +59 -0
- package/dist/gcalBookingEvents.js +183 -0
- package/dist/gcalSync.d.ts +1 -0
- package/dist/gcalSync.js +5 -0
- package/dist/membershipSubscriptionItems.d.ts +87 -0
- package/dist/membershipSubscriptionItems.js +71 -0
- package/dist/membershipWelcome.d.ts +1 -1
- package/dist/ops.js +4 -3
- package/dist/outbox.d.ts +64 -0
- package/dist/outbox.js +70 -0
- package/dist/pricing.d.ts +10 -2
- package/dist/pricing.js +14 -9
- package/dist/referralCodeLookup.d.ts +13 -0
- package/dist/referralCodeLookup.js +17 -0
- package/dist/referralCredits.d.ts +5 -0
- package/dist/referralCredits.js +5 -0
- package/dist/referralGrant.d.ts +4 -31
- package/dist/referralGrant.js +14 -234
- package/dist/runtime/env.d.ts +7 -0
- package/dist/runtime/env.js +32 -0
- package/dist/runtime/fs.d.ts +5 -0
- package/dist/runtime/fs.js +16 -0
- package/dist/runtime/serve.d.ts +8 -0
- package/dist/runtime/serve.js +12 -0
- package/dist/stripeConnectEvents.d.ts +11 -0
- package/dist/stripeConnectEvents.js +37 -0
- package/dist/supabaseTestFakes.js +7 -1
- package/dist/tenant-config.d.ts +8 -0
- package/dist/tenant-config.js +25 -0
- package/dist/tenantManifest.d.ts +85 -0
- package/dist/tenantManifest.js +43 -0
- package/package.json +59 -3
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const tenantManifestSchema: z.ZodObject<{
|
|
3
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
4
|
+
tenantId: z.ZodString;
|
|
5
|
+
planId: z.ZodString;
|
|
6
|
+
brandName: z.ZodString;
|
|
7
|
+
domain: z.ZodString;
|
|
8
|
+
publicUrl: z.ZodEffects<z.ZodString, string, string>;
|
|
9
|
+
parentPageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
10
|
+
embedOrigins: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, "many">>;
|
|
11
|
+
frameAncestors: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, "many">>;
|
|
12
|
+
timezone: z.ZodString;
|
|
13
|
+
supportEmail: z.ZodString;
|
|
14
|
+
calendarId: z.ZodOptional<z.ZodString>;
|
|
15
|
+
roomSlug: z.ZodOptional<z.ZodString>;
|
|
16
|
+
calendarEventApp: z.ZodOptional<z.ZodString>;
|
|
17
|
+
poweredBy: z.ZodOptional<z.ZodObject<{
|
|
18
|
+
label: z.ZodString;
|
|
19
|
+
url: z.ZodString;
|
|
20
|
+
}, "strict", z.ZodTypeAny, {
|
|
21
|
+
url?: string;
|
|
22
|
+
label?: string;
|
|
23
|
+
}, {
|
|
24
|
+
url?: string;
|
|
25
|
+
label?: string;
|
|
26
|
+
}>>;
|
|
27
|
+
sources: z.ZodObject<{
|
|
28
|
+
fallback: z.ZodString;
|
|
29
|
+
known: z.ZodArray<z.ZodString, "many">;
|
|
30
|
+
}, "strict", z.ZodTypeAny, {
|
|
31
|
+
fallback?: string;
|
|
32
|
+
known?: string[];
|
|
33
|
+
}, {
|
|
34
|
+
fallback?: string;
|
|
35
|
+
known?: string[];
|
|
36
|
+
}>;
|
|
37
|
+
}, "strict", z.ZodTypeAny, {
|
|
38
|
+
domain?: string;
|
|
39
|
+
schemaVersion?: 1;
|
|
40
|
+
tenantId?: string;
|
|
41
|
+
planId?: string;
|
|
42
|
+
brandName?: string;
|
|
43
|
+
publicUrl?: string;
|
|
44
|
+
parentPageUrl?: string;
|
|
45
|
+
embedOrigins?: string[];
|
|
46
|
+
frameAncestors?: string[];
|
|
47
|
+
timezone?: string;
|
|
48
|
+
supportEmail?: string;
|
|
49
|
+
calendarId?: string;
|
|
50
|
+
roomSlug?: string;
|
|
51
|
+
calendarEventApp?: string;
|
|
52
|
+
poweredBy?: {
|
|
53
|
+
url?: string;
|
|
54
|
+
label?: string;
|
|
55
|
+
};
|
|
56
|
+
sources?: {
|
|
57
|
+
fallback?: string;
|
|
58
|
+
known?: string[];
|
|
59
|
+
};
|
|
60
|
+
}, {
|
|
61
|
+
domain?: string;
|
|
62
|
+
schemaVersion?: 1;
|
|
63
|
+
tenantId?: string;
|
|
64
|
+
planId?: string;
|
|
65
|
+
brandName?: string;
|
|
66
|
+
publicUrl?: string;
|
|
67
|
+
parentPageUrl?: string;
|
|
68
|
+
embedOrigins?: string[];
|
|
69
|
+
frameAncestors?: string[];
|
|
70
|
+
timezone?: string;
|
|
71
|
+
supportEmail?: string;
|
|
72
|
+
calendarId?: string;
|
|
73
|
+
roomSlug?: string;
|
|
74
|
+
calendarEventApp?: string;
|
|
75
|
+
poweredBy?: {
|
|
76
|
+
url?: string;
|
|
77
|
+
label?: string;
|
|
78
|
+
};
|
|
79
|
+
sources?: {
|
|
80
|
+
fallback?: string;
|
|
81
|
+
known?: string[];
|
|
82
|
+
};
|
|
83
|
+
}>;
|
|
84
|
+
export type TenantManifest = z.infer<typeof tenantManifestSchema>;
|
|
85
|
+
export declare function parseTenantManifest(json: unknown): TenantManifest;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
const httpsUrl = z
|
|
3
|
+
.string()
|
|
4
|
+
.url()
|
|
5
|
+
.refine((v) => v.startsWith('https://'), { message: 'must be an https URL' });
|
|
6
|
+
const httpsOrigin = httpsUrl.refine((v) => {
|
|
7
|
+
try {
|
|
8
|
+
return new URL(v).origin === v;
|
|
9
|
+
}
|
|
10
|
+
catch {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
}, { message: 'must be an origin (scheme and host only, no path or trailing slash)' });
|
|
14
|
+
const nonEmpty = z.string().trim().min(1);
|
|
15
|
+
export const tenantManifestSchema = z
|
|
16
|
+
.object({
|
|
17
|
+
schemaVersion: z.literal(1),
|
|
18
|
+
tenantId: nonEmpty,
|
|
19
|
+
planId: z.string(),
|
|
20
|
+
brandName: nonEmpty,
|
|
21
|
+
domain: nonEmpty,
|
|
22
|
+
publicUrl: httpsUrl,
|
|
23
|
+
parentPageUrl: httpsUrl.optional(),
|
|
24
|
+
embedOrigins: z.array(httpsOrigin).optional(),
|
|
25
|
+
frameAncestors: z.array(httpsOrigin).optional(),
|
|
26
|
+
timezone: nonEmpty,
|
|
27
|
+
supportEmail: z.string().email(),
|
|
28
|
+
calendarId: nonEmpty.optional(),
|
|
29
|
+
roomSlug: nonEmpty.optional(),
|
|
30
|
+
calendarEventApp: nonEmpty.optional(),
|
|
31
|
+
poweredBy: z.object({ label: z.string(), url: z.string() }).strict().optional(),
|
|
32
|
+
sources: z
|
|
33
|
+
.object({
|
|
34
|
+
fallback: nonEmpty,
|
|
35
|
+
known: z.array(nonEmpty),
|
|
36
|
+
})
|
|
37
|
+
.strict(),
|
|
38
|
+
})
|
|
39
|
+
.strict();
|
|
40
|
+
export function parseTenantManifest(json) {
|
|
41
|
+
const value = typeof json === 'string' ? JSON.parse(json) : json;
|
|
42
|
+
return tenantManifestSchema.parse(value);
|
|
43
|
+
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simplelayer/graniteer-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0-rc.1",
|
|
4
4
|
"description": "Shared platform core for Graniteer",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"test": "deno test --no-check --node-modules-dir=auto --allow-env --allow-net --allow-read src",
|
|
8
|
+
"test": "deno test --config deno.test.json --no-check --node-modules-dir=auto --allow-env --allow-net --allow-read src",
|
|
9
9
|
"build": "node scripts/build.mjs",
|
|
10
10
|
"verify:dist": "node scripts/verify-dist.mjs",
|
|
11
11
|
"prepack": "npm run build && npm run verify:dist",
|
|
@@ -53,6 +53,10 @@
|
|
|
53
53
|
"types": "./dist/membershipBusClient.d.ts",
|
|
54
54
|
"default": "./dist/membershipBusClient.js"
|
|
55
55
|
},
|
|
56
|
+
"./membershipSubscriptionItems": {
|
|
57
|
+
"types": "./dist/membershipSubscriptionItems.d.ts",
|
|
58
|
+
"default": "./dist/membershipSubscriptionItems.js"
|
|
59
|
+
},
|
|
56
60
|
"./membershipWelcome": {
|
|
57
61
|
"types": "./dist/membershipWelcome.d.ts",
|
|
58
62
|
"default": "./dist/membershipWelcome.js"
|
|
@@ -113,6 +117,10 @@
|
|
|
113
117
|
"types": "./dist/commonsDepositWebhook.d.ts",
|
|
114
118
|
"default": "./dist/commonsDepositWebhook.js"
|
|
115
119
|
},
|
|
120
|
+
"./commonsSignedUnpaidCancellation": {
|
|
121
|
+
"types": "./dist/commonsSignedUnpaidCancellation.d.ts",
|
|
122
|
+
"default": "./dist/commonsSignedUnpaidCancellation.js"
|
|
123
|
+
},
|
|
116
124
|
"./conductorAdmin": {
|
|
117
125
|
"types": "./dist/conductorAdmin.d.ts",
|
|
118
126
|
"default": "./dist/conductorAdmin.js"
|
|
@@ -121,6 +129,10 @@
|
|
|
121
129
|
"types": "./dist/entitlements.d.ts",
|
|
122
130
|
"default": "./dist/entitlements.js"
|
|
123
131
|
},
|
|
132
|
+
"./tenantManifest": {
|
|
133
|
+
"types": "./dist/tenantManifest.d.ts",
|
|
134
|
+
"default": "./dist/tenantManifest.js"
|
|
135
|
+
},
|
|
124
136
|
"./email-change": {
|
|
125
137
|
"types": "./dist/email-templates/email-change.d.ts",
|
|
126
138
|
"default": "./dist/email-templates/email-change.js"
|
|
@@ -149,6 +161,38 @@
|
|
|
149
161
|
"types": "./dist/email-templates/signup.d.ts",
|
|
150
162
|
"default": "./dist/email-templates/signup.js"
|
|
151
163
|
},
|
|
164
|
+
"./bookingSource": {
|
|
165
|
+
"types": "./dist/bookingSource.d.ts",
|
|
166
|
+
"default": "./dist/bookingSource.js"
|
|
167
|
+
},
|
|
168
|
+
"./businessHours": {
|
|
169
|
+
"types": "./dist/businessHours.d.ts",
|
|
170
|
+
"default": "./dist/businessHours.js"
|
|
171
|
+
},
|
|
172
|
+
"./gcalBookingEvents": {
|
|
173
|
+
"types": "./dist/gcalBookingEvents.d.ts",
|
|
174
|
+
"default": "./dist/gcalBookingEvents.js"
|
|
175
|
+
},
|
|
176
|
+
"./connectBookingCharge": {
|
|
177
|
+
"types": "./dist/connectBookingCharge.d.ts",
|
|
178
|
+
"default": "./dist/connectBookingCharge.js"
|
|
179
|
+
},
|
|
180
|
+
"./stripeConnectEvents": {
|
|
181
|
+
"types": "./dist/stripeConnectEvents.d.ts",
|
|
182
|
+
"default": "./dist/stripeConnectEvents.js"
|
|
183
|
+
},
|
|
184
|
+
"./runtime/env": {
|
|
185
|
+
"types": "./dist/runtime/env.d.ts",
|
|
186
|
+
"default": "./dist/runtime/env.js"
|
|
187
|
+
},
|
|
188
|
+
"./runtime/serve": {
|
|
189
|
+
"types": "./dist/runtime/serve.d.ts",
|
|
190
|
+
"default": "./dist/runtime/serve.js"
|
|
191
|
+
},
|
|
192
|
+
"./runtime/fs": {
|
|
193
|
+
"types": "./dist/runtime/fs.d.ts",
|
|
194
|
+
"default": "./dist/runtime/fs.js"
|
|
195
|
+
},
|
|
152
196
|
"./gcalSync": {
|
|
153
197
|
"types": "./dist/gcalSync.d.ts",
|
|
154
198
|
"default": "./dist/gcalSync.js"
|
|
@@ -197,6 +241,10 @@
|
|
|
197
241
|
"types": "./dist/ops.d.ts",
|
|
198
242
|
"default": "./dist/ops.js"
|
|
199
243
|
},
|
|
244
|
+
"./outbox": {
|
|
245
|
+
"types": "./dist/outbox.d.ts",
|
|
246
|
+
"default": "./dist/outbox.js"
|
|
247
|
+
},
|
|
200
248
|
"./pacificDate": {
|
|
201
249
|
"types": "./dist/pacificDate.d.ts",
|
|
202
250
|
"default": "./dist/pacificDate.js"
|
|
@@ -273,6 +321,10 @@
|
|
|
273
321
|
"types": "./dist/tier1Agreement.d.ts",
|
|
274
322
|
"default": "./dist/tier1Agreement.js"
|
|
275
323
|
},
|
|
324
|
+
"./functions/admin-acknowledge-contract-violation": {
|
|
325
|
+
"types": "./dist/functions/admin-acknowledge-contract-violation.d.ts",
|
|
326
|
+
"default": "./dist/functions/admin-acknowledge-contract-violation.js"
|
|
327
|
+
},
|
|
276
328
|
"./functions/admin-cancel-membership": {
|
|
277
329
|
"types": "./dist/functions/admin-cancel-membership.d.ts",
|
|
278
330
|
"default": "./dist/functions/admin-cancel-membership.js"
|
|
@@ -385,6 +437,10 @@
|
|
|
385
437
|
"types": "./dist/functions/boldsign-sender-identity.d.ts",
|
|
386
438
|
"default": "./dist/functions/boldsign-sender-identity.js"
|
|
387
439
|
},
|
|
440
|
+
"./functions/booking-access-revoke-backstop": {
|
|
441
|
+
"types": "./dist/functions/booking-access-revoke-backstop.d.ts",
|
|
442
|
+
"default": "./dist/functions/booking-access-revoke-backstop.js"
|
|
443
|
+
},
|
|
388
444
|
"./functions/booking-availability": {
|
|
389
445
|
"types": "./dist/functions/booking-availability.d.ts",
|
|
390
446
|
"default": "./dist/functions/booking-availability.js"
|
|
@@ -645,7 +701,7 @@
|
|
|
645
701
|
"react": "18.3.1",
|
|
646
702
|
"stripe": "17.5.0",
|
|
647
703
|
"web-push": "3.6.7",
|
|
648
|
-
"zod": "3.
|
|
704
|
+
"zod": "^3.25.76"
|
|
649
705
|
},
|
|
650
706
|
"files": [
|
|
651
707
|
"dist"
|