@outseta/api-client 0.2.4 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -23
- package/dist/index.js +1403 -1
- package/package.json +1 -1
- package/src/client.ts +7 -0
- package/src/generated/models/stripeSubscriptionAllOf.ts +2 -0
- package/src/index.ts +8 -3
package/package.json
CHANGED
package/src/client.ts
CHANGED
|
@@ -60,6 +60,13 @@ export function createClient(creds: OutsetaCredentials): OutsetaClient {
|
|
|
60
60
|
* Consumers pass `{ client }` in the options to inject a client from
|
|
61
61
|
* `createClient()`.
|
|
62
62
|
*/
|
|
63
|
+
export function withClient(
|
|
64
|
+
client: OutsetaClient,
|
|
65
|
+
init: RequestInit = {},
|
|
66
|
+
): RequestInit {
|
|
67
|
+
return { ...init, client } as OutsetaRequestInit as RequestInit;
|
|
68
|
+
}
|
|
69
|
+
|
|
63
70
|
export const customFetch = async <T>(
|
|
64
71
|
url: string,
|
|
65
72
|
options: OutsetaRequestInit,
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { createClient, customFetch } from "./client.js";
|
|
1
|
+
export { createClient, customFetch, withClient } from "./client.js";
|
|
2
2
|
export type {
|
|
3
3
|
OutsetaCredentials,
|
|
4
4
|
OutsetaApiKeyCredentials,
|
|
@@ -7,5 +7,10 @@ export type {
|
|
|
7
7
|
OutsetaRequestInit,
|
|
8
8
|
} from "./client.js";
|
|
9
9
|
|
|
10
|
-
//
|
|
11
|
-
|
|
10
|
+
// Generated API functions and model types
|
|
11
|
+
export * from "./generated/activity/activity.js";
|
|
12
|
+
export * from "./generated/billing/billing.js";
|
|
13
|
+
export * from "./generated/crm/crm.js";
|
|
14
|
+
export * from "./generated/email/email.js";
|
|
15
|
+
export * from "./generated/support/support.js";
|
|
16
|
+
export * from "./generated/models/index.js";
|