@nightsquawktech/gohighlevel-mcp-server 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.
Files changed (108) hide show
  1. package/COMMERCIAL.md +35 -0
  2. package/LICENSE +661 -0
  3. package/README.md +172 -0
  4. package/dist/constants.d.ts +14 -0
  5. package/dist/constants.d.ts.map +1 -0
  6. package/dist/constants.js +14 -0
  7. package/dist/constants.js.map +1 -0
  8. package/dist/index.d.ts +3 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.js +24 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/schemas/calendars.d.ts +185 -0
  13. package/dist/schemas/calendars.d.ts.map +1 -0
  14. package/dist/schemas/calendars.js +74 -0
  15. package/dist/schemas/calendars.js.map +1 -0
  16. package/dist/schemas/common.d.ts +10 -0
  17. package/dist/schemas/common.d.ts.map +1 -0
  18. package/dist/schemas/common.js +33 -0
  19. package/dist/schemas/common.js.map +1 -0
  20. package/dist/schemas/contacts.d.ts +401 -0
  21. package/dist/schemas/contacts.d.ts.map +1 -0
  22. package/dist/schemas/contacts.js +132 -0
  23. package/dist/schemas/contacts.js.map +1 -0
  24. package/dist/schemas/conversations.d.ts +89 -0
  25. package/dist/schemas/conversations.d.ts.map +1 -0
  26. package/dist/schemas/conversations.js +39 -0
  27. package/dist/schemas/conversations.js.map +1 -0
  28. package/dist/schemas/custom-fields.d.ts +360 -0
  29. package/dist/schemas/custom-fields.d.ts.map +1 -0
  30. package/dist/schemas/custom-fields.js +154 -0
  31. package/dist/schemas/custom-fields.js.map +1 -0
  32. package/dist/schemas/custom-values.d.ts +87 -0
  33. package/dist/schemas/custom-values.d.ts.map +1 -0
  34. package/dist/schemas/custom-values.js +43 -0
  35. package/dist/schemas/custom-values.js.map +1 -0
  36. package/dist/schemas/locations.d.ts +30 -0
  37. package/dist/schemas/locations.d.ts.map +1 -0
  38. package/dist/schemas/locations.js +17 -0
  39. package/dist/schemas/locations.js.map +1 -0
  40. package/dist/schemas/opportunities.d.ts +196 -0
  41. package/dist/schemas/opportunities.d.ts.map +1 -0
  42. package/dist/schemas/opportunities.js +83 -0
  43. package/dist/schemas/opportunities.js.map +1 -0
  44. package/dist/schemas/tags.d.ts +81 -0
  45. package/dist/schemas/tags.d.ts.map +1 -0
  46. package/dist/schemas/tags.js +41 -0
  47. package/dist/schemas/tags.js.map +1 -0
  48. package/dist/services/config.d.ts +3 -0
  49. package/dist/services/config.d.ts.map +1 -0
  50. package/dist/services/config.js +26 -0
  51. package/dist/services/config.js.map +1 -0
  52. package/dist/services/errors.d.ts +2 -0
  53. package/dist/services/errors.d.ts.map +1 -0
  54. package/dist/services/errors.js +47 -0
  55. package/dist/services/errors.js.map +1 -0
  56. package/dist/services/gohighlevel-client.d.ts +13 -0
  57. package/dist/services/gohighlevel-client.d.ts.map +1 -0
  58. package/dist/services/gohighlevel-client.js +42 -0
  59. package/dist/services/gohighlevel-client.js.map +1 -0
  60. package/dist/tools/calendars.d.ts +4 -0
  61. package/dist/tools/calendars.d.ts.map +1 -0
  62. package/dist/tools/calendars.js +163 -0
  63. package/dist/tools/calendars.js.map +1 -0
  64. package/dist/tools/contacts.d.ts +4 -0
  65. package/dist/tools/contacts.d.ts.map +1 -0
  66. package/dist/tools/contacts.js +492 -0
  67. package/dist/tools/contacts.js.map +1 -0
  68. package/dist/tools/conversations.d.ts +4 -0
  69. package/dist/tools/conversations.d.ts.map +1 -0
  70. package/dist/tools/conversations.js +76 -0
  71. package/dist/tools/conversations.js.map +1 -0
  72. package/dist/tools/custom-fields.d.ts +4 -0
  73. package/dist/tools/custom-fields.d.ts.map +1 -0
  74. package/dist/tools/custom-fields.js +337 -0
  75. package/dist/tools/custom-fields.js.map +1 -0
  76. package/dist/tools/custom-values.d.ts +4 -0
  77. package/dist/tools/custom-values.d.ts.map +1 -0
  78. package/dist/tools/custom-values.js +121 -0
  79. package/dist/tools/custom-values.js.map +1 -0
  80. package/dist/tools/format.d.ts +9 -0
  81. package/dist/tools/format.d.ts.map +1 -0
  82. package/dist/tools/format.js +49 -0
  83. package/dist/tools/format.js.map +1 -0
  84. package/dist/tools/index.d.ts +4 -0
  85. package/dist/tools/index.d.ts.map +1 -0
  86. package/dist/tools/index.js +19 -0
  87. package/dist/tools/index.js.map +1 -0
  88. package/dist/tools/locations.d.ts +4 -0
  89. package/dist/tools/locations.d.ts.map +1 -0
  90. package/dist/tools/locations.js +43 -0
  91. package/dist/tools/locations.js.map +1 -0
  92. package/dist/tools/opportunities.d.ts +4 -0
  93. package/dist/tools/opportunities.d.ts.map +1 -0
  94. package/dist/tools/opportunities.js +182 -0
  95. package/dist/tools/opportunities.js.map +1 -0
  96. package/dist/tools/read-tools.d.ts +22 -0
  97. package/dist/tools/read-tools.d.ts.map +1 -0
  98. package/dist/tools/read-tools.js +68 -0
  99. package/dist/tools/read-tools.js.map +1 -0
  100. package/dist/tools/tags.d.ts +4 -0
  101. package/dist/tools/tags.d.ts.map +1 -0
  102. package/dist/tools/tags.js +113 -0
  103. package/dist/tools/tags.js.map +1 -0
  104. package/dist/types.d.ts +28 -0
  105. package/dist/types.d.ts.map +1 -0
  106. package/dist/types.js +2 -0
  107. package/dist/types.js.map +1 -0
  108. package/package.json +47 -0
@@ -0,0 +1,43 @@
1
+ import { z } from "zod";
2
+ import { ConfirmSchema, IdSchema, LimitSchema, LocationIdSchema, OffsetSchema, ResponseFormatSchema } from "./common.js";
3
+ export const ListCustomValuesSchema = z
4
+ .object({
5
+ location_id: LocationIdSchema,
6
+ limit: LimitSchema,
7
+ offset: OffsetSchema,
8
+ response_format: ResponseFormatSchema
9
+ })
10
+ .strict();
11
+ export const GetCustomValueSchema = z
12
+ .object({
13
+ location_id: LocationIdSchema,
14
+ custom_value_id: IdSchema.describe("Custom value ID."),
15
+ response_format: ResponseFormatSchema
16
+ })
17
+ .strict();
18
+ export const CreateCustomValueSchema = z
19
+ .object({
20
+ location_id: LocationIdSchema,
21
+ name: z.string().min(1).describe("Custom value name."),
22
+ value: z.string().describe("Custom value content."),
23
+ response_format: ResponseFormatSchema
24
+ })
25
+ .strict();
26
+ export const UpdateCustomValueSchema = z
27
+ .object({
28
+ location_id: LocationIdSchema,
29
+ custom_value_id: IdSchema.describe("Custom value ID."),
30
+ name: z.string().min(1).optional(),
31
+ value: z.string().optional(),
32
+ response_format: ResponseFormatSchema
33
+ })
34
+ .strict();
35
+ export const DeleteCustomValueSchema = z
36
+ .object({
37
+ location_id: LocationIdSchema,
38
+ custom_value_id: IdSchema.describe("Custom value ID."),
39
+ confirm: ConfirmSchema,
40
+ response_format: ResponseFormatSchema
41
+ })
42
+ .strict();
43
+ //# sourceMappingURL=custom-values.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-values.js","sourceRoot":"","sources":["../../src/schemas/custom-values.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEzH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC;KACpC,MAAM,CAAC;IACN,WAAW,EAAE,gBAAgB;IAC7B,KAAK,EAAE,WAAW;IAClB,MAAM,EAAE,YAAY;IACpB,eAAe,EAAE,oBAAoB;CACtC,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC;KAClC,MAAM,CAAC;IACN,WAAW,EAAE,gBAAgB;IAC7B,eAAe,EAAE,QAAQ,CAAC,QAAQ,CAAC,kBAAkB,CAAC;IACtD,eAAe,EAAE,oBAAoB;CACtC,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC;KACrC,MAAM,CAAC;IACN,WAAW,EAAE,gBAAgB;IAC7B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,oBAAoB,CAAC;IACtD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC;IACnD,eAAe,EAAE,oBAAoB;CACtC,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC;KACrC,MAAM,CAAC;IACN,WAAW,EAAE,gBAAgB;IAC7B,eAAe,EAAE,QAAQ,CAAC,QAAQ,CAAC,kBAAkB,CAAC;IACtD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAClC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,eAAe,EAAE,oBAAoB;CACtC,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC;KACrC,MAAM,CAAC;IACN,WAAW,EAAE,gBAAgB;IAC7B,eAAe,EAAE,QAAQ,CAAC,QAAQ,CAAC,kBAAkB,CAAC;IACtD,OAAO,EAAE,aAAa;IACtB,eAAe,EAAE,oBAAoB;CACtC,CAAC;KACD,MAAM,EAAE,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { z } from "zod";
2
+ export declare const GetLocationSchema: z.ZodObject<{
3
+ location_id: z.ZodOptional<z.ZodString>;
4
+ response_format: z.ZodDefault<z.ZodEnum<["markdown", "json"]>>;
5
+ }, "strict", z.ZodTypeAny, {
6
+ response_format: "markdown" | "json";
7
+ location_id?: string | undefined;
8
+ }, {
9
+ location_id?: string | undefined;
10
+ response_format?: "markdown" | "json" | undefined;
11
+ }>;
12
+ export declare const ListUsersSchema: z.ZodObject<{
13
+ location_id: z.ZodOptional<z.ZodString>;
14
+ limit: z.ZodDefault<z.ZodNumber>;
15
+ offset: z.ZodDefault<z.ZodNumber>;
16
+ response_format: z.ZodDefault<z.ZodEnum<["markdown", "json"]>>;
17
+ }, "strict", z.ZodTypeAny, {
18
+ offset: number;
19
+ limit: number;
20
+ response_format: "markdown" | "json";
21
+ location_id?: string | undefined;
22
+ }, {
23
+ offset?: number | undefined;
24
+ location_id?: string | undefined;
25
+ limit?: number | undefined;
26
+ response_format?: "markdown" | "json" | undefined;
27
+ }>;
28
+ export type GetLocationInput = z.infer<typeof GetLocationSchema>;
29
+ export type ListUsersInput = z.infer<typeof ListUsersSchema>;
30
+ //# sourceMappingURL=locations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locations.d.ts","sourceRoot":"","sources":["../../src/schemas/locations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,iBAAiB;;;;;;;;;EAKnB,CAAC;AAEZ,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;EAOjB,CAAC;AAEZ,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AACjE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { z } from "zod";
2
+ import { LimitSchema, LocationIdSchema, OffsetSchema, ResponseFormatSchema } from "./common.js";
3
+ export const GetLocationSchema = z
4
+ .object({
5
+ location_id: LocationIdSchema,
6
+ response_format: ResponseFormatSchema
7
+ })
8
+ .strict();
9
+ export const ListUsersSchema = z
10
+ .object({
11
+ location_id: LocationIdSchema,
12
+ limit: LimitSchema,
13
+ offset: OffsetSchema,
14
+ response_format: ResponseFormatSchema
15
+ })
16
+ .strict();
17
+ //# sourceMappingURL=locations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locations.js","sourceRoot":"","sources":["../../src/schemas/locations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEhG,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC;KAC/B,MAAM,CAAC;IACN,WAAW,EAAE,gBAAgB;IAC7B,eAAe,EAAE,oBAAoB;CACtC,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC;KAC7B,MAAM,CAAC;IACN,WAAW,EAAE,gBAAgB;IAC7B,KAAK,EAAE,WAAW;IAClB,MAAM,EAAE,YAAY;IACpB,eAAe,EAAE,oBAAoB;CACtC,CAAC;KACD,MAAM,EAAE,CAAC"}
@@ -0,0 +1,196 @@
1
+ import { z } from "zod";
2
+ export declare const SearchOpportunitiesSchema: z.ZodObject<{
3
+ location_id: z.ZodOptional<z.ZodString>;
4
+ q: z.ZodOptional<z.ZodString>;
5
+ pipeline_id: z.ZodOptional<z.ZodString>;
6
+ pipeline_stage_id: z.ZodOptional<z.ZodString>;
7
+ status: z.ZodOptional<z.ZodString>;
8
+ assigned_to: z.ZodOptional<z.ZodString>;
9
+ campaignId: z.ZodOptional<z.ZodString>;
10
+ id: z.ZodOptional<z.ZodString>;
11
+ order: z.ZodOptional<z.ZodString>;
12
+ endDate: z.ZodOptional<z.ZodString>;
13
+ startAfter: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
14
+ startAfterId: z.ZodOptional<z.ZodString>;
15
+ date: z.ZodOptional<z.ZodString>;
16
+ country: z.ZodOptional<z.ZodString>;
17
+ server_limit: z.ZodDefault<z.ZodNumber>;
18
+ page: z.ZodOptional<z.ZodNumber>;
19
+ limit: z.ZodDefault<z.ZodNumber>;
20
+ offset: z.ZodDefault<z.ZodNumber>;
21
+ response_format: z.ZodDefault<z.ZodEnum<["markdown", "json"]>>;
22
+ }, "strict", z.ZodTypeAny, {
23
+ offset: number;
24
+ limit: number;
25
+ response_format: "markdown" | "json";
26
+ server_limit: number;
27
+ status?: string | undefined;
28
+ location_id?: string | undefined;
29
+ endDate?: string | undefined;
30
+ date?: string | undefined;
31
+ id?: string | undefined;
32
+ country?: string | undefined;
33
+ startAfterId?: string | undefined;
34
+ q?: string | undefined;
35
+ pipeline_id?: string | undefined;
36
+ pipeline_stage_id?: string | undefined;
37
+ assigned_to?: string | undefined;
38
+ campaignId?: string | undefined;
39
+ order?: string | undefined;
40
+ startAfter?: string | number | undefined;
41
+ page?: number | undefined;
42
+ }, {
43
+ offset?: number | undefined;
44
+ status?: string | undefined;
45
+ location_id?: string | undefined;
46
+ limit?: number | undefined;
47
+ response_format?: "markdown" | "json" | undefined;
48
+ endDate?: string | undefined;
49
+ date?: string | undefined;
50
+ id?: string | undefined;
51
+ country?: string | undefined;
52
+ startAfterId?: string | undefined;
53
+ q?: string | undefined;
54
+ pipeline_id?: string | undefined;
55
+ pipeline_stage_id?: string | undefined;
56
+ assigned_to?: string | undefined;
57
+ campaignId?: string | undefined;
58
+ order?: string | undefined;
59
+ startAfter?: string | number | undefined;
60
+ server_limit?: number | undefined;
61
+ page?: number | undefined;
62
+ }>;
63
+ export declare const GetPipelinesSchema: z.ZodObject<{
64
+ location_id: z.ZodOptional<z.ZodString>;
65
+ limit: z.ZodDefault<z.ZodNumber>;
66
+ offset: z.ZodDefault<z.ZodNumber>;
67
+ response_format: z.ZodDefault<z.ZodEnum<["markdown", "json"]>>;
68
+ }, "strict", z.ZodTypeAny, {
69
+ offset: number;
70
+ limit: number;
71
+ response_format: "markdown" | "json";
72
+ location_id?: string | undefined;
73
+ }, {
74
+ offset?: number | undefined;
75
+ location_id?: string | undefined;
76
+ limit?: number | undefined;
77
+ response_format?: "markdown" | "json" | undefined;
78
+ }>;
79
+ export declare const OpportunityIdSchema: z.ZodObject<{
80
+ opportunity_id: z.ZodString;
81
+ response_format: z.ZodDefault<z.ZodEnum<["markdown", "json"]>>;
82
+ }, "strict", z.ZodTypeAny, {
83
+ response_format: "markdown" | "json";
84
+ opportunity_id: string;
85
+ }, {
86
+ opportunity_id: string;
87
+ response_format?: "markdown" | "json" | undefined;
88
+ }>;
89
+ export declare const CreateOpportunitySchema: z.ZodObject<{
90
+ name: z.ZodString;
91
+ contactId: z.ZodString;
92
+ pipelineId: z.ZodString;
93
+ pipelineStageId: z.ZodString;
94
+ response_format: z.ZodDefault<z.ZodEnum<["markdown", "json"]>>;
95
+ status: z.ZodOptional<z.ZodString>;
96
+ monetaryValue: z.ZodOptional<z.ZodNumber>;
97
+ assignedTo: z.ZodOptional<z.ZodString>;
98
+ source: z.ZodOptional<z.ZodString>;
99
+ extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
100
+ location_id: z.ZodOptional<z.ZodString>;
101
+ }, "strict", z.ZodTypeAny, {
102
+ response_format: "markdown" | "json";
103
+ contactId: string;
104
+ name: string;
105
+ pipelineId: string;
106
+ pipelineStageId: string;
107
+ status?: string | undefined;
108
+ location_id?: string | undefined;
109
+ extra?: Record<string, unknown> | undefined;
110
+ source?: string | undefined;
111
+ assignedTo?: string | undefined;
112
+ monetaryValue?: number | undefined;
113
+ }, {
114
+ contactId: string;
115
+ name: string;
116
+ pipelineId: string;
117
+ pipelineStageId: string;
118
+ status?: string | undefined;
119
+ location_id?: string | undefined;
120
+ response_format?: "markdown" | "json" | undefined;
121
+ extra?: Record<string, unknown> | undefined;
122
+ source?: string | undefined;
123
+ assignedTo?: string | undefined;
124
+ monetaryValue?: number | undefined;
125
+ }>;
126
+ export declare const UpdateOpportunitySchema: z.ZodObject<{
127
+ response_format: z.ZodDefault<z.ZodEnum<["markdown", "json"]>>;
128
+ name: z.ZodOptional<z.ZodString>;
129
+ contactId: z.ZodOptional<z.ZodString>;
130
+ pipelineId: z.ZodOptional<z.ZodString>;
131
+ pipelineStageId: z.ZodOptional<z.ZodString>;
132
+ status: z.ZodOptional<z.ZodString>;
133
+ monetaryValue: z.ZodOptional<z.ZodNumber>;
134
+ assignedTo: z.ZodOptional<z.ZodString>;
135
+ source: z.ZodOptional<z.ZodString>;
136
+ extra: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
137
+ opportunity_id: z.ZodString;
138
+ }, "strict", z.ZodTypeAny, {
139
+ response_format: "markdown" | "json";
140
+ opportunity_id: string;
141
+ status?: string | undefined;
142
+ contactId?: string | undefined;
143
+ extra?: Record<string, unknown> | undefined;
144
+ name?: string | undefined;
145
+ source?: string | undefined;
146
+ assignedTo?: string | undefined;
147
+ pipelineId?: string | undefined;
148
+ pipelineStageId?: string | undefined;
149
+ monetaryValue?: number | undefined;
150
+ }, {
151
+ opportunity_id: string;
152
+ status?: string | undefined;
153
+ response_format?: "markdown" | "json" | undefined;
154
+ contactId?: string | undefined;
155
+ extra?: Record<string, unknown> | undefined;
156
+ name?: string | undefined;
157
+ source?: string | undefined;
158
+ assignedTo?: string | undefined;
159
+ pipelineId?: string | undefined;
160
+ pipelineStageId?: string | undefined;
161
+ monetaryValue?: number | undefined;
162
+ }>;
163
+ export declare const UpdateOpportunityStatusSchema: z.ZodObject<{
164
+ opportunity_id: z.ZodString;
165
+ status: z.ZodString;
166
+ response_format: z.ZodDefault<z.ZodEnum<["markdown", "json"]>>;
167
+ }, "strict", z.ZodTypeAny, {
168
+ status: string;
169
+ response_format: "markdown" | "json";
170
+ opportunity_id: string;
171
+ }, {
172
+ status: string;
173
+ opportunity_id: string;
174
+ response_format?: "markdown" | "json" | undefined;
175
+ }>;
176
+ export declare const DeleteOpportunitySchema: z.ZodObject<{
177
+ opportunity_id: z.ZodString;
178
+ confirm: z.ZodBoolean;
179
+ response_format: z.ZodDefault<z.ZodEnum<["markdown", "json"]>>;
180
+ }, "strict", z.ZodTypeAny, {
181
+ response_format: "markdown" | "json";
182
+ confirm: boolean;
183
+ opportunity_id: string;
184
+ }, {
185
+ confirm: boolean;
186
+ opportunity_id: string;
187
+ response_format?: "markdown" | "json" | undefined;
188
+ }>;
189
+ export type SearchOpportunitiesInput = z.infer<typeof SearchOpportunitiesSchema>;
190
+ export type GetPipelinesInput = z.infer<typeof GetPipelinesSchema>;
191
+ export type OpportunityIdInput = z.infer<typeof OpportunityIdSchema>;
192
+ export type CreateOpportunityInput = z.infer<typeof CreateOpportunitySchema>;
193
+ export type UpdateOpportunityInput = z.infer<typeof UpdateOpportunitySchema>;
194
+ export type UpdateOpportunityStatusInput = z.infer<typeof UpdateOpportunityStatusSchema>;
195
+ export type DeleteOpportunityInput = z.infer<typeof DeleteOpportunitySchema>;
196
+ //# sourceMappingURL=opportunities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"opportunities.d.ts","sourceRoot":"","sources":["../../src/schemas/opportunities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAexB,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsB3B,CAAC;AAEZ,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;EAOpB,CAAC;AAEZ,eAAO,MAAM,mBAAmB;;;;;;;;;EAKrB,CAAC;AAEZ,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUzB,CAAC;AAEZ,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMzB,CAAC;AAEZ,eAAO,MAAM,6BAA6B;;;;;;;;;;;;EAM/B,CAAC;AAEZ,eAAO,MAAM,uBAAuB;;;;;;;;;;;;EAMzB,CAAC;AAEZ,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AACjF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACnE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACrE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC7E,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC7E,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AACzF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -0,0 +1,83 @@
1
+ import { z } from "zod";
2
+ import { ConfirmSchema, ExtraSchema, IdSchema, LimitSchema, LocationIdSchema, OffsetSchema, ResponseFormatSchema } from "./common.js";
3
+ const OpportunityBodyShape = {
4
+ name: z.string().min(1).optional(),
5
+ contactId: z.string().min(1).optional(),
6
+ pipelineId: z.string().min(1).optional(),
7
+ pipelineStageId: z.string().min(1).optional(),
8
+ status: z.string().min(1).optional(),
9
+ monetaryValue: z.number().optional(),
10
+ assignedTo: z.string().min(1).optional(),
11
+ source: z.string().min(1).optional(),
12
+ extra: ExtraSchema
13
+ };
14
+ export const SearchOpportunitiesSchema = z
15
+ .object({
16
+ location_id: LocationIdSchema,
17
+ q: z.string().optional(),
18
+ pipeline_id: z.string().min(1).optional(),
19
+ pipeline_stage_id: z.string().min(1).optional(),
20
+ status: z.string().min(1).optional(),
21
+ assigned_to: z.string().min(1).optional(),
22
+ campaignId: z.string().min(1).optional(),
23
+ id: z.string().min(1).optional(),
24
+ order: z.string().min(1).optional(),
25
+ endDate: z.string().min(1).optional(),
26
+ startAfter: z.union([z.string().min(1), z.number()]).optional(),
27
+ startAfterId: z.string().min(1).optional(),
28
+ date: z.string().min(1).optional(),
29
+ country: z.string().min(1).optional(),
30
+ server_limit: z.number().int().min(1).max(100).default(20).describe("GoHighLevel server-side limit query parameter."),
31
+ page: z.number().int().min(1).optional(),
32
+ limit: LimitSchema,
33
+ offset: OffsetSchema,
34
+ response_format: ResponseFormatSchema
35
+ })
36
+ .strict();
37
+ export const GetPipelinesSchema = z
38
+ .object({
39
+ location_id: LocationIdSchema,
40
+ limit: LimitSchema,
41
+ offset: OffsetSchema,
42
+ response_format: ResponseFormatSchema
43
+ })
44
+ .strict();
45
+ export const OpportunityIdSchema = z
46
+ .object({
47
+ opportunity_id: IdSchema.describe("Opportunity ID."),
48
+ response_format: ResponseFormatSchema
49
+ })
50
+ .strict();
51
+ export const CreateOpportunitySchema = z
52
+ .object({
53
+ location_id: LocationIdSchema,
54
+ ...OpportunityBodyShape,
55
+ name: z.string().min(1).describe("Opportunity name."),
56
+ contactId: z.string().min(1).describe("Contact ID."),
57
+ pipelineId: z.string().min(1).describe("Pipeline ID."),
58
+ pipelineStageId: z.string().min(1).describe("Pipeline stage ID."),
59
+ response_format: ResponseFormatSchema
60
+ })
61
+ .strict();
62
+ export const UpdateOpportunitySchema = z
63
+ .object({
64
+ opportunity_id: IdSchema.describe("Opportunity ID."),
65
+ ...OpportunityBodyShape,
66
+ response_format: ResponseFormatSchema
67
+ })
68
+ .strict();
69
+ export const UpdateOpportunityStatusSchema = z
70
+ .object({
71
+ opportunity_id: IdSchema.describe("Opportunity ID."),
72
+ status: z.string().min(1).describe("New opportunity status."),
73
+ response_format: ResponseFormatSchema
74
+ })
75
+ .strict();
76
+ export const DeleteOpportunitySchema = z
77
+ .object({
78
+ opportunity_id: IdSchema.describe("Opportunity ID."),
79
+ confirm: ConfirmSchema,
80
+ response_format: ResponseFormatSchema
81
+ })
82
+ .strict();
83
+ //# sourceMappingURL=opportunities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"opportunities.js","sourceRoot":"","sources":["../../src/schemas/opportunities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEtI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A6B,GAAG,CAAC;KAC3C,MAAM,CAAC;IACN,cAAc,EAAE,QAAQ,CAAC,QAAQ,CAAC,iBAAiB,CAAC;IACpD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,yBAAyB,CAAC;IAC7D,eAAe,EAAE,oBAAoB;CACtC,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC;KACrC,MAAM,CAAC;IACN,cAAc,EAAE,QAAQ,CAAC,QAAQ,CAAC,iBAAiB,CAAC;IACpD,OAAO,EAAE,aAAa;IACtB,eAAe,EAAE,oBAAoB;CACtC,CAAC;KACD,MAAM,EAAE,CAAC"}
@@ -0,0 +1,81 @@
1
+ import { z } from "zod";
2
+ export declare const ListTagsSchema: z.ZodObject<{
3
+ location_id: z.ZodOptional<z.ZodString>;
4
+ limit: z.ZodDefault<z.ZodNumber>;
5
+ offset: z.ZodDefault<z.ZodNumber>;
6
+ response_format: z.ZodDefault<z.ZodEnum<["markdown", "json"]>>;
7
+ }, "strict", z.ZodTypeAny, {
8
+ offset: number;
9
+ limit: number;
10
+ response_format: "markdown" | "json";
11
+ location_id?: string | undefined;
12
+ }, {
13
+ offset?: number | undefined;
14
+ location_id?: string | undefined;
15
+ limit?: number | undefined;
16
+ response_format?: "markdown" | "json" | undefined;
17
+ }>;
18
+ export declare const GetTagSchema: z.ZodObject<{
19
+ location_id: z.ZodOptional<z.ZodString>;
20
+ tag_id: z.ZodString;
21
+ response_format: z.ZodDefault<z.ZodEnum<["markdown", "json"]>>;
22
+ }, "strict", z.ZodTypeAny, {
23
+ response_format: "markdown" | "json";
24
+ tag_id: string;
25
+ location_id?: string | undefined;
26
+ }, {
27
+ tag_id: string;
28
+ location_id?: string | undefined;
29
+ response_format?: "markdown" | "json" | undefined;
30
+ }>;
31
+ export declare const CreateTagSchema: z.ZodObject<{
32
+ location_id: z.ZodOptional<z.ZodString>;
33
+ name: z.ZodString;
34
+ response_format: z.ZodDefault<z.ZodEnum<["markdown", "json"]>>;
35
+ }, "strict", z.ZodTypeAny, {
36
+ response_format: "markdown" | "json";
37
+ name: string;
38
+ location_id?: string | undefined;
39
+ }, {
40
+ name: string;
41
+ location_id?: string | undefined;
42
+ response_format?: "markdown" | "json" | undefined;
43
+ }>;
44
+ export declare const UpdateTagSchema: z.ZodObject<{
45
+ location_id: z.ZodOptional<z.ZodString>;
46
+ tag_id: z.ZodString;
47
+ name: z.ZodString;
48
+ response_format: z.ZodDefault<z.ZodEnum<["markdown", "json"]>>;
49
+ }, "strict", z.ZodTypeAny, {
50
+ response_format: "markdown" | "json";
51
+ name: string;
52
+ tag_id: string;
53
+ location_id?: string | undefined;
54
+ }, {
55
+ name: string;
56
+ tag_id: string;
57
+ location_id?: string | undefined;
58
+ response_format?: "markdown" | "json" | undefined;
59
+ }>;
60
+ export declare const DeleteTagSchema: z.ZodObject<{
61
+ location_id: z.ZodOptional<z.ZodString>;
62
+ tag_id: z.ZodString;
63
+ confirm: z.ZodBoolean;
64
+ response_format: z.ZodDefault<z.ZodEnum<["markdown", "json"]>>;
65
+ }, "strict", z.ZodTypeAny, {
66
+ response_format: "markdown" | "json";
67
+ confirm: boolean;
68
+ tag_id: string;
69
+ location_id?: string | undefined;
70
+ }, {
71
+ confirm: boolean;
72
+ tag_id: string;
73
+ location_id?: string | undefined;
74
+ response_format?: "markdown" | "json" | undefined;
75
+ }>;
76
+ export type ListTagsInput = z.infer<typeof ListTagsSchema>;
77
+ export type GetTagInput = z.infer<typeof GetTagSchema>;
78
+ export type CreateTagInput = z.infer<typeof CreateTagSchema>;
79
+ export type UpdateTagInput = z.infer<typeof UpdateTagSchema>;
80
+ export type DeleteTagInput = z.infer<typeof DeleteTagSchema>;
81
+ //# sourceMappingURL=tags.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tags.d.ts","sourceRoot":"","sources":["../../src/schemas/tags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;EAOhB,CAAC;AAEZ,eAAO,MAAM,YAAY;;;;;;;;;;;;EAMd,CAAC;AAEZ,eAAO,MAAM,eAAe;;;;;;;;;;;;EAMjB,CAAC;AAEZ,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;EAOjB,CAAC;AAEZ,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;EAOjB,CAAC;AAEZ,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAC3D,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AACvD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAC7D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAC7D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { z } from "zod";
2
+ import { ConfirmSchema, IdSchema, LimitSchema, LocationIdSchema, OffsetSchema, ResponseFormatSchema } from "./common.js";
3
+ export const ListTagsSchema = z
4
+ .object({
5
+ location_id: LocationIdSchema,
6
+ limit: LimitSchema,
7
+ offset: OffsetSchema,
8
+ response_format: ResponseFormatSchema
9
+ })
10
+ .strict();
11
+ export const GetTagSchema = z
12
+ .object({
13
+ location_id: LocationIdSchema,
14
+ tag_id: IdSchema.describe("Tag ID."),
15
+ response_format: ResponseFormatSchema
16
+ })
17
+ .strict();
18
+ export const CreateTagSchema = z
19
+ .object({
20
+ location_id: LocationIdSchema,
21
+ name: z.string().min(1).describe("Tag name."),
22
+ response_format: ResponseFormatSchema
23
+ })
24
+ .strict();
25
+ export const UpdateTagSchema = z
26
+ .object({
27
+ location_id: LocationIdSchema,
28
+ tag_id: IdSchema.describe("Tag ID."),
29
+ name: z.string().min(1).describe("New tag name."),
30
+ response_format: ResponseFormatSchema
31
+ })
32
+ .strict();
33
+ export const DeleteTagSchema = z
34
+ .object({
35
+ location_id: LocationIdSchema,
36
+ tag_id: IdSchema.describe("Tag ID."),
37
+ confirm: ConfirmSchema,
38
+ response_format: ResponseFormatSchema
39
+ })
40
+ .strict();
41
+ //# sourceMappingURL=tags.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tags.js","sourceRoot":"","sources":["../../src/schemas/tags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEzH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC;KAC5B,MAAM,CAAC;IACN,WAAW,EAAE,gBAAgB;IAC7B,KAAK,EAAE,WAAW;IAClB,MAAM,EAAE,YAAY;IACpB,eAAe,EAAE,oBAAoB;CACtC,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC;KAC1B,MAAM,CAAC;IACN,WAAW,EAAE,gBAAgB;IAC7B,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC;IACpC,eAAe,EAAE,oBAAoB;CACtC,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC;KAC7B,MAAM,CAAC;IACN,WAAW,EAAE,gBAAgB;IAC7B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC;IAC7C,eAAe,EAAE,oBAAoB;CACtC,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC;KAC7B,MAAM,CAAC;IACN,WAAW,EAAE,gBAAgB;IAC7B,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC;IACpC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAC;IACjD,eAAe,EAAE,oBAAoB;CACtC,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC;KAC7B,MAAM,CAAC;IACN,WAAW,EAAE,gBAAgB;IAC7B,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC;IACpC,OAAO,EAAE,aAAa;IACtB,eAAe,EAAE,oBAAoB;CACtC,CAAC;KACD,MAAM,EAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { GhlConfig } from "../types.js";
2
+ export declare function loadConfig(): GhlConfig;
3
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/services/config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,wBAAgB,UAAU,IAAI,SAAS,CA6BtC"}
@@ -0,0 +1,26 @@
1
+ import { DEFAULT_API_VERSION, DEFAULT_BASE_URL, DEFAULT_TIMEOUT_MS, ENV } from "../constants.js";
2
+ export function loadConfig() {
3
+ const apiToken = process.env[ENV.apiToken]?.trim();
4
+ const locationId = process.env[ENV.locationId]?.trim();
5
+ const baseUrl = process.env[ENV.baseUrl]?.trim() || DEFAULT_BASE_URL;
6
+ const apiVersion = process.env[ENV.apiVersion]?.trim() || DEFAULT_API_VERSION;
7
+ const timeoutRaw = process.env[ENV.timeoutMs]?.trim();
8
+ if (!apiToken) {
9
+ throw new Error(`${ENV.apiToken} is required. Create a Private Integration in GoHighLevel Settings > Private Integrations, grant the required scopes, and copy the pit-... token.`);
10
+ }
11
+ if (!locationId) {
12
+ throw new Error(`${ENV.locationId} is required. Use the target GoHighLevel sub-account/location ID.`);
13
+ }
14
+ const timeoutMs = timeoutRaw ? Number.parseInt(timeoutRaw, 10) : DEFAULT_TIMEOUT_MS;
15
+ if (!Number.isFinite(timeoutMs) || timeoutMs < 1_000) {
16
+ throw new Error(`${ENV.timeoutMs} must be an integer of at least 1000 milliseconds.`);
17
+ }
18
+ return {
19
+ baseUrl: baseUrl.replace(/\/+$/, ""),
20
+ apiToken,
21
+ apiVersion,
22
+ locationId,
23
+ timeoutMs
24
+ };
25
+ }
26
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/services/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAGjG,MAAM,UAAU,UAAU;IACxB,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC;IACnD,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,CAAC;IACvD,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,IAAI,gBAAgB,CAAC;IACrE,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,IAAI,mBAAmB,CAAC;IAC9E,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,CAAC;IAEtD,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CACb,GAAG,GAAG,CAAC,QAAQ,mJAAmJ,CACnK,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CAAC,GAAG,GAAG,CAAC,UAAU,mEAAmE,CAAC,CAAC;IACxG,CAAC;IAED,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC;IACpF,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,SAAS,GAAG,KAAK,EAAE,CAAC;QACrD,MAAM,IAAI,KAAK,CAAC,GAAG,GAAG,CAAC,SAAS,oDAAoD,CAAC,CAAC;IACxF,CAAC;IAED,OAAO;QACL,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;QACpC,QAAQ;QACR,UAAU;QACV,UAAU;QACV,SAAS;KACV,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function formatApiError(error: unknown): string;
2
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/services/errors.ts"],"names":[],"mappings":"AAEA,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAmCrD"}
@@ -0,0 +1,47 @@
1
+ import axios from "axios";
2
+ export function formatApiError(error) {
3
+ if (axios.isAxiosError(error)) {
4
+ if (error.response) {
5
+ const status = error.response.status;
6
+ const detail = formatErrorData(error.response.data);
7
+ if (status === 401 || status === 403) {
8
+ return `GoHighLevel denied the request (${status}). The token is likely missing a required Private Integration scope, or the locationId is wrong.${detail}`;
9
+ }
10
+ if (status === 404) {
11
+ return `GoHighLevel resource not found (404). Check the ID and that locationId matches the resource's sub-account.${detail}`;
12
+ }
13
+ if (status === 422) {
14
+ return `GoHighLevel rejected the payload (422). Check required fields and dataType enum values.${detail}`;
15
+ }
16
+ if (status === 429) {
17
+ return `GoHighLevel rate limited the request (429). Burst limit is about 100 requests per 10 seconds and about 200k/day per resource. Back off and retry.${detail}`;
18
+ }
19
+ return `GoHighLevel API request failed (${status}).${detail}`;
20
+ }
21
+ if (error.code === "ECONNABORTED") {
22
+ return "GoHighLevel API request timed out. Increase GHL_TIMEOUT_MS or narrow the query.";
23
+ }
24
+ if (error.code) {
25
+ return `GoHighLevel API connection failed (${error.code}). Check GHL_BASE_URL and network access.`;
26
+ }
27
+ }
28
+ return `Unexpected GoHighLevel error: ${error instanceof Error ? error.message : String(error)}`;
29
+ }
30
+ function formatErrorData(data) {
31
+ if (data === undefined || data === null) {
32
+ return "";
33
+ }
34
+ if (typeof data === "string") {
35
+ return ` Response: ${scrubSensitive(data)}`;
36
+ }
37
+ try {
38
+ return ` Response: ${scrubSensitive(JSON.stringify(data))}`;
39
+ }
40
+ catch {
41
+ return "";
42
+ }
43
+ }
44
+ function scrubSensitive(value) {
45
+ return value.replace(/Bearer\s+[\w.-]+/gi, "Bearer [redacted]");
46
+ }
47
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/services/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,UAAU,cAAc,CAAC,KAAc;IAC3C,IAAI,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;QAC9B,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;YACnB,MAAM,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC;YACrC,MAAM,MAAM,GAAG,eAAe,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAEpD,IAAI,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,GAAG,EAAE,CAAC;gBACrC,OAAO,mCAAmC,MAAM,mGAAmG,MAAM,EAAE,CAAC;YAC9J,CAAC;YAED,IAAI,MAAM,KAAK,GAAG,EA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equestConfig } from "axios";
2
+ import type { GhlConfig, GhlMethod } from "../types.js";
3
+ export declare class GoHighLevelClient {
4
+ private readonly http;
5
+ readonly defaultLocationId: string;
6
+ constructor(config: GhlConfig);
7
+ request<T>(method: GhlMethod, path: string, options?: Pick<AxiosRequestConfig, "data" | "params">): Promise<T>;
8
+ get<T>(path: string, params?: Record<string, unknown>): Promise<T>;
9
+ post<T>(path: string, body?: Record<string, unknown>): Promise<T>;
10
+ put<T>(path: string, body?: Record<string, unknown>): Promise<T>;
11
+ del<T>(path: string, params?: Record<string, unknown>, body?: Record<string, unknown>): Promise<T>;
12
+ }
13
+ //# sourceMappingURL=gohighlevel-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gohighlevel-client.d.ts","sourceRoot":"","sources":["../../src/services/gohighlevel-client.ts"],"names":[],"mappings":"AAAA,OAAc,EAAsB,KAAK,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAC3E,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExD,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAgB;IACrC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;gBAEvB,MAAM,EAAE,SAAS;IAcvB,OAAO,CAAC,CAAC,EACb,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,IAAI,CAAC,kBAAkB,EAAE,MAAM,GAAG,QAAQ,CAAM,GACxD,OAAO,CAAC,CAAC,CAAC;IAUb,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAIlE,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAIjE,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAIhE,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;CAGnG"}