bukku-client 0.1.0-test.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/LICENSE +674 -0
- package/README.md +85 -0
- package/dist/accounting/accounts/index.d.ts +52 -0
- package/dist/accounting/accounts/index.d.ts.map +1 -0
- package/dist/accounting/accounts/index.js +72 -0
- package/dist/accounting/accounts/index.js.map +1 -0
- package/dist/accounting/accounts/type.d.ts +125 -0
- package/dist/accounting/accounts/type.d.ts.map +1 -0
- package/dist/accounting/accounts/type.js +4 -0
- package/dist/accounting/accounts/type.js.map +1 -0
- package/dist/accounting/index.d.ts +10 -0
- package/dist/accounting/index.d.ts.map +1 -0
- package/dist/accounting/index.js +16 -0
- package/dist/accounting/index.js.map +1 -0
- package/dist/accounting/journal-entries/index.d.ts +52 -0
- package/dist/accounting/journal-entries/index.d.ts.map +1 -0
- package/dist/accounting/journal-entries/index.js +72 -0
- package/dist/accounting/journal-entries/index.js.map +1 -0
- package/dist/accounting/journal-entries/type.d.ts +151 -0
- package/dist/accounting/journal-entries/type.d.ts.map +1 -0
- package/dist/accounting/journal-entries/type.js +4 -0
- package/dist/accounting/journal-entries/type.js.map +1 -0
- package/dist/common/type.d.ts +105 -0
- package/dist/common/type.d.ts.map +1 -0
- package/dist/common/type.js +3 -0
- package/dist/common/type.js.map +1 -0
- package/dist/contacts/contacts/index.d.ts +57 -0
- package/dist/contacts/contacts/index.d.ts.map +1 -0
- package/dist/contacts/contacts/index.js +82 -0
- package/dist/contacts/contacts/index.js.map +1 -0
- package/dist/contacts/contacts/type.d.ts +286 -0
- package/dist/contacts/contacts/type.d.ts.map +1 -0
- package/dist/contacts/contacts/type.js +4 -0
- package/dist/contacts/contacts/type.js.map +1 -0
- package/dist/contacts/groups/index.d.ts +42 -0
- package/dist/contacts/groups/index.d.ts.map +1 -0
- package/dist/contacts/groups/index.js +59 -0
- package/dist/contacts/groups/index.js.map +1 -0
- package/dist/contacts/groups/type.d.ts +34 -0
- package/dist/contacts/groups/type.d.ts.map +1 -0
- package/dist/contacts/groups/type.js +4 -0
- package/dist/contacts/groups/type.js.map +1 -0
- package/dist/contacts/index.d.ts +10 -0
- package/dist/contacts/index.d.ts.map +1 -0
- package/dist/contacts/index.js +15 -0
- package/dist/contacts/index.js.map +1 -0
- package/dist/control-panel/index.d.ts +15 -0
- package/dist/control-panel/index.d.ts.map +1 -0
- package/dist/control-panel/index.js +35 -0
- package/dist/control-panel/index.js.map +1 -0
- package/dist/control-panel/locations/index.d.ts +51 -0
- package/dist/control-panel/locations/index.d.ts.map +1 -0
- package/dist/control-panel/locations/index.js +70 -0
- package/dist/control-panel/locations/index.js.map +1 -0
- package/dist/control-panel/locations/type.d.ts +91 -0
- package/dist/control-panel/locations/type.d.ts.map +1 -0
- package/dist/control-panel/locations/type.js +4 -0
- package/dist/control-panel/locations/type.js.map +1 -0
- package/dist/control-panel/tag-groups/index.d.ts +44 -0
- package/dist/control-panel/tag-groups/index.d.ts.map +1 -0
- package/dist/control-panel/tag-groups/index.js +63 -0
- package/dist/control-panel/tag-groups/index.js.map +1 -0
- package/dist/control-panel/tag-groups/type.d.ts +64 -0
- package/dist/control-panel/tag-groups/type.d.ts.map +1 -0
- package/dist/control-panel/tag-groups/type.js +4 -0
- package/dist/control-panel/tag-groups/type.js.map +1 -0
- package/dist/control-panel/tags/index.d.ts +43 -0
- package/dist/control-panel/tags/index.d.ts.map +1 -0
- package/dist/control-panel/tags/index.js +60 -0
- package/dist/control-panel/tags/index.js.map +1 -0
- package/dist/control-panel/tags/type.d.ts +60 -0
- package/dist/control-panel/tags/type.d.ts.map +1 -0
- package/dist/control-panel/tags/type.js +4 -0
- package/dist/control-panel/tags/type.js.map +1 -0
- package/dist/files/index.d.ts +29 -0
- package/dist/files/index.d.ts.map +1 -0
- package/dist/files/index.js +42 -0
- package/dist/files/index.js.map +1 -0
- package/dist/files/type.d.ts +50 -0
- package/dist/files/type.d.ts.map +1 -0
- package/dist/files/type.js +4 -0
- package/dist/files/type.js.map +1 -0
- package/dist/index.d.ts +73 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +130 -0
- package/dist/index.js.map +1 -0
- package/dist/lists/index.d.ts +24 -0
- package/dist/lists/index.d.ts.map +1 -0
- package/dist/lists/index.js +33 -0
- package/dist/lists/index.js.map +1 -0
- package/dist/lists/type.d.ts +781 -0
- package/dist/lists/type.d.ts.map +1 -0
- package/dist/lists/type.js +3 -0
- package/dist/lists/type.js.map +1 -0
- package/dist/products/groups/index.d.ts +42 -0
- package/dist/products/groups/index.d.ts.map +1 -0
- package/dist/products/groups/index.js +59 -0
- package/dist/products/groups/index.js.map +1 -0
- package/dist/products/groups/type.d.ts +53 -0
- package/dist/products/groups/type.d.ts.map +1 -0
- package/dist/products/groups/type.js +5 -0
- package/dist/products/groups/type.js.map +1 -0
- package/dist/products/index.d.ts +10 -0
- package/dist/products/index.d.ts.map +1 -0
- package/dist/products/index.js +15 -0
- package/dist/products/index.js.map +1 -0
- package/dist/products/products/index.d.ts +51 -0
- package/dist/products/products/index.d.ts.map +1 -0
- package/dist/products/products/index.js +70 -0
- package/dist/products/products/index.js.map +1 -0
- package/dist/products/products/type.d.ts +270 -0
- package/dist/products/products/type.d.ts.map +1 -0
- package/dist/products/products/type.js +4 -0
- package/dist/products/products/type.js.map +1 -0
- package/dist/purchases/bills/index.d.ts +51 -0
- package/dist/purchases/bills/index.d.ts.map +1 -0
- package/dist/purchases/bills/index.js +75 -0
- package/dist/purchases/bills/index.js.map +1 -0
- package/dist/purchases/bills/type.d.ts +254 -0
- package/dist/purchases/bills/type.d.ts.map +1 -0
- package/dist/purchases/bills/type.js +4 -0
- package/dist/purchases/bills/type.js.map +1 -0
- package/dist/purchases/credit-notes/index.d.ts +51 -0
- package/dist/purchases/credit-notes/index.d.ts.map +1 -0
- package/dist/purchases/credit-notes/index.js +71 -0
- package/dist/purchases/credit-notes/index.js.map +1 -0
- package/dist/purchases/credit-notes/type.d.ts +204 -0
- package/dist/purchases/credit-notes/type.d.ts.map +1 -0
- package/dist/purchases/credit-notes/type.js +4 -0
- package/dist/purchases/credit-notes/type.js.map +1 -0
- package/dist/purchases/goods-received-notes/index.d.ts +51 -0
- package/dist/purchases/goods-received-notes/index.d.ts.map +1 -0
- package/dist/purchases/goods-received-notes/index.js +71 -0
- package/dist/purchases/goods-received-notes/index.js.map +1 -0
- package/dist/purchases/goods-received-notes/type.d.ts +184 -0
- package/dist/purchases/goods-received-notes/type.d.ts.map +1 -0
- package/dist/purchases/goods-received-notes/type.js +4 -0
- package/dist/purchases/goods-received-notes/type.js.map +1 -0
- package/dist/purchases/index.d.ts +18 -0
- package/dist/purchases/index.d.ts.map +1 -0
- package/dist/purchases/index.js +23 -0
- package/dist/purchases/index.js.map +1 -0
- package/dist/purchases/payments/index.d.ts +51 -0
- package/dist/purchases/payments/index.d.ts.map +1 -0
- package/dist/purchases/payments/index.js +71 -0
- package/dist/purchases/payments/index.js.map +1 -0
- package/dist/purchases/payments/type.d.ts +183 -0
- package/dist/purchases/payments/type.d.ts.map +1 -0
- package/dist/purchases/payments/type.js +4 -0
- package/dist/purchases/payments/type.js.map +1 -0
- package/dist/purchases/purchase-orders/index.d.ts +51 -0
- package/dist/purchases/purchase-orders/index.d.ts.map +1 -0
- package/dist/purchases/purchase-orders/index.js +71 -0
- package/dist/purchases/purchase-orders/index.js.map +1 -0
- package/dist/purchases/purchase-orders/type.d.ts +182 -0
- package/dist/purchases/purchase-orders/type.d.ts.map +1 -0
- package/dist/purchases/purchase-orders/type.js +4 -0
- package/dist/purchases/purchase-orders/type.js.map +1 -0
- package/dist/purchases/refunds/index.d.ts +51 -0
- package/dist/purchases/refunds/index.d.ts.map +1 -0
- package/dist/purchases/refunds/index.js +71 -0
- package/dist/purchases/refunds/index.js.map +1 -0
- package/dist/purchases/refunds/type.d.ts +181 -0
- package/dist/purchases/refunds/type.d.ts.map +1 -0
- package/dist/purchases/refunds/type.js +4 -0
- package/dist/purchases/refunds/type.js.map +1 -0
- package/dist/sales/credit-notes/index.d.ts +52 -0
- package/dist/sales/credit-notes/index.d.ts.map +1 -0
- package/dist/sales/credit-notes/index.js +72 -0
- package/dist/sales/credit-notes/index.js.map +1 -0
- package/dist/sales/credit-notes/type.d.ts +304 -0
- package/dist/sales/credit-notes/type.d.ts.map +1 -0
- package/dist/sales/credit-notes/type.js +4 -0
- package/dist/sales/credit-notes/type.js.map +1 -0
- package/dist/sales/delivery-orders/index.d.ts +51 -0
- package/dist/sales/delivery-orders/index.d.ts.map +1 -0
- package/dist/sales/delivery-orders/index.js +72 -0
- package/dist/sales/delivery-orders/index.js.map +1 -0
- package/dist/sales/delivery-orders/type.d.ts +212 -0
- package/dist/sales/delivery-orders/type.d.ts.map +1 -0
- package/dist/sales/delivery-orders/type.js +4 -0
- package/dist/sales/delivery-orders/type.js.map +1 -0
- package/dist/sales/index.d.ts +20 -0
- package/dist/sales/index.d.ts.map +1 -0
- package/dist/sales/index.js +24 -0
- package/dist/sales/index.js.map +1 -0
- package/dist/sales/invoices/index.d.ts +52 -0
- package/dist/sales/invoices/index.d.ts.map +1 -0
- package/dist/sales/invoices/index.js +73 -0
- package/dist/sales/invoices/index.js.map +1 -0
- package/dist/sales/invoices/type.d.ts +335 -0
- package/dist/sales/invoices/type.d.ts.map +1 -0
- package/dist/sales/invoices/type.js +4 -0
- package/dist/sales/invoices/type.js.map +1 -0
- package/dist/sales/payments/index.d.ts +52 -0
- package/dist/sales/payments/index.d.ts.map +1 -0
- package/dist/sales/payments/index.js +72 -0
- package/dist/sales/payments/index.js.map +1 -0
- package/dist/sales/payments/type.d.ts +242 -0
- package/dist/sales/payments/type.d.ts.map +1 -0
- package/dist/sales/payments/type.js +4 -0
- package/dist/sales/payments/type.js.map +1 -0
- package/dist/sales/quotations/index.d.ts +51 -0
- package/dist/sales/quotations/index.d.ts.map +1 -0
- package/dist/sales/quotations/index.js +71 -0
- package/dist/sales/quotations/index.js.map +1 -0
- package/dist/sales/quotations/type.d.ts +202 -0
- package/dist/sales/quotations/type.d.ts.map +1 -0
- package/dist/sales/quotations/type.js +3 -0
- package/dist/sales/quotations/type.js.map +1 -0
- package/dist/sales/refunds/index.d.ts +52 -0
- package/dist/sales/refunds/index.d.ts.map +1 -0
- package/dist/sales/refunds/index.js +72 -0
- package/dist/sales/refunds/index.js.map +1 -0
- package/dist/sales/refunds/type.d.ts +225 -0
- package/dist/sales/refunds/type.d.ts.map +1 -0
- package/dist/sales/refunds/type.js +4 -0
- package/dist/sales/refunds/type.js.map +1 -0
- package/dist/sales/sales-orders/index.d.ts +52 -0
- package/dist/sales/sales-orders/index.d.ts.map +1 -0
- package/dist/sales/sales-orders/index.js +72 -0
- package/dist/sales/sales-orders/index.js.map +1 -0
- package/dist/sales/sales-orders/type.d.ts +202 -0
- package/dist/sales/sales-orders/type.d.ts.map +1 -0
- package/dist/sales/sales-orders/type.js +4 -0
- package/dist/sales/sales-orders/type.js.map +1 -0
- package/dist/types.d.ts +17 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +4 -0
- package/dist/types.js.map +1 -0
- package/package.json +44 -0
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
import { BukkuListPagination } from "../../common/type";
|
|
2
|
+
export type BukkuContactEntityType = "MALAYSIAN_COMPANY" | "MALAYSIAN_INDIVIDUAL" | "FOREIGN_COMPANY" | "FOREIGN_INDIVIDUAL" | "EXEMPTED_PERSON";
|
|
3
|
+
export type BukkuContactRegNoType = "NRIC" | "BRN" | "PASSPORT" | "ARMY" | null;
|
|
4
|
+
export type BukkuContactType = "customer" | "supplier" | "employee";
|
|
5
|
+
/**
|
|
6
|
+
* Contact Person details for creating a contact.
|
|
7
|
+
*/
|
|
8
|
+
export interface BukkuContactPersonCreateParams {
|
|
9
|
+
first_name?: string | null;
|
|
10
|
+
last_name?: string | null;
|
|
11
|
+
is_default_billing?: boolean;
|
|
12
|
+
is_default_shipping?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Custom Field details for creating a contact.
|
|
16
|
+
*/
|
|
17
|
+
export interface BukkuContactCustomFieldCreateParams {
|
|
18
|
+
field_id: number;
|
|
19
|
+
value?: string | null;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Address details for creating a contact.
|
|
23
|
+
*/
|
|
24
|
+
export interface BukkuContactAddressCreateParams {
|
|
25
|
+
name?: string;
|
|
26
|
+
street?: string;
|
|
27
|
+
city?: string;
|
|
28
|
+
state?: string;
|
|
29
|
+
postcode?: string;
|
|
30
|
+
country_code?: string;
|
|
31
|
+
is_default_billing?: boolean;
|
|
32
|
+
is_default_shipping?: boolean;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* File attachment details for creating a contact.
|
|
36
|
+
* The API documentation specifies only file_id.
|
|
37
|
+
*/
|
|
38
|
+
export interface BukkuContactFileItemParams {
|
|
39
|
+
file_id: number;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Parameters for creating a new Contact.
|
|
43
|
+
* Based on POST /contacts
|
|
44
|
+
*/
|
|
45
|
+
export interface BukkuContactCreateParams {
|
|
46
|
+
entity_type: BukkuContactEntityType;
|
|
47
|
+
legal_name: string;
|
|
48
|
+
other_name?: string;
|
|
49
|
+
reg_no_type?: BukkuContactRegNoType;
|
|
50
|
+
reg_no?: string;
|
|
51
|
+
old_reg_no?: string | null;
|
|
52
|
+
tax_id_no?: string | null;
|
|
53
|
+
sst_reg_no?: string | null;
|
|
54
|
+
contact_persons?: Array<BukkuContactPersonCreateParams>;
|
|
55
|
+
group_ids?: number[];
|
|
56
|
+
price_level_id?: number;
|
|
57
|
+
email?: string;
|
|
58
|
+
phone_no?: string;
|
|
59
|
+
types: Array<BukkuContactType>;
|
|
60
|
+
tag_ids?: number[];
|
|
61
|
+
default_currency_code?: string;
|
|
62
|
+
default_term_id?: number;
|
|
63
|
+
default_income_account_id?: number;
|
|
64
|
+
default_expense_account_id?: number;
|
|
65
|
+
fields?: Array<BukkuContactCustomFieldCreateParams>;
|
|
66
|
+
remarks?: string;
|
|
67
|
+
receive_monthly_statement?: boolean;
|
|
68
|
+
receive_invoice_reminder?: boolean;
|
|
69
|
+
key?: string;
|
|
70
|
+
addresses?: Array<BukkuContactAddressCreateParams>;
|
|
71
|
+
receivable_account_id?: number;
|
|
72
|
+
debtor_credit_limit?: number;
|
|
73
|
+
payable_account_id?: number;
|
|
74
|
+
files?: Array<BukkuContactFileItemParams>;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Represents a Contact Person as returned by the API.
|
|
78
|
+
*/
|
|
79
|
+
export interface BukkuContactPersonResponse {
|
|
80
|
+
id: number;
|
|
81
|
+
first_name: string | null;
|
|
82
|
+
last_name: string | null;
|
|
83
|
+
is_default_billing: boolean;
|
|
84
|
+
is_default_shipping: boolean;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Represents a Custom Field for a contact as returned by the API.
|
|
88
|
+
*/
|
|
89
|
+
export interface BukkuContactCustomFieldResponse {
|
|
90
|
+
id: number;
|
|
91
|
+
field_id: number;
|
|
92
|
+
data_type: string;
|
|
93
|
+
name: string;
|
|
94
|
+
value: string | null;
|
|
95
|
+
created_at: string;
|
|
96
|
+
updated_at: string;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Represents an Address for a contact as returned by the API.
|
|
100
|
+
*/
|
|
101
|
+
export interface BukkuContactAddressResponse {
|
|
102
|
+
id: number;
|
|
103
|
+
name: string;
|
|
104
|
+
street: string;
|
|
105
|
+
city: string;
|
|
106
|
+
state: string;
|
|
107
|
+
postcode: string;
|
|
108
|
+
country_code: string;
|
|
109
|
+
is_default_billing: boolean;
|
|
110
|
+
is_default_shipping: boolean;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Detailed information about an uploaded file, specific to Contact response.
|
|
114
|
+
*/
|
|
115
|
+
export interface BukkuContactFileDetailResponse {
|
|
116
|
+
id: number;
|
|
117
|
+
name: string;
|
|
118
|
+
url: string;
|
|
119
|
+
mime_type: string;
|
|
120
|
+
size: number;
|
|
121
|
+
data?: any | null;
|
|
122
|
+
created_at: string;
|
|
123
|
+
updated_at: string;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Represents a file attached to a Contact, as returned in API responses.
|
|
127
|
+
*/
|
|
128
|
+
export interface BukkuContactFileResponseItem {
|
|
129
|
+
id: number;
|
|
130
|
+
file_id: number;
|
|
131
|
+
file: BukkuContactFileDetailResponse[];
|
|
132
|
+
created_at: string;
|
|
133
|
+
updated_at: string;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Represents a Contact object as returned by the API.
|
|
137
|
+
*/
|
|
138
|
+
export interface BukkuContact {
|
|
139
|
+
id: number;
|
|
140
|
+
billing_first_name: string | null;
|
|
141
|
+
billing_last_name: string | null;
|
|
142
|
+
shipping_first_name: string | null;
|
|
143
|
+
shipping_last_name: string | null;
|
|
144
|
+
contact_persons: BukkuContactPersonResponse[] | null;
|
|
145
|
+
entity_type: BukkuContactEntityType;
|
|
146
|
+
legal_name: string;
|
|
147
|
+
other_name: string | null;
|
|
148
|
+
reg_no_type: BukkuContactRegNoType | null;
|
|
149
|
+
reg_no: string | null;
|
|
150
|
+
old_reg_no: string | null;
|
|
151
|
+
tax_id_no: string | null;
|
|
152
|
+
sst_reg_no: string | null;
|
|
153
|
+
group_ids: number[] | null;
|
|
154
|
+
price_level_id: number | null;
|
|
155
|
+
email: string | null;
|
|
156
|
+
phone_no: string | null;
|
|
157
|
+
types: Array<BukkuContactType>;
|
|
158
|
+
tag_ids: number[] | null;
|
|
159
|
+
default_currency_code: string | null;
|
|
160
|
+
default_term_id: number | null;
|
|
161
|
+
default_income_account_id: number | null;
|
|
162
|
+
default_expense_account_id: number | null;
|
|
163
|
+
fields: BukkuContactCustomFieldResponse[] | null;
|
|
164
|
+
remarks: string | null;
|
|
165
|
+
receive_monthly_statement: boolean;
|
|
166
|
+
receive_invoice_reminder: boolean;
|
|
167
|
+
key: string | null;
|
|
168
|
+
addresses: BukkuContactAddressResponse[] | null;
|
|
169
|
+
receivable_account_id: number | null;
|
|
170
|
+
debtor_credit_limit: number | null;
|
|
171
|
+
payable_account_id: number | null;
|
|
172
|
+
billing_party: string | null;
|
|
173
|
+
shipping_party: string | null;
|
|
174
|
+
files: BukkuContactFileResponseItem[] | null;
|
|
175
|
+
is_archived: boolean;
|
|
176
|
+
is_myinvois_ready: boolean;
|
|
177
|
+
created_at: string;
|
|
178
|
+
updated_at: string;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Represents the API response structure when a contact is created or retrieved.
|
|
182
|
+
*/
|
|
183
|
+
export interface BukkuContactResponse {
|
|
184
|
+
contact: BukkuContact;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Contact Person details for updating a contact. ID is required if updating an existing person.
|
|
188
|
+
*/
|
|
189
|
+
export interface BukkuContactPersonUpdateParams extends BukkuContactPersonCreateParams {
|
|
190
|
+
id?: number;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Custom Field details for updating a contact. ID is required if updating an existing field value.
|
|
194
|
+
*/
|
|
195
|
+
export interface BukkuContactCustomFieldUpdateParams extends BukkuContactCustomFieldCreateParams {
|
|
196
|
+
id?: number;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Address details for updating a contact. ID is required.
|
|
200
|
+
*/
|
|
201
|
+
export interface BukkuContactAddressUpdateParams extends BukkuContactAddressCreateParams {
|
|
202
|
+
id: number;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Parameters for updating an existing Contact.
|
|
206
|
+
* Based on PUT /contacts/{id}
|
|
207
|
+
*/
|
|
208
|
+
export interface BukkuContactUpdateParams {
|
|
209
|
+
entity_type: BukkuContactEntityType;
|
|
210
|
+
legal_name: string;
|
|
211
|
+
other_name?: string;
|
|
212
|
+
reg_no_type?: BukkuContactRegNoType;
|
|
213
|
+
reg_no?: string;
|
|
214
|
+
old_reg_no?: string | null;
|
|
215
|
+
tax_id_no?: string | null;
|
|
216
|
+
sst_reg_no?: string | null;
|
|
217
|
+
contact_persons?: Array<BukkuContactPersonUpdateParams>;
|
|
218
|
+
group_ids?: number[];
|
|
219
|
+
price_level_id?: number;
|
|
220
|
+
email?: string;
|
|
221
|
+
phone_no?: string;
|
|
222
|
+
types: Array<BukkuContactType>;
|
|
223
|
+
tag_ids?: number[];
|
|
224
|
+
default_currency_code?: string;
|
|
225
|
+
default_term_id?: number;
|
|
226
|
+
default_income_account_id?: number;
|
|
227
|
+
default_expense_account_id?: number;
|
|
228
|
+
fields?: Array<BukkuContactCustomFieldUpdateParams>;
|
|
229
|
+
remarks?: string;
|
|
230
|
+
receive_monthly_statement?: boolean;
|
|
231
|
+
receive_invoice_reminder?: boolean;
|
|
232
|
+
key?: string;
|
|
233
|
+
addresses?: Array<BukkuContactAddressUpdateParams>;
|
|
234
|
+
receivable_account_id?: number;
|
|
235
|
+
debtor_credit_limit?: number;
|
|
236
|
+
payable_account_id?: number;
|
|
237
|
+
files?: Array<BukkuContactFileItemParams>;
|
|
238
|
+
is_archived?: boolean;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Parameters for listing Bukku Contacts.
|
|
242
|
+
*/
|
|
243
|
+
export interface BukkuContactListParams {
|
|
244
|
+
/** Search for keywords in Name, Receivable, Payable, Created At. Max 100 chars. */
|
|
245
|
+
search?: string;
|
|
246
|
+
/** Search by group ID. */
|
|
247
|
+
group_id?: number;
|
|
248
|
+
/** The current page number. Default: 1, Min: 1. */
|
|
249
|
+
page?: number;
|
|
250
|
+
/** Number of records per page. Default: 30. */
|
|
251
|
+
page_size?: number;
|
|
252
|
+
/** Sort by field. */
|
|
253
|
+
sort_by?: "name" | "receivable" | "payable" | "created_at";
|
|
254
|
+
/** Sort the list in ascending or descending order. */
|
|
255
|
+
sort_dir?: "asc" | "desc";
|
|
256
|
+
/** Include all, non-archived, or archived contacts only, null returns active only. */
|
|
257
|
+
status?: "ALL" | "ACTIVE" | "INACTIVE" | null;
|
|
258
|
+
/** (Malaysia only) Include contacts that are MyInvois ready. */
|
|
259
|
+
is_myinvois_ready?: boolean | null;
|
|
260
|
+
/** Search by contact type, defaults to All if left empty. */
|
|
261
|
+
type?: BukkuContactType;
|
|
262
|
+
[key: string]: any;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Represents a summary of a Bukku Contact as it appears in a list.
|
|
266
|
+
*/
|
|
267
|
+
export interface BukkuContactListItem {
|
|
268
|
+
id: number;
|
|
269
|
+
entity_type: BukkuContactEntityType;
|
|
270
|
+
legal_name: string;
|
|
271
|
+
other_name: string | null;
|
|
272
|
+
email: string | null;
|
|
273
|
+
phone_no: string | null;
|
|
274
|
+
types: Array<BukkuContactType>;
|
|
275
|
+
is_archived: boolean;
|
|
276
|
+
created_at: string;
|
|
277
|
+
updated_at: string;
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* Represents the API response structure for listing contacts.
|
|
281
|
+
*/
|
|
282
|
+
export interface BukkuContactListApiResponse {
|
|
283
|
+
paging: BukkuListPagination;
|
|
284
|
+
contacts: BukkuContactListItem[];
|
|
285
|
+
}
|
|
286
|
+
//# sourceMappingURL=type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/contacts/contacts/type.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,mBAAmB,EAGpB,MAAM,mBAAmB,CAAC;AAG3B,MAAM,MAAM,sBAAsB,GAC9B,mBAAmB,GACnB,sBAAsB,GACtB,iBAAiB,GACjB,oBAAoB,GACpB,iBAAiB,CAAC;AAEtB,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG,KAAK,GAAG,UAAU,GAAG,MAAM,GAAG,IAAI,CAAC;AAEhF,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,CAAC;AAIpE;;GAEG;AACH,MAAM,WAAW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IACX,WAAW,EAAE,sBAAsB,CAAC;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC;IAC/B,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,mBAAmB,CAAC;IAC5B,QAAQ,EAAE,oBAAoB,EAAE,CAAC;CAClC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../../src/contacts/contacts/type.ts"],"names":[],"mappings":";AAAA,uBAAuB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { BukkuAPIRequestFunction } from "../../types";
|
|
2
|
+
import { BukkuContactGroup, BukkuContactGroupCreateParams, BukkuContactGroupListApiResponse } from "./type";
|
|
3
|
+
export declare class ContactsGroupsAPI {
|
|
4
|
+
private _request;
|
|
5
|
+
constructor(_request: BukkuAPIRequestFunction);
|
|
6
|
+
/**
|
|
7
|
+
* Creates a new contact group.
|
|
8
|
+
* Endpoint: POST /contacts/groups
|
|
9
|
+
* @param data - The data for the new contact group.
|
|
10
|
+
* @returns A promise that resolves to the created contact group.
|
|
11
|
+
*/
|
|
12
|
+
create(data: BukkuContactGroupCreateParams): Promise<BukkuContactGroup>;
|
|
13
|
+
/**
|
|
14
|
+
* Retrieves a paginated list of contact groups.
|
|
15
|
+
* Endpoint: GET /contacts/groups
|
|
16
|
+
* @returns A promise that resolves to the API response for listing contact groups.
|
|
17
|
+
*/
|
|
18
|
+
list(): Promise<BukkuContactGroupListApiResponse>;
|
|
19
|
+
/**
|
|
20
|
+
* Retrieves a specific contact group by its ID.
|
|
21
|
+
* Endpoint: GET /contacts/groups/{id}
|
|
22
|
+
* @param id - The ID of the contact group to retrieve.
|
|
23
|
+
* @returns A promise that resolves to the contact group.
|
|
24
|
+
*/
|
|
25
|
+
get(id: number): Promise<BukkuContactGroup>;
|
|
26
|
+
/**
|
|
27
|
+
* Updates an existing contact group.
|
|
28
|
+
* Endpoint: PUT /contacts/groups/{id}
|
|
29
|
+
* @param id - The ID of the contact group to update.
|
|
30
|
+
* @param data - The data to update the contact group with.
|
|
31
|
+
* @returns A promise that resolves to the updated contact group.
|
|
32
|
+
*/
|
|
33
|
+
update(id: number, data: BukkuContactGroupCreateParams): Promise<BukkuContactGroup>;
|
|
34
|
+
/**
|
|
35
|
+
* Deletes a contact group.
|
|
36
|
+
* Endpoint: DELETE /contacts/groups/{id}
|
|
37
|
+
* @param id - The ID of the contact group to delete.
|
|
38
|
+
* @returns A promise that resolves when the contact group is deleted.
|
|
39
|
+
*/
|
|
40
|
+
delete(id: number): Promise<void>;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/contacts/groups/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EACL,iBAAiB,EACjB,6BAA6B,EAE7B,gCAAgC,EACjC,MAAM,QAAQ,CAAC;AAEhB,qBAAa,iBAAiB;IAChB,OAAO,CAAC,QAAQ;gBAAR,QAAQ,EAAE,uBAAuB;IAErD;;;;;OAKG;IACG,MAAM,CACV,IAAI,EAAE,6BAA6B,GAClC,OAAO,CAAC,iBAAiB,CAAC;IAS7B;;;;OAIG;IACG,IAAI,IAAI,OAAO,CAAC,gCAAgC,CAAC;IAOvD;;;;;OAKG;IACG,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAQjD;;;;;;OAMG;IACG,MAAM,CACV,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,6BAA6B,GAClC,OAAO,CAAC,iBAAiB,CAAC;IAS7B;;;;;OAKG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGxC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// src/contacts/groups/groups.ts
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ContactsGroupsAPI = void 0;
|
|
5
|
+
class ContactsGroupsAPI {
|
|
6
|
+
constructor(_request) {
|
|
7
|
+
this._request = _request;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Creates a new contact group.
|
|
11
|
+
* Endpoint: POST /contacts/groups
|
|
12
|
+
* @param data - The data for the new contact group.
|
|
13
|
+
* @returns A promise that resolves to the created contact group.
|
|
14
|
+
*/
|
|
15
|
+
async create(data) {
|
|
16
|
+
const response = await this._request("/contacts/groups", "POST", data);
|
|
17
|
+
return response.group;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Retrieves a paginated list of contact groups.
|
|
21
|
+
* Endpoint: GET /contacts/groups
|
|
22
|
+
* @returns A promise that resolves to the API response for listing contact groups.
|
|
23
|
+
*/
|
|
24
|
+
async list() {
|
|
25
|
+
return this._request("/contacts/groups", "GET");
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Retrieves a specific contact group by its ID.
|
|
29
|
+
* Endpoint: GET /contacts/groups/{id}
|
|
30
|
+
* @param id - The ID of the contact group to retrieve.
|
|
31
|
+
* @returns A promise that resolves to the contact group.
|
|
32
|
+
*/
|
|
33
|
+
async get(id) {
|
|
34
|
+
const response = await this._request(`/contacts/groups/${id}`, "GET");
|
|
35
|
+
return response.group;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Updates an existing contact group.
|
|
39
|
+
* Endpoint: PUT /contacts/groups/{id}
|
|
40
|
+
* @param id - The ID of the contact group to update.
|
|
41
|
+
* @param data - The data to update the contact group with.
|
|
42
|
+
* @returns A promise that resolves to the updated contact group.
|
|
43
|
+
*/
|
|
44
|
+
async update(id, data) {
|
|
45
|
+
const response = await this._request(`/contacts/groups/${id}`, "PUT", data);
|
|
46
|
+
return response.group;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Deletes a contact group.
|
|
50
|
+
* Endpoint: DELETE /contacts/groups/{id}
|
|
51
|
+
* @param id - The ID of the contact group to delete.
|
|
52
|
+
* @returns A promise that resolves when the contact group is deleted.
|
|
53
|
+
*/
|
|
54
|
+
async delete(id) {
|
|
55
|
+
await this._request(`/contacts/groups/${id}`, "DELETE");
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.ContactsGroupsAPI = ContactsGroupsAPI;
|
|
59
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/contacts/groups/index.ts"],"names":[],"mappings":";AAAA,gCAAgC;;;AAUhC,MAAa,iBAAiB;IAC5B,YAAoB,QAAiC;QAAjC,aAAQ,GAAR,QAAQ,CAAyB;IAAG,CAAC;IAEzD;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,IAAmC;QAEnC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,QAAQ,CAClC,kBAAkB,EAClB,MAAM,EACN,IAAI,CACL,CAAC;QACF,OAAO,QAAQ,CAAC,KAAK,CAAC;IACxB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,IAAI;QACR,OAAO,IAAI,CAAC,QAAQ,CAClB,kBAAkB,EAClB,KAAK,CACN,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,GAAG,CAAC,EAAU;QAClB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,QAAQ,CAClC,oBAAoB,EAAE,EAAE,EACxB,KAAK,CACN,CAAC;QACF,OAAO,QAAQ,CAAC,KAAK,CAAC;IACxB,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,MAAM,CACV,EAAU,EACV,IAAmC;QAEnC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,QAAQ,CAClC,oBAAoB,EAAE,EAAE,EACxB,KAAK,EACL,IAAI,CACL,CAAC;QACF,OAAO,QAAQ,CAAC,KAAK,CAAC;IACxB,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CAAC,EAAU;QACrB,MAAM,IAAI,CAAC,QAAQ,CAAO,oBAAoB,EAAE,EAAE,EAAE,QAAQ,CAAC,CAAC;IAChE,CAAC;CACF;AA1ED,8CA0EC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { BukkuListPagination } from "../../common/type";
|
|
2
|
+
/**
|
|
3
|
+
* Parameters for creating a new Contact Group.
|
|
4
|
+
* Based on POST /contacts/groups
|
|
5
|
+
*/
|
|
6
|
+
export interface BukkuContactGroupCreateParams {
|
|
7
|
+
name: string;
|
|
8
|
+
contact_ids?: number[];
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Represents a Contact Group object as returned by the API.
|
|
12
|
+
*/
|
|
13
|
+
export interface BukkuContactGroup {
|
|
14
|
+
id: number;
|
|
15
|
+
name: string;
|
|
16
|
+
contact_ids: number[] | null;
|
|
17
|
+
created_at: string;
|
|
18
|
+
updated_at: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Represents the API response structure when a contact group is created.
|
|
22
|
+
*/
|
|
23
|
+
export interface BukkuContactGroupResponse {
|
|
24
|
+
group: BukkuContactGroup;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Represents the API response structure for listing contact groups.
|
|
28
|
+
* Assumes pagination structure is similar to other list APIs.
|
|
29
|
+
*/
|
|
30
|
+
export interface BukkuContactGroupListApiResponse {
|
|
31
|
+
paging: BukkuListPagination;
|
|
32
|
+
groups: BukkuContactGroup[];
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/contacts/groups/type.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,iBAAiB,CAAC;CAC1B;AAID;;;GAGG;AACH,MAAM,WAAW,gCAAgC;IAC/C,MAAM,EAAE,mBAAmB,CAAC;IAC5B,MAAM,EAAE,iBAAiB,EAAE,CAAC;CAC7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../../src/contacts/groups/type.ts"],"names":[],"mappings":";AAAA,qCAAqC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BukkuAPIRequestFunction } from "../types";
|
|
2
|
+
import { ContactsContactsAPI } from "./contacts";
|
|
3
|
+
import { ContactsGroupsAPI } from "./groups";
|
|
4
|
+
export declare class ContactsAPI {
|
|
5
|
+
private _request;
|
|
6
|
+
readonly contacts: ContactsContactsAPI;
|
|
7
|
+
readonly groups: ContactsGroupsAPI;
|
|
8
|
+
constructor(_request: BukkuAPIRequestFunction);
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/contacts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,qBAAa,WAAW;IAIV,OAAO,CAAC,QAAQ;IAH5B,SAAgB,QAAQ,EAAE,mBAAmB,CAAC;IAC9C,SAAgB,MAAM,EAAE,iBAAiB,CAAC;gBAEtB,QAAQ,EAAE,uBAAuB;CAKtD"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ContactsAPI = void 0;
|
|
4
|
+
const contacts_1 = require("./contacts");
|
|
5
|
+
const groups_1 = require("./groups");
|
|
6
|
+
class ContactsAPI {
|
|
7
|
+
constructor(_request) {
|
|
8
|
+
this._request = _request;
|
|
9
|
+
this.contacts = new contacts_1.ContactsContactsAPI(this._request);
|
|
10
|
+
this.groups = new groups_1.ContactsGroupsAPI(this._request);
|
|
11
|
+
// Future contacts-related modules will be initialized here
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.ContactsAPI = ContactsAPI;
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/contacts/index.ts"],"names":[],"mappings":";;;AACA,yCAAiD;AACjD,qCAA6C;AAE7C,MAAa,WAAW;IAItB,YAAoB,QAAiC;QAAjC,aAAQ,GAAR,QAAQ,CAAyB;QACnD,IAAI,CAAC,QAAQ,GAAG,IAAI,8BAAmB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACvD,IAAI,CAAC,MAAM,GAAG,IAAI,0BAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACnD,2DAA2D;IAC7D,CAAC;CACF;AATD,kCASC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { BukkuAPIRequestFunction } from "../types";
|
|
2
|
+
import { LocationsAPI } from "./locations";
|
|
3
|
+
import { TagsAPI } from "./tags";
|
|
4
|
+
import { TagGroupsAPI } from "./tag-groups";
|
|
5
|
+
export declare class ControlPanelAPI {
|
|
6
|
+
private _request;
|
|
7
|
+
readonly locations: LocationsAPI;
|
|
8
|
+
readonly tags: TagsAPI;
|
|
9
|
+
readonly tagGroups: TagGroupsAPI;
|
|
10
|
+
constructor(_request: BukkuAPIRequestFunction);
|
|
11
|
+
}
|
|
12
|
+
export * from "./locations/type";
|
|
13
|
+
export * from "./tag-groups/type";
|
|
14
|
+
export * from "./tags/type";
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/control-panel/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,qBAAa,eAAe;IAKd,OAAO,CAAC,QAAQ;IAJ5B,SAAgB,SAAS,EAAE,YAAY,CAAC;IACxC,SAAgB,IAAI,EAAE,OAAO,CAAC;IAC9B,SAAgB,SAAS,EAAE,YAAY,CAAC;gBAEpB,QAAQ,EAAE,uBAAuB;CAOtD;AAGD,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// src/control-panel/index.ts
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.ControlPanelAPI = void 0;
|
|
19
|
+
const locations_1 = require("./locations");
|
|
20
|
+
const tags_1 = require("./tags");
|
|
21
|
+
const tag_groups_1 = require("./tag-groups");
|
|
22
|
+
class ControlPanelAPI {
|
|
23
|
+
constructor(_request) {
|
|
24
|
+
this._request = _request;
|
|
25
|
+
this.locations = new locations_1.LocationsAPI(this._request);
|
|
26
|
+
this.tags = new tags_1.TagsAPI(this._request);
|
|
27
|
+
this.tagGroups = new tag_groups_1.TagGroupsAPI(this._request);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.ControlPanelAPI = ControlPanelAPI;
|
|
31
|
+
// Export relevant types from submodules if needed
|
|
32
|
+
__exportStar(require("./locations/type"), exports);
|
|
33
|
+
__exportStar(require("./tag-groups/type"), exports);
|
|
34
|
+
__exportStar(require("./tags/type"), exports);
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/control-panel/index.ts"],"names":[],"mappings":";AAAA,6BAA6B;;;;;;;;;;;;;;;;;AAG7B,2CAA2C;AAC3C,iCAAiC;AACjC,6CAA4C;AAE5C,MAAa,eAAe;IAK1B,YAAoB,QAAiC;QAAjC,aAAQ,GAAR,QAAQ,CAAyB;QACnD,IAAI,CAAC,SAAS,GAAG,IAAI,wBAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACjD,IAAI,CAAC,IAAI,GAAG,IAAI,cAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACvC,IAAI,CAAC,SAAS,GAAG,IAAI,yBAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACnD,CAAC;CAGF;AAZD,0CAYC;AAED,kDAAkD;AAClD,mDAAiC;AACjC,oDAAkC;AAClC,8CAA4B"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { BukkuAPIRequestFunction } from "../../types";
|
|
2
|
+
import { BukkuLocation, BukkuLocationCreateParams, BukkuLocationListParams, BukkuLocationListApiResponse, BukkuLocationUpdateParams, BukkuLocationArchiveParams } from "./type";
|
|
3
|
+
export declare class LocationsAPI {
|
|
4
|
+
private _request;
|
|
5
|
+
constructor(_request: BukkuAPIRequestFunction);
|
|
6
|
+
/**
|
|
7
|
+
* Creates a new location.
|
|
8
|
+
* Endpoint: POST /locations
|
|
9
|
+
* @param data - The data for the new location.
|
|
10
|
+
* @returns A promise that resolves to the created location.
|
|
11
|
+
*/
|
|
12
|
+
create(data: BukkuLocationCreateParams): Promise<BukkuLocation>;
|
|
13
|
+
/**
|
|
14
|
+
* Retrieves a paginated list of locations.
|
|
15
|
+
* Endpoint: GET /locations
|
|
16
|
+
* @param params - Optional parameters for filtering and pagination.
|
|
17
|
+
* @returns A promise that resolves to the API response for listing locations.
|
|
18
|
+
*/
|
|
19
|
+
list(params?: BukkuLocationListParams): Promise<BukkuLocationListApiResponse>;
|
|
20
|
+
/**
|
|
21
|
+
* Retrieves a specific location by its ID.
|
|
22
|
+
* Endpoint: GET /locations/{id}
|
|
23
|
+
* @param id - The ID of the location to retrieve.
|
|
24
|
+
* @returns A promise that resolves to the location.
|
|
25
|
+
*/
|
|
26
|
+
get(id: number): Promise<BukkuLocation>;
|
|
27
|
+
/**
|
|
28
|
+
* Updates an existing location.
|
|
29
|
+
* Endpoint: PUT /locations/{id}
|
|
30
|
+
* @param id - The ID of the location to update.
|
|
31
|
+
* @param data - The data to update the location with.
|
|
32
|
+
* @returns A promise that resolves to the updated location.
|
|
33
|
+
*/
|
|
34
|
+
update(id: number, data: BukkuLocationUpdateParams): Promise<BukkuLocation>;
|
|
35
|
+
/**
|
|
36
|
+
* Archives or unarchives a location.
|
|
37
|
+
* Endpoint: PATCH /locations/{id}
|
|
38
|
+
* @param id - The ID of the location to archive/unarchive.
|
|
39
|
+
* @param data - The archive status.
|
|
40
|
+
* @returns A promise that resolves to the updated location.
|
|
41
|
+
*/
|
|
42
|
+
updateArchiveStatus(id: number, data: BukkuLocationArchiveParams): Promise<BukkuLocation>;
|
|
43
|
+
/**
|
|
44
|
+
* Deletes a location.
|
|
45
|
+
* Endpoint: DELETE /locations/{id}
|
|
46
|
+
* @param id - The ID of the location to delete.
|
|
47
|
+
* @returns A promise that resolves when the location is deleted.
|
|
48
|
+
*/
|
|
49
|
+
delete(id: number): Promise<void>;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/control-panel/locations/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EACL,aAAa,EACb,yBAAyB,EAEzB,uBAAuB,EAEvB,4BAA4B,EAC5B,yBAAyB,EACzB,0BAA0B,EAC3B,MAAM,QAAQ,CAAC;AAEhB,qBAAa,YAAY;IACX,OAAO,CAAC,QAAQ;gBAAR,QAAQ,EAAE,uBAAuB;IAErD;;;;;OAKG;IACG,MAAM,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,aAAa,CAAC;IASrE;;;;;OAKG;IACG,IAAI,CACR,MAAM,CAAC,EAAE,uBAAuB,GAC/B,OAAO,CAAC,4BAA4B,CAAC;IASxC;;;;;OAKG;IACG,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAQ7C;;;;;;OAMG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,aAAa,CAAC;IASjF;;;;;;OAMG;IACG,mBAAmB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,0BAA0B,GAAG,OAAO,CAAC,aAAa,CAAC;IAS/F;;;;;OAKG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGxC"}
|