Skip to content

Commit

Permalink
internal(cli): bring over mintlify migrator (#4774)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsinghvi authored Sep 29, 2024
1 parent eb2df90 commit 3197402
Show file tree
Hide file tree
Showing 726 changed files with 48,756 additions and 12 deletions.
5 changes: 4 additions & 1 deletion fern.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -373,10 +373,13 @@
{
"type": "object",
"properties": {
"type": { "type": "string" },
"docs": {
"$ref": "#/properties/types/additionalProperties/anyOf/1/anyOf/0/properties/docs"
},
"type": { "type": "string" }
"display-name": {
"$ref": "#/properties/types/additionalProperties/anyOf/2/properties/union/additionalProperties/anyOf/1/properties/display-name"
}
},
"required": ["type"],
"additionalProperties": false
Expand Down
10 changes: 10 additions & 0 deletions packages/cli/docs-importers/mintlify/.depcheckrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"ignores": [
"@types/jest",
"globals",
"@types/node"
],
"ignore-patterns": [
"lib"
]
}
1 change: 1 addition & 0 deletions packages/cli/docs-importers/mintlify/.prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require("../../../../.prettierrc.json");
50 changes: 50 additions & 0 deletions packages/cli/docs-importers/mintlify/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"name": "@fern-api/mintlify-importer",
"version": "0.0.0",
"repository": {
"type": "git",
"url": "https://github.com/fern-api/fern.git",
"directory": "packages/cli/docs-importers/mintlify"
},
"private": true,
"files": [
"lib"
],
"type": "module",
"source": "src/index.ts",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"sideEffects": false,
"scripts": {
"clean": "rm -rf ./lib && tsc --build --clean",
"compile": "tsc --build",
"test": "vitest --run",
"test:update": "vitest --run -u",
"lint:eslint": "eslint --max-warnings 0 . --ignore-path=../../../../../.eslintignore",
"lint:eslint:fix": "yarn lint:eslint --fix",
"format": "prettier --write --ignore-unknown --ignore-path ../../../../../shared/.prettierignore \"**\"",
"format:check": "prettier --check --ignore-unknown --ignore-path ../../../../../shared/.prettierignore \"**\"",
"organize-imports": "organize-imports-cli tsconfig.json",
"depcheck": "depcheck"
},
"dependencies": {
"@fern-fern/docs-config": "^0.22.0",
"@fern-api/core-utils": "workspace:*",
"@fern-api/fs-utils": "workspace:*",
"@fern-fern/fdr-cjs-sdk": "0.111.0-51d403bce",
"gray-matter": "^4.0.3",
"js-yaml": "^4.1.0",
"tmp-promise": "^3.0.3"
},
"devDependencies": {
"@types/js-yaml": "^4.0.8",
"@types/node": "^18.7.18",
"depcheck": "^1.4.6",
"eslint": "^8.56.0",
"globals": "link:@types/vitest/globals",
"organize-imports-cli": "^0.10.0",
"prettier": "^2.7.1",
"typescript": "4.6.4",
"vitest": "^2.0.5"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Mintlify Starter Kit

Click on `Use this template` to copy the Mintlify starter kit. The starter kit contains examples including

- Guide pages
- Navigation
- Customizations
- API Reference pages
- Use of popular components

### 👩‍💻 Development

Install the [Mintlify CLI](https://www.npmjs.com/package/mintlify) to preview the documentation changes locally. To install, use the following command

```
npm i -g mintlify
```

Run the following command at the root of your documentation (where mint.json is)

```
mintlify dev
```

### 😎 Publishing Changes

Install our Github App to autopropagate changes from youre repo to your deployment. Changes will be deployed to production automatically after pushing to the default branch. Find the link to install on your dashboard.

#### Troubleshooting

- Mintlify dev isn't running - Run `mintlify install` it'll re-install dependencies.
- Page loads as a 404 - Make sure you are running in a folder with `mint.json`
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## My Snippet

<Info>This is an example of a reusable snippet</Info>
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
title: "Batch Calling"
api: "POST https://api.bland.ai/batch"
description: "Send a series of calls with a single api call"
---

### Headers

<ParamField header="authorization" type="string" required>
Your API key for authentication.
</ParamField>

### Body

<ParamField body="base_prompt" type="string" required>
This is the prompt or task used for all the phone calls in the request. Information can be inserted into it surrounding variable names with \{\{curly braces\}\}.

Example:

```json
"You are calling {{business}} to renew their subscription to {{service}} before it expires on {{date}}."
```

</ParamField>

<ParamField body="call_data" type="array" required>
Define a list of calls to make and their properties.

Each call in call_data *must* have a `phone_number` property. Properties are case-sensitive.

Example:

```json
[
{
"phone_number": "1234567890",
"business": "ABC co.",
"service": "Netflix",
"date": "September 4th"
},
{
"phone_number": "32176540987",
"business": "XYZ inc.",
"service": "Window Cleaning",
"date": "December 20th"
}
]
```

</ParamField>

<ParamField body="label" type="string">
Adds a user-friendly label to your batch to keep track of it's original intention. This can help differentiate
multiple call batches that are part of the same Campaign. Shown when a batch is retreived.
</ParamField>

<ParamField body="campaign_id" type="string">
Use ```campaign_id``` to organize related batches together. This can be set manually or auto-generated through
Campaigns.
</ParamField>

<ParamField body="test_mode" type="boolean" default="false">
When this is set to ```true```, only the first call of ```call_data``` will be dispatched. A common use case is to set the first ```phone_number``` value to your own to confirm everything's set up properly.

Includes additional information in the response when true so that it's easier to find any issues.

</ParamField>

<ParamField body="*">
All other parameters supported by the [Send Call](/api-v1/post/calls) endpoint are supported here as well. They will
be applied to each call in the batch.
</ParamField>

### Response

<ResponseField name="message" type="string">
If anything other than "success" is returned, there was an error.
</ResponseField>

<ResponseField name="batch_id" type="string">
The unique identifier for the batch.
</ResponseField>

<ResponseExample>

```json Response
{
"message": "success",
"batch_id": "3p$7rQ3p9sT5bzmF-gen-batch"
}
```

</ResponseExample>
Loading

0 comments on commit 3197402

Please sign in to comment.