@stepzen/sdk 0.48.0 → 0.49.0-experimental.35b1164
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/lib/index.d.ts +0 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +0 -1
- package/lib/index.js.map +1 -1
- package/lib/shared/request.d.ts +3 -3
- package/lib/shared/request.d.ts.map +1 -1
- package/lib/shared/request.js.map +1 -1
- package/lib/shared/types.d.ts +0 -5
- package/lib/shared/types.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/index.ts +0 -1
- package/src/shared/request.ts +3 -3
- package/src/shared/types.ts +0 -6
- package/lib/client.d.ts +0 -33
- package/lib/client.d.ts.map +0 -1
- package/lib/client.js +0 -88
- package/lib/client.js.map +0 -1
- package/lib/commands/account.d.ts +0 -10
- package/lib/commands/account.d.ts.map +0 -1
- package/lib/commands/account.js +0 -37
- package/lib/commands/account.js.map +0 -1
- package/lib/commands/authenticate.d.ts +0 -4
- package/lib/commands/authenticate.d.ts.map +0 -1
- package/lib/commands/authenticate.js +0 -23
- package/lib/commands/authenticate.js.map +0 -1
- package/lib/commands/deploy.d.ts +0 -4
- package/lib/commands/deploy.d.ts.map +0 -1
- package/lib/commands/deploy.js +0 -44
- package/lib/commands/deploy.js.map +0 -1
- package/lib/commands/getPublicAccount.d.ts +0 -7
- package/lib/commands/getPublicAccount.d.ts.map +0 -1
- package/lib/commands/getPublicAccount.js +0 -57
- package/lib/commands/getPublicAccount.js.map +0 -1
- package/lib/commands/list.d.ts +0 -4
- package/lib/commands/list.d.ts.map +0 -1
- package/lib/commands/list.js +0 -27
- package/lib/commands/list.js.map +0 -1
- package/lib/commands/upload.d.ts +0 -4
- package/lib/commands/upload.d.ts.map +0 -1
- package/lib/commands/upload.js +0 -69
- package/lib/commands/upload.js.map +0 -1
- package/lib/init.d.ts +0 -33
- package/lib/init.d.ts.map +0 -1
- package/lib/init.js +0 -25
- package/lib/init.js.map +0 -1
- package/src/client.ts +0 -132
- package/src/commands/account.ts +0 -54
- package/src/commands/authenticate.ts +0 -30
- package/src/commands/deploy.ts +0 -72
- package/src/commands/getPublicAccount.ts +0 -77
- package/src/commands/list.ts +0 -50
- package/src/commands/upload.ts +0 -97
- package/src/init.ts +0 -43
package/src/init.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
// Copyright IBM Corp. 2020, 2025
|
|
2
|
-
|
|
3
|
-
import authenticate from './commands/authenticate.js'
|
|
4
|
-
import {createSdkClient} from './client.js'
|
|
5
|
-
import {getUserAgent} from './shared/request.js'
|
|
6
|
-
import {
|
|
7
|
-
AnonymousClientOptions,
|
|
8
|
-
SDKConfiguration,
|
|
9
|
-
UserCredentialsClientOptions,
|
|
10
|
-
} from './shared/types.js'
|
|
11
|
-
|
|
12
|
-
export const init = (sdkConfig: SDKConfiguration) => {
|
|
13
|
-
const defaults = {
|
|
14
|
-
server: process.env.STEPZEN_SERVER_URL || 'https://{account}.stepzen.io',
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
return {
|
|
18
|
-
verify: (account: string, adminkey: string) => {
|
|
19
|
-
return authenticate(
|
|
20
|
-
{
|
|
21
|
-
account,
|
|
22
|
-
adminkey,
|
|
23
|
-
server: defaults.server.replace('{account}', account),
|
|
24
|
-
},
|
|
25
|
-
sdkConfig,
|
|
26
|
-
)
|
|
27
|
-
},
|
|
28
|
-
client: async (
|
|
29
|
-
options: UserCredentialsClientOptions | AnonymousClientOptions,
|
|
30
|
-
) => {
|
|
31
|
-
return createSdkClient({...defaults, ...options}, sdkConfig)
|
|
32
|
-
},
|
|
33
|
-
get userAgent() {
|
|
34
|
-
return getUserAgent(sdkConfig)
|
|
35
|
-
},
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// a helper type to unwrap Promise<U> into U
|
|
40
|
-
type PromisedType<T> = T extends Promise<infer U> ? U : T
|
|
41
|
-
|
|
42
|
-
export type SDK = ReturnType<typeof init>
|
|
43
|
-
export type SDKClient = PromisedType<ReturnType<SDK['client']>>
|