Skip to content

v0.49.0

Choose a tag to compare

@github-actions github-actions released this 23 Oct 00:47
· 40 commits to main since this release
73772ba

@pipelex/sdk on npm

Added

  • listFiles and iterateFiles, an organization's files: listFiles(query) reads one page of GET /v1/files, a FilePage of FileSummary rows (file_id, uri, name, media_type, format, size, kind, origin, created_at, created_by), newest first, each uri taken by a run's inputs as any address, and iterateFiles(query) follows its cursor through filtered pages that come back short or empty. ListFilesQuery takes q, kind, format and mediaType, each of the last two sent as one repeated parameter per value and refused with RequestArgumentError when empty, methodId, runId, createdBy, createdFrom, createdTo, limit and cursor; FileKind, FileOrigin, FilePage, FileSummary and ListFilesQuery are exported (docs/files.md).
  • An upload recorded as a method's test file: UploadInput gains kind (uploaded or test) and method_id, which upload sends to POST /v1/upload, uploadFile takes the same pair among its options, and prepareInputs takes it as its nested upload member for every file it uploads, each checked before any file is read, kind: "test" requiring a bare method_id and only a test file naming one. The upload route's refusals of a test file, a role that may not change methods, an unknown method or one being erased, are a TestFileRefusedError with a code, rather than a refused credential or a deployment without upload; UploadKind, UploadKindOptions, TestFileRefusedError and TestFileRefusalCode are exported.
  • An organization's branding, read and written: getBranding() reads the active organization's name, light and dark colour sets and square and wide logos (GET /v1/branding), for any role and by API key too, and updateOrganizationBranding(orgId, input) is an admin's write of them (PATCH /v1/organizations/{org_id}/branding), where a key given a value is set, a key given null cleared and a key left out kept. Both answer an OrganizationBranding, whose logo uri is the platform's own copy under branding/, which sent back unchanged keeps the logo, with the exported types BrandingColors, LogoDescriptor, OrganizationBrandingUpdate and BrandingColorsUpdate (docs/organization-branding.md).
  • LogoRefusalCode, the codes of a refused logo: a branding write that refuses a logo names its slot in ApiResponseError.errors, each entry's field being square_logo or wide_logo, its code one of the logo codes this type names, and its detail the sentence to show under that slot; a refused colour is named by its dotted key, such as colors.action.

pipelex-sdk on PyPI

Added

  • An organization's branding, read and written: get_branding() reads the active organization's name, light and dark colour sets and square and wide logos (GET /v1/branding), for any role and by API key too, and update_organization_branding(org_id, update) is an admin's write of them (PATCH /v1/organizations/{org_id}/branding), which sends only the fields its OrganizationBrandingUpdate sets, an explicit None clearing one. Both answer an OrganizationBranding, whose logo uri is the platform's own copy under branding/, which sent back unchanged keeps the logo, with the models BrandingColors, LogoDescriptor and BrandingColorsUpdate in pipelex_sdk.product_models (docs/organization-branding.md).
  • LogoRefusalCode, the codes of a refused logo: a branding write that refuses a logo names its slot in ApiResponseError.errors, each entry's field being square_logo or wide_logo, its code a member of this StrEnum in pipelex_sdk.errors, and its detail the sentence to show under that slot; a refused colour is named by its dotted key, such as colors.action.

@pipelex/create-method-app on npm, with the method-app templates

Changed

  • Both templates run on the SDK 0.48.1: @pipelex/sdk in the web app and pipelex-sdk in the CLI move from 0.45.0, with mthds moving from 0.22.0 to 0.25.0 in the CLI, and npm ls mthds lists two copies in the web app again, the form kernel's 0.30.1 and the SDK's 0.33.0, until a release of @pipelex/mthds-form takes the SDK's range.
  • A bundle travels as the method's tree (Breaking): both templates send a bundle to the runs, the preparation of the inputs, /v1/codegen and /v1/pipe-io as contents, each .mthds file's text keyed by its path in the method's directory, methods/<name>/ in the web app and method/ in the CLI, and in the web app loadMethodBundles returns that map, which every action make add-method writes passes, so an action written before passes contents where it passed mthds_contents. A refusal from make codegen, make add-method or make create names a bundle's file by that path, where the CLI named it method/<path>, and make create's note under it says which directory or file the paths start from.

The JavaScript starter, Pipelex/pipelex-starter-js

Changed

  • The starter runs on @pipelex/sdk 0.48.1 and sends a bundle as its tree (Breaking): moved from 0.45.0, it sends a bundle to the runs, prepareInputs, /v1/codegen and /v1/pipe-io as contents, each .mthds file's text keyed by its path inside methods/<name>/, which loadMethodBundles now returns and every bundle-sourced tab and every action make add-method writes passes, so an action of a project's own that passed mthds_contents passes contents instead. A refusal from make codegen or make add-method names a bundle's file by that path, under the line naming the method. npm ls mthds lists two copies again, the form kernel's 0.30.1 and the SDK's 0.33.0, until a release of @pipelex/mthds-form takes the SDK's range.

The Python starter, Pipelex/pipelex-starter-python

Changed

  • The starter runs on pipelex-sdk 0.48.1, with mthds 0.25.0, and sends a bundle as its tree (Breaking): moved from 0.45.0 and mthds 0.22.0, its lifecycle helpers execute_pipe, start_and_wait and start_pipe take the bundle as contents, each .mthds file's text keyed by its path in the method's directory, where they took mthds_contents, a list of texts, so a command of a project's own passes contents={"main.mthds": bundle} where it passed mthds_contents=[bundle]. make codegen sends each method directory the same way, so a refusal names a file by its path inside widget/methods/<name>/, under the line naming the method, where it named it by its path from the repository's root.