@protobase/config 0.129.1 → 0.130.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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/schema.json +220 -99
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protobase/config",
3
- "version": "0.129.1",
3
+ "version": "0.130.1",
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.129.1"
34
+ "@protobase/server": "0.130.1"
35
35
  }
36
36
  }
package/schema.json CHANGED
@@ -1528,118 +1528,132 @@
1528
1528
  "const": false
1529
1529
  },
1530
1530
  "organizations": {
1531
- "description": "Turns on organizations (see `OrganizationsOptions`); their hooks are in the hooks module.",
1532
- "anyOf": [
1533
- {
1534
- "const": true
1531
+ "description": "Organizations (see `OrganizationsOptions`): `enabled` turns them on; their hooks are in the hooks module. Turning them\noff sets `enabled: false` and keeps `default`, whose organization then stands in for every one.",
1532
+ "type": "object",
1533
+ "properties": {
1534
+ "default": {
1535
+ "description": "The organization that stands in for every organization while they are off, which `protobase migration` makes when\nthey turn on and gives the rows of an organization that were there already. Required once they were ever on.",
1536
+ "$ref": "#/definitions/DefaultOrganization"
1535
1537
  },
1536
- {
1537
- "type": "object",
1538
- "properties": {
1539
- "creatorAppRoles": {
1540
- "description": "The app roles an organization's creator holds there: `'all'` (default), every role a member can hold, or a list.",
1541
- "anyOf": [
1542
- {
1543
- "const": "all"
1544
- },
1545
- {
1546
- "type": "array",
1547
- "items": {
1548
- "anyOf": [
1549
- {
1550
- "type": "string"
1551
- },
1552
- {
1553
- "$ref": "#/definitions/EnvValue"
1554
- }
1555
- ]
1538
+ "existingUsersRole": {
1539
+ "description": "The app role each user there already holds in `default` when organizations turn on the first time.",
1540
+ "anyOf": [
1541
+ {
1542
+ "type": "string"
1543
+ },
1544
+ {
1545
+ "$ref": "#/definitions/EnvValue"
1546
+ }
1547
+ ]
1548
+ },
1549
+ "creatorAppRoles": {
1550
+ "description": "The app roles an organization's creator holds there: `'all'` (default), every role a member can hold, or a list.",
1551
+ "anyOf": [
1552
+ {
1553
+ "const": "all"
1554
+ },
1555
+ {
1556
+ "type": "array",
1557
+ "items": {
1558
+ "anyOf": [
1559
+ {
1560
+ "type": "string"
1561
+ },
1562
+ {
1563
+ "$ref": "#/definitions/EnvValue"
1556
1564
  }
1557
- },
1558
- {
1559
- "$ref": "#/definitions/EnvValue"
1560
- }
1561
- ]
1565
+ ]
1566
+ }
1562
1567
  },
1563
- "create": {
1564
- "description": "Who may create organizations: `'admins'` (default), superusers only, or `'everyone'` signed in.",
1565
- "anyOf": [
1566
- {
1567
- "enum": [
1568
- "admins",
1569
- "everyone"
1570
- ]
1571
- },
1572
- {
1573
- "$ref": "#/definitions/EnvValue"
1574
- }
1568
+ {
1569
+ "$ref": "#/definitions/EnvValue"
1570
+ }
1571
+ ]
1572
+ },
1573
+ "create": {
1574
+ "description": "Who may create organizations: `'admins'` (default), superusers only, or `'everyone'` signed in.",
1575
+ "anyOf": [
1576
+ {
1577
+ "enum": [
1578
+ "admins",
1579
+ "everyone"
1575
1580
  ]
1576
1581
  },
1577
- "names": {
1578
- "description": "What the app calls an organization, such as `{ singular: 'Workspace', plural: 'Workspaces' }`. Default the built-in \"Organization\".",
1579
- "$ref": "#/definitions/OrganizationNames"
1582
+ {
1583
+ "$ref": "#/definitions/EnvValue"
1584
+ }
1585
+ ]
1586
+ },
1587
+ "names": {
1588
+ "description": "What the app calls an organization, such as `{ singular: 'Workspace', plural: 'Workspaces' }`. Default the built-in \"Organization\".",
1589
+ "$ref": "#/definitions/OrganizationNames"
1590
+ },
1591
+ "createDescription": {
1592
+ "description": "A line under the title of the screen where someone names their first organization, such as what one is for.",
1593
+ "anyOf": [
1594
+ {
1595
+ "type": "string"
1580
1596
  },
1581
- "createDescription": {
1582
- "description": "A line under the title of the screen where someone names their first organization, such as what one is for.",
1583
- "anyOf": [
1584
- {
1585
- "type": "string"
1586
- },
1587
- {
1588
- "$ref": "#/definitions/EnvValue"
1589
- }
1590
- ]
1597
+ {
1598
+ "$ref": "#/definitions/EnvValue"
1599
+ }
1600
+ ]
1601
+ },
1602
+ "invitationDays": {
1603
+ "description": "How long an invitation works, in days. Default 7.",
1604
+ "anyOf": [
1605
+ {
1606
+ "type": "number"
1591
1607
  },
1592
- "invitationDays": {
1593
- "description": "How long an invitation works, in days. Default 7.",
1594
- "anyOf": [
1595
- {
1596
- "type": "number"
1597
- },
1598
- {
1599
- "$ref": "#/definitions/EnvValue"
1600
- }
1601
- ]
1608
+ {
1609
+ "$ref": "#/definitions/EnvValue"
1610
+ }
1611
+ ]
1612
+ },
1613
+ "membershipLimit": {
1614
+ "description": "The most members an organization can have. Default 1000.",
1615
+ "anyOf": [
1616
+ {
1617
+ "type": "number"
1602
1618
  },
1603
- "membershipLimit": {
1604
- "description": "The most members an organization can have. Default 1000.",
1605
- "anyOf": [
1606
- {
1607
- "type": "number"
1608
- },
1609
- {
1610
- "$ref": "#/definitions/EnvValue"
1611
- }
1619
+ {
1620
+ "$ref": "#/definitions/EnvValue"
1621
+ }
1622
+ ]
1623
+ },
1624
+ "deleteRecords": {
1625
+ "description": "What deleting an organization does with its records: `'refuse'` (default) deletes only an organization without\nrows in any `.tenant` resource; `'cascade'` leaves it to the project's foreign keys.",
1626
+ "anyOf": [
1627
+ {
1628
+ "enum": [
1629
+ "refuse",
1630
+ "cascade"
1612
1631
  ]
1613
1632
  },
1614
- "deleteRecords": {
1615
- "description": "What deleting an organization does with its records: `'refuse'` (default) deletes only an organization without\nrows in any `.tenant` resource; `'cascade'` leaves it to the project's foreign keys.",
1616
- "anyOf": [
1617
- {
1618
- "enum": [
1619
- "refuse",
1620
- "cascade"
1621
- ]
1622
- },
1623
- {
1624
- "$ref": "#/definitions/EnvValue"
1625
- }
1626
- ]
1633
+ {
1634
+ "$ref": "#/definitions/EnvValue"
1635
+ }
1636
+ ]
1637
+ },
1638
+ "invitationUrl": {
1639
+ "description": "The page an invitation link opens, with `?token=`. Default `/-/invitation` on the origin the request came to.",
1640
+ "anyOf": [
1641
+ {
1642
+ "type": "string"
1627
1643
  },
1628
- "invitationUrl": {
1629
- "description": "The page an invitation link opens, with `?token=`. Default `/-/invitation` on the origin the request came to.",
1630
- "anyOf": [
1631
- {
1632
- "type": "string"
1633
- },
1634
- {
1635
- "$ref": "#/definitions/EnvValue"
1636
- }
1637
- ]
1644
+ {
1645
+ "$ref": "#/definitions/EnvValue"
1638
1646
  }
1639
- },
1640
- "additionalProperties": false
1647
+ ]
1648
+ },
1649
+ "enabled": {
1650
+ "type": "boolean"
1641
1651
  }
1642
- ]
1652
+ },
1653
+ "required": [
1654
+ "enabled"
1655
+ ],
1656
+ "additionalProperties": false
1643
1657
  },
1644
1658
  "origins": {
1645
1659
  "description": "The other origins the app is served on, for example `['https://admin.shop.com']`. A request to one of them is\nanswered for that host: its sign-in callbacks and the links it mails, such as a password reset, stay there, and\npasskeys work on every origin. Tokens keep `baseURL` as issuer, whatever host issued them. Defaults to the\ncomma-separated list the platform passes in `PROTOBASE_ORIGINS`, when set; none otherwise.",
@@ -2018,6 +2032,10 @@
2018
2032
  }
2019
2033
  ]
2020
2034
  },
2035
+ "signInDevices": {
2036
+ "description": "Lets the platform's sign-in providers from the environment sign in devices (`PROTOBASE_SIGN_IN_DEVICES=true`, or\n`..._DEVICES` of a provider named by its id), which keep their tables in the store: a migration makes them, as it is\nwritten from the config alone. A provider of `signInProviders` with `devices: true` needs no switch. Without it, an\nenvironment provider that signs in devices stops the server at startup. Default off.",
2037
+ "type": "boolean"
2038
+ },
2021
2039
  "sso": {
2022
2040
  "description": "Single sign-on with the app's SAML 2.0 identity providers, for example `{ saml: [{ id: 'okta', name: 'Okta',\ndomains: ['example.com'], idp: { metadata } }] }` (see `SamlProvider`). Like `socialProviders`, a provider signs up\npeople without an account, with the default role, but only at its `domains`, where it also links to the account\nwith the same address. Default none.",
2023
2041
  "$ref": "#/definitions/SsoOptions"
@@ -2055,6 +2073,47 @@
2055
2073
  },
2056
2074
  "additionalProperties": false
2057
2075
  },
2076
+ "DefaultOrganization": {
2077
+ "type": "object",
2078
+ "properties": {
2079
+ "id": {
2080
+ "anyOf": [
2081
+ {
2082
+ "type": "string"
2083
+ },
2084
+ {
2085
+ "$ref": "#/definitions/EnvValue"
2086
+ }
2087
+ ]
2088
+ },
2089
+ "name": {
2090
+ "anyOf": [
2091
+ {
2092
+ "type": "string"
2093
+ },
2094
+ {
2095
+ "$ref": "#/definitions/EnvValue"
2096
+ }
2097
+ ]
2098
+ },
2099
+ "slug": {
2100
+ "anyOf": [
2101
+ {
2102
+ "type": "string"
2103
+ },
2104
+ {
2105
+ "$ref": "#/definitions/EnvValue"
2106
+ }
2107
+ ]
2108
+ }
2109
+ },
2110
+ "required": [
2111
+ "id",
2112
+ "name",
2113
+ "slug"
2114
+ ],
2115
+ "additionalProperties": false
2116
+ },
2058
2117
  "OrganizationNames": {
2059
2118
  "type": "object",
2060
2119
  "properties": {
@@ -2974,6 +3033,68 @@
2974
3033
  },
2975
3034
  "additionalProperties": false
2976
3035
  },
3036
+ "auth_steps": {
3037
+ "type": "object",
3038
+ "properties": {
3039
+ "name": {
3040
+ "anyOf": [
3041
+ {
3042
+ "type": "string"
3043
+ },
3044
+ {
3045
+ "$ref": "#/definitions/EnvValue"
3046
+ }
3047
+ ]
3048
+ },
3049
+ "columns": {
3050
+ "type": "object",
3051
+ "properties": {
3052
+ "applied_at": {
3053
+ "anyOf": [
3054
+ {
3055
+ "type": "string"
3056
+ },
3057
+ {
3058
+ "$ref": "#/definitions/EnvValue"
3059
+ }
3060
+ ]
3061
+ },
3062
+ "module": {
3063
+ "anyOf": [
3064
+ {
3065
+ "type": "string"
3066
+ },
3067
+ {
3068
+ "$ref": "#/definitions/EnvValue"
3069
+ }
3070
+ ]
3071
+ },
3072
+ "step": {
3073
+ "anyOf": [
3074
+ {
3075
+ "type": "string"
3076
+ },
3077
+ {
3078
+ "$ref": "#/definitions/EnvValue"
3079
+ }
3080
+ ]
3081
+ },
3082
+ "target": {
3083
+ "anyOf": [
3084
+ {
3085
+ "type": "string"
3086
+ },
3087
+ {
3088
+ "$ref": "#/definitions/EnvValue"
3089
+ }
3090
+ ]
3091
+ }
3092
+ },
3093
+ "additionalProperties": false
3094
+ }
3095
+ },
3096
+ "additionalProperties": false
3097
+ },
2977
3098
  "two_factor": {
2978
3099
  "type": "object",
2979
3100
  "properties": {