@civitai/app-sdk 0.86.0 → 0.88.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +178 -16
- package/dist/blocks/generationSamplers.d.ts +172 -0
- package/dist/blocks/generationSamplers.js +211 -0
- package/dist/blocks/idempotency.d.ts +1 -1
- package/dist/blocks/idempotency.js +1 -1
- package/dist/blocks/index.d.ts +17 -37
- package/dist/blocks/index.js +14 -34
- package/dist/blocks/legacyStoreCompat.d.ts +42 -0
- package/dist/blocks/legacyStoreCompat.js +42 -0
- package/dist/blocks/messages.d.ts +36 -284
- package/dist/blocks/messages.js +2 -15
- package/dist/blocks/types.d.ts +321 -5
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/dist/blocks/appStorageErrors.d.ts +0 -384
- package/dist/blocks/appStorageErrors.js +0 -423
- package/dist/blocks/appStorageLimits.d.ts +0 -113
- package/dist/blocks/appStorageLimits.js +0 -113
package/dist/blocks/index.d.ts
CHANGED
|
@@ -27,7 +27,13 @@ export { BLOCK_SCOPES, BLOCK_SCOPE_PATTERN, BLOCK_CATEGORIES, BLOCK_TAGLINE_MAX_
|
|
|
27
27
|
export type { BlockScope, BlockScopeKey, BlockCategory } from './scopes.js';
|
|
28
28
|
export { BrowsingLevel, SFW_LEVELS, NSFW_LEVELS, isSfwCeiling, isLevelAllowed, effectiveBrowsingCeiling, } from './browsingLevel.js';
|
|
29
29
|
export type { BrowsingLevelKey, BrowsingLevelBit, ColorDomain } from './browsingLevel.js';
|
|
30
|
-
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated Seven leftovers of the removed legacy key-value store, kept only
|
|
32
|
+
* because published `@civitai/blocks-react` up to 0.80.x imports them at module
|
|
33
|
+
* load. See `legacyStoreCompat.ts`. Use `app.storage.collection(name)` in
|
|
34
|
+
* `@civitai/sdk`.
|
|
35
|
+
*/
|
|
36
|
+
export { APP_STORAGE_MAX_VALUE_BYTES, APP_STORAGE_MAX_BYTES, APP_STORAGE_MAX_ROWS, APP_STORAGE_ERROR_VALUE_TOO_LARGE, APP_STORAGE_ERROR_USER_QUOTA_EXCEEDED, APP_STORAGE_ERROR_USER_ROW_LIMIT, APP_STORAGE_ERROR_REQUEST_FAILED, } from './legacyStoreCompat.js';
|
|
31
37
|
/**
|
|
32
38
|
* App reactions (`SET_ENTITY_REACTION` / `GET_ENTITY_REACTIONS`, scope
|
|
33
39
|
* `social:react:self`). The vocabulary mirrors civitai's
|
|
@@ -43,7 +49,6 @@ export { BLOCK_IDEMPOTENCY_KEY_REGEX, BLOCK_IDEMPOTENCY_KEY_MAX_LENGTH, isValidB
|
|
|
43
49
|
* the limits live in ONE place: the header of `nestedDocument.ts`.
|
|
44
50
|
*
|
|
45
51
|
* 🔴 `injectBaseHref` and `InjectBaseHrefResult` ARE DELIBERATELY NOT HERE, and
|
|
46
|
-
* the omission is the same decision as the `appStorageErrors.ts` block below:
|
|
47
52
|
* publish the branching surface, not every internal the module happens to
|
|
48
53
|
* export. `fetchNestedDocument` covers every runnable example in this repo's
|
|
49
54
|
* four prose surfaces (this package's README, `@civitai/blocks-react`'s README,
|
|
@@ -67,43 +72,10 @@ export { BLOCK_IDEMPOTENCY_KEY_REGEX, BLOCK_IDEMPOTENCY_KEY_MAX_LENGTH, isValidB
|
|
|
67
72
|
*/
|
|
68
73
|
export { fetchNestedDocument, NestedDocumentError } from './nestedDocument.js';
|
|
69
74
|
export type { FetchNestedDocumentOptions, NestedDocument, NestedDocumentErrorCode, } from './nestedDocument.js';
|
|
70
|
-
/**
|
|
71
|
-
* {@link classifyAppStorageError} — the matcher a block branches on — plus the
|
|
72
|
-
* four rejection messages a MOCK HOST has to emit. The wire carries a
|
|
73
|
-
* host-authored message, never the TRPC code; see `appStorageErrors.ts` for the
|
|
74
|
-
* measurement, and #343 for the bug it closes.
|
|
75
|
-
*
|
|
76
|
-
* 🔴 **THE PUBLIC BRANCHING SURFACE IS THE REASON, NOT THE STRING.** A block
|
|
77
|
-
* switches on {@link AppStorageRejectionReason}; it never needs to hold a host
|
|
78
|
-
* message. So this barrel deliberately exports LESS than
|
|
79
|
-
* `appStorageErrors.ts` does, and the omissions are each a decision:
|
|
80
|
-
*
|
|
81
|
-
* - `APP_STORAGE_HOST_ERROR_MESSAGES` — the frozen array. Publishing it invites
|
|
82
|
-
* `MESSAGES.includes(err.message)`, which is EQUALITY against a snapshot and
|
|
83
|
-
* stops matching the day the host moves its per-value cap. That is the
|
|
84
|
-
* matcher shape #343 exists to eliminate; `classifyAppStorageError` is
|
|
85
|
-
* strictly wider (see its note on the per-value FAMILY).
|
|
86
|
-
* - `isAppStorageHostErrorMessage` — a thin `classifyAppStorageError(…) !==
|
|
87
|
-
* null`. Its only caller is `tests/guards/app-storage-error-strings.test.mjs`,
|
|
88
|
-
* which imports the module by FILE PATH.
|
|
89
|
-
* - `APP_STORAGE_ERROR_APP_QUOTA_EXCEEDED` / `_APP_ROW_LIMIT` — the app-wide
|
|
90
|
-
* umbrella pair. No mock in this repository can emit them (nothing models the
|
|
91
|
-
* umbrella), and a block reaches them through the `'app-quota-exceeded'` /
|
|
92
|
-
* `'app-row-limit'` reasons, which ARE exported.
|
|
93
|
-
* - `appStorageValueTooLargeMessage` — the builder, so a test can prove the
|
|
94
|
-
* per-value string is DERIVED from `APP_STORAGE_MAX_VALUE_BYTES` rather than
|
|
95
|
-
* hardcoded.
|
|
96
|
-
*
|
|
97
|
-
* All five stay exported from `appStorageErrors.ts` itself, so a test or a
|
|
98
|
-
* guard reaches them by path. Adding one here later is a `minor`; removing one
|
|
99
|
-
* once published is not.
|
|
100
|
-
*/
|
|
101
|
-
export { APP_STORAGE_ERROR_VALUE_TOO_LARGE, APP_STORAGE_ERROR_USER_QUOTA_EXCEEDED, APP_STORAGE_ERROR_USER_ROW_LIMIT, APP_STORAGE_ERROR_REQUEST_FAILED, classifyAppStorageError, } from './appStorageErrors.js';
|
|
102
|
-
export type { AppStorageRejectionReason } from './appStorageErrors.js';
|
|
103
75
|
export { BLOCK_INIT_FRAGMENT_MARKER_KEY, BLOCK_INIT_FRAGMENT_VERSION, BLOCK_INIT_FRAGMENT_KEYS, encodeBlockInitFragment, parseBlockInitFragment, stripBlockInitFragment, } from './initFragment.js';
|
|
104
76
|
export type { BlockInitFragment } from './initFragment.js';
|
|
105
77
|
export { isMessage, BLOCK_TO_PARENT_MESSAGE_TYPES, OTHER_MESSAGE_TYPE_LABEL, boundBlockToParentMessageType, } from './messages.js';
|
|
106
|
-
export type { BlockInitPayload, BlockToParentMessage, BlockToParentMessageType, ConsentUnavailablePayload, ConsentUnavailableReason, ParentToBlockMessage, ParentToBlockMessageType,
|
|
78
|
+
export type { BlockInitPayload, BlockToParentMessage, BlockToParentMessageType, ConsentUnavailablePayload, ConsentUnavailableReason, ParentToBlockMessage, ParentToBlockMessageType, WrappedToken, BlockBuzzTransactionsParams, BlockDailyCompensationParams, AppWorkflowsParams, } from './messages.js';
|
|
107
79
|
/**
|
|
108
80
|
* Runtime narrowing for the `slotId`-discriminated {@link BlockContext} union.
|
|
109
81
|
* Values, not types — a slot context crosses a `postMessage` boundary, so its
|
|
@@ -116,7 +88,7 @@ export { isModelSlotContext, isPageSlotContext } from './types.js';
|
|
|
116
88
|
* in `types.ts` for which of the two it uses and why.
|
|
117
89
|
*/
|
|
118
90
|
export { isSignedIn } from './types.js';
|
|
119
|
-
export type { BlockContext, KnownSlotId, ModelSlotId, PageSlotContext, PageSlotId, UnknownSlotContext, BlockAnalyticsDeclaration, BlockAnalyticsEventDeclaration, BlockAnalyticsPropertyDeclaration, BlockManifest, BlockManifestGood, BlockManifestV1, BlockSettings, BlockStorageCollectionDeclaration, BlockStorageCollectionHook, BlockStorageCollectionSchema, BlockStorageDeclaration, BlockStorageImport, BlockStorageIndexes, BlockStorageIndexType, BlockStorageMigrationKeyword, BlockStorageMigrationOp, BlockStoragePrivateCollectionDeclaration, BlockStorageSchemaType, BlockStorageSharedCollectionDeclaration, BlockToken, ContentRating, ManifestBooleanField, ManifestIframe, ManifestNumberField, ManifestPage, ManifestPreview, ManifestSettingField, ManifestSettings, ManifestStringField, ManifestTarget, ModelSlotContext, SettingScope, SettingWidget, Theme, ViewerInfo, BlockCheckpointInfo, BlockResourceInfo, BlockResourcePickerType, BlockSourceImage, BlockUploadedImageInfo, BlockGenerationSourceImageInfo, BlockImagePickerSource, BlockPickedImageInfo, BlockMediaKind, BlockMediaUploadInfo, BlockPendingImageInfo, BlockImageScanResult, BlockUploadPurpose, BlockNavigateScope, BlockTextToImageParams, BlockWorkflowSnapshot, BlockEstimateBatchAggregate, BlockModelSubstitution, ModelSubstitutionReason, KnownBlockWorkflowErrorCode, BlockStepToolCall, BlockTrainedEpoch, BlockPublishedModel, BuzzAccountType, ShowcaseImage, WorkflowBody, WorkflowBodyTextToImage, WorkflowBodyCustomComfy, WorkflowBodyCustomComfyRecipe, WorkflowBodyCustomComfyInline, InlineComfyNode, WorkflowBodyStep, WorkflowBodyPassThroughStep, WorkflowBodyWorkflow, WorkflowBodyWorkflowStep, WorkflowStepRef, WithWorkflowStepRefs, BlockWorkflowStepSnapshot, WorkflowStatus, BlockBuzzTransaction, BlockBuzzAccount, BlockDailyCompensationResource, BlockViewer, BlockWildcardPack, BlockWildcardPackErrorCode, BlockResourceFile, BlockResourceFileEntry, BlockResourceFileEntryFormat, BlockResourceFileErrorCode, BlockResourceFileMeta, AppWorkflow, AppWorkflowImage, BlockGatedImage, BlockCollectionFollowErrorCode, BlockCollectionFollowResult, BlockPostSource, BlockCreatePostRequest, BlockCreatePostResult, BlockCreatePostHostError, WorkflowBodyTraining, AiToolkitTrainingParams, AiToolkitTrainingParamsBase, AiToolkitPlainEcosystem, AiToolkitLrScheduler, AiToolkitOptimizerType, BlockTrainingQuote, BlockTrainingDatasetItem, BlockTrainingDataImage, BlockTrainingDataUploadResult, BlockRunTrainingHostError, BlockStepQuote, BlockModel3dOutput, BlockRunConfirmedStepHostError, } from './types.js';
|
|
91
|
+
export type { BlockContext, KnownSlotId, ModelSlotId, PageSlotContext, PageSlotId, UnknownSlotContext, BlockAnalyticsDeclaration, BlockAnalyticsEventDeclaration, BlockAnalyticsPropertyDeclaration, BlockManifest, BlockManifestGood, BlockManifestV1, BlockSettings, BlockStorageCollectionDeclaration, BlockStorageCollectionHook, BlockStorageCollectionSchema, BlockStorageDeclaration, BlockStorageImport, BlockStorageIndexes, BlockStorageIndexType, BlockStorageMigrationKeyword, BlockStorageMigrationOp, BlockStoragePrivateCollectionDeclaration, BlockStorageSchemaType, BlockStorageSharedCollectionDeclaration, BlockToken, ContentRating, ManifestBooleanField, ManifestIframe, ManifestNumberField, ManifestPage, ManifestPreview, ManifestSettingField, ManifestSettings, ManifestStringField, ManifestTarget, ModelSlotContext, SettingScope, SettingWidget, Theme, ViewerInfo, BlockCheckpointInfo, BlockResourceInfo, BlockResourcePickerType, BlockSourceImage, BlockUploadedImageInfo, BlockGenerationSourceImageInfo, BlockPersistGenerationSourceRequest, BlockPersistedGenerationSource, BlockImagePickerSource, BlockPickedImageInfo, BlockMediaKind, BlockMediaUploadInfo, BlockMediaUploadBatchItemResult, BlockPendingImageInfo, BlockImageScanResult, BlockUploadPurpose, BlockNavigateScope, BlockTextToImageParams, BlockWorkflowSnapshot, BlockEstimateBatchAggregate, BlockModelSubstitution, ModelSubstitutionReason, KnownBlockWorkflowErrorCode, BlockStepToolCall, BlockTrainedEpoch, BlockPublishedModel, BuzzAccountType, ShowcaseImage, WorkflowBody, WorkflowBodyTextToImage, WorkflowBodyCustomComfy, WorkflowBodyCustomComfyRecipe, WorkflowBodyCustomComfyInline, InlineComfyNode, WorkflowBodyStep, WorkflowBodyPassThroughStep, WorkflowBodyWorkflow, WorkflowBodyWorkflowStep, WorkflowStepRef, WithWorkflowStepRefs, BlockWorkflowStepSnapshot, BlockWorkflowStepQueue, BlockWorkflowEta, KnownBlockWorkflowQueueSupport, WorkflowStatus, BlockBuzzTransaction, BlockBuzzAccount, BlockDailyCompensationResource, BlockViewer, BlockWildcardPack, BlockWildcardPackErrorCode, BlockResourceFile, BlockResourceFileEntry, BlockResourceFileEntryFormat, BlockResourceFileErrorCode, BlockResourceFileMeta, AppWorkflow, AppWorkflowImage, BlockGatedImage, BlockCollectionFollowErrorCode, BlockCollectionFollowResult, BlockPostSource, BlockCreatePostRequest, BlockCreatePostResult, BlockCreatePostHostError, WorkflowBodyTraining, AiToolkitTrainingParams, AiToolkitTrainingParamsBase, AiToolkitPlainEcosystem, AiToolkitLrScheduler, AiToolkitOptimizerType, BlockTrainingQuote, BlockTrainingDatasetItem, BlockTrainingDataImage, BlockTrainingDataUploadResult, BlockRunTrainingHostError, BlockStepQuote, BlockModel3dOutput, BlockRunConfirmedStepHostError, } from './types.js';
|
|
120
92
|
/**
|
|
121
93
|
* Host bounds for an inline `customComfy` graph, mirrored from civitai/civitai —
|
|
122
94
|
* see `WorkflowBodyCustomComfyInline.workflow`.
|
|
@@ -129,6 +101,14 @@ export { BLOCK_INLINE_COMFY_MAX_NODES, BLOCK_INLINE_COMFY_MAX_GRAPH_BYTES } from
|
|
|
129
101
|
*/
|
|
130
102
|
export { checkComfyGraph } from './comfyGraph.js';
|
|
131
103
|
export type { ComfyGraphCheck, ComfyGraphRefusal, ComfyModelFilenameInput } from './comfyGraph.js';
|
|
104
|
+
/**
|
|
105
|
+
* Sampler options per model family, from the platform's own generator source
|
|
106
|
+
* (`GET /api/v1/blocks/generation-samplers`). An unknown family is reported as
|
|
107
|
+
* unknown, never as "no sampler"; a platform without the route throws
|
|
108
|
+
* `unsupported-platform`.
|
|
109
|
+
*/
|
|
110
|
+
export { GENERATION_SAMPLERS_API_PATH, GenerationSamplersError, fetchGenerationSamplers, parseGenerationSamplers, resolveGenerationSampler, } from './generationSamplers.js';
|
|
111
|
+
export type { FetchGenerationSamplersOptions, GenerationSamplerCatalog, GenerationSamplerFamily, GenerationSamplerField, GenerationSamplerLookup, GenerationSamplerLookupInput, GenerationSamplerOption, GenerationSamplersErrorCode, GenerationSamplerUnknownReason, } from './generationSamplers.js';
|
|
132
112
|
/** Host bound for the App Blocks `kind: 'workflow'` body — see `WorkflowBodyWorkflow`. */
|
|
133
113
|
export { BLOCK_WORKFLOW_MAX_STEPS, BLOCK_WORKFLOW_REPEAT_MAX_ITERATIONS } from './types.js';
|
|
134
114
|
/**
|
package/dist/blocks/index.js
CHANGED
|
@@ -30,7 +30,13 @@ export { installSafeStorage, createMemoryStorage } from '../safe-storage/index.j
|
|
|
30
30
|
export { BlockManifestError } from './manifestError.js';
|
|
31
31
|
export { BLOCK_SCOPES, BLOCK_SCOPE_PATTERN, BLOCK_CATEGORIES, BLOCK_TAGLINE_MAX_LENGTH, } from './scopes.js';
|
|
32
32
|
export { BrowsingLevel, SFW_LEVELS, NSFW_LEVELS, isSfwCeiling, isLevelAllowed, effectiveBrowsingCeiling, } from './browsingLevel.js';
|
|
33
|
-
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated Seven leftovers of the removed legacy key-value store, kept only
|
|
35
|
+
* because published `@civitai/blocks-react` up to 0.80.x imports them at module
|
|
36
|
+
* load. See `legacyStoreCompat.ts`. Use `app.storage.collection(name)` in
|
|
37
|
+
* `@civitai/sdk`.
|
|
38
|
+
*/
|
|
39
|
+
export { APP_STORAGE_MAX_VALUE_BYTES, APP_STORAGE_MAX_BYTES, APP_STORAGE_MAX_ROWS, APP_STORAGE_ERROR_VALUE_TOO_LARGE, APP_STORAGE_ERROR_USER_QUOTA_EXCEEDED, APP_STORAGE_ERROR_USER_ROW_LIMIT, APP_STORAGE_ERROR_REQUEST_FAILED, } from './legacyStoreCompat.js';
|
|
34
40
|
/**
|
|
35
41
|
* App reactions (`SET_ENTITY_REACTION` / `GET_ENTITY_REACTIONS`, scope
|
|
36
42
|
* `social:react:self`). The vocabulary mirrors civitai's
|
|
@@ -45,7 +51,6 @@ export { BLOCK_IDEMPOTENCY_KEY_REGEX, BLOCK_IDEMPOTENCY_KEY_MAX_LENGTH, isValidB
|
|
|
45
51
|
* the limits live in ONE place: the header of `nestedDocument.ts`.
|
|
46
52
|
*
|
|
47
53
|
* 🔴 `injectBaseHref` and `InjectBaseHrefResult` ARE DELIBERATELY NOT HERE, and
|
|
48
|
-
* the omission is the same decision as the `appStorageErrors.ts` block below:
|
|
49
54
|
* publish the branching surface, not every internal the module happens to
|
|
50
55
|
* export. `fetchNestedDocument` covers every runnable example in this repo's
|
|
51
56
|
* four prose surfaces (this package's README, `@civitai/blocks-react`'s README,
|
|
@@ -68,38 +73,6 @@ export { BLOCK_IDEMPOTENCY_KEY_REGEX, BLOCK_IDEMPOTENCY_KEY_MAX_LENGTH, isValidB
|
|
|
68
73
|
* published is not.
|
|
69
74
|
*/
|
|
70
75
|
export { fetchNestedDocument, NestedDocumentError } from './nestedDocument.js';
|
|
71
|
-
/**
|
|
72
|
-
* {@link classifyAppStorageError} — the matcher a block branches on — plus the
|
|
73
|
-
* four rejection messages a MOCK HOST has to emit. The wire carries a
|
|
74
|
-
* host-authored message, never the TRPC code; see `appStorageErrors.ts` for the
|
|
75
|
-
* measurement, and #343 for the bug it closes.
|
|
76
|
-
*
|
|
77
|
-
* 🔴 **THE PUBLIC BRANCHING SURFACE IS THE REASON, NOT THE STRING.** A block
|
|
78
|
-
* switches on {@link AppStorageRejectionReason}; it never needs to hold a host
|
|
79
|
-
* message. So this barrel deliberately exports LESS than
|
|
80
|
-
* `appStorageErrors.ts` does, and the omissions are each a decision:
|
|
81
|
-
*
|
|
82
|
-
* - `APP_STORAGE_HOST_ERROR_MESSAGES` — the frozen array. Publishing it invites
|
|
83
|
-
* `MESSAGES.includes(err.message)`, which is EQUALITY against a snapshot and
|
|
84
|
-
* stops matching the day the host moves its per-value cap. That is the
|
|
85
|
-
* matcher shape #343 exists to eliminate; `classifyAppStorageError` is
|
|
86
|
-
* strictly wider (see its note on the per-value FAMILY).
|
|
87
|
-
* - `isAppStorageHostErrorMessage` — a thin `classifyAppStorageError(…) !==
|
|
88
|
-
* null`. Its only caller is `tests/guards/app-storage-error-strings.test.mjs`,
|
|
89
|
-
* which imports the module by FILE PATH.
|
|
90
|
-
* - `APP_STORAGE_ERROR_APP_QUOTA_EXCEEDED` / `_APP_ROW_LIMIT` — the app-wide
|
|
91
|
-
* umbrella pair. No mock in this repository can emit them (nothing models the
|
|
92
|
-
* umbrella), and a block reaches them through the `'app-quota-exceeded'` /
|
|
93
|
-
* `'app-row-limit'` reasons, which ARE exported.
|
|
94
|
-
* - `appStorageValueTooLargeMessage` — the builder, so a test can prove the
|
|
95
|
-
* per-value string is DERIVED from `APP_STORAGE_MAX_VALUE_BYTES` rather than
|
|
96
|
-
* hardcoded.
|
|
97
|
-
*
|
|
98
|
-
* All five stay exported from `appStorageErrors.ts` itself, so a test or a
|
|
99
|
-
* guard reaches them by path. Adding one here later is a `minor`; removing one
|
|
100
|
-
* once published is not.
|
|
101
|
-
*/
|
|
102
|
-
export { APP_STORAGE_ERROR_VALUE_TOO_LARGE, APP_STORAGE_ERROR_USER_QUOTA_EXCEEDED, APP_STORAGE_ERROR_USER_ROW_LIMIT, APP_STORAGE_ERROR_REQUEST_FAILED, classifyAppStorageError, } from './appStorageErrors.js';
|
|
103
76
|
export { BLOCK_INIT_FRAGMENT_MARKER_KEY, BLOCK_INIT_FRAGMENT_VERSION, BLOCK_INIT_FRAGMENT_KEYS, encodeBlockInitFragment, parseBlockInitFragment, stripBlockInitFragment, } from './initFragment.js';
|
|
104
77
|
export { isMessage, BLOCK_TO_PARENT_MESSAGE_TYPES, OTHER_MESSAGE_TYPE_LABEL, boundBlockToParentMessageType, } from './messages.js';
|
|
105
78
|
/**
|
|
@@ -125,6 +98,13 @@ export { BLOCK_INLINE_COMFY_MAX_NODES, BLOCK_INLINE_COMFY_MAX_GRAPH_BYTES } from
|
|
|
125
98
|
* A Comfy estimate is a ceiling, never a price.
|
|
126
99
|
*/
|
|
127
100
|
export { checkComfyGraph } from './comfyGraph.js';
|
|
101
|
+
/**
|
|
102
|
+
* Sampler options per model family, from the platform's own generator source
|
|
103
|
+
* (`GET /api/v1/blocks/generation-samplers`). An unknown family is reported as
|
|
104
|
+
* unknown, never as "no sampler"; a platform without the route throws
|
|
105
|
+
* `unsupported-platform`.
|
|
106
|
+
*/
|
|
107
|
+
export { GENERATION_SAMPLERS_API_PATH, GenerationSamplersError, fetchGenerationSamplers, parseGenerationSamplers, resolveGenerationSampler, } from './generationSamplers.js';
|
|
128
108
|
/** Host bound for the App Blocks `kind: 'workflow'` body — see `WorkflowBodyWorkflow`. */
|
|
129
109
|
export { BLOCK_WORKFLOW_MAX_STEPS, BLOCK_WORKFLOW_REPEAT_MAX_ITERATIONS } from './types.js';
|
|
130
110
|
/**
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The last seven exports of the removed legacy key-value store.
|
|
3
|
+
*
|
|
4
|
+
* civitai.com refuses every legacy-store call since 2026-11-10 (HTTP 410,
|
|
5
|
+
* `legacy_store_removed`), and `@civitai/blocks-react` removed `useAppStorage()`
|
|
6
|
+
* and `useSharedStorage()` in the release after 0.80.x. Use the document store
|
|
7
|
+
* instead: `app.storage.collection(name)` in `@civitai/sdk`.
|
|
8
|
+
*
|
|
9
|
+
* 🔴 **Why these seven are still exported, when nothing in this repository
|
|
10
|
+
* reads them.** Published `@civitai/blocks-react` releases value-import these
|
|
11
|
+
* names from `@civitai/app-sdk/blocks` at module load, in
|
|
12
|
+
* `dist/internal/mockHost.js` (all seven in the `0.80.1` tarball, measured
|
|
13
|
+
* 2026-11-14; `PEER_FLOOR.md` records them arriving in 0.47.0 and 0.49.0).
|
|
14
|
+
* `0.80.1` declares the peer range `>=0.57.0 <1.0.0`, so it accepts this
|
|
15
|
+
* release. Deleting a name would make `@civitai/blocks-react/testing`
|
|
16
|
+
* fail to load with `SyntaxError: ... does not provide an export named ...` for
|
|
17
|
+
* anyone who upgrades app-sdk before blocks-react. That stops every one of their
|
|
18
|
+
* test files from loading (the #344 failure).
|
|
19
|
+
*
|
|
20
|
+
* **When to remove them:** in app-sdk `1.0.0`. Every published blocks-react
|
|
21
|
+
* that imports them (0.54.0 onward) caps its app-sdk peer range below `1.0.0`
|
|
22
|
+
* (read from the registry, 2026-11-14), so none of them can be installed next
|
|
23
|
+
* to it.
|
|
24
|
+
*
|
|
25
|
+
* The values are the ones the host used; they describe a store that no longer
|
|
26
|
+
* exists. Do not build anything on them.
|
|
27
|
+
*/
|
|
28
|
+
/** @deprecated The legacy store was removed. Use `app.storage.collection(name)` in `@civitai/sdk`. */
|
|
29
|
+
export declare const APP_STORAGE_MAX_VALUE_BYTES: number;
|
|
30
|
+
/** @deprecated The legacy store was removed. Use `app.storage.collection(name)` in `@civitai/sdk`. */
|
|
31
|
+
export declare const APP_STORAGE_MAX_BYTES: number;
|
|
32
|
+
/** @deprecated The legacy store was removed. Use `app.storage.collection(name)` in `@civitai/sdk`. */
|
|
33
|
+
export declare const APP_STORAGE_MAX_ROWS = 1000;
|
|
34
|
+
/** @deprecated The legacy store was removed. Use `app.storage.collection(name)` in `@civitai/sdk`. */
|
|
35
|
+
export declare const APP_STORAGE_ERROR_VALUE_TOO_LARGE = "value exceeds 64KB cap";
|
|
36
|
+
/** @deprecated The legacy store was removed. Use `app.storage.collection(name)` in `@civitai/sdk`. */
|
|
37
|
+
export declare const APP_STORAGE_ERROR_USER_QUOTA_EXCEEDED = "per-user storage quota exceeded";
|
|
38
|
+
/** @deprecated The legacy store was removed. Use `app.storage.collection(name)` in `@civitai/sdk`. */
|
|
39
|
+
export declare const APP_STORAGE_ERROR_USER_ROW_LIMIT = "per-user row limit exceeded";
|
|
40
|
+
/** @deprecated The legacy store was removed. Use `app.storage.collection(name)` in `@civitai/sdk`. */
|
|
41
|
+
export declare const APP_STORAGE_ERROR_REQUEST_FAILED = "storage request failed";
|
|
42
|
+
//# sourceMappingURL=legacyStoreCompat.d.ts.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The last seven exports of the removed legacy key-value store.
|
|
3
|
+
*
|
|
4
|
+
* civitai.com refuses every legacy-store call since 2026-11-10 (HTTP 410,
|
|
5
|
+
* `legacy_store_removed`), and `@civitai/blocks-react` removed `useAppStorage()`
|
|
6
|
+
* and `useSharedStorage()` in the release after 0.80.x. Use the document store
|
|
7
|
+
* instead: `app.storage.collection(name)` in `@civitai/sdk`.
|
|
8
|
+
*
|
|
9
|
+
* 🔴 **Why these seven are still exported, when nothing in this repository
|
|
10
|
+
* reads them.** Published `@civitai/blocks-react` releases value-import these
|
|
11
|
+
* names from `@civitai/app-sdk/blocks` at module load, in
|
|
12
|
+
* `dist/internal/mockHost.js` (all seven in the `0.80.1` tarball, measured
|
|
13
|
+
* 2026-11-14; `PEER_FLOOR.md` records them arriving in 0.47.0 and 0.49.0).
|
|
14
|
+
* `0.80.1` declares the peer range `>=0.57.0 <1.0.0`, so it accepts this
|
|
15
|
+
* release. Deleting a name would make `@civitai/blocks-react/testing`
|
|
16
|
+
* fail to load with `SyntaxError: ... does not provide an export named ...` for
|
|
17
|
+
* anyone who upgrades app-sdk before blocks-react. That stops every one of their
|
|
18
|
+
* test files from loading (the #344 failure).
|
|
19
|
+
*
|
|
20
|
+
* **When to remove them:** in app-sdk `1.0.0`. Every published blocks-react
|
|
21
|
+
* that imports them (0.54.0 onward) caps its app-sdk peer range below `1.0.0`
|
|
22
|
+
* (read from the registry, 2026-11-14), so none of them can be installed next
|
|
23
|
+
* to it.
|
|
24
|
+
*
|
|
25
|
+
* The values are the ones the host used; they describe a store that no longer
|
|
26
|
+
* exists. Do not build anything on them.
|
|
27
|
+
*/
|
|
28
|
+
/** @deprecated The legacy store was removed. Use `app.storage.collection(name)` in `@civitai/sdk`. */
|
|
29
|
+
export const APP_STORAGE_MAX_VALUE_BYTES = 64 * 1024;
|
|
30
|
+
/** @deprecated The legacy store was removed. Use `app.storage.collection(name)` in `@civitai/sdk`. */
|
|
31
|
+
export const APP_STORAGE_MAX_BYTES = 2 * 1024 * 1024;
|
|
32
|
+
/** @deprecated The legacy store was removed. Use `app.storage.collection(name)` in `@civitai/sdk`. */
|
|
33
|
+
export const APP_STORAGE_MAX_ROWS = 1_000;
|
|
34
|
+
/** @deprecated The legacy store was removed. Use `app.storage.collection(name)` in `@civitai/sdk`. */
|
|
35
|
+
export const APP_STORAGE_ERROR_VALUE_TOO_LARGE = `value exceeds ${APP_STORAGE_MAX_VALUE_BYTES / 1024}KB cap`;
|
|
36
|
+
/** @deprecated The legacy store was removed. Use `app.storage.collection(name)` in `@civitai/sdk`. */
|
|
37
|
+
export const APP_STORAGE_ERROR_USER_QUOTA_EXCEEDED = 'per-user storage quota exceeded';
|
|
38
|
+
/** @deprecated The legacy store was removed. Use `app.storage.collection(name)` in `@civitai/sdk`. */
|
|
39
|
+
export const APP_STORAGE_ERROR_USER_ROW_LIMIT = 'per-user row limit exceeded';
|
|
40
|
+
/** @deprecated The legacy store was removed. Use `app.storage.collection(name)` in `@civitai/sdk`. */
|
|
41
|
+
export const APP_STORAGE_ERROR_REQUEST_FAILED = 'storage request failed';
|
|
42
|
+
//# sourceMappingURL=legacyStoreCompat.js.map
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* Wire format: `window.postMessage({ type, payload }, targetOrigin)`.
|
|
9
9
|
*/
|
|
10
10
|
import type { ColorDomain } from './browsingLevel.js';
|
|
11
|
-
import type { BlockCheckpointInfo, BlockResourceInfo, BlockResourcePickerType, BlockUploadedImageInfo, BlockGenerationSourceImageInfo, BlockImagePickerSource, BlockPickedImageInfo, BlockMediaKind, BlockMediaUploadInfo, BlockPendingImageInfo, BlockImageScanResult, BlockUploadPurpose, BlockNavigateScope, BlockContext, BlockSettings, Theme, ViewerInfo, WorkflowBody, BlockWorkflowSnapshot, BlockEstimateBatchAggregate, BlockBuzzTransaction, BlockBuzzAccount, BlockDailyCompensationResource, BlockViewer, BlockWildcardPack, BlockWildcardPackErrorCode, BlockResourceFile, BlockResourceFileErrorCode, AppWorkflow, BlockGatedImage, BlockCollectionFollowErrorCode, BlockCollectionFollowResult, BlockPostSource, BlockCreatePostResult, BlockTrainingDataUploadResult, WorkflowBodyTraining, WorkflowBodyPassThroughStep } from './types.js';
|
|
11
|
+
import type { BlockCheckpointInfo, BlockResourceInfo, BlockResourcePickerType, BlockUploadedImageInfo, BlockGenerationSourceImageInfo, BlockPersistedGenerationSource, BlockImagePickerSource, BlockPickedImageInfo, BlockMediaKind, BlockMediaUploadInfo, BlockMediaUploadBatchItemResult, BlockPendingImageInfo, BlockImageScanResult, BlockUploadPurpose, BlockNavigateScope, BlockContext, BlockSettings, Theme, ViewerInfo, WorkflowBody, BlockWorkflowSnapshot, BlockEstimateBatchAggregate, BlockBuzzTransaction, BlockBuzzAccount, BlockDailyCompensationResource, BlockViewer, BlockWildcardPack, BlockWildcardPackErrorCode, BlockResourceFile, BlockResourceFileErrorCode, AppWorkflow, BlockGatedImage, BlockCollectionFollowErrorCode, BlockCollectionFollowResult, BlockPostSource, BlockCreatePostResult, BlockTrainingDataUploadResult, WorkflowBodyTraining, WorkflowBodyPassThroughStep } from './types.js';
|
|
12
12
|
import type { BlockAppReaction, BlockEntityReactionErrorCode, BlockEntityReactionResult, BlockEntityReactionsResult, BlockReactionEntityType } from './reactions.js';
|
|
13
13
|
/**
|
|
14
14
|
* Filter params for `GET_BUZZ_TRANSACTIONS`. All optional; the host validates
|
|
@@ -234,74 +234,6 @@ export interface BlockInitPayload {
|
|
|
234
234
|
*/
|
|
235
235
|
storageMode?: 'local-preview';
|
|
236
236
|
}
|
|
237
|
-
/**
|
|
238
|
-
* The freeform value carried by one SHARED-storage entry. Unlike the per-user
|
|
239
|
-
* `APP_STORAGE_*` KV (arbitrary JSON), the SHARED store is a structured,
|
|
240
|
-
* append-only, community-votable list — every entry is a `{ title, body? }`
|
|
241
|
-
* record contributed by one viewer and vote-counted across all viewers. `title`
|
|
242
|
-
* is required; `body` is optional long-form.
|
|
243
|
-
*/
|
|
244
|
-
export interface SharedStorageValue {
|
|
245
|
-
title: string;
|
|
246
|
-
body?: string;
|
|
247
|
-
/**
|
|
248
|
-
* Optional, opaque, app-owned structured payload stored alongside the
|
|
249
|
-
* moderated `title`/`body`. Mirrors civitai's merged shared-storage `data`
|
|
250
|
-
* jsonb (`appendValueInput.data`). UNMODERATED — the content-safety belt runs
|
|
251
|
-
* on `title`/`body` only, so apps MUST keep ALL user-visible TEXT in
|
|
252
|
-
* `title`/`body` and place ONLY opaque app structure here (e.g. a serialized
|
|
253
|
-
* generator spec / settings blob). Counts toward the per-value byte cap + the
|
|
254
|
-
* per-app quota. Omit when the entry carries no structured payload.
|
|
255
|
-
*/
|
|
256
|
-
data?: unknown;
|
|
257
|
-
}
|
|
258
|
-
/**
|
|
259
|
-
* Retry metadata on a RATE-LIMITED shared-storage refusal. The host adds it
|
|
260
|
-
* beside `error` on the six write replies (`SHARED_APPEND_RESULT`,
|
|
261
|
-
* `SHARED_UPDATE_RESULT`, `SHARED_VOTE_RESULT`, `SHARED_UNVOTE_RESULT`,
|
|
262
|
-
* `SHARED_WITHDRAW_RESULT`, `SHARED_REPORT_RESULT`) when the server refused the
|
|
263
|
-
* write because a per-(viewer, app) budget is empty, so a block can render the
|
|
264
|
-
* wait instead of parsing it out of the prose `error`.
|
|
265
|
-
*
|
|
266
|
-
* Its PRESENCE marks the refusal as rate-limited; every other refusal omits it.
|
|
267
|
-
* ADDITIVE + OPTIONAL: a host that predates it never sends it, so a block must
|
|
268
|
-
* treat "absent" as "not known to be rate-limited", never as "retry now".
|
|
269
|
-
*
|
|
270
|
-
* Same shape as the platform's tRPC `error.data.rateLimit` and the REST 429
|
|
271
|
-
* body's `rateLimit` (which also comes with a `Retry-After` header).
|
|
272
|
-
*/
|
|
273
|
-
export interface SharedStorageRateLimit {
|
|
274
|
-
/** Whole seconds until a retry can succeed. An integer, at least 1. */
|
|
275
|
-
retryAfterSeconds: number;
|
|
276
|
-
/** ISO-8601 instant at which a retry can succeed. */
|
|
277
|
-
retryAt: string;
|
|
278
|
-
}
|
|
279
|
-
/**
|
|
280
|
-
* One SHARED-storage entry as it appears on the wire in `SHARED_LIST_RESULT`.
|
|
281
|
-
* `createdAt`/`updatedAt` are ISO-8601 strings; the block-side hook rehydrates
|
|
282
|
-
* them to `Date` (mirrors `APP_STORAGE_LIST_RESULT`'s `updatedAt`). `count` is
|
|
283
|
-
* the current vote total; `authorUserId` is the contributing viewer.
|
|
284
|
-
*/
|
|
285
|
-
export interface SharedStorageItemWire {
|
|
286
|
-
key: string;
|
|
287
|
-
authorUserId: number;
|
|
288
|
-
value: SharedStorageValue;
|
|
289
|
-
count: number;
|
|
290
|
-
/** ISO-8601; consumers rehydrate to Date. */
|
|
291
|
-
createdAt: string;
|
|
292
|
-
/** ISO-8601; consumers rehydrate to Date. */
|
|
293
|
-
updatedAt: string;
|
|
294
|
-
/**
|
|
295
|
-
* Whether the REQUESTING viewer has an active up-vote on this entry. Lets a
|
|
296
|
-
* block hydrate its vote-button state on load instead of guessing (fixes the
|
|
297
|
-
* "double-click to unvote" bug). ADDITIVE + OPTIONAL: a host that predates
|
|
298
|
-
* this field omits it — the block-side hook defaults a missing value to
|
|
299
|
-
* `false`, so a new block on an old host degrades to today's behavior. An
|
|
300
|
-
* anonymous viewer is always `false` (no per-viewer vote row). Resolved
|
|
301
|
-
* server-side per viewer; never client-trusted.
|
|
302
|
-
*/
|
|
303
|
-
viewerVoted?: boolean;
|
|
304
|
-
}
|
|
305
237
|
/**
|
|
306
238
|
* Why a `CONSENT_UNAVAILABLE` push was sent.
|
|
307
239
|
*
|
|
@@ -510,6 +442,13 @@ export type ParentToBlockMessage = {
|
|
|
510
442
|
};
|
|
511
443
|
error?: string;
|
|
512
444
|
};
|
|
445
|
+
} | {
|
|
446
|
+
type: 'GENERATION_SOURCE_PERSISTED';
|
|
447
|
+
payload: {
|
|
448
|
+
requestId: string;
|
|
449
|
+
result?: BlockPersistedGenerationSource;
|
|
450
|
+
error?: string;
|
|
451
|
+
};
|
|
513
452
|
} | {
|
|
514
453
|
type: 'CREATE_POST_RESULT';
|
|
515
454
|
payload: {
|
|
@@ -615,133 +554,19 @@ export type ParentToBlockMessage = {
|
|
|
615
554
|
error?: string;
|
|
616
555
|
};
|
|
617
556
|
} | {
|
|
618
|
-
type: '
|
|
619
|
-
payload: {
|
|
620
|
-
requestId: string;
|
|
621
|
-
ok?: boolean;
|
|
622
|
-
error?: string;
|
|
623
|
-
};
|
|
624
|
-
} | {
|
|
625
|
-
type: 'APP_STORAGE_GET_RESULT';
|
|
626
|
-
payload: {
|
|
627
|
-
requestId: string;
|
|
628
|
-
value: unknown;
|
|
629
|
-
error?: string;
|
|
630
|
-
};
|
|
631
|
-
} | {
|
|
632
|
-
type: 'APP_STORAGE_SET_RESULT';
|
|
633
|
-
payload: {
|
|
634
|
-
requestId: string;
|
|
635
|
-
ok?: boolean;
|
|
636
|
-
error?: string;
|
|
637
|
-
sizeBytes?: number;
|
|
638
|
-
};
|
|
639
|
-
} | {
|
|
640
|
-
type: 'APP_STORAGE_DELETE_RESULT';
|
|
641
|
-
payload: {
|
|
642
|
-
requestId: string;
|
|
643
|
-
ok?: boolean;
|
|
644
|
-
deleted?: boolean;
|
|
645
|
-
error?: string;
|
|
646
|
-
};
|
|
647
|
-
} | {
|
|
648
|
-
type: 'APP_STORAGE_LIST_RESULT';
|
|
649
|
-
payload: {
|
|
650
|
-
requestId: string;
|
|
651
|
-
keys: Array<{
|
|
652
|
-
key: string;
|
|
653
|
-
updatedAt: string;
|
|
654
|
-
}>;
|
|
655
|
-
nextCursor?: string;
|
|
656
|
-
error?: string;
|
|
657
|
-
};
|
|
658
|
-
} | {
|
|
659
|
-
type: 'APP_STORAGE_QUOTA_RESULT';
|
|
660
|
-
payload: {
|
|
661
|
-
requestId: string;
|
|
662
|
-
usedBytes: number;
|
|
663
|
-
rowCount: number;
|
|
664
|
-
limitBytes: number;
|
|
665
|
-
limitRows: number;
|
|
666
|
-
error?: string;
|
|
667
|
-
};
|
|
668
|
-
} | {
|
|
669
|
-
type: 'SHARED_LIST_RESULT';
|
|
670
|
-
payload: {
|
|
671
|
-
requestId: string;
|
|
672
|
-
items: SharedStorageItemWire[];
|
|
673
|
-
nextCursor?: string;
|
|
674
|
-
error?: string;
|
|
675
|
-
};
|
|
676
|
-
} | {
|
|
677
|
-
type: 'SHARED_GET_COUNT_RESULT';
|
|
678
|
-
payload: {
|
|
679
|
-
requestId: string;
|
|
680
|
-
count: number;
|
|
681
|
-
error?: string;
|
|
682
|
-
};
|
|
683
|
-
} | {
|
|
684
|
-
type: 'SHARED_GET_COUNTS_RESULT';
|
|
685
|
-
payload: {
|
|
686
|
-
requestId: string;
|
|
687
|
-
counts: Record<string, number>;
|
|
688
|
-
error?: string;
|
|
689
|
-
};
|
|
690
|
-
} | {
|
|
691
|
-
type: 'SHARED_APPEND_RESULT';
|
|
692
|
-
payload: {
|
|
693
|
-
requestId: string;
|
|
694
|
-
key: string;
|
|
695
|
-
error?: string;
|
|
696
|
-
rateLimit?: SharedStorageRateLimit;
|
|
697
|
-
};
|
|
698
|
-
} | {
|
|
699
|
-
type: 'SHARED_VOTE_RESULT';
|
|
700
|
-
payload: {
|
|
701
|
-
requestId: string;
|
|
702
|
-
count: number;
|
|
703
|
-
error?: string;
|
|
704
|
-
rateLimit?: SharedStorageRateLimit;
|
|
705
|
-
};
|
|
706
|
-
} | {
|
|
707
|
-
type: 'SHARED_UNVOTE_RESULT';
|
|
708
|
-
payload: {
|
|
709
|
-
requestId: string;
|
|
710
|
-
count: number;
|
|
711
|
-
error?: string;
|
|
712
|
-
rateLimit?: SharedStorageRateLimit;
|
|
713
|
-
};
|
|
714
|
-
} | {
|
|
715
|
-
type: 'SHARED_WITHDRAW_RESULT';
|
|
716
|
-
payload: {
|
|
717
|
-
requestId: string;
|
|
718
|
-
ok?: boolean;
|
|
719
|
-
deleted?: boolean;
|
|
720
|
-
error?: string;
|
|
721
|
-
rateLimit?: SharedStorageRateLimit;
|
|
722
|
-
};
|
|
723
|
-
} | {
|
|
724
|
-
type: 'SHARED_UPDATE_RESULT';
|
|
725
|
-
payload: {
|
|
726
|
-
requestId: string;
|
|
727
|
-
ok?: boolean;
|
|
728
|
-
error?: string;
|
|
729
|
-
rateLimit?: SharedStorageRateLimit;
|
|
730
|
-
};
|
|
731
|
-
} | {
|
|
732
|
-
type: 'SHARED_GET_RESULT';
|
|
557
|
+
type: 'MEDIA_UPLOAD_BATCH_RESULT';
|
|
733
558
|
payload: {
|
|
734
559
|
requestId: string;
|
|
735
|
-
item: SharedStorageItemWire | null;
|
|
736
560
|
error?: string;
|
|
561
|
+
results?: BlockMediaUploadBatchItemResult[];
|
|
562
|
+
expiresAt?: string;
|
|
737
563
|
};
|
|
738
564
|
} | {
|
|
739
|
-
type: '
|
|
565
|
+
type: 'USER_CHECKPOINT_SET';
|
|
740
566
|
payload: {
|
|
741
567
|
requestId: string;
|
|
742
568
|
ok?: boolean;
|
|
743
569
|
error?: string;
|
|
744
|
-
rateLimit?: SharedStorageRateLimit;
|
|
745
570
|
};
|
|
746
571
|
} | {
|
|
747
572
|
type: 'SAVE_IMAGE_RESULT';
|
|
@@ -882,6 +707,13 @@ export type BlockToParentMessage = {
|
|
|
882
707
|
imageIndexes?: number[];
|
|
883
708
|
title?: string;
|
|
884
709
|
};
|
|
710
|
+
} | {
|
|
711
|
+
type: 'PERSIST_GENERATION_SOURCE';
|
|
712
|
+
payload: {
|
|
713
|
+
requestId: string;
|
|
714
|
+
workflowId: string;
|
|
715
|
+
imageIndex: number;
|
|
716
|
+
};
|
|
885
717
|
} | {
|
|
886
718
|
type: 'CREATE_POST_FROM_APP';
|
|
887
719
|
payload: {
|
|
@@ -1009,6 +841,22 @@ export type BlockToParentMessage = {
|
|
|
1009
841
|
/** Bytes mode only: the type the app believes it is sending; must match the content. */
|
|
1010
842
|
mimeType?: string;
|
|
1011
843
|
};
|
|
844
|
+
} | {
|
|
845
|
+
type: 'OPEN_MEDIA_UPLOAD_BATCH';
|
|
846
|
+
payload: {
|
|
847
|
+
requestId: string;
|
|
848
|
+
/** Required. The only accepted value today. */
|
|
849
|
+
purpose: 'generationSource';
|
|
850
|
+
/** 1 to 1200 files, answered in this order. */
|
|
851
|
+
items: Array<{
|
|
852
|
+
/** What the bytes are. An unknown value is refused for that item. */
|
|
853
|
+
kind: BlockMediaKind;
|
|
854
|
+
/** The file. A typed-array view or an empty buffer is refused for that item. */
|
|
855
|
+
bytes: ArrayBuffer;
|
|
856
|
+
/** Optional: the type the app believes it is sending; must match the content. */
|
|
857
|
+
mimeType?: string;
|
|
858
|
+
}>;
|
|
859
|
+
};
|
|
1012
860
|
} | {
|
|
1013
861
|
type: 'SET_USER_CHECKPOINT';
|
|
1014
862
|
payload: {
|
|
@@ -1039,102 +887,6 @@ export type BlockToParentMessage = {
|
|
|
1039
887
|
eventName: string;
|
|
1040
888
|
properties?: Record<string, unknown>;
|
|
1041
889
|
};
|
|
1042
|
-
} | {
|
|
1043
|
-
type: 'APP_STORAGE_GET';
|
|
1044
|
-
payload: {
|
|
1045
|
-
requestId: string;
|
|
1046
|
-
key: string;
|
|
1047
|
-
};
|
|
1048
|
-
} | {
|
|
1049
|
-
type: 'APP_STORAGE_SET';
|
|
1050
|
-
payload: {
|
|
1051
|
-
requestId: string;
|
|
1052
|
-
key: string;
|
|
1053
|
-
value: unknown;
|
|
1054
|
-
};
|
|
1055
|
-
} | {
|
|
1056
|
-
type: 'APP_STORAGE_DELETE';
|
|
1057
|
-
payload: {
|
|
1058
|
-
requestId: string;
|
|
1059
|
-
key: string;
|
|
1060
|
-
};
|
|
1061
|
-
} | {
|
|
1062
|
-
type: 'APP_STORAGE_LIST';
|
|
1063
|
-
payload: {
|
|
1064
|
-
requestId: string;
|
|
1065
|
-
prefix?: string;
|
|
1066
|
-
limit?: number;
|
|
1067
|
-
cursor?: string;
|
|
1068
|
-
};
|
|
1069
|
-
} | {
|
|
1070
|
-
type: 'APP_STORAGE_QUOTA';
|
|
1071
|
-
payload: {
|
|
1072
|
-
requestId: string;
|
|
1073
|
-
};
|
|
1074
|
-
} | {
|
|
1075
|
-
type: 'SHARED_LIST';
|
|
1076
|
-
payload: {
|
|
1077
|
-
requestId: string;
|
|
1078
|
-
prefix?: string;
|
|
1079
|
-
limit?: number;
|
|
1080
|
-
cursor?: string;
|
|
1081
|
-
};
|
|
1082
|
-
} | {
|
|
1083
|
-
type: 'SHARED_GET_COUNT';
|
|
1084
|
-
payload: {
|
|
1085
|
-
requestId: string;
|
|
1086
|
-
key: string;
|
|
1087
|
-
};
|
|
1088
|
-
} | {
|
|
1089
|
-
type: 'SHARED_GET_COUNTS';
|
|
1090
|
-
payload: {
|
|
1091
|
-
requestId: string;
|
|
1092
|
-
keys: string[];
|
|
1093
|
-
};
|
|
1094
|
-
} | {
|
|
1095
|
-
type: 'SHARED_APPEND';
|
|
1096
|
-
payload: {
|
|
1097
|
-
requestId: string;
|
|
1098
|
-
value: SharedStorageValue;
|
|
1099
|
-
};
|
|
1100
|
-
} | {
|
|
1101
|
-
type: 'SHARED_VOTE';
|
|
1102
|
-
payload: {
|
|
1103
|
-
requestId: string;
|
|
1104
|
-
key: string;
|
|
1105
|
-
};
|
|
1106
|
-
} | {
|
|
1107
|
-
type: 'SHARED_UNVOTE';
|
|
1108
|
-
payload: {
|
|
1109
|
-
requestId: string;
|
|
1110
|
-
key: string;
|
|
1111
|
-
};
|
|
1112
|
-
} | {
|
|
1113
|
-
type: 'SHARED_WITHDRAW';
|
|
1114
|
-
payload: {
|
|
1115
|
-
requestId: string;
|
|
1116
|
-
key: string;
|
|
1117
|
-
};
|
|
1118
|
-
} | {
|
|
1119
|
-
type: 'SHARED_UPDATE';
|
|
1120
|
-
payload: {
|
|
1121
|
-
requestId: string;
|
|
1122
|
-
key: string;
|
|
1123
|
-
value: SharedStorageValue;
|
|
1124
|
-
};
|
|
1125
|
-
} | {
|
|
1126
|
-
type: 'SHARED_GET';
|
|
1127
|
-
payload: {
|
|
1128
|
-
requestId: string;
|
|
1129
|
-
key: string;
|
|
1130
|
-
};
|
|
1131
|
-
} | {
|
|
1132
|
-
type: 'SHARED_REPORT';
|
|
1133
|
-
payload: {
|
|
1134
|
-
requestId: string;
|
|
1135
|
-
key: string;
|
|
1136
|
-
reason?: string;
|
|
1137
|
-
};
|
|
1138
890
|
} | {
|
|
1139
891
|
type: 'SAVE_IMAGE';
|
|
1140
892
|
payload: {
|
|
@@ -1231,7 +983,7 @@ export type BlockToParentMessageType = BlockToParentMessage['type'];
|
|
|
1231
983
|
* it is a measurement, not an invariant, and civitai's own compile-time gate
|
|
1232
984
|
* (published SDK union ⊆ `keyof INVENTORY`) is what holds one direction of it.
|
|
1233
985
|
*/
|
|
1234
|
-
export declare const BLOCK_TO_PARENT_MESSAGE_TYPES: readonly ["BLOCK_HELLO", "BLOCK_READY", "BLOCK_ERROR", "BLOCK_MESSAGE_REJECTED", "REQUEST_TOKEN", "RESIZE_IFRAME", "SUBMIT_WORKFLOW", "ESTIMATE_WORKFLOW", "ESTIMATE_WORKFLOW_BATCH", "POLL_WORKFLOW", "CANCEL_WORKFLOW", "OPEN_BUZZ_PURCHASE", "GET_BUZZ_BALANCE", "GET_VIEWER", "GET_BUZZ_TRANSACTIONS", "GET_BUZZ_ACCOUNTS", "GET_DAILY_COMPENSATION", "GET_WILDCARD_PACK", "GET_RESOURCE_FILE", "QUERY_APP_WORKFLOWS", "PUBLISH_GENERATION_OUTPUTS", "CREATE_POST_FROM_APP", "RUN_TRAINING", "RUN_CONFIRMED_STEP", "GET_IMAGES_BY_IDS", "CANCEL_APP_WORKFLOW", "OPEN_CHECKPOINT_PICKER", "OPEN_RESOURCE_PICKER", "OPEN_IMAGE_UPLOAD", "OPEN_IMAGE_PICKER", "OPEN_MEDIA_UPLOAD", "SET_USER_CHECKPOINT", "NAVIGATE", "REQUEST_SIGN_IN", "REQUEST_CONSENT", "TRACK_EVENT", "
|
|
986
|
+
export declare const BLOCK_TO_PARENT_MESSAGE_TYPES: readonly ["BLOCK_HELLO", "BLOCK_READY", "BLOCK_ERROR", "BLOCK_MESSAGE_REJECTED", "REQUEST_TOKEN", "RESIZE_IFRAME", "SUBMIT_WORKFLOW", "ESTIMATE_WORKFLOW", "ESTIMATE_WORKFLOW_BATCH", "POLL_WORKFLOW", "CANCEL_WORKFLOW", "OPEN_BUZZ_PURCHASE", "GET_BUZZ_BALANCE", "GET_VIEWER", "GET_BUZZ_TRANSACTIONS", "GET_BUZZ_ACCOUNTS", "GET_DAILY_COMPENSATION", "GET_WILDCARD_PACK", "GET_RESOURCE_FILE", "QUERY_APP_WORKFLOWS", "PUBLISH_GENERATION_OUTPUTS", "PERSIST_GENERATION_SOURCE", "CREATE_POST_FROM_APP", "RUN_TRAINING", "RUN_CONFIRMED_STEP", "GET_IMAGES_BY_IDS", "CANCEL_APP_WORKFLOW", "OPEN_CHECKPOINT_PICKER", "OPEN_RESOURCE_PICKER", "OPEN_IMAGE_UPLOAD", "OPEN_IMAGE_PICKER", "OPEN_MEDIA_UPLOAD", "OPEN_MEDIA_UPLOAD_BATCH", "SET_USER_CHECKPOINT", "NAVIGATE", "REQUEST_SIGN_IN", "REQUEST_CONSENT", "TRACK_EVENT", "SAVE_IMAGE", "SET_COLLECTION_FOLLOW", "SET_ENTITY_REACTION", "GET_ENTITY_REACTIONS"];
|
|
1235
987
|
/**
|
|
1236
988
|
* The bucket a message type falls into when the protocol does not declare it.
|
|
1237
989
|
*
|