@ingram-cloud/sdk 1.11.0 → 1.13.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.
@@ -285,11 +285,30 @@ export const AuthorizeRequestOut = z
285
285
  deployment_id: z.string(),
286
286
  })
287
287
  .meta({ id: "AuthorizeRequestOut" });
288
+ /** Who consented, for an `app` request that asked for `openid`.
289
+ *
290
+ * The consent page is the only party that ever sees the person — the API is
291
+ * handed an organization token and would otherwise learn nothing about them.
292
+ * So the page asserts the identity here, and the API signs it into an
293
+ * `id_token` the app can verify against the published JWKS. OIDC claim names,
294
+ * because that is what an app already knows how to read. */
295
+ export const AuthorizeUser = z
296
+ .object({
297
+ sub: z.string(),
298
+ email: z.string().nullish(),
299
+ email_verified: z.boolean().nullish(),
300
+ name: z.string().nullish(),
301
+ picture: z.string().nullish(),
302
+ })
303
+ .meta({ id: "AuthorizeUser" });
288
304
  /** Complete the delegated grant server-to-server. A `connector` request names
289
- * the smith the end-user authorized; an `app` request carries nothing — the
290
- * organization is the token's. */
305
+ * the smith the end-user authorized; an `app` request carries the organization
306
+ * implicitly (it is the token's) and `user` when `openid` was requested. */
291
307
  export const AuthorizeCompleteIn = z
292
- .object({ smith_id: z.string().nullish() })
308
+ .object({
309
+ smith_id: z.string().nullish(),
310
+ user: AuthorizeUser.nullish(),
311
+ })
293
312
  .meta({ id: "AuthorizeCompleteIn" });
294
313
  /** Where the tenant 302s the browser after completing or declining. */
295
314
  export const AuthorizeRedirectOut = z
@@ -300,6 +319,8 @@ export const AuthorizeRedirectOut = z
300
319
  export const HostedToolOut = z
301
320
  .object({
302
321
  name: z.string(),
322
+ /** What to call it in an interface. `name` is the wire identifier. */
323
+ title: z.string(),
303
324
  description: z.string(),
304
325
  })
305
326
  .meta({ id: "HostedToolOut" });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ingram-cloud/sdk",
3
- "version": "1.11.0",
3
+ "version": "1.13.0",
4
4
  "description": "Typed wire contract + management-plane client for the Ingram Cloud API: Zod schemas to validate request/response bodies, TypeScript types for the JSON you read back, SSE/webhook event types, and a typed REST client.",
5
5
  "keywords": [
6
6
  "api",
package/ts/zod/tenant.ts CHANGED
@@ -328,11 +328,31 @@ export const AuthorizeRequestOut = z
328
328
  })
329
329
  .meta({ id: "AuthorizeRequestOut" });
330
330
 
331
+ /** Who consented, for an `app` request that asked for `openid`.
332
+ *
333
+ * The consent page is the only party that ever sees the person — the API is
334
+ * handed an organization token and would otherwise learn nothing about them.
335
+ * So the page asserts the identity here, and the API signs it into an
336
+ * `id_token` the app can verify against the published JWKS. OIDC claim names,
337
+ * because that is what an app already knows how to read. */
338
+ export const AuthorizeUser = z
339
+ .object({
340
+ sub: z.string(),
341
+ email: z.string().nullish(),
342
+ email_verified: z.boolean().nullish(),
343
+ name: z.string().nullish(),
344
+ picture: z.string().nullish(),
345
+ })
346
+ .meta({ id: "AuthorizeUser" });
347
+
331
348
  /** Complete the delegated grant server-to-server. A `connector` request names
332
- * the smith the end-user authorized; an `app` request carries nothing — the
333
- * organization is the token's. */
349
+ * the smith the end-user authorized; an `app` request carries the organization
350
+ * implicitly (it is the token's) and `user` when `openid` was requested. */
334
351
  export const AuthorizeCompleteIn = z
335
- .object({ smith_id: z.string().nullish() })
352
+ .object({
353
+ smith_id: z.string().nullish(),
354
+ user: AuthorizeUser.nullish(),
355
+ })
336
356
  .meta({ id: "AuthorizeCompleteIn" });
337
357
 
338
358
  /** Where the tenant 302s the browser after completing or declining. */
@@ -346,6 +366,8 @@ export const AuthorizeRedirectOut = z
346
366
  export const HostedToolOut = z
347
367
  .object({
348
368
  name: z.string(),
369
+ /** What to call it in an interface. `name` is the wire identifier. */
370
+ title: z.string(),
349
371
  description: z.string(),
350
372
  })
351
373
  .meta({ id: "HostedToolOut" });