@voltade/envoy-sdk 1.1.2 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/http-client.d.ts +1 -1
- package/dist/http-client.d.ts.map +1 -1
- package/dist/http-client.js +2 -2
- package/dist/http-client.js.map +1 -1
- package/dist/resources/companies/index.d.ts +112 -0
- package/dist/resources/companies/index.d.ts.map +1 -0
- package/dist/resources/companies/index.js +120 -0
- package/dist/resources/companies/index.js.map +1 -0
- package/dist/resources/companies/types.d.ts +334 -0
- package/dist/resources/companies/types.d.ts.map +1 -0
- package/dist/resources/companies/types.js +56 -0
- package/dist/resources/companies/types.js.map +1 -0
- package/dist/resources/company-members/index.d.ts +64 -0
- package/dist/resources/company-members/index.d.ts.map +1 -0
- package/dist/resources/company-members/index.js +69 -0
- package/dist/resources/company-members/index.js.map +1 -0
- package/dist/resources/company-members/types.d.ts +107 -0
- package/dist/resources/company-members/types.d.ts.map +1 -0
- package/dist/resources/company-members/types.js +19 -0
- package/dist/resources/company-members/types.js.map +1 -0
- package/dist/resources/conversations/types.d.ts +48 -48
- package/dist/resources/inboxes/types.d.ts +6 -6
- package/dist/resources/index.d.ts +2 -0
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +2 -0
- package/dist/resources/index.js.map +1 -1
- package/dist/resources/orders/index.d.ts +5 -5
- package/dist/resources/orders/index.js +4 -4
- package/dist/resources/orders/types.d.ts +17 -17
- package/dist/resources/orders/types.js +2 -2
- package/dist/resources/webhooks/types.d.ts +228 -228
- package/package.json +1 -1
|
@@ -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"}
|