@uniformdev/canvas 20.7.1-alpha.75 → 20.7.1-alpha.79
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/index.d.mts +53 -7
- package/dist/index.d.ts +53 -7
- package/dist/index.esm.js +15 -5
- package/dist/index.js +15 -5
- package/dist/index.mjs +15 -5
- package/package.json +7 -6
package/dist/index.d.mts
CHANGED
@@ -2,6 +2,7 @@ import { ApiClient, ExceptProject, ClientOptions, ApiClientError } from '@unifor
|
|
2
2
|
export { ApiClientError } from '@uniformdev/context/api';
|
3
3
|
import { AssetGetResponseSingle, AssetParamValue, AssetParamValueItem } from '@uniformdev/assets';
|
4
4
|
export { AssetParamValue, AssetParamValueItem } from '@uniformdev/assets';
|
5
|
+
import { EndpointOut, EndpointHeadersOut, EndpointTransformationOut } from 'svix';
|
5
6
|
import { Quirks, StorageCommands, PersonalizedVariant, VariationMatchMetadata, TestVariant } from '@uniformdev/context';
|
6
7
|
import { Options as Options$1 } from 'p-retry';
|
7
8
|
import { Options } from 'p-throttle';
|
@@ -3094,7 +3095,13 @@ interface paths$h {
|
|
3094
3095
|
put: {
|
3095
3096
|
parameters: {
|
3096
3097
|
query?: never;
|
3097
|
-
header?:
|
3098
|
+
header?: {
|
3099
|
+
/** @description Optional concurrency control header. If provided, the server will check that the entry
|
3100
|
+
* has not been modified since this timestamp. If the timestamp doesn't match the current
|
3101
|
+
* modified timestamp, a 409 Conflict response will be returned.
|
3102
|
+
* */
|
3103
|
+
"X-If-Unmodified-Since"?: string;
|
3104
|
+
};
|
3098
3105
|
path?: never;
|
3099
3106
|
cookie?: never;
|
3100
3107
|
};
|
@@ -3168,6 +3175,15 @@ interface paths$h {
|
|
3168
3175
|
400: components$j["responses"]["BadRequestError"];
|
3169
3176
|
401: components$j["responses"]["UnauthorizedError"];
|
3170
3177
|
403: components$j["responses"]["ForbiddenError"];
|
3178
|
+
/** @description Conflict - Entry has been changed since being loaded */
|
3179
|
+
409: {
|
3180
|
+
headers: {
|
3181
|
+
[name: string]: unknown;
|
3182
|
+
};
|
3183
|
+
content: {
|
3184
|
+
"text/plain": string;
|
3185
|
+
};
|
3186
|
+
};
|
3171
3187
|
429: components$j["responses"]["RateLimitError"];
|
3172
3188
|
500: components$j["responses"]["InternalServerError"];
|
3173
3189
|
};
|
@@ -6284,7 +6300,13 @@ interface paths$a {
|
|
6284
6300
|
put: {
|
6285
6301
|
parameters: {
|
6286
6302
|
query?: never;
|
6287
|
-
header?:
|
6303
|
+
header?: {
|
6304
|
+
/** @description Optional concurrency control header. If provided, the server will check that the composition
|
6305
|
+
* has not been modified since this timestamp. If the timestamp doesn't match the current
|
6306
|
+
* modified timestamp, a 409 Conflict response will be returned.
|
6307
|
+
* */
|
6308
|
+
"X-If-Unmodified-Since"?: string;
|
6309
|
+
};
|
6288
6310
|
path?: never;
|
6289
6311
|
cookie?: never;
|
6290
6312
|
};
|
@@ -6374,6 +6396,15 @@ interface paths$a {
|
|
6374
6396
|
400: components$b["responses"]["BadRequestError"];
|
6375
6397
|
401: components$b["responses"]["UnauthorizedError"];
|
6376
6398
|
403: components$b["responses"]["ForbiddenError"];
|
6399
|
+
/** @description Conflict - Composition has been changed since being loaded */
|
6400
|
+
409: {
|
6401
|
+
headers: {
|
6402
|
+
[name: string]: unknown;
|
6403
|
+
};
|
6404
|
+
content: {
|
6405
|
+
"text/plain": string;
|
6406
|
+
};
|
6407
|
+
};
|
6377
6408
|
429: components$b["responses"]["RateLimitError"];
|
6378
6409
|
500: components$b["responses"]["InternalServerError"];
|
6379
6410
|
};
|
@@ -9703,6 +9734,14 @@ type CopiedComponentSubtree = {
|
|
9703
9734
|
* Defines how a component on a pattern may have its values overridden
|
9704
9735
|
*/
|
9705
9736
|
type ComponentOverridability = SharedComponents$1['ComponentOverridability'];
|
9737
|
+
/**
|
9738
|
+
* Defines the shape of serialized webhook
|
9739
|
+
*/
|
9740
|
+
type WebhookDefinition = {
|
9741
|
+
endpoint: EndpointOut;
|
9742
|
+
headers: EndpointHeadersOut | null;
|
9743
|
+
transformation: EndpointTransformationOut | null;
|
9744
|
+
};
|
9706
9745
|
/** Defines single structure to keep all canvas models (used in CLI commands and Starter content generations) */
|
9707
9746
|
type CanvasDefinitions = {
|
9708
9747
|
components?: Array<ComponentDefinition>;
|
@@ -9720,6 +9759,7 @@ type CanvasDefinitions = {
|
|
9720
9759
|
workflows?: Array<WorkflowDefinition>;
|
9721
9760
|
previewUrls?: Array<PreviewUrl>;
|
9722
9761
|
previewViewports?: Array<PreviewViewport>;
|
9762
|
+
webhooks?: Array<WebhookDefinition>;
|
9723
9763
|
};
|
9724
9764
|
/** Defines shared parameters for requests getting a single composition */
|
9725
9765
|
type CompositionGetOneSharedParameters = Pick<CompositionGetParameters, 'state' | 'skipEnhance' | 'skipPatternResolution' | 'withComponentIDs' | 'withUIStatus' | 'withWorkflowDefinition' | 'withProjectMapNodes' | 'withTotalCount' | 'skipOverridesResolution' | 'withContentSourceMap' | 'versionId' | 'locale' | 'releaseId' | 'editions'>;
|
@@ -11563,6 +11603,9 @@ type CanvasClientOptions = ClientOptions & {
|
|
11563
11603
|
edgeApiHost?: string;
|
11564
11604
|
disableSWR?: boolean;
|
11565
11605
|
};
|
11606
|
+
type UpdateCompositionOptions = {
|
11607
|
+
ifUnmodifiedSince?: string;
|
11608
|
+
};
|
11566
11609
|
declare class CanvasClient extends ApiClient<CanvasClientOptions> {
|
11567
11610
|
private edgeApiHost;
|
11568
11611
|
private edgeApiRequestInit?;
|
@@ -11604,7 +11647,7 @@ declare class CanvasClient extends ApiClient<CanvasClientOptions> {
|
|
11604
11647
|
}>;
|
11605
11648
|
private getOneComposition;
|
11606
11649
|
/** Updates or creates a Canvas component definition */
|
11607
|
-
updateComposition(body: Omit<CompositionPutParameters, 'projectId'
|
11650
|
+
updateComposition(body: Omit<CompositionPutParameters, 'projectId'>, options?: UpdateCompositionOptions): Promise<{
|
11608
11651
|
modified: string | null;
|
11609
11652
|
}>;
|
11610
11653
|
/** Deletes a Canvas component definition */
|
@@ -11637,6 +11680,9 @@ declare class UncachedCategoryClient extends CategoryClient {
|
|
11637
11680
|
constructor(options: Omit<ClientOptions, 'bypassCache'>);
|
11638
11681
|
}
|
11639
11682
|
|
11683
|
+
type UpsertEntryOptions = {
|
11684
|
+
ifUnmodifiedSince?: string;
|
11685
|
+
};
|
11640
11686
|
type ContentClientOptions = ClientOptions & {
|
11641
11687
|
edgeApiHost?: string;
|
11642
11688
|
disableSWR?: boolean;
|
@@ -11658,7 +11704,7 @@ declare class ContentClient extends ApiClient<ContentClientOptions> {
|
|
11658
11704
|
upsertContentType(body: ExceptProject<PutContentTypeBody>, opts?: {
|
11659
11705
|
autogenerateDataTypes?: boolean;
|
11660
11706
|
}): Promise<void>;
|
11661
|
-
upsertEntry(body: ExceptProject<PutEntryBody
|
11707
|
+
upsertEntry(body: ExceptProject<PutEntryBody>, options?: UpsertEntryOptions): Promise<{
|
11662
11708
|
modified: string | null;
|
11663
11709
|
}>;
|
11664
11710
|
deleteContentType(body: ExceptProject<DeleteContentTypeOptions>): Promise<void>;
|
@@ -12842,7 +12888,7 @@ interface paths {
|
|
12842
12888
|
parameters: {
|
12843
12889
|
query: {
|
12844
12890
|
projectId: string;
|
12845
|
-
type: "component" | "contentType" | "blockType" | "asset" | "componentPattern" | "entryPattern" | "compositionPattern" | "entry";
|
12891
|
+
type: "component" | "contentType" | "blockType" | "asset" | "componentPattern" | "entryPattern" | "compositionPattern" | "entry" | "dataType" | "dataSource" | "test";
|
12846
12892
|
ids: string[];
|
12847
12893
|
withInstances?: boolean | null;
|
12848
12894
|
limit?: number;
|
@@ -13294,7 +13340,7 @@ declare function hasReferencedVariables(value: string | undefined): number;
|
|
13294
13340
|
*/
|
13295
13341
|
declare function parseVariableExpression(serialized: string, onToken?: (token: string, type: 'text' | 'variable') => void | false): number;
|
13296
13342
|
|
13297
|
-
declare const version = "20.
|
13343
|
+
declare const version = "20.31.0";
|
13298
13344
|
|
13299
13345
|
/** API client to enable managing workflow definitions */
|
13300
13346
|
declare class WorkflowClient extends ApiClient {
|
@@ -13311,4 +13357,4 @@ declare class WorkflowClient extends ApiClient {
|
|
13311
13357
|
|
13312
13358
|
declare const CanvasClientError: typeof ApiClientError;
|
13313
13359
|
|
13314
|
-
export { ASSETS_SOURCE_CUSTOM_URL, ASSETS_SOURCE_UNIFORM, ASSET_PARAMETER_TYPE, ATTRIBUTE_COMPONENT_ID, ATTRIBUTE_MULTILINE, ATTRIBUTE_PARAMETER_ID, ATTRIBUTE_PARAMETER_TYPE, ATTRIBUTE_PARAMETER_VALUE, ATTRIBUTE_PLACEHOLDER, type AddComponentMessage, type BatchEnhancer, BatchEntry, type BatchInvalidationPayload, type BindVariablesOptions, type BindVariablesResult, type BindVariablesToObjectOptions, BlockFormatError, type BlockLocationReference, type BlockValue, CANVAS_BLOCK_PARAM_TYPE, CANVAS_CONTEXTUAL_EDITING_PARAM, CANVAS_DRAFT_STATE, CANVAS_EDITOR_STATE, CANVAS_ENRICHMENT_TAG_PARAM, CANVAS_INTENT_TAG_PARAM, CANVAS_LOCALE_TAG_PARAM, CANVAS_LOCALIZATION_SLOT, CANVAS_LOCALIZATION_TYPE, CANVAS_PERSONALIZATION_ALGORITHM_PARAM, CANVAS_PERSONALIZATION_ALGORITHM_TYPE, CANVAS_PERSONALIZATION_EVENT_NAME_PARAM, CANVAS_PERSONALIZATION_PARAM, CANVAS_PERSONALIZATION_TAKE_PARAM, CANVAS_PERSONALIZE_SLOT, CANVAS_PERSONALIZE_TYPE, CANVAS_PUBLISHED_STATE, CANVAS_SLOT_SECTION_SLOT, CANVAS_SLOT_SECTION_TYPE, CANVAS_TEST_SLOT, CANVAS_TEST_TYPE, CANVAS_TEST_VARIANT_PARAM, CANVAS_VIZ_CONTROL_PARAM, CANVAS_VIZ_DI_RULE, CANVAS_VIZ_DYNAMIC_TOKEN_RULE, CANVAS_VIZ_LOCALE_RULE, CANVAS_VIZ_QUIRKS_RULE, CanvasClient, CanvasClientError, type CanvasDefinitions, type CategoriesDeleteParameters, type CategoriesGetParameters, type CategoriesGetResponse, type CategoriesPutParameters, type Category, CategoryClient, type Channel, type ChannelMessage, ChildEnhancerBuilder, type ComponentDefinition, type ComponentDefinitionDeleteParameters, type ComponentDefinitionGetParameters, type ComponentDefinitionGetResponse, type ComponentDefinitionParameter, type ComponentDefinitionPermission, type ComponentDefinitionPutParameters, type ComponentDefinitionSlot, type ComponentDefinitionSlugSettings, type ComponentDefinitionVariant, type ComponentEnhancer, type ComponentEnhancerFunction, type ComponentEnhancerOptions, type ComponentInstance, type ComponentInstanceContextualEditing, type ComponentInstanceHistoryEntry, type ComponentInstanceHistoryGetParameters, type ComponentInstanceHistoryGetResponse, type ComponentLocationReference, type ComponentOverridability, type ComponentOverride, type ComponentOverrides, type ComponentParameter, type ComponentParameterBlock, type ComponentParameterConditionalValue, type ComponentParameterContextualEditing, type ComponentParameterEnhancer, type ComponentParameterEnhancerFunction, type ComponentParameterEnhancerOptions, type CompositionDeleteParameters, type CompositionFilters, type CompositionGetByComponentIdParameters, type CompositionGetByIdParameters, type CompositionGetByNodeIdParameters, type CompositionGetByNodePathParameters, type CompositionGetBySlugParameters, type CompositionGetListResponse, type CompositionGetParameters, type CompositionGetResponse, type CompositionGetValidResponses, type CompositionPutParameters, type CompositionResolvedGetResponse, type CompositionResolvedListResponse, type CompositionUIStatus, ContentClient, type ContentType, type ContentTypeField, type ContentTypePreviewConfiguration, type ContextStorageUpdatedMessage, type ContextualEditingComponentReference, type ContextualEditingValue, type CopiedComponentSubtree, type DataDiagnostic, type DataElementBindingIssue, type DataElementConnectionDefinition, type DataElementConnectionFailureAction, type DataElementConnectionFailureLogLevel, type DataResolutionConfigIssue, type DataResolutionIssue, type DataResolutionOption, type DataResolutionOptionNegative, type DataResolutionOptionPositive, type DataResolutionParameters, type DataResourceDefinition, type DataResourceDefinitions, type DataResourceIssue, type DataResourceVariables, type DataSource, DataSourceClient, type DataSourceDeleteParameters, type DataSourceGetParameters, type DataSourceGetResponse, type DataSourcePutParameters, type DataSourceVariantData, type DataSourceVariantsKeys, type DataSourcesGetParameters, type DataSourcesGetResponse, type DataType, DataTypeClient, type DataTypeDeleteParameters, type DataTypeGetParameters, type DataTypeGetResponse, type DataTypePutParameters, type DataVariableDefinition, type DataWithProperties, type DeleteContentTypeOptions, type DeleteEntryOptions, type DismissPlaceholderMessage, type DynamicInputIssue, EDGE_CACHE_DISABLED, EDGE_DEFAULT_CACHE_TTL, EDGE_MAX_CACHE_TTL, EDGE_MIN_CACHE_TTL, EMPTY_COMPOSITION, type EdgehancersDiagnostics, type EdgehancersWholeResponseCacheDiagnostics, type EditorStateUpdatedMessage, EnhancerBuilder, type EnhancerContext, type EnhancerError, EntityReleasesClient, type EntityReleasesGetParameters, type EntityReleasesGetResponse, type EntriesGetParameters, type EntriesGetResponse, type EntriesHistoryGetParameters, type EntriesHistoryGetResponse, type EntriesResolvedListResponse, type Entry, type EntryData, type EntryFilters, type EntryList, type EvaluateCriteriaGroupOptions, type EvaluateNodeTreeVisibilityOptions, type EvaluateNodeVisibilityParameterOptions, type EvaluatePropertyCriteriaOptions, type EvaluateWalkTreePropertyCriteriaOptions, type Filters, type FindInNodeTreeReference, type FlattenProperty, type FlattenValues, type FlattenValuesOptions, type GetContentTypesOptions, type GetContentTypesResponse, type GetEffectivePropertyValueOptions, type GetEntriesOptions, type GetEntriesResponse, type GetParameterAttributesProps, IN_CONTEXT_EDITOR_COMPONENT_END_ROLE, IN_CONTEXT_EDITOR_COMPONENT_START_ROLE, IN_CONTEXT_EDITOR_CONFIG_CHECK_QUERY_STRING_PARAM, IN_CONTEXT_EDITOR_EMBED_SCRIPT_ID, IN_CONTEXT_EDITOR_FORCED_SETTINGS_QUERY_STRING_PARAM, IN_CONTEXT_EDITOR_PLAYGROUND_QUERY_STRING_PARAM, IN_CONTEXT_EDITOR_QUERY_STRING_PARAM, IS_RENDERED_BY_UNIFORM_ATTRIBUTE, type InvalidationPayload, LOCALE_DYNAMIC_INPUT_NAME, type LimitPolicy, type LinkParamConfiguration, type LinkParamValue, type LinkParameterType, type LinkTypeConfiguration, type Locale, LocaleClient, type LocaleDeleteParameters, type LocalePutParameters, type LocalesGetParameters, type LocalesGetResponse, type LocalizeOptions, type MaxDepthExceededIssue, type MessageHandler, type MoveComponentMessage, type MultiSelectParamConfiguration, type MultiSelectParamValue, type NodeLocationReference, type NonProjectMapLinkParamValue, type NumberParamConfig, type NumberParamValue, type OpenParameterEditorMessage, type OverrideOptions, PLACEHOLDER_ID, type PatternIssue, PreviewClient, type PreviewPanelSettings, type PreviewUrl, type PreviewUrlDeleteParameters, type PreviewUrlDeleteResponse, type PreviewUrlPutParameters, type PreviewUrlPutResponse, type PreviewUrlsGetParameters, type PreviewUrlsGetResponse, type PreviewViewport, type PreviewViewportDeleteParameters, type PreviewViewportDeleteResponse, type PreviewViewportPutParameters, type PreviewViewportPutResponse, type PreviewViewportsGetParameters, type PreviewViewportsGetResponse, type Project, ProjectClient, type ProjectDeleteParameters, type ProjectGetParameters, type ProjectGetResponse, type ProjectMapLinkParamValue, type ProjectPutParameters, type ProjectPutResponse, type Prompt, PromptClient, type PromptsDeleteParameters, type PromptsGetParameters, type PromptsGetResponse, type PromptsPutParameters, type PropertyCriteriaMatch, type PropertyValue, type PutContentTypeBody, type PutEntryBody, type ReadyMessage, RelationshipClient, type RelationshipResultInstance, type Release, ReleaseClient, type ReleaseContent, ReleaseContentsClient, type ReleaseContentsDeleteBody, type ReleaseContentsGetParameters, type ReleaseContentsGetResponse, type ReleaseDeleteParameters, type ReleasePatchParameters, type ReleasePutParameters, type ReleaseState, type ReleasesGetParameters, type ReleasesGetResponse, type ReportRenderedCompositionsMessage, type RequestComponentSuggestionMessage, type RequestPageHtmlMessage, type ResolvedRouteGetResponse, type RichTextBuiltInElement, type RichTextBuiltInFormat, type RichTextParamConfiguration, type RichTextParamValue, type RootComponentInstance, type RootEntryReference, type RootLocationReference, RouteClient, type RouteDynamicInputs, type RouteGetParameters, type RouteGetResponse, type RouteGetResponseComposition, type RouteGetResponseEdgehancedComposition, type RouteGetResponseEdgehancedNotFound, type RouteGetResponseNotFound, type RouteGetResponseRedirect, SECRET_QUERY_STRING_PARAM, type SelectComponentMessage, type SelectParamConfiguration, type SelectParamOption, type SelectParamValue, type SelectParameterMessage, type SendPageHtmlMessage, type SpecificProjectMap, type StringOperators, type SuggestComponentMessage, type TreeNodeInfoTypes, type TriggerComponentActionMessage, type TriggerCompositionActionMessage, UncachedCanvasClient, UncachedCategoryClient, UncachedContentClient, UniqueBatchEntries, type UpdateComponentParameterMessage, type UpdateComponentReferencesMessage, type UpdateCompositionInternalMessage, type UpdateCompositionMessage, type UpdateContextualEditingStateInternalMessage, type UpdateFeatureFlagsMessage, type UpdatePreviewSettingsMessage, type VisibilityCriteria, type VisibilityCriteriaEvaluationResult, type VisibilityCriteriaGroup, type VisibilityParameterValue, type VisibilityRule, type VisibilityRules, type WalkNodeTreeActions, type WalkNodeTreeOptions, WorkflowClient, type WorkflowDefinition, type WorkflowStage, type WorkflowStagePermission, type WorkflowStageTransition, type WorkflowStageTransitionPermission, type WorkflowsDeleteParameters, type WorkflowsGetParameters, type WorkflowsGetResponse, type WorkflowsPutParameters, bindExpressionEscapeChars, bindExpressionPrefix, bindVariables, bindVariablesToObject, compose, convertEntryToPutEntry, convertToBindExpression, createBatchEnhancer, createCanvasChannel, createDynamicInputVisibilityRule, createDynamicTokenVisibilityRule, createLimitPolicy, createLocaleVisibilityRule, createQuirksVisibilityRule, createUniformApiEnhancer, createVariableReference, enhance, escapeBindExpressionDefaultValue, evaluateNodeVisibilityParameter, evaluatePropertyCriteria, evaluateVisibilityCriteriaGroup, evaluateWalkTreeNodeVisibility, evaluateWalkTreePropertyCriteria, extractLocales, findParameterInNodeTree, flattenValues, generateComponentPlaceholderId, generateHash, getBlockValue, getComponentJsonPointer, getComponentPath, getDataSourceVariantFromRouteGetParams, getEffectivePropertyValue, getLocalizedPropertyValues, getNounForLocation, getNounForNode, getParameterAttributes, getPropertiesValue, hasReferencedVariables, isAddComponentMessage, isAllowedReferrer, isAssetParamValue, isAssetParamValueItem, isComponentActionMessage, isComponentPlaceholderId, isContextStorageUpdatedMessage, isDismissPlaceholderMessage, isEntryData, isLinkParamValue, isMovingComponentMessage, isNestedNodeType, isOpenParameterEditorMessage, isReadyMessage, isReportRenderedCompositionsMessage, isRequestComponentSuggestionMessage, isRootEntryReference, isSelectComponentMessage, isSelectParameterMessage, isSuggestComponentMessage, isSystemComponentDefinition, isTriggerCompositionActionMessage, isUpdateComponentParameterMessage, isUpdateComponentReferencesMessage, isUpdateCompositionInternalMessage, isUpdateCompositionMessage, isUpdateContextualEditingStateInternalMessage, isUpdateFeatureFlagsMessage, isUpdatePreviewSettingsMessage, localize, mapSlotToPersonalizedVariations, mapSlotToTestVariations, nullLimitPolicy, parseComponentPlaceholderId, parseVariableExpression, version, walkNodeTree, walkPropertyValues };
|
13360
|
+
export { ASSETS_SOURCE_CUSTOM_URL, ASSETS_SOURCE_UNIFORM, ASSET_PARAMETER_TYPE, ATTRIBUTE_COMPONENT_ID, ATTRIBUTE_MULTILINE, ATTRIBUTE_PARAMETER_ID, ATTRIBUTE_PARAMETER_TYPE, ATTRIBUTE_PARAMETER_VALUE, ATTRIBUTE_PLACEHOLDER, type AddComponentMessage, type BatchEnhancer, BatchEntry, type BatchInvalidationPayload, type BindVariablesOptions, type BindVariablesResult, type BindVariablesToObjectOptions, BlockFormatError, type BlockLocationReference, type BlockValue, CANVAS_BLOCK_PARAM_TYPE, CANVAS_CONTEXTUAL_EDITING_PARAM, CANVAS_DRAFT_STATE, CANVAS_EDITOR_STATE, CANVAS_ENRICHMENT_TAG_PARAM, CANVAS_INTENT_TAG_PARAM, CANVAS_LOCALE_TAG_PARAM, CANVAS_LOCALIZATION_SLOT, CANVAS_LOCALIZATION_TYPE, CANVAS_PERSONALIZATION_ALGORITHM_PARAM, CANVAS_PERSONALIZATION_ALGORITHM_TYPE, CANVAS_PERSONALIZATION_EVENT_NAME_PARAM, CANVAS_PERSONALIZATION_PARAM, CANVAS_PERSONALIZATION_TAKE_PARAM, CANVAS_PERSONALIZE_SLOT, CANVAS_PERSONALIZE_TYPE, CANVAS_PUBLISHED_STATE, CANVAS_SLOT_SECTION_SLOT, CANVAS_SLOT_SECTION_TYPE, CANVAS_TEST_SLOT, CANVAS_TEST_TYPE, CANVAS_TEST_VARIANT_PARAM, CANVAS_VIZ_CONTROL_PARAM, CANVAS_VIZ_DI_RULE, CANVAS_VIZ_DYNAMIC_TOKEN_RULE, CANVAS_VIZ_LOCALE_RULE, CANVAS_VIZ_QUIRKS_RULE, CanvasClient, CanvasClientError, type CanvasDefinitions, type CategoriesDeleteParameters, type CategoriesGetParameters, type CategoriesGetResponse, type CategoriesPutParameters, type Category, CategoryClient, type Channel, type ChannelMessage, ChildEnhancerBuilder, type ComponentDefinition, type ComponentDefinitionDeleteParameters, type ComponentDefinitionGetParameters, type ComponentDefinitionGetResponse, type ComponentDefinitionParameter, type ComponentDefinitionPermission, type ComponentDefinitionPutParameters, type ComponentDefinitionSlot, type ComponentDefinitionSlugSettings, type ComponentDefinitionVariant, type ComponentEnhancer, type ComponentEnhancerFunction, type ComponentEnhancerOptions, type ComponentInstance, type ComponentInstanceContextualEditing, type ComponentInstanceHistoryEntry, type ComponentInstanceHistoryGetParameters, type ComponentInstanceHistoryGetResponse, type ComponentLocationReference, type ComponentOverridability, type ComponentOverride, type ComponentOverrides, type ComponentParameter, type ComponentParameterBlock, type ComponentParameterConditionalValue, type ComponentParameterContextualEditing, type ComponentParameterEnhancer, type ComponentParameterEnhancerFunction, type ComponentParameterEnhancerOptions, type CompositionDeleteParameters, type CompositionFilters, type CompositionGetByComponentIdParameters, type CompositionGetByIdParameters, type CompositionGetByNodeIdParameters, type CompositionGetByNodePathParameters, type CompositionGetBySlugParameters, type CompositionGetListResponse, type CompositionGetParameters, type CompositionGetResponse, type CompositionGetValidResponses, type CompositionPutParameters, type CompositionResolvedGetResponse, type CompositionResolvedListResponse, type CompositionUIStatus, ContentClient, type ContentType, type ContentTypeField, type ContentTypePreviewConfiguration, type ContextStorageUpdatedMessage, type ContextualEditingComponentReference, type ContextualEditingValue, type CopiedComponentSubtree, type DataDiagnostic, type DataElementBindingIssue, type DataElementConnectionDefinition, type DataElementConnectionFailureAction, type DataElementConnectionFailureLogLevel, type DataResolutionConfigIssue, type DataResolutionIssue, type DataResolutionOption, type DataResolutionOptionNegative, type DataResolutionOptionPositive, type DataResolutionParameters, type DataResourceDefinition, type DataResourceDefinitions, type DataResourceIssue, type DataResourceVariables, type DataSource, DataSourceClient, type DataSourceDeleteParameters, type DataSourceGetParameters, type DataSourceGetResponse, type DataSourcePutParameters, type DataSourceVariantData, type DataSourceVariantsKeys, type DataSourcesGetParameters, type DataSourcesGetResponse, type DataType, DataTypeClient, type DataTypeDeleteParameters, type DataTypeGetParameters, type DataTypeGetResponse, type DataTypePutParameters, type DataVariableDefinition, type DataWithProperties, type DeleteContentTypeOptions, type DeleteEntryOptions, type DismissPlaceholderMessage, type DynamicInputIssue, EDGE_CACHE_DISABLED, EDGE_DEFAULT_CACHE_TTL, EDGE_MAX_CACHE_TTL, EDGE_MIN_CACHE_TTL, EMPTY_COMPOSITION, type EdgehancersDiagnostics, type EdgehancersWholeResponseCacheDiagnostics, type EditorStateUpdatedMessage, EnhancerBuilder, type EnhancerContext, type EnhancerError, EntityReleasesClient, type EntityReleasesGetParameters, type EntityReleasesGetResponse, type EntriesGetParameters, type EntriesGetResponse, type EntriesHistoryGetParameters, type EntriesHistoryGetResponse, type EntriesResolvedListResponse, type Entry, type EntryData, type EntryFilters, type EntryList, type EvaluateCriteriaGroupOptions, type EvaluateNodeTreeVisibilityOptions, type EvaluateNodeVisibilityParameterOptions, type EvaluatePropertyCriteriaOptions, type EvaluateWalkTreePropertyCriteriaOptions, type Filters, type FindInNodeTreeReference, type FlattenProperty, type FlattenValues, type FlattenValuesOptions, type GetContentTypesOptions, type GetContentTypesResponse, type GetEffectivePropertyValueOptions, type GetEntriesOptions, type GetEntriesResponse, type GetParameterAttributesProps, IN_CONTEXT_EDITOR_COMPONENT_END_ROLE, IN_CONTEXT_EDITOR_COMPONENT_START_ROLE, IN_CONTEXT_EDITOR_CONFIG_CHECK_QUERY_STRING_PARAM, IN_CONTEXT_EDITOR_EMBED_SCRIPT_ID, IN_CONTEXT_EDITOR_FORCED_SETTINGS_QUERY_STRING_PARAM, IN_CONTEXT_EDITOR_PLAYGROUND_QUERY_STRING_PARAM, IN_CONTEXT_EDITOR_QUERY_STRING_PARAM, IS_RENDERED_BY_UNIFORM_ATTRIBUTE, type InvalidationPayload, LOCALE_DYNAMIC_INPUT_NAME, type LimitPolicy, type LinkParamConfiguration, type LinkParamValue, type LinkParameterType, type LinkTypeConfiguration, type Locale, LocaleClient, type LocaleDeleteParameters, type LocalePutParameters, type LocalesGetParameters, type LocalesGetResponse, type LocalizeOptions, type MaxDepthExceededIssue, type MessageHandler, type MoveComponentMessage, type MultiSelectParamConfiguration, type MultiSelectParamValue, type NodeLocationReference, type NonProjectMapLinkParamValue, type NumberParamConfig, type NumberParamValue, type OpenParameterEditorMessage, type OverrideOptions, PLACEHOLDER_ID, type PatternIssue, PreviewClient, type PreviewPanelSettings, type PreviewUrl, type PreviewUrlDeleteParameters, type PreviewUrlDeleteResponse, type PreviewUrlPutParameters, type PreviewUrlPutResponse, type PreviewUrlsGetParameters, type PreviewUrlsGetResponse, type PreviewViewport, type PreviewViewportDeleteParameters, type PreviewViewportDeleteResponse, type PreviewViewportPutParameters, type PreviewViewportPutResponse, type PreviewViewportsGetParameters, type PreviewViewportsGetResponse, type Project, ProjectClient, type ProjectDeleteParameters, type ProjectGetParameters, type ProjectGetResponse, type ProjectMapLinkParamValue, type ProjectPutParameters, type ProjectPutResponse, type Prompt, PromptClient, type PromptsDeleteParameters, type PromptsGetParameters, type PromptsGetResponse, type PromptsPutParameters, type PropertyCriteriaMatch, type PropertyValue, type PutContentTypeBody, type PutEntryBody, type ReadyMessage, RelationshipClient, type RelationshipResultInstance, type Release, ReleaseClient, type ReleaseContent, ReleaseContentsClient, type ReleaseContentsDeleteBody, type ReleaseContentsGetParameters, type ReleaseContentsGetResponse, type ReleaseDeleteParameters, type ReleasePatchParameters, type ReleasePutParameters, type ReleaseState, type ReleasesGetParameters, type ReleasesGetResponse, type ReportRenderedCompositionsMessage, type RequestComponentSuggestionMessage, type RequestPageHtmlMessage, type ResolvedRouteGetResponse, type RichTextBuiltInElement, type RichTextBuiltInFormat, type RichTextParamConfiguration, type RichTextParamValue, type RootComponentInstance, type RootEntryReference, type RootLocationReference, RouteClient, type RouteDynamicInputs, type RouteGetParameters, type RouteGetResponse, type RouteGetResponseComposition, type RouteGetResponseEdgehancedComposition, type RouteGetResponseEdgehancedNotFound, type RouteGetResponseNotFound, type RouteGetResponseRedirect, SECRET_QUERY_STRING_PARAM, type SelectComponentMessage, type SelectParamConfiguration, type SelectParamOption, type SelectParamValue, type SelectParameterMessage, type SendPageHtmlMessage, type SpecificProjectMap, type StringOperators, type SuggestComponentMessage, type TreeNodeInfoTypes, type TriggerComponentActionMessage, type TriggerCompositionActionMessage, UncachedCanvasClient, UncachedCategoryClient, UncachedContentClient, UniqueBatchEntries, type UpdateComponentParameterMessage, type UpdateComponentReferencesMessage, type UpdateCompositionInternalMessage, type UpdateCompositionMessage, type UpdateCompositionOptions, type UpdateContextualEditingStateInternalMessage, type UpdateFeatureFlagsMessage, type UpdatePreviewSettingsMessage, type UpsertEntryOptions, type VisibilityCriteria, type VisibilityCriteriaEvaluationResult, type VisibilityCriteriaGroup, type VisibilityParameterValue, type VisibilityRule, type VisibilityRules, type WalkNodeTreeActions, type WalkNodeTreeOptions, type WebhookDefinition, WorkflowClient, type WorkflowDefinition, type WorkflowStage, type WorkflowStagePermission, type WorkflowStageTransition, type WorkflowStageTransitionPermission, type WorkflowsDeleteParameters, type WorkflowsGetParameters, type WorkflowsGetResponse, type WorkflowsPutParameters, bindExpressionEscapeChars, bindExpressionPrefix, bindVariables, bindVariablesToObject, compose, convertEntryToPutEntry, convertToBindExpression, createBatchEnhancer, createCanvasChannel, createDynamicInputVisibilityRule, createDynamicTokenVisibilityRule, createLimitPolicy, createLocaleVisibilityRule, createQuirksVisibilityRule, createUniformApiEnhancer, createVariableReference, enhance, escapeBindExpressionDefaultValue, evaluateNodeVisibilityParameter, evaluatePropertyCriteria, evaluateVisibilityCriteriaGroup, evaluateWalkTreeNodeVisibility, evaluateWalkTreePropertyCriteria, extractLocales, findParameterInNodeTree, flattenValues, generateComponentPlaceholderId, generateHash, getBlockValue, getComponentJsonPointer, getComponentPath, getDataSourceVariantFromRouteGetParams, getEffectivePropertyValue, getLocalizedPropertyValues, getNounForLocation, getNounForNode, getParameterAttributes, getPropertiesValue, hasReferencedVariables, isAddComponentMessage, isAllowedReferrer, isAssetParamValue, isAssetParamValueItem, isComponentActionMessage, isComponentPlaceholderId, isContextStorageUpdatedMessage, isDismissPlaceholderMessage, isEntryData, isLinkParamValue, isMovingComponentMessage, isNestedNodeType, isOpenParameterEditorMessage, isReadyMessage, isReportRenderedCompositionsMessage, isRequestComponentSuggestionMessage, isRootEntryReference, isSelectComponentMessage, isSelectParameterMessage, isSuggestComponentMessage, isSystemComponentDefinition, isTriggerCompositionActionMessage, isUpdateComponentParameterMessage, isUpdateComponentReferencesMessage, isUpdateCompositionInternalMessage, isUpdateCompositionMessage, isUpdateContextualEditingStateInternalMessage, isUpdateFeatureFlagsMessage, isUpdatePreviewSettingsMessage, localize, mapSlotToPersonalizedVariations, mapSlotToTestVariations, nullLimitPolicy, parseComponentPlaceholderId, parseVariableExpression, version, walkNodeTree, walkPropertyValues };
|
package/dist/index.d.ts
CHANGED
@@ -2,6 +2,7 @@ import { ApiClient, ExceptProject, ClientOptions, ApiClientError } from '@unifor
|
|
2
2
|
export { ApiClientError } from '@uniformdev/context/api';
|
3
3
|
import { AssetGetResponseSingle, AssetParamValue, AssetParamValueItem } from '@uniformdev/assets';
|
4
4
|
export { AssetParamValue, AssetParamValueItem } from '@uniformdev/assets';
|
5
|
+
import { EndpointOut, EndpointHeadersOut, EndpointTransformationOut } from 'svix';
|
5
6
|
import { Quirks, StorageCommands, PersonalizedVariant, VariationMatchMetadata, TestVariant } from '@uniformdev/context';
|
6
7
|
import { Options as Options$1 } from 'p-retry';
|
7
8
|
import { Options } from 'p-throttle';
|
@@ -3094,7 +3095,13 @@ interface paths$h {
|
|
3094
3095
|
put: {
|
3095
3096
|
parameters: {
|
3096
3097
|
query?: never;
|
3097
|
-
header?:
|
3098
|
+
header?: {
|
3099
|
+
/** @description Optional concurrency control header. If provided, the server will check that the entry
|
3100
|
+
* has not been modified since this timestamp. If the timestamp doesn't match the current
|
3101
|
+
* modified timestamp, a 409 Conflict response will be returned.
|
3102
|
+
* */
|
3103
|
+
"X-If-Unmodified-Since"?: string;
|
3104
|
+
};
|
3098
3105
|
path?: never;
|
3099
3106
|
cookie?: never;
|
3100
3107
|
};
|
@@ -3168,6 +3175,15 @@ interface paths$h {
|
|
3168
3175
|
400: components$j["responses"]["BadRequestError"];
|
3169
3176
|
401: components$j["responses"]["UnauthorizedError"];
|
3170
3177
|
403: components$j["responses"]["ForbiddenError"];
|
3178
|
+
/** @description Conflict - Entry has been changed since being loaded */
|
3179
|
+
409: {
|
3180
|
+
headers: {
|
3181
|
+
[name: string]: unknown;
|
3182
|
+
};
|
3183
|
+
content: {
|
3184
|
+
"text/plain": string;
|
3185
|
+
};
|
3186
|
+
};
|
3171
3187
|
429: components$j["responses"]["RateLimitError"];
|
3172
3188
|
500: components$j["responses"]["InternalServerError"];
|
3173
3189
|
};
|
@@ -6284,7 +6300,13 @@ interface paths$a {
|
|
6284
6300
|
put: {
|
6285
6301
|
parameters: {
|
6286
6302
|
query?: never;
|
6287
|
-
header?:
|
6303
|
+
header?: {
|
6304
|
+
/** @description Optional concurrency control header. If provided, the server will check that the composition
|
6305
|
+
* has not been modified since this timestamp. If the timestamp doesn't match the current
|
6306
|
+
* modified timestamp, a 409 Conflict response will be returned.
|
6307
|
+
* */
|
6308
|
+
"X-If-Unmodified-Since"?: string;
|
6309
|
+
};
|
6288
6310
|
path?: never;
|
6289
6311
|
cookie?: never;
|
6290
6312
|
};
|
@@ -6374,6 +6396,15 @@ interface paths$a {
|
|
6374
6396
|
400: components$b["responses"]["BadRequestError"];
|
6375
6397
|
401: components$b["responses"]["UnauthorizedError"];
|
6376
6398
|
403: components$b["responses"]["ForbiddenError"];
|
6399
|
+
/** @description Conflict - Composition has been changed since being loaded */
|
6400
|
+
409: {
|
6401
|
+
headers: {
|
6402
|
+
[name: string]: unknown;
|
6403
|
+
};
|
6404
|
+
content: {
|
6405
|
+
"text/plain": string;
|
6406
|
+
};
|
6407
|
+
};
|
6377
6408
|
429: components$b["responses"]["RateLimitError"];
|
6378
6409
|
500: components$b["responses"]["InternalServerError"];
|
6379
6410
|
};
|
@@ -9703,6 +9734,14 @@ type CopiedComponentSubtree = {
|
|
9703
9734
|
* Defines how a component on a pattern may have its values overridden
|
9704
9735
|
*/
|
9705
9736
|
type ComponentOverridability = SharedComponents$1['ComponentOverridability'];
|
9737
|
+
/**
|
9738
|
+
* Defines the shape of serialized webhook
|
9739
|
+
*/
|
9740
|
+
type WebhookDefinition = {
|
9741
|
+
endpoint: EndpointOut;
|
9742
|
+
headers: EndpointHeadersOut | null;
|
9743
|
+
transformation: EndpointTransformationOut | null;
|
9744
|
+
};
|
9706
9745
|
/** Defines single structure to keep all canvas models (used in CLI commands and Starter content generations) */
|
9707
9746
|
type CanvasDefinitions = {
|
9708
9747
|
components?: Array<ComponentDefinition>;
|
@@ -9720,6 +9759,7 @@ type CanvasDefinitions = {
|
|
9720
9759
|
workflows?: Array<WorkflowDefinition>;
|
9721
9760
|
previewUrls?: Array<PreviewUrl>;
|
9722
9761
|
previewViewports?: Array<PreviewViewport>;
|
9762
|
+
webhooks?: Array<WebhookDefinition>;
|
9723
9763
|
};
|
9724
9764
|
/** Defines shared parameters for requests getting a single composition */
|
9725
9765
|
type CompositionGetOneSharedParameters = Pick<CompositionGetParameters, 'state' | 'skipEnhance' | 'skipPatternResolution' | 'withComponentIDs' | 'withUIStatus' | 'withWorkflowDefinition' | 'withProjectMapNodes' | 'withTotalCount' | 'skipOverridesResolution' | 'withContentSourceMap' | 'versionId' | 'locale' | 'releaseId' | 'editions'>;
|
@@ -11563,6 +11603,9 @@ type CanvasClientOptions = ClientOptions & {
|
|
11563
11603
|
edgeApiHost?: string;
|
11564
11604
|
disableSWR?: boolean;
|
11565
11605
|
};
|
11606
|
+
type UpdateCompositionOptions = {
|
11607
|
+
ifUnmodifiedSince?: string;
|
11608
|
+
};
|
11566
11609
|
declare class CanvasClient extends ApiClient<CanvasClientOptions> {
|
11567
11610
|
private edgeApiHost;
|
11568
11611
|
private edgeApiRequestInit?;
|
@@ -11604,7 +11647,7 @@ declare class CanvasClient extends ApiClient<CanvasClientOptions> {
|
|
11604
11647
|
}>;
|
11605
11648
|
private getOneComposition;
|
11606
11649
|
/** Updates or creates a Canvas component definition */
|
11607
|
-
updateComposition(body: Omit<CompositionPutParameters, 'projectId'
|
11650
|
+
updateComposition(body: Omit<CompositionPutParameters, 'projectId'>, options?: UpdateCompositionOptions): Promise<{
|
11608
11651
|
modified: string | null;
|
11609
11652
|
}>;
|
11610
11653
|
/** Deletes a Canvas component definition */
|
@@ -11637,6 +11680,9 @@ declare class UncachedCategoryClient extends CategoryClient {
|
|
11637
11680
|
constructor(options: Omit<ClientOptions, 'bypassCache'>);
|
11638
11681
|
}
|
11639
11682
|
|
11683
|
+
type UpsertEntryOptions = {
|
11684
|
+
ifUnmodifiedSince?: string;
|
11685
|
+
};
|
11640
11686
|
type ContentClientOptions = ClientOptions & {
|
11641
11687
|
edgeApiHost?: string;
|
11642
11688
|
disableSWR?: boolean;
|
@@ -11658,7 +11704,7 @@ declare class ContentClient extends ApiClient<ContentClientOptions> {
|
|
11658
11704
|
upsertContentType(body: ExceptProject<PutContentTypeBody>, opts?: {
|
11659
11705
|
autogenerateDataTypes?: boolean;
|
11660
11706
|
}): Promise<void>;
|
11661
|
-
upsertEntry(body: ExceptProject<PutEntryBody
|
11707
|
+
upsertEntry(body: ExceptProject<PutEntryBody>, options?: UpsertEntryOptions): Promise<{
|
11662
11708
|
modified: string | null;
|
11663
11709
|
}>;
|
11664
11710
|
deleteContentType(body: ExceptProject<DeleteContentTypeOptions>): Promise<void>;
|
@@ -12842,7 +12888,7 @@ interface paths {
|
|
12842
12888
|
parameters: {
|
12843
12889
|
query: {
|
12844
12890
|
projectId: string;
|
12845
|
-
type: "component" | "contentType" | "blockType" | "asset" | "componentPattern" | "entryPattern" | "compositionPattern" | "entry";
|
12891
|
+
type: "component" | "contentType" | "blockType" | "asset" | "componentPattern" | "entryPattern" | "compositionPattern" | "entry" | "dataType" | "dataSource" | "test";
|
12846
12892
|
ids: string[];
|
12847
12893
|
withInstances?: boolean | null;
|
12848
12894
|
limit?: number;
|
@@ -13294,7 +13340,7 @@ declare function hasReferencedVariables(value: string | undefined): number;
|
|
13294
13340
|
*/
|
13295
13341
|
declare function parseVariableExpression(serialized: string, onToken?: (token: string, type: 'text' | 'variable') => void | false): number;
|
13296
13342
|
|
13297
|
-
declare const version = "20.
|
13343
|
+
declare const version = "20.31.0";
|
13298
13344
|
|
13299
13345
|
/** API client to enable managing workflow definitions */
|
13300
13346
|
declare class WorkflowClient extends ApiClient {
|
@@ -13311,4 +13357,4 @@ declare class WorkflowClient extends ApiClient {
|
|
13311
13357
|
|
13312
13358
|
declare const CanvasClientError: typeof ApiClientError;
|
13313
13359
|
|
13314
|
-
export { ASSETS_SOURCE_CUSTOM_URL, ASSETS_SOURCE_UNIFORM, ASSET_PARAMETER_TYPE, ATTRIBUTE_COMPONENT_ID, ATTRIBUTE_MULTILINE, ATTRIBUTE_PARAMETER_ID, ATTRIBUTE_PARAMETER_TYPE, ATTRIBUTE_PARAMETER_VALUE, ATTRIBUTE_PLACEHOLDER, type AddComponentMessage, type BatchEnhancer, BatchEntry, type BatchInvalidationPayload, type BindVariablesOptions, type BindVariablesResult, type BindVariablesToObjectOptions, BlockFormatError, type BlockLocationReference, type BlockValue, CANVAS_BLOCK_PARAM_TYPE, CANVAS_CONTEXTUAL_EDITING_PARAM, CANVAS_DRAFT_STATE, CANVAS_EDITOR_STATE, CANVAS_ENRICHMENT_TAG_PARAM, CANVAS_INTENT_TAG_PARAM, CANVAS_LOCALE_TAG_PARAM, CANVAS_LOCALIZATION_SLOT, CANVAS_LOCALIZATION_TYPE, CANVAS_PERSONALIZATION_ALGORITHM_PARAM, CANVAS_PERSONALIZATION_ALGORITHM_TYPE, CANVAS_PERSONALIZATION_EVENT_NAME_PARAM, CANVAS_PERSONALIZATION_PARAM, CANVAS_PERSONALIZATION_TAKE_PARAM, CANVAS_PERSONALIZE_SLOT, CANVAS_PERSONALIZE_TYPE, CANVAS_PUBLISHED_STATE, CANVAS_SLOT_SECTION_SLOT, CANVAS_SLOT_SECTION_TYPE, CANVAS_TEST_SLOT, CANVAS_TEST_TYPE, CANVAS_TEST_VARIANT_PARAM, CANVAS_VIZ_CONTROL_PARAM, CANVAS_VIZ_DI_RULE, CANVAS_VIZ_DYNAMIC_TOKEN_RULE, CANVAS_VIZ_LOCALE_RULE, CANVAS_VIZ_QUIRKS_RULE, CanvasClient, CanvasClientError, type CanvasDefinitions, type CategoriesDeleteParameters, type CategoriesGetParameters, type CategoriesGetResponse, type CategoriesPutParameters, type Category, CategoryClient, type Channel, type ChannelMessage, ChildEnhancerBuilder, type ComponentDefinition, type ComponentDefinitionDeleteParameters, type ComponentDefinitionGetParameters, type ComponentDefinitionGetResponse, type ComponentDefinitionParameter, type ComponentDefinitionPermission, type ComponentDefinitionPutParameters, type ComponentDefinitionSlot, type ComponentDefinitionSlugSettings, type ComponentDefinitionVariant, type ComponentEnhancer, type ComponentEnhancerFunction, type ComponentEnhancerOptions, type ComponentInstance, type ComponentInstanceContextualEditing, type ComponentInstanceHistoryEntry, type ComponentInstanceHistoryGetParameters, type ComponentInstanceHistoryGetResponse, type ComponentLocationReference, type ComponentOverridability, type ComponentOverride, type ComponentOverrides, type ComponentParameter, type ComponentParameterBlock, type ComponentParameterConditionalValue, type ComponentParameterContextualEditing, type ComponentParameterEnhancer, type ComponentParameterEnhancerFunction, type ComponentParameterEnhancerOptions, type CompositionDeleteParameters, type CompositionFilters, type CompositionGetByComponentIdParameters, type CompositionGetByIdParameters, type CompositionGetByNodeIdParameters, type CompositionGetByNodePathParameters, type CompositionGetBySlugParameters, type CompositionGetListResponse, type CompositionGetParameters, type CompositionGetResponse, type CompositionGetValidResponses, type CompositionPutParameters, type CompositionResolvedGetResponse, type CompositionResolvedListResponse, type CompositionUIStatus, ContentClient, type ContentType, type ContentTypeField, type ContentTypePreviewConfiguration, type ContextStorageUpdatedMessage, type ContextualEditingComponentReference, type ContextualEditingValue, type CopiedComponentSubtree, type DataDiagnostic, type DataElementBindingIssue, type DataElementConnectionDefinition, type DataElementConnectionFailureAction, type DataElementConnectionFailureLogLevel, type DataResolutionConfigIssue, type DataResolutionIssue, type DataResolutionOption, type DataResolutionOptionNegative, type DataResolutionOptionPositive, type DataResolutionParameters, type DataResourceDefinition, type DataResourceDefinitions, type DataResourceIssue, type DataResourceVariables, type DataSource, DataSourceClient, type DataSourceDeleteParameters, type DataSourceGetParameters, type DataSourceGetResponse, type DataSourcePutParameters, type DataSourceVariantData, type DataSourceVariantsKeys, type DataSourcesGetParameters, type DataSourcesGetResponse, type DataType, DataTypeClient, type DataTypeDeleteParameters, type DataTypeGetParameters, type DataTypeGetResponse, type DataTypePutParameters, type DataVariableDefinition, type DataWithProperties, type DeleteContentTypeOptions, type DeleteEntryOptions, type DismissPlaceholderMessage, type DynamicInputIssue, EDGE_CACHE_DISABLED, EDGE_DEFAULT_CACHE_TTL, EDGE_MAX_CACHE_TTL, EDGE_MIN_CACHE_TTL, EMPTY_COMPOSITION, type EdgehancersDiagnostics, type EdgehancersWholeResponseCacheDiagnostics, type EditorStateUpdatedMessage, EnhancerBuilder, type EnhancerContext, type EnhancerError, EntityReleasesClient, type EntityReleasesGetParameters, type EntityReleasesGetResponse, type EntriesGetParameters, type EntriesGetResponse, type EntriesHistoryGetParameters, type EntriesHistoryGetResponse, type EntriesResolvedListResponse, type Entry, type EntryData, type EntryFilters, type EntryList, type EvaluateCriteriaGroupOptions, type EvaluateNodeTreeVisibilityOptions, type EvaluateNodeVisibilityParameterOptions, type EvaluatePropertyCriteriaOptions, type EvaluateWalkTreePropertyCriteriaOptions, type Filters, type FindInNodeTreeReference, type FlattenProperty, type FlattenValues, type FlattenValuesOptions, type GetContentTypesOptions, type GetContentTypesResponse, type GetEffectivePropertyValueOptions, type GetEntriesOptions, type GetEntriesResponse, type GetParameterAttributesProps, IN_CONTEXT_EDITOR_COMPONENT_END_ROLE, IN_CONTEXT_EDITOR_COMPONENT_START_ROLE, IN_CONTEXT_EDITOR_CONFIG_CHECK_QUERY_STRING_PARAM, IN_CONTEXT_EDITOR_EMBED_SCRIPT_ID, IN_CONTEXT_EDITOR_FORCED_SETTINGS_QUERY_STRING_PARAM, IN_CONTEXT_EDITOR_PLAYGROUND_QUERY_STRING_PARAM, IN_CONTEXT_EDITOR_QUERY_STRING_PARAM, IS_RENDERED_BY_UNIFORM_ATTRIBUTE, type InvalidationPayload, LOCALE_DYNAMIC_INPUT_NAME, type LimitPolicy, type LinkParamConfiguration, type LinkParamValue, type LinkParameterType, type LinkTypeConfiguration, type Locale, LocaleClient, type LocaleDeleteParameters, type LocalePutParameters, type LocalesGetParameters, type LocalesGetResponse, type LocalizeOptions, type MaxDepthExceededIssue, type MessageHandler, type MoveComponentMessage, type MultiSelectParamConfiguration, type MultiSelectParamValue, type NodeLocationReference, type NonProjectMapLinkParamValue, type NumberParamConfig, type NumberParamValue, type OpenParameterEditorMessage, type OverrideOptions, PLACEHOLDER_ID, type PatternIssue, PreviewClient, type PreviewPanelSettings, type PreviewUrl, type PreviewUrlDeleteParameters, type PreviewUrlDeleteResponse, type PreviewUrlPutParameters, type PreviewUrlPutResponse, type PreviewUrlsGetParameters, type PreviewUrlsGetResponse, type PreviewViewport, type PreviewViewportDeleteParameters, type PreviewViewportDeleteResponse, type PreviewViewportPutParameters, type PreviewViewportPutResponse, type PreviewViewportsGetParameters, type PreviewViewportsGetResponse, type Project, ProjectClient, type ProjectDeleteParameters, type ProjectGetParameters, type ProjectGetResponse, type ProjectMapLinkParamValue, type ProjectPutParameters, type ProjectPutResponse, type Prompt, PromptClient, type PromptsDeleteParameters, type PromptsGetParameters, type PromptsGetResponse, type PromptsPutParameters, type PropertyCriteriaMatch, type PropertyValue, type PutContentTypeBody, type PutEntryBody, type ReadyMessage, RelationshipClient, type RelationshipResultInstance, type Release, ReleaseClient, type ReleaseContent, ReleaseContentsClient, type ReleaseContentsDeleteBody, type ReleaseContentsGetParameters, type ReleaseContentsGetResponse, type ReleaseDeleteParameters, type ReleasePatchParameters, type ReleasePutParameters, type ReleaseState, type ReleasesGetParameters, type ReleasesGetResponse, type ReportRenderedCompositionsMessage, type RequestComponentSuggestionMessage, type RequestPageHtmlMessage, type ResolvedRouteGetResponse, type RichTextBuiltInElement, type RichTextBuiltInFormat, type RichTextParamConfiguration, type RichTextParamValue, type RootComponentInstance, type RootEntryReference, type RootLocationReference, RouteClient, type RouteDynamicInputs, type RouteGetParameters, type RouteGetResponse, type RouteGetResponseComposition, type RouteGetResponseEdgehancedComposition, type RouteGetResponseEdgehancedNotFound, type RouteGetResponseNotFound, type RouteGetResponseRedirect, SECRET_QUERY_STRING_PARAM, type SelectComponentMessage, type SelectParamConfiguration, type SelectParamOption, type SelectParamValue, type SelectParameterMessage, type SendPageHtmlMessage, type SpecificProjectMap, type StringOperators, type SuggestComponentMessage, type TreeNodeInfoTypes, type TriggerComponentActionMessage, type TriggerCompositionActionMessage, UncachedCanvasClient, UncachedCategoryClient, UncachedContentClient, UniqueBatchEntries, type UpdateComponentParameterMessage, type UpdateComponentReferencesMessage, type UpdateCompositionInternalMessage, type UpdateCompositionMessage, type UpdateContextualEditingStateInternalMessage, type UpdateFeatureFlagsMessage, type UpdatePreviewSettingsMessage, type VisibilityCriteria, type VisibilityCriteriaEvaluationResult, type VisibilityCriteriaGroup, type VisibilityParameterValue, type VisibilityRule, type VisibilityRules, type WalkNodeTreeActions, type WalkNodeTreeOptions, WorkflowClient, type WorkflowDefinition, type WorkflowStage, type WorkflowStagePermission, type WorkflowStageTransition, type WorkflowStageTransitionPermission, type WorkflowsDeleteParameters, type WorkflowsGetParameters, type WorkflowsGetResponse, type WorkflowsPutParameters, bindExpressionEscapeChars, bindExpressionPrefix, bindVariables, bindVariablesToObject, compose, convertEntryToPutEntry, convertToBindExpression, createBatchEnhancer, createCanvasChannel, createDynamicInputVisibilityRule, createDynamicTokenVisibilityRule, createLimitPolicy, createLocaleVisibilityRule, createQuirksVisibilityRule, createUniformApiEnhancer, createVariableReference, enhance, escapeBindExpressionDefaultValue, evaluateNodeVisibilityParameter, evaluatePropertyCriteria, evaluateVisibilityCriteriaGroup, evaluateWalkTreeNodeVisibility, evaluateWalkTreePropertyCriteria, extractLocales, findParameterInNodeTree, flattenValues, generateComponentPlaceholderId, generateHash, getBlockValue, getComponentJsonPointer, getComponentPath, getDataSourceVariantFromRouteGetParams, getEffectivePropertyValue, getLocalizedPropertyValues, getNounForLocation, getNounForNode, getParameterAttributes, getPropertiesValue, hasReferencedVariables, isAddComponentMessage, isAllowedReferrer, isAssetParamValue, isAssetParamValueItem, isComponentActionMessage, isComponentPlaceholderId, isContextStorageUpdatedMessage, isDismissPlaceholderMessage, isEntryData, isLinkParamValue, isMovingComponentMessage, isNestedNodeType, isOpenParameterEditorMessage, isReadyMessage, isReportRenderedCompositionsMessage, isRequestComponentSuggestionMessage, isRootEntryReference, isSelectComponentMessage, isSelectParameterMessage, isSuggestComponentMessage, isSystemComponentDefinition, isTriggerCompositionActionMessage, isUpdateComponentParameterMessage, isUpdateComponentReferencesMessage, isUpdateCompositionInternalMessage, isUpdateCompositionMessage, isUpdateContextualEditingStateInternalMessage, isUpdateFeatureFlagsMessage, isUpdatePreviewSettingsMessage, localize, mapSlotToPersonalizedVariations, mapSlotToTestVariations, nullLimitPolicy, parseComponentPlaceholderId, parseVariableExpression, version, walkNodeTree, walkPropertyValues };
|
13360
|
+
export { ASSETS_SOURCE_CUSTOM_URL, ASSETS_SOURCE_UNIFORM, ASSET_PARAMETER_TYPE, ATTRIBUTE_COMPONENT_ID, ATTRIBUTE_MULTILINE, ATTRIBUTE_PARAMETER_ID, ATTRIBUTE_PARAMETER_TYPE, ATTRIBUTE_PARAMETER_VALUE, ATTRIBUTE_PLACEHOLDER, type AddComponentMessage, type BatchEnhancer, BatchEntry, type BatchInvalidationPayload, type BindVariablesOptions, type BindVariablesResult, type BindVariablesToObjectOptions, BlockFormatError, type BlockLocationReference, type BlockValue, CANVAS_BLOCK_PARAM_TYPE, CANVAS_CONTEXTUAL_EDITING_PARAM, CANVAS_DRAFT_STATE, CANVAS_EDITOR_STATE, CANVAS_ENRICHMENT_TAG_PARAM, CANVAS_INTENT_TAG_PARAM, CANVAS_LOCALE_TAG_PARAM, CANVAS_LOCALIZATION_SLOT, CANVAS_LOCALIZATION_TYPE, CANVAS_PERSONALIZATION_ALGORITHM_PARAM, CANVAS_PERSONALIZATION_ALGORITHM_TYPE, CANVAS_PERSONALIZATION_EVENT_NAME_PARAM, CANVAS_PERSONALIZATION_PARAM, CANVAS_PERSONALIZATION_TAKE_PARAM, CANVAS_PERSONALIZE_SLOT, CANVAS_PERSONALIZE_TYPE, CANVAS_PUBLISHED_STATE, CANVAS_SLOT_SECTION_SLOT, CANVAS_SLOT_SECTION_TYPE, CANVAS_TEST_SLOT, CANVAS_TEST_TYPE, CANVAS_TEST_VARIANT_PARAM, CANVAS_VIZ_CONTROL_PARAM, CANVAS_VIZ_DI_RULE, CANVAS_VIZ_DYNAMIC_TOKEN_RULE, CANVAS_VIZ_LOCALE_RULE, CANVAS_VIZ_QUIRKS_RULE, CanvasClient, CanvasClientError, type CanvasDefinitions, type CategoriesDeleteParameters, type CategoriesGetParameters, type CategoriesGetResponse, type CategoriesPutParameters, type Category, CategoryClient, type Channel, type ChannelMessage, ChildEnhancerBuilder, type ComponentDefinition, type ComponentDefinitionDeleteParameters, type ComponentDefinitionGetParameters, type ComponentDefinitionGetResponse, type ComponentDefinitionParameter, type ComponentDefinitionPermission, type ComponentDefinitionPutParameters, type ComponentDefinitionSlot, type ComponentDefinitionSlugSettings, type ComponentDefinitionVariant, type ComponentEnhancer, type ComponentEnhancerFunction, type ComponentEnhancerOptions, type ComponentInstance, type ComponentInstanceContextualEditing, type ComponentInstanceHistoryEntry, type ComponentInstanceHistoryGetParameters, type ComponentInstanceHistoryGetResponse, type ComponentLocationReference, type ComponentOverridability, type ComponentOverride, type ComponentOverrides, type ComponentParameter, type ComponentParameterBlock, type ComponentParameterConditionalValue, type ComponentParameterContextualEditing, type ComponentParameterEnhancer, type ComponentParameterEnhancerFunction, type ComponentParameterEnhancerOptions, type CompositionDeleteParameters, type CompositionFilters, type CompositionGetByComponentIdParameters, type CompositionGetByIdParameters, type CompositionGetByNodeIdParameters, type CompositionGetByNodePathParameters, type CompositionGetBySlugParameters, type CompositionGetListResponse, type CompositionGetParameters, type CompositionGetResponse, type CompositionGetValidResponses, type CompositionPutParameters, type CompositionResolvedGetResponse, type CompositionResolvedListResponse, type CompositionUIStatus, ContentClient, type ContentType, type ContentTypeField, type ContentTypePreviewConfiguration, type ContextStorageUpdatedMessage, type ContextualEditingComponentReference, type ContextualEditingValue, type CopiedComponentSubtree, type DataDiagnostic, type DataElementBindingIssue, type DataElementConnectionDefinition, type DataElementConnectionFailureAction, type DataElementConnectionFailureLogLevel, type DataResolutionConfigIssue, type DataResolutionIssue, type DataResolutionOption, type DataResolutionOptionNegative, type DataResolutionOptionPositive, type DataResolutionParameters, type DataResourceDefinition, type DataResourceDefinitions, type DataResourceIssue, type DataResourceVariables, type DataSource, DataSourceClient, type DataSourceDeleteParameters, type DataSourceGetParameters, type DataSourceGetResponse, type DataSourcePutParameters, type DataSourceVariantData, type DataSourceVariantsKeys, type DataSourcesGetParameters, type DataSourcesGetResponse, type DataType, DataTypeClient, type DataTypeDeleteParameters, type DataTypeGetParameters, type DataTypeGetResponse, type DataTypePutParameters, type DataVariableDefinition, type DataWithProperties, type DeleteContentTypeOptions, type DeleteEntryOptions, type DismissPlaceholderMessage, type DynamicInputIssue, EDGE_CACHE_DISABLED, EDGE_DEFAULT_CACHE_TTL, EDGE_MAX_CACHE_TTL, EDGE_MIN_CACHE_TTL, EMPTY_COMPOSITION, type EdgehancersDiagnostics, type EdgehancersWholeResponseCacheDiagnostics, type EditorStateUpdatedMessage, EnhancerBuilder, type EnhancerContext, type EnhancerError, EntityReleasesClient, type EntityReleasesGetParameters, type EntityReleasesGetResponse, type EntriesGetParameters, type EntriesGetResponse, type EntriesHistoryGetParameters, type EntriesHistoryGetResponse, type EntriesResolvedListResponse, type Entry, type EntryData, type EntryFilters, type EntryList, type EvaluateCriteriaGroupOptions, type EvaluateNodeTreeVisibilityOptions, type EvaluateNodeVisibilityParameterOptions, type EvaluatePropertyCriteriaOptions, type EvaluateWalkTreePropertyCriteriaOptions, type Filters, type FindInNodeTreeReference, type FlattenProperty, type FlattenValues, type FlattenValuesOptions, type GetContentTypesOptions, type GetContentTypesResponse, type GetEffectivePropertyValueOptions, type GetEntriesOptions, type GetEntriesResponse, type GetParameterAttributesProps, IN_CONTEXT_EDITOR_COMPONENT_END_ROLE, IN_CONTEXT_EDITOR_COMPONENT_START_ROLE, IN_CONTEXT_EDITOR_CONFIG_CHECK_QUERY_STRING_PARAM, IN_CONTEXT_EDITOR_EMBED_SCRIPT_ID, IN_CONTEXT_EDITOR_FORCED_SETTINGS_QUERY_STRING_PARAM, IN_CONTEXT_EDITOR_PLAYGROUND_QUERY_STRING_PARAM, IN_CONTEXT_EDITOR_QUERY_STRING_PARAM, IS_RENDERED_BY_UNIFORM_ATTRIBUTE, type InvalidationPayload, LOCALE_DYNAMIC_INPUT_NAME, type LimitPolicy, type LinkParamConfiguration, type LinkParamValue, type LinkParameterType, type LinkTypeConfiguration, type Locale, LocaleClient, type LocaleDeleteParameters, type LocalePutParameters, type LocalesGetParameters, type LocalesGetResponse, type LocalizeOptions, type MaxDepthExceededIssue, type MessageHandler, type MoveComponentMessage, type MultiSelectParamConfiguration, type MultiSelectParamValue, type NodeLocationReference, type NonProjectMapLinkParamValue, type NumberParamConfig, type NumberParamValue, type OpenParameterEditorMessage, type OverrideOptions, PLACEHOLDER_ID, type PatternIssue, PreviewClient, type PreviewPanelSettings, type PreviewUrl, type PreviewUrlDeleteParameters, type PreviewUrlDeleteResponse, type PreviewUrlPutParameters, type PreviewUrlPutResponse, type PreviewUrlsGetParameters, type PreviewUrlsGetResponse, type PreviewViewport, type PreviewViewportDeleteParameters, type PreviewViewportDeleteResponse, type PreviewViewportPutParameters, type PreviewViewportPutResponse, type PreviewViewportsGetParameters, type PreviewViewportsGetResponse, type Project, ProjectClient, type ProjectDeleteParameters, type ProjectGetParameters, type ProjectGetResponse, type ProjectMapLinkParamValue, type ProjectPutParameters, type ProjectPutResponse, type Prompt, PromptClient, type PromptsDeleteParameters, type PromptsGetParameters, type PromptsGetResponse, type PromptsPutParameters, type PropertyCriteriaMatch, type PropertyValue, type PutContentTypeBody, type PutEntryBody, type ReadyMessage, RelationshipClient, type RelationshipResultInstance, type Release, ReleaseClient, type ReleaseContent, ReleaseContentsClient, type ReleaseContentsDeleteBody, type ReleaseContentsGetParameters, type ReleaseContentsGetResponse, type ReleaseDeleteParameters, type ReleasePatchParameters, type ReleasePutParameters, type ReleaseState, type ReleasesGetParameters, type ReleasesGetResponse, type ReportRenderedCompositionsMessage, type RequestComponentSuggestionMessage, type RequestPageHtmlMessage, type ResolvedRouteGetResponse, type RichTextBuiltInElement, type RichTextBuiltInFormat, type RichTextParamConfiguration, type RichTextParamValue, type RootComponentInstance, type RootEntryReference, type RootLocationReference, RouteClient, type RouteDynamicInputs, type RouteGetParameters, type RouteGetResponse, type RouteGetResponseComposition, type RouteGetResponseEdgehancedComposition, type RouteGetResponseEdgehancedNotFound, type RouteGetResponseNotFound, type RouteGetResponseRedirect, SECRET_QUERY_STRING_PARAM, type SelectComponentMessage, type SelectParamConfiguration, type SelectParamOption, type SelectParamValue, type SelectParameterMessage, type SendPageHtmlMessage, type SpecificProjectMap, type StringOperators, type SuggestComponentMessage, type TreeNodeInfoTypes, type TriggerComponentActionMessage, type TriggerCompositionActionMessage, UncachedCanvasClient, UncachedCategoryClient, UncachedContentClient, UniqueBatchEntries, type UpdateComponentParameterMessage, type UpdateComponentReferencesMessage, type UpdateCompositionInternalMessage, type UpdateCompositionMessage, type UpdateCompositionOptions, type UpdateContextualEditingStateInternalMessage, type UpdateFeatureFlagsMessage, type UpdatePreviewSettingsMessage, type UpsertEntryOptions, type VisibilityCriteria, type VisibilityCriteriaEvaluationResult, type VisibilityCriteriaGroup, type VisibilityParameterValue, type VisibilityRule, type VisibilityRules, type WalkNodeTreeActions, type WalkNodeTreeOptions, type WebhookDefinition, WorkflowClient, type WorkflowDefinition, type WorkflowStage, type WorkflowStagePermission, type WorkflowStageTransition, type WorkflowStageTransitionPermission, type WorkflowsDeleteParameters, type WorkflowsGetParameters, type WorkflowsGetResponse, type WorkflowsPutParameters, bindExpressionEscapeChars, bindExpressionPrefix, bindVariables, bindVariablesToObject, compose, convertEntryToPutEntry, convertToBindExpression, createBatchEnhancer, createCanvasChannel, createDynamicInputVisibilityRule, createDynamicTokenVisibilityRule, createLimitPolicy, createLocaleVisibilityRule, createQuirksVisibilityRule, createUniformApiEnhancer, createVariableReference, enhance, escapeBindExpressionDefaultValue, evaluateNodeVisibilityParameter, evaluatePropertyCriteria, evaluateVisibilityCriteriaGroup, evaluateWalkTreeNodeVisibility, evaluateWalkTreePropertyCriteria, extractLocales, findParameterInNodeTree, flattenValues, generateComponentPlaceholderId, generateHash, getBlockValue, getComponentJsonPointer, getComponentPath, getDataSourceVariantFromRouteGetParams, getEffectivePropertyValue, getLocalizedPropertyValues, getNounForLocation, getNounForNode, getParameterAttributes, getPropertiesValue, hasReferencedVariables, isAddComponentMessage, isAllowedReferrer, isAssetParamValue, isAssetParamValueItem, isComponentActionMessage, isComponentPlaceholderId, isContextStorageUpdatedMessage, isDismissPlaceholderMessage, isEntryData, isLinkParamValue, isMovingComponentMessage, isNestedNodeType, isOpenParameterEditorMessage, isReadyMessage, isReportRenderedCompositionsMessage, isRequestComponentSuggestionMessage, isRootEntryReference, isSelectComponentMessage, isSelectParameterMessage, isSuggestComponentMessage, isSystemComponentDefinition, isTriggerCompositionActionMessage, isUpdateComponentParameterMessage, isUpdateComponentReferencesMessage, isUpdateCompositionInternalMessage, isUpdateCompositionMessage, isUpdateContextualEditingStateInternalMessage, isUpdateFeatureFlagsMessage, isUpdatePreviewSettingsMessage, localize, mapSlotToPersonalizedVariations, mapSlotToTestVariations, nullLimitPolicy, parseComponentPlaceholderId, parseVariableExpression, version, walkNodeTree, walkPropertyValues };
|
package/dist/index.esm.js
CHANGED
@@ -671,12 +671,17 @@ var CanvasClient = class extends ApiClient {
|
|
671
671
|
return this.apiClient(edgeUrl, this.edgeApiRequestInit);
|
672
672
|
}
|
673
673
|
/** Updates or creates a Canvas component definition */
|
674
|
-
async updateComposition(body) {
|
674
|
+
async updateComposition(body, options) {
|
675
675
|
const fetchUri = this.createUrl(CANVAS_URL);
|
676
|
+
const headers = {};
|
677
|
+
if (options == null ? void 0 : options.ifUnmodifiedSince) {
|
678
|
+
headers["x-if-unmodified-since"] = options.ifUnmodifiedSince;
|
679
|
+
}
|
676
680
|
const { response } = await this.apiClientWithResponse(fetchUri, {
|
677
681
|
method: "PUT",
|
678
682
|
body: JSON.stringify({ ...body, projectId: this.options.projectId }),
|
679
|
-
expectNoContent: true
|
683
|
+
expectNoContent: true,
|
684
|
+
headers
|
680
685
|
});
|
681
686
|
return { modified: response.headers.get("x-modified-at") };
|
682
687
|
}
|
@@ -816,12 +821,17 @@ var _ContentClient = class _ContentClient extends ApiClient3 {
|
|
816
821
|
headers: opts.autogenerateDataTypes ? { "x-uniform-autogenerate-data-types": "true" } : {}
|
817
822
|
});
|
818
823
|
}
|
819
|
-
async upsertEntry(body) {
|
824
|
+
async upsertEntry(body, options) {
|
820
825
|
const fetchUri = this.createUrl(__privateGet(_ContentClient, _entriesUrl));
|
826
|
+
const headers = {};
|
827
|
+
if (options == null ? void 0 : options.ifUnmodifiedSince) {
|
828
|
+
headers["x-if-unmodified-since"] = options.ifUnmodifiedSince;
|
829
|
+
}
|
821
830
|
const { response } = await this.apiClientWithResponse(fetchUri, {
|
822
831
|
method: "PUT",
|
823
832
|
body: JSON.stringify({ ...body, projectId: this.options.projectId }),
|
824
|
-
expectNoContent: true
|
833
|
+
expectNoContent: true,
|
834
|
+
headers
|
825
835
|
});
|
826
836
|
return { modified: response.headers.get("x-modified-at") };
|
827
837
|
}
|
@@ -3407,7 +3417,7 @@ function handleRichTextNodeBinding(object, options) {
|
|
3407
3417
|
import { ApiClientError as ApiClientError2 } from "@uniformdev/context/api";
|
3408
3418
|
|
3409
3419
|
// src/.version.ts
|
3410
|
-
var version = "20.
|
3420
|
+
var version = "20.31.0";
|
3411
3421
|
|
3412
3422
|
// src/WorkflowClient.ts
|
3413
3423
|
import { ApiClient as ApiClient15 } from "@uniformdev/context/api";
|
package/dist/index.js
CHANGED
@@ -837,12 +837,17 @@ var CanvasClient = class extends import_api2.ApiClient {
|
|
837
837
|
return this.apiClient(edgeUrl, this.edgeApiRequestInit);
|
838
838
|
}
|
839
839
|
/** Updates or creates a Canvas component definition */
|
840
|
-
async updateComposition(body) {
|
840
|
+
async updateComposition(body, options) {
|
841
841
|
const fetchUri = this.createUrl(CANVAS_URL);
|
842
|
+
const headers = {};
|
843
|
+
if (options == null ? void 0 : options.ifUnmodifiedSince) {
|
844
|
+
headers["x-if-unmodified-since"] = options.ifUnmodifiedSince;
|
845
|
+
}
|
842
846
|
const { response } = await this.apiClientWithResponse(fetchUri, {
|
843
847
|
method: "PUT",
|
844
848
|
body: JSON.stringify({ ...body, projectId: this.options.projectId }),
|
845
|
-
expectNoContent: true
|
849
|
+
expectNoContent: true,
|
850
|
+
headers
|
846
851
|
});
|
847
852
|
return { modified: response.headers.get("x-modified-at") };
|
848
853
|
}
|
@@ -982,12 +987,17 @@ var _ContentClient = class _ContentClient extends import_api4.ApiClient {
|
|
982
987
|
headers: opts.autogenerateDataTypes ? { "x-uniform-autogenerate-data-types": "true" } : {}
|
983
988
|
});
|
984
989
|
}
|
985
|
-
async upsertEntry(body) {
|
990
|
+
async upsertEntry(body, options) {
|
986
991
|
const fetchUri = this.createUrl(__privateGet(_ContentClient, _entriesUrl));
|
992
|
+
const headers = {};
|
993
|
+
if (options == null ? void 0 : options.ifUnmodifiedSince) {
|
994
|
+
headers["x-if-unmodified-since"] = options.ifUnmodifiedSince;
|
995
|
+
}
|
987
996
|
const { response } = await this.apiClientWithResponse(fetchUri, {
|
988
997
|
method: "PUT",
|
989
998
|
body: JSON.stringify({ ...body, projectId: this.options.projectId }),
|
990
|
-
expectNoContent: true
|
999
|
+
expectNoContent: true,
|
1000
|
+
headers
|
991
1001
|
});
|
992
1002
|
return { modified: response.headers.get("x-modified-at") };
|
993
1003
|
}
|
@@ -3573,7 +3583,7 @@ function handleRichTextNodeBinding(object, options) {
|
|
3573
3583
|
var import_api17 = require("@uniformdev/context/api");
|
3574
3584
|
|
3575
3585
|
// src/.version.ts
|
3576
|
-
var version = "20.
|
3586
|
+
var version = "20.31.0";
|
3577
3587
|
|
3578
3588
|
// src/WorkflowClient.ts
|
3579
3589
|
var import_api16 = require("@uniformdev/context/api");
|
package/dist/index.mjs
CHANGED
@@ -671,12 +671,17 @@ var CanvasClient = class extends ApiClient {
|
|
671
671
|
return this.apiClient(edgeUrl, this.edgeApiRequestInit);
|
672
672
|
}
|
673
673
|
/** Updates or creates a Canvas component definition */
|
674
|
-
async updateComposition(body) {
|
674
|
+
async updateComposition(body, options) {
|
675
675
|
const fetchUri = this.createUrl(CANVAS_URL);
|
676
|
+
const headers = {};
|
677
|
+
if (options == null ? void 0 : options.ifUnmodifiedSince) {
|
678
|
+
headers["x-if-unmodified-since"] = options.ifUnmodifiedSince;
|
679
|
+
}
|
676
680
|
const { response } = await this.apiClientWithResponse(fetchUri, {
|
677
681
|
method: "PUT",
|
678
682
|
body: JSON.stringify({ ...body, projectId: this.options.projectId }),
|
679
|
-
expectNoContent: true
|
683
|
+
expectNoContent: true,
|
684
|
+
headers
|
680
685
|
});
|
681
686
|
return { modified: response.headers.get("x-modified-at") };
|
682
687
|
}
|
@@ -816,12 +821,17 @@ var _ContentClient = class _ContentClient extends ApiClient3 {
|
|
816
821
|
headers: opts.autogenerateDataTypes ? { "x-uniform-autogenerate-data-types": "true" } : {}
|
817
822
|
});
|
818
823
|
}
|
819
|
-
async upsertEntry(body) {
|
824
|
+
async upsertEntry(body, options) {
|
820
825
|
const fetchUri = this.createUrl(__privateGet(_ContentClient, _entriesUrl));
|
826
|
+
const headers = {};
|
827
|
+
if (options == null ? void 0 : options.ifUnmodifiedSince) {
|
828
|
+
headers["x-if-unmodified-since"] = options.ifUnmodifiedSince;
|
829
|
+
}
|
821
830
|
const { response } = await this.apiClientWithResponse(fetchUri, {
|
822
831
|
method: "PUT",
|
823
832
|
body: JSON.stringify({ ...body, projectId: this.options.projectId }),
|
824
|
-
expectNoContent: true
|
833
|
+
expectNoContent: true,
|
834
|
+
headers
|
825
835
|
});
|
826
836
|
return { modified: response.headers.get("x-modified-at") };
|
827
837
|
}
|
@@ -3407,7 +3417,7 @@ function handleRichTextNodeBinding(object, options) {
|
|
3407
3417
|
import { ApiClientError as ApiClientError2 } from "@uniformdev/context/api";
|
3408
3418
|
|
3409
3419
|
// src/.version.ts
|
3410
|
-
var version = "20.
|
3420
|
+
var version = "20.31.0";
|
3411
3421
|
|
3412
3422
|
// src/WorkflowClient.ts
|
3413
3423
|
import { ApiClient as ApiClient15 } from "@uniformdev/context/api";
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@uniformdev/canvas",
|
3
|
-
"version": "20.7.1-alpha.
|
3
|
+
"version": "20.7.1-alpha.79+3ce61f1051",
|
4
4
|
"description": "Common functionality and types for Uniform Canvas",
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
6
6
|
"main": "./dist/index.js",
|
@@ -37,12 +37,13 @@
|
|
37
37
|
"lexical": "0.25.0",
|
38
38
|
"p-limit": "3.1.0",
|
39
39
|
"p-retry": "5.1.2",
|
40
|
-
"p-throttle": "5.0.0"
|
40
|
+
"p-throttle": "5.0.0",
|
41
|
+
"svix": "1.71.0"
|
41
42
|
},
|
42
43
|
"dependencies": {
|
43
|
-
"@uniformdev/assets": "20.7.1-alpha.
|
44
|
-
"@uniformdev/context": "20.7.1-alpha.
|
45
|
-
"@uniformdev/richtext": "20.7.1-alpha.
|
44
|
+
"@uniformdev/assets": "20.7.1-alpha.79+3ce61f1051",
|
45
|
+
"@uniformdev/context": "20.7.1-alpha.79+3ce61f1051",
|
46
|
+
"@uniformdev/richtext": "20.7.1-alpha.79+3ce61f1051",
|
46
47
|
"immer": "10.1.1"
|
47
48
|
},
|
48
49
|
"files": [
|
@@ -51,5 +52,5 @@
|
|
51
52
|
"publishConfig": {
|
52
53
|
"access": "public"
|
53
54
|
},
|
54
|
-
"gitHead": "
|
55
|
+
"gitHead": "3ce61f1051baf775fa6a8b716fa554f93f9c3650"
|
55
56
|
}
|