@jumoo/translate 17.9.3 → 18.3.2-prerelease.19
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/dist/api/index.d.ts +2 -3
- package/dist/api/sdk.gen.d.ts +118 -122
- package/dist/api/types.gen.d.ts +146 -128
- package/dist/conditions/inplace-enabled.condition.d.ts +10 -0
- package/dist/constants.d.ts +1 -0
- package/dist/content/components/document-translations.element.d.ts +2 -1
- package/dist/content/translation-view.context.d.ts +18 -8
- package/dist/content/translation-view.element.d.ts +1 -0
- package/dist/jobs/jobs.repository.d.ts +10 -10
- package/dist/jobs/workspace/translation-job-workspace.context.d.ts +1 -1
- package/dist/lang/files/da/da.d.ts +2 -0
- package/dist/lang/files/da/tmSettings.da.d.ts +2 -0
- package/dist/lang/files/de/de.d.ts +2 -0
- package/dist/lang/files/de/tmSettings.de.d.ts +2 -0
- package/dist/lang/files/en/en.d.ts +3 -0
- package/dist/lang/files/en/tm.en.d.ts +1 -0
- package/dist/lang/files/en/tmSettings.en.d.ts +2 -0
- package/dist/lang/files/es/es.d.ts +2 -0
- package/dist/lang/files/es/tmSettings.es.d.ts +2 -0
- package/dist/lang/files/fr/fr.d.ts +2 -0
- package/dist/lang/files/fr/tmSettings.fr.d.ts +2 -0
- package/dist/lang/files/nl/nl.d.ts +2 -0
- package/dist/lang/files/nl/tmSettings.nl.d.ts +2 -0
- package/dist/nodes/node.respository.d.ts +33 -18
- package/dist/strategies/creation/actions/inplace.actions.d.ts +14 -0
- package/dist/strategies/creation/steps/inplace/inplace-config-step.element.d.ts +27 -0
- package/dist/strategies/creation/steps/inplace/inplace-job-result-step.element.d.ts +17 -0
- package/package.json +10 -14
- package/dist/api/client/client.gen.d.ts +0 -2
- package/dist/api/client/index.d.ts +0 -10
- package/dist/api/client/types.gen.d.ts +0 -120
- package/dist/api/client/utils.gen.d.ts +0 -37
- package/dist/api/client.gen.d.ts +0 -12
- package/dist/api/core/auth.gen.d.ts +0 -25
- package/dist/api/core/params.gen.d.ts +0 -43
- package/dist/api/core/types.gen.d.ts +0 -83
- package/dist/api/core/utils.gen.d.ts +0 -19
- package/dist/components/elements/models.d.ts +0 -33
- package/dist/components/elements/types.d.ts +0 -14
- package/dist/components/index.d.ts +0 -11
- package/dist/components/table/paged-table.element.d.ts +0 -64
- package/dist/components/table/translation-table-linked-item.d.ts +0 -14
- package/dist/components/translate-body-layout.element.d.ts +0 -13
- package/dist/components/translate-box.element.d.ts +0 -15
- package/dist/components/translate-property-layout.d.ts +0 -18
- package/dist/components/translation-empty-state.d.ts +0 -14
- package/dist/components/translation-language-card.d.ts +0 -17
- package/dist/components/translation-licence-box.element.d.ts +0 -13
- package/dist/components/translation-summary-card.d.ts +0 -17
- package/dist/conditions/manifest.d.ts +0 -1
- package/dist/conditions/selected-nodes.condition.d.ts +0 -8
- package/dist/conditions/sent-to-translate.condition.d.ts +0 -10
- package/dist/conditions/simple-translate.condition.d.ts +0 -12
- package/dist/connectors/components/connector-mapping.element.d.ts +0 -21
- package/dist/connectors/components/index.d.ts +0 -1
- package/dist/connectors/defaults/connector-config-default.element.d.ts +0 -6
- package/dist/connectors/defaults/connector-job-default.element.d.ts +0 -6
- package/dist/connectors/defaults/connector-pending-default.element.d.ts +0 -6
- package/dist/connectors/defaults/manifest.d.ts +0 -2
- package/dist/connectors/index.d.ts +0 -3
- package/dist/connectors/manifest.d.ts +0 -1
- package/dist/connectors/repository/connector-repository.d.ts +0 -11
- package/dist/connectors/types.d.ts +0 -10
- package/dist/content/actions/manifest.d.ts +0 -1
- package/dist/content/actions/translate.action.d.ts +0 -8
- package/dist/content/actions/translate.footer-app.d.ts +0 -14
- package/dist/content/components/document-sets.element.d.ts +0 -15
- package/dist/content/components/document-stats.element.d.ts +0 -15
- package/dist/content/components/index.d.ts +0 -4
- package/dist/content/components/simple-translate.element.d.ts +0 -18
- package/dist/content/index.d.ts +0 -1
- package/dist/hey-api.d.ts +0 -11
- package/dist/icons/icons.d.ts +0 -5
- package/dist/icons/manifest.d.ts +0 -1
- package/dist/icons/svgs/translate.d.ts +0 -2
- package/dist/index.d.ts +0 -8
- package/dist/jobs/components/index.d.ts +0 -8
- package/dist/jobs/components/job-copyproperties.element.d.ts +0 -15
- package/dist/jobs/components/job-list-selection.element.d.ts +0 -17
- package/dist/jobs/components/job-list-table.element.d.ts +0 -18
- package/dist/jobs/components/job-processing-bar.element.d.ts +0 -14
- package/dist/jobs/components/job-provider-view.element.d.ts +0 -21
- package/dist/jobs/components/job-status-badge.d.ts +0 -13
- package/dist/jobs/components/job-status-bar.element.d.ts +0 -14
- package/dist/jobs/manifest.d.ts +0 -1
- package/dist/jobs/styles.d.ts +0 -1
- package/dist/jobs/types.d.ts +0 -2
- package/dist/jobs/workspace/actions/job-cancel.action.d.ts +0 -5
- package/dist/jobs/workspace/actions/job-check.action.d.ts +0 -5
- package/dist/jobs/workspace/actions/job-remove.action.d.ts +0 -5
- package/dist/jobs/workspace/actions/job-reset.action.d.ts +0 -5
- package/dist/jobs/workspace/actions/manifest.d.ts +0 -1
- package/dist/jobs/workspace/conditions/job-status.condition.d.ts +0 -14
- package/dist/jobs/workspace/conditions/manifest.d.ts +0 -1
- package/dist/jobs/workspace/manifest.d.ts +0 -1
- package/dist/jobs/workspace/translation-job-element.d.ts +0 -10
- package/dist/jobs/workspace/views/job-history-view.element.d.ts +0 -11
- package/dist/lang/files/da/tm.da.d.ts +0 -31
- package/dist/lang/files/de/tm.de.d.ts +0 -31
- package/dist/lang/files/es/tm.es.d.ts +0 -31
- package/dist/lang/files/fr/tm.fr.d.ts +0 -31
- package/dist/lang/files/nl/tm.nl.d.ts +0 -31
- package/dist/lang/manifest.d.ts +0 -1
- package/dist/nodes/components/node-property-element.d.ts +0 -18
- package/dist/nodes/components/node-single-value.element.d.ts +0 -22
- package/dist/nodes/components/node-status-badge.d.ts +0 -13
- package/dist/nodes/components/node-tabs.element.d.ts +0 -19
- package/dist/nodes/components/node-value.element.d.ts +0 -25
- package/dist/nodes/manifest.d.ts +0 -1
- package/dist/nodes/styles.d.ts +0 -1
- package/dist/nodes/types.d.ts +0 -2
- package/dist/nodes/workspace/manifest.d.ts +0 -1
- package/dist/nodes/workspace/translation-node-workspace.context.d.ts +0 -18
- package/dist/nodes/workspace/translation-node.element.d.ts +0 -13
- package/dist/permissions/manifest.d.ts +0 -1
- package/dist/section/dashboard/manifest.d.ts +0 -1
- package/dist/section/manifest.d.ts +0 -1
- package/dist/section/tree/manifest.d.ts +0 -1
- package/dist/section/tree/translations-tree.data-source.d.ts +0 -6
- package/dist/section/tree/translations-tree.repository.d.ts +0 -11
- package/dist/section/tree/translations-tree.store.d.ts +0 -8
- package/dist/section/tree/types.d.ts +0 -15
- package/dist/section/types.d.ts +0 -31
- package/dist/section/workspace/language/translation-language-workspace.context.d.ts +0 -21
- package/dist/section/workspace/language/translation-language.element.d.ts +0 -13
- package/dist/section/workspace/manifest.d.ts +0 -1
- package/dist/section/workspace/pending/translation-pending-element.d.ts +0 -9
- package/dist/section/workspace/pending/translation-pending-workspace.context.d.ts +0 -17
- package/dist/section/workspace/pending-language/translation-pending-language-element.d.ts +0 -15
- package/dist/section/workspace/pending-language/translation-pending-language-workspace.content.d.ts +0 -19
- package/dist/section/workspace/stage/translation-stage-element.d.ts +0 -18
- package/dist/section/workspace/stage/translation-stage-workspace.context.d.ts +0 -24
- package/dist/sets/manifest.d.ts +0 -1
- package/dist/sets/sets.context.d.ts +0 -24
- package/dist/sets/sets.repository.d.ts +0 -27
- package/dist/settings/connectors/constants.d.ts +0 -11
- package/dist/settings/connectors/index.d.ts +0 -3
- package/dist/settings/connectors/manifest.d.ts +0 -1
- package/dist/settings/connectors/menu/connector-menu-item.element.d.ts +0 -9
- package/dist/settings/connectors/menu/connector-menu.element.d.ts +0 -11
- package/dist/settings/connectors/menu/manifest.d.ts +0 -2
- package/dist/settings/connectors/root/connector-root.element.d.ts +0 -21
- package/dist/settings/connectors/root/manifest.d.ts +0 -1
- package/dist/settings/connectors/workspace/actions/connector-save-settings.action.d.ts +0 -6
- package/dist/settings/connectors/workspace/actions/manifest.d.ts +0 -1
- package/dist/settings/connectors/workspace/connector-settings.context.d.ts +0 -20
- package/dist/settings/connectors/workspace/connector-settings.workspace.element.d.ts +0 -15
- package/dist/settings/connectors/workspace/connector-settings.workspace.route.d.ts +0 -9
- package/dist/settings/connectors/workspace/manifest.d.ts +0 -1
- package/dist/settings/index.d.ts +0 -5
- package/dist/settings/manifest.d.ts +0 -1
- package/dist/settings/respository/settings.repository.d.ts +0 -22
- package/dist/settings/sets/components/index.d.ts +0 -3
- package/dist/settings/sets/components/manifest.d.ts +0 -1
- package/dist/settings/sets/components/set-card.element.d.ts +0 -14
- package/dist/settings/sets/components/set-root-view.element.d.ts +0 -17
- package/dist/settings/sets/components/set-site-picker.element.d.ts +0 -11
- package/dist/settings/sets/components/set-site-picker.modal.d.ts +0 -25
- package/dist/settings/sets/components/set-site-picker.modal.token.d.ts +0 -9
- package/dist/settings/sets/entity/actions/manifest.d.ts +0 -1
- package/dist/settings/sets/entity/actions/set-entity-save.action.d.ts +0 -5
- package/dist/settings/sets/entity/manifest.d.ts +0 -1
- package/dist/settings/sets/entity/set-entity-context.d.ts +0 -29
- package/dist/settings/sets/entity/set-entity-workspace.element.d.ts +0 -10
- package/dist/settings/sets/entity/set-entity-workspace.root.d.ts +0 -9
- package/dist/settings/sets/entity/set-isnew-redirect.controller.d.ts +0 -8
- package/dist/settings/sets/entity/views/manifest.d.ts +0 -1
- package/dist/settings/sets/entity/views/set-advanced.element.d.ts +0 -18
- package/dist/settings/sets/entity/views/set-notifications.element.d.ts +0 -12
- package/dist/settings/sets/index.d.ts +0 -4
- package/dist/settings/sets/manifest.d.ts +0 -1
- package/dist/settings/sets/menu/actions/delete.d.ts +0 -8
- package/dist/settings/sets/menu/actions/refresh.d.ts +0 -5
- package/dist/settings/sets/menu/manifest.d.ts +0 -1
- package/dist/settings/sets/menu/set-menu-item.element.d.ts +0 -15
- package/dist/settings/sets/menu/sets-menu.element.d.ts +0 -15
- package/dist/settings/sets/root/manifest.d.ts +0 -1
- package/dist/settings/sets/root/sets-root.element.d.ts +0 -9
- package/dist/settings/sets/types.d.ts +0 -5
- package/dist/settings/tree/manifest.d.ts +0 -1
- package/dist/settings/tree/settings-menu.element.d.ts +0 -11
- package/dist/settings/tree/types.d.ts +0 -6
- package/dist/settings/workspace/manifest.d.ts +0 -2
- package/dist/settings/workspace/views/default/default.element.d.ts +0 -11
- package/dist/settings/workspace/views/diagnostics/diagnostict.element.d.ts +0 -10
- package/dist/settings/workspace/views/index.d.ts +0 -4
- package/dist/settings/workspace/views/licence/licence.element.d.ts +0 -16
- package/dist/settings/workspace/views/notifications/notification.element.d.ts +0 -11
- package/dist/settings/workspace/views/sets/sets.element.d.ts +0 -10
- package/dist/settings/workspace/workspace.context.d.ts +0 -19
- package/dist/settings/workspace/workspace.element.d.ts +0 -8
- package/dist/strategies/approval/manifest.d.ts +0 -1
- package/dist/strategies/approval/steps/approve-result.element.d.ts +0 -5
- package/dist/strategies/creation/actions/create.actions.d.ts +0 -7
- package/dist/strategies/creation/actions/manifest.d.ts +0 -1
- package/dist/strategies/creation/components/connector-options.element.d.ts +0 -16
- package/dist/strategies/creation/components/index.d.ts +0 -5
- package/dist/strategies/creation/components/job-options.element.d.ts +0 -17
- package/dist/strategies/creation/components/language-picker.element.d.ts +0 -25
- package/dist/strategies/creation/components/render-results.element.d.ts +0 -17
- package/dist/strategies/creation/index.d.ts +0 -1
- package/dist/strategies/creation/manifest.d.ts +0 -1
- package/dist/strategies/creation/steps/choose-provider-step.element.d.ts +0 -18
- package/dist/strategies/creation/steps/clean/clean-config-step.element.d.ts +0 -22
- package/dist/strategies/creation/steps/clean/manifest.d.ts +0 -2
- package/dist/strategies/creation/steps/create-config-step.element.d.ts +0 -23
- package/dist/strategies/creation/steps/create-from-nodes-step.element.d.ts +0 -19
- package/dist/strategies/creation/steps/create-job-results-step.element.d.ts +0 -9
- package/dist/strategies/creation/steps/manifest.d.ts +0 -2
- package/dist/strategies/creation/steps/pending-background-step.element.d.ts +0 -12
- package/dist/strategies/creation/steps/simple-job-result-step.element.d.ts +0 -8
- package/dist/strategies/creation/translation-creation.context.d.ts +0 -15
- package/dist/strategies/index.d.ts +0 -1
- package/dist/strategies/manifest.d.ts +0 -1
- /package/dist/strategies/{approval/steps → creation/steps/inplace}/manifest.d.ts +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
|
2
|
+
import { UmbConditionConfigBase, UmbConditionControllerArguments, UmbExtensionCondition } from '@umbraco-cms/backoffice/extension-api';
|
|
3
|
+
import { UmbConditionBase } from '@umbraco-cms/backoffice/extension-registry';
|
|
4
|
+
export declare function isInPlaceEnabled(): Promise<boolean>;
|
|
5
|
+
export type InPlaceEnabledConditionConfig = UmbConditionConfigBase & {};
|
|
6
|
+
export declare class TranslationInPlaceEnabledCondition extends UmbConditionBase<InPlaceEnabledConditionConfig> implements UmbExtensionCondition {
|
|
7
|
+
config: InPlaceEnabledConditionConfig;
|
|
8
|
+
constructor(host: UmbControllerHost, args: UmbConditionControllerArguments<InPlaceEnabledConditionConfig>);
|
|
9
|
+
}
|
|
10
|
+
export { TranslationInPlaceEnabledCondition as api };
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { CSSResultGroup, nothing } from '@umbraco-cms/backoffice/external/lit';
|
|
2
2
|
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
|
|
3
|
-
import { TranslationNodeStatus } from '../../api';
|
|
3
|
+
import { TranslationEntityType, TranslationNodeStatus } from '../../api';
|
|
4
4
|
import { UmbTableColumn, UmbTableConfig } from '@umbraco-cms/backoffice/components';
|
|
5
5
|
export declare class TranslationDocumentTranslations extends UmbLitElement {
|
|
6
6
|
#private;
|
|
7
7
|
unique?: string;
|
|
8
|
+
entityType: TranslationEntityType;
|
|
8
9
|
currentCulture?: string | null;
|
|
9
10
|
status?: TranslationNodeStatus[];
|
|
10
11
|
_tableConfig: UmbTableConfig;
|
|
@@ -1,28 +1,38 @@
|
|
|
1
1
|
import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
|
|
2
2
|
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
|
|
3
3
|
import { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
|
4
|
+
import { TranslationEntityType } from '../api';
|
|
4
5
|
export declare class TranslationDocumentViewContext extends UmbControllerBase {
|
|
5
6
|
#private;
|
|
6
7
|
readonly unique: import("rxjs").Observable<string | undefined>;
|
|
7
8
|
constructor(host: UmbControllerHost);
|
|
8
9
|
setUnique(unique: string): void;
|
|
9
|
-
getStats(key: string, includeChildren: boolean): Promise<import("..").WordCountInfo>;
|
|
10
|
-
getSetInfo(key: string): Promise<import("..").TranslationSet[] | undefined>;
|
|
11
|
-
getStatus(key: string): Promise<import("..").TranslationNodeStatus[]>;
|
|
12
|
-
cloneTranslation(contentId: number, source: string, target: string): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
|
|
10
|
+
getStats(key: string, includeChildren: boolean, entityType?: TranslationEntityType): Promise<import("..").WordCountInfo | undefined>;
|
|
11
|
+
getSetInfo(key: string, entityType?: TranslationEntityType): Promise<import("..").TranslationSet[] | undefined>;
|
|
12
|
+
getStatus(key: string, entityType?: TranslationEntityType): Promise<import("..").TranslationNodeStatus[] | undefined>;
|
|
13
|
+
cloneTranslation(contentId: number, source: string, target: string): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
|
|
13
14
|
data: unknown;
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
error: undefined;
|
|
16
|
+
} | {
|
|
17
|
+
data: undefined;
|
|
18
|
+
error: unknown;
|
|
19
|
+
}) & {
|
|
20
|
+
request?: Request;
|
|
21
|
+
response?: Response;
|
|
16
22
|
}>>;
|
|
17
|
-
startCreate(key?: string, language?: string): Promise<void>;
|
|
23
|
+
startCreate(key?: string, language?: string, primaryType?: string): Promise<void>;
|
|
18
24
|
/**
|
|
19
25
|
* starts the same create-job pipeline as {@link startCreate}, but for a
|
|
20
26
|
* flattened bulk selection of content ids (see the content section's bulk
|
|
21
27
|
* translation dashboard). the pipeline itself doesn't care how the ids were
|
|
22
28
|
* picked, so this is just a second entry point into the same modal.
|
|
29
|
+
*
|
|
30
|
+
* document-only for now - the bulk dashboard only ever picks from the
|
|
31
|
+
* Content tree, so there's no entity-type ambiguity to thread through here.
|
|
23
32
|
*/
|
|
24
33
|
startBulkCreate(contentIds: string[]): Promise<void>;
|
|
25
|
-
startSimple(key: string, language?: string): Promise<void>;
|
|
34
|
+
startSimple(key: string, language?: string, primaryType?: string): Promise<void>;
|
|
35
|
+
startInPlace(key?: string, primaryType?: string): Promise<void>;
|
|
26
36
|
}
|
|
27
37
|
export default TranslationDocumentViewContext;
|
|
28
38
|
export declare const JUMOO_TM_DOCUMENT_VIEW_CONTEXT: UmbContextToken<TranslationDocumentViewContext, TranslationDocumentViewContext>;
|
|
@@ -3,6 +3,7 @@ import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
|
|
|
3
3
|
export declare class TranslationViewElement extends UmbLitElement {
|
|
4
4
|
#private;
|
|
5
5
|
key?: string;
|
|
6
|
+
_inPlaceEnabled: boolean;
|
|
6
7
|
currentCulture?: string | null;
|
|
7
8
|
constructor();
|
|
8
9
|
render(): import("lit-html").TemplateResult<1>;
|
|
@@ -14,11 +14,11 @@ export type TranslationJobCheckResult = {
|
|
|
14
14
|
export declare class TranslationJobsRespository extends UmbControllerBase {
|
|
15
15
|
#private;
|
|
16
16
|
constructor(host: UmbControllerHost);
|
|
17
|
-
getJob(unique: string): Promise<import("..").TranslationJobView>;
|
|
18
|
-
getAllJobs(): Promise<import("..").TranslationJobView[]>;
|
|
19
|
-
getAllByStatus(minStatus: JobStatus, maxStatus: JobStatus, page: number): Promise<import("..").PagedModelTranslationJobViewModel>;
|
|
20
|
-
getAllByStatusAndCulture(minStatus: JobStatus, maxStatus: JobStatus, culture: string, page: number): Promise<import("..").PagedModelTranslationJobViewModel>;
|
|
21
|
-
getCultureInfo(culture: string): Promise<import("..").CultureInfoView>;
|
|
17
|
+
getJob(unique: string): Promise<import("..").TranslationJobView | undefined>;
|
|
18
|
+
getAllJobs(): Promise<import("..").TranslationJobView[] | undefined>;
|
|
19
|
+
getAllByStatus(minStatus: JobStatus, maxStatus: JobStatus, page: number): Promise<import("..").PagedModelTranslationJobViewModel | undefined>;
|
|
20
|
+
getAllByStatusAndCulture(minStatus: JobStatus, maxStatus: JobStatus, culture: string, page: number): Promise<import("..").PagedModelTranslationJobViewModel | undefined>;
|
|
21
|
+
getCultureInfo(culture: string): Promise<import("..").CultureInfoView | undefined>;
|
|
22
22
|
check(unique: string): Promise<TranslationJobCheckResult>;
|
|
23
23
|
resetStatus(unique: string, JobStatus: JobStatus): Promise<void>;
|
|
24
24
|
CancelJob(unique: string): Promise<void>;
|
|
@@ -27,9 +27,9 @@ export declare class TranslationJobsRespository extends UmbControllerBase {
|
|
|
27
27
|
removeJobs(jobs: string[]): Promise<void>;
|
|
28
28
|
cancelJobs(jobs: string[]): Promise<void>;
|
|
29
29
|
checkJobs(jobs: string[]): Promise<void>;
|
|
30
|
-
getHistory(unique: string): Promise<import("..").TranslationAuditItem[]>;
|
|
31
|
-
updateCopyProperties(unique: string, copyProperties: boolean): Promise<boolean>;
|
|
32
|
-
getStatusSummaryRange(minStatus: JobStatus, maxStatus: JobStatus): Promise<import("..").SummaryItem[]>;
|
|
33
|
-
getStatusSummaryCount(minStatus: JobStatus, maxStatus: JobStatus): Promise<import("..").StatusSummaryCount>;
|
|
34
|
-
getStatus(unique: string): Promise<JobStatus>;
|
|
30
|
+
getHistory(unique: string): Promise<import("..").TranslationAuditItem[] | undefined>;
|
|
31
|
+
updateCopyProperties(unique: string, copyProperties: boolean): Promise<boolean | undefined>;
|
|
32
|
+
getStatusSummaryRange(minStatus: JobStatus, maxStatus: JobStatus): Promise<import("..").SummaryItem[] | undefined>;
|
|
33
|
+
getStatusSummaryCount(minStatus: JobStatus, maxStatus: JobStatus): Promise<import("..").StatusSummaryCount | undefined>;
|
|
34
|
+
getStatus(unique: string): Promise<JobStatus | undefined>;
|
|
35
35
|
}
|
|
@@ -30,7 +30,7 @@ export declare class TranslationJobWorkspaceContext extends UmbEditableWorkspace
|
|
|
30
30
|
remove(): Promise<void>;
|
|
31
31
|
archive(): Promise<void>;
|
|
32
32
|
reset(status: JobStatus): Promise<void>;
|
|
33
|
-
getHistory(unique: string): Promise<import("../..").TranslationAuditItem[]>;
|
|
33
|
+
getHistory(unique: string): Promise<import("../..").TranslationAuditItem[] | undefined>;
|
|
34
34
|
protected submit(): Promise<void>;
|
|
35
35
|
}
|
|
36
36
|
export { TranslationJobWorkspaceContext as api };
|
|
@@ -388,6 +388,8 @@ declare const _default: {
|
|
|
388
388
|
licencedDomainsDescription: string;
|
|
389
389
|
useLegacySubmit: string;
|
|
390
390
|
useLegacySubmitDescription: string;
|
|
391
|
+
translateInPlace: string;
|
|
392
|
+
translateInPlaceDescription: string;
|
|
391
393
|
};
|
|
392
394
|
tmStats: {
|
|
393
395
|
pages: string;
|
|
@@ -412,6 +414,7 @@ declare const _default: {
|
|
|
412
414
|
};
|
|
413
415
|
tm: {
|
|
414
416
|
create: string;
|
|
417
|
+
translateInPlace: string;
|
|
415
418
|
language: string;
|
|
416
419
|
languagePickerDescription: string;
|
|
417
420
|
options: string;
|
|
@@ -1,30 +1,45 @@
|
|
|
1
1
|
import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
|
|
2
2
|
import { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
|
3
|
-
import { BulkSelectionRequestItem, NodeStatus, TranslationValue } from '../api';
|
|
3
|
+
import { BulkSelectionRequestItem, NodeStatus, TranslationEntityType, TranslationValue } from '../api';
|
|
4
4
|
export declare class TranslationNodeRespository extends UmbControllerBase {
|
|
5
5
|
#private;
|
|
6
6
|
constructor(host: UmbControllerHost);
|
|
7
|
-
getNode(unique: string): Promise<import("..").TranslationNode>;
|
|
8
|
-
getPending(culture: string, page: number): Promise<import("..").PagedModelTranslationNodeModel>;
|
|
9
|
-
getSummaries(): Promise<import("..").SummaryItem[]>;
|
|
10
|
-
getSummaryCount(status: NodeStatus): Promise<number>;
|
|
11
|
-
getCultureInfo(culture: string): Promise<import("..").CultureInfoView>;
|
|
12
|
-
deleteNodes(nodeIds: string[]): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
|
|
7
|
+
getNode(unique: string): Promise<import("..").TranslationNode | undefined>;
|
|
8
|
+
getPending(culture: string, page: number): Promise<import("..").PagedModelTranslationNodeModel | undefined>;
|
|
9
|
+
getSummaries(): Promise<import("..").SummaryItem[] | undefined>;
|
|
10
|
+
getSummaryCount(status: NodeStatus): Promise<number | undefined>;
|
|
11
|
+
getCultureInfo(culture: string): Promise<import("..").CultureInfoView | undefined>;
|
|
12
|
+
deleteNodes(nodeIds: string[]): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
|
|
13
13
|
data: unknown;
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
error: undefined;
|
|
15
|
+
} | {
|
|
16
|
+
data: undefined;
|
|
17
|
+
error: unknown;
|
|
18
|
+
}) & {
|
|
19
|
+
request?: Request;
|
|
20
|
+
response?: Response;
|
|
16
21
|
}>>;
|
|
17
|
-
getWordCountInfo(unique: string, includeChildren: boolean): Promise<import("..").WordCountInfo>;
|
|
18
|
-
getNodeStatus(key: string): Promise<import("..").TranslationNodeStatus[]>;
|
|
19
|
-
getBulkSelection(items: BulkSelectionRequestItem[]): Promise<import("..").BulkSelectionResult>;
|
|
20
|
-
updateTranslationValue(nodeId: number, value: TranslationValue): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
|
|
22
|
+
getWordCountInfo(unique: string, includeChildren: boolean, entityType?: TranslationEntityType): Promise<import("..").WordCountInfo | undefined>;
|
|
23
|
+
getNodeStatus(key: string, entityType?: TranslationEntityType): Promise<import("..").TranslationNodeStatus[] | undefined>;
|
|
24
|
+
getBulkSelection(items: BulkSelectionRequestItem[]): Promise<import("..").BulkSelectionResult | undefined>;
|
|
25
|
+
updateTranslationValue(nodeId: number, value: TranslationValue): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
|
|
21
26
|
data: unknown;
|
|
22
|
-
|
|
23
|
-
|
|
27
|
+
error: undefined;
|
|
28
|
+
} | {
|
|
29
|
+
data: undefined;
|
|
30
|
+
error: unknown;
|
|
31
|
+
}) & {
|
|
32
|
+
request?: Request;
|
|
33
|
+
response?: Response;
|
|
24
34
|
}>>;
|
|
25
|
-
cloneNode(contentId: number, source: string, target: string): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<{
|
|
35
|
+
cloneNode(contentId: number, source: string, target: string): Promise<import("@umbraco-cms/backoffice/resources").UmbApiResponse<({
|
|
26
36
|
data: unknown;
|
|
27
|
-
|
|
28
|
-
|
|
37
|
+
error: undefined;
|
|
38
|
+
} | {
|
|
39
|
+
data: undefined;
|
|
40
|
+
error: unknown;
|
|
41
|
+
}) & {
|
|
42
|
+
request?: Request;
|
|
43
|
+
response?: Response;
|
|
29
44
|
}>>;
|
|
30
45
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
|
|
2
|
+
import { UmbEntityActionArgs, UmbEntityActionBase } from '@umbraco-cms/backoffice/entity-action';
|
|
3
|
+
/**
|
|
4
|
+
* "Translate in place" entity action (issue #95).
|
|
5
|
+
*
|
|
6
|
+
* Unlike {@link TranslationCreateAction} this is deliberately NOT gated by the
|
|
7
|
+
* "content is in a translation set" condition - it is available on any content
|
|
8
|
+
* item so an editor can translate a duplicated/copied page that has no set.
|
|
9
|
+
*/
|
|
10
|
+
export declare class TranslationInPlaceAction extends UmbEntityActionBase<never> {
|
|
11
|
+
constructor(host: UmbControllerHost, args: UmbEntityActionArgs<never>);
|
|
12
|
+
execute(): Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
export default TranslationInPlaceAction;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ProcessStepElement, ProcessStepElementBase } from '@jumoo/processing';
|
|
2
|
+
import { TranslationProviderInfo } from '@jumoo/translate';
|
|
3
|
+
interface LanguageOption {
|
|
4
|
+
unique: string;
|
|
5
|
+
name: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Config step for the zero-config "translate in place" flow (issue #95).
|
|
9
|
+
*
|
|
10
|
+
* There is no translation set here - the editor picks the language the content is
|
|
11
|
+
* written in today (source), one or more languages to translate it into (targets)
|
|
12
|
+
* and a connector. Everything is pushed onto the pipeline options as
|
|
13
|
+
* `inPlace: true`, `sourceCulture` and `cultures`.
|
|
14
|
+
*/
|
|
15
|
+
export declare class TranslationInPlaceConfigStepElement extends ProcessStepElementBase implements ProcessStepElement {
|
|
16
|
+
#private;
|
|
17
|
+
_languages: LanguageOption[];
|
|
18
|
+
_connectors?: TranslationProviderInfo[];
|
|
19
|
+
_sourceCulture?: string;
|
|
20
|
+
_targetCultures: string[];
|
|
21
|
+
_providerKey?: string;
|
|
22
|
+
constructor();
|
|
23
|
+
connectedCallback(): Promise<void>;
|
|
24
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
25
|
+
static styles: import("lit").CSSResult[];
|
|
26
|
+
}
|
|
27
|
+
export default TranslationInPlaceConfigStepElement;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ProcessStepElement, ProcessStepElementBase } from '@jumoo/processing';
|
|
2
|
+
/**
|
|
3
|
+
* Results step for the "translate in place" flow (issue #95).
|
|
4
|
+
*
|
|
5
|
+
* A distinct custom element (tag `jumoo-translation-inplace-results`) is required
|
|
6
|
+
* because the pipeline renders the results action by tag name. It shows the
|
|
7
|
+
* created job(s) with a link to review/approve - in-place content is written back
|
|
8
|
+
* and published when the job is approved, so this intentionally does NOT claim the
|
|
9
|
+
* content is already published.
|
|
10
|
+
*/
|
|
11
|
+
export declare class TranslationInPlaceJobResultStep extends ProcessStepElementBase implements ProcessStepElement {
|
|
12
|
+
#private;
|
|
13
|
+
connectedCallback(): void;
|
|
14
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
15
|
+
static styles: import("lit").CSSResult[];
|
|
16
|
+
}
|
|
17
|
+
export default TranslationInPlaceJobResultStep;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jumoo/translate",
|
|
3
3
|
"licence": "Custom",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "18.3.2-prerelease.19",
|
|
5
5
|
"description": "Jumoo Translation Client",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"repository": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"client:publish": "npm publish -tag next",
|
|
31
31
|
"client:make": "npm run client:build && npm run client:pack && npm run client:publish",
|
|
32
32
|
"client:link": "npm link",
|
|
33
|
-
"generate": "openapi
|
|
33
|
+
"generate-client": "node scripts/generate-openapi.js https://localhost:44380/umbraco/openapi/translationmanager.json",
|
|
34
34
|
"format:fix": "npm run format -- --write",
|
|
35
35
|
"format": "prettier \"src/**/*.ts\" --check",
|
|
36
36
|
"build": "tsc && vite build",
|
|
@@ -39,17 +39,13 @@
|
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@hey-api/openapi-ts": "^0.99.0",
|
|
42
|
-
"@jumoo/processing": "^
|
|
43
|
-
"@
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"typescript": "^
|
|
49
|
-
"vite": "^8.
|
|
50
|
-
"vite-plugin-checker": "^0.14.5",
|
|
51
|
-
"vite-plugin-dts": "^5.0.3",
|
|
52
|
-
"vite-plugin-static-copy": "^4.1.0",
|
|
53
|
-
"vite-tsconfig-paths": "^6.1.1"
|
|
42
|
+
"@jumoo/processing": "^18.2.0",
|
|
43
|
+
"@umbraco-cms/backoffice": "^18.0.0",
|
|
44
|
+
"chalk": "^5.6.2",
|
|
45
|
+
"cross-env": "^10.1.0",
|
|
46
|
+
"node-fetch": "^3.3.2",
|
|
47
|
+
"prettier": "3.8.3",
|
|
48
|
+
"typescript": "^6.0.3",
|
|
49
|
+
"vite": "^8.1.3"
|
|
54
50
|
}
|
|
55
51
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export type { Auth } from '../core/auth.gen';
|
|
2
|
-
export type { QuerySerializerOptions } from '../core/bodySerializer.gen';
|
|
3
|
-
export { formDataBodySerializer, jsonBodySerializer, urlSearchParamsBodySerializer, } from '../core/bodySerializer.gen';
|
|
4
|
-
export { buildClientParams } from '../core/params.gen';
|
|
5
|
-
export { serializeQueryKeyValue } from '../core/queryKeySerializer.gen';
|
|
6
|
-
export type { ServerSentEventsResult } from '../core/serverSentEvents.gen';
|
|
7
|
-
export type { ClientMeta } from '../core/types.gen';
|
|
8
|
-
export { createClient } from './client.gen';
|
|
9
|
-
export type { Client, ClientOptions, Config, CreateClientConfig, Options, RequestOptions, RequestResult, ResolvedRequestOptions, ResponseStyle, TDataShape, } from './types.gen';
|
|
10
|
-
export { createConfig, mergeHeaders } from './utils.gen';
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import type { Auth } from '../core/auth.gen';
|
|
2
|
-
import type { ServerSentEventsOptions, ServerSentEventsResult } from '../core/serverSentEvents.gen';
|
|
3
|
-
import type { Client as CoreClient, Config as CoreConfig } from '../core/types.gen';
|
|
4
|
-
import type { Middleware } from './utils.gen';
|
|
5
|
-
export type ResponseStyle = 'data' | 'fields';
|
|
6
|
-
export interface Config<T extends ClientOptions = ClientOptions> extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {
|
|
7
|
-
/**
|
|
8
|
-
* Base URL for all requests made by this client.
|
|
9
|
-
*/
|
|
10
|
-
baseUrl?: T['baseUrl'];
|
|
11
|
-
/**
|
|
12
|
-
* Fetch API implementation. You can use this option to provide a custom
|
|
13
|
-
* fetch instance.
|
|
14
|
-
*
|
|
15
|
-
* @default globalThis.fetch
|
|
16
|
-
*/
|
|
17
|
-
fetch?: typeof fetch;
|
|
18
|
-
/**
|
|
19
|
-
* Please don't use the Fetch client for Next.js applications. The `next`
|
|
20
|
-
* options won't have any effect.
|
|
21
|
-
*
|
|
22
|
-
* Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.
|
|
23
|
-
*/
|
|
24
|
-
next?: never;
|
|
25
|
-
/**
|
|
26
|
-
* Return the response data parsed in a specified format. By default, `auto`
|
|
27
|
-
* will infer the appropriate method from the `Content-Type` response header.
|
|
28
|
-
* You can override this behavior with any of the {@link Body} methods.
|
|
29
|
-
* Select `stream` if you don't want to parse response data at all.
|
|
30
|
-
*
|
|
31
|
-
* @default 'auto'
|
|
32
|
-
*/
|
|
33
|
-
parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';
|
|
34
|
-
/**
|
|
35
|
-
* Should we return only data or multiple fields (data, error, response, etc.)?
|
|
36
|
-
*
|
|
37
|
-
* @default 'fields'
|
|
38
|
-
*/
|
|
39
|
-
responseStyle?: ResponseStyle;
|
|
40
|
-
/**
|
|
41
|
-
* Throw an error instead of returning it in the response?
|
|
42
|
-
*
|
|
43
|
-
* @default false
|
|
44
|
-
*/
|
|
45
|
-
throwOnError?: T['throwOnError'];
|
|
46
|
-
}
|
|
47
|
-
export interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
|
|
48
|
-
responseStyle: TResponseStyle;
|
|
49
|
-
throwOnError: ThrowOnError;
|
|
50
|
-
}>, Pick<ServerSentEventsOptions<TData>, 'onRequest' | 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
|
|
51
|
-
/**
|
|
52
|
-
* Any body that you want to add to your request.
|
|
53
|
-
*
|
|
54
|
-
* {@link https://developer.mozilla.org/docs/Web/API/fetch#body}
|
|
55
|
-
*/
|
|
56
|
-
body?: unknown;
|
|
57
|
-
path?: Record<string, unknown>;
|
|
58
|
-
query?: Record<string, unknown>;
|
|
59
|
-
/**
|
|
60
|
-
* Security mechanism(s) to use for the request.
|
|
61
|
-
*/
|
|
62
|
-
security?: ReadonlyArray<Auth>;
|
|
63
|
-
url: Url;
|
|
64
|
-
}
|
|
65
|
-
export interface ResolvedRequestOptions<TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {
|
|
66
|
-
headers: Headers;
|
|
67
|
-
serializedBody?: string;
|
|
68
|
-
}
|
|
69
|
-
export type RequestResult<TData = unknown, TError = unknown, ThrowOnError extends boolean = boolean, TResponseStyle extends ResponseStyle = 'fields'> = ThrowOnError extends true ? Promise<TResponseStyle extends 'data' ? TData extends Record<string, unknown> ? TData[keyof TData] : TData : {
|
|
70
|
-
data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
|
|
71
|
-
request: Request;
|
|
72
|
-
response: Response;
|
|
73
|
-
}> : Promise<TResponseStyle extends 'data' ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined : ({
|
|
74
|
-
data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
|
|
75
|
-
error: undefined;
|
|
76
|
-
} | {
|
|
77
|
-
data: undefined;
|
|
78
|
-
error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;
|
|
79
|
-
}) & {
|
|
80
|
-
/** request may be undefined, because error may be from building the request object itself */
|
|
81
|
-
request?: Request;
|
|
82
|
-
/** response may be undefined, because error may be from building the request object itself or from a network error */
|
|
83
|
-
response?: Response;
|
|
84
|
-
}>;
|
|
85
|
-
export interface ClientOptions {
|
|
86
|
-
baseUrl?: string;
|
|
87
|
-
responseStyle?: ResponseStyle;
|
|
88
|
-
throwOnError?: boolean;
|
|
89
|
-
}
|
|
90
|
-
type MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
|
|
91
|
-
type SseFn = <TData = unknown, _TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<never, TResponseStyle, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData>>;
|
|
92
|
-
type RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> & Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
|
|
93
|
-
type BuildUrlFn = <TData extends {
|
|
94
|
-
body?: unknown;
|
|
95
|
-
path?: Record<string, unknown>;
|
|
96
|
-
query?: Record<string, unknown>;
|
|
97
|
-
url: string;
|
|
98
|
-
}>(options: TData & Options<TData>) => string;
|
|
99
|
-
export type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {
|
|
100
|
-
interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;
|
|
101
|
-
};
|
|
102
|
-
/**
|
|
103
|
-
* The `createClientConfig()` function will be called on client initialization
|
|
104
|
-
* and the returned object will become the client's initial configuration.
|
|
105
|
-
*
|
|
106
|
-
* You may want to initialize your client this way instead of calling
|
|
107
|
-
* `setConfig()`. This is useful for example if you're using Next.js
|
|
108
|
-
* to ensure your client always has the correct values.
|
|
109
|
-
*/
|
|
110
|
-
export type CreateClientConfig<T extends ClientOptions = ClientOptions> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;
|
|
111
|
-
export interface TDataShape {
|
|
112
|
-
body?: unknown;
|
|
113
|
-
headers?: unknown;
|
|
114
|
-
path?: unknown;
|
|
115
|
-
query?: unknown;
|
|
116
|
-
url: string;
|
|
117
|
-
}
|
|
118
|
-
type OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;
|
|
119
|
-
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown, TResponseStyle extends ResponseStyle = 'fields'> = OmitKeys<RequestOptions<TResponse, TResponseStyle, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
|
|
120
|
-
export {};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { QuerySerializerOptions } from '../core/bodySerializer.gen';
|
|
2
|
-
import type { Client, ClientOptions, Config, RequestOptions } from './types.gen';
|
|
3
|
-
export declare const createQuerySerializer: <T = unknown>({ parameters, ...args }?: QuerySerializerOptions) => ((queryParams: T) => string);
|
|
4
|
-
/**
|
|
5
|
-
* Infers parseAs value from provided Content-Type header.
|
|
6
|
-
*/
|
|
7
|
-
export declare const getParseAs: (contentType: string | null) => Exclude<Config["parseAs"], "auto">;
|
|
8
|
-
export declare function setAuthParams(options: Pick<RequestOptions, 'auth' | 'query' | 'security'> & {
|
|
9
|
-
headers: Headers;
|
|
10
|
-
}): Promise<void>;
|
|
11
|
-
export declare const buildUrl: Client['buildUrl'];
|
|
12
|
-
export declare const mergeConfigs: (a: Config, b: Config) => Config;
|
|
13
|
-
export declare const mergeHeaders: (...headers: Array<Required<Config>["headers"] | undefined>) => Headers;
|
|
14
|
-
type ErrInterceptor<Err, Res, Req, Options> = (error: Err,
|
|
15
|
-
/** response may be undefined due to a network error where no response object is produced */
|
|
16
|
-
response: Res | undefined,
|
|
17
|
-
/** request may be undefined, because error may be from building the request object itself */
|
|
18
|
-
request: Req | undefined, options: Options) => Err | Promise<Err>;
|
|
19
|
-
type ReqInterceptor<Req, Options> = (request: Req, options: Options) => Req | Promise<Req>;
|
|
20
|
-
type ResInterceptor<Res, Req, Options> = (response: Res, request: Req, options: Options) => Res | Promise<Res>;
|
|
21
|
-
declare class Interceptors<Interceptor> {
|
|
22
|
-
fns: Array<Interceptor | null>;
|
|
23
|
-
clear(): void;
|
|
24
|
-
eject(id: number | Interceptor): void;
|
|
25
|
-
exists(id: number | Interceptor): boolean;
|
|
26
|
-
getInterceptorIndex(id: number | Interceptor): number;
|
|
27
|
-
update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false;
|
|
28
|
-
use(fn: Interceptor): number;
|
|
29
|
-
}
|
|
30
|
-
export interface Middleware<Req, Res, Err, Options> {
|
|
31
|
-
error: Interceptors<ErrInterceptor<Err, Res, Req, Options>>;
|
|
32
|
-
request: Interceptors<ReqInterceptor<Req, Options>>;
|
|
33
|
-
response: Interceptors<ResInterceptor<Res, Req, Options>>;
|
|
34
|
-
}
|
|
35
|
-
export declare const createInterceptors: <Req, Res, Err, Options>() => Middleware<Req, Res, Err, Options>;
|
|
36
|
-
export declare const createConfig: <T extends ClientOptions = ClientOptions>(override?: Config<Omit<ClientOptions, keyof T> & T>) => Config<Omit<ClientOptions, keyof T> & T>;
|
|
37
|
-
export {};
|
package/dist/api/client.gen.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type Client, type ClientOptions, type Config } from './client';
|
|
2
|
-
import type { ClientOptions as ClientOptions2 } from './types.gen';
|
|
3
|
-
/**
|
|
4
|
-
* The `createClientConfig()` function will be called on client initialization
|
|
5
|
-
* and the returned object will become the client's initial configuration.
|
|
6
|
-
*
|
|
7
|
-
* You may want to initialize your client this way instead of calling
|
|
8
|
-
* `setConfig()`. This is useful for example if you're using Next.js
|
|
9
|
-
* to ensure your client always has the correct values.
|
|
10
|
-
*/
|
|
11
|
-
export type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;
|
|
12
|
-
export declare const client: Client;
|