@nextplus/js-sdk 0.0.5 → 0.0.7
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/dist/{chunk-DNVJS7WW.js → chunk-GWZP3XPB.js} +7161 -4718
- package/dist/{chunk-YEF23TVP.js → chunk-JGXGSMXJ.js} +5 -5
- package/dist/index-C3v0bPFu.d.cts +5153 -0
- package/dist/index-GlppKn7r.d.ts +5153 -0
- package/dist/index.cjs +7161 -4717
- package/dist/index.d.cts +7 -6
- package/dist/index.d.ts +7 -6
- package/dist/index.js +2 -2
- package/dist/sdk/index.cjs +7163 -4719
- package/dist/sdk/index.d.cts +1 -1
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.js +6 -6
- package/dist/sdk/sdk.gen.cjs +7163 -4719
- package/dist/sdk/sdk.gen.d.cts +1 -1
- package/dist/sdk/sdk.gen.d.ts +1 -1
- package/dist/sdk/sdk.gen.js +5 -5
- package/dist/{sdk.gen-D3Q8YKqz.d.ts → sdk.gen-Cri-c6ps.d.ts} +3616 -3050
- package/dist/{sdk.gen-CPR3KdM-.d.cts → sdk.gen-D5rTIkwe.d.cts} +3616 -3050
- package/package.json +7 -1
- package/src/index.ts +9 -5
- package/src/sdk/client.gen.ts +1 -1
- package/src/sdk/schemas.gen.ts +53 -70
- package/src/sdk/sdk.gen.ts +15105 -11699
- package/src/sdk/transformers.gen.ts +1040 -1086
- package/src/sdk/types.gen.ts +2138 -2169
- package/dist/index-B0kRliN0.d.ts +0 -5156
- package/dist/index-Dz0aDLqE.d.cts +0 -5156
- package/openapi-ts.config.ts +0 -45
- package/prettier.config.js +0 -5
- package/tsconfig.json +0 -23
- package/tsconfig.node.json +0 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextplus/js-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"generate": "npm run clean && npm run openapi-ts && npm run build",
|
|
@@ -11,6 +11,12 @@
|
|
|
11
11
|
"openapi-ts": "openapi-ts",
|
|
12
12
|
"test": "npm run build && node dist/smoke.js"
|
|
13
13
|
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"src",
|
|
17
|
+
"README.md",
|
|
18
|
+
"LICENSE"
|
|
19
|
+
],
|
|
14
20
|
"exports": {
|
|
15
21
|
".": {
|
|
16
22
|
"types": "./dist/index.d.ts",
|
package/src/index.ts
CHANGED
|
@@ -2,6 +2,7 @@ import debug from 'debug';
|
|
|
2
2
|
import { createClient } from './sdk/client';
|
|
3
3
|
import { UserModelService } from './sdk';
|
|
4
4
|
import * as AllServices from './sdk';
|
|
5
|
+
import type * as AllServiceTypes from './sdk';
|
|
5
6
|
|
|
6
7
|
const log = debug('nextplus:sdk');
|
|
7
8
|
|
|
@@ -272,20 +273,22 @@ export class NextPlusSDK {
|
|
|
272
273
|
|
|
273
274
|
// Expose accurate static service method types on the SDK instance for IDE/type safety
|
|
274
275
|
type ServiceStatics = {
|
|
275
|
-
[K in keyof typeof
|
|
276
|
+
[K in keyof typeof AllServiceTypes as K extends `${string}Service` ? K : never]: typeof AllServiceTypes[K];
|
|
276
277
|
};
|
|
277
278
|
|
|
278
279
|
export interface NextPlusSDK extends ServiceStatics {}
|
|
279
280
|
|
|
280
281
|
// Legacy function for backward compatibility
|
|
282
|
+
type SDKInstance = NextPlusSDK & ServiceStatics;
|
|
283
|
+
|
|
281
284
|
const configure = (options: {
|
|
282
285
|
baseURL: string;
|
|
283
286
|
email?: string;
|
|
284
287
|
username?: string;
|
|
285
288
|
password: string;
|
|
286
289
|
returnType?: 'raw' | 'data';
|
|
287
|
-
}) => {
|
|
288
|
-
return new NextPlusSDK(options);
|
|
290
|
+
}): SDKInstance => {
|
|
291
|
+
return new NextPlusSDK(options) as SDKInstance;
|
|
289
292
|
};
|
|
290
293
|
|
|
291
294
|
// Create SDK instance
|
|
@@ -295,8 +298,9 @@ const createSDK = (options: {
|
|
|
295
298
|
username?: string;
|
|
296
299
|
password: string;
|
|
297
300
|
returnType?: 'raw' | 'data';
|
|
298
|
-
}) => {
|
|
299
|
-
return new NextPlusSDK(options);
|
|
301
|
+
}): SDKInstance => {
|
|
302
|
+
return new NextPlusSDK(options) as SDKInstance;
|
|
300
303
|
};
|
|
301
304
|
|
|
305
|
+
export type { SDKInstance };
|
|
302
306
|
export { configure, createSDK };
|
package/src/sdk/client.gen.ts
CHANGED
package/src/sdk/schemas.gen.ts
CHANGED
|
@@ -2229,76 +2229,6 @@ export const WorkflowSchema = {
|
|
|
2229
2229
|
type: 'object',
|
|
2230
2230
|
} as const;
|
|
2231
2231
|
|
|
2232
|
-
export const WorkflowNoteSchema = {
|
|
2233
|
-
properties: {
|
|
2234
|
-
id: {
|
|
2235
|
-
type: 'string',
|
|
2236
|
-
},
|
|
2237
|
-
sku: {
|
|
2238
|
-
default: '',
|
|
2239
|
-
type: 'string',
|
|
2240
|
-
},
|
|
2241
|
-
workflowName: {
|
|
2242
|
-
default: '',
|
|
2243
|
-
type: 'string',
|
|
2244
|
-
},
|
|
2245
|
-
skuRev: {
|
|
2246
|
-
default: '',
|
|
2247
|
-
type: 'string',
|
|
2248
|
-
},
|
|
2249
|
-
note: {
|
|
2250
|
-
default: '',
|
|
2251
|
-
type: 'string',
|
|
2252
|
-
},
|
|
2253
|
-
nodeTitle: {
|
|
2254
|
-
default: '',
|
|
2255
|
-
type: 'string',
|
|
2256
|
-
},
|
|
2257
|
-
_v: {
|
|
2258
|
-
default: 2,
|
|
2259
|
-
type: 'string',
|
|
2260
|
-
},
|
|
2261
|
-
closedTime: {
|
|
2262
|
-
type: 'string',
|
|
2263
|
-
format: 'date-time',
|
|
2264
|
-
},
|
|
2265
|
-
closed: {
|
|
2266
|
-
default: false,
|
|
2267
|
-
type: 'boolean',
|
|
2268
|
-
},
|
|
2269
|
-
createdBy: {
|
|
2270
|
-
type: 'string',
|
|
2271
|
-
},
|
|
2272
|
-
workflowId: {
|
|
2273
|
-
type: 'string',
|
|
2274
|
-
},
|
|
2275
|
-
created: {
|
|
2276
|
-
default: '$now',
|
|
2277
|
-
type: 'string',
|
|
2278
|
-
format: 'date-time',
|
|
2279
|
-
},
|
|
2280
|
-
modified: {
|
|
2281
|
-
default: '$now',
|
|
2282
|
-
type: 'string',
|
|
2283
|
-
format: 'date-time',
|
|
2284
|
-
},
|
|
2285
|
-
serverModified: {
|
|
2286
|
-
default: '$now',
|
|
2287
|
-
type: 'string',
|
|
2288
|
-
format: 'date-time',
|
|
2289
|
-
},
|
|
2290
|
-
nodeId: {
|
|
2291
|
-
type: 'string',
|
|
2292
|
-
},
|
|
2293
|
-
UserId: {
|
|
2294
|
-
type: 'string',
|
|
2295
|
-
},
|
|
2296
|
-
},
|
|
2297
|
-
required: ['id'],
|
|
2298
|
-
additionalProperties: false,
|
|
2299
|
-
type: 'object',
|
|
2300
|
-
} as const;
|
|
2301
|
-
|
|
2302
2232
|
export const AIPromptSchema = {
|
|
2303
2233
|
properties: {
|
|
2304
2234
|
prompt: {
|
|
@@ -6903,6 +6833,59 @@ export const ApiMethodLogSchema = {
|
|
|
6903
6833
|
type: 'object',
|
|
6904
6834
|
} as const;
|
|
6905
6835
|
|
|
6836
|
+
export const AddonSchema = {
|
|
6837
|
+
properties: {
|
|
6838
|
+
id: {
|
|
6839
|
+
type: 'string',
|
|
6840
|
+
},
|
|
6841
|
+
name: {
|
|
6842
|
+
type: 'string',
|
|
6843
|
+
},
|
|
6844
|
+
active: {
|
|
6845
|
+
default: true,
|
|
6846
|
+
type: 'boolean',
|
|
6847
|
+
},
|
|
6848
|
+
features: {
|
|
6849
|
+
default: [],
|
|
6850
|
+
type: 'array',
|
|
6851
|
+
items: {
|
|
6852
|
+
$ref: '#/definitions/x-any',
|
|
6853
|
+
},
|
|
6854
|
+
},
|
|
6855
|
+
created: {
|
|
6856
|
+
default: '$now',
|
|
6857
|
+
type: 'string',
|
|
6858
|
+
format: 'date-time',
|
|
6859
|
+
},
|
|
6860
|
+
modified: {
|
|
6861
|
+
default: '$now',
|
|
6862
|
+
type: 'string',
|
|
6863
|
+
format: 'date-time',
|
|
6864
|
+
},
|
|
6865
|
+
serverModified: {
|
|
6866
|
+
default: '$now',
|
|
6867
|
+
type: 'string',
|
|
6868
|
+
format: 'date-time',
|
|
6869
|
+
},
|
|
6870
|
+
deletedAt: {
|
|
6871
|
+
type: 'string',
|
|
6872
|
+
format: 'date-time',
|
|
6873
|
+
},
|
|
6874
|
+
deletedBy: {
|
|
6875
|
+
type: 'string',
|
|
6876
|
+
},
|
|
6877
|
+
UserId: {
|
|
6878
|
+
type: 'string',
|
|
6879
|
+
},
|
|
6880
|
+
createdBy: {
|
|
6881
|
+
type: 'string',
|
|
6882
|
+
},
|
|
6883
|
+
},
|
|
6884
|
+
required: ['id', 'name'],
|
|
6885
|
+
additionalProperties: false,
|
|
6886
|
+
type: 'object',
|
|
6887
|
+
} as const;
|
|
6888
|
+
|
|
6906
6889
|
export const DeviceSchema = {
|
|
6907
6890
|
properties: {
|
|
6908
6891
|
id: {
|