qbo_auth: discovery-документ, клиент API с разбором Fault, отключение с отзывом токена; анкета и требования Intuit
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@ import { createLogger, createPool, itNotify, loadServiceSettings, withTx } from
|
||||
import { parseKey } from "./crypto.js";
|
||||
import { buildApi } from "./http-api.js";
|
||||
import { SyncTrigger } from "./webhook.js";
|
||||
import { discoveryEndpoints } from "./discovery.js";
|
||||
import { QboAuth } from "./service.js";
|
||||
import { qboAuthSchema } from "./settings.js";
|
||||
import { PgStore } from "./store.js";
|
||||
@@ -19,6 +20,7 @@ const auth = new QboAuth({
|
||||
redirectUri: s.redirectUri,
|
||||
scope: s.scope,
|
||||
keepAliveHours: s.keepAliveHours,
|
||||
endpoints: discoveryEndpoints(s.environment, async (url) => (await fetch(url, { headers: { Accept: "application/json" } })).json(), Date.now, (msg, extra) => log.warn(extra ?? {}, msg)),
|
||||
notify: async (text) => {
|
||||
await itNotify(common, text).catch(() => false);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user