Skip to content

chore: rebuild project due to codegen change #523

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 18, 2024
Merged
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
8 changes: 1 addition & 7 deletions tests/api-resources/data/dimensions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,7 @@ describe('resource dimensions', () => {
await expect(
client.data.dimensions.listValues(
'abcd1234',
{
filters: ['string', 'string', 'string'],
limit: 0,
metric_filters: ['string', 'string', 'string'],
page: 0,
timeframe: ['string', 'string', 'string'],
},
{ filters: ['string'], limit: 0, metric_filters: ['string'], page: 0, timeframe: ['string'] },
{ path: '/_stainless_unknown_path' },
),
).rejects.toThrow(Mux.NotFoundError);
Expand Down
6 changes: 1 addition & 5 deletions tests/api-resources/data/errors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,7 @@ describe('resource errors', () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
client.data.errors.list(
{
filters: ['string', 'string', 'string'],
metric_filters: ['string', 'string', 'string'],
timeframe: ['string', 'string', 'string'],
},
{ filters: ['string'], metric_filters: ['string'], timeframe: ['string'] },
{ path: '/_stainless_unknown_path' },
),
).rejects.toThrow(Mux.NotFoundError);
Expand Down
7 changes: 1 addition & 6 deletions tests/api-resources/data/filters.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,7 @@ describe('resource filters', () => {
await expect(
client.data.filters.listValues(
'abcd1234',
{
filters: ['string', 'string', 'string'],
limit: 0,
page: 0,
timeframe: ['string', 'string', 'string'],
},
{ filters: ['string'], limit: 0, page: 0, timeframe: ['string'] },
{ path: '/_stainless_unknown_path' },
),
).rejects.toThrow(Mux.NotFoundError);
Expand Down
31 changes: 13 additions & 18 deletions tests/api-resources/data/metrics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ describe('resource metrics', () => {
client.data.metrics.list(
{
dimension: 'asn',
filters: ['string', 'string', 'string'],
metric_filters: ['string', 'string', 'string'],
timeframe: ['string', 'string', 'string'],
filters: ['string'],
metric_filters: ['string'],
timeframe: ['string'],
value: 'value',
},
{ path: '/_stainless_unknown_path' },
Expand Down Expand Up @@ -68,11 +68,11 @@ describe('resource metrics', () => {
client.data.metrics.getInsights(
'aggregate_startup_time',
{
filters: ['string', 'string', 'string'],
filters: ['string'],
measurement: '95th',
metric_filters: ['string', 'string', 'string'],
metric_filters: ['string'],
order_direction: 'asc',
timeframe: ['string', 'string', 'string'],
timeframe: ['string'],
},
{ path: '/_stainless_unknown_path' },
),
Expand Down Expand Up @@ -102,12 +102,7 @@ describe('resource metrics', () => {
await expect(
client.data.metrics.getOverallValues(
'aggregate_startup_time',
{
filters: ['string', 'string', 'string'],
measurement: '95th',
metric_filters: ['string', 'string', 'string'],
timeframe: ['string', 'string', 'string'],
},
{ filters: ['string'], measurement: '95th', metric_filters: ['string'], timeframe: ['string'] },
{ path: '/_stainless_unknown_path' },
),
).rejects.toThrow(Mux.NotFoundError);
Expand Down Expand Up @@ -137,12 +132,12 @@ describe('resource metrics', () => {
client.data.metrics.getTimeseries(
'aggregate_startup_time',
{
filters: ['string', 'string', 'string'],
filters: ['string'],
group_by: 'minute',
measurement: '95th',
metric_filters: ['string', 'string', 'string'],
metric_filters: ['string'],
order_direction: 'asc',
timeframe: ['string', 'string', 'string'],
timeframe: ['string'],
},
{ path: '/_stainless_unknown_path' },
),
Expand Down Expand Up @@ -173,15 +168,15 @@ describe('resource metrics', () => {
client.data.metrics.listBreakdownValues(
'aggregate_startup_time',
{
filters: ['string', 'string', 'string'],
filters: ['string'],
group_by: 'asn',
limit: 0,
measurement: '95th',
metric_filters: ['string', 'string', 'string'],
metric_filters: ['string'],
order_by: 'negative_impact',
order_direction: 'asc',
page: 0,
timeframe: ['string', 'string', 'string'],
timeframe: ['string'],
},
{ path: '/_stainless_unknown_path' },
),
Expand Down
10 changes: 5 additions & 5 deletions tests/api-resources/data/monitoring/metrics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe('resource metrics', () => {
'current-concurrent-viewers',
{
dimension: 'asn',
filters: ['string', 'string', 'string'],
filters: ['string'],
order_by: 'negative_impact',
order_direction: 'asc',
timestamp: 0,
Expand Down Expand Up @@ -94,11 +94,11 @@ describe('resource metrics', () => {
'current-concurrent-viewers',
{
dimension: 'asn',
filters: ['string', 'string', 'string'],
filters: ['string'],
limit: 0,
order_by: 'negative_impact',
order_direction: 'asc',
timeframe: ['string', 'string', 'string'],
timeframe: ['string'],
},
{ path: '/_stainless_unknown_path' },
),
Expand Down Expand Up @@ -130,7 +130,7 @@ describe('resource metrics', () => {
await expect(
client.data.monitoring.metrics.getHistogramTimeseries(
'video-startup-time',
{ filters: ['string', 'string', 'string'] },
{ filters: ['string'] },
{ path: '/_stainless_unknown_path' },
),
).rejects.toThrow(Mux.NotFoundError);
Expand Down Expand Up @@ -161,7 +161,7 @@ describe('resource metrics', () => {
await expect(
client.data.monitoring.metrics.getTimeseries(
'current-concurrent-viewers',
{ filters: ['string', 'string', 'string'], timestamp: 0 },
{ filters: ['string'], timestamp: 0 },
{ path: '/_stainless_unknown_path' },
),
).rejects.toThrow(Mux.NotFoundError);
Expand Down
6 changes: 3 additions & 3 deletions tests/api-resources/data/real-time.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe('resource realTime', () => {
'current-concurrent-viewers',
{
dimension: 'asn',
filters: ['string', 'string', 'string'],
filters: ['string'],
order_by: 'negative_impact',
order_direction: 'asc',
timestamp: 0,
Expand Down Expand Up @@ -108,7 +108,7 @@ describe('resource realTime', () => {
await expect(
client.data.realTime.retrieveHistogramTimeseries(
'video-startup-time',
{ filters: ['string', 'string', 'string'] },
{ filters: ['string'] },
{ path: '/_stainless_unknown_path' },
),
).rejects.toThrow(Mux.NotFoundError);
Expand Down Expand Up @@ -139,7 +139,7 @@ describe('resource realTime', () => {
await expect(
client.data.realTime.retrieveTimeseries(
'current-concurrent-viewers',
{ filters: ['string', 'string', 'string'], timestamp: 0 },
{ filters: ['string'], timestamp: 0 },
{ path: '/_stainless_unknown_path' },
),
).rejects.toThrow(Mux.NotFoundError);
Expand Down
6 changes: 3 additions & 3 deletions tests/api-resources/data/video-views.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ describe('resource videoViews', () => {
client.data.videoViews.list(
{
error_id: 0,
filters: ['string', 'string', 'string'],
filters: ['string'],
limit: 0,
metric_filters: ['string', 'string', 'string'],
metric_filters: ['string'],
order_direction: 'asc',
page: 0,
timeframe: ['string', 'string', 'string'],
timeframe: ['string'],
viewer_id: 'viewer_id',
},
{ path: '/_stainless_unknown_path' },
Expand Down
12 changes: 2 additions & 10 deletions tests/api-resources/video/assets.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@ describe('resource assets', () => {
{
closed_captions: true,
end_time: 0,
generated_subtitles: [
{ language_code: 'en', name: 'name', passthrough: 'passthrough' },
{ language_code: 'en', name: 'name', passthrough: 'passthrough' },
{ language_code: 'en', name: 'name', passthrough: 'passthrough' },
],
generated_subtitles: [{ language_code: 'en', name: 'name', passthrough: 'passthrough' }],
language_code: 'language_code',
name: 'name',
overlay_settings: {
Expand All @@ -50,11 +46,7 @@ describe('resource assets', () => {
url: 'https://muxed.s3.amazonaws.com/leds.mp4',
},
],
advanced_playback_policies: [
{ drm_configuration_id: 'drm_configuration_id', policy: 'public' },
{ drm_configuration_id: 'drm_configuration_id', policy: 'public' },
{ drm_configuration_id: 'drm_configuration_id', policy: 'public' },
],
advanced_playback_policies: [{ drm_configuration_id: 'drm_configuration_id', policy: 'public' }],
encoding_tier: 'smart',
master_access: 'none',
max_resolution_tier: '1080p',
Expand Down
8 changes: 1 addition & 7 deletions tests/api-resources/video/delivery-usage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,7 @@ describe('resource deliveryUsage', () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
client.video.deliveryUsage.list(
{
asset_id: 'asset_id',
limit: 0,
live_stream_id: 'live_stream_id',
page: 0,
timeframe: ['string', 'string', 'string'],
},
{ asset_id: 'asset_id', limit: 0, live_stream_id: 'live_stream_id', page: 0, timeframe: ['string'] },
{ path: '/_stainless_unknown_path' },
),
).rejects.toThrow(Mux.NotFoundError);
Expand Down
4 changes: 2 additions & 2 deletions tests/api-resources/video/playback-restrictions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ describe('resource playbackRestrictions', () => {

test('updateReferrer: only required params', async () => {
const responsePromise = client.video.playbackRestrictions.updateReferrer('PLAYBACK_RESTRICTION_ID', {
allowed_domains: ['string', 'string', 'string'],
allowed_domains: ['string'],
});
const rawResponse = await responsePromise.asResponse();
expect(rawResponse).toBeInstanceOf(Response);
Expand All @@ -111,7 +111,7 @@ describe('resource playbackRestrictions', () => {

test('updateReferrer: required and optional params', async () => {
const response = await client.video.playbackRestrictions.updateReferrer('PLAYBACK_RESTRICTION_ID', {
allowed_domains: ['string', 'string', 'string'],
allowed_domains: ['string'],
allow_no_referrer: true,
});
});
Expand Down
62 changes: 2 additions & 60 deletions tests/api-resources/video/uploads.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,71 +25,13 @@ describe('resource uploads', () => {
const response = await client.video.uploads.create({
cors_origin: 'https://example.com/',
new_asset_settings: {
advanced_playback_policies: [
{ drm_configuration_id: 'drm_configuration_id', policy: 'public' },
{ drm_configuration_id: 'drm_configuration_id', policy: 'public' },
{ drm_configuration_id: 'drm_configuration_id', policy: 'public' },
],
advanced_playback_policies: [{ drm_configuration_id: 'drm_configuration_id', policy: 'public' }],
encoding_tier: 'smart',
input: [
{
closed_captions: true,
end_time: 0,
generated_subtitles: [
{ language_code: 'en', name: 'name', passthrough: 'passthrough' },
{ language_code: 'en', name: 'name', passthrough: 'passthrough' },
{ language_code: 'en', name: 'name', passthrough: 'passthrough' },
],
language_code: 'language_code',
name: 'name',
overlay_settings: {
height: 'height',
horizontal_align: 'left',
horizontal_margin: 'horizontal_margin',
opacity: 'opacity',
vertical_align: 'top',
vertical_margin: 'vertical_margin',
width: 'width',
},
passthrough: 'passthrough',
start_time: 0,
text_type: 'subtitles',
type: 'video',
url: 'url',
},
{
closed_captions: true,
end_time: 0,
generated_subtitles: [
{ language_code: 'en', name: 'name', passthrough: 'passthrough' },
{ language_code: 'en', name: 'name', passthrough: 'passthrough' },
{ language_code: 'en', name: 'name', passthrough: 'passthrough' },
],
language_code: 'language_code',
name: 'name',
overlay_settings: {
height: 'height',
horizontal_align: 'left',
horizontal_margin: 'horizontal_margin',
opacity: 'opacity',
vertical_align: 'top',
vertical_margin: 'vertical_margin',
width: 'width',
},
passthrough: 'passthrough',
start_time: 0,
text_type: 'subtitles',
type: 'video',
url: 'url',
},
{
closed_captions: true,
end_time: 0,
generated_subtitles: [
{ language_code: 'en', name: 'name', passthrough: 'passthrough' },
{ language_code: 'en', name: 'name', passthrough: 'passthrough' },
{ language_code: 'en', name: 'name', passthrough: 'passthrough' },
],
generated_subtitles: [{ language_code: 'en', name: 'name', passthrough: 'passthrough' }],
language_code: 'language_code',
name: 'name',
overlay_settings: {
Expand Down