@pipelex/sdk 0.72.0 → 0.73.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/README.md CHANGED
@@ -341,7 +341,7 @@ These pages ship inside the published package, so a reader who has only installe
341
341
  | [`docs/method-layouts.md`](./docs/method-layouts.md) | A method's stored layouts: `storeMethodLayout`, which stores a layout designed for one pipe of a published version, its closed body and its refusals, the layout, its provenance and its written sample, `listMethodLayouts`, which reads a version's layouts with no dry run, `setMethodLayoutsOff`, which switches a page's design off, and the `layouts` a validate by `method_id` carries when `views` names `layouts`, absent when there are none |
342
342
  | [`docs/method-showcases.md`](./docs/method-showcases.md) | A method's showcases, completed runs frozen with a private copy of their files: `freezeMethodShowcase` and its verdict, `withdrawMethodShowcase`, the holder's reads (`listMethodShowcases`, `getMethodShowcase`) and every reader's reads of a published version (`listMethodVersionShowcases`, `getMethodVersionShowcase`) |
343
343
  | [`docs/public-methods.md`](./docs/public-methods.md) | Public methods and the template catalog: `listMethodTemplates` and its iterator, the ordering, the categories with their labels by language and `listMethodCategories`, the thumbnails' links, another organization's public method read in its narrower shape, the copy of a public method, `visibility` and `categories` on a method, and the refusals a public method's publish adds |
344
- | [`docs/organization-branding.md`](./docs/organization-branding.md) | An organization's logos, colours, app style and typeface, and its white-label entitlement: `getBranding`, which every member and API key reads, `updateOrganizationBranding`, a write by the `admin` or the `member` role that sets, clears or keeps each key, and how a refused logo, colour, style or typeface names its field so a settings screen shows the sentence under it |
344
+ | [`docs/organization-branding.md`](./docs/organization-branding.md) | An organization's branding kit, its logos with their dark-mode variants, colours, preset, shell, typeface and design system, and its white-label entitlement: `getBranding`, which every member and API key reads, `updateOrganizationBranding`, a write by the `admin` or the `member` role that sets, clears or keeps each key, and how a refused logo, colour, id or design system names its field so a settings screen shows its refusal under it |
345
345
  | [`docs/exact-integers.md`](./docs/exact-integers.md) | Which reads keep an integer past `Number.MAX_SAFE_INTEGER` exact, as a `bigint` (a run's inputs and outputs, an example's inputs), how a request body writes it back with its digits, and `parseExactJson` and `stringifyExactJson` for code showing such data as JSON text |
346
346
  | [`docs/crate-routes.md`](./docs/crate-routes.md) | `resolve`, `codegen` and `pipeIo` — the method's tree as the protocol's `files` map, with its dependencies, the normalized crate, the stamped types, and a method's I/O artifacts without a validation — and the offline `runCodegenCheck` that guards a committed tree |
347
347
  | [`docs/client-identification.md`](./docs/client-identification.md) | The `User-Agent` every API request carries, and `appInfo`, the option that puts your program's name in front of it |
@@ -15,7 +15,7 @@ import type { CommandIO } from "./io.js";
15
15
  * update notice and npm 12's run notices off the script's stderr, which carries the command's
16
16
  * own lines, while npm's warnings and errors still print.
17
17
  */
18
- export declare const SCRIPT_RUNNER = "npx --yes --no-update-notifier --loglevel=warn @pipelex/sdk@0.72.0";
18
+ export declare const SCRIPT_RUNNER = "npx --yes --no-update-notifier --loglevel=warn @pipelex/sdk@0.73.0";
19
19
  export declare const SCRIPT_WRITER = "@pipelex/sdk";
20
20
  export declare const SCRIPT_NEEDS = "Node 22.12 or later";
21
21
  /** Run `pipelex-sdk script` and return its exit code. */
package/dist/client.d.ts CHANGED
@@ -1943,14 +1943,15 @@ export declare class PipelexApiClient implements HostedProtocolSurface {
1943
1943
  }): Promise<Membership>;
1944
1944
  /**
1945
1945
  * The branding of the caller's active organization — `GET /v1/branding`: its name, its light
1946
- * and dark colour sets, its two logos, its app style and typeface, and whether it holds the
1947
- * white-label entitlement. Any role reads it, `runner` included, by web session or API key, so
1948
- * an app scaffolded from the method-app template reads its organization's branding with its own
1949
- * key. A personal workspace, or a team that set nothing, answers every colour and logo `null`
1950
- * and no style or typeface. A logo's `uri` is a `pipelex-storage://` reference, which
1951
- * `resolveStorageUrl` turns into a short-lived link to its bytes. An answer without `style`,
1952
- * `typeface` or `white_label`, as a platform that predates them sends, reads as `null`, `null`
1953
- * and `false`.
1946
+ * and dark colour sets, its square and wide logos with their dark variants, its preset, shell
1947
+ * and typeface, its design system, and whether it holds the white-label entitlement. Any role
1948
+ * reads it, `runner` included, by web session or API key, so an app scaffolded from the
1949
+ * method-app template reads its organization's branding with its own key. A personal workspace,
1950
+ * or a team that set nothing, answers every colour and logo `null`, no preset, shell or typeface
1951
+ * and no design system. A logo's `uri` is a `pipelex-storage://` reference, which
1952
+ * `resolveStorageUrl` turns into a short-lived link to its bytes. An answer without one of the
1953
+ * dark logos, the three ids or the design system, as a platform that predates them sends, reads
1954
+ * it as `null`, and one without `white_label` reads it as `false`.
1954
1955
  *
1955
1956
  * Throws `ApiResponseError`: `403` `pipelex.org.required` when the caller has no active
1956
1957
  * organization, `404` when its row is missing, and an answer that is not a JSON object, an
@@ -1964,9 +1965,10 @@ export declare class PipelexApiClient implements HostedProtocolSurface {
1964
1965
  * value (`OrganizationBrandingUpdate`), so `{}` writes nothing. A new logo is the
1965
1966
  * `pipelex-storage://` URI of a file the organization uploaded on its own, which the platform
1966
1967
  * reads and measures, then copies under `branding/`: the answer's `uri` is that copy, and sending
1967
- * it back unchanged keeps the logo. The logo a write replaces or clears is erased. A style or a
1968
- * typeface is an id of the shape `^[a-z0-9-]{1,32}$`, stored whether or not it names one that
1969
- * exists. Answers the branding as the write left it, read as `getBranding` reads it.
1968
+ * it back unchanged keeps the logo. The logo a write replaces or clears is erased. A preset, a
1969
+ * shell or a typeface is an id of the shape `^[a-z0-9-]{1,32}$`, stored whether or not it names
1970
+ * one that exists. A design system replaces the stored one whole, and `null` removes it. Answers
1971
+ * the branding as the write left it, read as `getBranding` reads it.
1970
1972
  *
1971
1973
  * Throws `RequestArgumentError` for an organization id that is empty, `.` or `..`, before any
1972
1974
  * request. Throws `ApiResponseError`, refusing every change of the request when it refuses one:
@@ -1974,14 +1976,16 @@ export declare class PipelexApiClient implements HostedProtocolSurface {
1974
1976
  * `auth.forbidden` for a runner or a caller with no recognised role, `404`
1975
1977
  * `pipelex.org.not_found` for a missing organization, `409` `pipelex.org.not_manageable` for a
1976
1978
  * personal workspace, which has no branding, and `422` `request.invalid` for a colour that is
1977
- * not `#rrggbb`, a style or a typeface of another shape, or a key the body does not know, which
1978
- * names the field in `location.field`: the problem's own when it refuses one field alone, each
1979
- * item's of its `errors` when it refuses several. `white_label` is such a key, since only
1980
- * Pipelex staff grant it. A logo's refusal names its slot in its problem's `errors`, each item's
1981
- * `location.field` being `square_logo` or `wide_logo` and its `detail` the sentence to show under
1982
- * that slot: `422` `pipelex.storage.uri_invalid` for a URI that is not a storage URI, `403`
1983
- * `pipelex.org.mismatch` for another organization's file, and `422` `request.invalid` with an
1984
- * item per broken rule, its code one `LogoRefusalCode` names, for a file the platform refused. A
1979
+ * not `#rrggbb`, a preset, a shell or a typeface of another shape, a design system of another
1980
+ * shape, or a key the body does not know, which names the field in `location.field`: the
1981
+ * problem's own when it refuses one field alone, each item's of its `errors` when it refuses
1982
+ * several. `white_label` is such a key, since only Pipelex staff grant it, and so is `style`, the
1983
+ * retired app style. A logo's refusal names its slot's key, such as `square_logo` or
1984
+ * `dark_wide_logo`, in `location.field`: `422` `pipelex.storage.uri_invalid` for a URI that is
1985
+ * not a storage URI and `403` `pipelex.org.mismatch` for another organization's file, both on the
1986
+ * problem itself, and `422` `request.unsupported` for a file the platform refused, naming the
1987
+ * first broken rule in `params.field` and `params.reason`, a `LogoRefusalCode`, and, when several
1988
+ * rules are broken, one item per rule in its `errors`, each naming its own slot and reason. A
1985
1989
  * `503` `runtime.unavailable` is a failure of the platform's storage or its database, after which
1986
1990
  * the write may have landed or not: the same input sent again is safe.
1987
1991
  */
package/dist/client.js CHANGED
@@ -3462,14 +3462,15 @@ export class PipelexApiClient {
3462
3462
  }
3463
3463
  /**
3464
3464
  * The branding of the caller's active organization — `GET /v1/branding`: its name, its light
3465
- * and dark colour sets, its two logos, its app style and typeface, and whether it holds the
3466
- * white-label entitlement. Any role reads it, `runner` included, by web session or API key, so
3467
- * an app scaffolded from the method-app template reads its organization's branding with its own
3468
- * key. A personal workspace, or a team that set nothing, answers every colour and logo `null`
3469
- * and no style or typeface. A logo's `uri` is a `pipelex-storage://` reference, which
3470
- * `resolveStorageUrl` turns into a short-lived link to its bytes. An answer without `style`,
3471
- * `typeface` or `white_label`, as a platform that predates them sends, reads as `null`, `null`
3472
- * and `false`.
3465
+ * and dark colour sets, its square and wide logos with their dark variants, its preset, shell
3466
+ * and typeface, its design system, and whether it holds the white-label entitlement. Any role
3467
+ * reads it, `runner` included, by web session or API key, so an app scaffolded from the
3468
+ * method-app template reads its organization's branding with its own key. A personal workspace,
3469
+ * or a team that set nothing, answers every colour and logo `null`, no preset, shell or typeface
3470
+ * and no design system. A logo's `uri` is a `pipelex-storage://` reference, which
3471
+ * `resolveStorageUrl` turns into a short-lived link to its bytes. An answer without one of the
3472
+ * dark logos, the three ids or the design system, as a platform that predates them sends, reads
3473
+ * it as `null`, and one without `white_label` reads it as `false`.
3473
3474
  *
3474
3475
  * Throws `ApiResponseError`: `403` `pipelex.org.required` when the caller has no active
3475
3476
  * organization, `404` when its row is missing, and an answer that is not a JSON object, an
@@ -3486,9 +3487,10 @@ export class PipelexApiClient {
3486
3487
  * value (`OrganizationBrandingUpdate`), so `{}` writes nothing. A new logo is the
3487
3488
  * `pipelex-storage://` URI of a file the organization uploaded on its own, which the platform
3488
3489
  * reads and measures, then copies under `branding/`: the answer's `uri` is that copy, and sending
3489
- * it back unchanged keeps the logo. The logo a write replaces or clears is erased. A style or a
3490
- * typeface is an id of the shape `^[a-z0-9-]{1,32}$`, stored whether or not it names one that
3491
- * exists. Answers the branding as the write left it, read as `getBranding` reads it.
3490
+ * it back unchanged keeps the logo. The logo a write replaces or clears is erased. A preset, a
3491
+ * shell or a typeface is an id of the shape `^[a-z0-9-]{1,32}$`, stored whether or not it names
3492
+ * one that exists. A design system replaces the stored one whole, and `null` removes it. Answers
3493
+ * the branding as the write left it, read as `getBranding` reads it.
3492
3494
  *
3493
3495
  * Throws `RequestArgumentError` for an organization id that is empty, `.` or `..`, before any
3494
3496
  * request. Throws `ApiResponseError`, refusing every change of the request when it refuses one:
@@ -3496,14 +3498,16 @@ export class PipelexApiClient {
3496
3498
  * `auth.forbidden` for a runner or a caller with no recognised role, `404`
3497
3499
  * `pipelex.org.not_found` for a missing organization, `409` `pipelex.org.not_manageable` for a
3498
3500
  * personal workspace, which has no branding, and `422` `request.invalid` for a colour that is
3499
- * not `#rrggbb`, a style or a typeface of another shape, or a key the body does not know, which
3500
- * names the field in `location.field`: the problem's own when it refuses one field alone, each
3501
- * item's of its `errors` when it refuses several. `white_label` is such a key, since only
3502
- * Pipelex staff grant it. A logo's refusal names its slot in its problem's `errors`, each item's
3503
- * `location.field` being `square_logo` or `wide_logo` and its `detail` the sentence to show under
3504
- * that slot: `422` `pipelex.storage.uri_invalid` for a URI that is not a storage URI, `403`
3505
- * `pipelex.org.mismatch` for another organization's file, and `422` `request.invalid` with an
3506
- * item per broken rule, its code one `LogoRefusalCode` names, for a file the platform refused. A
3501
+ * not `#rrggbb`, a preset, a shell or a typeface of another shape, a design system of another
3502
+ * shape, or a key the body does not know, which names the field in `location.field`: the
3503
+ * problem's own when it refuses one field alone, each item's of its `errors` when it refuses
3504
+ * several. `white_label` is such a key, since only Pipelex staff grant it, and so is `style`, the
3505
+ * retired app style. A logo's refusal names its slot's key, such as `square_logo` or
3506
+ * `dark_wide_logo`, in `location.field`: `422` `pipelex.storage.uri_invalid` for a URI that is
3507
+ * not a storage URI and `403` `pipelex.org.mismatch` for another organization's file, both on the
3508
+ * problem itself, and `422` `request.unsupported` for a file the platform refused, naming the
3509
+ * first broken rule in `params.field` and `params.reason`, a `LogoRefusalCode`, and, when several
3510
+ * rules are broken, one item per rule in its `errors`, each naming its own slot and reason. A
3507
3511
  * `503` `runtime.unavailable` is a failure of the platform's storage or its database, after which
3508
3512
  * the write may have landed or not: the same input sent again is safe.
3509
3513
  */
@@ -5370,17 +5374,23 @@ function withCheckedUse(use) {
5370
5374
  };
5371
5375
  }
5372
5376
  /**
5373
- * A branding with its `style` and `typeface` kept only when each is a string, each read as `null`
5374
- * otherwise, and its `white_label` read as `true` only when it is `true`: when the answer leaves a
5375
- * member out, as a platform that predates it does, sends `null`, or sends any other type. So each
5376
- * is what `OrganizationBranding` declares, never `undefined`, and anything but the entitlement
5377
- * itself reads as no entitlement, which keeps Pipelex's mark. The rest is returned as it came.
5377
+ * A branding with its `preset`, `shell` and `typeface` kept only when each is a string, its
5378
+ * `design_system` only when it is a JSON object, each read as `null` otherwise, its dark logos read
5379
+ * as `null` when the answer leaves them out, and its `white_label` read as `true` only when it is
5380
+ * `true`: when the answer leaves a member out, as a platform that predates it does, sends `null`,
5381
+ * or sends any other type. So each is what `OrganizationBranding` declares, never `undefined`, and
5382
+ * anything but the entitlement itself reads as no entitlement, which keeps Pipelex's mark. The rest
5383
+ * is returned as it came.
5378
5384
  */
5379
5385
  function withCheckedBrandingChoices(answer) {
5380
5386
  return {
5381
5387
  ...answer,
5382
- style: typeof answer.style === "string" ? answer.style : null,
5388
+ dark_square_logo: answer.dark_square_logo ?? null,
5389
+ dark_wide_logo: answer.dark_wide_logo ?? null,
5390
+ preset: typeof answer.preset === "string" ? answer.preset : null,
5391
+ shell: typeof answer.shell === "string" ? answer.shell : null,
5383
5392
  typeface: typeof answer.typeface === "string" ? answer.typeface : null,
5393
+ design_system: isPlainObject(answer.design_system) ? answer.design_system : null,
5384
5394
  white_label: answer.white_label === true,
5385
5395
  };
5386
5396
  }