@aptly-as/sdk-app-express 1.0.0 → 1.0.1

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/authorize.js CHANGED
@@ -23,6 +23,7 @@ export async function authorize(req, res, next) {
23
23
  const config = await req.aptly.getConfig(req, data.organization);
24
24
  req.aptly.api.init(req.session.refresh_token, config.organization);
25
25
  req.aptly.api.accessToken = token;
26
+ req.aptly.token = data;
26
27
  res.cookie(req.aptly.organizationCookie.name, data.organization, req.aptly.organizationCookie.options);
27
28
  }
28
29
  catch (e) {
package/dist/express.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { AppExpressContext } from './types.js';
1
+ import type { AppExpressContext } from './types.js';
2
2
  declare global {
3
3
  namespace Express {
4
4
  interface Request {
package/dist/types.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { AptlyAppAuthorizeToken } from '@aptly-as/types';
1
2
  import { Request } from 'express';
2
3
  import { Aptly, AptlyApiOAuth2Response, AptlyOAuth2 } from '@aptly-as/sdk-app';
3
4
  export interface AptlyAppConfig {
@@ -12,6 +13,7 @@ export interface AppExpressContext<T extends AptlyAppConfig> {
12
13
  api: Aptly;
13
14
  auth: AptlyOAuth2;
14
15
  organizationCookie: AppCookie;
16
+ token?: AptlyAppAuthorizeToken;
15
17
  tokenCookie: AppCookie;
16
18
  redirectCookie: AppCookie;
17
19
  onInstall: (req: Request, code: AptlyApiOAuth2Response) => Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aptly-as/sdk-app-express",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Aptly App SDK Express wrapper",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",