@xylex-group/athena 2.14.0 → 3.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.
- package/README.md +109 -1402
- package/dist/admin.d.cts +1 -1
- package/dist/admin.d.ts +1 -1
- package/dist/{athena-auth-url-oLux_57a.d.cts → athena-request-headers-C7Jy-c_D.d.ts} +85 -1
- package/dist/{athena-auth-url-oLux_57a.d.ts → athena-request-headers-DujFFyMU.d.cts} +85 -1
- package/dist/billing.cjs +1311 -0
- package/dist/billing.cjs.map +1 -0
- package/dist/billing.d.cts +270 -0
- package/dist/billing.d.ts +270 -0
- package/dist/billing.js +1306 -0
- package/dist/billing.js.map +1 -0
- package/dist/browser.cjs +9695 -9243
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +11 -10
- package/dist/browser.d.ts +11 -10
- package/dist/browser.js +9692 -9241
- package/dist/browser.js.map +1 -1
- package/dist/cli/index.cjs +8137 -7286
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.d.cts +4 -4
- package/dist/cli/index.d.ts +4 -4
- package/dist/cli/index.js +8137 -7286
- package/dist/cli/index.js.map +1 -1
- package/dist/index.cjs +9718 -9260
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -10
- package/dist/index.d.ts +11 -10
- package/dist/index.js +9711 -9258
- package/dist/index.js.map +1 -1
- package/dist/{model-form-DcH3R7WD.d.ts → model-form-Dh0sisdL.d.ts} +2 -2
- package/dist/{model-form-BE1_Bmdd.d.cts → model-form-oOAJUVd4.d.cts} +2 -2
- package/dist/{module-DFGZXCtt.d.cts → module-CB25egcO.d.cts} +18 -52
- package/dist/module-C_ab-MM1.d.cts +360 -0
- package/dist/module-C_ab-MM1.d.ts +360 -0
- package/dist/{module-Ca3_OQqR.d.ts → module-CkUM6v58.d.ts} +18 -52
- package/dist/next/client.cjs +9116 -8468
- package/dist/next/client.cjs.map +1 -1
- package/dist/next/client.d.cts +24 -25
- package/dist/next/client.d.ts +24 -25
- package/dist/next/client.js +9088 -8469
- package/dist/next/client.js.map +1 -1
- package/dist/next/server.cjs +8932 -7776
- package/dist/next/server.cjs.map +1 -1
- package/dist/next/server.d.cts +62 -43
- package/dist/next/server.d.ts +62 -43
- package/dist/next/server.js +8873 -7777
- package/dist/next/server.js.map +1 -1
- package/dist/{payload-BbSCmILD.d.ts → payload-DWI1rw-e.d.cts} +1 -35
- package/dist/{payload-zXIwKTQf.d.cts → payload-DWI1rw-e.d.ts} +1 -35
- package/dist/{pipeline-DqwehoQV.d.ts → pipeline-B8aN2EHe.d.ts} +1 -1
- package/dist/{pipeline-CwQoD5G9.d.cts → pipeline-D4W-Cc-A.d.cts} +1 -1
- package/dist/proxy-request-headers-DGxdoyA0.d.cts +59 -0
- package/dist/proxy-request-headers-m4D2Tduy.d.ts +59 -0
- package/dist/react.cjs +118 -17
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +46 -16
- package/dist/react.d.ts +46 -16
- package/dist/react.js +117 -18
- package/dist/react.js.map +1 -1
- package/dist/social-providers.cjs +24 -20
- package/dist/social-providers.cjs.map +1 -1
- package/dist/social-providers.d.cts +96 -139
- package/dist/social-providers.d.ts +96 -139
- package/dist/social-providers.js +24 -20
- package/dist/social-providers.js.map +1 -1
- package/dist/{types-eAKAh71s.d.cts → types-AOY-GLu8.d.cts} +27 -54
- package/dist/{types-eAKAh71s.d.ts → types-AOY-GLu8.d.ts} +27 -54
- package/dist/{types-CD6K05JQ.d.ts → types-B75PdABb.d.ts} +3 -3
- package/dist/{types-dHnjluBC.d.cts → types-BBm-kEBL.d.cts} +2 -2
- package/dist/{types-C1swabT5.d.ts → types-BaAMXCqK.d.ts} +2 -2
- package/dist/{types-YQUR7wu0.d.cts → types-Bltx6iL6.d.cts} +3 -5
- package/dist/{types-YQUR7wu0.d.ts → types-Bltx6iL6.d.ts} +3 -5
- package/dist/{types-6H575ITc.d.cts → types-CgCv5o6R.d.cts} +3 -3
- package/dist/utils.cjs +7 -8
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +4 -145
- package/dist/utils.d.ts +4 -145
- package/dist/utils.js +7 -8
- package/dist/utils.js.map +1 -1
- package/dist/{client-wU2J9yqb.d.cts → v3-client-CWfZHcKL.d.cts} +402 -521
- package/dist/{client-uthENhaf.d.ts → v3-client-DZp2NEhK.d.ts} +402 -521
- package/package.json +15 -3
package/dist/billing.js
ADDED
|
@@ -0,0 +1,1306 @@
|
|
|
1
|
+
// package.json
|
|
2
|
+
var package_default = {
|
|
3
|
+
version: "3.0.2"
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
// src/sdk-version.ts
|
|
7
|
+
var PACKAGE_VERSION = package_default.version;
|
|
8
|
+
function buildSdkHeaderValue(sdkName) {
|
|
9
|
+
return `${sdkName} ${PACKAGE_VERSION}`;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// src/cookies/cookie-utils.ts
|
|
13
|
+
var SECURE_COOKIE_PREFIX = "__Secure-";
|
|
14
|
+
function parseCookies(cookieHeader) {
|
|
15
|
+
const cookies = cookieHeader.split("; ");
|
|
16
|
+
const cookieMap = /* @__PURE__ */ new Map();
|
|
17
|
+
cookies.forEach((cookie) => {
|
|
18
|
+
const [name, value] = cookie.split(/=(.*)/s);
|
|
19
|
+
cookieMap.set(name, value);
|
|
20
|
+
});
|
|
21
|
+
return cookieMap;
|
|
22
|
+
}
|
|
23
|
+
var getSessionCookie = (request, config) => {
|
|
24
|
+
const cookies = (request instanceof Headers || !("headers" in request) ? request : request.headers).get("cookie");
|
|
25
|
+
if (!cookies) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
const { cookieName = "session_token", cookiePrefix = "athena-auth" } = {};
|
|
29
|
+
const parsedCookie = parseCookies(cookies);
|
|
30
|
+
const getCookie = (name) => parsedCookie.get(name) || parsedCookie.get(`${SECURE_COOKIE_PREFIX}${name}`);
|
|
31
|
+
const candidateCookieNames = Array.from(/* @__PURE__ */ new Set([
|
|
32
|
+
cookieName,
|
|
33
|
+
cookieName.replace(/_/g, "-"),
|
|
34
|
+
cookieName.replace(/-/g, "_")
|
|
35
|
+
])).filter(Boolean);
|
|
36
|
+
for (const candidateName of candidateCookieNames) {
|
|
37
|
+
const sessionToken = getCookie(`${cookiePrefix}.${candidateName}`) || getCookie(`${cookiePrefix}-${candidateName}`);
|
|
38
|
+
if (sessionToken) {
|
|
39
|
+
return sessionToken;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return null;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
// src/utils/athena-request-headers.ts
|
|
46
|
+
var NO_CACHE_HEADER_VALUE = "no-cache";
|
|
47
|
+
var API_KEY_HEADER_CANDIDATES = ["X-Athena-Key", "x-athena-key", "X-Api-Key", "x-api-key", "apikey"];
|
|
48
|
+
var ATHENA_KEY_HEADER_CANDIDATES = ["X-Athena-Key", "x-athena-key"];
|
|
49
|
+
var SESSION_TOKEN_HEADER_CANDIDATES = ["X-Athena-Auth-Session-Token"];
|
|
50
|
+
var BEARER_MIRROR_HEADER_CANDIDATES = ["X-Athena-Auth-Bearer-Token"];
|
|
51
|
+
var CLIENT_HEADER_CANDIDATES = ["X-Athena-Client", "x-athena-client"];
|
|
52
|
+
var PG_URI_HEADER_CANDIDATES = ["x-pg-uri"];
|
|
53
|
+
var JDBC_URI_HEADER_CANDIDATES = ["x-athena-jdbc-url", "x-jdbc-url"];
|
|
54
|
+
var PROFILE_RULES = {
|
|
55
|
+
gateway: { apiKeys: true, routing: true, authMirror: true, authBearer: false, contentType: true, stripNullsDefault: true },
|
|
56
|
+
chat: { apiKeys: true, routing: true, authMirror: true, authBearer: true, accept: true },
|
|
57
|
+
storage: { apiKeys: true, routing: true, authMirror: true, authBearer: false, contentType: true },
|
|
58
|
+
auth: { apiKeys: true, routing: true, authMirror: false, authBearer: true, contentType: true },
|
|
59
|
+
minimal: { apiKeys: false, routing: false, authMirror: false, authBearer: false }
|
|
60
|
+
};
|
|
61
|
+
function normalizeHeaderValue(value) {
|
|
62
|
+
return value ? value : void 0;
|
|
63
|
+
}
|
|
64
|
+
function mergeExtraHeaders(configHeaders, callHeaders) {
|
|
65
|
+
return { ...configHeaders ?? {}, ...callHeaders ?? {} };
|
|
66
|
+
}
|
|
67
|
+
function hasHeaderIgnoreCase(headers, targetKey) {
|
|
68
|
+
const normalizedTargetKey = targetKey.toLowerCase();
|
|
69
|
+
return Object.keys(headers).some((key) => key.toLowerCase() === normalizedTargetKey);
|
|
70
|
+
}
|
|
71
|
+
function resolveHeaderValue(headers, candidates) {
|
|
72
|
+
for (const candidate of candidates) {
|
|
73
|
+
const direct = normalizeHeaderValue(headers[candidate]);
|
|
74
|
+
if (direct) return direct;
|
|
75
|
+
}
|
|
76
|
+
const loweredCandidates = new Set(candidates.map((candidate) => candidate.toLowerCase()));
|
|
77
|
+
for (const [key, value] of Object.entries(headers)) {
|
|
78
|
+
if (!loweredCandidates.has(key.toLowerCase())) {
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
const normalized = normalizeHeaderValue(value);
|
|
82
|
+
if (normalized) return normalized;
|
|
83
|
+
}
|
|
84
|
+
return void 0;
|
|
85
|
+
}
|
|
86
|
+
function isCacheControlHeaderName(name) {
|
|
87
|
+
return name.toLowerCase() === "cache-control";
|
|
88
|
+
}
|
|
89
|
+
function normalizeBearerToken(value) {
|
|
90
|
+
const trimmed = value.trim();
|
|
91
|
+
const match = trimmed.match(/^Bearer\s+(.+)$/i);
|
|
92
|
+
return match?.[1]?.trim() ?? trimmed;
|
|
93
|
+
}
|
|
94
|
+
function resolveBearerTokenFromAuthorizationHeader(headers) {
|
|
95
|
+
const authorization = resolveHeaderValue(headers, ["Authorization"]);
|
|
96
|
+
if (!authorization) {
|
|
97
|
+
return void 0;
|
|
98
|
+
}
|
|
99
|
+
const token = normalizeBearerToken(authorization);
|
|
100
|
+
return token ? token : void 0;
|
|
101
|
+
}
|
|
102
|
+
function resolveSessionTokenFromCookieHeader(headers) {
|
|
103
|
+
const cookie = resolveHeaderValue(headers, ["Cookie"]);
|
|
104
|
+
if (!cookie) {
|
|
105
|
+
return void 0;
|
|
106
|
+
}
|
|
107
|
+
return getSessionCookie(new Headers({ cookie })) ?? void 0;
|
|
108
|
+
}
|
|
109
|
+
function resolveBackendType(backend) {
|
|
110
|
+
if (!backend) {
|
|
111
|
+
return void 0;
|
|
112
|
+
}
|
|
113
|
+
return typeof backend === "string" ? backend : backend.type;
|
|
114
|
+
}
|
|
115
|
+
function applyAthenaApiKeyHeaders(headers, apiKey) {
|
|
116
|
+
const resolvedApiKey = normalizeHeaderValue(apiKey);
|
|
117
|
+
if (resolvedApiKey && !hasHeaderIgnoreCase(headers, "X-Athena-Key")) {
|
|
118
|
+
headers["X-Athena-Key"] = resolvedApiKey;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
function applyAthenaAuthContextHeaders(headers, input) {
|
|
122
|
+
const mergedExtraHeaders = mergeExtraHeaders(input.configHeaders, input.callHeaders);
|
|
123
|
+
const rules = PROFILE_RULES[input.profile];
|
|
124
|
+
const explicitCookie = normalizeHeaderValue(input.cookie);
|
|
125
|
+
if (explicitCookie) {
|
|
126
|
+
mergedExtraHeaders.Cookie = explicitCookie;
|
|
127
|
+
}
|
|
128
|
+
const explicitSessionToken = normalizeHeaderValue(input.sessionToken) ?? resolveHeaderValue(mergedExtraHeaders, SESSION_TOKEN_HEADER_CANDIDATES);
|
|
129
|
+
const derivedSessionToken = explicitSessionToken ?? resolveSessionTokenFromCookieHeader(mergedExtraHeaders);
|
|
130
|
+
const cookieFromHeaders = resolveHeaderValue(mergedExtraHeaders, ["Cookie"]);
|
|
131
|
+
if (explicitCookie && !hasHeaderIgnoreCase(headers, "Cookie")) {
|
|
132
|
+
headers.Cookie = explicitCookie;
|
|
133
|
+
} else if (cookieFromHeaders && !hasHeaderIgnoreCase(headers, "Cookie")) {
|
|
134
|
+
headers.Cookie = cookieFromHeaders;
|
|
135
|
+
}
|
|
136
|
+
const explicitBearerToken = (() => {
|
|
137
|
+
const configured = normalizeHeaderValue(input.bearerToken);
|
|
138
|
+
if (configured) {
|
|
139
|
+
return normalizeBearerToken(configured);
|
|
140
|
+
}
|
|
141
|
+
const mirrored = resolveHeaderValue(mergedExtraHeaders, BEARER_MIRROR_HEADER_CANDIDATES);
|
|
142
|
+
return mirrored ? normalizeBearerToken(mirrored) : void 0;
|
|
143
|
+
})();
|
|
144
|
+
const derivedBearerToken = explicitBearerToken ?? resolveBearerTokenFromAuthorizationHeader(mergedExtraHeaders);
|
|
145
|
+
if (rules.authBearer && derivedBearerToken && !hasHeaderIgnoreCase(headers, "Authorization")) {
|
|
146
|
+
headers.Authorization = `Bearer ${derivedBearerToken}`;
|
|
147
|
+
}
|
|
148
|
+
if (rules.authMirror) {
|
|
149
|
+
if (derivedSessionToken && !hasHeaderIgnoreCase(headers, "X-Athena-Auth-Session-Token")) {
|
|
150
|
+
headers["X-Athena-Auth-Session-Token"] = derivedSessionToken;
|
|
151
|
+
}
|
|
152
|
+
if (derivedBearerToken && !hasHeaderIgnoreCase(headers, "X-Athena-Auth-Bearer-Token")) {
|
|
153
|
+
headers["X-Athena-Auth-Bearer-Token"] = derivedBearerToken;
|
|
154
|
+
}
|
|
155
|
+
} else if (derivedSessionToken && !hasHeaderIgnoreCase(headers, "X-Athena-Auth-Session-Token")) {
|
|
156
|
+
headers["X-Athena-Auth-Session-Token"] = derivedSessionToken;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
function applyAthenaPgUriHeaders(headers, input) {
|
|
160
|
+
const mergedExtraHeaders = mergeExtraHeaders(input.configHeaders, input.callHeaders);
|
|
161
|
+
const pgUri = normalizeHeaderValue(input.pgUri) ?? resolveHeaderValue(mergedExtraHeaders, PG_URI_HEADER_CANDIDATES);
|
|
162
|
+
if (pgUri && !hasHeaderIgnoreCase(headers, "x-pg-uri")) {
|
|
163
|
+
headers["x-pg-uri"] = pgUri;
|
|
164
|
+
}
|
|
165
|
+
const jdbcUrl = normalizeHeaderValue(input.jdbcUrl) ?? resolveHeaderValue(mergedExtraHeaders, JDBC_URI_HEADER_CANDIDATES);
|
|
166
|
+
if (jdbcUrl) {
|
|
167
|
+
if (!hasHeaderIgnoreCase(headers, "x-athena-jdbc-url")) {
|
|
168
|
+
headers["x-athena-jdbc-url"] = jdbcUrl;
|
|
169
|
+
}
|
|
170
|
+
if (!hasHeaderIgnoreCase(headers, "x-jdbc-url")) {
|
|
171
|
+
headers["x-jdbc-url"] = jdbcUrl;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
function buildAthenaRequestHeaders(input) {
|
|
176
|
+
const forceNoCache = Boolean(input.forceNoCache);
|
|
177
|
+
const mergedExtraHeaders = mergeExtraHeaders(input.configHeaders, input.callHeaders);
|
|
178
|
+
const rules = PROFILE_RULES[input.profile];
|
|
179
|
+
const headerClient = resolveHeaderValue(mergedExtraHeaders, CLIENT_HEADER_CANDIDATES);
|
|
180
|
+
const finalClient = normalizeHeaderValue(input.client) ?? headerClient;
|
|
181
|
+
const finalApiKey = normalizeHeaderValue(input.apiKey) ?? resolveHeaderValue(mergedExtraHeaders, API_KEY_HEADER_CANDIDATES);
|
|
182
|
+
const finalAthenaKey = resolveHeaderValue(mergedExtraHeaders, ATHENA_KEY_HEADER_CANDIDATES) ?? finalApiKey;
|
|
183
|
+
const headers = {
|
|
184
|
+
"X-Athena-Sdk": input.sdkHeaderValue
|
|
185
|
+
};
|
|
186
|
+
if (rules.contentType) {
|
|
187
|
+
headers["Content-Type"] = input.contentType ?? "application/json";
|
|
188
|
+
}
|
|
189
|
+
if (input.accept ?? rules.accept) {
|
|
190
|
+
headers.Accept = input.accept ?? "application/json";
|
|
191
|
+
}
|
|
192
|
+
if (rules.routing) {
|
|
193
|
+
if (normalizeHeaderValue(input.userId)) {
|
|
194
|
+
headers["X-User-Id"] = input.userId ?? "";
|
|
195
|
+
}
|
|
196
|
+
if (normalizeHeaderValue(input.organizationId)) {
|
|
197
|
+
headers["X-Organization-Id"] = input.organizationId ?? "";
|
|
198
|
+
}
|
|
199
|
+
if (finalClient) {
|
|
200
|
+
headers["X-Athena-Client"] = finalClient;
|
|
201
|
+
}
|
|
202
|
+
const backendType = resolveBackendType(input.backend);
|
|
203
|
+
if (backendType) {
|
|
204
|
+
headers["X-Backend-Type"] = backendType;
|
|
205
|
+
}
|
|
206
|
+
if (typeof input.stripNulls === "boolean") {
|
|
207
|
+
headers["X-Strip-Nulls"] = input.stripNulls ? "true" : "false";
|
|
208
|
+
} else if (rules.stripNullsDefault) {
|
|
209
|
+
headers["X-Strip-Nulls"] = "true";
|
|
210
|
+
}
|
|
211
|
+
if (normalizeHeaderValue(input.publishEvent)) {
|
|
212
|
+
headers["X-Publish-Event"] = input.publishEvent ?? "";
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
if (rules.apiKeys && (finalApiKey || finalAthenaKey)) {
|
|
216
|
+
applyAthenaApiKeyHeaders(headers, finalAthenaKey);
|
|
217
|
+
}
|
|
218
|
+
applyAthenaAuthContextHeaders(headers, input);
|
|
219
|
+
applyAthenaPgUriHeaders(headers, input);
|
|
220
|
+
const reservedClientHeaderKeys = new Set(CLIENT_HEADER_CANDIDATES.map((key) => key.toLowerCase()));
|
|
221
|
+
Object.entries(mergedExtraHeaders).forEach(([key, value]) => {
|
|
222
|
+
if (reservedClientHeaderKeys.has(key.toLowerCase())) {
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
if (forceNoCache && isCacheControlHeaderName(key)) {
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
const normalized = normalizeHeaderValue(value);
|
|
229
|
+
if (normalized) {
|
|
230
|
+
headers[key] = normalized;
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
if (forceNoCache) {
|
|
234
|
+
headers["Cache-Control"] = NO_CACHE_HEADER_VALUE;
|
|
235
|
+
}
|
|
236
|
+
return headers;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// src/gateway/errors.ts
|
|
240
|
+
var AthenaGatewayError = class _AthenaGatewayError extends Error {
|
|
241
|
+
code;
|
|
242
|
+
status;
|
|
243
|
+
endpoint;
|
|
244
|
+
method;
|
|
245
|
+
requestId;
|
|
246
|
+
hint;
|
|
247
|
+
causeDetail;
|
|
248
|
+
constructor(input) {
|
|
249
|
+
super(input.message);
|
|
250
|
+
this.name = "AthenaGatewayError";
|
|
251
|
+
this.code = input.code;
|
|
252
|
+
this.status = input.status ?? 0;
|
|
253
|
+
this.endpoint = input.endpoint;
|
|
254
|
+
this.method = input.method;
|
|
255
|
+
this.requestId = input.requestId;
|
|
256
|
+
this.hint = input.hint;
|
|
257
|
+
this.causeDetail = input.cause;
|
|
258
|
+
}
|
|
259
|
+
toDetails() {
|
|
260
|
+
return {
|
|
261
|
+
code: this.code,
|
|
262
|
+
message: this.message,
|
|
263
|
+
status: this.status,
|
|
264
|
+
endpoint: this.endpoint,
|
|
265
|
+
method: this.method,
|
|
266
|
+
requestId: this.requestId,
|
|
267
|
+
hint: this.hint,
|
|
268
|
+
cause: this.causeDetail
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
static fromResponse(response, fallback) {
|
|
272
|
+
const details = response.errorDetails;
|
|
273
|
+
if (details) {
|
|
274
|
+
return new _AthenaGatewayError({
|
|
275
|
+
code: details.code,
|
|
276
|
+
message: details.message,
|
|
277
|
+
status: details.status,
|
|
278
|
+
endpoint: details.endpoint ?? fallback.endpoint,
|
|
279
|
+
method: details.method ?? fallback.method,
|
|
280
|
+
requestId: details.requestId ?? fallback.requestId,
|
|
281
|
+
hint: details.hint,
|
|
282
|
+
cause: details.cause
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
return new _AthenaGatewayError({
|
|
286
|
+
code: "HTTP_ERROR",
|
|
287
|
+
message: response.error ?? "Gateway request failed",
|
|
288
|
+
status: response.status,
|
|
289
|
+
endpoint: fallback.endpoint,
|
|
290
|
+
method: fallback.method,
|
|
291
|
+
requestId: fallback.requestId
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
};
|
|
295
|
+
|
|
296
|
+
// src/gateway/url.ts
|
|
297
|
+
function describeReceivedValue(value) {
|
|
298
|
+
if (value === void 0) return "undefined";
|
|
299
|
+
if (value === null) return "null";
|
|
300
|
+
if (typeof value === "string") {
|
|
301
|
+
return value.trim().length > 0 ? JSON.stringify(value) : "an empty string";
|
|
302
|
+
}
|
|
303
|
+
return `${typeof value} ${JSON.stringify(value)}`;
|
|
304
|
+
}
|
|
305
|
+
function invalidBaseUrlError(message, hint) {
|
|
306
|
+
return new AthenaGatewayError({
|
|
307
|
+
code: "INVALID_URL",
|
|
308
|
+
message,
|
|
309
|
+
status: 0,
|
|
310
|
+
hint
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
function normalizeAthenaGatewayBaseUrl(input, options = {}) {
|
|
314
|
+
const label = options.label ?? "Athena gateway base URL";
|
|
315
|
+
const candidate = input ?? options.defaultBaseUrl;
|
|
316
|
+
if (candidate === void 0 || candidate === null) {
|
|
317
|
+
throw invalidBaseUrlError(
|
|
318
|
+
`${label} must be a non-empty absolute http(s) URL. Received ${describeReceivedValue(input)}.`,
|
|
319
|
+
'Set ATHENA_URL in the explicit env object (or pass createClient({ url, key })) to a full URL such as "https://mirror2.athena-cluster.com".'
|
|
320
|
+
);
|
|
321
|
+
}
|
|
322
|
+
const trimmed = candidate.trim();
|
|
323
|
+
if (!trimmed) {
|
|
324
|
+
throw invalidBaseUrlError(
|
|
325
|
+
`${label} must be a non-empty absolute http(s) URL. Received ${describeReceivedValue(candidate)}.`,
|
|
326
|
+
'Set ATHENA_URL in the explicit env object (or pass createClient({ url, key })) to a full URL such as "https://mirror2.athena-cluster.com".'
|
|
327
|
+
);
|
|
328
|
+
}
|
|
329
|
+
let parsed;
|
|
330
|
+
try {
|
|
331
|
+
parsed = new URL(trimmed);
|
|
332
|
+
} catch {
|
|
333
|
+
throw invalidBaseUrlError(
|
|
334
|
+
`${label} must be a valid absolute http(s) URL. Received ${describeReceivedValue(candidate)}.`,
|
|
335
|
+
'Use a full URL including the protocol, for example "https://mirror2.athena-cluster.com".'
|
|
336
|
+
);
|
|
337
|
+
}
|
|
338
|
+
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
|
|
339
|
+
throw invalidBaseUrlError(
|
|
340
|
+
`${label} must use http or https. Received ${JSON.stringify(trimmed)}.`,
|
|
341
|
+
'Use an Athena gateway URL such as "https://mirror2.athena-cluster.com".'
|
|
342
|
+
);
|
|
343
|
+
}
|
|
344
|
+
if (parsed.search || parsed.hash) {
|
|
345
|
+
throw invalidBaseUrlError(
|
|
346
|
+
`${label} must not include query parameters or hash fragments. Received ${JSON.stringify(trimmed)}.`,
|
|
347
|
+
'Pass only the base URL. Endpoint paths such as "/gateway/fetch" are appended by the SDK.'
|
|
348
|
+
);
|
|
349
|
+
}
|
|
350
|
+
return parsed.toString().replace(/\/+$/, "");
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
// src/billing/module.ts
|
|
354
|
+
var SDK_NAME = "xylex-group/athena-billing";
|
|
355
|
+
var SDK_HEADER_VALUE = buildSdkHeaderValue(SDK_NAME);
|
|
356
|
+
var AthenaBillingError = class extends Error {
|
|
357
|
+
status;
|
|
358
|
+
endpoint;
|
|
359
|
+
method;
|
|
360
|
+
body;
|
|
361
|
+
constructor(input) {
|
|
362
|
+
super(input.message);
|
|
363
|
+
this.name = "AthenaBillingError";
|
|
364
|
+
this.status = input.status;
|
|
365
|
+
this.endpoint = input.endpoint;
|
|
366
|
+
this.method = input.method;
|
|
367
|
+
this.body = input.body;
|
|
368
|
+
}
|
|
369
|
+
};
|
|
370
|
+
var billingSdkManifest = {
|
|
371
|
+
namespace: "billing",
|
|
372
|
+
envelopeKind: "athena",
|
|
373
|
+
methods: [
|
|
374
|
+
{ name: "getCapabilities", method: "GET", path: "/billing/v1/capabilities" },
|
|
375
|
+
{ name: "createCheckout", method: "POST", path: "/billing/v1/checkouts" },
|
|
376
|
+
{ name: "listProducts", method: "GET", path: "/billing/v1/products" },
|
|
377
|
+
{ name: "listPrices", method: "GET", path: "/billing/v1/prices" },
|
|
378
|
+
{ name: "listCustomers", method: "GET", path: "/billing/v1/customers" },
|
|
379
|
+
{ name: "createCustomer", method: "POST", path: "/billing/v1/customers" },
|
|
380
|
+
{ name: "getCustomer", method: "GET", path: "/billing/v1/customers/{id}" },
|
|
381
|
+
{ name: "updateCustomer", method: "PATCH", path: "/billing/v1/customers/{id}" },
|
|
382
|
+
{ name: "deleteCustomer", method: "DELETE", path: "/billing/v1/customers/{id}" },
|
|
383
|
+
{ name: "listPayments", method: "GET", path: "/billing/v1/payments" },
|
|
384
|
+
{ name: "createPayment", method: "POST", path: "/billing/v1/payments" },
|
|
385
|
+
{ name: "getPayment", method: "GET", path: "/billing/v1/payments/{id}" },
|
|
386
|
+
{ name: "cancelPayment", method: "POST", path: "/billing/v1/payments/{id}/cancel" },
|
|
387
|
+
{ name: "listPaymentLinks", method: "GET", path: "/billing/v1/payment-links" },
|
|
388
|
+
{ name: "createPaymentLink", method: "POST", path: "/billing/v1/payment-links" },
|
|
389
|
+
{ name: "getPaymentLink", method: "GET", path: "/billing/v1/payment-links/{id}" },
|
|
390
|
+
{ name: "updatePaymentLink", method: "PATCH", path: "/billing/v1/payment-links/{id}" },
|
|
391
|
+
{ name: "deletePaymentLink", method: "DELETE", path: "/billing/v1/payment-links/{id}" },
|
|
392
|
+
{ name: "listRefunds", method: "GET", path: "/billing/v1/refunds" },
|
|
393
|
+
{ name: "createRefund", method: "POST", path: "/billing/v1/refunds" },
|
|
394
|
+
{ name: "getRefund", method: "GET", path: "/billing/v1/refunds/{id}" },
|
|
395
|
+
{ name: "cancelRefund", method: "POST", path: "/billing/v1/refunds/{id}/cancel" },
|
|
396
|
+
{ name: "listSubscriptions", method: "GET", path: "/billing/v1/subscriptions" },
|
|
397
|
+
{ name: "createSubscription", method: "POST", path: "/billing/v1/subscriptions" },
|
|
398
|
+
{ name: "getSubscription", method: "GET", path: "/billing/v1/subscriptions/{id}" },
|
|
399
|
+
{ name: "updateSubscription", method: "PATCH", path: "/billing/v1/subscriptions/{id}" },
|
|
400
|
+
{ name: "cancelSubscription", method: "POST", path: "/billing/v1/subscriptions/{id}/cancel" },
|
|
401
|
+
{ name: "listInvoices", method: "GET", path: "/billing/v1/invoices" },
|
|
402
|
+
{ name: "getInvoice", method: "GET", path: "/billing/v1/invoices/{id}" },
|
|
403
|
+
{ name: "listWebhooks", method: "GET", path: "/billing/v1/webhooks" },
|
|
404
|
+
{ name: "createWebhook", method: "POST", path: "/billing/v1/webhooks" },
|
|
405
|
+
{ name: "getWebhook", method: "GET", path: "/billing/v1/webhooks/{id}" },
|
|
406
|
+
{ name: "updateWebhook", method: "PATCH", path: "/billing/v1/webhooks/{id}" },
|
|
407
|
+
{ name: "deleteWebhook", method: "DELETE", path: "/billing/v1/webhooks/{id}" },
|
|
408
|
+
{ name: "testWebhook", method: "POST", path: "/billing/v1/webhooks/{id}/test" },
|
|
409
|
+
{
|
|
410
|
+
name: "listConnections",
|
|
411
|
+
method: "GET",
|
|
412
|
+
path: "/admin/billing/clients/{client_name}/connections"
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
name: "createConnection",
|
|
416
|
+
method: "POST",
|
|
417
|
+
path: "/admin/billing/clients/{client_name}/connections"
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
name: "getConnection",
|
|
421
|
+
method: "GET",
|
|
422
|
+
path: "/admin/billing/clients/{client_name}/connections/{connection_id}"
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
name: "updateConnection",
|
|
426
|
+
method: "PATCH",
|
|
427
|
+
path: "/admin/billing/clients/{client_name}/connections/{connection_id}"
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
name: "deleteConnection",
|
|
431
|
+
method: "DELETE",
|
|
432
|
+
path: "/admin/billing/clients/{client_name}/connections/{connection_id}"
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
name: "reconcileDocument",
|
|
436
|
+
method: "POST",
|
|
437
|
+
path: "/admin/billing/clients/{client_name}/connections/{connection_id}/reconcile"
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
name: "listWebhookEvents",
|
|
441
|
+
method: "GET",
|
|
442
|
+
path: "/admin/billing/clients/{client_name}/webhook-events"
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
name: "provisionWebhookSinks",
|
|
446
|
+
method: "POST",
|
|
447
|
+
path: "/admin/billing/clients/{client_name}/webhook-sinks/provision"
|
|
448
|
+
},
|
|
449
|
+
{ name: "listGrants", method: "GET", path: "/admin/billing/grants" },
|
|
450
|
+
{ name: "listProviders", method: "GET", path: "/admin/billing/providers" },
|
|
451
|
+
{
|
|
452
|
+
name: "listSinkHelpers",
|
|
453
|
+
method: "GET",
|
|
454
|
+
path: "/admin/webhook-sinks/helpers/billing"
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
name: "ingestProviderWebhook",
|
|
458
|
+
method: "POST",
|
|
459
|
+
path: "/billing/providers/{provider}/clients/{client_name}/connections/{connection_id}/webhook"
|
|
460
|
+
},
|
|
461
|
+
{ name: "getDebugBilling", method: "GET", path: "/debug/billing" }
|
|
462
|
+
]
|
|
463
|
+
};
|
|
464
|
+
function withPathParam(path, name, value) {
|
|
465
|
+
return path.replace(`{${name}}`, encodeURIComponent(value));
|
|
466
|
+
}
|
|
467
|
+
function appendQuery(path, query) {
|
|
468
|
+
if (!query) return path;
|
|
469
|
+
const params = new URLSearchParams();
|
|
470
|
+
for (const [key, value] of Object.entries(query)) {
|
|
471
|
+
if (value === void 0 || value === null) continue;
|
|
472
|
+
params.set(key, String(value));
|
|
473
|
+
}
|
|
474
|
+
const serialized = params.toString();
|
|
475
|
+
return serialized ? `${path}?${serialized}` : path;
|
|
476
|
+
}
|
|
477
|
+
function connectionQuery(input) {
|
|
478
|
+
const query = {
|
|
479
|
+
connectionId: input.connectionId
|
|
480
|
+
};
|
|
481
|
+
if (input.clientName) query.clientName = input.clientName;
|
|
482
|
+
if ("cursor" in input && input.cursor) query.cursor = input.cursor;
|
|
483
|
+
if ("source" in input && input.source) query.source = input.source;
|
|
484
|
+
if ("limit" in input && input.limit !== void 0) query.limit = String(input.limit);
|
|
485
|
+
if ("offset" in input && input.offset !== void 0) query.offset = String(input.offset);
|
|
486
|
+
return query;
|
|
487
|
+
}
|
|
488
|
+
function parseEnvelopeData(body) {
|
|
489
|
+
if (body && typeof body === "object" && "data" in body) {
|
|
490
|
+
return body.data;
|
|
491
|
+
}
|
|
492
|
+
return body;
|
|
493
|
+
}
|
|
494
|
+
function createBillingModule(config) {
|
|
495
|
+
const baseUrl = normalizeAthenaGatewayBaseUrl(config.baseUrl, {
|
|
496
|
+
label: "Athena billing base URL"
|
|
497
|
+
});
|
|
498
|
+
const fetchImpl = config.fetchImpl ?? globalThis.fetch.bind(globalThis);
|
|
499
|
+
async function call(method, path, body, options, responseType = "json") {
|
|
500
|
+
const headers = buildAthenaRequestHeaders({
|
|
501
|
+
profile: "gateway",
|
|
502
|
+
sdkHeaderValue: SDK_HEADER_VALUE,
|
|
503
|
+
apiKey: options?.apiKey ?? config.apiKey,
|
|
504
|
+
client: config.client,
|
|
505
|
+
configHeaders: {
|
|
506
|
+
...config.headers ?? {}
|
|
507
|
+
},
|
|
508
|
+
callHeaders: options?.headers,
|
|
509
|
+
contentType: "application/json"
|
|
510
|
+
});
|
|
511
|
+
let requestBody;
|
|
512
|
+
if (body !== void 0 && body !== null) {
|
|
513
|
+
if (typeof body === "string" || body instanceof Blob || body instanceof ArrayBuffer || ArrayBuffer.isView(body) || body instanceof FormData || body instanceof URLSearchParams) {
|
|
514
|
+
requestBody = body;
|
|
515
|
+
} else {
|
|
516
|
+
requestBody = JSON.stringify(body);
|
|
517
|
+
if (!hasHeaderIgnoreCase(headers, "Content-Type")) {
|
|
518
|
+
headers["Content-Type"] = "application/json";
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
const targetUrl = `${baseUrl}${path.startsWith("/") ? path : `/${path}`}`;
|
|
523
|
+
const response = await fetchImpl(targetUrl, {
|
|
524
|
+
method,
|
|
525
|
+
headers,
|
|
526
|
+
body: requestBody,
|
|
527
|
+
signal: options?.signal
|
|
528
|
+
});
|
|
529
|
+
if (responseType === "text") {
|
|
530
|
+
const text = await response.text();
|
|
531
|
+
if (!response.ok) {
|
|
532
|
+
throw new AthenaBillingError({
|
|
533
|
+
message: `Billing request failed (${response.status})`,
|
|
534
|
+
status: response.status,
|
|
535
|
+
endpoint: path,
|
|
536
|
+
method,
|
|
537
|
+
body: text
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
return text;
|
|
541
|
+
}
|
|
542
|
+
const rawText = await response.text();
|
|
543
|
+
let parsed = rawText;
|
|
544
|
+
if (rawText) {
|
|
545
|
+
try {
|
|
546
|
+
parsed = JSON.parse(rawText);
|
|
547
|
+
} catch {
|
|
548
|
+
parsed = rawText;
|
|
549
|
+
}
|
|
550
|
+
} else {
|
|
551
|
+
parsed = null;
|
|
552
|
+
}
|
|
553
|
+
if (!response.ok) {
|
|
554
|
+
const message = parsed && typeof parsed === "object" && "message" in parsed && typeof parsed.message === "string" ? parsed.message : `Billing request failed (${response.status})`;
|
|
555
|
+
throw new AthenaBillingError({
|
|
556
|
+
message,
|
|
557
|
+
status: response.status,
|
|
558
|
+
endpoint: path,
|
|
559
|
+
method,
|
|
560
|
+
body: parsed
|
|
561
|
+
});
|
|
562
|
+
}
|
|
563
|
+
return parseEnvelopeData(parsed);
|
|
564
|
+
}
|
|
565
|
+
return {
|
|
566
|
+
getCapabilities(input, options) {
|
|
567
|
+
return call(
|
|
568
|
+
"GET",
|
|
569
|
+
appendQuery("/billing/v1/capabilities", connectionQuery(input)),
|
|
570
|
+
void 0,
|
|
571
|
+
options
|
|
572
|
+
);
|
|
573
|
+
},
|
|
574
|
+
createCheckout(body, options) {
|
|
575
|
+
return call("POST", "/billing/v1/checkouts", body, options);
|
|
576
|
+
},
|
|
577
|
+
listProducts(input, options) {
|
|
578
|
+
return call(
|
|
579
|
+
"GET",
|
|
580
|
+
appendQuery("/billing/v1/products", connectionQuery(input)),
|
|
581
|
+
void 0,
|
|
582
|
+
options
|
|
583
|
+
);
|
|
584
|
+
},
|
|
585
|
+
listPrices(input, options) {
|
|
586
|
+
return call(
|
|
587
|
+
"GET",
|
|
588
|
+
appendQuery("/billing/v1/prices", {
|
|
589
|
+
...connectionQuery(input),
|
|
590
|
+
...input.productId ? { productId: input.productId } : {}
|
|
591
|
+
}),
|
|
592
|
+
void 0,
|
|
593
|
+
options
|
|
594
|
+
);
|
|
595
|
+
},
|
|
596
|
+
listCustomers(input, options) {
|
|
597
|
+
return call(
|
|
598
|
+
"GET",
|
|
599
|
+
appendQuery("/billing/v1/customers", connectionQuery(input)),
|
|
600
|
+
void 0,
|
|
601
|
+
options
|
|
602
|
+
);
|
|
603
|
+
},
|
|
604
|
+
createCustomer(input, options) {
|
|
605
|
+
return call(
|
|
606
|
+
"POST",
|
|
607
|
+
"/billing/v1/customers",
|
|
608
|
+
{
|
|
609
|
+
connectionId: input.connectionId,
|
|
610
|
+
clientName: input.clientName,
|
|
611
|
+
email: input.email,
|
|
612
|
+
name: input.name,
|
|
613
|
+
metadata: input.metadata ?? {},
|
|
614
|
+
idempotencyKey: input.idempotencyKey
|
|
615
|
+
},
|
|
616
|
+
options
|
|
617
|
+
);
|
|
618
|
+
},
|
|
619
|
+
getCustomer(id, input, options) {
|
|
620
|
+
return call(
|
|
621
|
+
"GET",
|
|
622
|
+
appendQuery(
|
|
623
|
+
withPathParam("/billing/v1/customers/{id}", "id", id),
|
|
624
|
+
connectionQuery(input)
|
|
625
|
+
),
|
|
626
|
+
void 0,
|
|
627
|
+
options
|
|
628
|
+
);
|
|
629
|
+
},
|
|
630
|
+
updateCustomer(id, input, options) {
|
|
631
|
+
return call(
|
|
632
|
+
"PATCH",
|
|
633
|
+
withPathParam("/billing/v1/customers/{id}", "id", id),
|
|
634
|
+
{
|
|
635
|
+
connectionId: input.connectionId,
|
|
636
|
+
clientName: input.clientName,
|
|
637
|
+
email: input.email,
|
|
638
|
+
name: input.name
|
|
639
|
+
},
|
|
640
|
+
options
|
|
641
|
+
);
|
|
642
|
+
},
|
|
643
|
+
deleteCustomer(id, input, options) {
|
|
644
|
+
return call(
|
|
645
|
+
"DELETE",
|
|
646
|
+
appendQuery(
|
|
647
|
+
withPathParam("/billing/v1/customers/{id}", "id", id),
|
|
648
|
+
connectionQuery(input)
|
|
649
|
+
),
|
|
650
|
+
void 0,
|
|
651
|
+
options
|
|
652
|
+
);
|
|
653
|
+
},
|
|
654
|
+
listPayments(input, options) {
|
|
655
|
+
return call(
|
|
656
|
+
"GET",
|
|
657
|
+
appendQuery("/billing/v1/payments", connectionQuery(input)),
|
|
658
|
+
void 0,
|
|
659
|
+
options
|
|
660
|
+
);
|
|
661
|
+
},
|
|
662
|
+
createPayment(body, options) {
|
|
663
|
+
return call("POST", "/billing/v1/payments", body, options);
|
|
664
|
+
},
|
|
665
|
+
getPayment(id, input, options) {
|
|
666
|
+
return call(
|
|
667
|
+
"GET",
|
|
668
|
+
appendQuery(
|
|
669
|
+
withPathParam("/billing/v1/payments/{id}", "id", id),
|
|
670
|
+
connectionQuery(input)
|
|
671
|
+
),
|
|
672
|
+
void 0,
|
|
673
|
+
options
|
|
674
|
+
);
|
|
675
|
+
},
|
|
676
|
+
cancelPayment(id, input, options) {
|
|
677
|
+
return call(
|
|
678
|
+
"POST",
|
|
679
|
+
appendQuery(
|
|
680
|
+
withPathParam("/billing/v1/payments/{id}/cancel", "id", id),
|
|
681
|
+
connectionQuery(input)
|
|
682
|
+
),
|
|
683
|
+
{},
|
|
684
|
+
options
|
|
685
|
+
);
|
|
686
|
+
},
|
|
687
|
+
listPaymentLinks(input, options) {
|
|
688
|
+
return call(
|
|
689
|
+
"GET",
|
|
690
|
+
appendQuery("/billing/v1/payment-links", connectionQuery(input)),
|
|
691
|
+
void 0,
|
|
692
|
+
options
|
|
693
|
+
);
|
|
694
|
+
},
|
|
695
|
+
createPaymentLink(body, options) {
|
|
696
|
+
return call("POST", "/billing/v1/payment-links", body, options);
|
|
697
|
+
},
|
|
698
|
+
getPaymentLink(id, input, options) {
|
|
699
|
+
return call(
|
|
700
|
+
"GET",
|
|
701
|
+
appendQuery(
|
|
702
|
+
withPathParam("/billing/v1/payment-links/{id}", "id", id),
|
|
703
|
+
connectionQuery(input)
|
|
704
|
+
),
|
|
705
|
+
void 0,
|
|
706
|
+
options
|
|
707
|
+
);
|
|
708
|
+
},
|
|
709
|
+
updatePaymentLink(id, body, options) {
|
|
710
|
+
return call(
|
|
711
|
+
"PATCH",
|
|
712
|
+
withPathParam("/billing/v1/payment-links/{id}", "id", id),
|
|
713
|
+
body,
|
|
714
|
+
options
|
|
715
|
+
);
|
|
716
|
+
},
|
|
717
|
+
deletePaymentLink(id, input, options) {
|
|
718
|
+
return call(
|
|
719
|
+
"DELETE",
|
|
720
|
+
appendQuery(
|
|
721
|
+
withPathParam("/billing/v1/payment-links/{id}", "id", id),
|
|
722
|
+
connectionQuery(input)
|
|
723
|
+
),
|
|
724
|
+
void 0,
|
|
725
|
+
options
|
|
726
|
+
);
|
|
727
|
+
},
|
|
728
|
+
listRefunds(input, options) {
|
|
729
|
+
return call(
|
|
730
|
+
"GET",
|
|
731
|
+
appendQuery("/billing/v1/refunds", connectionQuery(input)),
|
|
732
|
+
void 0,
|
|
733
|
+
options
|
|
734
|
+
);
|
|
735
|
+
},
|
|
736
|
+
createRefund(body, options) {
|
|
737
|
+
return call("POST", "/billing/v1/refunds", body, options);
|
|
738
|
+
},
|
|
739
|
+
getRefund(id, input, options) {
|
|
740
|
+
return call(
|
|
741
|
+
"GET",
|
|
742
|
+
appendQuery(withPathParam("/billing/v1/refunds/{id}", "id", id), connectionQuery(input)),
|
|
743
|
+
void 0,
|
|
744
|
+
options
|
|
745
|
+
);
|
|
746
|
+
},
|
|
747
|
+
cancelRefund(id, input, options) {
|
|
748
|
+
return call(
|
|
749
|
+
"POST",
|
|
750
|
+
appendQuery(withPathParam("/billing/v1/refunds/{id}/cancel", "id", id), connectionQuery(input)),
|
|
751
|
+
{},
|
|
752
|
+
options
|
|
753
|
+
);
|
|
754
|
+
},
|
|
755
|
+
listSubscriptions(input, options) {
|
|
756
|
+
return call(
|
|
757
|
+
"GET",
|
|
758
|
+
appendQuery("/billing/v1/subscriptions", connectionQuery(input)),
|
|
759
|
+
void 0,
|
|
760
|
+
options
|
|
761
|
+
);
|
|
762
|
+
},
|
|
763
|
+
createSubscription(body, options) {
|
|
764
|
+
return call("POST", "/billing/v1/subscriptions", body, options);
|
|
765
|
+
},
|
|
766
|
+
getSubscription(id, input, options) {
|
|
767
|
+
return call(
|
|
768
|
+
"GET",
|
|
769
|
+
appendQuery(
|
|
770
|
+
withPathParam("/billing/v1/subscriptions/{id}", "id", id),
|
|
771
|
+
connectionQuery(input)
|
|
772
|
+
),
|
|
773
|
+
void 0,
|
|
774
|
+
options
|
|
775
|
+
);
|
|
776
|
+
},
|
|
777
|
+
updateSubscription(id, body, options) {
|
|
778
|
+
return call(
|
|
779
|
+
"PATCH",
|
|
780
|
+
withPathParam("/billing/v1/subscriptions/{id}", "id", id),
|
|
781
|
+
body,
|
|
782
|
+
options
|
|
783
|
+
);
|
|
784
|
+
},
|
|
785
|
+
cancelSubscription(id, input, options) {
|
|
786
|
+
return call(
|
|
787
|
+
"POST",
|
|
788
|
+
appendQuery(
|
|
789
|
+
withPathParam("/billing/v1/subscriptions/{id}/cancel", "id", id),
|
|
790
|
+
connectionQuery(input)
|
|
791
|
+
),
|
|
792
|
+
{},
|
|
793
|
+
options
|
|
794
|
+
);
|
|
795
|
+
},
|
|
796
|
+
listInvoices(input, options) {
|
|
797
|
+
return call(
|
|
798
|
+
"GET",
|
|
799
|
+
appendQuery("/billing/v1/invoices", connectionQuery(input)),
|
|
800
|
+
void 0,
|
|
801
|
+
options
|
|
802
|
+
);
|
|
803
|
+
},
|
|
804
|
+
getInvoice(id, input, options) {
|
|
805
|
+
return call(
|
|
806
|
+
"GET",
|
|
807
|
+
appendQuery(
|
|
808
|
+
withPathParam("/billing/v1/invoices/{id}", "id", id),
|
|
809
|
+
connectionQuery(input)
|
|
810
|
+
),
|
|
811
|
+
void 0,
|
|
812
|
+
options
|
|
813
|
+
);
|
|
814
|
+
},
|
|
815
|
+
listWebhooks(input, options) {
|
|
816
|
+
return call(
|
|
817
|
+
"GET",
|
|
818
|
+
appendQuery("/billing/v1/webhooks", connectionQuery(input)),
|
|
819
|
+
void 0,
|
|
820
|
+
options
|
|
821
|
+
);
|
|
822
|
+
},
|
|
823
|
+
createWebhook(input, body, options) {
|
|
824
|
+
return call(
|
|
825
|
+
"POST",
|
|
826
|
+
appendQuery("/billing/v1/webhooks", connectionQuery(input)),
|
|
827
|
+
body,
|
|
828
|
+
options
|
|
829
|
+
);
|
|
830
|
+
},
|
|
831
|
+
getWebhook(id, input, options) {
|
|
832
|
+
return call(
|
|
833
|
+
"GET",
|
|
834
|
+
appendQuery(withPathParam("/billing/v1/webhooks/{id}", "id", id), connectionQuery(input)),
|
|
835
|
+
void 0,
|
|
836
|
+
options
|
|
837
|
+
);
|
|
838
|
+
},
|
|
839
|
+
updateWebhook(id, input, body, options) {
|
|
840
|
+
return call(
|
|
841
|
+
"PATCH",
|
|
842
|
+
appendQuery(withPathParam("/billing/v1/webhooks/{id}", "id", id), connectionQuery(input)),
|
|
843
|
+
body,
|
|
844
|
+
options
|
|
845
|
+
);
|
|
846
|
+
},
|
|
847
|
+
deleteWebhook(id, input, options) {
|
|
848
|
+
return call(
|
|
849
|
+
"DELETE",
|
|
850
|
+
appendQuery(withPathParam("/billing/v1/webhooks/{id}", "id", id), connectionQuery(input)),
|
|
851
|
+
void 0,
|
|
852
|
+
options
|
|
853
|
+
);
|
|
854
|
+
},
|
|
855
|
+
testWebhook(id, input, options) {
|
|
856
|
+
return call(
|
|
857
|
+
"POST",
|
|
858
|
+
appendQuery(
|
|
859
|
+
withPathParam("/billing/v1/webhooks/{id}/test", "id", id),
|
|
860
|
+
connectionQuery(input)
|
|
861
|
+
),
|
|
862
|
+
{},
|
|
863
|
+
options
|
|
864
|
+
);
|
|
865
|
+
},
|
|
866
|
+
listConnections(clientName, options) {
|
|
867
|
+
return call(
|
|
868
|
+
"GET",
|
|
869
|
+
withPathParam("/admin/billing/clients/{client_name}/connections", "client_name", clientName),
|
|
870
|
+
void 0,
|
|
871
|
+
options
|
|
872
|
+
);
|
|
873
|
+
},
|
|
874
|
+
createConnection(clientName, input, options) {
|
|
875
|
+
return call(
|
|
876
|
+
"POST",
|
|
877
|
+
withPathParam("/admin/billing/clients/{client_name}/connections", "client_name", clientName),
|
|
878
|
+
{
|
|
879
|
+
ownerKind: input.ownerKind,
|
|
880
|
+
ownerId: input.ownerId,
|
|
881
|
+
provider: input.provider,
|
|
882
|
+
mode: input.mode,
|
|
883
|
+
status: input.status,
|
|
884
|
+
credentialKind: input.credentialKind,
|
|
885
|
+
providerAccountId: input.providerAccountId,
|
|
886
|
+
providerProfileId: input.providerProfileId,
|
|
887
|
+
scopes: input.scopes,
|
|
888
|
+
config: input.config,
|
|
889
|
+
metadata: input.metadata
|
|
890
|
+
},
|
|
891
|
+
options
|
|
892
|
+
);
|
|
893
|
+
},
|
|
894
|
+
getConnection(clientName, connectionId, options) {
|
|
895
|
+
return call(
|
|
896
|
+
"GET",
|
|
897
|
+
withPathParam(
|
|
898
|
+
withPathParam(
|
|
899
|
+
"/admin/billing/clients/{client_name}/connections/{connection_id}",
|
|
900
|
+
"client_name",
|
|
901
|
+
clientName
|
|
902
|
+
),
|
|
903
|
+
"connection_id",
|
|
904
|
+
connectionId
|
|
905
|
+
),
|
|
906
|
+
void 0,
|
|
907
|
+
options
|
|
908
|
+
);
|
|
909
|
+
},
|
|
910
|
+
updateConnection(clientName, connectionId, input, options) {
|
|
911
|
+
return call(
|
|
912
|
+
"PATCH",
|
|
913
|
+
withPathParam(
|
|
914
|
+
withPathParam(
|
|
915
|
+
"/admin/billing/clients/{client_name}/connections/{connection_id}",
|
|
916
|
+
"client_name",
|
|
917
|
+
clientName
|
|
918
|
+
),
|
|
919
|
+
"connection_id",
|
|
920
|
+
connectionId
|
|
921
|
+
),
|
|
922
|
+
input,
|
|
923
|
+
options
|
|
924
|
+
);
|
|
925
|
+
},
|
|
926
|
+
deleteConnection(clientName, connectionId, options) {
|
|
927
|
+
return call(
|
|
928
|
+
"DELETE",
|
|
929
|
+
withPathParam(
|
|
930
|
+
withPathParam(
|
|
931
|
+
"/admin/billing/clients/{client_name}/connections/{connection_id}",
|
|
932
|
+
"client_name",
|
|
933
|
+
clientName
|
|
934
|
+
),
|
|
935
|
+
"connection_id",
|
|
936
|
+
connectionId
|
|
937
|
+
),
|
|
938
|
+
void 0,
|
|
939
|
+
options
|
|
940
|
+
);
|
|
941
|
+
},
|
|
942
|
+
reconcileDocument(clientName, connectionId, input, options) {
|
|
943
|
+
return call(
|
|
944
|
+
"POST",
|
|
945
|
+
withPathParam(
|
|
946
|
+
withPathParam(
|
|
947
|
+
"/admin/billing/clients/{client_name}/connections/{connection_id}/reconcile",
|
|
948
|
+
"client_name",
|
|
949
|
+
clientName
|
|
950
|
+
),
|
|
951
|
+
"connection_id",
|
|
952
|
+
connectionId
|
|
953
|
+
),
|
|
954
|
+
{
|
|
955
|
+
resourceKind: input.resourceKind,
|
|
956
|
+
resourceId: input.resourceId,
|
|
957
|
+
customerId: input.customerId
|
|
958
|
+
},
|
|
959
|
+
options
|
|
960
|
+
);
|
|
961
|
+
},
|
|
962
|
+
listWebhookEvents(clientName, options) {
|
|
963
|
+
return call(
|
|
964
|
+
"GET",
|
|
965
|
+
withPathParam(
|
|
966
|
+
"/admin/billing/clients/{client_name}/webhook-events",
|
|
967
|
+
"client_name",
|
|
968
|
+
clientName
|
|
969
|
+
),
|
|
970
|
+
void 0,
|
|
971
|
+
options
|
|
972
|
+
);
|
|
973
|
+
},
|
|
974
|
+
provisionWebhookSinks(clientName, input, options) {
|
|
975
|
+
return call(
|
|
976
|
+
"POST",
|
|
977
|
+
appendQuery(
|
|
978
|
+
withPathParam(
|
|
979
|
+
"/admin/billing/clients/{client_name}/webhook-sinks/provision",
|
|
980
|
+
"client_name",
|
|
981
|
+
clientName
|
|
982
|
+
),
|
|
983
|
+
{
|
|
984
|
+
targetSchema: input?.targetSchema,
|
|
985
|
+
instance: input?.instance
|
|
986
|
+
}
|
|
987
|
+
),
|
|
988
|
+
{},
|
|
989
|
+
options
|
|
990
|
+
);
|
|
991
|
+
},
|
|
992
|
+
listGrants(options) {
|
|
993
|
+
return call("GET", "/admin/billing/grants", void 0, options);
|
|
994
|
+
},
|
|
995
|
+
listProviders(options) {
|
|
996
|
+
return call("GET", "/admin/billing/providers", void 0, options);
|
|
997
|
+
},
|
|
998
|
+
listSinkHelpers(query, options) {
|
|
999
|
+
return call(
|
|
1000
|
+
"GET",
|
|
1001
|
+
appendQuery("/admin/webhook-sinks/helpers/billing", {
|
|
1002
|
+
targetSchema: query?.targetSchema,
|
|
1003
|
+
instance: query?.instance
|
|
1004
|
+
}),
|
|
1005
|
+
void 0,
|
|
1006
|
+
options
|
|
1007
|
+
);
|
|
1008
|
+
},
|
|
1009
|
+
ingestProviderWebhook(input, options) {
|
|
1010
|
+
const path = withPathParam(
|
|
1011
|
+
withPathParam(
|
|
1012
|
+
withPathParam(
|
|
1013
|
+
"/billing/providers/{provider}/clients/{client_name}/connections/{connection_id}/webhook",
|
|
1014
|
+
"provider",
|
|
1015
|
+
input.provider
|
|
1016
|
+
),
|
|
1017
|
+
"client_name",
|
|
1018
|
+
input.clientName
|
|
1019
|
+
),
|
|
1020
|
+
"connection_id",
|
|
1021
|
+
input.connectionId
|
|
1022
|
+
);
|
|
1023
|
+
return call("POST", path, input.body, {
|
|
1024
|
+
...options,
|
|
1025
|
+
headers: {
|
|
1026
|
+
...options?.headers ?? {},
|
|
1027
|
+
...input.signatureHeaders ?? {}
|
|
1028
|
+
}
|
|
1029
|
+
});
|
|
1030
|
+
},
|
|
1031
|
+
getDebugBilling(jwtSecret, options) {
|
|
1032
|
+
return call(
|
|
1033
|
+
"GET",
|
|
1034
|
+
appendQuery("/debug/billing", { jwt_secret: jwtSecret }),
|
|
1035
|
+
void 0,
|
|
1036
|
+
options,
|
|
1037
|
+
"text"
|
|
1038
|
+
);
|
|
1039
|
+
}
|
|
1040
|
+
};
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
// src/billing/live-http-routes.json
|
|
1044
|
+
var live_http_routes_default = {
|
|
1045
|
+
consumers: [
|
|
1046
|
+
"openapi.yaml",
|
|
1047
|
+
"openapi.json",
|
|
1048
|
+
"packages/athena-js billingSdkManifest",
|
|
1049
|
+
"tests/billing_contract_spine.rs"
|
|
1050
|
+
],
|
|
1051
|
+
description: "Live Athena billing HTTP surface. Owned by athena_billing::live_http_routes (Rust). Export with: cargo run -p athena-billing --bin billing-contract-spine -- --write",
|
|
1052
|
+
domain: "billing",
|
|
1053
|
+
routes: [
|
|
1054
|
+
{
|
|
1055
|
+
method: "GET",
|
|
1056
|
+
path: "/admin/billing/clients/{client_name}/connections",
|
|
1057
|
+
surface: "admin"
|
|
1058
|
+
},
|
|
1059
|
+
{
|
|
1060
|
+
method: "POST",
|
|
1061
|
+
path: "/admin/billing/clients/{client_name}/connections",
|
|
1062
|
+
surface: "admin"
|
|
1063
|
+
},
|
|
1064
|
+
{
|
|
1065
|
+
method: "DELETE",
|
|
1066
|
+
path: "/admin/billing/clients/{client_name}/connections/{connection_id}",
|
|
1067
|
+
surface: "admin"
|
|
1068
|
+
},
|
|
1069
|
+
{
|
|
1070
|
+
method: "GET",
|
|
1071
|
+
path: "/admin/billing/clients/{client_name}/connections/{connection_id}",
|
|
1072
|
+
surface: "admin"
|
|
1073
|
+
},
|
|
1074
|
+
{
|
|
1075
|
+
method: "PATCH",
|
|
1076
|
+
path: "/admin/billing/clients/{client_name}/connections/{connection_id}",
|
|
1077
|
+
surface: "admin"
|
|
1078
|
+
},
|
|
1079
|
+
{
|
|
1080
|
+
method: "POST",
|
|
1081
|
+
path: "/admin/billing/clients/{client_name}/connections/{connection_id}/reconcile",
|
|
1082
|
+
surface: "admin"
|
|
1083
|
+
},
|
|
1084
|
+
{
|
|
1085
|
+
method: "GET",
|
|
1086
|
+
path: "/admin/billing/clients/{client_name}/webhook-events",
|
|
1087
|
+
surface: "admin"
|
|
1088
|
+
},
|
|
1089
|
+
{
|
|
1090
|
+
method: "POST",
|
|
1091
|
+
path: "/admin/billing/clients/{client_name}/webhook-sinks/provision",
|
|
1092
|
+
surface: "admin"
|
|
1093
|
+
},
|
|
1094
|
+
{
|
|
1095
|
+
method: "GET",
|
|
1096
|
+
path: "/admin/billing/grants",
|
|
1097
|
+
surface: "admin"
|
|
1098
|
+
},
|
|
1099
|
+
{
|
|
1100
|
+
method: "GET",
|
|
1101
|
+
path: "/admin/billing/providers",
|
|
1102
|
+
surface: "admin"
|
|
1103
|
+
},
|
|
1104
|
+
{
|
|
1105
|
+
method: "GET",
|
|
1106
|
+
path: "/admin/webhook-sinks/helpers/billing",
|
|
1107
|
+
surface: "admin"
|
|
1108
|
+
},
|
|
1109
|
+
{
|
|
1110
|
+
method: "POST",
|
|
1111
|
+
path: "/billing/providers/{provider}/clients/{client_name}/connections/{connection_id}/webhook",
|
|
1112
|
+
surface: "providerWebhook"
|
|
1113
|
+
},
|
|
1114
|
+
{
|
|
1115
|
+
method: "GET",
|
|
1116
|
+
path: "/billing/v1/capabilities",
|
|
1117
|
+
surface: "billingV1"
|
|
1118
|
+
},
|
|
1119
|
+
{
|
|
1120
|
+
method: "POST",
|
|
1121
|
+
path: "/billing/v1/checkouts",
|
|
1122
|
+
surface: "billingV1"
|
|
1123
|
+
},
|
|
1124
|
+
{
|
|
1125
|
+
method: "GET",
|
|
1126
|
+
path: "/billing/v1/products",
|
|
1127
|
+
surface: "billingV1"
|
|
1128
|
+
},
|
|
1129
|
+
{
|
|
1130
|
+
method: "GET",
|
|
1131
|
+
path: "/billing/v1/prices",
|
|
1132
|
+
surface: "billingV1"
|
|
1133
|
+
},
|
|
1134
|
+
{
|
|
1135
|
+
method: "GET",
|
|
1136
|
+
path: "/billing/v1/customers",
|
|
1137
|
+
surface: "billingV1"
|
|
1138
|
+
},
|
|
1139
|
+
{
|
|
1140
|
+
method: "POST",
|
|
1141
|
+
path: "/billing/v1/customers",
|
|
1142
|
+
surface: "billingV1"
|
|
1143
|
+
},
|
|
1144
|
+
{
|
|
1145
|
+
method: "DELETE",
|
|
1146
|
+
path: "/billing/v1/customers/{id}",
|
|
1147
|
+
surface: "billingV1"
|
|
1148
|
+
},
|
|
1149
|
+
{
|
|
1150
|
+
method: "GET",
|
|
1151
|
+
path: "/billing/v1/customers/{id}",
|
|
1152
|
+
surface: "billingV1"
|
|
1153
|
+
},
|
|
1154
|
+
{
|
|
1155
|
+
method: "PATCH",
|
|
1156
|
+
path: "/billing/v1/customers/{id}",
|
|
1157
|
+
surface: "billingV1"
|
|
1158
|
+
},
|
|
1159
|
+
{
|
|
1160
|
+
method: "GET",
|
|
1161
|
+
path: "/billing/v1/invoices",
|
|
1162
|
+
surface: "billingV1"
|
|
1163
|
+
},
|
|
1164
|
+
{
|
|
1165
|
+
method: "GET",
|
|
1166
|
+
path: "/billing/v1/invoices/{id}",
|
|
1167
|
+
surface: "billingV1"
|
|
1168
|
+
},
|
|
1169
|
+
{
|
|
1170
|
+
method: "GET",
|
|
1171
|
+
path: "/billing/v1/payment-links",
|
|
1172
|
+
surface: "billingV1"
|
|
1173
|
+
},
|
|
1174
|
+
{
|
|
1175
|
+
method: "POST",
|
|
1176
|
+
path: "/billing/v1/payment-links",
|
|
1177
|
+
surface: "billingV1"
|
|
1178
|
+
},
|
|
1179
|
+
{
|
|
1180
|
+
method: "DELETE",
|
|
1181
|
+
path: "/billing/v1/payment-links/{id}",
|
|
1182
|
+
surface: "billingV1"
|
|
1183
|
+
},
|
|
1184
|
+
{
|
|
1185
|
+
method: "GET",
|
|
1186
|
+
path: "/billing/v1/payment-links/{id}",
|
|
1187
|
+
surface: "billingV1"
|
|
1188
|
+
},
|
|
1189
|
+
{
|
|
1190
|
+
method: "PATCH",
|
|
1191
|
+
path: "/billing/v1/payment-links/{id}",
|
|
1192
|
+
surface: "billingV1"
|
|
1193
|
+
},
|
|
1194
|
+
{
|
|
1195
|
+
method: "GET",
|
|
1196
|
+
path: "/billing/v1/payments",
|
|
1197
|
+
surface: "billingV1"
|
|
1198
|
+
},
|
|
1199
|
+
{
|
|
1200
|
+
method: "POST",
|
|
1201
|
+
path: "/billing/v1/payments",
|
|
1202
|
+
surface: "billingV1"
|
|
1203
|
+
},
|
|
1204
|
+
{
|
|
1205
|
+
method: "GET",
|
|
1206
|
+
path: "/billing/v1/payments/{id}",
|
|
1207
|
+
surface: "billingV1"
|
|
1208
|
+
},
|
|
1209
|
+
{
|
|
1210
|
+
method: "POST",
|
|
1211
|
+
path: "/billing/v1/payments/{id}/cancel",
|
|
1212
|
+
surface: "billingV1"
|
|
1213
|
+
},
|
|
1214
|
+
{
|
|
1215
|
+
method: "GET",
|
|
1216
|
+
path: "/billing/v1/refunds",
|
|
1217
|
+
surface: "billingV1"
|
|
1218
|
+
},
|
|
1219
|
+
{
|
|
1220
|
+
method: "POST",
|
|
1221
|
+
path: "/billing/v1/refunds",
|
|
1222
|
+
surface: "billingV1"
|
|
1223
|
+
},
|
|
1224
|
+
{
|
|
1225
|
+
method: "GET",
|
|
1226
|
+
path: "/billing/v1/refunds/{id}",
|
|
1227
|
+
surface: "billingV1"
|
|
1228
|
+
},
|
|
1229
|
+
{
|
|
1230
|
+
method: "POST",
|
|
1231
|
+
path: "/billing/v1/refunds/{id}/cancel",
|
|
1232
|
+
surface: "billingV1"
|
|
1233
|
+
},
|
|
1234
|
+
{
|
|
1235
|
+
method: "GET",
|
|
1236
|
+
path: "/billing/v1/subscriptions",
|
|
1237
|
+
surface: "billingV1"
|
|
1238
|
+
},
|
|
1239
|
+
{
|
|
1240
|
+
method: "POST",
|
|
1241
|
+
path: "/billing/v1/subscriptions",
|
|
1242
|
+
surface: "billingV1"
|
|
1243
|
+
},
|
|
1244
|
+
{
|
|
1245
|
+
method: "GET",
|
|
1246
|
+
path: "/billing/v1/subscriptions/{id}",
|
|
1247
|
+
surface: "billingV1"
|
|
1248
|
+
},
|
|
1249
|
+
{
|
|
1250
|
+
method: "PATCH",
|
|
1251
|
+
path: "/billing/v1/subscriptions/{id}",
|
|
1252
|
+
surface: "billingV1"
|
|
1253
|
+
},
|
|
1254
|
+
{
|
|
1255
|
+
method: "POST",
|
|
1256
|
+
path: "/billing/v1/subscriptions/{id}/cancel",
|
|
1257
|
+
surface: "billingV1"
|
|
1258
|
+
},
|
|
1259
|
+
{
|
|
1260
|
+
method: "GET",
|
|
1261
|
+
path: "/billing/v1/webhooks",
|
|
1262
|
+
surface: "billingV1"
|
|
1263
|
+
},
|
|
1264
|
+
{
|
|
1265
|
+
method: "POST",
|
|
1266
|
+
path: "/billing/v1/webhooks",
|
|
1267
|
+
surface: "billingV1"
|
|
1268
|
+
},
|
|
1269
|
+
{
|
|
1270
|
+
method: "DELETE",
|
|
1271
|
+
path: "/billing/v1/webhooks/{id}",
|
|
1272
|
+
surface: "billingV1"
|
|
1273
|
+
},
|
|
1274
|
+
{
|
|
1275
|
+
method: "GET",
|
|
1276
|
+
path: "/billing/v1/webhooks/{id}",
|
|
1277
|
+
surface: "billingV1"
|
|
1278
|
+
},
|
|
1279
|
+
{
|
|
1280
|
+
method: "PATCH",
|
|
1281
|
+
path: "/billing/v1/webhooks/{id}",
|
|
1282
|
+
surface: "billingV1"
|
|
1283
|
+
},
|
|
1284
|
+
{
|
|
1285
|
+
method: "POST",
|
|
1286
|
+
path: "/billing/v1/webhooks/{id}/test",
|
|
1287
|
+
surface: "billingV1"
|
|
1288
|
+
},
|
|
1289
|
+
{
|
|
1290
|
+
method: "GET",
|
|
1291
|
+
path: "/debug/billing",
|
|
1292
|
+
surface: "debug"
|
|
1293
|
+
}
|
|
1294
|
+
],
|
|
1295
|
+
schemaVersion: 1,
|
|
1296
|
+
sourceOfTruth: "crates/athena-billing/src/live_http_routes.rs",
|
|
1297
|
+
sources: [
|
|
1298
|
+
"src/api/billing.rs",
|
|
1299
|
+
"src/api/billing_v1/**",
|
|
1300
|
+
"src/api/debug/billing.rs"
|
|
1301
|
+
]
|
|
1302
|
+
};
|
|
1303
|
+
|
|
1304
|
+
export { AthenaBillingError, live_http_routes_default as billingLiveHttpRoutes, billingSdkManifest, createBillingModule };
|
|
1305
|
+
//# sourceMappingURL=billing.js.map
|
|
1306
|
+
//# sourceMappingURL=billing.js.map
|