@shipfox/client-workspace-settings 0.2.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/.turbo/turbo-build.log +2 -0
- package/.turbo/turbo-type$colon$emit.log +1 -0
- package/.turbo/turbo-type.log +1 -0
- package/CHANGELOG.md +197 -0
- package/LICENSE +21 -0
- package/dist/components/members/form-errors.d.ts +11 -0
- package/dist/components/members/form-errors.d.ts.map +1 -0
- package/dist/components/members/form-errors.js +28 -0
- package/dist/components/members/form-errors.js.map +1 -0
- package/dist/components/members/workspace-members-section.d.ts +5 -0
- package/dist/components/members/workspace-members-section.d.ts.map +1 -0
- package/dist/components/members/workspace-members-section.js +541 -0
- package/dist/components/members/workspace-members-section.js.map +1 -0
- package/dist/components/workspace-settings-shell.d.ts +8 -0
- package/dist/components/workspace-settings-shell.d.ts.map +1 -0
- package/dist/components/workspace-settings-shell.js +7 -0
- package/dist/components/workspace-settings-shell.js.map +1 -0
- package/dist/feature.d.ts +98 -0
- package/dist/feature.d.ts.map +1 -0
- package/dist/feature.js +120 -0
- package/dist/feature.js.map +1 -0
- package/dist/hooks/api/create-invitation.d.ts +14 -0
- package/dist/hooks/api/create-invitation.d.ts.map +1 -0
- package/dist/hooks/api/create-invitation.js +25 -0
- package/dist/hooks/api/create-invitation.js.map +1 -0
- package/dist/hooks/api/list-invitations.d.ts +15 -0
- package/dist/hooks/api/list-invitations.d.ts.map +1 -0
- package/dist/hooks/api/list-invitations.js +18 -0
- package/dist/hooks/api/list-invitations.js.map +1 -0
- package/dist/hooks/api/list-members.d.ts +13 -0
- package/dist/hooks/api/list-members.d.ts.map +1 -0
- package/dist/hooks/api/list-members.js +18 -0
- package/dist/hooks/api/list-members.js.map +1 -0
- package/dist/hooks/api/remove-member.d.ts +2 -0
- package/dist/hooks/api/remove-member.d.ts.map +1 -0
- package/dist/hooks/api/remove-member.js +24 -0
- package/dist/hooks/api/remove-member.js.map +1 -0
- package/dist/hooks/api/revoke-invitation.d.ts +2 -0
- package/dist/hooks/api/revoke-invitation.d.ts.map +1 -0
- package/dist/hooks/api/revoke-invitation.js +24 -0
- package/dist/hooks/api/revoke-invitation.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/pages/events-settings-page.d.ts +2 -0
- package/dist/pages/events-settings-page.d.ts.map +1 -0
- package/dist/pages/events-settings-page.js +30 -0
- package/dist/pages/events-settings-page.js.map +1 -0
- package/dist/pages/integrations-settings-page.d.ts +2 -0
- package/dist/pages/integrations-settings-page.d.ts.map +1 -0
- package/dist/pages/integrations-settings-page.js +10 -0
- package/dist/pages/integrations-settings-page.js.map +1 -0
- package/dist/pages/members-settings-page.d.ts +2 -0
- package/dist/pages/members-settings-page.d.ts.map +1 -0
- package/dist/pages/members-settings-page.js +15 -0
- package/dist/pages/members-settings-page.js.map +1 -0
- package/dist/pages/model-providers-settings-page.d.ts +2 -0
- package/dist/pages/model-providers-settings-page.d.ts.map +1 -0
- package/dist/pages/model-providers-settings-page.js +20 -0
- package/dist/pages/model-providers-settings-page.js.map +1 -0
- package/dist/pages/provisioners-settings-page.d.ts +2 -0
- package/dist/pages/provisioners-settings-page.d.ts.map +1 -0
- package/dist/pages/provisioners-settings-page.js +14 -0
- package/dist/pages/provisioners-settings-page.js.map +1 -0
- package/dist/pages/runners-settings-page.d.ts +2 -0
- package/dist/pages/runners-settings-page.d.ts.map +1 -0
- package/dist/pages/runners-settings-page.js +14 -0
- package/dist/pages/runners-settings-page.js.map +1 -0
- package/dist/pages/secrets-settings-page.d.ts +2 -0
- package/dist/pages/secrets-settings-page.d.ts.map +1 -0
- package/dist/pages/secrets-settings-page.js +14 -0
- package/dist/pages/secrets-settings-page.js.map +1 -0
- package/dist/pages/variables-settings-page.d.ts +2 -0
- package/dist/pages/variables-settings-page.d.ts.map +1 -0
- package/dist/pages/variables-settings-page.js +14 -0
- package/dist/pages/variables-settings-page.js.map +1 -0
- package/dist/routes/agents.d.ts +6 -0
- package/dist/routes/agents.d.ts.map +1 -0
- package/dist/routes/agents.js +7 -0
- package/dist/routes/agents.js.map +1 -0
- package/dist/routes/events.d.ts +8 -0
- package/dist/routes/events.d.ts.map +1 -0
- package/dist/routes/events.js +9 -0
- package/dist/routes/events.js.map +1 -0
- package/dist/routes/index.d.ts +9 -0
- package/dist/routes/index.d.ts.map +1 -0
- package/dist/routes/index.js +14 -0
- package/dist/routes/index.js.map +1 -0
- package/dist/routes/integrations.d.ts +6 -0
- package/dist/routes/integrations.d.ts.map +1 -0
- package/dist/routes/integrations.js +7 -0
- package/dist/routes/integrations.js.map +1 -0
- package/dist/routes/members.d.ts +6 -0
- package/dist/routes/members.d.ts.map +1 -0
- package/dist/routes/members.js +7 -0
- package/dist/routes/members.js.map +1 -0
- package/dist/routes/provisioners.d.ts +6 -0
- package/dist/routes/provisioners.d.ts.map +1 -0
- package/dist/routes/provisioners.js +7 -0
- package/dist/routes/provisioners.js.map +1 -0
- package/dist/routes/runners.d.ts +6 -0
- package/dist/routes/runners.d.ts.map +1 -0
- package/dist/routes/runners.js +7 -0
- package/dist/routes/runners.js.map +1 -0
- package/dist/routes/secrets.d.ts +6 -0
- package/dist/routes/secrets.d.ts.map +1 -0
- package/dist/routes/secrets.js +7 -0
- package/dist/routes/secrets.js.map +1 -0
- package/dist/routes/variables.d.ts +6 -0
- package/dist/routes/variables.d.ts.map +1 -0
- package/dist/routes/variables.js +7 -0
- package/dist/routes/variables.js.map +1 -0
- package/dist/tsconfig.test.tsbuildinfo +1 -0
- package/package.json +104 -0
- package/src/components/members/form-errors.test.ts +40 -0
- package/src/components/members/form-errors.ts +24 -0
- package/src/components/members/workspace-members-section.tsx +476 -0
- package/src/components/workspace-settings-shell.tsx +12 -0
- package/src/feature.ts +120 -0
- package/src/hooks/api/create-invitation.ts +21 -0
- package/src/hooks/api/list-invitations.ts +17 -0
- package/src/hooks/api/list-members.ts +17 -0
- package/src/hooks/api/remove-member.ts +19 -0
- package/src/hooks/api/revoke-invitation.ts +19 -0
- package/src/index.ts +8 -0
- package/src/pages/events-settings-page.tsx +25 -0
- package/src/pages/integrations-settings-page.test.tsx +72 -0
- package/src/pages/integrations-settings-page.tsx +6 -0
- package/src/pages/members-settings-page.tsx +17 -0
- package/src/pages/model-providers-settings-page.test.tsx +48 -0
- package/src/pages/model-providers-settings-page.tsx +15 -0
- package/src/pages/provisioners-settings-page.test.tsx +29 -0
- package/src/pages/provisioners-settings-page.tsx +14 -0
- package/src/pages/runners-settings-page.test.tsx +23 -0
- package/src/pages/runners-settings-page.tsx +14 -0
- package/src/pages/secrets-settings-page.tsx +14 -0
- package/src/pages/variables-settings-page.tsx +14 -0
- package/src/routes/agents.tsx +3 -0
- package/src/routes/events.tsx +7 -0
- package/src/routes/index.tsx +8 -0
- package/src/routes/integrations.tsx +3 -0
- package/src/routes/members.tsx +3 -0
- package/src/routes/provisioners.tsx +3 -0
- package/src/routes/runners.tsx +3 -0
- package/src/routes/secrets.tsx +3 -0
- package/src/routes/variables.tsx +3 -0
- package/test/pages.tsx +101 -0
- package/test/setup.ts +3 -0
- package/tsconfig.build.json +9 -0
- package/tsconfig.build.tsbuildinfo +1 -0
- package/tsconfig.json +3 -0
- package/tsconfig.test.json +8 -0
- package/vitest.config.ts +14 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
$ shipfox-tsc-emit
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
$ shipfox-tsc-check
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
# @shipfox/client-workspace-settings
|
|
2
|
+
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 3d064b8: Publishes the client runtime closure with shell, feature, route, Vite, and testing contracts.
|
|
8
|
+
- 6bc2e45: Adds the composable upstream client shell, feature catalog, and route manifests for every client feature.
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies [3d064b8]
|
|
13
|
+
- Updated dependencies [6bc2e45]
|
|
14
|
+
- @shipfox/client-agent@0.2.0
|
|
15
|
+
- @shipfox/client-api@0.2.0
|
|
16
|
+
- @shipfox/client-auth@0.2.0
|
|
17
|
+
- @shipfox/client-integrations@0.2.0
|
|
18
|
+
- @shipfox/client-runners@0.2.0
|
|
19
|
+
- @shipfox/client-secrets@0.2.0
|
|
20
|
+
- @shipfox/client-shell@0.2.0
|
|
21
|
+
- @shipfox/client-triggers@0.2.0
|
|
22
|
+
- @shipfox/client-ui@0.2.0
|
|
23
|
+
|
|
24
|
+
## 0.1.2
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- Updated dependencies [c18d624]
|
|
29
|
+
- @shipfox/react-ui@0.3.1
|
|
30
|
+
- @shipfox/client-integrations@0.1.2
|
|
31
|
+
- @shipfox/client-agent@0.1.2
|
|
32
|
+
- @shipfox/client-auth@0.0.5
|
|
33
|
+
- @shipfox/client-runners@0.0.5
|
|
34
|
+
- @shipfox/client-secrets@0.1.2
|
|
35
|
+
- @shipfox/client-triggers@0.1.2
|
|
36
|
+
- @shipfox/client-ui@0.1.2
|
|
37
|
+
|
|
38
|
+
## 0.1.1
|
|
39
|
+
|
|
40
|
+
### Patch Changes
|
|
41
|
+
|
|
42
|
+
- Updated dependencies [1b0d344]
|
|
43
|
+
- @shipfox/api-workspaces-dto@2.0.0
|
|
44
|
+
- @shipfox/client-ui@0.1.1
|
|
45
|
+
- @shipfox/client-agent@0.1.1
|
|
46
|
+
- @shipfox/client-auth@0.0.4
|
|
47
|
+
- @shipfox/client-integrations@0.1.1
|
|
48
|
+
- @shipfox/client-runners@0.0.4
|
|
49
|
+
- @shipfox/client-secrets@0.1.1
|
|
50
|
+
- @shipfox/client-triggers@0.1.1
|
|
51
|
+
- @shipfox/client-api@0.0.1
|
|
52
|
+
- @shipfox/react-ui@0.3.0
|
|
53
|
+
|
|
54
|
+
## 0.1.0
|
|
55
|
+
|
|
56
|
+
### Minor Changes
|
|
57
|
+
|
|
58
|
+
- 067a260: Adds workspace model provider settings for configuring, testing, defaulting, and deleting provider credentials.
|
|
59
|
+
- e51d464: Add the Secrets & Variables workspace settings UI (S1b).
|
|
60
|
+
- New `@shipfox/client-secrets` package: transport + React Query hooks (a shared
|
|
61
|
+
`createStoreApi` factory), a write-only secret form and a readable variable form
|
|
62
|
+
(TanStack Form + Zod, multiline `Textarea` values, live short-value / sensitive-name
|
|
63
|
+
advisories), and the workspace secrets/variables sections (single-call list, masked
|
|
64
|
+
secret values, copy-name, delete with blast-radius warning).
|
|
65
|
+
- `@shipfox/client-workspace-settings`: new Secrets and Variables settings pages and nav
|
|
66
|
+
entries.
|
|
67
|
+
- `@shipfox/api-secrets-dto`: export `SECRETS_MAX_LIST_LIMIT` and raise the list `limit`
|
|
68
|
+
cap so the settings UI can fetch the whole bounded set in one request; the variable
|
|
69
|
+
list item now carries `value_truncated`.
|
|
70
|
+
- `@shipfox/api-secrets`: the variable list returns a bounded single-line preview of each
|
|
71
|
+
value (the full value is read via `GET /variables/:key` when editing) so a single-call
|
|
72
|
+
list cannot materialize very large responses; startup fails if `SECRETS_MAX_PER_WORKSPACE`
|
|
73
|
+
exceeds the list limit.
|
|
74
|
+
- `@shipfox/client-router`: register the `/workspaces/$wid/settings/secrets` and
|
|
75
|
+
`/variables` routes.
|
|
76
|
+
|
|
77
|
+
- b8e49ff: Add the client-side Sentry install/connect flow and a workspace settings
|
|
78
|
+
integrations hub.
|
|
79
|
+
- `@shipfox/client-integrations`: shared `IntegrationGallerySection` (capability
|
|
80
|
+
filter, lifecycle pills, "Added" date, external link, connected-first
|
|
81
|
+
ordering, degraded status mode), shared `RedirectInstallPage` powering the
|
|
82
|
+
GitHub and new Sentry install pages, `SentryCallbackPage` with an explicit
|
|
83
|
+
workspace confirm (sessionStorage only pre-selects), two-tier retry, and the
|
|
84
|
+
Sentry hooks (`useCreateSentryInstallMutation`, `connectSentry`,
|
|
85
|
+
`useIntegrationConnectionsQuery`).
|
|
86
|
+
- `@shipfox/client-workspace-settings`: new `/workspaces/$wid/settings/integrations`
|
|
87
|
+
page and an Integrations entry in the settings nav.
|
|
88
|
+
- `@shipfox/client-router`: routes for the Sentry install page, the root-level
|
|
89
|
+
Sentry callback, and the settings integrations page.
|
|
90
|
+
- `@shipfox/react-ui`: `sentry` icon (monochrome, theme-aware).
|
|
91
|
+
- `@shipfox/api-integration-core-dto`: optional `external_url` on the connection
|
|
92
|
+
DTO and an optional `connectionExternalUrl` method on `IntegrationProvider`.
|
|
93
|
+
- `@shipfox/api-integration-core`: `GET /integration-connections` now returns
|
|
94
|
+
connections of every lifecycle status (the active-only filter prevented
|
|
95
|
+
clients from surfacing disabled/error state) and resolves `external_url`
|
|
96
|
+
per connection best-effort.
|
|
97
|
+
- `@shipfox/api-integration-sentry` / `@shipfox/api-integration-github`:
|
|
98
|
+
implement `connectionExternalUrl` (Sentry org URL via a new
|
|
99
|
+
by-connection-id installation lookup; GitHub installation settings URL).
|
|
100
|
+
|
|
101
|
+
### Patch Changes
|
|
102
|
+
|
|
103
|
+
- 0f06c02: Redesign the integration gallery into separate Installed and Available sections, rendering one card per connection so multiple connections from the same provider are no longer collapsed and silently hidden.
|
|
104
|
+
- e5d2f13: Add the workspace **Events** page in Settings: a filterable, cursor-paginated table of
|
|
105
|
+
trigger events (status dot, source/event, routing summary, delivery id, received time)
|
|
106
|
+
mounted at `/workspaces/$wid/settings/events` and wired into the settings sub-nav. Filters
|
|
107
|
+
(date range, source, event, outcome) live in the URL via `validateSearch`, so a filtered
|
|
108
|
+
view is shareable. Source and event filters are populated by a new
|
|
109
|
+
`GET /trigger-events/facets` endpoint that returns each workspace's distinct source/event
|
|
110
|
+
values with counts (top 50, backed by `(workspace_id, source)` / `(workspace_id, event)`
|
|
111
|
+
indexes); the list still renders if facets fail to load.
|
|
112
|
+
- 048fc29: Adds Runner Provisioners settings with provisioner token management and connection status.
|
|
113
|
+
- Updated dependencies [067a260]
|
|
114
|
+
- Updated dependencies [43d7996]
|
|
115
|
+
- Updated dependencies [14e0bea]
|
|
116
|
+
- Updated dependencies [d02c5fd]
|
|
117
|
+
- Updated dependencies [9018f0b]
|
|
118
|
+
- Updated dependencies [7fdfd72]
|
|
119
|
+
- Updated dependencies [72ce351]
|
|
120
|
+
- Updated dependencies [2a3193f]
|
|
121
|
+
- Updated dependencies [1b9d909]
|
|
122
|
+
- Updated dependencies [f104ff2]
|
|
123
|
+
- Updated dependencies [7341569]
|
|
124
|
+
- Updated dependencies [d245be8]
|
|
125
|
+
- Updated dependencies [0f06c02]
|
|
126
|
+
- Updated dependencies [e4c6abf]
|
|
127
|
+
- Updated dependencies [e4c6abf]
|
|
128
|
+
- Updated dependencies [2c352bb]
|
|
129
|
+
- Updated dependencies [e5d2f13]
|
|
130
|
+
- Updated dependencies [5d0676a]
|
|
131
|
+
- Updated dependencies [a460020]
|
|
132
|
+
- Updated dependencies [a35c2dc]
|
|
133
|
+
- Updated dependencies [58f7aef]
|
|
134
|
+
- Updated dependencies [5264a22]
|
|
135
|
+
- Updated dependencies [9674879]
|
|
136
|
+
- Updated dependencies [225c9a5]
|
|
137
|
+
- Updated dependencies [42443b4]
|
|
138
|
+
- Updated dependencies [24f131b]
|
|
139
|
+
- Updated dependencies [7790355]
|
|
140
|
+
- Updated dependencies [bb2a7bc]
|
|
141
|
+
- Updated dependencies [63bcac8]
|
|
142
|
+
- Updated dependencies [5eb06d0]
|
|
143
|
+
- Updated dependencies [4e13e5f]
|
|
144
|
+
- Updated dependencies [e92150d]
|
|
145
|
+
- Updated dependencies [8037501]
|
|
146
|
+
- Updated dependencies [0fb6018]
|
|
147
|
+
- Updated dependencies [c27a1ed]
|
|
148
|
+
- Updated dependencies [e51d464]
|
|
149
|
+
- Updated dependencies [b8e49ff]
|
|
150
|
+
- Updated dependencies [8037501]
|
|
151
|
+
- Updated dependencies [6c0da64]
|
|
152
|
+
- Updated dependencies [07f8ff8]
|
|
153
|
+
- Updated dependencies [e457582]
|
|
154
|
+
- Updated dependencies [8b5c905]
|
|
155
|
+
- Updated dependencies [f849131]
|
|
156
|
+
- Updated dependencies [a7da648]
|
|
157
|
+
- Updated dependencies [94bdcc5]
|
|
158
|
+
- Updated dependencies [a34c8ea]
|
|
159
|
+
- Updated dependencies [27770eb]
|
|
160
|
+
- Updated dependencies [8ac4bf4]
|
|
161
|
+
- Updated dependencies [048fc29]
|
|
162
|
+
- Updated dependencies [6181819]
|
|
163
|
+
- Updated dependencies [3a0be6b]
|
|
164
|
+
- Updated dependencies [d42baf4]
|
|
165
|
+
- Updated dependencies [8037501]
|
|
166
|
+
- Updated dependencies [54bb8a3]
|
|
167
|
+
- Updated dependencies [f711e18]
|
|
168
|
+
- @shipfox/client-agent@0.1.0
|
|
169
|
+
- @shipfox/client-integrations@0.1.0
|
|
170
|
+
- @shipfox/react-ui@0.3.0
|
|
171
|
+
- @shipfox/api-workspaces-dto@0.1.0
|
|
172
|
+
- @shipfox/client-triggers@0.1.0
|
|
173
|
+
- @shipfox/client-api@0.0.1
|
|
174
|
+
- @shipfox/client-ui@0.1.0
|
|
175
|
+
- @shipfox/client-auth@0.0.3
|
|
176
|
+
- @shipfox/client-secrets@0.1.0
|
|
177
|
+
- @shipfox/client-runners@0.0.3
|
|
178
|
+
|
|
179
|
+
## 0.0.2
|
|
180
|
+
|
|
181
|
+
### Patch Changes
|
|
182
|
+
|
|
183
|
+
- Updated dependencies [5c1e777]
|
|
184
|
+
- @shipfox/react-ui@0.2.0
|
|
185
|
+
- @shipfox/client-auth@0.0.2
|
|
186
|
+
- @shipfox/client-runners@0.0.2
|
|
187
|
+
|
|
188
|
+
## 0.0.1
|
|
189
|
+
|
|
190
|
+
### Patch Changes
|
|
191
|
+
|
|
192
|
+
- Updated dependencies [2311e15]
|
|
193
|
+
- @shipfox/react-ui@0.1.1
|
|
194
|
+
- @shipfox/client-auth@0.0.1
|
|
195
|
+
- @shipfox/client-runners@0.0.1
|
|
196
|
+
- @shipfox/api-workspaces-dto@0.0.0
|
|
197
|
+
- @shipfox/client-api@0.0.0
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Shipfox
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type InvitationField = 'email';
|
|
2
|
+
export type InvitationFormErrorMapping = {
|
|
3
|
+
kind: 'field';
|
|
4
|
+
field: InvitationField;
|
|
5
|
+
message: string;
|
|
6
|
+
} | {
|
|
7
|
+
kind: 'form';
|
|
8
|
+
message: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function invitationErrorToFormError(error: unknown): InvitationFormErrorMapping;
|
|
11
|
+
//# sourceMappingURL=form-errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-errors.d.ts","sourceRoot":"","sources":["../../../src/components/members/form-errors.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC;AAEtC,MAAM,MAAM,0BAA0B,GAClC;IAAC,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,eAAe,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC,GACxD;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC,CAAC;AAEpC,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,0BAA0B,CAerF"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ApiError } from '@shipfox/client-api';
|
|
2
|
+
export function invitationErrorToFormError(error) {
|
|
3
|
+
if (error instanceof ApiError && error.code === 'open-invitation-exists') {
|
|
4
|
+
return {
|
|
5
|
+
kind: 'field',
|
|
6
|
+
field: 'email',
|
|
7
|
+
message: 'An open invitation already exists for this email.'
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
if (error instanceof ApiError) {
|
|
11
|
+
return {
|
|
12
|
+
kind: 'form',
|
|
13
|
+
message: error.message
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
if (error instanceof Error) {
|
|
17
|
+
return {
|
|
18
|
+
kind: 'form',
|
|
19
|
+
message: error.message
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
return {
|
|
23
|
+
kind: 'form',
|
|
24
|
+
message: 'Could not send invitation.'
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=form-errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/members/form-errors.ts"],"sourcesContent":["import {ApiError} from '@shipfox/client-api';\n\nexport type InvitationField = 'email';\n\nexport type InvitationFormErrorMapping =\n | {kind: 'field'; field: InvitationField; message: string}\n | {kind: 'form'; message: string};\n\nexport function invitationErrorToFormError(error: unknown): InvitationFormErrorMapping {\n if (error instanceof ApiError && error.code === 'open-invitation-exists') {\n return {\n kind: 'field',\n field: 'email',\n message: 'An open invitation already exists for this email.',\n };\n }\n if (error instanceof ApiError) {\n return {kind: 'form', message: error.message};\n }\n if (error instanceof Error) {\n return {kind: 'form', message: error.message};\n }\n return {kind: 'form', message: 'Could not send invitation.'};\n}\n"],"names":["ApiError","invitationErrorToFormError","error","code","kind","field","message","Error"],"mappings":"AAAA,SAAQA,QAAQ,QAAO,sBAAsB;AAQ7C,OAAO,SAASC,2BAA2BC,KAAc;IACvD,IAAIA,iBAAiBF,YAAYE,MAAMC,IAAI,KAAK,0BAA0B;QACxE,OAAO;YACLC,MAAM;YACNC,OAAO;YACPC,SAAS;QACX;IACF;IACA,IAAIJ,iBAAiBF,UAAU;QAC7B,OAAO;YAACI,MAAM;YAAQE,SAASJ,MAAMI,OAAO;QAAA;IAC9C;IACA,IAAIJ,iBAAiBK,OAAO;QAC1B,OAAO;YAACH,MAAM;YAAQE,SAASJ,MAAMI,OAAO;QAAA;IAC9C;IACA,OAAO;QAACF,MAAM;QAAQE,SAAS;IAA4B;AAC7D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-members-section.d.ts","sourceRoot":"","sources":["../../../src/components/members/workspace-members-section.tsx"],"names":[],"mappings":"AA0CA,wBAAgB,+BAA+B,CAAC,EAC9C,WAAW,EACX,aAAa,GACd,EAAE;IACD,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;CACvB,+BAOA"}
|