33 < meta charset ="UTF-8 ">
44 < script src ="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js "> </ script >
55 < script src ="/js/main.js "> </ script >
6- < script type ="module " src ="/js/dangerModal.js "> </ script >
7- < script type ="module " src ="/js/operations.js "> </ script >
8- < script type ="module " src ="/js/output.js "> </ script >
9- < script type ="module " src ="/js/roleBadge.js "> </ script >
106 < link rel ="stylesheet " href ="/css/style.css ">
117</ head >
128< body >
@@ -24,8 +20,10 @@ <h1>UID2 Env - Client Key Management</h1>
2420{% endif %}
2521
2622< script type ="module ">
27- import { initializeOperations } from '/js/operations.js' ;
28- import { initializeOutput } from '/js/output.js' ;
23+ import { initializeOperations } from '/js/component/operations.js' ;
24+ import { initializeOutput } from '/js/component/output.js' ;
25+
26+ const devKeyNameWarning = '⚠️ Keys for dev/test purposes must be named dev-uid2-<THREE_LETTER_INITIALS|TEAM_NAME>-<JIRA_TICKET>-<BRIEF_DESCRIPTION>. ⚠️' ;
2927
3028document . addEventListener ( 'DOMContentLoaded' , function ( ) {
3129 const siteIdInput = {
@@ -59,7 +57,28 @@ <h1>UID2 Env - Client Key Management</h1>
5957 name : 'roles' ,
6058 label : 'Roles' ,
6159 required : true ,
62- type : 'multi-line'
60+ type : 'multi-select' ,
61+ options : [
62+ {
63+ value : 'MAPPER' ,
64+ label : 'MAPPER' ,
65+ hint : 'For Advertisers'
66+ } ,
67+ {
68+ value : 'ID_READER' ,
69+ label : 'ID_READER' ,
70+ hint : 'For DSPs'
71+ } ,
72+ {
73+ value : 'GENERATOR' ,
74+ label : 'GENERATOR' ,
75+ hint : 'For Publishers'
76+ } ,
77+ {
78+ value : 'SHARER' ,
79+ label : 'SHARER' ,
80+ } ,
81+ ]
6382 } ;
6483
6584 const keyIdInput = {
@@ -139,21 +158,12 @@ <h1>UID2 Env - Client Key Management</h1>
139158 serviceIdInput ,
140159 rolesInput
141160 ] ,
161+ description : devKeyNameWarning ,
142162 apiCall : {
143163 method : 'POST' ,
144164 getUrl : ( inputs ) => `/api/client/add?name=${ encodeURIComponent ( inputs . name ) } &roles=${ encodeURIComponent ( inputs . roles ) } &site_id=${ inputs . siteId } &service_id=${ inputs . serviceId } `
145165 }
146166 } ,
147- {
148- id : 'revealKey' ,
149- title : 'Reveal Key' ,
150- role : 'elevated' ,
151- inputs : [ contactInput ] ,
152- apiCall : {
153- method : 'GET' ,
154- getUrl : ( inputs ) => `/api/client/reveal?contact=${ encodeURIComponent ( inputs . contact ) } `
155- }
156- } ,
157167 {
158168 id : 'updateRoles' ,
159169 title : 'Update Roles' ,
@@ -183,6 +193,16 @@ <h1>UID2 Env - Client Key Management</h1>
183193 } ,
184194 ] ,
185195 danger : [
196+ {
197+ id : 'revealKey' ,
198+ title : 'Reveal Key' ,
199+ role : 'elevated' ,
200+ inputs : [ contactInput ] ,
201+ apiCall : {
202+ method : 'GET' ,
203+ getUrl : ( inputs ) => `/api/client/reveal?contact=${ encodeURIComponent ( inputs . contact ) } `
204+ }
205+ } ,
186206 {
187207 id : 'deleteKey' ,
188208 title : 'Delete Key' ,
@@ -226,7 +246,7 @@ <h1>UID2 Env - Client Key Management</h1>
226246 contactInput ,
227247 { ...nameInput , name : 'newName' , label : 'New Name' }
228248 ] ,
229- description : 'This will change the display name of the client key.' ,
249+ description : 'This will change the display name of the client key.\n' + devKeyNameWarning ,
230250 confirmationText : 'This will rename the client key. Make sure you have confirmed this change with the participant.' ,
231251 apiCall : {
232252 method : 'POST' ,
0 commit comments