import { Consumer } from "@apideck/unify/models/components";
let value: Consumer = {
consumerId: "test_consumer_id",
applicationId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
metadata: {
accountName: "SpaceX",
userName: "Elon Musk",
email: "elon@musk.com",
image: "https://www.spacex.com/static/images/share.jpg",
},
connections: [
{
id: "1111+test_user_id",
name: "Salesforce",
icon:
"https://res.cloudinary.com/apideck/image/upload/v1529456047/catalog/salesforce/icon128x128.png",
logo:
"https://c1.sfdcstatic.com/content/dam/web/en_us/www/images/home/logo-salesforce-m.svg",
website: "https://www.salesforce.com",
tagLine:
"CRM software solutions and enterprise cloud computing from Salesforce, the leader in customer relationship management (CRM) and PaaS. Free 30 day trial.",
serviceId: "teamleader",
unifiedApi: "crm",
consumerId: "test_user_id",
authType: "oauth2",
enabled: true,
settings: {
"instance_url": "https://eu28.salesforce.com",
},
metadata: {
"account": {
"name": "My Company",
"id": "c01458a5-7276-41ce-bc19-639906b0450a",
},
"plan": "enterprise",
},
createdAt: "2020-09-19T12:18:37.071Z",
updatedAt: "2020-09-19T12:18:37.071Z",
state: "authorized",
health: "ok",
},
],
services: [
"salesforce",
"stripe",
],
aggregatedRequestCount: 101,
requestCounts: {
unify: 100,
proxy: 10,
vault: 21,
},
created: "2021-05-07T12:55:42.242Z",
modified: "2021-05-07T12:55:42.242Z",
requestCountUpdated: "2021-05-07T12:55:42.242Z",
};| Field | Type | Required | Description | Example |
|---|---|---|---|---|
consumerId |
string | ✔️ | Unique consumer identifier. You can freely choose a consumer ID yourself. Most of the time, this is an ID of your internal data model that represents a user or account in your system (for example account:12345). If the consumer doesn't exist yet, Vault will upsert a consumer based on your ID. | test_consumer_id |
applicationId |
string | ➖ | ID of your Apideck Application | dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX |
metadata |
components.ConsumerMetadata | ➖ | The metadata of the consumer. This is used to display the consumer in the sidebar. This is optional, but recommended. | |
connections |
components.ConsumerConnection[] | ➖ | N/A | |
services |
string[] | ➖ | N/A | [ "salesforce", "stripe" ] |
aggregatedRequestCount |
number | ➖ | N/A | 101 |
requestCounts |
components.RequestCountAllocation | ➖ | N/A | |
created |
string | ➖ | N/A | 2021-05-07T12:55:42.242Z |
modified |
string | ➖ | N/A | 2021-05-07T12:55:42.242Z |
requestCountUpdated |
string | ➖ | N/A | 2021-05-07T12:55:42.242Z |