@antcde/connect-ts 0.4.27 → 0.4.28-rc.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 (86) hide show
  1. package/build/AntConnect.d.ts +4 -0
  2. package/build/AntConnect.d.ts.map +1 -1
  3. package/build/AntConnect.js +4 -0
  4. package/build/comms/signal.d.ts +1 -0
  5. package/build/comms/signal.d.ts.map +1 -1
  6. package/build/comms/signal.js +1 -0
  7. package/build/comms/signalFilePreviewTypes.d.ts +65 -0
  8. package/build/comms/signalFilePreviewTypes.d.ts.map +1 -0
  9. package/build/comms/signalFilePreviewTypes.js +9 -0
  10. package/build/comms/signalRouteTypes.d.ts +38 -0
  11. package/build/comms/signalRouteTypes.d.ts.map +1 -0
  12. package/build/comms/signalRouteTypes.js +8 -0
  13. package/build/comms/signalTypes.d.ts +11 -46
  14. package/build/comms/signalTypes.d.ts.map +1 -1
  15. package/build/index.d.ts +26 -2
  16. package/build/index.d.ts.map +1 -1
  17. package/build/index.js +5 -0
  18. package/build/service-runtime.d.ts +1 -1
  19. package/build/service-runtime.d.ts.map +1 -1
  20. package/build/service-runtime.js +1 -1
  21. package/build/service-types.d.ts +3 -1
  22. package/build/service-types.d.ts.map +1 -1
  23. package/build/services/ProjectService.d.ts +0 -1
  24. package/build/services/ProjectService.d.ts.map +1 -1
  25. package/build/services/TaskService.d.ts +6 -1
  26. package/build/services/TaskService.d.ts.map +1 -1
  27. package/build/services/TaskService.js +1 -1
  28. package/build/services/TaskServiceQueries.d.ts +9 -1
  29. package/build/services/TaskServiceQueries.d.ts.map +1 -1
  30. package/build/services/TaskServiceQueries.js +12 -1
  31. package/build/services/Webhook/ConfigService.d.ts +31 -1
  32. package/build/services/Webhook/ConfigService.d.ts.map +1 -1
  33. package/build/services/Webhook/ConfigService.js +1 -1
  34. package/build/services/Webhook/EventService.d.ts +117 -0
  35. package/build/services/Webhook/EventService.d.ts.map +1 -1
  36. package/build/services/Webhook/TriggerChaining.d.ts +45 -0
  37. package/build/services/Webhook/TriggerChaining.d.ts.map +1 -0
  38. package/build/services/Webhook/TriggerChaining.js +1 -0
  39. package/build/services/Webhook/TriggerDataset.types.d.ts +160 -0
  40. package/build/services/Webhook/TriggerDataset.types.d.ts.map +1 -0
  41. package/build/services/Webhook/TriggerDataset.types.js +74 -0
  42. package/build/services/Webhook/TriggerDatasetColumns.d.ts +72 -0
  43. package/build/services/Webhook/TriggerDatasetColumns.d.ts.map +1 -0
  44. package/build/services/Webhook/TriggerDatasetColumns.js +116 -0
  45. package/build/services/Webhook/TriggerDatasetResponses.types.d.ts +158 -0
  46. package/build/services/Webhook/TriggerDatasetResponses.types.d.ts.map +1 -0
  47. package/build/services/Webhook/TriggerDatasetResponses.types.js +98 -0
  48. package/build/services/Webhook/TriggerDatasetSourceService.d.ts +180 -0
  49. package/build/services/Webhook/TriggerDatasetSourceService.d.ts.map +1 -0
  50. package/build/services/Webhook/TriggerDatasetSourceService.js +23 -0
  51. package/build/services/Webhook/TriggerDispatch.types.d.ts +89 -0
  52. package/build/services/Webhook/TriggerDispatch.types.d.ts.map +1 -0
  53. package/build/services/Webhook/TriggerDispatch.types.js +24 -0
  54. package/build/services/Webhook/TriggerDivergence.d.ts +30 -0
  55. package/build/services/Webhook/TriggerDivergence.d.ts.map +1 -0
  56. package/build/services/Webhook/TriggerDivergence.js +25 -0
  57. package/build/services/Webhook/TriggerFailedRuns.types.d.ts +57 -0
  58. package/build/services/Webhook/TriggerFailedRuns.types.d.ts.map +1 -0
  59. package/build/services/Webhook/TriggerFailedRuns.types.js +1 -0
  60. package/build/services/Webhook/TriggerHistoryService.d.ts +88 -18
  61. package/build/services/Webhook/TriggerHistoryService.d.ts.map +1 -1
  62. package/build/services/Webhook/TriggerLastRun.types.d.ts +80 -0
  63. package/build/services/Webhook/TriggerLastRun.types.d.ts.map +1 -0
  64. package/build/services/Webhook/TriggerLastRun.types.js +1 -0
  65. package/build/services/Webhook/TriggerRefusalDetail.types.d.ts +63 -0
  66. package/build/services/Webhook/TriggerRefusalDetail.types.d.ts.map +1 -0
  67. package/build/services/Webhook/TriggerRefusalDetail.types.js +12 -0
  68. package/build/services/Webhook/TriggerRequest.types.d.ts +77 -0
  69. package/build/services/Webhook/TriggerRequest.types.d.ts.map +1 -0
  70. package/build/services/Webhook/TriggerRequest.types.js +1 -0
  71. package/build/services/Webhook/TriggerSearch.types.d.ts +42 -0
  72. package/build/services/Webhook/TriggerSearch.types.d.ts.map +1 -0
  73. package/build/services/Webhook/TriggerSearch.types.js +1 -0
  74. package/build/services/Webhook/TriggerService.d.ts +158 -150
  75. package/build/services/Webhook/TriggerService.d.ts.map +1 -1
  76. package/build/services/Webhook/TriggerService.js +0 -24
  77. package/build/services/Webhook/TriggerTimeline.types.d.ts +42 -0
  78. package/build/services/Webhook/TriggerTimeline.types.d.ts.map +1 -0
  79. package/build/services/Webhook/TriggerTimeline.types.js +1 -0
  80. package/build/services/Webhook/TriggerVersion.types.d.ts +107 -0
  81. package/build/services/Webhook/TriggerVersion.types.d.ts.map +1 -0
  82. package/build/services/Webhook/TriggerVersion.types.js +1 -0
  83. package/build/services/Webhook/TriggerVersionService.d.ts +64 -0
  84. package/build/services/Webhook/TriggerVersionService.d.ts.map +1 -0
  85. package/build/services/Webhook/TriggerVersionService.js +21 -0
  86. package/package.json +8 -7
@@ -108,9 +108,20 @@ export const defaultGetTasksQuery = {
108
108
  include: ['taskProject', 'labels', 'trigger', 'trigger.event', 'app', 'templateSource'].join(','),
109
109
  per_page: 200,
110
110
  };
111
- export function defaultGetRelatedTasksQuery(taskId) {
111
+ /**
112
+ * Relation partners of one task, for the notepad's previous/upcoming columns.
113
+ *
114
+ * `is_template` is not optional: the license task index default-excludes
115
+ * template rows unless the caller filters on the flag explicitly, so without
116
+ * it a template's own relation partners are filtered out and both columns come
117
+ * back empty.
118
+ */
119
+ export function defaultGetRelatedTasksQuery(taskId, isTemplate = false) {
112
120
  return qs.stringify({
113
121
  filters: {
122
+ is_template: {
123
+ $eq: isTemplate ? 1 : 0,
124
+ },
114
125
  $or: [
115
126
  // Next task
116
127
  {
@@ -1,5 +1,6 @@
1
1
  import type { DataWrapper } from '../../types';
2
2
  import type { Event } from './EventService';
3
+ import type { TriggerableType } from './TriggerService';
3
4
  import type { AntHttpClient } from "../../AntHttpClient";
4
5
  export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
5
6
  export type AuthType = 'none' | 'ant' | 'secret_token';
@@ -13,9 +14,38 @@ export interface ConfigResponse {
13
14
  http_methods: HTTPMethod[];
14
15
  auth_types: AuthType[];
15
16
  events: Event[];
17
+ /**
18
+ * The column types a dataset action may return. Anything else is refused at
19
+ * dispatch.
20
+ *
21
+ * The authoritative list, published so a column mapper can grey an unpublishable
22
+ * column out WITH a reason rather than keeping its own copy and drifting. Grey
23
+ * it out rather than filtering it away — a column that silently vanishes reads
24
+ * as a bug.
25
+ *
26
+ * ⚠️ The four excluded types are `document`, `uuid`, `description` and `table`.
27
+ * **There is no `file` column type** — a control for one never fires; the type
28
+ * usually meant is `document`.
29
+ *
30
+ * A FILE-sourced mapper needs none of this: proposed types are already a subset
31
+ * of this list, so a proposal can never suggest something the action refuses.
32
+ */
33
+ publishable_column_types: string[];
34
+ }
35
+ export interface ConfigParams {
36
+ /**
37
+ * Narrow `events` to those APPLICABLE to this scope, using each event's
38
+ * `project_only` / `license_only`.
39
+ *
40
+ * ⚠️ **Applicability only — it does NOT filter by deployment availability.**
41
+ * An event can be project-applicable and unavailable at the same time, and it is
42
+ * still returned; check {@link Event.available} per row. Omitting the parameter
43
+ * returns everything, which is the pre-existing behaviour.
44
+ */
45
+ triggerable_type?: TriggerableType;
16
46
  }
17
47
  export interface ConfigService {
18
- fetchConfig: () => Promise<DataWrapper<ConfigResponse>>;
48
+ fetchConfig: (params?: ConfigParams) => Promise<DataWrapper<ConfigResponse>>;
19
49
  }
20
50
  export declare function createConfigService(httpClient: AntHttpClient): ConfigService;
21
51
  //# sourceMappingURL=ConfigService.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigService.d.ts","sourceRoot":"","sources":["../../../src/services/Webhook/ConfigService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,4BAAuB;AAEpD,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAA;AAEpE,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,KAAK,GAAG,cAAc,CAAA;AAEtD,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,EAAE,MAAM,EAAE,CAAA;CACvB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,eAAe,EAAE,CAAA;IAC1B,YAAY,EAAE,UAAU,EAAE,CAAA;IAC1B,UAAU,EAAE,QAAQ,EAAE,CAAA;IACtB,MAAM,EAAE,KAAK,EAAE,CAAA;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,OAAO,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAAA;CACxD;AAED,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,aAAa,GAAG,aAAa,CAK5E"}
1
+ {"version":3,"file":"ConfigService.d.ts","sourceRoot":"","sources":["../../../src/services/Webhook/ConfigService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,4BAAuB;AAEpD,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAA;AAEpE,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,KAAK,GAAG,cAAc,CAAA;AAEtD,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,EAAE,MAAM,EAAE,CAAA;CACvB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,eAAe,EAAE,CAAA;IAC1B,YAAY,EAAE,UAAU,EAAE,CAAA;IAC1B,UAAU,EAAE,QAAQ,EAAE,CAAA;IACtB,MAAM,EAAE,KAAK,EAAE,CAAA;IACf;;;;;;;;;;;;;;;OAeG;IACH,wBAAwB,EAAE,MAAM,EAAE,CAAA;CACnC;AAED,MAAM,WAAW,YAAY;IAC3B;;;;;;;;OAQG;IACH,gBAAgB,CAAC,EAAE,eAAe,CAAA;CACnC;AAED,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,CAAC,MAAM,CAAC,EAAE,YAAY,KAAK,OAAO,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CAAA;CAC7E;AAED,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,aAAa,GAAG,aAAa,CAK5E"}
@@ -1,5 +1,5 @@
1
1
  export function createConfigService(httpClient) {
2
2
  return {
3
- fetchConfig: () => httpClient.get('/webhook/config'),
3
+ fetchConfig: (params) => httpClient.get('/webhook/config', { params }),
4
4
  };
5
5
  }
@@ -5,9 +5,44 @@ export interface Event {
5
5
  code: string;
6
6
  name: string;
7
7
  description: string | null;
8
+ /**
9
+ * ⚠️ **DEAD. Never set by the backend and read by nothing.**
10
+ *
11
+ * `webhook:generate-events` does not write it and no code checks it — the only
12
+ * `is_active` checks in the Triggers module are on a Trigger, a different model.
13
+ * It defaults to `true`, so it looks live and invites exactly one confident wrong
14
+ * use: filtering the picker on it. That filter would appear to work and would
15
+ * never exclude anything.
16
+ *
17
+ * For "can this deployment serve the event", use {@link available}.
18
+ */
8
19
  is_active: boolean;
20
+ /**
21
+ * ⚠️ **INVERTED LEGACY. Prefer {@link contexts}.**
22
+ *
23
+ * These state availability by EXCLUSION, and **both false means available in
24
+ * BOTH places** — so `project_only === false` does NOT mean "unavailable in
25
+ * projects", it means "not restricted to projects". Reading either as inclusion
26
+ * inverts the answer, and nothing errors.
27
+ *
28
+ * Kept only because removing them is a separate breaking decision. New code
29
+ * should read `contexts`.
30
+ */
9
31
  project_only: boolean;
10
32
  license_only: boolean;
33
+ /**
34
+ * Where the event can be used, as a POSITIVE list — `['license', 'project']`,
35
+ * `['project']`, or `['license']`.
36
+ *
37
+ * This is the field to read. It exists because {@link project_only} and
38
+ * {@link license_only} say the same thing by exclusion and are read backwards
39
+ * more often than not.
40
+ *
41
+ * Order is fixed (`license` before `project`), so it can be compared or rendered
42
+ * without sorting. An empty array would mean the two legacy flags contradict each
43
+ * other; no event does that today.
44
+ */
45
+ contexts: TriggerContext[];
11
46
  preferred_method: 'GET' | 'POST' | 'PUT' | 'DELETE' | null;
12
47
  /**
13
48
  * Whether this action reads or writes, declared by the event class and appended
@@ -18,7 +53,89 @@ export interface Event {
18
53
  access_mode?: 'read' | 'write';
19
54
  created_at: string;
20
55
  updated_at: string;
56
+ /**
57
+ * A FULL iconify name, collection included — e.g. `mdi:table`.
58
+ *
59
+ * ⚠️ **Do not prepend a collection.** The whole name is here precisely so the
60
+ * client never reconstructs one: an event using a set other than `mdi` could not
61
+ * otherwise express it, and a hardcoded prefix is a derivation that drifts. Pass
62
+ * the value straight to iconify.
63
+ *
64
+ * ⚠️ Nullable because the COLUMN is: it is synced from the event class by
65
+ * `webhook:generate-events`, so a row written before that sync has none. Render a
66
+ * fallback rather than an empty cell.
67
+ */
68
+ icon: string | null;
69
+ /**
70
+ * Which half of the create flow the event belongs to — "answer a caller with
71
+ * data" or "make something happen".
72
+ *
73
+ * ⚠️ **NOT derivable from {@link mutates}, and never infer one from the other.**
74
+ * `TransformWithScriptEvent` is `mutates: true` AND
75
+ * `category: 'returns_data'`: it executes user code under a full-privilege
76
+ * token, so it is a write, while the thing the publisher is building answers a
77
+ * caller. Deriving either axis from the other files it in the wrong column.
78
+ *
79
+ * Nullable for the same reason as `icon`.
80
+ */
81
+ category: 'returns_data' | 'performs_action' | null;
82
+ /**
83
+ * True when choosing this event means the trigger WRITES something, so a
84
+ * `read_only` trigger refuses it.
85
+ *
86
+ * ⚠️ **This is not "does it return data".** Resolved from the event class by the
87
+ * same resolver dispatch enforces with — do not rebuild it from a list of event
88
+ * codes, which is what drifted before: the UI offered `read_only` for an event
89
+ * the dispatcher then refused by name.
90
+ */
91
+ mutates: boolean;
92
+ /**
93
+ * Whether THIS DEPLOYMENT can serve the event.
94
+ *
95
+ * ⚠️ **INSTALLATION, not scope.** No permission, licence or project setting
96
+ * changes it — most often the deployment has no script engine configured, so the
97
+ * script actions cannot run here at all. Do not fold it into the
98
+ * `triggerable_type` filter, which answers the separate question of whether an
99
+ * event APPLIES to a licence or a project.
100
+ *
101
+ * Unavailable events are returned rather than hidden, so grey the option out
102
+ * with {@link unavailable_reason} instead of filtering it away — an option that
103
+ * silently vanishes reads as a bug and explains nothing.
104
+ */
105
+ available: boolean;
106
+ /** The sentence explaining `available: false`; null when it is true. */
107
+ unavailable_reason: string | null;
108
+ /**
109
+ * Which kinds of source this event configures. **Empty means it has none** —
110
+ * show no source step at all.
111
+ *
112
+ * This is the field a create wizard was missing: without it, every event looked
113
+ * like it needed a table, so the flow asked for one whatever action was chosen.
114
+ *
115
+ * ⚠️ **Kinds only. It says nothing about required-vs-optional, nor which of
116
+ * several applies.** `TransformWithScriptEvent` reports
117
+ * `['script', 'table', 'dms_file']` because it MUST have a script and MAY have a
118
+ * table or a file — do not read the list as "all three are needed". Required-ness
119
+ * and every other parameter stay in the per-event configuration UI, deliberately:
120
+ * describing them in data would duplicate what the event's own dispatch enforces
121
+ * and rot the first time an event grew a field.
122
+ *
123
+ * ⚠️ **An empty list is NOT proof the event has no source.** An unknown or
124
+ * uninstalled event code resolves to empty as well — the backend resolver fails
125
+ * closed — so "configures nothing" and "we could not tell" are byte-identical
126
+ * here. Read it with {@link available}: empty AND available means genuinely no
127
+ * source; empty AND unavailable means the answer is unknown, and showing "no
128
+ * configuration needed" would be a guess.
129
+ */
130
+ configures_sources: EventSourceKind[];
21
131
  }
132
+ /**
133
+ * A kind of platform resource an event reads. Resource kinds, not payload keys — a
134
+ * key is one event's implementation detail; the kind is what a wizard asks about.
135
+ */
136
+ export type EventSourceKind = 'table' | 'dms_file' | 'script' | 'stored_query' | 'store_resource';
137
+ /** Where a trigger lives, and therefore where an event can be used. */
138
+ export type TriggerContext = 'license' | 'project';
22
139
  export interface EventService {
23
140
  fetchEvents: () => Promise<DataWrapper<Event[]>>;
24
141
  fetchEvent: (eventId: string) => Promise<DataWrapper<Event>>;
@@ -1 +1 @@
1
- {"version":3,"file":"EventService.d.ts","sourceRoot":"","sources":["../../../src/services/Webhook/EventService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,4BAAuB;AAEpD,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,SAAS,EAAE,OAAO,CAAA;IAClB,YAAY,EAAE,OAAO,CAAA;IACrB,YAAY,EAAE,OAAO,CAAA;IACrB,gBAAgB,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,IAAI,CAAA;IAC1D;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,MAAM,OAAO,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;IAChD,UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAA;CAC7D;AAED,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,aAAa,GAAG,YAAY,CAQ1E"}
1
+ {"version":3,"file":"EventService.d.ts","sourceRoot":"","sources":["../../../src/services/Webhook/EventService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,4BAAuB;AAEpD,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B;;;;;;;;;;OAUG;IACH,SAAS,EAAE,OAAO,CAAA;IAElB;;;;;;;;;;OAUG;IACH,YAAY,EAAE,OAAO,CAAA;IACrB,YAAY,EAAE,OAAO,CAAA;IAErB;;;;;;;;;;;OAWG;IACH,QAAQ,EAAE,cAAc,EAAE,CAAA;IAC1B,gBAAgB,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,IAAI,CAAA;IAC1D;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAElB;;;;;;;;;;;OAWG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IAEnB;;;;;;;;;;;OAWG;IACH,QAAQ,EAAE,cAAc,GAAG,iBAAiB,GAAG,IAAI,CAAA;IAEnD;;;;;;;;OAQG;IACH,OAAO,EAAE,OAAO,CAAA;IAEhB;;;;;;;;;;;;OAYG;IACH,SAAS,EAAE,OAAO,CAAA;IAElB,wEAAwE;IACxE,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAA;IAEjC;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,kBAAkB,EAAE,eAAe,EAAE,CAAA;CACtC;AAED;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,cAAc,GAAG,gBAAgB,CAAA;AAEjG,uEAAuE;AACvE,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,SAAS,CAAA;AAElD,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,MAAM,OAAO,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;IAChD,UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAA;CAC7D;AAED,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,aAAa,GAAG,YAAY,CAQ1E"}
@@ -0,0 +1,45 @@
1
+ import type { PaginatedResponse } from '../../types';
2
+ import type { Trigger } from './TriggerService';
3
+ /**
4
+ * Trigger chaining, and its deprecation (AAD-961).
5
+ *
6
+ * Chaining — running another trigger before or after this one — is being retired
7
+ * in favour of the Workflows app, with a grace period. Split out of
8
+ * `TriggerService.ts` because that file is near its size limit and this is a
9
+ * self-contained, temporary concern; re-exported from the package root, so no
10
+ * consumer import path changes.
11
+ *
12
+ * ⚠️ **The API refuses NEW links with a 422.** See {@link Trigger.runBeforeTriggers}.
13
+ */
14
+ /**
15
+ * The trigger index response.
16
+ *
17
+ * A paginated list plus the licence-wide chaining count the deprecation banner
18
+ * renders from.
19
+ */
20
+ export interface TriggerIndexResponse extends PaginatedResponse<Trigger> {
21
+ chaining: TriggerChainingSummary;
22
+ }
23
+ export interface TriggerChainingSummary {
24
+ /**
25
+ * How many triggers in this licence/project still hold a chain link.
26
+ *
27
+ * ⚠️ **UNFILTERED and UNPAGINATED. Do not recompute it from `data.length`.**
28
+ * It answers "is there migration work left here", so it is deliberately
29
+ * independent of the page you are on and of any filter — including
30
+ * `uses: 'chaining'`, which does NOT change it. A banner that hides on zero
31
+ * will otherwise stay up forever on a number derived from a page.
32
+ *
33
+ * ⚠️ **Counting is OUTGOING-only, and that is not an off-by-one.** A trigger
34
+ * that is merely chained TO is excluded on purpose: the link is a row belonging
35
+ * to the trigger that runs it, so removing it is an edit to that trigger and not
36
+ * to the target. Counting targets would inflate the banner with work nobody has
37
+ * to do.
38
+ *
39
+ * Zero is a real value and retires the banner. Keep "not yet loaded" distinct
40
+ * from zero in your own state — the field itself is always present on a
41
+ * response, but a ref holding it before the first response is not.
42
+ */
43
+ count: number;
44
+ }
45
+ //# sourceMappingURL=TriggerChaining.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TriggerChaining.d.ts","sourceRoot":"","sources":["../../../src/services/Webhook/TriggerChaining.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AACpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAE/C;;;;;;;;;;GAUG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB,CAAC,OAAO,CAAC;IACtE,QAAQ,EAAE,sBAAsB,CAAA;CACjC;AAED,MAAM,WAAW,sBAAsB;IACrC;;;;;;;;;;;;;;;;;;OAkBG;IACH,KAAK,EAAE,MAAM,CAAA;CACd"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,160 @@
1
+ /**
2
+ * The three trigger actions that RETURN data (AAD-967).
3
+ *
4
+ * These are not new endpoints. They are `payload` shapes for an ordinary trigger,
5
+ * dispatched through the ordinary dispatch URL. What is new is the split below.
6
+ *
7
+ * Response and refusal shapes live in `TriggerDatasetResponses.types.ts`.
8
+ *
9
+ * ## Frozen publisher config vs caller parameters — the load-bearing distinction
10
+ *
11
+ * Everything in a `*Payload` type is **frozen publisher configuration**, stored on
12
+ * the trigger and read from there at dispatch. The dispatcher merges a caller's
13
+ * request body ABOVE the stored config, so an action reading its source from the
14
+ * request body would let a caller repoint it — these actions deliberately do not.
15
+ *
16
+ * A caller can therefore change **nothing structural**: not the table, not the
17
+ * file, not the script, not the column selection. The only dataset field a caller
18
+ * controls is `limit`, and only downward — see {@link DatasetCallerParams}.
19
+ *
20
+ * A UI that blurs this will mislead a publisher about what they are selling. Show
21
+ * the payload fields as "fixed for every caller" and `limit` as "the caller may
22
+ * ask for fewer".
23
+ */
24
+ /** `Event.code` values for the three dataset actions. */
25
+ export type DatasetActionCode = 'ReturnTableDataEvent' | 'ReturnFileDataEvent' | 'TransformWithScriptEvent';
26
+ /** Column types a dataset may publish. Anything else is refused at dispatch. */
27
+ export type DatasetColumnType = 'boolean' | 'integer' | 'float' | 'textfield' | 'link' | 'email' | 'text' | 'dropdown' | 'sbscode' | 'date';
28
+ /**
29
+ * One selected column of a linked TABLE.
30
+ *
31
+ * Selected by `column_id` rather than by name, so renaming a column in the table
32
+ * does not silently change what a released version returns.
33
+ */
34
+ export interface DatasetTableColumn {
35
+ column_id: string;
36
+ /** Buyer-facing key. Defaults to the column's own name. */
37
+ key?: string | null;
38
+ }
39
+ /**
40
+ * One declared column of an uploaded FILE.
41
+ *
42
+ * A file declares no types of its own, so the publisher supplies them — which is
43
+ * what keeps the emitted schema declared rather than guessed. `source_key` is the
44
+ * header as it appears in this file; `key` is the buyer's contract. Only one of
45
+ * those is allowed to be a breaking change.
46
+ */
47
+ export interface DatasetFileColumn {
48
+ source_key: string;
49
+ key?: string | null;
50
+ type: DatasetColumnType;
51
+ label?: string | null;
52
+ required?: boolean;
53
+ }
54
+ /** Either kind of declared column, for a source that could be either. */
55
+ export type DatasetColumn = DatasetTableColumn | DatasetFileColumn;
56
+ /** `ReturnTableDataEvent` — rows from a linked dynamic table. */
57
+ export interface ReturnTableDataPayload {
58
+ table_id: string;
59
+ /** Required and non-empty. An empty list is REFUSED, never read as "all". */
60
+ columns: DatasetTableColumn[];
61
+ /** The publisher's row cap for one dispatch. Omit to use the platform default. */
62
+ limit?: number;
63
+ }
64
+ /** How `ReturnFileDataEvent` answers. */
65
+ export type DatasetFileMode = 'records' | 'raw';
66
+ /** Formats a file source can be parsed as. `.jsonl` is read as `ndjson`. */
67
+ export type DatasetFileFormat = 'csv' | 'json' | 'ndjson';
68
+ /**
69
+ * `ReturnFileDataEvent` — an uploaded DMS file, as rows or as a download link.
70
+ *
71
+ * **There is no upload endpoint for this.** The publisher uploads through the
72
+ * existing DMS endpoints and this points at the resulting file, which is also why
73
+ * deleting that file is blocked while a released version reads it.
74
+ */
75
+ export interface ReturnFileDataPayload {
76
+ dms_file_id: string;
77
+ /** Defaults to `records`. An unrecognised value is refused, not defaulted. */
78
+ mode?: DatasetFileMode;
79
+ /** Defaults to the file's own extension. */
80
+ format?: DatasetFileFormat;
81
+ /**
82
+ * Required for `records`. **Ignored entirely by `raw`**, which hands over the
83
+ * whole file — so the column guarantee does not apply in raw mode.
84
+ *
85
+ * Optional here rather than required-under-`records`, because the two modes are
86
+ * not modelled as a discriminated union — so the compiler will NOT stop you
87
+ * submitting a `records` payload with no columns. Validate it in the form; the
88
+ * backend answers `invalid_payload_config`.
89
+ */
90
+ columns?: DatasetFileColumn[];
91
+ limit?: number;
92
+ }
93
+ /** Whether the script's own value is returned, or the full run envelope. */
94
+ export type TransformResponseMode = 'result' | 'envelope';
95
+ /**
96
+ * `TransformWithScriptEvent` — a script shapes the response.
97
+ *
98
+ * ⚠️ **This action is a WRITE**, despite reading data and returning it, because it
99
+ * runs user-authored code under a freshly minted OAuth token. It therefore cannot
100
+ * be used on a `read_only` trigger. Check `Trigger.access_mode` and say so up
101
+ * front rather than letting the dispatch fail.
102
+ *
103
+ * Always synchronous — there is no async option, because an async run returns a
104
+ * task id and a permanently null result.
105
+ */
106
+ export interface TransformWithScriptPayload {
107
+ script_id: string;
108
+ /** Defaults to `result`. Frozen here rather than derived from `debug_mode`. */
109
+ response_mode?: TransformResponseMode;
110
+ /**
111
+ * An optional declared source, using the same shape as the actions above. Omit
112
+ * both to hand the script only the caller's parameters.
113
+ *
114
+ * Nothing here expresses that `table_id` and `dms_file_id` are mutually
115
+ * exclusive — setting both is invalid and the backend refuses it. Enforce it in
116
+ * the form.
117
+ */
118
+ table_id?: string;
119
+ dms_file_id?: string;
120
+ /**
121
+ * An ARRAY OF EITHER column kind, matching whichever source is set — not a
122
+ * union of two arrays, so it can be pushed into and bound to a row editor.
123
+ */
124
+ columns?: DatasetColumn[];
125
+ limit?: number;
126
+ /** Clamped by the engine to its configured maximum. */
127
+ timeout_s?: number;
128
+ python_version?: string;
129
+ }
130
+ export type DatasetActionPayload = ReturnTableDataPayload | ReturnFileDataPayload | TransformWithScriptPayload;
131
+ /** The payload type belonging to a given dataset action code. */
132
+ export type DatasetPayloadFor<C extends DatasetActionCode> = C extends 'ReturnTableDataEvent' ? ReturnTableDataPayload : C extends 'ReturnFileDataEvent' ? ReturnFileDataPayload : C extends 'TransformWithScriptEvent' ? TransformWithScriptPayload : never;
133
+ /**
134
+ * What a CALLER may send. Nothing here can widen what the publisher declared.
135
+ *
136
+ * `limit` is clamped to the publisher's declared limit and then to the platform
137
+ * ceiling, so asking for more returns the publisher's number rather than an error.
138
+ * A `TransformWithScriptEvent` additionally forwards the whole request body to the
139
+ * script as `INPUT.params`, minus `limit`.
140
+ */
141
+ export interface DatasetCallerParams {
142
+ limit?: number;
143
+ [param: string]: unknown;
144
+ }
145
+ /** Narrow an event code to one of the three dataset actions. */
146
+ export declare function isDatasetAction(code: string | null | undefined): code is DatasetActionCode;
147
+ /**
148
+ * Whether a dataset action can run on a trigger with `read_only` set.
149
+ *
150
+ * Only the script transform cannot: it executes user code with real credentials,
151
+ * so it is classified as a write however read-shaped it looks.
152
+ */
153
+ export declare function isReadOnlyCompatible(code: DatasetActionCode): boolean;
154
+ /** Narrow an unknown payload to `TransformWithScriptEvent`'s config. */
155
+ export declare function isTransformWithScriptPayload(payload: unknown): payload is TransformWithScriptPayload;
156
+ /** Narrow an unknown payload to `ReturnTableDataEvent`'s config. */
157
+ export declare function isReturnTableDataPayload(payload: unknown): payload is ReturnTableDataPayload;
158
+ /** Narrow an unknown payload to `ReturnFileDataEvent`'s config. */
159
+ export declare function isReturnFileDataPayload(payload: unknown): payload is ReturnFileDataPayload;
160
+ //# sourceMappingURL=TriggerDataset.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TriggerDataset.types.d.ts","sourceRoot":"","sources":["../../../src/services/Webhook/TriggerDataset.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,yDAAyD;AACzD,MAAM,MAAM,iBAAiB,GACvB,sBAAsB,GACtB,qBAAqB,GACrB,0BAA0B,CAAA;AAEhC,gFAAgF;AAChF,MAAM,MAAM,iBAAiB,GACvB,SAAS,GACT,SAAS,GACT,OAAO,GACP,WAAW,GACX,MAAM,GACN,OAAO,GACP,MAAM,GACN,UAAU,GACV,SAAS,GACT,MAAM,CAAA;AAEZ;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAA;IACjB,2DAA2D;IAC3D,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACpB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAA;IAClB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,IAAI,EAAE,iBAAiB,CAAA;IACvB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,yEAAyE;AACzE,MAAM,MAAM,aAAa,GAAG,kBAAkB,GAAG,iBAAiB,CAAA;AAElE,iEAAiE;AACjE,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAA;IAChB,6EAA6E;IAC7E,OAAO,EAAE,kBAAkB,EAAE,CAAA;IAC7B,kFAAkF;IAClF,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,yCAAyC;AACzC,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,KAAK,CAAA;AAE/C,4EAA4E;AAC5E,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAA;AAEzD;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,MAAM,CAAA;IACnB,8EAA8E;IAC9E,IAAI,CAAC,EAAE,eAAe,CAAA;IACtB,4CAA4C;IAC5C,MAAM,CAAC,EAAE,iBAAiB,CAAA;IAC1B;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAA;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,4EAA4E;AAC5E,MAAM,MAAM,qBAAqB,GAAG,QAAQ,GAAG,UAAU,CAAA;AAEzD;;;;;;;;;;GAUG;AACH,MAAM,WAAW,0BAA0B;IACzC,SAAS,EAAE,MAAM,CAAA;IACjB,+EAA+E;IAC/E,aAAa,CAAC,EAAE,qBAAqB,CAAA;IACrC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;OAGG;IACH,OAAO,CAAC,EAAE,aAAa,EAAE,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,MAAM,oBAAoB,GAC1B,sBAAsB,GACtB,qBAAqB,GACrB,0BAA0B,CAAA;AAEhC,iEAAiE;AACjE,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,iBAAiB,IACrD,CAAC,SAAS,sBAAsB,GAAG,sBAAsB,GACvD,CAAC,SAAS,qBAAqB,GAAG,qBAAqB,GACrD,CAAC,SAAS,0BAA0B,GAAG,0BAA0B,GAC/D,KAAK,CAAA;AAEf;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAA;CACzB;AAED,gEAAgE;AAChE,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,IAAI,iBAAiB,CAI1F;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAErE;AAmBD,wEAAwE;AACxE,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,0BAA0B,CAGpG;AAED,oEAAoE;AACpE,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,sBAAsB,CAM5F;AAED,mEAAmE;AACnE,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,qBAAqB,CAK1F"}
@@ -0,0 +1,74 @@
1
+ /**
2
+ * The three trigger actions that RETURN data (AAD-967).
3
+ *
4
+ * These are not new endpoints. They are `payload` shapes for an ordinary trigger,
5
+ * dispatched through the ordinary dispatch URL. What is new is the split below.
6
+ *
7
+ * Response and refusal shapes live in `TriggerDatasetResponses.types.ts`.
8
+ *
9
+ * ## Frozen publisher config vs caller parameters — the load-bearing distinction
10
+ *
11
+ * Everything in a `*Payload` type is **frozen publisher configuration**, stored on
12
+ * the trigger and read from there at dispatch. The dispatcher merges a caller's
13
+ * request body ABOVE the stored config, so an action reading its source from the
14
+ * request body would let a caller repoint it — these actions deliberately do not.
15
+ *
16
+ * A caller can therefore change **nothing structural**: not the table, not the
17
+ * file, not the script, not the column selection. The only dataset field a caller
18
+ * controls is `limit`, and only downward — see {@link DatasetCallerParams}.
19
+ *
20
+ * A UI that blurs this will mislead a publisher about what they are selling. Show
21
+ * the payload fields as "fixed for every caller" and `limit` as "the caller may
22
+ * ask for fewer".
23
+ */
24
+ /** Narrow an event code to one of the three dataset actions. */
25
+ export function isDatasetAction(code) {
26
+ return code === 'ReturnTableDataEvent'
27
+ || code === 'ReturnFileDataEvent'
28
+ || code === 'TransformWithScriptEvent';
29
+ }
30
+ /**
31
+ * Whether a dataset action can run on a trigger with `read_only` set.
32
+ *
33
+ * Only the script transform cannot: it executes user code with real credentials,
34
+ * so it is classified as a write however read-shaped it looks.
35
+ */
36
+ export function isReadOnlyCompatible(code) {
37
+ return code !== 'TransformWithScriptEvent';
38
+ }
39
+ /**
40
+ * The payload guards below exist because `TriggerVersion.payload` is `unknown` and
41
+ * {@link DatasetActionPayload} carries no discriminant — so reading a released
42
+ * version's frozen config would otherwise need an `as` cast, which this repo
43
+ * forbids.
44
+ *
45
+ * `Event.code` remains the authority on which action a trigger is; these narrow
46
+ * the payload once you know that. Order matters: `script_id` is the only key
47
+ * unique to one shape, because `TransformWithScriptPayload` may also carry
48
+ * `table_id` or `dms_file_id`.
49
+ */
50
+ function asRecord(payload) {
51
+ return (typeof payload === 'object' && payload !== null)
52
+ ? payload
53
+ : null;
54
+ }
55
+ /** Narrow an unknown payload to `TransformWithScriptEvent`'s config. */
56
+ export function isTransformWithScriptPayload(payload) {
57
+ const body = asRecord(payload);
58
+ return body !== null && typeof body.script_id === 'string';
59
+ }
60
+ /** Narrow an unknown payload to `ReturnTableDataEvent`'s config. */
61
+ export function isReturnTableDataPayload(payload) {
62
+ const body = asRecord(payload);
63
+ return body !== null
64
+ && typeof body.script_id !== 'string'
65
+ && typeof body.table_id === 'string'
66
+ && Array.isArray(body.columns);
67
+ }
68
+ /** Narrow an unknown payload to `ReturnFileDataEvent`'s config. */
69
+ export function isReturnFileDataPayload(payload) {
70
+ const body = asRecord(payload);
71
+ return body !== null
72
+ && typeof body.script_id !== 'string'
73
+ && typeof body.dms_file_id === 'string';
74
+ }
@@ -0,0 +1,72 @@
1
+ import type { DatasetColumnType } from './TriggerDataset.types';
2
+ /**
3
+ * The rules for declaring a dataset column's published key and type.
4
+ *
5
+ * These live next to the types they narrow rather than in a UI package on
6
+ * purpose: they are interpretations of the AAD-967 contract, and the exhaustive
7
+ * records below are what make a new backend column type or refusal reason fail
8
+ * the BUILD instead of falling silently through a default. A UI library would
9
+ * put that guarantee in the wrong place, and every consumer would need its own
10
+ * copy of the same eleven strings.
11
+ */
12
+ /**
13
+ * Every publishable column type, as a runtime lookup.
14
+ *
15
+ * Annotated rather than inferred so the compiler rejects a missing key and a
16
+ * stray one alike — adding a member to {@link DatasetColumnType} without adding
17
+ * it here fails to build.
18
+ */
19
+ export declare const DATASET_COLUMN_TYPES: Record<DatasetColumnType, true>;
20
+ /**
21
+ * Is this a column type a dataset may publish?
22
+ *
23
+ * ⚠️ `hasOwnProperty.call`, AND NEITHER OF THE TWO OBVIOUS ALTERNATIVES. `in`
24
+ * answers true for every inherited key, so `isDatasetColumnType('toString')` used
25
+ * to report a publishable column type. `Object.hasOwn` is the rule's preferred
26
+ * form and this package's TS lib predates it — swapping it in compiles under
27
+ * `tsc -p` and then fails the Python schema generator, which builds its own
28
+ * program from these files. Hence the disable rather than the autofix.
29
+ */
30
+ export declare function isDatasetColumnType(type: string): type is DatasetColumnType;
31
+ /**
32
+ * Keys a publisher may not claim.
33
+ *
34
+ * `id` is reserved because every dataset row leads with it — the record id for a
35
+ * table, the 1-based line number for a file. A publisher who maps their own
36
+ * column to `id` would silently shadow it.
37
+ */
38
+ export declare const RESERVED_DATASET_KEYS: readonly string[];
39
+ /** Case-insensitive: `ID` collides with the reserved `id` just as surely. */
40
+ export declare function isReservedDatasetKey(key: string): boolean;
41
+ /** Letters, digits, underscore and hyphen. Anything else is not a usable key. */
42
+ export declare function isValidDatasetKey(key: string): boolean;
43
+ /**
44
+ * A reasonable published key for a source column or file header.
45
+ *
46
+ * Only a starting point — the publisher owns the final name, because it is the
47
+ * buyer's contract.
48
+ */
49
+ export declare function defaultDatasetKeyFor(name: string): string;
50
+ /** Why a published key is unusable. `null` means it is fine. */
51
+ export type DatasetKeyError = 'required' | 'reserved' | 'invalid' | 'duplicate';
52
+ /**
53
+ * Validate one published key.
54
+ *
55
+ * ⚠️ **The order of these checks is the message a user sees**, and it is not
56
+ * arbitrary. A blank key is `required`, never `invalid` — telling someone their
57
+ * empty field contains illegal characters sends them looking for a character
58
+ * that is not there. Reserved beats invalid for the same reason: `id` is a
59
+ * perfectly well-formed key, so "invalid" would be a lie about why it was
60
+ * refused. Duplicate is last because it is the only one that depends on the
61
+ * other rows rather than on this key alone.
62
+ */
63
+ export declare function datasetKeyError(key: string, duplicates: ReadonlySet<string>): DatasetKeyError | null;
64
+ /**
65
+ * Which of these keys appear more than once.
66
+ *
67
+ * Blank keys are excluded: several unfilled rows are not a name collision, and
68
+ * flagging them as duplicates would report the same problem twice under the
69
+ * wrong name.
70
+ */
71
+ export declare function duplicateDatasetKeys(keys: readonly string[]): Set<string>;
72
+ //# sourceMappingURL=TriggerDatasetColumns.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TriggerDatasetColumns.d.ts","sourceRoot":"","sources":["../../../src/services/Webhook/TriggerDatasetColumns.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE/D;;;;;;;;;GASG;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,iBAAiB,EAAE,IAAI,CAWhE,CAAA;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,IAAI,iBAAiB,CAG3E;AAED;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,EAAE,SAAS,MAAM,EAAW,CAAA;AAE9D,6EAA6E;AAC7E,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEzD;AAED,iFAAiF;AACjF,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMzD;AAED,gEAAgE;AAChE,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,WAAW,CAAA;AAE/E;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,eAAe,GAAG,IAAI,CAWpG;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAazE"}