@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
package/dist/http-client.d.ts
CHANGED
|
@@ -59,6 +59,6 @@ export declare class HttpClient {
|
|
|
59
59
|
/**
|
|
60
60
|
* Make a DELETE request
|
|
61
61
|
*/
|
|
62
|
-
delete<T>(path: string, options?: RequestOptions): Promise<T>;
|
|
62
|
+
delete<T>(path: string, body?: unknown, options?: RequestOptions): Promise<T>;
|
|
63
63
|
}
|
|
64
64
|
//# s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,GAAG,OAAO,CAAC,CAAC,CAAC;IAIhE;;OAEG;IACG,IAAI,CAAC,CAAC,EACV,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,OAAO,EACd,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,CAAC,CAAC;IAIb;;OAEG;IACG,GAAG,CAAC,CAAC,EACT,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,OAAO,EACd,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,CAAC,CAAC;IAIb;;OAEG;IACG,KAAK,CAAC,CAAC,EACX,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,OAAO,EACd,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,CAAC,CAAC;IAIb;;OAEG;IACG,MAAM,CAAC,CAAC,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,OAAO,EACd,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,CAAC,CAAC;CAGd"}
|
package/dist/http-client.js
CHANGED
|
@@ -152,8 +152,8 @@ export class HttpClient {
|
|
|
152
152
|
/**
|
|
153
153
|
* Make a DELETE request
|
|
154
154
|
*/
|
|
155
|
-
async delete(path, options) {
|
|
156
|
-
return this.request('DELETE', path, options);
|
|
155
|
+
async delete(path, body, options) {
|
|
156
|
+
return this.request('DELETE', path, { ...options, body });
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
//# sourceMappingURL=http-client.js.map
|
package/dist/http-client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-client.js","sourceRoot":"","sources":["../http-client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,UAAU,EACV,YAAY,EACZ,aAAa,EACb,cAAc,EACd,WAAW,GACZ,MAAM,aAAa,CAAC;AAqBrB;;GAEG;AACH,MAAM,OAAO,UAAU;IAMrB,YAAY,MAAwB;QAClC,IAAI,C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CAAI,IAAY,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAI,KAAK,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IAC/C,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,IAAI,CACR,IAAY,EACZ,IAAc,EACd,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAI,MAAM,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7D,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,GAAG,CACP,IAAY,EACZ,IAAc,EACd,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAI,KAAK,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IAC5D,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,KAAK,CACT,IAAY,EACZ,IAAc,EACd,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAI,OAAO,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,CACV,IAAY,EACZ,IAAc,EACd,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAI,QAAQ,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IAC/D,CAAC;CACF"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Companies resource module
|
|
3
|
+
* Provides functionality for managing companies in Envoy
|
|
4
|
+
*/
|
|
5
|
+
import type { HttpClient } from "../../http-client.js";
|
|
6
|
+
import type { CreateCompanyParams, CreateCompanyResponse, GetCompanyResponse, ListCompaniesParams, ListCompaniesResponse, SearchCompaniesResponse, UpdateCompanyParams, UpdateCompanyResponse } 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
|
+
* Companies resource class for managing company-related operations
|
|
16
|
+
*/
|
|
17
|
+
export declare class Companies extends BaseResource {
|
|
18
|
+
/**
|
|
19
|
+
* List all companies under an account
|
|
20
|
+
* @param accountId - The account ID to list companies for
|
|
21
|
+
* @param params - Pagination parameters
|
|
22
|
+
* @returns List of companies
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```typescript
|
|
26
|
+
* const companies = await client.companies.list('acc_123');
|
|
27
|
+
* console.log(companies); // Array of companies
|
|
28
|
+
*
|
|
29
|
+
* // With pagination
|
|
30
|
+
* const companies = await client.companies.list('acc_123', { page: 2, per_page: 50 });
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
list(accountId: string, params?: ListCompaniesParams): Promise<ListCompaniesResponse>;
|
|
34
|
+
/**
|
|
35
|
+
* Create a new company under an account
|
|
36
|
+
* @param accountId - The account ID to create the company under
|
|
37
|
+
* @param params - Company data with required name
|
|
38
|
+
* @returns The created company
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```typescript
|
|
42
|
+
* const company = await client.companies.create('acc_123', {
|
|
43
|
+
* name: 'Acme Corp'
|
|
44
|
+
* });
|
|
45
|
+
* console.log(company); // The created company
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
create(accountId: string, params: CreateCompanyParams): Promise<CreateCompanyResponse>;
|
|
49
|
+
/**
|
|
50
|
+
* Get a company by ID
|
|
51
|
+
* @param accountId - The account ID the company belongs to
|
|
52
|
+
* @param companyId - The company ID to retrieve
|
|
53
|
+
* @returns The company
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```typescript
|
|
57
|
+
* const company = await client.companies.get('acc_123', 'comp_456');
|
|
58
|
+
* console.log(company); // The company
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
get(accountId: string, companyId: string): Promise<GetCompanyResponse>;
|
|
62
|
+
/**
|
|
63
|
+
* Update an existing company
|
|
64
|
+
* @param accountId - The account ID the company belongs to
|
|
65
|
+
* @param companyId - The company ID to update
|
|
66
|
+
* @param params - Company data to update
|
|
67
|
+
* @returns The updated company
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```typescript
|
|
71
|
+
* const company = await client.companies.update('acc_123', 'comp_456', {
|
|
72
|
+
* name: 'Acme Corp Updated'
|
|
73
|
+
* });
|
|
74
|
+
* console.log(company); // The updated company
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
update(accountId: string, companyId: string, params: UpdateCompanyParams): Promise<UpdateCompanyResponse>;
|
|
78
|
+
/**
|
|
79
|
+
* Search companies by name
|
|
80
|
+
* @param accountId - The account ID to search within
|
|
81
|
+
* @param query - The company name to search for
|
|
82
|
+
* @param params - Optional pagination parameters
|
|
83
|
+
* @returns List of matching companies
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```typescript
|
|
87
|
+
* const companies = await client.companies.search('acc_123', 'Acme');
|
|
88
|
+
* console.log(companies); // Array of matching companies
|
|
89
|
+
*
|
|
90
|
+
* // With pagination
|
|
91
|
+
* const companies = await client.companies.search('acc_123', 'Acme', { page: 2, per_page: 50 });
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
search(accountId: string, query: string, params?: {
|
|
95
|
+
page?: number;
|
|
96
|
+
per_page?: number;
|
|
97
|
+
}): Promise<SearchCompaniesResponse>;
|
|
98
|
+
/**
|
|
99
|
+
* Delete a company
|
|
100
|
+
* @param accountId - The account ID the company belongs to
|
|
101
|
+
* @param companyId - The company ID to delete
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```typescript
|
|
105
|
+
* await client.companies.delete('acc_123', 'comp_456');
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
delete(accountId: string, companyId: string): Promise<void>;
|
|
109
|
+
}
|
|
110
|
+
export type { Company, CreateCompanyParams, CreateCompanyRequest, CreateCompanyResponse, GetCompanyResponse, ListCompaniesParams, ListCompaniesResponse, SearchCompaniesParams, SearchCompaniesResponse, UpdateCompanyParams, UpdateCompanyRequest, UpdateCompanyResponse, } from "./types.js";
|
|
111
|
+
export { CompanySchema, CreateCompanyParamsSchema, CreateCompanyRequestSchema, CreateCompanyResponseSchema, GetCompanyResponseSchema, ListCompaniesParamsSchema, ListCompaniesResponseSchema, SearchCompaniesParamsSchema, SearchCompaniesResponseSchema, UpdateCompanyParamsSchema, UpdateCompanyRequestSchema, UpdateCompanyResponseSchema, } from "./types.js";
|
|
112
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../resources/companies/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EACV,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,EACnB,qBAAqB,EACtB,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,SAAU,SAAQ,YAAY;IACzC;;;;;;;;;;;;;;OAcG;IACG,IAAI,CACR,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,mBAAmB,GAC3B,OAAO,CAAC,qBAAqB,CAAC;IAOjC;;;;;;;;;;;;;OAaG;IACG,MAAM,CACV,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,qBAAqB,CAAC;IAOjC;;;;;;;;;;;OAWG;IACG,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAM5E;;;;;;;;;;;;;;OAcG;IACG,MAAM,CACV,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,qBAAqB,CAAC;IAOjC;;;;;;;;;;;;;;;OAeG;IACG,MAAM,CACV,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,GAC5C,OAAO,CAAC,uBAAuB,CAAC;IAOnC;;;;;;;;;OASG;IACG,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAKlE;AAGD,YAAY,EACV,OAAO,EACP,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,aAAa,EACb,yBAAyB,EACzB,0BAA0B,EAC1B,2BAA2B,EAC3B,wBAAwB,EACxB,yBAAyB,EACzB,2BAA2B,EAC3B,2BAA2B,EAC3B,6BAA6B,EAC7B,yBAAyB,EACzB,0BAA0B,EAC1B,2BAA2B,GAC5B,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Companies resource module
|
|
3
|
+
* Provides functionality for managing companies 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
|
+
* Companies resource class for managing company-related operations
|
|
15
|
+
*/
|
|
16
|
+
export class Companies extends BaseResource {
|
|
17
|
+
/**
|
|
18
|
+
* List all companies under an account
|
|
19
|
+
* @param accountId - The account ID to list companies for
|
|
20
|
+
* @param params - Pagination parameters
|
|
21
|
+
* @returns List of companies
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```typescript
|
|
25
|
+
* const companies = await client.companies.list('acc_123');
|
|
26
|
+
* console.log(companies); // Array of companies
|
|
27
|
+
*
|
|
28
|
+
* // With pagination
|
|
29
|
+
* const companies = await client.companies.list('acc_123', { page: 2, per_page: 50 });
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
async list(accountId, params) {
|
|
33
|
+
return await this.client.get(`/accounts/${accountId}/companies`, { params });
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Create a new company under an account
|
|
37
|
+
* @param accountId - The account ID to create the company under
|
|
38
|
+
* @param params - Company data with required name
|
|
39
|
+
* @returns The created company
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```typescript
|
|
43
|
+
* const company = await client.companies.create('acc_123', {
|
|
44
|
+
* name: 'Acme Corp'
|
|
45
|
+
* });
|
|
46
|
+
* console.log(company); // The created company
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
async create(accountId, params) {
|
|
50
|
+
return await this.client.post(`/accounts/${accountId}/companies`, { company: params });
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Get a company by ID
|
|
54
|
+
* @param accountId - The account ID the company belongs to
|
|
55
|
+
* @param companyId - The company ID to retrieve
|
|
56
|
+
* @returns The company
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```typescript
|
|
60
|
+
* const company = await client.companies.get('acc_123', 'comp_456');
|
|
61
|
+
* console.log(company); // The company
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
async get(accountId, companyId) {
|
|
65
|
+
return await this.client.get(`/accounts/${accountId}/companies/${companyId}`);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Update an existing company
|
|
69
|
+
* @param accountId - The account ID the company belongs to
|
|
70
|
+
* @param companyId - The company ID to update
|
|
71
|
+
* @param params - Company data to update
|
|
72
|
+
* @returns The updated company
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```typescript
|
|
76
|
+
* const company = await client.companies.update('acc_123', 'comp_456', {
|
|
77
|
+
* name: 'Acme Corp Updated'
|
|
78
|
+
* });
|
|
79
|
+
* console.log(company); // The updated company
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
async update(accountId, companyId, params) {
|
|
83
|
+
return await this.client.patch(`/accounts/${accountId}/companies/${companyId}`, { company: params });
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Search companies by name
|
|
87
|
+
* @param accountId - The account ID to search within
|
|
88
|
+
* @param query - The company name to search for
|
|
89
|
+
* @param params - Optional pagination parameters
|
|
90
|
+
* @returns List of matching companies
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* ```typescript
|
|
94
|
+
* const companies = await client.companies.search('acc_123', 'Acme');
|
|
95
|
+
* console.log(companies); // Array of matching companies
|
|
96
|
+
*
|
|
97
|
+
* // With pagination
|
|
98
|
+
* const companies = await client.companies.search('acc_123', 'Acme', { page: 2, per_page: 50 });
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
async search(accountId, query, params) {
|
|
102
|
+
return await this.client.get(`/accounts/${accountId}/companies/search`, { params: { q: query, ...params } });
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Delete a company
|
|
106
|
+
* @param accountId - The account ID the company belongs to
|
|
107
|
+
* @param companyId - The company ID to delete
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* ```typescript
|
|
111
|
+
* await client.companies.delete('acc_123', 'comp_456');
|
|
112
|
+
* ```
|
|
113
|
+
*/
|
|
114
|
+
async delete(accountId, companyId) {
|
|
115
|
+
await this.client.delete(`/accounts/${accountId}/companies/${companyId}`);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
// Re-export Zod schemas
|
|
119
|
+
export { CompanySchema, CreateCompanyParamsSchema, CreateCompanyRequestSchema, CreateCompanyResponseSchema, GetCompanyResponseSchema, ListCompaniesParamsSchema, ListCompaniesResponseSchema, SearchCompaniesParamsSchema, SearchCompaniesResponseSchema, UpdateCompanyParamsSchema, UpdateCompanyRequestSchema, UpdateCompanyResponseSchema, } from "./types.js";
|
|
120
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../resources/companies/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAcH;;GAEG;AACH,MAAe,YAAY;IACzB,YAA+B,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAG,CAAC;CACtD;AAED;;GAEG;AACH,MAAM,OAAO,SAAU,SAAQ,YAAY;IACzC;;;;;;;;;;;;;;OAcG;IACH,KAAK,CAAC,IAAI,CACR,SAAiB,EACjB,MAA4B;QAE5B,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAC1B,aAAa,SAAS,YAAY,EAClC,EAAE,MAAM,EAAE,CACX,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,MAAM,CACV,SAAiB,EACjB,MAA2B;QAE3B,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAC3B,aAAa,SAAS,YAAY,EAClC,EAAE,OAAO,EAAE,MAAM,EAAE,CACpB,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,GAAG,CAAC,SAAiB,EAAE,SAAiB;QAC5C,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAC1B,aAAa,SAAS,cAAc,SAAS,EAAE,CAChD,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,KAAK,CAAC,MAAM,CACV,SAAiB,EACjB,SAAiB,EACjB,MAA2B;QAE3B,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,aAAa,SAAS,cAAc,SAAS,EAAE,EAC/C,EAAE,OAAO,EAAE,MAAM,EAAE,CACpB,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,KAAK,CAAC,MAAM,CACV,SAAiB,EACjB,KAAa,EACb,MAA6C;QAE7C,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAC1B,aAAa,SAAS,mBAAmB,EACzC,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,MAAM,EAAE,EAAE,CACpC,CAAC;IACJ,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,MAAM,CAAC,SAAiB,EAAE,SAAiB;QAC/C,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CACtB,aAAa,SAAS,cAAc,SAAS,EAAE,CAChD,CAAC;IACJ,CAAC;CACF;AAkBD,wBAAwB;AACxB,OAAO,EACL,aAAa,EACb,yBAAyB,EACzB,0BAA0B,EAC1B,2BAA2B,EAC3B,wBAAwB,EACxB,yBAAyB,EACzB,2BAA2B,EAC3B,2BAA2B,EAC3B,6BAA6B,EAC7B,yBAAyB,EACzB,0BAA0B,EAC1B,2BAA2B,GAC5B,MAAM,YAAY,CAAC"}
|
|
@@ -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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