@entifix/business 0.23.25 → 0.23.27
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/dist/flow/slip.d.ts +6 -3
- package/dist/flow/slip.d.ts.map +1 -1
- package/dist/flow/slip.js +5 -1
- package/dist/flow/slip.js.map +1 -1
- package/dist/import/index.d.ts +2 -0
- package/dist/import/index.d.ts.map +1 -0
- package/dist/import/index.js +3 -0
- package/dist/import/index.js.map +1 -0
- package/dist/import/sheet-import.d.ts +82 -0
- package/dist/import/sheet-import.d.ts.map +1 -0
- package/dist/import/sheet-import.js +73 -0
- package/dist/import/sheet-import.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/flow/slip.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { Effect, Schema } from 'effect';
|
|
|
5
5
|
* flow that started under one grammar finishes under that grammar even after
|
|
6
6
|
* the next one ships.
|
|
7
7
|
*/
|
|
8
|
-
export declare const SLIP_VERSION:
|
|
8
|
+
export declare const SLIP_VERSION: 5;
|
|
9
9
|
/**
|
|
10
10
|
* Every grammar version a stored slip may be written in. A flow started under
|
|
11
11
|
* an earlier one still decodes and finishes under it.
|
|
@@ -24,8 +24,11 @@ export declare const SLIP_VERSION: 4;
|
|
|
24
24
|
* the walk goes on from that answer — a write that landed is never undone
|
|
25
25
|
* as if it had not, nor a pivot rolled back; an undoing that fails that way
|
|
26
26
|
* is tried again within the step's bound before the flow stops `failed`.
|
|
27
|
+
* - `5` — the same walk, and a step none of whose calls can have reached its
|
|
28
|
+
* participant (an open breaker, a full bulkhead, a refused connection) is
|
|
29
|
+
* not in doubt: what ran before it is undone, as for a refusal.
|
|
27
30
|
*/
|
|
28
|
-
export declare const SLIP_VERSIONS: readonly [1, 2, 3, 4];
|
|
31
|
+
export declare const SLIP_VERSIONS: readonly [1, 2, 3, 4, 5];
|
|
29
32
|
/**
|
|
30
33
|
* Tags that place a step in a segment of the flow: whose lines, which payment.
|
|
31
34
|
* `entitlements` are the facts verified for the party the segment acts for —
|
|
@@ -136,7 +139,7 @@ export type SlipResolution = typeof SlipResolution.Type;
|
|
|
136
139
|
* flow that has already started.
|
|
137
140
|
*/
|
|
138
141
|
export declare const Slip: Schema.Struct<{
|
|
139
|
-
readonly slipVersion: Schema.Literals<readonly [1, 2, 3, 4]>;
|
|
142
|
+
readonly slipVersion: Schema.Literals<readonly [1, 2, 3, 4, 5]>;
|
|
140
143
|
readonly flowId: Schema.String;
|
|
141
144
|
readonly recipe: Schema.String;
|
|
142
145
|
/** The recipe demands a commit point even with no retriable step (a checkout). */
|
package/dist/flow/slip.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slip.d.ts","sourceRoot":"","sources":["../../src/flow/slip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAExC;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAG,CAAU,CAAC;AAEvC
|
|
1
|
+
{"version":3,"file":"slip.d.ts","sourceRoot":"","sources":["../../src/flow/slip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAExC;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAG,CAAU,CAAC;AAEvC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,aAAa,0BAAsC,CAAC;AAOjE;;;;;GAKG;AACH,eAAO,MAAM,WAAW;;;;EAItB,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC,IAAI,CAAC;AAElD;;;;;GAKG;AACH,eAAO,MAAM,SAAS;IACpB,s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AAkD;AAClD,eAAO,MAAM,SAAS,GAAI,MAAM,IAAI,KAAG,SAAS,QAAQ,EACb,CAAC"}
|
package/dist/flow/slip.js
CHANGED
|
@@ -4,7 +4,7 @@ import { Effect, Schema } from 'effect';
|
|
|
4
4
|
* The grammar version a slip is written in. An interpreter branches on it, so a
|
|
5
5
|
* flow that started under one grammar finishes under that grammar even after
|
|
6
6
|
* the next one ships.
|
|
7
|
-
*/ export const SLIP_VERSION =
|
|
7
|
+
*/ export const SLIP_VERSION = 5;
|
|
8
8
|
/**
|
|
9
9
|
* Every grammar version a stored slip may be written in. A flow started under
|
|
10
10
|
* an earlier one still decodes and finishes under it.
|
|
@@ -23,10 +23,14 @@ import { Effect, Schema } from 'effect';
|
|
|
23
23
|
* the walk goes on from that answer — a write that landed is never undone
|
|
24
24
|
* as if it had not, nor a pivot rolled back; an undoing that fails that way
|
|
25
25
|
* is tried again within the step's bound before the flow stops `failed`.
|
|
26
|
+
* - `5` — the same walk, and a step none of whose calls can have reached its
|
|
27
|
+
* participant (an open breaker, a full bulkhead, a refused connection) is
|
|
28
|
+
* not in doubt: what ran before it is undone, as for a refusal.
|
|
26
29
|
*/ export const SLIP_VERSIONS = [
|
|
27
30
|
1,
|
|
28
31
|
2,
|
|
29
32
|
3,
|
|
33
|
+
4,
|
|
30
34
|
SLIP_VERSION
|
|
31
35
|
];
|
|
32
36
|
const Call = Schema.Struct({
|
package/dist/flow/slip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/flow/slip.ts"],"sourcesContent":["import { ProtocolFailure } from '@entifix/core';\nimport { Effect, Schema } from 'effect';\n\n/**\n * The grammar version a slip is written in. An interpreter branches on it, so a\n * flow that started under one grammar finishes under that grammar even after\n * the next one ships.\n */\nexport const SLIP_VERSION =
|
|
1
|
+
{"version":3,"sources":["../../src/flow/slip.ts"],"sourcesContent":["import { ProtocolFailure } from '@entifix/core';\nimport { Effect, Schema } from 'effect';\n\n/**\n * The grammar version a slip is written in. An interpreter branches on it, so a\n * flow that started under one grammar finishes under that grammar even after\n * the next one ships.\n */\nexport const SLIP_VERSION = 5 as const;\n\n/**\n * Every grammar version a stored slip may be written in. A flow started under\n * an earlier one still decodes and finishes under it.\n *\n * - `1` — the walk as first shipped.\n * - `2` — the same walk, and a wait past the commit point announces\n * `flow.waiting`: the caller's write has landed and what is left is someone\n * else's, so a browser holding the write pending can let it go.\n * - `3` — the same walk, and a step that fails past the commit point rolls\n * forward: a technical failure suspends it, a durable clock waits, and it is\n * dispatched again until it answers or its bound is spent and the flow\n * strands; a business refusal there strands it at once.\n * - `4` — the same walk, and doubt is resolved before and at the commit\n * point: a step whose call failed for a technical reason is asked again\n * under its own idempotency key on a durable clock until it answers, and\n * the walk goes on from that answer — a write that landed is never undone\n * as if it had not, nor a pivot rolled back; an undoing that fails that way\n * is tried again within the step's bound before the flow stops `failed`.\n * - `5` — the same walk, and a step none of whose calls can have reached its\n * participant (an open breaker, a full bulkhead, a refused connection) is\n * not in doubt: what ran before it is undone, as for a refusal.\n */\nexport const SLIP_VERSIONS = [1, 2, 3, 4, SLIP_VERSION] as const;\n\nconst Call = Schema.Struct({\n method: Schema.Literals(['GET', 'POST', 'PUT', 'PATCH', 'DELETE']),\n path: Schema.String,\n});\n\n/**\n * Tags that place a step in a segment of the flow: whose lines, which payment.\n * `entitlements` are the facts verified for the party the segment acts for —\n * a vendor's provisioning, never the caller's — and a segment's steps are\n * checked against them beside the flow's context.\n */\nexport const SlipSegment = Schema.Struct({\n vendor: Schema.optionalKey(Schema.String),\n paymentMethod: Schema.optionalKey(Schema.String),\n entitlements: Schema.optionalKey(Schema.Array(Schema.String)),\n});\nexport type SlipSegment = typeof SlipSegment.Type;\n\n/**\n * A step that runs only when an earlier wait was answered with one of\n * `outcomes` — the one branch a slip can take, decided by what the wait was\n * told rather than by anything known at composition. A step guarded on a wait\n * that was itself skipped is skipped too.\n */\nexport const SlipGuard = Schema.Struct({\n /** The step name of the wait, earlier in the slip. */\n wait: Schema.String,\n outcomes: Schema.Array(Schema.String),\n});\nexport type SlipGuard = typeof SlipGuard.Type;\n\n/** One pinned step: a fragment reference and everything resolved for it. */\nexport const SlipStep = Schema.Struct({\n /** `id@version`, pinned when the slip was composed. */\n ref: Schema.String,\n /** Unique within the slip; what an Activity is named after (`segment:step`). */\n step: Schema.String,\n cardinality: Schema.Literals(['one', 'perVendor', 'perLine']),\n segment: Schema.optionalKey(SlipSegment),\n /** The line a `perLine` step was expanded for, by the recipe's key. */\n line: Schema.optionalKey(Schema.String),\n participant: Schema.optionalKey(Schema.String),\n call: Schema.optionalKey(Call),\n compensation: Schema.optionalKey(Call),\n /** Configuration pinned at composition — a hold's expiry, a limit. */\n parameters: Schema.optionalKey(Schema.Record(Schema.String, Schema.Unknown)),\n guard: Schema.optionalKey(SlipGuard),\n});\nexport type SlipStep = typeof SlipStep.Type;\n\nexport const SlipStage = Schema.Struct({\n name: Schema.String,\n steps: Schema.Array(SlipStep),\n});\nexport type SlipStage = typeof SlipStage.Type;\n\n/** Who may receive what the flow announces — the envelope's audience. */\nexport const SlipAudienceEntry = Schema.Struct({\n kind: Schema.Literals(['organization', 'party', 'flow']),\n id: Schema.String,\n digest: Schema.optionalKey(Schema.String),\n});\nexport type SlipAudienceEntry = typeof SlipAudienceEntry.Type;\n\n/** Which variant each use case resolved to, and by which rule. */\nexport const SlipResolution = Schema.Struct({\n useCase: Schema.String,\n variant: Schema.String,\n rule: Schema.Number,\n});\nexport type SlipResolution = typeof SlipResolution.Type;\n\n/**\n * A routing slip: ordered stages of pinned steps, composed once at start and\n * stored as the flow's payload. Changing a recipe or a fragment never changes a\n * flow that has already started.\n */\nexport const Slip = Schema.Struct({\n slipVersion: Schema.Literals(SLIP_VERSIONS),\n flowId: Schema.String,\n recipe: Schema.String,\n /** The recipe demands a commit point even with no retriable step (a checkout). */\n requiresCommitPoint: Schema.optionalKey(Schema.Boolean),\n stages: Schema.Array(SlipStage),\n resolution: Schema.Array(SlipResolution),\n composedAt: Schema.String,\n /**\n * Who the flow's `flow.*` events reach beside the flow itself — the\n * organizations and parties it acts for, pinned when it was composed.\n */\n audience: Schema.optionalKey(Schema.Array(SlipAudienceEntry)),\n});\nexport type Slip = typeof Slip.Type;\n\n/**\n * Decodes a stored or received slip. An unknown `slipVersion`, like any shape\n * the grammar does not describe, is a protocol failure: an interpreter must\n * never guess at a grammar it was not built for.\n */\nexport const decodeSlip = (\n input: unknown,\n): Effect.Effect<Slip, ProtocolFailure> =>\n Schema.decodeUnknownEffect(Slip)(input).pipe(\n Effect.mapError(\n error =>\n new ProtocolFailure({\n reason: `the slip does not decode: ${error.message}`,\n }),\n ),\n );\n\n/** Encodes a slip as the workflow payload it travels as. */\nexport const encodeSlip = (slip: Slip): unknown =>\n Schema.encodeSync(Slip)(slip);\n\n/** Every step of a slip, in the order it runs. */\nexport const slipSteps = (slip: Slip): readonly SlipStep[] =>\n slip.stages.flatMap(stage => stage.steps);\n"],"names":["ProtocolFailure","Effect","Schema","SLIP_VERSION","SLIP_VERSIONS","Call","Struct","method","Literals","path","String","SlipSegment","vendor","optionalKey","paymentMethod","entitlements","Array","SlipGuard","wait","outcomes","SlipStep","ref","step","cardinality","segment","line","participant","call","compensation","parameters","Record","Unknown","guard","SlipStage","name","steps","SlipAudienceEntry","kind","id","digest","SlipResolution","useCase","variant","rule","Number","Slip","slipVersion","flowId","recipe","requiresCommitPoint","Boolean","stages","resolution","composedAt","audience","decodeSlip","input","decodeUnknownEffect","pipe","mapError","error","reason","message","encodeSlip","slip","encodeSync","slipSteps","flatMap","stage"],"mappings":"AAAA,SAASA,eAAe,QAAQ,gBAAgB;AAChD,SAASC,MAAM,EAAEC,MAAM,QAAQ,SAAS;AAExC;;;;CAIC,GACD,OAAO,MAAMC,eAAe,EAAW;AAEvC;;;;;;;;;;;;;;;;;;;;;CAqBC,GACD,OAAO,MAAMC,gBAAgB;IAAC;IAAG;IAAG;IAAG;IAAGD;CAAa,CAAU;AAEjE,MAAME,OAAOH,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AAO,CAACC,CAAAA,QAASA,MAAMjC,KAAK,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/import/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/import/index.ts"],"sourcesContent":["export * from './sheet-import.js';\n"],"names":[],"mappings":"AAAA,cAAc,oBAAoB"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { Effect } from 'effect';
|
|
2
|
+
/**
|
|
3
|
+
* One refused row of a sheet import, as its record keeps it
|
|
4
|
+
* ([ADR 0037](../../../../../docs/adr/0037-a-sheet-import-is-a-record-and-a-row-is-one-unit.md)).
|
|
5
|
+
*/
|
|
6
|
+
export interface SheetImportRejection {
|
|
7
|
+
/** The row's number as the sheet shows it: the header is row 1. */
|
|
8
|
+
readonly rowNumber: number;
|
|
9
|
+
/** The `errors` catalog key the row was refused with. */
|
|
10
|
+
readonly code: string;
|
|
11
|
+
/** The column the refusal names, when it names one. */
|
|
12
|
+
readonly column?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* How an import ended: every row written, or some refused. A row is one unit
|
|
16
|
+
* of work, so an import never ends half-written for one row, and there is no
|
|
17
|
+
* third state to report.
|
|
18
|
+
*/
|
|
19
|
+
export declare const SheetImportStatuses: readonly ["completed", "partial"];
|
|
20
|
+
export type SheetImportStatus = (typeof SheetImportStatuses)[number];
|
|
21
|
+
export declare const SheetImportStatusTones: {
|
|
22
|
+
readonly completed: "success";
|
|
23
|
+
readonly partial: "warning";
|
|
24
|
+
};
|
|
25
|
+
/** Why one row's unit wrote nothing: its `errors` code, and the column. */
|
|
26
|
+
export interface SheetRowRefusal {
|
|
27
|
+
readonly refused: string;
|
|
28
|
+
readonly column?: string;
|
|
29
|
+
}
|
|
30
|
+
/** A row's refusal, for `importRow` to answer. */
|
|
31
|
+
export declare const refuseRow: (code: string, column?: string) => SheetRowRefusal;
|
|
32
|
+
/** The claim a row of import `key` is written under. */
|
|
33
|
+
export declare const sheetRowKey: (key: string, rowNumber: number) => string;
|
|
34
|
+
/** What one run of a sheet import is given. */
|
|
35
|
+
export interface SheetImportRun<Row extends {
|
|
36
|
+
readonly rowNumber: number;
|
|
37
|
+
}, Written, E, R> {
|
|
38
|
+
/** The request's `Idempotency-Key`: the import's id, and its rows' prefix. */
|
|
39
|
+
readonly key: string;
|
|
40
|
+
/** Every row the sheet held that could be read, in sheet order. */
|
|
41
|
+
readonly rows: readonly Row[];
|
|
42
|
+
/** The rows that could not be read, counted on the record as refused. */
|
|
43
|
+
readonly unread?: readonly SheetImportRejection[];
|
|
44
|
+
/** The most rows one import takes, read rows and unread together. */
|
|
45
|
+
readonly maxRows: number;
|
|
46
|
+
/** The failure a sheet past `maxRows` is refused whole with. */
|
|
47
|
+
readonly tooLarge: (rows: number, max: number) => E;
|
|
48
|
+
/** What an earlier attempt wrote under a row's claim, or nothing. */
|
|
49
|
+
readonly claimed: (rowKey: string) => Effect.Effect<Written | undefined, E, R>;
|
|
50
|
+
/**
|
|
51
|
+
* Check a row and write it as one unit claimed by `rowKey` — what it wrote,
|
|
52
|
+
* or why it would not ({@link refuseRow}). A refusal never ends the run; a
|
|
53
|
+
* failure does, and the same key resumes it.
|
|
54
|
+
*/
|
|
55
|
+
readonly importRow: (row: Row, rowKey: string) => Effect.Effect<Written | SheetRowRefusal, E, R>;
|
|
56
|
+
}
|
|
57
|
+
/** What a sheet import's run came to, for the domain to write its record. */
|
|
58
|
+
export interface SheetImportResult<Written> {
|
|
59
|
+
/** Each row written now or by an earlier attempt, in sheet order. */
|
|
60
|
+
readonly written: readonly Written[];
|
|
61
|
+
/** Each row refused, read or not, by row number. */
|
|
62
|
+
readonly rejections: readonly SheetImportRejection[];
|
|
63
|
+
/** Every row the sheet held. */
|
|
64
|
+
readonly rowCount: number;
|
|
65
|
+
readonly status: SheetImportStatus;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Runs a sheet import row by row
|
|
69
|
+
* ([ADR 0037](../../../../../docs/adr/0037-a-sheet-import-is-a-record-and-a-row-is-one-unit.md)).
|
|
70
|
+
*
|
|
71
|
+
* A sheet past `maxRows` is refused whole, before any row is written. Then
|
|
72
|
+
* each row is first looked for under its claim, so a resubmitted sheet counts
|
|
73
|
+
* what its first attempt wrote rather than refusing it as a duplicate of
|
|
74
|
+
* itself; then checked and written by the domain. ⚠️ A row the domain refuses
|
|
75
|
+
* is looked for under its claim once more: another attempt at the same sheet
|
|
76
|
+
* may have written it between the first look and the refusal — the very
|
|
77
|
+
* duplicate the refusal saw — and its claim commits with it.
|
|
78
|
+
*/
|
|
79
|
+
export declare const runSheetImport: <Row extends {
|
|
80
|
+
readonly rowNumber: number;
|
|
81
|
+
}, Written, E, R>(run: SheetImportRun<Row, Written, E, R>) => Effect.Effect<SheetImportResult<Written>, E, R>;
|
|
82
|
+
//# sourceMappingURL=sheet-import.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sheet-import.d.ts","sourceRoot":"","sources":["../../src/import/sheet-import.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,mEAAmE;IACnE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,yDAAyD;IACzD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,uDAAuD;IACvD,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,mCAAoC,CAAC;AAErE,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAErE,eAAO,MAAM,sBAAsB;;;CAG+B,CAAC;AAEnE,2EAA2E;AAC3E,MAAM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AAQ,CAAC,OAAO,EAAE,SAAS,OAAO,EAAE,CAAC;IACrC,oDAAoD;IACpD,QAAQ,CAAC,UAAU,EAAE,SAAS,oBAAoB,EAAE,CAAC;IACrD,gCAAgC;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;CACpC;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc,GACzB,GAAG,SAAS;IAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAAE,EAC1C,OAAO,EACP,CAAC,EACD,CAAC,EAED,KAAK,cAAc,CAAC,GAAG,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,KACtC,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC,CAqC7C,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
2
|
+
import { Effect } from 'effect';
|
|
3
|
+
/**
|
|
4
|
+
* How an import ended: every row written, or some refused. A row is one unit
|
|
5
|
+
* of work, so an import never ends half-written for one row, and there is no
|
|
6
|
+
* third state to report.
|
|
7
|
+
*/ export const SheetImportStatuses = [
|
|
8
|
+
'completed',
|
|
9
|
+
'partial'
|
|
10
|
+
];
|
|
11
|
+
export const SheetImportStatusTones = {
|
|
12
|
+
completed: 'success',
|
|
13
|
+
partial: 'warning'
|
|
14
|
+
};
|
|
15
|
+
/** A row's refusal, for `importRow` to answer. */ export const refuseRow = (code, column)=>column === undefined ? {
|
|
16
|
+
refused: code
|
|
17
|
+
} : {
|
|
18
|
+
refused: code,
|
|
19
|
+
column
|
|
20
|
+
};
|
|
21
|
+
const isRefusal = (value)=>typeof value === 'object' && value !== null && typeof value.refused === 'string';
|
|
22
|
+
/** The claim a row of import `key` is written under. */ export const sheetRowKey = (key, rowNumber)=>`${key}:${String(rowNumber)}`;
|
|
23
|
+
/**
|
|
24
|
+
* Runs a sheet import row by row
|
|
25
|
+
* ([ADR 0037](../../../../../docs/adr/0037-a-sheet-import-is-a-record-and-a-row-is-one-unit.md)).
|
|
26
|
+
*
|
|
27
|
+
* A sheet past `maxRows` is refused whole, before any row is written. Then
|
|
28
|
+
* each row is first looked for under its claim, so a resubmitted sheet counts
|
|
29
|
+
* what its first attempt wrote rather than refusing it as a duplicate of
|
|
30
|
+
* itself; then checked and written by the domain. ⚠️ A row the domain refuses
|
|
31
|
+
* is looked for under its claim once more: another attempt at the same sheet
|
|
32
|
+
* may have written it between the first look and the refusal — the very
|
|
33
|
+
* duplicate the refusal saw — and its claim commits with it.
|
|
34
|
+
*/ export const runSheetImport = (run)=>Effect.gen(function*() {
|
|
35
|
+
var _run_unread;
|
|
36
|
+
const unread = (_run_unread = run.unread) != null ? _run_unread : [];
|
|
37
|
+
const rowCount = run.rows.length + unread.length;
|
|
38
|
+
if (rowCount > run.maxRows) return yield* Effect.fail(run.tooLarge(rowCount, run.maxRows));
|
|
39
|
+
const written = [];
|
|
40
|
+
const rejections = [
|
|
41
|
+
...unread
|
|
42
|
+
];
|
|
43
|
+
for (const row of run.rows){
|
|
44
|
+
const rowKey = sheetRowKey(run.key, row.rowNumber);
|
|
45
|
+
const earlier = yield* run.claimed(rowKey);
|
|
46
|
+
if (earlier !== undefined) {
|
|
47
|
+
written.push(earlier);
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
const outcome = yield* run.importRow(row, rowKey);
|
|
51
|
+
if (!isRefusal(outcome)) {
|
|
52
|
+
written.push(outcome);
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
const raced = yield* run.claimed(rowKey);
|
|
56
|
+
if (raced !== undefined) written.push(raced);
|
|
57
|
+
else rejections.push(_extends({
|
|
58
|
+
rowNumber: row.rowNumber,
|
|
59
|
+
code: outcome.refused
|
|
60
|
+
}, outcome.column === undefined ? {} : {
|
|
61
|
+
column: outcome.column
|
|
62
|
+
}));
|
|
63
|
+
}
|
|
64
|
+
rejections.sort((one, other)=>one.rowNumber - other.rowNumber);
|
|
65
|
+
return {
|
|
66
|
+
written,
|
|
67
|
+
rejections,
|
|
68
|
+
rowCount,
|
|
69
|
+
status: rejections.length === 0 ? 'completed' : 'partial'
|
|
70
|
+
};
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
//# sourceMappingURL=sheet-import.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/import/sheet-import.ts"],"sourcesContent":["import type { EnumTone } from '@entifix/core';\nimport { Effect } from 'effect';\n\n/**\n * One refused row of a sheet import, as its record keeps it\n * ([ADR 0037](../../../../../docs/adr/0037-a-sheet-import-is-a-record-and-a-row-is-one-unit.md)).\n */\nexport interface SheetImportRejection {\n /** The row's number as the sheet shows it: the header is row 1. */\n readonly rowNumber: number;\n /** The `errors` catalog key the row was refused with. */\n readonly code: string;\n /** The column the refusal names, when it names one. */\n readonly column?: string;\n}\n\n/**\n * How an import ended: every row written, or some refused. A row is one unit\n * of work, so an import never ends half-written for one row, and there is no\n * third state to report.\n */\nexport const SheetImportStatuses = ['completed', 'partial'] as const;\n\nexport type SheetImportStatus = (typeof SheetImportStatuses)[number];\n\nexport const SheetImportStatusTones = {\n completed: 'success',\n partial: 'warning',\n} as const satisfies Readonly<Record<SheetImportStatus, EnumTone>>;\n\n/** Why one row's unit wrote nothing: its `errors` code, and the column. */\nexport interface SheetRowRefusal {\n readonly refused: string;\n readonly column?: string;\n}\n\n/** A row's refusal, for `importRow` to answer. */\nexport const refuseRow = (code: string, column?: string): SheetRowRefusal =>\n column === undefined ? { refused: code } : { refused: code, column };\n\nconst isRefusal = (value: unknown): value is SheetRowRefusal =>\n typeof value === 'object' &&\n value !== null &&\n typeof (value as { refused?: unknown }).refused === 'string';\n\n/** The claim a row of import `key` is written under. */\nexport const sheetRowKey = (key: string, rowNumber: number): string =>\n `${key}:${String(rowNumber)}`;\n\n/** What one run of a sheet import is given. */\nexport interface SheetImportRun<\n Row extends { readonly rowNumber: number },\n Written,\n E,\n R,\n> {\n /** The request's `Idempotency-Key`: the import's id, and its rows' prefix. */\n readonly key: string;\n /** Every row the sheet held that could be read, in sheet order. */\n readonly rows: readonly Row[];\n /** The rows that could not be read, counted on the record as refused. */\n readonly unread?: readonly SheetImportRejection[];\n /** The most rows one import takes, read rows and unread together. */\n readonly maxRows: number;\n /** The failure a sheet past `maxRows` is refused whole with. */\n readonly tooLarge: (rows: number, max: number) => E;\n /** What an earlier attempt wrote under a row's claim, or nothing. */\n readonly claimed: (\n rowKey: string,\n ) => Effect.Effect<Written | undefined, E, R>;\n /**\n * Check a row and write it as one unit claimed by `rowKey` — what it wrote,\n * or why it would not ({@link refuseRow}). A refusal never ends the run; a\n * failure does, and the same key resumes it.\n */\n readonly importRow: (\n row: Row,\n rowKey: string,\n ) => Effect.Effect<Written | SheetRowRefusal, E, R>;\n}\n\n/** What a sheet import's run came to, for the domain to write its record. */\nexport interface SheetImportResult<Written> {\n /** Each row written now or by an earlier attempt, in sheet order. */\n readonly written: readonly Written[];\n /** Each row refused, read or not, by row number. */\n readonly rejections: readonly SheetImportRejection[];\n /** Every row the sheet held. */\n readonly rowCount: number;\n readonly status: SheetImportStatus;\n}\n\n/**\n * Runs a sheet import row by row\n * ([ADR 0037](../../../../../docs/adr/0037-a-sheet-import-is-a-record-and-a-row-is-one-unit.md)).\n *\n * A sheet past `maxRows` is refused whole, before any row is written. Then\n * each row is first looked for under its claim, so a resubmitted sheet counts\n * what its first attempt wrote rather than refusing it as a duplicate of\n * itself; then checked and written by the domain. ⚠️ A row the domain refuses\n * is looked for under its claim once more: another attempt at the same sheet\n * may have written it between the first look and the refusal — the very\n * duplicate the refusal saw — and its claim commits with it.\n */\nexport const runSheetImport = <\n Row extends { readonly rowNumber: number },\n Written,\n E,\n R,\n>(\n run: SheetImportRun<Row, Written, E, R>,\n): Effect.Effect<SheetImportResult<Written>, E, R> =>\n Effect.gen(function* () {\n const unread = run.unread ?? [];\n const rowCount = run.rows.length + unread.length;\n if (rowCount > run.maxRows)\n return yield* Effect.fail(run.tooLarge(rowCount, run.maxRows));\n\n const written: Written[] = [];\n const rejections: SheetImportRejection[] = [...unread];\n for (const row of run.rows) {\n const rowKey = sheetRowKey(run.key, row.rowNumber);\n const earlier = yield* run.claimed(rowKey);\n if (earlier !== undefined) {\n written.push(earlier);\n continue;\n }\n const outcome = yield* run.importRow(row, rowKey);\n if (!isRefusal(outcome)) {\n written.push(outcome);\n continue;\n }\n const raced = yield* run.claimed(rowKey);\n if (raced !== undefined) written.push(raced);\n else\n rejections.push({\n rowNumber: row.rowNumber,\n code: outcome.refused,\n ...(outcome.column === undefined ? {} : { column: outcome.column }),\n });\n }\n rejections.sort((one, other) => one.rowNumber - other.rowNumber);\n return {\n written,\n rejections,\n rowCount,\n status: rejections.length === 0 ? 'completed' : 'partial',\n };\n });\n"],"names":["Effect","SheetImportStatuses","SheetImportStatusTones","completed","partial","refuseRow","code","column","undefined","refused","isRefusal","value","sheetRowKey","key","rowNumber","String","runSheetImport","run","gen","unread","rowCount","rows","length","maxRows","fail","tooLarge","written","rejections","row","rowKey","earlier","claimed","push","outcome","importRow","raced","sort","one","other","status"],"mappings":";AACA,SAASA,MAAM,QAAQ,SAAS;AAehC;;;;CAIC,GACD,OAAO,MAAMC,sBAAsB;IAAC;IAAa;CAAU,CAAU;AAIrE,OAAO,MAAMC,yBAAyB;IACpCC,WAAW;IACXC,SAAS;AACX,EAAmE;AAQnE,gDAAgD,GAChD,OAAO,MAAMC,YAAY,CAACC,MAAcC,SACtCA,WAAWC,YAAY;QAAEC,SAASH;IAAK,IAAI;QAAEG,SAASH;QAAMC;IAAO,EAAE;AAEvE,MAAMG,YAAY,CAACC,QACjB,OAAOA,UAAU,YACjBA,UAAU,QACV,OAAO,AAACA,MAAgCF,OAAO,KAAK;AAEtD,sDAAsD,GACtD,OAAO,MAAMG,cAAc,CAACC,KAAaC,YACvC,GAAGD,IAAI,CAAC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"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './entity-api/index.js';
|
|
2
2
|
export * from './health/health-registry.js';
|
|
3
3
|
export * from './idempotency/index.js';
|
|
4
|
+
export * from './import/index.js';
|
|
4
5
|
export * from './repository/config.repository.js';
|
|
5
6
|
export * from './repository/entity.repository.js';
|
|
6
7
|
export * from './repository/entity-facet-counter.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,iDAAiD,CAAC;AAChE,cAAc,0CAA0C,CAAC;AACzD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,kCAAkC,CAAC;AACjD,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,iDAAiD,CAAC;AAChE,cAAc,0CAA0C,CAAC;AACzD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,kCAAkC,CAAC;AACjD,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './entity-api/index.js';
|
|
2
2
|
export * from './health/health-registry.js';
|
|
3
3
|
export * from './idempotency/index.js';
|
|
4
|
+
export * from './import/index.js';
|
|
4
5
|
export * from './repository/config.repository.js';
|
|
5
6
|
export * from './repository/entity.repository.js';
|
|
6
7
|
export * from './repository/entity-facet-counter.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './entity-api/index.js';\nexport * from './health/health-registry.js';\nexport * from './idempotency/index.js';\nexport * from './repository/config.repository.js';\nexport * from './repository/entity.repository.js';\nexport * from './repository/entity-facet-counter.js';\nexport * from './repository/entity-link-resolver.repository.js';\nexport * from './repository/entity-mixins.repository.js';\nexport * from './repository/entity-repository-factory.js';\nexport * from './repository/reference-labels.js';\nexport * from './request/index.js';\nexport * from './resolve/index.js';\nexport * from './sessions/one-time-token-store.js';\nexport * from './sessions/session-store.js';\nexport * from './shutdown/shutdown-registry.js';\nexport * from './tenancy/index.js';\nexport * from './tokens/token-failures.js';\nexport * from './tokens/token-service.js';\nexport * from './use-case/delete/index.js';\nexport * from './use-case/facets/index.js';\nexport * from './use-case/get/index.js';\nexport * from './use-case/load/index.js';\nexport * from './use-case/save/index.js';\nexport * from './wiring/wiring-registry.js';\n"],"names":[],"mappings":"AAAA,cAAc,wBAAwB;AACtC,cAAc,8BAA8B;AAC5C,cAAc,yBAAyB;AACvC,cAAc,oCAAoC;AAClD,cAAc,oCAAoC;AAClD,cAAc,uCAAuC;AACrD,cAAc,kDAAkD;AAChE,cAAc,2CAA2C;AACzD,cAAc,4CAA4C;AAC1D,cAAc,mCAAmC;AACjD,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,qCAAqC;AACnD,cAAc,8BAA8B;AAC5C,cAAc,kCAAkC;AAChD,cAAc,qBAAqB;AACnC,cAAc,6BAA6B;AAC3C,cAAc,4BAA4B;AAC1C,cAAc,6BAA6B;AAC3C,cAAc,6BAA6B;AAC3C,cAAc,0BAA0B;AACxC,cAAc,2BAA2B;AACzC,cAAc,2BAA2B;AACzC,cAAc,8BAA8B"}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './entity-api/index.js';\nexport * from './health/health-registry.js';\nexport * from './idempotency/index.js';\nexport * from './import/index.js';\nexport * from './repository/config.repository.js';\nexport * from './repository/entity.repository.js';\nexport * from './repository/entity-facet-counter.js';\nexport * from './repository/entity-link-resolver.repository.js';\nexport * from './repository/entity-mixins.repository.js';\nexport * from './repository/entity-repository-factory.js';\nexport * from './repository/reference-labels.js';\nexport * from './request/index.js';\nexport * from './resolve/index.js';\nexport * from './sessions/one-time-token-store.js';\nexport * from './sessions/session-store.js';\nexport * from './shutdown/shutdown-registry.js';\nexport * from './tenancy/index.js';\nexport * from './tokens/token-failures.js';\nexport * from './tokens/token-service.js';\nexport * from './use-case/delete/index.js';\nexport * from './use-case/facets/index.js';\nexport * from './use-case/get/index.js';\nexport * from './use-case/load/index.js';\nexport * from './use-case/save/index.js';\nexport * from './wiring/wiring-registry.js';\n"],"names":[],"mappings":"AAAA,cAAc,wBAAwB;AACtC,cAAc,8BAA8B;AAC5C,cAAc,yBAAyB;AACvC,cAAc,oBAAoB;AAClC,cAAc,oCAAoC;AAClD,cAAc,oCAAoC;AAClD,cAAc,uCAAuC;AACrD,cAAc,kDAAkD;AAChE,cAAc,2CAA2C;AACzD,cAAc,4CAA4C;AAC1D,cAAc,mCAAmC;AACjD,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,qCAAqC;AACnD,cAAc,8BAA8B;AAC5C,cAAc,kCAAkC;AAChD,cAAc,qBAAqB;AACnC,cAAc,6BAA6B;AAC3C,cAAc,4BAA4B;AAC1C,cAAc,6BAA6B;AAC3C,cAAc,6BAA6B;AAC3C,cAAc,0BAA0B;AACxC,cAAc,2BAA2B;AACzC,cAAc,2BAA2B;AACzC,cAAc,8BAA8B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@entifix/business",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.27",
|
|
4
4
|
"description": "The ports every adapter implements — repository, session, token, health — and the generic get, load, save and delete use-cases.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@swc/helpers": "0.5.23",
|
|
69
|
-
"@entifix/core": "0.23.
|
|
69
|
+
"@entifix/core": "0.23.27"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"effect": "^4.0.7"
|