-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal(cli): bring over mintlify migrator (#4774)
- Loading branch information
Showing
726 changed files
with
48,756 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"ignores": [ | ||
"@types/jest", | ||
"globals", | ||
"@types/node" | ||
], | ||
"ignore-patterns": [ | ||
"lib" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require("../../../../.prettierrc.json"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
packages/cli/docs-importers/mintlify/src/__test__/fixtures/bland/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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` |
3 changes: 3 additions & 0 deletions
3
...cs-importers/mintlify/src/__test__/fixtures/bland/_snippets/snippet-example.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
93 changes: 93 additions & 0 deletions
93
...ers/mintlify/src/__test__/fixtures/bland/api-reference/batch-endpoint/batch.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
Oops, something went wrong.