@productcraft/platform-auth 1.0.2 → 1.0.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/api.md +54 -54
- package/dist/index.cjs +55 -55
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +56 -56
- package/dist/index.d.ts +56 -56
- package/dist/index.js +55 -55
- package/dist/index.js.map +1 -1
- package/manifest.json +46 -46
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -213,7 +213,7 @@ var IntrospectWorkspacesResource = class extends APIResource {
|
|
|
213
213
|
* @see https://productcraft.co/docs/platform/api-reference#get-v1-introspect-workspaces-workspace-id
|
|
214
214
|
* @example
|
|
215
215
|
* ```ts
|
|
216
|
-
* const introspectWorkspace = await platform.introspect.workspaces.retrieve("
|
|
216
|
+
* const introspectWorkspace = await platform.introspect.workspaces.retrieve("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
|
|
217
217
|
* ```
|
|
218
218
|
*/
|
|
219
219
|
retrieve(workspaceId, options) {
|
|
@@ -309,7 +309,7 @@ var MeHiddenGuidesResource = class extends APIResource {
|
|
|
309
309
|
* @see https://productcraft.co/docs/platform/api-reference#put-v1-me-hidden-guides-key
|
|
310
310
|
* @example
|
|
311
311
|
* ```ts
|
|
312
|
-
* const hiddenGuide = await platform.me.hiddenGuides.hide("
|
|
312
|
+
* const hiddenGuide = await platform.me.hiddenGuides.hide("dashboard");
|
|
313
313
|
* ```
|
|
314
314
|
*/
|
|
315
315
|
hide(key, options) {
|
|
@@ -368,7 +368,7 @@ var MeHiddenGuidesResource = class extends APIResource {
|
|
|
368
368
|
* @see https://productcraft.co/docs/platform/api-reference#delete-v1-me-hidden-guides-key
|
|
369
369
|
* @example
|
|
370
370
|
* ```ts
|
|
371
|
-
* await platform.me.hiddenGuides.unhide("
|
|
371
|
+
* await platform.me.hiddenGuides.unhide("dashboard");
|
|
372
372
|
* ```
|
|
373
373
|
*/
|
|
374
374
|
unhide(key, options) {
|
|
@@ -442,7 +442,7 @@ var OauthConnectionsResource = class extends APIResource {
|
|
|
442
442
|
* @see https://productcraft.co/docs/platform/api-reference#delete-v1-oauth-connections-grant-id
|
|
443
443
|
* @example
|
|
444
444
|
* ```ts
|
|
445
|
-
* await platform.oauth.connections.delete("
|
|
445
|
+
* await platform.oauth.connections.delete("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
|
|
446
446
|
* ```
|
|
447
447
|
*/
|
|
448
448
|
delete(grantId, options) {
|
|
@@ -489,7 +489,7 @@ var OauthWorkspacesConnectionsResource = class extends APIResource {
|
|
|
489
489
|
* @see https://productcraft.co/docs/platform/api-reference#delete-v1-oauth-workspaces-workspace-id-connections-grant-id
|
|
490
490
|
* @example
|
|
491
491
|
* ```ts
|
|
492
|
-
* await platform.oauth.workspaces.connections.delete("
|
|
492
|
+
* await platform.oauth.workspaces.connections.delete("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
|
|
493
493
|
* ```
|
|
494
494
|
*/
|
|
495
495
|
delete(workspaceId, grantId, options) {
|
|
@@ -511,10 +511,10 @@ var OauthWorkspacesConnectionsResource = class extends APIResource {
|
|
|
511
511
|
* @see https://productcraft.co/docs/platform/api-reference#get-v1-oauth-workspaces-workspace-id-connections
|
|
512
512
|
* @example
|
|
513
513
|
* ```ts
|
|
514
|
-
* for await (const connection of platform.oauth.workspaces.connections.list("
|
|
514
|
+
* for await (const connection of platform.oauth.workspaces.connections.list("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f")) {
|
|
515
515
|
* console.log(connection);
|
|
516
516
|
* }
|
|
517
|
-
* const page = await platform.oauth.workspaces.connections.list("
|
|
517
|
+
* const page = await platform.oauth.workspaces.connections.list("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", {}, { timeout: 5_000 });
|
|
518
518
|
* ```
|
|
519
519
|
*/
|
|
520
520
|
list(workspaceId, params, options) {
|
|
@@ -537,7 +537,7 @@ var OauthWorkspacesConnectionsResource = class extends APIResource {
|
|
|
537
537
|
* @see https://productcraft.co/docs/platform/api-reference#post-v1-oauth-workspaces-workspace-id-connections-grant-id-restore
|
|
538
538
|
* @example
|
|
539
539
|
* ```ts
|
|
540
|
-
* await platform.oauth.workspaces.connections.restore("
|
|
540
|
+
* await platform.oauth.workspaces.connections.restore("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
|
|
541
541
|
* ```
|
|
542
542
|
*/
|
|
543
543
|
restore(workspaceId, grantId, options) {
|
|
@@ -574,7 +574,7 @@ var SessionsResource = class extends APIResource {
|
|
|
574
574
|
* @see https://productcraft.co/docs/platform/api-reference#delete-v1-session-id
|
|
575
575
|
* @example
|
|
576
576
|
* ```ts
|
|
577
|
-
* const revokeSession = await platform.sessions.delete("
|
|
577
|
+
* const revokeSession = await platform.sessions.delete("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
|
|
578
578
|
* ```
|
|
579
579
|
*/
|
|
580
580
|
delete(id, options) {
|
|
@@ -723,7 +723,7 @@ var WorkspacesApiKeysPresetsResource = class extends APIResource {
|
|
|
723
723
|
* @see https://productcraft.co/docs/platform/api-reference#get-v1-workspaces-workspace-slug-api-keys-presets
|
|
724
724
|
* @example
|
|
725
725
|
* ```ts
|
|
726
|
-
* for await (const preset of platform.workspaces.apiKeys.presets.list("
|
|
726
|
+
* for await (const preset of platform.workspaces.apiKeys.presets.list("acme")) {
|
|
727
727
|
* console.log(preset);
|
|
728
728
|
* }
|
|
729
729
|
* ```
|
|
@@ -753,7 +753,7 @@ var WorkspacesApiKeysResource = class extends APIResource {
|
|
|
753
753
|
* @see https://productcraft.co/docs/platform/api-reference#post-v1-workspaces-workspace-slug-api-keys
|
|
754
754
|
* @example
|
|
755
755
|
* ```ts
|
|
756
|
-
* const mintPak = await platform.workspaces.apiKeys.create("
|
|
756
|
+
* const mintPak = await platform.workspaces.apiKeys.create("acme", { name: "Production social client" });
|
|
757
757
|
* ```
|
|
758
758
|
*/
|
|
759
759
|
create(workspaceSlug, params, options) {
|
|
@@ -775,7 +775,7 @@ var WorkspacesApiKeysResource = class extends APIResource {
|
|
|
775
775
|
* @see https://productcraft.co/docs/platform/api-reference#delete-v1-workspaces-workspace-slug-api-keys-id
|
|
776
776
|
* @example
|
|
777
777
|
* ```ts
|
|
778
|
-
* await platform.workspaces.apiKeys.delete("
|
|
778
|
+
* await platform.workspaces.apiKeys.delete("acme", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
|
|
779
779
|
* ```
|
|
780
780
|
*/
|
|
781
781
|
delete(workspaceSlug, id, params, options) {
|
|
@@ -798,10 +798,10 @@ var WorkspacesApiKeysResource = class extends APIResource {
|
|
|
798
798
|
* @see https://productcraft.co/docs/platform/api-reference#get-v1-workspaces-workspace-slug-api-keys
|
|
799
799
|
* @example
|
|
800
800
|
* ```ts
|
|
801
|
-
* for await (const apiKey of platform.workspaces.apiKeys.list("
|
|
801
|
+
* for await (const apiKey of platform.workspaces.apiKeys.list("acme")) {
|
|
802
802
|
* console.log(apiKey);
|
|
803
803
|
* }
|
|
804
|
-
* const page = await platform.workspaces.apiKeys.list("
|
|
804
|
+
* const page = await platform.workspaces.apiKeys.list("acme", {}, { timeout: 5_000 });
|
|
805
805
|
* ```
|
|
806
806
|
*/
|
|
807
807
|
list(workspaceSlug, params, options) {
|
|
@@ -822,7 +822,7 @@ var WorkspacesApiKeysResource = class extends APIResource {
|
|
|
822
822
|
* @see https://productcraft.co/docs/platform/api-reference#post-v1-workspaces-workspace-slug-api-keys-preview
|
|
823
823
|
* @example
|
|
824
824
|
* ```ts
|
|
825
|
-
* const pakGrantPreview = await platform.workspaces.apiKeys.preview("
|
|
825
|
+
* const pakGrantPreview = await platform.workspaces.apiKeys.preview("acme", { policy_ids: ["11111111-1111-1111-1111-111111111111"] });
|
|
826
826
|
* ```
|
|
827
827
|
*/
|
|
828
828
|
preview(workspaceSlug, params, options) {
|
|
@@ -843,7 +843,7 @@ var WorkspacesApiKeysResource = class extends APIResource {
|
|
|
843
843
|
* @see https://productcraft.co/docs/platform/api-reference#get-v1-workspaces-workspace-slug-api-keys-id
|
|
844
844
|
* @example
|
|
845
845
|
* ```ts
|
|
846
|
-
* const publicApiKey = await platform.workspaces.apiKeys.retrieve("
|
|
846
|
+
* const publicApiKey = await platform.workspaces.apiKeys.retrieve("acme", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
|
|
847
847
|
* ```
|
|
848
848
|
*/
|
|
849
849
|
retrieve(workspaceSlug, id, options) {
|
|
@@ -865,7 +865,7 @@ var WorkspacesApiKeysResource = class extends APIResource {
|
|
|
865
865
|
* @see https://productcraft.co/docs/platform/api-reference#post-v1-workspaces-workspace-slug-api-keys-id-rotate
|
|
866
866
|
* @example
|
|
867
867
|
* ```ts
|
|
868
|
-
* const rotatePak = await platform.workspaces.apiKeys.rotate("
|
|
868
|
+
* const rotatePak = await platform.workspaces.apiKeys.rotate("acme", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", { grace_hours: 24 });
|
|
869
869
|
* ```
|
|
870
870
|
*/
|
|
871
871
|
rotate(workspaceSlug, id, params, options) {
|
|
@@ -888,7 +888,7 @@ var WorkspacesApiKeysResource = class extends APIResource {
|
|
|
888
888
|
* @see https://productcraft.co/docs/platform/api-reference#patch-v1-workspaces-workspace-slug-api-keys-id
|
|
889
889
|
* @example
|
|
890
890
|
* ```ts
|
|
891
|
-
* const publicApiKey = await platform.workspaces.apiKeys.update("
|
|
891
|
+
* const publicApiKey = await platform.workspaces.apiKeys.update("acme", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", { description: "string" });
|
|
892
892
|
* ```
|
|
893
893
|
*/
|
|
894
894
|
update(workspaceSlug, id, params, options) {
|
|
@@ -911,7 +911,7 @@ var WorkspacesApiKeysResource = class extends APIResource {
|
|
|
911
911
|
* @see https://productcraft.co/docs/platform/api-reference#patch-v1-workspaces-workspace-slug-api-keys-id-bindings
|
|
912
912
|
* @example
|
|
913
913
|
* ```ts
|
|
914
|
-
* const publicApiKey = await platform.workspaces.apiKeys.updateBindings("
|
|
914
|
+
* const publicApiKey = await platform.workspaces.apiKeys.updateBindings("acme", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", { policy_ids: ["string"] });
|
|
915
915
|
* ```
|
|
916
916
|
*/
|
|
917
917
|
updateBindings(workspaceSlug, id, params, options) {
|
|
@@ -936,10 +936,10 @@ var WorkspacesAuditFeedResource = class extends APIResource {
|
|
|
936
936
|
* @see https://productcraft.co/docs/platform/api-reference#get-v1-workspaces-workspace-slug-audit-feed
|
|
937
937
|
* @example
|
|
938
938
|
* ```ts
|
|
939
|
-
* for await (const auditFeed of platform.workspaces.auditFeed.list("
|
|
939
|
+
* for await (const auditFeed of platform.workspaces.auditFeed.list("acme")) {
|
|
940
940
|
* console.log(auditFeed);
|
|
941
941
|
* }
|
|
942
|
-
* const page = await platform.workspaces.auditFeed.list("
|
|
942
|
+
* const page = await platform.workspaces.auditFeed.list("acme", {}, { timeout: 5_000 });
|
|
943
943
|
* ```
|
|
944
944
|
*/
|
|
945
945
|
list(workspaceSlug, params, options) {
|
|
@@ -965,7 +965,7 @@ var WorkspacesAuditLogsResource = class extends APIResource {
|
|
|
965
965
|
* @see https://productcraft.co/docs/platform/api-reference#get-v1-workspaces-workspace-slug-audit-logs-export
|
|
966
966
|
* @example
|
|
967
967
|
* ```ts
|
|
968
|
-
* const response = await platform.workspaces.auditLogs.export("
|
|
968
|
+
* const response = await platform.workspaces.auditLogs.export("acme");
|
|
969
969
|
* const text = await response.text();
|
|
970
970
|
* ```
|
|
971
971
|
*/
|
|
@@ -985,10 +985,10 @@ var WorkspacesAuditLogsResource = class extends APIResource {
|
|
|
985
985
|
* @see https://productcraft.co/docs/platform/api-reference#get-v1-workspaces-workspace-slug-audit-logs
|
|
986
986
|
* @example
|
|
987
987
|
* ```ts
|
|
988
|
-
* for await (const auditLog of platform.workspaces.auditLogs.list("
|
|
988
|
+
* for await (const auditLog of platform.workspaces.auditLogs.list("acme")) {
|
|
989
989
|
* console.log(auditLog);
|
|
990
990
|
* }
|
|
991
|
-
* const page = await platform.workspaces.auditLogs.list("
|
|
991
|
+
* const page = await platform.workspaces.auditLogs.list("acme", {}, { timeout: 5_000 });
|
|
992
992
|
* ```
|
|
993
993
|
*/
|
|
994
994
|
list(workspaceSlug, params, options) {
|
|
@@ -1009,7 +1009,7 @@ var WorkspacesAvatarResource = class extends APIResource {
|
|
|
1009
1009
|
* @see https://productcraft.co/docs/platform/api-reference#delete-v1-workspaces-workspace-slug-avatar
|
|
1010
1010
|
* @example
|
|
1011
1011
|
* ```ts
|
|
1012
|
-
* await platform.workspaces.avatar.clear("
|
|
1012
|
+
* await platform.workspaces.avatar.clear("acme");
|
|
1013
1013
|
* ```
|
|
1014
1014
|
*/
|
|
1015
1015
|
clear(workspaceSlug, options) {
|
|
@@ -1028,7 +1028,7 @@ var WorkspacesAvatarResource = class extends APIResource {
|
|
|
1028
1028
|
* @see https://productcraft.co/docs/platform/api-reference#post-v1-workspaces-workspace-slug-avatar
|
|
1029
1029
|
* @example
|
|
1030
1030
|
* ```ts
|
|
1031
|
-
* const workspaceAvatarUrl = await platform.workspaces.avatar.upload("
|
|
1031
|
+
* const workspaceAvatarUrl = await platform.workspaces.avatar.upload("acme", { file: new File(["…"], "image.png", { type: "image/png" }) });
|
|
1032
1032
|
* ```
|
|
1033
1033
|
*/
|
|
1034
1034
|
upload(workspaceSlug, params, options) {
|
|
@@ -1074,7 +1074,7 @@ var WorkspacesInvitesResource = class extends APIResource {
|
|
|
1074
1074
|
* @see https://productcraft.co/docs/platform/api-reference#post-v1-workspaces-workspace-slug-invites
|
|
1075
1075
|
* @example
|
|
1076
1076
|
* ```ts
|
|
1077
|
-
* const workspaceInvite = await platform.workspaces.invites.create("
|
|
1077
|
+
* const workspaceInvite = await platform.workspaces.invites.create("acme", { email: "alice@example.com" });
|
|
1078
1078
|
* ```
|
|
1079
1079
|
*/
|
|
1080
1080
|
create(workspaceSlug, params, options) {
|
|
@@ -1094,7 +1094,7 @@ var WorkspacesInvitesResource = class extends APIResource {
|
|
|
1094
1094
|
* @see https://productcraft.co/docs/platform/api-reference#delete-v1-workspaces-workspace-slug-invites-invite-id
|
|
1095
1095
|
* @example
|
|
1096
1096
|
* ```ts
|
|
1097
|
-
* await platform.workspaces.invites.delete("
|
|
1097
|
+
* await platform.workspaces.invites.delete("acme", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
|
|
1098
1098
|
* ```
|
|
1099
1099
|
*/
|
|
1100
1100
|
delete(workspaceSlug, inviteId, options) {
|
|
@@ -1115,10 +1115,10 @@ var WorkspacesInvitesResource = class extends APIResource {
|
|
|
1115
1115
|
* @see https://productcraft.co/docs/platform/api-reference#get-v1-workspaces-workspace-slug-invites
|
|
1116
1116
|
* @example
|
|
1117
1117
|
* ```ts
|
|
1118
|
-
* for await (const invite of platform.workspaces.invites.list("
|
|
1118
|
+
* for await (const invite of platform.workspaces.invites.list("acme")) {
|
|
1119
1119
|
* console.log(invite);
|
|
1120
1120
|
* }
|
|
1121
|
-
* const page = await platform.workspaces.invites.list("
|
|
1121
|
+
* const page = await platform.workspaces.invites.list("acme", {}, { timeout: 5_000 });
|
|
1122
1122
|
* ```
|
|
1123
1123
|
*/
|
|
1124
1124
|
list(workspaceSlug, params, options) {
|
|
@@ -1141,7 +1141,7 @@ var WorkspacesMembersResource = class extends APIResource {
|
|
|
1141
1141
|
* @see https://productcraft.co/docs/platform/api-reference#delete-v1-workspaces-workspace-slug-members-account-id
|
|
1142
1142
|
* @example
|
|
1143
1143
|
* ```ts
|
|
1144
|
-
* await platform.workspaces.members.delete("
|
|
1144
|
+
* await platform.workspaces.members.delete("acme", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
|
|
1145
1145
|
* ```
|
|
1146
1146
|
*/
|
|
1147
1147
|
delete(workspaceSlug, accountId, options) {
|
|
@@ -1162,10 +1162,10 @@ var WorkspacesMembersResource = class extends APIResource {
|
|
|
1162
1162
|
* @see https://productcraft.co/docs/platform/api-reference#get-v1-workspaces-workspace-slug-members
|
|
1163
1163
|
* @example
|
|
1164
1164
|
* ```ts
|
|
1165
|
-
* for await (const member of platform.workspaces.members.list("
|
|
1165
|
+
* for await (const member of platform.workspaces.members.list("acme")) {
|
|
1166
1166
|
* console.log(member);
|
|
1167
1167
|
* }
|
|
1168
|
-
* const page = await platform.workspaces.members.list("
|
|
1168
|
+
* const page = await platform.workspaces.members.list("acme", {}, { timeout: 5_000 });
|
|
1169
1169
|
* ```
|
|
1170
1170
|
*/
|
|
1171
1171
|
list(workspaceSlug, params, options) {
|
|
@@ -1188,7 +1188,7 @@ var WorkspacesMembersResource = class extends APIResource {
|
|
|
1188
1188
|
* @see https://productcraft.co/docs/platform/api-reference#patch-v1-workspaces-workspace-slug-members-account-id-role
|
|
1189
1189
|
* @example
|
|
1190
1190
|
* ```ts
|
|
1191
|
-
* const updateMemberRole = await platform.workspaces.members.updateRole("
|
|
1191
|
+
* const updateMemberRole = await platform.workspaces.members.updateRole("acme", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", { role: "owner" });
|
|
1192
1192
|
* ```
|
|
1193
1193
|
*/
|
|
1194
1194
|
updateRole(workspaceSlug, accountId, params, options) {
|
|
@@ -1209,7 +1209,7 @@ var WorkspacesPoliciesActionsResource = class extends APIResource {
|
|
|
1209
1209
|
* @see https://productcraft.co/docs/platform/api-reference#get-v1-workspaces-workspace-slug-policies-actions-catalog
|
|
1210
1210
|
* @example
|
|
1211
1211
|
* ```ts
|
|
1212
|
-
* const workspaceActionCatalog = await platform.workspaces.policies.actions.catalog("
|
|
1212
|
+
* const workspaceActionCatalog = await platform.workspaces.policies.actions.catalog("acme");
|
|
1213
1213
|
* ```
|
|
1214
1214
|
*/
|
|
1215
1215
|
catalog(workspaceSlug, options) {
|
|
@@ -1236,7 +1236,7 @@ var WorkspacesPoliciesResource = class extends APIResource {
|
|
|
1236
1236
|
* @see https://productcraft.co/docs/platform/api-reference#post-v1-workspaces-workspace-slug-policies
|
|
1237
1237
|
* @example
|
|
1238
1238
|
* ```ts
|
|
1239
|
-
* const managedPolicy = await platform.workspaces.policies.create("
|
|
1239
|
+
* const managedPolicy = await platform.workspaces.policies.create("acme", {
|
|
1240
1240
|
* name: "mail-readonly",
|
|
1241
1241
|
* policy: [{ actions: ["mail.read", "mail.list"], effect: "allow", resources: ["*"] }],
|
|
1242
1242
|
* });
|
|
@@ -1259,7 +1259,7 @@ var WorkspacesPoliciesResource = class extends APIResource {
|
|
|
1259
1259
|
* @see https://productcraft.co/docs/platform/api-reference#delete-v1-workspaces-workspace-slug-policies-policy-id
|
|
1260
1260
|
* @example
|
|
1261
1261
|
* ```ts
|
|
1262
|
-
* const managedPolicyDeleted = await platform.workspaces.policies.delete("
|
|
1262
|
+
* const managedPolicyDeleted = await platform.workspaces.policies.delete("acme", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
|
|
1263
1263
|
* ```
|
|
1264
1264
|
*/
|
|
1265
1265
|
delete(workspaceSlug, policyId, options) {
|
|
@@ -1278,10 +1278,10 @@ var WorkspacesPoliciesResource = class extends APIResource {
|
|
|
1278
1278
|
* @see https://productcraft.co/docs/platform/api-reference#get-v1-workspaces-workspace-slug-policies
|
|
1279
1279
|
* @example
|
|
1280
1280
|
* ```ts
|
|
1281
|
-
* for await (const policy of platform.workspaces.policies.list("
|
|
1281
|
+
* for await (const policy of platform.workspaces.policies.list("acme")) {
|
|
1282
1282
|
* console.log(policy);
|
|
1283
1283
|
* }
|
|
1284
|
-
* const page = await platform.workspaces.policies.list("
|
|
1284
|
+
* const page = await platform.workspaces.policies.list("acme", {}, { timeout: 5_000 });
|
|
1285
1285
|
* ```
|
|
1286
1286
|
*/
|
|
1287
1287
|
list(workspaceSlug, params, options) {
|
|
@@ -1300,7 +1300,7 @@ var WorkspacesPoliciesResource = class extends APIResource {
|
|
|
1300
1300
|
* @see https://productcraft.co/docs/platform/api-reference#get-v1-workspaces-workspace-slug-policies-policy-id
|
|
1301
1301
|
* @example
|
|
1302
1302
|
* ```ts
|
|
1303
|
-
* const managedPolicyDetail = await platform.workspaces.policies.retrieve("
|
|
1303
|
+
* const managedPolicyDetail = await platform.workspaces.policies.retrieve("acme", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
|
|
1304
1304
|
* ```
|
|
1305
1305
|
*/
|
|
1306
1306
|
retrieve(workspaceSlug, policyId, options) {
|
|
@@ -1323,7 +1323,7 @@ var WorkspacesPoliciesResource = class extends APIResource {
|
|
|
1323
1323
|
* @see https://productcraft.co/docs/platform/api-reference#patch-v1-workspaces-workspace-slug-policies-policy-id
|
|
1324
1324
|
* @example
|
|
1325
1325
|
* ```ts
|
|
1326
|
-
* const managedPolicyDetail = await platform.workspaces.policies.update("
|
|
1326
|
+
* const managedPolicyDetail = await platform.workspaces.policies.update("acme", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", { description: "Read-only access to all Mail resources" });
|
|
1327
1327
|
* ```
|
|
1328
1328
|
*/
|
|
1329
1329
|
update(workspaceSlug, policyId, params, options) {
|
|
@@ -1347,7 +1347,7 @@ var WorkspacesRolesResource = class extends APIResource {
|
|
|
1347
1347
|
* @see https://productcraft.co/docs/platform/api-reference#post-v1-workspaces-workspace-slug-roles
|
|
1348
1348
|
* @example
|
|
1349
1349
|
* ```ts
|
|
1350
|
-
* const workspaceRole = await platform.workspaces.roles.create("
|
|
1350
|
+
* const workspaceRole = await platform.workspaces.roles.create("acme", { name: "BillingAdmin" });
|
|
1351
1351
|
* ```
|
|
1352
1352
|
*/
|
|
1353
1353
|
create(workspaceSlug, params, options) {
|
|
@@ -1369,7 +1369,7 @@ var WorkspacesRolesResource = class extends APIResource {
|
|
|
1369
1369
|
* @see https://productcraft.co/docs/platform/api-reference#delete-v1-workspaces-workspace-slug-roles-role-id
|
|
1370
1370
|
* @example
|
|
1371
1371
|
* ```ts
|
|
1372
|
-
* await platform.workspaces.roles.delete("
|
|
1372
|
+
* await platform.workspaces.roles.delete("acme", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
|
|
1373
1373
|
* ```
|
|
1374
1374
|
*/
|
|
1375
1375
|
delete(workspaceSlug, roleId, options) {
|
|
@@ -1388,10 +1388,10 @@ var WorkspacesRolesResource = class extends APIResource {
|
|
|
1388
1388
|
* @see https://productcraft.co/docs/platform/api-reference#get-v1-workspaces-workspace-slug-roles
|
|
1389
1389
|
* @example
|
|
1390
1390
|
* ```ts
|
|
1391
|
-
* for await (const role of platform.workspaces.roles.list("
|
|
1391
|
+
* for await (const role of platform.workspaces.roles.list("acme")) {
|
|
1392
1392
|
* console.log(role);
|
|
1393
1393
|
* }
|
|
1394
|
-
* const page = await platform.workspaces.roles.list("
|
|
1394
|
+
* const page = await platform.workspaces.roles.list("acme", {}, { timeout: 5_000 });
|
|
1395
1395
|
* ```
|
|
1396
1396
|
*/
|
|
1397
1397
|
list(workspaceSlug, params, options) {
|
|
@@ -1412,7 +1412,7 @@ var WorkspacesRolesResource = class extends APIResource {
|
|
|
1412
1412
|
* @see https://productcraft.co/docs/platform/api-reference#get-v1-workspaces-workspace-slug-roles-role-id
|
|
1413
1413
|
* @example
|
|
1414
1414
|
* ```ts
|
|
1415
|
-
* const workspaceRole = await platform.workspaces.roles.retrieve("
|
|
1415
|
+
* const workspaceRole = await platform.workspaces.roles.retrieve("acme", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
|
|
1416
1416
|
* ```
|
|
1417
1417
|
*/
|
|
1418
1418
|
retrieve(workspaceSlug, roleId, options) {
|
|
@@ -1435,7 +1435,7 @@ var WorkspacesRolesResource = class extends APIResource {
|
|
|
1435
1435
|
* @see https://productcraft.co/docs/platform/api-reference#patch-v1-workspaces-workspace-slug-roles-role-id
|
|
1436
1436
|
* @example
|
|
1437
1437
|
* ```ts
|
|
1438
|
-
* const workspaceRole = await platform.workspaces.roles.update("
|
|
1438
|
+
* const workspaceRole = await platform.workspaces.roles.update("acme", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", { description: "string" });
|
|
1439
1439
|
* ```
|
|
1440
1440
|
*/
|
|
1441
1441
|
update(workspaceSlug, roleId, params, options) {
|
|
@@ -1459,7 +1459,7 @@ var WorkspacesServicesResource = class extends APIResource {
|
|
|
1459
1459
|
* @see https://productcraft.co/docs/platform/api-reference#delete-v1-workspaces-workspace-slug-services-service
|
|
1460
1460
|
* @example
|
|
1461
1461
|
* ```ts
|
|
1462
|
-
* await platform.workspaces.services.disable("
|
|
1462
|
+
* await platform.workspaces.services.disable("acme", "mail");
|
|
1463
1463
|
* ```
|
|
1464
1464
|
*/
|
|
1465
1465
|
disable(workspaceSlug, service, options) {
|
|
@@ -1481,7 +1481,7 @@ var WorkspacesServicesResource = class extends APIResource {
|
|
|
1481
1481
|
* @see https://productcraft.co/docs/platform/api-reference#post-v1-workspaces-workspace-slug-services-service
|
|
1482
1482
|
* @example
|
|
1483
1483
|
* ```ts
|
|
1484
|
-
* const workspaceServiceState = await platform.workspaces.services.enable("
|
|
1484
|
+
* const workspaceServiceState = await platform.workspaces.services.enable("acme", "mail", { settings: {} });
|
|
1485
1485
|
* ```
|
|
1486
1486
|
*/
|
|
1487
1487
|
enable(workspaceSlug, service, params, options) {
|
|
@@ -1500,7 +1500,7 @@ var WorkspacesServicesResource = class extends APIResource {
|
|
|
1500
1500
|
* @see https://productcraft.co/docs/platform/api-reference#get-v1-workspaces-workspace-slug-services
|
|
1501
1501
|
* @example
|
|
1502
1502
|
* ```ts
|
|
1503
|
-
* const listWorkspaceServices = await platform.workspaces.services.list("
|
|
1503
|
+
* const listWorkspaceServices = await platform.workspaces.services.list("acme");
|
|
1504
1504
|
* ```
|
|
1505
1505
|
*/
|
|
1506
1506
|
list(workspaceSlug, options) {
|
|
@@ -1522,7 +1522,7 @@ var WorkspacesServicesResource = class extends APIResource {
|
|
|
1522
1522
|
* @see https://productcraft.co/docs/platform/api-reference#patch-v1-workspaces-workspace-slug-services-service-settings
|
|
1523
1523
|
* @example
|
|
1524
1524
|
* ```ts
|
|
1525
|
-
* const workspaceServiceState = await platform.workspaces.services.updateSettings("
|
|
1525
|
+
* const workspaceServiceState = await platform.workspaces.services.updateSettings("acme", "mail", { default_sender: "noreply@acme.com" });
|
|
1526
1526
|
* ```
|
|
1527
1527
|
*/
|
|
1528
1528
|
updateSettings(workspaceSlug, service, params, options) {
|
|
@@ -1597,7 +1597,7 @@ var WorkspacesResource = class extends APIResource {
|
|
|
1597
1597
|
* @see https://productcraft.co/docs/platform/api-reference#delete-v1-workspaces-workspace-slug
|
|
1598
1598
|
* @example
|
|
1599
1599
|
* ```ts
|
|
1600
|
-
* await platform.workspaces.delete("
|
|
1600
|
+
* await platform.workspaces.delete("acme");
|
|
1601
1601
|
* ```
|
|
1602
1602
|
*/
|
|
1603
1603
|
delete(workspaceSlug, options) {
|
|
@@ -1637,7 +1637,7 @@ var WorkspacesResource = class extends APIResource {
|
|
|
1637
1637
|
* @see https://productcraft.co/docs/platform/api-reference#get-v1-workspaces-workspace-slug
|
|
1638
1638
|
* @example
|
|
1639
1639
|
* ```ts
|
|
1640
|
-
* const workspace = await platform.workspaces.retrieve("
|
|
1640
|
+
* const workspace = await platform.workspaces.retrieve("acme");
|
|
1641
1641
|
* ```
|
|
1642
1642
|
*/
|
|
1643
1643
|
retrieve(workspaceSlug, options) {
|
|
@@ -1658,7 +1658,7 @@ var WorkspacesResource = class extends APIResource {
|
|
|
1658
1658
|
* @see https://productcraft.co/docs/platform/api-reference#patch-v1-workspaces-workspace-slug
|
|
1659
1659
|
* @example
|
|
1660
1660
|
* ```ts
|
|
1661
|
-
* const workspace = await platform.workspaces.update("
|
|
1661
|
+
* const workspace = await platform.workspaces.update("acme", { display_name: "string" });
|
|
1662
1662
|
* ```
|
|
1663
1663
|
*/
|
|
1664
1664
|
update(workspaceSlug, params, options) {
|
|
@@ -1724,7 +1724,7 @@ var StatsMetric = { values: ["audit_events"] };
|
|
|
1724
1724
|
var StatsWindow = { values: ["1d", "7d", "30d"] };
|
|
1725
1725
|
|
|
1726
1726
|
// src/_generated/client.ts
|
|
1727
|
-
var VERSION = "1.0.
|
|
1727
|
+
var VERSION = "1.0.3" ;
|
|
1728
1728
|
exports.default = class PlatformAuth extends PlatformAuthResources {
|
|
1729
1729
|
#openapi;
|
|
1730
1730
|
constructor(options = {}) {
|