@protobase/config 0.121.1 → 0.121.3

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
@@ -94,7 +94,7 @@ export type ProtobaseConfig = AppKeys & ApiOptionKeys & {
94
94
  /** Packages of workflow plugins the app runs beside the built-in types and its own plugins, by package name. */
95
95
  plugins?: string[];
96
96
  };
97
- /** How the record channels and supabase-js's Realtime are served: `{ processes: 'many' }` when several processes serve the app, `{ sqlSends: true }` to broadcast to channels from SQL (see `RealtimeOptions`). */
97
+ /** How the record channels and supabase-js's Realtime are served: `{ processes: 'many' }` when several processes serve the app, `{ sqlSends: true }` to broadcast to channels from SQL, `{ relay }` to hand the connections to a realtime relay (see `RealtimeOptions`). */
98
98
  realtime?: RealtimeOptions;
99
99
  /** Each user's devices and inbox (see `NotificationsOptions`); `{}` turns them on. */
100
100
  notifications?: Omit<NotificationsOptions, 'store' | 'historyStore' | 'senders'>;
@@ -111,6 +111,14 @@ export type ProtobaseConfig = AppKeys & ApiOptionKeys & {
111
111
  * both unsubscribe headers, or mail clients show no button. Off by default.
112
112
  */
113
113
  unsubscribe?: boolean;
114
+ /**
115
+ * `true` takes the bounces and spam complaints of the mail the app sends as `mail_feedback` records, with the events
116
+ * `mail_feedback.bounced` and `mail_feedback.complained`, at `POST /api/mail/feedback/<provider>`: `ses` once
117
+ * `PROTOBASE_MAIL_FEEDBACK_SES_TOPICS` names its SNS topics, `resend` once `PROTOBASE_MAIL_FEEDBACK_RESEND_SECRET` is
118
+ * set, and `protobase` with `PROTOBASE_SECRET`. `protobase migration` writes its table, `mail.feedback`. Protobase
119
+ * sends on regardless: the app decides what a bounce means. Off by default.
120
+ */
121
+ mailFeedback?: boolean;
114
122
  /**
115
123
  * `true` keeps the tables the app's users add in its own database and serves each one like a resource of the config;
116
124
  * `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.121.1",
3
+ "version": "0.121.3",
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.121.1"
34
+ "@protobase/server": "0.121.3"
35
35
  }
36
36
  }
package/schema.json CHANGED
@@ -718,7 +718,7 @@
718
718
  "additionalProperties": false
719
719
  },
720
720
  "realtime": {
721
- "description": "How the record channels and supabase-js's Realtime are served: `{ processes: 'many' }` when several processes serve the app, `{ sqlSends: true }` to broadcast to channels from SQL (see `RealtimeOptions`).",
721
+ "description": "How the record channels and supabase-js's Realtime are served: `{ processes: 'many' }` when several processes serve the app, `{ sqlSends: true }` to broadcast to channels from SQL, `{ relay }` to hand the connections to a realtime relay (see `RealtimeOptions`).",
722
722
  "$ref": "#/definitions/RealtimeOptions"
723
723
  },
724
724
  "notifications": {
@@ -1005,6 +1005,10 @@
1005
1005
  "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.",
1006
1006
  "type": "boolean"
1007
1007
  },
1008
+ "mailFeedback": {
1009
+ "description": "`true` takes the bounces and spam complaints of the mail the app sends as `mail_feedback` records, with the events\n`mail_feedback.bounced` and `mail_feedback.complained`, at `POST /api/mail/feedback/<provider>`: `ses` once\n`PROTOBASE_MAIL_FEEDBACK_SES_TOPICS` names its SNS topics, `resend` once `PROTOBASE_MAIL_FEEDBACK_RESEND_SECRET` is\nset, and `protobase` with `PROTOBASE_SECRET`. `protobase migration` writes its table, `mail.feedback`. Protobase\nsends on regardless: the app decides what a bounce means. Off by default.",
1010
+ "type": "boolean"
1011
+ },
1008
1012
  "userTables": {
1009
1013
  "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.",
1010
1014
  "type": "boolean"
@@ -6313,8 +6317,141 @@
6313
6317
  "sqlSends": {
6314
6318
  "description": "`true` lets SQL in the app's database broadcast to the record channels with `channels.send()`, from the `channels`\nschema `protobase migration` writes.",
6315
6319
  "type": "boolean"
6320
+ },
6321
+ "relay": {
6322
+ "description": "The relay the app hands realtime connections to, beside its own channels, so the app can sleep while people stay\nconnected (see `RealtimeRelayOptions`).",
6323
+ "$ref": "#/definitions/RealtimeRelayOptions"
6324
+ }
6325
+ },
6326
+ "additionalProperties": false
6327
+ },
6328
+ "RealtimeRelayOptions": {
6329
+ "type": "object",
6330
+ "properties": {
6331
+ "url": {
6332
+ "description": "The relay's address, such as `https://relay.example.com`: its app commands, and its socket at `/socket`.",
6333
+ "anyOf": [
6334
+ {
6335
+ "type": "string"
6336
+ },
6337
+ {
6338
+ "$ref": "#/definitions/EnvValue"
6339
+ }
6340
+ ]
6341
+ },
6342
+ "app": {
6343
+ "description": "The app's id on the relay.",
6344
+ "anyOf": [
6345
+ {
6346
+ "type": "string"
6347
+ },
6348
+ {
6349
+ "$ref": "#/definitions/EnvValue"
6350
+ }
6351
+ ]
6352
+ },
6353
+ "apiKey": {
6354
+ "description": "One of the app's API keys on the relay, which its commands carry.",
6355
+ "anyOf": [
6356
+ {
6357
+ "type": "string"
6358
+ },
6359
+ {
6360
+ "$ref": "#/definitions/EnvValue"
6361
+ }
6362
+ ]
6363
+ },
6364
+ "ticketKey": {
6365
+ "description": "One of the app's ticket keys on the relay, which signs the connect tickets.",
6366
+ "anyOf": [
6367
+ {
6368
+ "type": "string"
6369
+ },
6370
+ {
6371
+ "$ref": "#/definitions/EnvValue"
6372
+ }
6373
+ ]
6374
+ },
6375
+ "channels": {
6376
+ "description": "The channel resources by name.",
6377
+ "type": "object",
6378
+ "additionalProperties": {
6379
+ "$ref": "#/definitions/RelayChannelOptions"
6380
+ }
6381
+ }
6382
+ },
6383
+ "required": [
6384
+ "url",
6385
+ "app",
6386
+ "apiKey",
6387
+ "ticketKey",
6388
+ "channels"
6389
+ ],
6390
+ "additionalProperties": false
6391
+ },
6392
+ "RelayChannelOptions": {
6393
+ "type": "object",
6394
+ "properties": {
6395
+ "members": {
6396
+ "description": "Who is in each channel. Without it the channel is open: whoever may read the record gets it in a ticket when they\nask for it, a visitor of the anonymous role too.",
6397
+ "$ref": "#/definitions/RelayMembers"
6398
+ },
6399
+ "mentions": {
6400
+ "description": "A field of the records noticed on the channel that lists the user ids a record mentions, such as a message's `mentions`.",
6401
+ "anyOf": [
6402
+ {
6403
+ "type": "string"
6404
+ },
6405
+ {
6406
+ "$ref": "#/definitions/EnvValue"
6407
+ }
6408
+ ]
6409
+ }
6410
+ },
6411
+ "additionalProperties": false
6412
+ },
6413
+ "RelayMembers": {
6414
+ "type": "object",
6415
+ "properties": {
6416
+ "resource": {
6417
+ "description": "The resource, such as `conversation_members`.",
6418
+ "anyOf": [
6419
+ {
6420
+ "type": "string"
6421
+ },
6422
+ {
6423
+ "$ref": "#/definitions/EnvValue"
6424
+ }
6425
+ ]
6426
+ },
6427
+ "channel": {
6428
+ "description": "Its relation field to the channel resource, such as `conversation_id`.",
6429
+ "anyOf": [
6430
+ {
6431
+ "type": "string"
6432
+ },
6433
+ {
6434
+ "$ref": "#/definitions/EnvValue"
6435
+ }
6436
+ ]
6437
+ },
6438
+ "user": {
6439
+ "description": "Its field holding the person's user id, such as `user_id`.",
6440
+ "anyOf": [
6441
+ {
6442
+ "type": "string"
6443
+ },
6444
+ {
6445
+ "$ref": "#/definitions/EnvValue"
6446
+ }
6447
+ ]
6316
6448
  }
6317
6449
  },
6450
+ "required": [
6451
+ "resource",
6452
+ "channel",
6453
+ "user"
6454
+ ],
6318
6455
  "additionalProperties": false
6319
6456
  },
6320
6457
  "StatusOptions": {