@miaixz/sdk 0.5.0
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/LICENSE +202 -0
- package/NOTICE +7 -0
- package/README.md +412 -0
- package/dist/api/client.d.ts +223 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/client.js +1069 -0
- package/dist/api/client.js.map +1 -0
- package/dist/api/endpoint.d.ts +10 -0
- package/dist/api/endpoint.d.ts.map +1 -0
- package/dist/api/endpoint.js +51 -0
- package/dist/api/endpoint.js.map +1 -0
- package/dist/api/errors.d.ts +180 -0
- package/dist/api/errors.d.ts.map +1 -0
- package/dist/api/errors.js +173 -0
- package/dist/api/errors.js.map +1 -0
- package/dist/api/index.d.ts +6 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +5 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/request.d.ts +135 -0
- package/dist/api/request.d.ts.map +1 -0
- package/dist/api/request.js +2 -0
- package/dist/api/request.js.map +1 -0
- package/dist/api/response.d.ts +69 -0
- package/dist/api/response.d.ts.map +1 -0
- package/dist/api/response.js +43 -0
- package/dist/api/response.js.map +1 -0
- package/dist/api/telemetry.d.ts +139 -0
- package/dist/api/telemetry.d.ts.map +1 -0
- package/dist/api/telemetry.js +2 -0
- package/dist/api/telemetry.js.map +1 -0
- package/dist/appearance/appearance.d.ts +161 -0
- package/dist/appearance/appearance.d.ts.map +1 -0
- package/dist/appearance/appearance.js +614 -0
- package/dist/appearance/appearance.js.map +1 -0
- package/dist/appearance/index.d.ts +3 -0
- package/dist/appearance/index.d.ts.map +1 -0
- package/dist/appearance/index.js +3 -0
- package/dist/appearance/index.js.map +1 -0
- package/dist/auth/auth.d.ts +197 -0
- package/dist/auth/auth.d.ts.map +1 -0
- package/dist/auth/auth.js +314 -0
- package/dist/auth/auth.js.map +1 -0
- package/dist/auth/index.d.ts +2 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +2 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/config/config.d.ts +117 -0
- package/dist/config/config.d.ts.map +1 -0
- package/dist/config/config.js +241 -0
- package/dist/config/config.js.map +1 -0
- package/dist/config/index.d.ts +2 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +2 -0
- package/dist/config/index.js.map +1 -0
- package/dist/consts/index.d.ts +35 -0
- package/dist/consts/index.d.ts.map +1 -0
- package/dist/consts/index.js +35 -0
- package/dist/consts/index.js.map +1 -0
- package/dist/context/context.d.ts +123 -0
- package/dist/context/context.d.ts.map +1 -0
- package/dist/context/context.js +252 -0
- package/dist/context/context.js.map +1 -0
- package/dist/context/index.d.ts +2 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/index.js +2 -0
- package/dist/context/index.js.map +1 -0
- package/dist/contracts/host-context.d.ts +132 -0
- package/dist/contracts/host-context.d.ts.map +1 -0
- package/dist/contracts/host-context.js +2 -0
- package/dist/contracts/host-context.js.map +1 -0
- package/dist/contracts/index.d.ts +8 -0
- package/dist/contracts/index.d.ts.map +1 -0
- package/dist/contracts/index.js +2 -0
- package/dist/contracts/index.js.map +1 -0
- package/dist/contracts/lifecycle.d.ts +49 -0
- package/dist/contracts/lifecycle.d.ts.map +1 -0
- package/dist/contracts/lifecycle.js +2 -0
- package/dist/contracts/lifecycle.js.map +1 -0
- package/dist/contracts/module-manifest.d.ts +110 -0
- package/dist/contracts/module-manifest.d.ts.map +1 -0
- package/dist/contracts/module-manifest.js +317 -0
- package/dist/contracts/module-manifest.js.map +1 -0
- package/dist/contracts/navigation.d.ts +36 -0
- package/dist/contracts/navigation.d.ts.map +1 -0
- package/dist/contracts/navigation.js +11 -0
- package/dist/contracts/navigation.js.map +1 -0
- package/dist/contracts/permission.d.ts +8 -0
- package/dist/contracts/permission.d.ts.map +1 -0
- package/dist/contracts/permission.js +14 -0
- package/dist/contracts/permission.js.map +1 -0
- package/dist/contracts/post-message.d.ts +124 -0
- package/dist/contracts/post-message.d.ts.map +1 -0
- package/dist/contracts/post-message.js +2 -0
- package/dist/contracts/post-message.js.map +1 -0
- package/dist/contracts/route.d.ts +45 -0
- package/dist/contracts/route.d.ts.map +1 -0
- package/dist/contracts/route.js +35 -0
- package/dist/contracts/route.js.map +1 -0
- package/dist/events/events.d.ts +191 -0
- package/dist/events/events.d.ts.map +1 -0
- package/dist/events/events.js +486 -0
- package/dist/events/events.js.map +1 -0
- package/dist/events/index.d.ts +2 -0
- package/dist/events/index.d.ts.map +1 -0
- package/dist/events/index.js +2 -0
- package/dist/events/index.js.map +1 -0
- package/dist/files/files.d.ts +138 -0
- package/dist/files/files.d.ts.map +1 -0
- package/dist/files/files.js +144 -0
- package/dist/files/files.js.map +1 -0
- package/dist/files/index.d.ts +2 -0
- package/dist/files/index.d.ts.map +1 -0
- package/dist/files/index.js +2 -0
- package/dist/files/index.js.map +1 -0
- package/dist/formatters/index.d.ts +44 -0
- package/dist/formatters/index.d.ts.map +1 -0
- package/dist/formatters/index.js +50 -0
- package/dist/formatters/index.js.map +1 -0
- package/dist/i18n/default-translator.d.ts +17 -0
- package/dist/i18n/default-translator.d.ts.map +1 -0
- package/dist/i18n/default-translator.js +19 -0
- package/dist/i18n/default-translator.js.map +1 -0
- package/dist/i18n/i18n.d.ts +248 -0
- package/dist/i18n/i18n.d.ts.map +1 -0
- package/dist/i18n/i18n.js +617 -0
- package/dist/i18n/i18n.js.map +1 -0
- package/dist/i18n/index.d.ts +2 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +2 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/index.js +2 -0
- package/dist/models/index.js.map +1 -0
- package/dist/permissions/index.d.ts +2 -0
- package/dist/permissions/index.d.ts.map +1 -0
- package/dist/permissions/index.js +2 -0
- package/dist/permissions/index.js.map +1 -0
- package/dist/permissions/permissions.d.ts +67 -0
- package/dist/permissions/permissions.d.ts.map +1 -0
- package/dist/permissions/permissions.js +123 -0
- package/dist/permissions/permissions.js.map +1 -0
- package/dist/runtime/direct-host-bridge.d.ts +11 -0
- package/dist/runtime/direct-host-bridge.d.ts.map +1 -0
- package/dist/runtime/direct-host-bridge.js +299 -0
- package/dist/runtime/direct-host-bridge.js.map +1 -0
- package/dist/runtime/index.d.ts +5 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +3 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/runtime/post-message-bridge.d.ts +20 -0
- package/dist/runtime/post-message-bridge.d.ts.map +1 -0
- package/dist/runtime/post-message-bridge.js +1115 -0
- package/dist/runtime/post-message-bridge.js.map +1 -0
- package/dist/sdk.d.ts +177 -0
- package/dist/sdk.d.ts.map +1 -0
- package/dist/sdk.js +214 -0
- package/dist/sdk.js.map +1 -0
- package/dist/storage/index.d.ts +2 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +2 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/storage.d.ts +246 -0
- package/dist/storage/storage.d.ts.map +1 -0
- package/dist/storage/storage.js +358 -0
- package/dist/storage/storage.js.map +1 -0
- package/dist/types/api.d.ts +82 -0
- package/dist/types/api.d.ts.map +1 -0
- package/dist/types/api.js +2 -0
- package/dist/types/api.js.map +1 -0
- package/dist/types/appearance.d.ts +85 -0
- package/dist/types/appearance.d.ts.map +1 -0
- package/dist/types/appearance.js +48 -0
- package/dist/types/appearance.js.map +1 -0
- package/dist/types/config.d.ts +49 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +2 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/context.d.ts +41 -0
- package/dist/types/context.d.ts.map +1 -0
- package/dist/types/context.js +2 -0
- package/dist/types/context.js.map +1 -0
- package/dist/types/file.d.ts +48 -0
- package/dist/types/file.d.ts.map +1 -0
- package/dist/types/file.js +2 -0
- package/dist/types/file.js.map +1 -0
- package/dist/types/index.d.ts +12 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +12 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/organization.d.ts +56 -0
- package/dist/types/organization.d.ts.map +1 -0
- package/dist/types/organization.js +2 -0
- package/dist/types/organization.js.map +1 -0
- package/dist/types/pagination.d.ts +55 -0
- package/dist/types/pagination.d.ts.map +1 -0
- package/dist/types/pagination.js +13 -0
- package/dist/types/pagination.js.map +1 -0
- package/dist/types/permissions.d.ts +26 -0
- package/dist/types/permissions.d.ts.map +1 -0
- package/dist/types/permissions.js +2 -0
- package/dist/types/permissions.js.map +1 -0
- package/dist/types/space.d.ts +43 -0
- package/dist/types/space.d.ts.map +1 -0
- package/dist/types/space.js +2 -0
- package/dist/types/space.js.map +1 -0
- package/dist/types/tenant.d.ts +31 -0
- package/dist/types/tenant.d.ts.map +1 -0
- package/dist/types/tenant.js +2 -0
- package/dist/types/tenant.js.map +1 -0
- package/dist/types/user.d.ts +48 -0
- package/dist/types/user.d.ts.map +1 -0
- package/dist/types/user.js +2 -0
- package/dist/types/user.js.map +1 -0
- package/dist/utils/date.d.ts +9 -0
- package/dist/utils/date.d.ts.map +1 -0
- package/dist/utils/date.js +11 -0
- package/dist/utils/date.js.map +1 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +5 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/number.d.ts +11 -0
- package/dist/utils/number.d.ts.map +1 -0
- package/dist/utils/number.js +13 -0
- package/dist/utils/number.js.map +1 -0
- package/dist/utils/object.d.ts +9 -0
- package/dist/utils/object.d.ts.map +1 -0
- package/dist/utils/object.js +11 -0
- package/dist/utils/object.js.map +1 -0
- package/dist/utils/string.d.ts +9 -0
- package/dist/utils/string.d.ts.map +1 -0
- package/dist/utils/string.js +11 -0
- package/dist/utils/string.js.map +1 -0
- package/dist/validators/index.d.ts +8 -0
- package/dist/validators/index.d.ts.map +1 -0
- package/dist/validators/index.js +8 -0
- package/dist/validators/index.js.map +1 -0
- package/package.json +156 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Identifies a Miaixz domain resource.
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export type MiaixzIdentifier = string;
|
|
7
|
+
/**
|
|
8
|
+
* Represents an ISO 8601 date-time string.
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export type MiaixzIsoDateTime = string;
|
|
13
|
+
/**
|
|
14
|
+
* Describes the identity shared by Miaixz domain entities.
|
|
15
|
+
*
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
export interface MiaixzEntity {
|
|
19
|
+
/**
|
|
20
|
+
* Unique identifier of the entity.
|
|
21
|
+
*/
|
|
22
|
+
id: MiaixzIdentifier;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Describes an entity that records creation and update times.
|
|
26
|
+
*
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
export interface MiaixzTimestampedEntity extends MiaixzEntity {
|
|
30
|
+
/**
|
|
31
|
+
* Time at which the entity was created.
|
|
32
|
+
*/
|
|
33
|
+
createdAt: MiaixzIsoDateTime;
|
|
34
|
+
/**
|
|
35
|
+
* Time at which the entity was last updated.
|
|
36
|
+
*/
|
|
37
|
+
updatedAt: MiaixzIsoDateTime;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Describes the standard envelope returned by Miaixz APIs.
|
|
41
|
+
*
|
|
42
|
+
* @typeParam T - Type of the successful response payload.
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
|
+
export interface MiaixzApiEnvelope<T> {
|
|
46
|
+
/**
|
|
47
|
+
* Result code, where zero represents a successful response.
|
|
48
|
+
*/
|
|
49
|
+
readonly errcode: string | number;
|
|
50
|
+
/**
|
|
51
|
+
* Human-readable result message supplied by the API.
|
|
52
|
+
*/
|
|
53
|
+
readonly errmsg: string;
|
|
54
|
+
/**
|
|
55
|
+
* Payload returned by the API.
|
|
56
|
+
*/
|
|
57
|
+
readonly data: T;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Describes normalized information about an API failure.
|
|
61
|
+
*
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
64
|
+
export interface MiaixzApiProblem {
|
|
65
|
+
/**
|
|
66
|
+
* Optional machine-readable error code.
|
|
67
|
+
*/
|
|
68
|
+
code?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Human-readable error message.
|
|
71
|
+
*/
|
|
72
|
+
message: string;
|
|
73
|
+
/**
|
|
74
|
+
* Optional request identifier used for diagnostics.
|
|
75
|
+
*/
|
|
76
|
+
requestId?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Optional provider-specific error details.
|
|
79
|
+
*/
|
|
80
|
+
details?: unknown;
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/types/api.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAEtC;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC;AAEvC;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,EAAE,EAAE,gBAAgB,CAAC;CACtB;AAED;;;;GAIG;AACH,MAAM,WAAW,uBAAwB,SAAQ,YAAY;IAC3D;;OAEG;IACH,SAAS,EAAE,iBAAiB,CAAC;IAE7B;;OAEG;IACH,SAAS,EAAE,iBAAiB,CAAC;CAC9B;AAED;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;IAElC;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/types/api.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Identifies a Miaixz domain resource.\n *\n * @public\n */\nexport type MiaixzIdentifier = string;\n\n/**\n * Represents an ISO 8601 date-time string.\n *\n * @public\n */\nexport type MiaixzIsoDateTime = string;\n\n/**\n * Describes the identity shared by Miaixz domain entities.\n *\n * @public\n */\nexport interface MiaixzEntity {\n /**\n * Unique identifier of the entity.\n */\n id: MiaixzIdentifier;\n}\n\n/**\n * Describes an entity that records creation and update times.\n *\n * @public\n */\nexport interface MiaixzTimestampedEntity extends MiaixzEntity {\n /**\n * Time at which the entity was created.\n */\n createdAt: MiaixzIsoDateTime;\n\n /**\n * Time at which the entity was last updated.\n */\n updatedAt: MiaixzIsoDateTime;\n}\n\n/**\n * Describes the standard envelope returned by Miaixz APIs.\n *\n * @typeParam T - Type of the successful response payload.\n * @public\n */\nexport interface MiaixzApiEnvelope<T> {\n /**\n * Result code, where zero represents a successful response.\n */\n readonly errcode: string | number;\n\n /**\n * Human-readable result message supplied by the API.\n */\n readonly errmsg: string;\n\n /**\n * Payload returned by the API.\n */\n readonly data: T;\n}\n\n/**\n * Describes normalized information about an API failure.\n *\n * @public\n */\nexport interface MiaixzApiProblem {\n /**\n * Optional machine-readable error code.\n */\n code?: string;\n\n /**\n * Human-readable error message.\n */\n message: string;\n\n /**\n * Optional request identifier used for diagnostics.\n */\n requestId?: string;\n\n /**\n * Optional provider-specific error details.\n */\n details?: unknown;\n}\n"]}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lists the color modes supported by the Miaixz interface.
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export declare const miaixzColorModes: readonly ["light", "dark", "system"];
|
|
7
|
+
/**
|
|
8
|
+
* Lists the interface density modes supported by Miaixz.
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export declare const miaixzDensities: readonly ["compact", "standard", "comfortable"];
|
|
13
|
+
/**
|
|
14
|
+
* Represents a configured Miaixz color mode.
|
|
15
|
+
*
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
export type MiaixzColorMode = (typeof miaixzColorModes)[number];
|
|
19
|
+
/**
|
|
20
|
+
* Represents a concrete color mode after resolving system preference.
|
|
21
|
+
*
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
export type MiaixzResolvedColorMode = Exclude<MiaixzColorMode, "system">;
|
|
25
|
+
/**
|
|
26
|
+
* Represents a supported Miaixz interface density.
|
|
27
|
+
*
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
30
|
+
export type MiaixzDensity = (typeof miaixzDensities)[number];
|
|
31
|
+
/**
|
|
32
|
+
* Lists color tokens that may be customized through appearance settings.
|
|
33
|
+
*
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
36
|
+
export declare const miaixzThemeColorTokens: readonly ["brand", "on-brand", "background", "surface", "surface-secondary", "surface-hover", "surface-active", "surface-selected", "text-primary", "text-secondary", "text-muted", "text-disabled", "text-inverse", "border", "border-strong", "focus", "success", "success-soft", "warning", "warning-soft", "danger", "danger-soft", "info", "info-soft", "backdrop", "shadow", "shadow-strong", "selection"];
|
|
37
|
+
/**
|
|
38
|
+
* Represents the name of a customizable Miaixz theme color token.
|
|
39
|
+
*
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
export type MiaixzThemeColorToken = (typeof miaixzThemeColorTokens)[number];
|
|
43
|
+
/**
|
|
44
|
+
* Maps theme color tokens to valid CSS color values.
|
|
45
|
+
*
|
|
46
|
+
* @public
|
|
47
|
+
*/
|
|
48
|
+
export type MiaixzThemeColors = Partial<Readonly<Record<MiaixzThemeColorToken, string>>>;
|
|
49
|
+
/**
|
|
50
|
+
* Configures visual preferences shared across Miaixz applications.
|
|
51
|
+
*
|
|
52
|
+
* @public
|
|
53
|
+
*/
|
|
54
|
+
export interface MiaixzAppearanceSettings {
|
|
55
|
+
/**
|
|
56
|
+
* Preferred light, dark, or system color mode.
|
|
57
|
+
*/
|
|
58
|
+
readonly colorMode: MiaixzColorMode;
|
|
59
|
+
/**
|
|
60
|
+
* Preferred interface density.
|
|
61
|
+
*/
|
|
62
|
+
readonly density: MiaixzDensity;
|
|
63
|
+
/**
|
|
64
|
+
* Optional theme color overrides keyed by semantic token.
|
|
65
|
+
*/
|
|
66
|
+
readonly colors?: MiaixzThemeColors;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Wraps appearance settings for versioned persistence and event transport.
|
|
70
|
+
*
|
|
71
|
+
* @public
|
|
72
|
+
*/
|
|
73
|
+
export interface MiaixzAppearancePayload {
|
|
74
|
+
/**
|
|
75
|
+
* Identifies the frozen appearance payload schema.
|
|
76
|
+
*
|
|
77
|
+
* @defaultValue 1
|
|
78
|
+
*/
|
|
79
|
+
readonly schemaVersion: 1;
|
|
80
|
+
/**
|
|
81
|
+
* Contains the validated appearance settings snapshot.
|
|
82
|
+
*/
|
|
83
|
+
readonly value: MiaixzAppearanceSettings;
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=appearance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appearance.d.ts","sourceRoot":"","sources":["../../src/types/appearance.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,YAAI,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAU,CAAC;AAErE;;;;GAIG;AACH,eAAO,MAAM,eAAe,YAAI,SAAS,EAAE,UAAU,EAAE,aAAa,CAAU,CAAC;AAE/E;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhE;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC;AAEzE;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,YACjC,OAAO,EACP,UAAU,EACV,YAAY,EACZ,SAAS,EACT,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,cAAc,EACd,QAAQ,EACR,eAAe,EACf,OAAO,EACP,SAAS,EACT,cAAc,EACd,SAAS,EACT,cAAc,EACd,QAAQ,EACR,aAAa,EACb,MAAM,EACN,WAAW,EACX,UAAU,EACV,QAAQ,EACR,eAAe,EACf,WAAW,CACH,CAAC;AAEX;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5E;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;AAEzF;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC;IAEpC;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;IAEhC;;OAEG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,iBAAiB,CAAC;CACrC;AAED;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;OAIG;IACH,QAAQ,CAAC,aAAa,EAAE,CAAC,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,wBAAwB,CAAC;CAC1C"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lists the color modes supported by the Miaixz interface.
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export const miaixzColorModes = ["light", "dark", "system"];
|
|
7
|
+
/**
|
|
8
|
+
* Lists the interface density modes supported by Miaixz.
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export const miaixzDensities = ["compact", "standard", "comfortable"];
|
|
13
|
+
/**
|
|
14
|
+
* Lists color tokens that may be customized through appearance settings.
|
|
15
|
+
*
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
export const miaixzThemeColorTokens = [
|
|
19
|
+
"brand",
|
|
20
|
+
"on-brand",
|
|
21
|
+
"background",
|
|
22
|
+
"surface",
|
|
23
|
+
"surface-secondary",
|
|
24
|
+
"surface-hover",
|
|
25
|
+
"surface-active",
|
|
26
|
+
"surface-selected",
|
|
27
|
+
"text-primary",
|
|
28
|
+
"text-secondary",
|
|
29
|
+
"text-muted",
|
|
30
|
+
"text-disabled",
|
|
31
|
+
"text-inverse",
|
|
32
|
+
"border",
|
|
33
|
+
"border-strong",
|
|
34
|
+
"focus",
|
|
35
|
+
"success",
|
|
36
|
+
"success-soft",
|
|
37
|
+
"warning",
|
|
38
|
+
"warning-soft",
|
|
39
|
+
"danger",
|
|
40
|
+
"danger-soft",
|
|
41
|
+
"info",
|
|
42
|
+
"info-soft",
|
|
43
|
+
"backdrop",
|
|
44
|
+
"shadow",
|
|
45
|
+
"shadow-strong",
|
|
46
|
+
"selection",
|
|
47
|
+
];
|
|
48
|
+
//# sourceMappingURL=appearance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appearance.js","sourceRoot":"","sources":["../../src/types/appearance.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAU,CAAC;AAErE;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,SAAS,EAAE,UAAU,EAAE,aAAa,CAAU,CAAC;AAuB/E;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,OAAO;IACP,UAAU;IACV,YAAY;IACZ,SAAS;IACT,mBAAmB;IACnB,eAAe;IACf,gBAAgB;IAChB,kBAAkB;IAClB,cAAc;IACd,gBAAgB;IAChB,YAAY;IACZ,eAAe;IACf,cAAc;IACd,QAAQ;IACR,eAAe;IACf,OAAO;IACP,SAAS;IACT,cAAc;IACd,SAAS;IACT,cAAc;IACd,QAAQ;IACR,aAAa;IACb,MAAM;IACN,WAAW;IACX,UAAU;IACV,QAAQ;IACR,eAAe;IACf,WAAW;CACH,CAAC","sourcesContent":["/**\n * Lists the color modes supported by the Miaixz interface.\n *\n * @public\n */\nexport const miaixzColorModes = [\"light\", \"dark\", \"system\"] as const;\n\n/**\n * Lists the interface density modes supported by Miaixz.\n *\n * @public\n */\nexport const miaixzDensities = [\"compact\", \"standard\", \"comfortable\"] as const;\n\n/**\n * Represents a configured Miaixz color mode.\n *\n * @public\n */\nexport type MiaixzColorMode = (typeof miaixzColorModes)[number];\n\n/**\n * Represents a concrete color mode after resolving system preference.\n *\n * @public\n */\nexport type MiaixzResolvedColorMode = Exclude<MiaixzColorMode, \"system\">;\n\n/**\n * Represents a supported Miaixz interface density.\n *\n * @public\n */\nexport type MiaixzDensity = (typeof miaixzDensities)[number];\n\n/**\n * Lists color tokens that may be customized through appearance settings.\n *\n * @public\n */\nexport const miaixzThemeColorTokens = [\n \"brand\",\n \"on-brand\",\n \"background\",\n \"surface\",\n \"surface-secondary\",\n \"surface-hover\",\n \"surface-active\",\n \"surface-selected\",\n \"text-primary\",\n \"text-secondary\",\n \"text-muted\",\n \"text-disabled\",\n \"text-inverse\",\n \"border\",\n \"border-strong\",\n \"focus\",\n \"success\",\n \"success-soft\",\n \"warning\",\n \"warning-soft\",\n \"danger\",\n \"danger-soft\",\n \"info\",\n \"info-soft\",\n \"backdrop\",\n \"shadow\",\n \"shadow-strong\",\n \"selection\",\n] as const;\n\n/**\n * Represents the name of a customizable Miaixz theme color token.\n *\n * @public\n */\nexport type MiaixzThemeColorToken = (typeof miaixzThemeColorTokens)[number];\n\n/**\n * Maps theme color tokens to valid CSS color values.\n *\n * @public\n */\nexport type MiaixzThemeColors = Partial<Readonly<Record<MiaixzThemeColorToken, string>>>;\n\n/**\n * Configures visual preferences shared across Miaixz applications.\n *\n * @public\n */\nexport interface MiaixzAppearanceSettings {\n /**\n * Preferred light, dark, or system color mode.\n */\n readonly colorMode: MiaixzColorMode;\n\n /**\n * Preferred interface density.\n */\n readonly density: MiaixzDensity;\n\n /**\n * Optional theme color overrides keyed by semantic token.\n */\n readonly colors?: MiaixzThemeColors;\n}\n\n/**\n * Wraps appearance settings for versioned persistence and event transport.\n *\n * @public\n */\nexport interface MiaixzAppearancePayload {\n /**\n * Identifies the frozen appearance payload schema.\n *\n * @defaultValue 1\n */\n readonly schemaVersion: 1;\n\n /**\n * Contains the validated appearance settings snapshot.\n */\n readonly value: MiaixzAppearanceSettings;\n}\n"]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { MiaixzAppearanceSettings } from "./appearance.js";
|
|
2
|
+
/**
|
|
3
|
+
* Represents an execution environment recognized by the SDK.
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export type MiaixzEnvironment = "development" | "test" | "staging" | "production";
|
|
8
|
+
/**
|
|
9
|
+
* Represents a serializable feature-flag value.
|
|
10
|
+
*
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
export type MiaixzFeatureValue = boolean | string | number;
|
|
14
|
+
/**
|
|
15
|
+
* Configures a Miaixz SDK instance.
|
|
16
|
+
*
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
export interface MiaixzSdkConfig {
|
|
20
|
+
/**
|
|
21
|
+
* Base URL used for API requests.
|
|
22
|
+
*/
|
|
23
|
+
apiBaseUrl: string;
|
|
24
|
+
/**
|
|
25
|
+
* Environment in which the SDK is running.
|
|
26
|
+
*/
|
|
27
|
+
environment: MiaixzEnvironment;
|
|
28
|
+
/**
|
|
29
|
+
* Optional application release identifier included in diagnostics.
|
|
30
|
+
*/
|
|
31
|
+
release?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Optional service names mapped to service base URLs.
|
|
34
|
+
*/
|
|
35
|
+
services?: Readonly<Record<string, string>>;
|
|
36
|
+
/**
|
|
37
|
+
* Optional feature flags supplied by the host application.
|
|
38
|
+
*/
|
|
39
|
+
features?: Readonly<Record<string, MiaixzFeatureValue>>;
|
|
40
|
+
/**
|
|
41
|
+
* Optional global appearance preferences.
|
|
42
|
+
*/
|
|
43
|
+
appearance?: MiaixzAppearanceSettings;
|
|
44
|
+
/**
|
|
45
|
+
* Optional default request timeout in milliseconds.
|
|
46
|
+
*/
|
|
47
|
+
requestTimeoutMs?: number;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAEhE;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG,MAAM,GAAG,SAAS,GAAG,YAAY,CAAC;AAElF;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAE3D;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,WAAW,EAAE,iBAAiB,CAAC;IAE/B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAE5C;;OAEG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAExD;;OAEG;IACH,UAAU,CAAC,EAAE,wBAAwB,CAAC;IAEtC;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"","sourcesContent":["import type { MiaixzAppearanceSettings } from \"./appearance.js\";\n\n/**\n * Represents an execution environment recognized by the SDK.\n *\n * @public\n */\nexport type MiaixzEnvironment = \"development\" | \"test\" | \"staging\" | \"production\";\n\n/**\n * Represents a serializable feature-flag value.\n *\n * @public\n */\nexport type MiaixzFeatureValue = boolean | string | number;\n\n/**\n * Configures a Miaixz SDK instance.\n *\n * @public\n */\nexport interface MiaixzSdkConfig {\n /**\n * Base URL used for API requests.\n */\n apiBaseUrl: string;\n\n /**\n * Environment in which the SDK is running.\n */\n environment: MiaixzEnvironment;\n\n /**\n * Optional application release identifier included in diagnostics.\n */\n release?: string;\n\n /**\n * Optional service names mapped to service base URLs.\n */\n services?: Readonly<Record<string, string>>;\n\n /**\n * Optional feature flags supplied by the host application.\n */\n features?: Readonly<Record<string, MiaixzFeatureValue>>;\n\n /**\n * Optional global appearance preferences.\n */\n appearance?: MiaixzAppearanceSettings;\n\n /**\n * Optional default request timeout in milliseconds.\n */\n requestTimeoutMs?: number;\n}\n"]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { MiaixzIdentifier } from "./api.js";
|
|
2
|
+
/**
|
|
3
|
+
* Describes the execution context propagated across Miaixz services.
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export interface MiaixzRuntimeContext {
|
|
8
|
+
/**
|
|
9
|
+
* Identifier of the authenticated user.
|
|
10
|
+
*/
|
|
11
|
+
userId?: MiaixzIdentifier;
|
|
12
|
+
/**
|
|
13
|
+
* Security and data-isolation boundary for every tenant-owned resource.
|
|
14
|
+
*/
|
|
15
|
+
tenantId?: MiaixzIdentifier;
|
|
16
|
+
/**
|
|
17
|
+
* Optional organization selected inside the active tenant.
|
|
18
|
+
*/
|
|
19
|
+
organizationId?: MiaixzIdentifier;
|
|
20
|
+
/**
|
|
21
|
+
* Optional department selected inside the active organization.
|
|
22
|
+
*/
|
|
23
|
+
departmentId?: MiaixzIdentifier;
|
|
24
|
+
/**
|
|
25
|
+
* Optional workspace selected by the user.
|
|
26
|
+
*/
|
|
27
|
+
spaceId?: MiaixzIdentifier;
|
|
28
|
+
/**
|
|
29
|
+
* Locale used for translated messages and regional formatting.
|
|
30
|
+
*/
|
|
31
|
+
locale?: string;
|
|
32
|
+
/**
|
|
33
|
+
* IANA timezone used for date and time presentation.
|
|
34
|
+
*/
|
|
35
|
+
timezone?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Optional trace identifier propagated for diagnostics.
|
|
38
|
+
*/
|
|
39
|
+
traceId?: string;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/types/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B;;OAEG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAElC;;OAEG;IACH,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAEhC;;OAEG;IACH,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAE3B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/types/context.ts"],"names":[],"mappings":"","sourcesContent":["import type { MiaixzIdentifier } from \"./api.js\";\n\n/**\n * Describes the execution context propagated across Miaixz services.\n *\n * @public\n */\nexport interface MiaixzRuntimeContext {\n /**\n * Identifier of the authenticated user.\n */\n userId?: MiaixzIdentifier;\n\n /**\n * Security and data-isolation boundary for every tenant-owned resource.\n */\n tenantId?: MiaixzIdentifier;\n /**\n * Optional organization selected inside the active tenant.\n */\n organizationId?: MiaixzIdentifier;\n\n /**\n * Optional department selected inside the active organization.\n */\n departmentId?: MiaixzIdentifier;\n\n /**\n * Optional workspace selected by the user.\n */\n spaceId?: MiaixzIdentifier;\n\n /**\n * Locale used for translated messages and regional formatting.\n */\n locale?: string;\n\n /**\n * IANA timezone used for date and time presentation.\n */\n timezone?: string;\n\n /**\n * Optional trace identifier propagated for diagnostics.\n */\n traceId?: string;\n}\n"]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Describes a file managed by a Miaixz service.
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export interface MiaixzFileDescriptor {
|
|
7
|
+
/**
|
|
8
|
+
* Unique identifier of the file.
|
|
9
|
+
*/
|
|
10
|
+
id: string;
|
|
11
|
+
/**
|
|
12
|
+
* Original or display name of the file.
|
|
13
|
+
*/
|
|
14
|
+
name: string;
|
|
15
|
+
/**
|
|
16
|
+
* File size in bytes.
|
|
17
|
+
*/
|
|
18
|
+
size: number;
|
|
19
|
+
/**
|
|
20
|
+
* Optional media type of the file content.
|
|
21
|
+
*/
|
|
22
|
+
contentType?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Optional checksum used to verify file integrity.
|
|
25
|
+
*/
|
|
26
|
+
checksum?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Optional URL from which the file can be downloaded.
|
|
29
|
+
*/
|
|
30
|
+
downloadUrl?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Optional ISO 8601 creation time.
|
|
33
|
+
*/
|
|
34
|
+
createdAt?: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Describes the files returned by an upload operation.
|
|
38
|
+
*
|
|
39
|
+
* @typeParam TFile - Concrete descriptor type returned for each uploaded file.
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
export interface MiaixzUploadResult<TFile extends MiaixzFileDescriptor = MiaixzFileDescriptor> {
|
|
43
|
+
/**
|
|
44
|
+
* Immutable collection of uploaded files.
|
|
45
|
+
*/
|
|
46
|
+
files: readonly TFile[];
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/types/file.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB,CAAC,KAAK,SAAS,oBAAoB,GAAG,oBAAoB;IAC3F;;OAEG;IACH,KAAK,EAAE,SAAS,KAAK,EAAE,CAAC;CACzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.js","sourceRoot":"","sources":["../../src/types/file.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Describes a file managed by a Miaixz service.\n *\n * @public\n */\nexport interface MiaixzFileDescriptor {\n /**\n * Unique identifier of the file.\n */\n id: string;\n\n /**\n * Original or display name of the file.\n */\n name: string;\n\n /**\n * File size in bytes.\n */\n size: number;\n\n /**\n * Optional media type of the file content.\n */\n contentType?: string;\n\n /**\n * Optional checksum used to verify file integrity.\n */\n checksum?: string;\n\n /**\n * Optional URL from which the file can be downloaded.\n */\n downloadUrl?: string;\n\n /**\n * Optional ISO 8601 creation time.\n */\n createdAt?: string;\n}\n\n/**\n * Describes the files returned by an upload operation.\n *\n * @typeParam TFile - Concrete descriptor type returned for each uploaded file.\n * @public\n */\nexport interface MiaixzUploadResult<TFile extends MiaixzFileDescriptor = MiaixzFileDescriptor> {\n /**\n * Immutable collection of uploaded files.\n */\n files: readonly TFile[];\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from "./api.js";
|
|
2
|
+
export * from "./appearance.js";
|
|
3
|
+
export * from "./config.js";
|
|
4
|
+
export * from "./context.js";
|
|
5
|
+
export * from "./file.js";
|
|
6
|
+
export * from "./organization.js";
|
|
7
|
+
export * from "./pagination.js";
|
|
8
|
+
export * from "./permissions.js";
|
|
9
|
+
export * from "./space.js";
|
|
10
|
+
export * from "./tenant.js";
|
|
11
|
+
export * from "./user.js";
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from "./api.js";
|
|
2
|
+
export * from "./appearance.js";
|
|
3
|
+
export * from "./config.js";
|
|
4
|
+
export * from "./context.js";
|
|
5
|
+
export * from "./file.js";
|
|
6
|
+
export * from "./organization.js";
|
|
7
|
+
export * from "./pagination.js";
|
|
8
|
+
export * from "./permissions.js";
|
|
9
|
+
export * from "./space.js";
|
|
10
|
+
export * from "./tenant.js";
|
|
11
|
+
export * from "./user.js";
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC","sourcesContent":["export * from \"./api.js\";\nexport * from \"./appearance.js\";\nexport * from \"./config.js\";\nexport * from \"./context.js\";\nexport * from \"./file.js\";\nexport * from \"./organization.js\";\nexport * from \"./pagination.js\";\nexport * from \"./permissions.js\";\nexport * from \"./space.js\";\nexport * from \"./tenant.js\";\nexport * from \"./user.js\";\n"]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { MiaixzIdentifier } from "./api.js";
|
|
2
|
+
/**
|
|
3
|
+
* Describes an organization within a tenant.
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export interface MiaixzOrganizationSummary {
|
|
8
|
+
/**
|
|
9
|
+
* Unique identifier of the organization.
|
|
10
|
+
*/
|
|
11
|
+
id: MiaixzIdentifier;
|
|
12
|
+
/**
|
|
13
|
+
* Identifier of the tenant that owns the organization.
|
|
14
|
+
*/
|
|
15
|
+
tenantId: MiaixzIdentifier;
|
|
16
|
+
/**
|
|
17
|
+
* Display name of the organization.
|
|
18
|
+
*/
|
|
19
|
+
name: string;
|
|
20
|
+
/**
|
|
21
|
+
* Optional human-readable organization code.
|
|
22
|
+
*/
|
|
23
|
+
code?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Describes a department within an organization.
|
|
27
|
+
*
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
30
|
+
export interface MiaixzDepartmentSummary {
|
|
31
|
+
/**
|
|
32
|
+
* Unique identifier of the department.
|
|
33
|
+
*/
|
|
34
|
+
id: MiaixzIdentifier;
|
|
35
|
+
/**
|
|
36
|
+
* Identifier of the tenant that owns the department.
|
|
37
|
+
*/
|
|
38
|
+
tenantId: MiaixzIdentifier;
|
|
39
|
+
/**
|
|
40
|
+
* Identifier of the organization that contains the department.
|
|
41
|
+
*/
|
|
42
|
+
organizationId: MiaixzIdentifier;
|
|
43
|
+
/**
|
|
44
|
+
* Display name of the department.
|
|
45
|
+
*/
|
|
46
|
+
name: string;
|
|
47
|
+
/**
|
|
48
|
+
* Optional human-readable department code.
|
|
49
|
+
*/
|
|
50
|
+
code?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Optional identifier of the parent department.
|
|
53
|
+
*/
|
|
54
|
+
parentId?: MiaixzIdentifier;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=organization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organization.d.ts","sourceRoot":"","sources":["../../src/types/organization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD;;;;GAIG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,EAAE,EAAE,gBAAgB,CAAC;IAErB;;OAEG;IACH,QAAQ,EAAE,gBAAgB,CAAC;IAE3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,EAAE,EAAE,gBAAgB,CAAC;IAErB;;OAEG;IACH,QAAQ,EAAE,gBAAgB,CAAC;IAE3B;;OAEG;IACH,cAAc,EAAE,gBAAgB,CAAC;IAEjC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,CAAC,EAAE,gBAAgB,CAAC;CAC7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organization.js","sourceRoot":"","sources":["../../src/types/organization.ts"],"names":[],"mappings":"","sourcesContent":["import type { MiaixzIdentifier } from \"./api.js\";\n\n/**\n * Describes an organization within a tenant.\n *\n * @public\n */\nexport interface MiaixzOrganizationSummary {\n /**\n * Unique identifier of the organization.\n */\n id: MiaixzIdentifier;\n\n /**\n * Identifier of the tenant that owns the organization.\n */\n tenantId: MiaixzIdentifier;\n\n /**\n * Display name of the organization.\n */\n name: string;\n\n /**\n * Optional human-readable organization code.\n */\n code?: string;\n}\n\n/**\n * Describes a department within an organization.\n *\n * @public\n */\nexport interface MiaixzDepartmentSummary {\n /**\n * Unique identifier of the department.\n */\n id: MiaixzIdentifier;\n\n /**\n * Identifier of the tenant that owns the department.\n */\n tenantId: MiaixzIdentifier;\n\n /**\n * Identifier of the organization that contains the department.\n */\n organizationId: MiaixzIdentifier;\n\n /**\n * Display name of the department.\n */\n name: string;\n\n /**\n * Optional human-readable department code.\n */\n code?: string;\n\n /**\n * Optional identifier of the parent department.\n */\n parentId?: MiaixzIdentifier;\n}\n"]}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Describes pagination metadata returned by a list operation.
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export interface MiaixzPagination {
|
|
7
|
+
/**
|
|
8
|
+
* One-based current page number.
|
|
9
|
+
*/
|
|
10
|
+
page: number;
|
|
11
|
+
/**
|
|
12
|
+
* Maximum number of items requested per page.
|
|
13
|
+
*/
|
|
14
|
+
pageSize: number;
|
|
15
|
+
/**
|
|
16
|
+
* Total number of items available across all pages.
|
|
17
|
+
*/
|
|
18
|
+
total: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Describes optional pagination parameters for a list request.
|
|
22
|
+
*
|
|
23
|
+
* @public
|
|
24
|
+
*/
|
|
25
|
+
export interface MiaixzPageQuery {
|
|
26
|
+
/**
|
|
27
|
+
* Optional one-based page number to request.
|
|
28
|
+
*/
|
|
29
|
+
page?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Optional maximum number of items to request per page.
|
|
32
|
+
*/
|
|
33
|
+
pageSize?: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Describes a page of immutable result items and its pagination metadata.
|
|
37
|
+
*
|
|
38
|
+
* @typeParam T - Type of each result item.
|
|
39
|
+
* @public
|
|
40
|
+
*/
|
|
41
|
+
export interface MiaixzPage<T> extends MiaixzPagination {
|
|
42
|
+
/**
|
|
43
|
+
* Immutable items contained in the current page.
|
|
44
|
+
*/
|
|
45
|
+
items: readonly T[];
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Calculates the number of pages, returning zero when the page size is invalid.
|
|
49
|
+
*
|
|
50
|
+
* @param pagination - Pagination metadata used for the calculation.
|
|
51
|
+
* @returns Total page count rounded up to include a partial final page.
|
|
52
|
+
* @public
|
|
53
|
+
*/
|
|
54
|
+
export declare function getMiaixzPageCount(pagination: MiaixzPagination): number;
|
|
55
|
+
//# sourceMappingURL=pagination.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../src/types/pagination.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;GAKG;AACH,MAAM,WAAW,UAAU,CAAC,CAAC,CAAE,SAAQ,gBAAgB;IACrD;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC,EAAE,CAAC;CACrB;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,gBAAgB,GAAG,MAAM,CAGvE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Calculates the number of pages, returning zero when the page size is invalid.
|
|
3
|
+
*
|
|
4
|
+
* @param pagination - Pagination metadata used for the calculation.
|
|
5
|
+
* @returns Total page count rounded up to include a partial final page.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export function getMiaixzPageCount(pagination) {
|
|
9
|
+
if (pagination.pageSize <= 0)
|
|
10
|
+
return 0;
|
|
11
|
+
return Math.ceil(Math.max(0, pagination.total) / pagination.pageSize);
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=pagination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination.js","sourceRoot":"","sources":["../../src/types/pagination.ts"],"names":[],"mappings":"AAoDA;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,UAA4B;IAC7D,IAAI,UAAU,CAAC,QAAQ,IAAI,CAAC;QAAE,OAAO,CAAC,CAAC;IACvC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,UAAU,CAAC,KAAK,CAAC,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;AACxE,CAAC","sourcesContent":["/**\n * Describes pagination metadata returned by a list operation.\n *\n * @public\n */\nexport interface MiaixzPagination {\n /**\n * One-based current page number.\n */\n page: number;\n\n /**\n * Maximum number of items requested per page.\n */\n pageSize: number;\n\n /**\n * Total number of items available across all pages.\n */\n total: number;\n}\n\n/**\n * Describes optional pagination parameters for a list request.\n *\n * @public\n */\nexport interface MiaixzPageQuery {\n /**\n * Optional one-based page number to request.\n */\n page?: number;\n\n /**\n * Optional maximum number of items to request per page.\n */\n pageSize?: number;\n}\n\n/**\n * Describes a page of immutable result items and its pagination metadata.\n *\n * @typeParam T - Type of each result item.\n * @public\n */\nexport interface MiaixzPage<T> extends MiaixzPagination {\n /**\n * Immutable items contained in the current page.\n */\n items: readonly T[];\n}\n\n/**\n * Calculates the number of pages, returning zero when the page size is invalid.\n *\n * @param pagination - Pagination metadata used for the calculation.\n * @returns Total page count rounded up to include a partial final page.\n * @public\n */\nexport function getMiaixzPageCount(pagination: MiaixzPagination): number {\n if (pagination.pageSize <= 0) return 0;\n return Math.ceil(Math.max(0, pagination.total) / pagination.pageSize);\n}\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Identifies a permission granted by the Miaixz authorization model.
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export type MiaixzPermissionCode = string;
|
|
7
|
+
/**
|
|
8
|
+
* Describes resolved permissions and roles for the active context.
|
|
9
|
+
*
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export interface MiaixzPermissionSnapshot {
|
|
13
|
+
/**
|
|
14
|
+
* Immutable permission codes explicitly granted to the principal.
|
|
15
|
+
*/
|
|
16
|
+
allowed: readonly MiaixzPermissionCode[];
|
|
17
|
+
/**
|
|
18
|
+
* Optional immutable permission codes explicitly denied to the principal.
|
|
19
|
+
*/
|
|
20
|
+
denied?: readonly MiaixzPermissionCode[];
|
|
21
|
+
/**
|
|
22
|
+
* Optional immutable role identifiers assigned to the principal.
|
|
23
|
+
*/
|
|
24
|
+
roles?: readonly string[];
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=permissions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../src/types/permissions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC;AAE1C;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,OAAO,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAEzC;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAEzC;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permissions.js","sourceRoot":"","sources":["../../src/types/permissions.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Identifies a permission granted by the Miaixz authorization model.\n *\n * @public\n */\nexport type MiaixzPermissionCode = string;\n\n/**\n * Describes resolved permissions and roles for the active context.\n *\n * @public\n */\nexport interface MiaixzPermissionSnapshot {\n /**\n * Immutable permission codes explicitly granted to the principal.\n */\n allowed: readonly MiaixzPermissionCode[];\n\n /**\n * Optional immutable permission codes explicitly denied to the principal.\n */\n denied?: readonly MiaixzPermissionCode[];\n\n /**\n * Optional immutable role identifiers assigned to the principal.\n */\n roles?: readonly string[];\n}\n"]}
|