@nivaro/extension-kit 0.1.1

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.
Files changed (54) hide show
  1. package/README.md +78 -0
  2. package/dist/column-probe.d.ts +9 -0
  3. package/dist/column-probe.d.ts.map +1 -0
  4. package/dist/column-probe.js +58 -0
  5. package/dist/column-probe.js.map +1 -0
  6. package/dist/context.d.ts +361 -0
  7. package/dist/context.d.ts.map +1 -0
  8. package/dist/context.js +2 -0
  9. package/dist/context.js.map +1 -0
  10. package/dist/flows.d.ts +58 -0
  11. package/dist/flows.d.ts.map +1 -0
  12. package/dist/flows.js +2 -0
  13. package/dist/flows.js.map +1 -0
  14. package/dist/hooks.d.ts +26 -0
  15. package/dist/hooks.d.ts.map +1 -0
  16. package/dist/hooks.js +2 -0
  17. package/dist/hooks.js.map +1 -0
  18. package/dist/imports.d.ts +155 -0
  19. package/dist/imports.d.ts.map +1 -0
  20. package/dist/imports.js +2 -0
  21. package/dist/imports.js.map +1 -0
  22. package/dist/index.d.ts +22 -0
  23. package/dist/index.d.ts.map +1 -0
  24. package/dist/index.js +15 -0
  25. package/dist/index.js.map +1 -0
  26. package/dist/notifications.d.ts +183 -0
  27. package/dist/notifications.d.ts.map +1 -0
  28. package/dist/notifications.js +2 -0
  29. package/dist/notifications.js.map +1 -0
  30. package/dist/obligations.d.ts +66 -0
  31. package/dist/obligations.d.ts.map +1 -0
  32. package/dist/obligations.js +2 -0
  33. package/dist/obligations.js.map +1 -0
  34. package/dist/registrations.d.ts +470 -0
  35. package/dist/registrations.d.ts.map +1 -0
  36. package/dist/registrations.js +2 -0
  37. package/dist/registrations.js.map +1 -0
  38. package/dist/requester-columns.d.ts +26 -0
  39. package/dist/requester-columns.d.ts.map +1 -0
  40. package/dist/requester-columns.js +17 -0
  41. package/dist/requester-columns.js.map +1 -0
  42. package/dist/signals.d.ts +77 -0
  43. package/dist/signals.d.ts.map +1 -0
  44. package/dist/signals.js +2 -0
  45. package/dist/signals.js.map +1 -0
  46. package/dist/testing.d.ts +193 -0
  47. package/dist/testing.d.ts.map +1 -0
  48. package/dist/testing.js +615 -0
  49. package/dist/testing.js.map +1 -0
  50. package/dist/user.d.ts +27 -0
  51. package/dist/user.d.ts.map +1 -0
  52. package/dist/user.js +2 -0
  53. package/dist/user.js.map +1 -0
  54. package/package.json +59 -0
@@ -0,0 +1,155 @@
1
+ import type { Knex } from 'knex';
2
+ export type ImportRunItemKind = 'created' | 'updated' | 'removed' | 'skipped' | 'failed';
3
+ export interface ImportRunChange {
4
+ field: string;
5
+ from: unknown;
6
+ to: unknown;
7
+ }
8
+ export interface ImportRunItem {
9
+ kind: ImportRunItemKind;
10
+ collection?: string | null;
11
+ item_id?: string | number | null;
12
+ /** How a person names the record or the file row. */
13
+ label: string;
14
+ /** 1-based row in the file, header excluded. */
15
+ row?: number | null;
16
+ /** Why it was left out, or what went wrong. */
17
+ message?: string | null;
18
+ changes?: ImportRunChange[];
19
+ }
20
+ export interface ImportRunPhase {
21
+ key: string;
22
+ label: string;
23
+ ms: number;
24
+ /** Rows or records the phase handled. */
25
+ count?: number;
26
+ failed?: number;
27
+ }
28
+ export interface ImportRunUnmatched {
29
+ column: string;
30
+ /** 'vendor', 'purchase order key' — as a person says it. */
31
+ label: string;
32
+ /** Distinct values, first 50. */
33
+ values: string[];
34
+ distinct: number;
35
+ /** File rows that carry one of them. */
36
+ rows: number;
37
+ /** What the import did about it. */
38
+ effect: string;
39
+ }
40
+ export interface ImportSampleChange {
41
+ field: string;
42
+ from: unknown;
43
+ to: unknown;
44
+ }
45
+ /** What a dry run would do, with enough rows to explain itself. */
46
+ export interface ImportSamples {
47
+ /** First file row per natural key that would be created (payload). */
48
+ creates: Array<{
49
+ key: string;
50
+ values: Record<string, unknown>;
51
+ }>;
52
+ /** Existing rows that would change, field by field. */
53
+ updates: Array<{
54
+ key: string;
55
+ id: unknown;
56
+ changes: ImportSampleChange[];
57
+ }>;
58
+ /** Rows dropped before writing — the file row number (1-based, header
59
+ * excluded), the natural key when it could be built, and the reason. */
60
+ skipped_rows: Array<{
61
+ row: number;
62
+ key: string | null;
63
+ reason: string;
64
+ }>;
65
+ /** Lookup values with no match that a real run would stub-create. */
66
+ would_create_lookups: Array<{
67
+ column: string;
68
+ collection: string;
69
+ values: string[];
70
+ }>;
71
+ }
72
+ export interface ImportProcessorResult {
73
+ created: number;
74
+ updated: number;
75
+ unchanged: number;
76
+ /** Rows dropped before writing, with per-reason counts. */
77
+ skipped: Record<string, number>;
78
+ failed: number;
79
+ /** First line is the summary the run list shows; the rest is detail. */
80
+ log: string;
81
+ /** Present on a dry run. */
82
+ samples?: ImportSamples;
83
+ /** Records the run changed, per collection — handed to the post-run flows. */
84
+ affected?: Record<string, Array<string | number>>;
85
+ /** What the run did, for the run's detail view. */
86
+ report?: {
87
+ phases?: ImportRunPhase[];
88
+ unmatched?: ImportRunUnmatched[];
89
+ notes?: string[];
90
+ other?: Array<{
91
+ label: string;
92
+ count: number;
93
+ }>;
94
+ };
95
+ /** One entry per record created or changed and per file row left out. */
96
+ items?: ImportRunItem[];
97
+ }
98
+ export interface ImportWriteOutcome {
99
+ done: number;
100
+ failed: number;
101
+ /** First few failure messages, already prefixed with the job's label. */
102
+ failures: string[];
103
+ ms: number;
104
+ }
105
+ export interface ImportWriteJob {
106
+ /** Names the row in a failure message ('line 102-300001123 / 2'). */
107
+ label: string;
108
+ run: () => Promise<void>;
109
+ }
110
+ /** The only way a processor writes: through the items service, as the
111
+ * person who queued the file. Every write tool throws on a dry run. */
112
+ export interface ImportProcessorTools {
113
+ /** Read access for batched lookups. Writes go through create / update / remove. */
114
+ db: Knex;
115
+ /** value → id for one reference column, matched case-insensitively; when a
116
+ * value matches several rows the lowest id wins. */
117
+ lookup(table: string, column: string, values: Iterable<string>): Promise<Map<string, unknown>>;
118
+ /** Run `fn` over `values` in chunks small enough for one statement. */
119
+ inChunks<T>(values: unknown[], fn: (chunk: unknown[]) => Promise<T[]>): Promise<T[]>;
120
+ create(collection: string, body: Record<string, unknown>): Promise<unknown>;
121
+ update(collection: string, id: string | number, patch: Record<string, unknown>): Promise<void>;
122
+ remove(collection: string, id: string | number): Promise<void>;
123
+ /** Run write jobs several at a time. A failed job never stops the others. */
124
+ runWrites(jobs: ImportWriteJob[], opts?: {
125
+ width?: number;
126
+ }): Promise<ImportWriteOutcome>;
127
+ /** Recompute every stored rollup on these records, once each. */
128
+ recalcStoredRollups(collection: string, ids: Array<string | number>): Promise<number>;
129
+ /** EXEC a stored procedure on its own long-running request. Returns ms. */
130
+ runProcedure(name: string): Promise<number>;
131
+ }
132
+ export interface ImportProcessorInput {
133
+ definition: {
134
+ key: string;
135
+ label: string | null;
136
+ config: Record<string, unknown>;
137
+ };
138
+ /** Parsed + header-mapped rows, staging column names as keys. */
139
+ rows: Array<Record<string, string>>;
140
+ /** Classify and report only — every write tool refuses. */
141
+ dryRun: boolean;
142
+ sampleLimit: number;
143
+ tools: ImportProcessorTools;
144
+ /** Rows classified so far, for the run's progress bar. */
145
+ progress(done: number, total: number): void;
146
+ }
147
+ /** A processor for staged imports whose file spans several collections. */
148
+ export interface ImportProcessorDef {
149
+ /** `<extension>:<name>` — what `nivaro_import_definitions.processor` holds. */
150
+ key: string;
151
+ label: string;
152
+ description?: string;
153
+ run(input: ImportProcessorInput): Promise<ImportProcessorResult>;
154
+ }
155
+ //# sourceMappingURL=imports.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imports.d.ts","sourceRoot":"","sources":["../src/imports.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAEhC,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAA;AAExF,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,OAAO,CAAA;IACb,EAAE,EAAE,OAAO,CAAA;CACZ;AAED,MAA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C,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAA;IACzF,iEAAiE;IACjE,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;IACrF,2EAA2E;IAC3E,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;CAC5C;AAED,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAA;IAClF,iEAAiE;IACjE,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IACnC,2DAA2D;IAC3D,MAAM,EAAE,OAAO,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,oBAAoB,CAAA;IAC3B,0DAA0D;IAC1D,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CAC5C;AAED,2EAA2E;AAC3E,MAAM,WAAW,kBAAkB;IACjC,+EAA+E;IAC/E,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,GAAG,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAA;CACjE"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=imports.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imports.js","sourceRoot":"","sources":["../src/imports.ts"],"names":[],"mappings":""}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @nivaro/extension-kit — the contract a Nivaro extension is written against.
3
+ *
4
+ * Types: the extension context and every registration the core accepts.
5
+ * Helpers: the small pure functions extensions used to hand-copy from the API
6
+ * because `api/src` cannot be imported from an extension.
7
+ */
8
+ export { databaseKey, hasColumn, resetColumnProbes } from './column-probe.js';
9
+ export type * from './context.js';
10
+ export type * from './flows.js';
11
+ export type * from './hooks.js';
12
+ export type * from './imports.js';
13
+ export type * from './notifications.js';
14
+ export type * from './obligations.js';
15
+ export type * from './registrations.js';
16
+ export { REQUESTER_COLUMNS, type RequesterTable, requesterInsertFields, requesterSelectColumns } from './requester-columns.js';
17
+ export type * from './signals.js';
18
+ export type * from './user.js';
19
+ /** Type-checks an extension's default export without changing it. */
20
+ export declare function defineExtension<T extends import('./context.js').ExtensionDefinition>(ext: T): T;
21
+ export { createTestContext, createTestDb, type TestContext, type TestContextOptions, type TestDbState, type TestRoute } from './testing.js';
22
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAC7E,mBAAmB,cAAc,CAAA;AACjC,mBAAmB,YAAY,CAAA;AAC/B,mBAAmB,YAAY,CAAA;AAC/B,mBAAmB,cAAc,CAAA;AACjC,mBAAmB,oBAAoB,CAAA;AACvC,mBAAmB,kBAAkB,CAAA;AACrC,mBAAmB,oBAAoB,CAAA;AACvC,OAAO,EACL,iBAAiB,EACjB,KAAK,cAAc,EACnB,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,wBAAwB,CAAA;AAC/B,mBAAmB,cAAc,CAAA;AACjC,mBAAmB,WAAW,CAAA;AAE9B,qEAAqE;AACrE,wBAAgB,eAAe,CAAC,CAAC,SAAS,OAAO,cAAc,EAAE,mBAAmB,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAE/F;AACD,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,KAAK,SAAS,EACf,MAAM,cAAc,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @nivaro/extension-kit — the contract a Nivaro extension is written against.
3
+ *
4
+ * Types: the extension context and every registration the core accepts.
5
+ * Helpers: the small pure functions extensions used to hand-copy from the API
6
+ * because `api/src` cannot be imported from an extension.
7
+ */
8
+ export { databaseKey, hasColumn, resetColumnProbes } from './column-probe.js';
9
+ export { REQUESTER_COLUMNS, requesterInsertFields, requesterSelectColumns } from './requester-columns.js';
10
+ /** Type-checks an extension's default export without changing it. */
11
+ export function defineExtension(ext) {
12
+ return ext;
13
+ }
14
+ export { createTestContext, createTestDb } from './testing.js';
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAQ7E,OAAO,EACL,iBAAiB,EAEjB,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,wBAAwB,CAAA;AAI/B,qEAAqE;AACrE,MAAM,UAAU,eAAe,CAAuD,GAAM;IAC1F,OAAO,GAAG,CAAA;AACZ,CAAC;AACD,OAAO,EACL,iBAAiB,EACjB,YAAY,EAKb,MAAM,cAAc,CAAA"}
@@ -0,0 +1,183 @@
1
+ export type NotifyCategory = 'mentions' | 'workflow' | 'sla' | 'watch' | 'alerts' | 'anomaly' | 'reports' | 'integrations' | 'system' | 'other';
2
+ export type NotificationKind = 'record' | 'task' | 'approval' | 'access_request' | 'sla' | 'chat' | 'queue' | 'report' | 'alerts' | 'issue' | 'import' | 'dashboard' | 'my_work' | 'home' | 'external' | 'integration';
3
+ export type NotificationAction = 'open' | 'complete' | 'acknowledge' | 'review' | 'approve' | 'reply';
4
+ /** What a notification is ABOUT, and what clicking it should do. */
5
+ export interface NotificationTargetSpec {
6
+ kind: NotificationKind;
7
+ /** record / sla: the record. approval: the approval's record. */
8
+ collection?: string | null;
9
+ /** record id, task id, approval instance id, queue / report / dashboard id. */
10
+ id?: string | number | null;
11
+ /** chat: room key. */
12
+ room?: string | null;
13
+ /** record: query string appended (addendum=…, layout=…). */
14
+ query?: string | null;
15
+ /** record: field to focus / tab to open on arrival. */
16
+ focus?: string | null;
17
+ tab?: string | null;
18
+ /** external: absolute URL. */
19
+ url?: string | null;
20
+ /** The primary thing a click should offer. Default 'open'. */
21
+ action?: NotificationAction;
22
+ /** Extra ids the action needs (task id for a record-kind row, …). */
23
+ task_id?: string | number | null;
24
+ instance_id?: string | number | null;
25
+ }
26
+ /** `nivaro_notifications.detail` — what the row is about beyond subject +
27
+ * message. Diagnostic and explanatory only; never drives delivery. */
28
+ export interface NotificationDetail {
29
+ changes?: Array<{
30
+ field: string;
31
+ label: string;
32
+ old: string;
33
+ new: string;
34
+ }>;
35
+ via_child?: {
36
+ collection: string;
37
+ item: string;
38
+ event: string;
39
+ label?: string | null;
40
+ } | null;
41
+ bundle?: {
42
+ writes: number;
43
+ children: string[];
44
+ } | null;
45
+ why?: {
46
+ kind: string;
47
+ text: string;
48
+ label?: string | null;
49
+ id?: string | number | null;
50
+ } | null;
51
+ }
52
+ export interface NotifyUserOptions {
53
+ subject: string;
54
+ message: string;
55
+ collection?: string | null;
56
+ item?: string | null;
57
+ sender?: string | null;
58
+ /** Defaults: inapp true, email false, sms false. */
59
+ channels?: {
60
+ inapp?: boolean;
61
+ email?: boolean;
62
+ sms?: boolean;
63
+ };
64
+ /** Explicit notification-rules category; otherwise sniffed from the subject. */
65
+ category?: NotifyCategory;
66
+ /** Skip the two "you already know" suppressions — record mutes and
67
+ * presence-aware suppression — so the inbox row ALWAYS lands. The matrix,
68
+ * quiet hours and suspended/redacted skips still apply. */
69
+ always_inbox?: boolean;
70
+ /** Dedicated Liquid template for the EMAIL channel (default 'notification'). */
71
+ template?: string;
72
+ template_data?: Record<string, unknown>;
73
+ /** Footer "You're getting this because …". */
74
+ why?: string | null;
75
+ /** What the notification is about + what a click should offer. Defaults to
76
+ * the record named by collection + item. */
77
+ target?: NotificationTargetSpec | null;
78
+ /** What produced this row (the bell's "why me?"). */
79
+ source?: {
80
+ kind: string;
81
+ label?: string | null;
82
+ id?: string | number | null;
83
+ } | null;
84
+ /** Structured content stored with the row. */
85
+ detail?: Omit<NotificationDetail, 'why'> | null;
86
+ /** Internal: set on outbox re-deliveries to prevent re-enqueue loops. */
87
+ _retry?: boolean;
88
+ }
89
+ export interface NotificationDeliveryContext {
90
+ recipient: string;
91
+ subject: string;
92
+ message: string;
93
+ collection?: string;
94
+ item?: string | number;
95
+ sender?: string;
96
+ }
97
+ /** A custom delivery channel (SMS, Slack, Teams…). */
98
+ export interface NotificationChannelDef {
99
+ id: string;
100
+ label: string;
101
+ /** Called for each notification that should be delivered via this channel. */
102
+ deliver(ctx: NotificationDeliveryContext): Promise<void>;
103
+ }
104
+ export interface ExternalNotificationSourceItem {
105
+ id: string | number;
106
+ /** What the user is watching, e.g. "Part 26824 · Main warehouse". */
107
+ label: string;
108
+ /** Secondary line, e.g. "alert when on-hand < 50". */
109
+ detail?: string | null;
110
+ is_active?: boolean;
111
+ }
112
+ export interface ExternalNotificationSourceGroup {
113
+ /** Stable key, unique per provider (e.g. 'stock-watches'). */
114
+ key: string;
115
+ /** Card section title, e.g. "Stock Planning watches". */
116
+ title: string;
117
+ description?: string;
118
+ /** Where the user manages these (the card renders a Manage link). */
119
+ manage_url?: string;
120
+ items: ExternalNotificationSourceItem[];
121
+ }
122
+ /** Contributes extension-owned subscriptions to the profile's
123
+ * notification-sources card. */
124
+ export interface NotificationSourceProvider {
125
+ /** Unique provider id — conventionally the extension id. */
126
+ id: string;
127
+ fetch(userId: string): Promise<ExternalNotificationSourceGroup[]>;
128
+ }
129
+ export interface DigestLine {
130
+ text: string;
131
+ sub?: string | null;
132
+ url?: string | null;
133
+ }
134
+ export interface DigestSection {
135
+ title: string;
136
+ lines: DigestLine[];
137
+ }
138
+ /** A per-user section of the daily action digest email; null = nothing today. */
139
+ export type DigestSectionProvider = (userId: string, email: string) => Promise<DigestSection | null>;
140
+ export type MailSampleKind = 'record' | 'history' | 'user' | 'notification' | 'none';
141
+ export interface MailSampleOption {
142
+ id: string;
143
+ label: string;
144
+ hint?: string;
145
+ }
146
+ export interface MailRendered {
147
+ subject: string;
148
+ html: string;
149
+ /** Who production would send this to, with the reason each is on the list. */
150
+ recipients: Array<{
151
+ email: string;
152
+ reason: string;
153
+ }>;
154
+ category?: NotifyCategory;
155
+ }
156
+ /** An email type for the admin mail harness (preview / send with real data). */
157
+ export interface MailTypeDef {
158
+ key: string;
159
+ label: string;
160
+ group: string;
161
+ description: string;
162
+ /** Liquid template name (core or extension root) — informational for
163
+ * types whose builder assembles HTML itself. */
164
+ template: string | null;
165
+ category?: NotifyCategory;
166
+ sample: {
167
+ kind: MailSampleKind;
168
+ /** For 'record': the collection the picker browses. For 'history': the
169
+ * bound collection whose instances are offered (null = any). */
170
+ collection?: string | null;
171
+ /** Extra narrowing for 'history' samples (e.g. only terminal 'canceled'). */
172
+ history_filter?: 'canceled' | 'any';
173
+ /** 'notification': subject prefix / category the sample rows are drawn from. */
174
+ notification_category?: NotifyCategory;
175
+ };
176
+ /** Sample rows the picker offers (most recent first). */
177
+ samples: (q: string) => Promise<MailSampleOption[]>;
178
+ /** Render for a chosen sample id (+ the recipient the harness will use). */
179
+ render: (sampleId: string, opts: {
180
+ recipientUserId?: string;
181
+ }) => Promise<MailRendered>;
182
+ }
183
+ //# sourceMappingURL=notifications.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notifications.d.ts","sourceRoot":"","sources":["../src/notifications.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GACtB,UAAU,GACV,UAAU,GACV,KAAK,GACL,OAAO,GACP,QAA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,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB;qDACiD;IACjD,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,QAAQ,CAAC,EAAE,cAAc,CAAA;IACzB,MAAM,EAAE;QACN,IAAI,EAAE,cAAc,CAAA;QACpB;yEACiE;QACjE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;QAC1B,6EAA6E;QAC7E,cAAc,CAAC,EAAE,UAAU,GAAG,KAAK,CAAA;QACnC,gFAAgF;QAChF,qBAAqB,CAAC,EAAE,cAAc,CAAA;KACvC,CAAA;IACD,yDAAyD;IACzD,OAAO,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAA;IACnD,4EAA4E;IAC5E,MAAM,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE;QAAE,eAAe,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,YAAY,CAAC,CAAA;CACxF"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=notifications.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notifications.js","sourceRoot":"","sources":["../src/notifications.ts"],"names":[],"mappings":""}
@@ -0,0 +1,66 @@
1
+ import type { Knex } from 'knex';
2
+ export type ObligationOutcome = 'sent' | 'skipped' | 'failed' | 'pending' | 'overdue' | 'missing' | 'superseded';
3
+ export type ObligationTrigger = 'transition' | 'hook' | 'flow' | 'cron' | 'reconcile' | 'manual';
4
+ /** The decision point at which a partner starts expecting a message. */
5
+ export interface ObligationTriggerContext {
6
+ collection: string;
7
+ item: string;
8
+ api: string;
9
+ source: 'erp_submit' | 'flow' | 'hook' | 'cron' | 'manual';
10
+ endpoint_path?: string | null;
11
+ transition_label?: string | null;
12
+ to_state_key?: string | null;
13
+ flow_name?: string | null;
14
+ /** The action's own declared shape — its context-query keys and skip
15
+ * gates. Two actions on one endpoint are told apart by this. */
16
+ action_context_keys?: string[];
17
+ action_skip_unless_any?: string[];
18
+ action_skip_when_empty?: string | null;
19
+ }
20
+ export interface ExpectedObligation {
21
+ item: string;
22
+ due_at: Date;
23
+ signature?: string | null;
24
+ detail?: string | null;
25
+ }
26
+ export interface ObligationResolvePatch {
27
+ outcome: ObligationOutcome;
28
+ reason?: string | null;
29
+ submission_id?: number | null;
30
+ signature?: string | null;
31
+ resolved_by?: string | null;
32
+ detail?: unknown;
33
+ }
34
+ /** An outbound obligation kind: what the partner expects, how a decision
35
+ * point is attributed to it, and how to derive from DATA the records the
36
+ * partner is currently behind on. Core owns the ledger and the sweep; the
37
+ * extension owns the sends. */
38
+ export interface ObligationKindDef {
39
+ api: string;
40
+ kind: string;
41
+ collection: string;
42
+ label: string;
43
+ /** Minutes after due_at before the sweep calls an unmet expectation
44
+ * overdue. Falls back to the API's skip_grace_minutes. */
45
+ grace_minutes?: number;
46
+ matches?(ctx: ObligationTriggerContext): boolean;
47
+ /** Records the partner is BEHIND on, derived from data alone. A returned
48
+ * row means "the partner does not have this", never "this happened". A
49
+ * kind's own WHERE must exclude anything whose relevant moment predates
50
+ * `epoch`, or the first sweep floods `missing`. */
51
+ expect(database: Knex, opts: {
52
+ epoch: Date;
53
+ }): Promise<ExpectedObligation[]>;
54
+ /** May the sweep re-fire a `missing` row by itself? Opt-in: only ever
55
+ * correct for a kind whose stored body cannot go stale. */
56
+ safe_to_refire?: boolean;
57
+ /** The send is a person's to make (a button on the record), never the
58
+ * sweep's. */
59
+ human?: boolean;
60
+ /** The kind's "record" is not a business record (an API log bucket). */
61
+ inbound?: boolean;
62
+ /** The endpoint this kind's send goes to, as stored on the submission.
63
+ * Required before the sweep may re-fire anything. */
64
+ endpoint_path?: string | null;
65
+ }
66
+ //# sourceMappingURL=obligations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"obligations.d.ts","sourceRoot":"","sources":["../src/obligations.ts"],"names":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IAAI,CAAA;IACzB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED;;;gCAGgC;AAChC,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb;+DAC2D;IAC3D,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,OAAO,CAAC,CAAC,GAAG,EAAE,wBAAwB,GAAG,OAAO,CAAA;IAChD;;;wDAGoD;IACpD,MAAM,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE;QAAE,KAAK,EAAE,IAAI,CAAA;KAAE,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAA;IAC5E;gEAC4D;IAC5D,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB;mBACe;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,wEAAwE;IACxE,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;0DACsD;IACtD,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC9B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=obligations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"obligations.js","sourceRoot":"","sources":["../src/obligations.ts"],"names":[],"mappings":""}