@randock/nameshift-api-client 0.0.243 → 0.0.245

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.
Files changed (42) hide show
  1. package/.openapi-generator/FILES +8 -1
  2. package/README.md +3 -3
  3. package/dist/apis/DomainsPublicApi.d.ts +4 -4
  4. package/dist/apis/DomainsPublicApi.js +8 -8
  5. package/dist/apis/SalesPublicApi.d.ts +29 -0
  6. package/dist/apis/SalesPublicApi.js +125 -0
  7. package/dist/apis/index.d.ts +1 -1
  8. package/dist/apis/index.js +1 -1
  9. package/dist/models/CursorBasedPageInfo.d.ts +38 -0
  10. package/dist/models/CursorBasedPageInfo.js +55 -0
  11. package/dist/models/CursorBasedPaginationResponse.d.ts +52 -0
  12. package/dist/models/CursorBasedPaginationResponse.js +67 -0
  13. package/dist/models/List200Response3.d.ts +20 -8
  14. package/dist/models/List200Response3.js +19 -11
  15. package/dist/models/PageBasedPageInfo.d.ts +38 -0
  16. package/dist/models/PageBasedPageInfo.js +55 -0
  17. package/dist/models/PageBasedPaginationResponse.d.ts +64 -0
  18. package/dist/models/PageBasedPaginationResponse.js +75 -0
  19. package/dist/models/PublicSaleDto.d.ts +50 -0
  20. package/dist/models/PublicSaleDto.js +63 -0
  21. package/dist/models/PublicSalesDto.d.ts +33 -0
  22. package/dist/models/PublicSalesDto.js +52 -0
  23. package/dist/models/SortDto.d.ts +52 -0
  24. package/dist/models/SortDto.js +65 -0
  25. package/dist/models/index.d.ts +7 -0
  26. package/dist/models/index.js +7 -0
  27. package/package.json +1 -1
  28. package/src/apis/DomainsPublicApi.ts +14 -11
  29. package/src/apis/SalesPublicApi.ts +64 -0
  30. package/src/apis/index.ts +1 -1
  31. package/src/models/CursorBasedPageInfo.ts +75 -0
  32. package/src/models/CursorBasedPaginationResponse.ts +102 -0
  33. package/src/models/List200Response3.ts +39 -28
  34. package/src/models/PageBasedPageInfo.ts +75 -0
  35. package/src/models/PageBasedPaginationResponse.ts +120 -0
  36. package/src/models/PublicSaleDto.ts +93 -0
  37. package/src/models/PublicSalesDto.ts +74 -0
  38. package/src/models/SortDto.ts +94 -0
  39. package/src/models/index.ts +7 -0
  40. package/dist/apis/DefaultApi.d.ts +0 -43
  41. package/dist/apis/DefaultApi.js +0 -187
  42. package/src/apis/DefaultApi.ts +0 -143
@@ -18,6 +18,7 @@ import type {
18
18
  DomainSalesInformationDto,
19
19
  List200Response3,
20
20
  NotFoundException,
21
+ SortDto,
21
22
  ThrottlerException,
22
23
  ValidationException,
23
24
  } from '../models/index';
@@ -28,6 +29,8 @@ import {
28
29
  List200Response3ToJSON,
29
30
  NotFoundExceptionFromJSON,
30
31
  NotFoundExceptionToJSON,
32
+ SortDtoFromJSON,
33
+ SortDtoToJSON,
31
34
  ThrottlerExceptionFromJSON,
32
35
  ThrottlerExceptionToJSON,
33
36
  ValidationExceptionFromJSON,
@@ -42,10 +45,10 @@ export interface DomainsPublicApiGetDomainSalesInformationRequest {
42
45
  }
43
46
 
44
47
  export interface DomainsPublicApiListRequest {
45
- filter?: object;
46
- page?: number;
47
48
  limit?: number;
48
- sortBy?: Array<string>;
49
+ sort?: Array<SortDto>;
50
+ filter?: string;
51
+ cursor?: string;
49
52
  }
50
53
 
51
54
  /**
@@ -104,20 +107,20 @@ export class DomainsPublicApi extends runtime.BaseAPI {
104
107
  async listRaw(requestParameters: DomainsPublicApiListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<List200Response3>> {
105
108
  const queryParameters: any = {};
106
109
 
107
- if (requestParameters['filter'] != null) {
108
- queryParameters['filter'] = requestParameters['filter'];
110
+ if (requestParameters['limit'] != null) {
111
+ queryParameters['limit'] = requestParameters['limit'];
109
112
  }
110
113
 
111
- if (requestParameters['page'] != null) {
112
- queryParameters['page'] = requestParameters['page'];
114
+ if (requestParameters['sort'] != null) {
115
+ queryParameters['sort'] = requestParameters['sort'];
113
116
  }
114
117
 
115
- if (requestParameters['limit'] != null) {
116
- queryParameters['limit'] = requestParameters['limit'];
118
+ if (requestParameters['filter'] != null) {
119
+ queryParameters['filter'] = requestParameters['filter'];
117
120
  }
118
121
 
119
- if (requestParameters['sortBy'] != null) {
120
- queryParameters['sortBy'] = requestParameters['sortBy'];
122
+ if (requestParameters['cursor'] != null) {
123
+ queryParameters['cursor'] = requestParameters['cursor'];
121
124
  }
122
125
 
123
126
  const headerParameters: runtime.HTTPHeaders = {};
@@ -0,0 +1,64 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nameshift
5
+ * Nameshift API
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ PublicSalesDto,
19
+ } from '../models/index';
20
+ import {
21
+ PublicSalesDtoFromJSON,
22
+ PublicSalesDtoToJSON,
23
+ } from '../models/index';
24
+
25
+ export interface SalesPublicApiGetSalesRequest {
26
+ tlds?: Array<string>;
27
+ }
28
+
29
+ /**
30
+ *
31
+ */
32
+ export class SalesPublicApi extends runtime.BaseAPI {
33
+
34
+ /**
35
+ * Get latest sales
36
+ */
37
+ async getSalesRaw(requestParameters: SalesPublicApiGetSalesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PublicSalesDto>> {
38
+ const queryParameters: any = {};
39
+
40
+ if (requestParameters['tlds'] != null) {
41
+ queryParameters['tlds'] = requestParameters['tlds'];
42
+ }
43
+
44
+ const headerParameters: runtime.HTTPHeaders = {};
45
+
46
+ const response = await this.request({
47
+ path: `/sales`,
48
+ method: 'GET',
49
+ headers: headerParameters,
50
+ query: queryParameters,
51
+ }, initOverrides);
52
+
53
+ return new runtime.JSONApiResponse(response, (jsonValue) => PublicSalesDtoFromJSON(jsonValue));
54
+ }
55
+
56
+ /**
57
+ * Get latest sales
58
+ */
59
+ async getSales(requestParameters: SalesPublicApiGetSalesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PublicSalesDto> {
60
+ const response = await this.getSalesRaw(requestParameters, initOverrides);
61
+ return await response.value();
62
+ }
63
+
64
+ }
package/src/apis/index.ts CHANGED
@@ -7,13 +7,13 @@ export * from './AirwallexPublicApi';
7
7
  export * from './BankAccountsApi';
8
8
  export * from './BuyersApi';
9
9
  export * from './BuyersPublicApi';
10
- export * from './DefaultApi';
11
10
  export * from './DomainsApi';
12
11
  export * from './DomainsPublicApi';
13
12
  export * from './InvoicesApi';
14
13
  export * from './LeadsApi';
15
14
  export * from './LeadsPublicApi';
16
15
  export * from './OrdersPublicApi';
16
+ export * from './SalesPublicApi';
17
17
  export * from './StripePublicApi';
18
18
  export * from './SubscriptionsApi';
19
19
  export * from './SubscriptionsPublicApi';
@@ -0,0 +1,75 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nameshift
5
+ * Nameshift API
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface CursorBasedPageInfo
20
+ */
21
+ export interface CursorBasedPageInfo {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof CursorBasedPageInfo
26
+ */
27
+ previous: string | null;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof CursorBasedPageInfo
32
+ */
33
+ next: string | null;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the CursorBasedPageInfo interface.
38
+ */
39
+ export function instanceOfCursorBasedPageInfo(value: object): value is CursorBasedPageInfo {
40
+ if (!('previous' in value) || value['previous'] === undefined) return false;
41
+ if (!('next' in value) || value['next'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function CursorBasedPageInfoFromJSON(json: any): CursorBasedPageInfo {
46
+ return CursorBasedPageInfoFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function CursorBasedPageInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CursorBasedPageInfo {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'previous': json['previous'],
56
+ 'next': json['next'],
57
+ };
58
+ }
59
+
60
+ export function CursorBasedPageInfoToJSON(json: any): CursorBasedPageInfo {
61
+ return CursorBasedPageInfoToJSONTyped(json, false);
62
+ }
63
+
64
+ export function CursorBasedPageInfoToJSONTyped(value?: CursorBasedPageInfo | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'previous': value['previous'],
72
+ 'next': value['next'],
73
+ };
74
+ }
75
+
@@ -0,0 +1,102 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nameshift
5
+ * Nameshift API
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { CursorBasedPageInfo } from './CursorBasedPageInfo';
17
+ import {
18
+ CursorBasedPageInfoFromJSON,
19
+ CursorBasedPageInfoFromJSONTyped,
20
+ CursorBasedPageInfoToJSON,
21
+ CursorBasedPageInfoToJSONTyped,
22
+ } from './CursorBasedPageInfo';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface CursorBasedPaginationResponse
28
+ */
29
+ export interface CursorBasedPaginationResponse {
30
+ /**
31
+ *
32
+ * @type {number}
33
+ * @memberof CursorBasedPaginationResponse
34
+ */
35
+ limit: number;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof CursorBasedPaginationResponse
40
+ */
41
+ type: CursorBasedPaginationResponseTypeEnum;
42
+ /**
43
+ *
44
+ * @type {CursorBasedPageInfo}
45
+ * @memberof CursorBasedPaginationResponse
46
+ */
47
+ pagination: CursorBasedPageInfo;
48
+ }
49
+
50
+
51
+ /**
52
+ * @export
53
+ */
54
+ export const CursorBasedPaginationResponseTypeEnum = {
55
+ CURSOR: 'cursor'
56
+ } as const;
57
+ export type CursorBasedPaginationResponseTypeEnum = typeof CursorBasedPaginationResponseTypeEnum[keyof typeof CursorBasedPaginationResponseTypeEnum];
58
+
59
+
60
+ /**
61
+ * Check if a given object implements the CursorBasedPaginationResponse interface.
62
+ */
63
+ export function instanceOfCursorBasedPaginationResponse(value: object): value is CursorBasedPaginationResponse {
64
+ if (!('limit' in value) || value['limit'] === undefined) return false;
65
+ if (!('type' in value) || value['type'] === undefined) return false;
66
+ if (!('pagination' in value) || value['pagination'] === undefined) return false;
67
+ return true;
68
+ }
69
+
70
+ export function CursorBasedPaginationResponseFromJSON(json: any): CursorBasedPaginationResponse {
71
+ return CursorBasedPaginationResponseFromJSONTyped(json, false);
72
+ }
73
+
74
+ export function CursorBasedPaginationResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CursorBasedPaginationResponse {
75
+ if (json == null) {
76
+ return json;
77
+ }
78
+ return {
79
+
80
+ 'limit': json['limit'],
81
+ 'type': json['type'],
82
+ 'pagination': CursorBasedPageInfoFromJSON(json['pagination']),
83
+ };
84
+ }
85
+
86
+ export function CursorBasedPaginationResponseToJSON(json: any): CursorBasedPaginationResponse {
87
+ return CursorBasedPaginationResponseToJSONTyped(json, false);
88
+ }
89
+
90
+ export function CursorBasedPaginationResponseToJSONTyped(value?: CursorBasedPaginationResponse | null, ignoreDiscriminator: boolean = false): any {
91
+ if (value == null) {
92
+ return value;
93
+ }
94
+
95
+ return {
96
+
97
+ 'limit': value['limit'],
98
+ 'type': value['type'],
99
+ 'pagination': CursorBasedPageInfoToJSON(value['pagination']),
100
+ };
101
+ }
102
+
@@ -13,13 +13,13 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
- import type { PaginateResponseLinks } from './PaginateResponseLinks';
16
+ import type { CursorBasedPageInfo } from './CursorBasedPageInfo';
17
17
  import {
18
- PaginateResponseLinksFromJSON,
19
- PaginateResponseLinksFromJSONTyped,
20
- PaginateResponseLinksToJSON,
21
- PaginateResponseLinksToJSONTyped,
22
- } from './PaginateResponseLinks';
18
+ CursorBasedPageInfoFromJSON,
19
+ CursorBasedPageInfoFromJSONTyped,
20
+ CursorBasedPageInfoToJSON,
21
+ CursorBasedPageInfoToJSONTyped,
22
+ } from './CursorBasedPageInfo';
23
23
  import type { PublicDomainDto } from './PublicDomainDto';
24
24
  import {
25
25
  PublicDomainDtoFromJSON,
@@ -27,13 +27,6 @@ import {
27
27
  PublicDomainDtoToJSON,
28
28
  PublicDomainDtoToJSONTyped,
29
29
  } from './PublicDomainDto';
30
- import type { PaginateResponseMeta } from './PaginateResponseMeta';
31
- import {
32
- PaginateResponseMetaFromJSON,
33
- PaginateResponseMetaFromJSONTyped,
34
- PaginateResponseMetaToJSON,
35
- PaginateResponseMetaToJSONTyped,
36
- } from './PaginateResponseMeta';
37
30
 
38
31
  /**
39
32
  *
@@ -43,31 +36,47 @@ import {
43
36
  export interface List200Response3 {
44
37
  /**
45
38
  *
46
- * @type {Array<PublicDomainDto>}
39
+ * @type {number}
47
40
  * @memberof List200Response3
48
41
  */
49
- data: Array<PublicDomainDto>;
42
+ limit: number;
50
43
  /**
51
44
  *
52
- * @type {PaginateResponseMeta}
45
+ * @type {string}
53
46
  * @memberof List200Response3
54
47
  */
55
- meta: PaginateResponseMeta;
48
+ type: List200Response3TypeEnum;
56
49
  /**
57
50
  *
58
- * @type {PaginateResponseLinks}
51
+ * @type {CursorBasedPageInfo}
52
+ * @memberof List200Response3
53
+ */
54
+ pagination: CursorBasedPageInfo;
55
+ /**
56
+ *
57
+ * @type {Array<PublicDomainDto>}
59
58
  * @memberof List200Response3
60
59
  */
61
- links: PaginateResponseLinks;
60
+ data?: Array<PublicDomainDto>;
62
61
  }
63
62
 
63
+
64
+ /**
65
+ * @export
66
+ */
67
+ export const List200Response3TypeEnum = {
68
+ CURSOR: 'cursor'
69
+ } as const;
70
+ export type List200Response3TypeEnum = typeof List200Response3TypeEnum[keyof typeof List200Response3TypeEnum];
71
+
72
+
64
73
  /**
65
74
  * Check if a given object implements the List200Response3 interface.
66
75
  */
67
76
  export function instanceOfList200Response3(value: object): value is List200Response3 {
68
- if (!('data' in value) || value['data'] === undefined) return false;
69
- if (!('meta' in value) || value['meta'] === undefined) return false;
70
- if (!('links' in value) || value['links'] === undefined) return false;
77
+ if (!('limit' in value) || value['limit'] === undefined) return false;
78
+ if (!('type' in value) || value['type'] === undefined) return false;
79
+ if (!('pagination' in value) || value['pagination'] === undefined) return false;
71
80
  return true;
72
81
  }
73
82
 
@@ -81,9 +90,10 @@ export function List200Response3FromJSONTyped(json: any, ignoreDiscriminator: bo
81
90
  }
82
91
  return {
83
92
 
84
- 'data': ((json['data'] as Array<any>).map(PublicDomainDtoFromJSON)),
85
- 'meta': PaginateResponseMetaFromJSON(json['meta']),
86
- 'links': PaginateResponseLinksFromJSON(json['links']),
93
+ 'limit': json['limit'],
94
+ 'type': json['type'],
95
+ 'pagination': CursorBasedPageInfoFromJSON(json['pagination']),
96
+ 'data': json['data'] == null ? undefined : ((json['data'] as Array<any>).map(PublicDomainDtoFromJSON)),
87
97
  };
88
98
  }
89
99
 
@@ -98,9 +108,10 @@ export function List200Response3ToJSONTyped(value?: List200Response3 | null, ign
98
108
 
99
109
  return {
100
110
 
101
- 'data': ((value['data'] as Array<any>).map(PublicDomainDtoToJSON)),
102
- 'meta': PaginateResponseMetaToJSON(value['meta']),
103
- 'links': PaginateResponseLinksToJSON(value['links']),
111
+ 'limit': value['limit'],
112
+ 'type': value['type'],
113
+ 'pagination': CursorBasedPageInfoToJSON(value['pagination']),
114
+ 'data': value['data'] == null ? undefined : ((value['data'] as Array<any>).map(PublicDomainDtoToJSON)),
104
115
  };
105
116
  }
106
117
 
@@ -0,0 +1,75 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nameshift
5
+ * Nameshift API
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface PageBasedPageInfo
20
+ */
21
+ export interface PageBasedPageInfo {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof PageBasedPageInfo
26
+ */
27
+ currentPage: number;
28
+ /**
29
+ *
30
+ * @type {number}
31
+ * @memberof PageBasedPageInfo
32
+ */
33
+ totalPages: number;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the PageBasedPageInfo interface.
38
+ */
39
+ export function instanceOfPageBasedPageInfo(value: object): value is PageBasedPageInfo {
40
+ if (!('currentPage' in value) || value['currentPage'] === undefined) return false;
41
+ if (!('totalPages' in value) || value['totalPages'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function PageBasedPageInfoFromJSON(json: any): PageBasedPageInfo {
46
+ return PageBasedPageInfoFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function PageBasedPageInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): PageBasedPageInfo {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'currentPage': json['currentPage'],
56
+ 'totalPages': json['totalPages'],
57
+ };
58
+ }
59
+
60
+ export function PageBasedPageInfoToJSON(json: any): PageBasedPageInfo {
61
+ return PageBasedPageInfoToJSONTyped(json, false);
62
+ }
63
+
64
+ export function PageBasedPageInfoToJSONTyped(value?: PageBasedPageInfo | null, ignoreDiscriminator: boolean = false): any {
65
+ if (value == null) {
66
+ return value;
67
+ }
68
+
69
+ return {
70
+
71
+ 'currentPage': value['currentPage'],
72
+ 'totalPages': value['totalPages'],
73
+ };
74
+ }
75
+
@@ -0,0 +1,120 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nameshift
5
+ * Nameshift API
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { PageBasedPageInfo } from './PageBasedPageInfo';
17
+ import {
18
+ PageBasedPageInfoFromJSON,
19
+ PageBasedPageInfoFromJSONTyped,
20
+ PageBasedPageInfoToJSON,
21
+ PageBasedPageInfoToJSONTyped,
22
+ } from './PageBasedPageInfo';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface PageBasedPaginationResponse
28
+ */
29
+ export interface PageBasedPaginationResponse {
30
+ /**
31
+ *
32
+ * @type {number}
33
+ * @memberof PageBasedPaginationResponse
34
+ */
35
+ limit: number;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof PageBasedPaginationResponse
40
+ */
41
+ type: PageBasedPaginationResponseTypeEnum;
42
+ /**
43
+ *
44
+ * @type {number}
45
+ * @memberof PageBasedPaginationResponse
46
+ */
47
+ total: number;
48
+ /**
49
+ *
50
+ * @type {number}
51
+ * @memberof PageBasedPaginationResponse
52
+ */
53
+ pages: number;
54
+ /**
55
+ *
56
+ * @type {PageBasedPageInfo}
57
+ * @memberof PageBasedPaginationResponse
58
+ */
59
+ pagination: PageBasedPageInfo;
60
+ }
61
+
62
+
63
+ /**
64
+ * @export
65
+ */
66
+ export const PageBasedPaginationResponseTypeEnum = {
67
+ PAGE: 'page'
68
+ } as const;
69
+ export type PageBasedPaginationResponseTypeEnum = typeof PageBasedPaginationResponseTypeEnum[keyof typeof PageBasedPaginationResponseTypeEnum];
70
+
71
+
72
+ /**
73
+ * Check if a given object implements the PageBasedPaginationResponse interface.
74
+ */
75
+ export function instanceOfPageBasedPaginationResponse(value: object): value is PageBasedPaginationResponse {
76
+ if (!('limit' in value) || value['limit'] === undefined) return false;
77
+ if (!('type' in value) || value['type'] === undefined) return false;
78
+ if (!('total' in value) || value['total'] === undefined) return false;
79
+ if (!('pages' in value) || value['pages'] === undefined) return false;
80
+ if (!('pagination' in value) || value['pagination'] === undefined) return false;
81
+ return true;
82
+ }
83
+
84
+ export function PageBasedPaginationResponseFromJSON(json: any): PageBasedPaginationResponse {
85
+ return PageBasedPaginationResponseFromJSONTyped(json, false);
86
+ }
87
+
88
+ export function PageBasedPaginationResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PageBasedPaginationResponse {
89
+ if (json == null) {
90
+ return json;
91
+ }
92
+ return {
93
+
94
+ 'limit': json['limit'],
95
+ 'type': json['type'],
96
+ 'total': json['total'],
97
+ 'pages': json['pages'],
98
+ 'pagination': PageBasedPageInfoFromJSON(json['pagination']),
99
+ };
100
+ }
101
+
102
+ export function PageBasedPaginationResponseToJSON(json: any): PageBasedPaginationResponse {
103
+ return PageBasedPaginationResponseToJSONTyped(json, false);
104
+ }
105
+
106
+ export function PageBasedPaginationResponseToJSONTyped(value?: PageBasedPaginationResponse | null, ignoreDiscriminator: boolean = false): any {
107
+ if (value == null) {
108
+ return value;
109
+ }
110
+
111
+ return {
112
+
113
+ 'limit': value['limit'],
114
+ 'type': value['type'],
115
+ 'total': value['total'],
116
+ 'pages': value['pages'],
117
+ 'pagination': PageBasedPageInfoToJSON(value['pagination']),
118
+ };
119
+ }
120
+