@aptly-as/sdk-app-express 1.0.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/README.md ADDED
@@ -0,0 +1,5 @@
1
+ # Template for new node modules.
2
+
3
+ * type=module
4
+ * Typescript (with ts-node/esm loader)
5
+ * vitest as testing library
@@ -0,0 +1,8 @@
1
+ import { NextFunction, Request, Response } from 'express';
2
+ export declare function authorize(req: Request, res: Response, next: NextFunction): Promise<void>;
3
+ export declare function authorizeCallback(req: Request, res: Response, next: NextFunction): Promise<void>;
4
+ export declare function authorizeBasic(req: Request, _res: Response, next: NextFunction): Promise<void>;
5
+ export declare const authorizeProxy: typeof authorizeBasic;
6
+ export declare function authorizeWebhook(req: Request, _res: Response, next: NextFunction): Promise<void>;
7
+ export declare function authorizeRedirect(req: Request, _res: Response, next: NextFunction): Promise<void>;
8
+ export declare function clearSession(req: Request, res: Response): Promise<unknown>;
@@ -0,0 +1,139 @@
1
+ export async function authorize(req, res, next) {
2
+ try {
3
+ const token = req.signedCookies[req.aptly.tokenCookie.name];
4
+ const queryOrganization = req.query.organization;
5
+ const cookieOrganization = req.cookies[req.aptly.organizationCookie.name];
6
+ let organization = cookieOrganization || queryOrganization;
7
+ if (!token && !organization) {
8
+ res.status(401);
9
+ res.send('Organization cookie missing');
10
+ return;
11
+ }
12
+ if (cookieOrganization &&
13
+ queryOrganization &&
14
+ cookieOrganization !== queryOrganization) {
15
+ await clearSession(req, res);
16
+ return res.redirect(req.aptly.auth.getAuthorizeRedirect(String(queryOrganization), req.originalUrl));
17
+ }
18
+ try {
19
+ if (!token) {
20
+ throw new Error('Unauthorized');
21
+ }
22
+ const data = req.aptly.auth.verifyToken(token);
23
+ const config = await req.aptly.getConfig(req, data.organization);
24
+ req.aptly.api.init(req.session.refresh_token, config.organization);
25
+ req.aptly.api.accessToken = token;
26
+ res.cookie(req.aptly.organizationCookie.name, data.organization, req.aptly.organizationCookie.options);
27
+ }
28
+ catch (e) {
29
+ console.error('Token verification failed', e);
30
+ await clearSession(req, res);
31
+ if (!organization && token) {
32
+ const decoded = req.aptly.auth.decodeToken(token);
33
+ organization = decoded.organization;
34
+ }
35
+ return res.redirect(req.aptly.auth.getAuthorizeRedirect(String(organization), req.originalUrl));
36
+ }
37
+ return next();
38
+ }
39
+ catch (e) {
40
+ await clearSession(req, res);
41
+ next(e);
42
+ }
43
+ }
44
+ export async function authorizeCallback(req, res, next) {
45
+ try {
46
+ const { code, state, error } = req.query;
47
+ if (error) {
48
+ res.send(error);
49
+ return;
50
+ }
51
+ if (typeof code !== 'string') {
52
+ res.send('Missing code in authorization callback');
53
+ return;
54
+ }
55
+ const token = await req.aptly.auth.authorizeAppCode(code);
56
+ const expires = new Date();
57
+ expires.setHours(expires.getHours() + 1);
58
+ res.cookie(req.aptly.tokenCookie.name, token.access_token, {
59
+ ...req.aptly.tokenCookie.options,
60
+ expires,
61
+ });
62
+ res.cookie(req.aptly.organizationCookie.name, token.organization, req.aptly.organizationCookie.options);
63
+ if (req.session) {
64
+ req.session['refresh_token'] = token.refresh_token;
65
+ }
66
+ res.redirect(String(state || '/'));
67
+ }
68
+ catch (e) {
69
+ next(e);
70
+ }
71
+ }
72
+ export async function authorizeBasic(req, _res, next) {
73
+ try {
74
+ const authorization = req.headers['authorization'];
75
+ if (!authorization) {
76
+ throw new Error('unauthorized');
77
+ }
78
+ const organization = req.aptly.auth.verifyBasicAuthorization(authorization);
79
+ if (!organization) {
80
+ throw new Error('unauthorized');
81
+ }
82
+ const config = await req.aptly.getConfig(req, organization);
83
+ req.aptly.api.init(config.refresh_token, config.organization);
84
+ return next();
85
+ }
86
+ catch (e) {
87
+ next(e);
88
+ }
89
+ }
90
+ export const authorizeProxy = authorizeBasic;
91
+ export async function authorizeWebhook(req, _res, next) {
92
+ try {
93
+ const organization = String(req.headers[req.aptly.auth.header_organization]);
94
+ const hmac = String(req.headers[req.aptly.auth.header_body_hmac]);
95
+ if (!organization) {
96
+ throw new Error('unauthorized');
97
+ }
98
+ if (!req.aptly.development) {
99
+ req.aptly.auth.verifyHmac(hmac, req.body);
100
+ }
101
+ const config = await req.aptly.getConfig(req, organization);
102
+ req.aptly.api.init(config.refresh_token, config.organization);
103
+ return next();
104
+ }
105
+ catch (e) {
106
+ next(e);
107
+ }
108
+ }
109
+ export async function authorizeRedirect(req, _res, next) {
110
+ try {
111
+ const { hmac, ...query } = req.query;
112
+ const organization = String(query.organization);
113
+ if (!organization) {
114
+ throw new Error('unauthorized');
115
+ }
116
+ req.aptly.auth.verifyHmac(String(hmac), query);
117
+ const config = await req.aptly.getConfig(req, organization);
118
+ req.aptly.api.init(config.refresh_token, config.organization);
119
+ return next();
120
+ }
121
+ catch (e) {
122
+ next(e);
123
+ }
124
+ }
125
+ export async function clearSession(req, res) {
126
+ return new Promise((resolve) => {
127
+ res.clearCookie(req.aptly.tokenCookie.name, req.aptly.tokenCookie.options);
128
+ res.clearCookie(req.aptly.organizationCookie.name, req.aptly.organizationCookie.options);
129
+ res.clearCookie(req.aptly.tokenCookie.name, {
130
+ ...req.aptly.tokenCookie.options,
131
+ domain: undefined,
132
+ });
133
+ res.clearCookie(req.aptly.organizationCookie.name, {
134
+ ...req.aptly.organizationCookie.options,
135
+ domain: undefined,
136
+ });
137
+ req.session.destroy(resolve);
138
+ });
139
+ }
@@ -0,0 +1,8 @@
1
+ import { AppExpressContext } from './types.js';
2
+ declare global {
3
+ namespace Express {
4
+ interface Request {
5
+ aptly: AppExpressContext<any>;
6
+ }
7
+ }
8
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,19 @@
1
+ import './express.js';
2
+ import { IAptlyOAuth2Props } from '@aptly-as/sdk-app/dist/AptlyOAuth2.js';
3
+ import { AptlyAppScope } from '@aptly-as/types';
4
+ import { NextFunction, Request, Response } from 'express';
5
+ import { AppExpressContext, AptlyAppConfig } from './types.js';
6
+ export * from './authorize.js';
7
+ export * from './install.js';
8
+ export * from './types.js';
9
+ export interface AppProps<T extends AptlyAppConfig> extends Pick<AppExpressContext<T>, 'onInstall' | 'getConfig'>, IAptlyOAuth2Props {
10
+ aptlyUrl: string;
11
+ apiUrl: string;
12
+ clientId: string;
13
+ clientSecret: string;
14
+ scope: AptlyAppScope[];
15
+ domain?: string;
16
+ development?: boolean;
17
+ }
18
+ declare function aptlyApp<T extends AptlyAppConfig>(props: AppProps<T>): (req: Request, _res: Response, next: NextFunction) => void;
19
+ export default aptlyApp;
package/dist/index.js ADDED
@@ -0,0 +1,39 @@
1
+ import './express.js';
2
+ import { Aptly, AptlyOAuth2 } from '@aptly-as/sdk-app';
3
+ export * from './authorize.js';
4
+ export * from './install.js';
5
+ export * from './types.js';
6
+ function aptlyApp(props) {
7
+ return (req, _res, next) => {
8
+ req.aptly = {
9
+ development: props.development,
10
+ api: new Aptly(props.aptlyUrl, props.clientId, props.clientSecret),
11
+ auth: new AptlyOAuth2(props.aptlyUrl, props.apiUrl, props.clientId, props.clientSecret, props.scope, {
12
+ installCallbackPath: props.installCallbackPath,
13
+ authorizeCallbackPath: props.authorizeCallbackPath,
14
+ }),
15
+ getConfig: props.getConfig,
16
+ onInstall: props.onInstall,
17
+ redirectCookie: {
18
+ name: `app-${props.clientId}-redirect`,
19
+ options: { sameSite: 'lax', httpOnly: false, domain: props.domain },
20
+ },
21
+ organizationCookie: {
22
+ name: `app-${props.clientId}-organization`,
23
+ options: { sameSite: 'lax', httpOnly: true, domain: props.domain },
24
+ },
25
+ tokenCookie: {
26
+ name: `app-${props.clientId}-token`,
27
+ options: {
28
+ secure: props.apiUrl.startsWith('https'),
29
+ sameSite: 'lax',
30
+ httpOnly: true,
31
+ signed: true,
32
+ domain: props.domain,
33
+ },
34
+ },
35
+ };
36
+ return next();
37
+ };
38
+ }
39
+ export default aptlyApp;
@@ -0,0 +1,4 @@
1
+ import { Response, Request, NextFunction } from 'express';
2
+ export declare function install(req: Request, res: Response, next: NextFunction): void;
3
+ export declare function installCallback(req: Request, res: Response, next: NextFunction): Promise<void>;
4
+ export declare function reinstall(req: Request, res: Response, next: NextFunction): Promise<void>;
@@ -0,0 +1,46 @@
1
+ export function install(req, res, next) {
2
+ try {
3
+ const { redirect_uri } = req.query;
4
+ if (typeof redirect_uri !== 'string') {
5
+ throw new Error('Missing redirect_uri');
6
+ }
7
+ res.redirect(req.aptly.auth.getInstallCallbackRedirect(redirect_uri));
8
+ }
9
+ catch (e) {
10
+ next(e);
11
+ }
12
+ }
13
+ export async function installCallback(req, res, next) {
14
+ try {
15
+ const { code, redirect_uri } = req.aptly.auth.verifyInstallCallback(req.originalUrl, req.query);
16
+ const tokenData = await req.aptly.auth.installAppCode(code);
17
+ await req.aptly.onInstall(req, tokenData);
18
+ const redirect = req.cookies[req.aptly.redirectCookie.name];
19
+ if (redirect) {
20
+ res.clearCookie(req.aptly.redirectCookie.name);
21
+ res.redirect(redirect);
22
+ return;
23
+ }
24
+ res.redirect(redirect_uri);
25
+ }
26
+ catch (e) {
27
+ next(e);
28
+ }
29
+ }
30
+ export async function reinstall(req, res, next) {
31
+ try {
32
+ const { redirect_uri } = req.query;
33
+ const cookieOrganization = req.cookies[req.aptly.organizationCookie.name];
34
+ if (!cookieOrganization) {
35
+ throw new Error('Organization cookie missing');
36
+ }
37
+ if (redirect_uri) {
38
+ res.cookie(req.aptly.redirectCookie.name, redirect_uri, req.aptly.redirectCookie.options);
39
+ }
40
+ const url = req.aptly.auth.getReinstallRedirect(cookieOrganization);
41
+ res.redirect(url);
42
+ }
43
+ catch (e) {
44
+ next(e);
45
+ }
46
+ }
@@ -0,0 +1 @@
1
+ {"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.es2021.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.dom.iterable.d.ts","../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../node_modules/typescript/lib/lib.scripthost.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.date.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2019.intl.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.date.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.es2020.number.d.ts","../node_modules/typescript/lib/lib.es2021.promise.d.ts","../node_modules/typescript/lib/lib.es2021.string.d.ts","../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../node_modules/typescript/lib/lib.es2021.intl.d.ts","../node_modules/typescript/lib/lib.esnext.intl.d.ts","../node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../node_modules/typescript/lib/lib.es2021.full.d.ts","../node_modules/@types/node/assert.d.ts","../node_modules/@types/node/assert/strict.d.ts","../node_modules/undici-types/header.d.ts","../node_modules/undici-types/readable.d.ts","../node_modules/undici-types/file.d.ts","../node_modules/undici-types/fetch.d.ts","../node_modules/undici-types/formdata.d.ts","../node_modules/undici-types/connector.d.ts","../node_modules/undici-types/client.d.ts","../node_modules/undici-types/errors.d.ts","../node_modules/undici-types/dispatcher.d.ts","../node_modules/undici-types/global-dispatcher.d.ts","../node_modules/undici-types/global-origin.d.ts","../node_modules/undici-types/pool-stats.d.ts","../node_modules/undici-types/pool.d.ts","../node_modules/undici-types/handlers.d.ts","../node_modules/undici-types/balanced-pool.d.ts","../node_modules/undici-types/agent.d.ts","../node_modules/undici-types/mock-interceptor.d.ts","../node_modules/undici-types/mock-agent.d.ts","../node_modules/undici-types/mock-client.d.ts","../node_modules/undici-types/mock-pool.d.ts","../node_modules/undici-types/mock-errors.d.ts","../node_modules/undici-types/proxy-agent.d.ts","../node_modules/undici-types/api.d.ts","../node_modules/undici-types/cookies.d.ts","../node_modules/undici-types/patch.d.ts","../node_modules/undici-types/filereader.d.ts","../node_modules/undici-types/diagnostics-channel.d.ts","../node_modules/undici-types/websocket.d.ts","../node_modules/undici-types/content-type.d.ts","../node_modules/undici-types/cache.d.ts","../node_modules/undici-types/interceptors.d.ts","../node_modules/undici-types/index.d.ts","../node_modules/@types/node/globals.d.ts","../node_modules/@types/node/async_hooks.d.ts","../node_modules/@types/node/buffer.d.ts","../node_modules/@types/node/child_process.d.ts","../node_modules/@types/node/cluster.d.ts","../node_modules/@types/node/console.d.ts","../node_modules/@types/node/constants.d.ts","../node_modules/@types/node/crypto.d.ts","../node_modules/@types/node/dgram.d.ts","../node_modules/@types/node/diagnostics_channel.d.ts","../node_modules/@types/node/dns.d.ts","../node_modules/@types/node/dns/promises.d.ts","../node_modules/@types/node/domain.d.ts","../node_modules/@types/node/dom-events.d.ts","../node_modules/@types/node/events.d.ts","../node_modules/@types/node/fs.d.ts","../node_modules/@types/node/fs/promises.d.ts","../node_modules/@types/node/http.d.ts","../node_modules/@types/node/http2.d.ts","../node_modules/@types/node/https.d.ts","../node_modules/@types/node/inspector.d.ts","../node_modules/@types/node/module.d.ts","../node_modules/@types/node/net.d.ts","../node_modules/@types/node/os.d.ts","../node_modules/@types/node/path.d.ts","../node_modules/@types/node/perf_hooks.d.ts","../node_modules/@types/node/process.d.ts","../node_modules/@types/node/punycode.d.ts","../node_modules/@types/node/querystring.d.ts","../node_modules/@types/node/readline.d.ts","../node_modules/@types/node/readline/promises.d.ts","../node_modules/@types/node/repl.d.ts","../node_modules/@types/node/stream.d.ts","../node_modules/@types/node/stream/promises.d.ts","../node_modules/@types/node/stream/consumers.d.ts","../node_modules/@types/node/stream/web.d.ts","../node_modules/@types/node/string_decoder.d.ts","../node_modules/@types/node/test.d.ts","../node_modules/@types/node/timers.d.ts","../node_modules/@types/node/timers/promises.d.ts","../node_modules/@types/node/tls.d.ts","../node_modules/@types/node/trace_events.d.ts","../node_modules/@types/node/tty.d.ts","../node_modules/@types/node/url.d.ts","../node_modules/@types/node/util.d.ts","../node_modules/@types/node/v8.d.ts","../node_modules/@types/node/vm.d.ts","../node_modules/@types/node/wasi.d.ts","../node_modules/@types/node/worker_threads.d.ts","../node_modules/@types/node/zlib.d.ts","../node_modules/@types/node/globals.global.d.ts","../node_modules/@types/node/index.d.ts","../node_modules/@types/send/node_modules/@types/mime/index.d.ts","../node_modules/@types/send/index.d.ts","../node_modules/@types/range-parser/index.d.ts","../node_modules/@types/qs/index.d.ts","../node_modules/@types/express-serve-static-core/index.d.ts","../node_modules/@types/mime/mime.d.ts","../node_modules/@types/mime/index.d.ts","../node_modules/@types/http-errors/index.d.ts","../node_modules/@types/serve-static/index.d.ts","../node_modules/@types/connect/index.d.ts","../node_modules/@types/body-parser/index.d.ts","../node_modules/@types/express/index.d.ts","../../app-sdk/node_modules/@aptly-as/types/core/cloudinary.d.ts","../../app-sdk/node_modules/@aptly-as/types/core/api.d.ts","../../app-sdk/node_modules/@aptly-as/types/core/scope.d.ts","../../app-sdk/node_modules/@aptly-as/types/models/algorithm.d.ts","../../app-sdk/node_modules/@aptly-as/types/models/user.d.ts","../../app-sdk/node_modules/@aptly-as/types/enums/document.d.ts","../../app-sdk/node_modules/@aptly-as/types/enums/fields.d.ts","../../app-sdk/node_modules/@aptly-as/types/enums/unit-template.d.ts","../../app-sdk/node_modules/@aptly-as/types/enums/webhook.d.ts","../../app-sdk/node_modules/@aptly-as/types/enums/index.d.ts","../../app-sdk/node_modules/@aptly-as/types/models/extends.d.ts","../../app-sdk/node_modules/@aptly-as/types/models/module.d.ts","../../app-sdk/node_modules/@aptly-as/types/models/period.d.ts","../../app-sdk/node_modules/@aptly-as/types/models/producer.d.ts","../../app-sdk/node_modules/@aptly-as/types/models/product.d.ts","../../app-sdk/node_modules/@aptly-as/types/models/document.d.ts","../../app-sdk/node_modules/@aptly-as/types/models/upsell-template.d.ts","../../app-sdk/node_modules/@aptly-as/types/models/unit-template.d.ts","../../app-sdk/node_modules/@aptly-as/types/models/unit.d.ts","../../app-sdk/node_modules/@aptly-as/types/models/project.d.ts","../../app-sdk/node_modules/@aptly-as/types/models/department.d.ts","../../app-sdk/node_modules/@aptly-as/types/models/organization.d.ts","../../app-sdk/node_modules/@aptly-as/types/models/media.d.ts","../../app-sdk/node_modules/@aptly-as/types/models/app.d.ts","../../app-sdk/node_modules/@aptly-as/types/models/booking.d.ts","../../app-sdk/node_modules/@aptly-as/types/models/client.d.ts","../../app-sdk/node_modules/@aptly-as/types/models/inquiry.d.ts","../../app-sdk/node_modules/@aptly-as/types/models/note.d.ts","../../app-sdk/node_modules/@aptly-as/types/models/notification-trigger.d.ts","../../app-sdk/node_modules/@aptly-as/types/models/option-label.d.ts","../../app-sdk/node_modules/@aptly-as/types/models/order.d.ts","../../app-sdk/node_modules/@aptly-as/types/models/page.d.ts","../../app-sdk/node_modules/@aptly-as/types/models/product-stats.d.ts","../../app-sdk/node_modules/@aptly-as/types/models/queue-download.d.ts","../../app-sdk/node_modules/@aptly-as/types/models/recommendation.d.ts","../../app-sdk/node_modules/@aptly-as/types/models/supplier.d.ts","../../app-sdk/node_modules/@aptly-as/types/models/tag.d.ts","../../app-sdk/node_modules/@aptly-as/types/models/unit-email.d.ts","../../app-sdk/node_modules/@aptly-as/types/models/webhook.d.ts","../../app-sdk/node_modules/@aptly-as/types/models/webhook-event.d.ts","../../app-sdk/node_modules/@aptly-as/types/models/index.d.ts","../../app-sdk/node_modules/@aptly-as/types/core/app.d.ts","../../app-sdk/node_modules/@aptly-as/types/core/error.d.ts","../../app-sdk/node_modules/@aptly-as/types/core/fields.d.ts","../../app-sdk/node_modules/@aptly-as/types/core/signage.d.ts","../../app-sdk/node_modules/@aptly-as/types/core/webhook-event-data.d.ts","../../app-sdk/node_modules/@aptly-as/types/core/index.d.ts","../../app-sdk/node_modules/@aptly-as/types/index.d.ts","../../app-sdk/dist/aptly/aptlyapi.d.ts","../../app-sdk/dist/aptly/aptlyorders.d.ts","../../app-sdk/dist/aptly/aptlyproducts.d.ts","../../app-sdk/dist/aptly/aptlydocuments.d.ts","../../app-sdk/dist/aptly/aptlyunits.d.ts","../../app-sdk/dist/aptly/aptlywebhooks.d.ts","../../app-sdk/dist/aptly/aptlyprojects.d.ts","../../app-sdk/dist/aptly/aptlyorganization.d.ts","../../app-sdk/dist/aptly.d.ts","../../app-sdk/dist/aptlycrypto.d.ts","../../app-sdk/dist/aptlyoauth2.d.ts","../../app-sdk/dist/index.d.ts","../lib/types.ts","../lib/express.ts","../node_modules/@aptly-as/types/index.d.ts","../lib/authorize.ts","../lib/install.ts","../lib/index.ts","../node_modules/@types/cookie-parser/node_modules/@types/express/index.d.ts","../node_modules/@types/cookie-parser/index.d.ts","../node_modules/@types/express-session/node_modules/@types/express/index.d.ts","../node_modules/@types/express-session/index.d.ts","../node_modules/@aptly-as/types/enums/index.d.ts","../node_modules/@aptly-as/types/models/index.d.ts","../node_modules/@aptly-as/types/core/index.d.ts"],"fileInfos":[{"version":"f33e5332b24c3773e930e212cbb8b6867c8ba3ec4492064ea78e55a524d57450","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","26f2f787e82c4222710f3b676b4d83eb5ad0a72fa7b746f03449e7a026ce5073","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569",{"version":"21e41a76098aa7a191028256e52a726baafd45a925ea5cf0222eb430c96c1d83","affectsGlobalScope":true},{"version":"35299ae4a62086698444a5aaee27fc7aa377c68cbb90b441c9ace246ffd05c97","affectsGlobalScope":true},{"version":"80e18897e5884b6723488d4f5652167e7bb5024f946743134ecc4aa4ee731f89","affectsGlobalScope":true},{"version":"cd034f499c6cdca722b60c04b5b1b78e058487a7085a8e0d6fb50809947ee573","affectsGlobalScope":true},{"version":"138fb588d26538783b78d1e3b2c2cc12d55840b97bf5e08bca7f7a174fbe2f17","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"e0275cd0e42990dc3a16f0b7c8bca3efe87f1c8ad404f80c6db1c7c0b828c59f","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"49ed889be54031e1044af0ad2c603d627b8bda8b50c1a68435fe85583901d072","affectsGlobalScope":true},{"version":"e93d098658ce4f0c8a0779e6cab91d0259efb88a318137f686ad76f8410ca270","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"acae90d417bee324b1372813b5a00829d31c7eb670d299cd7f8f9a648ac05688","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"51e547984877a62227042850456de71a5c45e7fe86b7c975c6e68896c86fa23b","affectsGlobalScope":true},{"version":"62a4966981264d1f04c44eb0f4b5bdc3d81c1a54725608861e44755aa24ad6a5","affectsGlobalScope":true},{"version":"13f6e6380c78e15e140243dc4be2fa546c287c6d61f4729bc2dd7cf449605471","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"c1e8d979afc15d66e2bd5a58c732d5a2ba3ccaae41ac7d5a2c539e6de66a8e51","efc7d584a33fe3422847783d228f315c4cd1afe74bd7cf8e3f0e4c1125129fef","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","7180c03fd3cb6e22f911ce9ba0f8a7008b1a6ddbe88ccf16a9c8140ef9ac1686","25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","54cb85a47d760da1c13c00add10d26b5118280d44d58e6908d8e89abbd9d7725","3e4825171442666d31c845aeb47fcd34b62e14041bb353ae2b874285d78482aa","c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","a967bfe3ad4e62243eb604bf956101e4c740f5921277c60debaf325c1320bf88","e9775e97ac4877aebf963a0289c81abe76d1ec9a2a7778dbe637e5151f25c5f3","471e1da5a78350bc55ef8cef24eb3aca6174143c281b8b214ca2beda51f5e04a","cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","db3435f3525cd785bf21ec6769bf8da7e8a776be1a99e2e7efb5f244a2ef5fee","c3b170c45fc031db31f782e612adf7314b167e60439d304b49e704010e7bafe5","40383ebef22b943d503c6ce2cb2e060282936b952a01bea5f9f493d5fb487cc7","4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","3a84b7cb891141824bd00ef8a50b6a44596aded4075da937f180c90e362fe5f6","13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","33203609eba548914dc83ddf6cadbc0bcb6e8ef89f6d648ca0908ae887f9fcc5","0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","9f0a92164925aa37d4a5d9dd3e0134cff8177208dba55fd2310cd74beea40ee2","8bfdb79bf1a9d435ec48d9372dc93291161f152c0865b81fc0b2694aedb4578d","2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","d32275be3546f252e3ad33976caf8c5e842c09cb87d468cb40d5f4cf092d1acc","4a0c3504813a3289f7fb1115db13967c8e004aa8e4f8a9021b95285502221bd1",{"version":"cc5e65fb1729463665074b9d7163e78a4225b7af7f3a6b3c74492f415166612f","affectsGlobalScope":true},"cce1f5f86974c1e916ec4a8cab6eec9aa8e31e8148845bf07fbaa8e1d97b1a2c",{"version":"185282b122cbca820c297a02a57b89cf5967ab43e220e3e174d872d3f9a94d2c","affectsGlobalScope":true},"16d74fe4d8e183344d3beb15d48b123c5980ff32ff0cc8c3b96614ddcdf9b239","7b43160a49cf2c6082da0465876c4a0b164e160b81187caeb0a6ca7a281e85ba",{"version":"41fb2a1c108fbf46609ce5a451b7ec78eb9b5ada95fd5b94643e4b26397de0b3","affectsGlobalScope":true},"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","e8968b394e4365588f8f89cfff86435258cf10062585c1d2224627ab92acda22","285e512c7a0db217a0599e18c462d565fa35be4a5153dd7b80bee88c83e83ddf","b5b719a47968cd61a6f83f437236bb6fe22a39223b6620da81ef89f5d7a78fb7","8806ae97308ef26363bd7ec8071bca4d07fb575f905ee3d8a91aff226df6d618","af5bf1db6f1804fb0069039ae77a05d60133c77a2158d9635ea27b6bb2828a8f","b7fe70be794e13d1b7940e318b8770cd1fb3eced7707805318a2e3aaac2c3e9e",{"version":"2c71199d1fc83bf17636ad5bf63a945633406b7b94887612bba4ef027c662b3e","affectsGlobalScope":true},{"version":"7ae9dc7dbb58cd843065639707815df85c044babaa0947116f97bdb824d07204","affectsGlobalScope":true},"7aae1df2053572c2cfc2089a77847aadbb38eedbaa837a846c6a49fb37c6e5bd","313a0b063f5188037db113509de1b934a0e286f14e9479af24fada241435e707","1f758340b027b18ae8773ac3d33a60648a2af49eaae9e4fde18d0a0dd608642c","87ef1a23caa071b07157c72077fa42b86d30568f9dc9e31eed24d5d14fc30ba8","396a8939b5e177542bdf9b5262b4eee85d29851b2d57681fa9d7eae30e225830","21773f5ac69ddf5a05636ba1f50b5239f4f2d27e4420db147fc2f76a5ae598ac",{"version":"dea4c00820d4fac5e530d4842aed2fb20d6744d75a674b95502cbd433f88bcb0","affectsGlobalScope":true},"a5fe4cc622c3bf8e09ababde5f4096ceac53163eefcd95e9cd53f062ff9bb67a","45b1053e691c5af9bfe85060a3e1542835f8d84a7e6e2e77ca305251eda0cb3c","0f05c06ff6196958d76b865ae17245b52d8fe01773626ac3c43214a2458ea7b7",{"version":"0d832a0650a74aafc276cb3f7bb26bde2e2270a6f87e6c871a64122e9203079b","affectsGlobalScope":true},{"version":"c6f3869f12bb5c3bb8ecd0b050ea20342b89b944eae18d313cde6b0ccc0925d7","affectsGlobalScope":true},"8abd0566d2854c4bd1c5e48e05df5c74927187f1541e6770001d9637ac41542e","d742ed2db6d5425b3b6ac5fb1f2e4b1ed2ae74fbeee8d0030d852121a4b05d2f","d8dba11dc34d50cb4202de5effa9a1b296d7a2f4a029eec871f894bddfb6430d","8b71dd18e7e63b6f991b511a201fad7c3bf8d1e0dd98acb5e3d844f335a73634","01d8e1419c84affad359cc240b2b551fb9812b450b4d3d456b64cda8102d4f60","8221b00f271cf7f535a8eeec03b0f80f0929c7a16116e2d2df089b41066de69b","269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","f8c87b19eae111f8720b0345ab301af8d81add39621b63614dfc2d15fd6f140a","831c22d257717bf2cbb03afe9c4bcffc5ccb8a2074344d4238bf16d3a857bb12",{"version":"2225100373ca3d63bcc7f206e1177152d2e2161285a0bd83c8374db1503a0d1f","affectsGlobalScope":true},{"version":"7052b7b0c3829df3b4985bab2fd74531074b4835d5a7b263b75c82f0916ad62f","affectsGlobalScope":true},"aa34c3aa493d1c699601027c441b9664547c3024f9dbab1639df7701d63d18fa","eefcdf86cefff36e5d87de36a3638ab5f7d16c2b68932be4a72c14bb924e43c1","7c651f8dce91a927ab62925e73f190763574c46098f2b11fb8ddc1b147a6709a","7440ab60f4cb031812940cc38166b8bb6fbf2540cfe599f87c41c08011f0c1df",{"version":"4d0405568cf6e0ff36a4861c4a77e641366feaefa751600b0a4d12a5e8f730a8","affectsGlobalScope":true},{"version":"f5b5dc128973498b75f52b1b8c2d5f8629869104899733ae485100c2309b4c12","affectsGlobalScope":true},"e393915d3dc385e69c0e2390739c87b2d296a610662eb0b1cb85224e55992250","79bad8541d5779c85e82a9fb119c1fe06af77a71cc40f869d62ad379473d4b75","4a34b074b11c3597fb2ff890bc8f1484375b3b80793ab01f974534808d5777c7",{"version":"629d20681ca284d9e38c0a019f647108f5fe02f9c59ac164d56f5694fc3faf4d","affectsGlobalScope":true},"e7dbf5716d76846c7522e910896c5747b6df1abd538fee8f5291bdc843461795",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"b510d0a18e3db42ac9765d26711083ec1e8b4e21caaca6dc4d25ae6e8623f447","84e3bbd6f80983d468260fdbfeeb431cc81f7ea98d284d836e4d168e36875e86","aad5ffa61406b8e19524738fcf0e6fda8b3485bba98626268fdf252d1b2b630a","16d51f964ec125ad2024cf03f0af444b3bc3ec3614d9345cc54d09bab45c9a4c","c7da551241b7be719b7bd654ab12a5098c3206fbb189076dd2d8871011a6ab5a",{"version":"4aed81e1115540695f896fa93fb22840fe06086741e94c6859e745f173498213","affectsGlobalScope":true},"5b9ecf7da4d71cf3832dbb8336150fa924631811f488ad4690c2dfec2b4fb1d7","951c85f75aac041dddbedfedf565886a7b494e29ec1532e2a9b4a6180560b50e","f463d61cf39c3a6a5f96cdf7adfdb72a0b1d663f7b5d5b6dd042adba835430c2","f7a9cb83c8fbc081a8b605880d191e0d0527cde2c1b2b2b623beca8f0203a2cd","82819f9ecc249a6a3e284003540d02ea1b1f56f410c23231797b9e1e4b9622df","afc559c1b93df37c25aef6b3dfa2d64325b0e112e887ee18bf7e6f4ec383fc90","5c45abf1e13e4463eacfd5dedda06855da8748a6a6cb3334f582b52e219acc04","b0bb71a3d20d9cf7ed468b1c82f67466303fa2c255d96f8348c349d88ba8fea4","f465ab9fab645e688c79dc196fba29f3ef6f7622a95aa339cc753503b1d582ea","1a959c7799af8ac4a4f8bfc4569c779cfc4148f19464fdd35bb0d6cc75238db8","63e82cd7b94de5803c3d071f9f00112f360e61f398239e39b0d5369f2bfa4843","e40154be36b473f539578ec12c18a48e546e3c3586113b35e991e6f83da3d432","7a7a16bdc4549dc08a527be653474551d710f3f644fa3945c4a42ef119e7afc3","e46b721e1c9bdca3e4ee968d5d25a5607bb0a593cfd9287273390b1384234f34","e4cfada5e64c26d8c79e4e3af3c0f2b1d093e612242c87817d17617657db1255","5ed96fd8c1f7a5575d6a29fdf9b98d8fa5fd74a4e5421e224667659a73f21c16","cfca2e41b7a29876c44db187b628836d34e8815b1bcaf16c9583d71d0caf00bd","d6ac3836a5d31d15a4f23f2831c6a5429111401f7467f04b8ee6970c249dc985","d51e527261f837d1fd8d6d5ce891ed36b17df124edb506cf2e2065db2851eac6","1cc57d7e804fef36bb3bf9ec4bba77b4ed79ac9a4666d294f9a9b2a7897b64e9","de97564e4d41d9b288e9c536fdd58098695b131bdd405305baf389bfb7e351a7","4829f82f3e4f9d61ce97a5f74daada91cf8099b916901c0a35afcffd615b6a06","1a478cf4ac56745dc9031e9b110b66afc7fd22142a4b1f18c6a9bfa25766889c","ba775a6c9fb1112cc0778fc3461afb4e3ad92e86ee670f5c02cc14b633f0a533","f1d3ef4e07092d9991a97e19f600060082e733aeeb282e86233ef82abe7e5494","02acc8894e7c2d5715f6d5e14fad014eb9585e30c87a3721c272120432c12ddb","afff0bf9ebe5bf2de7c3e8a9a24611aa158365550f792d9428f83f012a6cc644","c7b2b654a06f038910721b5d62993c42a7270f92917d17e1438bc7f5bac75828","9502a424272b56c0833c3708e0801fc05fbd5bc89769131cd4cd177c12a58c2a","80da8a5f8975be217b15964b62bd0da8eb395fe7ba694e75de3064ff7b53b01a","58de8c90bc45745e23e3079a0c622b49273a3ac4ffdf555ec2541dc32fcb63ba","468c0f216f0119eb34931ec452ce8ce9041bab740f682cd861e87b01aacd4826","e3971fea99f474930fc8b5da37a4ee8fa54b1dcbae1d1fc433c6b089978981e7","bcdceeb4636a4a82786035f951e8082e9e8a3d8a67e5f42cbcd8eb395337f8f1","978c21222dd5cdac5bc257a5b12f642076e81969cf1f11d5588f770cc47eb80b","e56ff2540059202c3ffb36f0e8aa89e2b95eef560f2a5211d357d0c26b00d2fd","46c9f7aaff27d60c90537de267361d66fbbf7a6efa4125d03c2df6d9a2972694","74745fb27d93d49a632e7e2a7258f446284a096db61ac400c975e0ff5df4df89","5f0ed1ad3e5bf0a76a5757cb6f19b4b7c5ef40ab691e6943311146db54f2b82b","37b0358de1f55b663ccf678f5ed17c6f2b9ae664c55b9766d236bcbb64723d9a","763f634da2ccc22371754b600905a1b1761d9f2673f3ea33b9fe87805f7f2e87","4951ca9676b5a748fc75b98a9ecf65be4d1ab23856a3e20ef590b9f1860a5c8f","a0b7a6c8237234a38ce79e50dcc57e0192b5c33ed9f7400a784d0df3b0e97961","81dd9af368ada076cdd37f920b4c996c36e26a72379a0ba495f0c56bfca288c8","75a93294f600caca022168b4a5c27e85bee308f9c0a973798d33ed3b2e8e485f","5663fb2df6fc71ff880e4e0a05175e7912da74a7dfe863f6a719c017f572d503","3a7d5cff37cc3435aaccb2687bf46e497649331123c3fafc4e28959cd170c4ea","0be280dd0a0f44f3981bf1928b0a223b9a87fdb1644164e6869f57c30c7aa4e8","62b7b170c860954b78e87a15956f7bac27b9c47b7595948d7f582e0c6dc1cd6a","dff913c30a681a89133d97b8905e47c039190ffc18c48aa09ea35c77f6b0af85","0bc431cd9abcf128c89a160a976acc1c02ad2f6d0c668788ce882952541d221a","f54e455dc603c7302fc55b59cb32269ea16772da5a3cdc3c961e9fd4f290dea4","df521698a5b4837d425ffce89623cae6c195808b64048d19d457c2644012915e","c2f178c0c9f3a4c7de2dfd75caea3f3edb4e6eddc9be601f2a9485161f0db02d","d9ef8b44d7de2fa50abdfa88469a9a528f6fc7cf1a2e9bed194a78f580bb9a81","dcbe41044d75a362818780d0663772115fd6eb298f21b4225cce395b772256d3","1b2a4846aa0245f581dde82341fffd2edaf9bff9c1cd39b1289bad246a375907","2941b45f9b1fc5c63a47baca8cb234b7b212dd01e1159d63ae3fea3807ebf77b","b7361941b50b61fffe572a6c8e9bc3e7995dba979aac919ea3af98d4f2b886c3","9a2cca0fa7c6ffff4cb0ef6233332e649b1da67c65dda939fc853bd8b54722c8","90f268d76e68e7593897bbfed03134c222d8f5d4b6bb74e4c81ae3023295577b","869d8cfcbcde9f8567acee89b45af025dc7df079612101be7222e578a4253c33","91a532edb3016afbfcc2626879df1953f76d06f44f2b3064a091183d00d41552","cd2fecc78e5830d107c767a14c1d2b648e001c258cde18341e9de5fcf82b0ecd","13ca75eccecee108e519b3e93244479e63569cd542db88f429202df035cf6ecc","c05258ee3bf1681f6ce13211943ff8a84d9344a499a5a3123fe9ae51a5a8c909","d8f115834481b8ad73591ebf2e4d84bd3cf816c596af38d302bcf541e57f9fad",{"version":"3284fb3af07d8b27af42ae41c9df37a566f9cb106891988246c358d369db342f","signature":"52baae5cba489d1955d03ac1d21ce8f62595f6e80849ccb959274766c9691512"},{"version":"7ee518e1cd60c4ddabaf72a470bc1570e7ffb880acb331c495a7ce3cfc64838a","signature":"61dd6db5833744d53ed66c20d95f105c679bb7137f356a159d6425ec54b07b02","affectsGlobalScope":true},"d9ef8b44d7de2fa50abdfa88469a9a528f6fc7cf1a2e9bed194a78f580bb9a81",{"version":"f1cb44cd4484b33e8dbb7b949972e36676146b363b98542f1e54f76d1752ea46","signature":"9d79be4345a89c38624190babee87e3b5d5fa9d2763568536819fcf55fb027a5"},{"version":"93913531a97ea319170590b1e7508cbe96bda90fdb47176bc00d57f18603fa0c","signature":"2b4c16172cc69596416ba44ee390086962f9cd96a5da303c1c5e359a751c2318"},{"version":"e1a991fe751b5b77a326f37ade818ec7af5d57e21f14ad3953128f9ae149b1da","signature":"b770dd2889f14659f20b850c0b17007064879039c44897c5714a7967fea88ee2"},"43cdd474c5aa3340da4816bb8f1ae7f3b1bcf9e70d997afc36a0f2c432378c84",{"version":"b18e2dc9504b5a27cb7111ffc85d52e99de0801188c0ff60fc5e2a84661d436f","affectsGlobalScope":true},"43cdd474c5aa3340da4816bb8f1ae7f3b1bcf9e70d997afc36a0f2c432378c84",{"version":"8200cabc648e2ee21985e61598dc74cc653abdef7f64c9da7a7017fe08047dff","affectsGlobalScope":true}],"root":[213,214,[216,218]],"options":{"declaration":true,"declarationMap":false,"esModuleInterop":true,"jsx":2,"module":99,"noImplicitAny":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","removeComments":true,"skipLibCheck":true,"sourceMap":false,"strict":true,"target":8},"fileIdsList":[[152],[152,213],[152,200,211,212,213,214,216,217],[152,212],[162,193,199],[106,140,150],[106,140],[219],[144,145,149,151],[103,106,140,142,143,144],[103,219],[146],[147],[55],[90],[91,96,124],[92,103,104,111,121,132],[92,93,103,111],[94,133],[95,96,104,112],[96,121,129],[97,99,103,111],[98],[99,100],[103],[101,103],[90,103],[103,104,105,121,132],[103,104,105,118,121,124],[88,91,137],[99,103,106,111,121,132],[103,104,106,107,111,121,129,132],[106,108,121,129,132],[55,56,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],[103,109],[110,132,137],[99,103,111,121],[112],[113],[90,114],[115,131,137],[116],[117],[103,118,119],[118,120,133,135],[91,103,121,122,123,124],[91,121,123],[121,122],[124],[125],[90,121],[103,127,128],[127,128],[96,111,121,129],[130],[111,131],[91,106,117,132],[96,133],[121,134],[110,135],[136],[91,96,103,105,114,121,132,135,137],[121,138],[104,121,140,141],[106,140,147,148],[65,69,132],[65,121,132],[60],[62,65,129,132],[111,129],[140],[60,140],[62,65,111,132],[57,58,61,64,91,103,121,132],[57,63],[61,65,91,124,132,140],[91,140],[81,91,140],[59,60,140],[65],[59,60,61,62,63,64,65,66,67,69,70,71,72,73,74,75,76,77,78,79,80,82,83,84,85,86,87],[65,72,73],[63,65,73,74],[64],[57,60,65],[65,69,73,74],[69],[63,65,68,132],[57,62,63,65,69,72],[91,121],[60,65,81,91,137,140],[201,203,208],[140,200],[200,201],[201,202,203,204,205,206,207],[200,201,202,203,204,205,206],[200,201,202,204],[200],[132,140,200,201,210],[209,211],[155,193],[162],[153,154,155,194,195,196,197,198],[193],[158,159,160,161],[162,163,175,199],[171,172,174],[163,199],[157,163,171,172,174,199],[162,163,167],[157,162],[156,157,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192],[157,162,163,171,172,174,199],[163,174],[199],[157,163,171,172,174],[163],[157,162,163,171,172,174],[156,157,163,164,166,173,175,176,199],[162,163],[163,175],[163,166,175],[156,157,163,165,168,171,174,175,199],[162,163,168,175],[163,171,172,174,177,179],[156,162,163,165,166,167,169,175],[157,162,163,166,167,170,172,174],[213],[152,200,211,213,214,216,217],[223,224,225]],"referencedMap":[[216,1],[214,2],[218,3],[217,1],[213,4],[215,5],[151,6],[150,7],[220,8],[219,9],[145,10],[222,11],[221,9],[152,9],[147,12],[146,13],[55,14],[56,14],[90,15],[91,16],[92,17],[93,18],[94,19],[95,20],[96,21],[97,22],[98,23],[99,24],[100,24],[102,25],[101,26],[103,27],[104,28],[105,29],[89,30],[106,31],[107,32],[108,33],[140,34],[109,35],[110,36],[111,37],[112,38],[113,39],[114,40],[115,41],[116,42],[117,43],[118,44],[119,44],[120,45],[121,46],[123,47],[122,48],[124,49],[125,50],[126,51],[127,52],[128,53],[129,54],[130,55],[131,56],[132,57],[133,58],[134,59],[135,60],[136,61],[137,62],[138,63],[142,64],[149,65],[72,66],[79,67],[71,66],[86,68],[63,69],[62,70],[85,71],[80,72],[83,73],[65,74],[64,75],[60,76],[59,77],[82,78],[61,79],[66,80],[70,80],[88,81],[87,80],[74,82],[75,83],[77,84],[73,85],[76,86],[81,71],[68,87],[69,88],[78,89],[58,90],[84,91],[209,92],[201,93],[204,94],[202,94],[208,95],[203,94],[207,96],[205,97],[206,94],[210,98],[211,99],[212,100],[194,101],[195,102],[196,102],[199,103],[197,102],[198,104],[162,105],[200,5],[176,106],[177,107],[178,108],[173,109],[168,110],[163,111],[193,112],[179,113],[175,114],[164,115],[180,116],[182,117],[183,118],[174,119],[184,120],[166,121],[185,117],[167,122],[172,123],[186,124],[187,121],[188,121],[189,117],[190,125],[170,126],[171,127],[169,117],[157,108],[192,120],[191,120]],"exportedModulesMap":[[216,1],[214,128],[218,129],[217,1],[213,4],[215,130],[151,6],[150,7],[220,8],[219,9],[145,10],[222,11],[221,9],[152,9],[147,12],[146,13],[55,14],[56,14],[90,15],[91,16],[92,17],[93,18],[94,19],[95,20],[96,21],[97,22],[98,23],[99,24],[100,24],[102,25],[101,26],[103,27],[104,28],[105,29],[89,30],[106,31],[107,32],[108,33],[140,34],[109,35],[110,36],[111,37],[112,38],[113,39],[114,40],[115,41],[116,42],[117,43],[118,44],[119,44],[120,45],[121,46],[123,47],[122,48],[124,49],[125,50],[126,51],[127,52],[128,53],[129,54],[130,55],[131,56],[132,57],[133,58],[134,59],[135,60],[136,61],[137,62],[138,63],[142,64],[149,65],[72,66],[79,67],[71,66],[86,68],[63,69],[62,70],[85,71],[80,72],[83,73],[65,74],[64,75],[60,76],[59,77],[82,78],[61,79],[66,80],[70,80],[88,81],[87,80],[74,82],[75,83],[77,84],[73,85],[76,86],[81,71],[68,87],[69,88],[78,89],[58,90],[84,91],[209,92],[201,93],[204,94],[202,94],[208,95],[203,94],[207,96],[205,97],[206,94],[210,98],[211,99],[212,100],[194,101],[195,102],[196,102],[199,103],[197,102],[198,104],[162,105],[200,5],[176,106],[177,107],[178,108],[173,109],[168,110],[163,111],[193,112],[179,113],[175,114],[164,115],[180,116],[182,117],[183,118],[174,119],[184,120],[166,121],[185,117],[167,122],[172,123],[186,124],[187,121],[188,121],[189,117],[190,125],[170,126],[171,127],[169,117],[157,108],[192,120],[191,120]],"semanticDiagnosticsPerFile":[216,214,218,217,213,215,151,150,220,219,145,222,221,152,148,147,146,55,56,90,91,92,93,94,95,96,97,98,99,100,102,101,103,104,105,89,139,106,107,108,140,109,110,111,112,113,114,115,116,117,118,119,120,121,123,122,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,144,143,142,141,149,52,53,9,10,14,13,2,15,16,17,18,19,20,21,22,3,4,23,27,24,25,26,28,29,30,5,31,32,33,34,6,38,35,36,37,39,7,40,45,46,41,42,43,44,8,54,50,47,48,49,1,51,12,11,72,79,71,86,63,62,85,80,83,65,64,60,59,82,61,66,67,70,57,88,87,74,75,77,73,76,81,68,69,78,58,84,209,201,204,202,208,203,207,205,206,210,211,212,154,194,153,195,196,199,155,197,198,158,159,162,160,161,200,156,176,177,178,173,168,163,193,179,175,164,180,181,182,183,174,184,165,166,185,167,172,186,187,188,189,190,170,171,169,157,192,191]},"version":"5.3.3"}
@@ -0,0 +1,20 @@
1
+ import { Request } from 'express';
2
+ import { Aptly, AptlyApiOAuth2Response, AptlyOAuth2 } from '@aptly-as/sdk-app';
3
+ export interface AptlyAppConfig {
4
+ organization: string;
5
+ refresh_token: string;
6
+ }
7
+ export interface AppCookie {
8
+ name: string;
9
+ options: any;
10
+ }
11
+ export interface AppExpressContext<T extends AptlyAppConfig> {
12
+ api: Aptly;
13
+ auth: AptlyOAuth2;
14
+ organizationCookie: AppCookie;
15
+ tokenCookie: AppCookie;
16
+ redirectCookie: AppCookie;
17
+ onInstall: (req: Request, code: AptlyApiOAuth2Response) => Promise<void>;
18
+ getConfig: (req: Request, organization: string) => Promise<T>;
19
+ development?: boolean;
20
+ }
package/dist/types.js ADDED
@@ -0,0 +1 @@
1
+ export {};
package/package.json ADDED
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "@aptly-as/sdk-app-express",
3
+ "version": "1.0.0",
4
+ "description": "Aptly App SDK Express wrapper",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "author": "Emil Andreas Olsen <emil@aptly.as>",
13
+ "license": "ISC",
14
+ "devDependencies": {
15
+ "@aptly-as/sdk-app": "^1.0.0",
16
+ "@aptly-as/types": "^2.6.4",
17
+ "@types/cookie-parser": "^1.4.7",
18
+ "@types/express": "^5.0.0",
19
+ "@types/express-session": "^1.18.0",
20
+ "@types/node": "^22.7.4",
21
+ "cookie-parser": "^1.4.6",
22
+ "express": "^5.0.0",
23
+ "husky": "^9.1.6",
24
+ "lint-staged": "^15.2.10",
25
+ "prettier": "^3.3.3",
26
+ "typescript": "^5.6.2"
27
+ },
28
+ "peerDependencies": {
29
+ "@aptly-as/sdk-app": "*",
30
+ "@aptly-as/types": "*",
31
+ "cookie-parser": "*",
32
+ "express": "*"
33
+ },
34
+ "lint-staged": {
35
+ "**/*": "prettier --write --ignore-unknown"
36
+ },
37
+ "scripts": {
38
+ "dev": "tsc --incremental --watch",
39
+ "start": "tsc --incremental --watch",
40
+ "build": "tsc",
41
+ "test": "vitest",
42
+ "test:ui": "vitest --ui",
43
+ "test:run": "vitest run",
44
+ "prepublish": "pnpm run build",
45
+ "postversion": "git push && git push --tags"
46
+ }
47
+ }