Skip to content

Commit b8de4ec

Browse files
feat(api): api update
1 parent 3c2c3c2 commit b8de4ec

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 32
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-2bf2b44f6593c44b2948683469bbb2b09cd8e90c97b12057fac6220cf0d2eee7.yml
3-
openapi_spec_hash: ae8b5109ec997cac8d3e6ec96040f6c8
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-91f4286859fc23813c5255b877395c87dd81520c3913fdfdae3cfa343e1a4873.yml
3+
openapi_spec_hash: 71746b5b65f20617ee021e071d5f7f92
44
config_hash: 70e7e80b5e87f94981bee396c6cd41e8

pkg/cmd/monitor_test.go

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func TestMonitorsCreate(t *testing.T) {
1717
"--api-key", "string",
1818
"monitors", "create",
1919
"--name", "Acme pricing page",
20-
"--target", "{type: page, url: https://acme.com/pricing, normalize_whitespace: true}",
20+
"--target", "{type: page, url: https://acme.com/pricing, instructions: 'Report pricing or plan availability changes. Ignore counters, timestamps, testimonials, and navigation.', normalize_whitespace: true}",
2121
"--change-detection", "{type: exact}",
2222
"--mode", "web",
2323
"--schedule", "{frequency: 6, type: interval, unit: hours}",
@@ -37,7 +37,7 @@ func TestMonitorsCreate(t *testing.T) {
3737
"--api-key", "string",
3838
"monitors", "create",
3939
"--name", "Acme pricing page",
40-
"--target", "{type: page, url: https://acme.com/pricing, normalize_whitespace: true}",
40+
"--target", "{type: page, url: https://acme.com/pricing, instructions: 'Report pricing or plan availability changes. Ignore counters, timestamps, testimonials, and navigation.', normalize_whitespace: true}",
4141
"--change-detection", "{type: exact}",
4242
"--mode", "web",
4343
"--schedule.frequency", "6",
@@ -57,6 +57,9 @@ func TestMonitorsCreate(t *testing.T) {
5757
"target:\n" +
5858
" type: page\n" +
5959
" url: https://acme.com/pricing\n" +
60+
" instructions: >-\n" +
61+
" Report pricing or plan availability changes. Ignore counters, timestamps,\n" +
62+
" testimonials, and navigation.\n" +
6063
" normalize_whitespace: true\n" +
6164
"change_detection:\n" +
6265
" type: exact\n" +
@@ -107,7 +110,7 @@ func TestMonitorsUpdate(t *testing.T) {
107110
"--status", "active",
108111
"--tag", "pricing",
109112
"--tag", "competitor",
110-
"--target", "{type: page, url: https://acme.com/pricing, normalize_whitespace: true}",
113+
"--target", "{type: page, url: https://acme.com/pricing, instructions: 'Report pricing or plan availability changes. Ignore counters, timestamps, testimonials, and navigation.', normalize_whitespace: true}",
111114
"--webhook", "{url: https://example.com/webhook, events: [change.detected, run.completed]}",
112115
)
113116
})
@@ -130,7 +133,7 @@ func TestMonitorsUpdate(t *testing.T) {
130133
"--status", "active",
131134
"--tag", "pricing",
132135
"--tag", "competitor",
133-
"--target", "{type: page, url: https://acme.com/pricing, normalize_whitespace: true}",
136+
"--target", "{type: page, url: https://acme.com/pricing, instructions: 'Report pricing or plan availability changes. Ignore counters, timestamps, testimonials, and navigation.', normalize_whitespace: true}",
134137
"--webhook.url", "https://example.com/webhook",
135138
"--webhook.events", "[change.detected, run.completed]",
136139
)
@@ -153,6 +156,9 @@ func TestMonitorsUpdate(t *testing.T) {
153156
"target:\n" +
154157
" type: page\n" +
155158
" url: https://acme.com/pricing\n" +
159+
" instructions: >-\n" +
160+
" Report pricing or plan availability changes. Ignore counters, timestamps,\n" +
161+
" testimonials, and navigation.\n" +
156162
" normalize_whitespace: true\n" +
157163
"webhook:\n" +
158164
" url: https://example.com/webhook\n" +

0 commit comments

Comments
 (0)