@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 +1 -1
- package/dist/cli/script.d.ts +1 -1
- package/dist/client.d.ts +23 -19
- package/dist/client.js +35 -25
- package/dist/client.js.map +1 -1
- package/dist/errors.d.ts +7 -4
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js.map +1 -1
- package/dist/product-models.d.ts +55 -22
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/architecture.md +1 -1
- package/docs/errors.md +1 -1
- package/docs/organization-branding.md +33 -16
- package/package.json +1 -1
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,
|
|
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 |
|
package/dist/cli/script.d.ts
CHANGED
|
@@ -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.
|
|
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
|
|
1947
|
-
*
|
|
1948
|
-
*
|
|
1949
|
-
*
|
|
1950
|
-
*
|
|
1951
|
-
*
|
|
1952
|
-
* `
|
|
1953
|
-
*
|
|
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
|
|
1968
|
-
* typeface is an id of the shape `^[a-z0-9-]{1,32}$`, stored whether or not it names
|
|
1969
|
-
* exists.
|
|
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
|
|
1978
|
-
* names the field in `location.field`: the
|
|
1979
|
-
* item's of its `errors` when it refuses
|
|
1980
|
-
*
|
|
1981
|
-
*
|
|
1982
|
-
*
|
|
1983
|
-
* `pipelex.org.mismatch` for another organization's file,
|
|
1984
|
-
*
|
|
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
|
|
3466
|
-
*
|
|
3467
|
-
*
|
|
3468
|
-
*
|
|
3469
|
-
*
|
|
3470
|
-
*
|
|
3471
|
-
* `
|
|
3472
|
-
*
|
|
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
|
|
3490
|
-
* typeface is an id of the shape `^[a-z0-9-]{1,32}$`, stored whether or not it names
|
|
3491
|
-
* exists.
|
|
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
|
|
3500
|
-
* names the field in `location.field`: the
|
|
3501
|
-
* item's of its `errors` when it refuses
|
|
3502
|
-
*
|
|
3503
|
-
*
|
|
3504
|
-
*
|
|
3505
|
-
* `pipelex.org.mismatch` for another organization's file,
|
|
3506
|
-
*
|
|
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 `
|
|
5374
|
-
*
|
|
5375
|
-
*
|
|
5376
|
-
*
|
|
5377
|
-
*
|
|
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
|
-
|
|
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
|
}
|