nitro-web 0.0.183 → 0.0.185

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.
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @typedef {'af'|'al'|'dz'|'ad'|'ao'|'ag'|'ar'|'am'|'au'|'at'|'az'|'bs'|'bh'|'bd'|'bb'|'by'|'be'|'bz'|'bj'|'bt'|'bo'|'ba'|'bw'|'br'|
3
+ * 'bn'|'bg'|'bf'|'bi'|'cv'|'kh'|'cm'|'ca'|'cf'|'td'|'cl'|'cn'|'co'|'km'|'cg'|'cr'|'hr'|'cu'|'cy'|'cz'|'cd'|'dk'|'dj'|'dm'|'do'|'ec'|
4
+ * 'eg'|'sv'|'gq'|'er'|'ee'|'sz'|'et'|'fj'|'fi'|'fr'|'ga'|'gm'|'ge'|'de'|'gh'|'gr'|'gd'|'gt'|'gn'|'gw'|'gy'|'ht'|'hn'|'hu'|'is'|
5
+ * 'in'|'id'|'ir'|'iq'|'ie'|'il'|'it'|'jm'|'jp'|'jo'|'kz'|'ke'|'ki'|'kw'|'kg'|'la'|'lv'|'lb'|'ls'|'lr'|'ly'|'li'|'lt'|'lu'|'mg'|
6
+ * 'mw'|'my'|'mv'|'ml'|'mt'|'mh'|'mr'|'mu'|'mx'|'fm'|'md'|'mc'|'mn'|'me'|'ma'|'mz'|'mm'|'na'|'nr'|'np'|'nl'|'nz'|'ni'|'ne'|'ng'|
7
+ * 'kp'|'mk'|'no'|'om'|'pk'|'pw'|'pa'|'pg'|'py'|'pe'|'ph'|'pl'|'pt'|'qa'|'ro'|'ru'|'rw'|'kn'|'lc'|'vc'|'ws'|'sm'|'st'|'sa'|'sn'|
8
+ * 'rs'|'sc'|'sl'|'sg'|'sk'|'si'|'sb'|'so'|'za'|'kr'|'ss'|'es'|'lk'|'sd'|'sr'|'se'|'ch'|'sy'|'tj'|'tz'|'th'|'tl'|'tg'|'to'|'tt'|
9
+ * 'tn'|'tr'|'tm'|'tv'|'ug'|'ua'|'ae'|'gb'|'us'|'uy'|'uz'|'vu'|'va'|'ve'|'vn'|'ye'|'zm'|'zw'} Country
10
+ * @typedef {'nzd'|'aud'|'usd'|'gbp'|'btc'|'aed'|'ars'|'bdt'|'bhd'|'brl'|'cad'|'chf'|'clp'|'cny'|'cop'|'czk'|'dkk'|'egp'|'eur'|
11
+ * 'hkd'|'huf'|'idr'|'ils'|'inr'|'jod'|'jpy'|'kes'|'krw'|'kwd'|'lkr'|'mad'|'mxn'|'myr'|'ngn'|'nok'|'omr'|'pen'|'php'|'pkt'|
12
+ * 'pln'|'qar'|'ron'|'rub'|'sar'|'sek'|'sgd'|'thb'|'try'|'twd'|'uah'|'vnd'|'zar'} Currency
13
+ */
14
+ /** @type {{ [key in Currency]: { name: string, symbol: string, digits: number } }} */
15
+ export const currencies: { [key in Currency]: {
16
+ name: string;
17
+ symbol: string;
18
+ digits: number;
19
+ }; };
20
+ /** @type {{ [key in Country]: { name: string } }} */
21
+ export const countries: { [key in Country]: {
22
+ name: string;
23
+ }; };
24
+ export type Country = "af" | "al" | "dz" | "ad" | "ao" | "ag" | "ar" | "am" | "au" | "at" | "az" | "bs" | "bh" | "bd" | "bb" | "by" | "be" | "bz" | "bj" | "bt" | "bo" | "ba" | "bw" | "br" | "bn" | "bg" | "bf" | "bi" | "cv" | "kh" | "cm" | "ca" | "cf" | "td" | "cl" | "cn" | "co" | "km" | "cg" | "cr" | "hr" | "cu" | "cy" | "cz" | "cd" | "dk" | "dj" | "dm" | "do" | "ec" | "eg" | "sv" | "gq" | "er" | "ee" | "sz" | "et" | "fj" | "fi" | "fr" | "ga" | "gm" | "ge" | "de" | "gh" | "gr" | "gd" | "gt" | "gn" | "gw" | "gy" | "ht" | "hn" | "hu" | "is" | "in" | "id" | "ir" | "iq" | "ie" | "il" | "it" | "jm" | "jp" | "jo" | "kz" | "ke" | "ki" | "kw" | "kg" | "la" | "lv" | "lb" | "ls" | "lr" | "ly" | "li" | "lt" | "lu" | "mg" | "mw" | "my" | "mv" | "ml" | "mt" | "mh" | "mr" | "mu" | "mx" | "fm" | "md" | "mc" | "mn" | "me" | "ma" | "mz" | "mm" | "na" | "nr" | "np" | "nl" | "nz" | "ni" | "ne" | "ng" | "kp" | "mk" | "no" | "om" | "pk" | "pw" | "pa" | "pg" | "py" | "pe" | "ph" | "pl" | "pt" | "qa" | "ro" | "ru" | "rw" | "kn" | "lc" | "vc" | "ws" | "sm" | "st" | "sa" | "sn" | "rs" | "sc" | "sl" | "sg" | "sk" | "si" | "sb" | "so" | "za" | "kr" | "ss" | "es" | "lk" | "sd" | "sr" | "se" | "ch" | "sy" | "tj" | "tz" | "th" | "tl" | "tg" | "to" | "tt" | "tn" | "tr" | "tm" | "tv" | "ug" | "ua" | "ae" | "gb" | "us" | "uy" | "uz" | "vu" | "va" | "ve" | "vn" | "ye" | "zm" | "zw";
25
+ export type Currency = "nzd" | "aud" | "usd" | "gbp" | "btc" | "aed" | "ars" | "bdt" | "bhd" | "brl" | "cad" | "chf" | "clp" | "cny" | "cop" | "czk" | "dkk" | "egp" | "eur" | "hkd" | "huf" | "idr" | "ils" | "inr" | "jod" | "jpy" | "kes" | "krw" | "kwd" | "lkr" | "mad" | "mxn" | "myr" | "ngn" | "nok" | "omr" | "pen" | "php" | "pkt" | "pln" | "qar" | "ron" | "rub" | "sar" | "sek" | "sgd" | "thb" | "try" | "twd" | "uah" | "vnd" | "zar";
26
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../server/constants.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AAEH,sFAAsF;AACtF,yBADW,GAAG,GAAG,IAAI,QAAQ,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAE,CAsDjF;AAED,qDAAqD;AACrD,wBADW,GAAG,GAAG,IAAI,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K,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAC7H,KAAQ,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAC1H,KAAQ,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK,GAAC,KAAK"}
@@ -6,12 +6,21 @@ export { sendEmail } from "./email/index.js";
6
6
  export { routes as authRoutes } from "../components/auth/auth.api.js";
7
7
  export { routes as stripeRoutes } from "../components/billing/stripe.api.js";
8
8
  /**
9
- * Re-export the MiddlewareConfig type from nitro-web/server
9
+ * Re-export types from nitro-web/server
10
10
  */
11
11
  export type MiddlewareConfig = import("./router.js").MiddlewareConfig;
12
+ /**
13
+ * Re-export types from nitro-web/server
14
+ */
15
+ export type Country = import("./constants.js").Country;
16
+ /**
17
+ * Re-export types from nitro-web/server
18
+ */
19
+ export type Currency = import("./constants.js").Currency;
12
20
  import userModel from './models/user.js';
13
21
  import companyModel from './models/company.js';
14
22
  export function setupDefaultModels(db: any): Promise<void>;
15
23
  export { userModel, companyModel };
24
+ export { currencies, countries } from "./constants.js";
16
25
  export { setupRouter, middleware, isValidUserOrRespond, isAdminUser } from "./router.js";
17
26
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../server/index.js"],"names":[],"mappings":";;;;;;;;;;+BAMa,OAAO,aAAa,EAAE,gBAAgB;sBAI7B,kBAAkB;yBACf,qBAAqB;AAC9C,2DAIC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../server/index.js"],"names":[],"mappings":";;;;;;;;;;+BAOa,OAAO,aAAa,EAAE,gBAAgB;;;;sBACtC,OAAO,gBAAgB,EAAE,OAAO;;;;uBAChC,OAAO,gBAAgB,EAAE,QAAQ;sBAIxB,kBAAkB;yBACf,qBAAqB;AAC9C,2DAIC"}
@@ -90,25 +90,39 @@ declare namespace _default {
90
90
  export { _default_2 as default };
91
91
  let _enum: string[];
92
92
  export { _enum as enum };
93
+ let required_3: boolean;
94
+ export { required_3 as required };
93
95
  }
94
96
  let users: {
95
97
  _id: {
96
98
  model: string;
99
+ required: boolean;
97
100
  };
98
101
  role: {
99
102
  type: string;
100
103
  enum: string[];
104
+ required: boolean;
101
105
  };
102
106
  status: {
103
107
  type: string;
104
- required: boolean;
108
+ default: string;
105
109
  enum: string[];
110
+ required: boolean;
111
+ };
112
+ }[];
113
+ let invites: {
114
+ email: {
115
+ type: string;
116
+ required: boolean;
106
117
  };
107
- inviteEmail: {
118
+ role: {
108
119
  type: string;
120
+ enum: string[];
121
+ required: boolean;
109
122
  };
110
123
  inviteToken: {
111
124
  type: string;
125
+ required: boolean;
112
126
  };
113
127
  }[];
114
128
  }
@@ -1 +1 @@
1
- {"version":3,"file":"company.d.ts","sourceRoot":"","sources":["../../../server/models/company.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA8CgB,sCAEX;QACc;;;;;;;;;;;;;;;;;;;;;;;YAyBd"}
1
+ {"version":3,"file":"company.d.ts","sourceRoot":"","sources":["../../../server/models/company.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA+CgB,sCAEX;QACc;;;;;;;;;;;;;;;;;;;;;;;YAyBd"}
@@ -1,82 +1,63 @@
1
1
  declare namespace _default {
2
2
  namespace fields {
3
- export namespace avatar {
3
+ namespace avatar {
4
4
  let type: string;
5
5
  }
6
- export namespace company {
6
+ namespace company {
7
7
  let model: string;
8
8
  let required: boolean;
9
9
  }
10
- export namespace email {
10
+ namespace email {
11
11
  let type_1: string;
12
12
  export { type_1 as type };
13
13
  let required_1: boolean;
14
14
  export { required_1 as required };
15
15
  export let index: string;
16
16
  }
17
- export namespace isInvited {
17
+ namespace isAdmin {
18
18
  let type_2: string;
19
19
  export { type_2 as type };
20
+ let _default: boolean;
21
+ export { _default as default };
20
22
  }
21
- export namespace firstName {
23
+ namespace firstName {
22
24
  let type_3: string;
23
25
  export { type_3 as type };
24
26
  let required_2: boolean;
25
27
  export { required_2 as required };
26
28
  }
27
- export namespace lastName {
29
+ namespace lastName {
28
30
  let type_4: string;
29
31
  export { type_4 as type };
30
32
  let required_3: boolean;
31
33
  export { required_3 as required };
32
34
  }
33
- export namespace status {
35
+ namespace stripeCustomer {
34
36
  let type_5: string;
35
37
  export { type_5 as type };
36
- let _default: string;
37
- export { _default as default };
38
- let _enum: string[];
39
- export { _enum as enum };
40
38
  }
41
- export namespace stripeCustomer {
39
+ namespace stripeSubscription {
42
40
  let type_6: string;
43
41
  export { type_6 as type };
44
42
  }
45
- export namespace stripeSubscription {
43
+ namespace stripeIntents {
46
44
  let type_7: string;
47
45
  export { type_7 as type };
48
46
  }
49
- export namespace stripeIntents {
47
+ namespace usedFreeTrial {
50
48
  let type_8: string;
51
49
  export { type_8 as type };
52
- }
53
- export namespace type_9 {
54
- let type_10: string;
55
- export { type_10 as type };
56
- let _default_1: string;
50
+ let _default_1: boolean;
57
51
  export { _default_1 as default };
58
- let _enum_1: string[];
59
- export { _enum_1 as enum };
60
52
  }
61
- export { type_9 as type };
62
- export namespace usedFreeTrial {
63
- let type_11: string;
64
- export { type_11 as type };
65
- let _default_2: boolean;
66
- export { _default_2 as default };
67
- }
68
- export namespace password {
69
- let type_12: string;
70
- export { type_12 as type };
53
+ namespace password {
54
+ let type_9: string;
55
+ export { type_9 as type };
71
56
  export let minLength: number;
72
57
  }
73
- export namespace inviteToken {
74
- let type_13: string;
75
- export { type_13 as type };
76
- }
77
- export namespace resetToken {
78
- let type_14: string;
79
- export { type_14 as type };
58
+ namespace resetToken {
59
+ let type_10: string;
60
+ export { type_10 as type };
80
61
  }
81
62
  }
82
63
  let findBL: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../server/models/user.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAiDmB,gCAEd"}
1
+ {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../server/models/user.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAkDmB,gCAEd"}
package/types.ts CHANGED
@@ -24,13 +24,12 @@ export type Config = InjectedConfig & {
24
24
 
25
25
  export type User = {
26
26
  _id?: string
27
+ email?: string
27
28
  firstName?: string
28
29
  lastName?: string
29
30
  name?: string
30
31
  avatar?: MonasteryImage
31
32
  isAdmin?: boolean
32
- isInvited?: boolean
33
- type?: string
34
33
  }
35
34
 
36
35
  export type Error = { title: string, detail: string }