jourycms-sdk 1.0.2 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/containers/content/clients/article-types.client.d.ts +1 -1
- package/dist/containers/content/clients/article-types.client.d.ts.map +1 -1
- package/dist/containers/content/clients/article-types.client.js +6 -6
- package/dist/containers/content/clients/articles.client.d.ts +2 -2
- package/dist/containers/content/clients/articles.client.d.ts.map +1 -1
- package/dist/containers/content/clients/articles.client.js +6 -6
- package/dist/containers/content/clients/taxonomies.client.d.ts +1 -1
- package/dist/containers/content/clients/taxonomies.client.d.ts.map +1 -1
- package/dist/containers/content/clients/taxonomies.client.js +3 -3
- package/dist/containers/content/clients/terms.client.d.ts +1 -1
- package/dist/containers/content/clients/terms.client.d.ts.map +1 -1
- package/dist/containers/content/clients/terms.client.js +3 -3
- package/package.json +1 -1
- package/typings/v1/cache-manager/entity.d.ts +12 -1
- package/typings/v1/index.d.ts +1 -0
- package/typings/v1/services/auth/api/auth.d.ts +5 -1
- package/typings/v1/services/auth/entities/role.d.ts +7 -1
- package/typings/v1/services/auth/entities/user.d.ts +1 -56
- package/typings/v1/services/content/api/article.d.ts +3 -2
- package/typings/v1/services/content/entities/article-type.d.ts +2 -2
- package/typings/v1/services/content/entities/article.d.ts +3 -5
- package/typings/v1/services/content/entities/comment.d.ts +1 -1
- package/typings/v1/services/content/entities/custom-fieds/custom-field.d.ts +160 -0
- package/typings/v1/services/content/entities/custom-fieds/fields/article_object.custom-field.d.ts +27 -0
- package/typings/v1/services/content/entities/custom-fieds/fields/boolean.custom-field.d.ts +22 -0
- package/typings/v1/services/content/entities/custom-fieds/fields/checkbox.custom-field.d.ts +24 -0
- package/typings/v1/{ui/forms/article → services/content/entities}/custom-fieds/fields/date.custom-field.d.ts +2 -4
- package/typings/v1/{ui/forms/article → services/content/entities}/custom-fieds/fields/date_range.custom-field.d.ts +2 -4
- package/typings/v1/{ui/forms/article → services/content/entities}/custom-fieds/fields/file.custom-field.d.ts +2 -4
- package/typings/v1/{ui/forms/article → services/content/entities}/custom-fieds/fields/image.custom-field.d.ts +2 -4
- package/typings/v1/{ui/forms/article → services/content/entities}/custom-fieds/fields/number.custom-field.d.ts +2 -4
- package/typings/v1/{ui/forms/article → services/content/entities}/custom-fieds/fields/radiobox.custom-field.d.ts +5 -7
- package/typings/v1/services/content/entities/custom-fieds/fields/select.custom-field.d.ts +25 -0
- package/typings/v1/services/content/entities/custom-fieds/fields/text.custom-field.d.ts +24 -0
- package/typings/v1/services/content/entities/custom-fieds/fields/time.custom-field.d.ts +22 -0
- package/typings/v1/services/content/entities/custom-fieds/index.d.ts +2 -0
- package/typings/v1/services/content/entities/review.d.ts +1 -1
- package/typings/v1/services/content/entities/taxonomy.d.ts +1 -1
- package/typings/v1/services/content/entities/term.d.ts +1 -1
- package/typings/v1/services/storage/entities/uploaded-file.d.ts +0 -2
- package/typings/v1/services/system/entities/config.d.ts +40 -0
- package/typings/v1/theme/component.d.ts +9 -0
- package/typings/v1/theme/index.d.ts +3 -0
- package/typings/v1/theme/layout.d.ts +10 -0
- package/typings/v1/theme/page.d.ts +9 -0
- package/typings/v1/ui/forms/article/index.d.ts +0 -1
- package/typings/v1/ui/routes/icons.d.ts +28 -0
- package/typings/v1/ui/routes/index.d.ts +1 -0
- package/typings/v1/ui/routes/routes.d.ts +0 -19
- package/typings/v1/utils/api/request.d.ts +34 -31
- package/typings/v1/utils/api/response.d.ts +20 -54
- package/typings/v1/utils/common/common.d.ts +5 -0
- package/typings/v1/utils/entities/snapshots.d.ts +0 -11
- package/typings/v1/utils/system/models.d.ts +18 -16
- package/typings/v1/utils/utils.d.ts +3 -0
- package/typings/v1/ui/forms/article/custom-fieds/custom-field.d.ts +0 -189
- package/typings/v1/ui/forms/article/custom-fieds/fields/article_object.custom-field.d.ts +0 -29
- package/typings/v1/ui/forms/article/custom-fieds/fields/boolean.custom-field.d.ts +0 -24
- package/typings/v1/ui/forms/article/custom-fieds/fields/checkbox.custom-field.d.ts +0 -26
- package/typings/v1/ui/forms/article/custom-fieds/fields/select.custom-field.d.ts +0 -27
- package/typings/v1/ui/forms/article/custom-fieds/fields/text.custom-field.d.ts +0 -26
- package/typings/v1/ui/forms/article/custom-fieds/fields/time.custom-field.d.ts +0 -24
- package/typings/v1/ui/forms/article/custom-fieds/index.d.ts +0 -1
- /package/typings/v1/{ui/forms/article → services/content/entities}/custom-fieds/fields/index.d.ts +0 -0
@@ -9,7 +9,7 @@ export default class ArticleTypesClient extends BaseClient {
|
|
9
9
|
restore(id: string, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.Delete.Response>>;
|
10
10
|
list(query: ApiAlias.List.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.List.Response>>;
|
11
11
|
getById(id: string, params?: ApiAlias.GetOne.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.GetOne.Response>>;
|
12
|
-
getByTrackingId(tracking_id: string, params?: ApiAlias.GetOne.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.GetOne.Response>>;
|
13
12
|
getByName(name: string, params?: ApiAlias.GetOne.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.GetOne.Response>>;
|
13
|
+
getBySlug(name: string, params?: ApiAlias.GetOne.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.GetOne.Response>>;
|
14
14
|
}
|
15
15
|
//# sourceMappingURL=article-types.client.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"article-types.client.d.ts","sourceRoot":"","sources":["../../../../src/containers/content/clients/article-types.client.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAE9C,OAAO,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC;AAEhC,OAAO,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC;AAG1D,MAAM,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AAG,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAOpH,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAOzI,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAO7I,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;CAMpJ"}
|
@@ -44,15 +44,15 @@ class ArticleTypesClient extends base_client_1.default {
|
|
44
44
|
headers: this.container.sdk.generateHeadersFromRequestConfig(config)
|
45
45
|
});
|
46
46
|
}
|
47
|
-
//
|
48
|
-
async
|
49
|
-
return await this.container.sdk.httpClient.get(this.generatePrefix("/by-
|
47
|
+
// getByName
|
48
|
+
async getByName(name, params, config) {
|
49
|
+
return await this.container.sdk.httpClient.get(this.generatePrefix("/by-name/:name", { name }), params, {
|
50
50
|
headers: this.container.sdk.generateHeadersFromRequestConfig(config)
|
51
51
|
});
|
52
52
|
}
|
53
|
-
//
|
54
|
-
async
|
55
|
-
return await this.container.sdk.httpClient.get(this.generatePrefix(`/by-
|
53
|
+
// getBySlug
|
54
|
+
async getBySlug(name, params, config) {
|
55
|
+
return await this.container.sdk.httpClient.get(this.generatePrefix(`/by-slug/${name}`), params, {
|
56
56
|
headers: this.container.sdk.generateHeadersFromRequestConfig(config)
|
57
57
|
});
|
58
58
|
}
|
@@ -9,7 +9,7 @@ export default class ArticlesClient extends BaseClient {
|
|
9
9
|
restore(id: string, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.Delete.Response>>;
|
10
10
|
list(query: ApiAlias.List.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.List.Response>>;
|
11
11
|
getById(id: string, params?: ApiAlias.GetOne.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.GetOne.Response>>;
|
12
|
-
|
13
|
-
|
12
|
+
getByName(tracking_id: string, params?: ApiAlias.GetOne.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.GetOne.Response>>;
|
13
|
+
getBySlug(name: string, params?: ApiAlias.GetOne.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.GetOne.Response>>;
|
14
14
|
}
|
15
15
|
//# sourceMappingURL=articles.client.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"articles.client.d.ts","sourceRoot":"","sources":["../../../../src/containers/content/clients/articles.client.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAE9C,OAAO,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC;AAEhC,OAAO,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC;AAGtD,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,UAAU;gBAGxC,SAAS,EAAE,GAAG,CAAC,iBAAiB;IAKtC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,GA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AAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAOzI,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAOpJ,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;CAMpJ"}
|
@@ -44,15 +44,15 @@ class ArticlesClient extends base_client_1.default {
|
|
44
44
|
headers: this.container.sdk.generateHeadersFromRequestConfig(config)
|
45
45
|
});
|
46
46
|
}
|
47
|
-
//
|
48
|
-
async
|
49
|
-
return await this.container.sdk.httpClient.get(this.generatePrefix("/by-
|
47
|
+
// getByName
|
48
|
+
async getByName(tracking_id, params, config) {
|
49
|
+
return await this.container.sdk.httpClient.get(this.generatePrefix("/by-name/:tracking_id", { tracking_id }), params, {
|
50
50
|
headers: this.container.sdk.generateHeadersFromRequestConfig(config)
|
51
51
|
});
|
52
52
|
}
|
53
|
-
//
|
54
|
-
async
|
55
|
-
return await this.container.sdk.httpClient.get(this.generatePrefix(`/by-
|
53
|
+
// getBySlug
|
54
|
+
async getBySlug(name, params, config) {
|
55
|
+
return await this.container.sdk.httpClient.get(this.generatePrefix(`/by-slug/${name}`), params, {
|
56
56
|
headers: this.container.sdk.generateHeadersFromRequestConfig(config)
|
57
57
|
});
|
58
58
|
}
|
@@ -9,7 +9,7 @@ export default class TaxonomiesClient extends BaseClient {
|
|
9
9
|
restore(id: string, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.Delete.Response>>;
|
10
10
|
list(query: ApiAlias.List.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.List.Response>>;
|
11
11
|
getById(id: string, params?: ApiAlias.GetOne.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.GetOne.Response>>;
|
12
|
-
|
12
|
+
getBySlug(tracking_id: string, params?: ApiAlias.GetOne.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.GetOne.Response>>;
|
13
13
|
getByName(name: string, params?: ApiAlias.GetOne.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.GetOne.Response>>;
|
14
14
|
}
|
15
15
|
//# sourceMappingURL=taxonomies.client.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"taxonomies.client.d.ts","sourceRoot":"","sources":["../../../../src/containers/content/clients/taxonomies.client.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAE9C,OAAO,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC;AAEhC,OAAO,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;AAGxD,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,UAAU;gBAG1C,SAAS,EAAE,GAAG,CAAC,iBAAiB;IAKtC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAOzH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAA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AAC;IAOzI,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAOpJ,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;CAMpJ"}
|
@@ -44,9 +44,9 @@ class TaxonomiesClient extends base_client_1.default {
|
|
44
44
|
headers: this.container.sdk.generateHeadersFromRequestConfig(config)
|
45
45
|
});
|
46
46
|
}
|
47
|
-
//
|
48
|
-
async
|
49
|
-
return await this.container.sdk.httpClient.get(this.generatePrefix("/by-
|
47
|
+
// getBySlug
|
48
|
+
async getBySlug(tracking_id, params, config) {
|
49
|
+
return await this.container.sdk.httpClient.get(this.generatePrefix("/by-slug/:tracking_id", { tracking_id }), params, {
|
50
50
|
headers: this.container.sdk.generateHeadersFromRequestConfig(config)
|
51
51
|
});
|
52
52
|
}
|
@@ -9,7 +9,7 @@ export default class TermsClient extends BaseClient {
|
|
9
9
|
restore(id: string, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.Delete.Response>>;
|
10
10
|
list(query: ApiAlias.List.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.List.Response>>;
|
11
11
|
getById(id: string, params?: ApiAlias.GetOne.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.GetOne.Response>>;
|
12
|
-
|
12
|
+
getBySlug(slug: string, params?: ApiAlias.GetOne.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.GetOne.Response>>;
|
13
13
|
getByName(name: string, params?: ApiAlias.GetOne.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.GetOne.Response>>;
|
14
14
|
}
|
15
15
|
//# sourceMappingURL=terms.client.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"terms.client.d.ts","sourceRoot":"","sources":["../../../../src/containers/content/clients/terms.client.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAE9C,OAAO,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC;AAEhC,OAAO,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC;AAGnD,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,UAAU;gBAGrC,SAAS,EAAE,GAAG,CAAC,iBAAiB;IAKtC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAOzH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAOrI,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAOtG,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,cAA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,MAAM,CAAC,QAAQ,CAAC,CAAC;CAMpJ"}
|
@@ -44,9 +44,9 @@ class TermsClient extends base_client_1.default {
|
|
44
44
|
headers: this.container.sdk.generateHeadersFromRequestConfig(config)
|
45
45
|
});
|
46
46
|
}
|
47
|
-
//
|
48
|
-
async
|
49
|
-
return await this.container.sdk.httpClient.get(this.generatePrefix("/by-tracking-id/:
|
47
|
+
// getBySlug
|
48
|
+
async getBySlug(slug, params, config) {
|
49
|
+
return await this.container.sdk.httpClient.get(this.generatePrefix("/by-tracking-id/:slug", { slug }), params, {
|
50
50
|
headers: this.container.sdk.generateHeadersFromRequestConfig(config)
|
51
51
|
});
|
52
52
|
}
|
package/package.json
CHANGED
@@ -59,13 +59,24 @@ declare module Levelup {
|
|
59
59
|
: // system
|
60
60
|
E extends "app"
|
61
61
|
? System.Api.Apps.List.Request
|
62
|
+
|
63
|
+
: // content
|
64
|
+
E extends "article"
|
65
|
+
? Content.Api.Articles.List.Request
|
66
|
+
: E extends "articleType"
|
67
|
+
? Content.Api.ArticleTypes.List.Request
|
68
|
+
: E extends "taxonomy"
|
69
|
+
? Content.Api.Taxonomies.List.Request
|
70
|
+
: E extends "term"
|
71
|
+
? Content.Api.Terms.List.Request
|
72
|
+
|
62
73
|
: never;
|
63
74
|
|
64
75
|
|
65
76
|
|
66
77
|
|
67
78
|
export type TListQueryParams<E extends TEntity> =
|
68
|
-
E extends Levelup.CMS.V1.
|
79
|
+
E extends Levelup.CMS.V1.Utils.SystemStructure.Models.AllModels
|
69
80
|
? Levelup.CMS.V1.CacheManager.TLevelupListQueryParams<E>
|
70
81
|
: never;
|
71
82
|
}
|
package/typings/v1/index.d.ts
CHANGED
@@ -18,7 +18,11 @@ declare module Levelup {
|
|
18
18
|
export namespace Signup {
|
19
19
|
export type Request =
|
20
20
|
Levelup.CMS.V1.Utils.Api.Request.BuildCreateRequest<{
|
21
|
-
|
21
|
+
account_type: 'agency' | 'doctor' | 'escort';
|
22
|
+
address: Utils.Entity.Snapshots.Locations.Address;
|
23
|
+
first_name: string;
|
24
|
+
family_name: string;
|
25
|
+
sex: Users.Entity.Sex | null;
|
22
26
|
email: string;
|
23
27
|
password: string;
|
24
28
|
}>;
|
@@ -3,9 +3,15 @@ declare module Levelup {
|
|
3
3
|
namespace V1 {
|
4
4
|
namespace Auth {
|
5
5
|
export namespace Entity {
|
6
|
+
|
7
|
+
export type TDefaultUserRoles =
|
8
|
+
| "admin"
|
9
|
+
| "agency"
|
10
|
+
| "escort"
|
11
|
+
| "doctor"
|
6
12
|
export interface Role
|
7
13
|
extends Utils.Entity.General.ICreatable,
|
8
|
-
|
14
|
+
Utils.Entity.General.IHasSearchMeta {
|
9
15
|
_id: Utils.Common.ID;
|
10
16
|
is_system: boolean;
|
11
17
|
is_company_related: boolean;
|
@@ -14,8 +14,6 @@ declare module Levelup {
|
|
14
14
|
phones: string[];
|
15
15
|
website: string | null;
|
16
16
|
address: Utils.Entity.Snapshots.Locations.Address;
|
17
|
-
has_work_address: boolean;
|
18
|
-
work_address: Utils.Entity.Snapshots.Locations.Address | null;
|
19
17
|
social_links?: {
|
20
18
|
network: Utils.Common.SocialNetworks;
|
21
19
|
url: string;
|
@@ -45,15 +43,6 @@ declare module Levelup {
|
|
45
43
|
export interface IUserInsights {
|
46
44
|
last_updated: Date | null;
|
47
45
|
rating: number;
|
48
|
-
parcel_count: number;
|
49
|
-
delivered_parcel_count: number;
|
50
|
-
returned_parcel_count: number;
|
51
|
-
delivered_parcel_percentage: number;
|
52
|
-
returned_parcel_percentage: number;
|
53
|
-
complaint_count: number;
|
54
|
-
resolved_complaint_count: number;
|
55
|
-
resolved_complaint_percentage: number;
|
56
|
-
balance: number;
|
57
46
|
}
|
58
47
|
|
59
48
|
export interface IUserAttributes {
|
@@ -63,54 +52,11 @@ declare module Levelup {
|
|
63
52
|
inactive_since?: Date | null;
|
64
53
|
|
65
54
|
nid?: string | null;
|
66
|
-
driving_license_id?: string | null;
|
67
55
|
started_at?: Date | null;
|
68
|
-
|
69
|
-
multi_office_user?: {
|
70
|
-
is_related_to_offices?: boolean;
|
71
|
-
can_manage_all_offices?: boolean;
|
72
|
-
subscribed_at_office?: Utils.Common.ID | null;
|
73
|
-
managed_offices?: Utils.Common.ID[];
|
74
|
-
last_managed_office?: Utils.Common.ID | null;
|
75
|
-
} | null;
|
76
|
-
|
77
|
-
seller?: {
|
78
|
-
stores: Utils.Common.ID[];
|
79
|
-
last_managed_store?: Utils.Common.ID;
|
80
|
-
} | null;
|
81
|
-
|
82
|
-
deliverer?: {
|
83
|
-
countries?: Utils.Common.LocationAdministrativeCode[];
|
84
|
-
states?: Utils.Common.LocationAdministrativeCode[];
|
85
|
-
cities?: Utils.Common.LocationAdministrativeCode[];
|
86
|
-
is_freelancer?: boolean;
|
87
|
-
default_delivery_fees?: number;
|
88
|
-
delivery_fees?: {
|
89
|
-
city: {
|
90
|
-
country: Utils.Common.LocationAdministrativeCode;
|
91
|
-
state: Utils.Common.LocationAdministrativeCode;
|
92
|
-
city: Utils.Common.LocationAdministrativeCode;
|
93
|
-
};
|
94
|
-
is_default: boolean;
|
95
|
-
fees: number;
|
96
|
-
}[];
|
97
|
-
} | null;
|
98
|
-
|
99
|
-
team?: {
|
100
|
-
has_team: boolean;
|
101
|
-
team?: {
|
102
|
-
leader: string;
|
103
|
-
members: string[];
|
104
|
-
};
|
105
|
-
};
|
56
|
+
related_article?: string | null;
|
106
57
|
}
|
107
58
|
|
108
59
|
export interface IUserSnapshots {
|
109
|
-
stores?: Utils.Entity.Snapshots.Accounts.Store[];
|
110
|
-
company?: Utils.Entity.Snapshots.Accounts.Company;
|
111
|
-
offices?: Utils.Entity.Snapshots.Logistics.Office[];
|
112
|
-
team_leader?: Utils.Entity.Snapshots.Auth.User;
|
113
|
-
team_members?: Utils.Entity.Snapshots.Auth.User[];
|
114
60
|
}
|
115
61
|
|
116
62
|
export interface User
|
@@ -128,7 +74,6 @@ declare module Levelup {
|
|
128
74
|
|
129
75
|
profile: IUserProfile;
|
130
76
|
preferences?: IUserPreferences;
|
131
|
-
deliverer_data?: IDelivererData;
|
132
77
|
attributes: IUserAttributes;
|
133
78
|
snapshots?: IUserSnapshots;
|
134
79
|
insights?: IUserInsights;
|
@@ -73,7 +73,7 @@ declare module Levelup {
|
|
73
73
|
export namespace GetOne {
|
74
74
|
export type Request = Utils.Api.Request.Build<{}>;
|
75
75
|
export type Response<T extends Entity.Article = Entity.Article> =
|
76
|
-
Utils.Api.Response.BuildSingleItemResponse<T>;
|
76
|
+
Utils.Api.Response.BuildSingleItemResponse<T, 'users' | 'article_types' | 'linked_articles'>;
|
77
77
|
}
|
78
78
|
|
79
79
|
/**
|
@@ -95,10 +95,11 @@ declare module Levelup {
|
|
95
95
|
Entity.Article & {
|
96
96
|
tag: any;
|
97
97
|
tag_slug: any;
|
98
|
+
populate_linked_articles: Utils.Api.Request.TProjectableFields<Entity.Article>[] | boolean;
|
98
99
|
}
|
99
100
|
>;
|
100
101
|
export type Response<T extends Entity.Article = Entity.Article> =
|
101
|
-
Utils.Api.Response.BuildListResponse<T>;
|
102
|
+
Utils.Api.Response.BuildListResponse<T, 'users' | 'article_types' | 'linked_articles'>;
|
102
103
|
}
|
103
104
|
}
|
104
105
|
}
|
@@ -6,7 +6,7 @@ declare module Levelup {
|
|
6
6
|
type ICustomMetaField = {
|
7
7
|
field_key: string;
|
8
8
|
field_label: string;
|
9
|
-
field_type:
|
9
|
+
field_type: CustomFields.CustomFieldType;
|
10
10
|
field_options: {
|
11
11
|
[Key: string]: any;
|
12
12
|
};
|
@@ -36,7 +36,7 @@ declare module Levelup {
|
|
36
36
|
};
|
37
37
|
description: string;
|
38
38
|
description_unformatted: string;
|
39
|
-
description_structured:
|
39
|
+
description_structured: JSONContent;
|
40
40
|
|
41
41
|
custom_meta_fields: ICustomMetaField[];
|
42
42
|
related_taxonomies: Utils.Common.ID[];
|
@@ -18,7 +18,7 @@ declare module Levelup {
|
|
18
18
|
|
19
19
|
export interface Article
|
20
20
|
extends Utils.Entity.General.ICreatable,
|
21
|
-
|
21
|
+
Utils.Entity.General.IHasSearchMeta {
|
22
22
|
_type: Utils.Common.ID | null;
|
23
23
|
_id: Utils.Common.ID;
|
24
24
|
slug: string;
|
@@ -26,13 +26,11 @@ declare module Levelup {
|
|
26
26
|
body: string;
|
27
27
|
body_unformatted: string;
|
28
28
|
body_structured: { [Key: string]: any };
|
29
|
-
|
29
|
+
is_published: boolean;
|
30
|
+
published_at: Date | null;
|
30
31
|
is_featured: boolean;
|
31
|
-
|
32
32
|
featured_image: Utils.Common.FileAttribute | null;
|
33
|
-
|
34
33
|
article_type: Utils.Common.ID;
|
35
|
-
|
36
34
|
related_tags: {
|
37
35
|
_id: Utils.Common.ID;
|
38
36
|
taxonomy: Utils.Common.ID;
|
@@ -0,0 +1,160 @@
|
|
1
|
+
declare module Levelup {
|
2
|
+
|
3
|
+
namespace CMS {
|
4
|
+
namespace V1 {
|
5
|
+
export namespace Content {
|
6
|
+
export namespace CustomFields {
|
7
|
+
export type AnyField = keyof OptionTypes;
|
8
|
+
export type FieldType = keyof FilterMenu.OptionTypes;
|
9
|
+
export type OptionType<FieldType> = OptionTypes[FieldType];
|
10
|
+
type ExtendFieldProps<T> = T &
|
11
|
+
Partial<{
|
12
|
+
}>;
|
13
|
+
|
14
|
+
type BaseFieldOption<Input, IsMulti extends boolean = false> = {
|
15
|
+
label?: string;
|
16
|
+
required?: boolean;
|
17
|
+
default_value?: IsMulti extends true ? Utils.Common.MultiValue<Input> : Utils.Common.SingleValue<Input>;
|
18
|
+
}
|
19
|
+
|
20
|
+
type CustomFieldType =
|
21
|
+
| 'article_object'
|
22
|
+
| 'boolean'
|
23
|
+
| 'checkbox'
|
24
|
+
| 'date_range'
|
25
|
+
| 'date'
|
26
|
+
| 'file'
|
27
|
+
| 'image'
|
28
|
+
| 'number'
|
29
|
+
| 'radiobox'
|
30
|
+
| 'select'
|
31
|
+
| 'text'
|
32
|
+
| 'time';
|
33
|
+
|
34
|
+
|
35
|
+
|
36
|
+
type MetaFieldInput<T extends CustomFieldType, IsMulti extends boolean = false> =
|
37
|
+
T extends 'article_object' ? ArticleObjectField.Input<IsMulti> :
|
38
|
+
T extends 'boolean' ? BooleanField.Input :
|
39
|
+
T extends 'checkbox' ? CheckboxField.Input :
|
40
|
+
T extends 'date_range' ? DateRangeField.Input :
|
41
|
+
T extends 'date' ? DateField.Input :
|
42
|
+
T extends 'file' ? FileField.Input<IsMulti> :
|
43
|
+
T extends 'image' ? ImageField.Input<IsMulti> :
|
44
|
+
T extends 'number' ? NumberField.Input :
|
45
|
+
T extends 'radiobox' ? RadioboxField.Input :
|
46
|
+
T extends 'select' ? SelectField.Input<IsMulti> :
|
47
|
+
T extends 'text' ? TextField.Input :
|
48
|
+
T extends 'time' ? TimeField.Input :
|
49
|
+
never;
|
50
|
+
|
51
|
+
type MetaFieldOutput<T extends CustomFieldType, IsMulti extends boolean = false> =
|
52
|
+
T extends 'article_object' ? ArticleObjectField.Output<IsMulti> :
|
53
|
+
T extends 'boolean' ? BooleanField.Output :
|
54
|
+
T extends 'checkbox' ? CheckboxField.Output :
|
55
|
+
T extends 'date_range' ? DateRangeField.Output :
|
56
|
+
T extends 'date' ? DateField.Output :
|
57
|
+
T extends 'file' ? FileField.Output<IsMulti> :
|
58
|
+
T extends 'image' ? ImageField.Output<IsMulti> :
|
59
|
+
T extends 'number' ? NumberField.Output :
|
60
|
+
T extends 'radiobox' ? RadioboxField.Output :
|
61
|
+
T extends 'select' ? SelectField.Output<IsMulti> :
|
62
|
+
T extends 'text' ? TextField.Output :
|
63
|
+
T extends 'time' ? TimeField.Output :
|
64
|
+
never;
|
65
|
+
|
66
|
+
type MetaField<T extends CustomFieldType, IsMulti extends boolean = false> = {
|
67
|
+
field_key: string;
|
68
|
+
field_label: string;
|
69
|
+
field_type: T;
|
70
|
+
field_options: T extends 'article_object' ? ArticleObjectField.Options<IsMulti> :
|
71
|
+
T extends 'boolean' ? BooleanField.Options :
|
72
|
+
T extends 'checkbox' ? CheckboxField.Options :
|
73
|
+
T extends 'date_range' ? DateRangeField.Options :
|
74
|
+
T extends 'date' ? DateField.Options :
|
75
|
+
T extends 'file' ? FileField.Options<IsMulti> :
|
76
|
+
T extends 'image' ? ImageField.Options<IsMulti> :
|
77
|
+
T extends 'number' ? NumberField.Options :
|
78
|
+
T extends 'radiobox' ? RadioboxField.Options :
|
79
|
+
T extends 'select' ? SelectField.Options<IsMulti> :
|
80
|
+
T extends 'text' ? TextField.Options :
|
81
|
+
T extends 'time' ? TimeField.Options :
|
82
|
+
never;
|
83
|
+
}
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
export namespace Forms {
|
88
|
+
|
89
|
+
|
90
|
+
export type OnChangeValue<
|
91
|
+
Option,
|
92
|
+
IsMulti extends boolean
|
93
|
+
> = IsMulti extends true ? Utils.Common.MultiValue<Option> : Utils.Common.SingleValue<Option>;
|
94
|
+
|
95
|
+
|
96
|
+
export type Field<
|
97
|
+
T extends keyof OptionTypes,
|
98
|
+
IsMulti extends boolean = false
|
99
|
+
> =
|
100
|
+
| ExtendFieldProps<{
|
101
|
+
label: string;
|
102
|
+
isMulti?: false;
|
103
|
+
value: Utils.Common.SingleValue<OptionType<T>>;
|
104
|
+
type: T;
|
105
|
+
source?:
|
106
|
+
| string[];
|
107
|
+
}>
|
108
|
+
| ExtendFieldProps<{
|
109
|
+
label: string;
|
110
|
+
isMulti?: true;
|
111
|
+
value: Utils.Common.MultiValue<OptionType<T>>;
|
112
|
+
type: T;
|
113
|
+
source?:
|
114
|
+
| string[];
|
115
|
+
}>;
|
116
|
+
|
117
|
+
export type Fields<
|
118
|
+
T extends { [field: string]: Field } = { [field: string]: Field }
|
119
|
+
> = { [field: string]: Field };
|
120
|
+
|
121
|
+
export type FilterValue<T> = {
|
122
|
+
[property in keyof T]: T[property]["value"];
|
123
|
+
};
|
124
|
+
|
125
|
+
export type ComponentProps<
|
126
|
+
T extends Fields = { [field: string]: Field }
|
127
|
+
> = {
|
128
|
+
filter: T;
|
129
|
+
onChange: (
|
130
|
+
value: FilterValue<T>,
|
131
|
+
label: {
|
132
|
+
[field: string]: {
|
133
|
+
label: string;
|
134
|
+
value: LabelType;
|
135
|
+
};
|
136
|
+
}
|
137
|
+
) => void;
|
138
|
+
type?: TComponentType;
|
139
|
+
controlsPosition?: "both" | "bottom" | "top";
|
140
|
+
className?: string;
|
141
|
+
clearField?: (field: string) => void;
|
142
|
+
clearAll?: () => void;
|
143
|
+
omitFields?: Array<keyof T>;
|
144
|
+
};
|
145
|
+
|
146
|
+
type MetaFieldInputProps<T extends CustomFieldType, IsMulti extends boolean = false> = {
|
147
|
+
label: string;
|
148
|
+
required: MetaField<T, IsMulti>['field_options']['required'];
|
149
|
+
default_value: MetaField<T, IsMulti>['field_options']['default_value'] | null;
|
150
|
+
options: MetaField<T, IsMulti>['field_options'];
|
151
|
+
value: MetaFieldInput<T, IsMulti>;
|
152
|
+
onChange: (value: MetaFieldInput<T, IsMulti>) => void | PromiseLike<void>;
|
153
|
+
}
|
154
|
+
}
|
155
|
+
}
|
156
|
+
}
|
157
|
+
}
|
158
|
+
}
|
159
|
+
}
|
160
|
+
|
package/typings/v1/services/content/entities/custom-fieds/fields/article_object.custom-field.d.ts
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
declare module Levelup {
|
2
|
+
|
3
|
+
namespace CMS {
|
4
|
+
namespace V1 {
|
5
|
+
export namespace Content {
|
6
|
+
export namespace CustomFields {
|
7
|
+
export namespace ArticleObjectField {
|
8
|
+
|
9
|
+
export type Key = "article_object";
|
10
|
+
|
11
|
+
export type Input<IsMulti extends boolean = false> = IsMulti extends true ? Utils.Common.ID[] : Utils.Common.ID | null;
|
12
|
+
|
13
|
+
export type Output<IsMulti extends boolean = false> = IsMulti extends true
|
14
|
+
? Content.Entity.Article[]
|
15
|
+
: Content.Entity.Article | null;
|
16
|
+
|
17
|
+
export type Options<IsMulti extends boolean = false> = BaseFieldOption<Input, IsMulti> & {
|
18
|
+
multiple: IsMulti;
|
19
|
+
type: Utils.Common.Name;
|
20
|
+
filter: Content.Api.Articles.List.Request['filters'];
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
27
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
declare module Levelup {
|
2
|
+
|
3
|
+
namespace CMS {
|
4
|
+
namespace V1 {
|
5
|
+
export namespace Content {
|
6
|
+
export namespace CustomFields {
|
7
|
+
export namespace BooleanField {
|
8
|
+
|
9
|
+
export type Key = "boolean";
|
10
|
+
|
11
|
+
export type Input = boolean;
|
12
|
+
|
13
|
+
export type Output = boolean;
|
14
|
+
|
15
|
+
export type Options = BaseFieldOption<Input, false> & {
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
declare module Levelup {
|
2
|
+
|
3
|
+
namespace CMS {
|
4
|
+
namespace V1 {
|
5
|
+
export namespace Content {
|
6
|
+
export namespace CustomFields {
|
7
|
+
export namespace CheckboxField {
|
8
|
+
|
9
|
+
|
10
|
+
export type Key = "checkbox";
|
11
|
+
|
12
|
+
export type Input = Utils.Common.MultiValue<string>;
|
13
|
+
|
14
|
+
export type Output = Utils.Common.MultiValue<Utils.Common.TLabelValue>;
|
15
|
+
|
16
|
+
export type Options = BaseFieldOption<Input, false> & {
|
17
|
+
choices: Utils.Common.MultiValue<Utils.Common.TLabelValue>
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|