@orangecheck/me-client 0.57.0 → 0.59.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/CHANGELOG.md +44 -6
- package/README.md +4 -1
- package/dist/button-auto.js +12 -0
- package/dist/button-auto.js.map +1 -1
- package/dist/button-auto.mjs +12 -0
- package/dist/button-auto.mjs.map +1 -1
- package/dist/button.js +12 -0
- package/dist/button.js.map +1 -1
- package/dist/button.mjs +12 -0
- package/dist/button.mjs.map +1 -1
- package/dist/index.d.mts +3 -35
- package/dist/index.d.ts +3 -35
- package/dist/index.js +14 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -7
- package/dist/index.mjs.map +1 -1
- package/dist/{integrator-BmRHP_iX.d.mts → integrator-fTchEeNJ.d.mts} +36 -2
- package/dist/{integrator-BmRHP_iX.d.ts → integrator-fTchEeNJ.d.ts} +36 -2
- package/dist/integrator.d.mts +1 -1
- package/dist/integrator.d.ts +1 -1
- package/dist/integrator.js.map +1 -1
- package/dist/integrator.mjs.map +1 -1
- package/dist/popup.js +12 -0
- package/dist/popup.js.map +1 -1
- package/dist/popup.mjs +12 -0
- package/dist/popup.mjs.map +1 -1
- package/dist/react.js +12 -0
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +12 -0
- package/dist/react.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -162,9 +162,11 @@ async function authorize(opts) {
|
|
|
162
162
|
if (opts.amount_sats == null && opts.usd_cents == null) {
|
|
163
163
|
throw new Error("payment.authorize requires amount_sats or usd_cents");
|
|
164
164
|
}
|
|
165
|
+
const { bearerToken: bearerToken2, ...body } = opts;
|
|
165
166
|
return api("/api/payment/authorize", {
|
|
166
167
|
method: "POST",
|
|
167
|
-
body
|
|
168
|
+
body,
|
|
169
|
+
bearerToken: bearerToken2
|
|
168
170
|
});
|
|
169
171
|
}
|
|
170
172
|
var payment = { authorize };
|
|
@@ -1299,15 +1301,20 @@ async function defaultLive() {
|
|
|
1299
1301
|
}
|
|
1300
1302
|
var federations = { list, live, get, defaultLive };
|
|
1301
1303
|
var CONSENT_ORIGIN = "https://ochk.app";
|
|
1302
|
-
var
|
|
1304
|
+
var SCOPE_IDS = Object.freeze([
|
|
1303
1305
|
"bitcoin_address",
|
|
1304
1306
|
"email",
|
|
1305
1307
|
"attest_tier",
|
|
1306
1308
|
"display_name",
|
|
1307
1309
|
"cross_integrator_event_count",
|
|
1308
1310
|
"cross_integrator_human_event_count",
|
|
1309
|
-
"
|
|
1310
|
-
|
|
1311
|
+
"cross_integrator_lifetime_sats",
|
|
1312
|
+
"cross_integrator_distinct_count",
|
|
1313
|
+
"cross_integrator_oldest_event_at",
|
|
1314
|
+
"cross_integrator_active_days",
|
|
1315
|
+
"trust_attestation_count",
|
|
1316
|
+
"trust_attestations_bundle"
|
|
1317
|
+
]);
|
|
1311
1318
|
function parseTrustAttestationCount(value) {
|
|
1312
1319
|
const parts = value.split(",");
|
|
1313
1320
|
if (parts.length !== 4) return null;
|
|
@@ -1364,9 +1371,9 @@ function request(scopes2, options) {
|
|
|
1364
1371
|
throw new Error("oc.scope.request: scopes must be a non-empty array");
|
|
1365
1372
|
}
|
|
1366
1373
|
for (const s of scopes2) {
|
|
1367
|
-
if (!
|
|
1374
|
+
if (!SCOPE_IDS.includes(s)) {
|
|
1368
1375
|
throw new Error(
|
|
1369
|
-
`oc.scope.request: unknown scope "${s}" \xB7 valid: ${
|
|
1376
|
+
`oc.scope.request: unknown scope "${s}" \xB7 valid: ${SCOPE_IDS.join(", ")}`
|
|
1370
1377
|
);
|
|
1371
1378
|
}
|
|
1372
1379
|
}
|
|
@@ -1728,6 +1735,6 @@ var oc = {
|
|
|
1728
1735
|
identity
|
|
1729
1736
|
};
|
|
1730
1737
|
|
|
1731
|
-
export { ALL_EVENT_SUBTYPES, ARCHETYPE_TEMPLATES, CONNECT_CONSENT_BLURB, CONNECT_CONSENT_LABEL, CUSTOM_EVENT_KEY_RE, EVENT_SUBTYPES, MAX_DROP_WINDOW_DAYS, MIN_INTEGRATOR_PRICE_SATS, MeClientError, PLATFORM_FEE_POLICY, clearBearerToken, computeFees, config, fromTemplate as configFromTemplate, event, family, federations, getArchetypeTemplate, getBearerToken, getOrigin, identity, isEventClass, isInheritedName, oc, onTelemetry, parseTrustAttestationCount, payingAt, payment, refreshEnvelopeJwks, safeReturnPath, scope, session, setBearerToken, setOrigin, subtypesForClass, validateIntegratorConfig, verifyActivityAttestation, webhook, withRateLimitRetry };
|
|
1738
|
+
export { ALL_EVENT_SUBTYPES, ARCHETYPE_TEMPLATES, CONNECT_CONSENT_BLURB, CONNECT_CONSENT_LABEL, CUSTOM_EVENT_KEY_RE, EVENT_SUBTYPES, MAX_DROP_WINDOW_DAYS, MIN_INTEGRATOR_PRICE_SATS, MeClientError, PLATFORM_FEE_POLICY, SCOPE_IDS, clearBearerToken, computeFees, config, fromTemplate as configFromTemplate, event, family, federations, getArchetypeTemplate, getBearerToken, getOrigin, identity, isEventClass, isInheritedName, oc, onTelemetry, parseTrustAttestationCount, payingAt, payment, refreshEnvelopeJwks, safeReturnPath, scope, session, setBearerToken, setOrigin, subtypesForClass, validateIntegratorConfig, verifyActivityAttestation, webhook, withRateLimitRetry };
|
|
1732
1739
|
//# sourceMappingURL=index.mjs.map
|
|
1733
1740
|
//# sourceMappingURL=index.mjs.map
|