@thegraphitelab/n8n-nodes-servicetitan 0.16.1 → 0.17.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.
Files changed (67) hide show
  1. package/README.md +3 -4
  2. package/dist/nodes/ServiceTitan/ServiceTitan.node.js +8 -5
  3. package/dist/nodes/ServiceTitan/ServiceTitan.node.js.map +1 -1
  4. package/dist/nodes/ServiceTitan/ServiceTitanTrigger.node.js +3 -2
  5. package/dist/nodes/ServiceTitan/ServiceTitanTrigger.node.js.map +1 -1
  6. package/dist/nodes/ServiceTitan/core/createNode.d.ts +4 -0
  7. package/dist/nodes/ServiceTitan/core/createNode.js +31 -0
  8. package/dist/nodes/ServiceTitan/core/createNode.js.map +1 -0
  9. package/dist/nodes/ServiceTitan/core/description.d.ts +8 -0
  10. package/dist/nodes/ServiceTitan/core/description.js +58 -0
  11. package/dist/nodes/ServiceTitan/core/description.js.map +1 -0
  12. package/dist/nodes/ServiceTitan/{v2/methods → core}/methods.js +2 -2
  13. package/dist/nodes/ServiceTitan/core/methods.js.map +1 -0
  14. package/dist/nodes/ServiceTitan/core/transport.d.ts +3 -0
  15. package/dist/nodes/ServiceTitan/{v2/settings → core}/transport.js +4 -4
  16. package/dist/nodes/ServiceTitan/core/transport.js.map +1 -0
  17. package/dist/nodes/ServiceTitan/v1/index.d.ts +2 -0
  18. package/dist/nodes/ServiceTitan/v1/index.js +12 -0
  19. package/dist/nodes/ServiceTitan/v1/index.js.map +1 -0
  20. package/dist/nodes/ServiceTitan/v2/index.d.ts +2 -0
  21. package/dist/nodes/ServiceTitan/v2/index.js +12 -0
  22. package/dist/nodes/ServiceTitan/v2/index.js.map +1 -0
  23. package/dist/nodes/ServiceTitan/v3/generated/manifests.d.ts +1391 -0
  24. package/dist/nodes/ServiceTitan/v3/generated/manifests.js +46267 -0
  25. package/dist/nodes/ServiceTitan/v3/generated/manifests.js.map +1 -0
  26. package/dist/nodes/ServiceTitan/v3/index.d.ts +2 -0
  27. package/dist/nodes/ServiceTitan/v3/index.js +12 -0
  28. package/dist/nodes/ServiceTitan/v3/index.js.map +1 -0
  29. package/dist/package.json +1 -1
  30. package/package.json +2 -2
  31. package/dist/nodes/ServiceTitan/v1/ServiceTitanTriggerV1.node.d.ts +0 -11
  32. package/dist/nodes/ServiceTitan/v1/ServiceTitanTriggerV1.node.js +0 -28
  33. package/dist/nodes/ServiceTitan/v1/ServiceTitanTriggerV1.node.js.map +0 -1
  34. package/dist/nodes/ServiceTitan/v1/ServiceTitanV1.node.d.ts +0 -6
  35. package/dist/nodes/ServiceTitan/v1/ServiceTitanV1.node.js +0 -22
  36. package/dist/nodes/ServiceTitan/v1/ServiceTitanV1.node.js.map +0 -1
  37. package/dist/nodes/ServiceTitan/v1/methods/methods.js +0 -21
  38. package/dist/nodes/ServiceTitan/v1/methods/methods.js.map +0 -1
  39. package/dist/nodes/ServiceTitan/v1/settings/description.d.ts +0 -5
  40. package/dist/nodes/ServiceTitan/v1/settings/description.js +0 -94
  41. package/dist/nodes/ServiceTitan/v1/settings/description.js.map +0 -1
  42. package/dist/nodes/ServiceTitan/v1/settings/index.d.ts +0 -3
  43. package/dist/nodes/ServiceTitan/v1/settings/index.js +0 -14
  44. package/dist/nodes/ServiceTitan/v1/settings/index.js.map +0 -1
  45. package/dist/nodes/ServiceTitan/v1/settings/manifest.d.ts +0 -2
  46. package/dist/nodes/ServiceTitan/v1/settings/manifest.js +0 -9
  47. package/dist/nodes/ServiceTitan/v1/settings/manifest.js.map +0 -1
  48. package/dist/nodes/ServiceTitan/v1/settings/transport.d.ts +0 -3
  49. package/dist/nodes/ServiceTitan/v1/settings/transport.js +0 -31
  50. package/dist/nodes/ServiceTitan/v1/settings/transport.js.map +0 -1
  51. package/dist/nodes/ServiceTitan/v2/ServiceTitanV2.node.d.ts +0 -6
  52. package/dist/nodes/ServiceTitan/v2/ServiceTitanV2.node.js +0 -22
  53. package/dist/nodes/ServiceTitan/v2/ServiceTitanV2.node.js.map +0 -1
  54. package/dist/nodes/ServiceTitan/v2/methods/methods.d.ts +0 -6
  55. package/dist/nodes/ServiceTitan/v2/methods/methods.js.map +0 -1
  56. package/dist/nodes/ServiceTitan/v2/settings/description.d.ts +0 -3
  57. package/dist/nodes/ServiceTitan/v2/settings/description.js +0 -101
  58. package/dist/nodes/ServiceTitan/v2/settings/description.js.map +0 -1
  59. package/dist/nodes/ServiceTitan/v2/settings/index.d.ts +0 -3
  60. package/dist/nodes/ServiceTitan/v2/settings/index.js +0 -12
  61. package/dist/nodes/ServiceTitan/v2/settings/index.js.map +0 -1
  62. package/dist/nodes/ServiceTitan/v2/settings/manifest.d.ts +0 -2
  63. package/dist/nodes/ServiceTitan/v2/settings/manifest.js +0 -9
  64. package/dist/nodes/ServiceTitan/v2/settings/manifest.js.map +0 -1
  65. package/dist/nodes/ServiceTitan/v2/settings/transport.d.ts +0 -3
  66. package/dist/nodes/ServiceTitan/v2/settings/transport.js.map +0 -1
  67. /package/dist/nodes/ServiceTitan/{v1/methods → core}/methods.d.ts +0 -0
package/README.md CHANGED
@@ -69,10 +69,9 @@ Polling-based with `modifiedOnOrAfter` cursor and a boundary-id dedup set to avo
69
69
 
70
70
  Manifest-driven. The shared engine lives in **[`@thegraphitelab/n8n-nodes-core`](../n8n-nodes-core/)** (a runtime dependency, pulled in automatically when n8n installs this package); this package supplies only ServiceTitan's specifics:
71
71
 
72
- - `nodes/ServiceTitan/v1/generated/manifests.ts` — the **generated** manifest: every resource/operation and trigger, each described declaratively by a `shape`. Build output from `n8n-codegen` — do not hand-edit.
73
- - `nodes/ServiceTitan/v1/transport/config.ts` — the `TransportConfig` the engine reads: credential key, base URL, pagination/cursor rules, and `pathContext` (maps the credential's `tenantId` into the `{tenant}` path placeholder).
74
- - `nodes/ServiceTitan/v1/*.node.ts` + `descriptions/` — the action and trigger node wrappers, which call the engine's `router` / `pollRouter` and `getActionProperties` / `getTriggerProperties`.
75
- - `credentials/` — the ServiceTitan API credential.
72
+ - `nodes/ServiceTitan/vN/generated/manifests.ts` — the **generated** manifest for node version N: every resource/operation and trigger, each described declaratively by a `shape`. Build output from `n8n-codegen` — do not hand-edit. `vN/index.ts` pairs it with the version number; those two are all a version owns.
73
+ - `nodes/ServiceTitan/core/transport.ts` — the `TransportConfig` the engine reads, shared by every version: credential key, base URL, pagination/cursor rules, and `pathContext` (maps the credential's `tenantId` into the `{tenant}` path placeholder).
74
+ - `nodes/ServiceTitan/core/` (`description.ts`, `createNode.ts`, `methods.ts`) — the action and trigger node builders shared by every version, which call the engine's `router` / `pollRouter` and `getActionProperties` / `getTriggerProperties`.- `credentials/` — the ServiceTitan API credential.
76
75
 
77
76
  The engine compiles the manifest into n8n operations, poll triggers, property descriptions, and the authenticated HTTP transport. Adding or refreshing coverage is a codegen regenerate + rebuild (see the [repo root README](../../README.md#how-the-nodes-are-generated)), not a hand-edit.
78
77
 
@@ -2,8 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ServiceTitan = void 0;
4
4
  const n8n_workflow_1 = require("n8n-workflow");
5
- const ServiceTitanV1_node_1 = require("./v1/ServiceTitanV1.node");
6
- const ServiceTitanV2_node_1 = require("./v2/ServiceTitanV2.node");
5
+ const createNode_1 = require("./core/createNode");
6
+ const v1_1 = require("./v1");
7
+ const v2_1 = require("./v2");
8
+ const v3_1 = require("./v3");
7
9
  const baseDescription = {
8
10
  displayName: "ServiceTitan (Generated)",
9
11
  name: "serviceTitan",
@@ -14,13 +16,14 @@ const baseDescription = {
14
16
  },
15
17
  subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
16
18
  description: "Interact with ServiceTitan API via TGL's generated integration. Use ServiceTitan (Handwritten) for special triggers.",
17
- defaultVersion: 2,
19
+ defaultVersion: 3,
18
20
  };
19
21
  class ServiceTitan extends n8n_workflow_1.VersionedNodeType {
20
22
  constructor() {
21
23
  const nodeVersions = {
22
- 1: new ServiceTitanV1_node_1.ServiceTitanV1(baseDescription),
23
- 2: new ServiceTitanV2_node_1.ServiceTitanV2(baseDescription),
24
+ 1: (0, createNode_1.createActionNode)(baseDescription, v1_1.v1),
25
+ 2: (0, createNode_1.createActionNode)(baseDescription, v2_1.v2),
26
+ 3: (0, createNode_1.createActionNode)(baseDescription, v3_1.v3),
24
27
  };
25
28
  super(nodeVersions, baseDescription);
26
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ServiceTitan.node.js","sourceRoot":"","sources":["../../../nodes/ServiceTitan/ServiceTitan.node.ts"],"names":[],"mappings":";;;AAAA,+CAIsB;AACtB,kEAA0D;AAC1D,kEAA0D;AAE1D,MAAM,eAAe,GAA6B;IAC9C,WAAW,EAAE,0BAA0B;IACvC,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,CAAC,WAAW,CAAC;IACpB,IAAI,EAAE;QACF,KAAK,EAAE,uBAAuB;QAC9B,IAAI,EAAE,4BAA4B;KACrC;IACD,QAAQ,EAAE,8DAA8D;IACxE,WAAW,EACP,sHAAsH;IAC1H,cAAc,EAAE,CAAC;CACpB,CAAC;AAEF,MAAa,YAAa,SAAQ,gCAAiB;IAC/C;QACI,MAAM,YAAY,GAAuC;YACrD,CAAC,EAAE,IAAI,oCAAc,CAAC,eAAe,CAAC;YACtC,CAAC,EAAE,IAAI,oCAAc,CAAC,eAAe,CAAC;SACzC,CAAC;QAEF,KAAK,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC;IACzC,CAAC;CACJ;AATD,oCASC"}
1
+ {"version":3,"file":"ServiceTitan.node.js","sourceRoot":"","sources":["../../../nodes/ServiceTitan/ServiceTitan.node.ts"],"names":[],"mappings":";;;AAAA,+CAIsB;AACtB,kDAAqD;AACrD,6BAA0B;AAC1B,6BAA0B;AAC1B,6BAA0B;AAE1B,MAAM,eAAe,GAA6B;IAC9C,WAAW,EAAE,0BAA0B;IACvC,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,CAAC,WAAW,CAAC;IACpB,IAAI,EAAE;QACF,KAAK,EAAE,uBAAuB;QAC9B,IAAI,EAAE,4BAA4B;KACrC;IACD,QAAQ,EAAE,8DAA8D;IACxE,WAAW,EACP,sHAAsH;IAC1H,cAAc,EAAE,CAAC;CACpB,CAAC;AAEF,MAAa,YAAa,SAAQ,gCAAiB;IAC/C;QACI,MAAM,YAAY,GAAuC;YACrD,CAAC,EAAE,IAAA,6BAAgB,EAAC,eAAe,EAAE,OAAE,CAAC;YACxC,CAAC,EAAE,IAAA,6BAAgB,EAAC,eAAe,EAAE,OAAE,CAAC;YACxC,CAAC,EAAE,IAAA,6BAAgB,EAAC,eAAe,EAAE,OAAE,CAAC;SAC3C,CAAC;QAEF,KAAK,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC;IACzC,CAAC;CACJ;AAVD,oCAUC"}
@@ -2,7 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ServiceTitanTrigger = void 0;
4
4
  const n8n_workflow_1 = require("n8n-workflow");
5
- const ServiceTitanTriggerV1_node_1 = require("./v1/ServiceTitanTriggerV1.node");
5
+ const createNode_1 = require("./core/createNode");
6
+ const v1_1 = require("./v1");
6
7
  const triggerBaseDescription = {
7
8
  displayName: "ServiceTitan Trigger",
8
9
  name: "serviceTitanTrigger",
@@ -18,7 +19,7 @@ const triggerBaseDescription = {
18
19
  class ServiceTitanTrigger extends n8n_workflow_1.VersionedNodeType {
19
20
  constructor() {
20
21
  const nodeVersions = {
21
- 1: new ServiceTitanTriggerV1_node_1.ServiceTitanTriggerV1(triggerBaseDescription),
22
+ 1: (0, createNode_1.createTriggerNode)(triggerBaseDescription, v1_1.v1),
22
23
  };
23
24
  super(nodeVersions, triggerBaseDescription);
24
25
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ServiceTitanTrigger.node.js","sourceRoot":"","sources":["../../../nodes/ServiceTitan/ServiceTitanTrigger.node.ts"],"names":[],"mappings":";;;AAAA,+CAIsB;AACtB,gFAAwE;AAExE,MAAM,sBAAsB,GAA6B;IACrD,WAAW,EAAE,sBAAsB;IACnC,IAAI,EAAE,qBAAqB;IAC3B,KAAK,EAAE,CAAC,SAAS,CAAC;IAClB,IAAI,EAAE;QACF,KAAK,EAAE,uBAAuB;QAC9B,IAAI,EAAE,4BAA4B;KACrC;IACD,QAAQ,EAAE,8DAA8D;IACxE,WAAW,EAAE,0CAA0C;IACvD,cAAc,EAAE,CAAC;CACpB,CAAC;AAEF,MAAa,mBAAoB,SAAQ,gCAAiB;IACtD;QACI,MAAM,YAAY,GAAuC;YACrD,CAAC,EAAE,IAAI,kDAAqB,CAAC,sBAAsB,CAAC;SACvD,CAAC;QAEF,KAAK,CAAC,YAAY,EAAE,sBAAsB,CAAC,CAAC;IAChD,CAAC;CACJ;AARD,kDAQC"}
1
+ {"version":3,"file":"ServiceTitanTrigger.node.js","sourceRoot":"","sources":["../../../nodes/ServiceTitan/ServiceTitanTrigger.node.ts"],"names":[],"mappings":";;;AAAA,+CAIsB;AACtB,kDAAsD;AACtD,6BAA0B;AAE1B,MAAM,sBAAsB,GAA6B;IACrD,WAAW,EAAE,sBAAsB;IACnC,IAAI,EAAE,qBAAqB;IAC3B,KAAK,EAAE,CAAC,SAAS,CAAC;IAClB,IAAI,EAAE;QACF,KAAK,EAAE,uBAAuB;QAC9B,IAAI,EAAE,4BAA4B;KACrC;IACD,QAAQ,EAAE,8DAA8D;IACxE,WAAW,EAAE,0CAA0C;IACvD,cAAc,EAAE,CAAC;CACpB,CAAC;AAEF,MAAa,mBAAoB,SAAQ,gCAAiB;IACtD;QACI,MAAM,YAAY,GAAuC;YACrD,CAAC,EAAE,IAAA,8BAAiB,EAAC,sBAAsB,EAAE,OAAE,CAAC;SACnD,CAAC;QAEF,KAAK,CAAC,YAAY,EAAE,sBAAsB,CAAC,CAAC;IAChD,CAAC;CACJ;AARD,kDAQC"}
@@ -0,0 +1,4 @@
1
+ import type { INodeType, INodeTypeBaseDescription } from "n8n-workflow";
2
+ import { type VersionConfig } from "./description";
3
+ export declare function createActionNode(base: INodeTypeBaseDescription, config: VersionConfig): INodeType;
4
+ export declare function createTriggerNode(base: INodeTypeBaseDescription, config: VersionConfig): INodeType;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createActionNode = createActionNode;
4
+ exports.createTriggerNode = createTriggerNode;
5
+ /* eslint-disable @n8n/community-nodes/no-restricted-imports --
6
+ * This is the best solution to share core functionality across integrations
7
+ */
8
+ const n8n_nodes_core_1 = require("@thegraphitelab/n8n-nodes-core");
9
+ const description_1 = require("./description");
10
+ const methods_1 = require("./methods");
11
+ const transport_1 = require("./transport");
12
+ // n8n calls execute/poll with `this` bound to its own context, not to the node,
13
+ // so the manifest must be closed over here rather than read from `this`.
14
+ function createActionNode(base, config) {
15
+ return {
16
+ description: { ...base, ...(0, description_1.actionDescription)(config) },
17
+ async execute() {
18
+ return await (0, n8n_nodes_core_1.router)(this, config.manifest, transport_1.serviceTitanTransport);
19
+ },
20
+ };
21
+ }
22
+ function createTriggerNode(base, config) {
23
+ return {
24
+ description: { ...base, ...(0, description_1.triggerDescription)(config) },
25
+ methods: methods_1.serviceTitanMethods,
26
+ async poll() {
27
+ return (0, n8n_nodes_core_1.pollRouter)(this, config.manifest, transport_1.serviceTitanTransport);
28
+ },
29
+ };
30
+ }
31
+ //# sourceMappingURL=createNode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createNode.js","sourceRoot":"","sources":["../../../../nodes/ServiceTitan/core/createNode.ts"],"names":[],"mappings":";;AAqBA,4CAUC;AAED,8CAaC;AA9CD;;GAEG;AACH,mEAAoE;AAQpE,+CAIuB;AACvB,uCAAgD;AAChD,2CAAoD;AAEpD,gFAAgF;AAChF,yEAAyE;AACzE,SAAgB,gBAAgB,CAC5B,IAA8B,EAC9B,MAAqB;IAErB,OAAO;QACH,WAAW,EAAE,EAAE,GAAG,IAAI,EAAE,GAAG,IAAA,+BAAiB,EAAC,MAAM,CAAC,EAAE;QACtD,KAAK,CAAC,OAAO;YACT,OAAO,MAAM,IAAA,uBAAM,EAAC,IAAI,EAAE,MAAM,CAAC,QAAQ,EAAE,iCAAqB,CAAC,CAAC;QACtE,CAAC;KACJ,CAAC;AACN,CAAC;AAED,SAAgB,iBAAiB,CAC7B,IAA8B,EAC9B,MAAqB;IAErB,OAAO;QACH,WAAW,EAAE,EAAE,GAAG,IAAI,EAAE,GAAG,IAAA,gCAAkB,EAAC,MAAM,CAAC,EAAE;QACvD,OAAO,EAAE,6BAAmB;QAC5B,KAAK,CAAC,IAAI;YAGN,OAAO,IAAA,2BAAU,EAAC,IAAI,EAAE,MAAM,CAAC,QAAQ,EAAE,iCAAqB,CAAC,CAAC;QACpE,CAAC;KACJ,CAAC;AACN,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { IntegrationManifest } from "@thegraphitelab/n8n-nodes-core";
2
+ import { type INodeTypeDescription } from "n8n-workflow";
3
+ export interface VersionConfig {
4
+ version: number;
5
+ manifest: IntegrationManifest;
6
+ }
7
+ export declare function actionDescription({ version, manifest, }: VersionConfig): INodeTypeDescription;
8
+ export declare function triggerDescription({ version, manifest, }: VersionConfig): INodeTypeDescription;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.actionDescription = actionDescription;
4
+ exports.triggerDescription = triggerDescription;
5
+ /* eslint-disable n8n-nodes-base/node-filename-against-convention */
6
+ /* eslint-disable @n8n/community-nodes/no-restricted-imports --
7
+ * This is the best solution to share core functionality across integrations
8
+ */
9
+ const n8n_nodes_core_1 = require("@thegraphitelab/n8n-nodes-core");
10
+ const n8n_workflow_1 = require("n8n-workflow");
11
+ const transport_1 = require("./transport");
12
+ const icon = {
13
+ light: "file:servicetitan.svg",
14
+ dark: "file:servicetitan.dark.svg",
15
+ };
16
+ function actionDescription({ version, manifest, }) {
17
+ return {
18
+ displayName: "ServiceTitan",
19
+ name: "serviceTitan",
20
+ icon,
21
+ group: ["transform"],
22
+ version,
23
+ subtitle: '={{$parameter["operation"] || $parameter["event"]}}: {{$parameter["resource"]}}',
24
+ description: "Interact with the ServiceTitan API",
25
+ defaults: { name: "ServiceTitan" },
26
+ usableAsTool: true,
27
+ inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
28
+ outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
29
+ credentials: [{ name: "serviceTitanApi", required: true }],
30
+ requestDefaults: {
31
+ baseURL: '=https://{{$credentials.environment === "production" ? "api.servicetitan.io" : "api-integration.servicetitan.io"}}',
32
+ headers: {
33
+ "Content-Type": "application/json",
34
+ Accept: "application/json",
35
+ },
36
+ },
37
+ properties: (0, n8n_nodes_core_1.getActionProperties)(manifest, transport_1.serviceTitanTransport, "customer"),
38
+ };
39
+ }
40
+ function triggerDescription({ version, manifest, }) {
41
+ return {
42
+ displayName: "ServiceTitan Trigger",
43
+ name: "serviceTitanTrigger",
44
+ icon,
45
+ group: ["trigger"],
46
+ version,
47
+ description: "Interact with ServiceTitan or start workflows on ServiceTitan events",
48
+ subtitle: '={{$parameter["operation"] || $parameter["event"]}}: {{$parameter["resource"]}}',
49
+ defaults: { name: "ServiceTitan Trigger" },
50
+ polling: true,
51
+ usableAsTool: true,
52
+ inputs: [],
53
+ outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
54
+ credentials: [{ name: "serviceTitanApi", required: true }],
55
+ properties: (0, n8n_nodes_core_1.getTriggerProperties)(manifest, transport_1.serviceTitanTransport, "customer"),
56
+ };
57
+ }
58
+ //# sourceMappingURL=description.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"description.js","sourceRoot":"","sources":["../../../../nodes/ServiceTitan/core/description.ts"],"names":[],"mappings":";;AAuBA,8CAgCC;AAED,gDA0BC;AAnFD,oEAAoE;AACpE;;GAEG;AACH,mEAGwC;AAExC,+CAA8E;AAC9E,2CAAoD;AAQpD,MAAM,IAAI,GAAG;IACT,KAAK,EAAE,uBAAuB;IAC9B,IAAI,EAAE,4BAA4B;CAC5B,CAAC;AAEX,SAAgB,iBAAiB,CAAC,EAC9B,OAAO,EACP,QAAQ,GACI;IACZ,OAAO;QACH,WAAW,EAAE,cAAc;QAC3B,IAAI,EAAE,cAAc;QACpB,IAAI;QACJ,KAAK,EAAE,CAAC,WAAW,CAAC;QACpB,OAAO;QACP,QAAQ,EACJ,iFAAiF;QACrF,WAAW,EAAE,oCAAoC;QACjD,QAAQ,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE;QAClC,YAAY,EAAE,IAAI;QAClB,MAAM,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;QAClC,OAAO,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;QACnC,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QAC1D,eAAe,EAAE;YACb,OAAO,EACH,oHAAoH;YACxH,OAAO,EAAE;gBACL,cAAc,EAAE,kBAAkB;gBAClC,MAAM,EAAE,kBAAkB;aAC7B;SACJ;QACD,UAAU,EAAE,IAAA,oCAAmB,EAC3B,QAAQ,EACR,iCAAqB,EACrB,UAAU,CACb;KACJ,CAAC;AACN,CAAC;AAED,SAAgB,kBAAkB,CAAC,EAC/B,OAAO,EACP,QAAQ,GACI;IACZ,OAAO;QACH,WAAW,EAAE,sBAAsB;QACnC,IAAI,EAAE,qBAAqB;QAC3B,IAAI;QACJ,KAAK,EAAE,CAAC,SAAS,CAAC;QAClB,OAAO;QACP,WAAW,EACP,sEAAsE;QAC1E,QAAQ,EACJ,iFAAiF;QACrF,QAAQ,EAAE,EAAE,IAAI,EAAE,sBAAsB,EAAE;QAC1C,OAAO,EAAE,IAAI;QACb,YAAY,EAAE,IAAI;QAClB,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;QACnC,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;QAC1D,UAAU,EAAE,IAAA,qCAAoB,EAC5B,QAAQ,EACR,iCAAqB,EACrB,UAAU,CACb;KACJ,CAAC;AACN,CAAC"}
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.serviceTitanMethods = void 0;
4
- const transport_1 = require("../settings/transport");
4
+ const transport_1 = require("./transport");
5
5
  exports.serviceTitanMethods = {
6
6
  loadOptions: {
7
7
  async getBusinessUnits() {
8
8
  const credentials = await this.getCredentials("serviceTitanApi");
9
9
  const tenantId = credentials.tenantId;
10
- const response = (await transport_1.serviceTitanV2Transport.request(this, "GET", `/settings/v2/tenant/${tenantId}/business-units`, { pageSize: 200, active: true }));
10
+ const response = (await transport_1.serviceTitanTransport.request(this, "GET", `/settings/v2/tenant/${tenantId}/business-units`, { pageSize: 200, active: true }));
11
11
  const rows = Array.isArray(response.data) ? response.data : [];
12
12
  return rows
13
13
  .map((bu) => ({
@@ -0,0 +1 @@
1
+ {"version":3,"file":"methods.js","sourceRoot":"","sources":["../../../../nodes/ServiceTitan/core/methods.ts"],"names":[],"mappings":";;;AAKA,2CAAoD;AAUvC,QAAA,mBAAmB,GAAG;IAC/B,WAAW,EAAE;QACT,KAAK,CAAC,gBAAgB;YAGlB,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;YACjE,MAAM,QAAQ,GAAG,WAAW,CAAC,QAAkB,CAAC;YAEhD,MAAM,QAAQ,GAAG,CAAC,MAAM,iCAAqB,CAAC,OAAO,CACjD,IAAI,EACJ,KAAK,EACL,uBAAuB,QAAQ,iBAAiB,EAChD,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,CAClC,CAAgC,CAAC;YAElC,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;YAC/D,OAAO,IAAI;iBACN,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;gBACV,IAAI,EAAG,EAAE,CAAC,IAAe,IAAI,iBAAiB,EAAE,CAAC,EAAE,EAAE;gBACrD,KAAK,EAAE,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC;aACvB,CAAC,CAAC;iBACF,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QACtD,CAAC;KACJ;CACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { TransportConfig } from "@thegraphitelab/n8n-nodes-core";
2
+ export declare const serviceTitanTransportConfig: TransportConfig;
3
+ export declare const serviceTitanTransport: import("@thegraphitelab/n8n-nodes-core/dist/transport/createTransport").Transport;
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.serviceTitanV2Transport = exports.serviceTitanV2TransportConfig = void 0;
3
+ exports.serviceTitanTransport = exports.serviceTitanTransportConfig = void 0;
4
4
  /* eslint-disable @n8n/community-nodes/no-restricted-imports --
5
5
  * This is the best solution to share core functionality across integrations
6
6
  */
7
7
  const n8n_nodes_core_1 = require("@thegraphitelab/n8n-nodes-core");
8
- const ServiceTitanApi_credentials_1 = require("../../../../credentials/ServiceTitanApi.credentials");
8
+ const ServiceTitanApi_credentials_1 = require("../../../credentials/ServiceTitanApi.credentials");
9
9
  // The ServiceTitan business logic the generic transport reads.
10
- exports.serviceTitanV2TransportConfig = {
10
+ exports.serviceTitanTransportConfig = {
11
11
  credentialKey: "serviceTitanApi",
12
12
  // Fills the `{tenant}` placeholder in generated paths from the credential.
13
13
  pathContext: (credentials) => ({
@@ -27,5 +27,5 @@ exports.serviceTitanV2TransportConfig = {
27
27
  };
28
28
  // The ServiceTitan transport: the generic engine bound to ST's config. Factories
29
29
  // and node methods consume this injected Transport (no per-call `this` wrappers).
30
- exports.serviceTitanV2Transport = (0, n8n_nodes_core_1.createTransport)(exports.serviceTitanV2TransportConfig);
30
+ exports.serviceTitanTransport = (0, n8n_nodes_core_1.createTransport)(exports.serviceTitanTransportConfig);
31
31
  //# sourceMappingURL=transport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transport.js","sourceRoot":"","sources":["../../../../nodes/ServiceTitan/core/transport.ts"],"names":[],"mappings":";;;AACA;;GAEG;AACH,mEAAiE;AAGjE,kGAA8E;AAU9E,+DAA+D;AAClD,QAAA,2BAA2B,GAAoB;IACxD,aAAa,EAAE,iBAAiB;IAChC,2EAA2E;IAC3E,WAAW,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;QAC3B,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC;KACvC,CAAC;IACF,OAAO,EAAE,CAAC,WAAW,EAAE,EAAE,CACrB,WAAW,IAAA,wCAAU,EAAE,WAAW,CAAC,WAAsB,IAAI,aAAa,CAAC,EAAE;IACjF,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE;QAClB,MAAM,IAAI,GAAI,QAAwC,CAAC,IAAI,CAAC;QAC5D,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3C,CAAC;IACD,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,OAAO,CAAE,QAAkC,CAAC,OAAO,CAAC;IAC3E,SAAS,EAAE,MAAM;IACjB,QAAQ,EAAE,EAAE;IACZ,WAAW,EAAE,MAAM;IACnB,UAAU,EAAE,CAAC,QAAQ,EAAE,EAAE,CACpB,QAAsC,CAAC,YAAY;IACxD,mBAAmB,EAAE,CAAC;CACzB,CAAC;AAEF,iFAAiF;AACjF,kFAAkF;AACrE,QAAA,qBAAqB,GAAG,IAAA,gCAAe,EAChD,mCAA2B,CAC9B,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { VersionConfig } from "../core/description";
2
+ export declare const v1: VersionConfig;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.v1 = void 0;
4
+ const manifests_1 = require("./generated/manifests");
5
+ // FROZEN: every v1 node instance resolves through this manifest. Do not
6
+ // regenerate over v1/generated/manifests.ts. A breaking change gets a new
7
+ // vN/ directory.
8
+ exports.v1 = {
9
+ version: 1,
10
+ manifest: manifests_1.manifests,
11
+ };
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../nodes/ServiceTitan/v1/index.ts"],"names":[],"mappings":";;;AAKA,qDAAkD;AAElD,wEAAwE;AACxE,0EAA0E;AAC1E,iBAAiB;AACJ,QAAA,EAAE,GAAkB;IAC7B,OAAO,EAAE,CAAC;IACV,QAAQ,EAAE,qBAAgC;CAC7C,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { VersionConfig } from "../core/description";
2
+ export declare const v2: VersionConfig;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.v2 = void 0;
4
+ const manifests_1 = require("./generated/manifests");
5
+ // FROZEN: every v2 node instance resolves through this manifest. Do not
6
+ // regenerate over v2/generated/manifests.ts. A breaking change gets a new
7
+ // vN/ directory.
8
+ exports.v2 = {
9
+ version: 2,
10
+ manifest: manifests_1.manifests,
11
+ };
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../nodes/ServiceTitan/v2/index.ts"],"names":[],"mappings":";;;AAKA,qDAAkD;AAElD,wEAAwE;AACxE,0EAA0E;AAC1E,iBAAiB;AACJ,QAAA,EAAE,GAAkB;IAC7B,OAAO,EAAE,CAAC;IACV,QAAQ,EAAE,qBAAgC;CAC7C,CAAC"}