@protobase/config 0.111.1 → 0.111.2

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/config.d.ts CHANGED
@@ -27,8 +27,8 @@ type AppKeys = AppIdentity & {
27
27
  */
28
28
  url?: string;
29
29
  /**
30
- * The app's secret, made with `openssl rand -base64 32`: it signs session cookies, upload tickets and download links
31
- * and public forms' bot checks, and encrypts the token signing keys. Default `PROTOBASE_SECRET`; required with sign-in.
30
+ * The app's secret, made with `openssl rand -base64 32`: it signs session cookies, upload tickets and download links,
31
+ * public forms' bot checks and unsubscribe links, and encrypts the token signing keys. Default `PROTOBASE_SECRET`; required with sign-in.
32
32
  */
33
33
  secret?: string;
34
34
  /**
@@ -104,6 +104,13 @@ export type ProtobaseConfig = AppKeys & ApiOptionKeys & {
104
104
  calls?: CallsOptions;
105
105
  /** The app's iOS and Android build (see `MobileConfig`). */
106
106
  mobile?: MobileConfig;
107
+ /**
108
+ * `true` gives bulk mail a one-click unsubscribe: mail a job sends with `bulk: true` and a `topic` carries the
109
+ * recipient's own unsubscribe link, and is not sent to whoever unsubscribed from its topic. Its links are on `url`
110
+ * and signed with `secret`; `protobase migration` writes its table, `mail.unsubscribes`. The server that signs the mail must DKIM-sign
111
+ * both unsubscribe headers, or mail clients show no button. Off by default.
112
+ */
113
+ unsubscribe?: boolean;
107
114
  /**
108
115
  * `true` keeps the tables the app's users add in its own database and serves each one like a resource of the config;
109
116
  * `protobase migration` writes the schemas they need. Off by default. With organizations, each keeps its own tables;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protobase/config",
3
- "version": "0.111.1",
3
+ "version": "0.111.2",
4
4
  "description": "defineConfig and the types of a Protobase project's protobase.config.ts, and the JSON Schema of protobase.config.json.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -31,6 +31,6 @@
31
31
  "access": "public"
32
32
  },
33
33
  "peerDependencies": {
34
- "@protobase/server": "0.111.1"
34
+ "@protobase/server": "0.111.2"
35
35
  }
36
36
  }
package/schema.json CHANGED
@@ -53,7 +53,7 @@
53
53
  ]
54
54
  },
55
55
  "secret": {
56
- "description": "The app's secret, made with `openssl rand -base64 32`: it signs session cookies, upload tickets and download links\nand public forms' bot checks, and encrypts the token signing keys. Default `PROTOBASE_SECRET`; required with sign-in.",
56
+ "description": "The app's secret, made with `openssl rand -base64 32`: it signs session cookies, upload tickets and download links,\npublic forms' bot checks and unsubscribe links, and encrypts the token signing keys. Default `PROTOBASE_SECRET`; required with sign-in.",
57
57
  "anyOf": [
58
58
  {
59
59
  "type": "string"
@@ -422,14 +422,7 @@
422
422
  "type": "object",
423
423
  "properties": {
424
424
  "sql": {
425
- "anyOf": [
426
- {
427
- "type": "boolean"
428
- },
429
- {
430
- "$ref": "#/definitions/EnvValue"
431
- }
432
- ]
425
+ "type": "boolean"
433
426
  },
434
427
  "writes": {
435
428
  "anyOf": [
@@ -640,25 +633,11 @@
640
633
  },
641
634
  "deliveryLog": {
642
635
  "description": "Also keep every try, successes too, for 30 days, listed as Webhook delivery log. Default false.",
643
- "anyOf": [
644
- {
645
- "type": "boolean"
646
- },
647
- {
648
- "$ref": "#/definitions/EnvValue"
649
- }
650
- ]
636
+ "type": "boolean"
651
637
  },
652
638
  "allowPrivateAddresses": {
653
639
  "description": "Lets subscriptions send to private, loopback and link-local addresses, for development and tests. Default false:\na URL whose host resolves to one is refused, so a subscription cannot reach the app's own network.",
654
- "anyOf": [
655
- {
656
- "type": "boolean"
657
- },
658
- {
659
- "$ref": "#/definitions/EnvValue"
660
- }
661
- ]
640
+ "type": "boolean"
662
641
  }
663
642
  },
664
643
  "additionalProperties": false
@@ -731,14 +710,7 @@
731
710
  },
732
711
  "allowPrivateAddresses": {
733
712
  "description": "Lets the `app:http` step reach private, loopback and link-local addresses, for development and tests. Default\nfalse: a URL whose host resolves to one fails the step, so a workflow cannot reach the app's own network.",
734
- "anyOf": [
735
- {
736
- "type": "boolean"
737
- },
738
- {
739
- "$ref": "#/definitions/EnvValue"
740
- }
741
- ]
713
+ "type": "boolean"
742
714
  },
743
715
  "secrets": {
744
716
  "description": "The environment variables workflows may read, each as `$states.context.Secrets.<NAME>`; no other is reachable.\nTheir values are blanked out of all a run records. Startup stops when one is unset or shorter than 8 characters.",
@@ -778,14 +750,7 @@
778
750
  },
779
751
  "customSteps": {
780
752
  "description": "Turns on custom steps, step types the app's authors keep as records, each saved version a type of its own,\n`custom:<name>:<version>`, which a workflow saves with and the app's runners run. Their jobs' arguments are sealed\nwith the app's secret, its sign-in's, else `PROTOBASE_SECRET`; startup stops without either. Default false; any\nother value than `true` or `false` stops startup.",
781
- "anyOf": [
782
- {
783
- "type": "boolean"
784
- },
785
- {
786
- "$ref": "#/definitions/EnvValue"
787
- }
788
- ]
753
+ "type": "boolean"
789
754
  },
790
755
  "runners": {
791
756
  "description": "How custom steps' jobs reach runners, in seconds: how long a claim is held open waiting for a job (`claimSeconds`,\ndefault 50), how long a runner holds a job without a heartbeat (`leaseSeconds`, 30), how long a job whose best free\nrunner lacks its image waits for one that has it (`coldWaitSeconds`, 5), and how long one whose best has its image\nwaits for a warm instance (`warmWaitSeconds`, 1). Startup stops on one that is not a number above 0, or for a wait,\n0 or more.",
@@ -900,14 +865,7 @@
900
865
  },
901
866
  "ui": {
902
867
  "description": "The bell in the top bar; default true. `false` keeps only the backend.",
903
- "anyOf": [
904
- {
905
- "type": "boolean"
906
- },
907
- {
908
- "$ref": "#/definitions/EnvValue"
909
- }
910
- ]
868
+ "type": "boolean"
911
869
  },
912
870
  "devices": {
913
871
  "description": "The devices table: its name, default `devices`, and its columns named otherwise than Protobase names them.",
@@ -1224,16 +1182,13 @@
1224
1182
  }
1225
1183
  ]
1226
1184
  },
1185
+ "unsubscribe": {
1186
+ "description": "`true` gives bulk mail a one-click unsubscribe: mail a job sends with `bulk: true` and a `topic` carries the\nrecipient's own unsubscribe link, and is not sent to whoever unsubscribed from its topic. Its links are on `url`\nand signed with `secret`; `protobase migration` writes its table, `mail.unsubscribes`. The server that signs the mail must DKIM-sign\nboth unsubscribe headers, or mail clients show no button. Off by default.",
1187
+ "type": "boolean"
1188
+ },
1227
1189
  "userTables": {
1228
1190
  "description": "`true` keeps the tables the app's users add in its own database and serves each one like a resource of the config;\n`protobase migration` writes the schemas they need. Off by default. With organizations, each keeps its own tables;\nrefused with `authenticate.organizations` alone.",
1229
- "anyOf": [
1230
- {
1231
- "type": "boolean"
1232
- },
1233
- {
1234
- "$ref": "#/definitions/EnvValue"
1235
- }
1236
- ]
1191
+ "type": "boolean"
1237
1192
  },
1238
1193
  "resources": {
1239
1194
  "description": "`'none'` says the app has no resources on purpose, such as an app that only signs people in: `protobase doctor`\nthen accepts a config with none, and refuses one that exports any. Unset, doctor refuses an app with none, which\nhas usually lost them by mistake.",
@@ -1541,14 +1496,7 @@
1541
1496
  ]
1542
1497
  },
1543
1498
  "beforeSignIn": {
1544
- "anyOf": [
1545
- {
1546
- "type": "boolean"
1547
- },
1548
- {
1549
- "$ref": "#/definitions/EnvValue"
1550
- }
1551
- ]
1499
+ "type": "boolean"
1552
1500
  }
1553
1501
  },
1554
1502
  "required": [
@@ -2170,14 +2118,7 @@
2170
2118
  },
2171
2119
  "encryptOAuthTokens": {
2172
2120
  "description": "Encrypt the OAuth access and refresh tokens Better Auth stores for social sign-ins, with `secret`; `personalMail` and workflow connections need it. Default off.",
2173
- "anyOf": [
2174
- {
2175
- "type": "boolean"
2176
- },
2177
- {
2178
- "$ref": "#/definitions/EnvValue"
2179
- }
2180
- ]
2121
+ "type": "boolean"
2181
2122
  },
2182
2123
  "connections": {
2183
2124
  "description": "The OAuth client of each workflow plugin's connection that signs in through a provider of its own, by\n`<plugin>:<connection>`, such as `{ 'acme:account': { clientId, clientSecret } }`; its redirect URI is\n`{baseURL}/api/auth/callback/workflow-<plugin>-<connection>`. A connection through one of `socialProviders` needs none.",
@@ -2234,25 +2175,11 @@
2234
2175
  },
2235
2176
  "leakedPasswords": {
2236
2177
  "description": "Refuses a new password that appears in a known data breach, by Have I Been Pwned's password list: at sign-up, from\nan invitation, and when a password is set, changed, reset or given by an admin. Only the first five characters of\nthe password's SHA-1 hash leave the server. While the list cannot be reached, setting a password fails. Default off.",
2237
- "anyOf": [
2238
- {
2239
- "type": "boolean"
2240
- },
2241
- {
2242
- "$ref": "#/definitions/EnvValue"
2243
- }
2244
- ]
2178
+ "type": "boolean"
2245
2179
  },
2246
2180
  "accountDeletion": {
2247
2181
  "description": "Lets the signed-in person delete their own account from the account page, with their password or from a session\nthat signed in within the last day; `false` turns it off, for apps whose accounts are managed by an organization's\nadmins. Default on, as app stores require an app that makes accounts to delete them too.",
2248
- "anyOf": [
2249
- {
2250
- "type": "boolean"
2251
- },
2252
- {
2253
- "$ref": "#/definitions/EnvValue"
2254
- }
2255
- ]
2182
+ "type": "boolean"
2256
2183
  },
2257
2184
  "operator": {
2258
2185
  "description": "The identity provider the operator's staff sign in with to sign in as people of this app, for support. Defaults\nto the one the platform passes in `PROTOBASE_OPERATOR_ISSUER`, `PROTOBASE_OPERATOR_CLIENT_ID` and\n`PROTOBASE_OPERATOR_CLIENT_SECRET` (see `readOperatorSettings`), when set; `false` turns staff sign-in off\nwhatever the environment says.",
@@ -2840,47 +2767,19 @@
2840
2767
  },
2841
2768
  "hidden": {
2842
2769
  "description": "Keeps people's links to the provider off their account page: not listed among the connected accounts, and not\nconnected or disconnected there. The link still signs them in, and goes with the person. Default off.",
2843
- "anyOf": [
2844
- {
2845
- "type": "boolean"
2846
- },
2847
- {
2848
- "$ref": "#/definitions/EnvValue"
2849
- }
2850
- ]
2770
+ "type": "boolean"
2851
2771
  },
2852
2772
  "button": {
2853
2773
  "description": "Whether the sign-in page shows \"Continue with {name}\" for it. With `false`, people sign in through its pages only\nwhen something sends them there: a sign-in link (`?sign-in={provider}`) or a redirect another app starts. Only for a\nprovider with pages. Default on.",
2854
- "anyOf": [
2855
- {
2856
- "type": "boolean"
2857
- },
2858
- {
2859
- "$ref": "#/definitions/EnvValue"
2860
- }
2861
- ]
2774
+ "type": "boolean"
2862
2775
  },
2863
2776
  "tokenSignIn": {
2864
2777
  "description": "Token sign-in: a client that holds a fresh ID token the provider issued for this app posts it instead of sending\nthe browser through the provider, and gets the app's own session (see `idTokenSignInPlugin`). Default off.",
2865
- "anyOf": [
2866
- {
2867
- "type": "boolean"
2868
- },
2869
- {
2870
- "$ref": "#/definitions/EnvValue"
2871
- }
2872
- ]
2778
+ "type": "boolean"
2873
2779
  },
2874
2780
  "devices": {
2875
2781
  "description": "Each device is an account of its own: the provider gives every device a subject of its own, and a person holds\nas many accounts of it as they have devices, each linked by the address on its first sign-in like any other. The\naccount page lists them among the devices, named by `name` and the token's `device_name` claim, not among the\nconnected accounts; signing one out there removes it and ends its sessions, and its subject never signs in again.\nNeeds `tokenSignIn` without a `clientSecret`: a device signs in by token alone. Default off.",
2876
- "anyOf": [
2877
- {
2878
- "type": "boolean"
2879
- },
2880
- {
2881
- "$ref": "#/definitions/EnvValue"
2882
- }
2883
- ]
2782
+ "type": "boolean"
2884
2783
  }
2885
2784
  },
2886
2785
  "required": [
@@ -3111,14 +3010,7 @@
3111
3010
  "properties": {
3112
3011
  "api": {
3113
3012
  "description": "OAuth clients may ask for access tokens for the app's API (`resource=<origin>/api`), such as a native app that signs\nin through the connect page, and the API takes them as `Authorization: Bearer <token>`. Off by default.",
3114
- "anyOf": [
3115
- {
3116
- "type": "boolean"
3117
- },
3118
- {
3119
- "$ref": "#/definitions/EnvValue"
3120
- }
3121
- ]
3013
+ "type": "boolean"
3122
3014
  }
3123
3015
  },
3124
3016
  "additionalProperties": false
@@ -3255,14 +3147,7 @@
3255
3147
  },
3256
3148
  "exchange": {
3257
3149
  "description": "May exchange its access token for an ID token of another client or an origin of `audiences`. Default false.",
3258
- "anyOf": [
3259
- {
3260
- "type": "boolean"
3261
- },
3262
- {
3263
- "$ref": "#/definitions/EnvValue"
3264
- }
3265
- ]
3150
+ "type": "boolean"
3266
3151
  }
3267
3152
  },
3268
3153
  "required": [
@@ -3297,14 +3182,7 @@
3297
3182
  "properties": {
3298
3183
  "organizations": {
3299
3184
  "description": "Whether the tokens carry organizations; read from `auth` when given. Needed with `jwksUrl` only.",
3300
- "anyOf": [
3301
- {
3302
- "type": "boolean"
3303
- },
3304
- {
3305
- "$ref": "#/definitions/EnvValue"
3306
- }
3307
- ]
3185
+ "type": "boolean"
3308
3186
  },
3309
3187
  "jwksUrl": {
3310
3188
  "description": "Or its JWKS endpoint, for an API that runs apart from the auth server. Needs `issuer`.",
@@ -3540,14 +3418,7 @@
3540
3418
  },
3541
3419
  "longQueries": {
3542
3420
  "description": "Its queries through `db` may run up to 30 seconds instead of the database's own limit, on a connection kept for\nsuch work: for imports, backfills, large deletes and other bulk work.",
3543
- "anyOf": [
3544
- {
3545
- "type": "boolean"
3546
- },
3547
- {
3548
- "$ref": "#/definitions/EnvValue"
3549
- }
3550
- ]
3421
+ "type": "boolean"
3551
3422
  },
3552
3423
  "concurrency": {
3553
3424
  "description": "Jobs of this name running at once in each worker process. Default 1.",
@@ -3562,14 +3433,7 @@
3562
3433
  },
3563
3434
  "ordered": {
3564
3435
  "description": "Jobs run one at a time per group, in the order they were enqueued, and every enqueue names its group. A job that is\nretrying or failed holds back the rest of its group until it succeeds, or is retried or deleted in the admin app.",
3565
- "anyOf": [
3566
- {
3567
- "type": "boolean"
3568
- },
3569
- {
3570
- "$ref": "#/definitions/EnvValue"
3571
- }
3572
- ]
3436
+ "type": "boolean"
3573
3437
  },
3574
3438
  "schedule": {
3575
3439
  "description": "Runs the job on this cron schedule, such as `0 7 * * *` (with an optional seconds field first), with no payload: one\nrun per time, however many workers run. A run missed while no worker ran happens once, as soon as one does.",
@@ -3667,14 +3531,7 @@
3667
3531
  },
3668
3532
  "optional": {
3669
3533
  "description": "It may be left out.",
3670
- "anyOf": [
3671
- {
3672
- "type": "boolean"
3673
- },
3674
- {
3675
- "$ref": "#/definitions/EnvValue"
3676
- }
3677
- ]
3534
+ "type": "boolean"
3678
3535
  },
3679
3536
  "values": {
3680
3537
  "description": "An enum's values.",
@@ -3929,14 +3786,7 @@
3929
3786
  },
3930
3787
  "public": {
3931
3788
  "description": "Files anyone with the link may open, served without a signature.",
3932
- "anyOf": [
3933
- {
3934
- "type": "boolean"
3935
- },
3936
- {
3937
- "$ref": "#/definitions/EnvValue"
3938
- }
3939
- ]
3789
+ "type": "boolean"
3940
3790
  },
3941
3791
  "publicUrl": {
3942
3792
  "description": "Where public files are linked from instead of the app's own `/api/files/<provider>`, such as a CDN in front of it.",
@@ -4073,14 +3923,7 @@
4073
3923
  },
4074
3924
  "public": {
4075
3925
  "description": "Files anyone with the link may open.",
4076
- "anyOf": [
4077
- {
4078
- "type": "boolean"
4079
- },
4080
- {
4081
- "$ref": "#/definitions/EnvValue"
4082
- }
4083
- ]
3926
+ "type": "boolean"
4084
3927
  },
4085
3928
  "publicUrl": {
4086
3929
  "description": "The bucket's public address, such as an R2 custom domain; public files are linked from there, under `prefix`.",
@@ -4211,14 +4054,7 @@
4211
4054
  },
4212
4055
  "sqlSends": {
4213
4056
  "description": "`true` lets SQL in the app's database broadcast to the record channels with `channels.send()`, from the `channels`\nschema `protobase migration` writes.",
4214
- "anyOf": [
4215
- {
4216
- "type": "boolean"
4217
- },
4218
- {
4219
- "$ref": "#/definitions/EnvValue"
4220
- }
4221
- ]
4057
+ "type": "boolean"
4222
4058
  }
4223
4059
  },
4224
4060
  "additionalProperties": false