@osaas/types 0.7.1 → 0.8.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.
@@ -15,95 +15,116 @@
15
15
  /// <reference types="mongoose/types/populate" />
16
16
  /// <reference types="mongoose/types/query" />
17
17
  /// <reference types="mongoose/types/schemaoptions" />
18
- /// <reference types="mongoose/types/schematypes" />
19
18
  /// <reference types="mongoose/types/session" />
20
19
  /// <reference types="mongoose/types/types" />
21
20
  /// <reference types="mongoose/types/utility" />
22
21
  /// <reference types="mongoose/types/validation" />
23
22
  /// <reference types="mongoose/types/virtuals" />
23
+ /// <reference types="mongoose/types/schematypes" />
24
24
  /// <reference types="mongoose/types/inferschematype" />
25
+ /// <reference types="mongoose/types/inferrawdoctype" />
25
26
  import { Schema } from 'mongoose';
26
- export declare const BILLING_OPTIONS: readonly ["paypal", "invoice"];
27
+ export declare const BILLING_OPTIONS: readonly ["paypal", "invoice", "stripe"];
27
28
  export declare const AUTH_PROVIDERS: readonly ["azure-ad"];
28
29
  export declare const TenantSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
29
30
  _id: string;
30
31
  enabled: boolean;
31
- billing: "paypal" | "invoice";
32
- repositories: {
32
+ billing: "paypal" | "invoice" | "stripe";
33
+ repositories: import("mongoose").Types.DocumentArray<{
34
+ _id: string;
35
+ type: "github";
36
+ }, import("mongoose").Types.Subdocument<string, any, {
33
37
  _id: string;
34
38
  type: "github";
35
- }[];
39
+ }> & {
40
+ _id: string;
41
+ type: "github";
42
+ }>;
36
43
  schemaVersion: number;
37
- name?: string | undefined;
38
- description?: string | undefined;
39
- avatarUrl?: string | undefined;
44
+ name?: string | null | undefined;
45
+ description?: string | null | undefined;
46
+ avatarUrl?: string | null | undefined;
40
47
  authProvider?: {
41
48
  provider: "azure-ad";
42
49
  clientId: string;
43
50
  clientSecret: string;
44
51
  emailRegex: string;
45
52
  config?: {
46
- azureAdTenantId?: string | undefined;
47
- } | undefined;
48
- } | undefined;
53
+ azureAdTenantId?: string | null | undefined;
54
+ } | null | undefined;
55
+ } | null | undefined;
49
56
  authCredentials?: {
50
57
  clientSecretHash: string;
51
58
  grantType: string;
52
- rotatedAt?: Date | undefined;
53
- } | undefined;
59
+ rotatedAt?: NativeDate | null | undefined;
60
+ } | null | undefined;
54
61
  }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
55
62
  _id: string;
56
63
  enabled: boolean;
57
- billing: "paypal" | "invoice";
58
- repositories: {
64
+ billing: "paypal" | "invoice" | "stripe";
65
+ repositories: import("mongoose").Types.DocumentArray<{
66
+ _id: string;
67
+ type: "github";
68
+ }, import("mongoose").Types.Subdocument<string, any, {
69
+ _id: string;
70
+ type: "github";
71
+ }> & {
59
72
  _id: string;
60
73
  type: "github";
61
- }[];
74
+ }>;
62
75
  schemaVersion: number;
63
- name?: string | undefined;
64
- description?: string | undefined;
65
- avatarUrl?: string | undefined;
76
+ name?: string | null | undefined;
77
+ description?: string | null | undefined;
78
+ avatarUrl?: string | null | undefined;
66
79
  authProvider?: {
67
80
  provider: "azure-ad";
68
81
  clientId: string;
69
82
  clientSecret: string;
70
83
  emailRegex: string;
71
84
  config?: {
72
- azureAdTenantId?: string | undefined;
73
- } | undefined;
74
- } | undefined;
85
+ azureAdTenantId?: string | null | undefined;
86
+ } | null | undefined;
87
+ } | null | undefined;
75
88
  authCredentials?: {
76
89
  clientSecretHash: string;
77
90
  grantType: string;
78
- rotatedAt?: Date | undefined;
79
- } | undefined;
80
- }>> & import("mongoose").FlatRecord<{
91
+ rotatedAt?: NativeDate | null | undefined;
92
+ } | null | undefined;
93
+ }>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<{
81
94
  _id: string;
82
95
  enabled: boolean;
83
- billing: "paypal" | "invoice";
84
- repositories: {
96
+ billing: "paypal" | "invoice" | "stripe";
97
+ repositories: import("mongoose").Types.DocumentArray<{
98
+ _id: string;
99
+ type: "github";
100
+ }, import("mongoose").Types.Subdocument<string, any, {
101
+ _id: string;
102
+ type: "github";
103
+ }> & {
85
104
  _id: string;
86
105
  type: "github";
87
- }[];
106
+ }>;
88
107
  schemaVersion: number;
89
- name?: string | undefined;
90
- description?: string | undefined;
91
- avatarUrl?: string | undefined;
108
+ name?: string | null | undefined;
109
+ description?: string | null | undefined;
110
+ avatarUrl?: string | null | undefined;
92
111
  authProvider?: {
93
112
  provider: "azure-ad";
94
113
  clientId: string;
95
114
  clientSecret: string;
96
115
  emailRegex: string;
97
116
  config?: {
98
- azureAdTenantId?: string | undefined;
99
- } | undefined;
100
- } | undefined;
117
+ azureAdTenantId?: string | null | undefined;
118
+ } | null | undefined;
119
+ } | null | undefined;
101
120
  authCredentials?: {
102
121
  clientSecretHash: string;
103
122
  grantType: string;
104
- rotatedAt?: Date | undefined;
105
- } | undefined;
123
+ rotatedAt?: NativeDate | null | undefined;
124
+ } | null | undefined;
106
125
  }> & Required<{
107
126
  _id: string;
108
- }>>;
127
+ }> & {
128
+ __v: number;
129
+ }>;
109
130
  //# sourceMappingURL=Tenant.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tenant.d.ts","sourceRoot":"","sources":["../../src/schema/Tenant.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAkB,MAAM,UAAU,CAAC;AAKlD,eAAO,MAAM,eAAe,gCAAiC,CAAC;AAC9D,eAAO,MAAM,cAAc,uBAAwB,CAAC;AAMpD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8EvB,CAAC"}
1
+ {"version":3,"file":"Tenant.d.ts","sourceRoot":"","sources":["../../src/schema/Tenant.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAkB,MAAM,UAAU,CAAC;AAKlD,eAAO,MAAM,eAAe,0CAA2C,CAAC;AACxE,eAAO,MAAM,cAAc,uBAAwB,CAAC;AAMpD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgFvB,CAAC"}
@@ -4,12 +4,14 @@ exports.TenantSchema = exports.AUTH_PROVIDERS = exports.BILLING_OPTIONS = void 0
4
4
  const mongoose_1 = require("mongoose");
5
5
  const util_1 = require("./util");
6
6
  const SCHEMA_VERSION = 6;
7
- exports.BILLING_OPTIONS = ['paypal', 'invoice'];
7
+ exports.BILLING_OPTIONS = ['paypal', 'invoice', 'stripe'];
8
8
  exports.AUTH_PROVIDERS = ['azure-ad'];
9
9
  function tenantIdValidator(_id) {
10
10
  return _id.length && _id.length <= 10 && /^[a-z]([a-z0-9])*$/.test(_id);
11
11
  }
12
12
  exports.TenantSchema = new mongoose_1.Schema({
13
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
14
+ // @ts-ignore mongoose v8 types exclude _id from SchemaDefinition inference but runtime supports it
13
15
  _id: {
14
16
  type: String,
15
17
  required: true,
@@ -1 +1 @@
1
- {"version":3,"file":"Tenant.js","sourceRoot":"","sources":["../../src/schema/Tenant.ts"],"names":[],"mappings":";;;AAAA,uCAAkD;AAClD,iCAA0C;AAE1C,MAAM,cAAc,GAAG,CAAU,CAAC;AAErB,QAAA,eAAe,GAAG,CAAC,QAAQ,EAAE,SAAS,CAAU,CAAC;AACjD,QAAA,cAAc,GAAG,CAAC,UAAU,CAAU,CAAC;AAEpD,SAAS,iBAAiB,CAAC,GAAW;IACpC,OAAO,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,MAAM,IAAI,EAAE,IAAI,oBAAoB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC1E,CAAC;AAEY,QAAA,YAAY,GAAG,IAAI,iBAA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IAAI,EAAE;YAC1C,YAAY,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC9C,UAAU,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC5C,MAAM,EAAE;gBACN,IAAI,EAAE;oBACJ,eAAe,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE;iBACnD;gBACD,QAAQ,EAAE,KAAK;aAChB;SACF;QACD,QAAQ,EAAE,KAAK;KAChB;IAED,oDAAoD;IACpD,eAAe,EAAE;QACf,IAAI,EAAE;YACJ,iDAAiD;YACjD,gBAAgB,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;YAClD,SAAS,EAAE;gBACT,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,oBAAoB;aAC9B;YACD,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE;SAC3C;QACD,QAAQ,EAAE,KAAK;KAChB;IAED,YAAY,EAAE;QACZ;YACE,IAAI,EAAE;gBACJ,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,CAAC,QAAQ,CAAC;gBAChB,QAAQ,EAAE,IAAI;gBACd,OAAO,EAAE,QAAQ;aAClB;YACD,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;SACtC;KACF;IAED,aAAa,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,cAAc,EAAE;CACzE,CAAC,CAAC"}
@@ -15,95 +15,146 @@
15
15
  /// <reference types="mongoose/types/populate" />
16
16
  /// <reference types="mongoose/types/query" />
17
17
  /// <reference types="mongoose/types/schemaoptions" />
18
- /// <reference types="mongoose/types/schematypes" />
19
18
  /// <reference types="mongoose/types/session" />
20
19
  /// <reference types="mongoose/types/types" />
21
20
  /// <reference types="mongoose/types/utility" />
22
21
  /// <reference types="mongoose/types/validation" />
23
22
  /// <reference types="mongoose/types/virtuals" />
23
+ /// <reference types="mongoose/types/schematypes" />
24
24
  /// <reference types="mongoose/types/inferschematype" />
25
+ /// <reference types="mongoose/types/inferrawdoctype" />
25
26
  import { Schema } from 'mongoose';
26
27
  export type UserRole = 'osaas-admin' | 'user';
27
28
  export type TenantUserRole = 'owner' | 'admin' | 'member';
28
29
  export declare const UserSchema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
29
30
  paypal: {
30
- payerId?: string | undefined;
31
+ payerId?: string | null | undefined;
31
32
  };
32
33
  schemaVersion: number;
33
34
  role: UserRole;
34
35
  email: string;
35
- tenants: {
36
+ tenants: import("mongoose").Types.DocumentArray<{
37
+ _id: string;
38
+ role: "owner" | "admin" | "member";
39
+ personalAccessToken: string;
40
+ }, import("mongoose").Types.Subdocument<string, any, {
36
41
  _id: string;
37
42
  role: "owner" | "admin" | "member";
38
43
  personalAccessToken: string;
39
- }[];
44
+ }> & {
45
+ _id: string;
46
+ role: "owner" | "admin" | "member";
47
+ personalAccessToken: string;
48
+ }>;
40
49
  notifications: import("mongoose").Types.DocumentArray<{
41
50
  message: string;
42
51
  link: string;
43
- createdAt: Date;
52
+ createdAt: NativeDate;
53
+ }, import("mongoose").Types.Subdocument<import("bson").ObjectId, any, {
54
+ message: string;
55
+ link: string;
56
+ createdAt: NativeDate;
57
+ }> & {
58
+ message: string;
59
+ link: string;
60
+ createdAt: NativeDate;
44
61
  }>;
45
62
  favoriteServices: string[];
46
- lastAccessed?: Date | undefined;
47
- emailVerified?: Date | undefined;
48
- lastContacted?: Date | undefined;
49
- captcha?: string | undefined;
50
- firstName?: string | undefined;
51
- lastName?: string | undefined;
52
- jobTitle?: string | undefined;
53
- industry?: string | undefined;
63
+ lastAccessed?: NativeDate | null | undefined;
64
+ emailVerified?: NativeDate | null | undefined;
65
+ lastContacted?: NativeDate | null | undefined;
66
+ captcha?: string | null | undefined;
67
+ firstName?: string | null | undefined;
68
+ lastName?: string | null | undefined;
69
+ jobTitle?: string | null | undefined;
70
+ industry?: string | null | undefined;
54
71
  }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
55
72
  paypal: {
56
- payerId?: string | undefined;
73
+ payerId?: string | null | undefined;
57
74
  };
58
75
  schemaVersion: number;
59
76
  role: UserRole;
60
77
  email: string;
61
- tenants: {
78
+ tenants: import("mongoose").Types.DocumentArray<{
62
79
  _id: string;
63
80
  role: "owner" | "admin" | "member";
64
81
  personalAccessToken: string;
65
- }[];
82
+ }, import("mongoose").Types.Subdocument<string, any, {
83
+ _id: string;
84
+ role: "owner" | "admin" | "member";
85
+ personalAccessToken: string;
86
+ }> & {
87
+ _id: string;
88
+ role: "owner" | "admin" | "member";
89
+ personalAccessToken: string;
90
+ }>;
66
91
  notifications: import("mongoose").Types.DocumentArray<{
67
92
  message: string;
68
93
  link: string;
69
- createdAt: Date;
94
+ createdAt: NativeDate;
95
+ }, import("mongoose").Types.Subdocument<import("bson").ObjectId, any, {
96
+ message: string;
97
+ link: string;
98
+ createdAt: NativeDate;
99
+ }> & {
100
+ message: string;
101
+ link: string;
102
+ createdAt: NativeDate;
70
103
  }>;
71
104
  favoriteServices: string[];
72
- lastAccessed?: Date | undefined;
73
- emailVerified?: Date | undefined;
74
- lastContacted?: Date | undefined;
75
- captcha?: string | undefined;
76
- firstName?: string | undefined;
77
- lastName?: string | undefined;
78
- jobTitle?: string | undefined;
79
- industry?: string | undefined;
80
- }>> & import("mongoose").FlatRecord<{
105
+ lastAccessed?: NativeDate | null | undefined;
106
+ emailVerified?: NativeDate | null | undefined;
107
+ lastContacted?: NativeDate | null | undefined;
108
+ captcha?: string | null | undefined;
109
+ firstName?: string | null | undefined;
110
+ lastName?: string | null | undefined;
111
+ jobTitle?: string | null | undefined;
112
+ industry?: string | null | undefined;
113
+ }>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<{
81
114
  paypal: {
82
- payerId?: string | undefined;
115
+ payerId?: string | null | undefined;
83
116
  };
84
117
  schemaVersion: number;
85
118
  role: UserRole;
86
119
  email: string;
87
- tenants: {
120
+ tenants: import("mongoose").Types.DocumentArray<{
121
+ _id: string;
122
+ role: "owner" | "admin" | "member";
123
+ personalAccessToken: string;
124
+ }, import("mongoose").Types.Subdocument<string, any, {
88
125
  _id: string;
89
126
  role: "owner" | "admin" | "member";
90
127
  personalAccessToken: string;
91
- }[];
128
+ }> & {
129
+ _id: string;
130
+ role: "owner" | "admin" | "member";
131
+ personalAccessToken: string;
132
+ }>;
92
133
  notifications: import("mongoose").Types.DocumentArray<{
93
134
  message: string;
94
135
  link: string;
95
- createdAt: Date;
136
+ createdAt: NativeDate;
137
+ }, import("mongoose").Types.Subdocument<import("bson").ObjectId, any, {
138
+ message: string;
139
+ link: string;
140
+ createdAt: NativeDate;
141
+ }> & {
142
+ message: string;
143
+ link: string;
144
+ createdAt: NativeDate;
96
145
  }>;
97
146
  favoriteServices: string[];
98
- lastAccessed?: Date | undefined;
99
- emailVerified?: Date | undefined;
100
- lastContacted?: Date | undefined;
101
- captcha?: string | undefined;
102
- firstName?: string | undefined;
103
- lastName?: string | undefined;
104
- jobTitle?: string | undefined;
105
- industry?: string | undefined;
147
+ lastAccessed?: NativeDate | null | undefined;
148
+ emailVerified?: NativeDate | null | undefined;
149
+ lastContacted?: NativeDate | null | undefined;
150
+ captcha?: string | null | undefined;
151
+ firstName?: string | null | undefined;
152
+ lastName?: string | null | undefined;
153
+ jobTitle?: string | null | undefined;
154
+ industry?: string | null | undefined;
106
155
  }> & {
107
156
  _id: import("mongoose").Types.ObjectId;
157
+ } & {
158
+ __v: number;
108
159
  }>;
109
160
  //# sourceMappingURL=User.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"User.d.ts","sourceRoot":"","sources":["../../src/schema/User.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,MAAM,QAAQ,GAAG,aAAa,GAAG,MAAM,CAAC;AAC9C,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC;AAY1D,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuErB,CAAC"}
1
+ {"version":3,"file":"User.d.ts","sourceRoot":"","sources":["../../src/schema/User.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,MAAM,QAAQ,GAAG,aAAa,GAAG,MAAM,CAAC;AAC9C,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC;AAY1D,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuErB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osaas/types",
3
- "version": "0.7.1",
3
+ "version": "0.8.1",
4
4
  "description": "OSaaS shared types",
5
5
  "author": "Jonas Birmé <jonas.birme@eyevinn.se>",
6
6
  "homepage": "https://github.com/Eyevinn/osaas-lib-util#readme",
@@ -28,8 +28,8 @@
28
28
  "url": "https://github.com/Eyevinn/osaas-lib-util/issues"
29
29
  },
30
30
  "dependencies": {
31
- "mongoose": "^7.4.3",
31
+ "mongoose": "^8.0.0",
32
32
  "nanoid": "^3.0.2"
33
33
  },
34
- "gitHead": "a3c4aaa9e241be2198b0730c47df2ef07ef48dcc"
34
+ "gitHead": "48880eb70b51e651289bf9d3dfd288c26daa85ad"
35
35
  }