@commercetools-frontend/constants 21.23.6 → 21.23.7
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.
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
// NOTE: This string will be replaced on build time with the package version.
|
|
6
|
-
var version = "21.23.
|
|
6
|
+
var version = "21.23.7";
|
|
7
7
|
|
|
8
8
|
// DOM elements
|
|
9
9
|
var PORTALS_CONTAINER_ID = 'portals-container'; // Links
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
// NOTE: This string will be replaced on build time with the package version.
|
|
6
|
-
var version = "21.23.
|
|
6
|
+
var version = "21.23.7";
|
|
7
7
|
|
|
8
8
|
// DOM elements
|
|
9
9
|
var PORTALS_CONTAINER_ID = 'portals-container'; // Links
|
|
@@ -29,49 +29,49 @@ export declare const NOTIFICATION_KINDS_PAGE: {
|
|
|
29
29
|
readonly 'unexpected-error': "unexpected-error";
|
|
30
30
|
readonly 'api-error': "api-error";
|
|
31
31
|
};
|
|
32
|
-
export
|
|
32
|
+
export type TAppNotificationDomain = (typeof NOTIFICATION_DOMAINS)[keyof typeof NOTIFICATION_DOMAINS];
|
|
33
33
|
export declare const DOMAINS: {
|
|
34
34
|
readonly GLOBAL: "global";
|
|
35
35
|
readonly PAGE: "page";
|
|
36
36
|
readonly SIDE: "side";
|
|
37
37
|
};
|
|
38
|
-
export
|
|
39
|
-
export
|
|
40
|
-
export
|
|
41
|
-
export
|
|
42
|
-
export
|
|
38
|
+
export type TAppNotificationKindSide = (typeof NOTIFICATION_KINDS_SIDE)[keyof typeof NOTIFICATION_KINDS_SIDE];
|
|
39
|
+
export type TAppNotificationKindGlobal = (typeof NOTIFICATION_KINDS_GLOBAL)[keyof typeof NOTIFICATION_KINDS_GLOBAL];
|
|
40
|
+
export type TAppNotificationKindPage = (typeof NOTIFICATION_KINDS_PAGE)[keyof typeof NOTIFICATION_KINDS_PAGE];
|
|
41
|
+
export type TAppNotificationKind = TAppNotificationKindSide | TAppNotificationKindGlobal | TAppNotificationKindPage;
|
|
42
|
+
export type TAppNotificationOfDomain = {
|
|
43
43
|
domain: TAppNotificationDomain;
|
|
44
44
|
};
|
|
45
|
-
export
|
|
45
|
+
export type TAppNotificationOfKind<T extends TAppNotificationOfDomain> = TAppNotificationOfDomain & {
|
|
46
46
|
kind: 'global' extends T['domain'] ? TAppNotificationKindGlobal : 'page' extends T['domain'] ? TAppNotificationKindPage : 'side' extends T['domain'] ? TAppNotificationKindSide : never;
|
|
47
47
|
};
|
|
48
|
-
export
|
|
48
|
+
export type TAppNotificationApiError<ExtraFields extends {} = {}> = {
|
|
49
49
|
message: string;
|
|
50
50
|
code?: string;
|
|
51
51
|
extensions?: {
|
|
52
52
|
code?: string;
|
|
53
53
|
};
|
|
54
54
|
} & ExtraFields;
|
|
55
|
-
export
|
|
55
|
+
export type TAppNotificationValuesApiError<ExtraFields extends {} = {}> = {
|
|
56
56
|
errors: TAppNotificationApiError<ExtraFields>[];
|
|
57
57
|
};
|
|
58
|
-
export
|
|
58
|
+
export type TAppNotificationValuesUnexpectedError = {
|
|
59
59
|
errorId?: string;
|
|
60
60
|
};
|
|
61
|
-
export
|
|
61
|
+
export type TAppNotification<T extends TAppNotificationOfKind<T>> = TAppNotificationOfKind<T> & {
|
|
62
62
|
id: number;
|
|
63
63
|
text?: TAppNotificationKindSide extends T['kind'] ? string : never;
|
|
64
64
|
values?: 'api-error' extends T['kind'] ? TAppNotificationValuesApiError : 'unexpected-error' extends T['kind'] ? TAppNotificationValuesUnexpectedError : never;
|
|
65
65
|
};
|
|
66
|
-
export
|
|
66
|
+
export type TAppNotificationGlobal = TAppNotification<{
|
|
67
67
|
domain: typeof NOTIFICATION_DOMAINS.GLOBAL;
|
|
68
68
|
kind: TAppNotificationKindGlobal;
|
|
69
69
|
}>;
|
|
70
|
-
export
|
|
70
|
+
export type TAppNotificationPage = TAppNotification<{
|
|
71
71
|
domain: typeof NOTIFICATION_DOMAINS.PAGE;
|
|
72
72
|
kind: TAppNotificationKindPage;
|
|
73
73
|
}>;
|
|
74
|
-
export
|
|
74
|
+
export type TAppNotificationSide = TAppNotification<{
|
|
75
75
|
domain: typeof NOTIFICATION_DOMAINS.SIDE;
|
|
76
76
|
kind: TAppNotificationKindSide;
|
|
77
77
|
}>;
|
|
@@ -82,7 +82,7 @@ export declare const STATUS_CODES: {
|
|
|
82
82
|
readonly UNAUTHENTICATED: 299;
|
|
83
83
|
readonly NOT_FOUND: 404;
|
|
84
84
|
};
|
|
85
|
-
export
|
|
85
|
+
export type TStatusCode = (typeof STATUS_CODES)[keyof typeof STATUS_CODES];
|
|
86
86
|
export declare const LOGOUT_REASONS: {
|
|
87
87
|
readonly USER: "user";
|
|
88
88
|
readonly UNAUTHORIZED: "unauthorized";
|
|
@@ -90,7 +90,7 @@ export declare const LOGOUT_REASONS: {
|
|
|
90
90
|
readonly DELETED: "deleted";
|
|
91
91
|
readonly NO_PROJECTS: "no-projects";
|
|
92
92
|
};
|
|
93
|
-
export
|
|
93
|
+
export type TLogoutReason = (typeof LOGOUT_REASONS)[keyof typeof LOGOUT_REASONS];
|
|
94
94
|
export declare const GRAPHQL_TARGETS: {
|
|
95
95
|
readonly MERCHANT_CENTER_BACKEND: "mc";
|
|
96
96
|
readonly COMMERCETOOLS_PLATFORM: "ctp";
|
|
@@ -101,7 +101,7 @@ export declare const GRAPHQL_TARGETS: {
|
|
|
101
101
|
readonly SETTINGS_SERVICE: "settings";
|
|
102
102
|
readonly ADMINISTRATION_SERVICE: "administration";
|
|
103
103
|
};
|
|
104
|
-
export
|
|
104
|
+
export type TGraphQLTargets = (typeof GRAPHQL_TARGETS)[keyof typeof GRAPHQL_TARGETS];
|
|
105
105
|
export declare const MC_API_PROXY_TARGETS: {
|
|
106
106
|
readonly COMMERCETOOLS_PLATFORM: "ctp";
|
|
107
107
|
readonly MACHINE_LEARNING: "ml";
|
|
@@ -110,12 +110,12 @@ export declare const MC_API_PROXY_TARGETS: {
|
|
|
110
110
|
readonly MC_METRICS: "mc-metrics";
|
|
111
111
|
readonly IMPORT: "import";
|
|
112
112
|
};
|
|
113
|
-
export
|
|
114
|
-
export
|
|
113
|
+
export type TMcApiProxyTargets = (typeof MC_API_PROXY_TARGETS)[keyof typeof MC_API_PROXY_TARGETS];
|
|
114
|
+
export type TLocalizedField = {
|
|
115
115
|
locale: string;
|
|
116
116
|
value: string;
|
|
117
117
|
};
|
|
118
|
-
export
|
|
118
|
+
export type ApplicationMenuLinksForDevelopmentConfig = {
|
|
119
119
|
icon: string;
|
|
120
120
|
defaultLabel: string;
|
|
121
121
|
labelAllLocales: TLocalizedField[];
|
|
@@ -127,7 +127,7 @@ export declare type ApplicationMenuLinksForDevelopmentConfig = {
|
|
|
127
127
|
permissions: string[];
|
|
128
128
|
}[];
|
|
129
129
|
};
|
|
130
|
-
export
|
|
130
|
+
export type ApplicationOidcForDevelopmentConfig = {
|
|
131
131
|
authorizeUrl: string;
|
|
132
132
|
initialProjectKey?: string;
|
|
133
133
|
teamId?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/constants",
|
|
3
|
-
"version": "21.23.
|
|
3
|
+
"version": "21.23.7",
|
|
4
4
|
"description": "Shared constants for MC applications",
|
|
5
5
|
"bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
|
|
6
6
|
"repository": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"module": "dist/commercetools-frontend-constants.esm.js",
|
|
19
19
|
"files": ["dist", "package.json", "LICENSE", "README.md"],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@babel/runtime": "^7.
|
|
22
|
-
"@babel/runtime-corejs3": "^7.
|
|
21
|
+
"@babel/runtime": "^7.20.13",
|
|
22
|
+
"@babel/runtime-corejs3": "^7.20.13"
|
|
23
23
|
}
|
|
24
24
|
}
|