@eudiplo/sdk-core 4.0.0 → 4.1.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.
@@ -1,4 +1,4 @@
1
- import { b as Config, C as Client } from '../../types.gen-D8LjzWc0.mjs';
1
+ import { b as Config, C as Client } from '../../types.gen-CVkHMB8b.mjs';
2
2
 
3
3
  declare const createClient: (config?: Config) => Client;
4
4
 
@@ -1,4 +1,4 @@
1
- import { b as Config, C as Client } from '../../types.gen-D8LjzWc0.js';
1
+ import { b as Config, C as Client } from '../../types.gen-CVkHMB8b.js';
2
2
 
3
3
  declare const createClient: (config?: Config) => Client;
4
4
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  // src/api/core/serverSentEvents.gen.ts
4
- var createSseClient = ({
4
+ function createSseClient({
5
5
  onRequest,
6
6
  onSseError,
7
7
  onSseEvent,
@@ -13,7 +13,7 @@ var createSseClient = ({
13
13
  sseSleepFn,
14
14
  url,
15
15
  ...options
16
- }) => {
16
+ }) {
17
17
  let lastEventId;
18
18
  const sleep = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
19
19
  const createStream = async function* () {
@@ -60,7 +60,7 @@ var createSseClient = ({
60
60
  const { done, value } = await reader.read();
61
61
  if (done) break;
62
62
  buffer += value;
63
- buffer = buffer.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
63
+ buffer = buffer.replace(/\r\n?/g, "\n");
64
64
  const chunks = buffer.split("\n\n");
65
65
  buffer = chunks.pop() ?? "";
66
66
  for (const chunk of chunks) {
@@ -134,7 +134,7 @@ var createSseClient = ({
134
134
  };
135
135
  const stream = createStream();
136
136
  return { stream };
137
- };
137
+ }
138
138
 
139
139
  // src/api/core/pathSerializer.gen.ts
140
140
  var separatorArrayExplode = (style) => {
@@ -637,8 +637,9 @@ var createClient = (config = {}) => {
637
637
  if (opts.body === void 0 || opts.serializedBody === "") {
638
638
  opts.headers.delete("Content-Type");
639
639
  }
640
- const url = buildUrl(opts);
641
- return { opts, url };
640
+ const resolvedOpts = opts;
641
+ const url = buildUrl(resolvedOpts);
642
+ return { opts: resolvedOpts, url };
642
643
  };
643
644
  const request = async (options) => {
644
645
  const { opts, url } = await beforeRequest(options);
@@ -789,8 +790,9 @@ var createClient = (config = {}) => {
789
790
  url
790
791
  });
791
792
  };
793
+ const _buildUrl = (options) => buildUrl({ ..._config, ...options });
792
794
  return {
793
- buildUrl,
795
+ buildUrl: _buildUrl,
794
796
  connect: makeMethodFn("CONNECT"),
795
797
  delete: makeMethodFn("DELETE"),
796
798
  get: makeMethodFn("GET"),
@@ -1,5 +1,5 @@
1
1
  // src/api/core/serverSentEvents.gen.ts
2
- var createSseClient = ({
2
+ function createSseClient({
3
3
  onRequest,
4
4
  onSseError,
5
5
  onSseEvent,
@@ -11,7 +11,7 @@ var createSseClient = ({
11
11
  sseSleepFn,
12
12
  url,
13
13
  ...options
14
- }) => {
14
+ }) {
15
15
  let lastEventId;
16
16
  const sleep = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
17
17
  const createStream = async function* () {
@@ -58,7 +58,7 @@ var createSseClient = ({
58
58
  const { done, value } = await reader.read();
59
59
  if (done) break;
60
60
  buffer += value;
61
- buffer = buffer.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
61
+ buffer = buffer.replace(/\r\n?/g, "\n");
62
62
  const chunks = buffer.split("\n\n");
63
63
  buffer = chunks.pop() ?? "";
64
64
  for (const chunk of chunks) {
@@ -132,7 +132,7 @@ var createSseClient = ({
132
132
  };
133
133
  const stream = createStream();
134
134
  return { stream };
135
- };
135
+ }
136
136
 
137
137
  // src/api/core/pathSerializer.gen.ts
138
138
  var separatorArrayExplode = (style) => {
@@ -635,8 +635,9 @@ var createClient = (config = {}) => {
635
635
  if (opts.body === void 0 || opts.serializedBody === "") {
636
636
  opts.headers.delete("Content-Type");
637
637
  }
638
- const url = buildUrl(opts);
639
- return { opts, url };
638
+ const resolvedOpts = opts;
639
+ const url = buildUrl(resolvedOpts);
640
+ return { opts: resolvedOpts, url };
640
641
  };
641
642
  const request = async (options) => {
642
643
  const { opts, url } = await beforeRequest(options);
@@ -787,8 +788,9 @@ var createClient = (config = {}) => {
787
788
  url
788
789
  });
789
790
  };
791
+ const _buildUrl = (options) => buildUrl({ ..._config, ...options });
790
792
  return {
791
- buildUrl,
793
+ buildUrl: _buildUrl,
792
794
  connect: makeMethodFn("CONNECT"),
793
795
  delete: makeMethodFn("DELETE"),
794
796
  get: makeMethodFn("GET"),
@@ -1,4 +1,4 @@
1
- export { A as Auth, C as Client, a as ClientOptions, b as Config, c as CreateClientConfig, O as Options, Q as QuerySerializerOptions, R as RequestOptions, d as RequestResult, e as ResolvedRequestOptions, f as ResponseStyle, T as TDataShape, g as createConfig, h as formDataBodySerializer, j as jsonBodySerializer, m as mergeHeaders, u as urlSearchParamsBodySerializer } from '../../types.gen-D8LjzWc0.mjs';
1
+ export { A as Auth, C as Client, a as ClientOptions, b as Config, c as CreateClientConfig, O as Options, Q as QuerySerializerOptions, R as RequestOptions, d as RequestResult, e as ResolvedRequestOptions, f as ResponseStyle, T as TDataShape, g as createConfig, h as formDataBodySerializer, j as jsonBodySerializer, m as mergeHeaders, u as urlSearchParamsBodySerializer } from '../../types.gen-CVkHMB8b.mjs';
2
2
  export { createClient } from './client.gen.mjs';
3
3
 
4
4
  type Slot = "body" | "headers" | "path" | "query";
@@ -1,4 +1,4 @@
1
- export { A as Auth, C as Client, a as ClientOptions, b as Config, c as CreateClientConfig, O as Options, Q as QuerySerializerOptions, R as RequestOptions, d as RequestResult, e as ResolvedRequestOptions, f as ResponseStyle, T as TDataShape, g as createConfig, h as formDataBodySerializer, j as jsonBodySerializer, m as mergeHeaders, u as urlSearchParamsBodySerializer } from '../../types.gen-D8LjzWc0.js';
1
+ export { A as Auth, C as Client, a as ClientOptions, b as Config, c as CreateClientConfig, O as Options, Q as QuerySerializerOptions, R as RequestOptions, d as RequestResult, e as ResolvedRequestOptions, f as ResponseStyle, T as TDataShape, g as createConfig, h as formDataBodySerializer, j as jsonBodySerializer, m as mergeHeaders, u as urlSearchParamsBodySerializer } from '../../types.gen-CVkHMB8b.js';
2
2
  export { createClient } from './client.gen.js';
3
3
 
4
4
  type Slot = "body" | "headers" | "path" | "query";
@@ -231,7 +231,7 @@ var serializeQueryKeyValue = (value) => {
231
231
  };
232
232
 
233
233
  // src/api/core/serverSentEvents.gen.ts
234
- var createSseClient = ({
234
+ function createSseClient({
235
235
  onRequest,
236
236
  onSseError,
237
237
  onSseEvent,
@@ -243,7 +243,7 @@ var createSseClient = ({
243
243
  sseSleepFn,
244
244
  url,
245
245
  ...options
246
- }) => {
246
+ }) {
247
247
  let lastEventId;
248
248
  const sleep = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
249
249
  const createStream = async function* () {
@@ -290,7 +290,7 @@ var createSseClient = ({
290
290
  const { done, value } = await reader.read();
291
291
  if (done) break;
292
292
  buffer += value;
293
- buffer = buffer.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
293
+ buffer = buffer.replace(/\r\n?/g, "\n");
294
294
  const chunks = buffer.split("\n\n");
295
295
  buffer = chunks.pop() ?? "";
296
296
  for (const chunk of chunks) {
@@ -364,7 +364,7 @@ var createSseClient = ({
364
364
  };
365
365
  const stream = createStream();
366
366
  return { stream };
367
- };
367
+ }
368
368
 
369
369
  // src/api/core/pathSerializer.gen.ts
370
370
  var separatorArrayExplode = (style) => {
@@ -859,8 +859,9 @@ var createClient = (config = {}) => {
859
859
  if (opts.body === void 0 || opts.serializedBody === "") {
860
860
  opts.headers.delete("Content-Type");
861
861
  }
862
- const url = buildUrl(opts);
863
- return { opts, url };
862
+ const resolvedOpts = opts;
863
+ const url = buildUrl(resolvedOpts);
864
+ return { opts: resolvedOpts, url };
864
865
  };
865
866
  const request = async (options) => {
866
867
  const { opts, url } = await beforeRequest(options);
@@ -1011,8 +1012,9 @@ var createClient = (config = {}) => {
1011
1012
  url
1012
1013
  });
1013
1014
  };
1015
+ const _buildUrl = (options) => buildUrl({ ..._config, ...options });
1014
1016
  return {
1015
- buildUrl,
1017
+ buildUrl: _buildUrl,
1016
1018
  connect: makeMethodFn("CONNECT"),
1017
1019
  delete: makeMethodFn("DELETE"),
1018
1020
  get: makeMethodFn("GET"),
@@ -229,7 +229,7 @@ var serializeQueryKeyValue = (value) => {
229
229
  };
230
230
 
231
231
  // src/api/core/serverSentEvents.gen.ts
232
- var createSseClient = ({
232
+ function createSseClient({
233
233
  onRequest,
234
234
  onSseError,
235
235
  onSseEvent,
@@ -241,7 +241,7 @@ var createSseClient = ({
241
241
  sseSleepFn,
242
242
  url,
243
243
  ...options
244
- }) => {
244
+ }) {
245
245
  let lastEventId;
246
246
  const sleep = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
247
247
  const createStream = async function* () {
@@ -288,7 +288,7 @@ var createSseClient = ({
288
288
  const { done, value } = await reader.read();
289
289
  if (done) break;
290
290
  buffer += value;
291
- buffer = buffer.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
291
+ buffer = buffer.replace(/\r\n?/g, "\n");
292
292
  const chunks = buffer.split("\n\n");
293
293
  buffer = chunks.pop() ?? "";
294
294
  for (const chunk of chunks) {
@@ -362,7 +362,7 @@ var createSseClient = ({
362
362
  };
363
363
  const stream = createStream();
364
364
  return { stream };
365
- };
365
+ }
366
366
 
367
367
  // src/api/core/pathSerializer.gen.ts
368
368
  var separatorArrayExplode = (style) => {
@@ -857,8 +857,9 @@ var createClient = (config = {}) => {
857
857
  if (opts.body === void 0 || opts.serializedBody === "") {
858
858
  opts.headers.delete("Content-Type");
859
859
  }
860
- const url = buildUrl(opts);
861
- return { opts, url };
860
+ const resolvedOpts = opts;
861
+ const url = buildUrl(resolvedOpts);
862
+ return { opts: resolvedOpts, url };
862
863
  };
863
864
  const request = async (options) => {
864
865
  const { opts, url } = await beforeRequest(options);
@@ -1009,8 +1010,9 @@ var createClient = (config = {}) => {
1009
1010
  url
1010
1011
  });
1011
1012
  };
1013
+ const _buildUrl = (options) => buildUrl({ ..._config, ...options });
1012
1014
  return {
1013
- buildUrl,
1015
+ buildUrl: _buildUrl,
1014
1016
  connect: makeMethodFn("CONNECT"),
1015
1017
  delete: makeMethodFn("DELETE"),
1016
1018
  get: makeMethodFn("GET"),
@@ -1 +1 @@
1
- export { C as Client, a as ClientOptions, b as Config, c as CreateClientConfig, O as Options, R as RequestOptions, d as RequestResult, e as ResolvedRequestOptions, f as ResponseStyle, T as TDataShape } from '../../types.gen-D8LjzWc0.mjs';
1
+ export { C as Client, a as ClientOptions, b as Config, c as CreateClientConfig, O as Options, R as RequestOptions, d as RequestResult, e as ResolvedRequestOptions, f as ResponseStyle, T as TDataShape } from '../../types.gen-CVkHMB8b.mjs';
@@ -1 +1 @@
1
- export { C as Client, a as ClientOptions, b as Config, c as CreateClientConfig, O as Options, R as RequestOptions, d as RequestResult, e as ResolvedRequestOptions, f as ResponseStyle, T as TDataShape } from '../../types.gen-D8LjzWc0.js';
1
+ export { C as Client, a as ClientOptions, b as Config, c as CreateClientConfig, O as Options, R as RequestOptions, d as RequestResult, e as ResolvedRequestOptions, f as ResponseStyle, T as TDataShape } from '../../types.gen-CVkHMB8b.js';
@@ -1,5 +1,5 @@
1
- import { C as Client, a as ClientOptions, b as Config } from '../types.gen-D8LjzWc0.mjs';
2
- import { ae as ClientOptions$1 } from '../types.gen-sNmRQvUI.mjs';
1
+ import { C as Client, a as ClientOptions, b as Config } from '../types.gen-CVkHMB8b.mjs';
2
+ import { ai as ClientOptions$1 } from '../types.gen-CVLCgolx.mjs';
3
3
 
4
4
  /**
5
5
  * The `createClientConfig()` function will be called on client initialization
@@ -9,7 +9,7 @@ import { ae as ClientOptions$1 } from '../types.gen-sNmRQvUI.mjs';
9
9
  * `setConfig()`. This is useful for example if you're using Next.js
10
10
  * to ensure your client always has the correct values.
11
11
  */
12
- type CreateClientConfig<T extends ClientOptions = ClientOptions$1> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T> | Promise<Config<Required<ClientOptions> & T>>;
12
+ type CreateClientConfig<T extends ClientOptions = ClientOptions$1> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;
13
13
  declare const client: Client;
14
14
 
15
15
  export { type CreateClientConfig, client };
@@ -1,5 +1,5 @@
1
- import { C as Client, a as ClientOptions, b as Config } from '../types.gen-D8LjzWc0.js';
2
- import { ae as ClientOptions$1 } from '../types.gen-sNmRQvUI.js';
1
+ import { C as Client, a as ClientOptions, b as Config } from '../types.gen-CVkHMB8b.js';
2
+ import { ai as ClientOptions$1 } from '../types.gen-CVLCgolx.js';
3
3
 
4
4
  /**
5
5
  * The `createClientConfig()` function will be called on client initialization
@@ -9,7 +9,7 @@ import { ae as ClientOptions$1 } from '../types.gen-sNmRQvUI.js';
9
9
  * `setConfig()`. This is useful for example if you're using Next.js
10
10
  * to ensure your client always has the correct values.
11
11
  */
12
- type CreateClientConfig<T extends ClientOptions = ClientOptions$1> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T> | Promise<Config<Required<ClientOptions> & T>>;
12
+ type CreateClientConfig<T extends ClientOptions = ClientOptions$1> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;
13
13
  declare const client: Client;
14
14
 
15
15
  export { type CreateClientConfig, client };
@@ -9,7 +9,7 @@ var jsonBodySerializer = {
9
9
  };
10
10
 
11
11
  // src/api/core/serverSentEvents.gen.ts
12
- var createSseClient = ({
12
+ function createSseClient({
13
13
  onRequest,
14
14
  onSseError,
15
15
  onSseEvent,
@@ -21,7 +21,7 @@ var createSseClient = ({
21
21
  sseSleepFn,
22
22
  url,
23
23
  ...options
24
- }) => {
24
+ }) {
25
25
  let lastEventId;
26
26
  const sleep = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
27
27
  const createStream = async function* () {
@@ -68,7 +68,7 @@ var createSseClient = ({
68
68
  const { done, value } = await reader.read();
69
69
  if (done) break;
70
70
  buffer += value;
71
- buffer = buffer.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
71
+ buffer = buffer.replace(/\r\n?/g, "\n");
72
72
  const chunks = buffer.split("\n\n");
73
73
  buffer = chunks.pop() ?? "";
74
74
  for (const chunk of chunks) {
@@ -142,7 +142,7 @@ var createSseClient = ({
142
142
  };
143
143
  const stream = createStream();
144
144
  return { stream };
145
- };
145
+ }
146
146
 
147
147
  // src/api/core/pathSerializer.gen.ts
148
148
  var separatorArrayExplode = (style) => {
@@ -637,8 +637,9 @@ var createClient = (config = {}) => {
637
637
  if (opts.body === void 0 || opts.serializedBody === "") {
638
638
  opts.headers.delete("Content-Type");
639
639
  }
640
- const url = buildUrl(opts);
641
- return { opts, url };
640
+ const resolvedOpts = opts;
641
+ const url = buildUrl(resolvedOpts);
642
+ return { opts: resolvedOpts, url };
642
643
  };
643
644
  const request = async (options) => {
644
645
  const { opts, url } = await beforeRequest(options);
@@ -789,8 +790,9 @@ var createClient = (config = {}) => {
789
790
  url
790
791
  });
791
792
  };
793
+ const _buildUrl = (options) => buildUrl({ ..._config, ...options });
792
794
  return {
793
- buildUrl,
795
+ buildUrl: _buildUrl,
794
796
  connect: makeMethodFn("CONNECT"),
795
797
  delete: makeMethodFn("DELETE"),
796
798
  get: makeMethodFn("GET"),
@@ -7,7 +7,7 @@ var jsonBodySerializer = {
7
7
  };
8
8
 
9
9
  // src/api/core/serverSentEvents.gen.ts
10
- var createSseClient = ({
10
+ function createSseClient({
11
11
  onRequest,
12
12
  onSseError,
13
13
  onSseEvent,
@@ -19,7 +19,7 @@ var createSseClient = ({
19
19
  sseSleepFn,
20
20
  url,
21
21
  ...options
22
- }) => {
22
+ }) {
23
23
  let lastEventId;
24
24
  const sleep = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
25
25
  const createStream = async function* () {
@@ -66,7 +66,7 @@ var createSseClient = ({
66
66
  const { done, value } = await reader.read();
67
67
  if (done) break;
68
68
  buffer += value;
69
- buffer = buffer.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
69
+ buffer = buffer.replace(/\r\n?/g, "\n");
70
70
  const chunks = buffer.split("\n\n");
71
71
  buffer = chunks.pop() ?? "";
72
72
  for (const chunk of chunks) {
@@ -140,7 +140,7 @@ var createSseClient = ({
140
140
  };
141
141
  const stream = createStream();
142
142
  return { stream };
143
- };
143
+ }
144
144
 
145
145
  // src/api/core/pathSerializer.gen.ts
146
146
  var separatorArrayExplode = (style) => {
@@ -635,8 +635,9 @@ var createClient = (config = {}) => {
635
635
  if (opts.body === void 0 || opts.serializedBody === "") {
636
636
  opts.headers.delete("Content-Type");
637
637
  }
638
- const url = buildUrl(opts);
639
- return { opts, url };
638
+ const resolvedOpts = opts;
639
+ const url = buildUrl(resolvedOpts);
640
+ return { opts: resolvedOpts, url };
640
641
  };
641
642
  const request = async (options) => {
642
643
  const { opts, url } = await beforeRequest(options);
@@ -787,8 +788,9 @@ var createClient = (config = {}) => {
787
788
  url
788
789
  });
789
790
  };
791
+ const _buildUrl = (options) => buildUrl({ ..._config, ...options });
790
792
  return {
791
- buildUrl,
793
+ buildUrl: _buildUrl,
792
794
  connect: makeMethodFn("CONNECT"),
793
795
  delete: makeMethodFn("DELETE"),
794
796
  get: makeMethodFn("GET"),