@fubar-it-co/tmdb-client 0.0.6 → 0.0.7

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 (105) hide show
  1. package/CHANGELOG.md +138 -63
  2. package/dist/client/@tanstack/react-query.gen.d.ts +35859 -0
  3. package/dist/client/@tanstack/react-query.gen.d.ts.map +1 -0
  4. package/dist/client/@tanstack/react-query.gen.js +4003 -0
  5. package/dist/client/@tanstack/react-query.gen.js.map +1 -0
  6. package/dist/client/client/client.gen.d.ts +3 -0
  7. package/dist/client/client/client.gen.d.ts.map +1 -0
  8. package/dist/client/client/client.gen.js +236 -0
  9. package/dist/client/client/client.gen.js.map +1 -0
  10. package/dist/client/client/index.d.ts +9 -0
  11. package/dist/client/client/index.d.ts.map +1 -0
  12. package/dist/client/client/index.js +8 -0
  13. package/dist/client/client/index.js.map +1 -0
  14. package/dist/client/client/types.gen.d.ts +118 -0
  15. package/dist/client/client/types.gen.d.ts.map +1 -0
  16. package/dist/client/client/types.gen.js +4 -0
  17. package/dist/client/client/types.gen.js.map +1 -0
  18. package/dist/client/client/utils.gen.d.ts +34 -0
  19. package/dist/client/client/utils.gen.d.ts.map +1 -0
  20. package/dist/client/client/utils.gen.js +230 -0
  21. package/dist/client/client/utils.gen.js.map +1 -0
  22. package/{src/client/client.gen.ts → dist/client/client.gen.d.ts} +3 -9
  23. package/dist/client/client.gen.d.ts.map +1 -0
  24. package/dist/client/client.gen.js +6 -0
  25. package/dist/client/client.gen.js.map +1 -0
  26. package/dist/client/core/auth.gen.d.ts +19 -0
  27. package/dist/client/core/auth.gen.d.ts.map +1 -0
  28. package/dist/client/core/auth.gen.js +16 -0
  29. package/dist/client/core/auth.gen.js.map +1 -0
  30. package/dist/client/core/bodySerializer.gen.d.ts +26 -0
  31. package/dist/client/core/bodySerializer.gen.d.ts.map +1 -0
  32. package/dist/client/core/bodySerializer.gen.js +59 -0
  33. package/dist/client/core/bodySerializer.gen.js.map +1 -0
  34. package/dist/client/core/params.gen.d.ts +44 -0
  35. package/dist/client/core/params.gen.d.ts.map +1 -0
  36. package/dist/client/core/params.gen.js +102 -0
  37. package/dist/client/core/params.gen.js.map +1 -0
  38. package/dist/client/core/pathSerializer.gen.d.ts +34 -0
  39. package/dist/client/core/pathSerializer.gen.d.ts.map +1 -0
  40. package/dist/client/core/pathSerializer.gen.js +108 -0
  41. package/dist/client/core/pathSerializer.gen.js.map +1 -0
  42. package/dist/client/core/queryKeySerializer.gen.d.ts +19 -0
  43. package/dist/client/core/queryKeySerializer.gen.d.ts.map +1 -0
  44. package/dist/client/core/queryKeySerializer.gen.js +94 -0
  45. package/dist/client/core/queryKeySerializer.gen.js.map +1 -0
  46. package/dist/client/core/serverSentEvents.gen.d.ts +72 -0
  47. package/dist/client/core/serverSentEvents.gen.d.ts.map +1 -0
  48. package/dist/client/core/serverSentEvents.gen.js +135 -0
  49. package/dist/client/core/serverSentEvents.gen.js.map +1 -0
  50. package/dist/client/core/types.gen.d.ts +79 -0
  51. package/dist/client/core/types.gen.d.ts.map +1 -0
  52. package/dist/client/core/types.gen.js +4 -0
  53. package/dist/client/core/types.gen.js.map +1 -0
  54. package/dist/client/core/utils.gen.d.ts +20 -0
  55. package/dist/client/core/utils.gen.d.ts.map +1 -0
  56. package/dist/client/core/utils.gen.js +89 -0
  57. package/dist/client/core/utils.gen.js.map +1 -0
  58. package/{src/client/index.ts → dist/client/index.d.ts} +2 -4
  59. package/dist/client/index.d.ts.map +1 -0
  60. package/dist/client/index.js +5 -0
  61. package/dist/client/index.js.map +1 -0
  62. package/dist/client/sdk.gen.d.ts +882 -0
  63. package/dist/client/sdk.gen.d.ts.map +1 -0
  64. package/dist/client/sdk.gen.js +1514 -0
  65. package/dist/client/sdk.gen.js.map +1 -0
  66. package/{src/client/types.gen.ts → dist/client/types.gen.d.ts} +8 -462
  67. package/dist/client/types.gen.d.ts.map +1 -0
  68. package/dist/client/types.gen.js +4 -0
  69. package/dist/client/types.gen.js.map +1 -0
  70. package/dist/index.d.ts +25 -0
  71. package/dist/index.d.ts.map +1 -0
  72. package/{src/index.ts → dist/index.js} +2 -5
  73. package/dist/index.js.map +1 -0
  74. package/{src/tmdb-config.ts → dist/tmdb-config.d.ts} +3 -25
  75. package/dist/tmdb-config.d.ts.map +1 -0
  76. package/dist/tmdb-config.js +31 -0
  77. package/dist/tmdb-config.js.map +1 -0
  78. package/{src/types/errors.ts → dist/types/errors.d.ts} +7 -6
  79. package/dist/types/errors.d.ts.map +1 -0
  80. package/dist/types/errors.js +2 -0
  81. package/dist/types/errors.js.map +1 -0
  82. package/package.json +9 -3
  83. package/.eslintignore +0 -1
  84. package/eslint.config.js +0 -15
  85. package/openapi-ts.config.ts +0 -43
  86. package/publish-local.sh +0 -86
  87. package/publish.sh +0 -114
  88. package/scripts/add-ts-nocheck.js +0 -85
  89. package/src/client/@tanstack/react-query.gen.ts +0 -4398
  90. package/src/client/client/client.gen.ts +0 -289
  91. package/src/client/client/index.ts +0 -26
  92. package/src/client/client/types.gen.ts +0 -214
  93. package/src/client/client/utils.gen.ts +0 -317
  94. package/src/client/core/auth.gen.ts +0 -42
  95. package/src/client/core/bodySerializer.gen.ts +0 -85
  96. package/src/client/core/params.gen.ts +0 -170
  97. package/src/client/core/pathSerializer.gen.ts +0 -172
  98. package/src/client/core/queryKeySerializer.gen.ts +0 -118
  99. package/src/client/core/serverSentEvents.gen.ts +0 -244
  100. package/src/client/core/types.gen.ts +0 -105
  101. package/src/client/core/utils.gen.ts +0 -141
  102. package/src/client/sdk.gen.ts +0 -1682
  103. package/src/vite-env.d.ts +0 -9
  104. package/tsconfig.build.json +0 -12
  105. package/tsconfig.json +0 -17
@@ -1,141 +0,0 @@
1
- // This file is auto-generated by @hey-api/openapi-ts
2
- // @ts-nocheck
3
-
4
- import type { BodySerializer, QuerySerializer } from './bodySerializer.gen';
5
- import {
6
- type ArraySeparatorStyle,
7
- serializeArrayParam,
8
- serializeObjectParam,
9
- serializePrimitiveParam,
10
- } from './pathSerializer.gen';
11
-
12
- export interface PathSerializer {
13
- path: Record<string, unknown>;
14
- url: string;
15
- }
16
-
17
- export const PATH_PARAM_RE = /\{[^{}]+\}/g;
18
-
19
- export const defaultPathSerializer = ({ path, url: _url }: PathSerializer) => {
20
- let url = _url;
21
- const matches = _url.match(PATH_PARAM_RE);
22
- if (matches) {
23
- for (const match of matches) {
24
- let explode = false;
25
- let name = match.substring(1, match.length - 1);
26
- let style: ArraySeparatorStyle = 'simple';
27
-
28
- if (name.endsWith('*')) {
29
- explode = true;
30
- name = name.substring(0, name.length - 1);
31
- }
32
-
33
- if (name.startsWith('.')) {
34
- name = name.substring(1);
35
- style = 'label';
36
- } else if (name.startsWith(';')) {
37
- name = name.substring(1);
38
- style = 'matrix';
39
- }
40
-
41
- const value = path[name];
42
-
43
- if (value === undefined || value === null) {
44
- continue;
45
- }
46
-
47
- if (Array.isArray(value)) {
48
- url = url.replace(match, serializeArrayParam({ explode, name, style, value }));
49
- continue;
50
- }
51
-
52
- if (typeof value === 'object') {
53
- url = url.replace(
54
- match,
55
- serializeObjectParam({
56
- explode,
57
- name,
58
- style,
59
- value: value as Record<string, unknown>,
60
- valueOnly: true,
61
- }),
62
- );
63
- continue;
64
- }
65
-
66
- if (style === 'matrix') {
67
- url = url.replace(
68
- match,
69
- `;${serializePrimitiveParam({
70
- name,
71
- value: value as string,
72
- })}`,
73
- );
74
- continue;
75
- }
76
-
77
- const replaceValue = encodeURIComponent(
78
- style === 'label' ? `.${value as string}` : (value as string),
79
- );
80
- url = url.replace(match, replaceValue);
81
- }
82
- }
83
- return url;
84
- };
85
-
86
- export const getUrl = ({
87
- baseUrl,
88
- path,
89
- query,
90
- querySerializer,
91
- url: _url,
92
- }: {
93
- baseUrl?: string;
94
- path?: Record<string, unknown>;
95
- query?: Record<string, unknown>;
96
- querySerializer: QuerySerializer;
97
- url: string;
98
- }) => {
99
- const pathUrl = _url.startsWith('/') ? _url : `/${_url}`;
100
- let url = (baseUrl ?? '') + pathUrl;
101
- if (path) {
102
- url = defaultPathSerializer({ path, url });
103
- }
104
- let search = query ? querySerializer(query) : '';
105
- if (search.startsWith('?')) {
106
- search = search.substring(1);
107
- }
108
- if (search) {
109
- url += `?${search}`;
110
- }
111
- return url;
112
- };
113
-
114
- export function getValidRequestBody(options: {
115
- body?: unknown;
116
- bodySerializer?: BodySerializer | null;
117
- serializedBody?: unknown;
118
- }) {
119
- const hasBody = options.body !== undefined;
120
- const isSerializedBody = hasBody && options.bodySerializer;
121
-
122
- if (isSerializedBody) {
123
- if ('serializedBody' in options) {
124
- const hasSerializedBody =
125
- options.serializedBody !== undefined && options.serializedBody !== '';
126
-
127
- return hasSerializedBody ? options.serializedBody : null;
128
- }
129
-
130
- // not all clients implement a serializedBody property (i.e. client-axios)
131
- return options.body !== '' ? options.body : null;
132
- }
133
-
134
- // plain/text body
135
- if (hasBody) {
136
- return options.body;
137
- }
138
-
139
- // no body was provided
140
- return undefined;
141
- }