@ahoo-wang/fetcher-decorator 1.0.1 → 1.0.2

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,26 +1,28 @@
1
1
  import { HttpMethod } from '@ahoo-wang/fetcher';
2
2
  import { ApiMetadata } from './apiDecorator';
3
3
  import { ResultExtractorCapable } from './resultExtractor';
4
+ export interface PathCapable {
5
+ /**
6
+ * Path for the endpoint (relative to class base path).
7
+ *
8
+ * This path will be appended to the class's base path to form the complete URL.
9
+ * Path parameters can be specified using curly braces, e.g., '/users/{id}'
10
+ */
11
+ path?: string;
12
+ }
4
13
  /**
5
14
  * Metadata for HTTP endpoints.
6
15
  *
7
16
  * Defines the configuration options for individual HTTP endpoints (methods).
8
17
  * These settings will override any corresponding class-level settings from ApiMetadata.
9
18
  */
10
- export interface EndpointMetadata extends ApiMetadata, ResultExtractorCapable {
19
+ export interface EndpointMetadata extends ApiMetadata, ResultExtractorCapable, PathCapable {
11
20
  /**
12
21
  * HTTP method for the endpoint.
13
22
  *
14
23
  * Specifies the HTTP verb to be used for this endpoint (GET, POST, PUT, DELETE, etc.)
15
24
  */
16
- method: HttpMethod;
17
- /**
18
- * Path for the endpoint (relative to class base path).
19
- *
20
- * This path will be appended to the class's base path to form the complete URL.
21
- * Path parameters can be specified using curly braces, e.g., '/users/{id}'
22
- */
23
- path?: string;
25
+ method?: HttpMethod;
24
26
  }
25
27
  export declare const ENDPOINT_METADATA_KEY: unique symbol;
26
28
  export type MethodEndpointMetadata = Omit<EndpointMetadata, 'method' | 'path'>;
@@ -48,7 +50,7 @@ export type MethodEndpointMetadata = Omit<EndpointMetadata, 'method' | 'path'>;
48
50
  * }
49
51
  * ```
50
52
  */
51
- export declare function endpoint(method: HttpMethod, path?: string, metadata?: MethodEndpointMetadata): (target: object, propertyKey: string | symbol) => void;
53
+ export declare function endpoint(method?: HttpMethod, path?: string, metadata?: MethodEndpointMetadata): (target: object, propertyKey: string | symbol) => void;
52
54
  export declare function get(path?: string, metadata?: MethodEndpointMetadata): (target: object, propertyKey: string | symbol) => void;
53
55
  export declare function post(path?: string, metadata?: MethodEndpointMetadata): (target: object, propertyKey: string | symbol) => void;
54
56
  export declare function put(path?: string, metadata?: MethodEndpointMetadata): (target: object, propertyKey: string | symbol) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"endpointDecorator.d.ts","sourceRoot":"","sources":["../src/endpointDecorator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,kBAAkB,CAAC;AAC1B,OAAO,EAAmB,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAE5E;;;;;GAKG;AACH,MAAM,WAAW,gBAAiB,SAAQ,WAAW,EAAE,sBAAsB;IAC3E;;;;OAIG;IACH,MAAM,EAAE,UAAU,CAAC;IAEnB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,qBAAqB,eAA8B,CAAC;AAEjE,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC,gBAAgB,EAAE,QAAQ,GAAG,MAAM,CAAC,CAAC;AAE/E;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,QAAQ,CACtB,MAAM,EAAE,UAAU,EAClB,IAAI,GAAE,MAAW,EACjB,QAAQ,GAAE,sBAA2B,IAErB,QAAQ,MAAM,EAAE,aAAa,MAAM,GAAG,MAAM,KAAG,IAAI,CAcpE;AAED,wBAAgB,GAAG,CAAC,IAAI,GAAE,MAAW,EAAE,QAAQ,GAAE,sBAA2B,YAhBlD,MAAM,eAAe,MAAM,GAAG,MAAM,KAAG,IAAI,CAkBpE;AAED,wBAAgB,IAAI,CAAC,IAAI,GAAE,MAAW,EAAE,QAAQ,GAAE,sBAA2B,YApBnD,MAAM,eAAe,MAAM,GAAG,MAAM,KAAG,IAA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as x, fetcherRegistrar as A, Fetcher as g, fetcher as y, mergeRequest as v, combineURLs as M } from "@ahoo-wang/fetcher";
1
+ import { HttpMethod as c, ExchangeError as g, fetcherRegistrar as v, Fetcher as q, fetcher as M, mergeRequest as S, combineURLs as w } from "@ahoo-wang/fetcher";
2
2
  import "reflect-metadata";
3
- const q = Symbol("endpoint:metadata");
4
- function d(t, e = "", r = {}) {
3
+ const T = Symbol("endpoint:metadata");
4
+ function d(t, e, r = {}) {
5
5
  return function(n, s) {
6
- const o = {
6
+ const a = {
7
7
  method: t,
8
8
  path: e,
9
9
  ...r
10
10
  };
11
11
  Reflect.defineMetadata(
12
- q,
13
- o,
12
+ T,
13
+ a,
14
14
  n,
15
15
  s
16
16
  );
17
17
  };
18
18
  }
19
- function Z(t = "", e = {}) {
19
+ function et(t = "", e = {}) {
20
20
  return d(c.GET, t, e);
21
21
  }
22
- function tt(t = "", e = {}) {
22
+ function rt(t = "", e = {}) {
23
23
  return d(c.POST, t, e);
24
24
  }
25
- function et(t = "", e = {}) {
25
+ function nt(t = "", e = {}) {
26
26
  return d(c.PUT, t, e);
27
27
  }
28
- function rt(t = "", e = {}) {
28
+ function st(t = "", e = {}) {
29
29
  return d(c.DELETE, t, e);
30
30
  }
31
- function nt(t = "", e = {}) {
31
+ function at(t = "", e = {}) {
32
32
  return d(c.PATCH, t, e);
33
33
  }
34
- function st(t = "", e = {}) {
34
+ function ot(t = "", e = {}) {
35
35
  return d(c.HEAD, t, e);
36
36
  }
37
- function ot(t = "", e = {}) {
37
+ function it(t = "", e = {}) {
38
38
  return d(c.OPTIONS, t, e);
39
39
  }
40
40
  const f = /* @__PURE__ */ new WeakMap();
41
- function S(t) {
41
+ function D(t) {
42
42
  if (typeof t != "function")
43
43
  throw new TypeError("Expected a function");
44
44
  if (f.has(t))
45
45
  return f.get(t);
46
46
  try {
47
- const e = t.toString().trim(), r = O(e);
48
- if (!D(r)) {
47
+ const e = t.toString().trim(), r = F(e);
48
+ if (!H(r)) {
49
49
  const s = [];
50
50
  return f.set(t, s), s;
51
51
  }
52
- const n = H(r);
52
+ const n = _(r);
53
53
  return f.set(t, n), n;
54
54
  } catch {
55
55
  const e = [];
56
56
  return f.set(t, e), e;
57
57
  }
58
58
  }
59
- function w(t, e, r, n) {
59
+ function O(t, e, r, n) {
60
60
  if (n)
61
61
  return n;
62
62
  try {
63
63
  const s = t[e];
64
64
  if (s && typeof s == "function") {
65
- const o = S(s);
66
- if (r < o.length)
67
- return o[r];
65
+ const a = D(s);
66
+ if (r < a.length)
67
+ return a[r];
68
68
  }
69
69
  } catch {
70
70
  }
71
71
  }
72
- function D(t) {
72
+ function H(t) {
73
73
  return t != null && t.trim() !== "";
74
74
  }
75
- function O(t) {
75
+ function F(t) {
76
76
  if (t.startsWith("(")) {
77
- const n = R(t, 0);
77
+ const n = P(t, 0);
78
78
  return n === -1 ? "" : t.substring(1, n);
79
79
  }
80
80
  const e = t.indexOf("(");
81
81
  if (e === -1) return "";
82
- const r = R(t, e);
82
+ const r = P(t, e);
83
83
  return r === -1 ? "" : t.substring(e + 1, r);
84
84
  }
85
- function R(t, e) {
85
+ function P(t, e) {
86
86
  let r = 1;
87
87
  for (let n = e + 1; n < t.length; n++) {
88
88
  const s = t[n];
@@ -93,95 +93,95 @@ function R(t, e) {
93
93
  }
94
94
  return -1;
95
95
  }
96
- function H(t) {
97
- return t.split(",").map(F).filter(_).map(N);
96
+ function _(t) {
97
+ return t.split(",").map(N).filter(U).map(Y);
98
98
  }
99
- function F(t) {
99
+ function N(t) {
100
100
  return t.trim();
101
101
  }
102
- function _(t) {
102
+ function U(t) {
103
103
  return t.length > 0;
104
104
  }
105
- function N(t) {
106
- let e = U(t);
107
- return e = Y(e), e.trim();
105
+ function Y(t) {
106
+ let e = k(t);
107
+ return e = G(e), e.trim();
108
108
  }
109
- function U(t) {
109
+ function k(t) {
110
110
  const e = t.indexOf("=");
111
111
  return e !== -1 ? t.substring(0, e) : t;
112
112
  }
113
- function Y(t) {
113
+ function G(t) {
114
114
  const e = t.indexOf(":");
115
115
  return e !== -1 ? t.substring(0, e) : t;
116
116
  }
117
- var h = /* @__PURE__ */ ((t) => (t.PATH = "path", t.QUERY = "query", t.HEADER = "header", t.BODY = "body", t.REQUEST = "request", t))(h || {});
117
+ var p = /* @__PURE__ */ ((t) => (t.PATH = "path", t.QUERY = "query", t.HEADER = "header", t.BODY = "body", t.REQUEST = "request", t))(p || {});
118
118
  const l = Symbol("parameter:metadata");
119
119
  function m(t, e = "") {
120
120
  return function(r, n, s) {
121
- const o = w(
121
+ const a = O(
122
122
  r,
123
123
  n,
124
124
  s,
125
125
  e
126
- ), a = Reflect.getMetadata(l, r, n) || /* @__PURE__ */ new Map(), i = {
126
+ ), o = Reflect.getMetadata(l, r, n) || /* @__PURE__ */ new Map(), i = {
127
127
  type: t,
128
- name: o,
128
+ name: a,
129
129
  index: s
130
130
  };
131
- a.set(s, i), Reflect.defineMetadata(
131
+ o.set(s, i), Reflect.defineMetadata(
132
132
  l,
133
- a,
133
+ o,
134
134
  r,
135
135
  n
136
136
  );
137
137
  };
138
138
  }
139
- function at(t = "") {
139
+ function ut(t = "") {
140
140
  return m("path", t);
141
141
  }
142
- function it(t = "") {
142
+ function ct(t = "") {
143
143
  return m("query", t);
144
144
  }
145
- function ut(t = "") {
145
+ function dt(t = "") {
146
146
  return m("header", t);
147
147
  }
148
- function ct() {
148
+ function pt() {
149
149
  return m(
150
150
  "body"
151
151
  /* BODY */
152
152
  );
153
153
  }
154
- function dt() {
154
+ function ht() {
155
155
  return m(
156
156
  "request"
157
157
  /* REQUEST */
158
158
  );
159
159
  }
160
- const I = (t) => t, k = (t) => t.requiredResponse, P = (t) => t.requiredResponse.json(), G = (t) => t.requiredResponse.text(), Q = (t) => {
160
+ const I = (t) => t, Q = (t) => t.requiredResponse, x = (t) => t.requiredResponse.json(), j = (t) => t.requiredResponse.text(), J = (t) => {
161
161
  if (!t.requiredResponse.eventStream)
162
- throw new x(t, "ServerSentEventStream is not supported");
162
+ throw new g(t, "ServerSentEventStream is not supported");
163
163
  return t.requiredResponse.eventStream();
164
- }, j = (t) => {
164
+ }, C = (t) => {
165
165
  if (!t.requiredResponse.jsonEventStream)
166
- throw new x(
166
+ throw new g(
167
167
  t,
168
168
  "JsonServerSentEventStream is not supported"
169
169
  );
170
170
  return t.requiredResponse.jsonEventStream();
171
- }, J = {
171
+ }, L = {
172
172
  Exchange: I,
173
- Response: k,
174
- Json: P,
175
- Text: G,
176
- EventStream: Q,
177
- JsonEventStream: j,
178
- DEFAULT: P
173
+ Response: Q,
174
+ Json: x,
175
+ Text: j,
176
+ EventStream: J,
177
+ JsonEventStream: C,
178
+ DEFAULT: x
179
179
  };
180
- function C(t) {
180
+ function W(t) {
181
181
  if (t)
182
- return t instanceof g ? t : A.requiredGet(t);
182
+ return t instanceof q ? t : v.requiredGet(t);
183
183
  }
184
- class L {
184
+ class B {
185
185
  /**
186
186
  * Creates a new FunctionMetadata instance.
187
187
  *
@@ -202,7 +202,7 @@ class L {
202
202
  * @returns The fetcher instance
203
203
  */
204
204
  get fetcher() {
205
- return C(this.endpoint.fetcher ?? this.api.fetcher) ?? y;
205
+ return W(this.endpoint.fetcher ?? this.api.fetcher) ?? M;
206
206
  }
207
207
  /**
208
208
  * Resolves the request configuration from the method arguments.
@@ -255,28 +255,28 @@ class L {
255
255
  ...this.api.headers,
256
256
  ...this.endpoint.headers
257
257
  };
258
- let o, a, i = {};
259
- e.forEach((u, b) => {
258
+ let a, o, i = {};
259
+ e.forEach((u, A) => {
260
260
  if (u instanceof AbortSignal) {
261
- a = u;
261
+ o = u;
262
262
  return;
263
263
  }
264
- const p = this.parameters.get(b);
265
- if (p)
266
- switch (p.type) {
267
- case h.PATH:
268
- this.processPathParam(p, u, r);
264
+ const h = this.parameters.get(A);
265
+ if (h)
266
+ switch (h.type) {
267
+ case p.PATH:
268
+ this.processPathParam(h, u, r);
269
269
  break;
270
- case h.QUERY:
271
- this.processQueryParam(p, u, n);
270
+ case p.QUERY:
271
+ this.processQueryParam(h, u, n);
272
272
  break;
273
- case h.HEADER:
274
- this.processHeaderParam(p, u, s);
273
+ case p.HEADER:
274
+ this.processHeaderParam(h, u, s);
275
275
  break;
276
- case h.BODY:
277
- o = u;
276
+ case p.BODY:
277
+ a = u;
278
278
  break;
279
- case h.REQUEST:
279
+ case p.REQUEST:
280
280
  i = this.processRequestParam(u);
281
281
  break;
282
282
  }
@@ -284,15 +284,15 @@ class L {
284
284
  const E = {
285
285
  path: r,
286
286
  query: n
287
- }, T = {
287
+ }, b = {
288
288
  method: this.endpoint.method,
289
289
  urlParams: E,
290
290
  headers: s,
291
- body: o,
291
+ body: a,
292
292
  timeout: this.resolveTimeout(),
293
- signal: a
294
- };
295
- return v(T, i);
293
+ signal: o
294
+ }, R = S(b, i), y = i.path;
295
+ return R.url = this.resolvePath(y), R;
296
296
  }
297
297
  processPathParam(e, r, n) {
298
298
  const s = e.name || `param${e.index}`;
@@ -333,16 +333,14 @@ class L {
333
333
  return e;
334
334
  }
335
335
  /**
336
- * Resolves the full path for the request.
336
+ * Resolves the complete path by combining base path and endpoint path
337
337
  *
338
- * Combines the base path from API metadata with the endpoint path
339
- * from endpoint metadata to create the complete path.
340
- *
341
- * @returns The full path for the request
338
+ * @param parameterPath - Optional path parameter to use instead of endpoint path
339
+ * @returns The combined URL path
342
340
  */
343
- resolvePath() {
344
- const e = this.endpoint.basePath || this.api.basePath || "", r = this.endpoint.path || "";
345
- return M(e, r);
341
+ resolvePath(e) {
342
+ const r = this.endpoint.basePath || this.api.basePath || "", n = e || this.endpoint.path || "";
343
+ return w(r, n);
346
344
  }
347
345
  /**
348
346
  * Resolves the timeout for the request.
@@ -356,11 +354,11 @@ class L {
356
354
  return this.endpoint.timeout || this.api.timeout;
357
355
  }
358
356
  resolveResultExtractor() {
359
- return this.endpoint.resultExtractor || this.api.resultExtractor || J.DEFAULT;
357
+ return this.endpoint.resultExtractor || this.api.resultExtractor || L.DEFAULT;
360
358
  }
361
359
  }
362
- const W = "fetcher";
363
- class B {
360
+ const $ = "fetcher";
361
+ class K {
364
362
  /**
365
363
  * Creates a new RequestExecutor instance.
366
364
  *
@@ -378,8 +376,8 @@ class B {
378
376
  getTargetFetcher(e) {
379
377
  if (!e || typeof e != "object")
380
378
  return;
381
- const r = e[W];
382
- if (r instanceof g)
379
+ const r = e[$];
380
+ if (r instanceof q)
383
381
  return r;
384
382
  }
385
383
  /**
@@ -393,89 +391,86 @@ class B {
393
391
  * @returns A Promise that resolves to the Response
394
392
  */
395
393
  async execute(e, r) {
396
- const n = this.metadata.resolvePath(), s = this.metadata.resolveRequest(r), o = {
397
- url: n,
398
- ...s
399
- }, i = await (this.getTargetFetcher(e) || this.metadata.fetcher).request(o);
400
- return this.metadata.resolveResultExtractor()(i);
394
+ const n = this.getTargetFetcher(e) || this.metadata.fetcher, s = this.metadata.resolveRequest(r), a = await n.request(s);
395
+ return this.metadata.resolveResultExtractor()(a);
401
396
  }
402
397
  }
403
- const $ = Symbol("api:metadata");
404
- function K(t, e, r) {
398
+ const V = Symbol("api:metadata");
399
+ function z(t, e, r) {
405
400
  const n = t.prototype[e];
406
401
  if (e === "constructor" || typeof n != "function")
407
402
  return;
408
403
  const s = Reflect.getMetadata(
409
- q,
404
+ T,
410
405
  t.prototype,
411
406
  e
412
407
  );
413
408
  if (!s)
414
409
  return;
415
- const o = Reflect.getMetadata(
410
+ const a = Reflect.getMetadata(
416
411
  l,
417
412
  t.prototype,
418
413
  e
419
- ) || /* @__PURE__ */ new Map(), a = new L(
414
+ ) || /* @__PURE__ */ new Map(), o = new B(
420
415
  e,
421
416
  r,
422
417
  s,
423
- o
424
- ), i = new B(a);
418
+ a
419
+ ), i = new K(o);
425
420
  t.prototype[e] = function(...E) {
426
421
  return i.execute(this, E);
427
422
  };
428
423
  }
429
- function ht(t = "", e = {}) {
424
+ function ft(t = "", e = {}) {
430
425
  return function(r) {
431
426
  const n = {
432
427
  basePath: t,
433
428
  ...e
434
429
  };
435
- return Reflect.defineMetadata($, n, r), Object.getOwnPropertyNames(r.prototype).forEach((s) => {
436
- K(r, s, n);
430
+ return Reflect.defineMetadata(V, n, r), Object.getOwnPropertyNames(r.prototype).forEach((s) => {
431
+ z(r, s, n);
437
432
  }), r;
438
433
  };
439
434
  }
440
- class V extends Error {
435
+ class X extends Error {
441
436
  constructor() {
442
437
  super("Implementation will be generated automatically."), this.name = "AutoGenerated";
443
438
  }
444
439
  }
445
- const pt = (...t) => new V();
440
+ const mt = (...t) => new X();
446
441
  export {
447
- $ as API_METADATA_KEY,
448
- V as AutoGenerated,
449
- q as ENDPOINT_METADATA_KEY,
450
- Q as EventStreamResultExtractor,
442
+ V as API_METADATA_KEY,
443
+ X as AutoGenerated,
444
+ T as ENDPOINT_METADATA_KEY,
445
+ J as EventStreamResultExtractor,
451
446
  I as ExchangeResultExtractor,
452
- L as FunctionMetadata,
453
- j as JsonEventStreamResultExtractor,
454
- P as JsonResultExtractor,
447
+ B as FunctionMetadata,
448
+ C as JsonEventStreamResultExtractor,
449
+ x as JsonResultExtractor,
455
450
  l as PARAMETER_METADATA_KEY,
456
- h as ParameterType,
457
- B as RequestExecutor,
458
- k as ResponseResultExtractor,
459
- J as ResultExtractors,
460
- G as TextResultExtractor,
461
- ht as api,
462
- pt as autoGeneratedError,
463
- ct as body,
464
- rt as del,
451
+ p as ParameterType,
452
+ K as RequestExecutor,
453
+ Q as ResponseResultExtractor,
454
+ L as ResultExtractors,
455
+ j as TextResultExtractor,
456
+ ft as api,
457
+ mt as autoGeneratedError,
458
+ pt as body,
459
+ st as del,
465
460
  d as endpoint,
466
- Z as get,
467
- C as getFetcher,
468
- w as getParameterName,
469
- S as getParameterNames,
470
- st as head,
471
- ut as header,
472
- ot as options,
461
+ et as get,
462
+ W as getFetcher,
463
+ O as getParameterName,
464
+ D as getParameterNames,
465
+ ot as head,
466
+ dt as header,
467
+ it as options,
473
468
  m as parameter,
474
- nt as patch,
475
- at as path,
476
- tt as post,
477
- et as put,
478
- it as query,
479
- dt as request
469
+ at as patch,
470
+ ut as path,
471
+ rt as post,
472
+ nt as put,
473
+ ct as query,
474
+ ht as request
480
475
  };
481
476
  //# sourceMappingURL=index.es.js.map