@shippo/shippo-mcp 0.8.10 → 0.8.29

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 (69) hide show
  1. package/bin/mcp-server.js +93 -55
  2. package/bin/mcp-server.js.map +18 -18
  3. package/esm/funcs/webhooksList.d.ts +2 -2
  4. package/esm/funcs/webhooksList.d.ts.map +1 -1
  5. package/esm/funcs/webhooksList.js +17 -4
  6. package/esm/funcs/webhooksList.js.map +1 -1
  7. package/esm/lib/config.d.ts +3 -3
  8. package/esm/lib/config.js +3 -3
  9. package/esm/mcp-server/mcp-server.js +1 -1
  10. package/esm/mcp-server/server.js +1 -1
  11. package/esm/mcp-server/tools/webhooksList.d.ts +5 -1
  12. package/esm/mcp-server/tools/webhooksList.d.ts.map +1 -1
  13. package/esm/mcp-server/tools/webhooksList.js +7 -2
  14. package/esm/mcp-server/tools/webhooksList.js.map +1 -1
  15. package/esm/models/address.d.ts +1 -1
  16. package/esm/models/address.d.ts.map +1 -1
  17. package/esm/models/address.js +1 -1
  18. package/esm/models/address.js.map +1 -1
  19. package/esm/models/customsitem.d.ts +6 -6
  20. package/esm/models/customsitem.d.ts.map +1 -1
  21. package/esm/models/customsitem.js +6 -6
  22. package/esm/models/customsitem.js.map +1 -1
  23. package/esm/models/customsitemcreaterequest.d.ts +5 -5
  24. package/esm/models/customsitemcreaterequest.d.ts.map +1 -1
  25. package/esm/models/customsitemcreaterequest.js +5 -5
  26. package/esm/models/customsitemcreaterequest.js.map +1 -1
  27. package/esm/models/defaultparceltemplate.d.ts +19 -2
  28. package/esm/models/defaultparceltemplate.d.ts.map +1 -1
  29. package/esm/models/defaultparceltemplate.js +18 -2
  30. package/esm/models/defaultparceltemplate.js.map +1 -1
  31. package/esm/models/listwebhooksop.d.ts +6 -0
  32. package/esm/models/listwebhooksop.d.ts.map +1 -1
  33. package/esm/models/listwebhooksop.js +5 -0
  34. package/esm/models/listwebhooksop.js.map +1 -1
  35. package/esm/models/parcel.d.ts +1 -1
  36. package/esm/models/parcel.d.ts.map +1 -1
  37. package/esm/models/parcel.js +1 -1
  38. package/esm/models/parcel.js.map +1 -1
  39. package/esm/models/servicegroup.d.ts +3 -3
  40. package/esm/models/servicegroup.d.ts.map +1 -1
  41. package/esm/models/servicegroup.js +4 -3
  42. package/esm/models/servicegroup.js.map +1 -1
  43. package/esm/models/servicegroupcreaterequest.d.ts +2 -2
  44. package/esm/models/servicegroupcreaterequest.d.ts.map +1 -1
  45. package/esm/models/servicegroupcreaterequest.js +2 -2
  46. package/esm/models/servicegroupcreaterequest.js.map +1 -1
  47. package/esm/models/servicegroupupdaterequest.d.ts +2 -2
  48. package/esm/models/servicegroupupdaterequest.d.ts.map +1 -1
  49. package/esm/models/servicegroupupdaterequest.js +2 -2
  50. package/esm/models/servicegroupupdaterequest.js.map +1 -1
  51. package/esm/models/userparceltemplate.js +2 -2
  52. package/esm/models/userparceltemplate.js.map +1 -1
  53. package/manifest.json +1 -1
  54. package/package.json +1 -1
  55. package/src/funcs/webhooksList.ts +22 -0
  56. package/src/lib/config.ts +3 -3
  57. package/src/mcp-server/mcp-server.ts +1 -1
  58. package/src/mcp-server/server.ts +1 -1
  59. package/src/mcp-server/tools/webhooksList.ts +9 -2
  60. package/src/models/address.ts +2 -2
  61. package/src/models/customsitem.ts +12 -12
  62. package/src/models/customsitemcreaterequest.ts +10 -10
  63. package/src/models/defaultparceltemplate.ts +49 -5
  64. package/src/models/listwebhooksop.ts +15 -0
  65. package/src/models/parcel.ts +2 -2
  66. package/src/models/servicegroup.ts +7 -6
  67. package/src/models/servicegroupcreaterequest.ts +4 -4
  68. package/src/models/servicegroupupdaterequest.ts +4 -4
  69. package/src/models/userparceltemplate.ts +2 -2
package/bin/mcp-server.js CHANGED
@@ -46623,9 +46623,9 @@ var init_config = __esm(() => {
46623
46623
  SDK_METADATA = {
46624
46624
  language: "typescript",
46625
46625
  openapiDocVersion: "2018-02-08",
46626
- sdkVersion: "0.8.10",
46627
- genVersion: "2.769.1",
46628
- userAgent: "speakeasy-sdk/mcp-typescript 0.8.10 2.769.1 2018-02-08 @shippo/shippo-mcp"
46626
+ sdkVersion: "0.8.29",
46627
+ genVersion: "2.770.0",
46628
+ userAgent: "speakeasy-sdk/mcp-typescript 0.8.29 2.770.0 2018-02-08 @shippo/shippo-mcp"
46629
46629
  };
46630
46630
  });
46631
46631
 
@@ -48052,7 +48052,7 @@ var init_address = __esm(() => {
48052
48052
  street2: stringType().optional(),
48053
48053
  street3: stringType().optional(),
48054
48054
  street_no: stringType().optional(),
48055
- test: booleanType().optional(),
48055
+ test: booleanType().nullable().optional(),
48056
48056
  validation_results: AddressValidationResults$zodSchema.optional(),
48057
48057
  zip: stringType().optional()
48058
48058
  }).describe("Address represents the address as retrieved from the database");
@@ -48870,15 +48870,15 @@ var init_customsitemcreaterequest = __esm(() => {
48870
48870
  init_weightunitenum();
48871
48871
  CustomsItemCreateRequest$zodSchema = objectType({
48872
48872
  description: stringType(),
48873
- eccn_ear99: stringType().optional(),
48874
- hs_code: stringType().optional(),
48873
+ eccn_ear99: stringType().nullable().optional(),
48874
+ hs_code: stringType().nullable().optional(),
48875
48875
  mass_unit: WeightUnitEnum$zodSchema,
48876
- metadata: stringType().optional(),
48876
+ metadata: stringType().nullable().optional(),
48877
48877
  net_weight: stringType(),
48878
48878
  origin_country: stringType(),
48879
48879
  quantity: numberType().int(),
48880
- sku_code: stringType().optional(),
48881
- tariff_number: stringType().optional(),
48880
+ sku_code: stringType().nullable().optional(),
48881
+ tariff_number: stringType().nullable().optional(),
48882
48882
  value_amount: stringType(),
48883
48883
  value_currency: stringType()
48884
48884
  });
@@ -52842,10 +52842,10 @@ var init_customsitem = __esm(() => {
52842
52842
  init_weightunitenum();
52843
52843
  CustomsItem$zodSchema = objectType({
52844
52844
  description: stringType(),
52845
- eccn_ear99: stringType().optional(),
52846
- hs_code: stringType().optional(),
52845
+ eccn_ear99: stringType().nullable().optional(),
52846
+ hs_code: stringType().nullable().optional(),
52847
52847
  mass_unit: WeightUnitEnum$zodSchema,
52848
- metadata: stringType().optional(),
52848
+ metadata: stringType().nullable().optional(),
52849
52849
  net_weight: stringType(),
52850
52850
  object_created: stringType().datetime({ offset: true }).optional(),
52851
52851
  object_id: stringType().optional(),
@@ -52854,9 +52854,9 @@ var init_customsitem = __esm(() => {
52854
52854
  object_updated: stringType().datetime({ offset: true }).optional(),
52855
52855
  origin_country: stringType(),
52856
52856
  quantity: numberType().int(),
52857
- sku_code: stringType().optional(),
52858
- tariff_number: stringType().optional(),
52859
- test: booleanType().optional(),
52857
+ sku_code: stringType().nullable().optional(),
52858
+ tariff_number: stringType().nullable().optional(),
52859
+ test: booleanType().nullable().optional(),
52860
52860
  value_amount: stringType(),
52861
52861
  value_currency: stringType()
52862
52862
  });
@@ -54343,7 +54343,7 @@ var init_parcel = __esm(() => {
54343
54343
  object_state: ObjectState$zodSchema.optional(),
54344
54344
  object_updated: stringType().datetime({ offset: true }).optional(),
54345
54345
  template: ParcelTemplateEnumSet$zodSchema.nullable().optional(),
54346
- test: booleanType().optional(),
54346
+ test: booleanType().nullable().optional(),
54347
54347
  weight: stringType(),
54348
54348
  width: stringType()
54349
54349
  });
@@ -55329,36 +55329,29 @@ Clears the currently configured default parcel template for live rates.`,
55329
55329
  };
55330
55330
  });
55331
55331
 
55332
- // src/models/userparceltemplate.ts
55333
- var UserParcelTemplate$zodSchema;
55334
- var init_userparceltemplate = __esm(() => {
55332
+ // src/models/defaultparceltemplate.ts
55333
+ var TheFieldsOfAParcelTemplateBeforeSavingItToTheDb$zodSchema, DefaultParcelTemplate$zodSchema;
55334
+ var init_defaultparceltemplate = __esm(() => {
55335
55335
  init_zod();
55336
55336
  init_carrierparceltemplate();
55337
55337
  init_distanceunitenum();
55338
55338
  init_weightunitenum();
55339
- UserParcelTemplate$zodSchema = objectType({
55339
+ TheFieldsOfAParcelTemplateBeforeSavingItToTheDb$zodSchema = objectType({
55340
55340
  distance_unit: DistanceUnitEnum$zodSchema.optional(),
55341
55341
  height: stringType().optional(),
55342
55342
  length: stringType().optional(),
55343
55343
  name: stringType().optional(),
55344
- object_created: stringType().datetime({ offset: true }).optional(),
55344
+ object_created: stringType().optional(),
55345
55345
  object_id: stringType().optional(),
55346
55346
  object_owner: stringType().optional(),
55347
- object_updated: stringType().datetime({ offset: true }).optional(),
55347
+ object_updated: stringType().optional(),
55348
55348
  template: CarrierParcelTemplate$zodSchema.optional(),
55349
55349
  weight: stringType().optional(),
55350
55350
  weight_unit: WeightUnitEnum$zodSchema.optional(),
55351
55351
  width: stringType().optional()
55352
55352
  });
55353
- });
55354
-
55355
- // src/models/defaultparceltemplate.ts
55356
- var DefaultParcelTemplate$zodSchema;
55357
- var init_defaultparceltemplate = __esm(() => {
55358
- init_zod();
55359
- init_userparceltemplate();
55360
55353
  DefaultParcelTemplate$zodSchema = objectType({
55361
- result: UserParcelTemplate$zodSchema.optional()
55354
+ result: lazyType(() => TheFieldsOfAParcelTemplateBeforeSavingItToTheDb$zodSchema).nullable().optional()
55362
55355
  });
55363
55356
  });
55364
55357
 
@@ -56471,13 +56464,13 @@ var init_servicegroup = __esm(() => {
56471
56464
  description: stringType(),
56472
56465
  flat_rate: stringType().optional(),
56473
56466
  flat_rate_currency: stringType().optional(),
56474
- free_shipping_threshold_currency: stringType().optional(),
56475
- free_shipping_threshold_min: stringType().optional(),
56467
+ free_shipping_threshold_currency: stringType().nullable().optional(),
56468
+ free_shipping_threshold_min: stringType().nullable().optional(),
56476
56469
  is_active: booleanType().optional(),
56477
56470
  name: stringType(),
56478
56471
  object_id: stringType(),
56479
56472
  rate_adjustment: numberType().int().optional(),
56480
- service_levels: arrayType(ServiceGroupAccountAndServiceLevel$zodSchema),
56473
+ service_levels: arrayType(ServiceGroupAccountAndServiceLevel$zodSchema).nullable(),
56481
56474
  type: ServiceGroupTypeEnum$zodSchema
56482
56475
  });
56483
56476
  });
@@ -56509,8 +56502,8 @@ var init_servicegroupcreaterequest = __esm(() => {
56509
56502
  description: stringType(),
56510
56503
  flat_rate: stringType().optional(),
56511
56504
  flat_rate_currency: stringType().optional(),
56512
- free_shipping_threshold_currency: stringType().optional(),
56513
- free_shipping_threshold_min: stringType().optional(),
56505
+ free_shipping_threshold_currency: stringType().nullable().optional(),
56506
+ free_shipping_threshold_min: stringType().nullable().optional(),
56514
56507
  name: stringType(),
56515
56508
  rate_adjustment: numberType().int().optional(),
56516
56509
  service_levels: arrayType(ServiceGroupAccountAndServiceLevel$zodSchema),
@@ -56899,8 +56892,8 @@ var init_servicegroupupdaterequest = __esm(() => {
56899
56892
  description: stringType(),
56900
56893
  flat_rate: stringType().optional(),
56901
56894
  flat_rate_currency: stringType().optional(),
56902
- free_shipping_threshold_currency: stringType().optional(),
56903
- free_shipping_threshold_min: stringType().optional(),
56895
+ free_shipping_threshold_currency: stringType().nullable().optional(),
56896
+ free_shipping_threshold_min: stringType().nullable().optional(),
56904
56897
  is_active: booleanType(),
56905
56898
  name: stringType(),
56906
56899
  object_id: stringType(),
@@ -59438,6 +59431,29 @@ Test transactions will always show \`tracking_status: "UNKNOWN"\` because they d
59438
59431
  };
59439
59432
  });
59440
59433
 
59434
+ // src/models/userparceltemplate.ts
59435
+ var UserParcelTemplate$zodSchema;
59436
+ var init_userparceltemplate = __esm(() => {
59437
+ init_zod();
59438
+ init_carrierparceltemplate();
59439
+ init_distanceunitenum();
59440
+ init_weightunitenum();
59441
+ UserParcelTemplate$zodSchema = objectType({
59442
+ distance_unit: DistanceUnitEnum$zodSchema.optional(),
59443
+ height: stringType().optional(),
59444
+ length: stringType().optional(),
59445
+ name: stringType().optional(),
59446
+ object_created: stringType().optional(),
59447
+ object_id: stringType().optional(),
59448
+ object_owner: stringType().optional(),
59449
+ object_updated: stringType().optional(),
59450
+ template: CarrierParcelTemplate$zodSchema.optional(),
59451
+ weight: stringType().optional(),
59452
+ weight_unit: WeightUnitEnum$zodSchema.optional(),
59453
+ width: stringType().optional()
59454
+ });
59455
+ });
59456
+
59441
59457
  // src/models/createuserparceltemplateop.ts
59442
59458
  var CreateUserParcelTemplateGlobals$zodSchema, CreateUserParcelTemplateResponse$zodSchema;
59443
59459
  var init_createuserparceltemplateop = __esm(() => {
@@ -60626,10 +60642,14 @@ var init_webhookpaginatedlist = __esm(() => {
60626
60642
  });
60627
60643
 
60628
60644
  // src/models/listwebhooksop.ts
60629
- var ListWebhooksResponse$zodSchema;
60645
+ var RequestT$zodSchema, ListWebhooksRequest$zodSchema, ListWebhooksResponse$zodSchema;
60630
60646
  var init_listwebhooksop = __esm(() => {
60631
60647
  init_zod();
60632
60648
  init_webhookpaginatedlist();
60649
+ RequestT$zodSchema = objectType({});
60650
+ ListWebhooksRequest$zodSchema = objectType({
60651
+ request: lazyType(() => RequestT$zodSchema).optional()
60652
+ });
60633
60653
  ListWebhooksResponse$zodSchema = objectType({
60634
60654
  ContentType: stringType(),
60635
60655
  RawResponse: instanceOfType(Response),
@@ -60639,11 +60659,20 @@ var init_listwebhooksop = __esm(() => {
60639
60659
  });
60640
60660
 
60641
60661
  // src/funcs/webhooksList.ts
60642
- function webhooksList(client$, options) {
60643
- return new APIPromise($do69(client$, options));
60662
+ function webhooksList(client$, request, options) {
60663
+ return new APIPromise($do69(client$, request, options));
60644
60664
  }
60645
- async function $do69(client$, options) {
60665
+ async function $do69(client$, request, options) {
60666
+ const parsed$ = safeParse(request, (value$) => ListWebhooksRequest$zodSchema.optional().parse(value$), "Input validation failed");
60667
+ if (!parsed$.ok) {
60668
+ return [parsed$, { status: "invalid" }];
60669
+ }
60670
+ const payload$ = parsed$.value;
60671
+ const body$ = null;
60646
60672
  const path$ = pathToFunc("/webhooks")();
60673
+ const query$ = encodeFormQuery({
60674
+ request: payload$?.request
60675
+ });
60647
60676
  const headers$ = new Headers(compactMap({
60648
60677
  Accept: "application/json"
60649
60678
  }));
@@ -60671,6 +60700,8 @@ async function $do69(client$, options) {
60671
60700
  baseURL: options?.serverURL,
60672
60701
  path: path$,
60673
60702
  headers: headers$,
60703
+ query: query$,
60704
+ body: body$,
60674
60705
  userAgent: client$._options.userAgent,
60675
60706
  timeoutMs: options?.timeoutMs || client$._options.timeoutMs || -1
60676
60707
  }, options);
@@ -60697,8 +60728,10 @@ async function $do69(client$, options) {
60697
60728
  return [result$, { status: "complete", request: req$, response }];
60698
60729
  }
60699
60730
  var init_webhooksList = __esm(() => {
60731
+ init_encodings();
60700
60732
  init_matchers();
60701
60733
  init_primitives();
60734
+ init_schemas();
60702
60735
  init_security();
60703
60736
  init_url();
60704
60737
  init_listwebhooksop();
@@ -60706,10 +60739,14 @@ var init_webhooksList = __esm(() => {
60706
60739
  });
60707
60740
 
60708
60741
  // src/mcp-server/tools/webhooksList.ts
60709
- var tool$webhooksList;
60742
+ var args69, tool$webhooksList;
60710
60743
  var init_webhooksList2 = __esm(() => {
60711
60744
  init_webhooksList();
60745
+ init_listwebhooksop();
60712
60746
  init_tools();
60747
+ args69 = {
60748
+ request: ListWebhooksRequest$zodSchema.optional()
60749
+ };
60713
60750
  tool$webhooksList = {
60714
60751
  name: "webhooks-list",
60715
60752
  description: `List all webhooks
@@ -60722,8 +60759,9 @@ Returns a list of all webhooks you have created.`,
60722
60759
  openWorldHint: false,
60723
60760
  readOnlyHint: true
60724
60761
  },
60725
- tool: async (client, ctx) => {
60726
- const [result, apiCall] = await webhooksList(client, { fetchOptions: { signal: ctx.signal } }).$inspect();
60762
+ args: args69,
60763
+ tool: async (client, args70, ctx) => {
60764
+ const [result, apiCall] = await webhooksList(client, args70.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
60727
60765
  if (!result.ok) {
60728
60766
  return {
60729
60767
  content: [{ type: "text", text: result.error.message }],
@@ -60836,12 +60874,12 @@ var init_webhooksUpdate = __esm(() => {
60836
60874
  });
60837
60875
 
60838
60876
  // src/mcp-server/tools/webhooksUpdate.ts
60839
- var args69, tool$webhooksUpdate;
60877
+ var args70, tool$webhooksUpdate;
60840
60878
  var init_webhooksUpdate2 = __esm(() => {
60841
60879
  init_webhooksUpdate();
60842
60880
  init_updatewebhookop();
60843
60881
  init_tools();
60844
- args69 = {
60882
+ args70 = {
60845
60883
  request: UpdateWebhookRequest$zodSchema
60846
60884
  };
60847
60885
  tool$webhooksUpdate = {
@@ -60856,9 +60894,9 @@ Updates an existing webhook using the webhook object ID.`,
60856
60894
  openWorldHint: false,
60857
60895
  readOnlyHint: false
60858
60896
  },
60859
- args: args69,
60860
- tool: async (client, args70, ctx) => {
60861
- const [result, apiCall] = await webhooksUpdate(client, args70.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
60897
+ args: args70,
60898
+ tool: async (client, args71, ctx) => {
60899
+ const [result, apiCall] = await webhooksUpdate(client, args71.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
60862
60900
  if (!result.ok) {
60863
60901
  return {
60864
60902
  content: [{ type: "text", text: result.error.message }],
@@ -60875,7 +60913,7 @@ Updates an existing webhook using the webhook object ID.`,
60875
60913
  function createMCPServer(deps) {
60876
60914
  const server = new McpServer({
60877
60915
  name: "ShippoSDK",
60878
- version: "0.8.10"
60916
+ version: "0.8.29"
60879
60917
  });
60880
60918
  const getClient = deps.getSDK || (() => new ShippoSDKCore({
60881
60919
  security: deps.security,
@@ -60883,9 +60921,9 @@ function createMCPServer(deps) {
60883
60921
  serverURL: deps.serverURL,
60884
60922
  serverIdx: deps.serverIdx,
60885
60923
  debugLogger: deps.logger.level === "debug" ? {
60886
- log: (...args70) => console.log(...args70),
60887
- group: (...args70) => console.group(...args70),
60888
- groupEnd: (...args70) => console.groupEnd(...args70)
60924
+ log: (...args71) => console.log(...args71),
60925
+ group: (...args71) => console.group(...args71),
60926
+ groupEnd: (...args71) => console.groupEnd(...args71)
60889
60927
  } : undefined
60890
60928
  }));
60891
60929
  const scopes = new Set(deps.scopes);
@@ -62267,7 +62305,7 @@ var routes = ln({
62267
62305
  var app = _e(routes, {
62268
62306
  name: "mcp",
62269
62307
  versionInfo: {
62270
- currentVersion: "0.8.10"
62308
+ currentVersion: "0.8.29"
62271
62309
  }
62272
62310
  });
62273
62311
  Yt(app, process3.argv.slice(2), buildContext(process3));
@@ -62275,5 +62313,5 @@ export {
62275
62313
  app
62276
62314
  };
62277
62315
 
62278
- //# debugId=2AB6505FACAB72D464756E2164756E21
62316
+ //# debugId=03DCAAB44427054664756E2164756E21
62279
62317
  //# sourceMappingURL=mcp-server.js.map