@chift/chift-nodejs 1.0.22 → 1.0.23

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.
@@ -56,7 +56,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
56
56
  date_from: string;
57
57
  date_to: string;
58
58
  location_id?: string | undefined;
59
- state?: "open" | "closed" | "all" | undefined;
59
+ state?: "all" | "open" | "closed" | undefined;
60
60
  }): import("../types/api").RequestData<{
61
61
  id: string;
62
62
  order_number?: string | undefined;
@@ -75,11 +75,11 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
75
75
  loyalty?: number | undefined;
76
76
  customer_id?: string | undefined;
77
77
  location_id?: string | undefined;
78
- taxes?: {
78
+ taxes: {
79
79
  tax_rate: number;
80
80
  tax_amount: number;
81
81
  total: number;
82
- }[] | undefined;
82
+ }[];
83
83
  guests?: number | undefined;
84
84
  payments: {
85
85
  id?: string | undefined;
@@ -122,7 +122,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
122
122
  phone?: string | undefined;
123
123
  email?: string | undefined;
124
124
  created_on?: string | undefined;
125
- addresses?: {
125
+ addresses: {
126
126
  address_type?: string | undefined;
127
127
  name?: string | undefined;
128
128
  street?: string | undefined;
@@ -131,7 +131,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
131
131
  city?: string | undefined;
132
132
  postal_code?: string | undefined;
133
133
  country?: string | undefined;
134
- }[] | undefined;
134
+ }[];
135
135
  loyalty?: number | undefined;
136
136
  birthdate?: string | undefined;
137
137
  }[]>;
@@ -153,11 +153,11 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
153
153
  loyalty?: number | undefined;
154
154
  customer_id?: string | undefined;
155
155
  location_id?: string | undefined;
156
- taxes?: {
156
+ taxes: {
157
157
  tax_rate: number;
158
158
  tax_amount: number;
159
159
  total: number;
160
- }[] | undefined;
160
+ }[];
161
161
  guests?: number | undefined;
162
162
  payments: {
163
163
  id?: string | undefined;
@@ -196,7 +196,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
196
196
  phone?: string | undefined;
197
197
  email?: string | undefined;
198
198
  created_on?: string | undefined;
199
- addresses?: {
199
+ addresses: {
200
200
  address_type?: string | undefined;
201
201
  name?: string | undefined;
202
202
  street?: string | undefined;
@@ -205,7 +205,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
205
205
  city?: string | undefined;
206
206
  postal_code?: string | undefined;
207
207
  country?: string | undefined;
208
- }[] | undefined;
208
+ }[];
209
209
  loyalty?: number | undefined;
210
210
  birthdate?: string | undefined;
211
211
  }>;
@@ -231,7 +231,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
231
231
  phone?: string | undefined;
232
232
  email?: string | undefined;
233
233
  created_on?: string | undefined;
234
- addresses?: {
234
+ addresses: {
235
235
  address_type?: string | undefined;
236
236
  name?: string | undefined;
237
237
  street?: string | undefined;
@@ -240,7 +240,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
240
240
  city?: string | undefined;
241
241
  postal_code?: string | undefined;
242
242
  country?: string | undefined;
243
- }[] | undefined;
243
+ }[];
244
244
  loyalty?: number | undefined;
245
245
  birthdate?: string | undefined;
246
246
  }>;
@@ -283,11 +283,11 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
283
283
  }): import("../types/api").RequestData<{
284
284
  total: number;
285
285
  tax_amount: number;
286
- taxes?: {
286
+ taxes: {
287
287
  tax_rate: number;
288
288
  tax_amount: number;
289
289
  total: number;
290
- }[] | undefined;
290
+ }[];
291
291
  }>;
292
292
  getClosure(date: string, params?: {
293
293
  location_id?: string | undefined;
@@ -328,11 +328,11 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
328
328
  loyalty?: number | undefined;
329
329
  customer_id?: string | undefined;
330
330
  location_id?: string | undefined;
331
- taxes?: {
331
+ taxes: {
332
332
  tax_rate: number;
333
333
  tax_amount: number;
334
334
  total: number;
335
- }[] | undefined;
335
+ }[];
336
336
  guests?: number | undefined;
337
337
  payments: {
338
338
  id?: string | undefined;
@@ -416,11 +416,11 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
416
416
  loyalty?: number | undefined;
417
417
  customer_id?: string | undefined;
418
418
  location_id?: string | undefined;
419
- taxes?: {
419
+ taxes: {
420
420
  tax_rate: number;
421
421
  tax_amount: number;
422
422
  total: number;
423
- }[] | undefined;
423
+ }[];
424
424
  guests?: number | undefined;
425
425
  items: {
426
426
  id: string;
@@ -1255,6 +1255,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
1255
1255
  folder_id?: string | undefined;
1256
1256
  force_financial_period?: string | undefined;
1257
1257
  regroup_lines?: "true" | "false" | undefined;
1258
+ force_currency_exchange?: "true" | "false" | undefined;
1258
1259
  } | undefined): import("../types/api").RequestData<{
1259
1260
  invoice_type: "customer_invoice" | "customer_refund" | "supplier_invoice" | "supplier_refund";
1260
1261
  invoice_number?: string | undefined;
@@ -1358,6 +1359,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
1358
1359
  folder_id?: string | undefined;
1359
1360
  force_financial_period?: string | undefined;
1360
1361
  regroup_lines?: "true" | "false" | undefined;
1362
+ force_currency_exchange?: "true" | "false" | undefined;
1361
1363
  } | undefined): import("../types/api").RequestData<{
1362
1364
  invoice_type: "customer_invoice" | "customer_refund" | "supplier_invoice" | "supplier_refund";
1363
1365
  invoice_number?: string | undefined;
@@ -1872,7 +1874,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
1872
1874
  line_number: number;
1873
1875
  description?: string | undefined;
1874
1876
  amount: number;
1875
- type: "customer_account" | "general_account" | "supplier_account";
1877
+ type: "customer_account" | "supplier_account" | "general_account";
1876
1878
  account_number: string;
1877
1879
  partner_id?: string | undefined;
1878
1880
  analytic_account?: string | undefined;
@@ -1890,7 +1892,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
1890
1892
  line_number: number;
1891
1893
  description?: string | undefined;
1892
1894
  amount: number;
1893
- type: "customer_account" | "general_account" | "supplier_account";
1895
+ type: "customer_account" | "supplier_account" | "general_account";
1894
1896
  account_number: string;
1895
1897
  partner_id?: string | undefined;
1896
1898
  analytic_account?: string | undefined;
@@ -1908,7 +1910,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
1908
1910
  line_number: number;
1909
1911
  description?: string | undefined;
1910
1912
  amount: number;
1911
- type: "customer_account" | "general_account" | "supplier_account";
1913
+ type: "customer_account" | "supplier_account" | "general_account";
1912
1914
  account_number: string;
1913
1915
  partner_id?: string | undefined;
1914
1916
  analytic_account?: string | undefined;
@@ -1928,7 +1930,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
1928
1930
  line_number: number;
1929
1931
  description?: string | undefined;
1930
1932
  amount: number;
1931
- type: "customer_account" | "general_account" | "supplier_account";
1933
+ type: "customer_account" | "supplier_account" | "general_account";
1932
1934
  account_number: string;
1933
1935
  partner_id?: string | undefined;
1934
1936
  analytic_account?: string | undefined;
@@ -1947,9 +1949,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
1947
1949
  headers: {
1948
1950
  [name: string]: unknown;
1949
1951
  };
1950
- content: {
1951
- 'application/json': unknown;
1952
- };
1952
+ content?: undefined;
1953
1953
  }>;
1954
1954
  getAttachments(params: {
1955
1955
  folder_id?: string | undefined;
@@ -2037,7 +2037,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
2037
2037
  reference?: string | undefined;
2038
2038
  number?: string | undefined;
2039
2039
  items: {
2040
- type: "customer_account" | "general_account" | "supplier_account" | "employee_account";
2040
+ type: "customer_account" | "supplier_account" | "employee_account" | "general_account";
2041
2041
  account_number: string;
2042
2042
  partner_id?: string | undefined;
2043
2043
  amount: number;
@@ -2047,6 +2047,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
2047
2047
  }, params?: {
2048
2048
  folder_id?: string | undefined;
2049
2049
  financial_counterpart_account?: string | undefined;
2050
+ force_currency_exchange?: "true" | "false" | undefined;
2050
2051
  } | undefined): import("../types/api").RequestData<{
2051
2052
  date: string;
2052
2053
  journal_id: string;
@@ -2056,7 +2057,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
2056
2057
  id: string;
2057
2058
  number: string;
2058
2059
  items: {
2059
- type: "customer_account" | "general_account" | "supplier_account" | "employee_account";
2060
+ type: "customer_account" | "supplier_account" | "employee_account" | "general_account";
2060
2061
  account_number: string;
2061
2062
  partner_id?: string | undefined;
2062
2063
  amount: number;
@@ -2072,7 +2073,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
2072
2073
  reference?: string | undefined;
2073
2074
  number?: string | undefined;
2074
2075
  items: {
2075
- account_type: "customer_account" | "general_account" | "supplier_account" | "employee_account";
2076
+ account_type: "customer_account" | "supplier_account" | "employee_account" | "general_account";
2076
2077
  account: string;
2077
2078
  amount: number;
2078
2079
  description?: string | undefined;
@@ -2081,6 +2082,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
2081
2082
  }, params?: {
2082
2083
  folder_id?: string | undefined;
2083
2084
  financial_counterpart_account?: string | undefined;
2085
+ force_currency_exchange?: "true" | "false" | undefined;
2084
2086
  } | undefined): import("../types/api").RequestData<{
2085
2087
  date: string;
2086
2088
  journal_id: string;
@@ -2090,13 +2092,13 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
2090
2092
  id: string;
2091
2093
  number: string;
2092
2094
  items: {
2093
- account_type: "customer_account" | "general_account" | "supplier_account" | "employee_account";
2095
+ account_type: "customer_account" | "supplier_account" | "employee_account" | "general_account";
2094
2096
  account: string;
2095
2097
  amount: number;
2096
2098
  description?: string | undefined;
2097
2099
  counterpart_account: string;
2098
2100
  }[];
2099
- }[]>;
2101
+ }>;
2100
2102
  createJournalEntryOld(journal_entry: {
2101
2103
  reference?: string | undefined;
2102
2104
  due_date?: string | undefined;
@@ -2159,7 +2161,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
2159
2161
  currency_exchange_rate: number;
2160
2162
  date: string;
2161
2163
  items: {
2162
- account_type: "customer_account" | "general_account" | "supplier_account" | "employee_account";
2164
+ account_type: "customer_account" | "supplier_account" | "employee_account" | "general_account";
2163
2165
  account: string;
2164
2166
  force_general_account?: string | undefined;
2165
2167
  prioritise_thirdparty_account: boolean;
@@ -2248,6 +2250,49 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
2248
2250
  end: string;
2249
2251
  closed: boolean;
2250
2252
  }[]>;
2253
+ createLedgerAccount(account: {
2254
+ name: string;
2255
+ number: string;
2256
+ }, params?: {
2257
+ folder_id?: string | undefined;
2258
+ } | undefined): import("../types/api").RequestData<{
2259
+ number: string;
2260
+ name: string;
2261
+ active: boolean;
2262
+ type?: "vat" | "bank" | "cash" | "other_financial" | "receivable" | "payable" | "income" | "expense" | "other" | undefined;
2263
+ }>;
2264
+ getJournalEntry(journalEntryId: string, params?: {
2265
+ folder_id?: string | undefined;
2266
+ } | undefined): import("../types/api").RequestData<{
2267
+ reference?: string | undefined;
2268
+ due_date?: string | undefined;
2269
+ journal_id: string;
2270
+ name?: string | undefined;
2271
+ journal_name: string;
2272
+ date: string;
2273
+ posted: boolean;
2274
+ id: string;
2275
+ items: {
2276
+ account_number: string;
2277
+ partner_id?: string | undefined;
2278
+ description?: string | undefined;
2279
+ debit: number;
2280
+ credit: number;
2281
+ currency: string;
2282
+ currency_exchange_rate: number;
2283
+ id: string;
2284
+ partner_name?: string | undefined;
2285
+ account_name: string;
2286
+ matching_numbers: string[];
2287
+ analytic_distribution: {
2288
+ analytic_plan: string;
2289
+ analytic_accounts: {
2290
+ analytic_account: string;
2291
+ percentage: number;
2292
+ }[];
2293
+ }[];
2294
+ }[];
2295
+ }>;
2251
2296
  }>;
2252
2297
  invoicing: import("../types/api").ApiFor<{
2253
2298
  getInvoices(params?: {
@@ -2645,7 +2690,7 @@ declare const Consumer: (internalApi: InternalAPI, body: operations[chiftOperati
2645
2690
  } | undefined;
2646
2691
  }>;
2647
2692
  getContacts(params?: {
2648
- contact_type?: "all" | "supplier" | "prospect" | "customer" | undefined;
2693
+ contact_type?: "supplier" | "all" | "prospect" | "customer" | undefined;
2649
2694
  } | undefined): import("../types/api").RequestData<{
2650
2695
  id: string;
2651
2696
  source_ref: {