@superdoc/sdk 2.20.0-next.6 → 2.20.0-next.8

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.
@@ -7988,6 +7988,247 @@
7988
7988
  "args"
7989
7989
  ]
7990
7990
  },
7991
+ {
7992
+ "type": "object",
7993
+ "properties": {
7994
+ "id": {
7995
+ "type": "string"
7996
+ },
7997
+ "op": {
7998
+ "const": "structural.replace",
7999
+ "type": "string"
8000
+ },
8001
+ "where": {
8002
+ "oneOf": [
8003
+ {
8004
+ "type": "object",
8005
+ "properties": {
8006
+ "by": {
8007
+ "const": "select",
8008
+ "type": "string"
8009
+ },
8010
+ "select": {
8011
+ "oneOf": [
8012
+ {
8013
+ "type": "object",
8014
+ "properties": {
8015
+ "type": {
8016
+ "const": "text",
8017
+ "description": "Must be 'text' for text pattern search.",
8018
+ "type": "string"
8019
+ },
8020
+ "pattern": {
8021
+ "type": "string",
8022
+ "description": "Text to match. In regex mode, patterns are validated for syntax, maximum length, and safety before execution."
8023
+ },
8024
+ "mode": {
8025
+ "enum": [
8026
+ "contains",
8027
+ "regex"
8028
+ ],
8029
+ "description": "Match mode: 'contains' (literal substring, recommended for literal text) or 'regex' (validated regular expression)."
8030
+ },
8031
+ "caseSensitive": {
8032
+ "type": "boolean",
8033
+ "description": "Case-sensitive matching. Default: false."
8034
+ },
8035
+ "wholeWord": {
8036
+ "type": "boolean",
8037
+ "description": "Require word-boundary matches. Default: false."
8038
+ },
8039
+ "includeDeletedText": {
8040
+ "type": "boolean",
8041
+ "description": "When true, includes text from pending tracked deletions. Default: false."
8042
+ }
8043
+ },
8044
+ "additionalProperties": false,
8045
+ "required": [
8046
+ "type",
8047
+ "pattern"
8048
+ ]
8049
+ },
8050
+ {
8051
+ "type": "object",
8052
+ "properties": {
8053
+ "type": {
8054
+ "const": "node",
8055
+ "description": "Must be 'node' for node type search.",
8056
+ "type": "string"
8057
+ },
8058
+ "nodeType": {
8059
+ "enum": [
8060
+ "paragraph",
8061
+ "heading",
8062
+ "listItem",
8063
+ "table",
8064
+ "tableRow",
8065
+ "tableCell",
8066
+ "tableOfContents",
8067
+ "image",
8068
+ "sdt",
8069
+ "run",
8070
+ "bookmark",
8071
+ "comment",
8072
+ "hyperlink",
8073
+ "footnoteRef",
8074
+ "endnoteRef",
8075
+ "crossRef",
8076
+ "indexEntry",
8077
+ "citation",
8078
+ "authorityEntry",
8079
+ "sequenceField",
8080
+ "tab",
8081
+ "lineBreak"
8082
+ ],
8083
+ "description": "Block type to match (paragraph, heading, table, listItem, etc.)."
8084
+ },
8085
+ "kind": {
8086
+ "enum": [
8087
+ "block",
8088
+ "inline"
8089
+ ],
8090
+ "description": "Filter: 'block' or 'inline'."
8091
+ }
8092
+ },
8093
+ "additionalProperties": false,
8094
+ "required": [
8095
+ "type"
8096
+ ]
8097
+ }
8098
+ ]
8099
+ },
8100
+ "within": {
8101
+ "$ref": "#/$defs/BlockNodeAddress"
8102
+ },
8103
+ "require": {
8104
+ "enum": [
8105
+ "first",
8106
+ "exactlyOne",
8107
+ "all"
8108
+ ]
8109
+ }
8110
+ },
8111
+ "additionalProperties": false,
8112
+ "required": [
8113
+ "by",
8114
+ "select",
8115
+ "require"
8116
+ ]
8117
+ },
8118
+ {
8119
+ "type": "object",
8120
+ "properties": {
8121
+ "by": {
8122
+ "const": "ref",
8123
+ "type": "string"
8124
+ },
8125
+ "ref": {
8126
+ "type": "string"
8127
+ },
8128
+ "within": {
8129
+ "$ref": "#/$defs/BlockNodeAddress"
8130
+ }
8131
+ },
8132
+ "additionalProperties": false,
8133
+ "required": [
8134
+ "by",
8135
+ "ref"
8136
+ ]
8137
+ },
8138
+ {
8139
+ "type": "object",
8140
+ "properties": {
8141
+ "by": {
8142
+ "const": "target",
8143
+ "type": "string"
8144
+ },
8145
+ "target": {
8146
+ "$ref": "#/$defs/SelectionTarget"
8147
+ }
8148
+ },
8149
+ "additionalProperties": false,
8150
+ "required": [
8151
+ "by",
8152
+ "target"
8153
+ ]
8154
+ },
8155
+ {
8156
+ "type": "object",
8157
+ "properties": {
8158
+ "by": {
8159
+ "const": "block",
8160
+ "type": "string"
8161
+ },
8162
+ "nodeType": {
8163
+ "enum": [
8164
+ "paragraph",
8165
+ "heading",
8166
+ "listItem",
8167
+ "table",
8168
+ "tableRow",
8169
+ "tableCell",
8170
+ "tableOfContents",
8171
+ "image",
8172
+ "sdt"
8173
+ ]
8174
+ },
8175
+ "nodeId": {
8176
+ "type": "string"
8177
+ }
8178
+ },
8179
+ "additionalProperties": false,
8180
+ "required": [
8181
+ "by",
8182
+ "nodeType",
8183
+ "nodeId"
8184
+ ]
8185
+ }
8186
+ ]
8187
+ },
8188
+ "args": {
8189
+ "type": "object",
8190
+ "properties": {
8191
+ "content": {
8192
+ "oneOf": [
8193
+ {
8194
+ "type": "object"
8195
+ },
8196
+ {
8197
+ "type": "array",
8198
+ "items": {
8199
+ "type": "object"
8200
+ }
8201
+ }
8202
+ ]
8203
+ },
8204
+ "nestingPolicy": {
8205
+ "type": "object",
8206
+ "properties": {
8207
+ "tables": {
8208
+ "enum": [
8209
+ "forbid",
8210
+ "allow"
8211
+ ]
8212
+ }
8213
+ },
8214
+ "additionalProperties": false,
8215
+ "description": "Controls nesting behavior. tables: 'allow' permits inserting tables inside other tables."
8216
+ }
8217
+ },
8218
+ "additionalProperties": false,
8219
+ "required": [
8220
+ "content"
8221
+ ]
8222
+ }
8223
+ },
8224
+ "additionalProperties": false,
8225
+ "required": [
8226
+ "id",
8227
+ "op",
8228
+ "where",
8229
+ "args"
8230
+ ]
8231
+ },
7991
8232
  {
7992
8233
  "type": "object",
7993
8234
  "properties": {
@@ -8128,7 +8369,7 @@
8128
8369
  }
8129
8370
  ]
8130
8371
  },
8131
- "description": "Ordered array of mutation steps. Each step needs 'op' (text.rewrite, text.insert, text.delete, format.apply, or assert) and a 'where' targeting clause."
8372
+ "description": "Ordered array of mutation steps. Each step needs 'op' (text.rewrite, text.insert, text.delete, format.apply, structural.replace, or assert) and a 'where' targeting clause. Check runtime capabilities for operation-specific content and targeting restrictions."
8132
8373
  },
8133
8374
  "detail": {
8134
8375
  "type": "object",
@@ -7846,6 +7846,247 @@
7846
7846
  "args"
7847
7847
  ]
7848
7848
  },
7849
+ {
7850
+ "type": "object",
7851
+ "properties": {
7852
+ "id": {
7853
+ "type": "string"
7854
+ },
7855
+ "op": {
7856
+ "const": "structural.replace",
7857
+ "type": "string"
7858
+ },
7859
+ "where": {
7860
+ "oneOf": [
7861
+ {
7862
+ "type": "object",
7863
+ "properties": {
7864
+ "by": {
7865
+ "const": "select",
7866
+ "type": "string"
7867
+ },
7868
+ "select": {
7869
+ "oneOf": [
7870
+ {
7871
+ "type": "object",
7872
+ "properties": {
7873
+ "type": {
7874
+ "const": "text",
7875
+ "description": "Must be 'text' for text pattern search.",
7876
+ "type": "string"
7877
+ },
7878
+ "pattern": {
7879
+ "type": "string",
7880
+ "description": "Text to match. In regex mode, patterns are validated for syntax, maximum length, and safety before execution."
7881
+ },
7882
+ "mode": {
7883
+ "enum": [
7884
+ "contains",
7885
+ "regex"
7886
+ ],
7887
+ "description": "Match mode: 'contains' (literal substring, recommended for literal text) or 'regex' (validated regular expression)."
7888
+ },
7889
+ "caseSensitive": {
7890
+ "type": "boolean",
7891
+ "description": "Case-sensitive matching. Default: false."
7892
+ },
7893
+ "wholeWord": {
7894
+ "type": "boolean",
7895
+ "description": "Require word-boundary matches. Default: false."
7896
+ },
7897
+ "includeDeletedText": {
7898
+ "type": "boolean",
7899
+ "description": "When true, includes text from pending tracked deletions. Default: false."
7900
+ }
7901
+ },
7902
+ "additionalProperties": false,
7903
+ "required": [
7904
+ "type",
7905
+ "pattern"
7906
+ ]
7907
+ },
7908
+ {
7909
+ "type": "object",
7910
+ "properties": {
7911
+ "type": {
7912
+ "const": "node",
7913
+ "description": "Must be 'node' for node type search.",
7914
+ "type": "string"
7915
+ },
7916
+ "nodeType": {
7917
+ "enum": [
7918
+ "paragraph",
7919
+ "heading",
7920
+ "listItem",
7921
+ "table",
7922
+ "tableRow",
7923
+ "tableCell",
7924
+ "tableOfContents",
7925
+ "image",
7926
+ "sdt",
7927
+ "run",
7928
+ "bookmark",
7929
+ "comment",
7930
+ "hyperlink",
7931
+ "footnoteRef",
7932
+ "endnoteRef",
7933
+ "crossRef",
7934
+ "indexEntry",
7935
+ "citation",
7936
+ "authorityEntry",
7937
+ "sequenceField",
7938
+ "tab",
7939
+ "lineBreak"
7940
+ ],
7941
+ "description": "Block type to match (paragraph, heading, table, listItem, etc.)."
7942
+ },
7943
+ "kind": {
7944
+ "enum": [
7945
+ "block",
7946
+ "inline"
7947
+ ],
7948
+ "description": "Filter: 'block' or 'inline'."
7949
+ }
7950
+ },
7951
+ "additionalProperties": false,
7952
+ "required": [
7953
+ "type"
7954
+ ]
7955
+ }
7956
+ ]
7957
+ },
7958
+ "within": {
7959
+ "$ref": "#/$defs/BlockNodeAddress"
7960
+ },
7961
+ "require": {
7962
+ "enum": [
7963
+ "first",
7964
+ "exactlyOne",
7965
+ "all"
7966
+ ]
7967
+ }
7968
+ },
7969
+ "additionalProperties": false,
7970
+ "required": [
7971
+ "by",
7972
+ "select",
7973
+ "require"
7974
+ ]
7975
+ },
7976
+ {
7977
+ "type": "object",
7978
+ "properties": {
7979
+ "by": {
7980
+ "const": "ref",
7981
+ "type": "string"
7982
+ },
7983
+ "ref": {
7984
+ "type": "string"
7985
+ },
7986
+ "within": {
7987
+ "$ref": "#/$defs/BlockNodeAddress"
7988
+ }
7989
+ },
7990
+ "additionalProperties": false,
7991
+ "required": [
7992
+ "by",
7993
+ "ref"
7994
+ ]
7995
+ },
7996
+ {
7997
+ "type": "object",
7998
+ "properties": {
7999
+ "by": {
8000
+ "const": "target",
8001
+ "type": "string"
8002
+ },
8003
+ "target": {
8004
+ "$ref": "#/$defs/SelectionTarget"
8005
+ }
8006
+ },
8007
+ "additionalProperties": false,
8008
+ "required": [
8009
+ "by",
8010
+ "target"
8011
+ ]
8012
+ },
8013
+ {
8014
+ "type": "object",
8015
+ "properties": {
8016
+ "by": {
8017
+ "const": "block",
8018
+ "type": "string"
8019
+ },
8020
+ "nodeType": {
8021
+ "enum": [
8022
+ "paragraph",
8023
+ "heading",
8024
+ "listItem",
8025
+ "table",
8026
+ "tableRow",
8027
+ "tableCell",
8028
+ "tableOfContents",
8029
+ "image",
8030
+ "sdt"
8031
+ ]
8032
+ },
8033
+ "nodeId": {
8034
+ "type": "string"
8035
+ }
8036
+ },
8037
+ "additionalProperties": false,
8038
+ "required": [
8039
+ "by",
8040
+ "nodeType",
8041
+ "nodeId"
8042
+ ]
8043
+ }
8044
+ ]
8045
+ },
8046
+ "args": {
8047
+ "type": "object",
8048
+ "properties": {
8049
+ "content": {
8050
+ "oneOf": [
8051
+ {
8052
+ "type": "object"
8053
+ },
8054
+ {
8055
+ "type": "array",
8056
+ "items": {
8057
+ "type": "object"
8058
+ }
8059
+ }
8060
+ ]
8061
+ },
8062
+ "nestingPolicy": {
8063
+ "type": "object",
8064
+ "properties": {
8065
+ "tables": {
8066
+ "enum": [
8067
+ "forbid",
8068
+ "allow"
8069
+ ]
8070
+ }
8071
+ },
8072
+ "additionalProperties": false,
8073
+ "description": "Controls nesting behavior. tables: 'allow' permits inserting tables inside other tables."
8074
+ }
8075
+ },
8076
+ "additionalProperties": false,
8077
+ "required": [
8078
+ "content"
8079
+ ]
8080
+ }
8081
+ },
8082
+ "additionalProperties": false,
8083
+ "required": [
8084
+ "id",
8085
+ "op",
8086
+ "where",
8087
+ "args"
8088
+ ]
8089
+ },
7849
8090
  {
7850
8091
  "type": "object",
7851
8092
  "properties": {
@@ -7986,7 +8227,7 @@
7986
8227
  }
7987
8228
  ]
7988
8229
  },
7989
- "description": "Ordered array of mutation steps. Each step needs 'op' (text.rewrite, text.insert, text.delete, format.apply, or assert) and a 'where' targeting clause."
8230
+ "description": "Ordered array of mutation steps. Each step needs 'op' (text.rewrite, text.insert, text.delete, format.apply, structural.replace, or assert) and a 'where' targeting clause. Check runtime capabilities for operation-specific content and targeting restrictions."
7990
8231
  },
7991
8232
  "detail": {
7992
8233
  "type": "object",