@particle-academy/monday-js 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,77 @@
1
+ # Changelog
2
+
3
+ All notable changes to `@particle-academy/monday-ui`, `@particle-academy/monday-js`,
4
+ `particle-academy/monday-php` and `fancy-monday`.
5
+
6
+ The four packages share one version, because they are generated from one
7
+ `provider/` definition and a version that meant something different in each
8
+ would be a version nobody could reason about.
9
+
10
+ ## [0.1.0] — 2026-08-22
11
+
12
+ First release. Provider seven, and the first that is not REST.
13
+
14
+ ### Added
15
+
16
+ - `item_create` — create an item on a board. `POST /v2`, `mutation CreateItem`.
17
+ - A faker for it, so the node runs on a canvas with no monday.com account.
18
+
19
+ ### GraphQL is a request encoding, not a spelling of JSON
20
+
21
+ Every provider before this one puts the operation in the URL. monday.com has
22
+ **one endpoint and one method** — `POST /v2` — and the operation lives in a
23
+ *document* carried in the body, with config mapping onto that document's
24
+ **variables** rather than onto body keys.
25
+
26
+ The wire format is still JSON. What changes is that the request names its own
27
+ operation, and the response comes back wrapped: `{"data": {"create_item": …}}`.
28
+ The output paths say so rather than flattening it, because an author who wires
29
+ `{{ $json.data.create_item.id }}` against the faker must find the same path when
30
+ a real item arrives.
31
+
32
+ ### The document and the config are two halves of one contract
33
+
34
+ The document is hand-written text. Nothing else in the vocabulary reads it, so
35
+ nothing would notice when the two stop agreeing — and every way they can
36
+ disagree is invisible until a real call:
37
+
38
+ | | What happens without the check |
39
+ |---|---|
40
+ | A declared variable nothing sends | Non-null, so **every** call fails, in the provider's words |
41
+ | A config field naming no variable | Built, sent, ignored — the field silently does nothing |
42
+ | A non-null variable, optional field | An empty config sends a null the provider refuses |
43
+
44
+ All three are decidable at definition time, and now are. The reader is a small
45
+ scan of the operation's variable block rather than a GraphQL parser, and a
46
+ document it cannot read is an **error** — "I could not read it" and "it declares
47
+ nothing" must not reach the same answer.
48
+
49
+ ### `column_values` is a JSON STRING, not a map
50
+
51
+ monday's own schema documents its `JSON` scalar as *"A JSON formatted string"*.
52
+ So the variable carries text containing JSON, and sending the map itself puts an
53
+ object where monday expects a string. This is the mirror of the trap that forced
54
+ `keyvalue` `encoding: "object"` in for Telegram, and the two are one keyword
55
+ apart.
56
+
57
+ ### Two facts the wire could not settle
58
+
59
+ - **`Authorization` takes the token BARE**, with no `Bearer ` prefix. Both
60
+ spellings answer 401 to an invalid token, so a probe cannot tell them apart;
61
+ this came from monday's authentication documentation.
62
+ - **`API-Version: 2026-07` is pinned** even though it is optional. Omitting it
63
+ means "whatever is current", which is *undefined* rather than latest — monday
64
+ runs three versions in parallel and the default moves.
65
+
66
+ ### No test estate, and no idempotency
67
+
68
+ `sandbox` is `none` — **checked**, not assumed. There is one host, one kind of
69
+ token, and a developer account is a real account, so anything an action creates
70
+ is created for real. The faker is the only safe way to develop against this.
71
+
72
+ `create_item` takes no idempotency key: monday's schema offers neither a header
73
+ nor an argument for one. So it is `unsafe-to-replay` with no way to make it
74
+ safe, and a retried durable run creates a **second item**. Saying that plainly
75
+ is better than implying a guarantee the API cannot give.
76
+
77
+ [0.1.0]: https://github.com/Fancy-Friends/monday/releases/tag/v0.1.0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Particle Academy
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,51 @@
1
+ # monday.com
2
+
3
+ monday.com for [fancy-flow][flow] — as **four imported, versioned packages**, one
4
+ per runtime. Not vendored source: a copy cannot be upgraded, and third-party APIs
5
+ change.
6
+
7
+ [flow]: https://github.com/Particle-Academy/fancy-flow
8
+
9
+ | Runtime | Package | Install |
10
+ |---|---|---|
11
+ | Authoring surface (every host) | `@particle-academy/monday-ui` | `npm install @particle-academy/monday-ui` |
12
+ | Node | `@particle-academy/monday-js` | `npm install @particle-academy/monday-js` |
13
+ | PHP 8.4+ | `particle-academy/monday-php` | `composer require particle-academy/monday-php` |
14
+ | Python 3.11+ | `fancy-monday` | `pip install fancy-monday` |
15
+
16
+ The `ui` package is the editor surface and is React on every host — a PHP or
17
+ Python project installs it *and* its own runtime package, and never the `js` one.
18
+
19
+ ## What it costs you
20
+
21
+ One dependency: `@particle-academy/fancy-connector-core` (or
22
+ `particle-academy/fancy-connector-core` on Composer), which the `js` and `php`
23
+ packages pull in themselves. The Python package has **zero** runtime
24
+ dependencies.
25
+
26
+ **No monday.com SDK.** Plain HTTP, deliberately: a vendor SDK is third-party code
27
+ subject to the kit's full approval bar, and one per provider is hundreds of
28
+ dependencies nobody is tracking.
29
+
30
+ ## Run it before you have credentials
31
+
32
+ Every operation ships a **faker**, whether or not monday.com has a sandbox. Set a
33
+ node's mode to `fake` and it returns the shape monday.com actually publishes — the
34
+ same field names, deterministically — so you can wire the downstream nodes before
35
+ touching an account, a key, or a network.
36
+
37
+ ## This repository is generated
38
+
39
+ `provider/` is the source. Everything under `packages/` is emitted from it and
40
+ **must not be hand-edited** — CI regenerates and diffs on every push, and the
41
+ next protocol sync destroys anything it finds. See [`AGENTS.md`](AGENTS.md).
42
+
43
+ ## Two namespaces, which do not match on purpose
44
+
45
+ The repo is `github.com/Fancy-Friends/monday`; the packages publish under
46
+ `particle-academy`. Nothing derives one from the other — the names come from
47
+ weaver's `friends.json` and nowhere else.
48
+
49
+ ## Licence
50
+
51
+ MIT.
@@ -0,0 +1,101 @@
1
+ import { callConnector } from '@particle-academy/fancy-connector-core';
2
+
3
+ // src/faker.ts
4
+ function fakeItemCreate({ config, fake }) {
5
+ return {
6
+ "data": {
7
+ "create_item": {
8
+ "id": Array.from({ length: 10 }, () => fake.int(0, 9)).join(""),
9
+ "name": config.itemName !== void 0 && config.itemName !== null && config.itemName !== "" ? String(config.itemName) : "New item",
10
+ "url": "https://example.monday.com/boards/1234567890/pulses/1234567890",
11
+ "created_at": "2026-01-01T00:00:00Z"
12
+ }
13
+ }
14
+ };
15
+ }
16
+ var mondayFaker = (operation, request) => {
17
+ switch (operation) {
18
+ case "item_create":
19
+ return fakeItemCreate(request);
20
+ default:
21
+ throw new Error(
22
+ `monday: no fake response is defined for "${operation}". Add a fixture under provider/fixtures/ and regenerate \u2014 a connector without a faker cannot be developed against, tested, or demonstrated.`
23
+ );
24
+ }
25
+ };
26
+
27
+ // src/service.ts
28
+ var CONNECTOR_API_VERSION = 1;
29
+ var MONDAY_BASE_URLS = {
30
+ "live": "https://api.monday.com"
31
+ };
32
+ var MONDAY_REQUIRES = [
33
+ "apiToken"
34
+ ];
35
+ function mondayAuthorize(credentials, request, _mode) {
36
+ request.headers["API-Version"] = "2026-07";
37
+ request.headers["Authorization"] = `${credentials.apiToken ?? ""}`;
38
+ }
39
+ var MONDAY = {
40
+ service: "monday",
41
+ title: "monday.com",
42
+ sandbox: "none",
43
+ baseUrls: { ...MONDAY_BASE_URLS },
44
+ requires: [...MONDAY_REQUIRES],
45
+ authorize: mondayAuthorize,
46
+ faker: mondayFaker
47
+ };
48
+ var ITEM_CREATE_OPERATION = "item_create";
49
+ var DOCUMENT = `mutation CreateItem($boardId: ID!, $itemName: String!, $groupId: String, $columnValues: JSON) {
50
+ create_item(
51
+ board_id: $boardId
52
+ item_name: $itemName
53
+ group_id: $groupId
54
+ column_values: $columnValues
55
+ ) {
56
+ id
57
+ name
58
+ url
59
+ created_at
60
+ }
61
+ }`;
62
+ async function mondayItemCreate(options) {
63
+ const config = options.config ?? {};
64
+ if (config.boardId === void 0 || config.boardId === null || config.boardId === "") {
65
+ throw new Error(`item_create: "boardId" is required (Board ID).`);
66
+ }
67
+ if (config.itemName === void 0 || config.itemName === null || config.itemName === "") {
68
+ throw new Error(`item_create: "itemName" is required (Item name).`);
69
+ }
70
+ return callConnector(MONDAY, {
71
+ operation: ITEM_CREATE_OPERATION,
72
+ config,
73
+ input: options.input,
74
+ ...options.credentials === void 0 ? {} : { credentials: options.credentials },
75
+ ...options.mode === void 0 ? {} : { mode: options.mode },
76
+ ...options.connectionId === void 0 ? {} : { connectionId: options.connectionId },
77
+ ...options.attempts === void 0 ? {} : { attempts: options.attempts },
78
+ ...options.transport === void 0 ? {} : { transport: options.transport },
79
+ request: {
80
+ method: "POST",
81
+ path: "/v2",
82
+ json: {
83
+ query: DOCUMENT,
84
+ variables: {
85
+ "boardId": String(config.boardId),
86
+ "itemName": String(config.itemName),
87
+ ...config.groupId !== void 0 && config.groupId !== null && config.groupId !== "" ? { "groupId": String(config.groupId) } : {},
88
+ ...columnvaluesForm(config.columnValues)
89
+ }
90
+ }
91
+ }
92
+ });
93
+ }
94
+ function columnvaluesForm(value) {
95
+ if (!value || typeof value !== "object") return {};
96
+ return { "columnValues": JSON.stringify(value) };
97
+ }
98
+
99
+ export { CONNECTOR_API_VERSION, ITEM_CREATE_OPERATION, MONDAY, MONDAY_BASE_URLS, MONDAY_REQUIRES, mondayAuthorize, mondayFaker, mondayItemCreate };
100
+ //# sourceMappingURL=chunk-QEOX372D.js.map
101
+ //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AAK;AAAA,IAC3D,GAAI,QAAQ,YAAA,KAAiB,MAAA,GAAY,EAAC,GAAI,EAAE,YAAA,EAAc,OAAA,CAAQ,YAAA,EAAa;AAAA,IACnF,GAAI,QAAQ,QAAA,KAAa,MAAA,GAAY,EAAC,GAAI,EAAE,QAAA,EAAU,OAAA,CAAQ,QAAA,EAAS;AAAA,IACvE,GAAI,QAAQ,SAAA,KAAc,MAAA,GAAY,EAAC,GAAI,EAAE,SAAA,EAAW,OAAA,CAAQ,SAAA,EAAU;AAAA,IAC1E,OAAA,EAAS;AAAA,MACP,MAAA,EAAQ,MAAA;AAAA,MACR,IAAA,EAAM,KAAA;AAAA,MACN,IAAA,EAAM;AAAA,QACJ,KAAA,EAAO,QAAA;AAAA,QACP,SAAA,EAAW;AAAA,UACT,SAAA,EAAW,MAAA,CAAO,MAAA,CAAO,OAAO,CAAA;AAAA,UAChC,UAAA,EAAY,MAAA,CAAO,MAAA,CAAO,QAAQ,CAAA;AAAA,UAClC,GAAI,MAAA,CAAO,OAAA,KAAY,MAAA,IAAa,MAAA,CAAO,YAAY,IAAA,IAAQ,MAAA,CAAO,OAAA,KAAY,EAAA,GAAK,EAAE,SAAA,EAAW,MAAA,CAAO,OAAO,OAAO,CAAA,KAAM,EAAC;AAAA,UAChI,GAAG,gBAAA,CAAiB,MAAA,CAAO,YAAY;AAAA;AACzC;AACF;AACF,GACD,CAAA;AACH;AAGA,SAAS,iBAAiB,KAAA,EAAwC;AAChE,EAAA,IAAI,CAAC,KAAA,IAAS,OAAO,KAAA,KAAU,QAAA,SAAiB,EAAC;AAEjD,EAAA,OAAO,EAAE,cAAA,EAAgB,IAAA,CAAK,SAAA,CAAU,KAAK,CAAA,EAAE;AACjD","file":"chunk-QEOX372D.js","sourcesContent":["/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/fixtures/ by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/fixtures/ (or weaver's template/) and regenerate:\n *\n * npm run provider -- monday\n */\n\n/**\n * The monday.com faker.\n *\n * Shapes, not behaviour: the goal is that a downstream node sees the field\n * NAMES monday.com actually publishes, so an author can wire {{ $json.data.id\n * }} against a fake and have it keep working against the real thing.\n *\n * Deterministic — same inputs, same output. A faker returning a fresh uuid\n * every call cannot be asserted on, so its fixtures degrade to \"it did not\n * throw\", which is the assertion that catches nothing.\n */\n\nimport type { ConnectorFaker, FakeRequest } from \"@particle-academy/fancy-connector-core\";\n\nfunction fakeItemCreate({ config, fake }: FakeRequest): unknown {\n return {\n \"data\": {\n \"create_item\": {\n \"id\": Array.from({ length: 10 }, () => fake.int(0, 9)).join(\"\"),\n \"name\": (config.itemName !== undefined && config.itemName !== null && config.itemName !== \"\" ? String(config.itemName) : \"New item\"),\n \"url\": \"https://example.monday.com/boards/1234567890/pulses/1234567890\",\n \"created_at\": \"2026-01-01T00:00:00Z\",\n },\n },\n };\n}\n\nexport const mondayFaker: ConnectorFaker = (operation, request) => {\n switch (operation) {\n case \"item_create\":\n return fakeItemCreate(request);\n\n default:\n // A faker asked for an operation it has no shape for must SAY so. Making\n // something up would produce a green run whose output silently has none\n // of the fields the author is about to reference.\n throw new Error(\n `monday: no fake response is defined for \"${operation}\". ` +\n \"Add a fixture under provider/fixtures/ and regenerate — a connector without a faker \" +\n \"cannot be developed against, tested, or demonstrated.\",\n );\n }\n};\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/manifest.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/manifest.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- monday\n */\n\n/**\n * monday.com, as one service descriptor shared by every monday.com operation.\n *\n * @particle-academy/fancy-connector-core carries what is true of ALL\n * connectors. This carries what is true of monday.com: its base URL, its auth\n * scheme, its idempotency header, and its faker.\n *\n * ## The sandbox trap, written down where it is used\n *\n * monday has no test estate. A developer plan is a real account with real\n * boards, so anything an action creates is created for real. The faker is the\n * only safe way to develop against this connector, which is why every action\n * ships with one.\n */\n\nimport type { ConnectorMode, PreparedRequest, ServiceDescriptor } from \"@particle-academy/fancy-connector-core\";\n\nimport { mondayFaker } from \"./faker.js\";\n\n/**\n * The connector API version this package was GENERATED against.\n *\n * A literal, never imported. An imported constant lets an upgrade rewrite the\n * very claim it exists to detect, after which the copy agrees with itself\n * forever.\n */\nexport const CONNECTOR_API_VERSION = 1;\n\nexport const MONDAY_BASE_URLS = {\n \"live\": \"https://api.monday.com\"\n} as const;\n\n/** Credential keys a remote call cannot proceed without. */\nexport const MONDAY_REQUIRES = [\n \"apiToken\"\n] as const;\n\n/**\n * Apply monday.com's auth scheme to an outgoing request.\n *\n * BARE, with no `Bearer ` prefix. Both spellings answer 401 to an invalid\n * token, so the wire cannot tell them apart and this had to come from monday's\n * own authentication doc rather than from a probe. A `Bearer ` prefix here\n * would fail every real call with an authentication error that says nothing\n * about the prefix.\n *\n * The mode is passed in because for some providers auth and estate are the\n * same decision expressed in the URL; here it is unused, and saying so is\n * cheaper than wondering later whether it was forgotten.\n */\nexport function mondayAuthorize(\n credentials: Record<string, string | undefined>,\n request: PreparedRequest,\n _mode: ConnectorMode,\n): void {\n request.headers[\"API-Version\"] = \"2026-07\";\n\n request.headers[\"Authorization\"] = `${credentials.apiToken ?? \"\"}`;\n}\n\n/** The monday.com service, for the TypeScript runtime. */\nexport const MONDAY: ServiceDescriptor = {\n service: \"monday\",\n title: \"monday.com\",\n sandbox: \"none\",\n baseUrls: { ...MONDAY_BASE_URLS },\n requires: [...MONDAY_REQUIRES],\n authorize: mondayAuthorize,\n faker: mondayFaker,\n};\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/item-create.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/item-create.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- monday\n */\n\n/**\n * Create an item on a monday.com board.\n *\n * POST /v2 —\n * https://developer.monday.com/api-reference/reference/items#create-an-item\n *\n * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,\n * no fake/real branch. This describes the request; callConnector resolves the\n * connection, picks the estate, and either calls monday.com or calls the\n * faker.\n *\n * sideEffects: unsafe-to-replay.\n */\n\nimport {\n callConnector,\n type ConnectorResult,\n type RequestedMode,\n type Transport,\n} from \"@particle-academy/fancy-connector-core\";\nimport { MONDAY } from \"../service.js\";\n\nexport const ITEM_CREATE_OPERATION = \"item_create\";\n\nconst DOCUMENT = `mutation CreateItem($boardId: ID!, $itemName: String!, $groupId: String, $columnValues: JSON) {\n create_item(\n board_id: $boardId\n item_name: $itemName\n group_id: $groupId\n column_values: $columnValues\n ) {\n id\n name\n url\n created_at\n }\n}`;\n\nexport type ItemCreateOptions = {\n /** The node's resolved config. Keys: boardId, itemName, groupId, columnValues. */\n config: Record<string, unknown>;\n credentials?: Record<string, string | undefined>;\n mode?: RequestedMode;\n connectionId?: string | null;\n input?: unknown;\n attempts?: number;\n /** Override the transport. The only way to exercise this without a network. */\n transport?: Transport;\n};\n\nexport async function mondayItemCreate(options: ItemCreateOptions): Promise<ConnectorResult> {\n const config = options.config ?? {};\n\n if (config.boardId === undefined || config.boardId === null || config.boardId === \"\") {\n throw new Error(`item_create: \"boardId\" is required (Board ID).`);\n }\n\n if (config.itemName === undefined || config.itemName === null || config.itemName === \"\") {\n throw new Error(`item_create: \"itemName\" is required (Item name).`);\n }\n\n return callConnector(MONDAY, {\n operation: ITEM_CREATE_OPERATION,\n config,\n input: options.input,\n ...(options.credentials === undefined ? {} : { credentials: options.credentials }),\n ...(options.mode === undefined ? {} : { mode: options.mode }),\n ...(options.connectionId === undefined ? {} : { connectionId: options.connectionId }),\n ...(options.attempts === undefined ? {} : { attempts: options.attempts }),\n ...(options.transport === undefined ? {} : { transport: options.transport }),\n request: {\n method: \"POST\",\n path: \"/v2\",\n json: {\n query: DOCUMENT,\n variables: {\n \"boardId\": String(config.boardId),\n \"itemName\": String(config.itemName),\n ...(config.groupId !== undefined && config.groupId !== null && config.groupId !== \"\" ? { \"groupId\": String(config.groupId) } : {}),\n ...columnvaluesForm(config.columnValues),\n },\n },\n },\n });\n}\n\n/** `{ order_id: \"7\" }` → `{ \"columnValues\": \"{\\\"order_id\\\":\\\"7\\\"}\" }`. */\nfunction columnvaluesForm(value: unknown): Record<string, string> {\n if (!value || typeof value !== \"object\") return {};\n\n return { \"columnValues\": JSON.stringify(value) };\n}\n"]}
package/dist/flow.cjs ADDED
@@ -0,0 +1,125 @@
1
+ 'use strict';
2
+
3
+ var fancyConnectorCore = require('@particle-academy/fancy-connector-core');
4
+ var mondayUi = require('@particle-academy/monday-ui');
5
+
6
+ // src/flow.ts
7
+
8
+ // src/faker.ts
9
+ function fakeItemCreate({ config, fake }) {
10
+ return {
11
+ "data": {
12
+ "create_item": {
13
+ "id": Array.from({ length: 10 }, () => fake.int(0, 9)).join(""),
14
+ "name": config.itemName !== void 0 && config.itemName !== null && config.itemName !== "" ? String(config.itemName) : "New item",
15
+ "url": "https://example.monday.com/boards/1234567890/pulses/1234567890",
16
+ "created_at": "2026-01-01T00:00:00Z"
17
+ }
18
+ }
19
+ };
20
+ }
21
+ var mondayFaker = (operation, request) => {
22
+ switch (operation) {
23
+ case "item_create":
24
+ return fakeItemCreate(request);
25
+ default:
26
+ throw new Error(
27
+ `monday: no fake response is defined for "${operation}". Add a fixture under provider/fixtures/ and regenerate \u2014 a connector without a faker cannot be developed against, tested, or demonstrated.`
28
+ );
29
+ }
30
+ };
31
+
32
+ // src/service.ts
33
+ var MONDAY_BASE_URLS = {
34
+ "live": "https://api.monday.com"
35
+ };
36
+ var MONDAY_REQUIRES = [
37
+ "apiToken"
38
+ ];
39
+ function mondayAuthorize(credentials, request, _mode) {
40
+ request.headers["API-Version"] = "2026-07";
41
+ request.headers["Authorization"] = `${credentials.apiToken ?? ""}`;
42
+ }
43
+ var MONDAY = {
44
+ service: "monday",
45
+ title: "monday.com",
46
+ sandbox: "none",
47
+ baseUrls: { ...MONDAY_BASE_URLS },
48
+ requires: [...MONDAY_REQUIRES],
49
+ authorize: mondayAuthorize,
50
+ faker: mondayFaker
51
+ };
52
+ var ITEM_CREATE_OPERATION = "item_create";
53
+ var DOCUMENT = `mutation CreateItem($boardId: ID!, $itemName: String!, $groupId: String, $columnValues: JSON) {
54
+ create_item(
55
+ board_id: $boardId
56
+ item_name: $itemName
57
+ group_id: $groupId
58
+ column_values: $columnValues
59
+ ) {
60
+ id
61
+ name
62
+ url
63
+ created_at
64
+ }
65
+ }`;
66
+ async function mondayItemCreate(options) {
67
+ const config = options.config ?? {};
68
+ if (config.boardId === void 0 || config.boardId === null || config.boardId === "") {
69
+ throw new Error(`item_create: "boardId" is required (Board ID).`);
70
+ }
71
+ if (config.itemName === void 0 || config.itemName === null || config.itemName === "") {
72
+ throw new Error(`item_create: "itemName" is required (Item name).`);
73
+ }
74
+ return fancyConnectorCore.callConnector(MONDAY, {
75
+ operation: ITEM_CREATE_OPERATION,
76
+ config,
77
+ input: options.input,
78
+ ...options.credentials === void 0 ? {} : { credentials: options.credentials },
79
+ ...options.mode === void 0 ? {} : { mode: options.mode },
80
+ ...options.connectionId === void 0 ? {} : { connectionId: options.connectionId },
81
+ ...options.attempts === void 0 ? {} : { attempts: options.attempts },
82
+ ...options.transport === void 0 ? {} : { transport: options.transport },
83
+ request: {
84
+ method: "POST",
85
+ path: "/v2",
86
+ json: {
87
+ query: DOCUMENT,
88
+ variables: {
89
+ "boardId": String(config.boardId),
90
+ "itemName": String(config.itemName),
91
+ ...config.groupId !== void 0 && config.groupId !== null && config.groupId !== "" ? { "groupId": String(config.groupId) } : {},
92
+ ...columnvaluesForm(config.columnValues)
93
+ }
94
+ }
95
+ }
96
+ });
97
+ }
98
+ function columnvaluesForm(value) {
99
+ if (!value || typeof value !== "object") return {};
100
+ return { "columnValues": JSON.stringify(value) };
101
+ }
102
+
103
+ // src/flow.ts
104
+ var mondayItemExecutor = async (ctx) => {
105
+ const config = ctx.node.data?.config ?? {};
106
+ const result = await mondayItemCreate({
107
+ config,
108
+ input: ctx.inputs?.in
109
+ });
110
+ ctx.emit({
111
+ type: "log",
112
+ level: "info",
113
+ nodeId: ctx.node.id,
114
+ message: `monday item_create ${result.data?.id} (${result.mode})`
115
+ });
116
+ return { __port: "out", value: result };
117
+ };
118
+ var MONDAY_RUNNABLE_KINDS = [
119
+ { ...mondayUi.mondayItemKind, executor: mondayItemExecutor }
120
+ ];
121
+
122
+ exports.MONDAY_RUNNABLE_KINDS = MONDAY_RUNNABLE_KINDS;
123
+ exports.mondayItemExecutor = mondayItemExecutor;
124
+ //# sourceMappingURL=flow.cjs.map
125
+ //# sourceMappingURL=flow.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/faker.ts","../src/service.ts","../src/actions/item-create.ts","../src/flow.ts"],"names":["callConnector","mondayItemKind"],"mappings":";;;;;;;;AAyBA,SAAS,cAAA,CAAe,EAAE,MAAA,EAAQ,IAAA,EAAK,EAAyB;AAC9D,EAAA,OAAO;AAAA,IACL,MAAA,EAAQ;AAAA,MACN,aAAA,EAAe;AAAA,QACb,IAAA,EAAM,KAAA,CAAM,IAAA,CAAK,EAAE,QAAQ,EAAA,EAAG,EAAG,MAAM,IAAA,CAAK,IAAI,CAAA,EAAG,CAAC,CAAC,CAAA,CAAE,KAAK,EAAE,CAAA;AAAA,QAC9D,MAAA,EAAS,MAAA,CAAO,QAAA,KAAa,MAAA,IAAa,MAAA,CAAO,QAAA,KAAa,IAAA,IAAQ,MAAA,CAAO,QAAA,KAAa,EAAA,GAAK,MAAA,CAAO,MAAA,CAAO,QAAQ,CAAA,GAAI,UAAA;AAAA,QACzH,KAAA,EAAO,gEAAA;AAAA,QACP,YAAA,EAAc;AAAA;AAChB;AACF,GACF;AACF;AAEO,IAAM,WAAA,GAA8B,CAAC,SAAA,EAAW,OAAA,KAAY;AACjE,EAAA,QAAQ,SAAA;AAAW,IACjB,KAAK,aAAA;AACH,MAA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EAAC;AAAA,UAChI,GAAG,gBAAA,CAAiB,MAAA,CAAO,YAAY;AAAA;AACzC;AACF;AACF,GACD,CAAA;AACH;AAGA,SAAS,iBAAiB,KAAA,EAAwC;AAChE,EAAA,IAAI,CAAC,KAAA,IAAS,OAAO,KAAA,KAAU,QAAA,SAAiB,EAAC;AAEjD,EAAA,OAAO,EAAE,cAAA,EAAgB,IAAA,CAAK,SAAA,CAAU,KAAK,CAAA,EAAE;AACjD;;;AClEO,IAAM,kBAAA,GAAmC,OAAO,GAAA,KAAQ;AAC7D,EAAA,MAAM,MAAA,GAAW,GAAA,CAAI,IAAA,CAAK,IAAA,EAA+C,UAAU,EAAC;AAEpF,EAAA,MAAM,MAAA,GAAS,MAAM,gBAAA,CAAiB;AAAA,IACpC,MAAA;AAAA,IACA,KAAA,EAAO,IAAI,MAAA,EAAQ;AAAA,GACpB,CAAA;AAED,EAAA,GAAA,CAAI,IAAA,CAAK;AAAA,IACP,IAAA,EAAM,KAAA;AAAA,IACN,KAAA,EAAO,MAAA;AAAA,IACP,MAAA,EAAQ,IAAI,IAAA,CAAK,EAAA;AAAA,IACjB,SAAS,CAAA,mBAAA,EAAuB,MAAA,CAAO,MAA0B,EAAE,CAAA,EAAA,EAAK,OAAO,IAAI,CAAA,CAAA;AAAA,GACpF,CAAA;AAED,EAAA,OAAO,EAAE,MAAA,EAAQ,KAAA,EAAO,KAAA,EAAO,MAAA,EAAO;AACxC;AAGO,IAAM,qBAAA,GAA8C;AAAA,EACzD,EAAE,GAAGC,uBAAA,EAAgB,QAAA,EAAU,kBAAA;AACjC","file":"flow.cjs","sourcesContent":["/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/fixtures/ by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/fixtures/ (or weaver's template/) and regenerate:\n *\n * npm run provider -- monday\n */\n\n/**\n * The monday.com faker.\n *\n * Shapes, not behaviour: the goal is that a downstream node sees the field\n * NAMES monday.com actually publishes, so an author can wire {{ $json.data.id\n * }} against a fake and have it keep working against the real thing.\n *\n * Deterministic — same inputs, same output. A faker returning a fresh uuid\n * every call cannot be asserted on, so its fixtures degrade to \"it did not\n * throw\", which is the assertion that catches nothing.\n */\n\nimport type { ConnectorFaker, FakeRequest } from \"@particle-academy/fancy-connector-core\";\n\nfunction fakeItemCreate({ config, fake }: FakeRequest): unknown {\n return {\n \"data\": {\n \"create_item\": {\n \"id\": Array.from({ length: 10 }, () => fake.int(0, 9)).join(\"\"),\n \"name\": (config.itemName !== undefined && config.itemName !== null && config.itemName !== \"\" ? String(config.itemName) : \"New item\"),\n \"url\": \"https://example.monday.com/boards/1234567890/pulses/1234567890\",\n \"created_at\": \"2026-01-01T00:00:00Z\",\n },\n },\n };\n}\n\nexport const mondayFaker: ConnectorFaker = (operation, request) => {\n switch (operation) {\n case \"item_create\":\n return fakeItemCreate(request);\n\n default:\n // A faker asked for an operation it has no shape for must SAY so. Making\n // something up would produce a green run whose output silently has none\n // of the fields the author is about to reference.\n throw new Error(\n `monday: no fake response is defined for \"${operation}\". ` +\n \"Add a fixture under provider/fixtures/ and regenerate — a connector without a faker \" +\n \"cannot be developed against, tested, or demonstrated.\",\n );\n }\n};\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/manifest.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/manifest.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- monday\n */\n\n/**\n * monday.com, as one service descriptor shared by every monday.com operation.\n *\n * @particle-academy/fancy-connector-core carries what is true of ALL\n * connectors. This carries what is true of monday.com: its base URL, its auth\n * scheme, its idempotency header, and its faker.\n *\n * ## The sandbox trap, written down where it is used\n *\n * monday has no test estate. A developer plan is a real account with real\n * boards, so anything an action creates is created for real. The faker is the\n * only safe way to develop against this connector, which is why every action\n * ships with one.\n */\n\nimport type { ConnectorMode, PreparedRequest, ServiceDescriptor } from \"@particle-academy/fancy-connector-core\";\n\nimport { mondayFaker } from \"./faker.js\";\n\n/**\n * The connector API version this package was GENERATED against.\n *\n * A literal, never imported. An imported constant lets an upgrade rewrite the\n * very claim it exists to detect, after which the copy agrees with itself\n * forever.\n */\nexport const CONNECTOR_API_VERSION = 1;\n\nexport const MONDAY_BASE_URLS = {\n \"live\": \"https://api.monday.com\"\n} as const;\n\n/** Credential keys a remote call cannot proceed without. */\nexport const MONDAY_REQUIRES = [\n \"apiToken\"\n] as const;\n\n/**\n * Apply monday.com's auth scheme to an outgoing request.\n *\n * BARE, with no `Bearer ` prefix. Both spellings answer 401 to an invalid\n * token, so the wire cannot tell them apart and this had to come from monday's\n * own authentication doc rather than from a probe. A `Bearer ` prefix here\n * would fail every real call with an authentication error that says nothing\n * about the prefix.\n *\n * The mode is passed in because for some providers auth and estate are the\n * same decision expressed in the URL; here it is unused, and saying so is\n * cheaper than wondering later whether it was forgotten.\n */\nexport function mondayAuthorize(\n credentials: Record<string, string | undefined>,\n request: PreparedRequest,\n _mode: ConnectorMode,\n): void {\n request.headers[\"API-Version\"] = \"2026-07\";\n\n request.headers[\"Authorization\"] = `${credentials.apiToken ?? \"\"}`;\n}\n\n/** The monday.com service, for the TypeScript runtime. */\nexport const MONDAY: ServiceDescriptor = {\n service: \"monday\",\n title: \"monday.com\",\n sandbox: \"none\",\n baseUrls: { ...MONDAY_BASE_URLS },\n requires: [...MONDAY_REQUIRES],\n authorize: mondayAuthorize,\n faker: mondayFaker,\n};\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/item-create.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/item-create.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- monday\n */\n\n/**\n * Create an item on a monday.com board.\n *\n * POST /v2 —\n * https://developer.monday.com/api-reference/reference/items#create-an-item\n *\n * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,\n * no fake/real branch. This describes the request; callConnector resolves the\n * connection, picks the estate, and either calls monday.com or calls the\n * faker.\n *\n * sideEffects: unsafe-to-replay.\n */\n\nimport {\n callConnector,\n type ConnectorResult,\n type RequestedMode,\n type Transport,\n} from \"@particle-academy/fancy-connector-core\";\nimport { MONDAY } from \"../service.js\";\n\nexport const ITEM_CREATE_OPERATION = \"item_create\";\n\nconst DOCUMENT = `mutation CreateItem($boardId: ID!, $itemName: String!, $groupId: String, $columnValues: JSON) {\n create_item(\n board_id: $boardId\n item_name: $itemName\n group_id: $groupId\n column_values: $columnValues\n ) {\n id\n name\n url\n created_at\n }\n}`;\n\nexport type ItemCreateOptions = {\n /** The node's resolved config. Keys: boardId, itemName, groupId, columnValues. */\n config: Record<string, unknown>;\n credentials?: Record<string, string | undefined>;\n mode?: RequestedMode;\n connectionId?: string | null;\n input?: unknown;\n attempts?: number;\n /** Override the transport. The only way to exercise this without a network. */\n transport?: Transport;\n};\n\nexport async function mondayItemCreate(options: ItemCreateOptions): Promise<ConnectorResult> {\n const config = options.config ?? {};\n\n if (config.boardId === undefined || config.boardId === null || config.boardId === \"\") {\n throw new Error(`item_create: \"boardId\" is required (Board ID).`);\n }\n\n if (config.itemName === undefined || config.itemName === null || config.itemName === \"\") {\n throw new Error(`item_create: \"itemName\" is required (Item name).`);\n }\n\n return callConnector(MONDAY, {\n operation: ITEM_CREATE_OPERATION,\n config,\n input: options.input,\n ...(options.credentials === undefined ? {} : { credentials: options.credentials }),\n ...(options.mode === undefined ? {} : { mode: options.mode }),\n ...(options.connectionId === undefined ? {} : { connectionId: options.connectionId }),\n ...(options.attempts === undefined ? {} : { attempts: options.attempts }),\n ...(options.transport === undefined ? {} : { transport: options.transport }),\n request: {\n method: \"POST\",\n path: \"/v2\",\n json: {\n query: DOCUMENT,\n variables: {\n \"boardId\": String(config.boardId),\n \"itemName\": String(config.itemName),\n ...(config.groupId !== undefined && config.groupId !== null && config.groupId !== \"\" ? { \"groupId\": String(config.groupId) } : {}),\n ...columnvaluesForm(config.columnValues),\n },\n },\n },\n });\n}\n\n/** `{ order_id: \"7\" }` → `{ \"columnValues\": \"{\\\"order_id\\\":\\\"7\\\"}\" }`. */\nfunction columnvaluesForm(value: unknown): Record<string, string> {\n if (!value || typeof value !== \"object\") return {};\n\n return { \"columnValues\": JSON.stringify(value) };\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/ + triggers/ by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/ + triggers/ (or weaver's template/) and regenerate:\n *\n * npm run provider -- monday\n */\n\n/**\n * monday.com's node kinds with their TypeScript executors attached — for hosts\n * that EXECUTE on TS.\n *\n * The authoring surface in @particle-academy/monday-ui carries no executor:\n * the editor is React on every host, so a PHP or Python project installs the\n * ui package and never this one.\n */\n\nimport type { NodeExecutor, NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport {\n idempotencyKeyFor,\n NO_IDEMPOTENCY_KEY_WARNING,\n resolveConnection,\n triggerEvent,\n type RequestedMode,\n} from \"@particle-academy/fancy-connector-core\";\nimport { MONDAY } from \"./service.js\";\n\nimport {\n mondayItemKind,\n} from \"@particle-academy/monday-ui\";\n\nimport { mondayItemCreate } from \"./actions/item-create.js\";\n\nexport const mondayItemExecutor: NodeExecutor = async (ctx) => {\n const config = ((ctx.node.data as { config?: Record<string, unknown> })?.config ?? {});\n\n const result = await mondayItemCreate({\n config,\n input: ctx.inputs?.in,\n });\n\n ctx.emit({\n type: \"log\",\n level: \"info\",\n nodeId: ctx.node.id,\n message: `monday item_create ${(result.data as { id?: string })?.id} (${result.mode})`,\n });\n\n return { __port: \"out\", value: result };\n};\n\n/** The kinds a TypeScript host registers. */\nexport const MONDAY_RUNNABLE_KINDS: NodeKindDefinition[] = [\n { ...mondayItemKind, executor: mondayItemExecutor },\n];\n"]}
@@ -0,0 +1,26 @@
1
+ import { NodeKindDefinition, NodeExecutor } from '@particle-academy/fancy-flow/engine';
2
+
3
+ /**
4
+ * GENERATED FILE — do not edit.
5
+ *
6
+ * Emitted from provider/actions/ + triggers/ by weaver's generator.
7
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
8
+ * being rejected, because it works until it silently does not. Fix
9
+ * provider/actions/ + triggers/ (or weaver's template/) and regenerate:
10
+ *
11
+ * npm run provider -- monday
12
+ */
13
+ /**
14
+ * monday.com's node kinds with their TypeScript executors attached — for hosts
15
+ * that EXECUTE on TS.
16
+ *
17
+ * The authoring surface in @particle-academy/monday-ui carries no executor:
18
+ * the editor is React on every host, so a PHP or Python project installs the
19
+ * ui package and never this one.
20
+ */
21
+
22
+ declare const mondayItemExecutor: NodeExecutor;
23
+ /** The kinds a TypeScript host registers. */
24
+ declare const MONDAY_RUNNABLE_KINDS: NodeKindDefinition[];
25
+
26
+ export { MONDAY_RUNNABLE_KINDS, mondayItemExecutor };
package/dist/flow.d.ts ADDED
@@ -0,0 +1,26 @@
1
+ import { NodeKindDefinition, NodeExecutor } from '@particle-academy/fancy-flow/engine';
2
+
3
+ /**
4
+ * GENERATED FILE — do not edit.
5
+ *
6
+ * Emitted from provider/actions/ + triggers/ by weaver's generator.
7
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
8
+ * being rejected, because it works until it silently does not. Fix
9
+ * provider/actions/ + triggers/ (or weaver's template/) and regenerate:
10
+ *
11
+ * npm run provider -- monday
12
+ */
13
+ /**
14
+ * monday.com's node kinds with their TypeScript executors attached — for hosts
15
+ * that EXECUTE on TS.
16
+ *
17
+ * The authoring surface in @particle-academy/monday-ui carries no executor:
18
+ * the editor is React on every host, so a PHP or Python project installs the
19
+ * ui package and never this one.
20
+ */
21
+
22
+ declare const mondayItemExecutor: NodeExecutor;
23
+ /** The kinds a TypeScript host registers. */
24
+ declare const MONDAY_RUNNABLE_KINDS: NodeKindDefinition[];
25
+
26
+ export { MONDAY_RUNNABLE_KINDS, mondayItemExecutor };
package/dist/flow.js ADDED
@@ -0,0 +1,25 @@
1
+ import { mondayItemCreate } from './chunk-QEOX372D.js';
2
+ import '@particle-academy/fancy-connector-core';
3
+ import { mondayItemKind } from '@particle-academy/monday-ui';
4
+
5
+ var mondayItemExecutor = async (ctx) => {
6
+ const config = ctx.node.data?.config ?? {};
7
+ const result = await mondayItemCreate({
8
+ config,
9
+ input: ctx.inputs?.in
10
+ });
11
+ ctx.emit({
12
+ type: "log",
13
+ level: "info",
14
+ nodeId: ctx.node.id,
15
+ message: `monday item_create ${result.data?.id} (${result.mode})`
16
+ });
17
+ return { __port: "out", value: result };
18
+ };
19
+ var MONDAY_RUNNABLE_KINDS = [
20
+ { ...mondayItemKind, executor: mondayItemExecutor }
21
+ ];
22
+
23
+ export { MONDAY_RUNNABLE_KINDS, mondayItemExecutor };
24
+ //# sourceMappingURL=flow.js.map
25
+ //# sourceMappingURL=flow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flow.ts"],"names":[],"mappings":";;;;AAoCO,IAAM,kBAAA,GAAmC,OAAO,GAAA,KAAQ;AAC7D,EAAA,MAAM,MAAA,GAAW,GAAA,CAAI,IAAA,CAAK,IAAA,EAA+C,UAAU,EAAC;AAEpF,EAAA,MAAM,MAAA,GAAS,MAAM,gBAAA,CAAiB;AAAA,IACpC,MAAA;AAAA,IACA,KAAA,EAAO,IAAI,MAAA,EAAQ;AAAA,GACpB,CAAA;AAED,EAAA,GAAA,CAAI,IAAA,CAAK;AAAA,IACP,IAAA,EAAM,KAAA;AAAA,IACN,KAAA,EAAO,MAAA;AAAA,IACP,MAAA,EAAQ,IAAI,IAAA,CAAK,EAAA;AAAA,IACjB,SAAS,CAAA,mBAAA,EAAuB,MAAA,CAAO,MAA0B,EAAE,CAAA,EAAA,EAAK,OAAO,IAAI,CAAA,CAAA;AAAA,GACpF,CAAA;AAED,EAAA,OAAO,EAAE,MAAA,EAAQ,KAAA,EAAO,KAAA,EAAO,MAAA,EAAO;AACxC;AAGO,IAAM,qBAAA,GAA8C;AAAA,EACzD,EAAE,GAAG,cAAA,EAAgB,QAAA,EAAU,kBAAA;AACjC","file":"flow.js","sourcesContent":["/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/ + triggers/ by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/ + triggers/ (or weaver's template/) and regenerate:\n *\n * npm run provider -- monday\n */\n\n/**\n * monday.com's node kinds with their TypeScript executors attached — for hosts\n * that EXECUTE on TS.\n *\n * The authoring surface in @particle-academy/monday-ui carries no executor:\n * the editor is React on every host, so a PHP or Python project installs the\n * ui package and never this one.\n */\n\nimport type { NodeExecutor, NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport {\n idempotencyKeyFor,\n NO_IDEMPOTENCY_KEY_WARNING,\n resolveConnection,\n triggerEvent,\n type RequestedMode,\n} from \"@particle-academy/fancy-connector-core\";\nimport { MONDAY } from \"./service.js\";\n\nimport {\n mondayItemKind,\n} from \"@particle-academy/monday-ui\";\n\nimport { mondayItemCreate } from \"./actions/item-create.js\";\n\nexport const mondayItemExecutor: NodeExecutor = async (ctx) => {\n const config = ((ctx.node.data as { config?: Record<string, unknown> })?.config ?? {});\n\n const result = await mondayItemCreate({\n config,\n input: ctx.inputs?.in,\n });\n\n ctx.emit({\n type: \"log\",\n level: \"info\",\n nodeId: ctx.node.id,\n message: `monday item_create ${(result.data as { id?: string })?.id} (${result.mode})`,\n });\n\n return { __port: \"out\", value: result };\n};\n\n/** The kinds a TypeScript host registers. */\nexport const MONDAY_RUNNABLE_KINDS: NodeKindDefinition[] = [\n { ...mondayItemKind, executor: mondayItemExecutor },\n];\n"]}
package/dist/index.cjs ADDED
@@ -0,0 +1,110 @@
1
+ 'use strict';
2
+
3
+ var fancyConnectorCore = require('@particle-academy/fancy-connector-core');
4
+
5
+ // src/faker.ts
6
+ function fakeItemCreate({ config, fake }) {
7
+ return {
8
+ "data": {
9
+ "create_item": {
10
+ "id": Array.from({ length: 10 }, () => fake.int(0, 9)).join(""),
11
+ "name": config.itemName !== void 0 && config.itemName !== null && config.itemName !== "" ? String(config.itemName) : "New item",
12
+ "url": "https://example.monday.com/boards/1234567890/pulses/1234567890",
13
+ "created_at": "2026-01-01T00:00:00Z"
14
+ }
15
+ }
16
+ };
17
+ }
18
+ var mondayFaker = (operation, request) => {
19
+ switch (operation) {
20
+ case "item_create":
21
+ return fakeItemCreate(request);
22
+ default:
23
+ throw new Error(
24
+ `monday: no fake response is defined for "${operation}". Add a fixture under provider/fixtures/ and regenerate \u2014 a connector without a faker cannot be developed against, tested, or demonstrated.`
25
+ );
26
+ }
27
+ };
28
+
29
+ // src/service.ts
30
+ var CONNECTOR_API_VERSION = 1;
31
+ var MONDAY_BASE_URLS = {
32
+ "live": "https://api.monday.com"
33
+ };
34
+ var MONDAY_REQUIRES = [
35
+ "apiToken"
36
+ ];
37
+ function mondayAuthorize(credentials, request, _mode) {
38
+ request.headers["API-Version"] = "2026-07";
39
+ request.headers["Authorization"] = `${credentials.apiToken ?? ""}`;
40
+ }
41
+ var MONDAY = {
42
+ service: "monday",
43
+ title: "monday.com",
44
+ sandbox: "none",
45
+ baseUrls: { ...MONDAY_BASE_URLS },
46
+ requires: [...MONDAY_REQUIRES],
47
+ authorize: mondayAuthorize,
48
+ faker: mondayFaker
49
+ };
50
+ var ITEM_CREATE_OPERATION = "item_create";
51
+ var DOCUMENT = `mutation CreateItem($boardId: ID!, $itemName: String!, $groupId: String, $columnValues: JSON) {
52
+ create_item(
53
+ board_id: $boardId
54
+ item_name: $itemName
55
+ group_id: $groupId
56
+ column_values: $columnValues
57
+ ) {
58
+ id
59
+ name
60
+ url
61
+ created_at
62
+ }
63
+ }`;
64
+ async function mondayItemCreate(options) {
65
+ const config = options.config ?? {};
66
+ if (config.boardId === void 0 || config.boardId === null || config.boardId === "") {
67
+ throw new Error(`item_create: "boardId" is required (Board ID).`);
68
+ }
69
+ if (config.itemName === void 0 || config.itemName === null || config.itemName === "") {
70
+ throw new Error(`item_create: "itemName" is required (Item name).`);
71
+ }
72
+ return fancyConnectorCore.callConnector(MONDAY, {
73
+ operation: ITEM_CREATE_OPERATION,
74
+ config,
75
+ input: options.input,
76
+ ...options.credentials === void 0 ? {} : { credentials: options.credentials },
77
+ ...options.mode === void 0 ? {} : { mode: options.mode },
78
+ ...options.connectionId === void 0 ? {} : { connectionId: options.connectionId },
79
+ ...options.attempts === void 0 ? {} : { attempts: options.attempts },
80
+ ...options.transport === void 0 ? {} : { transport: options.transport },
81
+ request: {
82
+ method: "POST",
83
+ path: "/v2",
84
+ json: {
85
+ query: DOCUMENT,
86
+ variables: {
87
+ "boardId": String(config.boardId),
88
+ "itemName": String(config.itemName),
89
+ ...config.groupId !== void 0 && config.groupId !== null && config.groupId !== "" ? { "groupId": String(config.groupId) } : {},
90
+ ...columnvaluesForm(config.columnValues)
91
+ }
92
+ }
93
+ }
94
+ });
95
+ }
96
+ function columnvaluesForm(value) {
97
+ if (!value || typeof value !== "object") return {};
98
+ return { "columnValues": JSON.stringify(value) };
99
+ }
100
+
101
+ exports.CONNECTOR_API_VERSION = CONNECTOR_API_VERSION;
102
+ exports.ITEM_CREATE_OPERATION = ITEM_CREATE_OPERATION;
103
+ exports.MONDAY = MONDAY;
104
+ exports.MONDAY_BASE_URLS = MONDAY_BASE_URLS;
105
+ exports.MONDAY_REQUIRES = MONDAY_REQUIRES;
106
+ exports.mondayAuthorize = mondayAuthorize;
107
+ exports.mondayFaker = mondayFaker;
108
+ exports.mondayItemCreate = mondayItemCreate;
109
+ //# sourceMappingURL=index.cjs.map
110
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/faker.ts","../src/service.ts","../src/actions/item-create.ts"],"names":["callConnector"],"mappings":";;;;;AAyBA,SAAS,cAAA,CAAe,EAAE,MAAA,EAAQ,IAAA,EAAK,EAAyB;AAC9D,EAAA,OAAO;AAAA,IACL,MAAA,EAAQ;AAAA,MACN,aAAA,EAAe;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A,KAAc,MAAA,GAAY,EAAC,GAAI,EAAE,SAAA,EAAW,OAAA,CAAQ,SAAA,EAAU;AAAA,IAC1E,OAAA,EAAS;AAAA,MACP,MAAA,EAAQ,MAAA;AAAA,MACR,IAAA,EAAM,KAAA;AAAA,MACN,IAAA,EAAM;AAAA,QACJ,KAAA,EAAO,QAAA;AAAA,QACP,SAAA,EAAW;AAAA,UACT,SAAA,EAAW,MAAA,CAAO,MAAA,CAAO,OAAO,CAAA;AAAA,UAChC,UAAA,EAAY,MAAA,CAAO,MAAA,CAAO,QAAQ,CAAA;AAAA,UAClC,GAAI,MAAA,CAAO,OAAA,KAAY,MAAA,IAAa,MAAA,CAAO,YAAY,IAAA,IAAQ,MAAA,CAAO,OAAA,KAAY,EAAA,GAAK,EAAE,SAAA,EAAW,MAAA,CAAO,OAAO,OAAO,CAAA,KAAM,EAAC;AAAA,UAChI,GAAG,gBAAA,CAAiB,MAAA,CAAO,YAAY;AAAA;AACzC;AACF;AACF,GACD,CAAA;AACH;AAGA,SAAS,iBAAiB,KAAA,EAAwC;AAChE,EAAA,IAAI,CAAC,KAAA,IAAS,OAAO,KAAA,KAAU,QAAA,SAAiB,EAAC;AAEjD,EAAA,OAAO,EAAE,cAAA,EAAgB,IAAA,CAAK,SAAA,CAAU,KAAK,CAAA,EAAE;AACjD","file":"index.cjs","sourcesContent":["/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/fixtures/ by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/fixtures/ (or weaver's template/) and regenerate:\n *\n * npm run provider -- monday\n */\n\n/**\n * The monday.com faker.\n *\n * Shapes, not behaviour: the goal is that a downstream node sees the field\n * NAMES monday.com actually publishes, so an author can wire {{ $json.data.id\n * }} against a fake and have it keep working against the real thing.\n *\n * Deterministic — same inputs, same output. A faker returning a fresh uuid\n * every call cannot be asserted on, so its fixtures degrade to \"it did not\n * throw\", which is the assertion that catches nothing.\n */\n\nimport type { ConnectorFaker, FakeRequest } from \"@particle-academy/fancy-connector-core\";\n\nfunction fakeItemCreate({ config, fake }: FakeRequest): unknown {\n return {\n \"data\": {\n \"create_item\": {\n \"id\": Array.from({ length: 10 }, () => fake.int(0, 9)).join(\"\"),\n \"name\": (config.itemName !== undefined && config.itemName !== null && config.itemName !== \"\" ? String(config.itemName) : \"New item\"),\n \"url\": \"https://example.monday.com/boards/1234567890/pulses/1234567890\",\n \"created_at\": \"2026-01-01T00:00:00Z\",\n },\n },\n };\n}\n\nexport const mondayFaker: ConnectorFaker = (operation, request) => {\n switch (operation) {\n case \"item_create\":\n return fakeItemCreate(request);\n\n default:\n // A faker asked for an operation it has no shape for must SAY so. Making\n // something up would produce a green run whose output silently has none\n // of the fields the author is about to reference.\n throw new Error(\n `monday: no fake response is defined for \"${operation}\". ` +\n \"Add a fixture under provider/fixtures/ and regenerate — a connector without a faker \" +\n \"cannot be developed against, tested, or demonstrated.\",\n );\n }\n};\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/manifest.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/manifest.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- monday\n */\n\n/**\n * monday.com, as one service descriptor shared by every monday.com operation.\n *\n * @particle-academy/fancy-connector-core carries what is true of ALL\n * connectors. This carries what is true of monday.com: its base URL, its auth\n * scheme, its idempotency header, and its faker.\n *\n * ## The sandbox trap, written down where it is used\n *\n * monday has no test estate. A developer plan is a real account with real\n * boards, so anything an action creates is created for real. The faker is the\n * only safe way to develop against this connector, which is why every action\n * ships with one.\n */\n\nimport type { ConnectorMode, PreparedRequest, ServiceDescriptor } from \"@particle-academy/fancy-connector-core\";\n\nimport { mondayFaker } from \"./faker.js\";\n\n/**\n * The connector API version this package was GENERATED against.\n *\n * A literal, never imported. An imported constant lets an upgrade rewrite the\n * very claim it exists to detect, after which the copy agrees with itself\n * forever.\n */\nexport const CONNECTOR_API_VERSION = 1;\n\nexport const MONDAY_BASE_URLS = {\n \"live\": \"https://api.monday.com\"\n} as const;\n\n/** Credential keys a remote call cannot proceed without. */\nexport const MONDAY_REQUIRES = [\n \"apiToken\"\n] as const;\n\n/**\n * Apply monday.com's auth scheme to an outgoing request.\n *\n * BARE, with no `Bearer ` prefix. Both spellings answer 401 to an invalid\n * token, so the wire cannot tell them apart and this had to come from monday's\n * own authentication doc rather than from a probe. A `Bearer ` prefix here\n * would fail every real call with an authentication error that says nothing\n * about the prefix.\n *\n * The mode is passed in because for some providers auth and estate are the\n * same decision expressed in the URL; here it is unused, and saying so is\n * cheaper than wondering later whether it was forgotten.\n */\nexport function mondayAuthorize(\n credentials: Record<string, string | undefined>,\n request: PreparedRequest,\n _mode: ConnectorMode,\n): void {\n request.headers[\"API-Version\"] = \"2026-07\";\n\n request.headers[\"Authorization\"] = `${credentials.apiToken ?? \"\"}`;\n}\n\n/** The monday.com service, for the TypeScript runtime. */\nexport const MONDAY: ServiceDescriptor = {\n service: \"monday\",\n title: \"monday.com\",\n sandbox: \"none\",\n baseUrls: { ...MONDAY_BASE_URLS },\n requires: [...MONDAY_REQUIRES],\n authorize: mondayAuthorize,\n faker: mondayFaker,\n};\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/item-create.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/item-create.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- monday\n */\n\n/**\n * Create an item on a monday.com board.\n *\n * POST /v2 —\n * https://developer.monday.com/api-reference/reference/items#create-an-item\n *\n * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,\n * no fake/real branch. This describes the request; callConnector resolves the\n * connection, picks the estate, and either calls monday.com or calls the\n * faker.\n *\n * sideEffects: unsafe-to-replay.\n */\n\nimport {\n callConnector,\n type ConnectorResult,\n type RequestedMode,\n type Transport,\n} from \"@particle-academy/fancy-connector-core\";\nimport { MONDAY } from \"../service.js\";\n\nexport const ITEM_CREATE_OPERATION = \"item_create\";\n\nconst DOCUMENT = `mutation CreateItem($boardId: ID!, $itemName: String!, $groupId: String, $columnValues: JSON) {\n create_item(\n board_id: $boardId\n item_name: $itemName\n group_id: $groupId\n column_values: $columnValues\n ) {\n id\n name\n url\n created_at\n }\n}`;\n\nexport type ItemCreateOptions = {\n /** The node's resolved config. Keys: boardId, itemName, groupId, columnValues. */\n config: Record<string, unknown>;\n credentials?: Record<string, string | undefined>;\n mode?: RequestedMode;\n connectionId?: string | null;\n input?: unknown;\n attempts?: number;\n /** Override the transport. The only way to exercise this without a network. */\n transport?: Transport;\n};\n\nexport async function mondayItemCreate(options: ItemCreateOptions): Promise<ConnectorResult> {\n const config = options.config ?? {};\n\n if (config.boardId === undefined || config.boardId === null || config.boardId === \"\") {\n throw new Error(`item_create: \"boardId\" is required (Board ID).`);\n }\n\n if (config.itemName === undefined || config.itemName === null || config.itemName === \"\") {\n throw new Error(`item_create: \"itemName\" is required (Item name).`);\n }\n\n return callConnector(MONDAY, {\n operation: ITEM_CREATE_OPERATION,\n config,\n input: options.input,\n ...(options.credentials === undefined ? {} : { credentials: options.credentials }),\n ...(options.mode === undefined ? {} : { mode: options.mode }),\n ...(options.connectionId === undefined ? {} : { connectionId: options.connectionId }),\n ...(options.attempts === undefined ? {} : { attempts: options.attempts }),\n ...(options.transport === undefined ? {} : { transport: options.transport }),\n request: {\n method: \"POST\",\n path: \"/v2\",\n json: {\n query: DOCUMENT,\n variables: {\n \"boardId\": String(config.boardId),\n \"itemName\": String(config.itemName),\n ...(config.groupId !== undefined && config.groupId !== null && config.groupId !== \"\" ? { \"groupId\": String(config.groupId) } : {}),\n ...columnvaluesForm(config.columnValues),\n },\n },\n },\n });\n}\n\n/** `{ order_id: \"7\" }` → `{ \"columnValues\": \"{\\\"order_id\\\":\\\"7\\\"}\" }`. */\nfunction columnvaluesForm(value: unknown): Record<string, string> {\n if (!value || typeof value !== \"object\") return {};\n\n return { \"columnValues\": JSON.stringify(value) };\n}\n"]}
@@ -0,0 +1,120 @@
1
+ import { ServiceDescriptor, PreparedRequest, ConnectorMode, ConnectorFaker, RequestedMode, Transport, ConnectorResult } from '@particle-academy/fancy-connector-core';
2
+
3
+ /**
4
+ * GENERATED FILE — do not edit.
5
+ *
6
+ * Emitted from provider/manifest.json by weaver's generator.
7
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
8
+ * being rejected, because it works until it silently does not. Fix
9
+ * provider/manifest.json (or weaver's template/) and regenerate:
10
+ *
11
+ * npm run provider -- monday
12
+ */
13
+ /**
14
+ * monday.com, as one service descriptor shared by every monday.com operation.
15
+ *
16
+ * @particle-academy/fancy-connector-core carries what is true of ALL
17
+ * connectors. This carries what is true of monday.com: its base URL, its auth
18
+ * scheme, its idempotency header, and its faker.
19
+ *
20
+ * ## The sandbox trap, written down where it is used
21
+ *
22
+ * monday has no test estate. A developer plan is a real account with real
23
+ * boards, so anything an action creates is created for real. The faker is the
24
+ * only safe way to develop against this connector, which is why every action
25
+ * ships with one.
26
+ */
27
+
28
+ /**
29
+ * The connector API version this package was GENERATED against.
30
+ *
31
+ * A literal, never imported. An imported constant lets an upgrade rewrite the
32
+ * very claim it exists to detect, after which the copy agrees with itself
33
+ * forever.
34
+ */
35
+ declare const CONNECTOR_API_VERSION = 1;
36
+ declare const MONDAY_BASE_URLS: {
37
+ readonly live: "https://api.monday.com";
38
+ };
39
+ /** Credential keys a remote call cannot proceed without. */
40
+ declare const MONDAY_REQUIRES: readonly ["apiToken"];
41
+ /**
42
+ * Apply monday.com's auth scheme to an outgoing request.
43
+ *
44
+ * BARE, with no `Bearer ` prefix. Both spellings answer 401 to an invalid
45
+ * token, so the wire cannot tell them apart and this had to come from monday's
46
+ * own authentication doc rather than from a probe. A `Bearer ` prefix here
47
+ * would fail every real call with an authentication error that says nothing
48
+ * about the prefix.
49
+ *
50
+ * The mode is passed in because for some providers auth and estate are the
51
+ * same decision expressed in the URL; here it is unused, and saying so is
52
+ * cheaper than wondering later whether it was forgotten.
53
+ */
54
+ declare function mondayAuthorize(credentials: Record<string, string | undefined>, request: PreparedRequest, _mode: ConnectorMode): void;
55
+ /** The monday.com service, for the TypeScript runtime. */
56
+ declare const MONDAY: ServiceDescriptor;
57
+
58
+ /**
59
+ * GENERATED FILE — do not edit.
60
+ *
61
+ * Emitted from provider/fixtures/ by weaver's generator.
62
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
63
+ * being rejected, because it works until it silently does not. Fix
64
+ * provider/fixtures/ (or weaver's template/) and regenerate:
65
+ *
66
+ * npm run provider -- monday
67
+ */
68
+ /**
69
+ * The monday.com faker.
70
+ *
71
+ * Shapes, not behaviour: the goal is that a downstream node sees the field
72
+ * NAMES monday.com actually publishes, so an author can wire {{ $json.data.id
73
+ * }} against a fake and have it keep working against the real thing.
74
+ *
75
+ * Deterministic — same inputs, same output. A faker returning a fresh uuid
76
+ * every call cannot be asserted on, so its fixtures degrade to "it did not
77
+ * throw", which is the assertion that catches nothing.
78
+ */
79
+
80
+ declare const mondayFaker: ConnectorFaker;
81
+
82
+ /**
83
+ * GENERATED FILE — do not edit.
84
+ *
85
+ * Emitted from provider/actions/item-create.json by weaver's generator.
86
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
87
+ * being rejected, because it works until it silently does not. Fix
88
+ * provider/actions/item-create.json (or weaver's template/) and regenerate:
89
+ *
90
+ * npm run provider -- monday
91
+ */
92
+ /**
93
+ * Create an item on a monday.com board.
94
+ *
95
+ * POST /v2 —
96
+ * https://developer.monday.com/api-reference/reference/items#create-an-item
97
+ *
98
+ * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,
99
+ * no fake/real branch. This describes the request; callConnector resolves the
100
+ * connection, picks the estate, and either calls monday.com or calls the
101
+ * faker.
102
+ *
103
+ * sideEffects: unsafe-to-replay.
104
+ */
105
+
106
+ declare const ITEM_CREATE_OPERATION = "item_create";
107
+ type ItemCreateOptions = {
108
+ /** The node's resolved config. Keys: boardId, itemName, groupId, columnValues. */
109
+ config: Record<string, unknown>;
110
+ credentials?: Record<string, string | undefined>;
111
+ mode?: RequestedMode;
112
+ connectionId?: string | null;
113
+ input?: unknown;
114
+ attempts?: number;
115
+ /** Override the transport. The only way to exercise this without a network. */
116
+ transport?: Transport;
117
+ };
118
+ declare function mondayItemCreate(options: ItemCreateOptions): Promise<ConnectorResult>;
119
+
120
+ export { CONNECTOR_API_VERSION, ITEM_CREATE_OPERATION, type ItemCreateOptions, MONDAY, MONDAY_BASE_URLS, MONDAY_REQUIRES, mondayAuthorize, mondayFaker, mondayItemCreate };
@@ -0,0 +1,120 @@
1
+ import { ServiceDescriptor, PreparedRequest, ConnectorMode, ConnectorFaker, RequestedMode, Transport, ConnectorResult } from '@particle-academy/fancy-connector-core';
2
+
3
+ /**
4
+ * GENERATED FILE — do not edit.
5
+ *
6
+ * Emitted from provider/manifest.json by weaver's generator.
7
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
8
+ * being rejected, because it works until it silently does not. Fix
9
+ * provider/manifest.json (or weaver's template/) and regenerate:
10
+ *
11
+ * npm run provider -- monday
12
+ */
13
+ /**
14
+ * monday.com, as one service descriptor shared by every monday.com operation.
15
+ *
16
+ * @particle-academy/fancy-connector-core carries what is true of ALL
17
+ * connectors. This carries what is true of monday.com: its base URL, its auth
18
+ * scheme, its idempotency header, and its faker.
19
+ *
20
+ * ## The sandbox trap, written down where it is used
21
+ *
22
+ * monday has no test estate. A developer plan is a real account with real
23
+ * boards, so anything an action creates is created for real. The faker is the
24
+ * only safe way to develop against this connector, which is why every action
25
+ * ships with one.
26
+ */
27
+
28
+ /**
29
+ * The connector API version this package was GENERATED against.
30
+ *
31
+ * A literal, never imported. An imported constant lets an upgrade rewrite the
32
+ * very claim it exists to detect, after which the copy agrees with itself
33
+ * forever.
34
+ */
35
+ declare const CONNECTOR_API_VERSION = 1;
36
+ declare const MONDAY_BASE_URLS: {
37
+ readonly live: "https://api.monday.com";
38
+ };
39
+ /** Credential keys a remote call cannot proceed without. */
40
+ declare const MONDAY_REQUIRES: readonly ["apiToken"];
41
+ /**
42
+ * Apply monday.com's auth scheme to an outgoing request.
43
+ *
44
+ * BARE, with no `Bearer ` prefix. Both spellings answer 401 to an invalid
45
+ * token, so the wire cannot tell them apart and this had to come from monday's
46
+ * own authentication doc rather than from a probe. A `Bearer ` prefix here
47
+ * would fail every real call with an authentication error that says nothing
48
+ * about the prefix.
49
+ *
50
+ * The mode is passed in because for some providers auth and estate are the
51
+ * same decision expressed in the URL; here it is unused, and saying so is
52
+ * cheaper than wondering later whether it was forgotten.
53
+ */
54
+ declare function mondayAuthorize(credentials: Record<string, string | undefined>, request: PreparedRequest, _mode: ConnectorMode): void;
55
+ /** The monday.com service, for the TypeScript runtime. */
56
+ declare const MONDAY: ServiceDescriptor;
57
+
58
+ /**
59
+ * GENERATED FILE — do not edit.
60
+ *
61
+ * Emitted from provider/fixtures/ by weaver's generator.
62
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
63
+ * being rejected, because it works until it silently does not. Fix
64
+ * provider/fixtures/ (or weaver's template/) and regenerate:
65
+ *
66
+ * npm run provider -- monday
67
+ */
68
+ /**
69
+ * The monday.com faker.
70
+ *
71
+ * Shapes, not behaviour: the goal is that a downstream node sees the field
72
+ * NAMES monday.com actually publishes, so an author can wire {{ $json.data.id
73
+ * }} against a fake and have it keep working against the real thing.
74
+ *
75
+ * Deterministic — same inputs, same output. A faker returning a fresh uuid
76
+ * every call cannot be asserted on, so its fixtures degrade to "it did not
77
+ * throw", which is the assertion that catches nothing.
78
+ */
79
+
80
+ declare const mondayFaker: ConnectorFaker;
81
+
82
+ /**
83
+ * GENERATED FILE — do not edit.
84
+ *
85
+ * Emitted from provider/actions/item-create.json by weaver's generator.
86
+ * A hand-edit here is destroyed by the next protocol sync, which is worse than
87
+ * being rejected, because it works until it silently does not. Fix
88
+ * provider/actions/item-create.json (or weaver's template/) and regenerate:
89
+ *
90
+ * npm run provider -- monday
91
+ */
92
+ /**
93
+ * Create an item on a monday.com board.
94
+ *
95
+ * POST /v2 —
96
+ * https://developer.monday.com/api-reference/reference/items#create-an-item
97
+ *
98
+ * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,
99
+ * no fake/real branch. This describes the request; callConnector resolves the
100
+ * connection, picks the estate, and either calls monday.com or calls the
101
+ * faker.
102
+ *
103
+ * sideEffects: unsafe-to-replay.
104
+ */
105
+
106
+ declare const ITEM_CREATE_OPERATION = "item_create";
107
+ type ItemCreateOptions = {
108
+ /** The node's resolved config. Keys: boardId, itemName, groupId, columnValues. */
109
+ config: Record<string, unknown>;
110
+ credentials?: Record<string, string | undefined>;
111
+ mode?: RequestedMode;
112
+ connectionId?: string | null;
113
+ input?: unknown;
114
+ attempts?: number;
115
+ /** Override the transport. The only way to exercise this without a network. */
116
+ transport?: Transport;
117
+ };
118
+ declare function mondayItemCreate(options: ItemCreateOptions): Promise<ConnectorResult>;
119
+
120
+ export { CONNECTOR_API_VERSION, ITEM_CREATE_OPERATION, type ItemCreateOptions, MONDAY, MONDAY_BASE_URLS, MONDAY_REQUIRES, mondayAuthorize, mondayFaker, mondayItemCreate };
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export { CONNECTOR_API_VERSION, ITEM_CREATE_OPERATION, MONDAY, MONDAY_BASE_URLS, MONDAY_REQUIRES, mondayAuthorize, mondayFaker, mondayItemCreate } from './chunk-QEOX372D.js';
2
+ //# sourceMappingURL=index.js.map
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
package/package.json ADDED
@@ -0,0 +1,85 @@
1
+ {
2
+ "name": "@particle-academy/monday-js",
3
+ "version": "0.1.0",
4
+ "description": "monday.com for Node — the service descriptor, its faker, its webhook verification, and one function per operation. Plain HTTP on @particle-academy/fancy-connector-core; no vendor SDK.",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/Fancy-Friends/monday.git"
8
+ },
9
+ "homepage": "https://github.com/Fancy-Friends/monday#readme",
10
+ "bugs": "https://github.com/Fancy-Friends/monday/issues",
11
+ "type": "module",
12
+ "main": "./dist/index.cjs",
13
+ "module": "./dist/index.js",
14
+ "types": "./dist/index.d.ts",
15
+ "exports": {
16
+ ".": {
17
+ "import": {
18
+ "types": "./dist/index.d.ts",
19
+ "default": "./dist/index.js"
20
+ },
21
+ "require": {
22
+ "types": "./dist/index.d.cts",
23
+ "default": "./dist/index.cjs"
24
+ }
25
+ },
26
+ "./flow": {
27
+ "import": {
28
+ "types": "./dist/flow.d.ts",
29
+ "default": "./dist/flow.js"
30
+ },
31
+ "require": {
32
+ "types": "./dist/flow.d.cts",
33
+ "default": "./dist/flow.cjs"
34
+ }
35
+ },
36
+ "./package.json": "./package.json"
37
+ },
38
+ "files": [
39
+ "dist",
40
+ "README.md",
41
+ "CHANGELOG.md",
42
+ "LICENSE"
43
+ ],
44
+ "scripts": {
45
+ "build": "tsup",
46
+ "lint": "tsc --noEmit",
47
+ "test": "node --import tsx --test tests/*.test.ts",
48
+ "prepublishOnly": "tsup"
49
+ },
50
+ "dependencies": {
51
+ "@particle-academy/fancy-connector-core": ">=0.3.1 <2.0",
52
+ "@particle-academy/monday-ui": "0.1.0"
53
+ },
54
+ "peerDependencies": {
55
+ "@particle-academy/fancy-flow": ">=0.47.1 <2.0"
56
+ },
57
+ "peerDependenciesMeta": {
58
+ "@particle-academy/fancy-flow": {
59
+ "optional": true
60
+ }
61
+ },
62
+ "devDependencies": {
63
+ "@particle-academy/fancy-flow": ">=0.47.1 <2.0",
64
+ "@types/node": "^26.2.0",
65
+ "tsup": "^8.5.0",
66
+ "tsx": "^4.19.0",
67
+ "typescript": "^5.8.0"
68
+ },
69
+ "publishConfig": {
70
+ "access": "public"
71
+ },
72
+ "keywords": [
73
+ "monday",
74
+ "productivity",
75
+ "connector",
76
+ "api",
77
+ "fancy-ui",
78
+ "particle-academy"
79
+ ],
80
+ "license": "MIT",
81
+ "sideEffects": false,
82
+ "engines": {
83
+ "node": ">=22"
84
+ }
85
+ }