@s2-dev/streamstore 0.7.0 → 0.7.4

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.
Files changed (81) hide show
  1. package/bin/mcp-server.js +61 -56
  2. package/bin/mcp-server.js.map +12 -11
  3. package/dist/commonjs/hooks/compression.d.ts +6 -0
  4. package/dist/commonjs/hooks/compression.d.ts.map +1 -0
  5. package/dist/commonjs/hooks/compression.js +30 -0
  6. package/dist/commonjs/hooks/compression.js.map +1 -0
  7. package/dist/commonjs/hooks/registration.d.ts.map +1 -1
  8. package/dist/commonjs/hooks/registration.js +2 -1
  9. package/dist/commonjs/hooks/registration.js.map +1 -1
  10. package/dist/commonjs/index.extras.d.ts +5 -5
  11. package/dist/commonjs/index.extras.d.ts.map +1 -1
  12. package/dist/commonjs/lib/config.d.ts +3 -3
  13. package/dist/commonjs/lib/config.js +3 -3
  14. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  15. package/dist/commonjs/mcp-server/server.js +1 -1
  16. package/dist/commonjs/models/components/basininfo.d.ts +2 -6
  17. package/dist/commonjs/models/components/basininfo.d.ts.map +1 -1
  18. package/dist/commonjs/models/components/basininfo.js +3 -4
  19. package/dist/commonjs/models/components/basininfo.js.map +1 -1
  20. package/dist/commonjs/models/components/basinscope.d.ts +34 -0
  21. package/dist/commonjs/models/components/basinscope.d.ts.map +1 -0
  22. package/dist/commonjs/models/components/basinscope.js +64 -0
  23. package/dist/commonjs/models/components/basinscope.js.map +1 -0
  24. package/dist/commonjs/models/components/createbasinrequest.d.ts +6 -3
  25. package/dist/commonjs/models/components/createbasinrequest.d.ts.map +1 -1
  26. package/dist/commonjs/models/components/createbasinrequest.js +3 -3
  27. package/dist/commonjs/models/components/createbasinrequest.js.map +1 -1
  28. package/dist/commonjs/models/components/index.d.ts +1 -1
  29. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  30. package/dist/commonjs/models/components/index.js +1 -1
  31. package/dist/commonjs/models/components/index.js.map +1 -1
  32. package/dist/esm/hooks/compression.d.ts +6 -0
  33. package/dist/esm/hooks/compression.d.ts.map +1 -0
  34. package/dist/esm/hooks/compression.js +26 -0
  35. package/dist/esm/hooks/compression.js.map +1 -0
  36. package/dist/esm/hooks/registration.d.ts.map +1 -1
  37. package/dist/esm/hooks/registration.js +2 -1
  38. package/dist/esm/hooks/registration.js.map +1 -1
  39. package/dist/esm/index.extras.d.ts +5 -5
  40. package/dist/esm/index.extras.d.ts.map +1 -1
  41. package/dist/esm/lib/config.d.ts +3 -3
  42. package/dist/esm/lib/config.js +3 -3
  43. package/dist/esm/mcp-server/mcp-server.js +1 -1
  44. package/dist/esm/mcp-server/server.js +1 -1
  45. package/dist/esm/models/components/basininfo.d.ts +2 -6
  46. package/dist/esm/models/components/basininfo.d.ts.map +1 -1
  47. package/dist/esm/models/components/basininfo.js +3 -4
  48. package/dist/esm/models/components/basininfo.js.map +1 -1
  49. package/dist/esm/models/components/basinscope.d.ts +34 -0
  50. package/dist/esm/models/components/basinscope.d.ts.map +1 -0
  51. package/dist/esm/models/components/basinscope.js +28 -0
  52. package/dist/esm/models/components/basinscope.js.map +1 -0
  53. package/dist/esm/models/components/createbasinrequest.d.ts +6 -3
  54. package/dist/esm/models/components/createbasinrequest.d.ts.map +1 -1
  55. package/dist/esm/models/components/createbasinrequest.js +3 -3
  56. package/dist/esm/models/components/createbasinrequest.js.map +1 -1
  57. package/dist/esm/models/components/index.d.ts +1 -1
  58. package/dist/esm/models/components/index.d.ts.map +1 -1
  59. package/dist/esm/models/components/index.js +1 -1
  60. package/dist/esm/models/components/index.js.map +1 -1
  61. package/jsr.json +1 -1
  62. package/package.json +1 -1
  63. package/src/hooks/compression.ts +33 -0
  64. package/src/hooks/registration.ts +2 -1
  65. package/src/index.extras.ts +9 -9
  66. package/src/lib/config.ts +3 -3
  67. package/src/mcp-server/mcp-server.ts +1 -1
  68. package/src/mcp-server/server.ts +1 -1
  69. package/src/models/components/basininfo.ts +8 -10
  70. package/src/models/components/basinscope.ts +37 -0
  71. package/src/models/components/createbasinrequest.ts +12 -10
  72. package/src/models/components/index.ts +1 -1
  73. package/dist/commonjs/models/components/assignment.d.ts +0 -90
  74. package/dist/commonjs/models/components/assignment.d.ts.map +0 -1
  75. package/dist/commonjs/models/components/assignment.js +0 -127
  76. package/dist/commonjs/models/components/assignment.js.map +0 -1
  77. package/dist/esm/models/components/assignment.d.ts +0 -90
  78. package/dist/esm/models/components/assignment.d.ts.map +0 -1
  79. package/dist/esm/models/components/assignment.js +0 -85
  80. package/dist/esm/models/components/assignment.js.map +0 -1
  81. package/src/models/components/assignment.ts +0 -174
package/bin/mcp-server.js CHANGED
@@ -33991,9 +33991,36 @@ var init_mcp = __esm(() => {
33991
33991
  };
33992
33992
  });
33993
33993
 
33994
+ // src/hooks/compression.ts
33995
+ class CompressionHook {
33996
+ beforeCreateRequest(_hookCtx, input) {
33997
+ const hdrs = new Headers(input.options?.headers ?? {});
33998
+ const body = input.options?.body;
33999
+ if (!hdrs.get("content-type")?.toLowerCase().startsWith("application/json") || typeof body !== "string") {
34000
+ return input;
34001
+ }
34002
+ const stream = new Blob([body]).stream();
34003
+ const compressedStream = stream.pipeThrough(new CompressionStream("gzip"));
34004
+ hdrs.set("content-encoding", "gzip");
34005
+ const opts = {
34006
+ ...input.options,
34007
+ body: compressedStream,
34008
+ headers: hdrs,
34009
+ duplex: "half"
34010
+ };
34011
+ return {
34012
+ ...input,
34013
+ options: opts
34014
+ };
34015
+ }
34016
+ }
34017
+
33994
34018
  // src/hooks/registration.ts
33995
34019
  function initHooks(hooks) {
34020
+ hooks.registerBeforeCreateRequestHook(new CompressionHook);
33996
34021
  }
34022
+ var init_registration = () => {
34023
+ };
33997
34024
 
33998
34025
  // src/hooks/hooks.ts
33999
34026
  class SDKHooks {
@@ -34073,8 +34100,9 @@ class SDKHooks {
34073
34100
  return { response: res, error: err };
34074
34101
  }
34075
34102
  }
34076
- var init_hooks = () => {
34077
- };
34103
+ var init_hooks = __esm(() => {
34104
+ init_registration();
34105
+ });
34078
34106
 
34079
34107
  // src/models/errors/httpclienterrors.ts
34080
34108
  var HTTPClientError, UnexpectedClientError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, ConnectionError;
@@ -34182,9 +34210,9 @@ var init_config = __esm(() => {
34182
34210
  SDK_METADATA = {
34183
34211
  language: "typescript",
34184
34212
  openapiDocVersion: "1.0.0",
34185
- sdkVersion: "0.7.0",
34186
- genVersion: "2.545.2",
34187
- userAgent: "speakeasy-sdk/typescript 0.7.0 2.545.2 1.0.0 @s2-dev/streamstore"
34213
+ sdkVersion: "0.7.4",
34214
+ genVersion: "2.546.0",
34215
+ userAgent: "speakeasy-sdk/typescript 0.7.4 2.546.0 1.0.0 @s2-dev/streamstore"
34188
34216
  };
34189
34217
  });
34190
34218
 
@@ -35820,44 +35848,6 @@ var init_appendoutput = __esm(() => {
35820
35848
  })(AppendOutput$ ||= {});
35821
35849
  });
35822
35850
 
35823
- // src/models/components/assignment.ts
35824
- var Cell$inboundSchema, Cell$outboundSchema, Cell$, Scope$inboundSchema, Scope$outboundSchema, Scope$, Assignment$inboundSchema, Assignment$outboundSchema, Assignment$;
35825
- var init_assignment = __esm(() => {
35826
- init_lib();
35827
- Cell$inboundSchema = objectType({
35828
- cell: stringType()
35829
- });
35830
- Cell$outboundSchema = objectType({
35831
- cell: stringType()
35832
- });
35833
- ((Cell$) => {
35834
- Cell$.inboundSchema = Cell$inboundSchema;
35835
- Cell$.outboundSchema = Cell$outboundSchema;
35836
- })(Cell$ ||= {});
35837
- Scope$inboundSchema = objectType({
35838
- scope: stringType()
35839
- });
35840
- Scope$outboundSchema = objectType({
35841
- scope: stringType()
35842
- });
35843
- ((Scope$) => {
35844
- Scope$.inboundSchema = Scope$inboundSchema;
35845
- Scope$.outboundSchema = Scope$outboundSchema;
35846
- })(Scope$ ||= {});
35847
- Assignment$inboundSchema = unionType([
35848
- lazyType(() => Scope$inboundSchema),
35849
- lazyType(() => Cell$inboundSchema)
35850
- ]);
35851
- Assignment$outboundSchema = unionType([
35852
- lazyType(() => Scope$outboundSchema),
35853
- lazyType(() => Cell$outboundSchema)
35854
- ]);
35855
- ((Assignment$) => {
35856
- Assignment$.inboundSchema = Assignment$inboundSchema;
35857
- Assignment$.outboundSchema = Assignment$outboundSchema;
35858
- })(Assignment$ ||= {});
35859
- });
35860
-
35861
35851
  // src/models/components/retentionpolicy.ts
35862
35852
  var Age$inboundSchema, Age$outboundSchema, Age$, RetentionPolicy$inboundSchema, RetentionPolicy$outboundSchema, RetentionPolicy$;
35863
35853
  var init_retentionpolicy = __esm(() => {
@@ -35954,6 +35944,22 @@ var init_basinconfig = __esm(() => {
35954
35944
  })(BasinConfig$ ||= {});
35955
35945
  });
35956
35946
 
35947
+ // src/models/components/basinscope.ts
35948
+ var BasinScope, BasinScope$inboundSchema, BasinScope$outboundSchema, BasinScope$;
35949
+ var init_basinscope = __esm(() => {
35950
+ init_lib();
35951
+ BasinScope = {
35952
+ Unspecified: "unspecified",
35953
+ AwsUsEast1: "aws:us-east-1"
35954
+ };
35955
+ BasinScope$inboundSchema = nativeEnumType(BasinScope);
35956
+ BasinScope$outboundSchema = BasinScope$inboundSchema;
35957
+ ((BasinScope$) => {
35958
+ BasinScope$.inboundSchema = BasinScope$inboundSchema;
35959
+ BasinScope$.outboundSchema = BasinScope$outboundSchema;
35960
+ })(BasinScope$ ||= {});
35961
+ });
35962
+
35957
35963
  // src/models/components/basinstate.ts
35958
35964
  var BasinState, BasinState$inboundSchema, BasinState$outboundSchema, BasinState$;
35959
35965
  var init_basinstate = __esm(() => {
@@ -35976,17 +35982,16 @@ var init_basinstate = __esm(() => {
35976
35982
  var BasinInfo$inboundSchema, BasinInfo$outboundSchema, BasinInfo$;
35977
35983
  var init_basininfo = __esm(() => {
35978
35984
  init_lib();
35985
+ init_basinscope();
35979
35986
  init_basinstate();
35980
35987
  BasinInfo$inboundSchema = objectType({
35981
- cell: stringType(),
35982
35988
  name: stringType(),
35983
- scope: stringType(),
35989
+ scope: BasinScope$inboundSchema,
35984
35990
  state: BasinState$inboundSchema
35985
35991
  });
35986
35992
  BasinInfo$outboundSchema = objectType({
35987
- cell: stringType(),
35988
35993
  name: stringType(),
35989
- scope: stringType(),
35994
+ scope: BasinScope$outboundSchema,
35990
35995
  state: BasinState$outboundSchema
35991
35996
  });
35992
35997
  ((BasinInfo$) => {
@@ -36024,15 +36029,15 @@ var init_checktailresponse = __esm(() => {
36024
36029
  var CreateBasinRequest$inboundSchema, CreateBasinRequest$outboundSchema, CreateBasinRequest$;
36025
36030
  var init_createbasinrequest = __esm(() => {
36026
36031
  init_lib();
36027
- init_assignment();
36028
36032
  init_basinconfig();
36033
+ init_basinscope();
36029
36034
  CreateBasinRequest$inboundSchema = objectType({
36030
- assignment: nullableType(Assignment$inboundSchema).optional(),
36031
- config: nullableType(BasinConfig$inboundSchema).optional()
36035
+ config: nullableType(BasinConfig$inboundSchema).optional(),
36036
+ scope: BasinScope$inboundSchema.optional()
36032
36037
  });
36033
36038
  CreateBasinRequest$outboundSchema = objectType({
36034
- assignment: nullableType(Assignment$outboundSchema).optional(),
36035
- config: nullableType(BasinConfig$outboundSchema).optional()
36039
+ config: nullableType(BasinConfig$outboundSchema).optional(),
36040
+ scope: BasinScope$outboundSchema.optional()
36036
36041
  });
36037
36042
  ((CreateBasinRequest$) => {
36038
36043
  CreateBasinRequest$.inboundSchema = CreateBasinRequest$inboundSchema;
@@ -36406,9 +36411,9 @@ var init_components = __esm(() => {
36406
36411
  init_appendinput();
36407
36412
  init_appendoutput();
36408
36413
  init_appendrecord();
36409
- init_assignment();
36410
36414
  init_basinconfig();
36411
36415
  init_basininfo();
36416
+ init_basinscope();
36412
36417
  init_basinstate();
36413
36418
  init_checktailresponse();
36414
36419
  init_createbasinrequest();
@@ -42311,7 +42316,7 @@ Retrieve a batch of records, or set \`Accept: text/event-stream\` to stream usin
42311
42316
  function createMCPServer(deps) {
42312
42317
  const server = new McpServer({
42313
42318
  name: "S2",
42314
- version: "0.7.0"
42319
+ version: "0.7.4"
42315
42320
  });
42316
42321
  const client = new S2Core({
42317
42322
  bearerAuth: deps.bearerAuth,
@@ -43547,7 +43552,7 @@ var routes = rn({
43547
43552
  var app = Ve(routes, {
43548
43553
  name: "mcp",
43549
43554
  versionInfo: {
43550
- currentVersion: "0.7.0"
43555
+ currentVersion: "0.7.4"
43551
43556
  }
43552
43557
  });
43553
43558
  _t(app, process3.argv.slice(2), buildContext(process3));
@@ -43555,5 +43560,5 @@ export {
43555
43560
  app
43556
43561
  };
43557
43562
 
43558
- //# debugId=A26305A20EE8735764756E2164756E21
43563
+ //# debugId=A92CE63A4C46295C64756E2164756E21
43559
43564
  //# sourceMappingURL=mcp-server.js.map