Skip to content

fix: azion api v4 related changes #168

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 6 commits into from
Jun 3, 2025
Merged
Show file tree
Hide file tree
Changes from 4 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
4 changes: 2 additions & 2 deletions packages/applications/src/rules-engine/services/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export interface Criterion {
variable: string;
operator: string;
conditional: 'if' | 'and' | 'or';
input_value: string;
argument: string;
}

export interface ApiCreateRulePayload {
Expand Down Expand Up @@ -107,7 +107,7 @@ export interface Criterion {
variable: string;
operator: string;
conditional: 'if' | 'and' | 'or';
input_value: string;
argument: string;
}

export interface ApiCreateRulePayload {
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export interface AzionClient {
* const { data: newRule } = await app.rules.request.createRule({
* data: {
* name: 'My Rule',
* behaviors: [{ name: 'set_origin', target: newOrigin.id }],
* behaviors: [{ name: 'set_origin', argument: newOrigin.id }],
* criteria: [{ condition: 'starts_with', variable: '${uri}', input: '/api' }]
* }
* });
Expand Down
6 changes: 3 additions & 3 deletions packages/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ const config = defineConfig({
variable: 'remote_addr',
operator: 'in',
conditional: 'if',
inputValue: 'suspicious_ips',
argument: 'suspicious_ips',
},
],
behavior: {
Expand All @@ -145,7 +145,7 @@ const config = defineConfig({
variable: 'uri',
operator: 'starts_with',
conditional: 'if',
inputValue: '/api/',
argument: '/api/',
},
],
behavior: {
Expand Down Expand Up @@ -597,7 +597,7 @@ Type definition for the response rule configuration.
- `variable: RuleVariable` - Variable to be evaluated.
- `conditional: RuleConditional` - Conditional type.
- `operator: RuleOperatorWithValue | RuleOperatorWithoutValue` - Comparison operator.
- `inputValue?: string` - Input value for comparison (required for operators with value).
- `argument?: string` - Input value for comparison (required for operators with value).

### `AzionWaf`

Expand Down
Loading