@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/dist/index.d.ts CHANGED
@@ -9625,8 +9625,8 @@ interface operations {
9625
9625
 
9626
9626
  type IsUnion<T, U = T> = T extends unknown ? ([U] extends [T] ? false : true) : never;
9627
9627
  type OpenString<T extends string> = string extends T ? T : true extends IsUnion<T> ? T | (string & {}) : T;
9628
- type OpenValue<T> = [T] extends [string] ? OpenString<T> : T extends readonly (infer I)[] ? Open<I>[] : T extends object ? {
9629
- [K in keyof T]: Open<T[K]>;
9628
+ type OpenValue<T> = [T] extends [string] ? OpenString<T> : T extends readonly (infer I)[] ? (OpenValue<Exclude<I, null | undefined>> | Extract<I, null | undefined>)[] : T extends object ? {
9629
+ [K in keyof T]: OpenValue<Exclude<T[K], null | undefined>> | Extract<T[K], null | undefined>;
9630
9630
  } : T;
9631
9631
  /** A response type: string-literal unions also accept values added after this SDK was built. */
9632
9632
  type Open<T> = OpenValue<Exclude<T, null | undefined>> | Extract<T, null | undefined>;
@@ -9993,7 +9993,7 @@ declare class IntrospectWorkspacesResource extends APIResource {
9993
9993
  * @see https://productcraft.co/docs/platform/api-reference#get-v1-introspect-workspaces-workspace-id
9994
9994
  * @example
9995
9995
  * ```ts
9996
- * const introspectWorkspace = await platform.introspect.workspaces.retrieve("workspace");
9996
+ * const introspectWorkspace = await platform.introspect.workspaces.retrieve("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
9997
9997
  * ```
9998
9998
  */
9999
9999
  retrieve(workspaceId: string, options?: RequestOptions): APIPromise<WithLastResponse<IntrospectWorkspace>>;
@@ -10080,7 +10080,7 @@ declare class MeHiddenGuidesResource extends APIResource {
10080
10080
  * @see https://productcraft.co/docs/platform/api-reference#put-v1-me-hidden-guides-key
10081
10081
  * @example
10082
10082
  * ```ts
10083
- * const hiddenGuide = await platform.me.hiddenGuides.hide("key");
10083
+ * const hiddenGuide = await platform.me.hiddenGuides.hide("dashboard");
10084
10084
  * ```
10085
10085
  */
10086
10086
  hide(key: string, options?: RequestOptions): APIPromise<WithLastResponse<HiddenGuide>>;
@@ -10133,7 +10133,7 @@ declare class MeHiddenGuidesResource extends APIResource {
10133
10133
  * @see https://productcraft.co/docs/platform/api-reference#delete-v1-me-hidden-guides-key
10134
10134
  * @example
10135
10135
  * ```ts
10136
- * await platform.me.hiddenGuides.unhide("key");
10136
+ * await platform.me.hiddenGuides.unhide("dashboard");
10137
10137
  * ```
10138
10138
  */
10139
10139
  unhide(key: string, options?: RequestOptions): APIPromise<void>;
@@ -10196,7 +10196,7 @@ declare class OauthConnectionsResource extends APIResource {
10196
10196
  * @see https://productcraft.co/docs/platform/api-reference#delete-v1-oauth-connections-grant-id
10197
10197
  * @example
10198
10198
  * ```ts
10199
- * await platform.oauth.connections.delete("3f0c1a2b-4c5d-4e6f-8a9b-0c1d2e3f4a5b");
10199
+ * await platform.oauth.connections.delete("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
10200
10200
  * ```
10201
10201
  */
10202
10202
  delete(grantId: string, options?: RequestOptions): APIPromise<void>;
@@ -10240,7 +10240,7 @@ declare class OauthWorkspacesConnectionsResource extends APIResource {
10240
10240
  * @see https://productcraft.co/docs/platform/api-reference#delete-v1-oauth-workspaces-workspace-id-connections-grant-id
10241
10241
  * @example
10242
10242
  * ```ts
10243
- * await platform.oauth.workspaces.connections.delete("3f0c1a2b-4c5d-4e6f-8a9b-0c1d2e3f4a5b", "5d1e2f3a-4b5c-4d6e-8f70-8192a3b4c5d6");
10243
+ * await platform.oauth.workspaces.connections.delete("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
10244
10244
  * ```
10245
10245
  */
10246
10246
  delete(workspaceId: string, grantId: string, options?: RequestOptions): APIPromise<void>;
@@ -10260,10 +10260,10 @@ declare class OauthWorkspacesConnectionsResource extends APIResource {
10260
10260
  * @see https://productcraft.co/docs/platform/api-reference#get-v1-oauth-workspaces-workspace-id-connections
10261
10261
  * @example
10262
10262
  * ```ts
10263
- * for await (const connection of platform.oauth.workspaces.connections.list("3f0c1a2b-4c5d-4e6f-8a9b-0c1d2e3f4a5b")) {
10263
+ * for await (const connection of platform.oauth.workspaces.connections.list("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f")) {
10264
10264
  * console.log(connection);
10265
10265
  * }
10266
- * const page = await platform.oauth.workspaces.connections.list("3f0c1a2b-4c5d-4e6f-8a9b-0c1d2e3f4a5b", {}, { timeout: 5_000 });
10266
+ * const page = await platform.oauth.workspaces.connections.list("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", {}, { timeout: 5_000 });
10267
10267
  * ```
10268
10268
  */
10269
10269
  list(workspaceId: string, params?: OauthWorkspaceConnectionListParams, options?: RequestOptions): PagePromise<ConnectedClient>;
@@ -10284,7 +10284,7 @@ declare class OauthWorkspacesConnectionsResource extends APIResource {
10284
10284
  * @see https://productcraft.co/docs/platform/api-reference#post-v1-oauth-workspaces-workspace-id-connections-grant-id-restore
10285
10285
  * @example
10286
10286
  * ```ts
10287
- * await platform.oauth.workspaces.connections.restore("3f0c1a2b-4c5d-4e6f-8a9b-0c1d2e3f4a5b", "5d1e2f3a-4b5c-4d6e-8f70-8192a3b4c5d6");
10287
+ * await platform.oauth.workspaces.connections.restore("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
10288
10288
  * ```
10289
10289
  */
10290
10290
  restore(workspaceId: string, grantId: string, options?: RequestOptions): APIPromise<void>;
@@ -10315,7 +10315,7 @@ declare class SessionsResource extends APIResource {
10315
10315
  * @see https://productcraft.co/docs/platform/api-reference#delete-v1-session-id
10316
10316
  * @example
10317
10317
  * ```ts
10318
- * const revokeSession = await platform.sessions.delete("3f0c1a2b-4c5d-4e6f-8a9b-0c1d2e3f4a5b");
10318
+ * const revokeSession = await platform.sessions.delete("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
10319
10319
  * ```
10320
10320
  */
10321
10321
  delete(id: string, options?: RequestOptions): APIPromise<WithLastResponse<RevokeSession>>;
@@ -10452,7 +10452,7 @@ declare class WorkspacesApiKeysPresetsResource extends APIResource {
10452
10452
  * @see https://productcraft.co/docs/platform/api-reference#get-v1-workspaces-workspace-slug-api-keys-presets
10453
10453
  * @example
10454
10454
  * ```ts
10455
- * for await (const preset of platform.workspaces.apiKeys.presets.list("workspace")) {
10455
+ * for await (const preset of platform.workspaces.apiKeys.presets.list("acme")) {
10456
10456
  * console.log(preset);
10457
10457
  * }
10458
10458
  * ```
@@ -10479,7 +10479,7 @@ declare class WorkspacesApiKeysResource extends APIResource {
10479
10479
  * @see https://productcraft.co/docs/platform/api-reference#post-v1-workspaces-workspace-slug-api-keys
10480
10480
  * @example
10481
10481
  * ```ts
10482
- * const mintPak = await platform.workspaces.apiKeys.create("workspace", { name: "Production social client" });
10482
+ * const mintPak = await platform.workspaces.apiKeys.create("acme", { name: "Production social client" });
10483
10483
  * ```
10484
10484
  */
10485
10485
  create(workspaceSlug: string, params: WorkspaceApiKeyCreateParams, options?: RequestOptions): APIPromise<WithLastResponse<MintPak>>;
@@ -10499,7 +10499,7 @@ declare class WorkspacesApiKeysResource extends APIResource {
10499
10499
  * @see https://productcraft.co/docs/platform/api-reference#delete-v1-workspaces-workspace-slug-api-keys-id
10500
10500
  * @example
10501
10501
  * ```ts
10502
- * await platform.workspaces.apiKeys.delete("workspace", "5d1e2f3a-4b5c-4d6e-8f70-8192a3b4c5d6");
10502
+ * await platform.workspaces.apiKeys.delete("acme", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
10503
10503
  * ```
10504
10504
  */
10505
10505
  delete(workspaceSlug: string, id: string, params?: WorkspaceApiKeyDeleteParams, options?: RequestOptions): APIPromise<void>;
@@ -10520,10 +10520,10 @@ declare class WorkspacesApiKeysResource extends APIResource {
10520
10520
  * @see https://productcraft.co/docs/platform/api-reference#get-v1-workspaces-workspace-slug-api-keys
10521
10521
  * @example
10522
10522
  * ```ts
10523
- * for await (const apiKey of platform.workspaces.apiKeys.list("workspace")) {
10523
+ * for await (const apiKey of platform.workspaces.apiKeys.list("acme")) {
10524
10524
  * console.log(apiKey);
10525
10525
  * }
10526
- * const page = await platform.workspaces.apiKeys.list("workspace", {}, { timeout: 5_000 });
10526
+ * const page = await platform.workspaces.apiKeys.list("acme", {}, { timeout: 5_000 });
10527
10527
  * ```
10528
10528
  */
10529
10529
  list(workspaceSlug: string, params?: WorkspaceApiKeyListParams, options?: RequestOptions): PagePromise<PublicApiKey>;
@@ -10542,7 +10542,7 @@ declare class WorkspacesApiKeysResource extends APIResource {
10542
10542
  * @see https://productcraft.co/docs/platform/api-reference#post-v1-workspaces-workspace-slug-api-keys-preview
10543
10543
  * @example
10544
10544
  * ```ts
10545
- * const pakGrantPreview = await platform.workspaces.apiKeys.preview("workspace", { policy_ids: ["11111111-1111-1111-1111-111111111111"] });
10545
+ * const pakGrantPreview = await platform.workspaces.apiKeys.preview("acme", { policy_ids: ["11111111-1111-1111-1111-111111111111"] });
10546
10546
  * ```
10547
10547
  */
10548
10548
  preview(workspaceSlug: string, params?: WorkspaceApiKeyPreviewParams, options?: RequestOptions): APIPromise<WithLastResponse<PakGrantPreview>>;
@@ -10561,7 +10561,7 @@ declare class WorkspacesApiKeysResource extends APIResource {
10561
10561
  * @see https://productcraft.co/docs/platform/api-reference#get-v1-workspaces-workspace-slug-api-keys-id
10562
10562
  * @example
10563
10563
  * ```ts
10564
- * const publicApiKey = await platform.workspaces.apiKeys.retrieve("workspace", "5d1e2f3a-4b5c-4d6e-8f70-8192a3b4c5d6");
10564
+ * const publicApiKey = await platform.workspaces.apiKeys.retrieve("acme", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
10565
10565
  * ```
10566
10566
  */
10567
10567
  retrieve(workspaceSlug: string, id: string, options?: RequestOptions): APIPromise<WithLastResponse<PublicApiKey>>;
@@ -10581,7 +10581,7 @@ declare class WorkspacesApiKeysResource extends APIResource {
10581
10581
  * @see https://productcraft.co/docs/platform/api-reference#post-v1-workspaces-workspace-slug-api-keys-id-rotate
10582
10582
  * @example
10583
10583
  * ```ts
10584
- * const rotatePak = await platform.workspaces.apiKeys.rotate("workspace", "5d1e2f3a-4b5c-4d6e-8f70-8192a3b4c5d6", { grace_hours: 24 });
10584
+ * const rotatePak = await platform.workspaces.apiKeys.rotate("acme", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", { grace_hours: 24 });
10585
10585
  * ```
10586
10586
  */
10587
10587
  rotate(workspaceSlug: string, id: string, params?: WorkspaceApiKeyRotateParams, options?: RequestOptions): APIPromise<WithLastResponse<RotatePak>>;
@@ -10602,7 +10602,7 @@ declare class WorkspacesApiKeysResource extends APIResource {
10602
10602
  * @see https://productcraft.co/docs/platform/api-reference#patch-v1-workspaces-workspace-slug-api-keys-id
10603
10603
  * @example
10604
10604
  * ```ts
10605
- * const publicApiKey = await platform.workspaces.apiKeys.update("workspace", "5d1e2f3a-4b5c-4d6e-8f70-8192a3b4c5d6", { description: "string" });
10605
+ * const publicApiKey = await platform.workspaces.apiKeys.update("acme", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", { description: "string" });
10606
10606
  * ```
10607
10607
  */
10608
10608
  update(workspaceSlug: string, id: string, params?: WorkspaceApiKeyUpdateParams, options?: RequestOptions): APIPromise<WithLastResponse<PublicApiKey>>;
@@ -10623,7 +10623,7 @@ declare class WorkspacesApiKeysResource extends APIResource {
10623
10623
  * @see https://productcraft.co/docs/platform/api-reference#patch-v1-workspaces-workspace-slug-api-keys-id-bindings
10624
10624
  * @example
10625
10625
  * ```ts
10626
- * const publicApiKey = await platform.workspaces.apiKeys.updateBindings("workspace", "5d1e2f3a-4b5c-4d6e-8f70-8192a3b4c5d6", { policy_ids: ["string"] });
10626
+ * const publicApiKey = await platform.workspaces.apiKeys.updateBindings("acme", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", { policy_ids: ["string"] });
10627
10627
  * ```
10628
10628
  */
10629
10629
  updateBindings(workspaceSlug: string, id: string, params: WorkspaceApiKeyUpdateBindingsParams, options?: RequestOptions): APIPromise<WithLastResponse<PublicApiKey>>;
@@ -10647,10 +10647,10 @@ declare class WorkspacesAuditFeedResource extends APIResource {
10647
10647
  * @see https://productcraft.co/docs/platform/api-reference#get-v1-workspaces-workspace-slug-audit-feed
10648
10648
  * @example
10649
10649
  * ```ts
10650
- * for await (const auditFeed of platform.workspaces.auditFeed.list("workspace")) {
10650
+ * for await (const auditFeed of platform.workspaces.auditFeed.list("acme")) {
10651
10651
  * console.log(auditFeed);
10652
10652
  * }
10653
- * const page = await platform.workspaces.auditFeed.list("workspace", {}, { timeout: 5_000 });
10653
+ * const page = await platform.workspaces.auditFeed.list("acme", {}, { timeout: 5_000 });
10654
10654
  * ```
10655
10655
  */
10656
10656
  list(workspaceSlug: string, params?: WorkspaceAuditFeedListParams, options?: RequestOptions): PagePromise<FeedItem>;
@@ -10675,7 +10675,7 @@ declare class WorkspacesAuditLogsResource extends APIResource {
10675
10675
  * @see https://productcraft.co/docs/platform/api-reference#get-v1-workspaces-workspace-slug-audit-logs-export
10676
10676
  * @example
10677
10677
  * ```ts
10678
- * const response = await platform.workspaces.auditLogs.export("workspace");
10678
+ * const response = await platform.workspaces.auditLogs.export("acme");
10679
10679
  * const text = await response.text();
10680
10680
  * ```
10681
10681
  */
@@ -10693,10 +10693,10 @@ declare class WorkspacesAuditLogsResource extends APIResource {
10693
10693
  * @see https://productcraft.co/docs/platform/api-reference#get-v1-workspaces-workspace-slug-audit-logs
10694
10694
  * @example
10695
10695
  * ```ts
10696
- * for await (const auditLog of platform.workspaces.auditLogs.list("workspace")) {
10696
+ * for await (const auditLog of platform.workspaces.auditLogs.list("acme")) {
10697
10697
  * console.log(auditLog);
10698
10698
  * }
10699
- * const page = await platform.workspaces.auditLogs.list("workspace", {}, { timeout: 5_000 });
10699
+ * const page = await platform.workspaces.auditLogs.list("acme", {}, { timeout: 5_000 });
10700
10700
  * ```
10701
10701
  */
10702
10702
  list(workspaceSlug: string, params?: WorkspaceAuditLogListParams, options?: RequestOptions): PagePromise<WorkspaceAuditLogEntry>;
@@ -10716,7 +10716,7 @@ declare class WorkspacesAvatarResource extends APIResource {
10716
10716
  * @see https://productcraft.co/docs/platform/api-reference#delete-v1-workspaces-workspace-slug-avatar
10717
10717
  * @example
10718
10718
  * ```ts
10719
- * await platform.workspaces.avatar.clear("workspace");
10719
+ * await platform.workspaces.avatar.clear("acme");
10720
10720
  * ```
10721
10721
  */
10722
10722
  clear(workspaceSlug: string, options?: RequestOptions): APIPromise<void>;
@@ -10733,7 +10733,7 @@ declare class WorkspacesAvatarResource extends APIResource {
10733
10733
  * @see https://productcraft.co/docs/platform/api-reference#post-v1-workspaces-workspace-slug-avatar
10734
10734
  * @example
10735
10735
  * ```ts
10736
- * const workspaceAvatarUrl = await platform.workspaces.avatar.upload("workspace", { file: new File(["…"], "image.png", { type: "image/png" }) });
10736
+ * const workspaceAvatarUrl = await platform.workspaces.avatar.upload("acme", { file: new File(["…"], "image.png", { type: "image/png" }) });
10737
10737
  * ```
10738
10738
  */
10739
10739
  upload(workspaceSlug: string, params: WorkspaceAvatarUploadParams, options?: RequestOptions): APIPromise<WithLastResponse<WorkspaceAvatarUrl>>;
@@ -10776,7 +10776,7 @@ declare class WorkspacesInvitesResource extends APIResource {
10776
10776
  * @see https://productcraft.co/docs/platform/api-reference#post-v1-workspaces-workspace-slug-invites
10777
10777
  * @example
10778
10778
  * ```ts
10779
- * const workspaceInvite = await platform.workspaces.invites.create("workspace", { email: "alice@example.com" });
10779
+ * const workspaceInvite = await platform.workspaces.invites.create("acme", { email: "alice@example.com" });
10780
10780
  * ```
10781
10781
  */
10782
10782
  create(workspaceSlug: string, params?: WorkspaceInviteCreateParams, options?: RequestOptions): APIPromise<WithLastResponse<WorkspaceInvite>>;
@@ -10794,7 +10794,7 @@ declare class WorkspacesInvitesResource extends APIResource {
10794
10794
  * @see https://productcraft.co/docs/platform/api-reference#delete-v1-workspaces-workspace-slug-invites-invite-id
10795
10795
  * @example
10796
10796
  * ```ts
10797
- * await platform.workspaces.invites.delete("workspace", "invite");
10797
+ * await platform.workspaces.invites.delete("acme", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
10798
10798
  * ```
10799
10799
  */
10800
10800
  delete(workspaceSlug: string, inviteId: string, options?: RequestOptions): APIPromise<void>;
@@ -10813,10 +10813,10 @@ declare class WorkspacesInvitesResource extends APIResource {
10813
10813
  * @see https://productcraft.co/docs/platform/api-reference#get-v1-workspaces-workspace-slug-invites
10814
10814
  * @example
10815
10815
  * ```ts
10816
- * for await (const invite of platform.workspaces.invites.list("workspace")) {
10816
+ * for await (const invite of platform.workspaces.invites.list("acme")) {
10817
10817
  * console.log(invite);
10818
10818
  * }
10819
- * const page = await platform.workspaces.invites.list("workspace", {}, { timeout: 5_000 });
10819
+ * const page = await platform.workspaces.invites.list("acme", {}, { timeout: 5_000 });
10820
10820
  * ```
10821
10821
  */
10822
10822
  list(workspaceSlug: string, params?: WorkspaceInviteListParams, options?: RequestOptions): PagePromise<WorkspaceInviteListItem>;
@@ -10838,7 +10838,7 @@ declare class WorkspacesMembersResource extends APIResource {
10838
10838
  * @see https://productcraft.co/docs/platform/api-reference#delete-v1-workspaces-workspace-slug-members-account-id
10839
10839
  * @example
10840
10840
  * ```ts
10841
- * await platform.workspaces.members.delete("workspace", "account");
10841
+ * await platform.workspaces.members.delete("acme", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
10842
10842
  * ```
10843
10843
  */
10844
10844
  delete(workspaceSlug: string, accountId: string, options?: RequestOptions): APIPromise<void>;
@@ -10857,10 +10857,10 @@ declare class WorkspacesMembersResource extends APIResource {
10857
10857
  * @see https://productcraft.co/docs/platform/api-reference#get-v1-workspaces-workspace-slug-members
10858
10858
  * @example
10859
10859
  * ```ts
10860
- * for await (const member of platform.workspaces.members.list("workspace")) {
10860
+ * for await (const member of platform.workspaces.members.list("acme")) {
10861
10861
  * console.log(member);
10862
10862
  * }
10863
- * const page = await platform.workspaces.members.list("workspace", {}, { timeout: 5_000 });
10863
+ * const page = await platform.workspaces.members.list("acme", {}, { timeout: 5_000 });
10864
10864
  * ```
10865
10865
  */
10866
10866
  list(workspaceSlug: string, params?: WorkspaceMemberListParams, options?: RequestOptions): PagePromise<WorkspaceMember>;
@@ -10881,7 +10881,7 @@ declare class WorkspacesMembersResource extends APIResource {
10881
10881
  * @see https://productcraft.co/docs/platform/api-reference#patch-v1-workspaces-workspace-slug-members-account-id-role
10882
10882
  * @example
10883
10883
  * ```ts
10884
- * const updateMemberRole = await platform.workspaces.members.updateRole("workspace", "account", { role: "owner" });
10884
+ * const updateMemberRole = await platform.workspaces.members.updateRole("acme", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", { role: "owner" });
10885
10885
  * ```
10886
10886
  */
10887
10887
  updateRole(workspaceSlug: string, accountId: string, params?: WorkspaceMemberUpdateRoleParams, options?: RequestOptions): APIPromise<WithLastResponse<UpdateMemberRole>>;
@@ -10901,7 +10901,7 @@ declare class WorkspacesPoliciesActionsResource extends APIResource {
10901
10901
  * @see https://productcraft.co/docs/platform/api-reference#get-v1-workspaces-workspace-slug-policies-actions-catalog
10902
10902
  * @example
10903
10903
  * ```ts
10904
- * const workspaceActionCatalog = await platform.workspaces.policies.actions.catalog("workspace");
10904
+ * const workspaceActionCatalog = await platform.workspaces.policies.actions.catalog("acme");
10905
10905
  * ```
10906
10906
  */
10907
10907
  catalog(workspaceSlug: string, options?: RequestOptions): APIPromise<WithLastResponse<WorkspaceActionCatalog>>;
@@ -10925,7 +10925,7 @@ declare class WorkspacesPoliciesResource extends APIResource {
10925
10925
  * @see https://productcraft.co/docs/platform/api-reference#post-v1-workspaces-workspace-slug-policies
10926
10926
  * @example
10927
10927
  * ```ts
10928
- * const managedPolicy = await platform.workspaces.policies.create("workspace", {
10928
+ * const managedPolicy = await platform.workspaces.policies.create("acme", {
10929
10929
  * name: "mail-readonly",
10930
10930
  * policy: [{ actions: ["mail.read", "mail.list"], effect: "allow", resources: ["*"] }],
10931
10931
  * });
@@ -10946,7 +10946,7 @@ declare class WorkspacesPoliciesResource extends APIResource {
10946
10946
  * @see https://productcraft.co/docs/platform/api-reference#delete-v1-workspaces-workspace-slug-policies-policy-id
10947
10947
  * @example
10948
10948
  * ```ts
10949
- * const managedPolicyDeleted = await platform.workspaces.policies.delete("workspace", "5d1e2f3a-4b5c-4d6e-8f70-8192a3b4c5d6");
10949
+ * const managedPolicyDeleted = await platform.workspaces.policies.delete("acme", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
10950
10950
  * ```
10951
10951
  */
10952
10952
  delete(workspaceSlug: string, policyId: string, options?: RequestOptions): APIPromise<WithLastResponse<ManagedPolicyDeleted>>;
@@ -10963,10 +10963,10 @@ declare class WorkspacesPoliciesResource extends APIResource {
10963
10963
  * @see https://productcraft.co/docs/platform/api-reference#get-v1-workspaces-workspace-slug-policies
10964
10964
  * @example
10965
10965
  * ```ts
10966
- * for await (const policy of platform.workspaces.policies.list("workspace")) {
10966
+ * for await (const policy of platform.workspaces.policies.list("acme")) {
10967
10967
  * console.log(policy);
10968
10968
  * }
10969
- * const page = await platform.workspaces.policies.list("workspace", {}, { timeout: 5_000 });
10969
+ * const page = await platform.workspaces.policies.list("acme", {}, { timeout: 5_000 });
10970
10970
  * ```
10971
10971
  */
10972
10972
  list(workspaceSlug: string, params?: WorkspacePolicyListParams, options?: RequestOptions): PagePromise<ManagedPolicy>;
@@ -10983,7 +10983,7 @@ declare class WorkspacesPoliciesResource extends APIResource {
10983
10983
  * @see https://productcraft.co/docs/platform/api-reference#get-v1-workspaces-workspace-slug-policies-policy-id
10984
10984
  * @example
10985
10985
  * ```ts
10986
- * const managedPolicyDetail = await platform.workspaces.policies.retrieve("workspace", "5d1e2f3a-4b5c-4d6e-8f70-8192a3b4c5d6");
10986
+ * const managedPolicyDetail = await platform.workspaces.policies.retrieve("acme", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
10987
10987
  * ```
10988
10988
  */
10989
10989
  retrieve(workspaceSlug: string, policyId: string, options?: RequestOptions): APIPromise<WithLastResponse<ManagedPolicyDetail>>;
@@ -11004,7 +11004,7 @@ declare class WorkspacesPoliciesResource extends APIResource {
11004
11004
  * @see https://productcraft.co/docs/platform/api-reference#patch-v1-workspaces-workspace-slug-policies-policy-id
11005
11005
  * @example
11006
11006
  * ```ts
11007
- * const managedPolicyDetail = await platform.workspaces.policies.update("workspace", "5d1e2f3a-4b5c-4d6e-8f70-8192a3b4c5d6", { description: "Read-only access to all Mail resources" });
11007
+ * const managedPolicyDetail = await platform.workspaces.policies.update("acme", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", { description: "Read-only access to all Mail resources" });
11008
11008
  * ```
11009
11009
  */
11010
11010
  update(workspaceSlug: string, policyId: string, params?: WorkspacePolicyUpdateParams, options?: RequestOptions): APIPromise<WithLastResponse<ManagedPolicyDetail>>;
@@ -11027,7 +11027,7 @@ declare class WorkspacesRolesResource extends APIResource {
11027
11027
  * @see https://productcraft.co/docs/platform/api-reference#post-v1-workspaces-workspace-slug-roles
11028
11028
  * @example
11029
11029
  * ```ts
11030
- * const workspaceRole = await platform.workspaces.roles.create("workspace", { name: "BillingAdmin" });
11030
+ * const workspaceRole = await platform.workspaces.roles.create("acme", { name: "BillingAdmin" });
11031
11031
  * ```
11032
11032
  */
11033
11033
  create(workspaceSlug: string, params: WorkspaceRoleCreateParams, options?: RequestOptions): APIPromise<WithLastResponse<WorkspaceRole>>;
@@ -11047,7 +11047,7 @@ declare class WorkspacesRolesResource extends APIResource {
11047
11047
  * @see https://productcraft.co/docs/platform/api-reference#delete-v1-workspaces-workspace-slug-roles-role-id
11048
11048
  * @example
11049
11049
  * ```ts
11050
- * await platform.workspaces.roles.delete("workspace", "5d1e2f3a-4b5c-4d6e-8f70-8192a3b4c5d6");
11050
+ * await platform.workspaces.roles.delete("acme", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
11051
11051
  * ```
11052
11052
  */
11053
11053
  delete(workspaceSlug: string, roleId: string, options?: RequestOptions): APIPromise<void>;
@@ -11064,10 +11064,10 @@ declare class WorkspacesRolesResource extends APIResource {
11064
11064
  * @see https://productcraft.co/docs/platform/api-reference#get-v1-workspaces-workspace-slug-roles
11065
11065
  * @example
11066
11066
  * ```ts
11067
- * for await (const role of platform.workspaces.roles.list("workspace")) {
11067
+ * for await (const role of platform.workspaces.roles.list("acme")) {
11068
11068
  * console.log(role);
11069
11069
  * }
11070
- * const page = await platform.workspaces.roles.list("workspace", {}, { timeout: 5_000 });
11070
+ * const page = await platform.workspaces.roles.list("acme", {}, { timeout: 5_000 });
11071
11071
  * ```
11072
11072
  */
11073
11073
  list(workspaceSlug: string, params?: WorkspaceRoleListParams, options?: RequestOptions): PagePromise<WorkspaceRole>;
@@ -11086,7 +11086,7 @@ declare class WorkspacesRolesResource extends APIResource {
11086
11086
  * @see https://productcraft.co/docs/platform/api-reference#get-v1-workspaces-workspace-slug-roles-role-id
11087
11087
  * @example
11088
11088
  * ```ts
11089
- * const workspaceRole = await platform.workspaces.roles.retrieve("workspace", "5d1e2f3a-4b5c-4d6e-8f70-8192a3b4c5d6");
11089
+ * const workspaceRole = await platform.workspaces.roles.retrieve("acme", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f");
11090
11090
  * ```
11091
11091
  */
11092
11092
  retrieve(workspaceSlug: string, roleId: string, options?: RequestOptions): APIPromise<WithLastResponse<WorkspaceRole>>;
@@ -11107,7 +11107,7 @@ declare class WorkspacesRolesResource extends APIResource {
11107
11107
  * @see https://productcraft.co/docs/platform/api-reference#patch-v1-workspaces-workspace-slug-roles-role-id
11108
11108
  * @example
11109
11109
  * ```ts
11110
- * const workspaceRole = await platform.workspaces.roles.update("workspace", "5d1e2f3a-4b5c-4d6e-8f70-8192a3b4c5d6", { description: "string" });
11110
+ * const workspaceRole = await platform.workspaces.roles.update("acme", "3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f", { description: "string" });
11111
11111
  * ```
11112
11112
  */
11113
11113
  update(workspaceSlug: string, roleId: string, params?: WorkspaceRoleUpdateParams, options?: RequestOptions): APIPromise<WithLastResponse<WorkspaceRole>>;
@@ -11130,7 +11130,7 @@ declare class WorkspacesServicesResource extends APIResource {
11130
11130
  * @see https://productcraft.co/docs/platform/api-reference#delete-v1-workspaces-workspace-slug-services-service
11131
11131
  * @example
11132
11132
  * ```ts
11133
- * await platform.workspaces.services.disable("workspace", "service");
11133
+ * await platform.workspaces.services.disable("acme", "mail");
11134
11134
  * ```
11135
11135
  */
11136
11136
  disable(workspaceSlug: string, service: string, options?: RequestOptions): APIPromise<void>;
@@ -11150,7 +11150,7 @@ declare class WorkspacesServicesResource extends APIResource {
11150
11150
  * @see https://productcraft.co/docs/platform/api-reference#post-v1-workspaces-workspace-slug-services-service
11151
11151
  * @example
11152
11152
  * ```ts
11153
- * const workspaceServiceState = await platform.workspaces.services.enable("workspace", "service", { settings: {} });
11153
+ * const workspaceServiceState = await platform.workspaces.services.enable("acme", "mail", { settings: {} });
11154
11154
  * ```
11155
11155
  */
11156
11156
  enable(workspaceSlug: string, service: string, params?: WorkspaceServiceEnableParams, options?: RequestOptions): APIPromise<WithLastResponse<WorkspaceServiceState>>;
@@ -11167,7 +11167,7 @@ declare class WorkspacesServicesResource extends APIResource {
11167
11167
  * @see https://productcraft.co/docs/platform/api-reference#get-v1-workspaces-workspace-slug-services
11168
11168
  * @example
11169
11169
  * ```ts
11170
- * const listWorkspaceServices = await platform.workspaces.services.list("workspace");
11170
+ * const listWorkspaceServices = await platform.workspaces.services.list("acme");
11171
11171
  * ```
11172
11172
  */
11173
11173
  list(workspaceSlug: string, options?: RequestOptions): APIPromise<WithLastResponse<ListWorkspaceServices>>;
@@ -11187,7 +11187,7 @@ declare class WorkspacesServicesResource extends APIResource {
11187
11187
  * @see https://productcraft.co/docs/platform/api-reference#patch-v1-workspaces-workspace-slug-services-service-settings
11188
11188
  * @example
11189
11189
  * ```ts
11190
- * const workspaceServiceState = await platform.workspaces.services.updateSettings("workspace", "service", { default_sender: "noreply@acme.com" });
11190
+ * const workspaceServiceState = await platform.workspaces.services.updateSettings("acme", "mail", { default_sender: "noreply@acme.com" });
11191
11191
  * ```
11192
11192
  */
11193
11193
  updateSettings(workspaceSlug: string, service: string, params?: WorkspaceServiceUpdateSettingsParams, options?: RequestOptions): APIPromise<WithLastResponse<WorkspaceServiceState>>;
@@ -11233,7 +11233,7 @@ declare class WorkspacesResource extends APIResource {
11233
11233
  * @see https://productcraft.co/docs/platform/api-reference#delete-v1-workspaces-workspace-slug
11234
11234
  * @example
11235
11235
  * ```ts
11236
- * await platform.workspaces.delete("workspace");
11236
+ * await platform.workspaces.delete("acme");
11237
11237
  * ```
11238
11238
  */
11239
11239
  delete(workspaceSlug: string, options?: RequestOptions): APIPromise<void>;
@@ -11269,7 +11269,7 @@ declare class WorkspacesResource extends APIResource {
11269
11269
  * @see https://productcraft.co/docs/platform/api-reference#get-v1-workspaces-workspace-slug
11270
11270
  * @example
11271
11271
  * ```ts
11272
- * const workspace = await platform.workspaces.retrieve("workspace");
11272
+ * const workspace = await platform.workspaces.retrieve("acme");
11273
11273
  * ```
11274
11274
  */
11275
11275
  retrieve(workspaceSlug: string, options?: RequestOptions): APIPromise<WithLastResponse<Workspace>>;
@@ -11288,7 +11288,7 @@ declare class WorkspacesResource extends APIResource {
11288
11288
  * @see https://productcraft.co/docs/platform/api-reference#patch-v1-workspaces-workspace-slug
11289
11289
  * @example
11290
11290
  * ```ts
11291
- * const workspace = await platform.workspaces.update("workspace", { display_name: "string" });
11291
+ * const workspace = await platform.workspaces.update("acme", { display_name: "string" });
11292
11292
  * ```
11293
11293
  */
11294
11294
  update(workspaceSlug: string, params?: WorkspaceUpdateParams, options?: RequestOptions): APIPromise<WithLastResponse<Workspace>>;