nitro-web 0.0.91 → 0.0.93

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/.editorconfig ADDED
@@ -0,0 +1,9 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ indent_style = space
6
+ indent_size = 2
7
+ end_of_line = lf
8
+ insert_final_newline = true
9
+ trim_trailing_whitespace = true
package/.eslintrc.json CHANGED
@@ -61,6 +61,17 @@
61
61
  "react/react-in-jsx-scope": "off",
62
62
  "semi": ["error", "never"]
63
63
  },
64
+ "overrides": [
65
+ {
66
+ "files": ["types/**/*.d.ts"],
67
+ "rules": {
68
+ "semi": "off",
69
+ "quotes": "off",
70
+ "@typescript-eslint/no-explicit-any": "off",
71
+ "comma-dangle": "off"
72
+ }
73
+ }
74
+ ],
64
75
  "settings": {
65
76
  "react": {
66
77
  "version": "18"
package/client/globals.ts CHANGED
@@ -1,16 +1,12 @@
1
- import { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState, Dispatch, SetStateAction } from 'react'
1
+ import { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react'
2
2
  import { Link, useLocation, useNavigate, useParams } from 'react-router-dom'
3
3
  import { onChange } from 'nitro-web'
4
- import { Store } from 'nitro-web/types'
5
4
 
6
5
  declare global {
7
- // useTracked global (normally defined in ./client/index.ts)
8
- const useTracked: () => [Store, Dispatch<SetStateAction<Store>>]
9
-
10
- // nitro-web global
6
+ // Common application globals
11
7
  const onChange: typeof import('nitro-web').onChange
12
-
13
- // common daependency globals
8
+
9
+ // Common aependency globals
14
10
  /** The public API for rendering a history-aware `<a>`. */
15
11
  const Link: typeof import('react-router-dom').Link
16
12
  const useCallback: typeof import('react').useCallback
@@ -25,9 +21,9 @@ declare global {
25
21
  }
26
22
 
27
23
  Object.assign(window, {
28
- // nitro-web global
24
+ // application globals
29
25
  onChange: onChange,
30
- // common dependency globals
26
+ // dependency globals
31
27
  Link: Link,
32
28
  useCallback: useCallback,
33
29
  useEffect: useEffect,
package/client/index.ts CHANGED
@@ -1,3 +1,6 @@
1
+ // Required Global Types
2
+ import '../types/required-globals.d.ts'
3
+
1
4
  // export const pi = parseFloat(3.142)
2
5
  // Utility functions
3
6
  export * from '../util.js'
package/package.json CHANGED
@@ -1,41 +1,34 @@
1
1
  {
2
2
  "name": "nitro-web",
3
- "version": "0.0.91",
3
+ "version": "0.0.93",
4
4
  "repository": "github:boycce/nitro-web",
5
5
  "homepage": "https://boycce.github.io/nitro-web/",
6
6
  "description": "Nitro is a battle-tested, modular base project to turbocharge your projects, styled using Tailwind 🚀",
7
- "type": "module",
8
7
  "main": "./client/index.ts",
9
- "types": "./types/globals.d.ts",
8
+ "type": "module",
10
9
  "exports": {
11
10
  ".": "./client/index.ts",
12
- "./.eslintrc.json": "./.eslintrc.json",
13
11
  "./client/imgs/*": "./client/imgs/*",
14
12
  "./client/globals": "./client/globals.ts",
15
- "./server": "./server/index.js",
13
+ "./server": {
14
+ "require": "./server/index.js",
15
+ "import": "./server/index.js",
16
+ "types": "./types/server/index.d.ts"
17
+ },
16
18
  "./types": "./types.ts",
19
+ "./.eslintrc.json": "./.eslintrc.json",
20
+ "./tsconfig.json": "./tsconfig.json",
17
21
  "./util": {
18
22
  "require": "./util.js",
19
23
  "import": "./util.js",
20
24
  "types": "./types/util.d.ts"
21
- },
22
- "./webpack.config.js": "./webpack.config.js"
25
+ }
23
26
  },
24
- "files": [
25
- ".eslintrc.json",
26
- "client",
27
- "components",
28
- "server",
29
- "types",
30
- "types.ts",
31
- "util.js",
32
- "webpack.config.js"
33
- ],
34
27
  "scripts": {
35
28
  "major": "npm run types && standard-version -a --release-as major && npm publish && cd ../webpack && npm publish",
36
29
  "minor": "npm run types && standard-version -a --release-as minor && npm publish && cd ../webpack && npm publish",
37
30
  "patch": "npm run types && standard-version -a --release-as patch && npm publish && cd ../webpack && npm publish",
38
- "types": "tsc util.js --declaration --declarationMap --allowJs --emitDeclarationOnly --jsx react-jsx --esModuleInterop --skipLibCheck --outDir types"
31
+ "types": "tsc util.js ./server/index.js --declaration --declarationMap --allowJs --emitDeclarationOnly --jsx react-jsx --esModuleInterop --skipLibCheck --outDir types && cd ../webpack && npm run types -w . && cd ../core"
39
32
  },
40
33
  "dependencies": {
41
34
  "@hokify/axios": "^0.19.1",
@@ -0,0 +1,13 @@
1
+ const versionRegex = /"(@nitro-web\/webpack|nitro-web)"\s*:\s*"([~^*><= -]*)([0-9.]+)"/
2
+
3
+ module.exports.readVersion = function (contents) {
4
+ // This is just for showing the version in the console
5
+ const version = contents.match(versionRegex)?.[3]
6
+ return version
7
+ }
8
+
9
+ module.exports.writeVersion = function (contents, newVersion) {
10
+ return contents.replaceAll(new RegExp(versionRegex, 'g'), (match, packageName, prefix) => {
11
+ return `"${packageName}": "${prefix}${newVersion}"`
12
+ })
13
+ }
@@ -13,33 +13,47 @@ let templates = {}
13
13
  let nodemailerMailgun = undefined
14
14
  const _dirname = dirname(fileURLToPath(import.meta.url)) + '/'
15
15
 
16
- export async function sendEmail({ template, to, bcc, data, from, replyTo, recipientVariables, subject, test, skipCssInline, config }) {
17
- /**
18
- * Email recipient a predefined template with data and/or recipientVariables
19
- *
20
- * @param {string} template = e.g. 'reset-password' or html
21
- * @param {string} to - e.g. "Bruce Wayne<bruce@wayneenterprises.com>, ..."
22
- * @param {object} config - e.g. { mailgunKey, mailgunDomain, emailFrom, clientUrl, name }
23
- * @param {string} <bcc> - e.g. "Chuck Norris<chuck@gmail.com>" (not sent in development)
24
- * @param {object} <data> - recipientVariables[to] shorthand, data is copied to all recipients
25
- * @param {string} <from> - e.g. "Chuck Norris<chuck@gmail.com>"
26
- * @param {string} <replyTo> - e.g. "Chuck Norris<chuck@gmail.com>"
27
- * @param {object} <recipientVariables> - mailgun recipient-variables for batch sending
28
- * @param {string} <subject> - subject, this can also be defined in the template
29
- * @param {boolean} <skipCssInline> - skip inlining css
30
- * @param {boolean} <test> - subject, this can also be defined in the template
31
- * @return Promise([mailgunErr, mailgunInfo])
32
- */
16
+ /**
17
+ * Sends an email using a predefined template, with optional data/or recipientVariables
18
+ * @typedef {{ clientUrl?: string, emailFrom?: string, mailgunDomain?: string, mailgunKey?: string, name?: string }} Config
19
+ *
20
+ * @param {object} opts
21
+ * @param {string} opts.template - Template name or raw HTML, e.g., 'reset-password'
22
+ * @param {string} opts.to - Recipient(s), e.g. "Bruce<bruce@wayneenterprises.com>,..."
23
+ * @param {Config} opts.config - Config object
24
+ * @param {string} [opts.bcc] - BCC, e.g. "Bruce<bruce@wayneenterprises.com>" (not sent in development)
25
+ * @param {object} [opts.data] - template data shared across recipients
26
+ * @param {string} [opts.from] - sender address, e.g. "Bruce<bruce@wayneenterprises.com>"
27
+ * @param {string} [opts.replyTo] - reply-to address, e.g. "Bruce<bruce@wayneenterprises.com>"
28
+ * @param {object} [opts.recipientVariables] - Mailgun recipient-variables for batch sending
29
+ * @param {string} [opts.subject] - subject (can also be defined in template)
30
+ * @param {boolean} [opts.skipCssInline] - skip CSS inlining
31
+ * @param {boolean} [opts.test] - enable test mode
32
+ * @returns {Promise<[any, any]>} Resolves with [mailgunErr, mailgunInfo]
33
+ */
34
+ export async function sendEmail({
35
+ template,
36
+ to,
37
+ config,
38
+ bcc,
39
+ data,
40
+ from,
41
+ replyTo,
42
+ recipientVariables,
43
+ subject,
44
+ skipCssInline,
45
+ test,
46
+ }) {
33
47
  if (!config) {
34
48
  throw new Error('sendEmail: `config` missing')
35
- } else if (!config.emailFrom) {
36
- throw new Error('sendEmail: `config.emailFrom` is missing')
37
49
  } else if (!config.clientUrl) {
38
50
  throw new Error('sendEmail: `config.clientUrl` is missing')
39
- } else if (!config.name) {
40
- throw new Error('sendEmail: `config.name` is missing')
51
+ } else if (!config.emailFrom) {
52
+ throw new Error('sendEmail: `config.emailFrom` is missing')
41
53
  } else if (!test && (!config.mailgunKey || !config.mailgunDomain)) {
42
54
  throw new Error('sendEmail: `config.mailgunKey` or `config.mailgunDomain` is missing')
55
+ } else if (!config.name) {
56
+ throw new Error('sendEmail: `config.name` is missing')
43
57
  } else if (!template) {
44
58
  throw new Error('sendEmail: `template` missing')
45
59
  } else if (!to) {
package/server/index.js CHANGED
@@ -21,7 +21,6 @@ export { sendEmail } from './email/index.js'
21
21
  // Export API controllers
22
22
  export * from '../components/auth/auth.api.js'
23
23
  export * from '../components/billing/stripe.api.js'
24
-
25
24
  export { routes as authRoutes } from '../components/auth/auth.api.js'
26
25
  export { routes as stripeRoutes } from '../components/billing/stripe.api.js'
27
26
 
package/tsconfig.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "compilerOptions": {
3
+ "allowJs": true,
4
+ "checkJs": true,
5
+ "allowSyntheticDefaultImports": true,
6
+ "downlevelIteration": true,
7
+ "esModuleInterop": true,
8
+ "forceConsistentCasingInFileNames": true,
9
+ "isolatedModules": true,
10
+ "jsx": "react-jsx",
11
+ "lib": ["es6", "dom", "dom.iterable", "esnext"],
12
+ "module": "esnext",
13
+ "moduleResolution": "bundler",
14
+ "noEmit": false,
15
+ "noFallthroughCasesInSwitch": true,
16
+ "noImplicitAny": true,
17
+ "noImplicitReturns": false,
18
+ "noImplicitThis": true,
19
+ "noStrictGenericChecks": false,
20
+ "outDir": "./dist",
21
+ "paths": {
22
+ "types": ["./types.ts"]
23
+ },
24
+ "resolveJsonModule": true,
25
+ "rootDir": "./",
26
+ "skipLibCheck": true,
27
+ "sourceMap": true,
28
+ "strict": true,
29
+ "target": "es2022"
30
+ },
31
+ "include": [
32
+ "client",
33
+ "components",
34
+ "server/constants.js",
35
+ "types",
36
+ "./types/core-only-globals.d.ts"
37
+ ]
38
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "compilerOptions": {
3
+ "allowJs": true,
4
+ "declaration": true,
5
+ "declarationMap": true,
6
+ "emitDeclarationOnly": true,
7
+ "esModuleInterop": true,
8
+ "jsx": "react-jsx",
9
+ "outDir": "./types",
10
+ "skipLibCheck": true,
11
+ },
12
+ "include": [
13
+ "util.js"
14
+ ]
15
+ }
@@ -0,0 +1,43 @@
1
+ export function findUserFromProvider(query: any, passwordToCheck: any, ...args: any[]): Promise<any>;
2
+ export function getStore(user: any): Promise<{
3
+ user: any;
4
+ }>;
5
+ export function signinAndGetStore(user: any, isDesktop: any, getStore: any): Promise<any>;
6
+ export function userCreate({ business, password, ...userDataProp }: {
7
+ [x: string]: any;
8
+ business: any;
9
+ password: any;
10
+ }): Promise<any>;
11
+ export function tokenCreate(id: any): Promise<any>;
12
+ export function tokenParse(token: any): any;
13
+ export function validatePassword(password: string, password2: any): Promise<void>;
14
+ export const routes: {
15
+ 'get /api/store': (typeof store)[];
16
+ 'get /api/signout': (typeof signout)[];
17
+ 'post /api/signin': (typeof signin)[];
18
+ 'post /api/signup': (typeof signup)[];
19
+ 'post /api/reset-instructions': (typeof resetInstructions)[];
20
+ 'post /api/reset-password': (typeof resetPassword)[];
21
+ 'post /api/invite-instructions': (typeof inviteInstructions)[];
22
+ 'post /api/invite-accept': (typeof resetPassword)[];
23
+ 'delete /api/account/:uid': (typeof remove)[];
24
+ setup: typeof setup;
25
+ findUserFromProvider: typeof findUserFromProvider;
26
+ getStore: typeof getStore;
27
+ signinAndGetStore: typeof signinAndGetStore;
28
+ tokenCreate: typeof tokenCreate;
29
+ tokenParse: typeof tokenParse;
30
+ userCreate: typeof userCreate;
31
+ validatePassword: typeof validatePassword;
32
+ };
33
+ declare function store(req: any, res: any): Promise<void>;
34
+ declare function signout(req: any, res: any): void;
35
+ declare function signin(req: any, res: any): any;
36
+ declare function signup(req: any, res: any): Promise<void>;
37
+ declare function resetInstructions(req: any, res: any): Promise<void>;
38
+ declare function resetPassword(req: any, res: any): Promise<void>;
39
+ declare function inviteInstructions(req: any, res: any): Promise<any>;
40
+ declare function remove(req: any, res: any): Promise<void>;
41
+ declare function setup(middleware: any, _config: any): void;
42
+ export {};
43
+ //# sourceMappingURL=auth.api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.api.d.ts","sourceRoot":"","sources":["../../../components/auth/auth.api.js"],"names":[],"mappings":"AAmQA,qGAyCC;AAED;;GAKC;AAED,0FAOC;AAED;;;;iBAkDC;AAED,mDAOC;AAED,4CAYC;AAED,kFAiBC;AA5YD;;;;;;;;;;;;;;;;;;EAqBC;AAmED,0DAEC;AAkCD,mDAEC;AAnBD,iDAeC;AA9BD,2DAaC;AAuBD,sEAuBC;AAED,kEAuBC;AAED,sEAqCC;AAED,2DAwBC;AA1ND,4DA+DC"}
@@ -0,0 +1,13 @@
1
+ export function getProducts(): Promise<any>;
2
+ export const routes: {
3
+ 'post /api/stripe/webhook': (typeof stripeWebhook)[];
4
+ 'post /api/stripe/create-billing-portal-session': (typeof billingPortalSessionCreate)[];
5
+ 'get /api/stripe/upcoming-invoices': (typeof upcomingInvoicesFind)[];
6
+ setup: typeof setup;
7
+ };
8
+ declare function stripeWebhook(req: any, res: any): Promise<any>;
9
+ declare function billingPortalSessionCreate(req: any, res: any): Promise<void>;
10
+ declare function upcomingInvoicesFind(req: any, res: any): Promise<any>;
11
+ declare function setup(middleware: any, _config: any): void;
12
+ export {};
13
+ //# sourceMappingURL=stripe.api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stripe.api.d.ts","sourceRoot":"","sources":["../../../components/billing/stripe.api.js"],"names":[],"mappings":"AAiHA,4CA8BC;AAtID;;;;;EAQC;AAkBD,iEAuCC;AAED,+EAaC;AAED,wEAWC;AAnFD,4DAcC"}
@@ -0,0 +1,9 @@
1
+ import { Store } from 'nitro-web/types'
2
+ import { Dispatch, SetStateAction } from 'react'
3
+
4
+ // Core-only global, this global will be defined globally in the project (e.g. in ./client/index.ts)
5
+ declare global {
6
+ const useTracked: () => [Store, Dispatch<SetStateAction<Store>>]
7
+ }
8
+
9
+ export {}
@@ -1,3 +1,4 @@
1
+ // Required global types
1
2
  import 'twin.macro'
2
3
  import { css as cssImport } from '@emotion/react'
3
4
  import styledImport from '@emotion/styled'
@@ -36,5 +37,3 @@ declare module 'react' {
36
37
  for?: string | undefined
37
38
  }
38
39
  }
39
-
40
- export {}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Sends an email using a predefined template, with optional data/or recipientVariables
3
+ * @typedef {{ clientUrl?: string, emailFrom?: string, mailgunDomain?: string, mailgunKey?: string, name?: string }} Config
4
+ *
5
+ * @param {object} opts
6
+ * @param {string} opts.template - Template name or raw HTML, e.g., 'reset-password'
7
+ * @param {string} opts.to - Recipient(s), e.g. "Bruce<bruce@wayneenterprises.com>,..."
8
+ * @param {Config} opts.config - Config object
9
+ * @param {string} [opts.bcc] - BCC, e.g. "Bruce<bruce@wayneenterprises.com>" (not sent in development)
10
+ * @param {object} [opts.data] - template data shared across recipients
11
+ * @param {string} [opts.from] - sender address, e.g. "Bruce<bruce@wayneenterprises.com>"
12
+ * @param {string} [opts.replyTo] - reply-to address, e.g. "Bruce<bruce@wayneenterprises.com>"
13
+ * @param {object} [opts.recipientVariables] - Mailgun recipient-variables for batch sending
14
+ * @param {string} [opts.subject] - subject (can also be defined in template)
15
+ * @param {boolean} [opts.skipCssInline] - skip CSS inlining
16
+ * @param {boolean} [opts.test] - enable test mode
17
+ * @returns {Promise<[any, any]>} Resolves with [mailgunErr, mailgunInfo]
18
+ */
19
+ export function sendEmail({ template, to, config, bcc, data, from, replyTo, recipientVariables, subject, skipCssInline, test, }: {
20
+ template: string;
21
+ to: string;
22
+ config: Config;
23
+ bcc?: string;
24
+ data?: object;
25
+ from?: string;
26
+ replyTo?: string;
27
+ recipientVariables?: object;
28
+ subject?: string;
29
+ skipCssInline?: boolean;
30
+ test?: boolean;
31
+ }): Promise<[any, any]>;
32
+ /**
33
+ * Sends an email using a predefined template, with optional data/or recipientVariables
34
+ */
35
+ export type Config = {
36
+ clientUrl?: string;
37
+ emailFrom?: string;
38
+ mailgunDomain?: string;
39
+ mailgunKey?: string;
40
+ name?: string;
41
+ };
42
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../server/email/index.js"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;;;GAiBG;AACH,iIAbG;IAAqB,QAAQ,EAArB,MAAM;IACO,EAAE,EAAf,MAAM;IACO,MAAM,EAAnB,MAAM;IACQ,GAAG,GAAjB,MAAM;IACQ,IAAI,GAAlB,MAAM;IACQ,IAAI,GAAlB,MAAM;IACQ,OAAO,GAArB,MAAM;IACQ,kBAAkB,GAAhC,MAAM;IACQ,OAAO,GAArB,MAAM;IACS,aAAa,GAA5B,OAAO;IACQ,IAAI,GAAnB,OAAO;CACf,GAAU,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAiF/B;;;;qBA/FY;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE"}
@@ -0,0 +1,13 @@
1
+ export * from "../util.js";
2
+ export * from "../components/auth/auth.api.js";
3
+ export * from "../components/billing/stripe.api.js";
4
+ export * as util from "../util.js";
5
+ export { sendEmail } from "./email/index.js";
6
+ export { routes as authRoutes } from "../components/auth/auth.api.js";
7
+ export { routes as stripeRoutes } from "../components/billing/stripe.api.js";
8
+ import userModel from './models/user.js';
9
+ import companyModel from './models/company.js';
10
+ export function setupDefaultModels(db: any): Promise<void>;
11
+ export { userModel, companyModel };
12
+ export { setupRouter, middleware } from "./router.js";
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../server/index.js"],"names":[],"mappings":";;;;;;;sBAKsB,kBAAkB;yBACf,qBAAqB;AAC9C,2DAIC"}
@@ -0,0 +1,147 @@
1
+ declare namespace _default {
2
+ namespace fields {
3
+ namespace business {
4
+ let address: {
5
+ city: {
6
+ type: string;
7
+ };
8
+ country: {
9
+ type: string;
10
+ default: string;
11
+ };
12
+ full: {
13
+ type: string;
14
+ index: string;
15
+ };
16
+ line1: {
17
+ type: string;
18
+ };
19
+ line2: {
20
+ type: string;
21
+ };
22
+ number: {
23
+ type: string;
24
+ };
25
+ postcode: {
26
+ type: string;
27
+ };
28
+ suburb: {
29
+ type: string;
30
+ };
31
+ unit: {
32
+ type: string;
33
+ };
34
+ area: {
35
+ bottomLeft: {
36
+ type: string;
37
+ }[];
38
+ topRight: {
39
+ type: string;
40
+ }[];
41
+ };
42
+ location: {
43
+ index: string;
44
+ type: {
45
+ type: string;
46
+ default: string;
47
+ };
48
+ coordinates: [];
49
+ };
50
+ };
51
+ namespace country {
52
+ export let type: string;
53
+ let _default: string;
54
+ export { _default as default };
55
+ export let required: boolean;
56
+ }
57
+ namespace currency {
58
+ let type_1: string;
59
+ export { type_1 as type };
60
+ let _default_1: string;
61
+ export { _default_1 as default };
62
+ let required_1: boolean;
63
+ export { required_1 as required };
64
+ }
65
+ namespace name {
66
+ let type_2: string;
67
+ export { type_2 as type };
68
+ let required_2: boolean;
69
+ export { required_2 as required };
70
+ export let index: string;
71
+ }
72
+ namespace number {
73
+ let type_3: string;
74
+ export { type_3 as type };
75
+ }
76
+ namespace phone {
77
+ let type_4: string;
78
+ export { type_4 as type };
79
+ }
80
+ namespace website {
81
+ let type_5: string;
82
+ export { type_5 as type };
83
+ export let isURL: boolean;
84
+ }
85
+ }
86
+ namespace status {
87
+ let type_6: string;
88
+ export { type_6 as type };
89
+ let _default_2: string;
90
+ export { _default_2 as default };
91
+ let _enum: string[];
92
+ export { _enum as enum };
93
+ }
94
+ let users: {
95
+ _id: {
96
+ model: string;
97
+ };
98
+ role: {
99
+ type: string;
100
+ enum: string[];
101
+ };
102
+ status: {
103
+ type: string;
104
+ required: boolean;
105
+ enum: string[];
106
+ };
107
+ inviteEmail: {
108
+ type: string;
109
+ };
110
+ inviteToken: {
111
+ type: string;
112
+ };
113
+ }[];
114
+ }
115
+ let findBL: string[];
116
+ let updateBL: string[];
117
+ let afterFind: ((data: any) => Promise<void>)[];
118
+ namespace methods {
119
+ function publicData(models: any): any;
120
+ function loginPopulate(): {
121
+ as: string;
122
+ from: string;
123
+ let: {
124
+ users: string;
125
+ };
126
+ pipeline: ({
127
+ $match: {
128
+ $expr: {
129
+ $in: string[];
130
+ };
131
+ };
132
+ $project?: undefined;
133
+ } | {
134
+ $project: {
135
+ createdAt: number;
136
+ email: number;
137
+ firstName: number;
138
+ lastName: number;
139
+ avatar: number;
140
+ };
141
+ $match?: undefined;
142
+ })[];
143
+ }[];
144
+ }
145
+ }
146
+ export default _default;
147
+ //# sourceMappingURL=company.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"company.d.ts","sourceRoot":"","sources":["../../../server/models/company.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA8CgB,sCAEX;QACc;;;;;;;;;;;;;;;;;;;;;;;YAyBd"}
@@ -0,0 +1,90 @@
1
+ declare namespace _default {
2
+ namespace fields {
3
+ export namespace avatar {
4
+ let type: string;
5
+ }
6
+ export namespace company {
7
+ let model: string;
8
+ let required: boolean;
9
+ }
10
+ export namespace email {
11
+ let type_1: string;
12
+ export { type_1 as type };
13
+ let required_1: boolean;
14
+ export { required_1 as required };
15
+ export let index: string;
16
+ }
17
+ export namespace firstName {
18
+ let type_2: string;
19
+ export { type_2 as type };
20
+ let required_2: boolean;
21
+ export { required_2 as required };
22
+ }
23
+ export namespace lastName {
24
+ let type_3: string;
25
+ export { type_3 as type };
26
+ let required_3: boolean;
27
+ export { required_3 as required };
28
+ }
29
+ export namespace password {
30
+ let type_4: string;
31
+ export { type_4 as type };
32
+ export let minLength: number;
33
+ }
34
+ export namespace resetToken {
35
+ let type_5: string;
36
+ export { type_5 as type };
37
+ }
38
+ export namespace status {
39
+ let type_6: string;
40
+ export { type_6 as type };
41
+ let _default: string;
42
+ export { _default as default };
43
+ let _enum: string[];
44
+ export { _enum as enum };
45
+ }
46
+ export namespace stripeCustomer {
47
+ let type_7: string;
48
+ export { type_7 as type };
49
+ }
50
+ export namespace stripeSubscription {
51
+ let type_8: string;
52
+ export { type_8 as type };
53
+ }
54
+ export namespace stripeIntents {
55
+ let type_9: string;
56
+ export { type_9 as type };
57
+ }
58
+ export namespace type_10 {
59
+ let type_11: string;
60
+ export { type_11 as type };
61
+ let _default_1: string;
62
+ export { _default_1 as default };
63
+ let _enum_1: string[];
64
+ export { _enum_1 as enum };
65
+ }
66
+ export { type_10 as type };
67
+ export namespace usedFreeTrial {
68
+ let type_12: string;
69
+ export { type_12 as type };
70
+ let _default_2: boolean;
71
+ export { _default_2 as default };
72
+ }
73
+ }
74
+ let findBL: string[];
75
+ let updateBL: string[];
76
+ namespace messages {
77
+ export namespace lastName_1 {
78
+ let required_4: string;
79
+ export { required_4 as required };
80
+ }
81
+ export { lastName_1 as lastName };
82
+ }
83
+ let beforeValidate: ((data: any) => Promise<void>)[];
84
+ let afterFind: ((data: any) => Promise<any>)[];
85
+ namespace methods {
86
+ function loginPopulate(): any[];
87
+ }
88
+ }
89
+ export default _default;
90
+ //# sourceMappingURL=user.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../server/models/user.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA8CmB,gCAEd"}
@@ -0,0 +1,15 @@
1
+ export function setupRouter(config: any): Promise<http.Server<typeof http.IncomingMessage, typeof http.ServerResponse>>;
2
+ export namespace middleware {
3
+ let order: string[];
4
+ function modifyRequest(req: any, res: any, next: any): void;
5
+ let parseUrlEncoded: import("connect").NextHandleFunction;
6
+ let parseJson: import("connect").NextHandleFunction;
7
+ function parseFile(req: any, res: any, next: any): void;
8
+ function beforeAPIRoute(req: any, res: any, next: any): void;
9
+ function isAdmin(req: any, res: any, next: any): void;
10
+ function isCompanyOwner(req: any, res: any, next: any): any;
11
+ function isCompanyUser(req: any, res: any, next: any): any;
12
+ function isUser(req: any, res: any, next: any): void;
13
+ }
14
+ import http from 'http';
15
+ //# sourceMappingURL=router.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../server/router.js"],"names":[],"mappings":"AAgBA,wHA2HC;;;IA6KgB,4DAKd;;;IAoBU,wDAMV;IAEe,6DAGf;IAIQ,sDASR;IACe,4DASf;IACc,2DAOd;IACO,qDAMP;;iBA/Xc,MAAM"}