Skip to content

Commit 1e0430a

Browse files
fix(api): Update /v2/auth_rules/results endpoint parameter naming and action types
1 parent 8514a07 commit 1e0430a

File tree

3 files changed

+22
-21
lines changed

3 files changed

+22
-21
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 177
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-32c9a538495a2c820a7ca28c4f09cc1226642b8f7c9422ce1889aebd15e225ca.yml
3-
openapi_spec_hash: b6403689900263b73d4054a548f00285
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-fe39002b6b38eb33ba43532f28e317bdd4dbb5b0efd46fa098178cb6a544d585.yml
3+
openapi_spec_hash: 8ee7b837e77df089ca3359b5502c7525
44
config_hash: 693dddc4721eef512d75ab6c60897794

authrulev2.go

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ func (r *AuthRuleV2Service) Draft(ctx context.Context, authRuleToken string, bod
135135
// **Limitations:**
136136
//
137137
// - Results are available for the past 3 months only
138-
// - At least one filter (`event_uuid` or `auth_rule_token`) must be provided
139-
// - When filtering by `event_uuid`, pagination is not supported
138+
// - At least one filter (`event_token` or `auth_rule_token`) must be provided
139+
// - When filtering by `event_token`, pagination is not supported
140140
func (r *AuthRuleV2Service) ListResults(ctx context.Context, query AuthRuleV2ListResultsParams, opts ...option.RequestOption) (res *pagination.CursorPage[AuthRuleV2ListResultsResponse], err error) {
141141
var raw *http.Response
142142
opts = slices.Concat(r.Options, opts)
@@ -159,8 +159,8 @@ func (r *AuthRuleV2Service) ListResults(ctx context.Context, query AuthRuleV2Lis
159159
// **Limitations:**
160160
//
161161
// - Results are available for the past 3 months only
162-
// - At least one filter (`event_uuid` or `auth_rule_token`) must be provided
163-
// - When filtering by `event_uuid`, pagination is not supported
162+
// - At least one filter (`event_token` or `auth_rule_token`) must be provided
163+
// - When filtering by `event_token`, pagination is not supported
164164
func (r *AuthRuleV2Service) ListResultsAutoPaging(ctx context.Context, query AuthRuleV2ListResultsParams, opts ...option.RequestOption) *pagination.CursorPageAutoPager[AuthRuleV2ListResultsResponse] {
165165
return pagination.NewCursorPageAutoPager(r.ListResults(ctx, query, opts...))
166166
}
@@ -3008,7 +3008,7 @@ func (r *AuthRuleV2ListResultsResponseAction) UnmarshalJSON(data []byte) (err er
30083008
//
30093009
// Possible runtime types of the union are
30103010
// [AuthRuleV2ListResultsResponseActionsAuthorizationAction],
3011-
// [AuthRuleV2ListResultsResponseActionsThreeDSAction],
3011+
// [AuthRuleV2ListResultsResponseActionsAuthentication3DSAction],
30123012
// [AuthRuleV2ListResultsResponseActionsDeclineAction],
30133013
// [AuthRuleV2ListResultsResponseActionsRequireTfaAction],
30143014
// [AuthRuleV2ListResultsResponseActionsApproveAction],
@@ -3018,7 +3018,7 @@ func (r AuthRuleV2ListResultsResponseAction) AsUnion() AuthRuleV2ListResultsResp
30183018
}
30193019

30203020
// Union satisfied by [AuthRuleV2ListResultsResponseActionsAuthorizationAction],
3021-
// [AuthRuleV2ListResultsResponseActionsThreeDSAction],
3021+
// [AuthRuleV2ListResultsResponseActionsAuthentication3DSAction],
30223022
// [AuthRuleV2ListResultsResponseActionsDeclineAction],
30233023
// [AuthRuleV2ListResultsResponseActionsRequireTfaAction],
30243024
// [AuthRuleV2ListResultsResponseActionsApproveAction] or
@@ -3037,7 +3037,7 @@ func init() {
30373037
},
30383038
apijson.UnionVariant{
30393039
TypeFilter: gjson.JSON,
3040-
Type: reflect.TypeOf(AuthRuleV2ListResultsResponseActionsThreeDSAction{}),
3040+
Type: reflect.TypeOf(AuthRuleV2ListResultsResponseActionsAuthentication3DSAction{}),
30413041
},
30423042
apijson.UnionVariant{
30433043
TypeFilter: gjson.JSON,
@@ -3084,29 +3084,30 @@ func (r authRuleV2ListResultsResponseActionsAuthorizationActionJSON) RawJSON() s
30843084
func (r AuthRuleV2ListResultsResponseActionsAuthorizationAction) implementsAuthRuleV2ListResultsResponseAction() {
30853085
}
30863086

3087-
type AuthRuleV2ListResultsResponseActionsThreeDSAction struct {
3087+
type AuthRuleV2ListResultsResponseActionsAuthentication3DSAction struct {
30883088
// Optional explanation for why this action was taken
3089-
Explanation string `json:"explanation"`
3090-
JSON authRuleV2ListResultsResponseActionsThreeDSActionJSON `json:"-"`
3089+
Explanation string `json:"explanation"`
3090+
JSON authRuleV2ListResultsResponseActionsAuthentication3DsActionJSON `json:"-"`
30913091
}
30923092

3093-
// authRuleV2ListResultsResponseActionsThreeDSActionJSON contains the JSON metadata
3094-
// for the struct [AuthRuleV2ListResultsResponseActionsThreeDSAction]
3095-
type authRuleV2ListResultsResponseActionsThreeDSActionJSON struct {
3093+
// authRuleV2ListResultsResponseActionsAuthentication3DsActionJSON contains the
3094+
// JSON metadata for the struct
3095+
// [AuthRuleV2ListResultsResponseActionsAuthentication3DSAction]
3096+
type authRuleV2ListResultsResponseActionsAuthentication3DsActionJSON struct {
30963097
Explanation apijson.Field
30973098
raw string
30983099
ExtraFields map[string]apijson.Field
30993100
}
31003101

3101-
func (r *AuthRuleV2ListResultsResponseActionsThreeDSAction) UnmarshalJSON(data []byte) (err error) {
3102+
func (r *AuthRuleV2ListResultsResponseActionsAuthentication3DSAction) UnmarshalJSON(data []byte) (err error) {
31023103
return apijson.UnmarshalRoot(data, r)
31033104
}
31043105

3105-
func (r authRuleV2ListResultsResponseActionsThreeDSActionJSON) RawJSON() string {
3106+
func (r authRuleV2ListResultsResponseActionsAuthentication3DsActionJSON) RawJSON() string {
31063107
return r.raw
31073108
}
31083109

3109-
func (r AuthRuleV2ListResultsResponseActionsThreeDSAction) implementsAuthRuleV2ListResultsResponseAction() {
3110+
func (r AuthRuleV2ListResultsResponseActionsAuthentication3DSAction) implementsAuthRuleV2ListResultsResponseAction() {
31103111
}
31113112

31123113
type AuthRuleV2ListResultsResponseActionsDeclineAction struct {
@@ -4517,8 +4518,8 @@ type AuthRuleV2ListResultsParams struct {
45174518
// A cursor representing an item's token before which a page of results should end.
45184519
// Used to retrieve the previous page of results before this item.
45194520
EndingBefore param.Field[string] `query:"ending_before" format:"uuid"`
4520-
// Filter by event UUID
4521-
EventUuid param.Field[string] `query:"event_uuid" format:"uuid"`
4521+
// Filter by event token
4522+
EventToken param.Field[string] `query:"event_token" format:"uuid"`
45224523
// Filter by whether the rule evaluation produced any actions. When not provided,
45234524
// all results are returned.
45244525
HasActions param.Field[bool] `query:"has_actions"`

authrulev2_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ func TestAuthRuleV2ListResultsWithOptionalParams(t *testing.T) {
138138
_, err := client.AuthRules.V2.ListResults(context.TODO(), lithic.AuthRuleV2ListResultsParams{
139139
AuthRuleToken: lithic.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
140140
EndingBefore: lithic.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
141-
EventUuid: lithic.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
141+
EventToken: lithic.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),
142142
HasActions: lithic.F(true),
143143
PageSize: lithic.F(int64(1)),
144144
StartingAfter: lithic.F("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"),

0 commit comments

Comments
 (0)