@seamapi/types 1.975.0 → 1.977.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.
@@ -40385,6 +40385,8 @@ export type Routes = {
40385
40385
  };
40386
40386
  /** Whether the portal is embedded in another application. */
40387
40387
  is_embedded?: boolean;
40388
+ /** Whether the portal is read-only. When true, the customer can browse the portal but cannot perform any mutating action; write requests made with the portal's client session are rejected. */
40389
+ read_only?: boolean;
40388
40390
  /** Configuration for the landing page when the portal loads. */
40389
40391
  landing_page?: {
40390
40392
  manage?: (({
@@ -40433,10 +40435,16 @@ export type Routes = {
40433
40435
  /** Navigation mode for the portal. 'restricted' tells frontend to hide navigation UI, typically used for embedded deep links. */
40434
40436
  navigation_mode?: 'full' | 'restricted';
40435
40437
  /** Deep link target resource for initial redirect. When set, the portal will navigate directly to the specified resource. */
40436
- deep_link?: {
40437
- resource_type: 'reservation' | 'space';
40438
+ deep_link?: ({
40439
+ resource_type: 'reservation';
40438
40440
  resource_key: string;
40439
- } | undefined;
40441
+ } | {
40442
+ resource_type: 'space';
40443
+ resource_key: string;
40444
+ } | {
40445
+ resource_type: 'device';
40446
+ resource_id: string;
40447
+ }) | undefined;
40440
40448
  /** Whether the portal is in developer mode. Only available for Seam employees. */
40441
40449
  _dev?: boolean;
40442
40450
  } & {
@@ -82460,6 +82468,8 @@ export type Routes = {
82460
82468
  };
82461
82469
  /** Whether the portal is embedded in another application. */
82462
82470
  is_embedded?: boolean;
82471
+ /** Whether the portal is read-only. When true, the customer can browse the portal but cannot perform any mutating action; write requests made with the portal's client session are rejected. */
82472
+ read_only?: boolean;
82463
82473
  /** Configuration for the landing page when the portal loads. */
82464
82474
  landing_page?: {
82465
82475
  manage?: (({
@@ -82508,10 +82518,16 @@ export type Routes = {
82508
82518
  /** Navigation mode for the portal. 'restricted' tells frontend to hide navigation UI, typically used for embedded deep links. */
82509
82519
  navigation_mode?: 'full' | 'restricted';
82510
82520
  /** Deep link target resource for initial redirect. When set, the portal will navigate directly to the specified resource. */
82511
- deep_link?: {
82512
- resource_type: 'reservation' | 'space';
82521
+ deep_link?: ({
82522
+ resource_type: 'reservation';
82513
82523
  resource_key: string;
82514
- } | undefined;
82524
+ } | {
82525
+ resource_type: 'space';
82526
+ resource_key: string;
82527
+ } | {
82528
+ resource_type: 'device';
82529
+ resource_id: string;
82530
+ }) | undefined;
82515
82531
  /** Business vertical of the customer portal. */
82516
82532
  business_vertical?: ('neutral' | 'short_term_rental' | 'hospitality' | 'multi_family' | 'gym_management' | 'property_tours') | undefined;
82517
82533
  feature_flags?: {
@@ -82600,6 +82616,8 @@ export type Routes = {
82600
82616
  } | undefined;
82601
82617
  /** Whether the portal is embedded in another application. */
82602
82618
  is_embedded?: boolean | undefined;
82619
+ /** Whether the portal is read-only. When true, the customer can browse the portal but cannot perform any mutating action; write requests made with the portal's client session are rejected. */
82620
+ read_only?: boolean | undefined;
82603
82621
  /** Configuration for the landing page when the portal loads. */
82604
82622
  landing_page?: ({
82605
82623
  manage?: (({
@@ -82648,10 +82666,16 @@ export type Routes = {
82648
82666
  /** Navigation mode for the portal. 'restricted' tells frontend to hide navigation UI, typically used for embedded deep links. */
82649
82667
  navigation_mode?: ('full' | 'restricted') | undefined;
82650
82668
  /** Deep link target resource for initial redirect. When set, the portal will navigate directly to the specified resource. */
82651
- deep_link?: ({
82652
- resource_type: 'reservation' | 'space';
82669
+ deep_link?: (({
82670
+ resource_type: 'reservation';
82653
82671
  resource_key: string;
82654
- } | undefined) | undefined;
82672
+ } | {
82673
+ resource_type: 'space';
82674
+ resource_key: string;
82675
+ } | {
82676
+ resource_type: 'device';
82677
+ resource_id: string;
82678
+ }) | undefined) | undefined;
82655
82679
  };
82656
82680
  };
82657
82681
  commonParams: {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.975.0",
3
+ "version": "1.977.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -76,6 +76,7 @@
76
76
  "typecheck": "tsc",
77
77
  "docs:build": "typedoc",
78
78
  "blueprint": "tsx ./blueprint.ts",
79
+ "postblueprint": "tsx ./blueprint.ts --omit-undocumented",
79
80
  "preblueprint": "mkdirp tmp",
80
81
  "lint": "eslint .",
81
82
  "postlint": "prettier --check --ignore-path .gitignore .",
@@ -91,7 +92,7 @@
91
92
  "zod": "^3.24.0"
92
93
  },
93
94
  "devDependencies": {
94
- "@seamapi/blueprint": "^0.59.0",
95
+ "@seamapi/blueprint": "^1.0.0",
95
96
  "@swc/core": "^1.11.29",
96
97
  "@types/node": "^24.10.9",
97
98
  "concurrently": "^9.2.0",
@@ -138,6 +138,12 @@ export const portal_configuration_base = z.object({
138
138
  .boolean()
139
139
  .default(false)
140
140
  .describe('Whether the portal is embedded in another application.'),
141
+ read_only: z
142
+ .boolean()
143
+ .default(false)
144
+ .describe(
145
+ "Whether the portal is read-only. When true, the customer can browse the portal but cannot perform any mutating action; write requests made with the portal's client session are rejected.",
146
+ ),
141
147
  landing_page: z
142
148
  .object({
143
149
  manage: z
@@ -203,10 +209,24 @@ export const portal_configuration_base = z.object({
203
209
  "Navigation mode for the portal. 'restricted' tells frontend to hide navigation UI, typically used for embedded deep links.",
204
210
  ),
205
211
  deep_link: z
206
- .object({
207
- resource_type: z.enum(['reservation', 'space']),
208
- resource_key: z.string(),
209
- })
212
+ .discriminatedUnion('resource_type', [
213
+ // Customer-keyed resources: resolved to an internal id via a lookup.
214
+ z.object({
215
+ resource_type: z.literal('reservation'),
216
+ resource_key: z.string(),
217
+ }),
218
+ z.object({
219
+ resource_type: z.literal('space'),
220
+ resource_key: z.string(),
221
+ }),
222
+ // Seam-id resource: a device is addressed by its Seam device_id directly
223
+ // (there is no customer-facing device_key), so it carries resource_id
224
+ // rather than resource_key.
225
+ z.object({
226
+ resource_type: z.literal('device'),
227
+ resource_id: z.string(),
228
+ }),
229
+ ])
210
230
  .optional().describe(`
211
231
  ---
212
232
  undocumented: Internal endpoint for customer portals.
@@ -245,6 +265,7 @@ export const portal_configuration = portal_configuration_base
245
265
  },
246
266
  },
247
267
  is_embedded: false,
268
+ read_only: false,
248
269
  exclude_locale_picker: false,
249
270
  locale: undefined,
250
271
  customer_resources_filters: undefined,