@crowi/api-contract 2.0.0-alpha.2 → 2.0.0-alpha.5
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/generated/openapi.d.mts +3 -3
- package/dist/generated/openapi.d.ts +3 -3
- package/dist/generated/openapi.js.map +1 -1
- package/dist/index.d.mts +28 -4
- package/dist/index.d.ts +28 -4
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -23033,6 +23033,7 @@ declare const AdminSidebarSection: z.ZodEnum<{
|
|
|
23033
23033
|
mail: "mail";
|
|
23034
23034
|
auth: "auth";
|
|
23035
23035
|
renderer: "renderer";
|
|
23036
|
+
platform: "platform";
|
|
23036
23037
|
}>;
|
|
23037
23038
|
type AdminSidebarSectionValue = z.infer<typeof AdminSidebarSection>;
|
|
23038
23039
|
declare const PluginAdminPlacementSchema: z.ZodObject<{
|
|
@@ -23045,6 +23046,7 @@ declare const PluginAdminPlacementSchema: z.ZodObject<{
|
|
|
23045
23046
|
mail: "mail";
|
|
23046
23047
|
auth: "auth";
|
|
23047
23048
|
renderer: "renderer";
|
|
23049
|
+
platform: "platform";
|
|
23048
23050
|
}>;
|
|
23049
23051
|
label: z.ZodString;
|
|
23050
23052
|
icon: z.ZodOptional<z.ZodString>;
|
|
@@ -23066,6 +23068,7 @@ declare const PluginInfoSchema: z.ZodObject<{
|
|
|
23066
23068
|
mail: "mail";
|
|
23067
23069
|
auth: "auth";
|
|
23068
23070
|
renderer: "renderer";
|
|
23071
|
+
platform: "platform";
|
|
23069
23072
|
}>;
|
|
23070
23073
|
label: z.ZodString;
|
|
23071
23074
|
icon: z.ZodOptional<z.ZodString>;
|
|
@@ -23090,6 +23093,7 @@ declare const ListPluginsResponseSchema: z.ZodObject<{
|
|
|
23090
23093
|
mail: "mail";
|
|
23091
23094
|
auth: "auth";
|
|
23092
23095
|
renderer: "renderer";
|
|
23096
|
+
platform: "platform";
|
|
23093
23097
|
}>;
|
|
23094
23098
|
label: z.ZodString;
|
|
23095
23099
|
icon: z.ZodOptional<z.ZodString>;
|
|
@@ -23226,6 +23230,7 @@ declare const listPluginsRoute: {
|
|
|
23226
23230
|
mail: "mail";
|
|
23227
23231
|
auth: "auth";
|
|
23228
23232
|
renderer: "renderer";
|
|
23233
|
+
platform: "platform";
|
|
23229
23234
|
}>;
|
|
23230
23235
|
label: z.ZodString;
|
|
23231
23236
|
icon: z.ZodOptional<z.ZodString>;
|
|
@@ -23693,6 +23698,7 @@ declare const adminPluginsRoutes: {
|
|
|
23693
23698
|
mail: "mail";
|
|
23694
23699
|
auth: "auth";
|
|
23695
23700
|
renderer: "renderer";
|
|
23701
|
+
platform: "platform";
|
|
23696
23702
|
}>;
|
|
23697
23703
|
label: z.ZodString;
|
|
23698
23704
|
icon: z.ZodOptional<z.ZodString>;
|
|
@@ -37886,7 +37892,7 @@ declare const adminUsersPluginsContractApp: OpenAPIHono<hono.Env, {
|
|
|
37886
37892
|
hasConfig: boolean;
|
|
37887
37893
|
registers: string[];
|
|
37888
37894
|
adminPlacement: {
|
|
37889
|
-
section: "search" | "notification" | "settings" | "shared" | "storage" | "mail" | "auth" | "renderer";
|
|
37895
|
+
section: "search" | "notification" | "settings" | "shared" | "storage" | "mail" | "auth" | "renderer" | "platform";
|
|
37890
37896
|
label: string;
|
|
37891
37897
|
icon?: string | undefined;
|
|
37892
37898
|
};
|
|
@@ -42676,7 +42682,7 @@ type AutocompleteRateLimitError = z.infer<typeof AutocompleteRateLimitErrorSchem
|
|
|
42676
42682
|
*
|
|
42677
42683
|
* Keeping the types here (and not in `page.ts`) keeps the
|
|
42678
42684
|
* collaborative additions discoverable as one bundle and avoids
|
|
42679
|
-
* polluting the legacy page contract with v2.
|
|
42685
|
+
* polluting the legacy page contract with v2.0-only fields.
|
|
42680
42686
|
*/
|
|
42681
42687
|
/**
|
|
42682
42688
|
* Public user shape surfaced for collaboration UI (Save author /
|
|
@@ -42734,6 +42740,12 @@ type RevisionType = z.infer<typeof RevisionTypeSchema>;
|
|
|
42734
42740
|
* readonly clients still subscribe to live
|
|
42735
42741
|
* updates but their writes are rejected by
|
|
42736
42742
|
* Hocuspocus.
|
|
42743
|
+
*
|
|
42744
|
+
* Round 2 (Decision 1): the save optimistic lock moved SERVER-SIDE — it is
|
|
42745
|
+
* now anchored to the revision the server's Hocuspocus document was
|
|
42746
|
+
* materialised from, not to a client-pinned base. The wsToken response no
|
|
42747
|
+
* longer carries `currentRevision` (the client never pins / echoes a base
|
|
42748
|
+
* any more).
|
|
42737
42749
|
*/
|
|
42738
42750
|
declare const WsTokenResponseSchema: z.ZodObject<{
|
|
42739
42751
|
wsToken: z.ZodString;
|
|
@@ -42770,8 +42782,15 @@ type WsTokenPayload = z.infer<typeof WsTokenPayloadSchema>;
|
|
|
42770
42782
|
* dispatcher; Phase 8 wires it to the Save button.
|
|
42771
42783
|
*
|
|
42772
42784
|
* `message` is the optional checkpoint message (currently unused in
|
|
42773
|
-
* the v2.
|
|
42785
|
+
* the v2.0 UI per spec open question 1, but reserved on the wire so
|
|
42774
42786
|
* we can light it up without a wire-format break).
|
|
42787
|
+
*
|
|
42788
|
+
* Round 2 (Decision 1): the save optimistic lock is anchored SERVER-SIDE
|
|
42789
|
+
* to the revision the server's Hocuspocus document was materialised from,
|
|
42790
|
+
* so the client no longer sends a `baseRevisionId` — the field was
|
|
42791
|
+
* removed. A divergence (an out-of-band save moved `currentRevision`) is
|
|
42792
|
+
* caught by the server's compare-and-set pointer write and surfaced as
|
|
42793
|
+
* `crowi:save-error` `code: 'CONFLICT'`.
|
|
42775
42794
|
*/
|
|
42776
42795
|
declare const CollabSaveMessageSchema: z.ZodObject<{
|
|
42777
42796
|
kind: z.ZodLiteral<"crowi:save">;
|
|
@@ -42794,7 +42813,12 @@ type CollabSaveOk = z.infer<typeof CollabSaveOkSchema>;
|
|
|
42794
42813
|
* fails. The Phase 8 Save UI surfaces `message` in a toast. `code`
|
|
42795
42814
|
* lets the client branch on retry vs surface-and-stop (e.g.
|
|
42796
42815
|
* `'RENDERER_FAILED'` is a hard error from the RFC-0002 renderer; the
|
|
42797
|
-
* client should not retry).
|
|
42816
|
+
* client should not retry). `code: 'CONFLICT'` is the
|
|
42817
|
+
* editor-preview-reliability server-doc-lock rejection (round 2, Decision
|
|
42818
|
+
* 1) — the page's live `currentRevision` diverged from the revision the
|
|
42819
|
+
* server doc was materialised from (an out-of-band save), so the client
|
|
42820
|
+
* must prompt a reload rather than retry, mirroring the HTTP
|
|
42821
|
+
* `PageRevisionConflictError`.
|
|
42798
42822
|
*/
|
|
42799
42823
|
declare const CollabSaveErrorSchema: z.ZodObject<{
|
|
42800
42824
|
kind: z.ZodLiteral<"crowi:save-error">;
|
package/dist/index.d.ts
CHANGED
|
@@ -23033,6 +23033,7 @@ declare const AdminSidebarSection: z.ZodEnum<{
|
|
|
23033
23033
|
mail: "mail";
|
|
23034
23034
|
auth: "auth";
|
|
23035
23035
|
renderer: "renderer";
|
|
23036
|
+
platform: "platform";
|
|
23036
23037
|
}>;
|
|
23037
23038
|
type AdminSidebarSectionValue = z.infer<typeof AdminSidebarSection>;
|
|
23038
23039
|
declare const PluginAdminPlacementSchema: z.ZodObject<{
|
|
@@ -23045,6 +23046,7 @@ declare const PluginAdminPlacementSchema: z.ZodObject<{
|
|
|
23045
23046
|
mail: "mail";
|
|
23046
23047
|
auth: "auth";
|
|
23047
23048
|
renderer: "renderer";
|
|
23049
|
+
platform: "platform";
|
|
23048
23050
|
}>;
|
|
23049
23051
|
label: z.ZodString;
|
|
23050
23052
|
icon: z.ZodOptional<z.ZodString>;
|
|
@@ -23066,6 +23068,7 @@ declare const PluginInfoSchema: z.ZodObject<{
|
|
|
23066
23068
|
mail: "mail";
|
|
23067
23069
|
auth: "auth";
|
|
23068
23070
|
renderer: "renderer";
|
|
23071
|
+
platform: "platform";
|
|
23069
23072
|
}>;
|
|
23070
23073
|
label: z.ZodString;
|
|
23071
23074
|
icon: z.ZodOptional<z.ZodString>;
|
|
@@ -23090,6 +23093,7 @@ declare const ListPluginsResponseSchema: z.ZodObject<{
|
|
|
23090
23093
|
mail: "mail";
|
|
23091
23094
|
auth: "auth";
|
|
23092
23095
|
renderer: "renderer";
|
|
23096
|
+
platform: "platform";
|
|
23093
23097
|
}>;
|
|
23094
23098
|
label: z.ZodString;
|
|
23095
23099
|
icon: z.ZodOptional<z.ZodString>;
|
|
@@ -23226,6 +23230,7 @@ declare const listPluginsRoute: {
|
|
|
23226
23230
|
mail: "mail";
|
|
23227
23231
|
auth: "auth";
|
|
23228
23232
|
renderer: "renderer";
|
|
23233
|
+
platform: "platform";
|
|
23229
23234
|
}>;
|
|
23230
23235
|
label: z.ZodString;
|
|
23231
23236
|
icon: z.ZodOptional<z.ZodString>;
|
|
@@ -23693,6 +23698,7 @@ declare const adminPluginsRoutes: {
|
|
|
23693
23698
|
mail: "mail";
|
|
23694
23699
|
auth: "auth";
|
|
23695
23700
|
renderer: "renderer";
|
|
23701
|
+
platform: "platform";
|
|
23696
23702
|
}>;
|
|
23697
23703
|
label: z.ZodString;
|
|
23698
23704
|
icon: z.ZodOptional<z.ZodString>;
|
|
@@ -37886,7 +37892,7 @@ declare const adminUsersPluginsContractApp: OpenAPIHono<hono.Env, {
|
|
|
37886
37892
|
hasConfig: boolean;
|
|
37887
37893
|
registers: string[];
|
|
37888
37894
|
adminPlacement: {
|
|
37889
|
-
section: "search" | "notification" | "settings" | "shared" | "storage" | "mail" | "auth" | "renderer";
|
|
37895
|
+
section: "search" | "notification" | "settings" | "shared" | "storage" | "mail" | "auth" | "renderer" | "platform";
|
|
37890
37896
|
label: string;
|
|
37891
37897
|
icon?: string | undefined;
|
|
37892
37898
|
};
|
|
@@ -42676,7 +42682,7 @@ type AutocompleteRateLimitError = z.infer<typeof AutocompleteRateLimitErrorSchem
|
|
|
42676
42682
|
*
|
|
42677
42683
|
* Keeping the types here (and not in `page.ts`) keeps the
|
|
42678
42684
|
* collaborative additions discoverable as one bundle and avoids
|
|
42679
|
-
* polluting the legacy page contract with v2.
|
|
42685
|
+
* polluting the legacy page contract with v2.0-only fields.
|
|
42680
42686
|
*/
|
|
42681
42687
|
/**
|
|
42682
42688
|
* Public user shape surfaced for collaboration UI (Save author /
|
|
@@ -42734,6 +42740,12 @@ type RevisionType = z.infer<typeof RevisionTypeSchema>;
|
|
|
42734
42740
|
* readonly clients still subscribe to live
|
|
42735
42741
|
* updates but their writes are rejected by
|
|
42736
42742
|
* Hocuspocus.
|
|
42743
|
+
*
|
|
42744
|
+
* Round 2 (Decision 1): the save optimistic lock moved SERVER-SIDE — it is
|
|
42745
|
+
* now anchored to the revision the server's Hocuspocus document was
|
|
42746
|
+
* materialised from, not to a client-pinned base. The wsToken response no
|
|
42747
|
+
* longer carries `currentRevision` (the client never pins / echoes a base
|
|
42748
|
+
* any more).
|
|
42737
42749
|
*/
|
|
42738
42750
|
declare const WsTokenResponseSchema: z.ZodObject<{
|
|
42739
42751
|
wsToken: z.ZodString;
|
|
@@ -42770,8 +42782,15 @@ type WsTokenPayload = z.infer<typeof WsTokenPayloadSchema>;
|
|
|
42770
42782
|
* dispatcher; Phase 8 wires it to the Save button.
|
|
42771
42783
|
*
|
|
42772
42784
|
* `message` is the optional checkpoint message (currently unused in
|
|
42773
|
-
* the v2.
|
|
42785
|
+
* the v2.0 UI per spec open question 1, but reserved on the wire so
|
|
42774
42786
|
* we can light it up without a wire-format break).
|
|
42787
|
+
*
|
|
42788
|
+
* Round 2 (Decision 1): the save optimistic lock is anchored SERVER-SIDE
|
|
42789
|
+
* to the revision the server's Hocuspocus document was materialised from,
|
|
42790
|
+
* so the client no longer sends a `baseRevisionId` — the field was
|
|
42791
|
+
* removed. A divergence (an out-of-band save moved `currentRevision`) is
|
|
42792
|
+
* caught by the server's compare-and-set pointer write and surfaced as
|
|
42793
|
+
* `crowi:save-error` `code: 'CONFLICT'`.
|
|
42775
42794
|
*/
|
|
42776
42795
|
declare const CollabSaveMessageSchema: z.ZodObject<{
|
|
42777
42796
|
kind: z.ZodLiteral<"crowi:save">;
|
|
@@ -42794,7 +42813,12 @@ type CollabSaveOk = z.infer<typeof CollabSaveOkSchema>;
|
|
|
42794
42813
|
* fails. The Phase 8 Save UI surfaces `message` in a toast. `code`
|
|
42795
42814
|
* lets the client branch on retry vs surface-and-stop (e.g.
|
|
42796
42815
|
* `'RENDERER_FAILED'` is a hard error from the RFC-0002 renderer; the
|
|
42797
|
-
* client should not retry).
|
|
42816
|
+
* client should not retry). `code: 'CONFLICT'` is the
|
|
42817
|
+
* editor-preview-reliability server-doc-lock rejection (round 2, Decision
|
|
42818
|
+
* 1) — the page's live `currentRevision` diverged from the revision the
|
|
42819
|
+
* server doc was materialised from (an out-of-band save), so the client
|
|
42820
|
+
* must prompt a reload rather than retry, mirroring the HTTP
|
|
42821
|
+
* `PageRevisionConflictError`.
|
|
42798
42822
|
*/
|
|
42799
42823
|
declare const CollabSaveErrorSchema: z.ZodObject<{
|
|
42800
42824
|
kind: z.ZodLiteral<"crowi:save-error">;
|
package/dist/index.js
CHANGED
|
@@ -5323,7 +5323,7 @@ var PluginFieldSchema = import_zod_openapi61.z.object({
|
|
|
5323
5323
|
}).optional(),
|
|
5324
5324
|
optional: import_zod_openapi61.z.boolean()
|
|
5325
5325
|
});
|
|
5326
|
-
var AdminSidebarSection = import_zod_openapi61.z.enum(["settings", "shared", "storage", "mail", "notification", "auth", "search", "renderer"]);
|
|
5326
|
+
var AdminSidebarSection = import_zod_openapi61.z.enum(["settings", "shared", "storage", "mail", "notification", "auth", "search", "renderer", "platform"]);
|
|
5327
5327
|
var PluginAdminPlacementSchema = import_zod_openapi61.z.object({
|
|
5328
5328
|
/**
|
|
5329
5329
|
* Sidebar section to surface this plugin under. The runtime fills
|