@voyantjs/utils 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/kms-aws.d.ts.map +1 -1
- package/dist/kms-aws.js +1 -4
- package/dist/kms-aws.js.map +1 -1
- package/dist/kms.d.ts +1 -1
- package/dist/kms.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/accounting-countries.d.ts +0 -12
- package/dist/accounting-countries.d.ts.map +0 -1
- package/dist/accounting-countries.js +0 -307
- package/dist/accounting-countries.js.map +0 -1
- package/dist/accounting-regions.d.ts +0 -103
- package/dist/accounting-regions.d.ts.map +0 -1
- package/dist/accounting-regions.js +0 -38
- package/dist/accounting-regions.js.map +0 -1
- package/dist/airlines.d.ts +0 -960
- package/dist/airlines.d.ts.map +0 -1
- package/dist/airlines.js +0 -989
- package/dist/airlines.js.map +0 -1
- package/dist/analytics/api-key-events.d.ts +0 -89
- package/dist/analytics/api-key-events.d.ts.map +0 -1
- package/dist/analytics/api-key-events.js +0 -99
- package/dist/analytics/api-key-events.js.map +0 -1
- package/dist/api-keys-client.d.ts +0 -40
- package/dist/api-keys-client.d.ts.map +0 -1
- package/dist/api-keys-client.js +0 -63
- package/dist/api-keys-client.js.map +0 -1
- package/dist/api-keys.d.ts +0 -48
- package/dist/api-keys.d.ts.map +0 -1
- package/dist/api-keys.js +0 -108
- package/dist/api-keys.js.map +0 -1
- package/dist/checkout-signature.d.ts +0 -15
- package/dist/checkout-signature.d.ts.map +0 -1
- package/dist/checkout-signature.js +0 -64
- package/dist/checkout-signature.js.map +0 -1
- package/dist/conditions.d.ts +0 -36
- package/dist/conditions.d.ts.map +0 -1
- package/dist/conditions.js +0 -396
- package/dist/conditions.js.map +0 -1
- package/dist/email/send.d.ts +0 -20
- package/dist/email/send.d.ts.map +0 -1
- package/dist/email/send.js +0 -53
- package/dist/email/send.js.map +0 -1
- package/dist/form-runtime.d.ts +0 -38
- package/dist/form-runtime.d.ts.map +0 -1
- package/dist/form-runtime.js +0 -174
- package/dist/form-runtime.js.map +0 -1
- package/dist/gcs/storage.d.ts +0 -23
- package/dist/gcs/storage.d.ts.map +0 -1
- package/dist/gcs/storage.js +0 -25
- package/dist/gcs/storage.js.map +0 -1
- package/dist/geo.d.ts +0 -85
- package/dist/geo.d.ts.map +0 -1
- package/dist/geo.js +0 -141
- package/dist/geo.js.map +0 -1
- package/dist/kms-crypto.d.ts +0 -20
- package/dist/kms-crypto.d.ts.map +0 -1
- package/dist/kms-crypto.js +0 -108
- package/dist/kms-crypto.js.map +0 -1
- package/dist/kv-codecs.d.ts +0 -6
- package/dist/kv-codecs.d.ts.map +0 -1
- package/dist/kv-codecs.js +0 -4
- package/dist/kv-codecs.js.map +0 -1
- package/dist/price/resolve.d.ts +0 -91
- package/dist/price/resolve.d.ts.map +0 -1
- package/dist/price/resolve.js +0 -227
- package/dist/price/resolve.js.map +0 -1
- package/dist/redis.d.ts +0 -13
- package/dist/redis.d.ts.map +0 -1
- package/dist/redis.js +0 -16
- package/dist/redis.js.map +0 -1
- package/dist/region-only.d.ts +0 -11
- package/dist/region-only.d.ts.map +0 -1
- package/dist/region-only.js +0 -49
- package/dist/region-only.js.map +0 -1
- package/dist/region.d.ts +0 -11
- package/dist/region.d.ts.map +0 -1
- package/dist/region.js +0 -47
- package/dist/region.js.map +0 -1
- package/dist/romania-bucharest-sectors.d.ts +0 -6
- package/dist/romania-bucharest-sectors.d.ts.map +0 -1
- package/dist/romania-bucharest-sectors.js +0 -27
- package/dist/romania-bucharest-sectors.js.map +0 -1
- package/dist/romania-counties.d.ts +0 -6
- package/dist/romania-counties.d.ts.map +0 -1
- package/dist/romania-counties.js +0 -171
- package/dist/romania-counties.js.map +0 -1
- package/dist/sms/provider.d.ts +0 -28
- package/dist/sms/provider.d.ts.map +0 -1
- package/dist/sms/provider.js +0 -50
- package/dist/sms/provider.js.map +0 -1
- package/dist/sms/segments.d.ts +0 -3
- package/dist/sms/segments.d.ts.map +0 -1
- package/dist/sms/segments.js +0 -33
- package/dist/sms/segments.js.map +0 -1
- package/dist/twilio/client.d.ts +0 -13
- package/dist/twilio/client.d.ts.map +0 -1
- package/dist/twilio/client.js +0 -26
- package/dist/twilio/client.js.map +0 -1
- package/dist/usage/index.d.ts +0 -34
- package/dist/usage/index.d.ts.map +0 -1
- package/dist/usage/index.js +0 -18
- package/dist/usage/index.js.map +0 -1
- package/dist/usage/policy.d.ts +0 -27
- package/dist/usage/policy.d.ts.map +0 -1
- package/dist/usage/policy.js +0 -17
- package/dist/usage/policy.js.map +0 -1
- package/dist/validation/log.d.ts +0 -10
- package/dist/validation/log.d.ts.map +0 -1
- package/dist/validation/log.js +0 -37
- package/dist/validation/log.js.map +0 -1
- package/dist/zod-form-builder.d.ts +0 -45
- package/dist/zod-form-builder.d.ts.map +0 -1
- package/dist/zod-form-builder.js +0 -216
- package/dist/zod-form-builder.js.map +0 -1
package/dist/form-runtime.js
DELETED
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import { evaluatePredicate } from "./conditions.js";
|
|
2
|
-
import { computeRegionsFromCountries } from "./geo.js";
|
|
3
|
-
import { buildBillingSchema, buildPassengerSchema, getDefaultValues, getRequiredFields, getVisibleFields, } from "./zod-form-builder.js";
|
|
4
|
-
// Re-export functions from zod-form-builder and conditions
|
|
5
|
-
export { buildBillingSchema, buildPassengerSchema, evaluatePredicate, getDefaultValues, getRequiredFields, getVisibleFields, };
|
|
6
|
-
// Safe browser check that works in all environments
|
|
7
|
-
const isBrowser = typeof globalThis !== "undefined" && "window" in globalThis;
|
|
8
|
-
export function isDebugEnabled() {
|
|
9
|
-
if (!isBrowser)
|
|
10
|
-
return false;
|
|
11
|
-
try {
|
|
12
|
-
const url = new URL(globalThis.window.location.href);
|
|
13
|
-
const q = url.searchParams;
|
|
14
|
-
return q.has("debugBooking") || q.get("debug") === "1" || q.get("debug") === "true";
|
|
15
|
-
}
|
|
16
|
-
catch {
|
|
17
|
-
return false;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
export function getProductCountriesFromUrl() {
|
|
21
|
-
if (!isBrowser)
|
|
22
|
-
return [];
|
|
23
|
-
try {
|
|
24
|
-
const url = new URL(globalThis.window.location.href);
|
|
25
|
-
const qp = String(url.searchParams.get("productCountries") || "");
|
|
26
|
-
return qp
|
|
27
|
-
? qp
|
|
28
|
-
.split(",")
|
|
29
|
-
.map((c) => c.trim().toUpperCase())
|
|
30
|
-
.filter(Boolean)
|
|
31
|
-
: [];
|
|
32
|
-
}
|
|
33
|
-
catch {
|
|
34
|
-
return [];
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
export function buildItineraryContext(productCountries) {
|
|
38
|
-
const countries = Array.isArray(productCountries) && productCountries.length > 0
|
|
39
|
-
? productCountries
|
|
40
|
-
: getProductCountriesFromUrl();
|
|
41
|
-
return {
|
|
42
|
-
countries_any: countries,
|
|
43
|
-
items: {
|
|
44
|
-
country: countries,
|
|
45
|
-
region: computeRegionsFromCountries(countries),
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
export function computeVisibility(formDef, ctx, id, alias) {
|
|
50
|
-
if (!formDef || !Array.isArray(formDef.fields) || formDef.fields.length === 0) {
|
|
51
|
-
// When form definition is missing (e.g., during load), default to not visible.
|
|
52
|
-
return false;
|
|
53
|
-
}
|
|
54
|
-
const all = formDef.fields;
|
|
55
|
-
let def = all.find((f) => String(f?.id || "") === id);
|
|
56
|
-
if (!def && alias && alias[id]) {
|
|
57
|
-
def = all.find((f) => String(f?.id || "") === alias[id]);
|
|
58
|
-
}
|
|
59
|
-
if (!def)
|
|
60
|
-
return false;
|
|
61
|
-
if (def.hidden === true)
|
|
62
|
-
return false;
|
|
63
|
-
if (!def.visibleWhen)
|
|
64
|
-
return true;
|
|
65
|
-
try {
|
|
66
|
-
return Boolean(evaluatePredicate(def.visibleWhen, ctx));
|
|
67
|
-
}
|
|
68
|
-
catch {
|
|
69
|
-
return true;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Normalize a field definition to the canonical model.
|
|
74
|
-
* - Coerce boolean-like strings to booleans
|
|
75
|
-
* - Drop conflicting `visible` flag; hidden wins
|
|
76
|
-
* - Ensure options array integrity
|
|
77
|
-
*/
|
|
78
|
-
export function normalizeFieldDefinition(field) {
|
|
79
|
-
const clone = { ...field };
|
|
80
|
-
const coerceBool = (v) => {
|
|
81
|
-
if (v === undefined)
|
|
82
|
-
return undefined;
|
|
83
|
-
if (typeof v === "boolean")
|
|
84
|
-
return v;
|
|
85
|
-
if (typeof v === "string") {
|
|
86
|
-
const lower = v.toLowerCase();
|
|
87
|
-
if (lower === "true" || lower === "1")
|
|
88
|
-
return true;
|
|
89
|
-
if (lower === "false" || lower === "0")
|
|
90
|
-
return false;
|
|
91
|
-
}
|
|
92
|
-
return Boolean(v);
|
|
93
|
-
};
|
|
94
|
-
if ("hidden" in clone)
|
|
95
|
-
clone.hidden = coerceBool(clone.hidden);
|
|
96
|
-
if ("required" in clone)
|
|
97
|
-
clone.required = coerceBool(clone.required);
|
|
98
|
-
// Remove any stray `visible` property; `hidden` + `visibleWhen` are canonical
|
|
99
|
-
if ("visible" in clone) {
|
|
100
|
-
// If both are present, hidden wins; drop visible entirely
|
|
101
|
-
delete clone.visible;
|
|
102
|
-
}
|
|
103
|
-
// Sanitize options
|
|
104
|
-
if (Array.isArray(clone.options)) {
|
|
105
|
-
clone.options = clone.options
|
|
106
|
-
.filter((opt) => opt && typeof opt.value === "string")
|
|
107
|
-
.map((opt) => ({ value: String(opt.value), label: opt.label }));
|
|
108
|
-
}
|
|
109
|
-
return clone;
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Map an id through an alias registry to the canonical id.
|
|
113
|
-
*/
|
|
114
|
-
export function canonicalizeFieldId(id, aliases) {
|
|
115
|
-
if (!aliases)
|
|
116
|
-
return id;
|
|
117
|
-
const key = String(id || "");
|
|
118
|
-
return aliases[key] || key;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Convert a Date to YYYY-MM-DD string in UTC.
|
|
122
|
-
*/
|
|
123
|
-
export function toIsoDateUtc(date) {
|
|
124
|
-
const d = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));
|
|
125
|
-
return d.toISOString().slice(0, 10);
|
|
126
|
-
}
|
|
127
|
-
export function visibleCustomFields(formDef, ctx, defaultsToExclude, excludePrefixes = []) {
|
|
128
|
-
if (!formDef)
|
|
129
|
-
return [];
|
|
130
|
-
const visible = getVisibleFields(formDef, ctx);
|
|
131
|
-
const result = visible
|
|
132
|
-
.filter((f) => f && typeof f.id === "string")
|
|
133
|
-
.filter((f) => f?.hidden !== true)
|
|
134
|
-
.filter((f) => !defaultsToExclude.has(String(f.id)))
|
|
135
|
-
.filter((f) => {
|
|
136
|
-
const id = String(f.id);
|
|
137
|
-
return !excludePrefixes.some((p) => id.startsWith(p));
|
|
138
|
-
});
|
|
139
|
-
return result;
|
|
140
|
-
}
|
|
141
|
-
export function requiredIdsWithAliases(formDef, ctx, aliasRules) {
|
|
142
|
-
if (!formDef)
|
|
143
|
-
return new Set();
|
|
144
|
-
const set = new Set(getRequiredFields(formDef, ctx));
|
|
145
|
-
for (const rule of aliasRules) {
|
|
146
|
-
if (set.has(rule.ifHas)) {
|
|
147
|
-
rule.add.forEach((i) => set.add(i));
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
return set;
|
|
151
|
-
}
|
|
152
|
-
export function makeZodResolver(schema) {
|
|
153
|
-
return async (values) => {
|
|
154
|
-
try {
|
|
155
|
-
const res = schema?.safeParse ? schema.safeParse(values) : { success: true, data: values };
|
|
156
|
-
if (res.success) {
|
|
157
|
-
return { values: res.data, errors: {} };
|
|
158
|
-
}
|
|
159
|
-
const errs = {};
|
|
160
|
-
for (const issue of res.error?.issues || []) {
|
|
161
|
-
const path = Array.isArray(issue.path) ? issue.path.join(".") : String(issue.path || "");
|
|
162
|
-
errs[path || "root"] = {
|
|
163
|
-
type: issue.code || "invalid",
|
|
164
|
-
message: issue.message,
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
return { values: {}, errors: errs };
|
|
168
|
-
}
|
|
169
|
-
catch {
|
|
170
|
-
return { values: values, errors: {} };
|
|
171
|
-
}
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
//# sourceMappingURL=form-runtime.js.map
|
package/dist/form-runtime.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"form-runtime.js","sourceRoot":"","sources":["../src/form-runtime.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAA;AACtD,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,uBAAuB,CAAA;AAE9B,2DAA2D;AAC3D,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,GACjB,CAAA;AAED,oDAAoD;AACpD,MAAM,SAAS,GAAG,OAAO,UAAU,KAAK,WAAW,IAAI,QAAQ,IAAI,UAAU,CAAA;AAE7E,MAAM,UAAU,cAAc;IAC5B,IAAI,CAAC,SAAS;QAAE,OAAO,KAAK,CAAA;IAC5B,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,IAAI,GAAG,CAAE,UAAkB,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;QAC7D,MAAM,CAAC,GAAG,GAAG,CAAC,YAAY,CAAA;QAC1B,OAAO,CAAC,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,MAAM,CAAA;IACrF,CAAC;IAAC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gBACxF,IAAI,CAAC,IAAI,IAAI,MAAM,CAAC,GAAG;oBACrB,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,SAAS;oBAC7B,OAAO,EAAE,KAAK,CAAC,OAAO;iBACvB,CAAA;YACH,CAAC;YACD,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;QACrC,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,CAAA;QACvC,CAAC;IACH,CAAC,CAAA;AACH,CAAC"}
|
package/dist/gcs/storage.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GCS Storage Utilities
|
|
3
|
-
*
|
|
4
|
-
* @deprecated GCS has been removed - these are now no-ops or use alternative providers.
|
|
5
|
-
* TODO: Remove this file once all usages are updated to use R2 directly.
|
|
6
|
-
*/
|
|
7
|
-
interface SignedUrlOptions {
|
|
8
|
-
responseType?: string;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Generate a signed URL for a GCS object
|
|
12
|
-
*
|
|
13
|
-
* @deprecated GCS has been removed. This function now throws an error.
|
|
14
|
-
* Use R2 or the cached signed URL utility in apps/dash/src/lib/signed-urls.ts instead.
|
|
15
|
-
*
|
|
16
|
-
* @param path - The storage path (gs://bucket/key format)
|
|
17
|
-
* @param ttlSeconds - Time to live for the signed URL
|
|
18
|
-
* @param _options - Optional parameters (ignored, for signature compatibility)
|
|
19
|
-
* @returns Promise that rejects with an error
|
|
20
|
-
*/
|
|
21
|
-
export declare function generateSignedUrl(path: string, _ttlSeconds: number, _options?: SignedUrlOptions): Promise<string>;
|
|
22
|
-
export {};
|
|
23
|
-
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/gcs/storage.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,UAAU,gBAAgB;IACxB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,QAAQ,CAAC,EAAE,gBAAgB,GAC1B,OAAO,CAAC,MAAM,CAAC,CAMjB"}
|
package/dist/gcs/storage.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GCS Storage Utilities
|
|
3
|
-
*
|
|
4
|
-
* @deprecated GCS has been removed - these are now no-ops or use alternative providers.
|
|
5
|
-
* TODO: Remove this file once all usages are updated to use R2 directly.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Generate a signed URL for a GCS object
|
|
9
|
-
*
|
|
10
|
-
* @deprecated GCS has been removed. This function now throws an error.
|
|
11
|
-
* Use R2 or the cached signed URL utility in apps/dash/src/lib/signed-urls.ts instead.
|
|
12
|
-
*
|
|
13
|
-
* @param path - The storage path (gs://bucket/key format)
|
|
14
|
-
* @param ttlSeconds - Time to live for the signed URL
|
|
15
|
-
* @param _options - Optional parameters (ignored, for signature compatibility)
|
|
16
|
-
* @returns Promise that rejects with an error
|
|
17
|
-
*/
|
|
18
|
-
export async function generateSignedUrl(path, _ttlSeconds, _options) {
|
|
19
|
-
console.warn(`[gcs/storage] generateSignedUrl called with deprecated GCS path: ${path}`);
|
|
20
|
-
// GCS has been removed - return the path as-is or throw
|
|
21
|
-
// For backwards compatibility, we'll just return the path
|
|
22
|
-
// This should be handled by the caller with a proper fallback
|
|
23
|
-
throw new Error(`GCS has been removed. Cannot generate signed URL for: ${path}`);
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=storage.js.map
|
package/dist/gcs/storage.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../src/gcs/storage.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,IAAY,EACZ,WAAmB,EACnB,QAA2B;IAE3B,OAAO,CAAC,IAAI,CAAC,oEAAoE,IAAI,EAAE,CAAC,CAAA;IACxF,wDAAwD;IACxD,0DAA0D;IAC1D,8DAA8D;IAC9D,MAAM,IAAI,KAAK,CAAC,yDAAyD,IAAI,EAAE,CAAC,CAAA;AAClF,CAAC"}
|
package/dist/geo.d.ts
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Geographic and Regional Utilities
|
|
3
|
-
*
|
|
4
|
-
* Provides helpers for EU membership checks, region derivation,
|
|
5
|
-
* and country-based geographic logic for booking forms.
|
|
6
|
-
*/
|
|
7
|
-
import type { AccountingRegionCode } from "./accounting-regions.js";
|
|
8
|
-
/**
|
|
9
|
-
* EU member states (ISO 3166-1 alpha-2)
|
|
10
|
-
* Based on European Union membership as of 2024
|
|
11
|
-
*/
|
|
12
|
-
export declare const EU_COUNTRIES: Set<string>;
|
|
13
|
-
/**
|
|
14
|
-
* EEA member states (EU + Iceland, Liechtenstein, Norway)
|
|
15
|
-
*/
|
|
16
|
-
export declare const EEA_COUNTRIES: Set<string>;
|
|
17
|
-
/**
|
|
18
|
-
* Schengen Area member states
|
|
19
|
-
*/
|
|
20
|
-
export declare const SCHENGEN_COUNTRIES: Set<string>;
|
|
21
|
-
/**
|
|
22
|
-
* Check if a country code is in the European Union
|
|
23
|
-
*
|
|
24
|
-
* @param countryCode - ISO 3166-1 alpha-2 country code
|
|
25
|
-
* @returns true if country is EU member
|
|
26
|
-
*/
|
|
27
|
-
export declare function isCountryInEU(countryCode: string): boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Check if a country code is in the European Economic Area
|
|
30
|
-
*
|
|
31
|
-
* @param countryCode - ISO 3166-1 alpha-2 country code
|
|
32
|
-
* @returns true if country is EEA member
|
|
33
|
-
*/
|
|
34
|
-
export declare function isCountryInEEA(countryCode: string): boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Check if a country code is in the Schengen Area
|
|
37
|
-
*
|
|
38
|
-
* @param countryCode - ISO 3166-1 alpha-2 country code
|
|
39
|
-
* @returns true if country is Schengen member
|
|
40
|
-
*/
|
|
41
|
-
export declare function isCountryInSchengen(countryCode: string): boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Compute whether any of the provided countries is outside the EU
|
|
44
|
-
*
|
|
45
|
-
* @param countries - Array of ISO 3166-1 alpha-2 country codes
|
|
46
|
-
* @returns true if any country is not in the EU
|
|
47
|
-
*/
|
|
48
|
-
export declare function computeAnyOutsideEU(countries: string[]): boolean;
|
|
49
|
-
/**
|
|
50
|
-
* Compute whether all provided countries are in the EU
|
|
51
|
-
*
|
|
52
|
-
* @param countries - Array of ISO 3166-1 alpha-2 country codes
|
|
53
|
-
* @returns true if all countries are in the EU
|
|
54
|
-
*/
|
|
55
|
-
export declare function computeAllInEU(countries: string[]): boolean;
|
|
56
|
-
/**
|
|
57
|
-
* Get regions a country belongs to
|
|
58
|
-
*
|
|
59
|
-
* @param countryCode - ISO 3166-1 alpha-2 country code
|
|
60
|
-
* @returns array of region codes the country belongs to
|
|
61
|
-
*/
|
|
62
|
-
export declare function getCountryRegions(countryCode: string): AccountingRegionCode[];
|
|
63
|
-
/**
|
|
64
|
-
* Compute all unique regions from a list of countries
|
|
65
|
-
*
|
|
66
|
-
* @param countries - Array of ISO 3166-1 alpha-2 country codes
|
|
67
|
-
* @returns array of unique region codes
|
|
68
|
-
*/
|
|
69
|
-
export declare function computeRegionsFromCountries(countries: string[]): AccountingRegionCode[];
|
|
70
|
-
/**
|
|
71
|
-
* Normalize country code to ISO 3166-1 alpha-2 uppercase
|
|
72
|
-
*
|
|
73
|
-
* @param countryCode - Country code in any case
|
|
74
|
-
* @returns normalized uppercase country code
|
|
75
|
-
*/
|
|
76
|
-
export declare function normalizeCountryCode(countryCode: string): string;
|
|
77
|
-
/**
|
|
78
|
-
* Extract unique country codes from various sources
|
|
79
|
-
* Useful for aggregating countries from itinerary, extensions, etc.
|
|
80
|
-
*
|
|
81
|
-
* @param sources - Multiple arrays of country codes
|
|
82
|
-
* @returns unique normalized country codes
|
|
83
|
-
*/
|
|
84
|
-
export declare function aggregateCountries(...sources: (string[] | undefined)[]): string[];
|
|
85
|
-
//# sourceMappingURL=geo.d.ts.map
|
package/dist/geo.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"geo.d.ts","sourceRoot":"","sources":["../src/geo.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAEnE;;;GAGG;AACH,eAAO,MAAM,YAAY,aAQxB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,aAMzB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB,aAQ9B,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAE3D;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAEhE;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,OAAO,CAMhE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,OAAO,CAM3D;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,oBAAoB,EAAE,CAI7E;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,oBAAoB,EAAE,CAavF;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAEhE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,OAAO,EAAE,CAAC,MAAM,EAAE,GAAG,SAAS,CAAC,EAAE,GAAG,MAAM,EAAE,CAcjF"}
|
package/dist/geo.js
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Geographic and Regional Utilities
|
|
3
|
-
*
|
|
4
|
-
* Provides helpers for EU membership checks, region derivation,
|
|
5
|
-
* and country-based geographic logic for booking forms.
|
|
6
|
-
*/
|
|
7
|
-
import { countryAccountingRegions } from "./accounting-countries.js";
|
|
8
|
-
/**
|
|
9
|
-
* EU member states (ISO 3166-1 alpha-2)
|
|
10
|
-
* Based on European Union membership as of 2024
|
|
11
|
-
*/
|
|
12
|
-
export const EU_COUNTRIES = new Set(countryAccountingRegions && typeof countryAccountingRegions === "object"
|
|
13
|
-
? Object.entries(countryAccountingRegions)
|
|
14
|
-
.filter(([, regs]) => Array.isArray(regs) && regs.includes("eu-union"))
|
|
15
|
-
.map(([code]) => code)
|
|
16
|
-
: []);
|
|
17
|
-
/**
|
|
18
|
-
* EEA member states (EU + Iceland, Liechtenstein, Norway)
|
|
19
|
-
*/
|
|
20
|
-
export const EEA_COUNTRIES = new Set(countryAccountingRegions && typeof countryAccountingRegions === "object"
|
|
21
|
-
? Object.entries(countryAccountingRegions)
|
|
22
|
-
.filter(([, regs]) => Array.isArray(regs) && regs.includes("eea"))
|
|
23
|
-
.map(([code]) => code)
|
|
24
|
-
: []);
|
|
25
|
-
/**
|
|
26
|
-
* Schengen Area member states
|
|
27
|
-
*/
|
|
28
|
-
export const SCHENGEN_COUNTRIES = new Set(countryAccountingRegions && typeof countryAccountingRegions === "object"
|
|
29
|
-
? Object.entries(countryAccountingRegions)
|
|
30
|
-
.filter(([, regs]) => Array.isArray(regs) && regs.includes("schengen"))
|
|
31
|
-
.map(([code]) => code)
|
|
32
|
-
: []);
|
|
33
|
-
/**
|
|
34
|
-
* Check if a country code is in the European Union
|
|
35
|
-
*
|
|
36
|
-
* @param countryCode - ISO 3166-1 alpha-2 country code
|
|
37
|
-
* @returns true if country is EU member
|
|
38
|
-
*/
|
|
39
|
-
export function isCountryInEU(countryCode) {
|
|
40
|
-
return EU_COUNTRIES.has(countryCode.toUpperCase());
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Check if a country code is in the European Economic Area
|
|
44
|
-
*
|
|
45
|
-
* @param countryCode - ISO 3166-1 alpha-2 country code
|
|
46
|
-
* @returns true if country is EEA member
|
|
47
|
-
*/
|
|
48
|
-
export function isCountryInEEA(countryCode) {
|
|
49
|
-
return EEA_COUNTRIES.has(countryCode.toUpperCase());
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Check if a country code is in the Schengen Area
|
|
53
|
-
*
|
|
54
|
-
* @param countryCode - ISO 3166-1 alpha-2 country code
|
|
55
|
-
* @returns true if country is Schengen member
|
|
56
|
-
*/
|
|
57
|
-
export function isCountryInSchengen(countryCode) {
|
|
58
|
-
return SCHENGEN_COUNTRIES.has(countryCode.toUpperCase());
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Compute whether any of the provided countries is outside the EU
|
|
62
|
-
*
|
|
63
|
-
* @param countries - Array of ISO 3166-1 alpha-2 country codes
|
|
64
|
-
* @returns true if any country is not in the EU
|
|
65
|
-
*/
|
|
66
|
-
export function computeAnyOutsideEU(countries) {
|
|
67
|
-
if (!countries || countries.length === 0) {
|
|
68
|
-
return false;
|
|
69
|
-
}
|
|
70
|
-
return countries.some((country) => !isCountryInEU(country));
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Compute whether all provided countries are in the EU
|
|
74
|
-
*
|
|
75
|
-
* @param countries - Array of ISO 3166-1 alpha-2 country codes
|
|
76
|
-
* @returns true if all countries are in the EU
|
|
77
|
-
*/
|
|
78
|
-
export function computeAllInEU(countries) {
|
|
79
|
-
if (!countries || countries.length === 0) {
|
|
80
|
-
return false;
|
|
81
|
-
}
|
|
82
|
-
return countries.every((country) => isCountryInEU(country));
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Get regions a country belongs to
|
|
86
|
-
*
|
|
87
|
-
* @param countryCode - ISO 3166-1 alpha-2 country code
|
|
88
|
-
* @returns array of region codes the country belongs to
|
|
89
|
-
*/
|
|
90
|
-
export function getCountryRegions(countryCode) {
|
|
91
|
-
const code = countryCode.toUpperCase();
|
|
92
|
-
const regions = countryAccountingRegions[code] || [];
|
|
93
|
-
return Array.isArray(regions) ? regions : [];
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Compute all unique regions from a list of countries
|
|
97
|
-
*
|
|
98
|
-
* @param countries - Array of ISO 3166-1 alpha-2 country codes
|
|
99
|
-
* @returns array of unique region codes
|
|
100
|
-
*/
|
|
101
|
-
export function computeRegionsFromCountries(countries) {
|
|
102
|
-
if (!countries || countries.length === 0) {
|
|
103
|
-
return [];
|
|
104
|
-
}
|
|
105
|
-
const regionsSet = new Set();
|
|
106
|
-
for (const country of countries) {
|
|
107
|
-
const regions = getCountryRegions(country);
|
|
108
|
-
regions.forEach((region) => regionsSet.add(region));
|
|
109
|
-
}
|
|
110
|
-
return Array.from(regionsSet);
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Normalize country code to ISO 3166-1 alpha-2 uppercase
|
|
114
|
-
*
|
|
115
|
-
* @param countryCode - Country code in any case
|
|
116
|
-
* @returns normalized uppercase country code
|
|
117
|
-
*/
|
|
118
|
-
export function normalizeCountryCode(countryCode) {
|
|
119
|
-
return countryCode.trim().toUpperCase();
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Extract unique country codes from various sources
|
|
123
|
-
* Useful for aggregating countries from itinerary, extensions, etc.
|
|
124
|
-
*
|
|
125
|
-
* @param sources - Multiple arrays of country codes
|
|
126
|
-
* @returns unique normalized country codes
|
|
127
|
-
*/
|
|
128
|
-
export function aggregateCountries(...sources) {
|
|
129
|
-
const countriesSet = new Set();
|
|
130
|
-
for (const source of sources) {
|
|
131
|
-
if (source && Array.isArray(source)) {
|
|
132
|
-
source.forEach((code) => {
|
|
133
|
-
if (code) {
|
|
134
|
-
countriesSet.add(normalizeCountryCode(code));
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
return Array.from(countriesSet);
|
|
140
|
-
}
|
|
141
|
-
//# sourceMappingURL=geo.js.map
|
package/dist/geo.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"geo.js","sourceRoot":"","sources":["../src/geo.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAA;AAGpE;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,GAAG,CACjC,wBAAwB,IAAI,OAAO,wBAAwB,KAAK,QAAQ;IACtE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,wBAAwB,CAAC;SACrC,MAAM,CACL,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAkC,CAAC,CACvF;SACA,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC;IAC1B,CAAC,CAAC,EAAE,CACP,CAAA;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,GAAG,CAClC,wBAAwB,IAAI,OAAO,wBAAwB,KAAK,QAAQ;IACtE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,wBAAwB,CAAC;SACrC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,KAA6B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,UAAU,kBAAkB,CAAC,GAAG,OAAiC;IACrE,MAAM,YAAY,GAAG,IAAI,GAAG,EAAU,CAAA;IAEtC,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,IAAI,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YACpC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;gBACtB,IAAI,IAAI,EAAE,CAAC;oBACT,YAAY,CAAC,GAAG,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAA;gBAC9C,CAAC;YACH,CAAC,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;AACjC,CAAC"}
|
package/dist/kms-crypto.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Edge-compatible GCP KMS encryption/decryption using Web Crypto API.
|
|
3
|
-
* No Node.js dependencies — works in Cloudflare Workers.
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Creates a signed JWT assertion and exchanges it at Google's OAuth2 endpoint
|
|
7
|
-
* for a short-lived access token. Caches the token at module level.
|
|
8
|
-
*/
|
|
9
|
-
export declare function getGcpAccessToken(email: string, privateKeyPem: string): Promise<string>;
|
|
10
|
-
/**
|
|
11
|
-
* Encrypt plaintext using GCP Cloud KMS.
|
|
12
|
-
* Returns base64 ciphertext string.
|
|
13
|
-
*/
|
|
14
|
-
export declare function kmsEncrypt(plaintext: string, keyName: string, accessToken: string): Promise<string>;
|
|
15
|
-
/**
|
|
16
|
-
* Decrypt ciphertext using GCP Cloud KMS.
|
|
17
|
-
* Returns plaintext string.
|
|
18
|
-
*/
|
|
19
|
-
export declare function kmsDecrypt(ciphertext: string, keyName: string, accessToken: string): Promise<string>;
|
|
20
|
-
//# sourceMappingURL=kms-crypto.d.ts.map
|
package/dist/kms-crypto.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kms-crypto.d.ts","sourceRoot":"","sources":["../src/kms-crypto.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA0CH;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA0C7F;AAED;;;GAGG;AACH,wBAAsB,UAAU,CAC9B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,CAAC,CAmBjB;AAED;;;GAGG;AACH,wBAAsB,UAAU,CAC9B,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,CAAC,CAiBjB"}
|
package/dist/kms-crypto.js
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Edge-compatible GCP KMS encryption/decryption using Web Crypto API.
|
|
3
|
-
* No Node.js dependencies — works in Cloudflare Workers.
|
|
4
|
-
*/
|
|
5
|
-
// ---------- GCP Access Token (module-level cache) ----------
|
|
6
|
-
let cachedToken = null;
|
|
7
|
-
function base64UrlEncode(data) {
|
|
8
|
-
let binary = "";
|
|
9
|
-
for (const byte of data) {
|
|
10
|
-
binary += String.fromCharCode(byte);
|
|
11
|
-
}
|
|
12
|
-
return btoa(binary).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
|
|
13
|
-
}
|
|
14
|
-
function base64UrlEncodeString(str) {
|
|
15
|
-
return base64UrlEncode(new TextEncoder().encode(str));
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Import a PEM-encoded RSA private key for signing JWTs.
|
|
19
|
-
*/
|
|
20
|
-
async function importPrivateKey(pem) {
|
|
21
|
-
const pemBody = pem
|
|
22
|
-
.replace(/-----BEGIN (?:RSA )?PRIVATE KEY-----/g, "")
|
|
23
|
-
.replace(/-----END (?:RSA )?PRIVATE KEY-----/g, "")
|
|
24
|
-
.replace(/[\n\r\s]/g, "");
|
|
25
|
-
const binaryString = atob(pemBody);
|
|
26
|
-
const bytes = new Uint8Array(binaryString.length);
|
|
27
|
-
for (let i = 0; i < binaryString.length; i++) {
|
|
28
|
-
bytes[i] = binaryString.charCodeAt(i);
|
|
29
|
-
}
|
|
30
|
-
return crypto.subtle.importKey("pkcs8", bytes, { name: "RSASSA-PKCS1-v1_5", hash: "SHA-256" }, false, ["sign"]);
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Creates a signed JWT assertion and exchanges it at Google's OAuth2 endpoint
|
|
34
|
-
* for a short-lived access token. Caches the token at module level.
|
|
35
|
-
*/
|
|
36
|
-
export async function getGcpAccessToken(email, privateKeyPem) {
|
|
37
|
-
const now = Math.floor(Date.now() / 1000);
|
|
38
|
-
if (cachedToken && cachedToken.expiresAt > now + 60) {
|
|
39
|
-
return cachedToken.token;
|
|
40
|
-
}
|
|
41
|
-
const header = base64UrlEncodeString(JSON.stringify({ alg: "RS256", typ: "JWT" }));
|
|
42
|
-
const exp = now + 3600;
|
|
43
|
-
const payload = base64UrlEncodeString(JSON.stringify({
|
|
44
|
-
iss: email,
|
|
45
|
-
scope: "https://www.googleapis.com/auth/cloudkms",
|
|
46
|
-
aud: "https://oauth2.googleapis.com/token",
|
|
47
|
-
iat: now,
|
|
48
|
-
exp,
|
|
49
|
-
}));
|
|
50
|
-
const signingInput = `${header}.${payload}`;
|
|
51
|
-
const key = await importPrivateKey(privateKeyPem);
|
|
52
|
-
const signature = await crypto.subtle.sign("RSASSA-PKCS1-v1_5", key, new TextEncoder().encode(signingInput));
|
|
53
|
-
const jwt = `${signingInput}.${base64UrlEncode(new Uint8Array(signature))}`;
|
|
54
|
-
const res = await fetch("https://oauth2.googleapis.com/token", {
|
|
55
|
-
method: "POST",
|
|
56
|
-
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
|
57
|
-
body: `grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer&assertion=${jwt}`,
|
|
58
|
-
});
|
|
59
|
-
if (!res.ok) {
|
|
60
|
-
const body = await res.text();
|
|
61
|
-
throw new Error(`GCP token exchange failed (${res.status}): ${body}`);
|
|
62
|
-
}
|
|
63
|
-
const data = (await res.json());
|
|
64
|
-
cachedToken = { token: data.access_token, expiresAt: now + data.expires_in };
|
|
65
|
-
return data.access_token;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Encrypt plaintext using GCP Cloud KMS.
|
|
69
|
-
* Returns base64 ciphertext string.
|
|
70
|
-
*/
|
|
71
|
-
export async function kmsEncrypt(plaintext, keyName, accessToken) {
|
|
72
|
-
const encoded = btoa(plaintext);
|
|
73
|
-
const res = await fetch(`https://cloudkms.googleapis.com/v1/${keyName}:encrypt`, {
|
|
74
|
-
method: "POST",
|
|
75
|
-
headers: {
|
|
76
|
-
Authorization: `Bearer ${accessToken}`,
|
|
77
|
-
"Content-Type": "application/json",
|
|
78
|
-
},
|
|
79
|
-
body: JSON.stringify({ plaintext: encoded }),
|
|
80
|
-
});
|
|
81
|
-
if (!res.ok) {
|
|
82
|
-
const body = await res.text();
|
|
83
|
-
throw new Error(`KMS encrypt failed (${res.status}): ${body}`);
|
|
84
|
-
}
|
|
85
|
-
const data = (await res.json());
|
|
86
|
-
return data.ciphertext;
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Decrypt ciphertext using GCP Cloud KMS.
|
|
90
|
-
* Returns plaintext string.
|
|
91
|
-
*/
|
|
92
|
-
export async function kmsDecrypt(ciphertext, keyName, accessToken) {
|
|
93
|
-
const res = await fetch(`https://cloudkms.googleapis.com/v1/${keyName}:decrypt`, {
|
|
94
|
-
method: "POST",
|
|
95
|
-
headers: {
|
|
96
|
-
Authorization: `Bearer ${accessToken}`,
|
|
97
|
-
"Content-Type": "application/json",
|
|
98
|
-
},
|
|
99
|
-
body: JSON.stringify({ ciphertext }),
|
|
100
|
-
});
|
|
101
|
-
if (!res.ok) {
|
|
102
|
-
const body = await res.text();
|
|
103
|
-
throw new Error(`KMS decrypt failed (${res.status}): ${body}`);
|
|
104
|
-
}
|
|
105
|
-
const data = (await res.json());
|
|
106
|
-
return atob(data.plaintext);
|
|
107
|
-
}
|
|
108
|
-
//# sourceMappingURL=kms-crypto.js.map
|
package/dist/kms-crypto.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kms-crypto.js","sourceRoot":"","sources":["../src/kms-crypto.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,8DAA8D;AAE9D,IAAI,WAAW,GAAgD,IAAI,CAAA;AAEnE,SAAS,eAAe,CAAC,IAAgB;IACvC,IAAI,MAAM,GAAG,EAAE,CAAA;IACf,KAAK,MAAM,IAAI,IAAI,IAAI,EAAE,CAAC;QACxB,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAA;IACrC,CAAC;IACD,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;AAChF,CAAC;AAED,SAAS,qBAAqB,CAAC,GAAW;IACxC,OAAO,eAAe,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAA;AACvD,CAAC;AAED;;GAEG;AACH,KAAK,UAAU,gBAAgB,CAAC,GAAW;IACzC,MAAM,OAAO,GAAG,GAAG;SAChB,OAAO,CAAC,uCAAuC,EAAE,EAAE,CAAC;SACpD,OAAO,CAAC,qCAAqC,EAAE,EAAE,CAAC;SAClD,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;IAE3B,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,CAAA;IAClC,MAAM,KAAK,GA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ources":["../src/kv-codecs.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,uBAAuB;;;;EAGnC,CAAA"}
|
package/dist/kv-codecs.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { organizationRegionValueSchema, } from "@pxmstudio/voyant-types/schemas/kv/organization-region";
|
|
2
|
-
import { createKvCodec } from "./kv";
|
|
3
|
-
export const organizationRegionCodec = createKvCodec("WORKSPACE_REGION", organizationRegionValueSchema);
|
|
4
|
-
//# sourceMappingURL=kv-codecs.js.map
|
package/dist/kv-codecs.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kv-codecs.js","sourceRoot":"","sources":["../src/kv-codecs.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,6BAA6B,GAC9B,MAAM,wDAAwD,CAAA;AAE/D,OAAO,EAAE,aAAa,EAAE,MAAM,MAAM,CAAA;AAEpC,MAAM,CAAC,MAAM,uBAAuB,GAAG,aAAa,CAClD,kBAAkB,EAClB,6BAA6B,CAC9B,CAAA"}
|