Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/resources/builds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,20 @@ export interface CreateBuildOptions {
appBuildSourceId?: string;
appCertificateId?: string;
appCertificateName?: string;
/**
* @deprecated Use {@link CreateBuildOptions.appChannelIds} instead.
*/
appChannelId?: string;
/**
* The ids of the channels the build is deployed to after it succeeds. Web
* only.
*/
appChannelIds?: string[];
/**
* The names of the channels the build is deployed to after it succeeds.
* Web only.
*/
appChannelNames?: string[];
/**
* The id of the configuration to overwrite the native app configuration with.
*/
Expand Down
14 changes: 14 additions & 0 deletions test/resources.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,20 @@ describe('resources', () => {
});
});

it('creates a build with channel ids', async () => {
const { getLastRequest } = mockFetchJson({ id: 'build-1' });
const client = new CapawesomeCloud({ token: 't' });

await client.apps.builds.create({
appId: 'app-1',
appChannelIds: ['channel-1', 'channel-2'],
});

expect(JSON.parse(getLastRequest().init.body as string)).toEqual({
appChannelIds: ['channel-1', 'channel-2'],
});
});

it('filters environments by name', async () => {
const { getLastRequest } = mockFetchJson([]);
const client = new CapawesomeCloud({ token: 't' });
Expand Down