Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions apps/docs/content/docs/en/integrations/gong.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ Retrieve detailed call data including trackers, topics, highlights, and AI spotl
| ↳ `section` | string | Outline section name |
| ↳ `startTime` | number | Section start in seconds from call start |
| ↳ `duration` | number | Section duration in seconds |
| ↳ `items` | array | Bullet items within the section |
| ↳ `keyPoints` | array | AI-generated key points of the call |
| ↳ `text` | string | Key point text |
| ↳ `callOutcome` | object | AI-determined call outcome \(Call Spotlight\) |
Expand All @@ -273,6 +274,9 @@ Retrieve detailed call data including trackers, topics, highlights, and AI spotl
| ↳ `occurrences` | array | Details per occurrence |
| ↳ `highlights` | array | AI-generated highlights including next steps, action items, and key moments |
| ↳ `title` | string | Title of the highlight |
| ↳ `items` | array | Individual highlight items |
| ↳ `text` | string | Text of the highlight item |
| ↳ `startTimes` | array | Start times in seconds from call start |
| ↳ `interaction` | object | Interaction statistics |
| ↳ `interactionStats` | array | Interaction stat measurements \(Longest Monologue, Interactivity, Patience, etc.\) |
| ↳ `name` | string | Stat name |
Expand Down
10 changes: 10 additions & 0 deletions apps/docs/content/docs/en/integrations/google_forms.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,16 @@ Apply multiple updates to a form (add items, update info, change settings, etc.)
| ↳ `quizSettings` | object | Quiz settings |
| ↳ `isQuiz` | boolean | Whether the form is a quiz |
| ↳ `emailCollectionType` | string | Email collection type |
| ↳ `items` | array | The form items \(questions, sections, etc.\) |
| ↳ `itemId` | string | Item ID |
| ↳ `title` | string | Item title |
| ↳ `description` | string | Item description |
| ↳ `questionItem` | json | Question item configuration |
| ↳ `questionGroupItem` | json | Question group configuration |
| ↳ `pageBreakItem` | json | Page break configuration |
| ↳ `textItem` | json | Text item configuration |
| ↳ `imageItem` | json | Image item configuration |
| ↳ `videoItem` | json | Video item configuration |
| ↳ `revisionId` | string | The revision ID of the form |
| ↳ `responderUri` | string | The URI to share with responders |
| ↳ `linkedSheetId` | string | The ID of the linked Google Sheet |
Expand Down
1 change: 1 addition & 0 deletions apps/docs/content/docs/en/integrations/onepassword.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ List all vaults accessible by the Connect token or Service Account
| ↳ `description` | string | Vault description |
| ↳ `attributeVersion` | number | Vault attribute version |
| ↳ `contentVersion` | number | Vault content version |
| ↳ `items` | number | Number of items in the vault |
| ↳ `type` | string | Vault type \(USER_CREATED, PERSONAL, or EVERYONE\) |
| ↳ `createdAt` | string | Creation timestamp |
| ↳ `updatedAt` | string | Last update timestamp |
Expand Down
8 changes: 8 additions & 0 deletions apps/docs/content/docs/en/integrations/sap_concur.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1479,6 +1479,7 @@ List allocations on an expense (GET /expensereports/v4/users/\{userId\}/context/
| --------- | ---- | ----------- |
| `status` | number | HTTP status code returned by Concur |
| `data` | json | Allocations list payload |
| ↳ `items` | array | Array of allocation objects \(allocationId, accountCode, percentage, allocationAmount, approvedAmount, claimedAmount, customData, expenseId, isSystemAllocation, isPercentEdited, overLimitAccountCode\) |

### SAP Concur List Attendee Associations

Expand Down Expand Up @@ -1547,6 +1548,12 @@ List budget categories (GET /budget/v4/budgetCategory).
| --------- | ---- | ----------- |
| `status` | number | HTTP status code returned by Concur |
| `data` | json | Budget categories collection payload |
| ↳ `items` | array | Array of budget category objects |
| ↳ `id` | string | Category ID |
| ↳ `name` | string | Admin-facing category name |
| ↳ `description` | string | Friendly name |
| ↳ `statusType` | string | Status: OPEN or REMOVED |
| ↳ `expenseTypes` | array | Expense types in this category \(id, featureTypeCode, expenseTypeCode, name\) |

### SAP Concur List Budgets

Expand All @@ -1573,6 +1580,7 @@ List budget item headers (GET /budget/v4/budgetItemHeader).
| --------- | ---- | ----------- |
| `status` | number | HTTP status code returned by Concur |
| `data` | json | Budget headers collection payload |
| ↳ `items` | array | Array of budget item header summaries \(id, name, description, budgetItemStatusType, budgetType, currencyCode, fiscalYear, budgetAmounts, owner, ...\) |
| ↳ `offset` | number | Page offset |
| ↳ `limit` | number | Page size |
| ↳ `totalCount` | number | Total result count |
Expand Down
3 changes: 3 additions & 0 deletions apps/docs/content/docs/en/integrations/sharepoint.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,9 @@ Get metadata (and optionally columns/items) for a SharePoint list
| ↳ `lastModifiedDateTime` | string | When the list was last modified |
| ↳ `list` | object | List properties \(e.g., template\) |
| ↳ `columns` | array | List column definitions |
| ↳ `items` | array | List items \(with fields when expanded\) |
| ↳ `id` | string | Item ID |
| ↳ `fields` | object | Field values for the item |
| `lists` | array | All lists in the site when no listId/title provided |
| `items` | array | List items with expanded fields when reading list items |
| ↳ `id` | string | Item ID |
Expand Down
98 changes: 98 additions & 0 deletions apps/docs/content/docs/en/integrations/stripe.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -961,6 +961,20 @@ Create a new subscription for a customer
| ↳ `description` | string | Subscription description \(max 500 characters\) |
| ↳ `discount` | json | Discount that applies to the subscription |
| ↳ `ended_at` | number | Unix timestamp when the subscription ended |
| ↳ `items` | object | List of subscription items |
| ↳ `object` | string | String representing the object type \(list\) |
| ↳ `data` | array | Array of subscription items |
| ↳ `id` | string | Unique identifier for the subscription item |
| ↳ `object` | string | String representing the object type \(subscription_item\) |
| ↳ `billing_thresholds` | json | Billing thresholds for the subscription item |
| ↳ `created` | number | Unix timestamp when the item was added |
| ↳ `metadata` | json | Set of key-value pairs for storing additional information |
| ↳ `price` | json | Price object for this subscription item |
| ↳ `quantity` | number | Quantity of the plan to subscribe to |
| ↳ `subscription` | string | ID of the subscription this item belongs to |
| ↳ `tax_rates` | array | Tax rates applied to this subscription item |
| ↳ `has_more` | boolean | Whether there are more items |
| ↳ `url` | string | URL to fetch more items |
| ↳ `latest_invoice` | string | ID of the most recent invoice |
| ↳ `livemode` | boolean | Whether object exists in live mode or test mode |
| ↳ `metadata` | json | Set of key-value pairs for storing additional information |
Expand Down Expand Up @@ -1024,6 +1038,20 @@ Retrieve an existing subscription by ID
| ↳ `description` | string | Subscription description \(max 500 characters\) |
| ↳ `discount` | json | Discount that applies to the subscription |
| ↳ `ended_at` | number | Unix timestamp when the subscription ended |
| ↳ `items` | object | List of subscription items |
| ↳ `object` | string | String representing the object type \(list\) |
| ↳ `data` | array | Array of subscription items |
| ↳ `id` | string | Unique identifier for the subscription item |
| ↳ `object` | string | String representing the object type \(subscription_item\) |
| ↳ `billing_thresholds` | json | Billing thresholds for the subscription item |
| ↳ `created` | number | Unix timestamp when the item was added |
| ↳ `metadata` | json | Set of key-value pairs for storing additional information |
| ↳ `price` | json | Price object for this subscription item |
| ↳ `quantity` | number | Quantity of the plan to subscribe to |
| ↳ `subscription` | string | ID of the subscription this item belongs to |
| ↳ `tax_rates` | array | Tax rates applied to this subscription item |
| ↳ `has_more` | boolean | Whether there are more items |
| ↳ `url` | string | URL to fetch more items |
| ↳ `latest_invoice` | string | ID of the most recent invoice |
| ↳ `livemode` | boolean | Whether object exists in live mode or test mode |
| ↳ `metadata` | json | Set of key-value pairs for storing additional information |
Expand Down Expand Up @@ -1090,6 +1118,20 @@ Update an existing subscription
| ↳ `description` | string | Subscription description \(max 500 characters\) |
| ↳ `discount` | json | Discount that applies to the subscription |
| ↳ `ended_at` | number | Unix timestamp when the subscription ended |
| ↳ `items` | object | List of subscription items |
| ↳ `object` | string | String representing the object type \(list\) |
| ↳ `data` | array | Array of subscription items |
| ↳ `id` | string | Unique identifier for the subscription item |
| ↳ `object` | string | String representing the object type \(subscription_item\) |
| ↳ `billing_thresholds` | json | Billing thresholds for the subscription item |
| ↳ `created` | number | Unix timestamp when the item was added |
| ↳ `metadata` | json | Set of key-value pairs for storing additional information |
| ↳ `price` | json | Price object for this subscription item |
| ↳ `quantity` | number | Quantity of the plan to subscribe to |
| ↳ `subscription` | string | ID of the subscription this item belongs to |
| ↳ `tax_rates` | array | Tax rates applied to this subscription item |
| ↳ `has_more` | boolean | Whether there are more items |
| ↳ `url` | string | URL to fetch more items |
| ↳ `latest_invoice` | string | ID of the most recent invoice |
| ↳ `livemode` | boolean | Whether object exists in live mode or test mode |
| ↳ `metadata` | json | Set of key-value pairs for storing additional information |
Expand Down Expand Up @@ -1155,6 +1197,20 @@ Cancel a subscription
| ↳ `description` | string | Subscription description \(max 500 characters\) |
| ↳ `discount` | json | Discount that applies to the subscription |
| ↳ `ended_at` | number | Unix timestamp when the subscription ended |
| ↳ `items` | object | List of subscription items |
| ↳ `object` | string | String representing the object type \(list\) |
| ↳ `data` | array | Array of subscription items |
| ↳ `id` | string | Unique identifier for the subscription item |
| ↳ `object` | string | String representing the object type \(subscription_item\) |
| ↳ `billing_thresholds` | json | Billing thresholds for the subscription item |
| ↳ `created` | number | Unix timestamp when the item was added |
| ↳ `metadata` | json | Set of key-value pairs for storing additional information |
| ↳ `price` | json | Price object for this subscription item |
| ↳ `quantity` | number | Quantity of the plan to subscribe to |
| ↳ `subscription` | string | ID of the subscription this item belongs to |
| ↳ `tax_rates` | array | Tax rates applied to this subscription item |
| ↳ `has_more` | boolean | Whether there are more items |
| ↳ `url` | string | URL to fetch more items |
| ↳ `latest_invoice` | string | ID of the most recent invoice |
| ↳ `livemode` | boolean | Whether object exists in live mode or test mode |
| ↳ `metadata` | json | Set of key-value pairs for storing additional information |
Expand Down Expand Up @@ -1218,6 +1274,20 @@ Resume a subscription that was scheduled for cancellation
| ↳ `description` | string | Subscription description \(max 500 characters\) |
| ↳ `discount` | json | Discount that applies to the subscription |
| ↳ `ended_at` | number | Unix timestamp when the subscription ended |
| ↳ `items` | object | List of subscription items |
| ↳ `object` | string | String representing the object type \(list\) |
| ↳ `data` | array | Array of subscription items |
| ↳ `id` | string | Unique identifier for the subscription item |
| ↳ `object` | string | String representing the object type \(subscription_item\) |
| ↳ `billing_thresholds` | json | Billing thresholds for the subscription item |
| ↳ `created` | number | Unix timestamp when the item was added |
| ↳ `metadata` | json | Set of key-value pairs for storing additional information |
| ↳ `price` | json | Price object for this subscription item |
| ↳ `quantity` | number | Quantity of the plan to subscribe to |
| ↳ `subscription` | string | ID of the subscription this item belongs to |
| ↳ `tax_rates` | array | Tax rates applied to this subscription item |
| ↳ `has_more` | boolean | Whether there are more items |
| ↳ `url` | string | URL to fetch more items |
| ↳ `latest_invoice` | string | ID of the most recent invoice |
| ↳ `livemode` | boolean | Whether object exists in live mode or test mode |
| ↳ `metadata` | json | Set of key-value pairs for storing additional information |
Expand Down Expand Up @@ -1284,6 +1354,20 @@ List all subscriptions
| ↳ `description` | string | Subscription description \(max 500 characters\) |
| ↳ `discount` | json | Discount that applies to the subscription |
| ↳ `ended_at` | number | Unix timestamp when the subscription ended |
| ↳ `items` | object | List of subscription items |
| ↳ `object` | string | String representing the object type \(list\) |
| ↳ `data` | array | Array of subscription items |
| ↳ `id` | string | Unique identifier for the subscription item |
| ↳ `object` | string | String representing the object type \(subscription_item\) |
| ↳ `billing_thresholds` | json | Billing thresholds for the subscription item |
| ↳ `created` | number | Unix timestamp when the item was added |
| ↳ `metadata` | json | Set of key-value pairs for storing additional information |
| ↳ `price` | json | Price object for this subscription item |
| ↳ `quantity` | number | Quantity of the plan to subscribe to |
| ↳ `subscription` | string | ID of the subscription this item belongs to |
| ↳ `tax_rates` | array | Tax rates applied to this subscription item |
| ↳ `has_more` | boolean | Whether there are more items |
| ↳ `url` | string | URL to fetch more items |
| ↳ `latest_invoice` | string | ID of the most recent invoice |
| ↳ `livemode` | boolean | Whether object exists in live mode or test mode |
| ↳ `metadata` | json | Set of key-value pairs for storing additional information |
Expand Down Expand Up @@ -1347,6 +1431,20 @@ Search for subscriptions using query syntax
| ↳ `description` | string | Subscription description \(max 500 characters\) |
| ↳ `discount` | json | Discount that applies to the subscription |
| ↳ `ended_at` | number | Unix timestamp when the subscription ended |
| ↳ `items` | object | List of subscription items |
| ↳ `object` | string | String representing the object type \(list\) |
| ↳ `data` | array | Array of subscription items |
| ↳ `id` | string | Unique identifier for the subscription item |
| ↳ `object` | string | String representing the object type \(subscription_item\) |
| ↳ `billing_thresholds` | json | Billing thresholds for the subscription item |
| ↳ `created` | number | Unix timestamp when the item was added |
| ↳ `metadata` | json | Set of key-value pairs for storing additional information |
| ↳ `price` | json | Price object for this subscription item |
| ↳ `quantity` | number | Quantity of the plan to subscribe to |
| ↳ `subscription` | string | ID of the subscription this item belongs to |
| ↳ `tax_rates` | array | Tax rates applied to this subscription item |
| ↳ `has_more` | boolean | Whether there are more items |
| ↳ `url` | string | URL to fetch more items |
| ↳ `latest_invoice` | string | ID of the most recent invoice |
| ↳ `livemode` | boolean | Whether object exists in live mode or test mode |
| ↳ `metadata` | json | Set of key-value pairs for storing additional information |
Expand Down
79 changes: 79 additions & 0 deletions scripts/generate-docs.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import { describe, expect, it } from 'vitest'
import { parseConstProperties, parsePropertiesContent } from './generate-docs'

describe('documentation output property parsing', () => {
it('keeps a response field named items inside an array element', () => {
const properties = parsePropertiesContent(`
vaults: {
type: 'array',
description: 'List of accessible vaults',
items: {
type: 'object',
properties: {
id: { type: 'string', description: 'Vault ID' },
items: { type: 'number', description: 'Number of items in the vault' },
},
},
},
`)

expect(Object.keys(properties)).toEqual(['vaults'])
expect(properties.vaults.items.properties.items).toEqual({
type: 'number',
description: 'Number of items in the vault',
})
})

it('keeps a response field named items that directly references a constant', () => {
const properties = parsePropertiesContent('items: ATTENDEES_OUTPUT,', 'calcom')

expect(properties.items).toMatchObject({
type: 'array',
description: 'List of attendees',
})
})

it('keeps a response field named items that references a constant property', () => {
const properties = parsePropertiesContent('items: EVENT_TYPE_OUTPUT_PROPERTIES.id,', 'calcom')

expect(properties.items).toEqual({
type: 'number',
description: 'Event type ID',
})
})

it('keeps items fields in constant-defined property maps', () => {
const typesContent = `
export const RECORD_OUTPUT_PROPERTIES = {
id: { type: 'string', description: 'Record ID' },
}
`
const properties = parseConstProperties(
`
items: {
type: 'object',
description: 'Result page',
properties: {
object: { type: 'string', description: 'Page type' },
data: {
type: 'array',
description: 'Result records',
items: { type: 'object', properties: RECORD_OUTPUT_PROPERTIES },
},
hasMore: { type: 'boolean', description: 'Whether more results exist' },
},
},
`,
'test',
typesContent,
0
)

expect(Object.keys(properties)).toEqual(['items'])
expect(Object.keys(properties.items.properties)).toEqual(['object', 'data', 'hasMore'])
expect(properties.items.properties.data.items.properties.id).toEqual({
type: 'string',
description: 'Record ID',
})
})
})
Loading
Loading