@voltade/envoy-sdk 1.1.2 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/client.d.ts +10 -2
  2. package/dist/client.d.ts.map +1 -1
  3. package/dist/client.js +4 -2
  4. package/dist/client.js.map +1 -1
  5. package/dist/http-client.d.ts +1 -1
  6. package/dist/http-client.d.ts.map +1 -1
  7. package/dist/http-client.js +2 -2
  8. package/dist/http-client.js.map +1 -1
  9. package/dist/resources/companies/index.d.ts +112 -0
  10. package/dist/resources/companies/index.d.ts.map +1 -0
  11. package/dist/resources/companies/index.js +120 -0
  12. package/dist/resources/companies/index.js.map +1 -0
  13. package/dist/resources/companies/types.d.ts +334 -0
  14. package/dist/resources/companies/types.d.ts.map +1 -0
  15. package/dist/resources/companies/types.js +56 -0
  16. package/dist/resources/companies/types.js.map +1 -0
  17. package/dist/resources/company-members/index.d.ts +64 -0
  18. package/dist/resources/company-members/index.d.ts.map +1 -0
  19. package/dist/resources/company-members/index.js +69 -0
  20. package/dist/resources/company-members/index.js.map +1 -0
  21. package/dist/resources/company-members/types.d.ts +107 -0
  22. package/dist/resources/company-members/types.d.ts.map +1 -0
  23. package/dist/resources/company-members/types.js +19 -0
  24. package/dist/resources/company-members/types.js.map +1 -0
  25. package/dist/resources/conversations/types.d.ts +48 -48
  26. package/dist/resources/inboxes/types.d.ts +6 -6
  27. package/dist/resources/index.d.ts +2 -0
  28. package/dist/resources/index.d.ts.map +1 -1
  29. package/dist/resources/index.js +2 -0
  30. package/dist/resources/index.js.map +1 -1
  31. package/dist/resources/orders/index.d.ts +5 -5
  32. package/dist/resources/orders/index.js +4 -4
  33. package/dist/resources/orders/types.d.ts +17 -17
  34. package/dist/resources/orders/types.js +2 -2
  35. package/dist/resources/webhooks/types.d.ts +228 -228
  36. package/package.json +1 -1
@@ -0,0 +1,334 @@
1
+ import { z } from "zod";
2
+ export declare const CompanySchema: z.ZodObject<{
3
+ id: z.ZodNumber;
4
+ name: z.ZodString;
5
+ account_id: z.ZodOptional<z.ZodNumber>;
6
+ contacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
7
+ id: z.ZodNumber;
8
+ name: z.ZodOptional<z.ZodString>;
9
+ email: z.ZodOptional<z.ZodString>;
10
+ phone_number: z.ZodOptional<z.ZodString>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ id: number;
13
+ name?: string | undefined;
14
+ email?: string | undefined;
15
+ phone_number?: string | undefined;
16
+ }, {
17
+ id: number;
18
+ name?: string | undefined;
19
+ email?: string | undefined;
20
+ phone_number?: string | undefined;
21
+ }>, "many">>;
22
+ }, "strip", z.ZodTypeAny, {
23
+ id: number;
24
+ name: string;
25
+ account_id?: number | undefined;
26
+ contacts?: {
27
+ id: number;
28
+ name?: string | undefined;
29
+ email?: string | undefined;
30
+ phone_number?: string | undefined;
31
+ }[] | undefined;
32
+ }, {
33
+ id: number;
34
+ name: string;
35
+ account_id?: number | undefined;
36
+ contacts?: {
37
+ id: number;
38
+ name?: string | undefined;
39
+ email?: string | undefined;
40
+ phone_number?: string | undefined;
41
+ }[] | undefined;
42
+ }>;
43
+ export declare const ListCompaniesParamsSchema: z.ZodObject<{
44
+ page: z.ZodOptional<z.ZodNumber>;
45
+ per_page: z.ZodOptional<z.ZodNumber>;
46
+ }, "strip", z.ZodTypeAny, {
47
+ page?: number | undefined;
48
+ per_page?: number | undefined;
49
+ }, {
50
+ page?: number | undefined;
51
+ per_page?: number | undefined;
52
+ }>;
53
+ export declare const ListCompaniesResponseSchema: z.ZodArray<z.ZodObject<{
54
+ id: z.ZodNumber;
55
+ name: z.ZodString;
56
+ account_id: z.ZodOptional<z.ZodNumber>;
57
+ contacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
58
+ id: z.ZodNumber;
59
+ name: z.ZodOptional<z.ZodString>;
60
+ email: z.ZodOptional<z.ZodString>;
61
+ phone_number: z.ZodOptional<z.ZodString>;
62
+ }, "strip", z.ZodTypeAny, {
63
+ id: number;
64
+ name?: string | undefined;
65
+ email?: string | undefined;
66
+ phone_number?: string | undefined;
67
+ }, {
68
+ id: number;
69
+ name?: string | undefined;
70
+ email?: string | undefined;
71
+ phone_number?: string | undefined;
72
+ }>, "many">>;
73
+ }, "strip", z.ZodTypeAny, {
74
+ id: number;
75
+ name: string;
76
+ account_id?: number | undefined;
77
+ contacts?: {
78
+ id: number;
79
+ name?: string | undefined;
80
+ email?: string | undefined;
81
+ phone_number?: string | undefined;
82
+ }[] | undefined;
83
+ }, {
84
+ id: number;
85
+ name: string;
86
+ account_id?: number | undefined;
87
+ contacts?: {
88
+ id: number;
89
+ name?: string | undefined;
90
+ email?: string | undefined;
91
+ phone_number?: string | undefined;
92
+ }[] | undefined;
93
+ }>, "many">;
94
+ export declare const CreateCompanyParamsSchema: z.ZodObject<{
95
+ name: z.ZodString;
96
+ }, "strip", z.ZodTypeAny, {
97
+ name: string;
98
+ }, {
99
+ name: string;
100
+ }>;
101
+ export declare const CreateCompanyRequestSchema: z.ZodObject<{
102
+ company: z.ZodObject<{
103
+ name: z.ZodString;
104
+ }, "strip", z.ZodTypeAny, {
105
+ name: string;
106
+ }, {
107
+ name: string;
108
+ }>;
109
+ }, "strip", z.ZodTypeAny, {
110
+ company: {
111
+ name: string;
112
+ };
113
+ }, {
114
+ company: {
115
+ name: string;
116
+ };
117
+ }>;
118
+ export declare const CreateCompanyResponseSchema: z.ZodObject<{
119
+ id: z.ZodNumber;
120
+ name: z.ZodString;
121
+ account_id: z.ZodOptional<z.ZodNumber>;
122
+ contacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
123
+ id: z.ZodNumber;
124
+ name: z.ZodOptional<z.ZodString>;
125
+ email: z.ZodOptional<z.ZodString>;
126
+ phone_number: z.ZodOptional<z.ZodString>;
127
+ }, "strip", z.ZodTypeAny, {
128
+ id: number;
129
+ name?: string | undefined;
130
+ email?: string | undefined;
131
+ phone_number?: string | undefined;
132
+ }, {
133
+ id: number;
134
+ name?: string | undefined;
135
+ email?: string | undefined;
136
+ phone_number?: string | undefined;
137
+ }>, "many">>;
138
+ }, "strip", z.ZodTypeAny, {
139
+ id: number;
140
+ name: string;
141
+ account_id?: number | undefined;
142
+ contacts?: {
143
+ id: number;
144
+ name?: string | undefined;
145
+ email?: string | undefined;
146
+ phone_number?: string | undefined;
147
+ }[] | undefined;
148
+ }, {
149
+ id: number;
150
+ name: string;
151
+ account_id?: number | undefined;
152
+ contacts?: {
153
+ id: number;
154
+ name?: string | undefined;
155
+ email?: string | undefined;
156
+ phone_number?: string | undefined;
157
+ }[] | undefined;
158
+ }>;
159
+ export declare const GetCompanyResponseSchema: z.ZodObject<{
160
+ id: z.ZodNumber;
161
+ name: z.ZodString;
162
+ account_id: z.ZodOptional<z.ZodNumber>;
163
+ contacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
164
+ id: z.ZodNumber;
165
+ name: z.ZodOptional<z.ZodString>;
166
+ email: z.ZodOptional<z.ZodString>;
167
+ phone_number: z.ZodOptional<z.ZodString>;
168
+ }, "strip", z.ZodTypeAny, {
169
+ id: number;
170
+ name?: string | undefined;
171
+ email?: string | undefined;
172
+ phone_number?: string | undefined;
173
+ }, {
174
+ id: number;
175
+ name?: string | undefined;
176
+ email?: string | undefined;
177
+ phone_number?: string | undefined;
178
+ }>, "many">>;
179
+ }, "strip", z.ZodTypeAny, {
180
+ id: number;
181
+ name: string;
182
+ account_id?: number | undefined;
183
+ contacts?: {
184
+ id: number;
185
+ name?: string | undefined;
186
+ email?: string | undefined;
187
+ phone_number?: string | undefined;
188
+ }[] | undefined;
189
+ }, {
190
+ id: number;
191
+ name: string;
192
+ account_id?: number | undefined;
193
+ contacts?: {
194
+ id: number;
195
+ name?: string | undefined;
196
+ email?: string | undefined;
197
+ phone_number?: string | undefined;
198
+ }[] | undefined;
199
+ }>;
200
+ export declare const UpdateCompanyParamsSchema: z.ZodObject<{
201
+ name: z.ZodString;
202
+ }, "strip", z.ZodTypeAny, {
203
+ name: string;
204
+ }, {
205
+ name: string;
206
+ }>;
207
+ export declare const UpdateCompanyRequestSchema: z.ZodObject<{
208
+ company: z.ZodObject<{
209
+ name: z.ZodString;
210
+ }, "strip", z.ZodTypeAny, {
211
+ name: string;
212
+ }, {
213
+ name: string;
214
+ }>;
215
+ }, "strip", z.ZodTypeAny, {
216
+ company: {
217
+ name: string;
218
+ };
219
+ }, {
220
+ company: {
221
+ name: string;
222
+ };
223
+ }>;
224
+ export declare const UpdateCompanyResponseSchema: z.ZodObject<{
225
+ id: z.ZodNumber;
226
+ name: z.ZodString;
227
+ account_id: z.ZodOptional<z.ZodNumber>;
228
+ contacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
229
+ id: z.ZodNumber;
230
+ name: z.ZodOptional<z.ZodString>;
231
+ email: z.ZodOptional<z.ZodString>;
232
+ phone_number: z.ZodOptional<z.ZodString>;
233
+ }, "strip", z.ZodTypeAny, {
234
+ id: number;
235
+ name?: string | undefined;
236
+ email?: string | undefined;
237
+ phone_number?: string | undefined;
238
+ }, {
239
+ id: number;
240
+ name?: string | undefined;
241
+ email?: string | undefined;
242
+ phone_number?: string | undefined;
243
+ }>, "many">>;
244
+ }, "strip", z.ZodTypeAny, {
245
+ id: number;
246
+ name: string;
247
+ account_id?: number | undefined;
248
+ contacts?: {
249
+ id: number;
250
+ name?: string | undefined;
251
+ email?: string | undefined;
252
+ phone_number?: string | undefined;
253
+ }[] | undefined;
254
+ }, {
255
+ id: number;
256
+ name: string;
257
+ account_id?: number | undefined;
258
+ contacts?: {
259
+ id: number;
260
+ name?: string | undefined;
261
+ email?: string | undefined;
262
+ phone_number?: string | undefined;
263
+ }[] | undefined;
264
+ }>;
265
+ export declare const SearchCompaniesParamsSchema: z.ZodObject<{
266
+ q: z.ZodString;
267
+ page: z.ZodOptional<z.ZodNumber>;
268
+ per_page: z.ZodOptional<z.ZodNumber>;
269
+ }, "strip", z.ZodTypeAny, {
270
+ q: string;
271
+ page?: number | undefined;
272
+ per_page?: number | undefined;
273
+ }, {
274
+ q: string;
275
+ page?: number | undefined;
276
+ per_page?: number | undefined;
277
+ }>;
278
+ export declare const SearchCompaniesResponseSchema: z.ZodArray<z.ZodObject<{
279
+ id: z.ZodNumber;
280
+ name: z.ZodString;
281
+ account_id: z.ZodOptional<z.ZodNumber>;
282
+ contacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
283
+ id: z.ZodNumber;
284
+ name: z.ZodOptional<z.ZodString>;
285
+ email: z.ZodOptional<z.ZodString>;
286
+ phone_number: z.ZodOptional<z.ZodString>;
287
+ }, "strip", z.ZodTypeAny, {
288
+ id: number;
289
+ name?: string | undefined;
290
+ email?: string | undefined;
291
+ phone_number?: string | undefined;
292
+ }, {
293
+ id: number;
294
+ name?: string | undefined;
295
+ email?: string | undefined;
296
+ phone_number?: string | undefined;
297
+ }>, "many">>;
298
+ }, "strip", z.ZodTypeAny, {
299
+ id: number;
300
+ name: string;
301
+ account_id?: number | undefined;
302
+ contacts?: {
303
+ id: number;
304
+ name?: string | undefined;
305
+ email?: string | undefined;
306
+ phone_number?: string | undefined;
307
+ }[] | undefined;
308
+ }, {
309
+ id: number;
310
+ name: string;
311
+ account_id?: number | undefined;
312
+ contacts?: {
313
+ id: number;
314
+ name?: string | undefined;
315
+ email?: string | undefined;
316
+ phone_number?: string | undefined;
317
+ }[] | undefined;
318
+ }>, "many">;
319
+ /**
320
+ * TypeScript Types (inferred from Zod schemas)
321
+ */
322
+ export type Company = z.infer<typeof CompanySchema>;
323
+ export type ListCompaniesParams = z.infer<typeof ListCompaniesParamsSchema>;
324
+ export type ListCompaniesResponse = z.infer<typeof ListCompaniesResponseSchema>;
325
+ export type CreateCompanyParams = z.infer<typeof CreateCompanyParamsSchema>;
326
+ export type CreateCompanyRequest = z.infer<typeof CreateCompanyRequestSchema>;
327
+ export type CreateCompanyResponse = z.infer<typeof CreateCompanyResponseSchema>;
328
+ export type GetCompanyResponse = z.infer<typeof GetCompanyResponseSchema>;
329
+ export type UpdateCompanyParams = z.infer<typeof UpdateCompanyParamsSchema>;
330
+ export type UpdateCompanyRequest = z.infer<typeof UpdateCompanyRequestSchema>;
331
+ export type UpdateCompanyResponse = z.infer<typeof UpdateCompanyResponseSchema>;
332
+ export type SearchCompaniesParams = z.infer<typeof SearchCompaniesParamsSchema>;
333
+ export type SearchCompaniesResponse = z.infer<typeof SearchCompaniesResponseSchema>;
334
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../resources/companies/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAexB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKxB,CAAC;AAGH,eAAO,MAAM,yBAAyB;;;;;;;;;EAGpC,CAAC;AAGH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAAyB,CAAC;AAGlE,eAAO,MAAM,yBAAyB;;;;;;EAEpC,CAAC;AAGH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;EAErC,CAAC;AAGH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAgB,CAAC;AAGzD,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAgB,CAAC;AAGtD,eAAO,MAAM,yBAAyB;;;;;;EAEpC,CAAC;AAGH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;EAErC,CAAC;AAGH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAgB,CAAC;AAGzD,eAAO,MAAM,2BAA2B;;;;;;;;;;;;EAItC,CAAC;AAGH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAAyB,CAAC;AAEpE;;GAEG;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AACpD,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAC"}
@@ -0,0 +1,56 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Zod Schemas for Companies
4
+ */
5
+ // Simplified contact schema for company members
6
+ const CompanyContactSchema = z.object({
7
+ id: z.number(),
8
+ name: z.string().optional(),
9
+ email: z.string().optional(),
10
+ phone_number: z.string().optional(),
11
+ });
12
+ // Company schema
13
+ export const CompanySchema = z.object({
14
+ id: z.number(),
15
+ name: z.string(),
16
+ account_id: z.number().optional(),
17
+ contacts: z.array(CompanyContactSchema).optional(),
18
+ });
19
+ // List companies params schema
20
+ export const ListCompaniesParamsSchema = z.object({
21
+ page: z.number().optional(),
22
+ per_page: z.number().optional(),
23
+ });
24
+ // List companies response - returns array directly
25
+ export const ListCompaniesResponseSchema = z.array(CompanySchema);
26
+ // Create company parameters schema
27
+ export const CreateCompanyParamsSchema = z.object({
28
+ name: z.string(),
29
+ });
30
+ // Create company request schema (wraps in company object)
31
+ export const CreateCompanyRequestSchema = z.object({
32
+ company: CreateCompanyParamsSchema,
33
+ });
34
+ // Create company response - returns company directly
35
+ export const CreateCompanyResponseSchema = CompanySchema;
36
+ // Get company response - returns company directly
37
+ export const GetCompanyResponseSchema = CompanySchema;
38
+ // Update company parameters schema
39
+ export const UpdateCompanyParamsSchema = z.object({
40
+ name: z.string(),
41
+ });
42
+ // Update company request schema (wraps in company object)
43
+ export const UpdateCompanyRequestSchema = z.object({
44
+ company: UpdateCompanyParamsSchema,
45
+ });
46
+ // Update company response - returns company directly
47
+ export const UpdateCompanyResponseSchema = CompanySchema;
48
+ // Search companies params schema
49
+ export const SearchCompaniesParamsSchema = z.object({
50
+ q: z.string(),
51
+ page: z.number().optional(),
52
+ per_page: z.number().optional(),
53
+ });
54
+ // Search companies response - returns array directly
55
+ export const SearchCompaniesResponseSchema = z.array(CompanySchema);
56
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../resources/companies/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AAEH,gDAAgD;AAChD,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACpC,CAAC,CAAC;AAEH,iBAAiB;AACjB,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC,QAAQ,EAAE;CACnD,CAAC,CAAC;AAEH,+BAA+B;AAC/B,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAChC,CAAC,CAAC;AAEH,mDAAmD;AACnD,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;AAElE,mCAAmC;AACnC,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAC;AAEH,0DAA0D;AAC1D,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,OAAO,EAAE,yBAAyB;CACnC,CAAC,CAAC;AAEH,qDAAqD;AACrD,MAAM,CAAC,MAAM,2BAA2B,GAAG,aAAa,CAAC;AAEzD,kDAAkD;AAClD,MAAM,CAAC,MAAM,wBAAwB,GAAG,aAAa,CAAC;AAEtD,mCAAmC;AACnC,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAC;AAEH,0DAA0D;AAC1D,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,OAAO,EAAE,yBAAyB;CACnC,CAAC,CAAC;AAEH,qDAAqD;AACrD,MAAM,CAAC,MAAM,2BAA2B,GAAG,aAAa,CAAC;AAEzD,iCAAiC;AACjC,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE;IACb,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAChC,CAAC,CAAC;AAEH,qDAAqD;AACrD,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC"}
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Company Members resource module
3
+ * Provides functionality for managing company members (contacts) in Envoy
4
+ */
5
+ import type { HttpClient } from "../../http-client.js";
6
+ import type { AddCompanyMembersParams, AddCompanyMembersResponse, ListCompanyMembersResponse, RemoveCompanyMembersParams } from "./types.js";
7
+ /**
8
+ * Base resource class that all resource classes extend from
9
+ */
10
+ declare abstract class BaseResource {
11
+ protected readonly client: HttpClient;
12
+ constructor(client: HttpClient);
13
+ }
14
+ /**
15
+ * Company Members resource class for managing contacts within a company
16
+ */
17
+ export declare class CompanyMembers extends BaseResource {
18
+ /**
19
+ * List all members (contacts) of a company
20
+ * @param accountId - The account ID
21
+ * @param companyId - The company ID
22
+ * @returns List of contacts in the company
23
+ *
24
+ * @example
25
+ * ```typescript
26
+ * const members = await client.companyMembers.list('acc_123', 456);
27
+ * console.log(members); // Array of contacts
28
+ * ```
29
+ */
30
+ list(accountId: string, companyId: number): Promise<ListCompanyMembersResponse>;
31
+ /**
32
+ * Add contacts to a company
33
+ * @param accountId - The account ID
34
+ * @param companyId - The company ID
35
+ * @param params - Object containing contact_ids array
36
+ * @returns List of contacts added to the company
37
+ *
38
+ * @example
39
+ * ```typescript
40
+ * const members = await client.companyMembers.add('acc_123', 456, {
41
+ * contact_ids: [101, 102, 103]
42
+ * });
43
+ * console.log(members); // Array of added contacts
44
+ * ```
45
+ */
46
+ add(accountId: string, companyId: number, params: AddCompanyMembersParams): Promise<AddCompanyMembersResponse>;
47
+ /**
48
+ * Remove contacts from a company
49
+ * @param accountId - The account ID
50
+ * @param companyId - The company ID
51
+ * @param params - Object containing contact_ids array
52
+ *
53
+ * @example
54
+ * ```typescript
55
+ * await client.companyMembers.remove('acc_123', 456, {
56
+ * contact_ids: [101, 102]
57
+ * });
58
+ * ```
59
+ */
60
+ remove(accountId: string, companyId: number, params: RemoveCompanyMembersParams): Promise<void>;
61
+ }
62
+ export type { AddCompanyMembersParams, AddCompanyMembersResponse, ListCompanyMembersResponse, RemoveCompanyMembersParams, } from "./types.js";
63
+ export { AddCompanyMembersParamsSchema, AddCompanyMembersResponseSchema, ListCompanyMembersResponseSchema, RemoveCompanyMembersParamsSchema, } from "./types.js";
64
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../resources/company-members/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EACV,uBAAuB,EACvB,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAC3B,MAAM,YAAY,CAAC;AAEpB;;GAEG;AACH,uBAAe,YAAY;IACb,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,UAAU;gBAAlB,MAAM,EAAE,UAAU;CAClD;AAED;;GAEG;AACH,qBAAa,cAAe,SAAQ,YAAY;IAC9C;;;;;;;;;;;OAWG;IACG,IAAI,CACR,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,0BAA0B,CAAC;IAMtC;;;;;;;;;;;;;;OAcG;IACG,GAAG,CACP,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,uBAAuB,GAC9B,OAAO,CAAC,yBAAyB,CAAC;IAOrC;;;;;;;;;;;;OAYG;IACG,MAAM,CACV,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,0BAA0B,GACjC,OAAO,CAAC,IAAI,CAAC;CAMjB;AAGD,YAAY,EACV,uBAAuB,EACvB,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,6BAA6B,EAC7B,+BAA+B,EAC/B,gCAAgC,EAChC,gCAAgC,GACjC,MAAM,YAAY,CAAC"}
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Company Members resource module
3
+ * Provides functionality for managing company members (contacts) in Envoy
4
+ */
5
+ /**
6
+ * Base resource class that all resource classes extend from
7
+ */
8
+ class BaseResource {
9
+ constructor(client) {
10
+ this.client = client;
11
+ }
12
+ }
13
+ /**
14
+ * Company Members resource class for managing contacts within a company
15
+ */
16
+ export class CompanyMembers extends BaseResource {
17
+ /**
18
+ * List all members (contacts) of a company
19
+ * @param accountId - The account ID
20
+ * @param companyId - The company ID
21
+ * @returns List of contacts in the company
22
+ *
23
+ * @example
24
+ * ```typescript
25
+ * const members = await client.companyMembers.list('acc_123', 456);
26
+ * console.log(members); // Array of contacts
27
+ * ```
28
+ */
29
+ async list(accountId, companyId) {
30
+ return await this.client.get(`/accounts/${accountId}/companies/${companyId}/company_members`);
31
+ }
32
+ /**
33
+ * Add contacts to a company
34
+ * @param accountId - The account ID
35
+ * @param companyId - The company ID
36
+ * @param params - Object containing contact_ids array
37
+ * @returns List of contacts added to the company
38
+ *
39
+ * @example
40
+ * ```typescript
41
+ * const members = await client.companyMembers.add('acc_123', 456, {
42
+ * contact_ids: [101, 102, 103]
43
+ * });
44
+ * console.log(members); // Array of added contacts
45
+ * ```
46
+ */
47
+ async add(accountId, companyId, params) {
48
+ return await this.client.post(`/accounts/${accountId}/companies/${companyId}/company_members`, params);
49
+ }
50
+ /**
51
+ * Remove contacts from a company
52
+ * @param accountId - The account ID
53
+ * @param companyId - The company ID
54
+ * @param params - Object containing contact_ids array
55
+ *
56
+ * @example
57
+ * ```typescript
58
+ * await client.companyMembers.remove('acc_123', 456, {
59
+ * contact_ids: [101, 102]
60
+ * });
61
+ * ```
62
+ */
63
+ async remove(accountId, companyId, params) {
64
+ await this.client.delete(`/accounts/${accountId}/companies/${companyId}/company_members`, params);
65
+ }
66
+ }
67
+ // Re-export Zod schemas
68
+ export { AddCompanyMembersParamsSchema, AddCompanyMembersResponseSchema, ListCompanyMembersResponseSchema, RemoveCompanyMembersParamsSchema, } from "./types.js";
69
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../resources/company-members/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH;;GAEG;AACH,MAAe,YAAY;IACzB,YAA+B,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAG,CAAC;CACtD;AAED;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,YAAY;IAC9C;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,IAAI,CACR,SAAiB,EACjB,SAAiB;QAEjB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAC1B,aAAa,SAAS,cAAc,SAAS,kBAAkB,CAChE,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,KAAK,CAAC,GAAG,CACP,SAAiB,EACjB,SAAiB,EACjB,MAA+B;QAE/B,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAC3B,aAAa,SAAS,cAAc,SAAS,kBAAkB,EAC/D,MAAM,CACP,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,MAAM,CACV,SAAiB,EACjB,SAAiB,EACjB,MAAkC;QAElC,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CACtB,aAAa,SAAS,cAAc,SAAS,kBAAkB,EAC/D,MAAM,CACP,CAAC;IACJ,CAAC;CACF;AAUD,wBAAwB;AACxB,OAAO,EACL,6BAA6B,EAC7B,+BAA+B,EAC/B,gCAAgC,EAChC,gCAAgC,GACjC,MAAM,YAAY,CAAC"}
@@ -0,0 +1,107 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Zod Schemas for Company Members
4
+ * Company members are contacts associated with a company
5
+ */
6
+ export declare const ListCompanyMembersResponseSchema: z.ZodArray<z.ZodObject<{
7
+ id: z.ZodNumber;
8
+ name: z.ZodNullable<z.ZodString>;
9
+ email: z.ZodNullable<z.ZodString>;
10
+ phone_number: z.ZodNullable<z.ZodString>;
11
+ thumbnail: z.ZodString;
12
+ identifier: z.ZodNullable<z.ZodString>;
13
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
14
+ custom_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
15
+ blocked: z.ZodBoolean;
16
+ customer_stage: z.ZodString;
17
+ customer_stage_explanation: z.ZodNullable<z.ZodString>;
18
+ type: z.ZodOptional<z.ZodString>;
19
+ }, "strip", z.ZodTypeAny, {
20
+ id: number;
21
+ name: string | null;
22
+ email: string | null;
23
+ phone_number: string | null;
24
+ thumbnail: string;
25
+ identifier: string | null;
26
+ additional_attributes: Record<string, unknown>;
27
+ custom_attributes: Record<string, unknown>;
28
+ blocked: boolean;
29
+ customer_stage: string;
30
+ customer_stage_explanation: string | null;
31
+ type?: string | undefined;
32
+ }, {
33
+ id: number;
34
+ name: string | null;
35
+ email: string | null;
36
+ phone_number: string | null;
37
+ thumbnail: string;
38
+ identifier: string | null;
39
+ additional_attributes: Record<string, unknown>;
40
+ custom_attributes: Record<string, unknown>;
41
+ blocked: boolean;
42
+ customer_stage: string;
43
+ customer_stage_explanation: string | null;
44
+ type?: string | undefined;
45
+ }>, "many">;
46
+ export declare const AddCompanyMembersParamsSchema: z.ZodObject<{
47
+ contact_ids: z.ZodArray<z.ZodNumber, "many">;
48
+ }, "strip", z.ZodTypeAny, {
49
+ contact_ids: number[];
50
+ }, {
51
+ contact_ids: number[];
52
+ }>;
53
+ export declare const AddCompanyMembersResponseSchema: z.ZodArray<z.ZodObject<{
54
+ id: z.ZodNumber;
55
+ name: z.ZodNullable<z.ZodString>;
56
+ email: z.ZodNullable<z.ZodString>;
57
+ phone_number: z.ZodNullable<z.ZodString>;
58
+ thumbnail: z.ZodString;
59
+ identifier: z.ZodNullable<z.ZodString>;
60
+ additional_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
61
+ custom_attributes: z.ZodRecord<z.ZodString, z.ZodUnknown>;
62
+ blocked: z.ZodBoolean;
63
+ customer_stage: z.ZodString;
64
+ customer_stage_explanation: z.ZodNullable<z.ZodString>;
65
+ type: z.ZodOptional<z.ZodString>;
66
+ }, "strip", z.ZodTypeAny, {
67
+ id: number;
68
+ name: string | null;
69
+ email: string | null;
70
+ phone_number: string | null;
71
+ thumbnail: string;
72
+ identifier: string | null;
73
+ additional_attributes: Record<string, unknown>;
74
+ custom_attributes: Record<string, unknown>;
75
+ blocked: boolean;
76
+ customer_stage: string;
77
+ customer_stage_explanation: string | null;
78
+ type?: string | undefined;
79
+ }, {
80
+ id: number;
81
+ name: string | null;
82
+ email: string | null;
83
+ phone_number: string | null;
84
+ thumbnail: string;
85
+ identifier: string | null;
86
+ additional_attributes: Record<string, unknown>;
87
+ custom_attributes: Record<string, unknown>;
88
+ blocked: boolean;
89
+ customer_stage: string;
90
+ customer_stage_explanation: string | null;
91
+ type?: string | undefined;
92
+ }>, "many">;
93
+ export declare const RemoveCompanyMembersParamsSchema: z.ZodObject<{
94
+ contact_ids: z.ZodArray<z.ZodNumber, "many">;
95
+ }, "strip", z.ZodTypeAny, {
96
+ contact_ids: number[];
97
+ }, {
98
+ contact_ids: number[];
99
+ }>;
100
+ /**
101
+ * TypeScript Types (inferred from Zod schemas)
102
+ */
103
+ export type ListCompanyMembersResponse = z.infer<typeof ListCompanyMembersResponseSchema>;
104
+ export type AddCompanyMembersParams = z.infer<typeof AddCompanyMembersParamsSchema>;
105
+ export type AddCompanyMembersResponse = z.infer<typeof AddCompanyMembersResponseSchema>;
106
+ export type RemoveCompanyMembersParams = z.infer<typeof RemoveCompanyMembersParamsSchema>;
107
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../resources/company-members/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;GAGG;AAGH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAAyB,CAAC;AAGvE,eAAO,MAAM,6BAA6B;;;;;;EAExC,CAAC;AAGH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAAyB,CAAC;AAGtE,eAAO,MAAM,gCAAgC;;;;;;EAE3C,CAAC;AAEH;;GAEG;AAEH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,gCAAgC,CACxC,CAAC;AACF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAC;AACF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,+BAA+B,CACvC,CAAC;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,gCAAgC,CACxC,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { z } from "zod";
2
+ import { ContactSchema } from "../conversations/types.js";
3
+ /**
4
+ * Zod Schemas for Company Members
5
+ * Company members are contacts associated with a company
6
+ */
7
+ // List company members response - returns array of contacts
8
+ export const ListCompanyMembersResponseSchema = z.array(ContactSchema);
9
+ // Add company members params schema
10
+ export const AddCompanyMembersParamsSchema = z.object({
11
+ contact_ids: z.array(z.number()),
12
+ });
13
+ // Add company members response - returns array of contacts
14
+ export const AddCompanyMembersResponseSchema = z.array(ContactSchema);
15
+ // Remove company members params schema
16
+ export const RemoveCompanyMembersParamsSchema = z.object({
17
+ contact_ids: z.array(z.number()),
18
+ });
19
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../resources/company-members/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D;;;GAGG;AAEH,4DAA4D;AAC5D,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;AAEvE,oCAAoC;AACpC,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IACpD,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CACjC,CAAC,CAAC;AAEH,2DAA2D;AAC3D,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;AAEtE,uCAAuC;AACvC,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC,MAAM,CAAC;IACvD,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CACjC,CAAC,CAAC"}