@localisprimary/esi 2.1.0 → 2.1.1

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/README.md CHANGED
@@ -29,6 +29,7 @@ console.log(alliance.data)
29
29
  ## Options
30
30
 
31
31
  The `EsiClient` constructor requires an options object with the following properties:
32
+
32
33
  | Parameter | Description | Type | Default | Required |
33
34
  | ------------------- | ------------------------------------------------------ | --------- | ----------- | -------- |
34
35
  | `userAgent` | Resolves to `"localisprimary/esi <userAgent>"` | `string` | | Yes |
@@ -83,7 +84,7 @@ esi.postCharacterMail({
83
84
  character_id: 91884358,
84
85
 
85
86
  // request body
86
- approved_cost: 0,
87
+ subject: 'Test mail',
87
88
  body: 'Hello from the ESI!',
88
89
  recipients: [{ recipient_type: 'character', recipient_id: 96135698 }],
89
90
  })
package/dist/cache.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { EsiResponse } from './types';
1
+ import type { EsiResponse } from './types.js';
2
2
  type CacheHeaders = Record<string, string>;
3
3
  interface CacheEntry {
4
4
  response: EsiResponse<unknown, CacheHeaders>;
package/dist/client.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import * as Types from './types';
1
+ import type * as Types from './types.js';
2
2
  export declare class EsiClient {
3
3
  private readonly baseUrl;
4
4
  private readonly userAgent;
package/dist/client.js CHANGED
@@ -1,5 +1,5 @@
1
- import { createCacheEntry, createCacheKey, esiMemoryCache, isFresh, refreshCacheEntry, } from './cache';
2
- const COMPATIBILITY_DATE = '2026-08-19';
1
+ import { createCacheEntry, createCacheKey, esiMemoryCache, isFresh, refreshCacheEntry, } from './cache.js';
2
+ const COMPATIBILITY_DATE = '2026-08-23';
3
3
  export class EsiClient {
4
4
  constructor(options) {
5
5
  this.baseUrl = 'https://esi.evetech.net';
@@ -19,7 +19,8 @@ export class EsiClient {
19
19
  if (params) {
20
20
  Object.entries(params).forEach(([key, value]) => {
21
21
  if (value !== undefined) {
22
- url.searchParams.append(key, String(value));
22
+ const values = Array.isArray(value) ? value : [value];
23
+ values.forEach(item => url.searchParams.append(key, String(item)));
23
24
  }
24
25
  });
25
26
  }
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { EsiClient } from './client';
2
- export * from './types';
1
+ export { EsiClient } from './client.js';
2
+ export * from './types.js';
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { EsiClient } from './client';
2
- export * from './types';
1
+ export { EsiClient } from './client.js';
2
+ export * from './types.js';