@tearleads/client-sdk 0.1.88 → 0.1.90

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.
Files changed (73) hide show
  1. package/client/index.d.ts +1 -1
  2. package/client/index.js.map +1 -1
  3. package/client/organizations/index.d.ts +1 -1
  4. package/client/organizations/index.js +9 -5
  5. package/client/organizations/index.js.map +1 -1
  6. package/client/organizations/organizationMemberships.d.ts +12 -1
  7. package/client/organizations/organizationMemberships.js +36 -2
  8. package/client/organizations/organizationMemberships.js.map +1 -1
  9. package/client/organizations/organizationReadModels.d.ts +7 -1
  10. package/client/organizations/organizationReadModels.js +15 -6
  11. package/client/organizations/organizationReadModels.js.map +1 -1
  12. package/data/persistence/organizations/organizationReadModelPersistence.js +14 -0
  13. package/data/persistence/organizations/organizationReadModelPersistence.js.map +1 -1
  14. package/data/persistence/organizations/organizationReadModelProjection.js +12 -0
  15. package/data/persistence/organizations/organizationReadModelProjection.js.map +1 -1
  16. package/data/sqlite/schema/index.d.ts +19 -0
  17. package/data/sqlite/schema/organizationReadModelSchema.js +2 -0
  18. package/data/sqlite/schema/organizationReadModelSchema.js.map +1 -1
  19. package/data/sqlite/schema/organizationReadModelTableRegistry.d.ts +19 -0
  20. package/index.d.ts +1 -1
  21. package/index.js.map +1 -1
  22. package/internal/api-client/ApiClient.d.ts +10 -0
  23. package/internal/api-client/ApiClient.js +8 -2
  24. package/internal/api-client/ApiClient.js.map +1 -1
  25. package/internal/api-client/routes/organizations/memberships.js +20 -1
  26. package/internal/api-client/routes/organizations/memberships.js.map +1 -1
  27. package/internal/crypto/index.d.ts +1 -0
  28. package/internal/crypto/index.js +1 -0
  29. package/internal/crypto/index.js.map +1 -1
  30. package/internal/crypto/organizationLeaveRequest.d.ts +13 -0
  31. package/internal/crypto/organizationLeaveRequest.js +39 -0
  32. package/internal/crypto/organizationLeaveRequest.js.map +1 -0
  33. package/internal/validators/operation/index.d.ts +1 -1
  34. package/internal/validators/operation/index.js +1 -1
  35. package/internal/validators/operation/index.js.map +1 -1
  36. package/internal/validators/operation/organizationMemberships.d.ts +263 -0
  37. package/internal/validators/operation/organizationMemberships.js +42 -0
  38. package/internal/validators/operation/organizationMemberships.js.map +1 -1
  39. package/internal/validators/operation/organizations.d.ts +48 -0
  40. package/internal/validators/operation/registry.d.ts +3 -1
  41. package/internal/validators/operation/registry.js +3 -1
  42. package/internal/validators/operation/registry.js.map +1 -1
  43. package/internal/validators/operation/root.d.ts +8 -0
  44. package/internal/validators/operation/rootOrganizations.d.ts +44 -0
  45. package/internal/validators/response/organization.d.ts +82 -0
  46. package/internal/validators/response/organization.js +6 -0
  47. package/internal/validators/response/organization.js.map +1 -1
  48. package/internal/validators/response/organizationMembership.d.ts +12 -2
  49. package/internal/validators/response/organizationMembership.js +5 -2
  50. package/internal/validators/response/organizationMembership.js.map +1 -1
  51. package/internal/validators/response/organizationReadModel.d.ts +60 -0
  52. package/internal/validators/response/root.d.ts +24 -0
  53. package/internal/validators/response/root.js +4 -0
  54. package/internal/validators/response/root.js.map +1 -1
  55. package/internal/validators/response/rootOrganizations.d.ts +52 -0
  56. package/internal/validators/response/rootOrganizations.js +13 -0
  57. package/internal/validators/response/rootOrganizations.js.map +1 -1
  58. package/internal/validators/util/index.d.ts +1 -0
  59. package/internal/validators/util/index.js +1 -0
  60. package/internal/validators/util/index.js.map +1 -1
  61. package/internal/validators/util/organizationLeaveRequest.d.ts +15 -0
  62. package/internal/validators/util/organizationLeaveRequest.js +22 -0
  63. package/internal/validators/util/organizationLeaveRequest.js.map +1 -0
  64. package/package.json +1 -1
  65. package/workflows/organizations/index.d.ts +2 -0
  66. package/workflows/organizations/index.js +2 -0
  67. package/workflows/organizations/index.js.map +1 -1
  68. package/workflows/organizations/memberships/leaveRequest.d.ts +31 -0
  69. package/workflows/organizations/memberships/leaveRequest.js +20 -0
  70. package/workflows/organizations/memberships/leaveRequest.js.map +1 -0
  71. package/workflows/organizations/memberships/leaveRequestVerification.d.ts +15 -0
  72. package/workflows/organizations/memberships/leaveRequestVerification.js +46 -0
  73. package/workflows/organizations/memberships/leaveRequestVerification.js.map +1 -0
@@ -1 +1 @@
1
- {"version":3,"file":"organization.js","sourceRoot":"","sources":["organization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,WAAW,EACX,4BAA4B,EAC5B,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,qCAAqC,EAAE,MAAM,aAAa,CAAC;AAEpE,MAAM,sBAAsB,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;AAC9D,MAAM,8BAA8B,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC;AACzE,MAAM,2CAA2C,GAAG,CAAC,CAAC,OAAO,CAAC;IAC5D,OAAO;IACP,MAAM;IACN,OAAO;CACR,CAAC,CAAC;AACH,MAAM,2CAA2C,GAAG,CAAC,CAAC,OAAO,CAAC;IAC5D,OAAO;IACP,MAAM;CACP,CAAC,CAAC;AAaH,MAAM,CAAC,MAAM,sCAAsC,GAAG;IACpD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACvC,2BAA2B,EAAE,CAAC,CAAC,MAAM,EAAE;IACvC,sBAAsB,EAAE,CAAC,CAAC,MAAM,EAAE;IAClC,2BAA2B,EAAE,CAAC,CAAC,OAAO,EAAE;IACxC,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE;IACnB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE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Ac;IAEd,OAAO,0CAA0C,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AAC7E,CAAC;AAED,MAAM,UAAU,gCAAgC,CAC9C,KAAc;IAEd,OAAO,oCAAoC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AACvE,CAAC;AAED,MAAM,UAAU,iCAAiC,CAC/C,KAAc;IAEd,OAAO,qCAAqC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AACxE,CAAC;AAED,MAAM,UAAU,iCAAiC,CAC/C,KAAc;IAEd,OAAO,qCAAqC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AACxE,CAAC","sourcesContent":["import { z } from \"zod\";\nimport {\n arraySchema,\n boundedPositiveIntegerSchema,\n loosePlainObject,\n nonEmptyStringSchema,\n nonNegativeIntegerSchema,\n positiveIntegerSchema,\n} from \"../schema\";\nimport { PrincipalPolicyMutationResponseSchema } from \"./principal\";\n\nconst OrganizationRoleSchema = z.literal([\"member\", \"admin\"]);\nconst OrganizationRosterStatusSchema = z.literal([\"active\", \"disabled\"]);\nconst OrganizationGroupContainerAccessLevelSchema = z.literal([\n \"admin\",\n \"read\",\n \"write\",\n]);\nconst OrganizationContainerGrantSubjectTypeSchema = z.literal([\n \"group\",\n \"user\",\n]);\n\nexport type OrganizationRole = z.infer<typeof OrganizationRoleSchema>;\nexport type OrganizationRosterStatus = z.infer<\n typeof OrganizationRosterStatusSchema\n>;\nexport type OrganizationGroupContainerAccessLevel = z.infer<\n typeof OrganizationGroupContainerAccessLevelSchema\n>;\nexport type OrganizationContainerGrantSubjectType = z.infer<\n typeof OrganizationContainerGrantSubjectTypeSchema\n>;\n\nexport const OrganizationDirectoryUserResponseShape = {\n createdAt: z.string(),\n disabledAt: z.string().nullable(),\n disabledByUserId: z.string().nullable(),\n encapsulationKeyFingerprint: z.string(),\n encapsulationPublicKey: z.string(),\n isPersonalOrganizationOwner: z.boolean(),\n isSelf: z.boolean(),\n joinedAt: z.string(),\n profileDocumentId: z.string().nullable(),\n signingKeyFingerprint: z.string(),\n signingPublicKey: z.string(),\n status: OrganizationRosterStatusSchema,\n updatedAt: z.string(),\n userId: z.string(),\n};\n\nexport const OrganizationDirectoryUserResponseSchema = loosePlainObject(\n OrganizationDirectoryUserResponseShape,\n);\n\nexport type OrganizationDirectoryUserResponse = z.infer<\n typeof OrganizationDirectoryUserResponseSchema\n>;\n\nexport const OrganizationDirectoryCurrentUserResponseShape = {\n isOrgAdmin: z.boolean(),\n};\n\nconst OrganizationDirectoryCurrentUserResponseSchema = loosePlainObject(\n OrganizationDirectoryCurrentUserResponseShape,\n);\n\nexport const OrganizationDirectoryResponseSchema = loosePlainObject({\n currentUser: OrganizationDirectoryCurrentUserResponseSchema,\n organizationId: z.string(),\n profileDocumentId: z.string().nullable(),\n users: arraySchema(OrganizationDirectoryUserResponseSchema),\n});\n\nexport type OrganizationDirectoryResponse = z.infer<\n typeof OrganizationDirectoryResponseSchema\n>;\n\nexport const OrganizationProfileResponseSchema = loosePlainObject({\n organizationId: z.string(),\n profileDocumentId: z.string().nullable(),\n});\n\nexport type OrganizationProfileResponse = z.infer<\n typeof OrganizationProfileResponseSchema\n>;\n\nexport const OrganizationGroupCurrentStateResponseShape = {\n keyEpoch: boundedPositiveIntegerSchema(Number.MAX_SAFE_INTEGER),\n keyFingerprint: nonEmptyStringSchema,\n memberCount: nonNegativeIntegerSchema,\n stateHash: z.string(),\n version: boundedPositiveIntegerSchema(Number.MAX_SAFE_INTEGER),\n};\n\nexport const OrganizationGroupCurrentStateResponseSchema = loosePlainObject(\n OrganizationGroupCurrentStateResponseShape,\n);\n\nexport type OrganizationGroupCurrentStateResponse = z.infer<\n typeof OrganizationGroupCurrentStateResponseSchema\n>;\n\nexport const OrganizationGroupSummaryResponseShape = {\n createdAt: z.string(),\n currentState: OrganizationGroupCurrentStateResponseSchema.nullable(),\n groupId: z.string(),\n isBuiltin: z.boolean(),\n organizationId: z.string(),\n};\n\nexport const OrganizationGroupSummaryResponseSchema = loosePlainObject(\n OrganizationGroupSummaryResponseShape,\n);\n\nexport type OrganizationGroupSummaryResponse = z.infer<\n typeof OrganizationGroupSummaryResponseSchema\n>;\n\nexport const CreateOrganizationGroupResponseSchema = loosePlainObject({\n group: OrganizationGroupSummaryResponseSchema,\n organizationPolicy: PrincipalPolicyMutationResponseSchema,\n});\n\nexport type CreateOrganizationGroupResponse = z.infer<\n typeof CreateOrganizationGroupResponseSchema\n>;\n\nexport const DeleteOrganizationGroupResponseSchema = loosePlainObject({\n deleted: z.literal(true),\n groupId: z.string(),\n organizationPolicy: PrincipalPolicyMutationResponseSchema,\n organizationId: z.string(),\n});\n\nexport type DeleteOrganizationGroupResponse = z.infer<\n typeof DeleteOrganizationGroupResponseSchema\n>;\n\nexport const ListOrganizationGroupsResponseSchema = loosePlainObject({\n groups: arraySchema(OrganizationGroupSummaryResponseSchema),\n memberGroupId: z.string(),\n organizationId: z.string(),\n});\n\nexport type ListOrganizationGroupsResponse = z.infer<\n typeof ListOrganizationGroupsResponseSchema\n>;\n\nexport const OrganizationGroupMemberResponseShape = {\n encapsulationKeyFingerprint: z.string().nullable(),\n encapsulationPublicKey: z.string().nullable(),\n role: OrganizationRoleSchema,\n signingKeyFingerprint: z.string().nullable(),\n signingPublicKey: z.string().nullable(),\n userId: z.string(),\n};\n\nexport const OrganizationGroupMemberResponseSchema = loosePlainObject(\n OrganizationGroupMemberResponseShape,\n);\n\nexport type OrganizationGroupMemberResponse = z.infer<\n typeof OrganizationGroupMemberResponseSchema\n>;\n\nexport const OrganizationGroupMembersResponseSchema = loosePlainObject({\n groupId: z.string(),\n members: arraySchema(OrganizationGroupMemberResponseSchema),\n organizationId: z.string(),\n});\n\nexport type OrganizationGroupMembersResponse = z.infer<\n typeof OrganizationGroupMembersResponseSchema\n>;\n\nconst OrganizationGroupContainerResponseShape = {\n accessLevel: OrganizationGroupContainerAccessLevelSchema,\n containerId: z.string(),\n createdAt: z.string(),\n depth: nonNegativeIntegerSchema,\n isBuiltin: z.boolean(),\n metadataAccessEpoch: positiveIntegerSchema,\n metadataAccessStateHash: nonEmptyStringSchema,\n metadataDocumentId: z.string().nullable(),\n parentId: z.string().nullable(),\n updatedAt: z.string(),\n};\n\nexport const OrganizationGroupContainerResponseSchema = loosePlainObject(\n OrganizationGroupContainerResponseShape,\n);\n\nexport type OrganizationGroupContainerResponse = z.infer<\n typeof OrganizationGroupContainerResponseSchema\n>;\n\nexport const OrganizationGroupContainersResponseSchema = loosePlainObject({\n containers: arraySchema(OrganizationGroupContainerResponseSchema),\n groupId: z.string(),\n organizationId: z.string(),\n});\n\nexport type OrganizationGroupContainersResponse = z.infer<\n typeof OrganizationGroupContainersResponseSchema\n>;\n\nexport const OrganizationContainerGrantResponseShape = {\n ...OrganizationGroupContainerResponseShape,\n groupId: z.string().nullable(),\n signingKeyFingerprint: z.string().nullable(),\n subjectId: z.string(),\n subjectType: OrganizationContainerGrantSubjectTypeSchema,\n userId: z.string().nullable(),\n};\n\nexport const OrganizationContainerGrantResponseSchema = loosePlainObject(\n OrganizationContainerGrantResponseShape,\n);\n\nexport type OrganizationContainerGrantResponse = z.infer<\n typeof OrganizationContainerGrantResponseSchema\n>;\n\nexport const OrganizationContainerGrantsResponseSchema = loosePlainObject({\n grants: arraySchema(OrganizationContainerGrantResponseSchema),\n organizationId: z.string(),\n});\n\nexport type OrganizationContainerGrantsResponse = z.infer<\n typeof OrganizationContainerGrantsResponseSchema\n>;\n\nexport const OrganizationUserDetailGrantsResponseSchema = loosePlainObject({\n directGrants: arraySchema(OrganizationContainerGrantResponseSchema),\n groupGrants: arraySchema(OrganizationContainerGrantResponseSchema),\n});\n\nexport type OrganizationUserDetailGrantsResponse = z.infer<\n typeof OrganizationUserDetailGrantsResponseSchema\n>;\n\nexport const OrganizationUserDetailResponseSchema = loosePlainObject({\n grants: OrganizationUserDetailGrantsResponseSchema,\n groups: arraySchema(OrganizationGroupSummaryResponseSchema),\n organizationId: z.string(),\n user: OrganizationDirectoryUserResponseSchema,\n});\n\nexport type OrganizationUserDetailResponse = z.infer<\n typeof OrganizationUserDetailResponseSchema\n>;\n\nexport function isOrganizationGroupContainerAccessLevel(\n value: string,\n): value is OrganizationGroupContainerAccessLevel {\n return OrganizationGroupContainerAccessLevelSchema.safeParse(value).success;\n}\n\nexport function isOrganizationContainerGrantSubjectType(\n value: string,\n): value is OrganizationContainerGrantSubjectType {\n return OrganizationContainerGrantSubjectTypeSchema.safeParse(value).success;\n}\n\nexport function isOrganizationDirectoryUserResponse(\n value: unknown,\n): value is OrganizationDirectoryUserResponse {\n return OrganizationDirectoryUserResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationDirectoryResponse(\n value: unknown,\n): value is OrganizationDirectoryResponse {\n return OrganizationDirectoryResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationProfileResponse(\n value: unknown,\n): value is OrganizationProfileResponse {\n return OrganizationProfileResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationGroupCurrentStateResponse(\n value: unknown,\n): value is OrganizationGroupCurrentStateResponse {\n return OrganizationGroupCurrentStateResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationGroupSummaryResponse(\n value: unknown,\n): value is OrganizationGroupSummaryResponse {\n return OrganizationGroupSummaryResponseSchema.safeParse(value).success;\n}\n\nexport function isListOrganizationGroupsResponse(\n value: unknown,\n): value is ListOrganizationGroupsResponse {\n return ListOrganizationGroupsResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationGroupMemberResponse(\n value: unknown,\n): value is OrganizationGroupMemberResponse {\n return OrganizationGroupMemberResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationGroupMembersResponse(\n value: unknown,\n): value is OrganizationGroupMembersResponse {\n return OrganizationGroupMembersResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationGroupContainerResponse(\n value: unknown,\n): value is OrganizationGroupContainerResponse {\n return OrganizationGroupContainerResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationGroupContainersResponse(\n value: unknown,\n): value is OrganizationGroupContainersResponse {\n return OrganizationGroupContainersResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationContainerGrantResponse(\n value: unknown,\n): value is OrganizationContainerGrantResponse {\n return OrganizationContainerGrantResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationContainerGrantsResponse(\n value: unknown,\n): value is OrganizationContainerGrantsResponse {\n return OrganizationContainerGrantsResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationUserDetailGrantsResponse(\n value: unknown,\n): value is OrganizationUserDetailGrantsResponse {\n return OrganizationUserDetailGrantsResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationUserDetailResponse(\n value: unknown,\n): value is OrganizationUserDetailResponse {\n return OrganizationUserDetailResponseSchema.safeParse(value).success;\n}\n\nexport function isCreateOrganizationGroupResponse(\n value: unknown,\n): value is CreateOrganizationGroupResponse {\n return CreateOrganizationGroupResponseSchema.safeParse(value).success;\n}\n\nexport function isDeleteOrganizationGroupResponse(\n value: unknown,\n): value is DeleteOrganizationGroupResponse {\n return DeleteOrganizationGroupResponseSchema.safeParse(value).success;\n}\n"]}
1
+ {"version":3,"file":"organization.js","sourceRoot":"","sources":["organization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,WAAW,EACX,4BAA4B,EAC5B,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,qCAAqC,EAAE,MAAM,aAAa,CAAC;AAEpE,MAAM,sBAAsB,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;AAC9D,MAAM,8BAA8B,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,UAA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IntegerSchema,\n loosePlainObject,\n nonEmptyStringSchema,\n nonNegativeIntegerSchema,\n positiveIntegerSchema,\n} from \"../schema\";\nimport { OrganizationLeaveRequestSchema } from \"../util/organizationLeaveRequest\";\nimport { PrincipalPolicyMutationResponseSchema } from \"./principal\";\n\nconst OrganizationRoleSchema = z.literal([\"member\", \"admin\"]);\nconst OrganizationRosterStatusSchema = z.literal([\"active\", \"disabled\"]);\nconst OrganizationGroupContainerAccessLevelSchema = z.literal([\n \"admin\",\n \"read\",\n \"write\",\n]);\nconst OrganizationContainerGrantSubjectTypeSchema = z.literal([\n \"group\",\n \"user\",\n]);\n\nexport type OrganizationRole = z.infer<typeof OrganizationRoleSchema>;\nexport type OrganizationRosterStatus = z.infer<\n typeof OrganizationRosterStatusSchema\n>;\nexport type OrganizationGroupContainerAccessLevel = z.infer<\n typeof OrganizationGroupContainerAccessLevelSchema\n>;\nexport type OrganizationContainerGrantSubjectType = z.infer<\n typeof OrganizationContainerGrantSubjectTypeSchema\n>;\n\nexport const OrganizationDirectoryUserResponseShape = {\n createdAt: z.string(),\n disabledAt: z.string().nullable(),\n disabledByUserId: z.string().nullable(),\n encapsulationKeyFingerprint: z.string(),\n encapsulationPublicKey: z.string(),\n isPersonalOrganizationOwner: z.boolean(),\n isSelf: z.boolean(),\n joinedAt: z.string(),\n /**\n * The member's pending signed request to leave, which an administrator\n * verifies against `signingPublicKey` before acting on it.\n */\n leaveRequest: OrganizationLeaveRequestSchema.nullable(),\n profileDocumentId: z.string().nullable(),\n signingKeyFingerprint: z.string(),\n signingPublicKey: z.string(),\n status: OrganizationRosterStatusSchema,\n updatedAt: z.string(),\n userId: z.string(),\n};\n\nexport const OrganizationDirectoryUserResponseSchema = loosePlainObject(\n OrganizationDirectoryUserResponseShape,\n);\n\nexport type OrganizationDirectoryUserResponse = z.infer<\n typeof OrganizationDirectoryUserResponseSchema\n>;\n\nexport const OrganizationDirectoryCurrentUserResponseShape = {\n isOrgAdmin: z.boolean(),\n};\n\nconst OrganizationDirectoryCurrentUserResponseSchema = loosePlainObject(\n OrganizationDirectoryCurrentUserResponseShape,\n);\n\nexport const OrganizationDirectoryResponseSchema = loosePlainObject({\n currentUser: OrganizationDirectoryCurrentUserResponseSchema,\n organizationId: z.string(),\n profileDocumentId: z.string().nullable(),\n users: arraySchema(OrganizationDirectoryUserResponseSchema),\n});\n\nexport type OrganizationDirectoryResponse = z.infer<\n typeof OrganizationDirectoryResponseSchema\n>;\n\nexport const OrganizationProfileResponseSchema = loosePlainObject({\n organizationId: z.string(),\n profileDocumentId: z.string().nullable(),\n});\n\nexport type OrganizationProfileResponse = z.infer<\n typeof OrganizationProfileResponseSchema\n>;\n\nexport const OrganizationGroupCurrentStateResponseShape = {\n keyEpoch: boundedPositiveIntegerSchema(Number.MAX_SAFE_INTEGER),\n keyFingerprint: nonEmptyStringSchema,\n memberCount: nonNegativeIntegerSchema,\n stateHash: z.string(),\n version: boundedPositiveIntegerSchema(Number.MAX_SAFE_INTEGER),\n};\n\nexport const OrganizationGroupCurrentStateResponseSchema = loosePlainObject(\n OrganizationGroupCurrentStateResponseShape,\n);\n\nexport type OrganizationGroupCurrentStateResponse = z.infer<\n typeof OrganizationGroupCurrentStateResponseSchema\n>;\n\nexport const OrganizationGroupSummaryResponseShape = {\n createdAt: z.string(),\n currentState: OrganizationGroupCurrentStateResponseSchema.nullable(),\n groupId: z.string(),\n isBuiltin: z.boolean(),\n organizationId: z.string(),\n};\n\nexport const OrganizationGroupSummaryResponseSchema = loosePlainObject(\n OrganizationGroupSummaryResponseShape,\n);\n\nexport type OrganizationGroupSummaryResponse = z.infer<\n typeof OrganizationGroupSummaryResponseSchema\n>;\n\nexport const CreateOrganizationGroupResponseSchema = loosePlainObject({\n group: OrganizationGroupSummaryResponseSchema,\n organizationPolicy: PrincipalPolicyMutationResponseSchema,\n});\n\nexport type CreateOrganizationGroupResponse = z.infer<\n typeof CreateOrganizationGroupResponseSchema\n>;\n\nexport const DeleteOrganizationGroupResponseSchema = loosePlainObject({\n deleted: z.literal(true),\n groupId: z.string(),\n organizationPolicy: PrincipalPolicyMutationResponseSchema,\n organizationId: z.string(),\n});\n\nexport type DeleteOrganizationGroupResponse = z.infer<\n typeof DeleteOrganizationGroupResponseSchema\n>;\n\nexport const ListOrganizationGroupsResponseSchema = loosePlainObject({\n groups: arraySchema(OrganizationGroupSummaryResponseSchema),\n memberGroupId: z.string(),\n organizationId: z.string(),\n});\n\nexport type ListOrganizationGroupsResponse = z.infer<\n typeof ListOrganizationGroupsResponseSchema\n>;\n\nexport const OrganizationGroupMemberResponseShape = {\n encapsulationKeyFingerprint: z.string().nullable(),\n encapsulationPublicKey: z.string().nullable(),\n role: OrganizationRoleSchema,\n signingKeyFingerprint: z.string().nullable(),\n signingPublicKey: z.string().nullable(),\n userId: z.string(),\n};\n\nexport const OrganizationGroupMemberResponseSchema = loosePlainObject(\n OrganizationGroupMemberResponseShape,\n);\n\nexport type OrganizationGroupMemberResponse = z.infer<\n typeof OrganizationGroupMemberResponseSchema\n>;\n\nexport const OrganizationGroupMembersResponseSchema = loosePlainObject({\n groupId: z.string(),\n members: arraySchema(OrganizationGroupMemberResponseSchema),\n organizationId: z.string(),\n});\n\nexport type OrganizationGroupMembersResponse = z.infer<\n typeof OrganizationGroupMembersResponseSchema\n>;\n\nconst OrganizationGroupContainerResponseShape = {\n accessLevel: OrganizationGroupContainerAccessLevelSchema,\n containerId: z.string(),\n createdAt: z.string(),\n depth: nonNegativeIntegerSchema,\n isBuiltin: z.boolean(),\n metadataAccessEpoch: positiveIntegerSchema,\n metadataAccessStateHash: nonEmptyStringSchema,\n metadataDocumentId: z.string().nullable(),\n parentId: z.string().nullable(),\n updatedAt: z.string(),\n};\n\nexport const OrganizationGroupContainerResponseSchema = loosePlainObject(\n OrganizationGroupContainerResponseShape,\n);\n\nexport type OrganizationGroupContainerResponse = z.infer<\n typeof OrganizationGroupContainerResponseSchema\n>;\n\nexport const OrganizationGroupContainersResponseSchema = loosePlainObject({\n containers: arraySchema(OrganizationGroupContainerResponseSchema),\n groupId: z.string(),\n organizationId: z.string(),\n});\n\nexport type OrganizationGroupContainersResponse = z.infer<\n typeof OrganizationGroupContainersResponseSchema\n>;\n\nexport const OrganizationContainerGrantResponseShape = {\n ...OrganizationGroupContainerResponseShape,\n groupId: z.string().nullable(),\n signingKeyFingerprint: z.string().nullable(),\n subjectId: z.string(),\n subjectType: OrganizationContainerGrantSubjectTypeSchema,\n userId: z.string().nullable(),\n};\n\nexport const OrganizationContainerGrantResponseSchema = loosePlainObject(\n OrganizationContainerGrantResponseShape,\n);\n\nexport type OrganizationContainerGrantResponse = z.infer<\n typeof OrganizationContainerGrantResponseSchema\n>;\n\nexport const OrganizationContainerGrantsResponseSchema = loosePlainObject({\n grants: arraySchema(OrganizationContainerGrantResponseSchema),\n organizationId: z.string(),\n});\n\nexport type OrganizationContainerGrantsResponse = z.infer<\n typeof OrganizationContainerGrantsResponseSchema\n>;\n\nexport const OrganizationUserDetailGrantsResponseSchema = loosePlainObject({\n directGrants: arraySchema(OrganizationContainerGrantResponseSchema),\n groupGrants: arraySchema(OrganizationContainerGrantResponseSchema),\n});\n\nexport type OrganizationUserDetailGrantsResponse = z.infer<\n typeof OrganizationUserDetailGrantsResponseSchema\n>;\n\nexport const OrganizationUserDetailResponseSchema = loosePlainObject({\n grants: OrganizationUserDetailGrantsResponseSchema,\n groups: arraySchema(OrganizationGroupSummaryResponseSchema),\n organizationId: z.string(),\n user: OrganizationDirectoryUserResponseSchema,\n});\n\nexport type OrganizationUserDetailResponse = z.infer<\n typeof OrganizationUserDetailResponseSchema\n>;\n\nexport function isOrganizationGroupContainerAccessLevel(\n value: string,\n): value is OrganizationGroupContainerAccessLevel {\n return OrganizationGroupContainerAccessLevelSchema.safeParse(value).success;\n}\n\nexport function isOrganizationContainerGrantSubjectType(\n value: string,\n): value is OrganizationContainerGrantSubjectType {\n return OrganizationContainerGrantSubjectTypeSchema.safeParse(value).success;\n}\n\nexport function isOrganizationDirectoryUserResponse(\n value: unknown,\n): value is OrganizationDirectoryUserResponse {\n return OrganizationDirectoryUserResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationDirectoryResponse(\n value: unknown,\n): value is OrganizationDirectoryResponse {\n return OrganizationDirectoryResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationProfileResponse(\n value: unknown,\n): value is OrganizationProfileResponse {\n return OrganizationProfileResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationGroupCurrentStateResponse(\n value: unknown,\n): value is OrganizationGroupCurrentStateResponse {\n return OrganizationGroupCurrentStateResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationGroupSummaryResponse(\n value: unknown,\n): value is OrganizationGroupSummaryResponse {\n return OrganizationGroupSummaryResponseSchema.safeParse(value).success;\n}\n\nexport function isListOrganizationGroupsResponse(\n value: unknown,\n): value is ListOrganizationGroupsResponse {\n return ListOrganizationGroupsResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationGroupMemberResponse(\n value: unknown,\n): value is OrganizationGroupMemberResponse {\n return OrganizationGroupMemberResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationGroupMembersResponse(\n value: unknown,\n): value is OrganizationGroupMembersResponse {\n return OrganizationGroupMembersResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationGroupContainerResponse(\n value: unknown,\n): value is OrganizationGroupContainerResponse {\n return OrganizationGroupContainerResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationGroupContainersResponse(\n value: unknown,\n): value is OrganizationGroupContainersResponse {\n return OrganizationGroupContainersResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationContainerGrantResponse(\n value: unknown,\n): value is OrganizationContainerGrantResponse {\n return OrganizationContainerGrantResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationContainerGrantsResponse(\n value: unknown,\n): value is OrganizationContainerGrantsResponse {\n return OrganizationContainerGrantsResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationUserDetailGrantsResponse(\n value: unknown,\n): value is OrganizationUserDetailGrantsResponse {\n return OrganizationUserDetailGrantsResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationUserDetailResponse(\n value: unknown,\n): value is OrganizationUserDetailResponse {\n return OrganizationUserDetailResponseSchema.safeParse(value).success;\n}\n\nexport function isCreateOrganizationGroupResponse(\n value: unknown,\n): value is CreateOrganizationGroupResponse {\n return CreateOrganizationGroupResponseSchema.safeParse(value).success;\n}\n\nexport function isDeleteOrganizationGroupResponse(\n value: unknown,\n): value is DeleteOrganizationGroupResponse {\n return DeleteOrganizationGroupResponseSchema.safeParse(value).success;\n}\n"]}
@@ -4,23 +4,29 @@ import { z } from "zod";
4
4
  * it. This is product state, not access authority: signed group policies and
5
5
  * container grants decide access. `syncPaused` is the user's own choice to stop
6
6
  * this organization's content syncing to their devices; it changes nothing on
7
- * the server's access path. `isPersonalOrganizationOwner` marks the user's
8
- * personal organization, which cannot be paused.
7
+ * the server's access path. `leaveRequestedAt` is when the user asked the
8
+ * organization's administrators to remove them, or null.
9
+ * `isPersonalOrganizationOwner` marks the user's personal organization, which
10
+ * can be neither paused nor left.
9
11
  */
10
12
  export declare const OrganizationMembershipResponseSchema: z.ZodType<{
11
13
  isPersonalOrganizationOwner: boolean;
14
+ leaveRequestedAt: string | null;
12
15
  organizationId: string;
13
16
  syncPaused: boolean;
14
17
  }, {
15
18
  isPersonalOrganizationOwner: boolean;
19
+ leaveRequestedAt: string | null;
16
20
  organizationId: string;
17
21
  syncPaused: boolean;
18
22
  }, z.core.$ZodTypeInternals<{
19
23
  isPersonalOrganizationOwner: boolean;
24
+ leaveRequestedAt: string | null;
20
25
  organizationId: string;
21
26
  syncPaused: boolean;
22
27
  }, {
23
28
  isPersonalOrganizationOwner: boolean;
29
+ leaveRequestedAt: string | null;
24
30
  organizationId: string;
25
31
  syncPaused: boolean;
26
32
  }>>;
@@ -29,24 +35,28 @@ export type OrganizationMembershipResponse = z.infer<typeof OrganizationMembersh
29
35
  export declare const OrganizationMembershipsResponseSchema: z.ZodType<{
30
36
  memberships: {
31
37
  isPersonalOrganizationOwner: boolean;
38
+ leaveRequestedAt: string | null;
32
39
  organizationId: string;
33
40
  syncPaused: boolean;
34
41
  }[];
35
42
  }, {
36
43
  memberships: {
37
44
  isPersonalOrganizationOwner: boolean;
45
+ leaveRequestedAt: string | null;
38
46
  organizationId: string;
39
47
  syncPaused: boolean;
40
48
  }[];
41
49
  }, z.core.$ZodTypeInternals<{
42
50
  memberships: {
43
51
  isPersonalOrganizationOwner: boolean;
52
+ leaveRequestedAt: string | null;
44
53
  organizationId: string;
45
54
  syncPaused: boolean;
46
55
  }[];
47
56
  }, {
48
57
  memberships: {
49
58
  isPersonalOrganizationOwner: boolean;
59
+ leaveRequestedAt: string | null;
50
60
  organizationId: string;
51
61
  syncPaused: boolean;
52
62
  }[];
@@ -5,11 +5,14 @@ import { arraySchema, loosePlainObject } from "../schema.js";
5
5
  * it. This is product state, not access authority: signed group policies and
6
6
  * container grants decide access. `syncPaused` is the user's own choice to stop
7
7
  * this organization's content syncing to their devices; it changes nothing on
8
- * the server's access path. `isPersonalOrganizationOwner` marks the user's
9
- * personal organization, which cannot be paused.
8
+ * the server's access path. `leaveRequestedAt` is when the user asked the
9
+ * organization's administrators to remove them, or null.
10
+ * `isPersonalOrganizationOwner` marks the user's personal organization, which
11
+ * can be neither paused nor left.
10
12
  */
11
13
  export const OrganizationMembershipResponseSchema = loosePlainObject({
12
14
  isPersonalOrganizationOwner: z.boolean(),
15
+ leaveRequestedAt: z.string().nullable(),
13
16
  organizationId: z.string(),
14
17
  syncPaused: z.boolean(),
15
18
  });
@@ -1 +1 @@
1
- {"version":3,"file":"organizationMembership.js","sourceRoot":"","sources":["organizationMembership.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE1D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,gBAAgB,CAAC;IACnE,2BAA2B,EAAE,CAAC,CAAC,OAAO,EAAE;IACxC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;IAC1B,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE;CACxB,CAAC,CAAC;AAMH,wEAAwE;AACxE,MAAM,CAAC,MAAM,qCAAqC,GAAG,gBAAgB,CAAC;IACpE,WAAW,EAAE,WAAW,CAAC,oCAAoC,CAAC;CAC/D,CAAC,CAAC;AAMH,MAAM,UAAU,gCAAgC,CAC9C,KAAc;IAEd,OAAO,oCAAoC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AACvE,CAAC;AAED,MAAM,UAAU,iCAAiC,CAC/C,KAAc;IAEd,OAAO,qCAAqC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AACxE,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { arraySchema, loosePlainObject } from \"../schema\";\n\n/**\n * One organization the session user belongs to, as the user's own conduit to\n * it. This is product state, not access authority: signed group policies and\n * container grants decide access. `syncPaused` is the user's own choice to stop\n * this organization's content syncing to their devices; it changes nothing on\n * the server's access path. `isPersonalOrganizationOwner` marks the user's\n * personal organization, which cannot be paused.\n */\nexport const OrganizationMembershipResponseSchema = loosePlainObject({\n isPersonalOrganizationOwner: z.boolean(),\n organizationId: z.string(),\n syncPaused: z.boolean(),\n});\n\nexport type OrganizationMembershipResponse = z.infer<\n typeof OrganizationMembershipResponseSchema\n>;\n\n/** Every organization whose roster lists the session user as active. */\nexport const OrganizationMembershipsResponseSchema = loosePlainObject({\n memberships: arraySchema(OrganizationMembershipResponseSchema),\n});\n\nexport type OrganizationMembershipsResponse = z.infer<\n typeof OrganizationMembershipsResponseSchema\n>;\n\nexport function isOrganizationMembershipResponse(\n value: unknown,\n): value is OrganizationMembershipResponse {\n return OrganizationMembershipResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationMembershipsResponse(\n value: unknown,\n): value is OrganizationMembershipsResponse {\n return OrganizationMembershipsResponseSchema.safeParse(value).success;\n}\n"]}
1
+ {"version":3,"file":"organizationMembership.js","sourceRoot":"","sources":["organizationMembership.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE1D;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,gBAAgB,CAAC;IACnE,2BAA2B,EAAE,CAAC,CAAC,OAAO,EAAE;IACxC,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACvC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;IAC1B,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE;CACxB,CAAC,CAAC;AAMH,wEAAwE;AACxE,MAAM,CAAC,MAAM,qCAAqC,GAAG,gBAAgB,CAAC;IACpE,WAAW,EAAE,WAAW,CAAC,oCAAoC,CAAC;CAC/D,CAAC,CAAC;AAMH,MAAM,UAAU,gCAAgC,CAC9C,KAAc;IAEd,OAAO,oCAAoC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AACvE,CAAC;AAED,MAAM,UAAU,iCAAiC,CAC/C,KAAc;IAEd,OAAO,qCAAqC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AACxE,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { arraySchema, loosePlainObject } from \"../schema\";\n\n/**\n * One organization the session user belongs to, as the user's own conduit to\n * it. This is product state, not access authority: signed group policies and\n * container grants decide access. `syncPaused` is the user's own choice to stop\n * this organization's content syncing to their devices; it changes nothing on\n * the server's access path. `leaveRequestedAt` is when the user asked the\n * organization's administrators to remove them, or null.\n * `isPersonalOrganizationOwner` marks the user's personal organization, which\n * can be neither paused nor left.\n */\nexport const OrganizationMembershipResponseSchema = loosePlainObject({\n isPersonalOrganizationOwner: z.boolean(),\n leaveRequestedAt: z.string().nullable(),\n organizationId: z.string(),\n syncPaused: z.boolean(),\n});\n\nexport type OrganizationMembershipResponse = z.infer<\n typeof OrganizationMembershipResponseSchema\n>;\n\n/** Every organization whose roster lists the session user as active. */\nexport const OrganizationMembershipsResponseSchema = loosePlainObject({\n memberships: arraySchema(OrganizationMembershipResponseSchema),\n});\n\nexport type OrganizationMembershipsResponse = z.infer<\n typeof OrganizationMembershipsResponseSchema\n>;\n\nexport function isOrganizationMembershipResponse(\n value: unknown,\n): value is OrganizationMembershipResponse {\n return OrganizationMembershipResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationMembershipsResponse(\n value: unknown,\n): value is OrganizationMembershipsResponse {\n return OrganizationMembershipsResponseSchema.safeParse(value).success;\n}\n"]}
@@ -11,6 +11,12 @@ declare const OrganizationReadModelDirectoryResponseSchema: z.ZodObject<{
11
11
  isPersonalOrganizationOwner: boolean;
12
12
  isSelf: boolean;
13
13
  joinedAt: string;
14
+ leaveRequest: {
15
+ organizationId: string;
16
+ userId: string;
17
+ requestedAt: string;
18
+ signature: string;
19
+ } | null;
14
20
  profileDocumentId: string | null;
15
21
  signingKeyFingerprint: string;
16
22
  signingPublicKey: string;
@@ -26,6 +32,12 @@ declare const OrganizationReadModelDirectoryResponseSchema: z.ZodObject<{
26
32
  isPersonalOrganizationOwner: boolean;
27
33
  isSelf: boolean;
28
34
  joinedAt: string;
35
+ leaveRequest: {
36
+ organizationId: string;
37
+ userId: string;
38
+ requestedAt: string;
39
+ signature: string;
40
+ } | null;
29
41
  profileDocumentId: string | null;
30
42
  signingKeyFingerprint: string;
31
43
  signingPublicKey: string;
@@ -140,6 +152,12 @@ declare const OrganizationReadModelSnapshotResponseSchema: z.ZodObject<{
140
152
  isPersonalOrganizationOwner: boolean;
141
153
  isSelf: boolean;
142
154
  joinedAt: string;
155
+ leaveRequest: {
156
+ organizationId: string;
157
+ userId: string;
158
+ requestedAt: string;
159
+ signature: string;
160
+ } | null;
143
161
  profileDocumentId: string | null;
144
162
  signingKeyFingerprint: string;
145
163
  signingPublicKey: string;
@@ -155,6 +173,12 @@ declare const OrganizationReadModelSnapshotResponseSchema: z.ZodObject<{
155
173
  isPersonalOrganizationOwner: boolean;
156
174
  isSelf: boolean;
157
175
  joinedAt: string;
176
+ leaveRequest: {
177
+ organizationId: string;
178
+ userId: string;
179
+ requestedAt: string;
180
+ signature: string;
181
+ } | null;
158
182
  profileDocumentId: string | null;
159
183
  signingKeyFingerprint: string;
160
184
  signingPublicKey: string;
@@ -281,6 +305,12 @@ declare const OrganizationReadModelDeltaResponseSchema: z.ZodObject<{
281
305
  isPersonalOrganizationOwner: boolean;
282
306
  isSelf: boolean;
283
307
  joinedAt: string;
308
+ leaveRequest: {
309
+ organizationId: string;
310
+ userId: string;
311
+ requestedAt: string;
312
+ signature: string;
313
+ } | null;
284
314
  profileDocumentId: string | null;
285
315
  signingKeyFingerprint: string;
286
316
  signingPublicKey: string;
@@ -296,6 +326,12 @@ declare const OrganizationReadModelDeltaResponseSchema: z.ZodObject<{
296
326
  isPersonalOrganizationOwner: boolean;
297
327
  isSelf: boolean;
298
328
  joinedAt: string;
329
+ leaveRequest: {
330
+ organizationId: string;
331
+ userId: string;
332
+ requestedAt: string;
333
+ signature: string;
334
+ } | null;
299
335
  profileDocumentId: string | null;
300
336
  signingKeyFingerprint: string;
301
337
  signingPublicKey: string;
@@ -423,6 +459,12 @@ export declare const OrganizationReadModelResponseSchema: z.ZodDiscriminatedUnio
423
459
  isPersonalOrganizationOwner: boolean;
424
460
  isSelf: boolean;
425
461
  joinedAt: string;
462
+ leaveRequest: {
463
+ organizationId: string;
464
+ userId: string;
465
+ requestedAt: string;
466
+ signature: string;
467
+ } | null;
426
468
  profileDocumentId: string | null;
427
469
  signingKeyFingerprint: string;
428
470
  signingPublicKey: string;
@@ -438,6 +480,12 @@ export declare const OrganizationReadModelResponseSchema: z.ZodDiscriminatedUnio
438
480
  isPersonalOrganizationOwner: boolean;
439
481
  isSelf: boolean;
440
482
  joinedAt: string;
483
+ leaveRequest: {
484
+ organizationId: string;
485
+ userId: string;
486
+ requestedAt: string;
487
+ signature: string;
488
+ } | null;
441
489
  profileDocumentId: string | null;
442
490
  signingKeyFingerprint: string;
443
491
  signingPublicKey: string;
@@ -564,6 +612,12 @@ export declare const OrganizationReadModelResponseSchema: z.ZodDiscriminatedUnio
564
612
  isPersonalOrganizationOwner: boolean;
565
613
  isSelf: boolean;
566
614
  joinedAt: string;
615
+ leaveRequest: {
616
+ organizationId: string;
617
+ userId: string;
618
+ requestedAt: string;
619
+ signature: string;
620
+ } | null;
567
621
  profileDocumentId: string | null;
568
622
  signingKeyFingerprint: string;
569
623
  signingPublicKey: string;
@@ -579,6 +633,12 @@ export declare const OrganizationReadModelResponseSchema: z.ZodDiscriminatedUnio
579
633
  isPersonalOrganizationOwner: boolean;
580
634
  isSelf: boolean;
581
635
  joinedAt: string;
636
+ leaveRequest: {
637
+ organizationId: string;
638
+ userId: string;
639
+ requestedAt: string;
640
+ signature: string;
641
+ } | null;
582
642
  profileDocumentId: string | null;
583
643
  signingKeyFingerprint: string;
584
644
  signingPublicKey: string;
@@ -1,20 +1,28 @@
1
1
  import { z } from "zod";
2
2
  export declare const RootRosterSchema: z.ZodType<{
3
3
  disabledAt: string | null;
4
+ holdsSeat: boolean;
4
5
  joinedAt: string;
5
6
  status: "active" | "disabled";
7
+ syncPausedAt: string | null;
6
8
  }, {
7
9
  disabledAt: string | null;
10
+ holdsSeat: boolean;
8
11
  joinedAt: string;
9
12
  status: "active" | "disabled";
13
+ syncPausedAt: string | null;
10
14
  }, z.core.$ZodTypeInternals<{
11
15
  disabledAt: string | null;
16
+ holdsSeat: boolean;
12
17
  joinedAt: string;
13
18
  status: "active" | "disabled";
19
+ syncPausedAt: string | null;
14
20
  }, {
15
21
  disabledAt: string | null;
22
+ holdsSeat: boolean;
16
23
  joinedAt: string;
17
24
  status: "active" | "disabled";
25
+ syncPausedAt: string | null;
18
26
  }>>;
19
27
  /** Operator-facing view of one registered identity, from `GET /root/identities`. */
20
28
  export declare const RootIdentitySummaryResponseSchema: z.ZodType<{
@@ -266,8 +274,10 @@ export declare const RootIdentityOrganizationResponseSchema: z.ZodType<{
266
274
  organizationId: string;
267
275
  roster: {
268
276
  disabledAt: string | null;
277
+ holdsSeat: boolean;
269
278
  joinedAt: string;
270
279
  status: "active" | "disabled";
280
+ syncPausedAt: string | null;
271
281
  };
272
282
  }, {
273
283
  billing: {
@@ -285,8 +295,10 @@ export declare const RootIdentityOrganizationResponseSchema: z.ZodType<{
285
295
  organizationId: string;
286
296
  roster: {
287
297
  disabledAt: string | null;
298
+ holdsSeat: boolean;
288
299
  joinedAt: string;
289
300
  status: "active" | "disabled";
301
+ syncPausedAt: string | null;
290
302
  };
291
303
  }, z.core.$ZodTypeInternals<{
292
304
  billing: {
@@ -304,8 +316,10 @@ export declare const RootIdentityOrganizationResponseSchema: z.ZodType<{
304
316
  organizationId: string;
305
317
  roster: {
306
318
  disabledAt: string | null;
319
+ holdsSeat: boolean;
307
320
  joinedAt: string;
308
321
  status: "active" | "disabled";
322
+ syncPausedAt: string | null;
309
323
  };
310
324
  }, {
311
325
  billing: {
@@ -323,8 +337,10 @@ export declare const RootIdentityOrganizationResponseSchema: z.ZodType<{
323
337
  organizationId: string;
324
338
  roster: {
325
339
  disabledAt: string | null;
340
+ holdsSeat: boolean;
326
341
  joinedAt: string;
327
342
  status: "active" | "disabled";
343
+ syncPausedAt: string | null;
328
344
  };
329
345
  }>>;
330
346
  export type RootIdentityOrganizationResponse = z.infer<typeof RootIdentityOrganizationResponseSchema>;
@@ -345,8 +361,10 @@ export declare const RootIdentityOrganizationsResponseSchema: z.ZodType<{
345
361
  organizationId: string;
346
362
  roster: {
347
363
  disabledAt: string | null;
364
+ holdsSeat: boolean;
348
365
  joinedAt: string;
349
366
  status: "active" | "disabled";
367
+ syncPausedAt: string | null;
350
368
  };
351
369
  }[];
352
370
  }, {
@@ -366,8 +384,10 @@ export declare const RootIdentityOrganizationsResponseSchema: z.ZodType<{
366
384
  organizationId: string;
367
385
  roster: {
368
386
  disabledAt: string | null;
387
+ holdsSeat: boolean;
369
388
  joinedAt: string;
370
389
  status: "active" | "disabled";
390
+ syncPausedAt: string | null;
371
391
  };
372
392
  }[];
373
393
  }, z.core.$ZodTypeInternals<{
@@ -387,8 +407,10 @@ export declare const RootIdentityOrganizationsResponseSchema: z.ZodType<{
387
407
  organizationId: string;
388
408
  roster: {
389
409
  disabledAt: string | null;
410
+ holdsSeat: boolean;
390
411
  joinedAt: string;
391
412
  status: "active" | "disabled";
413
+ syncPausedAt: string | null;
392
414
  };
393
415
  }[];
394
416
  }, {
@@ -408,8 +430,10 @@ export declare const RootIdentityOrganizationsResponseSchema: z.ZodType<{
408
430
  organizationId: string;
409
431
  roster: {
410
432
  disabledAt: string | null;
433
+ holdsSeat: boolean;
411
434
  joinedAt: string;
412
435
  status: "active" | "disabled";
436
+ syncPausedAt: string | null;
413
437
  };
414
438
  }[];
415
439
  }>>;
@@ -3,8 +3,12 @@ import { arraySchema, loosePlainObject, nonEmptyStringSchema, nonNegativeInteger
3
3
  import { OrganizationBillingStatusSchema } from "./organizationBilling.js";
4
4
  export const RootRosterSchema = loosePlainObject({
5
5
  disabledAt: z.string().nullable(),
6
+ /** Whether the identity holds an open billable-seat assignment in the org. */
7
+ holdsSeat: z.boolean(),
6
8
  joinedAt: z.string(),
7
9
  status: z.literal(["active", "disabled"]),
10
+ /** When the member paused the org's sync to their devices; null while syncing. */
11
+ syncPausedAt: z.string().nullable(),
8
12
  });
9
13
  /** Operator-facing view of one registered identity, from `GET /root/identities`. */
10
14
  export const RootIdentitySummaryResponseSchema = loosePlainObject({
@@ -1 +1 @@
1
- {"version":3,"file":"root.js","sourceRoot":"","sources":["root.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,oBAAoB,E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,CAAC;AAC/D,CAAC;AAED,MAAM,UAAU,4BAA4B,CAC1C,KAAc;IAEd,OAAO,gCAAgC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AACnE,CAAC;AAED,MAAM,UAAU,mCAAmC,CACjD,KAAc;IAEd,OAAO,uCAAuC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AAC1E,CAAC","sourcesContent":["import { z } from \"zod\";\nimport {\n arraySchema,\n loosePlainObject,\n nonEmptyStringSchema,\n nonNegativeIntegerSchema,\n sha256HexStringSchema,\n} from \"../schema\";\nimport { OrganizationBillingStatusSchema } from \"./organizationBilling\";\n\nexport const RootRosterSchema = loosePlainObject({\n disabledAt: z.string().nullable(),\n joinedAt: z.string(),\n status: z.literal([\"active\", \"disabled\"]),\n});\n\n/** Operator-facing view of one registered identity, from `GET /root/identities`. */\nexport const RootIdentitySummaryResponseSchema = loosePlainObject({\n createdAt: z.string(),\n defaultOrganizationId: nonEmptyStringSchema,\n isRoot: z.boolean(),\n lastActiveAt: z.string().nullable(),\n registrationSourceIpAddress: z.string().nullable(),\n signingKeyFingerprint: sha256HexStringSchema,\n userId: nonEmptyStringSchema,\n});\n\nexport type RootIdentitySummaryResponse = z.infer<\n typeof RootIdentitySummaryResponseSchema\n>;\n\nexport const RootIdentitiesResponseSchema = loosePlainObject({\n identities: arraySchema(RootIdentitySummaryResponseSchema),\n /** Opaque cursor for the next page; null when the listing is exhausted. */\n nextCursor: z.string().nullable(),\n});\n\nexport type RootIdentitiesResponse = z.infer<\n typeof RootIdentitiesResponseSchema\n>;\n\n/** A live session of the inspected identity; no session is the operator's. */\nexport const RootIdentitySessionResponseSchema = loosePlainObject({\n createdAt: z.string(),\n id: sha256HexStringSchema,\n ipAddresses: arraySchema(nonEmptyStringSchema),\n lastActiveAt: z.string(),\n lastActiveIp: nonEmptyStringSchema.nullable(),\n signingKeyFingerprint: z.string(),\n});\n\nexport type RootIdentitySessionResponse = z.infer<\n typeof RootIdentitySessionResponseSchema\n>;\n\nexport const RootIdentityDetailResponseSchema = loosePlainObject({\n identity: RootIdentitySummaryResponseSchema,\n sessions: arraySchema(RootIdentitySessionResponseSchema),\n});\n\nexport type RootIdentityDetailResponse = z.infer<\n typeof RootIdentityDetailResponseSchema\n>;\n\nexport const rootOrganizationBillingShape = {\n currentPeriodEndsAt: z.string().nullable(),\n disabledAt: z.string().nullable(),\n provider: z.string().nullable(),\n purgeAfter: z.string().nullable(),\n purgedAt: z.string().nullable(),\n seatCount: nonNegativeIntegerSchema,\n status: OrganizationBillingStatusSchema,\n trialEndsAt: z.string().nullable(),\n};\nexport const RootIdentityOrganizationBillingResponseSchema = loosePlainObject(\n rootOrganizationBillingShape,\n);\n\nexport type RootIdentityOrganizationBillingResponse = z.infer<\n typeof RootIdentityOrganizationBillingResponseSchema\n>;\n\nexport const RootIdentityOrganizationResponseSchema = loosePlainObject({\n /** Null only when the organization has no billing row, which is unexpected. */\n billing: RootIdentityOrganizationBillingResponseSchema.nullable(),\n createdAt: z.string(),\n isDefaultOrganization: z.boolean(),\n organizationId: nonEmptyStringSchema,\n roster: RootRosterSchema,\n});\n\nexport type RootIdentityOrganizationResponse = z.infer<\n typeof RootIdentityOrganizationResponseSchema\n>;\n\nexport const RootIdentityOrganizationsResponseSchema = loosePlainObject({\n organizations: arraySchema(RootIdentityOrganizationResponseSchema),\n});\n\nexport type RootIdentityOrganizationsResponse = z.infer<\n typeof RootIdentityOrganizationsResponseSchema\n>;\n\nexport function isRootIdentitiesResponse(\n value: unknown,\n): value is RootIdentitiesResponse {\n return RootIdentitiesResponseSchema.safeParse(value).success;\n}\n\nexport function isRootIdentityDetailResponse(\n value: unknown,\n): value is RootIdentityDetailResponse {\n return RootIdentityDetailResponseSchema.safeParse(value).success;\n}\n\nexport function isRootIdentityOrganizationsResponse(\n value: unknown,\n): value is RootIdentityOrganizationsResponse {\n return RootIdentityOrganizationsResponseSchema.safeParse(value).success;\n}\n"]}
1
+ {"version":3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AAc,EAAE,oBAAoB;IACpC,MAAM,EAAE,gBAAgB;CACzB,CAAC,CAAC;AAMH,MAAM,CAAC,MAAM,uCAAuC,GAAG,gBAAgB,CAAC;IACtE,aAAa,EAAE,WAAW,CAAC,sCAAsC,CAAC;CACnE,CAAC,CAAC;AAMH,MAAM,UAAU,wBAAwB,CACtC,KAAc;IAEd,OAAO,4BAA4B,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AAC/D,CAAC;AAED,MAAM,UAAU,4BAA4B,CAC1C,KAAc;IAEd,OAAO,gCAAgC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AACnE,CAAC;AAED,MAAM,UAAU,mCAAmC,CACjD,KAAc;IAEd,OAAO,uCAAuC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AAC1E,CAAC","sourcesContent":["import { z } from \"zod\";\nimport {\n arraySchema,\n loosePlainObject,\n nonEmptyStringSchema,\n nonNegativeIntegerSchema,\n sha256HexStringSchema,\n} from \"../schema\";\nimport { OrganizationBillingStatusSchema } from \"./organizationBilling\";\n\nexport const RootRosterSchema = loosePlainObject({\n disabledAt: z.string().nullable(),\n /** Whether the identity holds an open billable-seat assignment in the org. */\n holdsSeat: z.boolean(),\n joinedAt: z.string(),\n status: z.literal([\"active\", \"disabled\"]),\n /** When the member paused the org's sync to their devices; null while syncing. */\n syncPausedAt: z.string().nullable(),\n});\n\n/** Operator-facing view of one registered identity, from `GET /root/identities`. */\nexport const RootIdentitySummaryResponseSchema = loosePlainObject({\n createdAt: z.string(),\n defaultOrganizationId: nonEmptyStringSchema,\n isRoot: z.boolean(),\n lastActiveAt: z.string().nullable(),\n registrationSourceIpAddress: z.string().nullable(),\n signingKeyFingerprint: sha256HexStringSchema,\n userId: nonEmptyStringSchema,\n});\n\nexport type RootIdentitySummaryResponse = z.infer<\n typeof RootIdentitySummaryResponseSchema\n>;\n\nexport const RootIdentitiesResponseSchema = loosePlainObject({\n identities: arraySchema(RootIdentitySummaryResponseSchema),\n /** Opaque cursor for the next page; null when the listing is exhausted. */\n nextCursor: z.string().nullable(),\n});\n\nexport type RootIdentitiesResponse = z.infer<\n typeof RootIdentitiesResponseSchema\n>;\n\n/** A live session of the inspected identity; no session is the operator's. */\nexport const RootIdentitySessionResponseSchema = loosePlainObject({\n createdAt: z.string(),\n id: sha256HexStringSchema,\n ipAddresses: arraySchema(nonEmptyStringSchema),\n lastActiveAt: z.string(),\n lastActiveIp: nonEmptyStringSchema.nullable(),\n signingKeyFingerprint: z.string(),\n});\n\nexport type RootIdentitySessionResponse = z.infer<\n typeof RootIdentitySessionResponseSchema\n>;\n\nexport const RootIdentityDetailResponseSchema = loosePlainObject({\n identity: RootIdentitySummaryResponseSchema,\n sessions: arraySchema(RootIdentitySessionResponseSchema),\n});\n\nexport type RootIdentityDetailResponse = z.infer<\n typeof RootIdentityDetailResponseSchema\n>;\n\nexport const rootOrganizationBillingShape = {\n currentPeriodEndsAt: z.string().nullable(),\n disabledAt: z.string().nullable(),\n provider: z.string().nullable(),\n purgeAfter: z.string().nullable(),\n purgedAt: z.string().nullable(),\n seatCount: nonNegativeIntegerSchema,\n status: OrganizationBillingStatusSchema,\n trialEndsAt: z.string().nullable(),\n};\nexport const RootIdentityOrganizationBillingResponseSchema = loosePlainObject(\n rootOrganizationBillingShape,\n);\n\nexport type RootIdentityOrganizationBillingResponse = z.infer<\n typeof RootIdentityOrganizationBillingResponseSchema\n>;\n\nexport const RootIdentityOrganizationResponseSchema = loosePlainObject({\n /** Null only when the organization has no billing row, which is unexpected. */\n billing: RootIdentityOrganizationBillingResponseSchema.nullable(),\n createdAt: z.string(),\n isDefaultOrganization: z.boolean(),\n organizationId: nonEmptyStringSchema,\n roster: RootRosterSchema,\n});\n\nexport type RootIdentityOrganizationResponse = z.infer<\n typeof RootIdentityOrganizationResponseSchema\n>;\n\nexport const RootIdentityOrganizationsResponseSchema = loosePlainObject({\n organizations: arraySchema(RootIdentityOrganizationResponseSchema),\n});\n\nexport type RootIdentityOrganizationsResponse = z.infer<\n typeof RootIdentityOrganizationsResponseSchema\n>;\n\nexport function isRootIdentitiesResponse(\n value: unknown,\n): value is RootIdentitiesResponse {\n return RootIdentitiesResponseSchema.safeParse(value).success;\n}\n\nexport function isRootIdentityDetailResponse(\n value: unknown,\n): value is RootIdentityDetailResponse {\n return RootIdentityDetailResponseSchema.safeParse(value).success;\n}\n\nexport function isRootIdentityOrganizationsResponse(\n value: unknown,\n): value is RootIdentityOrganizationsResponse {\n return RootIdentityOrganizationsResponseSchema.safeParse(value).success;\n}\n"]}
@@ -53,6 +53,14 @@ export declare const RootOrganizationDetailResponseSchema: z.ZodType<{
53
53
  createdAt: string;
54
54
  billingStatus: "local" | "trialing" | "active" | "disabled" | "deleting" | "purged" | null;
55
55
  };
56
+ overview: {
57
+ adminGroupId: string;
58
+ memberGroupId: string;
59
+ activeMemberCount: number;
60
+ disabledMemberCount: number;
61
+ syncPausedMemberCount: number;
62
+ openSeatAssignmentCount: number;
63
+ };
56
64
  billing: {
57
65
  currentPeriodStartsAt: string | null;
58
66
  providerCustomerId: string | null;
@@ -60,6 +68,7 @@ export declare const RootOrganizationDetailResponseSchema: z.ZodType<{
60
68
  providerProductId: string | null;
61
69
  providerTransactionId: string | null;
62
70
  entitlementId: string | null;
71
+ purgeStartedAt: string | null;
63
72
  createdAt: string;
64
73
  updatedAt: string;
65
74
  currentPeriodEndsAt: string | null;
@@ -118,6 +127,14 @@ export declare const RootOrganizationDetailResponseSchema: z.ZodType<{
118
127
  createdAt: string;
119
128
  billingStatus: "local" | "trialing" | "active" | "disabled" | "deleting" | "purged" | null;
120
129
  };
130
+ overview: {
131
+ adminGroupId: string;
132
+ memberGroupId: string;
133
+ activeMemberCount: number;
134
+ disabledMemberCount: number;
135
+ syncPausedMemberCount: number;
136
+ openSeatAssignmentCount: number;
137
+ };
121
138
  billing: {
122
139
  currentPeriodStartsAt: string | null;
123
140
  providerCustomerId: string | null;
@@ -125,6 +142,7 @@ export declare const RootOrganizationDetailResponseSchema: z.ZodType<{
125
142
  providerProductId: string | null;
126
143
  providerTransactionId: string | null;
127
144
  entitlementId: string | null;
145
+ purgeStartedAt: string | null;
128
146
  createdAt: string;
129
147
  updatedAt: string;
130
148
  currentPeriodEndsAt: string | null;
@@ -183,6 +201,14 @@ export declare const RootOrganizationDetailResponseSchema: z.ZodType<{
183
201
  createdAt: string;
184
202
  billingStatus: "local" | "trialing" | "active" | "disabled" | "deleting" | "purged" | null;
185
203
  };
204
+ overview: {
205
+ adminGroupId: string;
206
+ memberGroupId: string;
207
+ activeMemberCount: number;
208
+ disabledMemberCount: number;
209
+ syncPausedMemberCount: number;
210
+ openSeatAssignmentCount: number;
211
+ };
186
212
  billing: {
187
213
  currentPeriodStartsAt: string | null;
188
214
  providerCustomerId: string | null;
@@ -190,6 +216,7 @@ export declare const RootOrganizationDetailResponseSchema: z.ZodType<{
190
216
  providerProductId: string | null;
191
217
  providerTransactionId: string | null;
192
218
  entitlementId: string | null;
219
+ purgeStartedAt: string | null;
193
220
  createdAt: string;
194
221
  updatedAt: string;
195
222
  currentPeriodEndsAt: string | null;
@@ -248,6 +275,14 @@ export declare const RootOrganizationDetailResponseSchema: z.ZodType<{
248
275
  createdAt: string;
249
276
  billingStatus: "local" | "trialing" | "active" | "disabled" | "deleting" | "purged" | null;
250
277
  };
278
+ overview: {
279
+ adminGroupId: string;
280
+ memberGroupId: string;
281
+ activeMemberCount: number;
282
+ disabledMemberCount: number;
283
+ syncPausedMemberCount: number;
284
+ openSeatAssignmentCount: number;
285
+ };
251
286
  billing: {
252
287
  currentPeriodStartsAt: string | null;
253
288
  providerCustomerId: string | null;
@@ -255,6 +290,7 @@ export declare const RootOrganizationDetailResponseSchema: z.ZodType<{
255
290
  providerProductId: string | null;
256
291
  providerTransactionId: string | null;
257
292
  entitlementId: string | null;
293
+ purgeStartedAt: string | null;
258
294
  createdAt: string;
259
295
  updatedAt: string;
260
296
  currentPeriodEndsAt: string | null;
@@ -321,8 +357,10 @@ export declare const RootOrganizationIdentityResponseSchema: z.ZodType<{
321
357
  };
322
358
  roster: {
323
359
  disabledAt: string | null;
360
+ holdsSeat: boolean;
324
361
  joinedAt: string;
325
362
  status: "active" | "disabled";
363
+ syncPausedAt: string | null;
326
364
  };
327
365
  }, {
328
366
  identity: {
@@ -336,8 +374,10 @@ export declare const RootOrganizationIdentityResponseSchema: z.ZodType<{
336
374
  };
337
375
  roster: {
338
376
  disabledAt: string | null;
377
+ holdsSeat: boolean;
339
378
  joinedAt: string;
340
379
  status: "active" | "disabled";
380
+ syncPausedAt: string | null;
341
381
  };
342
382
  }, z.core.$ZodTypeInternals<{
343
383
  identity: {
@@ -351,8 +391,10 @@ export declare const RootOrganizationIdentityResponseSchema: z.ZodType<{
351
391
  };
352
392
  roster: {
353
393
  disabledAt: string | null;
394
+ holdsSeat: boolean;
354
395
  joinedAt: string;
355
396
  status: "active" | "disabled";
397
+ syncPausedAt: string | null;
356
398
  };
357
399
  }, {
358
400
  identity: {
@@ -366,8 +408,10 @@ export declare const RootOrganizationIdentityResponseSchema: z.ZodType<{
366
408
  };
367
409
  roster: {
368
410
  disabledAt: string | null;
411
+ holdsSeat: boolean;
369
412
  joinedAt: string;
370
413
  status: "active" | "disabled";
414
+ syncPausedAt: string | null;
371
415
  };
372
416
  }>>;
373
417
  export type RootOrganizationIdentityResponse = z.infer<typeof RootOrganizationIdentityResponseSchema>;
@@ -384,8 +428,10 @@ export declare const RootOrganizationIdentitiesResponseSchema: z.ZodType<{
384
428
  };
385
429
  roster: {
386
430
  disabledAt: string | null;
431
+ holdsSeat: boolean;
387
432
  joinedAt: string;
388
433
  status: "active" | "disabled";
434
+ syncPausedAt: string | null;
389
435
  };
390
436
  }[];
391
437
  nextCursor: string | null;
@@ -402,8 +448,10 @@ export declare const RootOrganizationIdentitiesResponseSchema: z.ZodType<{
402
448
  };
403
449
  roster: {
404
450
  disabledAt: string | null;
451
+ holdsSeat: boolean;
405
452
  joinedAt: string;
406
453
  status: "active" | "disabled";
454
+ syncPausedAt: string | null;
407
455
  };
408
456
  }[];
409
457
  nextCursor: string | null;
@@ -420,8 +468,10 @@ export declare const RootOrganizationIdentitiesResponseSchema: z.ZodType<{
420
468
  };
421
469
  roster: {
422
470
  disabledAt: string | null;
471
+ holdsSeat: boolean;
423
472
  joinedAt: string;
424
473
  status: "active" | "disabled";
474
+ syncPausedAt: string | null;
425
475
  };
426
476
  }[];
427
477
  nextCursor: string | null;
@@ -438,8 +488,10 @@ export declare const RootOrganizationIdentitiesResponseSchema: z.ZodType<{
438
488
  };
439
489
  roster: {
440
490
  disabledAt: string | null;
491
+ holdsSeat: boolean;
441
492
  joinedAt: string;
442
493
  status: "active" | "disabled";
494
+ syncPausedAt: string | null;
443
495
  };
444
496
  }[];
445
497
  nextCursor: string | null;