@qite/tide-client 1.1.32 → 1.1.34

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.
@@ -2,6 +2,7 @@ import {
2
2
  AgentInvoiceItem,
3
3
  AgentPrintAction,
4
4
  AgentPrintActionRequest,
5
+ Column,
5
6
  CustomEntryStatusItem,
6
7
  DossierViewResult,
7
8
  EntryTotals,
@@ -38,16 +39,19 @@ export declare const print: (
38
39
  export declare const getEntryList: (
39
40
  config: TideClientConfig,
40
41
  filterItem: FilterItem,
42
+ gridColumns?: Column[] | undefined,
41
43
  signal?: AbortSignal | undefined
42
44
  ) => Promise<PageResult<DossierViewResult>>;
43
45
  export declare const getEntryTotals: (
44
46
  config: TideClientConfig,
45
47
  filterItem: FilterItem,
48
+ gridColumns?: Column[] | undefined,
46
49
  signal?: AbortSignal | undefined
47
50
  ) => Promise<EntryTotals>;
48
51
  export declare const getInvoiceList: (
49
52
  config: TideClientConfig,
50
53
  filterItem: FilterItem,
54
+ gridColumns?: Column[] | undefined,
51
55
  signal?: AbortSignal | undefined
52
56
  ) => Promise<PageResult<AgentInvoiceItem>>;
53
57
  export declare const getCustomEntryStatus: (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qite/tide-client",
3
- "version": "1.1.32",
3
+ "version": "1.1.34",
4
4
  "description": "Frontend client for Tide",
5
5
  "main": "build/index.js",
6
6
  "scripts": {
@@ -3,6 +3,7 @@ import {
3
3
  AgentInvoiceItem,
4
4
  AgentPrintAction,
5
5
  AgentPrintActionRequest,
6
+ Column,
6
7
  CustomEntryStatusItem,
7
8
  DossierViewResult,
8
9
  EntryTotals,
@@ -61,10 +62,16 @@ export const print = (
61
62
  export const getEntryList = (
62
63
  config: TideClientConfig,
63
64
  filterItem: FilterItem,
65
+ gridColumns?: Column[],
64
66
  signal?: AbortSignal
65
67
  ): Promise<PageResult<DossierViewResult>> => {
66
- const params = createParams(filterItem, false);
67
- const url = `${config.host}${ENDPOINT}/entry/list?${params}`;
68
+ const params = createParams(filterItem, false, gridColumns);
69
+ const queryString = Object.keys(params)
70
+ .map(
71
+ (key) => `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`
72
+ )
73
+ .join("&");
74
+ const url = `${config.host}${ENDPOINT}/entry/list?${queryString}`;
68
75
  const apiKey = config.apiKey;
69
76
 
70
77
  return get<PageResult<DossierViewResult>>(
@@ -79,10 +86,16 @@ export const getEntryList = (
79
86
  export const getEntryTotals = (
80
87
  config: TideClientConfig,
81
88
  filterItem: FilterItem,
89
+ gridColumns?: Column[],
82
90
  signal?: AbortSignal
83
91
  ): Promise<EntryTotals> => {
84
- const params = createParams(filterItem, false);
85
- const url = `${config.host}${ENDPOINT}/entry/total?${params}`;
92
+ const params = createParams(filterItem, false, gridColumns);
93
+ const queryString = Object.keys(params)
94
+ .map(
95
+ (key) => `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`
96
+ )
97
+ .join("&");
98
+ const url = `${config.host}${ENDPOINT}/entry/total?${queryString}`;
86
99
  const apiKey = config.apiKey;
87
100
 
88
101
  return get<EntryTotals>(url, apiKey, config.token, signal, true);
@@ -91,10 +104,16 @@ export const getEntryTotals = (
91
104
  export const getInvoiceList = (
92
105
  config: TideClientConfig,
93
106
  filterItem: FilterItem,
107
+ gridColumns?: Column[],
94
108
  signal?: AbortSignal
95
109
  ): Promise<PageResult<AgentInvoiceItem>> => {
96
- const params = createParams(filterItem, false);
97
- const url = `${config.host}${ENDPOINT}/invoice/list?${params}`;
110
+ const params = createParams(filterItem, false, gridColumns);
111
+ const queryString = Object.keys(params)
112
+ .map(
113
+ (key) => `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`
114
+ )
115
+ .join("&");
116
+ const url = `${config.host}${ENDPOINT}/invoice/list?${queryString}`;
98
117
  const apiKey = config.apiKey;
99
118
 
100
119
  return get<PageResult<AgentInvoiceItem>>(