@akinon/next 1.19.3 → 1.20.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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @akinon/next
2
2
 
3
+ ## 1.20.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 86a9561: ZERO-2416: Update translations and refactor my quotations
8
+
9
+ ## 1.19.4
10
+
3
11
  ## 1.19.3
4
12
 
5
13
  ## 1.19.2
File without changes
File without changes
File without changes
package/bin/pz-postdev.js CHANGED
File without changes
File without changes
File without changes
File without changes
package/bin/pz-predev.js CHANGED
File without changes
File without changes
@@ -26,6 +26,14 @@ interface GetOrdersParams {
26
26
  export interface GetQuotationsResponse {
27
27
  count: number;
28
28
  results: Quotations[];
29
+ next: string | null;
30
+ previous: string | null;
31
+ }
32
+
33
+ export interface GetQuotationsParams {
34
+ page?: number;
35
+ status?: string;
36
+ limit?: number;
29
37
  }
30
38
 
31
39
  export type PasswordResetType = {
@@ -111,8 +119,9 @@ const accountApi = api.injectEndpoints({
111
119
  account.getOrders({ page, limit, createdDate, endDate })
112
120
  )
113
121
  }),
114
- getQuotations: builder.query<GetQuotationsResponse, void>({
115
- query: () => buildClientRequestUrl(account.getQuotations)
122
+ getQuotations: builder.query<GetQuotationsResponse, GetQuotationsParams>({
123
+ query: ({ page, status, limit }) =>
124
+ buildClientRequestUrl(account.getQuotations(page, status, limit))
116
125
  }),
117
126
  sendContact: builder.mutation<void, ContactFormType>({
118
127
  query: (body) => ({
package/data/urls.ts CHANGED
@@ -27,7 +27,10 @@ export const account = {
27
27
  `/users/orders/?page=${page || 1}&limit=${limit || 12} ${
28
28
  createdDate ? `&created_date__gte=${createdDate}` : ''
29
29
  } ${endDate ? `&created_date__lte=${endDate}` : ''}`,
30
- getQuotations: '/b2b/my-quotations',
30
+ getQuotations: (page?: number, status?: string, limit?: number) =>
31
+ `/b2b/my-quotations/?page=${page || 1}` +
32
+ (status ? `&status=${status}` : '') +
33
+ (limit ? `&limit=${limit}` : ''),
31
34
  sendContact: '/users/contact-us',
32
35
  passwordReset: (slug: string) => `/users/reset/${slug}`,
33
36
  anonymize: '/users/anonymize/',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@akinon/next",
3
3
  "description": "Core package for Project Zero Next",
4
- "version": "1.19.3",
4
+ "version": "1.20.0",
5
5
  "private": false,
6
6
  "license": "MIT",
7
7
  "bin": {
@@ -31,7 +31,7 @@
31
31
  "@typescript-eslint/eslint-plugin": "6.7.4",
32
32
  "@typescript-eslint/parser": "6.7.4",
33
33
  "eslint": "^8.14.0",
34
- "@akinon/eslint-plugin-projectzero": "1.19.3",
34
+ "@akinon/eslint-plugin-projectzero": "1.20.0",
35
35
  "eslint-config-prettier": "8.5.0"
36
36
  }
37
37
  }