@opencxh/domain 1.304.0 → 1.305.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.
@@ -8,7 +8,7 @@ import { DeliverTo } from '../purchase/types';
8
8
  */
9
9
  export interface ProvisionedItem {
10
10
  /**
11
- * Its key ({@link itemKey}): deterministic, unique per organisation, made before the first
11
+ * From its key ({@link itemKey}): deterministic, unique per organisation, made before the first
12
12
  * request. The same sales event twice finds the same row, and a relation can name an item
13
13
  * before it is stored.
14
14
  */
@@ -99,7 +99,17 @@ export declare const externalKeyOf: (app: string, externalRef: string) => string
99
99
  export declare const requiresIdsOf: (requires: readonly ItemRequirement[] | undefined) => string[];
100
100
  /** A serial is one identity per product while it runs; an ended row holds its own id. */
101
101
  export declare const serialKeyOf: (item: Pick<ProvisionedItem, "id" | "productId" | "serial">, running: boolean) => string;
102
- /** `sale:<agreement>#<series>`, `order:<order>#<line>[#<serial>]`, `resource:<item>#<role>`. */
102
+ /**
103
+ * The UUID that always follows from `key`. m1cro keeps a given `id` only when it is a UUID and
104
+ * silently makes its own otherwise — rows stored under `sale:…#…` were never found again (06-10).
105
+ * A UUID passes unchanged, so an id that is already one can go through again. cyrb128 (four
106
+ * seeded 32-bit hashes); version nibble 5 for name-based, RFC variant. Not crypto.
107
+ */
108
+ export declare function stableId(key: string): string;
109
+ /**
110
+ * The item's id: {@link stableId} of `sale:<agreement>#<series>`, `order:<order>#<line>[#<serial>]`
111
+ * or `resource:<item>#<role>`.
112
+ */
103
113
  export declare function itemKey(source: {
104
114
  kind: "sale";
105
115
  agreementId: string;
@@ -10,6 +10,13 @@ import { WorkItem, WorkProject } from './types';
10
10
  /** The scope kinds `apps/work` claims through `/provider/scope/describe`. */
11
11
  export declare const WORK_ITEM_SCOPE_KIND = "work_item";
12
12
  export declare const WORK_PROJECT_SCOPE_KIND = "work_project";
13
+ /**
14
+ * Client service work exposes: the pipeline a new deal lands in, made from the sales template when
15
+ * there is none yet. One owner, so callers take the first answer and treat none as a failure.
16
+ */
17
+ export declare const WORK_PIPELINE_SERVICE = "work.pipeline.ensure";
18
+ /** A project is a pipeline when it is live and offers the `deal` kind itself. */
19
+ export declare const isPipeline: (project: WorkProject) => boolean;
13
20
  /**
14
21
  * A row in an item's feed, addressable on its own.
15
22
  *
@@ -152,6 +152,8 @@ export interface WorkProject {
152
152
  */
153
153
  lastSequence?: number;
154
154
  archived?: boolean;
155
+ /** Users who starred it: their Favorieten in the Werk menu. Per person, so not a member list. */
156
+ starredBy?: string[];
155
157
  order?: number;
156
158
  /**
157
159
  * Ids of this project in source systems (`asana:12345`), the dedupe axis of the ingest