@gpt-core/client 0.9.39 → 0.10.1
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 +51 -0
- package/dist/index.d.mts +526 -82
- package/dist/index.d.ts +526 -82
- package/dist/index.js +55 -0
- package/dist/index.mjs +50 -0
- package/llms.txt +32 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -27,6 +27,7 @@ __export(index_exports, {
|
|
|
27
27
|
AuthenticationError: () => AuthenticationError,
|
|
28
28
|
AuthorizationError: () => AuthorizationError,
|
|
29
29
|
BucketCreateSchema: () => BucketCreateSchema,
|
|
30
|
+
DEFAULT_API_VERSION: () => DEFAULT_API_VERSION,
|
|
30
31
|
DEFAULT_RETRY_CONFIG: () => DEFAULT_RETRY_CONFIG,
|
|
31
32
|
DocumentUploadBase64Schema: () => DocumentUploadBase64Schema,
|
|
32
33
|
EmbedRequestSchema: () => EmbedRequestSchema,
|
|
@@ -74,6 +75,7 @@ __export(index_exports, {
|
|
|
74
75
|
deleteNotificationPreferencesById: () => deleteNotificationPreferencesById,
|
|
75
76
|
deleteObjectsById: () => deleteObjectsById,
|
|
76
77
|
deletePaymentMethodsById: () => deletePaymentMethodsById,
|
|
78
|
+
deleteRolesById: () => deleteRolesById,
|
|
77
79
|
deleteSearchSavedById: () => deleteSearchSavedById,
|
|
78
80
|
deleteTenantMembershipsByTenantIdByUserId: () => deleteTenantMembershipsByTenantIdByUserId,
|
|
79
81
|
deleteTenantsById: () => deleteTenantsById,
|
|
@@ -194,6 +196,7 @@ __export(index_exports, {
|
|
|
194
196
|
getPlans: () => getPlans,
|
|
195
197
|
getPlansById: () => getPlansById,
|
|
196
198
|
getPlansSlugBySlug: () => getPlansSlugBySlug,
|
|
199
|
+
getRoles: () => getRoles,
|
|
197
200
|
getSearch: () => getSearch,
|
|
198
201
|
getSearchAnalytics: () => getSearchAnalytics,
|
|
199
202
|
getSearchAnalyticsSummary: () => getSearchAnalyticsSummary,
|
|
@@ -314,6 +317,7 @@ __export(index_exports, {
|
|
|
314
317
|
patchNotificationPreferencesById: () => patchNotificationPreferencesById,
|
|
315
318
|
patchPaymentMethodsById: () => patchPaymentMethodsById,
|
|
316
319
|
patchPaymentMethodsByIdDefault: () => patchPaymentMethodsByIdDefault,
|
|
320
|
+
patchRolesById: () => patchRolesById,
|
|
317
321
|
patchSearchSavedById: () => patchSearchSavedById,
|
|
318
322
|
patchTenantMembershipsByTenantIdByUserId: () => patchTenantMembershipsByTenantIdByUserId,
|
|
319
323
|
patchTenantsById: () => patchTenantsById,
|
|
@@ -408,6 +412,7 @@ __export(index_exports, {
|
|
|
408
412
|
postPaymentMethods: () => postPaymentMethods,
|
|
409
413
|
postPaymentMethodsTokenize: () => postPaymentMethodsTokenize,
|
|
410
414
|
postPayments: () => postPayments,
|
|
415
|
+
postRoles: () => postRoles,
|
|
411
416
|
postSearchBatch: () => postSearchBatch,
|
|
412
417
|
postSearchReindex: () => postSearchReindex,
|
|
413
418
|
postSearchSaved: () => postSearchSaved,
|
|
@@ -488,6 +493,7 @@ __export(sdk_gen_exports, {
|
|
|
488
493
|
deleteNotificationPreferencesById: () => deleteNotificationPreferencesById,
|
|
489
494
|
deleteObjectsById: () => deleteObjectsById,
|
|
490
495
|
deletePaymentMethodsById: () => deletePaymentMethodsById,
|
|
496
|
+
deleteRolesById: () => deleteRolesById,
|
|
491
497
|
deleteSearchSavedById: () => deleteSearchSavedById,
|
|
492
498
|
deleteTenantMembershipsByTenantIdByUserId: () => deleteTenantMembershipsByTenantIdByUserId,
|
|
493
499
|
deleteTenantsById: () => deleteTenantsById,
|
|
@@ -608,6 +614,7 @@ __export(sdk_gen_exports, {
|
|
|
608
614
|
getPlans: () => getPlans,
|
|
609
615
|
getPlansById: () => getPlansById,
|
|
610
616
|
getPlansSlugBySlug: () => getPlansSlugBySlug,
|
|
617
|
+
getRoles: () => getRoles,
|
|
611
618
|
getSearch: () => getSearch,
|
|
612
619
|
getSearchAnalytics: () => getSearchAnalytics,
|
|
613
620
|
getSearchAnalyticsSummary: () => getSearchAnalyticsSummary,
|
|
@@ -724,6 +731,7 @@ __export(sdk_gen_exports, {
|
|
|
724
731
|
patchNotificationPreferencesById: () => patchNotificationPreferencesById,
|
|
725
732
|
patchPaymentMethodsById: () => patchPaymentMethodsById,
|
|
726
733
|
patchPaymentMethodsByIdDefault: () => patchPaymentMethodsByIdDefault,
|
|
734
|
+
patchRolesById: () => patchRolesById,
|
|
727
735
|
patchSearchSavedById: () => patchSearchSavedById,
|
|
728
736
|
patchTenantMembershipsByTenantIdByUserId: () => patchTenantMembershipsByTenantIdByUserId,
|
|
729
737
|
patchTenantsById: () => patchTenantsById,
|
|
@@ -818,6 +826,7 @@ __export(sdk_gen_exports, {
|
|
|
818
826
|
postPaymentMethods: () => postPaymentMethods,
|
|
819
827
|
postPaymentMethodsTokenize: () => postPaymentMethodsTokenize,
|
|
820
828
|
postPayments: () => postPayments,
|
|
829
|
+
postRoles: () => postRoles,
|
|
821
830
|
postSearchBatch: () => postSearchBatch,
|
|
822
831
|
postSearchReindex: () => postSearchReindex,
|
|
823
832
|
postSearchSaved: () => postSearchSaved,
|
|
@@ -3198,6 +3207,28 @@ var getStorageStatsTenantByTenantId = (options) => (options.client ?? client).ge
|
|
|
3198
3207
|
url: "/storage/stats/tenant/{tenant_id}",
|
|
3199
3208
|
...options
|
|
3200
3209
|
});
|
|
3210
|
+
var getRoles = (options) => (options.client ?? client).get({
|
|
3211
|
+
querySerializer: {
|
|
3212
|
+
parameters: {
|
|
3213
|
+
filter: { object: { style: "form" } },
|
|
3214
|
+
page: { object: { style: "form" } },
|
|
3215
|
+
fields: { object: { style: "form" } }
|
|
3216
|
+
}
|
|
3217
|
+
},
|
|
3218
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3219
|
+
url: "/roles",
|
|
3220
|
+
...options
|
|
3221
|
+
});
|
|
3222
|
+
var postRoles = (options) => (options.client ?? client).post({
|
|
3223
|
+
querySerializer: { parameters: { fields: { object: { style: "form" } } } },
|
|
3224
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3225
|
+
url: "/roles",
|
|
3226
|
+
...options,
|
|
3227
|
+
headers: {
|
|
3228
|
+
"Content-Type": "application/vnd.api+json",
|
|
3229
|
+
...options.headers
|
|
3230
|
+
}
|
|
3231
|
+
});
|
|
3201
3232
|
var patchUsersByIdResetPassword = (options) => (options.client ?? client).patch({
|
|
3202
3233
|
querySerializer: { parameters: { fields: { object: { style: "form" } } } },
|
|
3203
3234
|
security: [{ scheme: "bearer", type: "http" }],
|
|
@@ -4669,6 +4700,22 @@ var postAiMessages = (options) => (options.client ?? client).post({
|
|
|
4669
4700
|
...options.headers
|
|
4670
4701
|
}
|
|
4671
4702
|
});
|
|
4703
|
+
var deleteRolesById = (options) => (options.client ?? client).delete({
|
|
4704
|
+
querySerializer: { parameters: { fields: { object: { style: "form" } } } },
|
|
4705
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4706
|
+
url: "/roles/{id}",
|
|
4707
|
+
...options
|
|
4708
|
+
});
|
|
4709
|
+
var patchRolesById = (options) => (options.client ?? client).patch({
|
|
4710
|
+
querySerializer: { parameters: { fields: { object: { style: "form" } } } },
|
|
4711
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4712
|
+
url: "/roles/{id}",
|
|
4713
|
+
...options,
|
|
4714
|
+
headers: {
|
|
4715
|
+
"Content-Type": "application/vnd.api+json",
|
|
4716
|
+
...options.headers
|
|
4717
|
+
}
|
|
4718
|
+
});
|
|
4672
4719
|
var getWatcherEvents = (options) => (options.client ?? client).get({
|
|
4673
4720
|
querySerializer: {
|
|
4674
4721
|
parameters: {
|
|
@@ -5353,6 +5400,9 @@ function handleApiError(error) {
|
|
|
5353
5400
|
}
|
|
5354
5401
|
}
|
|
5355
5402
|
|
|
5403
|
+
// src/base-client.ts
|
|
5404
|
+
var DEFAULT_API_VERSION = "2025-12-03";
|
|
5405
|
+
|
|
5356
5406
|
// src/schemas/requests.ts
|
|
5357
5407
|
var import_zod = require("zod");
|
|
5358
5408
|
var LoginRequestSchema = import_zod.z.object({
|
|
@@ -5808,6 +5858,7 @@ var index_default = gptCore;
|
|
|
5808
5858
|
AuthenticationError,
|
|
5809
5859
|
AuthorizationError,
|
|
5810
5860
|
BucketCreateSchema,
|
|
5861
|
+
DEFAULT_API_VERSION,
|
|
5811
5862
|
DEFAULT_RETRY_CONFIG,
|
|
5812
5863
|
DocumentUploadBase64Schema,
|
|
5813
5864
|
EmbedRequestSchema,
|
|
@@ -5854,6 +5905,7 @@ var index_default = gptCore;
|
|
|
5854
5905
|
deleteNotificationPreferencesById,
|
|
5855
5906
|
deleteObjectsById,
|
|
5856
5907
|
deletePaymentMethodsById,
|
|
5908
|
+
deleteRolesById,
|
|
5857
5909
|
deleteSearchSavedById,
|
|
5858
5910
|
deleteTenantMembershipsByTenantIdByUserId,
|
|
5859
5911
|
deleteTenantsById,
|
|
@@ -5974,6 +6026,7 @@ var index_default = gptCore;
|
|
|
5974
6026
|
getPlans,
|
|
5975
6027
|
getPlansById,
|
|
5976
6028
|
getPlansSlugBySlug,
|
|
6029
|
+
getRoles,
|
|
5977
6030
|
getSearch,
|
|
5978
6031
|
getSearchAnalytics,
|
|
5979
6032
|
getSearchAnalyticsSummary,
|
|
@@ -6094,6 +6147,7 @@ var index_default = gptCore;
|
|
|
6094
6147
|
patchNotificationPreferencesById,
|
|
6095
6148
|
patchPaymentMethodsById,
|
|
6096
6149
|
patchPaymentMethodsByIdDefault,
|
|
6150
|
+
patchRolesById,
|
|
6097
6151
|
patchSearchSavedById,
|
|
6098
6152
|
patchTenantMembershipsByTenantIdByUserId,
|
|
6099
6153
|
patchTenantsById,
|
|
@@ -6188,6 +6242,7 @@ var index_default = gptCore;
|
|
|
6188
6242
|
postPaymentMethods,
|
|
6189
6243
|
postPaymentMethodsTokenize,
|
|
6190
6244
|
postPayments,
|
|
6245
|
+
postRoles,
|
|
6191
6246
|
postSearchBatch,
|
|
6192
6247
|
postSearchReindex,
|
|
6193
6248
|
postSearchSaved,
|
package/dist/index.mjs
CHANGED
|
@@ -28,6 +28,7 @@ __export(sdk_gen_exports, {
|
|
|
28
28
|
deleteNotificationPreferencesById: () => deleteNotificationPreferencesById,
|
|
29
29
|
deleteObjectsById: () => deleteObjectsById,
|
|
30
30
|
deletePaymentMethodsById: () => deletePaymentMethodsById,
|
|
31
|
+
deleteRolesById: () => deleteRolesById,
|
|
31
32
|
deleteSearchSavedById: () => deleteSearchSavedById,
|
|
32
33
|
deleteTenantMembershipsByTenantIdByUserId: () => deleteTenantMembershipsByTenantIdByUserId,
|
|
33
34
|
deleteTenantsById: () => deleteTenantsById,
|
|
@@ -148,6 +149,7 @@ __export(sdk_gen_exports, {
|
|
|
148
149
|
getPlans: () => getPlans,
|
|
149
150
|
getPlansById: () => getPlansById,
|
|
150
151
|
getPlansSlugBySlug: () => getPlansSlugBySlug,
|
|
152
|
+
getRoles: () => getRoles,
|
|
151
153
|
getSearch: () => getSearch,
|
|
152
154
|
getSearchAnalytics: () => getSearchAnalytics,
|
|
153
155
|
getSearchAnalyticsSummary: () => getSearchAnalyticsSummary,
|
|
@@ -264,6 +266,7 @@ __export(sdk_gen_exports, {
|
|
|
264
266
|
patchNotificationPreferencesById: () => patchNotificationPreferencesById,
|
|
265
267
|
patchPaymentMethodsById: () => patchPaymentMethodsById,
|
|
266
268
|
patchPaymentMethodsByIdDefault: () => patchPaymentMethodsByIdDefault,
|
|
269
|
+
patchRolesById: () => patchRolesById,
|
|
267
270
|
patchSearchSavedById: () => patchSearchSavedById,
|
|
268
271
|
patchTenantMembershipsByTenantIdByUserId: () => patchTenantMembershipsByTenantIdByUserId,
|
|
269
272
|
patchTenantsById: () => patchTenantsById,
|
|
@@ -358,6 +361,7 @@ __export(sdk_gen_exports, {
|
|
|
358
361
|
postPaymentMethods: () => postPaymentMethods,
|
|
359
362
|
postPaymentMethodsTokenize: () => postPaymentMethodsTokenize,
|
|
360
363
|
postPayments: () => postPayments,
|
|
364
|
+
postRoles: () => postRoles,
|
|
361
365
|
postSearchBatch: () => postSearchBatch,
|
|
362
366
|
postSearchReindex: () => postSearchReindex,
|
|
363
367
|
postSearchSaved: () => postSearchSaved,
|
|
@@ -2738,6 +2742,28 @@ var getStorageStatsTenantByTenantId = (options) => (options.client ?? client).ge
|
|
|
2738
2742
|
url: "/storage/stats/tenant/{tenant_id}",
|
|
2739
2743
|
...options
|
|
2740
2744
|
});
|
|
2745
|
+
var getRoles = (options) => (options.client ?? client).get({
|
|
2746
|
+
querySerializer: {
|
|
2747
|
+
parameters: {
|
|
2748
|
+
filter: { object: { style: "form" } },
|
|
2749
|
+
page: { object: { style: "form" } },
|
|
2750
|
+
fields: { object: { style: "form" } }
|
|
2751
|
+
}
|
|
2752
|
+
},
|
|
2753
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2754
|
+
url: "/roles",
|
|
2755
|
+
...options
|
|
2756
|
+
});
|
|
2757
|
+
var postRoles = (options) => (options.client ?? client).post({
|
|
2758
|
+
querySerializer: { parameters: { fields: { object: { style: "form" } } } },
|
|
2759
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2760
|
+
url: "/roles",
|
|
2761
|
+
...options,
|
|
2762
|
+
headers: {
|
|
2763
|
+
"Content-Type": "application/vnd.api+json",
|
|
2764
|
+
...options.headers
|
|
2765
|
+
}
|
|
2766
|
+
});
|
|
2741
2767
|
var patchUsersByIdResetPassword = (options) => (options.client ?? client).patch({
|
|
2742
2768
|
querySerializer: { parameters: { fields: { object: { style: "form" } } } },
|
|
2743
2769
|
security: [{ scheme: "bearer", type: "http" }],
|
|
@@ -4209,6 +4235,22 @@ var postAiMessages = (options) => (options.client ?? client).post({
|
|
|
4209
4235
|
...options.headers
|
|
4210
4236
|
}
|
|
4211
4237
|
});
|
|
4238
|
+
var deleteRolesById = (options) => (options.client ?? client).delete({
|
|
4239
|
+
querySerializer: { parameters: { fields: { object: { style: "form" } } } },
|
|
4240
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4241
|
+
url: "/roles/{id}",
|
|
4242
|
+
...options
|
|
4243
|
+
});
|
|
4244
|
+
var patchRolesById = (options) => (options.client ?? client).patch({
|
|
4245
|
+
querySerializer: { parameters: { fields: { object: { style: "form" } } } },
|
|
4246
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4247
|
+
url: "/roles/{id}",
|
|
4248
|
+
...options,
|
|
4249
|
+
headers: {
|
|
4250
|
+
"Content-Type": "application/vnd.api+json",
|
|
4251
|
+
...options.headers
|
|
4252
|
+
}
|
|
4253
|
+
});
|
|
4212
4254
|
var getWatcherEvents = (options) => (options.client ?? client).get({
|
|
4213
4255
|
querySerializer: {
|
|
4214
4256
|
parameters: {
|
|
@@ -4893,6 +4935,9 @@ function handleApiError(error) {
|
|
|
4893
4935
|
}
|
|
4894
4936
|
}
|
|
4895
4937
|
|
|
4938
|
+
// src/base-client.ts
|
|
4939
|
+
var DEFAULT_API_VERSION = "2025-12-03";
|
|
4940
|
+
|
|
4896
4941
|
// src/schemas/requests.ts
|
|
4897
4942
|
import { z } from "zod";
|
|
4898
4943
|
var LoginRequestSchema = z.object({
|
|
@@ -5347,6 +5392,7 @@ export {
|
|
|
5347
5392
|
AuthenticationError,
|
|
5348
5393
|
AuthorizationError,
|
|
5349
5394
|
BucketCreateSchema,
|
|
5395
|
+
DEFAULT_API_VERSION,
|
|
5350
5396
|
DEFAULT_RETRY_CONFIG,
|
|
5351
5397
|
DocumentUploadBase64Schema,
|
|
5352
5398
|
EmbedRequestSchema,
|
|
@@ -5394,6 +5440,7 @@ export {
|
|
|
5394
5440
|
deleteNotificationPreferencesById,
|
|
5395
5441
|
deleteObjectsById,
|
|
5396
5442
|
deletePaymentMethodsById,
|
|
5443
|
+
deleteRolesById,
|
|
5397
5444
|
deleteSearchSavedById,
|
|
5398
5445
|
deleteTenantMembershipsByTenantIdByUserId,
|
|
5399
5446
|
deleteTenantsById,
|
|
@@ -5514,6 +5561,7 @@ export {
|
|
|
5514
5561
|
getPlans,
|
|
5515
5562
|
getPlansById,
|
|
5516
5563
|
getPlansSlugBySlug,
|
|
5564
|
+
getRoles,
|
|
5517
5565
|
getSearch,
|
|
5518
5566
|
getSearchAnalytics,
|
|
5519
5567
|
getSearchAnalyticsSummary,
|
|
@@ -5634,6 +5682,7 @@ export {
|
|
|
5634
5682
|
patchNotificationPreferencesById,
|
|
5635
5683
|
patchPaymentMethodsById,
|
|
5636
5684
|
patchPaymentMethodsByIdDefault,
|
|
5685
|
+
patchRolesById,
|
|
5637
5686
|
patchSearchSavedById,
|
|
5638
5687
|
patchTenantMembershipsByTenantIdByUserId,
|
|
5639
5688
|
patchTenantsById,
|
|
@@ -5728,6 +5777,7 @@ export {
|
|
|
5728
5777
|
postPaymentMethods,
|
|
5729
5778
|
postPaymentMethodsTokenize,
|
|
5730
5779
|
postPayments,
|
|
5780
|
+
postRoles,
|
|
5731
5781
|
postSearchBatch,
|
|
5732
5782
|
postSearchReindex,
|
|
5733
5783
|
postSearchSaved,
|
package/llms.txt
CHANGED
|
@@ -22,6 +22,38 @@ client.setConfig({
|
|
|
22
22
|
});
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
+
## API Versioning
|
|
26
|
+
|
|
27
|
+
The SDK sends an API version header with every request.
|
|
28
|
+
Default version: 2025-12-03
|
|
29
|
+
|
|
30
|
+
### Configuration
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
import { GptClient, DEFAULT_API_VERSION } from '@gpt-core/client';
|
|
34
|
+
|
|
35
|
+
// Use SDK default version
|
|
36
|
+
const client = new GptClient({ baseUrl, apiKey });
|
|
37
|
+
|
|
38
|
+
// Pin to specific version (recommended for production)
|
|
39
|
+
const client = new GptClient({ baseUrl, apiKey, apiVersion: '2025-12-03' });
|
|
40
|
+
|
|
41
|
+
// Read effective version
|
|
42
|
+
client.apiVersion // "2025-12-03"
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Config Options
|
|
46
|
+
|
|
47
|
+
- `baseUrl` (string) - API base URL
|
|
48
|
+
- `token` (string) - User JWT for Bearer auth
|
|
49
|
+
- `apiKey` (string) - Application key for x-application-key header
|
|
50
|
+
- `retry` (object|false) - Retry config or disable
|
|
51
|
+
- `apiVersion` (string) - API version date, defaults to DEFAULT_API_VERSION
|
|
52
|
+
|
|
53
|
+
### Response Header
|
|
54
|
+
|
|
55
|
+
Every response includes: `x-api-version: 2025-12-03`
|
|
56
|
+
|
|
25
57
|
## Agent stats
|
|
26
58
|
|
|
27
59
|
- `getAgentsByIdStats()` - Get stats
|
package/package.json
CHANGED