myoperator-ui 0.0.156 → 0.0.157
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +9 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7078,7 +7078,7 @@ export interface EndpointDetailsProps
|
|
|
7078
7078
|
baseUrl?: string;
|
|
7079
7079
|
/** Company ID */
|
|
7080
7080
|
companyId?: string;
|
|
7081
|
-
/** Authentication token (secret
|
|
7081
|
+
/** Authentication token (secret, masked by default in both variants) */
|
|
7082
7082
|
authToken: string;
|
|
7083
7083
|
/** Secret key (secret) - only shown in calling variant */
|
|
7084
7084
|
secretKey?: string;
|
|
@@ -7086,7 +7086,7 @@ export interface EndpointDetailsProps
|
|
|
7086
7086
|
apiKey?: string;
|
|
7087
7087
|
/** Callback when a field value is copied */
|
|
7088
7088
|
onValueCopy?: (field: string, value: string) => void;
|
|
7089
|
-
/** Callback when regenerate is clicked for a field
|
|
7089
|
+
/** Callback when regenerate is clicked for a field */
|
|
7090
7090
|
onRegenerate?: (field: "authToken" | "secretKey") => void;
|
|
7091
7091
|
/** Callback when revoke access is clicked - only used in calling variant */
|
|
7092
7092
|
onRevokeAccess?: () => void;
|
|
@@ -7126,6 +7126,7 @@ export interface EndpointDetailsProps
|
|
|
7126
7126
|
* baseUrl="https://api.myoperator.co/whatsapp"
|
|
7127
7127
|
* companyId="WA-12345"
|
|
7128
7128
|
* authToken="waba_token_abc123"
|
|
7129
|
+
* onRegenerate={(field) => console.log(\`Regenerate \${field}\`)}
|
|
7129
7130
|
* />
|
|
7130
7131
|
* \`\`\`
|
|
7131
7132
|
*/
|
|
@@ -7247,10 +7248,15 @@ export const EndpointDetails = React.forwardRef<
|
|
|
7247
7248
|
)}
|
|
7248
7249
|
</div>
|
|
7249
7250
|
) : (
|
|
7250
|
-
/* WhatsApp variant: full-width Authentication,
|
|
7251
|
+
/* WhatsApp variant: full-width Authentication, secret with regenerate */
|
|
7251
7252
|
<ReadableField
|
|
7252
7253
|
label="Authentication"
|
|
7253
7254
|
value={authToken}
|
|
7255
|
+
secret
|
|
7256
|
+
headerAction={{
|
|
7257
|
+
label: "Regenerate",
|
|
7258
|
+
onClick: () => onRegenerate?.("authToken"),
|
|
7259
|
+
}}
|
|
7254
7260
|
onValueCopy={handleCopy("authToken")}
|
|
7255
7261
|
/>
|
|
7256
7262
|
)}
|