Skip to content

Commit

Permalink
docs(stripe-utils): configure API Extractor and TypeDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
jackdbd committed May 20, 2022
1 parent 58004c2 commit 685590c
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 3 deletions.
80 changes: 80 additions & 0 deletions packages/stripe-utils/.ae/stripe-utils.api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
## API Report File for "@jackdbd/stripe-utils"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts

import Stripe from 'stripe';

// Warning: (ae-forgotten-export) The symbol "Config" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "createPriceWithTaxBehavior" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const createPriceWithTaxBehavior: ({ behavior, price, stripe, created_at, created_by }: Config_2) => Promise<Stripe.Response<Stripe.Price>>;

// Warning: (ae-forgotten-export) The symbol "Config" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "customerFromPaymentIntentId" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const customerFromPaymentIntentId: ({ stripe, pi_id }: Config) => Promise<{
error: Error;
value?: undefined;
} | {
value: Stripe.Customer;
error?: undefined;
}>;

// Warning: (ae-forgotten-export) The symbol "EmailIds" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "duplicates" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const duplicates: ({ stripe, threshold, ts_start, ts_stop }: DuplicatesConfig) => Promise<EmailIds>;

// Warning: (ae-missing-release-tag) "DuplicatesConfig" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface DuplicatesConfig {
// (undocumented)
stripe: Stripe;
// (undocumented)
threshold?: number;
// (undocumented)
ts_start: number;
// (undocumented)
ts_stop: number;
}

// Warning: (ae-forgotten-export) The symbol "EnabledEventsForWebhookEndpoint" needs to be exported by the entry point index.d.ts
// Warning: (ae-missing-release-tag) "enabledEventsForWebhookEndpoint" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const enabledEventsForWebhookEndpoint: ({ stripe, url }: EnabledEventsForWebhookEndpoint) => Promise<string[]>;

// Warning: (ae-missing-release-tag) "errorFromStripe" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const errorFromStripe: (err: Stripe.StripeError) => {
code: string | undefined;
message: string;
param: string | undefined;
status_code: number;
};

// Warning: (ae-missing-release-tag) "isApiKeyLiveMode" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const isApiKeyLiveMode: (s: string) => boolean;

// Warning: (ae-missing-release-tag) "isApiKeyTestMode" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const isApiKeyTestMode: (s: string) => boolean;

// Warning: (ae-missing-release-tag) "stripeAccountMode" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const stripeAccountMode: (api_key: string) => "live" | "test";

// (No @packageDocumentation comment for this package)

```
11 changes: 11 additions & 0 deletions packages/stripe-utils/.ae/tsdoc-metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
// It should be published with your NPM package. It should not be tracked by Git.
{
"tsdocVersion": "0.12",
"toolPackages": [
{
"packageName": "@microsoft/api-extractor",
"packageVersion": "7.24.1"
}
]
}
3 changes: 3 additions & 0 deletions packages/stripe-utils/api-extractor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "../../config/api-extractor.json"
}
10 changes: 7 additions & 3 deletions packages/stripe-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,19 @@
},
"scripts": {
"build": "tsc -p tsconfig.json",
"clean": "rimraf coverage lib 'tsconfig.tsbuildinfo'",
"clean": "../../scripts/clean.mjs",
"copy-dotfiles": "../../scripts/copy-dotfiles.mjs",
"docs:help": "typedoc --showConfig",
"docs:ae": "api-extractor run --config ./api-extractor.json --local --verbose",
"docs:typedoc": "../../scripts/docs-typedoc.mjs",
"docs": "run-s docs:ae docs:typedoc --print-label",
"format": "prettier --config ../../config/prettier.cjs --write {__tests__,src}/**/*.{js,mjs,ts}",
"lint": "eslint --config ../../config/eslint.cjs",
"nuke": "npm run clean && rimraf node_modules 'package-lock.json'",
"precommit": "lint-staged --config ../../config/lint-staged.cjs",
"size": "pkg-size ./lib --sort-by=brotli",
"size": "pkg-size ./lib --sort-by=brotli --ignore-files {*.d.ts,*.map}",
"test": "NODE_OPTIONS=--experimental-vm-modules npx jest --selectProjects stripe-utils --config ../../config/jest.cjs --rootDir ../../",
"test:ci": "npm run test -- --ci --coverage --coverageDirectory packages/stripe-utils/coverage",
"test:ci": "../../scripts/test.mjs --ci",
"test:watch": "npm run test -- --watch"
},
"dependencies": {},
Expand Down

0 comments on commit 685590c

Please sign in to comment.