@gpt-platform/client 0.7.1 → 0.7.3
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/index.d.mts +787 -37
- package/dist/index.d.ts +787 -37
- package/dist/index.js +1010 -53
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1010 -53
- package/dist/index.mjs.map +1 -1
- package/llms.txt +115 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1269,7 +1269,7 @@ function buildUserAgent(sdkVersion, appInfo) {
|
|
|
1269
1269
|
}
|
|
1270
1270
|
|
|
1271
1271
|
// src/version.ts
|
|
1272
|
-
var SDK_VERSION = "0.7.
|
|
1272
|
+
var SDK_VERSION = "0.7.3";
|
|
1273
1273
|
var DEFAULT_API_VERSION = "2026-03-11";
|
|
1274
1274
|
|
|
1275
1275
|
// src/base-client.ts
|
|
@@ -1767,6 +1767,11 @@ var postEmailOutboundEmails = (options) => (options.client ?? client).post({
|
|
|
1767
1767
|
...options.headers
|
|
1768
1768
|
}
|
|
1769
1769
|
});
|
|
1770
|
+
var getBrandIdentitiesDefaultWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
1771
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1772
|
+
url: "/brand-identities/default/workspace/{workspace_id}",
|
|
1773
|
+
...options
|
|
1774
|
+
});
|
|
1770
1775
|
var patchWalletCredits = (options) => (options.client ?? client).patch({
|
|
1771
1776
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1772
1777
|
url: "/wallet/credits",
|
|
@@ -1876,6 +1881,20 @@ var getApplicationsCurrent = (options) => (options.client ?? client).get({
|
|
|
1876
1881
|
url: "/applications/current",
|
|
1877
1882
|
...options
|
|
1878
1883
|
});
|
|
1884
|
+
var patchTenantsByIdConvertToOrg = (options) => (options.client ?? client).patch({
|
|
1885
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1886
|
+
url: "/tenants/{id}/convert-to-org",
|
|
1887
|
+
...options,
|
|
1888
|
+
headers: {
|
|
1889
|
+
"Content-Type": "application/vnd.api+json",
|
|
1890
|
+
...options.headers
|
|
1891
|
+
}
|
|
1892
|
+
});
|
|
1893
|
+
var getBrandIdentitiesByTenantByTenantId = (options) => (options.client ?? client).get({
|
|
1894
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1895
|
+
url: "/brand-identities/by-tenant/{tenant_id}",
|
|
1896
|
+
...options
|
|
1897
|
+
});
|
|
1879
1898
|
var postInvitationsAcceptByToken = (options) => (options.client ?? client).post({
|
|
1880
1899
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1881
1900
|
url: "/invitations/accept-by-token",
|
|
@@ -1951,6 +1970,15 @@ var getSchedulingEventsByParticipant = (options) => (options.client ?? client).g
|
|
|
1951
1970
|
url: "/scheduling/events/by_participant",
|
|
1952
1971
|
...options
|
|
1953
1972
|
});
|
|
1973
|
+
var postTenantsPersonal = (options) => (options.client ?? client).post({
|
|
1974
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
1975
|
+
url: "/tenants/personal",
|
|
1976
|
+
...options,
|
|
1977
|
+
headers: {
|
|
1978
|
+
"Content-Type": "application/vnd.api+json",
|
|
1979
|
+
...options.headers
|
|
1980
|
+
}
|
|
1981
|
+
});
|
|
1954
1982
|
var getEmailTrackingEventsById = (options) => (options.client ?? client).get({
|
|
1955
1983
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1956
1984
|
url: "/email/tracking-events/{id}",
|
|
@@ -2159,6 +2187,15 @@ var postAgentsImport = (options) => (options.client ?? client).post({
|
|
|
2159
2187
|
...options.headers
|
|
2160
2188
|
}
|
|
2161
2189
|
});
|
|
2190
|
+
var postUsersAuthPasswordResetRequest = (options) => (options.client ?? client).post({
|
|
2191
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2192
|
+
url: "/users/auth/password-reset/request",
|
|
2193
|
+
...options,
|
|
2194
|
+
headers: {
|
|
2195
|
+
"Content-Type": "application/vnd.api+json",
|
|
2196
|
+
...options.headers
|
|
2197
|
+
}
|
|
2198
|
+
});
|
|
2162
2199
|
var getExtractionBatchesWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
2163
2200
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2164
2201
|
url: "/extraction/batches/workspace/{workspace_id}",
|
|
@@ -2318,6 +2355,15 @@ var patchRetentionPoliciesById = (options) => (options.client ?? client).patch({
|
|
|
2318
2355
|
...options.headers
|
|
2319
2356
|
}
|
|
2320
2357
|
});
|
|
2358
|
+
var patchWorkspacesByIdAllocate = (options) => (options.client ?? client).patch({
|
|
2359
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2360
|
+
url: "/workspaces/{id}/allocate",
|
|
2361
|
+
...options,
|
|
2362
|
+
headers: {
|
|
2363
|
+
"Content-Type": "application/vnd.api+json",
|
|
2364
|
+
...options.headers
|
|
2365
|
+
}
|
|
2366
|
+
});
|
|
2321
2367
|
var patchInvitationsByIdRevoke = (options) => (options.client ?? client).patch({
|
|
2322
2368
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2323
2369
|
url: "/invitations/{id}/revoke",
|
|
@@ -2568,6 +2614,11 @@ var postCrmCompanies = (options) => (options.client ?? client).post({
|
|
|
2568
2614
|
...options.headers
|
|
2569
2615
|
}
|
|
2570
2616
|
});
|
|
2617
|
+
var getPlanFeatureAllocations = (options) => (options.client ?? client).get({
|
|
2618
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2619
|
+
url: "/plan-feature-allocations",
|
|
2620
|
+
...options
|
|
2621
|
+
});
|
|
2571
2622
|
var patchLegalDocumentsByIdUnpublish = (options) => (options.client ?? client).patch({
|
|
2572
2623
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2573
2624
|
url: "/legal-documents/{id}/unpublish",
|
|
@@ -2699,6 +2750,15 @@ var patchEmailInboundAddressesByIdDisable = (options) => (options.client ?? clie
|
|
|
2699
2750
|
...options.headers
|
|
2700
2751
|
}
|
|
2701
2752
|
});
|
|
2753
|
+
var patchWorkspacesByIdPopulateHashes = (options) => (options.client ?? client).patch({
|
|
2754
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
2755
|
+
url: "/workspaces/{id}/populate-hashes",
|
|
2756
|
+
...options,
|
|
2757
|
+
headers: {
|
|
2758
|
+
"Content-Type": "application/vnd.api+json",
|
|
2759
|
+
...options.headers
|
|
2760
|
+
}
|
|
2761
|
+
});
|
|
2702
2762
|
var deleteSchedulingCalendarSyncsById = (options) => (options.client ?? client).delete({
|
|
2703
2763
|
security: [{ scheme: "bearer", type: "http" }],
|
|
2704
2764
|
url: "/scheduling/calendar-syncs/{id}",
|
|
@@ -3021,6 +3081,11 @@ var getLegalAcceptancesById = (options) => (options.client ?? client).get({
|
|
|
3021
3081
|
url: "/legal-acceptances/{id}",
|
|
3022
3082
|
...options
|
|
3023
3083
|
});
|
|
3084
|
+
var getPlanFeatureAllocationsByPlanByPlanId = (options) => (options.client ?? client).get({
|
|
3085
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3086
|
+
url: "/plan-feature-allocations/by-plan/{plan_id}",
|
|
3087
|
+
...options
|
|
3088
|
+
});
|
|
3024
3089
|
var deleteCrmRelationshipTypesById = (options) => (options.client ?? client).delete({
|
|
3025
3090
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3026
3091
|
url: "/crm/relationship-types/{id}",
|
|
@@ -3563,6 +3628,11 @@ var postInvitations = (options) => (options.client ?? client).post({
|
|
|
3563
3628
|
...options.headers
|
|
3564
3629
|
}
|
|
3565
3630
|
});
|
|
3631
|
+
var getCrmPipelineStagesPipelineByPipelineId = (options) => (options.client ?? client).get({
|
|
3632
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
3633
|
+
url: "/crm/pipeline-stages/pipeline/{pipeline_id}",
|
|
3634
|
+
...options
|
|
3635
|
+
});
|
|
3566
3636
|
var patchThreadsByIdArchive = (options) => (options.client ?? client).patch({
|
|
3567
3637
|
security: [{ scheme: "bearer", type: "http" }],
|
|
3568
3638
|
url: "/threads/{id}/archive",
|
|
@@ -4009,6 +4079,11 @@ var getVoiceRecordingsSessionBySessionId = (options) => (options.client ?? clien
|
|
|
4009
4079
|
url: "/voice/recordings/session/{session_id}",
|
|
4010
4080
|
...options
|
|
4011
4081
|
});
|
|
4082
|
+
var getBrandIdentitiesByWorkspaceByWorkspaceId = (options) => (options.client ?? client).get({
|
|
4083
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4084
|
+
url: "/brand-identities/by-workspace/{workspace_id}",
|
|
4085
|
+
...options
|
|
4086
|
+
});
|
|
4012
4087
|
var postExtractionDocumentsUpload = (options) => (options.client ?? client).post({
|
|
4013
4088
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4014
4089
|
url: "/extraction/documents/upload",
|
|
@@ -4111,6 +4186,15 @@ var getWorkspacesById = (options) => (options.client ?? client).get({
|
|
|
4111
4186
|
url: "/workspaces/{id}",
|
|
4112
4187
|
...options
|
|
4113
4188
|
});
|
|
4189
|
+
var patchWorkspacesById = (options) => (options.client ?? client).patch({
|
|
4190
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4191
|
+
url: "/workspaces/{id}",
|
|
4192
|
+
...options,
|
|
4193
|
+
headers: {
|
|
4194
|
+
"Content-Type": "application/vnd.api+json",
|
|
4195
|
+
...options.headers
|
|
4196
|
+
}
|
|
4197
|
+
});
|
|
4114
4198
|
var getCrawlerSchedules = (options) => (options.client ?? client).get({
|
|
4115
4199
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4116
4200
|
url: "/crawler/schedules",
|
|
@@ -4144,6 +4228,15 @@ var getTenants = (options) => (options.client ?? client).get({
|
|
|
4144
4228
|
url: "/tenants",
|
|
4145
4229
|
...options
|
|
4146
4230
|
});
|
|
4231
|
+
var postTenants = (options) => (options.client ?? client).post({
|
|
4232
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4233
|
+
url: "/tenants",
|
|
4234
|
+
...options,
|
|
4235
|
+
headers: {
|
|
4236
|
+
"Content-Type": "application/vnd.api+json",
|
|
4237
|
+
...options.headers
|
|
4238
|
+
}
|
|
4239
|
+
});
|
|
4147
4240
|
var getExtractionSchemaDiscoveriesById = (options) => (options.client ?? client).get({
|
|
4148
4241
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4149
4242
|
url: "/extraction/schema-discoveries/{id}",
|
|
@@ -4474,6 +4567,15 @@ var getCrmActivitiesById = (options) => (options.client ?? client).get({
|
|
|
4474
4567
|
url: "/crm/activities/{id}",
|
|
4475
4568
|
...options
|
|
4476
4569
|
});
|
|
4570
|
+
var patchCrmActivitiesById = (options) => (options.client ?? client).patch({
|
|
4571
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4572
|
+
url: "/crm/activities/{id}",
|
|
4573
|
+
...options,
|
|
4574
|
+
headers: {
|
|
4575
|
+
"Content-Type": "application/vnd.api+json",
|
|
4576
|
+
...options.headers
|
|
4577
|
+
}
|
|
4578
|
+
});
|
|
4477
4579
|
var postTrainingExamplesSearch = (options) => (options.client ?? client).post({
|
|
4478
4580
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4479
4581
|
url: "/training-examples/search",
|
|
@@ -4506,6 +4608,15 @@ var patchSchedulingEventsByIdCancel = (options) => (options.client ?? client).pa
|
|
|
4506
4608
|
...options.headers
|
|
4507
4609
|
}
|
|
4508
4610
|
});
|
|
4611
|
+
var patchTenantsByIdTransferOwnership = (options) => (options.client ?? client).patch({
|
|
4612
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4613
|
+
url: "/tenants/{id}/transfer-ownership",
|
|
4614
|
+
...options,
|
|
4615
|
+
headers: {
|
|
4616
|
+
"Content-Type": "application/vnd.api+json",
|
|
4617
|
+
...options.headers
|
|
4618
|
+
}
|
|
4619
|
+
});
|
|
4509
4620
|
var deleteAgentsById = (options) => (options.client ?? client).delete({
|
|
4510
4621
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4511
4622
|
url: "/agents/{id}",
|
|
@@ -4721,6 +4832,20 @@ var patchExtractionDocumentsByIdVerification = (options) => (options.client ?? c
|
|
|
4721
4832
|
...options.headers
|
|
4722
4833
|
}
|
|
4723
4834
|
});
|
|
4835
|
+
var getPlatformTones = (options) => (options.client ?? client).get({
|
|
4836
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4837
|
+
url: "/platform-tones",
|
|
4838
|
+
...options
|
|
4839
|
+
});
|
|
4840
|
+
var postPlatformTones = (options) => (options.client ?? client).post({
|
|
4841
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
4842
|
+
url: "/platform-tones",
|
|
4843
|
+
...options,
|
|
4844
|
+
headers: {
|
|
4845
|
+
"Content-Type": "application/vnd.api+json",
|
|
4846
|
+
...options.headers
|
|
4847
|
+
}
|
|
4848
|
+
});
|
|
4724
4849
|
var postThreadsByIdFork = (options) => (options.client ?? client).post({
|
|
4725
4850
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4726
4851
|
url: "/threads/{id}/fork",
|
|
@@ -4902,6 +5027,20 @@ var getPermissions = (options) => (options.client ?? client).get({
|
|
|
4902
5027
|
url: "/permissions",
|
|
4903
5028
|
...options
|
|
4904
5029
|
});
|
|
5030
|
+
var getBrandIdentities = (options) => (options.client ?? client).get({
|
|
5031
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5032
|
+
url: "/brand-identities",
|
|
5033
|
+
...options
|
|
5034
|
+
});
|
|
5035
|
+
var postBrandIdentities = (options) => (options.client ?? client).post({
|
|
5036
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5037
|
+
url: "/brand-identities",
|
|
5038
|
+
...options,
|
|
5039
|
+
headers: {
|
|
5040
|
+
"Content-Type": "application/vnd.api+json",
|
|
5041
|
+
...options.headers
|
|
5042
|
+
}
|
|
5043
|
+
});
|
|
4905
5044
|
var patchEmailOutboundEmailsByIdCancelSchedule = (options) => (options.client ?? client).patch({
|
|
4906
5045
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4907
5046
|
url: "/email/outbound-emails/{id}/cancel-schedule",
|
|
@@ -4980,6 +5119,11 @@ var patchSupportTicketsByIdAssign = (options) => (options.client ?? client).patc
|
|
|
4980
5119
|
...options.headers
|
|
4981
5120
|
}
|
|
4982
5121
|
});
|
|
5122
|
+
var getPlanFeatureAllocationsById = (options) => (options.client ?? client).get({
|
|
5123
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5124
|
+
url: "/plan-feature-allocations/{id}",
|
|
5125
|
+
...options
|
|
5126
|
+
});
|
|
4983
5127
|
var getAgentsByIdTrainingStats = (options) => (options.client ?? client).get({
|
|
4984
5128
|
security: [{ scheme: "bearer", type: "http" }],
|
|
4985
5129
|
url: "/agents/{id}/training-stats",
|
|
@@ -5115,14 +5259,10 @@ var getWorkspacesMine = (options) => (options.client ?? client).get({
|
|
|
5115
5259
|
url: "/workspaces/mine",
|
|
5116
5260
|
...options
|
|
5117
5261
|
});
|
|
5118
|
-
var
|
|
5262
|
+
var getPlatformTonesByBrandByBrandIdentityId = (options) => (options.client ?? client).get({
|
|
5119
5263
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5120
|
-
url: "/
|
|
5121
|
-
...options
|
|
5122
|
-
headers: {
|
|
5123
|
-
"Content-Type": "application/vnd.api+json",
|
|
5124
|
-
...options.headers
|
|
5125
|
-
}
|
|
5264
|
+
url: "/platform-tones/by-brand/{brand_identity_id}",
|
|
5265
|
+
...options
|
|
5126
5266
|
});
|
|
5127
5267
|
var getScanResultsById = (options) => (options.client ?? client).get({
|
|
5128
5268
|
security: [{ scheme: "bearer", type: "http" }],
|
|
@@ -5275,6 +5415,15 @@ var getFieldTemplatesById = (options) => (options.client ?? client).get({
|
|
|
5275
5415
|
url: "/field-templates/{id}",
|
|
5276
5416
|
...options
|
|
5277
5417
|
});
|
|
5418
|
+
var postTenantsOrg = (options) => (options.client ?? client).post({
|
|
5419
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5420
|
+
url: "/tenants/org",
|
|
5421
|
+
...options,
|
|
5422
|
+
headers: {
|
|
5423
|
+
"Content-Type": "application/vnd.api+json",
|
|
5424
|
+
...options.headers
|
|
5425
|
+
}
|
|
5426
|
+
});
|
|
5278
5427
|
var postUsersAuthRegister = (options) => (options.client ?? client).post({
|
|
5279
5428
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5280
5429
|
url: "/users/auth/register",
|
|
@@ -5289,6 +5438,25 @@ var getStorageFilesChildren = (options) => (options.client ?? client).get({
|
|
|
5289
5438
|
url: "/storage-files/children",
|
|
5290
5439
|
...options
|
|
5291
5440
|
});
|
|
5441
|
+
var deleteBrandIdentitiesById = (options) => (options.client ?? client).delete({
|
|
5442
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5443
|
+
url: "/brand-identities/{id}",
|
|
5444
|
+
...options
|
|
5445
|
+
});
|
|
5446
|
+
var getBrandIdentitiesById = (options) => (options.client ?? client).get({
|
|
5447
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5448
|
+
url: "/brand-identities/{id}",
|
|
5449
|
+
...options
|
|
5450
|
+
});
|
|
5451
|
+
var patchBrandIdentitiesById = (options) => (options.client ?? client).patch({
|
|
5452
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5453
|
+
url: "/brand-identities/{id}",
|
|
5454
|
+
...options,
|
|
5455
|
+
headers: {
|
|
5456
|
+
"Content-Type": "application/vnd.api+json",
|
|
5457
|
+
...options.headers
|
|
5458
|
+
}
|
|
5459
|
+
});
|
|
5292
5460
|
var getTrainingExamples = (options) => (options.client ?? client).get({
|
|
5293
5461
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5294
5462
|
url: "/training-examples",
|
|
@@ -5402,6 +5570,15 @@ var postConnectorsByIdPracticeBetterPushNote = (options) => (options.client ?? c
|
|
|
5402
5570
|
...options.headers
|
|
5403
5571
|
}
|
|
5404
5572
|
});
|
|
5573
|
+
var patchBrandIdentitiesByIdUnsetDefault = (options) => (options.client ?? client).patch({
|
|
5574
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5575
|
+
url: "/brand-identities/{id}/unset-default",
|
|
5576
|
+
...options,
|
|
5577
|
+
headers: {
|
|
5578
|
+
"Content-Type": "application/vnd.api+json",
|
|
5579
|
+
...options.headers
|
|
5580
|
+
}
|
|
5581
|
+
});
|
|
5405
5582
|
var deleteTenantsById = (options) => (options.client ?? client).delete({
|
|
5406
5583
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5407
5584
|
url: "/tenants/{id}",
|
|
@@ -5561,6 +5738,20 @@ var postConsentRecords = (options) => (options.client ?? client).post({
|
|
|
5561
5738
|
...options.headers
|
|
5562
5739
|
}
|
|
5563
5740
|
});
|
|
5741
|
+
var patchBrandIdentitiesByIdSetDefault = (options) => (options.client ?? client).patch({
|
|
5742
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5743
|
+
url: "/brand-identities/{id}/set-default",
|
|
5744
|
+
...options,
|
|
5745
|
+
headers: {
|
|
5746
|
+
"Content-Type": "application/vnd.api+json",
|
|
5747
|
+
...options.headers
|
|
5748
|
+
}
|
|
5749
|
+
});
|
|
5750
|
+
var getBrandIdentitiesDefaultTenantByTenantId = (options) => (options.client ?? client).get({
|
|
5751
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5752
|
+
url: "/brand-identities/default/tenant/{tenant_id}",
|
|
5753
|
+
...options
|
|
5754
|
+
});
|
|
5564
5755
|
var postUsersAuthResendConfirmation = (options) => (options.client ?? client).post({
|
|
5565
5756
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5566
5757
|
url: "/users/auth/resend-confirmation",
|
|
@@ -5799,6 +5990,15 @@ var patchStorageFilesByIdTag = (options) => (options.client ?? client).patch({
|
|
|
5799
5990
|
...options.headers
|
|
5800
5991
|
}
|
|
5801
5992
|
});
|
|
5993
|
+
var patchCrmDealsByIdMoveStage = (options) => (options.client ?? client).patch({
|
|
5994
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
5995
|
+
url: "/crm/deals/{id}/move-stage",
|
|
5996
|
+
...options,
|
|
5997
|
+
headers: {
|
|
5998
|
+
"Content-Type": "application/vnd.api+json",
|
|
5999
|
+
...options.headers
|
|
6000
|
+
}
|
|
6001
|
+
});
|
|
5802
6002
|
var getApiKeys = (options) => (options.client ?? client).get({
|
|
5803
6003
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5804
6004
|
url: "/api-keys",
|
|
@@ -5860,6 +6060,11 @@ var postExtractionDocumentsBulkReprocess = (options) => (options.client ?? clien
|
|
|
5860
6060
|
...options.headers
|
|
5861
6061
|
}
|
|
5862
6062
|
});
|
|
6063
|
+
var getApplicationsBySlugBySlug = (options) => (options.client ?? client).get({
|
|
6064
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
6065
|
+
url: "/applications/by-slug/{slug}",
|
|
6066
|
+
...options
|
|
6067
|
+
});
|
|
5863
6068
|
var getWebhookConfigs = (options) => (options.client ?? client).get({
|
|
5864
6069
|
security: [{ scheme: "bearer", type: "http" }],
|
|
5865
6070
|
url: "/webhook-configs",
|
|
@@ -6123,6 +6328,25 @@ var getCrmCompaniesWorkspaceByWorkspaceId = (options) => (options.client ?? clie
|
|
|
6123
6328
|
url: "/crm/companies/workspace/{workspace_id}",
|
|
6124
6329
|
...options
|
|
6125
6330
|
});
|
|
6331
|
+
var deletePlatformTonesById = (options) => (options.client ?? client).delete({
|
|
6332
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
6333
|
+
url: "/platform-tones/{id}",
|
|
6334
|
+
...options
|
|
6335
|
+
});
|
|
6336
|
+
var getPlatformTonesById = (options) => (options.client ?? client).get({
|
|
6337
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
6338
|
+
url: "/platform-tones/{id}",
|
|
6339
|
+
...options
|
|
6340
|
+
});
|
|
6341
|
+
var patchPlatformTonesById = (options) => (options.client ?? client).patch({
|
|
6342
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
6343
|
+
url: "/platform-tones/{id}",
|
|
6344
|
+
...options,
|
|
6345
|
+
headers: {
|
|
6346
|
+
"Content-Type": "application/vnd.api+json",
|
|
6347
|
+
...options.headers
|
|
6348
|
+
}
|
|
6349
|
+
});
|
|
6126
6350
|
var getCreditPackages = (options) => (options.client ?? client).get({
|
|
6127
6351
|
security: [{ scheme: "bearer", type: "http" }],
|
|
6128
6352
|
url: "/credit-packages",
|
|
@@ -6333,30 +6557,33 @@ function createAgentsNamespace(rb) {
|
|
|
6333
6557
|
return rb.execute(getAgentsById, { path: { id } }, options);
|
|
6334
6558
|
},
|
|
6335
6559
|
/**
|
|
6336
|
-
* Creates a new agent with
|
|
6560
|
+
* Creates a new agent with a blank initial version (v1).
|
|
6561
|
+
*
|
|
6562
|
+
* The agent is created with default settings. To set the prompt template,
|
|
6563
|
+
* create or update a schema version after creation:
|
|
6337
6564
|
*
|
|
6338
|
-
*
|
|
6339
|
-
*
|
|
6340
|
-
*
|
|
6565
|
+
* ```typescript
|
|
6566
|
+
* const agent = await client.agents.create('Invoice Parser');
|
|
6567
|
+
* await client.agents.updateSchemaVersion(agent.id, versionId, {
|
|
6568
|
+
* prompt_template: 'You are an expert invoice parser...',
|
|
6569
|
+
* });
|
|
6570
|
+
* ```
|
|
6341
6571
|
*
|
|
6342
|
-
* @param name -
|
|
6343
|
-
* @param
|
|
6344
|
-
* @param attributes - Optional additional attributes to set on the agent resource
|
|
6345
|
-
* (e.g. `{ model: 'gpt-4o', temperature: 0.2 }`).
|
|
6572
|
+
* @param name - The display name for the agent.
|
|
6573
|
+
* @param attributes - Optional agent attributes (description, instructions, tags, etc.).
|
|
6346
6574
|
* @param options - Optional request options.
|
|
6347
|
-
* @returns A promise that resolves to the
|
|
6575
|
+
* @returns A promise that resolves to the created `Agent` object with its auto-generated v1.
|
|
6348
6576
|
*
|
|
6349
6577
|
* @example
|
|
6350
6578
|
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
6351
6579
|
*
|
|
6352
|
-
* const agent = await client.agents.create(
|
|
6353
|
-
* '
|
|
6354
|
-
* '
|
|
6355
|
-
*
|
|
6356
|
-
* );
|
|
6580
|
+
* const agent = await client.agents.create('Invoice Parser', {
|
|
6581
|
+
* description: 'Extracts structured data from invoices',
|
|
6582
|
+
* instructions: 'Focus on line items and totals',
|
|
6583
|
+
* });
|
|
6357
6584
|
* console.log(`Created agent: ${agent.id}`);
|
|
6358
6585
|
*/
|
|
6359
|
-
create: async (name,
|
|
6586
|
+
create: async (name, attributes, options) => {
|
|
6360
6587
|
return rb.execute(
|
|
6361
6588
|
postAgents,
|
|
6362
6589
|
{
|
|
@@ -6365,7 +6592,6 @@ function createAgentsNamespace(rb) {
|
|
|
6365
6592
|
type: "agent",
|
|
6366
6593
|
attributes: {
|
|
6367
6594
|
name,
|
|
6368
|
-
prompt_template: promptTemplate,
|
|
6369
6595
|
...attributes
|
|
6370
6596
|
}
|
|
6371
6597
|
}
|
|
@@ -6382,7 +6608,7 @@ function createAgentsNamespace(rb) {
|
|
|
6382
6608
|
*
|
|
6383
6609
|
* @param id - The UUID of the agent to update.
|
|
6384
6610
|
* @param attributes - A partial map of agent attributes to update
|
|
6385
|
-
* (e.g. `{ name: 'New Name',
|
|
6611
|
+
* (e.g. `{ name: 'New Name', description: 'Updated description' }`).
|
|
6386
6612
|
* @param options - Optional request options.
|
|
6387
6613
|
* @returns A promise that resolves to the updated `Agent` object.
|
|
6388
6614
|
*
|
|
@@ -8974,7 +9200,7 @@ function createBillingNamespace(rb) {
|
|
|
8974
9200
|
create: async (attributes, options) => {
|
|
8975
9201
|
return rb.execute(
|
|
8976
9202
|
postPaymentMethods,
|
|
8977
|
-
{ body: { data: { type: "
|
|
9203
|
+
{ body: { data: { type: "payment-method", attributes } } },
|
|
8978
9204
|
options
|
|
8979
9205
|
);
|
|
8980
9206
|
},
|
|
@@ -9001,7 +9227,7 @@ function createBillingNamespace(rb) {
|
|
|
9001
9227
|
return rb.execute(
|
|
9002
9228
|
postPaymentMethodsTokenize,
|
|
9003
9229
|
{
|
|
9004
|
-
body: { data: { type: "
|
|
9230
|
+
body: { data: { type: "payment-method", attributes: cardDetails } }
|
|
9005
9231
|
},
|
|
9006
9232
|
options
|
|
9007
9233
|
);
|
|
@@ -9031,7 +9257,7 @@ function createBillingNamespace(rb) {
|
|
|
9031
9257
|
patchPaymentMethodsById,
|
|
9032
9258
|
{
|
|
9033
9259
|
path: { id },
|
|
9034
|
-
body: { data: { id, type: "
|
|
9260
|
+
body: { data: { id, type: "payment-method", attributes } }
|
|
9035
9261
|
},
|
|
9036
9262
|
options
|
|
9037
9263
|
);
|
|
@@ -9187,6 +9413,65 @@ function createBillingNamespace(rb) {
|
|
|
9187
9413
|
);
|
|
9188
9414
|
return result.data ?? result;
|
|
9189
9415
|
}
|
|
9416
|
+
},
|
|
9417
|
+
/**
|
|
9418
|
+
* Plan-feature allocations — per-plan overrides for feature definitions (read-only).
|
|
9419
|
+
*
|
|
9420
|
+
* Allocations link feature definitions to plans, specifying which features are
|
|
9421
|
+
* enabled on each plan and any per-plan overrides for limits, credit costs,
|
|
9422
|
+
* and activation costs. Use `listByPlan` to build plan comparison tables.
|
|
9423
|
+
*/
|
|
9424
|
+
planFeatureAllocations: {
|
|
9425
|
+
/** List all plan-feature allocations for the current application. */
|
|
9426
|
+
list: async (options) => {
|
|
9427
|
+
return rb.execute(
|
|
9428
|
+
getPlanFeatureAllocations,
|
|
9429
|
+
buildPageQuery(options?.page, options?.pageSize),
|
|
9430
|
+
options
|
|
9431
|
+
);
|
|
9432
|
+
},
|
|
9433
|
+
/** Fetch all plan-feature allocations by paginating through every page. */
|
|
9434
|
+
listAll: async (options) => {
|
|
9435
|
+
return paginateToArray(
|
|
9436
|
+
rb.createPaginatedFetcher(
|
|
9437
|
+
getPlanFeatureAllocations,
|
|
9438
|
+
(page, pageSize) => ({
|
|
9439
|
+
query: { page: { number: page, size: pageSize } }
|
|
9440
|
+
}),
|
|
9441
|
+
options
|
|
9442
|
+
)
|
|
9443
|
+
);
|
|
9444
|
+
},
|
|
9445
|
+
/** Get a plan-feature allocation by ID. */
|
|
9446
|
+
get: async (id, options) => {
|
|
9447
|
+
return rb.execute(
|
|
9448
|
+
getPlanFeatureAllocationsById,
|
|
9449
|
+
{ path: { id } },
|
|
9450
|
+
options
|
|
9451
|
+
);
|
|
9452
|
+
},
|
|
9453
|
+
/**
|
|
9454
|
+
* List allocations for a specific plan.
|
|
9455
|
+
*
|
|
9456
|
+
* Use this to build a plan comparison table — returns all feature
|
|
9457
|
+
* allocations (enabled/disabled, limits, costs) for one plan.
|
|
9458
|
+
*
|
|
9459
|
+
* @param planId - UUID of the plan to query.
|
|
9460
|
+
*
|
|
9461
|
+
* @example
|
|
9462
|
+
* ```typescript
|
|
9463
|
+
* const allocations = await client.billing.planFeatureAllocations.listByPlan(planId);
|
|
9464
|
+
* const enabledFeatures = allocations.filter(a => a.attributes?.enabled);
|
|
9465
|
+
* ```
|
|
9466
|
+
*/
|
|
9467
|
+
listByPlan: async (planId, options) => {
|
|
9468
|
+
const result = await rb.execute(
|
|
9469
|
+
getPlanFeatureAllocationsByPlanByPlanId,
|
|
9470
|
+
{ path: { plan_id: planId } },
|
|
9471
|
+
options
|
|
9472
|
+
);
|
|
9473
|
+
return result.data ?? result;
|
|
9474
|
+
}
|
|
9190
9475
|
}
|
|
9191
9476
|
};
|
|
9192
9477
|
}
|
|
@@ -14228,6 +14513,7 @@ function createCrmNamespace(rb) {
|
|
|
14228
14513
|
{
|
|
14229
14514
|
path: { workspace_id: workspaceId },
|
|
14230
14515
|
query: {
|
|
14516
|
+
...options?.name ? { name: options.name } : {},
|
|
14231
14517
|
...options?.status ? { status: options.status } : {},
|
|
14232
14518
|
...options?.filters ? { filters: options.filters } : {},
|
|
14233
14519
|
...options?.tags ? { tags: options.tags } : {},
|
|
@@ -14558,6 +14844,33 @@ function createCrmNamespace(rb) {
|
|
|
14558
14844
|
options
|
|
14559
14845
|
);
|
|
14560
14846
|
},
|
|
14847
|
+
/**
|
|
14848
|
+
* Move a deal to a different pipeline stage.
|
|
14849
|
+
*
|
|
14850
|
+
* @param id - The unique identifier of the deal to move.
|
|
14851
|
+
* @param attributes - Must include `stage_id` (the target stage).
|
|
14852
|
+
* @param options - Optional request-level overrides.
|
|
14853
|
+
* @returns A promise that resolves to the updated {@link CrmDeal}.
|
|
14854
|
+
*
|
|
14855
|
+
* @example
|
|
14856
|
+
* ```typescript
|
|
14857
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
14858
|
+
*
|
|
14859
|
+
* const deal = await client.crm.deals.moveStage('deal_abc123', {
|
|
14860
|
+
* stage_id: 'stage_closed_won',
|
|
14861
|
+
* });
|
|
14862
|
+
* ```
|
|
14863
|
+
*/
|
|
14864
|
+
moveStage: async (id, attributes, options) => {
|
|
14865
|
+
return rb.execute(
|
|
14866
|
+
patchCrmDealsByIdMoveStage,
|
|
14867
|
+
{
|
|
14868
|
+
path: { id },
|
|
14869
|
+
body: { data: { type: "crm_deal", id, attributes } }
|
|
14870
|
+
},
|
|
14871
|
+
options
|
|
14872
|
+
);
|
|
14873
|
+
},
|
|
14561
14874
|
/**
|
|
14562
14875
|
* Permanently delete a deal.
|
|
14563
14876
|
*
|
|
@@ -14669,30 +14982,57 @@ function createCrmNamespace(rb) {
|
|
|
14669
14982
|
);
|
|
14670
14983
|
},
|
|
14671
14984
|
/**
|
|
14672
|
-
*
|
|
14985
|
+
* Update an existing activity's attributes.
|
|
14673
14986
|
*
|
|
14674
|
-
* @param id - The unique identifier of the activity to
|
|
14987
|
+
* @param id - The unique identifier of the activity to update.
|
|
14988
|
+
* @param attributes - Key/value map of attributes to change.
|
|
14675
14989
|
* @param options - Optional request-level overrides.
|
|
14676
|
-
* @returns A promise that resolves to
|
|
14990
|
+
* @returns A promise that resolves to the updated {@link CrmActivity}.
|
|
14677
14991
|
*
|
|
14678
14992
|
* @example
|
|
14679
14993
|
* ```typescript
|
|
14680
14994
|
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
14681
14995
|
*
|
|
14682
|
-
* await client.crm.activities.
|
|
14996
|
+
* const activity = await client.crm.activities.update('act_abc123', {
|
|
14997
|
+
* note: 'Updated notes from follow-up call.',
|
|
14998
|
+
* });
|
|
14683
14999
|
* ```
|
|
14684
15000
|
*/
|
|
14685
|
-
|
|
14686
|
-
return rb.
|
|
14687
|
-
|
|
14688
|
-
{
|
|
15001
|
+
update: async (id, attributes, options) => {
|
|
15002
|
+
return rb.execute(
|
|
15003
|
+
patchCrmActivitiesById,
|
|
15004
|
+
{
|
|
15005
|
+
path: { id },
|
|
15006
|
+
body: { data: { id, type: "crm_activity", attributes } }
|
|
15007
|
+
},
|
|
14689
15008
|
options
|
|
14690
15009
|
);
|
|
14691
15010
|
},
|
|
14692
15011
|
/**
|
|
14693
|
-
*
|
|
15012
|
+
* Permanently delete an activity.
|
|
14694
15013
|
*
|
|
14695
|
-
* @param
|
|
15014
|
+
* @param id - The unique identifier of the activity to delete.
|
|
15015
|
+
* @param options - Optional request-level overrides.
|
|
15016
|
+
* @returns A promise that resolves to `true` on successful deletion.
|
|
15017
|
+
*
|
|
15018
|
+
* @example
|
|
15019
|
+
* ```typescript
|
|
15020
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
15021
|
+
*
|
|
15022
|
+
* await client.crm.activities.delete('act_abc123');
|
|
15023
|
+
* ```
|
|
15024
|
+
*/
|
|
15025
|
+
delete: async (id, options) => {
|
|
15026
|
+
return rb.executeDelete(
|
|
15027
|
+
deleteCrmActivitiesById,
|
|
15028
|
+
{ path: { id } },
|
|
15029
|
+
options
|
|
15030
|
+
);
|
|
15031
|
+
},
|
|
15032
|
+
/**
|
|
15033
|
+
* List activities in a workspace with optional pagination.
|
|
15034
|
+
*
|
|
15035
|
+
* @param workspaceId - The ID of the workspace to list activities from.
|
|
14696
15036
|
* @param options - Optional pagination controls and request-level overrides.
|
|
14697
15037
|
* @returns A promise that resolves to an array of {@link CrmActivity} records.
|
|
14698
15038
|
*
|
|
@@ -14954,6 +15294,28 @@ function createCrmNamespace(rb) {
|
|
|
14954
15294
|
{ path: { id } },
|
|
14955
15295
|
options
|
|
14956
15296
|
);
|
|
15297
|
+
},
|
|
15298
|
+
/**
|
|
15299
|
+
* List all stages belonging to a specific pipeline.
|
|
15300
|
+
*
|
|
15301
|
+
* @param pipelineId - The ID of the pipeline whose stages to list.
|
|
15302
|
+
* @param options - Optional request-level overrides.
|
|
15303
|
+
* @returns A promise that resolves to an array of {@link CrmPipelineStage} records.
|
|
15304
|
+
*
|
|
15305
|
+
* @example
|
|
15306
|
+
* ```typescript
|
|
15307
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
15308
|
+
*
|
|
15309
|
+
* const stages = await client.crm.pipelineStages.listByPipeline('pipe_abc123');
|
|
15310
|
+
* stages.forEach((s) => console.log(s.attributes.name, s.attributes.order));
|
|
15311
|
+
* ```
|
|
15312
|
+
*/
|
|
15313
|
+
listByPipeline: async (pipelineId, options) => {
|
|
15314
|
+
return rb.execute(
|
|
15315
|
+
getCrmPipelineStagesPipelineByPipelineId,
|
|
15316
|
+
{ path: { pipeline_id: pipelineId } },
|
|
15317
|
+
options
|
|
15318
|
+
);
|
|
14957
15319
|
}
|
|
14958
15320
|
},
|
|
14959
15321
|
/**
|
|
@@ -19216,7 +19578,7 @@ function createIdentityNamespace(rb, baseUrl) {
|
|
|
19216
19578
|
requestPasswordReset: async (email, options) => {
|
|
19217
19579
|
RequestPasswordResetSchema.parse({ email });
|
|
19218
19580
|
return rb.execute(
|
|
19219
|
-
|
|
19581
|
+
postUsersAuthPasswordResetRequest,
|
|
19220
19582
|
{
|
|
19221
19583
|
body: {
|
|
19222
19584
|
data: { type: "user", attributes: { email } }
|
|
@@ -19896,7 +20258,7 @@ function createPlatformNamespace(rb) {
|
|
|
19896
20258
|
*/
|
|
19897
20259
|
update: async (id, attributes, options) => {
|
|
19898
20260
|
return rb.execute(
|
|
19899
|
-
|
|
20261
|
+
patchWorkspacesById,
|
|
19900
20262
|
{
|
|
19901
20263
|
path: { id },
|
|
19902
20264
|
body: { data: { id, type: "workspace", attributes } }
|
|
@@ -19904,6 +20266,29 @@ function createPlatformNamespace(rb) {
|
|
|
19904
20266
|
options
|
|
19905
20267
|
);
|
|
19906
20268
|
},
|
|
20269
|
+
/**
|
|
20270
|
+
* Update storage-specific settings for a workspace.
|
|
20271
|
+
*
|
|
20272
|
+
* Updates the embedded storage settings (e.g., deduplication,
|
|
20273
|
+
* upload limits) without touching other workspace attributes.
|
|
20274
|
+
*
|
|
20275
|
+
* @param id - The UUID of the workspace.
|
|
20276
|
+
* @param settings - Storage settings to update.
|
|
20277
|
+
* @param options - Optional request options.
|
|
20278
|
+
* @returns The updated `Workspace`.
|
|
20279
|
+
*/
|
|
20280
|
+
updateStorageSettings: async (id, settings, options) => {
|
|
20281
|
+
return rb.execute(
|
|
20282
|
+
patchWorkspacesByIdStorageSettings,
|
|
20283
|
+
{
|
|
20284
|
+
path: { id },
|
|
20285
|
+
body: {
|
|
20286
|
+
data: { id, type: "workspace", attributes: { settings } }
|
|
20287
|
+
}
|
|
20288
|
+
},
|
|
20289
|
+
options
|
|
20290
|
+
);
|
|
20291
|
+
},
|
|
19907
20292
|
/**
|
|
19908
20293
|
* Allocate credits to a workspace.
|
|
19909
20294
|
*
|
|
@@ -19912,20 +20297,63 @@ function createPlatformNamespace(rb) {
|
|
|
19912
20297
|
* reflects the updated credit balance.
|
|
19913
20298
|
*
|
|
19914
20299
|
* @param workspaceId - The UUID of the workspace to allocate credits for.
|
|
20300
|
+
* @param amount - Number of credits to allocate (max 100,000 per call).
|
|
19915
20301
|
* @param options - Optional request options.
|
|
19916
|
-
* @returns The updated `Workspace`
|
|
20302
|
+
* @returns The updated `Workspace` after allocation.
|
|
19917
20303
|
*
|
|
19918
20304
|
* @example
|
|
19919
20305
|
* ```typescript
|
|
19920
20306
|
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
19921
|
-
* const workspace = await client.platform.workspaces.allocateCredits('ws_abc123');
|
|
19922
|
-
* console.log(workspace.attributes?.credit_balance);
|
|
20307
|
+
* const workspace = await client.platform.workspaces.allocateCredits('ws_abc123', 5000);
|
|
19923
20308
|
* ```
|
|
19924
20309
|
*/
|
|
19925
|
-
allocateCredits: async (workspaceId, options) => {
|
|
20310
|
+
allocateCredits: async (workspaceId, amount, options) => {
|
|
19926
20311
|
return rb.execute(
|
|
19927
|
-
|
|
19928
|
-
{
|
|
20312
|
+
patchWorkspacesByIdAllocate,
|
|
20313
|
+
{
|
|
20314
|
+
path: { id: workspaceId },
|
|
20315
|
+
body: {
|
|
20316
|
+
data: {
|
|
20317
|
+
id: workspaceId,
|
|
20318
|
+
type: "workspace",
|
|
20319
|
+
attributes: { amount }
|
|
20320
|
+
}
|
|
20321
|
+
}
|
|
20322
|
+
},
|
|
20323
|
+
options
|
|
20324
|
+
);
|
|
20325
|
+
},
|
|
20326
|
+
/**
|
|
20327
|
+
* Populate content hashes for all documents in a workspace.
|
|
20328
|
+
*
|
|
20329
|
+
* Triggers a backfill operation that computes and stores content
|
|
20330
|
+
* hashes for documents that were created before hash-on-upload
|
|
20331
|
+
* was enabled. This is an idempotent operation — documents that
|
|
20332
|
+
* already have hashes are skipped.
|
|
20333
|
+
*
|
|
20334
|
+
* @param workspaceId - The UUID of the workspace to populate hashes for.
|
|
20335
|
+
* @param options - Optional request options.
|
|
20336
|
+
* @returns The updated `Workspace`.
|
|
20337
|
+
*
|
|
20338
|
+
* @example
|
|
20339
|
+
* ```typescript
|
|
20340
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
20341
|
+
* const workspace = await client.platform.workspaces.populateHashes('ws_abc123');
|
|
20342
|
+
* ```
|
|
20343
|
+
*/
|
|
20344
|
+
populateHashes: async (workspaceId, options) => {
|
|
20345
|
+
return rb.execute(
|
|
20346
|
+
patchWorkspacesByIdPopulateHashes,
|
|
20347
|
+
{
|
|
20348
|
+
path: { id: workspaceId },
|
|
20349
|
+
body: {
|
|
20350
|
+
data: {
|
|
20351
|
+
id: workspaceId,
|
|
20352
|
+
type: "workspace",
|
|
20353
|
+
attributes: {}
|
|
20354
|
+
}
|
|
20355
|
+
}
|
|
20356
|
+
},
|
|
19929
20357
|
options
|
|
19930
20358
|
);
|
|
19931
20359
|
}
|
|
@@ -20126,6 +20554,31 @@ function createPlatformNamespace(rb) {
|
|
|
20126
20554
|
*/
|
|
20127
20555
|
readCurrent: async (options) => {
|
|
20128
20556
|
return rb.execute(getApplicationsCurrent, {}, options);
|
|
20557
|
+
},
|
|
20558
|
+
/**
|
|
20559
|
+
* Fetch an application by its unique slug.
|
|
20560
|
+
*
|
|
20561
|
+
* Looks up an application using its URL-friendly slug identifier
|
|
20562
|
+
* rather than its UUID. Useful for public-facing flows where the
|
|
20563
|
+
* slug is known (e.g., from a vanity URL).
|
|
20564
|
+
*
|
|
20565
|
+
* @param slug - The application slug (e.g., `"my-saas-app"`).
|
|
20566
|
+
* @param options - Optional request options.
|
|
20567
|
+
* @returns The matching `Application`.
|
|
20568
|
+
*
|
|
20569
|
+
* @example
|
|
20570
|
+
* ```typescript
|
|
20571
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
20572
|
+
* const app = await client.platform.applications.getBySlug('my-saas-app');
|
|
20573
|
+
* console.log(app.attributes?.name);
|
|
20574
|
+
* ```
|
|
20575
|
+
*/
|
|
20576
|
+
getBySlug: async (slug, options) => {
|
|
20577
|
+
return rb.execute(
|
|
20578
|
+
getApplicationsBySlugBySlug,
|
|
20579
|
+
{ path: { slug } },
|
|
20580
|
+
options
|
|
20581
|
+
);
|
|
20129
20582
|
}
|
|
20130
20583
|
},
|
|
20131
20584
|
/**
|
|
@@ -20278,7 +20731,7 @@ function createPlatformNamespace(rb) {
|
|
|
20278
20731
|
*/
|
|
20279
20732
|
create: async (attributes, options) => {
|
|
20280
20733
|
return rb.execute(
|
|
20281
|
-
|
|
20734
|
+
postTenants,
|
|
20282
20735
|
{ body: { data: { type: "tenant", attributes } } },
|
|
20283
20736
|
options
|
|
20284
20737
|
);
|
|
@@ -20335,7 +20788,6 @@ function createPlatformNamespace(rb) {
|
|
|
20335
20788
|
options
|
|
20336
20789
|
);
|
|
20337
20790
|
},
|
|
20338
|
-
/**
|
|
20339
20791
|
/**
|
|
20340
20792
|
* Retrieve a single tenant by its ID.
|
|
20341
20793
|
*
|
|
@@ -20366,7 +20818,7 @@ function createPlatformNamespace(rb) {
|
|
|
20366
20818
|
*/
|
|
20367
20819
|
transferOwnership: async (tenantId, newOwnerId, options) => {
|
|
20368
20820
|
return rb.execute(
|
|
20369
|
-
|
|
20821
|
+
patchTenantsByIdTransferOwnership,
|
|
20370
20822
|
{
|
|
20371
20823
|
path: { id: tenantId },
|
|
20372
20824
|
body: {
|
|
@@ -20379,6 +20831,75 @@ function createPlatformNamespace(rb) {
|
|
|
20379
20831
|
},
|
|
20380
20832
|
options
|
|
20381
20833
|
);
|
|
20834
|
+
},
|
|
20835
|
+
/**
|
|
20836
|
+
* Convert a personal tenant to an organization.
|
|
20837
|
+
*
|
|
20838
|
+
* Flips `is_personal` to `false`, sets a new name and slug, and
|
|
20839
|
+
* provisions a default workspace if `application_id` is provided.
|
|
20840
|
+
* Only the tenant owner can perform this action.
|
|
20841
|
+
*
|
|
20842
|
+
* @param tenantId - The UUID of the personal tenant to convert.
|
|
20843
|
+
* @param attributes - Conversion attributes. `name` is required; `slug` and `application_id` are optional.
|
|
20844
|
+
* @param options - Optional request options.
|
|
20845
|
+
* @returns The converted `Tenant`.
|
|
20846
|
+
*
|
|
20847
|
+
* @example
|
|
20848
|
+
* ```typescript
|
|
20849
|
+
* const org = await client.platform.tenants.convertToOrg(tenantId, {
|
|
20850
|
+
* name: "My Company",
|
|
20851
|
+
* });
|
|
20852
|
+
* console.log(org.is_personal); // false
|
|
20853
|
+
* ```
|
|
20854
|
+
*/
|
|
20855
|
+
convertToOrg: async (tenantId, attributes, options) => {
|
|
20856
|
+
return rb.execute(
|
|
20857
|
+
patchTenantsByIdConvertToOrg,
|
|
20858
|
+
{
|
|
20859
|
+
path: { id: tenantId },
|
|
20860
|
+
body: {
|
|
20861
|
+
data: {
|
|
20862
|
+
id: tenantId,
|
|
20863
|
+
type: "tenant",
|
|
20864
|
+
attributes
|
|
20865
|
+
}
|
|
20866
|
+
}
|
|
20867
|
+
},
|
|
20868
|
+
options
|
|
20869
|
+
);
|
|
20870
|
+
},
|
|
20871
|
+
/**
|
|
20872
|
+
* Create a new organization tenant.
|
|
20873
|
+
*
|
|
20874
|
+
* Requires the application to have `allow_org_creation` enabled.
|
|
20875
|
+
* Provisions a workspace, billing accounts, and storage for the new org.
|
|
20876
|
+
*
|
|
20877
|
+
* @param attributes - Org creation attributes. `name` is required.
|
|
20878
|
+
* @param options - Optional request options.
|
|
20879
|
+
* @returns The newly created organization `Tenant`.
|
|
20880
|
+
*/
|
|
20881
|
+
createOrg: async (attributes, options) => {
|
|
20882
|
+
return rb.execute(
|
|
20883
|
+
postTenantsOrg,
|
|
20884
|
+
{ body: { data: { type: "tenant", attributes } } },
|
|
20885
|
+
options
|
|
20886
|
+
);
|
|
20887
|
+
},
|
|
20888
|
+
/**
|
|
20889
|
+
* Create a personal tenant for the current user.
|
|
20890
|
+
*
|
|
20891
|
+
* Each user may have at most one personal tenant. Name and slug are
|
|
20892
|
+
* auto-generated from the user's email.
|
|
20893
|
+
*
|
|
20894
|
+
* @param options - Optional request options.
|
|
20895
|
+
* @returns The newly created personal `Tenant`.
|
|
20896
|
+
*/
|
|
20897
|
+
createPersonal: async (options) => {
|
|
20898
|
+
return rb.execute(
|
|
20899
|
+
postTenantsPersonal,
|
|
20900
|
+
{ body: { data: { type: "tenant", attributes: {} } } },
|
|
20901
|
+
options
|
|
20902
|
+
);
|
|
20382
20903
|
}
|
|
20383
20904
|
},
|
|
20384
20905
|
/**
|
|
@@ -20395,12 +20916,14 @@ function createPlatformNamespace(rb) {
|
|
|
20395
20916
|
* @param options - Optional request options.
|
|
20396
20917
|
* @returns The updated `Invitation`.
|
|
20397
20918
|
*/
|
|
20398
|
-
accept: async (id, options) => {
|
|
20919
|
+
accept: async (id, token, options) => {
|
|
20399
20920
|
return rb.execute(
|
|
20400
20921
|
patchInvitationsByIdAccept,
|
|
20401
20922
|
{
|
|
20402
20923
|
path: { id },
|
|
20403
|
-
body: {
|
|
20924
|
+
body: {
|
|
20925
|
+
data: { id, type: "invitation", attributes: { token } }
|
|
20926
|
+
}
|
|
20404
20927
|
},
|
|
20405
20928
|
options
|
|
20406
20929
|
);
|
|
@@ -20520,7 +21043,6 @@ function createPlatformNamespace(rb) {
|
|
|
20520
21043
|
options
|
|
20521
21044
|
);
|
|
20522
21045
|
},
|
|
20523
|
-
/**
|
|
20524
21046
|
/**
|
|
20525
21047
|
* Resend an invitation email with a refreshed token and new 7-day expiry.
|
|
20526
21048
|
*
|
|
@@ -20856,6 +21378,441 @@ function createPlatformNamespace(rb) {
|
|
|
20856
21378
|
);
|
|
20857
21379
|
}
|
|
20858
21380
|
}
|
|
21381
|
+
},
|
|
21382
|
+
/**
|
|
21383
|
+
* Brand Identities — visual branding configuration for tenants and workspaces.
|
|
21384
|
+
*
|
|
21385
|
+
* Brand identities define the visual appearance (colors, logos, fonts) applied
|
|
21386
|
+
* to tenant or workspace experiences. Each brand identity can be scoped to a
|
|
21387
|
+
* tenant or workspace, and one can be marked as the default at each scope level.
|
|
21388
|
+
*
|
|
21389
|
+
* Access via `client.platform.brandIdentities`.
|
|
21390
|
+
*/
|
|
21391
|
+
brandIdentities: {
|
|
21392
|
+
/**
|
|
21393
|
+
* List all brand identities accessible to the current actor.
|
|
21394
|
+
*
|
|
21395
|
+
* @param options - Optional page number, page size, and request options.
|
|
21396
|
+
* @returns A page of `BrandIdentity` records.
|
|
21397
|
+
*
|
|
21398
|
+
* @example
|
|
21399
|
+
* ```typescript
|
|
21400
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
21401
|
+
* const brands = await client.platform.brandIdentities.list();
|
|
21402
|
+
* brands.forEach(b => console.log(b.attributes?.name));
|
|
21403
|
+
* ```
|
|
21404
|
+
*/
|
|
21405
|
+
list: async (options) => {
|
|
21406
|
+
return rb.execute(
|
|
21407
|
+
getBrandIdentities,
|
|
21408
|
+
buildPageQuery(options?.page, options?.pageSize),
|
|
21409
|
+
options
|
|
21410
|
+
);
|
|
21411
|
+
},
|
|
21412
|
+
/**
|
|
21413
|
+
* Retrieve a single brand identity by its ID.
|
|
21414
|
+
*
|
|
21415
|
+
* @param id - The UUID of the brand identity.
|
|
21416
|
+
* @param options - Optional request options.
|
|
21417
|
+
* @returns The matching `BrandIdentity`.
|
|
21418
|
+
*
|
|
21419
|
+
* @example
|
|
21420
|
+
* ```typescript
|
|
21421
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
21422
|
+
* const brand = await client.platform.brandIdentities.get('bi_abc123');
|
|
21423
|
+
* console.log(brand.attributes?.name, brand.attributes?.primary_color);
|
|
21424
|
+
* ```
|
|
21425
|
+
*/
|
|
21426
|
+
get: async (id, options) => {
|
|
21427
|
+
return rb.execute(
|
|
21428
|
+
getBrandIdentitiesById,
|
|
21429
|
+
{ path: { id } },
|
|
21430
|
+
options
|
|
21431
|
+
);
|
|
21432
|
+
},
|
|
21433
|
+
/**
|
|
21434
|
+
* Create a new brand identity.
|
|
21435
|
+
*
|
|
21436
|
+
* Defines visual branding (colors, logos, fonts) scoped to a tenant or
|
|
21437
|
+
* workspace. Pass `tenant_id` or `workspace_id` to set the scope.
|
|
21438
|
+
*
|
|
21439
|
+
* @param attributes - Brand identity creation attributes. `name` is required.
|
|
21440
|
+
* @param options - Optional request options.
|
|
21441
|
+
* @returns The newly created `BrandIdentity`.
|
|
21442
|
+
*
|
|
21443
|
+
* @example
|
|
21444
|
+
* ```typescript
|
|
21445
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
21446
|
+
* const brand = await client.platform.brandIdentities.create({
|
|
21447
|
+
* name: 'Acme Healthcare',
|
|
21448
|
+
* primary_color: '#2563eb',
|
|
21449
|
+
* font_family: 'Inter',
|
|
21450
|
+
* tenant_id: 'tenant_abc123',
|
|
21451
|
+
* });
|
|
21452
|
+
* console.log(brand.id);
|
|
21453
|
+
* ```
|
|
21454
|
+
*/
|
|
21455
|
+
create: async (attributes, options) => {
|
|
21456
|
+
return rb.execute(
|
|
21457
|
+
postBrandIdentities,
|
|
21458
|
+
{ body: { data: { type: "brand_identity", attributes } } },
|
|
21459
|
+
options
|
|
21460
|
+
);
|
|
21461
|
+
},
|
|
21462
|
+
/**
|
|
21463
|
+
* Update a brand identity's attributes.
|
|
21464
|
+
*
|
|
21465
|
+
* @param id - The UUID of the brand identity to update.
|
|
21466
|
+
* @param attributes - Attribute map of fields to change.
|
|
21467
|
+
* @param options - Optional request options.
|
|
21468
|
+
* @returns The updated `BrandIdentity`.
|
|
21469
|
+
*
|
|
21470
|
+
* @example
|
|
21471
|
+
* ```typescript
|
|
21472
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
21473
|
+
* const brand = await client.platform.brandIdentities.update('bi_abc123', {
|
|
21474
|
+
* primary_color: '#dc2626',
|
|
21475
|
+
* tagline: 'Caring for you',
|
|
21476
|
+
* });
|
|
21477
|
+
* ```
|
|
21478
|
+
*/
|
|
21479
|
+
update: async (id, attributes, options) => {
|
|
21480
|
+
return rb.execute(
|
|
21481
|
+
patchBrandIdentitiesById,
|
|
21482
|
+
{
|
|
21483
|
+
path: { id },
|
|
21484
|
+
body: { data: { id, type: "brand_identity", attributes } }
|
|
21485
|
+
},
|
|
21486
|
+
options
|
|
21487
|
+
);
|
|
21488
|
+
},
|
|
21489
|
+
/**
|
|
21490
|
+
* Delete a brand identity.
|
|
21491
|
+
*
|
|
21492
|
+
* Permanently removes the brand identity. Any platform tones associated
|
|
21493
|
+
* with this brand identity should be deleted or reassigned first.
|
|
21494
|
+
*
|
|
21495
|
+
* @param id - The UUID of the brand identity to delete.
|
|
21496
|
+
* @param options - Optional request options.
|
|
21497
|
+
* @returns `true` on successful deletion.
|
|
21498
|
+
*
|
|
21499
|
+
* @example
|
|
21500
|
+
* ```typescript
|
|
21501
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
21502
|
+
* await client.platform.brandIdentities.delete('bi_abc123');
|
|
21503
|
+
* ```
|
|
21504
|
+
*/
|
|
21505
|
+
delete: async (id, options) => {
|
|
21506
|
+
return rb.executeDelete(
|
|
21507
|
+
deleteBrandIdentitiesById,
|
|
21508
|
+
{ path: { id } },
|
|
21509
|
+
options
|
|
21510
|
+
);
|
|
21511
|
+
},
|
|
21512
|
+
/**
|
|
21513
|
+
* List brand identities scoped to a specific tenant.
|
|
21514
|
+
*
|
|
21515
|
+
* @param tenantId - The UUID of the tenant.
|
|
21516
|
+
* @param options - Optional page number, page size, and request options.
|
|
21517
|
+
* @returns A page of `BrandIdentity` records for the tenant.
|
|
21518
|
+
*
|
|
21519
|
+
* @example
|
|
21520
|
+
* ```typescript
|
|
21521
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
21522
|
+
* const brands = await client.platform.brandIdentities.listByTenant('tenant_abc123');
|
|
21523
|
+
* ```
|
|
21524
|
+
*/
|
|
21525
|
+
listByTenant: async (tenantId, options) => {
|
|
21526
|
+
return rb.execute(
|
|
21527
|
+
getBrandIdentitiesByTenantByTenantId,
|
|
21528
|
+
{
|
|
21529
|
+
path: { tenant_id: tenantId },
|
|
21530
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
21531
|
+
},
|
|
21532
|
+
options
|
|
21533
|
+
);
|
|
21534
|
+
},
|
|
21535
|
+
/**
|
|
21536
|
+
* List brand identities scoped to a specific workspace.
|
|
21537
|
+
*
|
|
21538
|
+
* @param workspaceId - The UUID of the workspace.
|
|
21539
|
+
* @param options - Optional page number, page size, and request options.
|
|
21540
|
+
* @returns A page of `BrandIdentity` records for the workspace.
|
|
21541
|
+
*
|
|
21542
|
+
* @example
|
|
21543
|
+
* ```typescript
|
|
21544
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
21545
|
+
* const brands = await client.platform.brandIdentities.listByWorkspace('ws_abc123');
|
|
21546
|
+
* ```
|
|
21547
|
+
*/
|
|
21548
|
+
listByWorkspace: async (workspaceId, options) => {
|
|
21549
|
+
return rb.execute(
|
|
21550
|
+
getBrandIdentitiesByWorkspaceByWorkspaceId,
|
|
21551
|
+
{
|
|
21552
|
+
path: { workspace_id: workspaceId },
|
|
21553
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
21554
|
+
},
|
|
21555
|
+
options
|
|
21556
|
+
);
|
|
21557
|
+
},
|
|
21558
|
+
/**
|
|
21559
|
+
* Get the default brand identity for a tenant.
|
|
21560
|
+
*
|
|
21561
|
+
* Returns the brand identity marked as default for the given tenant,
|
|
21562
|
+
* or throws if none is set.
|
|
21563
|
+
*
|
|
21564
|
+
* @param tenantId - The UUID of the tenant.
|
|
21565
|
+
* @param options - Optional request options.
|
|
21566
|
+
* @returns The default `BrandIdentity` for the tenant.
|
|
21567
|
+
*
|
|
21568
|
+
* @example
|
|
21569
|
+
* ```typescript
|
|
21570
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
21571
|
+
* const defaultBrand = await client.platform.brandIdentities.getDefaultForTenant('tenant_abc123');
|
|
21572
|
+
* console.log(defaultBrand.attributes?.name);
|
|
21573
|
+
* ```
|
|
21574
|
+
*/
|
|
21575
|
+
getDefaultForTenant: async (tenantId, options) => {
|
|
21576
|
+
return rb.execute(
|
|
21577
|
+
getBrandIdentitiesDefaultTenantByTenantId,
|
|
21578
|
+
{ path: { tenant_id: tenantId } },
|
|
21579
|
+
options
|
|
21580
|
+
);
|
|
21581
|
+
},
|
|
21582
|
+
/**
|
|
21583
|
+
* Get the default brand identity for a workspace.
|
|
21584
|
+
*
|
|
21585
|
+
* Returns the brand identity marked as default for the given workspace,
|
|
21586
|
+
* or throws if none is set.
|
|
21587
|
+
*
|
|
21588
|
+
* @param workspaceId - The UUID of the workspace.
|
|
21589
|
+
* @param options - Optional request options.
|
|
21590
|
+
* @returns The default `BrandIdentity` for the workspace.
|
|
21591
|
+
*
|
|
21592
|
+
* @example
|
|
21593
|
+
* ```typescript
|
|
21594
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
21595
|
+
* const defaultBrand = await client.platform.brandIdentities.getDefaultForWorkspace('ws_abc123');
|
|
21596
|
+
* console.log(defaultBrand.attributes?.name);
|
|
21597
|
+
* ```
|
|
21598
|
+
*/
|
|
21599
|
+
getDefaultForWorkspace: async (workspaceId, options) => {
|
|
21600
|
+
return rb.execute(
|
|
21601
|
+
getBrandIdentitiesDefaultWorkspaceByWorkspaceId,
|
|
21602
|
+
{ path: { workspace_id: workspaceId } },
|
|
21603
|
+
options
|
|
21604
|
+
);
|
|
21605
|
+
},
|
|
21606
|
+
/**
|
|
21607
|
+
* Mark a brand identity as the default for its scope (tenant or workspace).
|
|
21608
|
+
*
|
|
21609
|
+
* If another brand identity was previously the default at this scope,
|
|
21610
|
+
* it is automatically unset.
|
|
21611
|
+
*
|
|
21612
|
+
* @param id - The UUID of the brand identity to set as default.
|
|
21613
|
+
* @param options - Optional request options.
|
|
21614
|
+
* @returns The updated `BrandIdentity` with `is_default` set to `true`.
|
|
21615
|
+
*
|
|
21616
|
+
* @example
|
|
21617
|
+
* ```typescript
|
|
21618
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
21619
|
+
* const brand = await client.platform.brandIdentities.setDefault('bi_abc123');
|
|
21620
|
+
* console.log(brand.attributes?.is_default); // true
|
|
21621
|
+
* ```
|
|
21622
|
+
*/
|
|
21623
|
+
setDefault: async (id, options) => {
|
|
21624
|
+
return rb.execute(
|
|
21625
|
+
patchBrandIdentitiesByIdSetDefault,
|
|
21626
|
+
{
|
|
21627
|
+
path: { id },
|
|
21628
|
+
body: { data: { id, type: "brand_identity", attributes: {} } }
|
|
21629
|
+
},
|
|
21630
|
+
options
|
|
21631
|
+
);
|
|
21632
|
+
},
|
|
21633
|
+
/**
|
|
21634
|
+
* Remove the default status from a brand identity.
|
|
21635
|
+
*
|
|
21636
|
+
* After this call, the scope (tenant or workspace) will have no default
|
|
21637
|
+
* brand identity until another is explicitly set.
|
|
21638
|
+
*
|
|
21639
|
+
* @param id - The UUID of the brand identity to unset as default.
|
|
21640
|
+
* @param options - Optional request options.
|
|
21641
|
+
* @returns The updated `BrandIdentity` with `is_default` set to `false`.
|
|
21642
|
+
*
|
|
21643
|
+
* @example
|
|
21644
|
+
* ```typescript
|
|
21645
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
21646
|
+
* const brand = await client.platform.brandIdentities.unsetDefault('bi_abc123');
|
|
21647
|
+
* console.log(brand.attributes?.is_default); // false
|
|
21648
|
+
* ```
|
|
21649
|
+
*/
|
|
21650
|
+
unsetDefault: async (id, options) => {
|
|
21651
|
+
return rb.execute(
|
|
21652
|
+
patchBrandIdentitiesByIdUnsetDefault,
|
|
21653
|
+
{
|
|
21654
|
+
path: { id },
|
|
21655
|
+
body: { data: { id, type: "brand_identity", attributes: {} } }
|
|
21656
|
+
},
|
|
21657
|
+
options
|
|
21658
|
+
);
|
|
21659
|
+
}
|
|
21660
|
+
},
|
|
21661
|
+
/**
|
|
21662
|
+
* Platform Tones — communication tone and style configuration.
|
|
21663
|
+
*
|
|
21664
|
+
* Platform tones define the voice, formality, and vocabulary preferences
|
|
21665
|
+
* used by AI-generated content within a brand identity context. Each tone
|
|
21666
|
+
* is associated with a brand identity and can be used to customize how
|
|
21667
|
+
* the platform communicates on behalf of the brand.
|
|
21668
|
+
*
|
|
21669
|
+
* Access via `client.platform.platformTones`.
|
|
21670
|
+
*/
|
|
21671
|
+
platformTones: {
|
|
21672
|
+
/**
|
|
21673
|
+
* List all platform tones accessible to the current actor.
|
|
21674
|
+
*
|
|
21675
|
+
* @param options - Optional page number, page size, and request options.
|
|
21676
|
+
* @returns A page of `PlatformTone` records.
|
|
21677
|
+
*
|
|
21678
|
+
* @example
|
|
21679
|
+
* ```typescript
|
|
21680
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
21681
|
+
* const tones = await client.platform.platformTones.list();
|
|
21682
|
+
* tones.forEach(t => console.log(t.attributes?.name));
|
|
21683
|
+
* ```
|
|
21684
|
+
*/
|
|
21685
|
+
list: async (options) => {
|
|
21686
|
+
return rb.execute(
|
|
21687
|
+
getPlatformTones,
|
|
21688
|
+
buildPageQuery(options?.page, options?.pageSize),
|
|
21689
|
+
options
|
|
21690
|
+
);
|
|
21691
|
+
},
|
|
21692
|
+
/**
|
|
21693
|
+
* Retrieve a single platform tone by its ID.
|
|
21694
|
+
*
|
|
21695
|
+
* @param id - The UUID of the platform tone.
|
|
21696
|
+
* @param options - Optional request options.
|
|
21697
|
+
* @returns The matching `PlatformTone`.
|
|
21698
|
+
*
|
|
21699
|
+
* @example
|
|
21700
|
+
* ```typescript
|
|
21701
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
21702
|
+
* const tone = await client.platform.platformTones.get('pt_abc123');
|
|
21703
|
+
* console.log(tone.attributes?.name, tone.attributes?.formality_level);
|
|
21704
|
+
* ```
|
|
21705
|
+
*/
|
|
21706
|
+
get: async (id, options) => {
|
|
21707
|
+
return rb.execute(
|
|
21708
|
+
getPlatformTonesById,
|
|
21709
|
+
{ path: { id } },
|
|
21710
|
+
options
|
|
21711
|
+
);
|
|
21712
|
+
},
|
|
21713
|
+
/**
|
|
21714
|
+
* Create a new platform tone.
|
|
21715
|
+
*
|
|
21716
|
+
* Defines tone and style preferences for AI-generated content within
|
|
21717
|
+
* the context of a brand identity. `brand_identity_id` is required to
|
|
21718
|
+
* associate the tone with the correct brand.
|
|
21719
|
+
*
|
|
21720
|
+
* @param attributes - Platform tone creation attributes. `name` and `brand_identity_id` are required.
|
|
21721
|
+
* @param options - Optional request options.
|
|
21722
|
+
* @returns The newly created `PlatformTone`.
|
|
21723
|
+
*
|
|
21724
|
+
* @example
|
|
21725
|
+
* ```typescript
|
|
21726
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
21727
|
+
* const tone = await client.platform.platformTones.create({
|
|
21728
|
+
* name: 'Professional',
|
|
21729
|
+
* brand_identity_id: 'bi_abc123',
|
|
21730
|
+
* formality_level: 'formal',
|
|
21731
|
+
* tone_style: 'authoritative',
|
|
21732
|
+
* });
|
|
21733
|
+
* console.log(tone.id);
|
|
21734
|
+
* ```
|
|
21735
|
+
*/
|
|
21736
|
+
create: async (attributes, options) => {
|
|
21737
|
+
return rb.execute(
|
|
21738
|
+
postPlatformTones,
|
|
21739
|
+
{ body: { data: { type: "platform_tone", attributes } } },
|
|
21740
|
+
options
|
|
21741
|
+
);
|
|
21742
|
+
},
|
|
21743
|
+
/**
|
|
21744
|
+
* Update a platform tone's attributes.
|
|
21745
|
+
*
|
|
21746
|
+
* @param id - The UUID of the platform tone to update.
|
|
21747
|
+
* @param attributes - Attribute map of fields to change.
|
|
21748
|
+
* @param options - Optional request options.
|
|
21749
|
+
* @returns The updated `PlatformTone`.
|
|
21750
|
+
*
|
|
21751
|
+
* @example
|
|
21752
|
+
* ```typescript
|
|
21753
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
21754
|
+
* const tone = await client.platform.platformTones.update('pt_abc123', {
|
|
21755
|
+
* formality_level: 'casual',
|
|
21756
|
+
* tone_style: 'friendly',
|
|
21757
|
+
* });
|
|
21758
|
+
* ```
|
|
21759
|
+
*/
|
|
21760
|
+
update: async (id, attributes, options) => {
|
|
21761
|
+
return rb.execute(
|
|
21762
|
+
patchPlatformTonesById,
|
|
21763
|
+
{
|
|
21764
|
+
path: { id },
|
|
21765
|
+
body: { data: { id, type: "platform_tone", attributes } }
|
|
21766
|
+
},
|
|
21767
|
+
options
|
|
21768
|
+
);
|
|
21769
|
+
},
|
|
21770
|
+
/**
|
|
21771
|
+
* Delete a platform tone.
|
|
21772
|
+
*
|
|
21773
|
+
* Permanently removes the platform tone.
|
|
21774
|
+
*
|
|
21775
|
+
* @param id - The UUID of the platform tone to delete.
|
|
21776
|
+
* @param options - Optional request options.
|
|
21777
|
+
* @returns `true` on successful deletion.
|
|
21778
|
+
*
|
|
21779
|
+
* @example
|
|
21780
|
+
* ```typescript
|
|
21781
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
21782
|
+
* await client.platform.platformTones.delete('pt_abc123');
|
|
21783
|
+
* ```
|
|
21784
|
+
*/
|
|
21785
|
+
delete: async (id, options) => {
|
|
21786
|
+
return rb.executeDelete(
|
|
21787
|
+
deletePlatformTonesById,
|
|
21788
|
+
{ path: { id } },
|
|
21789
|
+
options
|
|
21790
|
+
);
|
|
21791
|
+
},
|
|
21792
|
+
/**
|
|
21793
|
+
* List platform tones associated with a specific brand identity.
|
|
21794
|
+
*
|
|
21795
|
+
* @param brandIdentityId - The UUID of the brand identity.
|
|
21796
|
+
* @param options - Optional page number, page size, and request options.
|
|
21797
|
+
* @returns A page of `PlatformTone` records for the brand.
|
|
21798
|
+
*
|
|
21799
|
+
* @example
|
|
21800
|
+
* ```typescript
|
|
21801
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
21802
|
+
* const tones = await client.platform.platformTones.listByBrand('bi_abc123');
|
|
21803
|
+
* tones.forEach(t => console.log(t.attributes?.name));
|
|
21804
|
+
* ```
|
|
21805
|
+
*/
|
|
21806
|
+
listByBrand: async (brandIdentityId, options) => {
|
|
21807
|
+
return rb.execute(
|
|
21808
|
+
getPlatformTonesByBrandByBrandIdentityId,
|
|
21809
|
+
{
|
|
21810
|
+
path: { brand_identity_id: brandIdentityId },
|
|
21811
|
+
...buildPageQuery(options?.page, options?.pageSize)
|
|
21812
|
+
},
|
|
21813
|
+
options
|
|
21814
|
+
);
|
|
21815
|
+
}
|
|
20859
21816
|
}
|
|
20860
21817
|
};
|
|
20861
21818
|
}
|
|
@@ -23229,7 +24186,7 @@ function createThreadsNamespace(rb) {
|
|
|
23229
24186
|
path: { id: threadId },
|
|
23230
24187
|
body: {
|
|
23231
24188
|
data: {
|
|
23232
|
-
type: "
|
|
24189
|
+
type: "thread",
|
|
23233
24190
|
attributes: {
|
|
23234
24191
|
content,
|
|
23235
24192
|
...rest,
|