From 805e7ab40eaf27c0afe4e2cc2f3cc54d63c8c456 Mon Sep 17 00:00:00 2001 From: pritishmd-talentica Date: Wed, 25 Feb 2026 10:39:04 +0530 Subject: [PATCH 1/7] RM-1477 : Added a new adapter for adsmartx --- adapters/adsmartx/adsmartx.go | 136 +++++++++++++++ adapters/adsmartx/adsmartx_test.go | 164 ++++++++++++++++++ .../exemplary/banner_bid_floor_set.json | 36 ++++ .../exemplary/imp_banner_and_video.json | 108 ++++++++++++ .../exemplary/multiple_seatbids_bids.json | 102 +++++++++++ .../adsmartxtest/exemplary/simple_banner.json | 119 +++++++++++++ .../adsmartxtest/exemplary/simple_video.json | 109 ++++++++++++ .../adsmartxtest/exemplary/test_mode_set.json | 82 +++++++++ .../supplemental/bad_media_type.json | 89 ++++++++++ .../supplemental/bad_response.json | 40 +++++ .../supplemental/imp_no_banner_no_video.json | 21 +++ .../supplemental/invalid_imp_ext.json | 22 +++ .../supplemental/no_valid_impressions.json | 12 ++ .../adsmartxtest/supplemental/status_204.json | 35 ++++ .../supplemental/status_not_200.json | 40 +++++ adapters/adsmartx/params_test.go | 59 +++++++ exchange/adapter_builders.go | 2 + openrtb_ext/bidders.go | 2 + openrtb_ext/imp_adsmartx.go | 8 + static/bidder-info/adsmartx.yaml | 20 +++ static/bidder-params/adsmartx.json | 29 ++++ 21 files changed, 1235 insertions(+) create mode 100644 adapters/adsmartx/adsmartx.go create mode 100644 adapters/adsmartx/adsmartx_test.go create mode 100644 adapters/adsmartx/adsmartxtest/exemplary/banner_bid_floor_set.json create mode 100644 adapters/adsmartx/adsmartxtest/exemplary/imp_banner_and_video.json create mode 100644 adapters/adsmartx/adsmartxtest/exemplary/multiple_seatbids_bids.json create mode 100644 adapters/adsmartx/adsmartxtest/exemplary/simple_banner.json create mode 100644 adapters/adsmartx/adsmartxtest/exemplary/simple_video.json create mode 100644 adapters/adsmartx/adsmartxtest/exemplary/test_mode_set.json create mode 100644 adapters/adsmartx/adsmartxtest/supplemental/bad_media_type.json create mode 100644 adapters/adsmartx/adsmartxtest/supplemental/bad_response.json create mode 100644 adapters/adsmartx/adsmartxtest/supplemental/imp_no_banner_no_video.json create mode 100644 adapters/adsmartx/adsmartxtest/supplemental/invalid_imp_ext.json create mode 100644 adapters/adsmartx/adsmartxtest/supplemental/no_valid_impressions.json create mode 100644 adapters/adsmartx/adsmartxtest/supplemental/status_204.json create mode 100644 adapters/adsmartx/adsmartxtest/supplemental/status_not_200.json create mode 100644 adapters/adsmartx/params_test.go create mode 100644 openrtb_ext/imp_adsmartx.go create mode 100644 static/bidder-info/adsmartx.yaml create mode 100644 static/bidder-params/adsmartx.json diff --git a/adapters/adsmartx/adsmartx.go b/adapters/adsmartx/adsmartx.go new file mode 100644 index 00000000000..1025dc21958 --- /dev/null +++ b/adapters/adsmartx/adsmartx.go @@ -0,0 +1,136 @@ +package adsmartx + +import ( + "fmt" + "net/http" + + "github.com/prebid/openrtb/v20/openrtb2" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" +) + +type adapter struct { + endpoint string +} + +func Builder(_ openrtb_ext.BidderName, cfg config.Adapter, _ config.Server) (adapters.Bidder, error) { + return &adapter{endpoint: cfg.Endpoint}, nil +} + +func (a *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.ExtraRequestInfo) ([]*adapters.RequestData, []error) { + var errs []error + validImps := make([]openrtb2.Imp, 0, len(request.Imp)) + var setTestMode bool + + for _, imp := range request.Imp { + impExt, err := parseImpExt(imp.Ext) + if err != nil { + errs = append(errs, fmt.Errorf("impID %s: %w", imp.ID, err)) + continue + } + + if imp.Banner == nil && imp.Video == nil { + errs = append(errs, fmt.Errorf("impID %s: no banner or video object specified", imp.ID)) + continue + } + + if imp.BidFloor == 0 && impExt.BidFloor > 0 { + imp.BidFloor = impExt.BidFloor + } + + if impExt.TestMode == 1 { + setTestMode = true + } + + validImps = append(validImps, imp) + } + + if len(validImps) == 0 { + return nil, append(errs, fmt.Errorf("no valid impressions")) + } + + request.Imp = validImps + if setTestMode { + request.Test = 1 + } + + reqJSON, err := jsonutil.Marshal(request) + if err != nil { + return nil, append(errs, err) + } + + headers := http.Header{} + headers.Set("Content-Type", "application/json;charset=utf-8") + headers.Set("Accept", "application/json") + + return []*adapters.RequestData{ + { + Method: "POST", + Uri: a.endpoint, + Body: reqJSON, + Headers: headers, + ImpIDs: openrtb_ext.GetImpIDs(validImps), + }, + }, errs +} + +func parseImpExt(ext jsonutil.RawMessage) (openrtb_ext.ImpExtAdsmartx, error) { + var bidderExt adapters.ExtImpBidder + if err := jsonutil.Unmarshal(ext, &bidderExt); err != nil { + return openrtb_ext.ImpExtAdsmartx{}, err + } + var adsmartxExt openrtb_ext.ImpExtAdsmartx + if err := jsonutil.Unmarshal(bidderExt.Bidder, &adsmartxExt); err != nil { + return openrtb_ext.ImpExtAdsmartx{}, err + } + return adsmartxExt, nil +} + +func (a *adapter) MakeBids(request *openrtb2.BidRequest, reqData *adapters.RequestData, respData *adapters.ResponseData) (*adapters.BidderResponse, []error) { + if adapters.IsResponseStatusCodeNoContent(respData) { + return nil, nil + } + if err := adapters.CheckResponseStatusCodeForErrors(respData); err != nil { + return nil, []error{err} + } + + var bidResp openrtb2.BidResponse + if err := jsonutil.Unmarshal(respData.Body, &bidResp); err != nil { + return nil, []error{err} + } + + br := adapters.NewBidderResponseWithBidsCapacity(len(bidResp.SeatBid)) + if bidResp.Cur != "" { + br.Currency = bidResp.Cur + } + + var errs []error + for _, seatBid := range bidResp.SeatBid { + for i, bid := range seatBid.Bid { + bidType, err := getBidType(bid.MType) + if err != nil { + errs = append(errs, err) + continue + } + + br.Bids = append(br.Bids, &adapters.TypedBid{ + Bid: &seatBid.Bid[i], + BidType: bidType, + }) + } + } + return br, errs +} + +func getBidType(mtype openrtb2.MarkupType) (openrtb_ext.BidType, error) { + switch mtype { + case openrtb2.MarkupBanner: + return openrtb_ext.BidTypeBanner, nil + case openrtb2.MarkupVideo: + return openrtb_ext.BidTypeVideo, nil + default: + return "", fmt.Errorf("unknown bid type mtype=%d", mtype) + } +} diff --git a/adapters/adsmartx/adsmartx_test.go b/adapters/adsmartx/adsmartx_test.go new file mode 100644 index 00000000000..3896a0801dd --- /dev/null +++ b/adapters/adsmartx/adsmartx_test.go @@ -0,0 +1,164 @@ +package adsmartx + +import ( + "strings" + "testing" + + "github.com/prebid/openrtb/v20/openrtb2" + "github.com/prebid/prebid-server/v3/adapters" + "github.com/prebid/prebid-server/v3/adapters/adapterstest" + "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestJsonSamples(t *testing.T) { + bidder, buildErr := Builder( + openrtb_ext.BidderAdsmartx, + config.Adapter{ + Endpoint: "https://ads.adsmartx.com/ads/rtb/prebid/server", + }, + config.Server{ + ExternalUrl: "http://hosturl.com", + GvlID: 0, + DataCenter: "2", + }, + ) + + require.NoError(t, buildErr, "Builder returned unexpected error") + adapterstest.RunJSONBidderTest(t, "adsmartxtest", bidder) +} + +func TestParseImpExt(t *testing.T) { + tests := []struct { + name string + ext jsonutil.RawMessage + wantErr bool + }{ + {"Valid ext", jsonutil.RawMessage(`{"bidder":{"bidfloor":0.5}}`), false}, + {"Valid ext with sspId", jsonutil.RawMessage(`{"bidder":{"sspId":"ssp-123","siteId":"site-456"}}`), false}, + {"Invalid JSON", jsonutil.RawMessage(`not-json`), true}, + {"Not an object", jsonutil.RawMessage(`"string"`), true}, + {"Bidder not object", jsonutil.RawMessage(`{"bidder":"not-an-object"}`), true}, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + _, err := parseImpExt(tt.ext) + if tt.wantErr { + require.Error(t, err) + return + } + require.NoError(t, err) + }) + } +} + +func TestGetBidType(t *testing.T) { + tests := []struct { + name string + mtype openrtb2.MarkupType + wantErr bool + wantBidTy openrtb_ext.BidType + }{ + {"Banner", openrtb2.MarkupBanner, false, openrtb_ext.BidTypeBanner}, + {"Video", openrtb2.MarkupVideo, false, openrtb_ext.BidTypeVideo}, + {"Unknown", 99, true, ""}, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + bidType, err := getBidType(tt.mtype) + if tt.wantErr { + require.Error(t, err) + return + } + require.NoError(t, err) + assert.Equal(t, tt.wantBidTy, bidType) + }) + } +} + +func TestMakeRequestsErrors(t *testing.T) { + a := &adapter{endpoint: "http://test-endpoint"} + tests := []struct { + name string + imps []openrtb2.Imp + wantErr string + }{ + {"Invalid ext", []openrtb2.Imp{{ID: "1", Ext: jsonutil.RawMessage(`not-json`)}}, "impID 1:"}, + {"No valid imps", []openrtb2.Imp{}, "no valid impressions"}, + {"No banner or video", []openrtb2.Imp{{ID: "1", Ext: jsonutil.RawMessage(`{"bidder":{"bidfloor": 0.5}}`)}}, "no banner or video object specified"}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + req := &openrtb2.BidRequest{Imp: tt.imps} + _, errs := a.MakeRequests(req, nil) + require.NotEmpty(t, errs, "expected error, got none") + found := false + for _, err := range errs { + if err != nil && (tt.wantErr == "" || strings.Contains(err.Error(), tt.wantErr)) { + found = true + break + } + } + assert.True(t, found, "expected error containing %q, got %v", tt.wantErr, errs) + }) + } +} + +func TestMakeBidsErrors(t *testing.T) { + a := &adapter{endpoint: "http://test-endpoint"} + validReq := &openrtb2.BidRequest{ID: "1"} + validReqData := &adapters.RequestData{} + tests := []struct { + name string + respData *adapters.ResponseData + wantErr string + }{ + {"Non-200/204 response", &adapters.ResponseData{StatusCode: 500, Body: []byte(`{}`)}, "Unexpected status code"}, + {"Invalid JSON", &adapters.ResponseData{StatusCode: 200, Body: []byte(`not-json`)}, ""}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + _, errs := a.MakeBids(validReq, validReqData, tt.respData) + require.NotEmpty(t, errs, "expected error, got none") + found := false + for _, err := range errs { + if err != nil && strings.Contains(err.Error(), tt.wantErr) { + found = true + break + } + } + assert.True(t, found, "expected error containing %q, got %v", tt.wantErr, errs) + }) + } +} + +func TestMakeBidsSkipsBadBidType(t *testing.T) { + a := &adapter{endpoint: "http://test-endpoint"} + validReq := &openrtb2.BidRequest{ID: "1"} + validReqData := &adapters.RequestData{} + + respBody := `{ + "id": "1", + "seatbid": [{ + "bid": [ + {"id": "good-bid", "impid": "1", "price": 1.0, "adm": "
ad
", "mtype": 1}, + {"id": "bad-bid", "impid": "2", "price": 2.0, "adm": "
ad2
", "mtype": 99}, + {"id": "good-bid-2", "impid": "3", "price": 3.0, "adm": "
ad3
", "mtype": 2} + ] + }], + "cur": "USD" + }` + + resp := &adapters.ResponseData{StatusCode: 200, Body: []byte(respBody)} + bidderResp, errs := a.MakeBids(validReq, validReqData, resp) + + require.NotNil(t, bidderResp, "expected bid response, got nil") + assert.Len(t, bidderResp.Bids, 2, "expected 2 valid bids (bad bid should be skipped)") + assert.Len(t, errs, 1, "expected 1 error for the bad bid type") + assert.Contains(t, errs[0].Error(), "unknown bid type") +} diff --git a/adapters/adsmartx/adsmartxtest/exemplary/banner_bid_floor_set.json b/adapters/adsmartx/adsmartxtest/exemplary/banner_bid_floor_set.json new file mode 100644 index 00000000000..f70dd8ec0ba --- /dev/null +++ b/adapters/adsmartx/adsmartxtest/exemplary/banner_bid_floor_set.json @@ -0,0 +1,36 @@ +{ + "mockBidRequest": { + "id": "test-bid-floor-set", + "imp": [ + { + "id": "1", + "banner": { "w": 300, "h": 250 }, + "ext": { "bidder": { "bidfloor": 1.23, "sspId": "ssp-123" } } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://ads.adsmartx.com/ads/rtb/prebid/server", + "body": { + "id": "test-bid-floor-set", + "imp": [ + { + "id": "1", + "banner": { "w": 300, "h": 250 }, + "bidfloor": 1.23, + "ext": { "bidder": { "bidfloor": 1.23, "sspId": "ssp-123" } } + } + ] + }, + "impIDs": ["1"] + }, + "mockResponse": { + "status": 204, + "body": {} + } + } + ], + "expectedBidResponses": [] +} diff --git a/adapters/adsmartx/adsmartxtest/exemplary/imp_banner_and_video.json b/adapters/adsmartx/adsmartxtest/exemplary/imp_banner_and_video.json new file mode 100644 index 00000000000..4025a048e56 --- /dev/null +++ b/adapters/adsmartx/adsmartxtest/exemplary/imp_banner_and_video.json @@ -0,0 +1,108 @@ +{ + "mockBidRequest": { + "id": "mixed-media-request", + "imp": [ + { + "id": "banner-imp", + "banner": { "w": 300, "h": 250 }, + "ext": { "bidder": { "bidfloor": 0.5 } } + }, + { + "id": "video-imp", + "video": { "mimes": ["video/mp4"], "w": 640, "h": 480 }, + "ext": { "bidder": { "bidfloor": 2.0 } } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://ads.adsmartx.com/ads/rtb/prebid/server", + "body": { + "id": "mixed-media-request", + "imp": [ + { + "id": "banner-imp", + "banner": { "w": 300, "h": 250 }, + "bidfloor": 0.5, + "ext": { "bidder": { "bidfloor": 0.5 } } + }, + { + "id": "video-imp", + "video": { "mimes": ["video/mp4"], "w": 640, "h": 480 }, + "bidfloor": 2.0, + "ext": { "bidder": { "bidfloor": 2.0 } } + } + ] + }, + "impIDs": ["banner-imp", "video-imp"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "mixed-media-request", + "seatbid": [ + { + "bid": [ + { + "id": "b1", + "impid": "banner-imp", + "price": 1.0, + "adm": "
banner
", + "crid": "cr1", + "w": 300, + "h": 250, + "mtype": 1 + }, + { + "id": "b2", + "impid": "video-imp", + "price": 5.0, + "adm": "", + "crid": "cr2", + "w": 640, + "h": 480, + "mtype": 2 + } + ] + } + ], + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "b1", + "impid": "banner-imp", + "price": 1.0, + "adm": "
banner
", + "crid": "cr1", + "w": 300, + "h": 250, + "mtype": 1 + }, + "type": "banner" + }, + { + "bid": { + "id": "b2", + "impid": "video-imp", + "price": 5.0, + "adm": "", + "crid": "cr2", + "w": 640, + "h": 480, + "mtype": 2 + }, + "type": "video" + } + ] + } + ] +} diff --git a/adapters/adsmartx/adsmartxtest/exemplary/multiple_seatbids_bids.json b/adapters/adsmartx/adsmartxtest/exemplary/multiple_seatbids_bids.json new file mode 100644 index 00000000000..036e992d984 --- /dev/null +++ b/adapters/adsmartx/adsmartxtest/exemplary/multiple_seatbids_bids.json @@ -0,0 +1,102 @@ +{ + "mockBidRequest": { + "id": "multi-seat-request", + "imp": [ + { + "id": "imp-1", + "banner": { "w": 300, "h": 250 }, + "ext": { "bidder": {} } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://ads.adsmartx.com/ads/rtb/prebid/server", + "body": { + "id": "multi-seat-request", + "imp": [ + { + "id": "imp-1", + "banner": { "w": 300, "h": 250 }, + "ext": { "bidder": {} } + } + ] + }, + "impIDs": ["imp-1"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "multi-seat-request", + "seatbid": [ + { + "seat": "seat-a", + "bid": [ + { + "id": "bid-a1", + "impid": "imp-1", + "price": 1.5, + "adm": "
Ad A
", + "crid": "cr-a1", + "w": 300, + "h": 250, + "mtype": 1 + } + ] + }, + { + "seat": "seat-b", + "bid": [ + { + "id": "bid-b1", + "impid": "imp-1", + "price": 2.0, + "adm": "
Ad B
", + "crid": "cr-b1", + "w": 300, + "h": 250, + "mtype": 1 + } + ] + } + ], + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "bid-a1", + "impid": "imp-1", + "price": 1.5, + "adm": "
Ad A
", + "crid": "cr-a1", + "w": 300, + "h": 250, + "mtype": 1 + }, + "type": "banner" + }, + { + "bid": { + "id": "bid-b1", + "impid": "imp-1", + "price": 2.0, + "adm": "
Ad B
", + "crid": "cr-b1", + "w": 300, + "h": 250, + "mtype": 1 + }, + "type": "banner" + } + ] + } + ] +} diff --git a/adapters/adsmartx/adsmartxtest/exemplary/simple_banner.json b/adapters/adsmartx/adsmartxtest/exemplary/simple_banner.json new file mode 100644 index 00000000000..732eb4f240d --- /dev/null +++ b/adapters/adsmartx/adsmartxtest/exemplary/simple_banner.json @@ -0,0 +1,119 @@ +{ + "mockBidRequest": { + "id": "test-request-id", + "device": { + "ip": "123.123.123.123", + "ua": "iPad" + }, + "app": { + "id": "1", + "bundle": "com.adsmartx.sampleapp" + }, + "imp": [ + { + "id": "test-imp-id", + "tagid": "test-banner-slot", + "banner": { + "format": [ + { "w": 300, "h": 250 } + ], + "w": 300, + "h": 250 + }, + "ext": { + "bidder": { + "bidfloor": 0.5, + "sspId": "ssp-123" + } + } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://ads.adsmartx.com/ads/rtb/prebid/server", + "body": { + "id": "test-request-id", + "imp": [ + { + "id": "test-imp-id", + "tagid": "test-banner-slot", + "banner": { + "format": [ + { "w": 300, "h": 250 } + ], + "w": 300, + "h": 250 + }, + "bidfloor": 0.5, + "ext": { + "bidder": { + "bidfloor": 0.5, + "sspId": "ssp-123" + } + } + } + ], + "app": { + "id": "1", + "bundle": "com.adsmartx.sampleapp" + }, + "device": { + "ip": "123.123.123.123", + "ua": "iPad" + } + }, + "impIDs": ["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-request-id", + "seatbid": [ + { + "seat": "adsmartx", + "bid": [ + { + "id": "test_bid_id", + "impid": "test-imp-id", + "price": 0.85, + "adm": "
Sample Banner Ad
", + "crid": "banner-creative-001", + "cid": "banner-campaign-abc", + "dealid": "deal-123", + "w": 300, + "h": 250, + "mtype": 1 + } + ] + } + ], + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "test_bid_id", + "impid": "test-imp-id", + "price": 0.85, + "adm": "
Sample Banner Ad
", + "crid": "banner-creative-001", + "cid": "banner-campaign-abc", + "dealid": "deal-123", + "w": 300, + "h": 250, + "mtype": 1 + }, + "type": "banner" + } + ] + } + ] +} diff --git a/adapters/adsmartx/adsmartxtest/exemplary/simple_video.json b/adapters/adsmartx/adsmartxtest/exemplary/simple_video.json new file mode 100644 index 00000000000..38795dda174 --- /dev/null +++ b/adapters/adsmartx/adsmartxtest/exemplary/simple_video.json @@ -0,0 +1,109 @@ +{ + "mockBidRequest": { + "id": "test-video-request", + "device": { + "ip": "10.0.0.1", + "ua": "Mozilla/5.0" + }, + "site": { + "page": "https://example.com" + }, + "imp": [ + { + "id": "video-imp-id", + "video": { + "mimes": ["video/mp4"], + "protocols": [1, 2], + "w": 640, + "h": 480 + }, + "ext": { + "bidder": { + "bidfloor": 1.0, + "siteId": "site-456" + } + } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://ads.adsmartx.com/ads/rtb/prebid/server", + "body": { + "id": "test-video-request", + "imp": [ + { + "id": "video-imp-id", + "video": { + "mimes": ["video/mp4"], + "protocols": [1, 2], + "w": 640, + "h": 480 + }, + "bidfloor": 1.0, + "ext": { + "bidder": { + "bidfloor": 1.0, + "siteId": "site-456" + } + } + } + ], + "site": { + "page": "https://example.com" + }, + "device": { + "ip": "10.0.0.1", + "ua": "Mozilla/5.0" + } + }, + "impIDs": ["video-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-video-request", + "seatbid": [ + { + "seat": "adsmartx", + "bid": [ + { + "id": "video-bid-id", + "impid": "video-imp-id", + "price": 5.0, + "adm": "", + "crid": "video-creative-001", + "w": 640, + "h": 480, + "mtype": 2 + } + ] + } + ], + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "video-bid-id", + "impid": "video-imp-id", + "price": 5.0, + "adm": "", + "crid": "video-creative-001", + "w": 640, + "h": 480, + "mtype": 2 + }, + "type": "video" + } + ] + } + ] +} diff --git a/adapters/adsmartx/adsmartxtest/exemplary/test_mode_set.json b/adapters/adsmartx/adsmartxtest/exemplary/test_mode_set.json new file mode 100644 index 00000000000..232f383a42e --- /dev/null +++ b/adapters/adsmartx/adsmartxtest/exemplary/test_mode_set.json @@ -0,0 +1,82 @@ +{ + "mockBidRequest": { + "id": "test-mode-request", + "imp": [ + { + "id": "1", + "banner": { "w": 728, "h": 90 }, + "ext": { + "bidder": { + "testMode": 1 + } + } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://ads.adsmartx.com/ads/rtb/prebid/server", + "body": { + "id": "test-mode-request", + "imp": [ + { + "id": "1", + "banner": { "w": 728, "h": 90 }, + "ext": { + "bidder": { + "testMode": 1 + } + } + } + ], + "test": 1 + }, + "impIDs": ["1"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-mode-request", + "seatbid": [ + { + "bid": [ + { + "id": "b1", + "impid": "1", + "price": 1.0, + "adm": "
test
", + "crid": "cr1", + "w": 728, + "h": 90, + "mtype": 1 + } + ] + } + ], + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "b1", + "impid": "1", + "price": 1.0, + "adm": "
test
", + "crid": "cr1", + "w": 728, + "h": 90, + "mtype": 1 + }, + "type": "banner" + } + ] + } + ] +} diff --git a/adapters/adsmartx/adsmartxtest/supplemental/bad_media_type.json b/adapters/adsmartx/adsmartxtest/supplemental/bad_media_type.json new file mode 100644 index 00000000000..f5f29b09bdb --- /dev/null +++ b/adapters/adsmartx/adsmartxtest/supplemental/bad_media_type.json @@ -0,0 +1,89 @@ +{ + "mockBidRequest": { + "id": "bad-mtype-request", + "imp": [ + { + "id": "1", + "banner": { "w": 300, "h": 250 }, + "ext": { "bidder": {} } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://ads.adsmartx.com/ads/rtb/prebid/server", + "body": { + "id": "bad-mtype-request", + "imp": [ + { + "id": "1", + "banner": { "w": 300, "h": 250 }, + "ext": { "bidder": {} } + } + ] + }, + "impIDs": ["1"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "bad-mtype-request", + "seatbid": [ + { + "bid": [ + { + "id": "good-bid", + "impid": "1", + "price": 1.0, + "adm": "
good
", + "crid": "cr1", + "w": 300, + "h": 250, + "mtype": 1 + }, + { + "id": "bad-bid", + "impid": "1", + "price": 2.0, + "adm": "
bad
", + "crid": "cr2", + "w": 300, + "h": 250, + "mtype": 99 + } + ] + } + ], + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "good-bid", + "impid": "1", + "price": 1.0, + "adm": "
good
", + "crid": "cr1", + "w": 300, + "h": 250, + "mtype": 1 + }, + "type": "banner" + } + ] + } + ], + "expectedMakeBidsErrors": [ + { + "value": "unknown bid type mtype=99", + "comparison": "literal" + } + ] +} diff --git a/adapters/adsmartx/adsmartxtest/supplemental/bad_response.json b/adapters/adsmartx/adsmartxtest/supplemental/bad_response.json new file mode 100644 index 00000000000..d4a208f4868 --- /dev/null +++ b/adapters/adsmartx/adsmartxtest/supplemental/bad_response.json @@ -0,0 +1,40 @@ +{ + "mockBidRequest": { + "id": "bad-response-request", + "imp": [ + { + "id": "1", + "banner": { "w": 300, "h": 250 }, + "ext": { "bidder": {} } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://ads.adsmartx.com/ads/rtb/prebid/server", + "body": { + "id": "bad-response-request", + "imp": [ + { + "id": "1", + "banner": { "w": 300, "h": 250 }, + "ext": { "bidder": {} } + } + ] + }, + "impIDs": ["1"] + }, + "mockResponse": { + "status": 200, + "body": "not-json" + } + } + ], + "expectedMakeBidsErrors": [ + { + "value": "expect \\{ or n, but found", + "comparison": "regex" + } + ] +} diff --git a/adapters/adsmartx/adsmartxtest/supplemental/imp_no_banner_no_video.json b/adapters/adsmartx/adsmartxtest/supplemental/imp_no_banner_no_video.json new file mode 100644 index 00000000000..df4cd1b8bf2 --- /dev/null +++ b/adapters/adsmartx/adsmartxtest/supplemental/imp_no_banner_no_video.json @@ -0,0 +1,21 @@ +{ + "mockBidRequest": { + "id": "no-banner-video", + "imp": [ + { + "id": "1", + "ext": { "bidder": { "bidfloor": 0.5 } } + } + ] + }, + "expectedMakeRequestsErrors": [ + { + "value": "impID 1: no banner or video object specified", + "comparison": "literal" + }, + { + "value": "no valid impressions", + "comparison": "literal" + } + ] +} diff --git a/adapters/adsmartx/adsmartxtest/supplemental/invalid_imp_ext.json b/adapters/adsmartx/adsmartxtest/supplemental/invalid_imp_ext.json new file mode 100644 index 00000000000..53d06f24dc7 --- /dev/null +++ b/adapters/adsmartx/adsmartxtest/supplemental/invalid_imp_ext.json @@ -0,0 +1,22 @@ +{ + "mockBidRequest": { + "id": "invalid-ext", + "imp": [ + { + "id": "1", + "banner": { "w": 300, "h": 250 }, + "ext": "not-json" + } + ] + }, + "expectedMakeRequestsErrors": [ + { + "value": "impID 1:", + "comparison": "regex" + }, + { + "value": "no valid impressions", + "comparison": "literal" + } + ] +} diff --git a/adapters/adsmartx/adsmartxtest/supplemental/no_valid_impressions.json b/adapters/adsmartx/adsmartxtest/supplemental/no_valid_impressions.json new file mode 100644 index 00000000000..3b9d228728f --- /dev/null +++ b/adapters/adsmartx/adsmartxtest/supplemental/no_valid_impressions.json @@ -0,0 +1,12 @@ +{ + "mockBidRequest": { + "id": "no-valid-imps", + "imp": [] + }, + "expectedMakeRequestsErrors": [ + { + "value": "no valid impressions", + "comparison": "literal" + } + ] +} diff --git a/adapters/adsmartx/adsmartxtest/supplemental/status_204.json b/adapters/adsmartx/adsmartxtest/supplemental/status_204.json new file mode 100644 index 00000000000..cf64b41e026 --- /dev/null +++ b/adapters/adsmartx/adsmartxtest/supplemental/status_204.json @@ -0,0 +1,35 @@ +{ + "mockBidRequest": { + "id": "status-204", + "imp": [ + { + "id": "1", + "banner": { "w": 300, "h": 250 }, + "ext": { "bidder": {} } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://ads.adsmartx.com/ads/rtb/prebid/server", + "body": { + "id": "status-204", + "imp": [ + { + "id": "1", + "banner": { "w": 300, "h": 250 }, + "ext": { "bidder": {} } + } + ] + }, + "impIDs": ["1"] + }, + "mockResponse": { + "status": 204, + "body": {} + } + } + ], + "expectedBidResponses": [] +} diff --git a/adapters/adsmartx/adsmartxtest/supplemental/status_not_200.json b/adapters/adsmartx/adsmartxtest/supplemental/status_not_200.json new file mode 100644 index 00000000000..41eb8d2715f --- /dev/null +++ b/adapters/adsmartx/adsmartxtest/supplemental/status_not_200.json @@ -0,0 +1,40 @@ +{ + "mockBidRequest": { + "id": "status-500", + "imp": [ + { + "id": "1", + "banner": { "w": 300, "h": 250 }, + "ext": { "bidder": {} } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://ads.adsmartx.com/ads/rtb/prebid/server", + "body": { + "id": "status-500", + "imp": [ + { + "id": "1", + "banner": { "w": 300, "h": 250 }, + "ext": { "bidder": {} } + } + ] + }, + "impIDs": ["1"] + }, + "mockResponse": { + "status": 500, + "body": {} + } + } + ], + "expectedMakeBidsErrors": [ + { + "value": "Unexpected status code: 500", + "comparison": "regex" + } + ] +} diff --git a/adapters/adsmartx/params_test.go b/adapters/adsmartx/params_test.go new file mode 100644 index 00000000000..335c6893286 --- /dev/null +++ b/adapters/adsmartx/params_test.go @@ -0,0 +1,59 @@ +package adsmartx + +import ( + "encoding/json" + "testing" + + "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestValidParams(t *testing.T) { + validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") + require.NoError(t, err, "Failed to fetch the JSON schema") + + tests := []struct { + name string + input string + }{ + {"Valid bidfloor only", `{"bidfloor": 0.01}`}, + {"Valid bidfloor with testMode", `{"bidfloor": 2.5, "testMode": 1}`}, + {"Valid sspId only", `{"sspId": "ssp-123"}`}, + {"Valid siteId only", `{"siteId": "site-456"}`}, + {"Valid all params", `{"bidfloor": 1.0, "testMode": 0, "sspId": "ssp-123", "siteId": "site-456"}`}, + {"Empty object", `{}`}, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + assert.NoError(t, validator.Validate(openrtb_ext.BidderAdsmartx, json.RawMessage(tt.input))) + }) + } +} + +func TestInvalidParams(t *testing.T) { + validator, err := openrtb_ext.NewBidderParamsValidator("../../static/bidder-params") + require.NoError(t, err, "Failed to fetch the JSON schema") + + tests := []struct { + name string + input string + }{ + {"Invalid bidfloor type", `{"bidfloor": "1.2"}`}, + {"Invalid testMode type", `{"testMode": "yes"}`}, + {"Negative bidfloor", `{"bidfloor": -5}`}, + {"Invalid testMode value", `{"testMode": 9999}`}, + {"Invalid sspId type", `{"sspId": 123}`}, + {"Invalid siteId type", `{"siteId": 456}`}, + {"Empty sspId", `{"sspId": ""}`}, + {"Empty siteId", `{"siteId": ""}`}, + {"Unknown property", `{"unknownParam": "value"}`}, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + assert.Error(t, validator.Validate(openrtb_ext.BidderAdsmartx, json.RawMessage(tt.input))) + }) + } +} diff --git a/exchange/adapter_builders.go b/exchange/adapter_builders.go index e6bba140a57..b23e6b3380f 100755 --- a/exchange/adapter_builders.go +++ b/exchange/adapter_builders.go @@ -24,6 +24,7 @@ import ( "github.com/prebid/prebid-server/v3/adapters/adprime" "github.com/prebid/prebid-server/v3/adapters/adquery" "github.com/prebid/prebid-server/v3/adapters/adrino" + "github.com/prebid/prebid-server/v3/adapters/adsmartx" "github.com/prebid/prebid-server/v3/adapters/ads_interactive" "github.com/prebid/prebid-server/v3/adapters/adsinteractive" "github.com/prebid/prebid-server/v3/adapters/adtarget" @@ -294,6 +295,7 @@ func newAdapterBuilders() map[openrtb_ext.BidderName]adapters.Builder { openrtb_ext.BidderAdprime: adprime.Builder, openrtb_ext.BidderAdquery: adquery.Builder, openrtb_ext.BidderAdrino: adrino.Builder, + openrtb_ext.BidderAdsmartx: adsmartx.Builder, openrtb_ext.BidderAdsInteractive: ads_interactive.Builder, openrtb_ext.BidderAdsinteractive: adsinteractive.Builder, openrtb_ext.BidderAdtarget: adtarget.Builder, diff --git a/openrtb_ext/bidders.go b/openrtb_ext/bidders.go index 82a6df4f77c..f97811f85f8 100644 --- a/openrtb_ext/bidders.go +++ b/openrtb_ext/bidders.go @@ -40,6 +40,7 @@ var coreBidderNames []BidderName = []BidderName{ BidderAdprime, BidderAdquery, BidderAdrino, + BidderAdsmartx, BidderAdsInteractive, BidderAdsinteractive, BidderAdtarget, @@ -417,6 +418,7 @@ const ( BidderAdprime BidderName = "adprime" BidderAdquery BidderName = "adquery" BidderAdrino BidderName = "adrino" + BidderAdsmartx BidderName = "adsmartx" BidderAdsInteractive BidderName = "ads_interactive" BidderAdsinteractive BidderName = "adsinteractive" BidderAdtarget BidderName = "adtarget" diff --git a/openrtb_ext/imp_adsmartx.go b/openrtb_ext/imp_adsmartx.go new file mode 100644 index 00000000000..64b915a4bcf --- /dev/null +++ b/openrtb_ext/imp_adsmartx.go @@ -0,0 +1,8 @@ +package openrtb_ext + +type ImpExtAdsmartx struct { + BidFloor float64 `json:"bidfloor,omitempty"` + TestMode int `json:"testMode,omitempty"` + SspID string `json:"sspId,omitempty"` + SspSiteID string `json:"siteId,omitempty"` +} diff --git a/static/bidder-info/adsmartx.yaml b/static/bidder-info/adsmartx.yaml new file mode 100644 index 00000000000..dbd08216831 --- /dev/null +++ b/static/bidder-info/adsmartx.yaml @@ -0,0 +1,20 @@ +endpoint: "https://ads.adsmartx.com/ads/rtb/prebid/server" +endpointCompression: gzip +maintainer: + email: prebid@aidigital.com +capabilities: + app: + mediaTypes: + - banner + - video + site: + mediaTypes: + - banner + - video +userSync: + iframe: + url: "https://ads.adsmartx.com/sync?ssp_site_id=49964415&gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&iframe_enabled=true&redir={{.RedirectURL}}" + userMacro: "[UID]" + redirect: + url: "https://ads.adsmartx.com/sync?ssp_site_id=49964415&gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&iframe_enabled=false&redir={{.RedirectURL}}" + userMacro: "[UID]" diff --git a/static/bidder-params/adsmartx.json b/static/bidder-params/adsmartx.json new file mode 100644 index 00000000000..ae53cd997da --- /dev/null +++ b/static/bidder-params/adsmartx.json @@ -0,0 +1,29 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Adsmartx Adapter Params", + "description": "A schema which validates params accepted by the Adsmartx adapter", + "type": "object", + "properties": { + "bidfloor": { + "type": "number", + "minimum": 0, + "description": "Bid Floor Price" + }, + "testMode": { + "type": "integer", + "enum": [0, 1], + "description": "Test Mode parameter to indicate test request" + }, + "sspId": { + "type": "string", + "minLength": 1, + "description": "SSP ID for the publisher, used for user sync and request routing" + }, + "siteId": { + "type": "string", + "minLength": 1, + "description": "SSP Site ID for the publisher's site, used for user sync and request routing" + } + }, + "additionalProperties": false +} From 5cfb1d2853ba94947a1a4e4fbda83c910af339dc Mon Sep 17 00:00:00 2001 From: pritishmd-talentica Date: Wed, 25 Feb 2026 11:51:58 +0530 Subject: [PATCH 2/7] RM-1477 : Copilot review handled --- adapters/adsmartx/adsmartx.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/adapters/adsmartx/adsmartx.go b/adapters/adsmartx/adsmartx.go index 1025dc21958..fdad895b91f 100644 --- a/adapters/adsmartx/adsmartx.go +++ b/adapters/adsmartx/adsmartx.go @@ -7,6 +7,7 @@ import ( "github.com/prebid/openrtb/v20/openrtb2" "github.com/prebid/prebid-server/v3/adapters" "github.com/prebid/prebid-server/v3/config" + "github.com/prebid/prebid-server/v3/errortypes" "github.com/prebid/prebid-server/v3/openrtb_ext" "github.com/prebid/prebid-server/v3/util/jsonutil" ) @@ -131,6 +132,8 @@ func getBidType(mtype openrtb2.MarkupType) (openrtb_ext.BidType, error) { case openrtb2.MarkupVideo: return openrtb_ext.BidTypeVideo, nil default: - return "", fmt.Errorf("unknown bid type mtype=%d", mtype) + return "", &errortypes.BadServerResponse{ + Message: fmt.Sprintf("unknown bid type mtype=%d", mtype), + } } } From cc36c0070029ff0b2b91d8487cb23c72f9d6d539 Mon Sep 17 00:00:00 2001 From: pritishmd-talentica Date: Mon, 4 May 2026 19:08:16 +0530 Subject: [PATCH 3/7] RM-1477 : Fixed version mismatch --- adapters/adsmartx/adsmartx.go | 10 +++++----- adapters/adsmartx/adsmartx_test.go | 10 +++++----- adapters/adsmartx/params_test.go | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/adapters/adsmartx/adsmartx.go b/adapters/adsmartx/adsmartx.go index fdad895b91f..bd07bee04cc 100644 --- a/adapters/adsmartx/adsmartx.go +++ b/adapters/adsmartx/adsmartx.go @@ -5,11 +5,11 @@ import ( "net/http" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v3/adapters" - "github.com/prebid/prebid-server/v3/config" - "github.com/prebid/prebid-server/v3/errortypes" - "github.com/prebid/prebid-server/v3/openrtb_ext" - "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v4/adapters" + "github.com/prebid/prebid-server/v4/config" + "github.com/prebid/prebid-server/v4/errortypes" + "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v4/util/jsonutil" ) type adapter struct { diff --git a/adapters/adsmartx/adsmartx_test.go b/adapters/adsmartx/adsmartx_test.go index 3896a0801dd..7d5d98c9cfa 100644 --- a/adapters/adsmartx/adsmartx_test.go +++ b/adapters/adsmartx/adsmartx_test.go @@ -5,11 +5,11 @@ import ( "testing" "github.com/prebid/openrtb/v20/openrtb2" - "github.com/prebid/prebid-server/v3/adapters" - "github.com/prebid/prebid-server/v3/adapters/adapterstest" - "github.com/prebid/prebid-server/v3/config" - "github.com/prebid/prebid-server/v3/openrtb_ext" - "github.com/prebid/prebid-server/v3/util/jsonutil" + "github.com/prebid/prebid-server/v4/adapters" + "github.com/prebid/prebid-server/v4/adapters/adapterstest" + "github.com/prebid/prebid-server/v4/config" + "github.com/prebid/prebid-server/v4/openrtb_ext" + "github.com/prebid/prebid-server/v4/util/jsonutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/adapters/adsmartx/params_test.go b/adapters/adsmartx/params_test.go index 335c6893286..7a8c777e09b 100644 --- a/adapters/adsmartx/params_test.go +++ b/adapters/adsmartx/params_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/prebid/prebid-server/v3/openrtb_ext" + "github.com/prebid/prebid-server/v4/openrtb_ext" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) From 17def18983c582af0ac7ee6b37faa7b888b62bf8 Mon Sep 17 00:00:00 2001 From: Pritish Desai Date: Thu, 9 Jul 2026 11:51:18 +0530 Subject: [PATCH 4/7] RM-1891 : Rebranded adsmartx adapter to agenticx --- .../adsmartx.go => agenticx/agenticx.go} | 2 +- .../agenticx_test.go} | 0 .../exemplary/banner_bid_floor_set.json | 0 .../exemplary/imp_banner_and_video.json | 0 .../exemplary/multiple_seatbids_bids.json | 0 .../exemplary/simple_banner.json | 0 .../agenticxtest}/exemplary/simple_video.json | 0 .../exemplary/test_mode_set.json | 0 .../supplemental/bad_media_type.json | 0 .../supplemental/bad_response.json | 0 .../supplemental/imp_no_banner_no_video.json | 0 .../supplemental/invalid_imp_ext.json | 0 .../supplemental/no_valid_impressions.json | 0 .../supplemental/status_204.json | 0 .../supplemental/status_not_200.json | 0 .../{adsmartx => agenticx}/params_test.go | 0 openrtb_ext/bidders.go | 4 ++-- .../{imp_adsmartx.go => imp_agenticx.go} | 2 +- static/bidder-info/adsmartx.yaml | 20 ----------------- static/bidder-info/agenticx.yaml | 22 +++++++++++++++++++ .../{adsmartx.json => agenticx.json} | 4 ++-- 21 files changed, 28 insertions(+), 26 deletions(-) rename adapters/{adsmartx/adsmartx.go => agenticx/agenticx.go} (99%) rename adapters/{adsmartx/adsmartx_test.go => agenticx/agenticx_test.go} (100%) rename adapters/{adsmartx/adsmartxtest => agenticx/agenticxtest}/exemplary/banner_bid_floor_set.json (100%) rename adapters/{adsmartx/adsmartxtest => agenticx/agenticxtest}/exemplary/imp_banner_and_video.json (100%) rename adapters/{adsmartx/adsmartxtest => agenticx/agenticxtest}/exemplary/multiple_seatbids_bids.json (100%) rename adapters/{adsmartx/adsmartxtest => agenticx/agenticxtest}/exemplary/simple_banner.json (100%) rename adapters/{adsmartx/adsmartxtest => agenticx/agenticxtest}/exemplary/simple_video.json (100%) rename adapters/{adsmartx/adsmartxtest => agenticx/agenticxtest}/exemplary/test_mode_set.json (100%) rename adapters/{adsmartx/adsmartxtest => agenticx/agenticxtest}/supplemental/bad_media_type.json (100%) rename adapters/{adsmartx/adsmartxtest => agenticx/agenticxtest}/supplemental/bad_response.json (100%) rename adapters/{adsmartx/adsmartxtest => agenticx/agenticxtest}/supplemental/imp_no_banner_no_video.json (100%) rename adapters/{adsmartx/adsmartxtest => agenticx/agenticxtest}/supplemental/invalid_imp_ext.json (100%) rename adapters/{adsmartx/adsmartxtest => agenticx/agenticxtest}/supplemental/no_valid_impressions.json (100%) rename adapters/{adsmartx/adsmartxtest => agenticx/agenticxtest}/supplemental/status_204.json (100%) rename adapters/{adsmartx/adsmartxtest => agenticx/agenticxtest}/supplemental/status_not_200.json (100%) rename adapters/{adsmartx => agenticx}/params_test.go (100%) rename openrtb_ext/{imp_adsmartx.go => imp_agenticx.go} (87%) delete mode 100644 static/bidder-info/adsmartx.yaml create mode 100644 static/bidder-info/agenticx.yaml rename static/bidder-params/{adsmartx.json => agenticx.json} (92%) diff --git a/adapters/adsmartx/adsmartx.go b/adapters/agenticx/agenticx.go similarity index 99% rename from adapters/adsmartx/adsmartx.go rename to adapters/agenticx/agenticx.go index fdad895b91f..a2d6b2bd562 100644 --- a/adapters/adsmartx/adsmartx.go +++ b/adapters/agenticx/agenticx.go @@ -1,4 +1,4 @@ -package adsmartx +package agenticx import ( "fmt" diff --git a/adapters/adsmartx/adsmartx_test.go b/adapters/agenticx/agenticx_test.go similarity index 100% rename from adapters/adsmartx/adsmartx_test.go rename to adapters/agenticx/agenticx_test.go diff --git a/adapters/adsmartx/adsmartxtest/exemplary/banner_bid_floor_set.json b/adapters/agenticx/agenticxtest/exemplary/banner_bid_floor_set.json similarity index 100% rename from adapters/adsmartx/adsmartxtest/exemplary/banner_bid_floor_set.json rename to adapters/agenticx/agenticxtest/exemplary/banner_bid_floor_set.json diff --git a/adapters/adsmartx/adsmartxtest/exemplary/imp_banner_and_video.json b/adapters/agenticx/agenticxtest/exemplary/imp_banner_and_video.json similarity index 100% rename from adapters/adsmartx/adsmartxtest/exemplary/imp_banner_and_video.json rename to adapters/agenticx/agenticxtest/exemplary/imp_banner_and_video.json diff --git a/adapters/adsmartx/adsmartxtest/exemplary/multiple_seatbids_bids.json b/adapters/agenticx/agenticxtest/exemplary/multiple_seatbids_bids.json similarity index 100% rename from adapters/adsmartx/adsmartxtest/exemplary/multiple_seatbids_bids.json rename to adapters/agenticx/agenticxtest/exemplary/multiple_seatbids_bids.json diff --git a/adapters/adsmartx/adsmartxtest/exemplary/simple_banner.json b/adapters/agenticx/agenticxtest/exemplary/simple_banner.json similarity index 100% rename from adapters/adsmartx/adsmartxtest/exemplary/simple_banner.json rename to adapters/agenticx/agenticxtest/exemplary/simple_banner.json diff --git a/adapters/adsmartx/adsmartxtest/exemplary/simple_video.json b/adapters/agenticx/agenticxtest/exemplary/simple_video.json similarity index 100% rename from adapters/adsmartx/adsmartxtest/exemplary/simple_video.json rename to adapters/agenticx/agenticxtest/exemplary/simple_video.json diff --git a/adapters/adsmartx/adsmartxtest/exemplary/test_mode_set.json b/adapters/agenticx/agenticxtest/exemplary/test_mode_set.json similarity index 100% rename from adapters/adsmartx/adsmartxtest/exemplary/test_mode_set.json rename to adapters/agenticx/agenticxtest/exemplary/test_mode_set.json diff --git a/adapters/adsmartx/adsmartxtest/supplemental/bad_media_type.json b/adapters/agenticx/agenticxtest/supplemental/bad_media_type.json similarity index 100% rename from adapters/adsmartx/adsmartxtest/supplemental/bad_media_type.json rename to adapters/agenticx/agenticxtest/supplemental/bad_media_type.json diff --git a/adapters/adsmartx/adsmartxtest/supplemental/bad_response.json b/adapters/agenticx/agenticxtest/supplemental/bad_response.json similarity index 100% rename from adapters/adsmartx/adsmartxtest/supplemental/bad_response.json rename to adapters/agenticx/agenticxtest/supplemental/bad_response.json diff --git a/adapters/adsmartx/adsmartxtest/supplemental/imp_no_banner_no_video.json b/adapters/agenticx/agenticxtest/supplemental/imp_no_banner_no_video.json similarity index 100% rename from adapters/adsmartx/adsmartxtest/supplemental/imp_no_banner_no_video.json rename to adapters/agenticx/agenticxtest/supplemental/imp_no_banner_no_video.json diff --git a/adapters/adsmartx/adsmartxtest/supplemental/invalid_imp_ext.json b/adapters/agenticx/agenticxtest/supplemental/invalid_imp_ext.json similarity index 100% rename from adapters/adsmartx/adsmartxtest/supplemental/invalid_imp_ext.json rename to adapters/agenticx/agenticxtest/supplemental/invalid_imp_ext.json diff --git a/adapters/adsmartx/adsmartxtest/supplemental/no_valid_impressions.json b/adapters/agenticx/agenticxtest/supplemental/no_valid_impressions.json similarity index 100% rename from adapters/adsmartx/adsmartxtest/supplemental/no_valid_impressions.json rename to adapters/agenticx/agenticxtest/supplemental/no_valid_impressions.json diff --git a/adapters/adsmartx/adsmartxtest/supplemental/status_204.json b/adapters/agenticx/agenticxtest/supplemental/status_204.json similarity index 100% rename from adapters/adsmartx/adsmartxtest/supplemental/status_204.json rename to adapters/agenticx/agenticxtest/supplemental/status_204.json diff --git a/adapters/adsmartx/adsmartxtest/supplemental/status_not_200.json b/adapters/agenticx/agenticxtest/supplemental/status_not_200.json similarity index 100% rename from adapters/adsmartx/adsmartxtest/supplemental/status_not_200.json rename to adapters/agenticx/agenticxtest/supplemental/status_not_200.json diff --git a/adapters/adsmartx/params_test.go b/adapters/agenticx/params_test.go similarity index 100% rename from adapters/adsmartx/params_test.go rename to adapters/agenticx/params_test.go diff --git a/openrtb_ext/bidders.go b/openrtb_ext/bidders.go index b3f49bccb95..4b79bb6e240 100644 --- a/openrtb_ext/bidders.go +++ b/openrtb_ext/bidders.go @@ -38,7 +38,6 @@ var coreBidderNames []BidderName = []BidderName{ BidderAdprime, BidderAdquery, BidderAdrino, - BidderAdsmartx, BidderAdtarget, BidderAdtrgtme, BidderAdtelligent, @@ -50,6 +49,7 @@ var coreBidderNames []BidderName = []BidderName{ BidderAdxcg, BidderAdyoulike, BidderAfront, + BidderAgenticx, BidderAidem, BidderAJA, BidderAkcelo, @@ -418,7 +418,7 @@ const ( BidderAdprime BidderName = "adprime" BidderAdquery BidderName = "adquery" BidderAdrino BidderName = "adrino" - BidderAdsmartx BidderName = "adsmartx" + BidderAgenticx BidderName = "agenticx" BidderAdtarget BidderName = "adtarget" BidderAdtrgtme BidderName = "adtrgtme" BidderAdTonos BidderName = "adtonos" diff --git a/openrtb_ext/imp_adsmartx.go b/openrtb_ext/imp_agenticx.go similarity index 87% rename from openrtb_ext/imp_adsmartx.go rename to openrtb_ext/imp_agenticx.go index 64b915a4bcf..25e54e32475 100644 --- a/openrtb_ext/imp_adsmartx.go +++ b/openrtb_ext/imp_agenticx.go @@ -1,6 +1,6 @@ package openrtb_ext -type ImpExtAdsmartx struct { +type ImpExtAgenticx struct { BidFloor float64 `json:"bidfloor,omitempty"` TestMode int `json:"testMode,omitempty"` SspID string `json:"sspId,omitempty"` diff --git a/static/bidder-info/adsmartx.yaml b/static/bidder-info/adsmartx.yaml deleted file mode 100644 index dbd08216831..00000000000 --- a/static/bidder-info/adsmartx.yaml +++ /dev/null @@ -1,20 +0,0 @@ -endpoint: "https://ads.adsmartx.com/ads/rtb/prebid/server" -endpointCompression: gzip -maintainer: - email: prebid@aidigital.com -capabilities: - app: - mediaTypes: - - banner - - video - site: - mediaTypes: - - banner - - video -userSync: - iframe: - url: "https://ads.adsmartx.com/sync?ssp_site_id=49964415&gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&iframe_enabled=true&redir={{.RedirectURL}}" - userMacro: "[UID]" - redirect: - url: "https://ads.adsmartx.com/sync?ssp_site_id=49964415&gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&iframe_enabled=false&redir={{.RedirectURL}}" - userMacro: "[UID]" diff --git a/static/bidder-info/agenticx.yaml b/static/bidder-info/agenticx.yaml new file mode 100644 index 00000000000..72fac9c84ea --- /dev/null +++ b/static/bidder-info/agenticx.yaml @@ -0,0 +1,22 @@ +endpoint: "https://ads.theagenticx.ai/ads/rtb/prebid/server" +endpointCompression: gzip +maintainer: + email: prebid@aidigital.com +capabilities: + app: + mediaTypes: + - banner + - video + - audio + site: + mediaTypes: + - banner + - video + - audio +userSync: + iframe: + url: "https://ads.theagenticx.ai/sync?ssp_site_id=49964415&gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&iframe_enabled=true&redir={{.RedirectURL}}" + userMacro: "[UID]" + redirect: + url: "https://ads.theagenticx.ai/sync?ssp_site_id=49964415&gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&gpp={{.GPP}}&gpp_sid={{.GPPSID}}&iframe_enabled=false&redir={{.RedirectURL}}" + userMacro: "[UID]" diff --git a/static/bidder-params/adsmartx.json b/static/bidder-params/agenticx.json similarity index 92% rename from static/bidder-params/adsmartx.json rename to static/bidder-params/agenticx.json index ae53cd997da..79ab12d0c1d 100644 --- a/static/bidder-params/adsmartx.json +++ b/static/bidder-params/agenticx.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Adsmartx Adapter Params", - "description": "A schema which validates params accepted by the Adsmartx adapter", + "title": "Agenticx Adapter Params", + "description": "A schema which validates params accepted by the Agenticx adapter", "type": "object", "properties": { "bidfloor": { From d3477f99a76cb0390999ecba6e5ccce72434cfb4 Mon Sep 17 00:00:00 2001 From: Pritish Desai Date: Wed, 15 Jul 2026 18:23:10 +0530 Subject: [PATCH 5/7] RM-1891:Handled copilot review comments --- adapters/agenticx/agenticx.go | 6 ++++-- exchange/adapter_builders.go | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/adapters/agenticx/agenticx.go b/adapters/agenticx/agenticx.go index 1537d66d2ea..6a970b1bc85 100644 --- a/adapters/agenticx/agenticx.go +++ b/adapters/agenticx/agenticx.go @@ -32,8 +32,8 @@ func (a *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.E continue } - if imp.Banner == nil && imp.Video == nil { - errs = append(errs, fmt.Errorf("impID %s: no banner or video object specified", imp.ID)) + if imp.Banner == nil && imp.Video == nil && imp.Audio == nil { + errs = append(errs, fmt.Errorf("impID %s: no banner, video, or audio object specified", imp.ID)) continue } @@ -131,6 +131,8 @@ func getBidType(mtype openrtb2.MarkupType) (openrtb_ext.BidType, error) { return openrtb_ext.BidTypeBanner, nil case openrtb2.MarkupVideo: return openrtb_ext.BidTypeVideo, nil + case openrtb2.MarkupAudio: + return openrtb_ext.BidTypeAudio, nil default: return "", &errortypes.BadServerResponse{ Message: fmt.Sprintf("unknown bid type mtype=%d", mtype), diff --git a/exchange/adapter_builders.go b/exchange/adapter_builders.go index ae07fb342a4..74547cef12b 100755 --- a/exchange/adapter_builders.go +++ b/exchange/adapter_builders.go @@ -22,7 +22,7 @@ import ( "github.com/prebid/prebid-server/v4/adapters/adprime" "github.com/prebid/prebid-server/v4/adapters/adquery" "github.com/prebid/prebid-server/v4/adapters/adrino" - "github.com/prebid/prebid-server/v4/adapters/adsmartx" + "github.com/prebid/prebid-server/v4/adapters/agenticx" "github.com/prebid/prebid-server/v4/adapters/adtarget" "github.com/prebid/prebid-server/v4/adapters/adtelligent" "github.com/prebid/prebid-server/v4/adapters/adtonos" @@ -295,7 +295,7 @@ func newAdapterBuilders() map[openrtb_ext.BidderName]adapters.Builder { openrtb_ext.BidderAdprime: adprime.Builder, openrtb_ext.BidderAdquery: adquery.Builder, openrtb_ext.BidderAdrino: adrino.Builder, - openrtb_ext.BidderAdsmartx: adsmartx.Builder, + openrtb_ext.BidderAgenticx: agenticx.Builder, openrtb_ext.BidderAdtarget: adtarget.Builder, openrtb_ext.BidderAdtrgtme: adtrgtme.Builder, openrtb_ext.BidderAdtelligent: adtelligent.Builder, From 94a65d20f8cde6bf25c19906e5bf19c53b984aed Mon Sep 17 00:00:00 2001 From: Pritish Desai Date: Wed, 15 Jul 2026 19:28:22 +0530 Subject: [PATCH 6/7] RM-1891 : Handled package rename issues --- adapters/agenticx/agenticx.go | 12 +-- adapters/agenticx/agenticx_test.go | 11 +- .../exemplary/banner_bid_floor_set.json | 2 +- .../exemplary/imp_banner_and_video.json | 2 +- .../exemplary/multiple_seatbids_bids.json | 2 +- .../agenticxtest/exemplary/simple_audio.json | 101 ++++++++++++++++++ .../agenticxtest/exemplary/simple_banner.json | 8 +- .../agenticxtest/exemplary/simple_video.json | 4 +- .../agenticxtest/exemplary/test_mode_set.json | 2 +- .../supplemental/bad_media_type.json | 2 +- .../supplemental/bad_response.json | 2 +- .../supplemental/imp_no_banner_no_video.json | 2 +- .../agenticxtest/supplemental/status_204.json | 2 +- .../supplemental/status_not_200.json | 2 +- adapters/agenticx/params_test.go | 6 +- 15 files changed, 131 insertions(+), 29 deletions(-) create mode 100644 adapters/agenticx/agenticxtest/exemplary/simple_audio.json diff --git a/adapters/agenticx/agenticx.go b/adapters/agenticx/agenticx.go index 6a970b1bc85..21414a30986 100644 --- a/adapters/agenticx/agenticx.go +++ b/adapters/agenticx/agenticx.go @@ -77,16 +77,16 @@ func (a *adapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters.E }, errs } -func parseImpExt(ext jsonutil.RawMessage) (openrtb_ext.ImpExtAdsmartx, error) { +func parseImpExt(ext jsonutil.RawMessage) (openrtb_ext.ImpExtAgenticx, error) { var bidderExt adapters.ExtImpBidder if err := jsonutil.Unmarshal(ext, &bidderExt); err != nil { - return openrtb_ext.ImpExtAdsmartx{}, err + return openrtb_ext.ImpExtAgenticx{}, err } - var adsmartxExt openrtb_ext.ImpExtAdsmartx - if err := jsonutil.Unmarshal(bidderExt.Bidder, &adsmartxExt); err != nil { - return openrtb_ext.ImpExtAdsmartx{}, err + var agenticxExt openrtb_ext.ImpExtAgenticx + if err := jsonutil.Unmarshal(bidderExt.Bidder, &agenticxExt); err != nil { + return openrtb_ext.ImpExtAgenticx{}, err } - return adsmartxExt, nil + return agenticxExt, nil } func (a *adapter) MakeBids(request *openrtb2.BidRequest, reqData *adapters.RequestData, respData *adapters.ResponseData) (*adapters.BidderResponse, []error) { diff --git a/adapters/agenticx/agenticx_test.go b/adapters/agenticx/agenticx_test.go index 7d5d98c9cfa..95a2887c339 100644 --- a/adapters/agenticx/agenticx_test.go +++ b/adapters/agenticx/agenticx_test.go @@ -1,4 +1,4 @@ -package adsmartx +package agenticx import ( "strings" @@ -16,9 +16,9 @@ import ( func TestJsonSamples(t *testing.T) { bidder, buildErr := Builder( - openrtb_ext.BidderAdsmartx, + openrtb_ext.BidderAgenticx, config.Adapter{ - Endpoint: "https://ads.adsmartx.com/ads/rtb/prebid/server", + Endpoint: "https://ads.theagenticx.ai/ads/rtb/prebid/server", }, config.Server{ ExternalUrl: "http://hosturl.com", @@ -28,7 +28,7 @@ func TestJsonSamples(t *testing.T) { ) require.NoError(t, buildErr, "Builder returned unexpected error") - adapterstest.RunJSONBidderTest(t, "adsmartxtest", bidder) + adapterstest.RunJSONBidderTest(t, "agenticxtest", bidder) } func TestParseImpExt(t *testing.T) { @@ -65,6 +65,7 @@ func TestGetBidType(t *testing.T) { }{ {"Banner", openrtb2.MarkupBanner, false, openrtb_ext.BidTypeBanner}, {"Video", openrtb2.MarkupVideo, false, openrtb_ext.BidTypeVideo}, + {"Audio", openrtb2.MarkupAudio, false, openrtb_ext.BidTypeAudio}, {"Unknown", 99, true, ""}, } @@ -90,7 +91,7 @@ func TestMakeRequestsErrors(t *testing.T) { }{ {"Invalid ext", []openrtb2.Imp{{ID: "1", Ext: jsonutil.RawMessage(`not-json`)}}, "impID 1:"}, {"No valid imps", []openrtb2.Imp{}, "no valid impressions"}, - {"No banner or video", []openrtb2.Imp{{ID: "1", Ext: jsonutil.RawMessage(`{"bidder":{"bidfloor": 0.5}}`)}}, "no banner or video object specified"}, + {"No banner or video or audio", []openrtb2.Imp{{ID: "1", Ext: jsonutil.RawMessage(`{"bidder":{"bidfloor": 0.5}}`)}}, "no banner, video, or audio object specified"}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { diff --git a/adapters/agenticx/agenticxtest/exemplary/banner_bid_floor_set.json b/adapters/agenticx/agenticxtest/exemplary/banner_bid_floor_set.json index f70dd8ec0ba..ceff28cf4b5 100644 --- a/adapters/agenticx/agenticxtest/exemplary/banner_bid_floor_set.json +++ b/adapters/agenticx/agenticxtest/exemplary/banner_bid_floor_set.json @@ -12,7 +12,7 @@ "httpCalls": [ { "expectedRequest": { - "uri": "https://ads.adsmartx.com/ads/rtb/prebid/server", + "uri": "https://ads.theagenticx.ai/ads/rtb/prebid/server", "body": { "id": "test-bid-floor-set", "imp": [ diff --git a/adapters/agenticx/agenticxtest/exemplary/imp_banner_and_video.json b/adapters/agenticx/agenticxtest/exemplary/imp_banner_and_video.json index 4025a048e56..44f9181dbd1 100644 --- a/adapters/agenticx/agenticxtest/exemplary/imp_banner_and_video.json +++ b/adapters/agenticx/agenticxtest/exemplary/imp_banner_and_video.json @@ -17,7 +17,7 @@ "httpCalls": [ { "expectedRequest": { - "uri": "https://ads.adsmartx.com/ads/rtb/prebid/server", + "uri": "https://ads.theagenticx.ai/ads/rtb/prebid/server", "body": { "id": "mixed-media-request", "imp": [ diff --git a/adapters/agenticx/agenticxtest/exemplary/multiple_seatbids_bids.json b/adapters/agenticx/agenticxtest/exemplary/multiple_seatbids_bids.json index 036e992d984..ecc6567a379 100644 --- a/adapters/agenticx/agenticxtest/exemplary/multiple_seatbids_bids.json +++ b/adapters/agenticx/agenticxtest/exemplary/multiple_seatbids_bids.json @@ -12,7 +12,7 @@ "httpCalls": [ { "expectedRequest": { - "uri": "https://ads.adsmartx.com/ads/rtb/prebid/server", + "uri": "https://ads.theagenticx.ai/ads/rtb/prebid/server", "body": { "id": "multi-seat-request", "imp": [ diff --git a/adapters/agenticx/agenticxtest/exemplary/simple_audio.json b/adapters/agenticx/agenticxtest/exemplary/simple_audio.json new file mode 100644 index 00000000000..5f34e322080 --- /dev/null +++ b/adapters/agenticx/agenticxtest/exemplary/simple_audio.json @@ -0,0 +1,101 @@ +{ + "mockBidRequest": { + "id": "test-audio-request", + "device": { + "ip": "10.0.0.1", + "ua": "Mozilla/5.0" + }, + "site": { + "page": "https://example.com" + }, + "imp": [ + { + "id": "audio-imp-id", + "audio": { + "mimes": ["audio/mp4"], + "minduration": 5, + "maxduration": 30 + }, + "ext": { + "bidder": { + "bidfloor": 1.0 + } + } + } + ] + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://ads.theagenticx.ai/ads/rtb/prebid/server", + "body": { + "id": "test-audio-request", + "imp": [ + { + "id": "audio-imp-id", + "audio": { + "mimes": ["audio/mp4"], + "minduration": 5, + "maxduration": 30 + }, + "bidfloor": 1.0, + "ext": { + "bidder": { + "bidfloor": 1.0 + } + } + } + ], + "site": { + "page": "https://example.com" + }, + "device": { + "ip": "10.0.0.1", + "ua": "Mozilla/5.0" + } + }, + "impIDs": ["audio-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "id": "test-audio-request", + "seatbid": [ + { + "seat": "agenticx", + "bid": [ + { + "id": "audio-bid-id", + "impid": "audio-imp-id", + "price": 2.0, + "adm": "", + "crid": "audio-creative-001", + "mtype": 3 + } + ] + } + ], + "cur": "USD" + } + } + } + ], + "expectedBidResponses": [ + { + "currency": "USD", + "bids": [ + { + "bid": { + "id": "audio-bid-id", + "impid": "audio-imp-id", + "price": 2.0, + "adm": "", + "crid": "audio-creative-001", + "mtype": 3 + }, + "type": "audio" + } + ] + } + ] +} diff --git a/adapters/agenticx/agenticxtest/exemplary/simple_banner.json b/adapters/agenticx/agenticxtest/exemplary/simple_banner.json index 732eb4f240d..43f9fec9429 100644 --- a/adapters/agenticx/agenticxtest/exemplary/simple_banner.json +++ b/adapters/agenticx/agenticxtest/exemplary/simple_banner.json @@ -7,7 +7,7 @@ }, "app": { "id": "1", - "bundle": "com.adsmartx.sampleapp" + "bundle": "com.agenticx.sampleapp" }, "imp": [ { @@ -32,7 +32,7 @@ "httpCalls": [ { "expectedRequest": { - "uri": "https://ads.adsmartx.com/ads/rtb/prebid/server", + "uri": "https://ads.theagenticx.ai/ads/rtb/prebid/server", "body": { "id": "test-request-id", "imp": [ @@ -57,7 +57,7 @@ ], "app": { "id": "1", - "bundle": "com.adsmartx.sampleapp" + "bundle": "com.agenticx.sampleapp" }, "device": { "ip": "123.123.123.123", @@ -72,7 +72,7 @@ "id": "test-request-id", "seatbid": [ { - "seat": "adsmartx", + "seat": "agenticx", "bid": [ { "id": "test_bid_id", diff --git a/adapters/agenticx/agenticxtest/exemplary/simple_video.json b/adapters/agenticx/agenticxtest/exemplary/simple_video.json index 38795dda174..7c5101d7222 100644 --- a/adapters/agenticx/agenticxtest/exemplary/simple_video.json +++ b/adapters/agenticx/agenticxtest/exemplary/simple_video.json @@ -29,7 +29,7 @@ "httpCalls": [ { "expectedRequest": { - "uri": "https://ads.adsmartx.com/ads/rtb/prebid/server", + "uri": "https://ads.theagenticx.ai/ads/rtb/prebid/server", "body": { "id": "test-video-request", "imp": [ @@ -66,7 +66,7 @@ "id": "test-video-request", "seatbid": [ { - "seat": "adsmartx", + "seat": "agenticx", "bid": [ { "id": "video-bid-id", diff --git a/adapters/agenticx/agenticxtest/exemplary/test_mode_set.json b/adapters/agenticx/agenticxtest/exemplary/test_mode_set.json index 232f383a42e..fc8aa233942 100644 --- a/adapters/agenticx/agenticxtest/exemplary/test_mode_set.json +++ b/adapters/agenticx/agenticxtest/exemplary/test_mode_set.json @@ -16,7 +16,7 @@ "httpCalls": [ { "expectedRequest": { - "uri": "https://ads.adsmartx.com/ads/rtb/prebid/server", + "uri": "https://ads.theagenticx.ai/ads/rtb/prebid/server", "body": { "id": "test-mode-request", "imp": [ diff --git a/adapters/agenticx/agenticxtest/supplemental/bad_media_type.json b/adapters/agenticx/agenticxtest/supplemental/bad_media_type.json index f5f29b09bdb..458aa0e8cd5 100644 --- a/adapters/agenticx/agenticxtest/supplemental/bad_media_type.json +++ b/adapters/agenticx/agenticxtest/supplemental/bad_media_type.json @@ -12,7 +12,7 @@ "httpCalls": [ { "expectedRequest": { - "uri": "https://ads.adsmartx.com/ads/rtb/prebid/server", + "uri": "https://ads.theagenticx.ai/ads/rtb/prebid/server", "body": { "id": "bad-mtype-request", "imp": [ diff --git a/adapters/agenticx/agenticxtest/supplemental/bad_response.json b/adapters/agenticx/agenticxtest/supplemental/bad_response.json index d4a208f4868..c48f75fcdab 100644 --- a/adapters/agenticx/agenticxtest/supplemental/bad_response.json +++ b/adapters/agenticx/agenticxtest/supplemental/bad_response.json @@ -12,7 +12,7 @@ "httpCalls": [ { "expectedRequest": { - "uri": "https://ads.adsmartx.com/ads/rtb/prebid/server", + "uri": "https://ads.theagenticx.ai/ads/rtb/prebid/server", "body": { "id": "bad-response-request", "imp": [ diff --git a/adapters/agenticx/agenticxtest/supplemental/imp_no_banner_no_video.json b/adapters/agenticx/agenticxtest/supplemental/imp_no_banner_no_video.json index df4cd1b8bf2..5ce66765b29 100644 --- a/adapters/agenticx/agenticxtest/supplemental/imp_no_banner_no_video.json +++ b/adapters/agenticx/agenticxtest/supplemental/imp_no_banner_no_video.json @@ -10,7 +10,7 @@ }, "expectedMakeRequestsErrors": [ { - "value": "impID 1: no banner or video object specified", + "value": "impID 1: no banner, video, or audio object specified", "comparison": "literal" }, { diff --git a/adapters/agenticx/agenticxtest/supplemental/status_204.json b/adapters/agenticx/agenticxtest/supplemental/status_204.json index cf64b41e026..376d1d9f3c8 100644 --- a/adapters/agenticx/agenticxtest/supplemental/status_204.json +++ b/adapters/agenticx/agenticxtest/supplemental/status_204.json @@ -12,7 +12,7 @@ "httpCalls": [ { "expectedRequest": { - "uri": "https://ads.adsmartx.com/ads/rtb/prebid/server", + "uri": "https://ads.theagenticx.ai/ads/rtb/prebid/server", "body": { "id": "status-204", "imp": [ diff --git a/adapters/agenticx/agenticxtest/supplemental/status_not_200.json b/adapters/agenticx/agenticxtest/supplemental/status_not_200.json index 41eb8d2715f..d7f9315ad47 100644 --- a/adapters/agenticx/agenticxtest/supplemental/status_not_200.json +++ b/adapters/agenticx/agenticxtest/supplemental/status_not_200.json @@ -12,7 +12,7 @@ "httpCalls": [ { "expectedRequest": { - "uri": "https://ads.adsmartx.com/ads/rtb/prebid/server", + "uri": "https://ads.theagenticx.ai/ads/rtb/prebid/server", "body": { "id": "status-500", "imp": [ diff --git a/adapters/agenticx/params_test.go b/adapters/agenticx/params_test.go index 7a8c777e09b..787a0c0e9c2 100644 --- a/adapters/agenticx/params_test.go +++ b/adapters/agenticx/params_test.go @@ -1,4 +1,4 @@ -package adsmartx +package agenticx import ( "encoding/json" @@ -27,7 +27,7 @@ func TestValidParams(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - assert.NoError(t, validator.Validate(openrtb_ext.BidderAdsmartx, json.RawMessage(tt.input))) + assert.NoError(t, validator.Validate(openrtb_ext.BidderAgenticx, json.RawMessage(tt.input))) }) } } @@ -53,7 +53,7 @@ func TestInvalidParams(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - assert.Error(t, validator.Validate(openrtb_ext.BidderAdsmartx, json.RawMessage(tt.input))) + assert.Error(t, validator.Validate(openrtb_ext.BidderAgenticx, json.RawMessage(tt.input))) }) } } From 034f41a5f01da47a38eaa26e2499594d04774109 Mon Sep 17 00:00:00 2001 From: Pritish Desai Date: Thu, 16 Jul 2026 00:33:21 +0530 Subject: [PATCH 7/7] RM-1891: Fixed test case for audio ads --- adapters/agenticx/agenticxtest/exemplary/simple_audio.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adapters/agenticx/agenticxtest/exemplary/simple_audio.json b/adapters/agenticx/agenticxtest/exemplary/simple_audio.json index 5f34e322080..2134957575f 100644 --- a/adapters/agenticx/agenticxtest/exemplary/simple_audio.json +++ b/adapters/agenticx/agenticxtest/exemplary/simple_audio.json @@ -12,7 +12,7 @@ { "id": "audio-imp-id", "audio": { - "mimes": ["audio/mp4"], + "mimes": ["audio/mp3"], "minduration": 5, "maxduration": 30 }, @@ -34,7 +34,7 @@ { "id": "audio-imp-id", "audio": { - "mimes": ["audio/mp4"], + "mimes": ["audio/mp3"], "minduration": 5, "maxduration": 30 },