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,184 @@
|
|
|
1
|
+
import { BukkuEmailDetails, BukkuFileAttachment, BukkuAttachedFileResponse, BukkuFormItem, // For response form items
|
|
2
|
+
BukkuListPagination } from "../../common/type";
|
|
3
|
+
/**
|
|
4
|
+
* Represents a form item for creating or updating a Bukku Goods Received Note.
|
|
5
|
+
* Note: `id` is required for `form_items` when updating existing items within a GRN.
|
|
6
|
+
*/
|
|
7
|
+
export interface BukkuGoodsReceivedNoteFormItemUpdateParams {
|
|
8
|
+
/** The id of the item, required when you're updating an item. */
|
|
9
|
+
id?: number;
|
|
10
|
+
/** The transferred item's id, required for transfer items. Obtained from the to be transferred transaction's form_item's ID. */
|
|
11
|
+
transfer_item_id?: number;
|
|
12
|
+
/** The type of the item, leave null for normal item. */
|
|
13
|
+
type?: "bundle" | "subtitle" | "subtotal" | null;
|
|
14
|
+
/** The account of the item, required for normal item. */
|
|
15
|
+
account_id?: number;
|
|
16
|
+
/** The description of the item, required for normal / bundle & subtitle items. */
|
|
17
|
+
description?: string;
|
|
18
|
+
/** The service date of the item, following format YYYY-MM-DD. */
|
|
19
|
+
service_date?: string;
|
|
20
|
+
/** The product of the item. */
|
|
21
|
+
product_id?: number;
|
|
22
|
+
/** The product unit / UOM of the product, leave blank to use the product's default unit. */
|
|
23
|
+
product_unit_id?: number;
|
|
24
|
+
/** The location of the product, used for inventory product, leave blank to use the system default location. */
|
|
25
|
+
location_id?: number;
|
|
26
|
+
/** The unit price of the item, supports up to 4 decimal points, required for normal items. */
|
|
27
|
+
unit_price?: number;
|
|
28
|
+
/** The quantity of the item, supports up to 4 decimal points, required for normal items. */
|
|
29
|
+
quantity?: number;
|
|
30
|
+
/** The discount of the item, supports value (eg. 255.12) or percentage (eg. 10%). Max 14 chars. */
|
|
31
|
+
discount?: string;
|
|
32
|
+
/** The tax code of the item. */
|
|
33
|
+
tax_code_id?: number;
|
|
34
|
+
/** The child items, used by bundle. */
|
|
35
|
+
children?: BukkuGoodsReceivedNoteFormItemUpdateParams[];
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Parameters for creating a Bukku Goods Received Note.
|
|
39
|
+
* Based on POST /purchases/goods_received_notes
|
|
40
|
+
*/
|
|
41
|
+
export interface BukkuGoodsReceivedNoteCreateParams {
|
|
42
|
+
contact_id: number;
|
|
43
|
+
number?: string;
|
|
44
|
+
number2?: string;
|
|
45
|
+
date: string;
|
|
46
|
+
currency_code: string;
|
|
47
|
+
exchange_rate: number;
|
|
48
|
+
billing_party?: string;
|
|
49
|
+
show_shipping?: boolean;
|
|
50
|
+
shipping_party?: string;
|
|
51
|
+
shipping_info?: string;
|
|
52
|
+
tag_ids?: number[];
|
|
53
|
+
title?: string;
|
|
54
|
+
description?: string;
|
|
55
|
+
remarks?: string;
|
|
56
|
+
tax_mode: "inclusive" | "exclusive";
|
|
57
|
+
form_items: BukkuGoodsReceivedNoteFormItemUpdateParams[];
|
|
58
|
+
status: "draft" | "pending_approval" | "ready";
|
|
59
|
+
email?: BukkuEmailDetails;
|
|
60
|
+
files?: BukkuFileAttachment[];
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Represents a Bukku Goods Received Note object as returned by the API.
|
|
64
|
+
*/
|
|
65
|
+
export interface BukkuGoodsReceivedNote {
|
|
66
|
+
id: number;
|
|
67
|
+
contact_id: number;
|
|
68
|
+
contact_name: string;
|
|
69
|
+
number: string;
|
|
70
|
+
number2: string | null;
|
|
71
|
+
date: string;
|
|
72
|
+
currency_code: string;
|
|
73
|
+
currency_symbol: string;
|
|
74
|
+
exchange_rate: number;
|
|
75
|
+
billing_party: string | null;
|
|
76
|
+
show_shipping: boolean;
|
|
77
|
+
shipping_info: string | null;
|
|
78
|
+
shipping_party: string | null;
|
|
79
|
+
tag_ids: number[] | null;
|
|
80
|
+
tag_names: string[] | null;
|
|
81
|
+
title: string | null;
|
|
82
|
+
description: string | null;
|
|
83
|
+
remarks: string | null;
|
|
84
|
+
tax_mode: "inclusive" | "exclusive";
|
|
85
|
+
form_items: BukkuFormItem[];
|
|
86
|
+
amount: number;
|
|
87
|
+
status: string;
|
|
88
|
+
type: string;
|
|
89
|
+
short_link: string;
|
|
90
|
+
files: BukkuAttachedFileResponse[] | null;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Represents the API response structure when a goods received note is created or retrieved.
|
|
94
|
+
*/
|
|
95
|
+
export interface BukkuGoodsReceivedNoteResponse {
|
|
96
|
+
transaction: BukkuGoodsReceivedNote;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Parameters for updating a Bukku Goods Received Note.
|
|
100
|
+
* Based on PUT /purchases/goods_received_notes/{id}
|
|
101
|
+
*/
|
|
102
|
+
export interface BukkuGoodsReceivedNoteUpdateParams {
|
|
103
|
+
contact_id: number;
|
|
104
|
+
number: string;
|
|
105
|
+
number2?: string;
|
|
106
|
+
date: string;
|
|
107
|
+
currency_code: string;
|
|
108
|
+
exchange_rate: number;
|
|
109
|
+
billing_party?: string;
|
|
110
|
+
show_shipping?: boolean;
|
|
111
|
+
shipping_party?: string;
|
|
112
|
+
shipping_info?: string;
|
|
113
|
+
tag_ids?: number[];
|
|
114
|
+
title?: string;
|
|
115
|
+
description?: string;
|
|
116
|
+
remarks?: string;
|
|
117
|
+
tax_mode: "inclusive" | "exclusive";
|
|
118
|
+
form_items: BukkuGoodsReceivedNoteFormItemUpdateParams[];
|
|
119
|
+
email?: BukkuEmailDetails;
|
|
120
|
+
files?: BukkuFileAttachment[];
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Parameters for updating the status of a Bukku Goods Received Note.
|
|
124
|
+
* Based on PATCH /purchases/goods_received_notes/{id}
|
|
125
|
+
*/
|
|
126
|
+
export interface BukkuGoodsReceivedNoteStatusUpdateParams {
|
|
127
|
+
status: "draft" | "pending_approval" | "ready" | "void";
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Parameters for listing Bukku Goods Received Notes (GET /purchases/goods_received_notes).
|
|
131
|
+
*/
|
|
132
|
+
export interface BukkuGoodsReceivedNoteListParams {
|
|
133
|
+
search?: string;
|
|
134
|
+
custom_search?: string;
|
|
135
|
+
contact_id?: number;
|
|
136
|
+
date_from?: string;
|
|
137
|
+
date_to?: string;
|
|
138
|
+
status?: "all" | "draft" | "pending_approval" | "ready" | "void";
|
|
139
|
+
email_status?: "UNSENT" | "PENDING" | "SENT" | "BOUNCED" | "OPENED" | "VIEWED";
|
|
140
|
+
transfer_status?: "ALL" | "OUTSTANDING" | "NOT_TRANSFERRED" | "PARTIAL_TRANSFERRED" | "TRANSFERRED";
|
|
141
|
+
page?: number;
|
|
142
|
+
page_size?: number;
|
|
143
|
+
sort_by?: "number" | "date" | "contact_name" | "number2" | "title" | "description" | "amount" | "created_at";
|
|
144
|
+
sort_dir?: "asc" | "desc";
|
|
145
|
+
[key: string]: any;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Represents a summary of a Bukku Goods Received Note as it appears in a list.
|
|
149
|
+
* This is based on the general structure of list items in Bukku and might need adjustments
|
|
150
|
+
* if the actual API response for GRN list items differs significantly.
|
|
151
|
+
*/
|
|
152
|
+
export interface BukkuGoodsReceivedNoteListItem {
|
|
153
|
+
id: number;
|
|
154
|
+
contact_id: number;
|
|
155
|
+
contact_name: string;
|
|
156
|
+
number: string;
|
|
157
|
+
number2: string | null;
|
|
158
|
+
date: string;
|
|
159
|
+
currency_code: string;
|
|
160
|
+
currency_symbol: string;
|
|
161
|
+
exchange_rate: number;
|
|
162
|
+
billing_party?: string | null;
|
|
163
|
+
shipping_party?: string | null;
|
|
164
|
+
tag_names?: string[] | null;
|
|
165
|
+
title?: string | null;
|
|
166
|
+
description?: string | null;
|
|
167
|
+
amount: number;
|
|
168
|
+
status: string;
|
|
169
|
+
transfer_status?: string;
|
|
170
|
+
email_status?: string;
|
|
171
|
+
file_count?: number;
|
|
172
|
+
short_link?: string;
|
|
173
|
+
created_by?: string;
|
|
174
|
+
created_at: string;
|
|
175
|
+
updated_at: string;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Represents the API response structure for listing goods received notes.
|
|
179
|
+
*/
|
|
180
|
+
export interface BukkuGoodsReceivedNoteListApiResponse {
|
|
181
|
+
paging: BukkuListPagination;
|
|
182
|
+
transactions: BukkuGoodsReceivedNoteListItem[];
|
|
183
|
+
}
|
|
184
|
+
//# sourceMappingURL=type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/purchases/goods-received-notes/type.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,yBAAyB,EACzB,aAAa,EAAE,0BAA0B;AACzC,mBAAmB,EACpB,MAAM,mBAAmB,CAAC;AAE3B;;;GAGG;AACH,MAAM,WAAW,0CAA0C;IACzD,iEAAiE;IACjE,EA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B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,qCAAqC;IACpD,MAAM,EAAE,mBAAmB,CAAC;IAC5B,YAAY,EAAE,8BAA8B,EAAE,CAAC;CAChD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../../src/purchases/goods-received-notes/type.ts"],"names":[],"mappings":";AAAA,6CAA6C"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { BukkuAPIRequestFunction } from "../types";
|
|
2
|
+
import { PurchaseOrdersAPI } from "./purchase-orders";
|
|
3
|
+
import { GoodsReceivedNotesAPI } from "./goods-received-notes";
|
|
4
|
+
import { BillsAPI } from "./bills";
|
|
5
|
+
import { CreditNotesAPI } from "./credit-notes";
|
|
6
|
+
import { PaymentsAPI } from "./payments";
|
|
7
|
+
import { RefundsAPI } from "./refunds";
|
|
8
|
+
export declare class PurchasesAPI {
|
|
9
|
+
private _request;
|
|
10
|
+
readonly purchaseOrders: PurchaseOrdersAPI;
|
|
11
|
+
readonly goodsReceivedNotes: GoodsReceivedNotesAPI;
|
|
12
|
+
readonly bills: BillsAPI;
|
|
13
|
+
readonly creditNotes: CreditNotesAPI;
|
|
14
|
+
readonly payments: PaymentsAPI;
|
|
15
|
+
readonly refunds: RefundsAPI;
|
|
16
|
+
constructor(_request: BukkuAPIRequestFunction);
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/purchases/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,qBAAa,YAAY;IAQX,OAAO,CAAC,QAAQ;IAP5B,SAAgB,cAAc,EAAE,iBAAiB,CAAC;IAClD,SAAgB,kBAAkB,EAAE,qBAAqB,CAAC;IAC1D,SAAgB,KAAK,EAAE,QAAQ,CAAC;IAChC,SAAgB,WAAW,EAAE,cAAc,CAAC;IAC5C,SAAgB,QAAQ,EAAE,WAAW,CAAC;IACtC,SAAgB,OAAO,EAAE,UAAU,CAAC;gBAEhB,QAAQ,EAAE,uBAAuB;CAWtD"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PurchasesAPI = void 0;
|
|
4
|
+
const purchase_orders_1 = require("./purchase-orders");
|
|
5
|
+
const goods_received_notes_1 = require("./goods-received-notes");
|
|
6
|
+
const bills_1 = require("./bills");
|
|
7
|
+
const credit_notes_1 = require("./credit-notes");
|
|
8
|
+
const payments_1 = require("./payments");
|
|
9
|
+
const refunds_1 = require("./refunds");
|
|
10
|
+
class PurchasesAPI {
|
|
11
|
+
constructor(_request) {
|
|
12
|
+
this._request = _request;
|
|
13
|
+
this.purchaseOrders = new purchase_orders_1.PurchaseOrdersAPI(this._request);
|
|
14
|
+
this.goodsReceivedNotes = new goods_received_notes_1.GoodsReceivedNotesAPI(this._request);
|
|
15
|
+
this.bills = new bills_1.BillsAPI(this._request);
|
|
16
|
+
this.creditNotes = new credit_notes_1.CreditNotesAPI(this._request);
|
|
17
|
+
this.payments = new payments_1.PaymentsAPI(this._request);
|
|
18
|
+
this.refunds = new refunds_1.RefundsAPI(this._request);
|
|
19
|
+
// Future purchase-related modules (e.g., Purchase Payments) will be initialized here
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.PurchasesAPI = PurchasesAPI;
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/purchases/index.ts"],"names":[],"mappings":";;;AAEA,uDAAsD;AACtD,iEAA+D;AAC/D,mCAAmC;AACnC,iDAAgD;AAChD,yCAAyC;AACzC,uCAAuC;AAEvC,MAAa,YAAY;IAQvB,YAAoB,QAAiC;QAAjC,aAAQ,GAAR,QAAQ,CAAyB;QACnD,IAAI,CAAC,cAAc,GAAG,IAAI,mCAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC3D,IAAI,CAAC,kBAAkB,GAAG,IAAI,4CAAqB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACnE,IAAI,CAAC,KAAK,GAAG,IAAI,gBAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACzC,IAAI,CAAC,WAAW,GAAG,IAAI,6BAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACrD,IAAI,CAAC,QAAQ,GAAG,IAAI,sBAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC/C,IAAI,CAAC,OAAO,GAAG,IAAI,oBAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC7C,qFAAqF;IACvF,CAAC;CAGF;AAnBD,oCAmBC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { BukkuAPIRequestFunction } from "../../types";
|
|
2
|
+
import { BukkuPayment, BukkuPaymentCreateParams, BukkuPaymentListParams, BukkuPaymentListApiResponse, BukkuPaymentUpdateParams, BukkuPaymentStatusUpdateParams } from "./type";
|
|
3
|
+
export declare class PaymentsAPI {
|
|
4
|
+
private _request;
|
|
5
|
+
constructor(_request: BukkuAPIRequestFunction);
|
|
6
|
+
/**
|
|
7
|
+
* Creates a new payment.
|
|
8
|
+
* Endpoint: POST /purchases/payments
|
|
9
|
+
* @param data - The data for the new payment.
|
|
10
|
+
* @returns A promise that resolves to the created payment.
|
|
11
|
+
*/
|
|
12
|
+
create(data: BukkuPaymentCreateParams): Promise<BukkuPayment>;
|
|
13
|
+
/**
|
|
14
|
+
* Retrieves a paginated list of payments.
|
|
15
|
+
* Endpoint: GET /purchases/payments
|
|
16
|
+
* @param params - Optional parameters for filtering and pagination.
|
|
17
|
+
* @returns A promise that resolves to the API response for listing payments.
|
|
18
|
+
*/
|
|
19
|
+
list(params?: BukkuPaymentListParams): Promise<BukkuPaymentListApiResponse>;
|
|
20
|
+
/**
|
|
21
|
+
* Retrieves a specific payment by its ID.
|
|
22
|
+
* Endpoint: GET /purchases/payments/{id}
|
|
23
|
+
* @param id - The ID of the payment to retrieve.
|
|
24
|
+
* @returns A promise that resolves to the payment.
|
|
25
|
+
*/
|
|
26
|
+
get(id: string | number): Promise<BukkuPayment>;
|
|
27
|
+
/**
|
|
28
|
+
* Updates an existing payment.
|
|
29
|
+
* Endpoint: PUT /purchases/payments/{id}
|
|
30
|
+
* @param id - The ID of the payment to update.
|
|
31
|
+
* @param data - The data to update the payment with.
|
|
32
|
+
* @returns A promise that resolves to the updated payment.
|
|
33
|
+
*/
|
|
34
|
+
update(id: string | number, data: BukkuPaymentUpdateParams): Promise<BukkuPayment>;
|
|
35
|
+
/**
|
|
36
|
+
* Updates the status of an existing payment.
|
|
37
|
+
* Endpoint: PATCH /purchases/payments/{id}
|
|
38
|
+
* @param id - The ID of the payment to update.
|
|
39
|
+
* @param data - The data containing the new status.
|
|
40
|
+
* @returns A promise that resolves to the updated payment.
|
|
41
|
+
*/
|
|
42
|
+
updateStatus(id: string | number, data: BukkuPaymentStatusUpdateParams): Promise<BukkuPayment>;
|
|
43
|
+
/**
|
|
44
|
+
* Deletes a payment.
|
|
45
|
+
* Endpoint: DELETE /purchases/payments/{id}
|
|
46
|
+
* @param id - The ID of the payment to delete.
|
|
47
|
+
* @returns A promise that resolves when the payment is deleted.
|
|
48
|
+
*/
|
|
49
|
+
delete(id: string | number): Promise<void>;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/purchases/payments/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EACL,YAAY,EACZ,wBAAwB,EAExB,sBAAsB,EACtB,2BAA2B,EAC3B,wBAAwB,EACxB,8BAA8B,EAC/B,MAAM,QAAQ,CAAC;AAEhB,qBAAa,WAAW;IACV,OAAO,CAAC,QAAQ;gBAAR,QAAQ,EAAE,uBAAuB;IAErD;;;;;OAKG;IACG,MAAM,CAAC,IAAI,EAAE,wBAAwB,GAAG,OAAO,CAAC,YAAY,CAAC;IASnE;;;;;OAKG;IACG,IAAI,CAAC,MAAM,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,2BAA2B,CAAC;IASjF;;;;;OAKG;IACG,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAQrD;;;;;;OAMG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,IAAI,EAAE,wBAAwB,GAAG,OAAO,CAAC,YAAY,CAAC;IASxF;;;;;;OAMG;IACG,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,IAAI,EAAE,8BAA8B,GAAG,OAAO,CAAC,YAAY,CAAC;IASpG;;;;;OAKG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGjD"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// src/purchases/payments/index.ts
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.PaymentsAPI = void 0;
|
|
5
|
+
class PaymentsAPI {
|
|
6
|
+
constructor(_request) {
|
|
7
|
+
this._request = _request;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Creates a new payment.
|
|
11
|
+
* Endpoint: POST /purchases/payments
|
|
12
|
+
* @param data - The data for the new payment.
|
|
13
|
+
* @returns A promise that resolves to the created payment.
|
|
14
|
+
*/
|
|
15
|
+
async create(data) {
|
|
16
|
+
const response = await this._request("/purchases/payments", "POST", data);
|
|
17
|
+
return response.transaction;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Retrieves a paginated list of payments.
|
|
21
|
+
* Endpoint: GET /purchases/payments
|
|
22
|
+
* @param params - Optional parameters for filtering and pagination.
|
|
23
|
+
* @returns A promise that resolves to the API response for listing payments.
|
|
24
|
+
*/
|
|
25
|
+
async list(params) {
|
|
26
|
+
return this._request("/purchases/payments", "GET", undefined, params);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Retrieves a specific payment by its ID.
|
|
30
|
+
* Endpoint: GET /purchases/payments/{id}
|
|
31
|
+
* @param id - The ID of the payment to retrieve.
|
|
32
|
+
* @returns A promise that resolves to the payment.
|
|
33
|
+
*/
|
|
34
|
+
async get(id) {
|
|
35
|
+
const response = await this._request(`/purchases/payments/${id}`, "GET");
|
|
36
|
+
return response.transaction;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Updates an existing payment.
|
|
40
|
+
* Endpoint: PUT /purchases/payments/{id}
|
|
41
|
+
* @param id - The ID of the payment to update.
|
|
42
|
+
* @param data - The data to update the payment with.
|
|
43
|
+
* @returns A promise that resolves to the updated payment.
|
|
44
|
+
*/
|
|
45
|
+
async update(id, data) {
|
|
46
|
+
const response = await this._request(`/purchases/payments/${id}`, "PUT", data);
|
|
47
|
+
return response.transaction;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Updates the status of an existing payment.
|
|
51
|
+
* Endpoint: PATCH /purchases/payments/{id}
|
|
52
|
+
* @param id - The ID of the payment to update.
|
|
53
|
+
* @param data - The data containing the new status.
|
|
54
|
+
* @returns A promise that resolves to the updated payment.
|
|
55
|
+
*/
|
|
56
|
+
async updateStatus(id, data) {
|
|
57
|
+
const response = await this._request(`/purchases/payments/${id}`, "PATCH", data);
|
|
58
|
+
return response.transaction;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Deletes a payment.
|
|
62
|
+
* Endpoint: DELETE /purchases/payments/{id}
|
|
63
|
+
* @param id - The ID of the payment to delete.
|
|
64
|
+
* @returns A promise that resolves when the payment is deleted.
|
|
65
|
+
*/
|
|
66
|
+
async delete(id) {
|
|
67
|
+
await this._request(`/purchases/payments/${id}`, "DELETE");
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.PaymentsAPI = PaymentsAPI;
|
|
71
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/purchases/payments/index.ts"],"names":[],"mappings":";AAAA,kCAAkC;;;AAalC,MAAa,WAAW;IACtB,YAAoB,QAAiC;QAAjC,aAAQ,GAAR,QAAQ,CAAyB;IAAG,CAAC;IAEzD;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CAAC,IAA8B;QACzC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,QAAQ,CAClC,qBAAqB,EACrB,MAAM,EACN,IAAI,CACL,CAAC;QACF,OAAO,QAAQ,CAAC,WAAW,CAAC;IAC9B,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,IAAI,CAAC,MAA+B;QACxC,OAAO,IAAI,CAAC,QAAQ,CAClB,qBAAqB,EACrB,KAAK,EACL,SAAS,EACT,MAAM,CACP,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,GAAG,CAAC,EAAmB;QAC3B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,QAAQ,CAClC,uBAAuB,EAAE,EAAE,EAC3B,KAAK,CACN,CAAC;QACF,OAAO,QAAQ,CAAC,WAAW,CAAC;IAC9B,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,MAAM,CAAC,EAAmB,EAAE,IAA8B;QAC9D,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,QAAQ,CAClC,uBAAuB,EAAE,EAAE,EAC3B,KAAK,EACL,IAAI,CACL,CAAC;QACF,OAAO,QAAQ,CAAC,WAAW,CAAC;IAC9B,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,YAAY,CAAC,EAAmB,EAAE,IAAoC;QAC1E,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,QAAQ,CAClC,uBAAuB,EAAE,EAAE,EAC3B,OAAO,EACP,IAAI,CACL,CAAC;QACF,OAAO,QAAQ,CAAC,WAAW,CAAC;IAC9B,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CAAC,EAAmB;QAC9B,MAAM,IAAI,CAAC,QAAQ,CAAO,uBAAuB,EAAE,EAAE,EAAE,QAAQ,CAAC,CAAC;IACnE,CAAC;CACF;AAxFD,kCAwFC"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { BukkuEmailDetails, BukkuFileAttachment, BukkuAttachedFileResponse, BukkuListPagination } from "../../common/type";
|
|
2
|
+
import { BukkuBillLinkedItem } from "../bills/type";
|
|
3
|
+
/**
|
|
4
|
+
* Represents a link item for creating/updating a Bukku Purchase Payment.
|
|
5
|
+
* Specifies which transactions the payment is applied to.
|
|
6
|
+
*/
|
|
7
|
+
export interface BukkuPaymentLinkItemCreateParams {
|
|
8
|
+
id?: number;
|
|
9
|
+
target_transaction_id: number;
|
|
10
|
+
apply_amount: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Represents a deposit item for creating/updating a Bukku Purchase Payment.
|
|
14
|
+
*/
|
|
15
|
+
export interface BukkuPaymentDepositItemCreateParams {
|
|
16
|
+
id?: number;
|
|
17
|
+
payment_method_id?: number;
|
|
18
|
+
account_id: number;
|
|
19
|
+
amount: number;
|
|
20
|
+
number?: string;
|
|
21
|
+
fee_text?: string;
|
|
22
|
+
fee_account_id?: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Parameters for creating a Bukku Purchase Payment.
|
|
26
|
+
* Based on POST /purchases/payments
|
|
27
|
+
*/
|
|
28
|
+
export interface BukkuPaymentCreateParams {
|
|
29
|
+
contact_id: number;
|
|
30
|
+
number?: string;
|
|
31
|
+
number2?: string;
|
|
32
|
+
date: string;
|
|
33
|
+
currency_code: string;
|
|
34
|
+
exchange_rate: number;
|
|
35
|
+
amount: number;
|
|
36
|
+
tag_ids?: number[];
|
|
37
|
+
description?: string;
|
|
38
|
+
remarks?: string;
|
|
39
|
+
link_items?: BukkuPaymentLinkItemCreateParams[];
|
|
40
|
+
deposit_items: BukkuPaymentDepositItemCreateParams[];
|
|
41
|
+
status: "draft" | "pending_approval" | "ready";
|
|
42
|
+
email?: BukkuEmailDetails;
|
|
43
|
+
files?: BukkuFileAttachment[];
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Represents a link item as returned in a Bukku Payment response (how payment is applied).
|
|
47
|
+
*/
|
|
48
|
+
export interface BukkuPaymentAppliedLinkItem {
|
|
49
|
+
id: number;
|
|
50
|
+
target_transaction_id: number;
|
|
51
|
+
type: string;
|
|
52
|
+
number: string;
|
|
53
|
+
date: string;
|
|
54
|
+
description: string;
|
|
55
|
+
amount: number;
|
|
56
|
+
balance: number;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Represents a deposit item as returned in a Bukku Payment response.
|
|
60
|
+
*/
|
|
61
|
+
export interface BukkuPaymentDepositItem {
|
|
62
|
+
id: number;
|
|
63
|
+
line: number;
|
|
64
|
+
payment_method_id: number;
|
|
65
|
+
account_id: number;
|
|
66
|
+
amount: number;
|
|
67
|
+
number: string;
|
|
68
|
+
fee_text: string | number | null;
|
|
69
|
+
fee_account_id: number | null;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Represents a Bukku Purchase Payment object as returned by the API.
|
|
73
|
+
* Based on the response sample for POST /purchases/payments
|
|
74
|
+
*/
|
|
75
|
+
export interface BukkuPayment {
|
|
76
|
+
id: number;
|
|
77
|
+
contact_id: number;
|
|
78
|
+
contact_name: string;
|
|
79
|
+
date: string;
|
|
80
|
+
currency_code: string;
|
|
81
|
+
currency_symbol: string;
|
|
82
|
+
exchange_rate: number;
|
|
83
|
+
amount: number;
|
|
84
|
+
number: string;
|
|
85
|
+
number2: string | null;
|
|
86
|
+
tag_ids: number[] | null;
|
|
87
|
+
tag_names: string[] | null;
|
|
88
|
+
link_items: BukkuPaymentAppliedLinkItem[] | null;
|
|
89
|
+
linked_items: BukkuBillLinkedItem[] | null;
|
|
90
|
+
deposit_items: BukkuPaymentDepositItem[] | null;
|
|
91
|
+
remarks: string | null;
|
|
92
|
+
description: string | null;
|
|
93
|
+
balance: number;
|
|
94
|
+
status: string;
|
|
95
|
+
type: string;
|
|
96
|
+
short_link: string | null;
|
|
97
|
+
files: BukkuAttachedFileResponse[] | null;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Represents the API response structure when a payment is created or retrieved.
|
|
101
|
+
*/
|
|
102
|
+
export interface BukkuPaymentResponse {
|
|
103
|
+
transaction: BukkuPayment;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Parameters for updating a Bukku Purchase Payment.
|
|
107
|
+
* (Assumed structure, similar to other PUT endpoints and create parameters)
|
|
108
|
+
*/
|
|
109
|
+
export interface BukkuPaymentUpdateParams {
|
|
110
|
+
contact_id: number;
|
|
111
|
+
number: string;
|
|
112
|
+
number2?: string;
|
|
113
|
+
date: string;
|
|
114
|
+
currency_code: string;
|
|
115
|
+
exchange_rate: number;
|
|
116
|
+
amount: number;
|
|
117
|
+
tag_ids?: number[];
|
|
118
|
+
description?: string;
|
|
119
|
+
remarks?: string;
|
|
120
|
+
link_items?: BukkuPaymentLinkItemCreateParams[];
|
|
121
|
+
deposit_items: BukkuPaymentDepositItemCreateParams[];
|
|
122
|
+
email?: BukkuEmailDetails;
|
|
123
|
+
files?: BukkuFileAttachment[];
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Parameters for updating the status of a Bukku Purchase Payment.
|
|
127
|
+
*/
|
|
128
|
+
export interface BukkuPaymentStatusUpdateParams {
|
|
129
|
+
status: "draft" | "pending_approval" | "ready" | "void";
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Parameters for listing Bukku Purchase Payments.
|
|
133
|
+
* Based on GET /purchases/payments
|
|
134
|
+
*/
|
|
135
|
+
export interface BukkuPaymentListParams {
|
|
136
|
+
search?: string;
|
|
137
|
+
custom_search?: string;
|
|
138
|
+
contact_id?: number;
|
|
139
|
+
date_from?: string;
|
|
140
|
+
date_to?: string;
|
|
141
|
+
status?: "all" | "draft" | "pending_approval" | "ready" | "void";
|
|
142
|
+
payment_status?: "paid" | "outstanding";
|
|
143
|
+
email_status?: "UNSENT" | "PENDING" | "SENT" | "BOUNCED" | "OPENED" | "VIEWED";
|
|
144
|
+
account_id?: string;
|
|
145
|
+
page?: number;
|
|
146
|
+
page_size?: number;
|
|
147
|
+
sort_by?: "number" | "date" | "contact_name" | "number2" | "description" | "amount" | "balance" | "created_at";
|
|
148
|
+
sort_dir?: "asc" | "desc";
|
|
149
|
+
[key: string]: any;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Represents a summary of a Bukku Purchase Payment as it might appear in a list.
|
|
153
|
+
* (Assumed structure, similar to other list items)
|
|
154
|
+
*/
|
|
155
|
+
export interface BukkuPaymentListItem {
|
|
156
|
+
id: number;
|
|
157
|
+
contact_id: number;
|
|
158
|
+
contact_name: string;
|
|
159
|
+
number: string;
|
|
160
|
+
number2: string | null;
|
|
161
|
+
date: string;
|
|
162
|
+
currency_code: string;
|
|
163
|
+
currency_symbol: string;
|
|
164
|
+
exchange_rate: number;
|
|
165
|
+
amount: number;
|
|
166
|
+
balance?: number;
|
|
167
|
+
status: string;
|
|
168
|
+
description?: string | null;
|
|
169
|
+
tag_names?: string[] | null;
|
|
170
|
+
file_count?: number;
|
|
171
|
+
short_link?: string;
|
|
172
|
+
created_by?: string;
|
|
173
|
+
created_at: string;
|
|
174
|
+
updated_at: string;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Represents the API response structure for listing purchase payments.
|
|
178
|
+
*/
|
|
179
|
+
export interface BukkuPaymentListApiResponse {
|
|
180
|
+
paging: BukkuListPagination;
|
|
181
|
+
transactions: BukkuPaymentListItem[];
|
|
182
|
+
}
|
|
183
|
+
//# sourceMappingURL=type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/purchases/payments/type.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,yBAAyB,EACzB,mBAAmB,EAEpB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpD;;;GAGG;AACH,MAAM,WAAW,gCAAgC;IAC/C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,qBAAqB,EAAE,MAAM,CAAC;IAC9B,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAClD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,MA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,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,mBAAmB,CAAC;IAC5B,YAAY,EAAE,oBAAoB,EAAE,CAAC;CACtC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../../src/purchases/payments/type.ts"],"names":[],"mappings":";AAAA,iCAAiC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { BukkuAPIRequestFunction } from "../../types";
|
|
2
|
+
import { BukkuPurchaseOrder, BukkuPurchaseOrderCreateParams, BukkuPurchaseOrderListParams, BukkuPurchaseOrderListApiResponse, BukkuPurchaseOrderUpdateParams, BukkuPurchaseOrderStatusUpdateParams } from "./type";
|
|
3
|
+
export declare class PurchaseOrdersAPI {
|
|
4
|
+
private _request;
|
|
5
|
+
constructor(_request: BukkuAPIRequestFunction);
|
|
6
|
+
/**
|
|
7
|
+
* Creates a new purchase order.
|
|
8
|
+
* Endpoint: POST /purchases/orders
|
|
9
|
+
* @param data - The data for the new purchase order.
|
|
10
|
+
* @returns A promise that resolves to the created purchase order.
|
|
11
|
+
*/
|
|
12
|
+
create(data: BukkuPurchaseOrderCreateParams): Promise<BukkuPurchaseOrder>;
|
|
13
|
+
/**
|
|
14
|
+
* Retrieves a paginated list of purchase orders.
|
|
15
|
+
* Endpoint: GET /purchases/orders
|
|
16
|
+
* @param params - Optional parameters for filtering and pagination.
|
|
17
|
+
* @returns A promise that resolves to the API response for listing purchase orders.
|
|
18
|
+
*/
|
|
19
|
+
list(params?: BukkuPurchaseOrderListParams): Promise<BukkuPurchaseOrderListApiResponse>;
|
|
20
|
+
/**
|
|
21
|
+
* Retrieves a specific purchase order by its ID.
|
|
22
|
+
* Endpoint: GET /purchases/orders/{id}
|
|
23
|
+
* @param id - The ID of the purchase order to retrieve.
|
|
24
|
+
* @returns A promise that resolves to the purchase order.
|
|
25
|
+
*/
|
|
26
|
+
get(id: string | number): Promise<BukkuPurchaseOrder>;
|
|
27
|
+
/**
|
|
28
|
+
* Updates an existing purchase order.
|
|
29
|
+
* Endpoint: PUT /purchases/orders/{id}
|
|
30
|
+
* @param id - The ID of the purchase order to update.
|
|
31
|
+
* @param data - The data to update the purchase order with.
|
|
32
|
+
* @returns A promise that resolves to the updated purchase order.
|
|
33
|
+
*/
|
|
34
|
+
update(id: string | number, data: BukkuPurchaseOrderUpdateParams): Promise<BukkuPurchaseOrder>;
|
|
35
|
+
/**
|
|
36
|
+
* Deletes a purchase order.
|
|
37
|
+
* Endpoint: DELETE /purchases/orders/{id}
|
|
38
|
+
* @param id - The ID of the purchase order to delete.
|
|
39
|
+
* @returns A promise that resolves when the purchase order is deleted.
|
|
40
|
+
*/
|
|
41
|
+
delete(id: string | number): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Updates the status of an existing purchase order.
|
|
44
|
+
* Endpoint: PATCH /purchases/orders/{id}
|
|
45
|
+
* @param id - The ID of the purchase order to update.
|
|
46
|
+
* @param data - The data containing the new status.
|
|
47
|
+
* @returns A promise that resolves to the updated purchase order.
|
|
48
|
+
*/
|
|
49
|
+
updateStatus(id: string | number, data: BukkuPurchaseOrderStatusUpdateParams): Promise<BukkuPurchaseOrder>;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/purchases/purchase-orders/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EACL,kBAAkB,EAClB,8BAA8B,EAE9B,4BAA4B,EAC5B,iCAAiC,EACjC,8BAA8B,EAC9B,oCAAoC,EACrC,MAAM,QAAQ,CAAC;AAEhB,qBAAa,iBAAiB;IAChB,OAAO,CAAC,QAAQ;gBAAR,QAAQ,EAAE,uBAAuB;IAErD;;;;;OAKG;IACG,MAAM,CACV,IAAI,EAAE,8BAA8B,GACnC,OAAO,CAAC,kBAAkB,CAAC;IAS9B;;;;;OAKG;IACG,IAAI,CACR,MAAM,CAAC,EAAE,4BAA4B,GACpC,OAAO,CAAC,iCAAiC,CAAC;IAS7C;;;;;OAKG;IACG,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAQ3D;;;;;;OAMG;IACG,MAAM,CACV,EAAE,EAAE,MAAM,GAAG,MAAM,EACnB,IAAI,EAAE,8BAA8B,GACnC,OAAO,CAAC,kBAAkB,CAAC;IAS9B;;;;;OAKG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIhD;;;;;;OAMG;IACG,YAAY,CAChB,EAAE,EAAE,MAAM,GAAG,MAAM,EACnB,IAAI,EAAE,oCAAoC,GACzC,OAAO,CAAC,kBAAkB,CAAC;CAQ/B"}
|