@api-client/core 0.19.35 → 0.19.36

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@api-client/core",
3
3
  "description": "The API Client's core client library. Works in NodeJS and in a ES enabled browser.",
4
- "version": "0.19.35",
4
+ "version": "0.19.36",
5
5
  "license": "UNLICENSED",
6
6
  "exports": {
7
7
  "./browser.js": {
@@ -644,122 +644,6 @@ export class SdkMock {
644
644
  )
645
645
  },
646
646
  },
647
-
648
- deployments: {
649
- list: async (init?: MockListResult, options?: InterceptOptions): Promise<void> => {
650
- const { mock } = this
651
- const respond = this.createDefaultResponse(
652
- 200,
653
- { 'content-type': 'application/json' },
654
- () =>
655
- JSON.stringify({
656
- items: this.gen.deployments.deployments(init?.size ?? 5),
657
- cursor: this.createCursorOption(init),
658
- } as ContextListResult<DeploymentSchema>),
659
- init
660
- )
661
- await mock.add(
662
- {
663
- match: { uri: RouteBuilder.deployments(':oid'), methods: ['GET'] },
664
- respond,
665
- },
666
- options
667
- )
668
- },
669
-
670
- create: async (init?: MockResult, options?: InterceptOptions): Promise<void> => {
671
- const { mock } = this
672
- const respond = this.createDefaultResponse(
673
- 202,
674
- { 'content-type': 'application/json' },
675
- () => JSON.stringify(this.gen.deployments.deployment()),
676
- init
677
- )
678
- await mock.add(
679
- {
680
- match: { uri: RouteBuilder.deployments(':oid'), methods: ['POST'] },
681
- respond,
682
- },
683
- options
684
- )
685
- },
686
-
687
- read: async (init?: MockResult, options?: InterceptOptions): Promise<void> => {
688
- const { mock } = this
689
- const respond = this.createDefaultResponse(
690
- 200,
691
- { 'content-type': 'application/json' },
692
- () => JSON.stringify(this.gen.deployments.deployment()),
693
- init
694
- )
695
- await mock.add(
696
- {
697
- match: { uri: RouteBuilder.deployment(':oid', ':did'), methods: ['GET'] },
698
- respond,
699
- },
700
- options
701
- )
702
- },
703
-
704
- deactivate: async (init?: MockResult, options?: InterceptOptions): Promise<void> => {
705
- const { mock } = this
706
- const respond = this.createDefaultResponse(204, undefined, undefined, init)
707
- await mock.add(
708
- {
709
- match: { uri: RouteBuilder.deployment(':oid', ':did'), methods: ['DELETE'] },
710
- respond,
711
- },
712
- options
713
- )
714
- },
715
-
716
- apis: {
717
- listAllForApi: async (init?: MockListResult, options?: InterceptOptions): Promise<void> => {
718
- const { mock } = this
719
- const respond = this.createDefaultResponse(
720
- 200,
721
- { 'content-type': 'application/json' },
722
- () =>
723
- JSON.stringify({
724
- items: this.gen.deployments.deployments(init?.size ?? 3),
725
- cursor: this.createCursorOption(init),
726
- } as ContextListResult<DeploymentSchema>),
727
- init
728
- )
729
- await mock.add(
730
- {
731
- match: { uri: RouteBuilder.deploymentsApisByEnv(':oid', ':apiId'), methods: ['GET'] },
732
- respond,
733
- },
734
- options
735
- )
736
- },
737
-
738
- listForEnvironment: async (init?: MockListResult, options?: InterceptOptions): Promise<void> => {
739
- const { mock } = this
740
- const respond = this.createDefaultResponse(
741
- 200,
742
- { 'content-type': 'application/json' },
743
- () =>
744
- JSON.stringify({
745
- items: this.gen.deployments.deployments(init?.size ?? 5),
746
- cursor: this.createCursorOption(init),
747
- } as ContextListResult<DeploymentSchema>),
748
- init
749
- )
750
- await mock.add(
751
- {
752
- match: {
753
- uri: RouteBuilder.deploymentsApisForEnv(':oid', ':apiId', ':env' as unknown as DeploymentEnvironment),
754
- methods: ['GET'],
755
- },
756
- respond,
757
- },
758
- options
759
- )
760
- },
761
- },
762
- },
763
647
  }
764
648
 
765
649
  /**
@@ -1857,7 +1741,7 @@ export class SdkMock {
1857
1741
  options
1858
1742
  )
1859
1743
  },
1860
- listAllForEnv: async (init?: MockListResult, options?: InterceptOptions): Promise<void> => {
1744
+ listForEnvironment: async (init?: MockListResult, options?: InterceptOptions): Promise<void> => {
1861
1745
  const { mock } = this
1862
1746
  const respond = this.createDefaultResponse(
1863
1747
  200,