jourycms-sdk 1.0.1 → 1.0.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jourycms-sdk",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Sdk for Joury CMS",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -13,7 +13,7 @@ declare module Levelup {
13
13
  force_load_from_db?: boolean;
14
14
  company?: string | null;
15
15
  }
16
- ): Promise<Levelup.V2.CacheManager.EntityType<E>>;
16
+ ): Promise<Levelup.CMS.V1.Utils.SystemStructure.Models.EntityType<E>>;
17
17
 
18
18
  getMany(
19
19
  ids: string[],
@@ -22,17 +22,17 @@ declare module Levelup {
22
22
  force_load_from_db?: boolean;
23
23
  company?: string | null;
24
24
  }
25
- ): Promise<Levelup.V2.CacheManager.EntityType<E>[]>;
25
+ ): Promise<Levelup.CMS.V1.Utils.SystemStructure.Models.EntityType<E>[]>;
26
26
 
27
27
  list(config?: {
28
- query: Levelup.V2.CacheManager.TListQueryParams<E>;
28
+ query: Levelup.CMS.V1.CacheManager.TListQueryParams<E>;
29
29
  force_load_from_db?: boolean;
30
30
  company?: string | null;
31
- }): Promise<Levelup.V2.CacheManager.EntityType<E>[]>;
31
+ }): Promise<Levelup.CMS.V1.Utils.SystemStructure.Models.EntityType<E>[]>;
32
32
 
33
33
  set(
34
34
  id: string,
35
- value: Levelup.V2.CacheManager.EntityType<E>,
35
+ value: Levelup.CMS.V1.Utils.SystemStructure.Models.EntityType<E>,
36
36
  company?: string | null
37
37
  ): Promise<void>;
38
38
 
@@ -41,16 +41,8 @@ declare module Levelup {
41
41
  unsetAll(company?: string | null): Promise<void>;
42
42
  }
43
43
 
44
- export type TLevelupEntity =
45
- // auth
46
- | "user"
47
- | "apiKey"
48
- | "role"
49
- | "permission"
50
- | "permissionGroup"
51
- // system
52
- | "app"
53
- ;
44
+
45
+ export type TEntity = Utils.SystemStructure.Models.AllModels;
54
46
 
55
47
  export type TLevelupListQueryParams<E extends TEntity> =
56
48
  // auth
@@ -71,11 +63,10 @@ declare module Levelup {
71
63
 
72
64
 
73
65
 
74
- export type TEntity = TLevelupEntity;
75
66
 
76
67
  export type TListQueryParams<E extends TEntity> =
77
- E extends Levelup.V2.CacheManager.TLevelupEntity
78
- ? Levelup.V2.CacheManager.TLevelupListQueryParams<E>
68
+ E extends Levelup.CMS.V1.CacheManager.TLevelupEntity
69
+ ? Levelup.CMS.V1.CacheManager.TLevelupListQueryParams<E>
79
70
  : never;
80
71
  }
81
72
  }
@@ -37,126 +37,126 @@ declare module Levelup {
37
37
  export namespace Users {
38
38
  export namespace User {
39
39
  export type created = {
40
- data: Partial<Levelup.V2.Users.Entity.ExposedUser>;
40
+ data: Partial<Levelup.CMS.V1.Users.Entity.ExposedUser>;
41
41
  };
42
42
  export type updated = {
43
- data: Partial<Levelup.V2.Users.Entity.ExposedUser>;
43
+ data: Partial<Levelup.CMS.V1.Users.Entity.ExposedUser>;
44
44
  };
45
45
  export type deleted = {
46
- data: Partial<Levelup.V2.Users.Entity.ExposedUser>;
46
+ data: Partial<Levelup.CMS.V1.Users.Entity.ExposedUser>;
47
47
  };
48
48
  export type restored = {
49
- data: Partial<Levelup.V2.Users.Entity.ExposedUser>;
49
+ data: Partial<Levelup.CMS.V1.Users.Entity.ExposedUser>;
50
50
  };
51
51
  export type roleChanged = {
52
- data: Partial<Levelup.V2.Users.Entity.ExposedUser>;
52
+ data: Partial<Levelup.CMS.V1.Users.Entity.ExposedUser>;
53
53
  };
54
54
  export type permissionsChanged = {
55
- data: Partial<Levelup.V2.Users.Entity.ExposedUser>;
55
+ data: Partial<Levelup.CMS.V1.Users.Entity.ExposedUser>;
56
56
  };
57
57
  export type attributeCompany = {
58
- data: Partial<Levelup.V2.Users.Entity.ExposedUser>;
59
- company: Levelup.V2.Accounts.Entity.Company;
58
+ data: Partial<Levelup.CMS.V1.Users.Entity.ExposedUser>;
59
+ company: Levelup.CMS.V1.Accounts.Entity.Company;
60
60
  };
61
61
  export type attributeStore = {
62
- data: Partial<Levelup.V2.Users.Entity.ExposedUser>;
63
- store_id: Levelup.V2.Accounts.Entity.Store;
62
+ data: Partial<Levelup.CMS.V1.Users.Entity.ExposedUser>;
63
+ store_id: Levelup.CMS.V1.Accounts.Entity.Store;
64
64
  };
65
65
  export type removeStore = {
66
- data: Partial<Levelup.V2.Users.Entity.ExposedUser>;
66
+ data: Partial<Levelup.CMS.V1.Users.Entity.ExposedUser>;
67
67
  store_id: string;
68
68
  };
69
69
  export type suspendStatusChanged = {
70
70
  suspended: boolean;
71
- data: Partial<Levelup.V2.Users.Entity.ExposedUser>;
71
+ data: Partial<Levelup.CMS.V1.Users.Entity.ExposedUser>;
72
72
  };
73
73
  export type loginInfoUpdated = {
74
- data: Partial<Levelup.V2.Users.Entity.ExposedUser>;
74
+ data: Partial<Levelup.CMS.V1.Users.Entity.ExposedUser>;
75
75
  };
76
76
  }
77
77
  }
78
78
 
79
79
  export namespace Auth {
80
- export type login = { data: Levelup.V2.Users.Entity.ExposedUser };
81
- export type register = { data: Levelup.V2.Users.Entity.ExposedUser };
82
- export type logout = { data: Levelup.V2.Users.Entity.ExposedUser };
83
- export type restored = { data: Levelup.V2.Users.Entity.ExposedUser };
80
+ export type login = { data: Levelup.CMS.V1.Users.Entity.ExposedUser };
81
+ export type register = { data: Levelup.CMS.V1.Users.Entity.ExposedUser };
82
+ export type logout = { data: Levelup.CMS.V1.Users.Entity.ExposedUser };
83
+ export type restored = { data: Levelup.CMS.V1.Users.Entity.ExposedUser };
84
84
 
85
85
  export namespace ApiKey {
86
86
  export type created = {
87
- data: Partial<Levelup.V2.Auth.Entity.ApiKey>;
87
+ data: Partial<Levelup.CMS.V1.Auth.Entity.ApiKey>;
88
88
  };
89
89
  export type updated = {
90
- data: Partial<Levelup.V2.Auth.Entity.ApiKey>;
90
+ data: Partial<Levelup.CMS.V1.Auth.Entity.ApiKey>;
91
91
  };
92
92
  export type deleted = {
93
- data: Partial<Levelup.V2.Auth.Entity.ApiKey>;
93
+ data: Partial<Levelup.CMS.V1.Auth.Entity.ApiKey>;
94
94
  };
95
95
  export type restored = {
96
- data: Partial<Levelup.V2.Auth.Entity.ApiKey>;
96
+ data: Partial<Levelup.CMS.V1.Auth.Entity.ApiKey>;
97
97
  };
98
98
  export type enableStatusChanged = {
99
99
  enabled: boolean;
100
- data: Partial<Levelup.V2.Auth.Entity.ApiKey>;
100
+ data: Partial<Levelup.CMS.V1.Auth.Entity.ApiKey>;
101
101
  };
102
102
  }
103
103
 
104
104
  export namespace Role {
105
105
  export type created = {
106
- data: Partial<Levelup.V2.Auth.Entity.Role>;
106
+ data: Partial<Levelup.CMS.V1.Auth.Entity.Role>;
107
107
  };
108
108
  export type updated = {
109
- data: Partial<Levelup.V2.Auth.Entity.Role>;
109
+ data: Partial<Levelup.CMS.V1.Auth.Entity.Role>;
110
110
  };
111
111
  export type deleted = {
112
- data: Partial<Levelup.V2.Auth.Entity.Role>;
112
+ data: Partial<Levelup.CMS.V1.Auth.Entity.Role>;
113
113
  };
114
114
  export type restored = {
115
- data: Partial<Levelup.V2.Auth.Entity.Role>;
115
+ data: Partial<Levelup.CMS.V1.Auth.Entity.Role>;
116
116
  };
117
117
  export type permissionsChanged = {
118
- data: Partial<Levelup.V2.Auth.Entity.Role>;
118
+ data: Partial<Levelup.CMS.V1.Auth.Entity.Role>;
119
119
  };
120
120
  export type addUser = {
121
- data: Partial<Levelup.V2.Auth.Entity.Role>;
121
+ data: Partial<Levelup.CMS.V1.Auth.Entity.Role>;
122
122
  };
123
123
  }
124
124
 
125
125
  export namespace Permission {
126
126
  export type created = {
127
- data: Partial<Levelup.V2.Auth.Entity.Permission>;
127
+ data: Partial<Levelup.CMS.V1.Auth.Entity.Permission>;
128
128
  };
129
129
  export type updated = {
130
- data: Partial<Levelup.V2.Auth.Entity.Permission>;
130
+ data: Partial<Levelup.CMS.V1.Auth.Entity.Permission>;
131
131
  };
132
132
  export type deleted = {
133
- data: Partial<Levelup.V2.Auth.Entity.Permission>;
133
+ data: Partial<Levelup.CMS.V1.Auth.Entity.Permission>;
134
134
  };
135
135
  export type restored = {
136
- data: Partial<Levelup.V2.Auth.Entity.Permission>;
136
+ data: Partial<Levelup.CMS.V1.Auth.Entity.Permission>;
137
137
  };
138
138
  export type addRole = {
139
- data: Partial<Levelup.V2.Auth.Entity.Permission>;
139
+ data: Partial<Levelup.CMS.V1.Auth.Entity.Permission>;
140
140
  };
141
141
  export type addUser = {
142
- data: Partial<Levelup.V2.Auth.Entity.Permission>;
142
+ data: Partial<Levelup.CMS.V1.Auth.Entity.Permission>;
143
143
  };
144
144
  export type permissionListUpdated = {
145
- data: Partial<Levelup.V2.Auth.Entity.Permission>[];
145
+ data: Partial<Levelup.CMS.V1.Auth.Entity.Permission>[];
146
146
  };
147
147
  }
148
148
  export namespace PermissionGroup {
149
149
  export type created = {
150
- data: Partial<Levelup.V2.Auth.Entity.PermissionGroup>;
150
+ data: Partial<Levelup.CMS.V1.Auth.Entity.PermissionGroup>;
151
151
  };
152
152
  export type updated = {
153
- data: Partial<Levelup.V2.Auth.Entity.PermissionGroup>;
153
+ data: Partial<Levelup.CMS.V1.Auth.Entity.PermissionGroup>;
154
154
  };
155
155
  export type deleted = {
156
- data: Partial<Levelup.V2.Auth.Entity.PermissionGroup>;
156
+ data: Partial<Levelup.CMS.V1.Auth.Entity.PermissionGroup>;
157
157
  };
158
158
  export type restored = {
159
- data: Partial<Levelup.V2.Auth.Entity.PermissionGroup>;
159
+ data: Partial<Levelup.CMS.V1.Auth.Entity.PermissionGroup>;
160
160
  };
161
161
  }
162
162
  }
@@ -167,121 +167,121 @@ declare module Levelup {
167
167
  export namespace Content {
168
168
  export namespace Comment {
169
169
  export type created = {
170
- data: Partial<Levelup.V2.Cm.Entity.Comment>;
170
+ data: Partial<Levelup.CMS.V1.Cm.Entity.Comment>;
171
171
  };
172
172
  export type updated = {
173
- data: Partial<Levelup.V2.Cm.Entity.Comment>;
173
+ data: Partial<Levelup.CMS.V1.Cm.Entity.Comment>;
174
174
  };
175
175
  export type deleted = {
176
- data: Partial<Levelup.V2.Cm.Entity.Comment>;
176
+ data: Partial<Levelup.CMS.V1.Cm.Entity.Comment>;
177
177
  };
178
178
  export type restored = {
179
- data: Partial<Levelup.V2.Cm.Entity.Comment>;
179
+ data: Partial<Levelup.CMS.V1.Cm.Entity.Comment>;
180
180
  };
181
181
  }
182
182
  export namespace Review {
183
183
  export type created = {
184
- data: Partial<Levelup.V2.Cm.Entity.Review>;
184
+ data: Partial<Levelup.CMS.V1.Cm.Entity.Review>;
185
185
  };
186
186
  export type updated = {
187
- data: Partial<Levelup.V2.Cm.Entity.Review>;
187
+ data: Partial<Levelup.CMS.V1.Cm.Entity.Review>;
188
188
  };
189
189
  export type deleted = {
190
- data: Partial<Levelup.V2.Cm.Entity.Review>;
190
+ data: Partial<Levelup.CMS.V1.Cm.Entity.Review>;
191
191
  };
192
192
  export type restored = {
193
- data: Partial<Levelup.V2.Cm.Entity.Review>;
193
+ data: Partial<Levelup.CMS.V1.Cm.Entity.Review>;
194
194
  };
195
195
  }
196
196
  export namespace Article {
197
197
  export type created = {
198
- data: Partial<Levelup.V2.Cm.Entity.Article>;
198
+ data: Partial<Levelup.CMS.V1.Cm.Entity.Article>;
199
199
  };
200
200
  export type updated = {
201
- data: Partial<Levelup.V2.Cm.Entity.Article>;
201
+ data: Partial<Levelup.CMS.V1.Cm.Entity.Article>;
202
202
  };
203
203
  export type deleted = {
204
- data: Partial<Levelup.V2.Cm.Entity.Article>;
204
+ data: Partial<Levelup.CMS.V1.Cm.Entity.Article>;
205
205
  };
206
206
  export type restored = {
207
- data: Partial<Levelup.V2.Cm.Entity.Article>;
207
+ data: Partial<Levelup.CMS.V1.Cm.Entity.Article>;
208
208
  };
209
209
  }
210
210
  export namespace ArticleType {
211
211
  export type created = {
212
- data: Partial<Levelup.V2.Cm.Entity.ArticleType>;
212
+ data: Partial<Levelup.CMS.V1.Cm.Entity.ArticleType>;
213
213
  };
214
214
  export type updated = {
215
- data: Partial<Levelup.V2.Cm.Entity.ArticleType>;
215
+ data: Partial<Levelup.CMS.V1.Cm.Entity.ArticleType>;
216
216
  };
217
217
  export type deleted = {
218
- data: Partial<Levelup.V2.Cm.Entity.ArticleType>;
218
+ data: Partial<Levelup.CMS.V1.Cm.Entity.ArticleType>;
219
219
  };
220
220
  export type restored = {
221
- data: Partial<Levelup.V2.Cm.Entity.ArticleType>;
221
+ data: Partial<Levelup.CMS.V1.Cm.Entity.ArticleType>;
222
222
  };
223
223
  }
224
224
  export namespace Term {
225
- export type created = { data: Partial<Levelup.V2.Cm.Entity.Term> };
226
- export type updated = { data: Partial<Levelup.V2.Cm.Entity.Term> };
227
- export type deleted = { data: Partial<Levelup.V2.Cm.Entity.Term> };
228
- export type restored = { data: Partial<Levelup.V2.Cm.Entity.Term> };
225
+ export type created = { data: Partial<Levelup.CMS.V1.Cm.Entity.Term> };
226
+ export type updated = { data: Partial<Levelup.CMS.V1.Cm.Entity.Term> };
227
+ export type deleted = { data: Partial<Levelup.CMS.V1.Cm.Entity.Term> };
228
+ export type restored = { data: Partial<Levelup.CMS.V1.Cm.Entity.Term> };
229
229
  }
230
230
  export namespace Taxonomy {
231
231
  export type created = {
232
- data: Partial<Levelup.V2.Cm.Entity.Taxonomy>;
232
+ data: Partial<Levelup.CMS.V1.Cm.Entity.Taxonomy>;
233
233
  };
234
234
  export type updated = {
235
- data: Partial<Levelup.V2.Cm.Entity.Taxonomy>;
235
+ data: Partial<Levelup.CMS.V1.Cm.Entity.Taxonomy>;
236
236
  };
237
237
  export type deleted = {
238
- data: Partial<Levelup.V2.Cm.Entity.Taxonomy>;
238
+ data: Partial<Levelup.CMS.V1.Cm.Entity.Taxonomy>;
239
239
  };
240
240
  export type restored = {
241
- data: Partial<Levelup.V2.Cm.Entity.Taxonomy>;
241
+ data: Partial<Levelup.CMS.V1.Cm.Entity.Taxonomy>;
242
242
  };
243
243
  }
244
244
  export namespace Translation {
245
245
  export namespace Item {
246
246
  export type created = {
247
- data: Partial<Levelup.V2.Cm.Translation.Entity.Item>;
247
+ data: Partial<Levelup.CMS.V1.Cm.Translation.Entity.Item>;
248
248
  };
249
249
  export type updated = {
250
- data: Partial<Levelup.V2.Cm.Translation.Entity.Item>;
250
+ data: Partial<Levelup.CMS.V1.Cm.Translation.Entity.Item>;
251
251
  };
252
252
  export type deleted = {
253
- data: Partial<Levelup.V2.Cm.Translation.Entity.Item>;
253
+ data: Partial<Levelup.CMS.V1.Cm.Translation.Entity.Item>;
254
254
  };
255
255
  export type restored = {
256
- data: Partial<Levelup.V2.Cm.Translation.Entity.Item>;
256
+ data: Partial<Levelup.CMS.V1.Cm.Translation.Entity.Item>;
257
257
  };
258
258
  }
259
259
  export namespace Project {
260
260
  export type created = {
261
- data: Partial<Levelup.V2.Cm.Translation.Entity.Project>;
261
+ data: Partial<Levelup.CMS.V1.Cm.Translation.Entity.Project>;
262
262
  };
263
263
  export type updated = {
264
- data: Partial<Levelup.V2.Cm.Translation.Entity.Project>;
264
+ data: Partial<Levelup.CMS.V1.Cm.Translation.Entity.Project>;
265
265
  };
266
266
  export type deleted = {
267
- data: Partial<Levelup.V2.Cm.Translation.Entity.Project>;
267
+ data: Partial<Levelup.CMS.V1.Cm.Translation.Entity.Project>;
268
268
  };
269
269
  export type restored = {
270
- data: Partial<Levelup.V2.Cm.Translation.Entity.Project>;
270
+ data: Partial<Levelup.CMS.V1.Cm.Translation.Entity.Project>;
271
271
  };
272
272
  }
273
273
  export namespace Namespace {
274
274
  export type created = {
275
- data: Partial<Levelup.V2.Cm.Translation.Entity.Namespace>;
275
+ data: Partial<Levelup.CMS.V1.Cm.Translation.Entity.Namespace>;
276
276
  };
277
277
  export type updated = {
278
- data: Partial<Levelup.V2.Cm.Translation.Entity.Namespace>;
278
+ data: Partial<Levelup.CMS.V1.Cm.Translation.Entity.Namespace>;
279
279
  };
280
280
  export type deleted = {
281
- data: Partial<Levelup.V2.Cm.Translation.Entity.Namespace>;
281
+ data: Partial<Levelup.CMS.V1.Cm.Translation.Entity.Namespace>;
282
282
  };
283
283
  export type restored = {
284
- data: Partial<Levelup.V2.Cm.Translation.Entity.Namespace>;
284
+ data: Partial<Levelup.CMS.V1.Cm.Translation.Entity.Namespace>;
285
285
  };
286
286
  }
287
287
  }
@@ -293,16 +293,16 @@ declare module Levelup {
293
293
  export namespace Storage {
294
294
  export namespace UploadedFile {
295
295
  export type created = {
296
- data: Partial<Levelup.V2.Storage.Entity.UploadedFile>;
296
+ data: Partial<Levelup.CMS.V1.Storage.Entity.UploadedFile>;
297
297
  };
298
298
  export type updated = {
299
- data: Partial<Levelup.V2.Storage.Entity.UploadedFile>;
299
+ data: Partial<Levelup.CMS.V1.Storage.Entity.UploadedFile>;
300
300
  };
301
301
  export type deleted = {
302
- data: Partial<Levelup.V2.Storage.Entity.UploadedFile>;
302
+ data: Partial<Levelup.CMS.V1.Storage.Entity.UploadedFile>;
303
303
  };
304
304
  export type restored = {
305
- data: Partial<Levelup.V2.Storage.Entity.UploadedFile>;
305
+ data: Partial<Levelup.CMS.V1.Storage.Entity.UploadedFile>;
306
306
  };
307
307
  }
308
308
  }
@@ -313,22 +313,22 @@ declare module Levelup {
313
313
  export namespace System {
314
314
  export namespace App {
315
315
  export type created = {
316
- data: Partial<Levelup.V2.System.Entity.App>;
316
+ data: Partial<Levelup.CMS.V1.System.Entity.App>;
317
317
  };
318
318
  export type updated = {
319
- data: Partial<Levelup.V2.System.Entity.App>;
319
+ data: Partial<Levelup.CMS.V1.System.Entity.App>;
320
320
  };
321
321
  export type deleted = {
322
- data: Partial<Levelup.V2.System.Entity.App>;
322
+ data: Partial<Levelup.CMS.V1.System.Entity.App>;
323
323
  };
324
324
  export type restored = {
325
- data: Partial<Levelup.V2.System.Entity.App>;
325
+ data: Partial<Levelup.CMS.V1.System.Entity.App>;
326
326
  };
327
327
  export type disabled = {
328
- data: Partial<Levelup.V2.System.Entity.App>;
328
+ data: Partial<Levelup.CMS.V1.System.Entity.App>;
329
329
  };
330
330
  export type enabled = {
331
- data: Partial<Levelup.V2.System.Entity.App>;
331
+ data: Partial<Levelup.CMS.V1.System.Entity.App>;
332
332
  };
333
333
  }
334
334
  }
@@ -16,7 +16,7 @@ declare module Levelup {
16
16
  export interface Scenario<T> {
17
17
  method: string;
18
18
  args: Record<string, any>;
19
- authData: Levelup.V2.Security.AuthData;
19
+ authData: Levelup.CMS.V1.Security.AuthData;
20
20
  execution: T
21
21
  }
22
22
  }
@@ -3,8 +3,8 @@ namespace Express {
3
3
 
4
4
  export interface Request {
5
5
  auth?: (
6
- | Levelup.V2.Security.JWTPaymentAuthPayload
7
- | Levelup.V2.Security.JWTUserAuthPayload
6
+ | Levelup.CMS.V1.Security.JWTPaymentAuthPayload
7
+ | Levelup.CMS.V1.Security.JWTUserAuthPayload
8
8
  ) & {
9
9
  iss?: string | undefined;
10
10
  sub?: string | undefined;
@@ -20,9 +20,9 @@ namespace Express {
20
20
 
21
21
  attached_entities: {
22
22
  token?: string;
23
- app?: Levelup.V2.System.Entity.App | null;
24
- user?: Levelup.V2.Users.Entity.User | null;
25
- api_key?: Levelup.V2.Auth.Entity.ExposedApiKey | null;
23
+ app?: Levelup.CMS.V1.System.Entity.App | null;
24
+ user?: Levelup.CMS.V1.Users.Entity.User | null;
25
+ api_key?: Levelup.CMS.V1.Auth.Entity.ExposedApiKey | null;
26
26
  service?: {
27
27
  name: string;
28
28
  is_external: boolean;
@@ -31,7 +31,7 @@ namespace Express {
31
31
 
32
32
  has_access_if?: {
33
33
  filters?: {
34
- user?: Levelup.V2.Utils.Common.ID;
34
+ user?: Levelup.CMS.V1.Utils.Common.ID;
35
35
  };
36
36
  condition?: () => boolean;
37
37
  } | null;
@@ -72,21 +72,21 @@ declare global {
72
72
  type TEnvironment = "production" | "development";
73
73
  type PathPrefix = '' | `/${string}`;
74
74
 
75
- type TResponseDatum<T extends { data?: object | Array<object>; } & Levelup.V2.Utils.Api.Response.DefaultResponse & Levelup.V2.Utils.Api.Response.PagedResponse> =
76
- Levelup.V2.Utils.NonUndefined<T['data']> extends Array<any> ? {
77
- data: Levelup.V2.Utils.NonUndefined<T['data']>;
78
- edge: Levelup.V2.Utils.NonUndefined<T['edge']>;
79
- pagination?: Levelup.V2.Utils.NonUndefined<Levelup.V2.Utils.Api.Response.PagedResponse['pagination']>;
75
+ type TResponseDatum<T extends { data?: object | Array<object>; } & Levelup.CMS.V1.Utils.Api.Response.DefaultResponse & Levelup.CMS.V1.Utils.Api.Response.PagedResponse> =
76
+ Levelup.CMS.V1.Utils.NonUndefined<T['data']> extends Array<any> ? {
77
+ data: Levelup.CMS.V1.Utils.NonUndefined<T['data']>;
78
+ edge: Levelup.CMS.V1.Utils.NonUndefined<T['edge']>;
79
+ pagination?: Levelup.CMS.V1.Utils.NonUndefined<Levelup.CMS.V1.Utils.Api.Response.PagedResponse['pagination']>;
80
80
  } : {
81
- data: Levelup.V2.Utils.NonUndefined<T['data']>;
82
- edge: Levelup.V2.Utils.NonUndefined<T['edge']>;
81
+ data: Levelup.CMS.V1.Utils.NonUndefined<T['data']>;
82
+ edge: Levelup.CMS.V1.Utils.NonUndefined<T['edge']>;
83
83
  };
84
84
 
85
85
  type IResponse = {
86
86
  data?: any;
87
87
  edge?: any;
88
- error?: Levelup.V2.Utils.Api.Response.Error;
89
- } & Levelup.V2.Utils.Api.Response.PagedResponse;
88
+ error?: Levelup.CMS.V1.Utils.Api.Response.Error;
89
+ } & Levelup.CMS.V1.Utils.Api.Response.PagedResponse;
90
90
 
91
91
  type IError = Error & object;
92
92
 
@@ -11,9 +11,9 @@ declare global {
11
11
  */
12
12
  current?: {
13
13
  token?: string;
14
- app?: Levelup.V2.System.Entity.App | null;
15
- user?: Levelup.V2.Users.Entity.User | null;
16
- api_key?: Levelup.V2.Auth.Entity.ExposedApiKey | null;
14
+ app?: Levelup.CMS.V1.System.Entity.App | null;
15
+ user?: Levelup.CMS.V1.Users.Entity.User | null;
16
+ api_key?: Levelup.CMS.V1.Auth.Entity.ExposedApiKey | null;
17
17
  service?: {
18
18
  name: string;
19
19
  is_external: boolean;
@@ -20,14 +20,14 @@ declare module Levelup {
20
20
  _id: string;
21
21
  tracking_id: string;
22
22
  role: string;
23
- space: Levelup.V2.Auth.Entity.TJWTTokenSpace;
23
+ space: Levelup.CMS.V1.Auth.Entity.TJWTTokenSpace;
24
24
  }
25
25
 
26
26
  export type JWTUserAuthPayload = {
27
27
  _id: string;
28
28
  tracking_id: string;
29
29
  role: string;
30
- space: Levelup.V2.Auth.Entity.TJWTTokenSpace;
30
+ space: Levelup.CMS.V1.Auth.Entity.TJWTTokenSpace;
31
31
  }
32
32
 
33
33
  }
@@ -13,8 +13,8 @@ declare module Levelup {
13
13
  * --------------------------------------------------------------------------
14
14
  * @link
15
15
  * @fires ApiKeysService.Create
16
- * @param {Levelup.V2.Auth.Api.ApiKeys.Create.Request} query
17
- * @returns {Levelup.V2.Auth.Api.ApiKeys.Create.Response}
16
+ * @param {Levelup.CMS.V1.Auth.Api.ApiKeys.Create.Request} query
17
+ * @returns {Levelup.CMS.V1.Auth.Api.ApiKeys.Create.Response}
18
18
  * @method POST
19
19
  *
20
20
  */
@@ -30,8 +30,8 @@ declare module Levelup {
30
30
  * --------------------------------------------------------------------------
31
31
  * @link
32
32
  * @fires ApiKeysService.Update
33
- * @param {Levelup.V2.Auth.Api.ApiKeys.Update.Request} query
34
- * @returns {Levelup.V2.Auth.Api.ApiKeys.Update.Response}
33
+ * @param {Levelup.CMS.V1.Auth.Api.ApiKeys.Update.Request} query
34
+ * @returns {Levelup.CMS.V1.Auth.Api.ApiKeys.Update.Response}
35
35
  * @method PUT
36
36
  *
37
37
  */
@@ -46,8 +46,8 @@ declare module Levelup {
46
46
  * --------------------------------------------------------------------------
47
47
  * @link
48
48
  * @fires ApiKeysService.Delete
49
- * @param {Levelup.V2.Auth.Api.ApiKeys.Delete.Request} query
50
- * @returns {Levelup.V2.Auth.Api.ApiKeys.Delete.Response}
49
+ * @param {Levelup.CMS.V1.Auth.Api.ApiKeys.Delete.Request} query
50
+ * @returns {Levelup.CMS.V1.Auth.Api.ApiKeys.Delete.Response}
51
51
  * @method DELETE
52
52
  *
53
53
  */
@@ -62,8 +62,8 @@ declare module Levelup {
62
62
  * --------------------------------------------------------------------------
63
63
  * @link
64
64
  * @fires ApiKeysService.BulkDelete
65
- * @param {Levelup.V2.Auth.Api.ApiKeys.BulkDelete.Request} query
66
- * @returns {Levelup.V2.Auth.Api.ApiKeys.BulkDelete.Response}
65
+ * @param {Levelup.CMS.V1.Auth.Api.ApiKeys.BulkDelete.Request} query
66
+ * @returns {Levelup.CMS.V1.Auth.Api.ApiKeys.BulkDelete.Response}
67
67
  * @method DELETE
68
68
  *
69
69
  */
@@ -83,8 +83,8 @@ declare module Levelup {
83
83
  * --------------------------------------------------------------------------
84
84
  * @link
85
85
  * @fires ApiKeysService.GetOne
86
- * @param {Levelup.V2.Auth.Api.ApiKeys.GetOne.Request} query
87
- * @returns {Levelup.V2.Auth.Api.ApiKeys.GetOne.Response}
86
+ * @param {Levelup.CMS.V1.Auth.Api.ApiKeys.GetOne.Request} query
87
+ * @returns {Levelup.CMS.V1.Auth.Api.ApiKeys.GetOne.Response}
88
88
  * @method GET
89
89
  *
90
90
  */
@@ -100,8 +100,8 @@ declare module Levelup {
100
100
  * --------------------------------------------------------------------------
101
101
  * @link
102
102
  * @fires ApiKeysService.List
103
- * @param {Levelup.V2.Auth.Api.ApiKeys.List.Request} query
104
- * @returns {Levelup.V2.Auth.Api.ApiKeys.List.Response}
103
+ * @param {Levelup.CMS.V1.Auth.Api.ApiKeys.List.Request} query
104
+ * @returns {Levelup.CMS.V1.Auth.Api.ApiKeys.List.Response}
105
105
  * @method GET
106
106
  *
107
107
  */
@@ -125,8 +125,8 @@ declare module Levelup {
125
125
  * --------------------------------------------------------------------------
126
126
  * @link
127
127
  * @fires ApiKeysService.GetByToken
128
- * @param {Levelup.V2.Auth.Api.ApiKeys.GetByToken.Request} query
129
- * @returns {Levelup.V2.Auth.Api.ApiKeys.GetByToken.Response}
128
+ * @param {Levelup.CMS.V1.Auth.Api.ApiKeys.GetByToken.Request} query
129
+ * @returns {Levelup.CMS.V1.Auth.Api.ApiKeys.GetByToken.Response}
130
130
  * @method GET
131
131
  *
132
132
  */