Skip to content

Function: defineCredentials()

ts
function defineCredentials<T>(map): T;

Defined in: packages/core/src/credentials/credentials.ts:294

Declare the credentials your marketplace server requires.

This is a typed identity function — it returns the same map you pass in, providing full TypeScript inference while serving as the introspection anchor read by the Vinkius platform at deploy time.

Type Parameters

Type Parameter
T extends CredentialsMap

Parameters

ParameterType
mapT

Returns

T

Example

ts
export const credentials = defineCredentials({
  REDIS_URL: {
    label: 'Redis URL',
    description: 'Your Upstash Redis REST URL.',
    type: 'url',
    required: true,
    sensitive: false,
  },
  REDIS_TOKEN: {
    label: 'Redis Token',
    description: 'Your Upstash Redis REST Token.',
    type: 'api_key',
    required: true,
    sensitive: true,
  },
});