@api-client/core 0.19.37 → 0.19.39

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.37",
4
+ "version": "0.19.39",
5
5
  "license": "UNLICENSED",
6
6
  "exports": {
7
7
  "./browser.js": {
@@ -38,19 +38,19 @@ export interface DeploymentApi {
38
38
  apiSlug: string
39
39
  }
40
40
 
41
- export interface DeploymentLatestEnvironments {
41
+ export interface DeploymentLatestEnvironments extends Partial<Record<DeploymentEnvironment, DeploymentSchema>> {
42
42
  /**
43
43
  * Latest production deployment (if any).
44
44
  */
45
- prod?: DeploymentSchema
45
+ [DeploymentEnvironment.PROD]?: DeploymentSchema
46
46
  /**
47
47
  * Latest staging environment deployment (if any).
48
48
  */
49
- stage?: DeploymentSchema
49
+ [DeploymentEnvironment.STAGING]?: DeploymentSchema
50
50
  /**
51
51
  * Latest development environment deployment (if any).
52
52
  */
53
- dev?: DeploymentSchema
53
+ [DeploymentEnvironment.DEV]?: DeploymentSchema
54
54
  }
55
55
 
56
56
  export interface DeploymentLatestEnvironmentsResponse {
@@ -1515,7 +1515,7 @@ export class SdkMock {
1515
1515
  const filter = this.decodeFilter(query.filter)
1516
1516
  const schema: Partial<DeploymentSchema> = {}
1517
1517
  if (isAtomicFilter(filter)) {
1518
- if (['apiId', 'api_id'].includes(filter.field)) {
1518
+ if (filter.field === 'fid') {
1519
1519
  if (filter.operator === 'eq') {
1520
1520
  schema.apiId = filter.value as string
1521
1521
  }
@@ -1650,7 +1650,7 @@ export class SdkMock {
1650
1650
  },
1651
1651
  apis: {
1652
1652
  getLatestPerEnvironment: async (
1653
- init?: MockResult & { prod?: boolean; stage?: boolean; dev?: boolean },
1653
+ init?: MockResult & { prod?: boolean; staging?: boolean; dev?: boolean },
1654
1654
  options?: InterceptOptions
1655
1655
  ): Promise<void> => {
1656
1656
  const { mock } = this
@@ -1662,14 +1662,14 @@ export class SdkMock {
1662
1662
  data: {},
1663
1663
  }
1664
1664
  const hasProd = init?.prod ?? this.gen.faker.datatype.boolean()
1665
- const hasStage = init?.stage ?? this.gen.faker.datatype.boolean()
1665
+ const hasStaging = init?.staging ?? this.gen.faker.datatype.boolean()
1666
1666
  const hasDev = init?.dev ?? this.gen.faker.datatype.boolean()
1667
1667
 
1668
1668
  if (hasProd) {
1669
1669
  obj.data.prod = this.gen.deployments.deployment()
1670
1670
  }
1671
- if (hasStage) {
1672
- obj.data.stage = this.gen.deployments.deployment()
1671
+ if (hasStaging) {
1672
+ obj.data.staging = this.gen.deployments.deployment()
1673
1673
  }
1674
1674
  if (hasDev) {
1675
1675
  obj.data.dev = this.gen.deployments.deployment()