@backendfree/core 0.1.0 → 0.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/package.json +3 -1
- package/dist/.tsbuildinfo +0 -1
- package/dist/.tsbuildinfo 3 +0 -1
- package/dist/client 3.js +0 -346
- package/dist/client.d 3.ts +0 -127
- package/dist/client.d.ts 3.map +0 -1
- package/dist/client.js 3.map +0 -1
- package/dist/errors 3.js +0 -111
- package/dist/errors.d 3.ts +0 -96
- package/dist/errors.d.ts 3.map +0 -1
- package/dist/errors.js 3.map +0 -1
- package/dist/index 3.js +0 -16
- package/dist/index.d 3.ts +0 -20
- package/dist/index.d.ts 3.map +0 -1
- package/dist/index.js 3.map +0 -1
- package/dist/types 3.js +0 -10
- package/dist/types.d 3.ts +0 -57
- package/dist/types.d.ts 3.map +0 -1
- package/dist/types.js 3.map +0 -1
- package/dist/webhooks 3.js +0 -207
- package/dist/webhooks.d 3.ts +0 -115
- package/dist/webhooks.d.ts 3.map +0 -1
- package/dist/webhooks.js 3.map +0 -1
package/dist/client.d 3.ts
DELETED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The client every other @georithaminator package is built on.
|
|
3
|
-
*
|
|
4
|
-
* `fetch`, `AbortSignal` and `crypto.randomUUID` and nothing else, so the same
|
|
5
|
-
* import works in a build script, a Next.js route, a Worker at the edge and a
|
|
6
|
-
* browser bundle.
|
|
7
|
-
*
|
|
8
|
-
* Five things are worth knowing before reading further.
|
|
9
|
-
*
|
|
10
|
-
* **No path names a project.** The key says which one, which is why there is no
|
|
11
|
-
* site or project option to get wrong and no way to read one project with
|
|
12
|
-
* another's key.
|
|
13
|
-
*
|
|
14
|
-
* **A secret key in a browser throws.** It is the one mistake with this product
|
|
15
|
-
* that cannot be undone by a deploy: a publishable key in a bundle is the
|
|
16
|
-
* design, and a secret one there is every booking, every customer and every
|
|
17
|
-
* payment handed to whoever opens the network tab.
|
|
18
|
-
*
|
|
19
|
-
* **Errors keep the API's own vocabulary.** No second set of names to learn, and
|
|
20
|
-
* `code` is what a caller branches on.
|
|
21
|
-
*
|
|
22
|
-
* **Conditional reads are on by default.** Every response carries an ETag, so a
|
|
23
|
-
* repeat read costs a 304 with no body until something changes.
|
|
24
|
-
*
|
|
25
|
-
* **Writes carry an idempotency key whether or not you pass one.** A retried
|
|
26
|
-
* booking must never be a second appointment, and the header is the only thing
|
|
27
|
-
* that makes a retry safe, so no developer should have to remember it.
|
|
28
|
-
*/
|
|
29
|
-
import type { CacheEntry, CacheStore, Manifest, Response as Envelope } from './types.js';
|
|
30
|
-
/** Where `/v1` lives under an origin. */
|
|
31
|
-
export declare const API_PREFIX = "/api/v1";
|
|
32
|
-
/** Ten seconds. Long enough for a cold start, short enough to fail a build fast. */
|
|
33
|
-
export declare const DEFAULT_TIMEOUT = 10000;
|
|
34
|
-
/** How many ETagged responses the built-in cache keeps before evicting. */
|
|
35
|
-
export declare const DEFAULT_CACHE_SIZE = 100;
|
|
36
|
-
/** The API's own ceiling. Asking for more is capped server side. */
|
|
37
|
-
export declare const MAX_PAGE_SIZE = 100;
|
|
38
|
-
export interface ClientOptions {
|
|
39
|
-
/**
|
|
40
|
-
* Where the platform runs, with no trailing path: `https://api.example.ch`.
|
|
41
|
-
*
|
|
42
|
-
* Required rather than defaulted, because this platform has no one published
|
|
43
|
-
* address yet and a wrong default is a client that talks confidently to
|
|
44
|
-
* nothing.
|
|
45
|
-
*/
|
|
46
|
-
origin: string;
|
|
47
|
-
/**
|
|
48
|
-
* `pk_live_...` in anything a browser can read, `sk_live_...` on a server.
|
|
49
|
-
* The prefix is in the key so it can be told apart at a glance.
|
|
50
|
-
*/
|
|
51
|
-
key: string;
|
|
52
|
-
/**
|
|
53
|
-
* Swap in your own `fetch`: a test double, a Worker's bound fetcher, or
|
|
54
|
-
* Next.js's caching one with `{next: {revalidate}}` already baked in.
|
|
55
|
-
*/
|
|
56
|
-
fetch?: typeof globalThis.fetch;
|
|
57
|
-
/** Per-request timeout in milliseconds. `0` disables it. */
|
|
58
|
-
timeout?: number;
|
|
59
|
-
/** ETag caching: on (default), off, or your own store. */
|
|
60
|
-
cache?: boolean | CacheStore;
|
|
61
|
-
/** Extra headers on every request: a proxy, a tunnel's bypass. */
|
|
62
|
-
headers?: Record<string, string>;
|
|
63
|
-
}
|
|
64
|
-
export interface RequestOptions {
|
|
65
|
-
method?: string;
|
|
66
|
-
/** `undefined` and `null` are dropped rather than sent as the string. */
|
|
67
|
-
query?: Record<string, string | number | boolean | undefined | null>;
|
|
68
|
-
/** Serialised as JSON. Anything but GET may carry one. */
|
|
69
|
-
body?: unknown;
|
|
70
|
-
headers?: Record<string, string>;
|
|
71
|
-
/**
|
|
72
|
-
* One request is one write, however many times it is sent. Generated for you
|
|
73
|
-
* on every method that is not GET; pass your own to make a retry from a
|
|
74
|
-
* different process count as the same request.
|
|
75
|
-
*/
|
|
76
|
-
idempotencyKey?: string;
|
|
77
|
-
/** Pass `false` to bypass the ETag cache for this call. */
|
|
78
|
-
cache?: boolean;
|
|
79
|
-
signal?: AbortSignal;
|
|
80
|
-
}
|
|
81
|
-
export declare class Client {
|
|
82
|
-
#private;
|
|
83
|
-
readonly origin: string;
|
|
84
|
-
readonly publishable: boolean;
|
|
85
|
-
constructor(options: ClientOptions);
|
|
86
|
-
/**
|
|
87
|
-
* What this key can reach: the project, its clock, its currency and which
|
|
88
|
-
* modules are switched on.
|
|
89
|
-
*
|
|
90
|
-
* Worth calling first. It is the difference between "bookings is not enabled
|
|
91
|
-
* for this project" and a 404 from an endpoint the developer was told exists.
|
|
92
|
-
*/
|
|
93
|
-
project(options?: RequestOptions): Promise<Manifest>;
|
|
94
|
-
/**
|
|
95
|
-
* Whether a module is switched on, without a second call.
|
|
96
|
-
*
|
|
97
|
-
* Reads the manifest, so it costs a 304 once the first read is cached.
|
|
98
|
-
*/
|
|
99
|
-
has(module: string, options?: RequestOptions): Promise<boolean>;
|
|
100
|
-
get<T>(path: string, options?: RequestOptions): Promise<T>;
|
|
101
|
-
post<T>(path: string, body?: unknown, options?: RequestOptions): Promise<T>;
|
|
102
|
-
/**
|
|
103
|
-
* Any call, typed by the caller.
|
|
104
|
-
*
|
|
105
|
-
* Deliberately public. The typed methods on this and every other package are
|
|
106
|
-
* conveniences over it, and when the API grows something the SDK has not
|
|
107
|
-
* learned yet this still reaches it, with the same auth, timeout, errors,
|
|
108
|
-
* caching and idempotency.
|
|
109
|
-
*/
|
|
110
|
-
request<T>(path: string, options?: RequestOptions): Promise<T>;
|
|
111
|
-
/** The same call, with the status, the ETag and whether it was replayed. */
|
|
112
|
-
send<T>(path: string, options?: RequestOptions): Promise<Envelope<T>>;
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* The default ETag store: the last `DEFAULT_CACHE_SIZE` responses, oldest out.
|
|
116
|
-
*
|
|
117
|
-
* A Map keeps insertion order, so re-inserting on read makes this least
|
|
118
|
-
* recently used without a second structure.
|
|
119
|
-
*/
|
|
120
|
-
export declare class MemoryCache implements CacheStore {
|
|
121
|
-
#private;
|
|
122
|
-
constructor(limit?: number);
|
|
123
|
-
get(key: string): CacheEntry | undefined;
|
|
124
|
-
set(key: string, entry: CacheEntry): void;
|
|
125
|
-
delete(key: string): void;
|
|
126
|
-
}
|
|
127
|
-
//# sourceMappingURL=client.d.ts.map
|
package/dist/client.d.ts 3.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAWH,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEzF,yCAAyC;AACzC,eAAO,MAAM,UAAU,YAAY,CAAC;AAEpC,oFAAoF;AACpF,eAAO,MAAM,eAAe,QAAS,CAAC;AAEtC,2EAA2E;AAC3E,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GAAG,KAAK,CAAC;IACtB,CAAC;IAED,GAAG,CAAC,GAAW;QACb,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACrC,IAAI,KAAK,EAAE,CAAC;YACV,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YAC1B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAChC,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,GAAG,CAAC,GAAW,EAAE,KAAiB;QAChC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC1B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC9B,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;YACrC,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC;YAC3C,IAAI,CAAC,MAAM,CAAC,IAAI;gBAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvD,CAAC;IACH,CAAC;IAED,MAAM,CAAC,GAAW;QAChB,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC5B,CAAC;CACF"}
|
package/dist/errors 3.js
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Failures, in the shape the API already reports them.
|
|
3
|
-
*
|
|
4
|
-
* Every `/v1` error arrives as one envelope:
|
|
5
|
-
*
|
|
6
|
-
* {"error": {"type": "invalid_request", "code": "slot_unavailable",
|
|
7
|
-
* "message": "That time is no longer free.", "param": "starts_at"}}
|
|
8
|
-
*
|
|
9
|
-
* So this does not invent a second vocabulary. `type` is the coarse class and is
|
|
10
|
-
* what decides whether retrying could help. `code` is the specific reason and is
|
|
11
|
-
* what a caller branches on. `message` is written for a person and may be
|
|
12
|
-
* reworded at any time, so branching on it will break.
|
|
13
|
-
*
|
|
14
|
-
* Two failures never reach the API and so have no envelope of their own:
|
|
15
|
-
* `unreachable`, when nothing answered at all, and `config`, when the client was
|
|
16
|
-
* built wrong. They are given the same shape rather than a different one,
|
|
17
|
-
* because a caller catching errors wants one thing to look at.
|
|
18
|
-
*
|
|
19
|
-
* Checks are functions over `type` rather than `instanceof`. Two copies of a
|
|
20
|
-
* package in one dependency tree give two class identities and one of them
|
|
21
|
-
* always loses; a string does not.
|
|
22
|
-
*/
|
|
23
|
-
export class GeorithaminatorError extends Error {
|
|
24
|
-
/** The coarse class. Decides whether a retry could ever help. */
|
|
25
|
-
type;
|
|
26
|
-
/** The specific reason, from the API's documented list. Branch on this. */
|
|
27
|
-
code;
|
|
28
|
-
/** The field at fault, when one field is at fault. */
|
|
29
|
-
param;
|
|
30
|
-
/** The address that produced it, for a log line worth reading. */
|
|
31
|
-
url;
|
|
32
|
-
/** HTTP status, or 0 when nothing answered. */
|
|
33
|
-
status;
|
|
34
|
-
constructor(type, code, message, options = {}) {
|
|
35
|
-
super(message, options.cause === undefined ? undefined : { cause: options.cause });
|
|
36
|
-
this.name = new.target.name;
|
|
37
|
-
this.type = type;
|
|
38
|
-
this.code = code;
|
|
39
|
-
this.param = options.param ?? null;
|
|
40
|
-
this.url = options.url ?? '';
|
|
41
|
-
this.status = options.status ?? 0;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
/** Nothing answered: DNS, a refused connection, TLS, or a timeout. */
|
|
45
|
-
export class UnreachableError extends GeorithaminatorError {
|
|
46
|
-
constructor(url, message, cause) {
|
|
47
|
-
super('unreachable', 'unreachable', message, { url, cause });
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
/** The client was built wrong, and no request was made. */
|
|
51
|
-
export class ConfigError extends GeorithaminatorError {
|
|
52
|
-
constructor(code, message) {
|
|
53
|
-
super('config', code, message);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
/** 401 or 403: no key, the wrong key, a revoked one, or the wrong kind. */
|
|
57
|
-
export class AuthError extends GeorithaminatorError {
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* 404, which here also means "not yours" and "that module is not enabled".
|
|
61
|
-
*
|
|
62
|
-
* The API answers all three the same on purpose: a refusal that admitted the
|
|
63
|
-
* thing existed would confirm another business has a customer at ten o'clock.
|
|
64
|
-
*/
|
|
65
|
-
export class NotFoundError extends GeorithaminatorError {
|
|
66
|
-
}
|
|
67
|
-
/** 429. `retryAfter` is the seconds the API asked for, when it said. */
|
|
68
|
-
export class RateLimitError extends GeorithaminatorError {
|
|
69
|
-
retryAfter;
|
|
70
|
-
constructor(code, message, options) {
|
|
71
|
-
super('rate_limit', code, message, options);
|
|
72
|
-
this.retryAfter = options.retryAfter ?? null;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
/** Anything else the API reported: a 400, a 409, a 500 from behind it. */
|
|
76
|
-
export class ApiError extends GeorithaminatorError {
|
|
77
|
-
}
|
|
78
|
-
function typeOf(error) {
|
|
79
|
-
if (typeof error !== 'object' || error === null)
|
|
80
|
-
return undefined;
|
|
81
|
-
const value = error.type;
|
|
82
|
-
return typeof value === 'string' ? value : undefined;
|
|
83
|
-
}
|
|
84
|
-
/** Nothing answered. Whatever you had a moment ago is still the best you have. */
|
|
85
|
-
export function isUnreachable(error) {
|
|
86
|
-
return typeOf(error) === 'unreachable';
|
|
87
|
-
}
|
|
88
|
-
/** Not there, not yours, or not switched on. All three read the same. */
|
|
89
|
-
export function isNotFound(error) {
|
|
90
|
-
return typeOf(error) === 'not_found';
|
|
91
|
-
}
|
|
92
|
-
/** The key is missing, wrong, revoked, or the wrong kind for this call. */
|
|
93
|
-
export function isAuthError(error) {
|
|
94
|
-
return typeOf(error) === 'authentication_error' || typeOf(error) === 'permission_error';
|
|
95
|
-
}
|
|
96
|
-
/** Slow down. `error.retryAfter` says for how long, when the API said. */
|
|
97
|
-
export function isRateLimited(error) {
|
|
98
|
-
return typeOf(error) === 'rate_limit';
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Worth trying again with the same idempotency key, and nothing else is.
|
|
102
|
-
*
|
|
103
|
-
* A 5xx and a timeout are the two failures where the request may well have been
|
|
104
|
-
* applied, so retrying without the key risks a second booking and retrying with
|
|
105
|
-
* it cannot.
|
|
106
|
-
*/
|
|
107
|
-
export function isRetryable(error) {
|
|
108
|
-
const type = typeOf(error);
|
|
109
|
-
return type === 'unreachable' || type === 'api_error' || type === 'rate_limit';
|
|
110
|
-
}
|
|
111
|
-
//# sourceMappingURL=errors.js.map
|
package/dist/errors.d 3.ts
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Failures, in the shape the API already reports them.
|
|
3
|
-
*
|
|
4
|
-
* Every `/v1` error arrives as one envelope:
|
|
5
|
-
*
|
|
6
|
-
* {"error": {"type": "invalid_request", "code": "slot_unavailable",
|
|
7
|
-
* "message": "That time is no longer free.", "param": "starts_at"}}
|
|
8
|
-
*
|
|
9
|
-
* So this does not invent a second vocabulary. `type` is the coarse class and is
|
|
10
|
-
* what decides whether retrying could help. `code` is the specific reason and is
|
|
11
|
-
* what a caller branches on. `message` is written for a person and may be
|
|
12
|
-
* reworded at any time, so branching on it will break.
|
|
13
|
-
*
|
|
14
|
-
* Two failures never reach the API and so have no envelope of their own:
|
|
15
|
-
* `unreachable`, when nothing answered at all, and `config`, when the client was
|
|
16
|
-
* built wrong. They are given the same shape rather than a different one,
|
|
17
|
-
* because a caller catching errors wants one thing to look at.
|
|
18
|
-
*
|
|
19
|
-
* Checks are functions over `type` rather than `instanceof`. Two copies of a
|
|
20
|
-
* package in one dependency tree give two class identities and one of them
|
|
21
|
-
* always loses; a string does not.
|
|
22
|
-
*/
|
|
23
|
-
/** The coarse classes `/v1` reports, plus the two that never leave the client. */
|
|
24
|
-
export type ErrorType = 'invalid_request' | 'authentication_error' | 'permission_error' | 'not_found' | 'conflict' | 'rate_limit' | 'api_error' | 'unreachable' | 'config';
|
|
25
|
-
export interface ErrorEnvelope {
|
|
26
|
-
type: string;
|
|
27
|
-
code: string;
|
|
28
|
-
message: string;
|
|
29
|
-
param: string | null;
|
|
30
|
-
}
|
|
31
|
-
export declare class GeorithaminatorError extends Error {
|
|
32
|
-
/** The coarse class. Decides whether a retry could ever help. */
|
|
33
|
-
readonly type: ErrorType;
|
|
34
|
-
/** The specific reason, from the API's documented list. Branch on this. */
|
|
35
|
-
readonly code: string;
|
|
36
|
-
/** The field at fault, when one field is at fault. */
|
|
37
|
-
readonly param: string | null;
|
|
38
|
-
/** The address that produced it, for a log line worth reading. */
|
|
39
|
-
readonly url: string;
|
|
40
|
-
/** HTTP status, or 0 when nothing answered. */
|
|
41
|
-
readonly status: number;
|
|
42
|
-
constructor(type: ErrorType, code: string, message: string, options?: {
|
|
43
|
-
url?: string;
|
|
44
|
-
status?: number;
|
|
45
|
-
param?: string | null;
|
|
46
|
-
cause?: unknown;
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
/** Nothing answered: DNS, a refused connection, TLS, or a timeout. */
|
|
50
|
-
export declare class UnreachableError extends GeorithaminatorError {
|
|
51
|
-
constructor(url: string, message: string, cause?: unknown);
|
|
52
|
-
}
|
|
53
|
-
/** The client was built wrong, and no request was made. */
|
|
54
|
-
export declare class ConfigError extends GeorithaminatorError {
|
|
55
|
-
constructor(code: string, message: string);
|
|
56
|
-
}
|
|
57
|
-
/** 401 or 403: no key, the wrong key, a revoked one, or the wrong kind. */
|
|
58
|
-
export declare class AuthError extends GeorithaminatorError {
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* 404, which here also means "not yours" and "that module is not enabled".
|
|
62
|
-
*
|
|
63
|
-
* The API answers all three the same on purpose: a refusal that admitted the
|
|
64
|
-
* thing existed would confirm another business has a customer at ten o'clock.
|
|
65
|
-
*/
|
|
66
|
-
export declare class NotFoundError extends GeorithaminatorError {
|
|
67
|
-
}
|
|
68
|
-
/** 429. `retryAfter` is the seconds the API asked for, when it said. */
|
|
69
|
-
export declare class RateLimitError extends GeorithaminatorError {
|
|
70
|
-
readonly retryAfter: number | null;
|
|
71
|
-
constructor(code: string, message: string, options: {
|
|
72
|
-
url: string;
|
|
73
|
-
status: number;
|
|
74
|
-
retryAfter?: number | null;
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
/** Anything else the API reported: a 400, a 409, a 500 from behind it. */
|
|
78
|
-
export declare class ApiError extends GeorithaminatorError {
|
|
79
|
-
}
|
|
80
|
-
/** Nothing answered. Whatever you had a moment ago is still the best you have. */
|
|
81
|
-
export declare function isUnreachable(error: unknown): error is UnreachableError;
|
|
82
|
-
/** Not there, not yours, or not switched on. All three read the same. */
|
|
83
|
-
export declare function isNotFound(error: unknown): error is NotFoundError;
|
|
84
|
-
/** The key is missing, wrong, revoked, or the wrong kind for this call. */
|
|
85
|
-
export declare function isAuthError(error: unknown): error is AuthError;
|
|
86
|
-
/** Slow down. `error.retryAfter` says for how long, when the API said. */
|
|
87
|
-
export declare function isRateLimited(error: unknown): error is RateLimitError;
|
|
88
|
-
/**
|
|
89
|
-
* Worth trying again with the same idempotency key, and nothing else is.
|
|
90
|
-
*
|
|
91
|
-
* A 5xx and a timeout are the two failures where the request may well have been
|
|
92
|
-
* applied, so retrying without the key risks a second booking and retrying with
|
|
93
|
-
* it cannot.
|
|
94
|
-
*/
|
|
95
|
-
export declare function isRetryable(error: unknown): boolean;
|
|
96
|
-
//# sourceMappingURL=errors.d.ts.map
|
package/dist/errors.d.ts 3.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,kFAAkF;AAClF,MAAM,MAAM,SAAS,GACjB,iB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AC,UAAU,IAAI,IAAI,CAAC;IAC/C,CAAC;CACF;AAED,0EAA0E;AAC1E,MAAM,OAAO,QAAS,SAAQ,oBAAoB;CAAG;AAErD,SAAS,MAAM,CAAC,KAAc;IAC5B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IAClE,MAAM,KAAK,GAAI,KAA4B,CAAC,IAAI,CAAC;IACjD,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACvD,CAAC;AAED,kFAAkF;AAClF,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,OAAO,MAAM,CAAC,KAAK,CAAC,KAAK,aAAa,CAAC;AACzC,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,UAAU,CAAC,KAAc;IACvC,OAAO,MAAM,CAAC,KAAK,CAAC,KAAK,WAAW,CAAC;AACvC,CAAC;AAED,2EAA2E;AAC3E,MAAM,UAAU,WAAW,CAAC,KAAc;IACxC,OAAO,MAAM,CAAC,KAAK,CAAC,KAAK,sBAAsB,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,kBAAkB,CAAC;AAC1F,CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,OAAO,MAAM,CAAC,KAAK,CAAC,KAAK,YAAY,CAAC;AACxC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,KAAc;IACxC,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC3B,OAAO,IAAI,KAAK,aAAa,IAAI,IAAI,KAAK,WAAW,IAAI,IAAI,KAAK,YAAY,CAAC;AACjF,CAAC"}
|
package/dist/index 3.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @georithaminator/core
|
|
3
|
-
*
|
|
4
|
-
* The client the other packages are built on. On its own it gives you the
|
|
5
|
-
* project manifest and a typed way to call anything else `/v1` offers.
|
|
6
|
-
*
|
|
7
|
-
* import { Client } from '@georithaminator/core';
|
|
8
|
-
*
|
|
9
|
-
* const client = new Client({ origin: 'https://api.example.ch', key: 'pk_live_...' });
|
|
10
|
-
* const project = await client.project();
|
|
11
|
-
* if (project.modules.includes('bookings')) { ... }
|
|
12
|
-
*/
|
|
13
|
-
export { API_PREFIX, Client, DEFAULT_CACHE_SIZE, DEFAULT_TIMEOUT, MAX_PAGE_SIZE, MemoryCache, } from './client.js';
|
|
14
|
-
export { ApiError, AuthError, ConfigError, GeorithaminatorError, NotFoundError, RateLimitError, UnreachableError, isAuthError, isNotFound, isRateLimited, isRetryable, isUnreachable, } from './errors.js';
|
|
15
|
-
export { DEFAULT_TOLERANCE, DELIVERY_HEADER, EVENT_HEADER, SIGNATURE_HEADER, TIMESTAMP_HEADER, WebhookError, verifyWebhook, } from './webhooks.js';
|
|
16
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.d 3.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @georithaminator/core
|
|
3
|
-
*
|
|
4
|
-
* The client the other packages are built on. On its own it gives you the
|
|
5
|
-
* project manifest and a typed way to call anything else `/v1` offers.
|
|
6
|
-
*
|
|
7
|
-
* import { Client } from '@georithaminator/core';
|
|
8
|
-
*
|
|
9
|
-
* const client = new Client({ origin: 'https://api.example.ch', key: 'pk_live_...' });
|
|
10
|
-
* const project = await client.project();
|
|
11
|
-
* if (project.modules.includes('bookings')) { ... }
|
|
12
|
-
*/
|
|
13
|
-
export { API_PREFIX, Client, DEFAULT_CACHE_SIZE, DEFAULT_TIMEOUT, MAX_PAGE_SIZE, MemoryCache, } from './client.js';
|
|
14
|
-
export type { ClientOptions, RequestOptions } from './client.js';
|
|
15
|
-
export { ApiError, AuthError, ConfigError, GeorithaminatorError, NotFoundError, RateLimitError, UnreachableError, isAuthError, isNotFound, isRateLimited, isRetryable, isUnreachable, } from './errors.js';
|
|
16
|
-
export type { ErrorEnvelope, ErrorType } from './errors.js';
|
|
17
|
-
export { DEFAULT_TOLERANCE, DELIVERY_HEADER, EVENT_HEADER, SIGNATURE_HEADER, TIMESTAMP_HEADER, WebhookError, verifyWebhook, } from './webhooks.js';
|
|
18
|
-
export type { HeaderSource, VerifyOptions, WebhookEvent } from './webhooks.js';
|
|
19
|
-
export type { CacheEntry, CacheStore, Manifest, Page, Response } from './types.js';
|
|
20
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts 3.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,UAAU,EACV,MAAM,EACN,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,WAAW,GACZ,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEjE,OAAO,EACL,QAAQ,EACR,SAAS,EACT,WAAW,EACX,oBAAoB,EACpB,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,aAAa,EACb,WAAW,EACX,aAAa,GACd,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE5D,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,aAAa,GACd,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE/E,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/index.js 3.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,UAAU,EACV,MAAM,EACN,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,WAAW,GACZ,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,QAAQ,EACR,SAAS,EACT,WAAW,EACX,oBAAoB,EACpB,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,aAAa,EACb,WAAW,EACX,aAAa,GACd,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,aAAa,GACd,MAAM,eAAe,CAAC"}
|
package/dist/types 3.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The shapes `/v1` returns, as the wire returns them.
|
|
3
|
-
*
|
|
4
|
-
* Field names are the API's own snake_case rather than camelCase. That is a
|
|
5
|
-
* deliberate departure from what a TypeScript codebase usually looks like: the
|
|
6
|
-
* alternative is a mapping layer, and a mapping layer is a second place for a
|
|
7
|
-
* field name to be wrong and the place a new field silently disappears.
|
|
8
|
-
*/
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=types.js.map
|
package/dist/types.d 3.ts
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The shapes `/v1` returns, as the wire returns them.
|
|
3
|
-
*
|
|
4
|
-
* Field names are the API's own snake_case rather than camelCase. That is a
|
|
5
|
-
* deliberate departure from what a TypeScript codebase usually looks like: the
|
|
6
|
-
* alternative is a mapping layer, and a mapping layer is a second place for a
|
|
7
|
-
* field name to be wrong and the place a new field silently disappears.
|
|
8
|
-
*/
|
|
9
|
-
/** Every list endpoint. No next and previous URLs: no URL here names a project. */
|
|
10
|
-
export interface Page<T> {
|
|
11
|
-
count: number;
|
|
12
|
-
results: T[];
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* What a key can reach, from `GET /v1/project`.
|
|
16
|
-
*
|
|
17
|
-
* The first call worth making. Without it a developer finds out that bookings is
|
|
18
|
-
* not enabled by getting a 404 from an endpoint they were told exists, which
|
|
19
|
-
* reads as a bug in the platform rather than a switch nobody turned on.
|
|
20
|
-
*/
|
|
21
|
-
export interface Manifest {
|
|
22
|
-
/** The project's public id. The row id never leaves the database. */
|
|
23
|
-
id: string;
|
|
24
|
-
name: string;
|
|
25
|
-
/** IANA, and the clock every business hour and every booking is read on. */
|
|
26
|
-
timezone: string;
|
|
27
|
-
/** Three letters. One project is one business is one currency. */
|
|
28
|
-
currency: string;
|
|
29
|
-
/** Registry keys: 'cms', 'bookings', 'payments'. Sorted, so it is stable. */
|
|
30
|
-
modules: string[];
|
|
31
|
-
/**
|
|
32
|
-
* Rises whenever anything this project publishes changes, so a client can
|
|
33
|
-
* poll this one cheap call rather than refetch everything.
|
|
34
|
-
*/
|
|
35
|
-
cache_version: number;
|
|
36
|
-
/** False for a test key. Worth checking before a deploy trusts it. */
|
|
37
|
-
livemode: boolean;
|
|
38
|
-
}
|
|
39
|
-
/** A store for ETags, so a repeat read costs a 304 with no body. */
|
|
40
|
-
export interface CacheStore {
|
|
41
|
-
get(key: string): CacheEntry | undefined;
|
|
42
|
-
set(key: string, entry: CacheEntry): void;
|
|
43
|
-
delete(key: string): void;
|
|
44
|
-
}
|
|
45
|
-
export interface CacheEntry {
|
|
46
|
-
etag: string;
|
|
47
|
-
body: unknown;
|
|
48
|
-
}
|
|
49
|
-
/** What a request returns when the caller wants the envelope, not just the body. */
|
|
50
|
-
export interface Response<T> {
|
|
51
|
-
data: T;
|
|
52
|
-
status: number;
|
|
53
|
-
etag: string | null;
|
|
54
|
-
/** True when the API replayed a stored answer rather than acting again. */
|
|
55
|
-
replayed: boolean;
|
|
56
|
-
}
|
|
57
|
-
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts 3.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,mFAAmF;AACnF,MAAM,WAAW,IAAI,CAAC,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,CAAC,EAAE,CAAC;CACd;AAED;;;;;;GAMG;AACH,MAAM,WAAW,QAAQ;IACvB,qEAAqE;IACrE,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,4EAA4E;IAC5E,QAAQ,EAAE,MAAM,CAAC;IACjB,kEAAkE;IAClE,QAAQ,EAAE,MAAM,CAAC;IACjB,6EAA6E;IAC7E,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB,sEAAsE;IACtE,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,oEAAoE;AACpE,MAAM,WAAW,UAAU;IACzB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC;IACzC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;IAC1C,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,OAAO,CAAC;CACf;AAED,oFAAoF;AACpF,MAAM,WAAW,QAAQ,CAAC,CAAC;IACzB,IAAI,EAAE,CAAC,CAAC;IACR,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,2EAA2E;IAC3E,QAAQ,EAAE,OAAO,CAAC;CACnB"}
|
package/dist/types.js 3.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
|