@eudiplo/sdk-core 5.0.0 → 5.1.0-main.0f9e336
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/dist/api/client/client.gen.d.mts +1 -1
- package/dist/api/client/client.gen.d.ts +1 -1
- package/dist/api/client/index.d.mts +3 -3
- package/dist/api/client/index.d.ts +3 -3
- package/dist/api/client/index.js +19 -11
- package/dist/api/client/index.mjs +19 -11
- package/dist/api/client/types.gen.d.mts +1 -1
- package/dist/api/client/types.gen.d.ts +1 -1
- package/dist/api/client.gen.d.mts +2 -2
- package/dist/api/client.gen.d.ts +2 -2
- package/dist/api/index.d.mts +158 -114
- package/dist/api/index.d.ts +158 -114
- package/dist/api/index.js +43 -0
- package/dist/api/index.mjs +36 -1
- package/dist/index.d.mts +10 -6
- package/dist/index.d.ts +10 -6
- package/dist/index.js +113 -12
- package/dist/index.mjs +105 -13
- package/dist/{types.gen-z3We9JHj.d.mts → types.gen-BTQX6LCX.d.mts} +821 -147
- package/dist/{types.gen-z3We9JHj.d.ts → types.gen-BTQX6LCX.d.ts} +821 -147
- package/dist/{types.gen-Cc6DtXw9.d.mts → types.gen-DZ4ax15r.d.mts} +13 -1
- package/dist/{types.gen-Cc6DtXw9.d.ts → types.gen-DZ4ax15r.d.ts} +13 -1
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as Auth,
|
|
1
|
+
export { A as Auth, a as Client, c as ClientMeta, b as ClientOptions, C as Config, d as CreateClientConfig, O as Options, Q as QuerySerializerOptions, R as RequestOptions, e as RequestResult, f as ResolvedRequestOptions, g as ResponseStyle, S as ServerSentEventsResult, T as TDataShape, h as createConfig, i as formDataBodySerializer, j as jsonBodySerializer, m as mergeHeaders, u as urlSearchParamsBodySerializer } from '../../types.gen-DZ4ax15r.mjs';
|
|
2
2
|
export { createClient } from './client.gen.mjs';
|
|
3
3
|
|
|
4
4
|
type Slot = 'body' | 'headers' | 'path' | 'query';
|
|
@@ -37,12 +37,12 @@ interface Fields {
|
|
|
37
37
|
}
|
|
38
38
|
type FieldsConfig = ReadonlyArray<Field | Fields>;
|
|
39
39
|
interface Params {
|
|
40
|
-
body
|
|
40
|
+
body?: unknown;
|
|
41
41
|
headers: Record<string, unknown>;
|
|
42
42
|
path: Record<string, unknown>;
|
|
43
43
|
query: Record<string, unknown>;
|
|
44
44
|
}
|
|
45
|
-
declare
|
|
45
|
+
declare function buildClientParams(args: ReadonlyArray<unknown>, fields: FieldsConfig): Params;
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
48
|
* JSON-friendly union that mirrors what Pinia Colada can hash.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as Auth,
|
|
1
|
+
export { A as Auth, a as Client, c as ClientMeta, b as ClientOptions, C as Config, d as CreateClientConfig, O as Options, Q as QuerySerializerOptions, R as RequestOptions, e as RequestResult, f as ResolvedRequestOptions, g as ResponseStyle, S as ServerSentEventsResult, T as TDataShape, h as createConfig, i as formDataBodySerializer, j as jsonBodySerializer, m as mergeHeaders, u as urlSearchParamsBodySerializer } from '../../types.gen-DZ4ax15r.js';
|
|
2
2
|
export { createClient } from './client.gen.js';
|
|
3
3
|
|
|
4
4
|
type Slot = 'body' | 'headers' | 'path' | 'query';
|
|
@@ -37,12 +37,12 @@ interface Fields {
|
|
|
37
37
|
}
|
|
38
38
|
type FieldsConfig = ReadonlyArray<Field | Fields>;
|
|
39
39
|
interface Params {
|
|
40
|
-
body
|
|
40
|
+
body?: unknown;
|
|
41
41
|
headers: Record<string, unknown>;
|
|
42
42
|
path: Record<string, unknown>;
|
|
43
43
|
query: Record<string, unknown>;
|
|
44
44
|
}
|
|
45
|
-
declare
|
|
45
|
+
declare function buildClientParams(args: ReadonlyArray<unknown>, fields: FieldsConfig): Params;
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
48
|
* JSON-friendly union that mirrors what Pinia Colada can hash.
|
package/dist/api/client/index.js
CHANGED
|
@@ -61,7 +61,7 @@ var extraPrefixesMap = {
|
|
|
61
61
|
$query_: "query"
|
|
62
62
|
};
|
|
63
63
|
var extraPrefixes = Object.entries(extraPrefixesMap);
|
|
64
|
-
|
|
64
|
+
function buildKeyMap(fields, map) {
|
|
65
65
|
if (!map) {
|
|
66
66
|
map = /* @__PURE__ */ new Map();
|
|
67
67
|
}
|
|
@@ -82,22 +82,30 @@ var buildKeyMap = (fields, map) => {
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
return map;
|
|
85
|
-
}
|
|
86
|
-
|
|
85
|
+
}
|
|
86
|
+
function stripEmptySlots(params) {
|
|
87
87
|
for (const [slot, value] of Object.entries(params)) {
|
|
88
|
+
if (slot === "body") continue;
|
|
88
89
|
if (value && typeof value === "object" && !Array.isArray(value) && !Object.keys(value).length) {
|
|
89
90
|
delete params[slot];
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
|
-
}
|
|
93
|
-
|
|
93
|
+
}
|
|
94
|
+
function buildClientParams(args, fields) {
|
|
94
95
|
const params = {
|
|
95
|
-
body: /* @__PURE__ */ Object.create(null),
|
|
96
96
|
headers: /* @__PURE__ */ Object.create(null),
|
|
97
97
|
path: /* @__PURE__ */ Object.create(null),
|
|
98
98
|
query: /* @__PURE__ */ Object.create(null)
|
|
99
99
|
};
|
|
100
100
|
const map = buildKeyMap(fields);
|
|
101
|
+
function writeSlot(slot, key, value) {
|
|
102
|
+
let record = params[slot];
|
|
103
|
+
if (record === void 0) {
|
|
104
|
+
record = /* @__PURE__ */ Object.create(null);
|
|
105
|
+
params[slot] = record;
|
|
106
|
+
}
|
|
107
|
+
record[key] = value;
|
|
108
|
+
}
|
|
101
109
|
let config;
|
|
102
110
|
for (const [index, arg] of args.entries()) {
|
|
103
111
|
if (fields[index]) {
|
|
@@ -111,7 +119,7 @@ var buildClientParams = (args, fields) => {
|
|
|
111
119
|
const field = map.get(config.key);
|
|
112
120
|
const name = field.map || config.key;
|
|
113
121
|
if (field.in) {
|
|
114
|
-
|
|
122
|
+
writeSlot(field.in, name, arg);
|
|
115
123
|
}
|
|
116
124
|
} else {
|
|
117
125
|
params.body = arg;
|
|
@@ -122,7 +130,7 @@ var buildClientParams = (args, fields) => {
|
|
|
122
130
|
if (field) {
|
|
123
131
|
if (field.in) {
|
|
124
132
|
const name = field.map || key;
|
|
125
|
-
|
|
133
|
+
writeSlot(field.in, name, value);
|
|
126
134
|
} else {
|
|
127
135
|
params[field.map] = value;
|
|
128
136
|
}
|
|
@@ -130,11 +138,11 @@ var buildClientParams = (args, fields) => {
|
|
|
130
138
|
const extra = extraPrefixes.find(([prefix]) => key.startsWith(prefix));
|
|
131
139
|
if (extra) {
|
|
132
140
|
const [prefix, slot] = extra;
|
|
133
|
-
|
|
141
|
+
writeSlot(slot, key.slice(prefix.length), value);
|
|
134
142
|
} else if ("allowExtra" in config && config.allowExtra) {
|
|
135
143
|
for (const [slot, allowed] of Object.entries(config.allowExtra)) {
|
|
136
144
|
if (allowed) {
|
|
137
|
-
|
|
145
|
+
writeSlot(slot, key, value);
|
|
138
146
|
break;
|
|
139
147
|
}
|
|
140
148
|
}
|
|
@@ -145,7 +153,7 @@ var buildClientParams = (args, fields) => {
|
|
|
145
153
|
}
|
|
146
154
|
stripEmptySlots(params);
|
|
147
155
|
return params;
|
|
148
|
-
}
|
|
156
|
+
}
|
|
149
157
|
|
|
150
158
|
// src/api/core/queryKeySerializer.gen.ts
|
|
151
159
|
var queryKeyJsonReplacer = (_key, value) => {
|
|
@@ -59,7 +59,7 @@ var extraPrefixesMap = {
|
|
|
59
59
|
$query_: "query"
|
|
60
60
|
};
|
|
61
61
|
var extraPrefixes = Object.entries(extraPrefixesMap);
|
|
62
|
-
|
|
62
|
+
function buildKeyMap(fields, map) {
|
|
63
63
|
if (!map) {
|
|
64
64
|
map = /* @__PURE__ */ new Map();
|
|
65
65
|
}
|
|
@@ -80,22 +80,30 @@ var buildKeyMap = (fields, map) => {
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
return map;
|
|
83
|
-
}
|
|
84
|
-
|
|
83
|
+
}
|
|
84
|
+
function stripEmptySlots(params) {
|
|
85
85
|
for (const [slot, value] of Object.entries(params)) {
|
|
86
|
+
if (slot === "body") continue;
|
|
86
87
|
if (value && typeof value === "object" && !Array.isArray(value) && !Object.keys(value).length) {
|
|
87
88
|
delete params[slot];
|
|
88
89
|
}
|
|
89
90
|
}
|
|
90
|
-
}
|
|
91
|
-
|
|
91
|
+
}
|
|
92
|
+
function buildClientParams(args, fields) {
|
|
92
93
|
const params = {
|
|
93
|
-
body: /* @__PURE__ */ Object.create(null),
|
|
94
94
|
headers: /* @__PURE__ */ Object.create(null),
|
|
95
95
|
path: /* @__PURE__ */ Object.create(null),
|
|
96
96
|
query: /* @__PURE__ */ Object.create(null)
|
|
97
97
|
};
|
|
98
98
|
const map = buildKeyMap(fields);
|
|
99
|
+
function writeSlot(slot, key, value) {
|
|
100
|
+
let record = params[slot];
|
|
101
|
+
if (record === void 0) {
|
|
102
|
+
record = /* @__PURE__ */ Object.create(null);
|
|
103
|
+
params[slot] = record;
|
|
104
|
+
}
|
|
105
|
+
record[key] = value;
|
|
106
|
+
}
|
|
99
107
|
let config;
|
|
100
108
|
for (const [index, arg] of args.entries()) {
|
|
101
109
|
if (fields[index]) {
|
|
@@ -109,7 +117,7 @@ var buildClientParams = (args, fields) => {
|
|
|
109
117
|
const field = map.get(config.key);
|
|
110
118
|
const name = field.map || config.key;
|
|
111
119
|
if (field.in) {
|
|
112
|
-
|
|
120
|
+
writeSlot(field.in, name, arg);
|
|
113
121
|
}
|
|
114
122
|
} else {
|
|
115
123
|
params.body = arg;
|
|
@@ -120,7 +128,7 @@ var buildClientParams = (args, fields) => {
|
|
|
120
128
|
if (field) {
|
|
121
129
|
if (field.in) {
|
|
122
130
|
const name = field.map || key;
|
|
123
|
-
|
|
131
|
+
writeSlot(field.in, name, value);
|
|
124
132
|
} else {
|
|
125
133
|
params[field.map] = value;
|
|
126
134
|
}
|
|
@@ -128,11 +136,11 @@ var buildClientParams = (args, fields) => {
|
|
|
128
136
|
const extra = extraPrefixes.find(([prefix]) => key.startsWith(prefix));
|
|
129
137
|
if (extra) {
|
|
130
138
|
const [prefix, slot] = extra;
|
|
131
|
-
|
|
139
|
+
writeSlot(slot, key.slice(prefix.length), value);
|
|
132
140
|
} else if ("allowExtra" in config && config.allowExtra) {
|
|
133
141
|
for (const [slot, allowed] of Object.entries(config.allowExtra)) {
|
|
134
142
|
if (allowed) {
|
|
135
|
-
|
|
143
|
+
writeSlot(slot, key, value);
|
|
136
144
|
break;
|
|
137
145
|
}
|
|
138
146
|
}
|
|
@@ -143,7 +151,7 @@ var buildClientParams = (args, fields) => {
|
|
|
143
151
|
}
|
|
144
152
|
stripEmptySlots(params);
|
|
145
153
|
return params;
|
|
146
|
-
}
|
|
154
|
+
}
|
|
147
155
|
|
|
148
156
|
// src/api/core/queryKeySerializer.gen.ts
|
|
149
157
|
var queryKeyJsonReplacer = (_key, value) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { a as Client, b as ClientOptions, C as Config, d as CreateClientConfig, O as Options, R as RequestOptions, e as RequestResult, f as ResolvedRequestOptions, g as ResponseStyle, T as TDataShape } from '../../types.gen-DZ4ax15r.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { a as Client, b as ClientOptions, C as Config, d as CreateClientConfig, O as Options, R as RequestOptions, e as RequestResult, f as ResolvedRequestOptions, g as ResponseStyle, T as TDataShape } from '../../types.gen-DZ4ax15r.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { C as ClientOptions$1 } from '../types.gen-
|
|
1
|
+
import { b as ClientOptions, C as Config, a as Client } from '../types.gen-DZ4ax15r.mjs';
|
|
2
|
+
import { C as ClientOptions$1 } from '../types.gen-BTQX6LCX.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The `createClientConfig()` function will be called on client initialization
|
package/dist/api/client.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { C as ClientOptions$1 } from '../types.gen-
|
|
1
|
+
import { b as ClientOptions, C as Config, a as Client } from '../types.gen-DZ4ax15r.js';
|
|
2
|
+
import { C as ClientOptions$1 } from '../types.gen-BTQX6LCX.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The `createClientConfig()` function will be called on client initialization
|