@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/build/src/sdk/DeploymentsSdk.d.ts +4 -4
- package/build/src/sdk/DeploymentsSdk.d.ts.map +1 -1
- package/build/src/sdk/DeploymentsSdk.js.map +1 -1
- package/build/src/sdk/SdkMock.d.ts +1 -1
- package/build/src/sdk/SdkMock.d.ts.map +1 -1
- package/build/src/sdk/SdkMock.js +4 -4
- package/build/src/sdk/SdkMock.js.map +1 -1
- package/build/src/sdk/index.d.ts +1 -0
- package/build/src/sdk/index.d.ts.map +1 -1
- package/build/src/sdk/index.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/sdk/DeploymentsSdk.ts +4 -4
- package/src/sdk/SdkMock.ts +5 -5
package/package.json
CHANGED
|
@@ -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
|
-
|
|
45
|
+
[DeploymentEnvironment.PROD]?: DeploymentSchema
|
|
46
46
|
/**
|
|
47
47
|
* Latest staging environment deployment (if any).
|
|
48
48
|
*/
|
|
49
|
-
|
|
49
|
+
[DeploymentEnvironment.STAGING]?: DeploymentSchema
|
|
50
50
|
/**
|
|
51
51
|
* Latest development environment deployment (if any).
|
|
52
52
|
*/
|
|
53
|
-
|
|
53
|
+
[DeploymentEnvironment.DEV]?: DeploymentSchema
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
export interface DeploymentLatestEnvironmentsResponse {
|
package/src/sdk/SdkMock.ts
CHANGED
|
@@ -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 (
|
|
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;
|
|
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
|
|
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 (
|
|
1672
|
-
obj.data.
|
|
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()
|