From 71dd5247e291c6c81f3b3aef013a9219dd3f5e5f Mon Sep 17 00:00:00 2001 From: cloudpdf-sdk-bot Date: Fri, 6 Nov 2026 16:50:54 +0000 Subject: [PATCH] chore: generate CloudPDF PHP SDK 3.0.0-alpha.23 --- .fern/metadata.json | 8 +- README.md | 1 + cloudpdf-generation.json | 10 +- reference.md | 280 ++++++++--------- src/CloudPDFClient.php | 10 +- src/Core/Client/RawClient.php | 20 ++ src/Core/Json/JsonSerializableType.php | 12 +- src/Doc/Annotations/AnnotationsClient.php | 86 +++--- src/Doc/DocClient.php | 44 +-- src/Doc/Fonts/Programs/ProgramsClient.php | 16 +- src/Doc/Forms/FormsClient.php | 74 ++--- src/Doc/Pages/PagesClient.php | 44 +-- src/Doc/Redactions/RedactionsClient.php | 8 +- src/Doc/Requests/DocDownloadLinkRequest.php | 10 +- src/Doc/Signatures/SignaturesClient.php | 40 +-- src/Doc/Versions/VersionsClient.php | 68 ++--- src/Documents/DocumentsClient.php | 100 +++--- src/Documents/Layers/LayersClient.php | 22 +- .../Requests/DocumentsInitRequest.php | 20 +- src/Folders/FoldersClient.php | 34 +-- .../Requests/FoldersMoveIntoRequest.php | 10 +- src/Grants/GrantsClient.php | 48 +-- src/Grants/Requests/GrantsCreateRequest.php | 10 +- src/Grants/Requests/GrantsUpdateRequest.php | 10 +- src/Grants/Visitors/VisitorsClient.php | 8 +- src/Tenants/TenantsClient.php | 40 +-- src/Tokens/Requests/TokensRevokeRequest.php | 12 +- src/Tokens/TokensClient.php | 10 +- src/Types/Annotation.php | 3 + src/Types/AnnotationDraftWidget.php | 24 +- src/Types/AnnotationLine.php | 14 +- src/Types/AnnotationLineMeasureGeospatial.php | 26 -- .../AnnotationLineMeasureRectilinear.php | 99 ------ ...otationLineMeasureRectilinearAngleItem.php | 106 ------- ...ineMeasureRectilinearAngleItemFraction.php | 11 - ...asureRectilinearAngleItemLabelPosition.php | 9 - ...tionLineMeasureRectilinearDistanceItem.php | 106 ------- ...MeasureRectilinearDistanceItemFraction.php | 11 - ...reRectilinearDistanceItemLabelPosition.php | 9 - ...otationLineMeasureRectilinearSlopeItem.php | 106 ------- ...ineMeasureRectilinearSlopeItemFraction.php | 11 - ...asureRectilinearSlopeItemLabelPosition.php | 9 - src/Types/AnnotationLink.php | 2 +- src/Types/AnnotationMutationMeta.php | 10 +- src/Types/AnnotationPolygon.php | 6 +- src/Types/AnnotationPolygonMeasure.php | 241 --------------- .../AnnotationPolygonMeasureGeospatial.php | 26 -- .../AnnotationPolygonMeasureRectilinear.php | 99 ------ ...tionPolygonMeasureRectilinearAngleItem.php | 106 ------- ...gonMeasureRectilinearAngleItemFraction.php | 11 - ...asureRectilinearAngleItemLabelPosition.php | 9 - ...ationPolygonMeasureRectilinearAreaItem.php | 106 ------- ...ygonMeasureRectilinearAreaItemFraction.php | 11 - ...easureRectilinearAreaItemLabelPosition.php | 9 - ...nPolygonMeasureRectilinearDistanceItem.php | 106 ------- ...MeasureRectilinearDistanceItemFraction.php | 11 - ...reRectilinearDistanceItemLabelPosition.php | 9 - ...otationPolygonMeasureRectilinearOrigin.php | 42 --- ...tionPolygonMeasureRectilinearSlopeItem.php | 106 ------- ...gonMeasureRectilinearSlopeItemFraction.php | 11 - ...asureRectilinearSlopeItemLabelPosition.php | 9 - ...notationPolygonMeasureRectilinearYItem.php | 106 ------- ...PolygonMeasureRectilinearYItemFraction.php | 11 - ...onMeasureRectilinearYItemLabelPosition.php | 9 - src/Types/AnnotationPolyline.php | 6 +- src/Types/AnnotationPolylineMeasure.php | 241 --------------- .../AnnotationPolylineMeasureGeospatial.php | 26 -- .../AnnotationPolylineMeasureRectilinear.php | 99 ------ ...ionPolylineMeasureRectilinearAngleItem.php | 106 ------- ...ineMeasureRectilinearAngleItemFraction.php | 11 - ...asureRectilinearAngleItemLabelPosition.php | 9 - ...tionPolylineMeasureRectilinearAreaItem.php | 106 ------- ...lineMeasureRectilinearAreaItemFraction.php | 11 - ...easureRectilinearAreaItemLabelPosition.php | 9 - ...PolylineMeasureRectilinearDistanceItem.php | 106 ------- ...MeasureRectilinearDistanceItemFraction.php | 11 - ...reRectilinearDistanceItemLabelPosition.php | 9 - ...tationPolylineMeasureRectilinearOrigin.php | 42 --- ...ionPolylineMeasureRectilinearSlopeItem.php | 106 ------- ...ineMeasureRectilinearSlopeItemFraction.php | 11 - ...asureRectilinearSlopeItemLabelPosition.php | 9 - ...otationPolylineMeasureRectilinearXItem.php | 106 ------- ...olylineMeasureRectilinearXItemFraction.php | 11 - ...neMeasureRectilinearXItemLabelPosition.php | 9 - ...otationPolylineMeasureRectilinearYItem.php | 106 ------- ...olylineMeasureRectilinearYItemFraction.php | 11 - ...neMeasureRectilinearYItemLabelPosition.php | 9 - .../AnnotationPolylineMeasureUnknown.php | 26 -- src/Types/Attachment.php | 20 +- src/Types/AttachmentFileInfo.php | 20 +- src/Types/AttachmentMutationMeta.php | 10 +- src/Types/CacheDelta.php | 8 + src/Types/ChangeItemFormsDeleteWidget.php | 2 +- src/Types/ChangeItemFormsRestoreWidget.php | 2 +- .../ChangeItemPagesCopyLayoutPagesItem.php | 6 +- .../ChangeItemPagesDeleteLayoutPagesItem.php | 6 +- ...ngeItemPagesInsertBlankLayoutPagesItem.php | 6 +- .../ChangeItemPagesInsertLayoutPagesItem.php | 6 +- .../ChangeItemPagesReorderLayoutPagesItem.php | 6 +- .../ChangeItemPagesRestoreLayoutPagesItem.php | 6 +- src/Types/ChangeItemPagesRotate.php | 6 +- .../ChangeItemPagesRotateLayoutPagesItem.php | 6 +- src/Types/ChangeOpPagesRotate.php | 6 +- src/Types/DeploymentLicenseStatusResponse.php | 29 +- ...e.php => DocAnnotationsCreateResponse.php} | 2 +- ...e.php => DocAnnotationsDeleteResponse.php} | 2 +- ....php => DocAnnotationsFlattenResponse.php} | 12 +- ...AnnotationsFlattenResponseResultsItem.php} | 6 +- ...tionsFlattenResponseResultsItemStatus.php} | 2 +- ...=> DocAnnotationsFlattenResponseUsage.php} | 2 +- ....php => DocAnnotationsReorderResponse.php} | 2 +- ...e.php => DocAnnotationsUpdateResponse.php} | 8 +- ...ocAnnotationsUpdateResponseAppearance.php} | 6 +- ...tationsUpdateResponseAppearanceAction.php} | 2 +- ...200Response.php => DocChangesResponse.php} | 8 +- ....php => DocChangesResponseChangesItem.php} | 46 +-- ... DocChangesResponseChangesItemApplied.php} | 2 +- ... DocChangesResponseChangesItemRefused.php} | 8 +- ...sponse.php => DocDownloadLinkResponse.php} | 12 +- ...e.php => DocFormsDeleteWidgetResponse.php} | 4 +- ...0Response.php => DocFormsListResponse.php} | 6 +- ...d.php => DocFormsListResponseFormKind.php} | 2 +- ...> DocFormsReorderCalculationsResponse.php} | 2 +- ...php => DocFormsReorderWidgetsResponse.php} | 2 +- ...Response.php => DocFormsResetResponse.php} | 2 +- ...ponse.php => DocFormsSetValueResponse.php} | 2 +- ...e.php => DocFormsUpdateWidgetResponse.php} | 8 +- ...ocFormsUpdateWidgetResponseAppearance.php} | 6 +- ...sUpdateWidgetResponseAppearanceAction.php} | 2 +- src/Types/DocHead200Response.php | 90 ------ src/Types/DocHeadResponse.php | 99 ++++++ ...seAccess.php => DocHeadResponseAccess.php} | 6 +- ...p => DocHeadResponseAccessReasonsItem.php} | 2 +- ...tion.php => DocHeadResponseEncryption.php} | 6 +- ...php => DocHeadResponseEncryptionState.php} | 2 +- ...ons.php => DocHeadResponsePermissions.php} | 16 +- ...=> DocHeadResponsePermissionsOpenedAs.php} | 2 +- ...onseState.php => DocHeadResponseState.php} | 2 +- ...00ResponseProtectionFieldLocksItemSpec.php | 51 ---- ...onseProtectionFieldLocksItemSpecAction.php | 10 - ...ocManifest200ResponseScopesAnnotations.php | 9 - ...ocManifest200ResponseScopesAttachments.php | 9 - .../DocManifest200ResponseScopesMetadata.php | 9 - .../DocManifest200ResponseScopesOutline.php | 9 - ...00Response.php => DocManifestResponse.php} | 50 +-- ...m.php => DocManifestResponsePagesItem.php} | 8 +- ... => DocManifestResponsePagesItemCache.php} | 2 +- ....php => DocManifestResponseProtection.php} | 22 +- ...nifestResponseProtectionCertification.php} | 8 +- ...DocManifestResponseProtectionEnforced.php} | 2 +- ...ifestResponseProtectionFieldLocksItem.php} | 12 +- ...esponseProtectionFieldLocksItemSource.php} | 2 +- ...> DocManifestResponseProtectionJudged.php} | 2 +- ...opes.php => DocManifestResponseScopes.php} | 34 +-- ...p => DocManifestResponseScopesActions.php} | 2 +- .../DocManifestResponseScopesAnnotations.php | 9 + .../DocManifestResponseScopesAttachments.php | 9 + ...p => DocManifestResponseScopesContent.php} | 2 +- ...php => DocManifestResponseScopesForms.php} | 2 +- ...hp => DocManifestResponseScopesLayout.php} | 2 +- .../DocManifestResponseScopesMetadata.php | 9 + .../DocManifestResponseScopesOutline.php | 9 + ...sponse.php => DocPagesFlattenResponse.php} | 12 +- ...=> DocPagesFlattenResponseResultsItem.php} | 6 +- ...PagesFlattenResponseResultsItemStatus.php} | 2 +- ...e.php => DocPagesFlattenResponseUsage.php} | 2 +- ...onseLayoutNamedPagesItemTargetDangling.php | 26 -- ...oveName200ResponseLayoutPagesItemBoxes.php | 66 ---- ...Name200ResponseLayoutPagesItemBoxesArt.php | 58 ---- ...me200ResponseLayoutPagesItemBoxesBleed.php | 58 ---- ...ame200ResponseLayoutPagesItemBoxesCrop.php | 58 ---- ...me200ResponseLayoutPagesItemBoxesMedia.php | 58 ---- ...ame200ResponseLayoutPagesItemBoxesTrim.php | 58 ---- ...nse.php => DocPagesRemoveNameResponse.php} | 8 +- ...p => DocPagesRemoveNameResponseLayout.php} | 20 +- ...gesRemoveNameResponseLayoutLabelsItem.php} | 6 +- ...moveNameResponseLayoutLabelsItemStyle.php} | 2 +- ...emoveNameResponseLayoutNamedPagesItem.php} | 8 +- ...ameResponseLayoutNamedPagesItemTarget.php} | 68 ++--- ...nseLayoutNamedPagesItemTargetDangling.php} | 2 +- ...esponseLayoutNamedPagesItemTargetPage.php} | 2 +- ...nseLayoutNamedPagesItemTargetTemplate.php} | 2 +- ...agesRemoveNameResponseLayoutPagesItem.php} | 30 +- ...RemoveNameResponseLayoutPagesItemBoxes.php | 66 ++++ ...veNameResponseLayoutPagesItemBoxesArt.php} | 2 +- ...NameResponseLayoutPagesItemBoxesBleed.php} | 2 +- ...eNameResponseLayoutPagesItemBoxesCrop.php} | 2 +- ...NameResponseLayoutPagesItemBoxesMedia.php} | 2 +- ...eNameResponseLayoutPagesItemBoxesTrim.php} | 2 +- ...NameResponseLayoutPagesItemPdfCropBox.php} | 2 +- ...RemoveNameResponseLayoutPagesItemSize.php} | 2 +- ...veNameResponseLayoutPagesItemTabOrder.php} | 2 +- ...SetName200ResponseLayoutPagesItemBoxes.php | 66 ---- ...sponse.php => DocPagesSetNameResponse.php} | 8 +- ....php => DocPagesSetNameResponseLayout.php} | 20 +- ...cPagesSetNameResponseLayoutLabelsItem.php} | 6 +- ...sSetNameResponseLayoutLabelsItemStyle.php} | 2 +- ...esSetNameResponseLayoutNamedPagesItem.php} | 8 +- ...ameResponseLayoutNamedPagesItemTarget.php} | 68 ++--- ...nseLayoutNamedPagesItemTargetDangling.php} | 2 +- ...esponseLayoutNamedPagesItemTargetPage.php} | 2 +- ...nseLayoutNamedPagesItemTargetTemplate.php} | 2 +- ...ocPagesSetNameResponseLayoutPagesItem.php} | 30 +- ...gesSetNameResponseLayoutPagesItemBoxes.php | 66 ++++ ...SetNameResponseLayoutPagesItemBoxesArt.php | 58 ++++ ...tNameResponseLayoutPagesItemBoxesBleed.php | 58 ++++ ...etNameResponseLayoutPagesItemBoxesCrop.php | 58 ++++ ...tNameResponseLayoutPagesItemBoxesMedia.php | 58 ++++ ...etNameResponseLayoutPagesItemBoxesTrim.php | 58 ++++ ...NameResponseLayoutPagesItemPdfCropBox.php} | 2 +- ...gesSetNameResponseLayoutPagesItemSize.php} | 2 +- ...etNameResponseLayoutPagesItemTabOrder.php} | 2 +- ...ponse.php => DocPagesSetScaleResponse.php} | 2 +- ...ewports200ResponseViewportsItemMeasure.php | 241 --------------- ...ResponseViewportsItemMeasureGeospatial.php | 26 -- ...esponseViewportsItemMeasureRectilinear.php | 99 ------ ...ewportsItemMeasureRectilinearAngleItem.php | 106 ------- ...temMeasureRectilinearAngleItemFraction.php | 11 - ...asureRectilinearAngleItemLabelPosition.php | 9 - ...iewportsItemMeasureRectilinearAreaItem.php | 106 ------- ...ItemMeasureRectilinearAreaItemFraction.php | 11 - ...easureRectilinearAreaItemLabelPosition.php | 9 - ...ortsItemMeasureRectilinearDistanceItem.php | 106 ------- ...MeasureRectilinearDistanceItemFraction.php | 11 - ...reRectilinearDistanceItemLabelPosition.php | 9 - ...eViewportsItemMeasureRectilinearOrigin.php | 42 --- ...ewportsItemMeasureRectilinearSlopeItem.php | 106 ------- ...temMeasureRectilinearSlopeItemFraction.php | 11 - ...asureRectilinearSlopeItemLabelPosition.php | 9 - ...seViewportsItemMeasureRectilinearXItem.php | 106 ------- ...rtsItemMeasureRectilinearXItemFraction.php | 11 - ...emMeasureRectilinearXItemLabelPosition.php | 9 - ...seViewportsItemMeasureRectilinearYItem.php | 106 ------- ...rtsItemMeasureRectilinearYItemFraction.php | 11 - ...emMeasureRectilinearYItemLabelPosition.php | 9 - ...200ResponseViewportsItemMeasureUnknown.php | 26 -- ...onse.php => DocPagesViewportsResponse.php} | 8 +- ...ocPagesViewportsResponseViewportsItem.php} | 14 +- ...gesViewportsResponseViewportsItemBbox.php} | 2 +- ...nse.php => DocRedactionsApplyResponse.php} | 14 +- ...DocRedactionsApplyResponseResultsItem.php} | 6 +- ...actionsApplyResponseResultsItemStatus.php} | 2 +- ...hp => DocRedactionsApplyResponseScope.php} | 2 +- ....php => DocSignaturesAnalysisResponse.php} | 46 +-- ...=> DocSignaturesAnalysisResponseBasis.php} | 12 +- ...SignaturesAnalysisResponseBasisSource.php} | 2 +- ...ignaturesAnalysisResponseBasisVersion.php} | 12 +- ... DocSignaturesAnalysisResponseCurrent.php} | 22 +- ...esAnalysisResponseCurrentFindingsItem.php} | 6 +- ...sisResponseCurrentFindingsItemVerdict.php} | 2 +- ...gnaturesAnalysisResponseCurrentMethod.php} | 2 +- ...naturesAnalysisResponseCurrentPrimary.php} | 6 +- ...AnalysisResponseCurrentPrimaryVerdict.php} | 2 +- ...naturesAnalysisResponseCurrentVerdict.php} | 2 +- ...=> DocSignaturesAnalysisResponseLater.php} | 2 +- ... => DocSignaturesAnalysisResponseMode.php} | 2 +- ...turesAnalysisResponseRestrictionsItem.php} | 12 +- ...nalysisResponseRestrictionsItemSource.php} | 2 +- ...=> DocSignaturesAnalysisResponseSince.php} | 2 +- ...=> DocSignaturesAnalysisResponseUntil.php} | 2 +- ... DocSignaturesAnalysisResponseVerdict.php} | 2 +- ...se.php => DocSignaturesCancelResponse.php} | 6 +- ... => DocSignaturesCancelResponseStatus.php} | 2 +- ...sComplete200ResponseProtectionEnforced.php | 11 - ...00ResponseProtectionFieldLocksItemSpec.php | 51 ---- ...onseProtectionFieldLocksItemSpecAction.php | 10 - ...resComplete200ResponseProtectionJudged.php | 11 - ...esComplete200ResponseSignatureFieldMdp.php | 51 ---- ...lete200ResponseSignatureFieldMdpAction.php | 10 - ....php => DocSignaturesCompleteResponse.php} | 30 +- ...DocSignaturesCompleteResponsePrevious.php} | 2 +- ...cSignaturesCompleteResponseProtection.php} | 22 +- ...mpleteResponseProtectionCertification.php} | 10 +- ...uresCompleteResponseProtectionEnforced.php | 11 + ...pleteResponseProtectionFieldLocksItem.php} | 14 +- ...esponseProtectionFieldLocksItemSource.php} | 2 +- ...turesCompleteResponseProtectionJudged.php} | 2 +- ...ocSignaturesCompleteResponseSignature.php} | 50 +-- ...uresCompleteResponseSignatureCoverage.php} | 2 +- ...gnaturesCompleteResponseSignatureKind.php} | 2 +- ...resCompleteResponseSignatureSeedValue.php} | 68 +++-- ...aturesCompleteResponseSignatureSigner.php} | 2 +- ...> DocSignaturesCompleteResponseStatus.php} | 2 +- ... DocSignaturesCompleteResponseVersion.php} | 12 +- ...00ResponseProtectionFieldLocksItemSpec.php | 51 ---- ...onseProtectionFieldLocksItemSpecAction.php | 10 - ...sList200ResponseSignaturesItemFieldMdp.php | 51 ---- ...00ResponseSignaturesItemFieldMdpAction.php | 10 - ...turesList200ResponseSignaturesItemLock.php | 51 ---- ...ist200ResponseSignaturesItemLockAction.php | 10 - ...onse.php => DocSignaturesListResponse.php} | 20 +- ...> DocSignaturesListResponseProtection.php} | 22 +- ...esListResponseProtectionCertification.php} | 10 +- ...naturesListResponseProtectionEnforced.php} | 2 +- ...sListResponseProtectionFieldLocksItem.php} | 14 +- ...esponseProtectionFieldLocksItemSource.php} | 2 +- ...SignaturesListResponseProtectionJudged.php | 11 + ...ocSignaturesListResponseRevisionsItem.php} | 2 +- ...cSignaturesListResponseSignaturesItem.php} | 50 +-- ...resListResponseSignaturesItemCoverage.php} | 2 +- ...naturesListResponseSignaturesItemKind.php} | 2 +- ...esListResponseSignaturesItemSeedValue.php} | 68 +++-- ...turesListResponseSignaturesItemSigner.php} | 2 +- ...e.php => DocSignaturesPrepareResponse.php} | 32 +- ...DocSignaturesPrepareResponseAlgorithm.php} | 2 +- ...naturesPrepareResponseExpectedVersion.php} | 2 +- ...ext200Response.php => DocTextResponse.php} | 2 +- ...se.php => DocVersionsAnalysisResponse.php} | 46 +-- ...p => DocVersionsAnalysisResponseBasis.php} | 12 +- ...ocVersionsAnalysisResponseBasisSource.php} | 2 +- ...cVersionsAnalysisResponseBasisVersion.php} | 12 +- ...=> DocVersionsAnalysisResponseCurrent.php} | 22 +- ...nsAnalysisResponseCurrentFindingsItem.php} | 6 +- ...sisResponseCurrentFindingsItemVerdict.php} | 2 +- ...VersionsAnalysisResponseCurrentMethod.php} | 2 +- ...ersionsAnalysisResponseCurrentPrimary.php} | 6 +- ...AnalysisResponseCurrentPrimaryVerdict.php} | 2 +- ...ersionsAnalysisResponseCurrentVerdict.php} | 2 +- ...p => DocVersionsAnalysisResponseLater.php} | 2 +- ...hp => DocVersionsAnalysisResponseMode.php} | 2 +- ...sionsAnalysisResponseRestrictionsItem.php} | 12 +- ...nalysisResponseRestrictionsItemSource.php} | 2 +- ...p => DocVersionsAnalysisResponseSince.php} | 2 +- ...p => DocVersionsAnalysisResponseUntil.php} | 2 +- ...=> DocVersionsAnalysisResponseVerdict.php} | 2 +- ...sponse.php => DocVersionsListResponse.php} | 18 +- ...> DocVersionsListResponseVersionsItem.php} | 26 +- ...sionsListResponseVersionsItemProducer.php} | 2 +- ...ignatures200ResponseProtectionEnforced.php | 11 - ...00ResponseProtectionFieldLocksItemSpec.php | 51 ---- ...onseProtectionFieldLocksItemSpecAction.php | 10 - ...sSignatures200ResponseProtectionJudged.php | 11 - ...tures200ResponseSignaturesItemFieldMdp.php | 51 ---- ...00ResponseSignaturesItemFieldMdpAction.php | 10 - ...ignatures200ResponseSignaturesItemLock.php | 51 ---- ...res200ResponseSignaturesItemLockAction.php | 10 - ....php => DocVersionsSignaturesResponse.php} | 20 +- ...cVersionsSignaturesResponseProtection.php} | 22 +- ...aturesResponseProtectionCertification.php} | 10 +- ...nsSignaturesResponseProtectionEnforced.php | 11 + ...turesResponseProtectionFieldLocksItem.php} | 14 +- ...esponseProtectionFieldLocksItemSource.php} | 2 +- ...ionsSignaturesResponseProtectionJudged.php | 11 + ...rsionsSignaturesResponseRevisionsItem.php} | 2 +- ...sionsSignaturesResponseSignaturesItem.php} | 50 +-- ...naturesResponseSignaturesItemCoverage.php} | 2 +- ...sSignaturesResponseSignaturesItemKind.php} | 2 +- ...aturesResponseSignaturesItemSeedValue.php} | 68 +++-- ...ignaturesResponseSignaturesItemSigner.php} | 2 +- ...sponse.php => DocumentsCommitResponse.php} | 8 +- ...hp => DocumentsCommitResponseDocument.php} | 52 ++-- ... DocumentsCommitResponseDocumentState.php} | 2 +- ...sCommitResponseDocumentThumbnailState.php} | 2 +- ...0Response.php => DocumentsGetResponse.php} | 8 +- ...t.php => DocumentsGetResponseDocument.php} | 52 ++-- ... => DocumentsGetResponseDocumentState.php} | 2 +- ...entsGetResponseDocumentThumbnailState.php} | 2 +- src/Types/DocumentsImportFrom200Response.php | 10 +- ...DocumentsImportFrom200ResponseDocument.php | 46 +-- ... DocumentsImportFrom200ResponseStatus.php} | 2 +- src/Types/DocumentsImportFrom202Response.php | 10 +- ...DocumentsImportFrom202ResponseDocument.php | 46 +-- ... DocumentsImportFrom202ResponseStatus.php} | 2 +- ...ntsInit200ResponseCreatedDocumentState.php | 11 - ...0ResponseCreatedDocumentThumbnailState.php | 11 - ...eCreatedUploadPresignedPresignedMethod.php | 8 - ...ntsInit200ResponseDedupedDocumentState.php | 11 - ...0ResponseDedupedDocumentThumbnailState.php | 11 - ...ocumentsInit200ResponseResumedDocument.php | 147 --------- ...ntsInit200ResponseResumedDocumentState.php | 11 - ...0ResponseResumedDocumentThumbnailState.php | 11 - ...eResumedUploadPresignedPresignedMethod.php | 8 - ...Response.php => DocumentsInitResponse.php} | 108 +++---- ...d.php => DocumentsInitResponseCreated.php} | 14 +- ... DocumentsInitResponseCreatedDocument.php} | 52 ++-- ...umentsInitResponseCreatedDocumentState.php | 11 + ...ResponseCreatedDocumentThumbnailState.php} | 2 +- ...=> DocumentsInitResponseCreatedUpload.php} | 46 +-- ...ntsInitResponseCreatedUploadPresigned.php} | 8 +- ...sponseCreatedUploadPresignedPresigned.php} | 16 +- ...eCreatedUploadPresignedPresignedMethod.php | 8 + ...cumentsInitResponseCreatedUploadProxy.php} | 2 +- ...d.php => DocumentsInitResponseDeduped.php} | 8 +- .../DocumentsInitResponseDedupedDocument.php | 149 +++++++++ ...umentsInitResponseDedupedDocumentState.php | 11 + ...tResponseDedupedDocumentThumbnailState.php | 11 + ...d.php => DocumentsInitResponseResumed.php} | 14 +- .../DocumentsInitResponseResumedDocument.php | 149 +++++++++ ...umentsInitResponseResumedDocumentState.php | 11 + ...tResponseResumedDocumentThumbnailState.php | 11 + ...=> DocumentsInitResponseResumedUpload.php} | 46 +-- ...ntsInitResponseResumedUploadPresigned.php} | 8 +- ...sponseResumedUploadPresignedPresigned.php} | 16 +- ...eResumedUploadPresignedPresignedMethod.php | 8 + ...cumentsInitResponseResumedUploadProxy.php} | 2 +- ...se.php => DocumentsLayersListResponse.php} | 8 +- ...DocumentsLayersListResponseLayersItem.php} | 38 +-- .../DocumentsList200ResponseDocumentsItem.php | 147 --------- ...mentsList200ResponseDocumentsItemState.php | 11 - ...Response.php => DocumentsListResponse.php} | 8 +- ...=> DocumentsListResponseDocumentsItem.php} | 52 ++-- ...cumentsListResponseDocumentsItemState.php} | 2 +- ...stResponseDocumentsItemThumbnailState.php} | 2 +- src/Types/DocumentsThumbnailResponse.php | 34 --- src/Types/DocumentsThumbnailResponseError.php | 50 --- ...sponse.php => DocumentsUpdateResponse.php} | 8 +- ...hp => DocumentsUpdateResponseDocument.php} | 52 ++-- .../DocumentsUpdateResponseDocumentState.php | 11 + ...tsUpdateResponseDocumentThumbnailState.php | 11 + ...e.php => DocumentsUploadProxyResponse.php} | 2 +- ...nErrorPayloadError.php => EngineError.php} | 8 +- ...rorPayloadCode.php => EngineErrorCode.php} | 16 +- src/Types/EngineErrorPayload.php | 59 ---- src/Types/EngineErrorPayloadName.php | 8 - ...dminErrorPayload.php => ErrorResponse.php} | 8 +- ...nseSignatureLock.php => FieldLockSpec.php} | 12 +- ...LockAction.php => FieldLockSpecAction.php} | 2 +- ...Response.php => FoldersCreateResponse.php} | 8 +- ...er.php => FoldersCreateResponseFolder.php} | 20 +- ...200Response.php => FoldersGetResponse.php} | 14 +- ...sItem.php => FoldersGetResponseFolder.php} | 20 +- ...tem.php => FoldersGetResponsePathItem.php} | 2 +- ...00Response.php => FoldersListResponse.php} | 8 +- ...php => FoldersListResponseFoldersItem.php} | 20 +- ...Response.php => FoldersUpdateResponse.php} | 8 +- ...er.php => FoldersUpdateResponseFolder.php} | 20 +- src/Types/FontProgram.php | 20 +- src/Types/FontProgramInfo.php | 20 +- src/Types/FormField.php | 95 +++--- src/Types/FormFieldCheckbox.php | 12 +- .../FormFieldCheckboxDefaultValueEntry.php | 286 ------------------ ...ormFieldCheckboxDefaultValueEntryArray.php | 35 --- ...FormFieldCheckboxDefaultValueEntryNone.php | 26 -- ...rmFieldCheckboxDefaultValueEntryScalar.php | 34 --- ...ldCheckboxDefaultValueEntryUnsupported.php | 26 -- src/Types/FormFieldCheckboxValueEntry.php | 286 ------------------ .../FormFieldCheckboxValueEntryArray.php | 35 --- src/Types/FormFieldCheckboxValueEntryNone.php | 26 -- .../FormFieldCheckboxValueEntryScalar.php | 34 --- ...FormFieldCheckboxValueEntryUnsupported.php | 26 -- src/Types/FormFieldCombobox.php | 12 +- .../FormFieldComboboxDefaultValueEntry.php | 286 ------------------ ...ormFieldComboboxDefaultValueEntryArray.php | 35 --- ...FormFieldComboboxDefaultValueEntryNone.php | 26 -- ...rmFieldComboboxDefaultValueEntryScalar.php | 34 --- ...ldComboboxDefaultValueEntryUnsupported.php | 26 -- src/Types/FormFieldComboboxValueEntry.php | 286 ------------------ .../FormFieldComboboxValueEntryArray.php | 35 --- src/Types/FormFieldComboboxValueEntryNone.php | 26 -- .../FormFieldComboboxValueEntryScalar.php | 34 --- ...FormFieldComboboxValueEntryUnsupported.php | 26 -- src/Types/FormFieldDraft.php | 84 ++--- src/Types/FormFieldListbox.php | 12 +- .../FormFieldListboxDefaultValueEntry.php | 286 ------------------ ...FormFieldListboxDefaultValueEntryArray.php | 35 --- .../FormFieldListboxDefaultValueEntryNone.php | 26 -- ...ormFieldListboxDefaultValueEntryScalar.php | 34 --- ...eldListboxDefaultValueEntryUnsupported.php | 26 -- src/Types/FormFieldListboxValueEntry.php | 286 ------------------ src/Types/FormFieldListboxValueEntryArray.php | 35 --- .../FormFieldListboxValueEntryScalar.php | 34 --- .../FormFieldListboxValueEntryUnsupported.php | 26 -- src/Types/FormFieldPatch.php | 10 +- ...PatchFamily.php => FormFieldPatchKind.php} | 2 +- src/Types/FormFieldPushbutton.php | 12 +- .../FormFieldPushbuttonDefaultValueEntry.php | 286 ------------------ ...mFieldPushbuttonDefaultValueEntryArray.php | 35 --- ...rmFieldPushbuttonDefaultValueEntryNone.php | 26 -- ...FieldPushbuttonDefaultValueEntryScalar.php | 34 --- ...PushbuttonDefaultValueEntryUnsupported.php | 26 -- src/Types/FormFieldPushbuttonValueEntry.php | 286 ------------------ .../FormFieldPushbuttonValueEntryArray.php | 35 --- .../FormFieldPushbuttonValueEntryNone.php | 26 -- .../FormFieldPushbuttonValueEntryScalar.php | 34 --- ...rmFieldPushbuttonValueEntryUnsupported.php | 26 -- src/Types/FormFieldRadio.php | 12 +- src/Types/FormFieldRadioDefaultValueEntry.php | 286 ------------------ .../FormFieldRadioDefaultValueEntryArray.php | 35 --- .../FormFieldRadioDefaultValueEntryNone.php | 26 -- .../FormFieldRadioDefaultValueEntryScalar.php | 34 --- ...FieldRadioDefaultValueEntryUnsupported.php | 26 -- src/Types/FormFieldRadioValueEntry.php | 286 ------------------ src/Types/FormFieldRadioValueEntryArray.php | 35 --- src/Types/FormFieldRadioValueEntryScalar.php | 34 --- .../FormFieldRadioValueEntryUnsupported.php | 26 -- src/Types/FormFieldSignature.php | 12 +- .../FormFieldSignatureDefaultValueEntry.php | 286 ------------------ ...rmFieldSignatureDefaultValueEntryArray.php | 35 --- ...ormFieldSignatureDefaultValueEntryNone.php | 26 -- ...mFieldSignatureDefaultValueEntryScalar.php | 34 --- ...dSignatureDefaultValueEntryUnsupported.php | 26 -- src/Types/FormFieldSignatureValueEntry.php | 286 ------------------ .../FormFieldSignatureValueEntryArray.php | 35 --- .../FormFieldSignatureValueEntryNone.php | 26 -- .../FormFieldSignatureValueEntryScalar.php | 34 --- ...ormFieldSignatureValueEntryUnsupported.php | 26 -- src/Types/FormFieldText.php | 12 +- src/Types/FormFieldTextDefaultValueEntry.php | 286 ------------------ .../FormFieldTextDefaultValueEntryArray.php | 35 --- .../FormFieldTextDefaultValueEntryNone.php | 26 -- .../FormFieldTextDefaultValueEntryScalar.php | 34 --- ...mFieldTextDefaultValueEntryUnsupported.php | 26 -- .../FormFieldTextValueEntryUnsupported.php | 26 -- src/Types/FormFieldUnknown.php | 12 +- .../FormFieldUnknownDefaultValueEntry.php | 286 ------------------ ...FormFieldUnknownDefaultValueEntryArray.php | 35 --- .../FormFieldUnknownDefaultValueEntryNone.php | 26 -- ...ormFieldUnknownDefaultValueEntryScalar.php | 34 --- ...eldUnknownDefaultValueEntryUnsupported.php | 26 -- src/Types/FormFieldUnknownValueEntry.php | 286 ------------------ src/Types/FormFieldUnknownValueEntryArray.php | 35 --- src/Types/FormFieldUnknownValueEntryNone.php | 26 -- .../FormFieldUnknownValueEntryScalar.php | 34 --- .../FormFieldUnknownValueEntryUnsupported.php | 26 -- ...dTextValueEntry.php => FormValueEntry.php} | 93 +++--- ...EntryArray.php => FormValueEntryArray.php} | 2 +- ...ueEntryNone.php => FormValueEntryNone.php} | 2 +- ...tryScalar.php => FormValueEntryScalar.php} | 2 +- ...None.php => FormValueEntryUnsupported.php} | 2 +- ...GrantsArchive200ResponseGrantLayerMode.php | 9 - ...Response.php => GrantsArchiveResponse.php} | 8 +- ...tem.php => GrantsArchiveResponseGrant.php} | 72 ++--- ...> GrantsArchiveResponseGrantLayerMode.php} | 2 +- ...tsArchiveResponseGrantVisitorIdentity.php} | 12 +- ...rchiveResponseGrantVisitorIdentityAsk.php} | 2 +- ...iveResponseGrantVisitorIdentityFields.php} | 22 +- ...GrantVisitorIdentityFieldsDisplayName.php} | 2 +- ...esponseGrantVisitorIdentityFieldsEmail.php | 9 + ...GrantVisitorIdentityFieldsOrganization.php | 9 + ...isitorIdentityFieldsOrganizationalUnit.php | 9 + ...esponseGrantVisitorIdentityFieldsTitle.php | 9 + ...0Response.php => GrantsCreateResponse.php} | 8 +- ...rant.php => GrantsCreateResponseGrant.php} | 72 ++--- ...=> GrantsCreateResponseGrantLayerMode.php} | 2 +- ...ntsCreateResponseGrantVisitorIdentity.php} | 12 +- ...CreateResponseGrantVisitorIdentityAsk.php} | 2 +- ...ateResponseGrantVisitorIdentityFields.php} | 22 +- ...GrantVisitorIdentityFieldsDisplayName.php} | 2 +- ...sponseGrantVisitorIdentityFieldsEmail.php} | 2 +- ...rantVisitorIdentityFieldsOrganization.php} | 2 +- ...sitorIdentityFieldsOrganizationalUnit.php} | 2 +- ...sponseGrantVisitorIdentityFieldsTitle.php} | 2 +- ...00ResponseVisitorIdentityRequestFields.php | 66 ---- ...isitorIdentityRequestFieldsDisplayName.php | 9 - ...sitorIdentityRequestFieldsOrganization.php | 9 - ...dentityRequestFieldsOrganizationalUnit.php | 9 - ...esponse.php => GrantsExchangeResponse.php} | 22 +- ...hp => GrantsExchangeResponseLayerMode.php} | 2 +- ....php => GrantsExchangeResponseVisitor.php} | 8 +- ...xchangeResponseVisitorIdentityRequest.php} | 16 +- ...eResponseVisitorIdentityRequestFields.php} | 22 +- ...sitorIdentityRequestFieldsDisplayName.php} | 2 +- ...onseVisitorIdentityRequestFieldsEmail.php} | 2 +- ...itorIdentityRequestFieldsOrganization.php} | 2 +- ...entityRequestFieldsOrganizationalUnit.php} | 2 +- ...onseVisitorIdentityRequestFieldsTitle.php} | 2 +- ...onseVisitorIdentityRequestInvalidItem.php} | 2 +- ...onseVisitorIdentityRequestMissingItem.php} | 2 +- ...e200Response.php => GrantsGetResponse.php} | 8 +- ...seGrant.php => GrantsGetResponseGrant.php} | 72 ++--- ...hp => GrantsGetResponseGrantLayerMode.php} | 2 +- ...GrantsGetResponseGrantVisitorIdentity.php} | 12 +- ...ntsGetResponseGrantVisitorIdentityAsk.php} | 2 +- ...sGetResponseGrantVisitorIdentityFields.php | 66 ++++ ...GrantVisitorIdentityFieldsDisplayName.php} | 2 +- ...esponseGrantVisitorIdentityFieldsEmail.php | 9 + ...GrantVisitorIdentityFieldsOrganization.php | 9 + ...sitorIdentityFieldsOrganizationalUnit.php} | 2 +- ...esponseGrantVisitorIdentityFieldsTitle.php | 9 + ...antsList200ResponseGrantsItemLayerMode.php | 9 - ...st200ResponseGrantsItemVisitorIdentity.php | 58 ---- ...00ResponseGrantsItemVisitorIdentityAsk.php | 9 - ...esponseGrantsItemVisitorIdentityFields.php | 66 ---- ...tsItemVisitorIdentityFieldsDisplayName.php | 9 - ...sItemVisitorIdentityFieldsOrganization.php | 9 - ...isitorIdentityFieldsOrganizationalUnit.php | 9 - ...seGrantsItemVisitorIdentityFieldsTitle.php | 9 - ...200Response.php => GrantsListResponse.php} | 8 +- ...t.php => GrantsListResponseGrantsItem.php} | 72 ++--- .../GrantsListResponseGrantsItemLayerMode.php | 9 + ...ListResponseGrantsItemVisitorIdentity.php} | 12 +- ...tResponseGrantsItemVisitorIdentityAsk.php} | 2 +- ...sponseGrantsItemVisitorIdentityFields.php} | 22 +- ...sItemVisitorIdentityFieldsDisplayName.php} | 2 +- ...eGrantsItemVisitorIdentityFieldsEmail.php} | 2 +- ...ItemVisitorIdentityFieldsOrganization.php} | 2 +- ...sitorIdentityFieldsOrganizationalUnit.php} | 2 +- ...eGrantsItemVisitorIdentityFieldsTitle.php} | 2 +- ...GrantVisitorIdentityFieldsOrganization.php | 9 - ...isitorIdentityFieldsOrganizationalUnit.php | 9 - ...esponseGrantVisitorIdentityFieldsTitle.php | 9 - ...0Response.php => GrantsUpdateResponse.php} | 8 +- ...rant.php => GrantsUpdateResponseGrant.php} | 72 ++--- .../GrantsUpdateResponseGrantLayerMode.php | 9 + ...antsUpdateResponseGrantVisitorIdentity.php | 58 ++++ ...sUpdateResponseGrantVisitorIdentityAsk.php | 9 + ...dateResponseGrantVisitorIdentityFields.php | 66 ++++ ...GrantVisitorIdentityFieldsDisplayName.php} | 2 +- ...esponseGrantVisitorIdentityFieldsEmail.php | 9 + ...rantVisitorIdentityFieldsOrganization.php} | 2 +- ...isitorIdentityFieldsOrganizationalUnit.php | 9 + ...esponseGrantVisitorIdentityFieldsTitle.php | 9 + ...nse.php => GrantsVisitorsListResponse.php} | 8 +- ...rantsVisitorsListResponseVisitorsItem.php} | 40 +-- ...sitorsListResponseVisitorsItemAnswers.php} | 2 +- ...VisitorsListResponseVisitorsItemLayer.php} | 12 +- src/Types/OutlineItem.php | 2 +- src/Types/OutlineMutationMeta.php | 10 +- src/Types/PdfActionNode.php | 3 + src/Types/PdfActionNodeSubmitFormPayload.php | 90 +++++- .../PdfActionNodeSubmitFormPayloadFlags.php | 122 -------- ... PdfActionNodeSubmitFormPayloadFormat.php} | 2 +- ... PdfActionNodeSubmitFormPayloadMethod.php} | 2 +- src/Types/PdfActionTree.php | 8 - src/Types/PdfActionWriteSubmitForm.php | 90 +++++- src/Types/PdfActionWriteSubmitFormFormat.php | 11 + src/Types/PdfActionWriteSubmitFormMethod.php | 9 + src/Types/PdfLinkTarget.php | 3 + ...tionLineMeasure.php => PdfMeasurement.php} | 71 ++--- ...known.php => PdfMeasurementGeospatial.php} | 2 +- src/Types/PdfMeasurementRectilinear.php | 99 ++++++ ...=> PdfMeasurementRectilinearAngleItem.php} | 10 +- ...asurementRectilinearAngleItemFraction.php} | 2 +- ...mentRectilinearAngleItemLabelPosition.php} | 2 +- ... => PdfMeasurementRectilinearAreaItem.php} | 10 +- ...easurementRectilinearAreaItemFraction.php} | 2 +- ...ementRectilinearAreaItemLabelPosition.php} | 2 +- ...PdfMeasurementRectilinearDistanceItem.php} | 10 +- ...rementRectilinearDistanceItemFraction.php} | 2 +- ...tRectilinearDistanceItemLabelPosition.php} | 2 +- ...hp => PdfMeasurementRectilinearOrigin.php} | 2 +- ...=> PdfMeasurementRectilinearSlopeItem.php} | 10 +- ...asurementRectilinearSlopeItemFraction.php} | 2 +- ...mentRectilinearSlopeItemLabelPosition.php} | 2 +- src/Types/PdfMeasurementRectilinearXItem.php | 106 +++++++ ...PdfMeasurementRectilinearXItemFraction.php | 11 + ...asurementRectilinearXItemLabelPosition.php | 9 + src/Types/PdfMeasurementRectilinearYItem.php | 106 +++++++ ...PdfMeasurementRectilinearYItemFraction.php | 11 + ...asurementRectilinearYItemLabelPosition.php | 9 + ...ntryNone.php => PdfMeasurementUnknown.php} | 2 +- src/Types/PdfPermissionFlags.php | 90 ++++++ ...Response.php => TenantsCreateResponse.php} | 8 +- ...nt.php => TenantsCreateResponseTenant.php} | 16 +- ... => TenantsCreateResponseTenantStatus.php} | 2 +- ...200Response.php => TenantsGetResponse.php} | 8 +- ...enant.php => TenantsGetResponseTenant.php} | 16 +- ...php => TenantsGetResponseTenantStatus.php} | 2 +- ...00Response.php => TenantsListResponse.php} | 8 +- ...php => TenantsListResponseTenantsItem.php} | 16 +- ... TenantsListResponseTenantsItemStatus.php} | 2 +- ...Response.php => TenantsUpdateResponse.php} | 8 +- ...em.php => TenantsUpdateResponseTenant.php} | 16 +- ... => TenantsUpdateResponseTenantStatus.php} | 2 +- ...0Response.php => TenantsUsageResponse.php} | 17 +- ...cs.php => TenantsUsageResponseMetrics.php} | 26 +- src/Types/TokensIssueRequestDoc.php | 10 +- src/Types/TokensIssueRequestTenant.php | 10 +- src/Types/TokensIssueRequestUpload.php | 10 +- ...00Response.php => TokensIssueResponse.php} | 12 +- src/Types/WidgetAnnotation.php | 24 +- ...mily.php => WidgetAnnotationFieldKind.php} | 2 +- src/Types/WidgetPatch.php | 24 +- src/Types/WidgetPlacement.php | 6 +- tests/Core/Client/RawClientTest.php | 33 ++ tests/Core/Json/NullPropertyTest.php | 49 +++ 666 files changed, 4847 insertions(+), 14748 deletions(-) delete mode 100644 src/Types/AnnotationLineMeasureGeospatial.php delete mode 100644 src/Types/AnnotationLineMeasureRectilinear.php delete mode 100644 src/Types/AnnotationLineMeasureRectilinearAngleItem.php delete mode 100644 src/Types/AnnotationLineMeasureRectilinearAngleItemFraction.php delete mode 100644 src/Types/AnnotationLineMeasureRectilinearAngleItemLabelPosition.php delete mode 100644 src/Types/AnnotationLineMeasureRectilinearDistanceItem.php delete mode 100644 src/Types/AnnotationLineMeasureRectilinearDistanceItemFraction.php delete mode 100644 src/Types/AnnotationLineMeasureRectilinearDistanceItemLabelPosition.php delete mode 100644 src/Types/AnnotationLineMeasureRectilinearSlopeItem.php delete mode 100644 src/Types/AnnotationLineMeasureRectilinearSlopeItemFraction.php delete mode 100644 src/Types/AnnotationLineMeasureRectilinearSlopeItemLabelPosition.php delete mode 100644 src/Types/AnnotationPolygonMeasure.php delete mode 100644 src/Types/AnnotationPolygonMeasureGeospatial.php delete mode 100644 src/Types/AnnotationPolygonMeasureRectilinear.php delete mode 100644 src/Types/AnnotationPolygonMeasureRectilinearAngleItem.php delete mode 100644 src/Types/AnnotationPolygonMeasureRectilinearAngleItemFraction.php delete mode 100644 src/Types/AnnotationPolygonMeasureRectilinearAngleItemLabelPosition.php delete mode 100644 src/Types/AnnotationPolygonMeasureRectilinearAreaItem.php delete mode 100644 src/Types/AnnotationPolygonMeasureRectilinearAreaItemFraction.php delete mode 100644 src/Types/AnnotationPolygonMeasureRectilinearAreaItemLabelPosition.php delete mode 100644 src/Types/AnnotationPolygonMeasureRectilinearDistanceItem.php delete mode 100644 src/Types/AnnotationPolygonMeasureRectilinearDistanceItemFraction.php delete mode 100644 src/Types/AnnotationPolygonMeasureRectilinearDistanceItemLabelPosition.php delete mode 100644 src/Types/AnnotationPolygonMeasureRectilinearOrigin.php delete mode 100644 src/Types/AnnotationPolygonMeasureRectilinearSlopeItem.php delete mode 100644 src/Types/AnnotationPolygonMeasureRectilinearSlopeItemFraction.php delete mode 100644 src/Types/AnnotationPolygonMeasureRectilinearSlopeItemLabelPosition.php delete mode 100644 src/Types/AnnotationPolygonMeasureRectilinearYItem.php delete mode 100644 src/Types/AnnotationPolygonMeasureRectilinearYItemFraction.php delete mode 100644 src/Types/AnnotationPolygonMeasureRectilinearYItemLabelPosition.php delete mode 100644 src/Types/AnnotationPolylineMeasure.php delete mode 100644 src/Types/AnnotationPolylineMeasureGeospatial.php delete mode 100644 src/Types/AnnotationPolylineMeasureRectilinear.php delete mode 100644 src/Types/AnnotationPolylineMeasureRectilinearAngleItem.php delete mode 100644 src/Types/AnnotationPolylineMeasureRectilinearAngleItemFraction.php delete mode 100644 src/Types/AnnotationPolylineMeasureRectilinearAngleItemLabelPosition.php delete mode 100644 src/Types/AnnotationPolylineMeasureRectilinearAreaItem.php delete mode 100644 src/Types/AnnotationPolylineMeasureRectilinearAreaItemFraction.php delete mode 100644 src/Types/AnnotationPolylineMeasureRectilinearAreaItemLabelPosition.php delete mode 100644 src/Types/AnnotationPolylineMeasureRectilinearDistanceItem.php delete mode 100644 src/Types/AnnotationPolylineMeasureRectilinearDistanceItemFraction.php delete mode 100644 src/Types/AnnotationPolylineMeasureRectilinearDistanceItemLabelPosition.php delete mode 100644 src/Types/AnnotationPolylineMeasureRectilinearOrigin.php delete mode 100644 src/Types/AnnotationPolylineMeasureRectilinearSlopeItem.php delete mode 100644 src/Types/AnnotationPolylineMeasureRectilinearSlopeItemFraction.php delete mode 100644 src/Types/AnnotationPolylineMeasureRectilinearSlopeItemLabelPosition.php delete mode 100644 src/Types/AnnotationPolylineMeasureRectilinearXItem.php delete mode 100644 src/Types/AnnotationPolylineMeasureRectilinearXItemFraction.php delete mode 100644 src/Types/AnnotationPolylineMeasureRectilinearXItemLabelPosition.php delete mode 100644 src/Types/AnnotationPolylineMeasureRectilinearYItem.php delete mode 100644 src/Types/AnnotationPolylineMeasureRectilinearYItemFraction.php delete mode 100644 src/Types/AnnotationPolylineMeasureRectilinearYItemLabelPosition.php delete mode 100644 src/Types/AnnotationPolylineMeasureUnknown.php rename src/Types/{DocAnnotationsCreate200Response.php => DocAnnotationsCreateResponse.php} (92%) rename src/Types/{DocAnnotationsDelete200Response.php => DocAnnotationsDeleteResponse.php} (89%) rename src/Types/{DocAnnotationsFlatten200Response.php => DocAnnotationsFlattenResponse.php} (68%) rename src/Types/{DocAnnotationsFlatten200ResponseResultsItem.php => DocAnnotationsFlattenResponseResultsItem.php} (73%) rename src/Types/{DocRedactionsApply200ResponseResultsItemStatus.php => DocAnnotationsFlattenResponseResultsItemStatus.php} (62%) rename src/Types/{DocAnnotationsFlatten200ResponseUsage.php => DocAnnotationsFlattenResponseUsage.php} (65%) rename src/Types/{DocAnnotationsReorder200Response.php => DocAnnotationsReorderResponse.php} (92%) rename src/Types/{DocAnnotationsUpdate200Response.php => DocAnnotationsUpdateResponse.php} (77%) rename src/Types/{DocAnnotationsUpdate200ResponseAppearance.php => DocAnnotationsUpdateResponseAppearance.php} (73%) rename src/Types/{DocAnnotationsUpdate200ResponseAppearanceAction.php => DocAnnotationsUpdateResponseAppearanceAction.php} (76%) rename src/Types/{DocChanges200Response.php => DocChangesResponse.php} (65%) rename src/Types/{DocChanges200ResponseChangesItem.php => DocChangesResponseChangesItem.php} (68%) rename src/Types/{DocChanges200ResponseChangesItemApplied.php => DocChangesResponseChangesItemApplied.php} (90%) rename src/Types/{DocChanges200ResponseChangesItemRefused.php => DocChangesResponseChangesItemRefused.php} (76%) rename src/Types/{DocDownloadLink200Response.php => DocDownloadLinkResponse.php} (69%) rename src/Types/{DocFormsDeleteWidget200Response.php => DocFormsDeleteWidgetResponse.php} (78%) rename src/Types/{DocFormsList200Response.php => DocFormsListResponse.php} (89%) rename src/Types/{DocFormsList200ResponseFormKind.php => DocFormsListResponseFormKind.php} (72%) rename src/Types/{DocFormsReorderCalculations200Response.php => DocFormsReorderCalculationsResponse.php} (92%) rename src/Types/{DocFormsReorderWidgets200Response.php => DocFormsReorderWidgetsResponse.php} (93%) rename src/Types/{DocFormsReset200Response.php => DocFormsResetResponse.php} (94%) rename src/Types/{DocFormsSetValue200Response.php => DocFormsSetValueResponse.php} (94%) rename src/Types/{DocFormsUpdateWidget200Response.php => DocFormsUpdateWidgetResponse.php} (76%) rename src/Types/{DocFormsUpdateWidget200ResponseAppearance.php => DocFormsUpdateWidgetResponseAppearance.php} (73%) rename src/Types/{DocFormsUpdateWidget200ResponseAppearanceAction.php => DocFormsUpdateWidgetResponseAppearanceAction.php} (76%) delete mode 100644 src/Types/DocHead200Response.php create mode 100644 src/Types/DocHeadResponse.php rename src/Types/{DocHead200ResponseAccess.php => DocHeadResponseAccess.php} (81%) rename src/Types/{DocHead200ResponseAccessReasonsItem.php => DocHeadResponseAccessReasonsItem.php} (74%) rename src/Types/{DocHead200ResponseEncryption.php => DocHeadResponseEncryption.php} (79%) rename src/Types/{DocHead200ResponseEncryptionState.php => DocHeadResponseEncryptionState.php} (77%) rename src/Types/{DocHead200ResponsePermissions.php => DocHeadResponsePermissions.php} (77%) rename src/Types/{DocHead200ResponsePermissionsOpenedAs.php => DocHeadResponsePermissionsOpenedAs.php} (68%) rename src/Types/{DocHead200ResponseState.php => DocHeadResponseState.php} (80%) delete mode 100644 src/Types/DocManifest200ResponseProtectionFieldLocksItemSpec.php delete mode 100644 src/Types/DocManifest200ResponseProtectionFieldLocksItemSpecAction.php delete mode 100644 src/Types/DocManifest200ResponseScopesAnnotations.php delete mode 100644 src/Types/DocManifest200ResponseScopesAttachments.php delete mode 100644 src/Types/DocManifest200ResponseScopesMetadata.php delete mode 100644 src/Types/DocManifest200ResponseScopesOutline.php rename src/Types/{DocManifest200Response.php => DocManifestResponse.php} (74%) rename src/Types/{DocManifest200ResponsePagesItem.php => DocManifestResponsePagesItem.php} (72%) rename src/Types/{DocManifest200ResponsePagesItemCache.php => DocManifestResponsePagesItemCache.php} (93%) rename src/Types/{DocManifest200ResponseProtection.php => DocManifestResponseProtection.php} (56%) rename src/Types/{DocManifest200ResponseProtectionCertification.php => DocManifestResponseProtectionCertification.php} (80%) rename src/Types/{DocManifest200ResponseProtectionJudged.php => DocManifestResponseProtectionEnforced.php} (72%) rename src/Types/{DocManifest200ResponseProtectionFieldLocksItem.php => DocManifestResponseProtectionFieldLocksItem.php} (63%) rename src/Types/{DocManifest200ResponseProtectionFieldLocksItemSource.php => DocManifestResponseProtectionFieldLocksItemSource.php} (58%) rename src/Types/{DocManifest200ResponseProtectionEnforced.php => DocManifestResponseProtectionJudged.php} (72%) rename src/Types/{DocManifest200ResponseScopes.php => DocManifestResponseScopes.php} (54%) rename src/Types/{DocManifest200ResponseScopesForms.php => DocManifestResponseScopesActions.php} (65%) create mode 100644 src/Types/DocManifestResponseScopesAnnotations.php create mode 100644 src/Types/DocManifestResponseScopesAttachments.php rename src/Types/{DocManifest200ResponseScopesLayout.php => DocManifestResponseScopesContent.php} (64%) rename src/Types/{DocManifest200ResponseScopesContent.php => DocManifestResponseScopesForms.php} (64%) rename src/Types/{DocManifest200ResponseScopesActions.php => DocManifestResponseScopesLayout.php} (64%) create mode 100644 src/Types/DocManifestResponseScopesMetadata.php create mode 100644 src/Types/DocManifestResponseScopesOutline.php rename src/Types/{DocPagesFlatten200Response.php => DocPagesFlattenResponse.php} (71%) rename src/Types/{DocPagesFlatten200ResponseResultsItem.php => DocPagesFlattenResponseResultsItem.php} (74%) rename src/Types/{DocPagesFlatten200ResponseResultsItemStatus.php => DocPagesFlattenResponseResultsItemStatus.php} (64%) rename src/Types/{DocPagesFlatten200ResponseUsage.php => DocPagesFlattenResponseUsage.php} (67%) delete mode 100644 src/Types/DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetDangling.php delete mode 100644 src/Types/DocPagesRemoveName200ResponseLayoutPagesItemBoxes.php delete mode 100644 src/Types/DocPagesRemoveName200ResponseLayoutPagesItemBoxesArt.php delete mode 100644 src/Types/DocPagesRemoveName200ResponseLayoutPagesItemBoxesBleed.php delete mode 100644 src/Types/DocPagesRemoveName200ResponseLayoutPagesItemBoxesCrop.php delete mode 100644 src/Types/DocPagesRemoveName200ResponseLayoutPagesItemBoxesMedia.php delete mode 100644 src/Types/DocPagesRemoveName200ResponseLayoutPagesItemBoxesTrim.php rename src/Types/{DocPagesSetName200Response.php => DocPagesRemoveNameResponse.php} (74%) rename src/Types/{DocPagesSetName200ResponseLayout.php => DocPagesRemoveNameResponseLayout.php} (60%) rename src/Types/{DocPagesSetName200ResponseLayoutLabelsItem.php => DocPagesRemoveNameResponseLayoutLabelsItem.php} (84%) rename src/Types/{DocPagesSetName200ResponseLayoutLabelsItemStyle.php => DocPagesRemoveNameResponseLayoutLabelsItemStyle.php} (78%) rename src/Types/{DocPagesSetName200ResponseLayoutNamedPagesItem.php => DocPagesRemoveNameResponseLayoutNamedPagesItem.php} (72%) rename src/Types/{DocPagesSetName200ResponseLayoutNamedPagesItemTarget.php => DocPagesRemoveNameResponseLayoutNamedPagesItemTarget.php} (69%) rename src/Types/{DocPagesSetName200ResponseLayoutNamedPagesItemTargetDangling.php => DocPagesRemoveNameResponseLayoutNamedPagesItemTargetDangling.php} (85%) rename src/Types/{DocPagesSetName200ResponseLayoutNamedPagesItemTargetPage.php => DocPagesRemoveNameResponseLayoutNamedPagesItemTargetPage.php} (89%) rename src/Types/{DocPagesSetName200ResponseLayoutNamedPagesItemTargetTemplate.php => DocPagesRemoveNameResponseLayoutNamedPagesItemTargetTemplate.php} (90%) rename src/Types/{DocPagesSetName200ResponseLayoutPagesItem.php => DocPagesRemoveNameResponseLayoutPagesItem.php} (68%) create mode 100644 src/Types/DocPagesRemoveNameResponseLayoutPagesItemBoxes.php rename src/Types/{DocPagesSetName200ResponseLayoutPagesItemBoxesArt.php => DocPagesRemoveNameResponseLayoutPagesItemBoxesArt.php} (93%) rename src/Types/{DocPagesSetName200ResponseLayoutPagesItemBoxesBleed.php => DocPagesRemoveNameResponseLayoutPagesItemBoxesBleed.php} (93%) rename src/Types/{DocPagesSetName200ResponseLayoutPagesItemBoxesTrim.php => DocPagesRemoveNameResponseLayoutPagesItemBoxesCrop.php} (93%) rename src/Types/{DocPagesSetName200ResponseLayoutPagesItemBoxesMedia.php => DocPagesRemoveNameResponseLayoutPagesItemBoxesMedia.php} (93%) rename src/Types/{DocPagesSetName200ResponseLayoutPagesItemBoxesCrop.php => DocPagesRemoveNameResponseLayoutPagesItemBoxesTrim.php} (93%) rename src/Types/{DocPagesSetName200ResponseLayoutPagesItemPdfCropBox.php => DocPagesRemoveNameResponseLayoutPagesItemPdfCropBox.php} (94%) rename src/Types/{DocPagesSetName200ResponseLayoutPagesItemSize.php => DocPagesRemoveNameResponseLayoutPagesItemSize.php} (91%) rename src/Types/{DocPagesSetName200ResponseLayoutPagesItemTabOrder.php => DocPagesRemoveNameResponseLayoutPagesItemTabOrder.php} (75%) delete mode 100644 src/Types/DocPagesSetName200ResponseLayoutPagesItemBoxes.php rename src/Types/{DocPagesRemoveName200Response.php => DocPagesSetNameResponse.php} (73%) rename src/Types/{DocPagesRemoveName200ResponseLayout.php => DocPagesSetNameResponseLayout.php} (51%) rename src/Types/{DocPagesRemoveName200ResponseLayoutLabelsItem.php => DocPagesSetNameResponseLayoutLabelsItem.php} (80%) rename src/Types/{DocPagesRemoveName200ResponseLayoutLabelsItemStyle.php => DocPagesSetNameResponseLayoutLabelsItemStyle.php} (77%) rename src/Types/{DocPagesRemoveName200ResponseLayoutNamedPagesItem.php => DocPagesSetNameResponseLayoutNamedPagesItem.php} (66%) rename src/Types/{DocPagesRemoveName200ResponseLayoutNamedPagesItemTarget.php => DocPagesSetNameResponseLayoutNamedPagesItemTarget.php} (56%) rename src/Types/{AnnotationPolygonMeasureUnknown.php => DocPagesSetNameResponseLayoutNamedPagesItemTargetDangling.php} (79%) rename src/Types/{DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetPage.php => DocPagesSetNameResponseLayoutNamedPagesItemTargetPage.php} (84%) rename src/Types/{DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetTemplate.php => DocPagesSetNameResponseLayoutNamedPagesItemTargetTemplate.php} (85%) rename src/Types/{DocPagesRemoveName200ResponseLayoutPagesItem.php => DocPagesSetNameResponseLayoutPagesItem.php} (64%) create mode 100644 src/Types/DocPagesSetNameResponseLayoutPagesItemBoxes.php create mode 100644 src/Types/DocPagesSetNameResponseLayoutPagesItemBoxesArt.php create mode 100644 src/Types/DocPagesSetNameResponseLayoutPagesItemBoxesBleed.php create mode 100644 src/Types/DocPagesSetNameResponseLayoutPagesItemBoxesCrop.php create mode 100644 src/Types/DocPagesSetNameResponseLayoutPagesItemBoxesMedia.php create mode 100644 src/Types/DocPagesSetNameResponseLayoutPagesItemBoxesTrim.php rename src/Types/{DocPagesRemoveName200ResponseLayoutPagesItemPdfCropBox.php => DocPagesSetNameResponseLayoutPagesItemPdfCropBox.php} (91%) rename src/Types/{DocPagesRemoveName200ResponseLayoutPagesItemSize.php => DocPagesSetNameResponseLayoutPagesItemSize.php} (89%) rename src/Types/{DocPagesRemoveName200ResponseLayoutPagesItemTabOrder.php => DocPagesSetNameResponseLayoutPagesItemTabOrder.php} (74%) rename src/Types/{DocPagesSetScale200Response.php => DocPagesSetScaleResponse.php} (91%) delete mode 100644 src/Types/DocPagesViewports200ResponseViewportsItemMeasure.php delete mode 100644 src/Types/DocPagesViewports200ResponseViewportsItemMeasureGeospatial.php delete mode 100644 src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinear.php delete mode 100644 src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearAngleItem.php delete mode 100644 src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearAngleItemFraction.php delete mode 100644 src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearAngleItemLabelPosition.php delete mode 100644 src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearAreaItem.php delete mode 100644 src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearAreaItemFraction.php delete mode 100644 src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearAreaItemLabelPosition.php delete mode 100644 src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearDistanceItem.php delete mode 100644 src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearDistanceItemFraction.php delete mode 100644 src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearDistanceItemLabelPosition.php delete mode 100644 src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearOrigin.php delete mode 100644 src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearSlopeItem.php delete mode 100644 src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearSlopeItemFraction.php delete mode 100644 src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearSlopeItemLabelPosition.php delete mode 100644 src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearXItem.php delete mode 100644 src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearXItemFraction.php delete mode 100644 src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearXItemLabelPosition.php delete mode 100644 src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearYItem.php delete mode 100644 src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearYItemFraction.php delete mode 100644 src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearYItemLabelPosition.php delete mode 100644 src/Types/DocPagesViewports200ResponseViewportsItemMeasureUnknown.php rename src/Types/{DocPagesViewports200Response.php => DocPagesViewportsResponse.php} (62%) rename src/Types/{DocPagesViewports200ResponseViewportsItem.php => DocPagesViewportsResponseViewportsItem.php} (64%) rename src/Types/{DocPagesViewports200ResponseViewportsItemBbox.php => DocPagesViewportsResponseViewportsItemBbox.php} (92%) rename src/Types/{DocRedactionsApply200Response.php => DocRedactionsApplyResponse.php} (69%) rename src/Types/{DocRedactionsApply200ResponseResultsItem.php => DocRedactionsApplyResponseResultsItem.php} (79%) rename src/Types/{DocAnnotationsFlatten200ResponseResultsItemStatus.php => DocRedactionsApplyResponseResultsItemStatus.php} (61%) rename src/Types/{DocRedactionsApply200ResponseScope.php => DocRedactionsApplyResponseScope.php} (92%) rename src/Types/{DocSignaturesAnalysis200Response.php => DocSignaturesAnalysisResponse.php} (54%) rename src/Types/{DocVersionsAnalysis200ResponseBasis.php => DocSignaturesAnalysisResponseBasis.php} (65%) rename src/Types/{DocVersionsAnalysis200ResponseBasisSource.php => DocSignaturesAnalysisResponseBasisSource.php} (66%) rename src/Types/{DocVersionsAnalysis200ResponseBasisVersion.php => DocSignaturesAnalysisResponseBasisVersion.php} (69%) rename src/Types/{DocSignaturesAnalysis200ResponseCurrent.php => DocSignaturesAnalysisResponseCurrent.php} (57%) rename src/Types/{DocVersionsAnalysis200ResponseCurrentFindingsItem.php => DocSignaturesAnalysisResponseCurrentFindingsItem.php} (82%) rename src/Types/{DocVersionsAnalysis200ResponseCurrentFindingsItemVerdict.php => DocSignaturesAnalysisResponseCurrentFindingsItemVerdict.php} (66%) rename src/Types/{DocVersionsAnalysis200ResponseCurrentMethod.php => DocSignaturesAnalysisResponseCurrentMethod.php} (67%) rename src/Types/{DocVersionsAnalysis200ResponseCurrentPrimary.php => DocSignaturesAnalysisResponseCurrentPrimary.php} (83%) rename src/Types/{DocVersionsAnalysis200ResponseCurrentPrimaryVerdict.php => DocSignaturesAnalysisResponseCurrentPrimaryVerdict.php} (68%) rename src/Types/{DocVersionsAnalysis200ResponseCurrentVerdict.php => DocSignaturesAnalysisResponseCurrentVerdict.php} (75%) rename src/Types/{DocVersionsAnalysis200ResponseLater.php => DocSignaturesAnalysisResponseLater.php} (92%) rename src/Types/{DocVersionsAnalysis200ResponseMode.php => DocSignaturesAnalysisResponseMode.php} (71%) rename src/Types/{DocVersionsAnalysis200ResponseRestrictionsItem.php => DocSignaturesAnalysisResponseRestrictionsItem.php} (79%) rename src/Types/{DocVersionsAnalysis200ResponseRestrictionsItemSource.php => DocSignaturesAnalysisResponseRestrictionsItemSource.php} (64%) rename src/Types/{DocVersionsAnalysis200ResponseSince.php => DocSignaturesAnalysisResponseSince.php} (91%) rename src/Types/{DocVersionsAnalysis200ResponseUntil.php => DocSignaturesAnalysisResponseUntil.php} (88%) rename src/Types/{DocVersionsAnalysis200ResponseVerdict.php => DocSignaturesAnalysisResponseVerdict.php} (78%) rename src/Types/{DocSignaturesCancel200Response.php => DocSignaturesCancelResponse.php} (71%) rename src/Types/{DocSignaturesCancel200ResponseStatus.php => DocSignaturesCancelResponseStatus.php} (75%) delete mode 100644 src/Types/DocSignaturesComplete200ResponseProtectionEnforced.php delete mode 100644 src/Types/DocSignaturesComplete200ResponseProtectionFieldLocksItemSpec.php delete mode 100644 src/Types/DocSignaturesComplete200ResponseProtectionFieldLocksItemSpecAction.php delete mode 100644 src/Types/DocSignaturesComplete200ResponseProtectionJudged.php delete mode 100644 src/Types/DocSignaturesComplete200ResponseSignatureFieldMdp.php delete mode 100644 src/Types/DocSignaturesComplete200ResponseSignatureFieldMdpAction.php rename src/Types/{DocSignaturesComplete200Response.php => DocSignaturesCompleteResponse.php} (52%) rename src/Types/{DocSignaturesComplete200ResponsePrevious.php => DocSignaturesCompleteResponsePrevious.php} (90%) rename src/Types/{DocSignaturesComplete200ResponseProtection.php => DocSignaturesCompleteResponseProtection.php} (56%) rename src/Types/{DocSignaturesList200ResponseProtectionCertification.php => DocSignaturesCompleteResponseProtectionCertification.php} (72%) create mode 100644 src/Types/DocSignaturesCompleteResponseProtectionEnforced.php rename src/Types/{DocSignaturesList200ResponseProtectionFieldLocksItem.php => DocSignaturesCompleteResponseProtectionFieldLocksItem.php} (57%) rename src/Types/{DocVersionsSignatures200ResponseProtectionFieldLocksItemSource.php => DocSignaturesCompleteResponseProtectionFieldLocksItemSource.php} (55%) rename src/Types/{DocSignaturesList200ResponseProtectionEnforced.php => DocSignaturesCompleteResponseProtectionJudged.php} (70%) rename src/Types/{DocSignaturesComplete200ResponseSignature.php => DocSignaturesCompleteResponseSignature.php} (67%) rename src/Types/{DocSignaturesComplete200ResponseSignatureCoverage.php => DocSignaturesCompleteResponseSignatureCoverage.php} (69%) rename src/Types/{DocSignaturesComplete200ResponseSignatureKind.php => DocSignaturesCompleteResponseSignatureKind.php} (64%) rename src/Types/{DocSignaturesComplete200ResponseSignatureSeedValue.php => DocSignaturesCompleteResponseSignatureSeedValue.php} (52%) rename src/Types/{DocSignaturesComplete200ResponseSignatureSigner.php => DocSignaturesCompleteResponseSignatureSigner.php} (94%) rename src/Types/{DocSignaturesComplete200ResponseStatus.php => DocSignaturesCompleteResponseStatus.php} (69%) rename src/Types/{DocSignaturesAnalysis200ResponseBasisVersion.php => DocSignaturesCompleteResponseVersion.php} (69%) delete mode 100644 src/Types/DocSignaturesList200ResponseProtectionFieldLocksItemSpec.php delete mode 100644 src/Types/DocSignaturesList200ResponseProtectionFieldLocksItemSpecAction.php delete mode 100644 src/Types/DocSignaturesList200ResponseSignaturesItemFieldMdp.php delete mode 100644 src/Types/DocSignaturesList200ResponseSignaturesItemFieldMdpAction.php delete mode 100644 src/Types/DocSignaturesList200ResponseSignaturesItemLock.php delete mode 100644 src/Types/DocSignaturesList200ResponseSignaturesItemLockAction.php rename src/Types/{DocSignaturesList200Response.php => DocSignaturesListResponse.php} (54%) rename src/Types/{DocSignaturesList200ResponseProtection.php => DocSignaturesListResponseProtection.php} (54%) rename src/Types/{DocSignaturesComplete200ResponseProtectionCertification.php => DocSignaturesListResponseProtectionCertification.php} (72%) rename src/Types/{DocSignaturesList200ResponseProtectionJudged.php => DocSignaturesListResponseProtectionEnforced.php} (70%) rename src/Types/{DocSignaturesComplete200ResponseProtectionFieldLocksItem.php => DocSignaturesListResponseProtectionFieldLocksItem.php} (56%) rename src/Types/{DocSignaturesList200ResponseProtectionFieldLocksItemSource.php => DocSignaturesListResponseProtectionFieldLocksItemSource.php} (56%) create mode 100644 src/Types/DocSignaturesListResponseProtectionJudged.php rename src/Types/{DocSignaturesList200ResponseRevisionsItem.php => DocSignaturesListResponseRevisionsItem.php} (93%) rename src/Types/{DocSignaturesList200ResponseSignaturesItem.php => DocSignaturesListResponseSignaturesItem.php} (67%) rename src/Types/{DocSignaturesList200ResponseSignaturesItemCoverage.php => DocSignaturesListResponseSignaturesItemCoverage.php} (69%) rename src/Types/{DocSignaturesList200ResponseSignaturesItemKind.php => DocSignaturesListResponseSignaturesItemKind.php} (63%) rename src/Types/{DocSignaturesList200ResponseSignaturesItemSeedValue.php => DocSignaturesListResponseSignaturesItemSeedValue.php} (52%) rename src/Types/{DocSignaturesList200ResponseSignaturesItemSigner.php => DocSignaturesListResponseSignaturesItemSigner.php} (94%) rename src/Types/{DocSignaturesPrepare200Response.php => DocSignaturesPrepareResponse.php} (64%) rename src/Types/{DocSignaturesPrepare200ResponseAlgorithm.php => DocSignaturesPrepareResponseAlgorithm.php} (69%) rename src/Types/{DocSignaturesPrepare200ResponseExpectedVersion.php => DocSignaturesPrepareResponseExpectedVersion.php} (90%) rename src/Types/{DocText200Response.php => DocTextResponse.php} (94%) rename src/Types/{DocVersionsAnalysis200Response.php => DocVersionsAnalysisResponse.php} (54%) rename src/Types/{DocSignaturesAnalysis200ResponseBasis.php => DocVersionsAnalysisResponseBasis.php} (65%) rename src/Types/{DocSignaturesAnalysis200ResponseBasisSource.php => DocVersionsAnalysisResponseBasisSource.php} (66%) rename src/Types/{DocSignaturesComplete200ResponseVersion.php => DocVersionsAnalysisResponseBasisVersion.php} (71%) rename src/Types/{DocVersionsAnalysis200ResponseCurrent.php => DocVersionsAnalysisResponseCurrent.php} (54%) rename src/Types/{DocSignaturesAnalysis200ResponseCurrentPrimary.php => DocVersionsAnalysisResponseCurrentFindingsItem.php} (83%) rename src/Types/{DocSignaturesAnalysis200ResponseCurrentPrimaryVerdict.php => DocVersionsAnalysisResponseCurrentFindingsItemVerdict.php} (69%) rename src/Types/{DocSignaturesAnalysis200ResponseCurrentMethod.php => DocVersionsAnalysisResponseCurrentMethod.php} (66%) rename src/Types/{DocSignaturesAnalysis200ResponseCurrentFindingsItem.php => DocVersionsAnalysisResponseCurrentPrimary.php} (81%) rename src/Types/{DocSignaturesAnalysis200ResponseCurrentFindingsItemVerdict.php => DocVersionsAnalysisResponseCurrentPrimaryVerdict.php} (66%) rename src/Types/{DocSignaturesAnalysis200ResponseCurrentVerdict.php => DocVersionsAnalysisResponseCurrentVerdict.php} (75%) rename src/Types/{DocSignaturesAnalysis200ResponseLater.php => DocVersionsAnalysisResponseLater.php} (92%) rename src/Types/{DocSignaturesAnalysis200ResponseMode.php => DocVersionsAnalysisResponseMode.php} (70%) rename src/Types/{DocSignaturesAnalysis200ResponseRestrictionsItem.php => DocVersionsAnalysisResponseRestrictionsItem.php} (79%) rename src/Types/{DocSignaturesAnalysis200ResponseRestrictionsItemSource.php => DocVersionsAnalysisResponseRestrictionsItemSource.php} (64%) rename src/Types/{DocSignaturesAnalysis200ResponseSince.php => DocVersionsAnalysisResponseSince.php} (91%) rename src/Types/{DocSignaturesAnalysis200ResponseUntil.php => DocVersionsAnalysisResponseUntil.php} (88%) rename src/Types/{DocSignaturesAnalysis200ResponseVerdict.php => DocVersionsAnalysisResponseVerdict.php} (77%) rename src/Types/{DocVersionsList200Response.php => DocVersionsListResponse.php} (53%) rename src/Types/{DocVersionsList200ResponseVersionsItem.php => DocVersionsListResponseVersionsItem.php} (69%) rename src/Types/{DocVersionsList200ResponseVersionsItemProducer.php => DocVersionsListResponseVersionsItemProducer.php} (62%) delete mode 100644 src/Types/DocVersionsSignatures200ResponseProtectionEnforced.php delete mode 100644 src/Types/DocVersionsSignatures200ResponseProtectionFieldLocksItemSpec.php delete mode 100644 src/Types/DocVersionsSignatures200ResponseProtectionFieldLocksItemSpecAction.php delete mode 100644 src/Types/DocVersionsSignatures200ResponseProtectionJudged.php delete mode 100644 src/Types/DocVersionsSignatures200ResponseSignaturesItemFieldMdp.php delete mode 100644 src/Types/DocVersionsSignatures200ResponseSignaturesItemFieldMdpAction.php delete mode 100644 src/Types/DocVersionsSignatures200ResponseSignaturesItemLock.php delete mode 100644 src/Types/DocVersionsSignatures200ResponseSignaturesItemLockAction.php rename src/Types/{DocVersionsSignatures200Response.php => DocVersionsSignaturesResponse.php} (61%) rename src/Types/{DocVersionsSignatures200ResponseProtection.php => DocVersionsSignaturesResponseProtection.php} (56%) rename src/Types/{DocVersionsSignatures200ResponseProtectionCertification.php => DocVersionsSignaturesResponseProtectionCertification.php} (72%) create mode 100644 src/Types/DocVersionsSignaturesResponseProtectionEnforced.php rename src/Types/{DocVersionsSignatures200ResponseProtectionFieldLocksItem.php => DocVersionsSignaturesResponseProtectionFieldLocksItem.php} (56%) rename src/Types/{DocSignaturesComplete200ResponseProtectionFieldLocksItemSource.php => DocVersionsSignaturesResponseProtectionFieldLocksItemSource.php} (55%) create mode 100644 src/Types/DocVersionsSignaturesResponseProtectionJudged.php rename src/Types/{DocVersionsSignatures200ResponseRevisionsItem.php => DocVersionsSignaturesResponseRevisionsItem.php} (92%) rename src/Types/{DocVersionsSignatures200ResponseSignaturesItem.php => DocVersionsSignaturesResponseSignaturesItem.php} (66%) rename src/Types/{DocVersionsSignatures200ResponseSignaturesItemCoverage.php => DocVersionsSignaturesResponseSignaturesItemCoverage.php} (68%) rename src/Types/{DocVersionsSignatures200ResponseSignaturesItemKind.php => DocVersionsSignaturesResponseSignaturesItemKind.php} (62%) rename src/Types/{DocVersionsSignatures200ResponseSignaturesItemSeedValue.php => DocVersionsSignaturesResponseSignaturesItemSeedValue.php} (52%) rename src/Types/{DocVersionsSignatures200ResponseSignaturesItemSigner.php => DocVersionsSignaturesResponseSignaturesItemSigner.php} (94%) rename src/Types/{DocumentsGet200Response.php => DocumentsCommitResponse.php} (67%) rename src/Types/{DocumentsGet200ResponseDocument.php => DocumentsCommitResponseDocument.php} (68%) rename src/Types/{DocumentsGet200ResponseDocumentState.php => DocumentsCommitResponseDocumentState.php} (75%) rename src/Types/{DocumentsGet200ResponseDocumentThumbnailState.php => DocumentsCommitResponseDocumentThumbnailState.php} (71%) rename src/Types/{DocumentsCommit200Response.php => DocumentsGetResponse.php} (66%) rename src/Types/{DocumentsCommit200ResponseDocument.php => DocumentsGetResponseDocument.php} (68%) rename src/Types/{DocumentsCommit200ResponseDocumentState.php => DocumentsGetResponseDocumentState.php} (74%) rename src/Types/{DocumentsCommit200ResponseDocumentThumbnailState.php => DocumentsGetResponseDocumentThumbnailState.php} (70%) rename src/Types/{DocumentsImportFrom200ResponseTag.php => DocumentsImportFrom200ResponseStatus.php} (72%) rename src/Types/{DocumentsImportFrom202ResponseTag.php => DocumentsImportFrom202ResponseStatus.php} (72%) delete mode 100644 src/Types/DocumentsInit200ResponseCreatedDocumentState.php delete mode 100644 src/Types/DocumentsInit200ResponseCreatedDocumentThumbnailState.php delete mode 100644 src/Types/DocumentsInit200ResponseCreatedUploadPresignedPresignedMethod.php delete mode 100644 src/Types/DocumentsInit200ResponseDedupedDocumentState.php delete mode 100644 src/Types/DocumentsInit200ResponseDedupedDocumentThumbnailState.php delete mode 100644 src/Types/DocumentsInit200ResponseResumedDocument.php delete mode 100644 src/Types/DocumentsInit200ResponseResumedDocumentState.php delete mode 100644 src/Types/DocumentsInit200ResponseResumedDocumentThumbnailState.php delete mode 100644 src/Types/DocumentsInit200ResponseResumedUploadPresignedPresignedMethod.php rename src/Types/{DocumentsInit200Response.php => DocumentsInitResponse.php} (51%) rename src/Types/{DocumentsInit200ResponseResumed.php => DocumentsInitResponseCreated.php} (56%) rename src/Types/{DocumentsUpdate200ResponseDocument.php => DocumentsInitResponseCreatedDocument.php} (68%) create mode 100644 src/Types/DocumentsInitResponseCreatedDocumentState.php rename src/Types/{DocumentsList200ResponseDocumentsItemThumbnailState.php => DocumentsInitResponseCreatedDocumentThumbnailState.php} (69%) rename src/Types/{DocumentsInit200ResponseResumedUpload.php => DocumentsInitResponseCreatedUpload.php} (66%) rename src/Types/{DocumentsInit200ResponseCreatedUploadPresigned.php => DocumentsInitResponseCreatedUploadPresigned.php} (66%) rename src/Types/{DocumentsInit200ResponseCreatedUploadPresignedPresigned.php => DocumentsInitResponseCreatedUploadPresignedPresigned.php} (67%) create mode 100644 src/Types/DocumentsInitResponseCreatedUploadPresignedPresignedMethod.php rename src/Types/{DocumentsInit200ResponseResumedUploadProxy.php => DocumentsInitResponseCreatedUploadProxy.php} (89%) rename src/Types/{DocumentsInit200ResponseDeduped.php => DocumentsInitResponseDeduped.php} (64%) create mode 100644 src/Types/DocumentsInitResponseDedupedDocument.php create mode 100644 src/Types/DocumentsInitResponseDedupedDocumentState.php create mode 100644 src/Types/DocumentsInitResponseDedupedDocumentThumbnailState.php rename src/Types/{DocumentsInit200ResponseCreated.php => DocumentsInitResponseResumed.php} (56%) create mode 100644 src/Types/DocumentsInitResponseResumedDocument.php create mode 100644 src/Types/DocumentsInitResponseResumedDocumentState.php create mode 100644 src/Types/DocumentsInitResponseResumedDocumentThumbnailState.php rename src/Types/{DocumentsInit200ResponseCreatedUpload.php => DocumentsInitResponseResumedUpload.php} (66%) rename src/Types/{DocumentsInit200ResponseResumedUploadPresigned.php => DocumentsInitResponseResumedUploadPresigned.php} (66%) rename src/Types/{DocumentsInit200ResponseResumedUploadPresignedPresigned.php => DocumentsInitResponseResumedUploadPresignedPresigned.php} (67%) create mode 100644 src/Types/DocumentsInitResponseResumedUploadPresignedPresignedMethod.php rename src/Types/{DocumentsInit200ResponseCreatedUploadProxy.php => DocumentsInitResponseResumedUploadProxy.php} (89%) rename src/Types/{DocumentsLayersList200Response.php => DocumentsLayersListResponse.php} (70%) rename src/Types/{DocumentsLayersList200ResponseLayersItem.php => DocumentsLayersListResponseLayersItem.php} (63%) delete mode 100644 src/Types/DocumentsList200ResponseDocumentsItem.php delete mode 100644 src/Types/DocumentsList200ResponseDocumentsItemState.php rename src/Types/{DocumentsList200Response.php => DocumentsListResponse.php} (71%) rename src/Types/{DocumentsInit200ResponseDedupedDocument.php => DocumentsListResponseDocumentsItem.php} (68%) rename src/Types/{DocumentsUpdate200ResponseDocumentState.php => DocumentsListResponseDocumentsItemState.php} (74%) rename src/Types/{DocumentsUpdate200ResponseDocumentThumbnailState.php => DocumentsListResponseDocumentsItemThumbnailState.php} (70%) delete mode 100644 src/Types/DocumentsThumbnailResponse.php delete mode 100644 src/Types/DocumentsThumbnailResponseError.php rename src/Types/{DocumentsUpdate200Response.php => DocumentsUpdateResponse.php} (66%) rename src/Types/{DocumentsInit200ResponseCreatedDocument.php => DocumentsUpdateResponseDocument.php} (68%) create mode 100644 src/Types/DocumentsUpdateResponseDocumentState.php create mode 100644 src/Types/DocumentsUpdateResponseDocumentThumbnailState.php rename src/Types/{DocumentsUploadProxy200Response.php => DocumentsUploadProxyResponse.php} (88%) rename src/Types/{AdminErrorPayloadError.php => EngineError.php} (72%) rename src/Types/{EngineErrorPayloadCode.php => EngineErrorCode.php} (67%) delete mode 100644 src/Types/EngineErrorPayload.php delete mode 100644 src/Types/EngineErrorPayloadName.php rename src/Types/{AdminErrorPayload.php => ErrorResponse.php} (72%) rename src/Types/{DocSignaturesComplete200ResponseSignatureLock.php => FieldLockSpec.php} (71%) rename src/Types/{DocSignaturesComplete200ResponseSignatureLockAction.php => FieldLockSpecAction.php} (65%) rename src/Types/{FoldersCreate200Response.php => FoldersCreateResponse.php} (68%) rename src/Types/{FoldersGet200ResponseFolder.php => FoldersCreateResponseFolder.php} (77%) rename src/Types/{FoldersGet200Response.php => FoldersGetResponse.php} (54%) rename src/Types/{FoldersList200ResponseFoldersItem.php => FoldersGetResponseFolder.php} (77%) rename src/Types/{FoldersGet200ResponsePathItem.php => FoldersGetResponsePathItem.php} (91%) rename src/Types/{FoldersList200Response.php => FoldersListResponse.php} (72%) rename src/Types/{FoldersUpdate200ResponseFolder.php => FoldersListResponseFoldersItem.php} (77%) rename src/Types/{FoldersUpdate200Response.php => FoldersUpdateResponse.php} (68%) rename src/Types/{FoldersCreate200ResponseFolder.php => FoldersUpdateResponseFolder.php} (77%) delete mode 100644 src/Types/FormFieldCheckboxDefaultValueEntry.php delete mode 100644 src/Types/FormFieldCheckboxDefaultValueEntryArray.php delete mode 100644 src/Types/FormFieldCheckboxDefaultValueEntryNone.php delete mode 100644 src/Types/FormFieldCheckboxDefaultValueEntryScalar.php delete mode 100644 src/Types/FormFieldCheckboxDefaultValueEntryUnsupported.php delete mode 100644 src/Types/FormFieldCheckboxValueEntry.php delete mode 100644 src/Types/FormFieldCheckboxValueEntryArray.php delete mode 100644 src/Types/FormFieldCheckboxValueEntryNone.php delete mode 100644 src/Types/FormFieldCheckboxValueEntryScalar.php delete mode 100644 src/Types/FormFieldCheckboxValueEntryUnsupported.php delete mode 100644 src/Types/FormFieldComboboxDefaultValueEntry.php delete mode 100644 src/Types/FormFieldComboboxDefaultValueEntryArray.php delete mode 100644 src/Types/FormFieldComboboxDefaultValueEntryNone.php delete mode 100644 src/Types/FormFieldComboboxDefaultValueEntryScalar.php delete mode 100644 src/Types/FormFieldComboboxDefaultValueEntryUnsupported.php delete mode 100644 src/Types/FormFieldComboboxValueEntry.php delete mode 100644 src/Types/FormFieldComboboxValueEntryArray.php delete mode 100644 src/Types/FormFieldComboboxValueEntryNone.php delete mode 100644 src/Types/FormFieldComboboxValueEntryScalar.php delete mode 100644 src/Types/FormFieldComboboxValueEntryUnsupported.php delete mode 100644 src/Types/FormFieldListboxDefaultValueEntry.php delete mode 100644 src/Types/FormFieldListboxDefaultValueEntryArray.php delete mode 100644 src/Types/FormFieldListboxDefaultValueEntryNone.php delete mode 100644 src/Types/FormFieldListboxDefaultValueEntryScalar.php delete mode 100644 src/Types/FormFieldListboxDefaultValueEntryUnsupported.php delete mode 100644 src/Types/FormFieldListboxValueEntry.php delete mode 100644 src/Types/FormFieldListboxValueEntryArray.php delete mode 100644 src/Types/FormFieldListboxValueEntryScalar.php delete mode 100644 src/Types/FormFieldListboxValueEntryUnsupported.php rename src/Types/{FormFieldPatchFamily.php => FormFieldPatchKind.php} (88%) delete mode 100644 src/Types/FormFieldPushbuttonDefaultValueEntry.php delete mode 100644 src/Types/FormFieldPushbuttonDefaultValueEntryArray.php delete mode 100644 src/Types/FormFieldPushbuttonDefaultValueEntryNone.php delete mode 100644 src/Types/FormFieldPushbuttonDefaultValueEntryScalar.php delete mode 100644 src/Types/FormFieldPushbuttonDefaultValueEntryUnsupported.php delete mode 100644 src/Types/FormFieldPushbuttonValueEntry.php delete mode 100644 src/Types/FormFieldPushbuttonValueEntryArray.php delete mode 100644 src/Types/FormFieldPushbuttonValueEntryNone.php delete mode 100644 src/Types/FormFieldPushbuttonValueEntryScalar.php delete mode 100644 src/Types/FormFieldPushbuttonValueEntryUnsupported.php delete mode 100644 src/Types/FormFieldRadioDefaultValueEntry.php delete mode 100644 src/Types/FormFieldRadioDefaultValueEntryArray.php delete mode 100644 src/Types/FormFieldRadioDefaultValueEntryNone.php delete mode 100644 src/Types/FormFieldRadioDefaultValueEntryScalar.php delete mode 100644 src/Types/FormFieldRadioDefaultValueEntryUnsupported.php delete mode 100644 src/Types/FormFieldRadioValueEntry.php delete mode 100644 src/Types/FormFieldRadioValueEntryArray.php delete mode 100644 src/Types/FormFieldRadioValueEntryScalar.php delete mode 100644 src/Types/FormFieldRadioValueEntryUnsupported.php delete mode 100644 src/Types/FormFieldSignatureDefaultValueEntry.php delete mode 100644 src/Types/FormFieldSignatureDefaultValueEntryArray.php delete mode 100644 src/Types/FormFieldSignatureDefaultValueEntryNone.php delete mode 100644 src/Types/FormFieldSignatureDefaultValueEntryScalar.php delete mode 100644 src/Types/FormFieldSignatureDefaultValueEntryUnsupported.php delete mode 100644 src/Types/FormFieldSignatureValueEntry.php delete mode 100644 src/Types/FormFieldSignatureValueEntryArray.php delete mode 100644 src/Types/FormFieldSignatureValueEntryNone.php delete mode 100644 src/Types/FormFieldSignatureValueEntryScalar.php delete mode 100644 src/Types/FormFieldSignatureValueEntryUnsupported.php delete mode 100644 src/Types/FormFieldTextDefaultValueEntry.php delete mode 100644 src/Types/FormFieldTextDefaultValueEntryArray.php delete mode 100644 src/Types/FormFieldTextDefaultValueEntryNone.php delete mode 100644 src/Types/FormFieldTextDefaultValueEntryScalar.php delete mode 100644 src/Types/FormFieldTextDefaultValueEntryUnsupported.php delete mode 100644 src/Types/FormFieldTextValueEntryUnsupported.php delete mode 100644 src/Types/FormFieldUnknownDefaultValueEntry.php delete mode 100644 src/Types/FormFieldUnknownDefaultValueEntryArray.php delete mode 100644 src/Types/FormFieldUnknownDefaultValueEntryNone.php delete mode 100644 src/Types/FormFieldUnknownDefaultValueEntryScalar.php delete mode 100644 src/Types/FormFieldUnknownDefaultValueEntryUnsupported.php delete mode 100644 src/Types/FormFieldUnknownValueEntry.php delete mode 100644 src/Types/FormFieldUnknownValueEntryArray.php delete mode 100644 src/Types/FormFieldUnknownValueEntryNone.php delete mode 100644 src/Types/FormFieldUnknownValueEntryScalar.php delete mode 100644 src/Types/FormFieldUnknownValueEntryUnsupported.php rename src/Types/{FormFieldTextValueEntry.php => FormValueEntry.php} (63%) rename src/Types/{FormFieldTextValueEntryArray.php => FormValueEntryArray.php} (90%) rename src/Types/{FormFieldTextValueEntryNone.php => FormValueEntryNone.php} (85%) rename src/Types/{FormFieldTextValueEntryScalar.php => FormValueEntryScalar.php} (89%) rename src/Types/{FormFieldRadioValueEntryNone.php => FormValueEntryUnsupported.php} (84%) delete mode 100644 src/Types/GrantsArchive200ResponseGrantLayerMode.php rename src/Types/{GrantsCreate200Response.php => GrantsArchiveResponse.php} (69%) rename src/Types/{GrantsList200ResponseGrantsItem.php => GrantsArchiveResponseGrant.php} (70%) rename src/Types/{GrantsUpdate200ResponseGrantLayerMode.php => GrantsArchiveResponseGrantLayerMode.php} (66%) rename src/Types/{GrantsUpdate200ResponseGrantVisitorIdentity.php => GrantsArchiveResponseGrantVisitorIdentity.php} (68%) rename src/Types/{GrantsCreate200ResponseGrantVisitorIdentityAsk.php => GrantsArchiveResponseGrantVisitorIdentityAsk.php} (66%) rename src/Types/{GrantsUpdate200ResponseGrantVisitorIdentityFields.php => GrantsArchiveResponseGrantVisitorIdentityFields.php} (51%) rename src/Types/{GrantsExchange200ResponseVisitorIdentityRequestFieldsEmail.php => GrantsArchiveResponseGrantVisitorIdentityFieldsDisplayName.php} (63%) create mode 100644 src/Types/GrantsArchiveResponseGrantVisitorIdentityFieldsEmail.php create mode 100644 src/Types/GrantsArchiveResponseGrantVisitorIdentityFieldsOrganization.php create mode 100644 src/Types/GrantsArchiveResponseGrantVisitorIdentityFieldsOrganizationalUnit.php create mode 100644 src/Types/GrantsArchiveResponseGrantVisitorIdentityFieldsTitle.php rename src/Types/{GrantsGet200Response.php => GrantsCreateResponse.php} (70%) rename src/Types/{GrantsGet200ResponseGrant.php => GrantsCreateResponseGrant.php} (70%) rename src/Types/{GrantsExchange200ResponseLayerMode.php => GrantsCreateResponseGrantLayerMode.php} (68%) rename src/Types/{GrantsGet200ResponseGrantVisitorIdentity.php => GrantsCreateResponseGrantVisitorIdentity.php} (71%) rename src/Types/{GrantsGet200ResponseGrantVisitorIdentityAsk.php => GrantsCreateResponseGrantVisitorIdentityAsk.php} (67%) rename src/Types/{GrantsGet200ResponseGrantVisitorIdentityFields.php => GrantsCreateResponseGrantVisitorIdentityFields.php} (66%) rename src/Types/{GrantsGet200ResponseGrantVisitorIdentityFieldsDisplayName.php => GrantsCreateResponseGrantVisitorIdentityFieldsDisplayName.php} (63%) rename src/Types/{GrantsGet200ResponseGrantVisitorIdentityFieldsEmail.php => GrantsCreateResponseGrantVisitorIdentityFieldsEmail.php} (61%) rename src/Types/{GrantsExchange200ResponseVisitorIdentityRequestFieldsTitle.php => GrantsCreateResponseGrantVisitorIdentityFieldsOrganization.php} (63%) rename src/Types/{GrantsGet200ResponseGrantVisitorIdentityFieldsOrganizationalUnit.php => GrantsCreateResponseGrantVisitorIdentityFieldsOrganizationalUnit.php} (64%) rename src/Types/{GrantsGet200ResponseGrantVisitorIdentityFieldsTitle.php => GrantsCreateResponseGrantVisitorIdentityFieldsTitle.php} (61%) delete mode 100644 src/Types/GrantsExchange200ResponseVisitorIdentityRequestFields.php delete mode 100644 src/Types/GrantsExchange200ResponseVisitorIdentityRequestFieldsDisplayName.php delete mode 100644 src/Types/GrantsExchange200ResponseVisitorIdentityRequestFieldsOrganization.php delete mode 100644 src/Types/GrantsExchange200ResponseVisitorIdentityRequestFieldsOrganizationalUnit.php rename src/Types/{GrantsExchange200Response.php => GrantsExchangeResponse.php} (68%) rename src/Types/{GrantsGet200ResponseGrantLayerMode.php => GrantsExchangeResponseLayerMode.php} (68%) rename src/Types/{GrantsExchange200ResponseVisitor.php => GrantsExchangeResponseVisitor.php} (73%) rename src/Types/{GrantsExchange200ResponseVisitorIdentityRequest.php => GrantsExchangeResponseVisitorIdentityRequest.php} (63%) rename src/Types/{GrantsArchive200ResponseGrantVisitorIdentityFields.php => GrantsExchangeResponseVisitorIdentityRequestFields.php} (52%) rename src/Types/{GrantsArchive200ResponseGrantVisitorIdentityFieldsDisplayName.php => GrantsExchangeResponseVisitorIdentityRequestFieldsDisplayName.php} (63%) rename src/Types/{GrantsArchive200ResponseGrantVisitorIdentityFieldsTitle.php => GrantsExchangeResponseVisitorIdentityRequestFieldsEmail.php} (62%) rename src/Types/{GrantsArchive200ResponseGrantVisitorIdentityFieldsOrganization.php => GrantsExchangeResponseVisitorIdentityRequestFieldsOrganization.php} (64%) rename src/Types/{GrantsArchive200ResponseGrantVisitorIdentityFieldsOrganizationalUnit.php => GrantsExchangeResponseVisitorIdentityRequestFieldsOrganizationalUnit.php} (65%) rename src/Types/{GrantsArchive200ResponseGrantVisitorIdentityFieldsEmail.php => GrantsExchangeResponseVisitorIdentityRequestFieldsTitle.php} (62%) rename src/Types/{GrantsExchange200ResponseVisitorIdentityRequestInvalidItem.php => GrantsExchangeResponseVisitorIdentityRequestInvalidItem.php} (75%) rename src/Types/{GrantsExchange200ResponseVisitorIdentityRequestMissingItem.php => GrantsExchangeResponseVisitorIdentityRequestMissingItem.php} (75%) rename src/Types/{GrantsUpdate200Response.php => GrantsGetResponse.php} (69%) rename src/Types/{GrantsArchive200ResponseGrant.php => GrantsGetResponseGrant.php} (70%) rename src/Types/{GrantsCreate200ResponseGrantLayerMode.php => GrantsGetResponseGrantLayerMode.php} (66%) rename src/Types/{GrantsArchive200ResponseGrantVisitorIdentity.php => GrantsGetResponseGrantVisitorIdentity.php} (68%) rename src/Types/{GrantsUpdate200ResponseGrantVisitorIdentityAsk.php => GrantsGetResponseGrantVisitorIdentityAsk.php} (66%) create mode 100644 src/Types/GrantsGetResponseGrantVisitorIdentityFields.php rename src/Types/{GrantsCreate200ResponseGrantVisitorIdentityFieldsEmail.php => GrantsGetResponseGrantVisitorIdentityFieldsDisplayName.php} (62%) create mode 100644 src/Types/GrantsGetResponseGrantVisitorIdentityFieldsEmail.php create mode 100644 src/Types/GrantsGetResponseGrantVisitorIdentityFieldsOrganization.php rename src/Types/{GrantsCreate200ResponseGrantVisitorIdentityFieldsDisplayName.php => GrantsGetResponseGrantVisitorIdentityFieldsOrganizationalUnit.php} (57%) create mode 100644 src/Types/GrantsGetResponseGrantVisitorIdentityFieldsTitle.php delete mode 100644 src/Types/GrantsList200ResponseGrantsItemLayerMode.php delete mode 100644 src/Types/GrantsList200ResponseGrantsItemVisitorIdentity.php delete mode 100644 src/Types/GrantsList200ResponseGrantsItemVisitorIdentityAsk.php delete mode 100644 src/Types/GrantsList200ResponseGrantsItemVisitorIdentityFields.php delete mode 100644 src/Types/GrantsList200ResponseGrantsItemVisitorIdentityFieldsDisplayName.php delete mode 100644 src/Types/GrantsList200ResponseGrantsItemVisitorIdentityFieldsOrganization.php delete mode 100644 src/Types/GrantsList200ResponseGrantsItemVisitorIdentityFieldsOrganizationalUnit.php delete mode 100644 src/Types/GrantsList200ResponseGrantsItemVisitorIdentityFieldsTitle.php rename src/Types/{GrantsList200Response.php => GrantsListResponse.php} (73%) rename src/Types/{GrantsUpdate200ResponseGrant.php => GrantsListResponseGrantsItem.php} (70%) create mode 100644 src/Types/GrantsListResponseGrantsItemLayerMode.php rename src/Types/{GrantsCreate200ResponseGrantVisitorIdentity.php => GrantsListResponseGrantsItemVisitorIdentity.php} (72%) rename src/Types/{GrantsArchive200ResponseGrantVisitorIdentityAsk.php => GrantsListResponseGrantsItemVisitorIdentityAsk.php} (66%) rename src/Types/{GrantsCreate200ResponseGrantVisitorIdentityFields.php => GrantsListResponseGrantsItemVisitorIdentityFields.php} (64%) rename src/Types/{GrantsUpdate200ResponseGrantVisitorIdentityFieldsDisplayName.php => GrantsListResponseGrantsItemVisitorIdentityFieldsDisplayName.php} (63%) rename src/Types/{GrantsUpdate200ResponseGrantVisitorIdentityFieldsEmail.php => GrantsListResponseGrantsItemVisitorIdentityFieldsEmail.php} (62%) rename src/Types/{GrantsCreate200ResponseGrantVisitorIdentityFieldsOrganization.php => GrantsListResponseGrantsItemVisitorIdentityFieldsOrganization.php} (63%) rename src/Types/{GrantsCreate200ResponseGrantVisitorIdentityFieldsOrganizationalUnit.php => GrantsListResponseGrantsItemVisitorIdentityFieldsOrganizationalUnit.php} (65%) rename src/Types/{GrantsCreate200ResponseGrantVisitorIdentityFieldsTitle.php => GrantsListResponseGrantsItemVisitorIdentityFieldsTitle.php} (62%) delete mode 100644 src/Types/GrantsUpdate200ResponseGrantVisitorIdentityFieldsOrganization.php delete mode 100644 src/Types/GrantsUpdate200ResponseGrantVisitorIdentityFieldsOrganizationalUnit.php delete mode 100644 src/Types/GrantsUpdate200ResponseGrantVisitorIdentityFieldsTitle.php rename src/Types/{GrantsArchive200Response.php => GrantsUpdateResponse.php} (68%) rename src/Types/{GrantsCreate200ResponseGrant.php => GrantsUpdateResponseGrant.php} (70%) create mode 100644 src/Types/GrantsUpdateResponseGrantLayerMode.php create mode 100644 src/Types/GrantsUpdateResponseGrantVisitorIdentity.php create mode 100644 src/Types/GrantsUpdateResponseGrantVisitorIdentityAsk.php create mode 100644 src/Types/GrantsUpdateResponseGrantVisitorIdentityFields.php rename src/Types/{GrantsList200ResponseGrantsItemVisitorIdentityFieldsEmail.php => GrantsUpdateResponseGrantVisitorIdentityFieldsDisplayName.php} (63%) create mode 100644 src/Types/GrantsUpdateResponseGrantVisitorIdentityFieldsEmail.php rename src/Types/{GrantsGet200ResponseGrantVisitorIdentityFieldsOrganization.php => GrantsUpdateResponseGrantVisitorIdentityFieldsOrganization.php} (63%) create mode 100644 src/Types/GrantsUpdateResponseGrantVisitorIdentityFieldsOrganizationalUnit.php create mode 100644 src/Types/GrantsUpdateResponseGrantVisitorIdentityFieldsTitle.php rename src/Types/{GrantsVisitorsList200Response.php => GrantsVisitorsListResponse.php} (70%) rename src/Types/{GrantsVisitorsList200ResponseVisitorsItem.php => GrantsVisitorsListResponseVisitorsItem.php} (53%) rename src/Types/{GrantsVisitorsList200ResponseVisitorsItemAnswers.php => GrantsVisitorsListResponseVisitorsItemAnswers.php} (94%) rename src/Types/{GrantsVisitorsList200ResponseVisitorsItemLayer.php => GrantsVisitorsListResponseVisitorsItemLayer.php} (65%) delete mode 100644 src/Types/PdfActionNodeSubmitFormPayloadFlags.php rename src/Types/{PdfActionNodeSubmitFormPayloadFlagsFormat.php => PdfActionNodeSubmitFormPayloadFormat.php} (70%) rename src/Types/{PdfActionNodeSubmitFormPayloadFlagsMethod.php => PdfActionNodeSubmitFormPayloadMethod.php} (60%) create mode 100644 src/Types/PdfActionWriteSubmitFormFormat.php create mode 100644 src/Types/PdfActionWriteSubmitFormMethod.php rename src/Types/{AnnotationLineMeasure.php => PdfMeasurement.php} (66%) rename src/Types/{AnnotationLineMeasureUnknown.php => PdfMeasurementGeospatial.php} (84%) create mode 100644 src/Types/PdfMeasurementRectilinear.php rename src/Types/{AnnotationLineMeasureRectilinearXItem.php => PdfMeasurementRectilinearAngleItem.php} (84%) rename src/Types/{AnnotationLineMeasureRectilinearYItemFraction.php => PdfMeasurementRectilinearAngleItemFraction.php} (72%) rename src/Types/{AnnotationLineMeasureRectilinearXItemLabelPosition.php => PdfMeasurementRectilinearAngleItemLabelPosition.php} (59%) rename src/Types/{AnnotationPolygonMeasureRectilinearXItem.php => PdfMeasurementRectilinearAreaItem.php} (83%) rename src/Types/{AnnotationLineMeasureRectilinearXItemFraction.php => PdfMeasurementRectilinearAreaItemFraction.php} (72%) rename src/Types/{AnnotationLineMeasureRectilinearYItemLabelPosition.php => PdfMeasurementRectilinearAreaItemLabelPosition.php} (59%) rename src/Types/{AnnotationLineMeasureRectilinearYItem.php => PdfMeasurementRectilinearDistanceItem.php} (86%) rename src/Types/{AnnotationLineMeasureRectilinearAreaItemFraction.php => PdfMeasurementRectilinearDistanceItemFraction.php} (71%) rename src/Types/{AnnotationPolygonMeasureRectilinearXItemLabelPosition.php => PdfMeasurementRectilinearDistanceItemLabelPosition.php} (58%) rename src/Types/{AnnotationLineMeasureRectilinearOrigin.php => PdfMeasurementRectilinearOrigin.php} (89%) rename src/Types/{AnnotationLineMeasureRectilinearAreaItem.php => PdfMeasurementRectilinearSlopeItem.php} (83%) rename src/Types/{AnnotationPolygonMeasureRectilinearXItemFraction.php => PdfMeasurementRectilinearSlopeItemFraction.php} (71%) rename src/Types/{AnnotationLineMeasureRectilinearAreaItemLabelPosition.php => PdfMeasurementRectilinearSlopeItemLabelPosition.php} (58%) create mode 100644 src/Types/PdfMeasurementRectilinearXItem.php create mode 100644 src/Types/PdfMeasurementRectilinearXItemFraction.php create mode 100644 src/Types/PdfMeasurementRectilinearXItemLabelPosition.php create mode 100644 src/Types/PdfMeasurementRectilinearYItem.php create mode 100644 src/Types/PdfMeasurementRectilinearYItemFraction.php create mode 100644 src/Types/PdfMeasurementRectilinearYItemLabelPosition.php rename src/Types/{FormFieldListboxValueEntryNone.php => PdfMeasurementUnknown.php} (84%) create mode 100644 src/Types/PdfPermissionFlags.php rename src/Types/{TenantsCreate200Response.php => TenantsCreateResponse.php} (74%) rename src/Types/{TenantsGet200ResponseTenant.php => TenantsCreateResponseTenant.php} (77%) rename src/Types/{TenantsGet200ResponseTenantStatus.php => TenantsCreateResponseTenantStatus.php} (68%) rename src/Types/{TenantsGet200Response.php => TenantsGetResponse.php} (69%) rename src/Types/{TenantsCreate200ResponseTenant.php => TenantsGetResponseTenant.php} (78%) rename src/Types/{TenantsCreate200ResponseTenantStatus.php => TenantsGetResponseTenantStatus.php} (66%) rename src/Types/{TenantsList200Response.php => TenantsListResponse.php} (72%) rename src/Types/{TenantsUpdate200ResponseTenant.php => TenantsListResponseTenantsItem.php} (77%) rename src/Types/{TenantsUpdate200ResponseTenantStatus.php => TenantsListResponseTenantsItemStatus.php} (66%) rename src/Types/{TenantsUpdate200Response.php => TenantsUpdateResponse.php} (68%) rename src/Types/{TenantsList200ResponseTenantsItem.php => TenantsUpdateResponseTenant.php} (77%) rename src/Types/{TenantsList200ResponseTenantsItemStatus.php => TenantsUpdateResponseTenantStatus.php} (65%) rename src/Types/{TenantsUsage200Response.php => TenantsUsageResponse.php} (67%) rename src/Types/{TenantsUsage200ResponseMetrics.php => TenantsUsageResponseMetrics.php} (56%) rename src/Types/{TokensIssue200Response.php => TokensIssueResponse.php} (74%) rename src/Types/{WidgetAnnotationFieldFamily.php => WidgetAnnotationFieldKind.php} (87%) diff --git a/.fern/metadata.json b/.fern/metadata.json index 1a94ba9f..fb527ba1 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -1,7 +1,7 @@ { "cliVersion": "5.91.0", "generatorName": "fernapi/fern-php-sdk", - "generatorVersion": "2.18.1", + "generatorVersion": "2.30.14", "generatorConfig": { "namespace": "CloudPDF", "clientName": "CloudPDFClient", @@ -11,10 +11,10 @@ "homepage": "https://www.cloudpdf.com" } }, - "originGitCommit": "ce65e1390549db1272ac3720a5ddfcea55be2c07", + "originGitCommit": "3f7f3c650bb91d9c5a4277c920bbd6fab7142f98", "originGitCommitIsDirty": false, "invokedBy": "ci", - "requestedVersion": "3.0.0-alpha.22", + "requestedVersion": "3.0.0-alpha.23", "ciProvider": "github", - "sdkVersion": "3.0.0-alpha.22" + "sdkVersion": "3.0.0-alpha.23" } \ No newline at end of file diff --git a/README.md b/README.md index 52df4155..2d351b97 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ use CloudPDF\Doc\Requests\DocChangesRequest; use CloudPDF\Doc\Types\DocChangesRequestChangesItem; $client = new CloudPDFClient( + embedPdfVersion: '3.0', token: '', ); $client->doc->changes( diff --git a/cloudpdf-generation.json b/cloudpdf-generation.json index 58a91e24..8a7d1e0a 100644 --- a/cloudpdf-generation.json +++ b/cloudpdf-generation.json @@ -1,17 +1,17 @@ { "language": "php", - "canonicalVersion": "3.0.0-next.22", - "sdkVersion": "3.0.0-alpha.22", + "canonicalVersion": "3.0.0-next.23", + "sdkVersion": "3.0.0-alpha.23", "source": { "repository": "embedpdf/embed-pdf-viewer", "openapi": "cloudpdf/contract/openapi.json", - "openapiSha256": "1f5aa976eec4d5fc4e2b22efe725df58a01389896733ec1870f96a6441b62859", - "gitCommit": "ce65e1390549db1272ac3720a5ddfcea55be2c07", + "openapiSha256": "82488f8cc7c2cd27aee3dc6000d59164467f7dd3899074e309f0574a027e4524", + "gitCommit": "3f7f3c650bb91d9c5a4277c920bbd6fab7142f98", "gitCommitIsDirty": false }, "fern": { "cliVersion": "5.91.0", "generatorName": "fernapi/fern-php-sdk", - "generatorVersion": "2.18.1" + "generatorVersion": "2.30.14" } } diff --git a/reference.md b/reference.md index 007ebe47..172c53a8 100644 --- a/reference.md +++ b/reference.md @@ -65,7 +65,7 @@ $client->deployment->modules(); ## Doc -
$client->doc->head($docId, $request) -> ?DocHead200Response +
$client->doc->head($docId, $request) -> ?DocHeadResponse
@@ -116,7 +116,7 @@ $client->doc->head(
-
$client->doc->changes($docId, $layerName, $request) -> ?DocChanges200Response +
$client->doc->changes($docId, $layerName, $request) -> ?DocChangesResponse
@@ -264,7 +264,7 @@ $client->doc->download(
-
$client->doc->downloadLink($docId, $layerName, $request) -> ?DocDownloadLink200Response +
$client->doc->downloadLink($docId, $layerName, $request) -> ?DocDownloadLinkResponse
@@ -334,7 +334,7 @@ $client->doc->downloadLink(
-**$expiresIn:** `?int` +**$expiresInSeconds:** `?int`
@@ -346,7 +346,7 @@ $client->doc->downloadLink(
-
$client->doc->manifest($docId, $layerName, $request) -> ?DocManifest200Response +
$client->doc->manifest($docId, $layerName, $request) -> ?DocManifestResponse
@@ -469,7 +469,7 @@ $client->doc->render(
-**$pageKey:** `string` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. +**$pageKey:** `string` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotationKey` and `fieldKey`.
@@ -489,7 +489,7 @@ $client->doc->render(
-
$client->doc->text($docId, $layerName, $pageKey, $request) -> ?DocText200Response +
$client->doc->text($docId, $layerName, $pageKey, $request) -> ?DocTextResponse
@@ -538,7 +538,7 @@ $client->doc->text(
-**$pageKey:** `string` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. +**$pageKey:** `string` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotationKey` and `fieldKey`.
@@ -559,7 +559,7 @@ $client->doc->text(
## Grants -
$client->grants->exchange($request) -> ?GrantsExchange200Response +
$client->grants->exchange($request) -> ?GrantsExchangeResponse
@@ -649,7 +649,7 @@ $client->grants->exchange(
-
$client->grants->list($tenantId, $request) -> ?GrantsList200Response +
$client->grants->list($tenantId, $request) -> ?GrantsListResponse
@@ -724,7 +724,7 @@ $client->grants->list(
-
$client->grants->create($tenantId, $request) -> ?GrantsCreate200Response +
$client->grants->create($tenantId, $request) -> ?GrantsCreateResponse
@@ -878,7 +878,7 @@ $client->grants->create(
-**$expiresAt:** `?int` +**$expiresAt:** `?DateTime`
@@ -890,7 +890,7 @@ $client->grants->create(
-
$client->grants->get($tenantId, $grantId) -> ?GrantsGet200Response +
$client->grants->get($tenantId, $grantId) -> ?GrantsGetResponse
@@ -992,7 +992,7 @@ $client->grants->delete(
-
$client->grants->update($tenantId, $grantId, $request) -> ?GrantsUpdate200Response +
$client->grants->update($tenantId, $grantId, $request) -> ?GrantsUpdateResponse
@@ -1136,7 +1136,7 @@ $client->grants->update(
-**$expiresAt:** `?int` +**$expiresAt:** `?DateTime`
@@ -1148,7 +1148,7 @@ $client->grants->update(
-
$client->grants->archive($tenantId, $grantId) -> ?GrantsArchive200Response +
$client->grants->archive($tenantId, $grantId) -> ?GrantsArchiveResponse
@@ -1214,7 +1214,7 @@ $client->grants->archive(
## Tenants -
$client->tenants->list($request) -> ?TenantsList200Response +
$client->tenants->list($request) -> ?TenantsListResponse
@@ -1264,7 +1264,7 @@ $client->tenants->list(
-
$client->tenants->create($request) -> ?TenantsCreate200Response +
$client->tenants->create($request) -> ?TenantsCreateResponse
@@ -1316,7 +1316,7 @@ $client->tenants->create(
-
$client->tenants->get($tenantId) -> ?TenantsGet200Response +
$client->tenants->get($tenantId) -> ?TenantsGetResponse
@@ -1414,7 +1414,7 @@ $client->tenants->delete(
-
$client->tenants->update($tenantId, $request) -> ?TenantsUpdate200Response +
$client->tenants->update($tenantId, $request) -> ?TenantsUpdateResponse
@@ -1592,7 +1592,7 @@ $client->tenants->suspend(
-
$client->tenants->usage($tenantId, $request) -> ?TenantsUsage200Response +
$client->tenants->usage($tenantId, $request) -> ?TenantsUsageResponse
@@ -1674,7 +1674,7 @@ $client->tenants->usage(
## Documents -
$client->documents->list($tenantId, $request) -> ?DocumentsList200Response +
$client->documents->list($tenantId, $request) -> ?DocumentsListResponse
@@ -1773,7 +1773,7 @@ $client->documents->list(
-
$client->documents->get($tenantId, $id) -> ?DocumentsGet200Response +
$client->documents->get($tenantId, $docId) -> ?DocumentsGetResponse
@@ -1788,7 +1788,7 @@ $client->documents->list( ```php $client->documents->get( 'tenantId', - 'id', + 'docId', ); ```
@@ -1812,7 +1812,7 @@ $client->documents->get(
-**$id:** `string` +**$docId:** `string`
@@ -1824,7 +1824,7 @@ $client->documents->get(
-
$client->documents->delete($tenantId, $id) +
$client->documents->delete($tenantId, $docId)
@@ -1839,7 +1839,7 @@ $client->documents->get( ```php $client->documents->delete( 'tenantId', - 'id', + 'docId', ); ```
@@ -1863,7 +1863,7 @@ $client->documents->delete(
-**$id:** `string` +**$docId:** `string`
@@ -1875,7 +1875,7 @@ $client->documents->delete(
-
$client->documents->update($tenantId, $id, $request) -> ?DocumentsUpdate200Response +
$client->documents->update($tenantId, $docId, $request) -> ?DocumentsUpdateResponse
@@ -1904,7 +1904,7 @@ A document that is being deleted answers 404. ```php $client->documents->update( 'tenantId', - 'id', + 'docId', new DocumentsUpdateRequest([ 'name' => 'name', ]), @@ -1931,7 +1931,7 @@ $client->documents->update(
-**$id:** `string` +**$docId:** `string`
@@ -1951,7 +1951,7 @@ $client->documents->update(
-
$client->documents->commit($tenantId, $id, $request) -> ?DocumentsCommit200Response +
$client->documents->commit($tenantId, $docId, $request) -> ?DocumentsCommitResponse
@@ -1980,7 +1980,7 @@ An upload token commits only the documents it started; any other document answer ```php $client->documents->commit( 'tenantId', - 'id', + 'docId', new DocumentsCommitRequest([ 'sha256' => 'sha256', ]), @@ -2007,7 +2007,7 @@ $client->documents->commit(
-**$id:** `string` +**$docId:** `string`
@@ -2027,7 +2027,7 @@ $client->documents->commit(
-
$client->documents->download($tenantId, $id) -> string +
$client->documents->download($tenantId, $docId) -> string
@@ -2042,7 +2042,7 @@ $client->documents->commit( ```php $client->documents->download( 'tenantId', - 'id', + 'docId', ); ```
@@ -2066,7 +2066,7 @@ $client->documents->download(
-**$id:** `string` +**$docId:** `string`
@@ -2078,7 +2078,7 @@ $client->documents->download(
-
$client->documents->thumbnail($tenantId, $id) -> string +
$client->documents->thumbnail($tenantId, $docId) -> string
@@ -2093,7 +2093,7 @@ $client->documents->download( ```php $client->documents->thumbnail( 'tenantId', - 'id', + 'docId', ); ```
@@ -2117,7 +2117,7 @@ $client->documents->thumbnail(
-**$id:** `string` +**$docId:** `string`
@@ -2129,7 +2129,7 @@ $client->documents->thumbnail(
-
$client->documents->uploadProxy($tenantId, $id, $request) -> ?DocumentsUploadProxy200Response +
$client->documents->uploadProxy($tenantId, $docId, $request) -> ?DocumentsUploadProxyResponse
@@ -2158,7 +2158,7 @@ This bounded origin-mediated fallback must only be used after documents.init ret ```php $client->documents->uploadProxy( 'tenantId', - 'id', + 'docId', new UploadProxyDocumentsRequest([ 'file' => File::createFromString("example_file", "example_file"), ]), @@ -2185,7 +2185,7 @@ $client->documents->uploadProxy(
-**$id:** `string` +**$docId:** `string`
@@ -2330,7 +2330,7 @@ $client->documents->importFrom(
-
$client->documents->init($tenantId, $request) -> ?DocumentsInit200Response +
$client->documents->init($tenantId, $request) -> ?DocumentsInitResponse
@@ -2342,7 +2342,7 @@ $client->documents->importFrom(
-With an upload token, the document goes into the token's folder with the token's metadata, whatever the request says; contentLength must be within the token's maxBytes, and the token makes at most maxFiles documents (403 after). docId, idempotencyKey and dedupMode reuse-existing are refused (400): each could reach a document the token didn't make. +With an upload token, the document goes into the token's folder with the token's metadata, whatever the request says; sizeBytes must be within the token's maxBytes, and the token makes at most maxFiles documents (403 after). docId, idempotencyKey and dedupMode reuse-existing are refused (400): each could reach a document the token didn't make.
@@ -2360,7 +2360,7 @@ With an upload token, the document goes into the token's folder with the token's $client->documents->init( 'tenantId', new DocumentsInitRequest([ - 'contentLength' => 1.1, + 'sizeBytes' => 1, 'contentSha256' => 'contentSha256', ]), ); @@ -2386,7 +2386,7 @@ $client->documents->init(
-**$contentLength:** `float` +**$sizeBytes:** `int`
@@ -2450,7 +2450,7 @@ $client->documents->init(
-**$uploadTtlSec:** `?float` +**$uploadTtlSeconds:** `?int`
@@ -2471,7 +2471,7 @@ $client->documents->init(
## Folders -
$client->folders->list($tenantId, $request) -> ?FoldersList200Response +
$client->folders->list($tenantId, $request) -> ?FoldersListResponse
@@ -2538,7 +2538,7 @@ $client->folders->list(
-
$client->folders->create($tenantId, $request) -> ?FoldersCreate200Response +
$client->folders->create($tenantId, $request) -> ?FoldersCreateResponse
@@ -2613,7 +2613,7 @@ $client->folders->create(
-
$client->folders->get($tenantId, $folderId) -> ?FoldersGet200Response +
$client->folders->get($tenantId, $folderId) -> ?FoldersGetResponse
@@ -2738,7 +2738,7 @@ $client->folders->delete(
-
$client->folders->update($tenantId, $folderId, $request) -> ?FoldersUpdate200Response +
$client->folders->update($tenantId, $folderId, $request) -> ?FoldersUpdateResponse
@@ -2826,7 +2826,7 @@ $client->folders->update(
-Up to 1,000 ids in total. A folder moves with everything in it. 404 NotFound names the ids that do not exist or are being deleted in `details.documentIds` and `details.folderIds`. 409 Conflict carries `details.reason`: `cycle` (the destination is a moved folder or inside one; `details.folderId`), `too-deep` (the move would nest folders deeper than 100 levels; `details.maxDepth`) or `name-taken` (a moved folder's name is taken in the destination, ignoring case; `details.name`). +Up to 1,000 ids in total. A folder moves with everything in it. 404 NotFound names the ids that do not exist or are being deleted in `details.docIds` and `details.folderIds`. 409 Conflict carries `details.reason`: `cycle` (the destination is a moved folder or inside one; `details.folderId`), `too-deep` (the move would nest folders deeper than 100 levels; `details.maxDepth`) or `name-taken` (a moved folder's name is taken in the destination, ignoring case; `details.name`).
@@ -2876,7 +2876,7 @@ $client->folders->moveInto(
-**$documentIds:** `?array` +**$docIds:** `?array`
@@ -2897,7 +2897,7 @@ $client->folders->moveInto(
## Tokens -
$client->tokens->issue($tenantId, $request) -> ?TokensIssue200Response +
$client->tokens->issue($tenantId, $request) -> ?TokensIssueResponse
@@ -2933,7 +2933,7 @@ $client->tokens->issue( 'scope' => [ 'scope', ], - 'expiresIn' => 1, + 'expiresInSeconds' => 1, ])), ]), ); @@ -3041,7 +3041,7 @@ $client->tokens->revoke(
-**$expiresAtSeconds:** `?int` +**$expiresAt:** `?DateTime`
@@ -3177,7 +3177,7 @@ $client->doc->annotations->list(
-**$pageKey:** `string` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. +**$pageKey:** `string` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotationKey` and `fieldKey`.
@@ -3197,7 +3197,7 @@ $client->doc->annotations->list(
-
$client->doc->annotations->create($docId, $layerName, $pageKey, $request) -> ?DocAnnotationsCreate200Response +
$client->doc->annotations->create($docId, $layerName, $pageKey, $request) -> ?DocAnnotationsCreateResponse
@@ -3264,7 +3264,7 @@ $client->doc->annotations->create(
-**$pageKey:** `string` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. +**$pageKey:** `string` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotationKey` and `fieldKey`.
@@ -3300,7 +3300,7 @@ $client->doc->annotations->create(
-
$client->doc->annotations->delete($docId, $layerName, $pageKey, $annotKey, $request) -> ?DocAnnotationsDelete200Response +
$client->doc->annotations->delete($docId, $layerName, $pageKey, $annotationKey, $request) -> ?DocAnnotationsDeleteResponse
@@ -3317,7 +3317,7 @@ $client->doc->annotations->delete( 'docId', 'layerName', 'pageKey', - 'annotKey', + 'annotationKey', new DeleteAnnotationsRequest([]), ); ``` @@ -3350,7 +3350,7 @@ $client->doc->annotations->delete(
-**$pageKey:** `string` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. +**$pageKey:** `string` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotationKey` and `fieldKey`.
@@ -3358,7 +3358,7 @@ $client->doc->annotations->delete(
-**$annotKey:** `string` — The annotation's address on the page: `obj:N`, its indirect object number, or `base:N` for an annotation the uploaded file stored inline (without an object number of its own), the position it was born at in the page's /Annots. The name the annotation's `ref` carries for life. +**$annotationKey:** `string` — The annotation's address on the page: `obj:N`, its indirect object number, or `base:N` for an annotation the uploaded file stored inline (without an object number of its own), the position it was born at in the page's /Annots. The name the annotation's `ref` carries for life.
@@ -3386,7 +3386,7 @@ $client->doc->annotations->delete(
-
$client->doc->annotations->update($docId, $layerName, $pageKey, $annotKey, $request) -> ?DocAnnotationsUpdate200Response +
$client->doc->annotations->update($docId, $layerName, $pageKey, $annotationKey, $request) -> ?DocAnnotationsUpdateResponse
@@ -3403,7 +3403,7 @@ $client->doc->annotations->update( 'docId', 'layerName', 'pageKey', - 'annotKey', + 'annotationKey', new UpdateAnnotationsRequest([ 'body' => [ 'key' => "value", @@ -3440,7 +3440,7 @@ $client->doc->annotations->update(
-**$pageKey:** `string` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. +**$pageKey:** `string` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotationKey` and `fieldKey`.
@@ -3448,7 +3448,7 @@ $client->doc->annotations->update(
-**$annotKey:** `string` — The annotation's address on the page: `obj:N`, its indirect object number, or `base:N` for an annotation the uploaded file stored inline (without an object number of its own), the position it was born at in the page's /Annots. The name the annotation's `ref` carries for life. +**$annotationKey:** `string` — The annotation's address on the page: `obj:N`, its indirect object number, or `base:N` for an annotation the uploaded file stored inline (without an object number of its own), the position it was born at in the page's /Annots. The name the annotation's `ref` carries for life.
@@ -3484,7 +3484,7 @@ $client->doc->annotations->update(
-
$client->doc->annotations->readAppearance($docId, $layerName, $pageKey, $annotKey, $request) -> string +
$client->doc->annotations->readAppearance($docId, $layerName, $pageKey, $annotationKey, $request) -> string
@@ -3501,7 +3501,7 @@ $client->doc->annotations->readAppearance( 'docId', 'layerName', 'pageKey', - 'annotKey', + 'annotationKey', new ReadAppearanceAnnotationsRequest([]), ); ``` @@ -3534,7 +3534,7 @@ $client->doc->annotations->readAppearance(
-**$pageKey:** `string` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. +**$pageKey:** `string` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotationKey` and `fieldKey`.
@@ -3542,7 +3542,7 @@ $client->doc->annotations->readAppearance(
-**$annotKey:** `string` — The annotation's address on the page: `obj:N`, its indirect object number, or `base:N` for an annotation the uploaded file stored inline (without an object number of its own), the position it was born at in the page's /Annots. The name the annotation's `ref` carries for life. +**$annotationKey:** `string` — The annotation's address on the page: `obj:N`, its indirect object number, or `base:N` for an annotation the uploaded file stored inline (without an object number of its own), the position it was born at in the page's /Annots. The name the annotation's `ref` carries for life.
@@ -3562,7 +3562,7 @@ $client->doc->annotations->readAppearance(
-
$client->doc->annotations->readFile($docId, $layerName, $pageKey, $annotKey, $request) -> string +
$client->doc->annotations->readFile($docId, $layerName, $pageKey, $annotationKey, $request) -> string
@@ -3593,7 +3593,7 @@ $client->doc->annotations->readFile( 'docId', 'layerName', 'pageKey', - 'annotKey', + 'annotationKey', new ReadFileAnnotationsRequest([]), ); ``` @@ -3626,7 +3626,7 @@ $client->doc->annotations->readFile(
-**$pageKey:** `string` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. +**$pageKey:** `string` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotationKey` and `fieldKey`.
@@ -3634,7 +3634,7 @@ $client->doc->annotations->readFile(
-**$annotKey:** `string` — The annotation's address on the page: `obj:N`, its indirect object number, or `base:N` for an annotation the uploaded file stored inline (without an object number of its own), the position it was born at in the page's /Annots. The name the annotation's `ref` carries for life. +**$annotationKey:** `string` — The annotation's address on the page: `obj:N`, its indirect object number, or `base:N` for an annotation the uploaded file stored inline (without an object number of its own), the position it was born at in the page's /Annots. The name the annotation's `ref` carries for life.
@@ -3709,7 +3709,7 @@ $client->doc->annotations->exportAppearance(
-**$pageKey:** `string` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. +**$pageKey:** `string` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotationKey` and `fieldKey`.
@@ -3737,7 +3737,7 @@ $client->doc->annotations->exportAppearance(
-
$client->doc->annotations->flatten($docId, $layerName, $pageKey, $request) -> ?DocAnnotationsFlatten200Response +
$client->doc->annotations->flatten($docId, $layerName, $pageKey, $request) -> ?DocAnnotationsFlattenResponse
@@ -3790,7 +3790,7 @@ $client->doc->annotations->flatten(
-**$pageKey:** `string` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. +**$pageKey:** `string` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotationKey` and `fieldKey`.
@@ -3826,7 +3826,7 @@ $client->doc->annotations->flatten(
-
$client->doc->annotations->reorder($docId, $layerName, $pageKey, $request) -> ?DocAnnotationsReorder200Response +
$client->doc->annotations->reorder($docId, $layerName, $pageKey, $request) -> ?DocAnnotationsReorderResponse
@@ -3886,7 +3886,7 @@ $client->doc->annotations->reorder(
-**$pageKey:** `string` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. +**$pageKey:** `string` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotationKey` and `fieldKey`.
@@ -4226,7 +4226,7 @@ $client->doc->fonts->resolve(
## Doc Forms -
$client->doc->forms->list($docId, $layerName, $request) -> ?DocFormsList200Response +
$client->doc->forms->list($docId, $layerName, $request) -> ?DocFormsListResponse
@@ -4286,7 +4286,7 @@ $client->doc->forms->list(
-
$client->doc->forms->reorderCalculations($docId, $layerName, $request) -> ?DocFormsReorderCalculations200Response +
$client->doc->forms->reorderCalculations($docId, $layerName, $request) -> ?DocFormsReorderCalculationsResponse
@@ -4377,7 +4377,7 @@ $client->doc->forms->reorderCalculations(
-
$client->doc->forms->setValue($docId, $layerName, $fieldKey, $request) -> ?DocFormsSetValue200Response +
$client->doc->forms->setValue($docId, $layerName, $fieldKey, $request) -> ?DocFormsSetValueResponse
@@ -4466,7 +4466,7 @@ $client->doc->forms->setValue(
-
$client->doc->forms->reset($docId, $layerName, $request) -> ?DocFormsReset200Response +
$client->doc->forms->reset($docId, $layerName, $request) -> ?DocFormsResetResponse
@@ -4542,7 +4542,7 @@ $client->doc->forms->reset(
-
$client->doc->forms->deleteWidget($docId, $layerName, $pageKey, $annotKey, $request) -> ?DocFormsDeleteWidget200Response +
$client->doc->forms->deleteWidget($docId, $layerName, $pageKey, $annotationKey, $request) -> ?DocFormsDeleteWidgetResponse
@@ -4559,7 +4559,7 @@ $client->doc->forms->deleteWidget( 'docId', 'layerName', 'pageKey', - 'annotKey', + 'annotationKey', new DeleteWidgetFormsRequest([]), ); ``` @@ -4592,7 +4592,7 @@ $client->doc->forms->deleteWidget(
-**$pageKey:** `string` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. +**$pageKey:** `string` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotationKey` and `fieldKey`.
@@ -4600,7 +4600,7 @@ $client->doc->forms->deleteWidget(
-**$annotKey:** `string` — The annotation's address on the page: `obj:N`, its indirect object number, or `base:N` for an annotation the uploaded file stored inline (without an object number of its own), the position it was born at in the page's /Annots. The name the annotation's `ref` carries for life. +**$annotationKey:** `string` — The annotation's address on the page: `obj:N`, its indirect object number, or `base:N` for an annotation the uploaded file stored inline (without an object number of its own), the position it was born at in the page's /Annots. The name the annotation's `ref` carries for life.
@@ -4628,7 +4628,7 @@ $client->doc->forms->deleteWidget(
-
$client->doc->forms->updateWidget($docId, $layerName, $pageKey, $annotKey, $request) -> ?DocFormsUpdateWidget200Response +
$client->doc->forms->updateWidget($docId, $layerName, $pageKey, $annotationKey, $request) -> ?DocFormsUpdateWidgetResponse
@@ -4645,7 +4645,7 @@ $client->doc->forms->updateWidget( 'docId', 'layerName', 'pageKey', - 'annotKey', + 'annotationKey', new DocFormsUpdateWidgetRequest([ 'patch' => new WidgetPatch([]), ]), @@ -4680,7 +4680,7 @@ $client->doc->forms->updateWidget(
-**$pageKey:** `string` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. +**$pageKey:** `string` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotationKey` and `fieldKey`.
@@ -4688,7 +4688,7 @@ $client->doc->forms->updateWidget(
-**$annotKey:** `string` — The annotation's address on the page: `obj:N`, its indirect object number, or `base:N` for an annotation the uploaded file stored inline (without an object number of its own), the position it was born at in the page's /Annots. The name the annotation's `ref` carries for life. +**$annotationKey:** `string` — The annotation's address on the page: `obj:N`, its indirect object number, or `base:N` for an annotation the uploaded file stored inline (without an object number of its own), the position it was born at in the page's /Annots. The name the annotation's `ref` carries for life.
@@ -4724,7 +4724,7 @@ $client->doc->forms->updateWidget(
-
$client->doc->forms->reorderWidgets($docId, $layerName, $pageKey, $request) -> ?DocFormsReorderWidgets200Response +
$client->doc->forms->reorderWidgets($docId, $layerName, $pageKey, $request) -> ?DocFormsReorderWidgetsResponse
@@ -4784,7 +4784,7 @@ $client->doc->forms->reorderWidgets(
-**$pageKey:** `string` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. +**$pageKey:** `string` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotationKey` and `fieldKey`.
@@ -4951,7 +4951,7 @@ $client->doc->outline->get(
## Doc Pages -
$client->doc->pages->setScale($docId, $layerName, $pageKey, $request) -> ?DocPagesSetScale200Response +
$client->doc->pages->setScale($docId, $layerName, $pageKey, $request) -> ?DocPagesSetScaleResponse
@@ -5000,7 +5000,7 @@ $client->doc->pages->setScale(
-**$pageKey:** `string` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. +**$pageKey:** `string` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotationKey` and `fieldKey`.
@@ -5036,7 +5036,7 @@ $client->doc->pages->setScale(
-
$client->doc->pages->viewports($docId, $layerName, $pageKey, $request) -> ?DocPagesViewports200Response +
$client->doc->pages->viewports($docId, $layerName, $pageKey, $request) -> ?DocPagesViewportsResponse
@@ -5085,7 +5085,7 @@ $client->doc->pages->viewports(
-**$pageKey:** `string` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. +**$pageKey:** `string` — The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotationKey` and `fieldKey`.
@@ -5193,7 +5193,7 @@ $client->doc->pages->extract(
-
$client->doc->pages->flatten($docId, $layerName, $request) -> ?DocPagesFlatten200Response +
$client->doc->pages->flatten($docId, $layerName, $request) -> ?DocPagesFlattenResponse
@@ -5273,7 +5273,7 @@ $client->doc->pages->flatten(
-
$client->doc->pages->setName($docId, $layerName, $request) -> ?DocPagesSetName200Response +
$client->doc->pages->setName($docId, $layerName, $request) -> ?DocPagesSetNameResponse
@@ -5353,7 +5353,7 @@ $client->doc->pages->setName(
-
$client->doc->pages->removeName($docId, $layerName, $request) -> ?DocPagesRemoveName200Response +
$client->doc->pages->removeName($docId, $layerName, $request) -> ?DocPagesRemoveNameResponse
@@ -5434,7 +5434,7 @@ $client->doc->pages->removeName(
## Doc Redactions -
$client->doc->redactions->apply($docId, $layerName, $request) -> ?DocRedactionsApply200Response +
$client->doc->redactions->apply($docId, $layerName, $request) -> ?DocRedactionsApplyResponse
@@ -5519,7 +5519,7 @@ $client->doc->redactions->apply(
## Doc Signatures -
$client->doc->signatures->list($docId, $layerName, $request) -> ?DocSignaturesList200Response +
$client->doc->signatures->list($docId, $layerName, $request) -> ?DocSignaturesListResponse
@@ -5593,7 +5593,7 @@ $client->doc->signatures->list(
-
$client->doc->signatures->cancel($docId, $layerName, $signingId, $request) -> ?DocSignaturesCancel200Response +
$client->doc->signatures->cancel($docId, $layerName, $signingId, $request) -> ?DocSignaturesCancelResponse
@@ -5662,7 +5662,7 @@ $client->doc->signatures->cancel(
-
$client->doc->signatures->complete($docId, $layerName, $signingId, $request) -> ?DocSignaturesComplete200Response +
$client->doc->signatures->complete($docId, $layerName, $signingId, $request) -> ?DocSignaturesCompleteResponse
@@ -5767,7 +5767,7 @@ $client->doc->signatures->complete(
-
$client->doc->signatures->analysis($docId, $layerName, $request) -> ?DocSignaturesAnalysis200Response +
$client->doc->signatures->analysis($docId, $layerName, $request) -> ?DocSignaturesAnalysisResponse
@@ -5865,7 +5865,7 @@ $client->doc->signatures->analysis(
-
$client->doc->signatures->prepare($docId, $layerName, $request) -> ?DocSignaturesPrepare200Response +
$client->doc->signatures->prepare($docId, $layerName, $request) -> ?DocSignaturesPrepareResponse
@@ -5942,7 +5942,7 @@ $client->doc->signatures->prepare(
## Doc Versions -
$client->doc->versions->list($docId, $layerName, $request) -> ?DocVersionsList200Response +
$client->doc->versions->list($docId, $layerName, $request) -> ?DocVersionsListResponse
@@ -6016,7 +6016,7 @@ $client->doc->versions->list(
-
$client->doc->versions->analysis($docId, $layerName, $sha, $request) -> ?DocVersionsAnalysis200Response +
$client->doc->versions->analysis($docId, $layerName, $sha256, $request) -> ?DocVersionsAnalysisResponse
@@ -6046,7 +6046,7 @@ Exactly one of `since.signature` / `since.revision`; `until=` defaults $client->doc->versions->analysis( 'docId', 'layerName', - 'sha', + 'sha256', new AnalysisVersionsRequest([]), ); ``` @@ -6079,7 +6079,7 @@ $client->doc->versions->analysis(
-**$sha:** `string` +**$sha256:** `string`
@@ -6139,7 +6139,7 @@ $client->doc->versions->analysis(
-
$client->doc->versions->download($docId, $layerName, $sha, $request) -> string +
$client->doc->versions->download($docId, $layerName, $sha256, $request) -> string
@@ -6155,7 +6155,7 @@ $client->doc->versions->analysis( $client->doc->versions->download( 'docId', 'layerName', - 'sha', + 'sha256', new DownloadVersionsRequest([]), ); ``` @@ -6188,7 +6188,7 @@ $client->doc->versions->download(
-**$sha:** `string` +**$sha256:** `string`
@@ -6208,7 +6208,7 @@ $client->doc->versions->download(
-
$client->doc->versions->revision($docId, $layerName, $sha, $index, $request) -> string +
$client->doc->versions->revision($docId, $layerName, $sha256, $index, $request) -> string
@@ -6224,7 +6224,7 @@ $client->doc->versions->download( $client->doc->versions->revision( 'docId', 'layerName', - 'sha', + 'sha256', 1, new RevisionVersionsRequest([]), ); @@ -6258,7 +6258,7 @@ $client->doc->versions->revision(
-**$sha:** `string` +**$sha256:** `string`
@@ -6286,7 +6286,7 @@ $client->doc->versions->revision(
-
$client->doc->versions->signatures($docId, $layerName, $sha, $request) -> ?DocVersionsSignatures200Response +
$client->doc->versions->signatures($docId, $layerName, $sha256, $request) -> ?DocVersionsSignaturesResponse
@@ -6302,7 +6302,7 @@ $client->doc->versions->revision( $client->doc->versions->signatures( 'docId', 'layerName', - 'sha', + 'sha256', new SignaturesVersionsRequest([]), ); ``` @@ -6335,7 +6335,7 @@ $client->doc->versions->signatures(
-**$sha:** `string` +**$sha256:** `string`
@@ -6355,7 +6355,7 @@ $client->doc->versions->signatures(
-
$client->doc->versions->signatureContents($docId, $layerName, $sha, $fieldKey, $request) -> string +
$client->doc->versions->signatureContents($docId, $layerName, $sha256, $fieldKey, $request) -> string
@@ -6385,7 +6385,7 @@ $client->doc->versions->signatures( $client->doc->versions->signatureContents( 'docId', 'layerName', - 'sha', + 'sha256', 'fieldKey', new SignatureContentsVersionsRequest([]), ); @@ -6419,7 +6419,7 @@ $client->doc->versions->signatureContents(
-**$sha:** `string` +**$sha256:** `string`
@@ -6447,7 +6447,7 @@ $client->doc->versions->signatureContents(
-
$client->doc->versions->signatureDigest($docId, $layerName, $sha, $fieldKey, $algorithm, $request) -> string +
$client->doc->versions->signatureDigest($docId, $layerName, $sha256, $fieldKey, $algorithm, $request) -> string
@@ -6477,7 +6477,7 @@ What a CMS verifier compares its message digest to. $client->doc->versions->signatureDigest( 'docId', 'layerName', - 'sha', + 'sha256', 'fieldKey', SignatureDigestVersionsRequestAlgorithm::Sha1->value, new SignatureDigestVersionsRequest([]), @@ -6512,7 +6512,7 @@ $client->doc->versions->signatureDigest(
-**$sha:** `string` +**$sha256:** `string`
@@ -6549,7 +6549,7 @@ $client->doc->versions->signatureDigest(
## Doc Fonts Programs -
$client->doc->fonts->programs->download($docId, $layerName, $displayHash, $request) -> string +
$client->doc->fonts->programs->download($docId, $layerName, $displaySha256, $request) -> string
@@ -6579,7 +6579,7 @@ A document token needs any one of the listed capabilities: one that may write te $client->doc->fonts->programs->download( 'docId', 'layerName', - 'displayHash', + 'displaySha256', new DownloadProgramsRequest([]), ); ``` @@ -6612,7 +6612,7 @@ $client->doc->fonts->programs->download(
-**$displayHash:** `string` +**$displaySha256:** `string`
@@ -6632,7 +6632,7 @@ $client->doc->fonts->programs->download(
-
$client->doc->fonts->programs->get($docId, $layerName, $displayHash, $request) -> ?FontProgramInfo +
$client->doc->fonts->programs->get($docId, $layerName, $displaySha256, $request) -> ?FontProgramInfo
@@ -6648,7 +6648,7 @@ $client->doc->fonts->programs->download( $client->doc->fonts->programs->get( 'docId', 'layerName', - 'displayHash', + 'displaySha256', new GetProgramsRequest([]), ); ``` @@ -6681,7 +6681,7 @@ $client->doc->fonts->programs->get(
-**$displayHash:** `string` +**$displaySha256:** `string`
@@ -6763,7 +6763,7 @@ $client->doc->metadata->custom->get(
## Documents Layers -
$client->documents->layers->list($tenantId, $id, $request) -> ?DocumentsLayersList200Response +
$client->documents->layers->list($tenantId, $docId, $request) -> ?DocumentsLayersListResponse
@@ -6778,7 +6778,7 @@ $client->doc->metadata->custom->get( ```php $client->documents->layers->list( 'tenantId', - 'id', + 'docId', new ListLayersRequest([]), ); ``` @@ -6803,7 +6803,7 @@ $client->documents->layers->list(
-**$id:** `string` +**$docId:** `string`
@@ -6839,7 +6839,7 @@ $client->documents->layers->list(
-
$client->documents->layers->delete($tenantId, $id, $layerName) +
$client->documents->layers->delete($tenantId, $docId, $layerName)
@@ -6854,7 +6854,7 @@ $client->documents->layers->list( ```php $client->documents->layers->delete( 'tenantId', - 'id', + 'docId', 'layerName', ); ``` @@ -6879,7 +6879,7 @@ $client->documents->layers->delete(
-**$id:** `string` +**$docId:** `string`
@@ -6900,7 +6900,7 @@ $client->documents->layers->delete(
## Grants Visitors -
$client->grants->visitors->list($tenantId, $grantId, $request) -> ?GrantsVisitorsList200Response +
$client->grants->visitors->list($tenantId, $grantId, $request) -> ?GrantsVisitorsListResponse
diff --git a/src/CloudPDFClient.php b/src/CloudPDFClient.php index 036fe865..b0d55475 100644 --- a/src/CloudPDFClient.php +++ b/src/CloudPDFClient.php @@ -67,6 +67,7 @@ class CloudPDFClient /** * @param ?string $token The token to use for authentication. + * @param ?string $embedPdfVersion * @param ?array{ * baseUrl?: string, * client?: ClientInterface, @@ -77,17 +78,22 @@ class CloudPDFClient */ public function __construct( ?string $token = null, + ?string $embedPdfVersion = null, ?array $options = null, ) { $defaultHeaders = [ + 'EmbedPDF-Version' => '3.0', 'X-Fern-Language' => 'PHP', 'X-Fern-SDK-Name' => 'CloudPDF', - 'X-Fern-SDK-Version' => '3.0.0-alpha.22', - 'User-Agent' => 'cloudpdf/sdk/3.0.0-alpha.22', + 'X-Fern-SDK-Version' => '3.0.0-alpha.23', + 'User-Agent' => 'cloudpdf/sdk/3.0.0-alpha.23', ]; if ($token != null) { $defaultHeaders['Authorization'] = "Bearer $token"; } + if ($embedPdfVersion !== null) { + $defaultHeaders['EmbedPDF-Version'] = $embedPdfVersion; + } $this->options = $options ?? []; diff --git a/src/Core/Client/RawClient.php b/src/Core/Client/RawClient.php index 42831479..01293f02 100644 --- a/src/Core/Client/RawClient.php +++ b/src/Core/Client/RawClient.php @@ -289,6 +289,7 @@ private function buildUrl( $baseUrl = $request->baseUrl; $trimmedBaseUrl = rtrim($baseUrl, '/'); $trimmedBasePath = ltrim($request->path, '/'); + self::assertNoDotSegments($trimmedBasePath); $url = "{$trimmedBaseUrl}/{$trimmedBasePath}"; $query = array_merge( $request->query, @@ -300,6 +301,25 @@ private function buildUrl( return $url; } + /** + * Rejects "." and ".." path segments, which HTTP clients and servers resolve + * and which would otherwise change the endpoint a request is sent to. + * + * @param string $path + * @throws InvalidArgumentException + */ + private static function assertNoDotSegments(string $path): void + { + foreach (explode('/', $path) as $segment) { + $decoded = rawurldecode($segment); + if ($decoded === '.' || $decoded === '..') { + throw new InvalidArgumentException( + "Invalid request path \"/{$path}\": \".\" and \"..\" path segments are not allowed." + ); + } + } + } + /** * @param array $query * @return string diff --git a/src/Core/Json/JsonSerializableType.php b/src/Core/Json/JsonSerializableType.php index 4bf324d2..672d2cc6 100644 --- a/src/Core/Json/JsonSerializableType.php +++ b/src/Core/Json/JsonSerializableType.php @@ -146,12 +146,14 @@ public static function jsonDeserialize(array $data): static $dateTypeAttr = $property->getAttributes(Date::class)[0] ?? null; if ($dateTypeAttr) { $dateType = $dateTypeAttr->newInstance()->type; - if (!is_string($value)) { - throw new JsonException("Unexpected non-string type for date."); + if ($value !== null) { + if (!is_string($value)) { + throw new JsonException("Unexpected non-string type for date."); + } + $value = ($dateType === Date::TYPE_DATE) + ? JsonDeserializer::deserializeDate($value) + : JsonDeserializer::deserializeDateTime($value); } - $value = ($dateType === Date::TYPE_DATE) - ? JsonDeserializer::deserializeDate($value) - : JsonDeserializer::deserializeDateTime($value); } // Handle Array annotation diff --git a/src/Doc/Annotations/AnnotationsClient.php b/src/Doc/Annotations/AnnotationsClient.php index 40b825dd..53aca406 100644 --- a/src/Doc/Annotations/AnnotationsClient.php +++ b/src/Doc/Annotations/AnnotationsClient.php @@ -15,18 +15,18 @@ use Psr\Http\Client\ClientExceptionInterface; use CloudPDF\Doc\Annotations\Requests\ListAnnotationsRequest; use CloudPDF\Doc\Annotations\Requests\CreateAnnotationsRequest; -use CloudPDF\Types\DocAnnotationsCreate200Response; +use CloudPDF\Types\DocAnnotationsCreateResponse; use CloudPDF\Doc\Annotations\Requests\DeleteAnnotationsRequest; -use CloudPDF\Types\DocAnnotationsDelete200Response; +use CloudPDF\Types\DocAnnotationsDeleteResponse; use CloudPDF\Doc\Annotations\Requests\UpdateAnnotationsRequest; -use CloudPDF\Types\DocAnnotationsUpdate200Response; +use CloudPDF\Types\DocAnnotationsUpdateResponse; use CloudPDF\Doc\Annotations\Requests\ReadAppearanceAnnotationsRequest; use CloudPDF\Doc\Annotations\Requests\ReadFileAnnotationsRequest; use CloudPDF\Doc\Annotations\Requests\ExportAppearanceAnnotationsRequest; use CloudPDF\Doc\Annotations\Requests\FlattenAnnotationsRequest; -use CloudPDF\Types\DocAnnotationsFlatten200Response; +use CloudPDF\Types\DocAnnotationsFlattenResponse; use CloudPDF\Doc\Annotations\Requests\DocAnnotationsReorderRequest; -use CloudPDF\Types\DocAnnotationsReorder200Response; +use CloudPDF\Types\DocAnnotationsReorderResponse; class AnnotationsClient { @@ -141,7 +141,7 @@ public function listAll(string $docId, string $layerName, ListAllAnnotationsRequ * * @param string $docId * @param string $layerName - * @param string $pageKey The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. + * @param string $pageKey The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotationKey` and `fieldKey`. * @param ListAnnotationsRequest $request * @param ?array{ * baseUrl?: string, @@ -211,7 +211,7 @@ public function list(string $docId, string $layerName, string $pageKey, ListAnno * * @param string $docId * @param string $layerName - * @param string $pageKey The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. + * @param string $pageKey The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotationKey` and `fieldKey`. * @param CreateAnnotationsRequest $request * @param ?array{ * baseUrl?: string, @@ -221,11 +221,11 @@ public function list(string $docId, string $layerName, string $pageKey, ListAnno * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocAnnotationsCreate200Response + * @return ?DocAnnotationsCreateResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function create(string $docId, string $layerName, string $pageKey, CreateAnnotationsRequest $request, ?array $options = null): ?DocAnnotationsCreate200Response + public function create(string $docId, string $layerName, string $pageKey, CreateAnnotationsRequest $request, ?array $options = null): ?DocAnnotationsCreateResponse { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -252,7 +252,7 @@ public function create(string $docId, string $layerName, string $pageKey, Create if (empty($json)) { return null; } - return DocAnnotationsCreate200Response::fromJson($json); + return DocAnnotationsCreateResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -273,15 +273,15 @@ public function create(string $docId, string $layerName, string $pageKey, Create * 'docId', * 'layerName', * 'pageKey', - * 'annotKey', + * 'annotationKey', * new DeleteAnnotationsRequest([]), * ); * ``` * * @param string $docId * @param string $layerName - * @param string $pageKey The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. - * @param string $annotKey The annotation's address on the page: `obj:N`, its indirect object number, or `base:N` for an annotation the uploaded file stored inline (without an object number of its own), the position it was born at in the page's /Annots. The name the annotation's `ref` carries for life. + * @param string $pageKey The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotationKey` and `fieldKey`. + * @param string $annotationKey The annotation's address on the page: `obj:N`, its indirect object number, or `base:N` for an annotation the uploaded file stored inline (without an object number of its own), the position it was born at in the page's /Annots. The name the annotation's `ref` carries for life. * @param DeleteAnnotationsRequest $request * @param ?array{ * baseUrl?: string, @@ -291,11 +291,11 @@ public function create(string $docId, string $layerName, string $pageKey, Create * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocAnnotationsDelete200Response + * @return ?DocAnnotationsDeleteResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function delete(string $docId, string $layerName, string $pageKey, string $annotKey, DeleteAnnotationsRequest $request = new DeleteAnnotationsRequest(), ?array $options = null): ?DocAnnotationsDelete200Response + public function delete(string $docId, string $layerName, string $pageKey, string $annotationKey, DeleteAnnotationsRequest $request = new DeleteAnnotationsRequest(), ?array $options = null): ?DocAnnotationsDeleteResponse { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -309,7 +309,7 @@ public function delete(string $docId, string $layerName, string $pageKey, string $response = $this->client->sendRequest( new JsonApiRequest( baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Saas->value, - path: "v1/docs/{$docId}/layers/{$layerName}/annotations/pages/{$pageKey}/items/{$annotKey}", + path: "v1/docs/{$docId}/layers/{$layerName}/annotations/pages/{$pageKey}/items/{$annotationKey}", method: HttpMethod::DELETE, headers: $headers, ), @@ -321,7 +321,7 @@ public function delete(string $docId, string $layerName, string $pageKey, string if (empty($json)) { return null; } - return DocAnnotationsDelete200Response::fromJson($json); + return DocAnnotationsDeleteResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -342,7 +342,7 @@ public function delete(string $docId, string $layerName, string $pageKey, string * 'docId', * 'layerName', * 'pageKey', - * 'annotKey', + * 'annotationKey', * new UpdateAnnotationsRequest([ * 'body' => [ * 'key' => "value", @@ -353,8 +353,8 @@ public function delete(string $docId, string $layerName, string $pageKey, string * * @param string $docId * @param string $layerName - * @param string $pageKey The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. - * @param string $annotKey The annotation's address on the page: `obj:N`, its indirect object number, or `base:N` for an annotation the uploaded file stored inline (without an object number of its own), the position it was born at in the page's /Annots. The name the annotation's `ref` carries for life. + * @param string $pageKey The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotationKey` and `fieldKey`. + * @param string $annotationKey The annotation's address on the page: `obj:N`, its indirect object number, or `base:N` for an annotation the uploaded file stored inline (without an object number of its own), the position it was born at in the page's /Annots. The name the annotation's `ref` carries for life. * @param UpdateAnnotationsRequest $request * @param ?array{ * baseUrl?: string, @@ -364,11 +364,11 @@ public function delete(string $docId, string $layerName, string $pageKey, string * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocAnnotationsUpdate200Response + * @return ?DocAnnotationsUpdateResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function update(string $docId, string $layerName, string $pageKey, string $annotKey, UpdateAnnotationsRequest $request, ?array $options = null): ?DocAnnotationsUpdate200Response + public function update(string $docId, string $layerName, string $pageKey, string $annotationKey, UpdateAnnotationsRequest $request, ?array $options = null): ?DocAnnotationsUpdateResponse { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -382,7 +382,7 @@ public function update(string $docId, string $layerName, string $pageKey, string $response = $this->client->sendRequest( new JsonApiRequest( baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Saas->value, - path: "v1/docs/{$docId}/layers/{$layerName}/annotations/pages/{$pageKey}/items/{$annotKey}", + path: "v1/docs/{$docId}/layers/{$layerName}/annotations/pages/{$pageKey}/items/{$annotationKey}", method: HttpMethod::PATCH, headers: $headers, body: $request->body, @@ -395,7 +395,7 @@ public function update(string $docId, string $layerName, string $pageKey, string if (empty($json)) { return null; } - return DocAnnotationsUpdate200Response::fromJson($json); + return DocAnnotationsUpdateResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -416,15 +416,15 @@ public function update(string $docId, string $layerName, string $pageKey, string * 'docId', * 'layerName', * 'pageKey', - * 'annotKey', + * 'annotationKey', * new ReadAppearanceAnnotationsRequest([]), * ); * ``` * * @param string $docId * @param string $layerName - * @param string $pageKey The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. - * @param string $annotKey The annotation's address on the page: `obj:N`, its indirect object number, or `base:N` for an annotation the uploaded file stored inline (without an object number of its own), the position it was born at in the page's /Annots. The name the annotation's `ref` carries for life. + * @param string $pageKey The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotationKey` and `fieldKey`. + * @param string $annotationKey The annotation's address on the page: `obj:N`, its indirect object number, or `base:N` for an annotation the uploaded file stored inline (without an object number of its own), the position it was born at in the page's /Annots. The name the annotation's `ref` carries for life. * @param ReadAppearanceAnnotationsRequest $request * @param ?array{ * baseUrl?: string, @@ -438,7 +438,7 @@ public function update(string $docId, string $layerName, string $pageKey, string * @throws CloudPDFException * @throws CloudPDFApiException */ - public function readAppearance(string $docId, string $layerName, string $pageKey, string $annotKey, ReadAppearanceAnnotationsRequest $request = new ReadAppearanceAnnotationsRequest(), ?array $options = null): string + public function readAppearance(string $docId, string $layerName, string $pageKey, string $annotationKey, ReadAppearanceAnnotationsRequest $request = new ReadAppearanceAnnotationsRequest(), ?array $options = null): string { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -449,7 +449,7 @@ public function readAppearance(string $docId, string $layerName, string $pageKey $response = $this->client->sendRequest( new JsonApiRequest( baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Saas->value, - path: "v1/docs/{$docId}/layers/{$layerName}/annotations/pages/{$pageKey}/items/{$annotKey}/resources/appearance", + path: "v1/docs/{$docId}/layers/{$layerName}/annotations/pages/{$pageKey}/items/{$annotationKey}/resources/appearance", method: HttpMethod::GET, headers: $headers, ), @@ -478,15 +478,15 @@ public function readAppearance(string $docId, string $layerName, string $pageKey * 'docId', * 'layerName', * 'pageKey', - * 'annotKey', + * 'annotationKey', * new ReadFileAnnotationsRequest([]), * ); * ``` * * @param string $docId * @param string $layerName - * @param string $pageKey The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. - * @param string $annotKey The annotation's address on the page: `obj:N`, its indirect object number, or `base:N` for an annotation the uploaded file stored inline (without an object number of its own), the position it was born at in the page's /Annots. The name the annotation's `ref` carries for life. + * @param string $pageKey The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotationKey` and `fieldKey`. + * @param string $annotationKey The annotation's address on the page: `obj:N`, its indirect object number, or `base:N` for an annotation the uploaded file stored inline (without an object number of its own), the position it was born at in the page's /Annots. The name the annotation's `ref` carries for life. * @param ReadFileAnnotationsRequest $request * @param ?array{ * baseUrl?: string, @@ -500,7 +500,7 @@ public function readAppearance(string $docId, string $layerName, string $pageKey * @throws CloudPDFException * @throws CloudPDFApiException */ - public function readFile(string $docId, string $layerName, string $pageKey, string $annotKey, ReadFileAnnotationsRequest $request = new ReadFileAnnotationsRequest(), ?array $options = null): string + public function readFile(string $docId, string $layerName, string $pageKey, string $annotationKey, ReadFileAnnotationsRequest $request = new ReadFileAnnotationsRequest(), ?array $options = null): string { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -511,7 +511,7 @@ public function readFile(string $docId, string $layerName, string $pageKey, stri $response = $this->client->sendRequest( new JsonApiRequest( baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Saas->value, - path: "v1/docs/{$docId}/layers/{$layerName}/annotations/pages/{$pageKey}/items/{$annotKey}/resources/file", + path: "v1/docs/{$docId}/layers/{$layerName}/annotations/pages/{$pageKey}/items/{$annotationKey}/resources/file", method: HttpMethod::GET, headers: $headers, ), @@ -550,7 +550,7 @@ public function readFile(string $docId, string $layerName, string $pageKey, stri * * @param string $docId * @param string $layerName - * @param string $pageKey The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. + * @param string $pageKey The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotationKey` and `fieldKey`. * @param ExportAppearanceAnnotationsRequest $request * @param ?array{ * baseUrl?: string, @@ -613,7 +613,7 @@ public function exportAppearance(string $docId, string $layerName, string $pageK * * @param string $docId * @param string $layerName - * @param string $pageKey The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. + * @param string $pageKey The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotationKey` and `fieldKey`. * @param FlattenAnnotationsRequest $request * @param ?array{ * baseUrl?: string, @@ -623,11 +623,11 @@ public function exportAppearance(string $docId, string $layerName, string $pageK * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocAnnotationsFlatten200Response + * @return ?DocAnnotationsFlattenResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function flatten(string $docId, string $layerName, string $pageKey, FlattenAnnotationsRequest $request, ?array $options = null): ?DocAnnotationsFlatten200Response + public function flatten(string $docId, string $layerName, string $pageKey, FlattenAnnotationsRequest $request, ?array $options = null): ?DocAnnotationsFlattenResponse { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -654,7 +654,7 @@ public function flatten(string $docId, string $layerName, string $pageKey, Flatt if (empty($json)) { return null; } - return DocAnnotationsFlatten200Response::fromJson($json); + return DocAnnotationsFlattenResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -692,7 +692,7 @@ public function flatten(string $docId, string $layerName, string $pageKey, Flatt * * @param string $docId * @param string $layerName - * @param string $pageKey The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. + * @param string $pageKey The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotationKey` and `fieldKey`. * @param DocAnnotationsReorderRequest $request * @param ?array{ * baseUrl?: string, @@ -702,11 +702,11 @@ public function flatten(string $docId, string $layerName, string $pageKey, Flatt * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocAnnotationsReorder200Response + * @return ?DocAnnotationsReorderResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function reorder(string $docId, string $layerName, string $pageKey, DocAnnotationsReorderRequest $request, ?array $options = null): ?DocAnnotationsReorder200Response + public function reorder(string $docId, string $layerName, string $pageKey, DocAnnotationsReorderRequest $request, ?array $options = null): ?DocAnnotationsReorderResponse { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -733,7 +733,7 @@ public function reorder(string $docId, string $layerName, string $pageKey, DocAn if (empty($json)) { return null; } - return DocAnnotationsReorder200Response::fromJson($json); + return DocAnnotationsReorderResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); diff --git a/src/Doc/DocClient.php b/src/Doc/DocClient.php index fe95f95f..a66dc48e 100644 --- a/src/Doc/DocClient.php +++ b/src/Doc/DocClient.php @@ -15,7 +15,7 @@ use Psr\Http\Client\ClientInterface; use CloudPDF\Core\Client\RawClient; use CloudPDF\Doc\Requests\HeadDocRequest; -use CloudPDF\Types\DocHead200Response; +use CloudPDF\Types\DocHeadResponse; use CloudPDF\Exceptions\CloudPDFException; use CloudPDF\Exceptions\CloudPDFApiException; use CloudPDF\Core\Json\JsonApiRequest; @@ -24,15 +24,15 @@ use JsonException; use Psr\Http\Client\ClientExceptionInterface; use CloudPDF\Doc\Requests\DocChangesRequest; -use CloudPDF\Types\DocChanges200Response; +use CloudPDF\Types\DocChangesResponse; use CloudPDF\Doc\Requests\DownloadDocRequest; use CloudPDF\Doc\Requests\DocDownloadLinkRequest; -use CloudPDF\Types\DocDownloadLink200Response; +use CloudPDF\Types\DocDownloadLinkResponse; use CloudPDF\Doc\Requests\ManifestDocRequest; -use CloudPDF\Types\DocManifest200Response; +use CloudPDF\Types\DocManifestResponse; use CloudPDF\Doc\Requests\RenderDocRequest; use CloudPDF\Doc\Requests\TextDocRequest; -use CloudPDF\Types\DocText200Response; +use CloudPDF\Types\DocTextResponse; class DocClient { @@ -149,11 +149,11 @@ public function __construct( * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocHead200Response + * @return ?DocHeadResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function head(string $docId, HeadDocRequest $request = new HeadDocRequest(), ?array $options = null): ?DocHead200Response + public function head(string $docId, HeadDocRequest $request = new HeadDocRequest(), ?array $options = null): ?DocHeadResponse { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -176,7 +176,7 @@ public function head(string $docId, HeadDocRequest $request = new HeadDocRequest if (empty($json)) { return null; } - return DocHead200Response::fromJson($json); + return DocHeadResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -219,11 +219,11 @@ public function head(string $docId, HeadDocRequest $request = new HeadDocRequest * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocChanges200Response + * @return ?DocChangesResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function changes(string $docId, string $layerName, DocChangesRequest $request, ?array $options = null): ?DocChanges200Response + public function changes(string $docId, string $layerName, DocChangesRequest $request, ?array $options = null): ?DocChangesResponse { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -247,7 +247,7 @@ public function changes(string $docId, string $layerName, DocChangesRequest $req if (empty($json)) { return null; } - return DocChanges200Response::fromJson($json); + return DocChangesResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -340,11 +340,11 @@ public function download(string $docId, string $layerName, DownloadDocRequest $r * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocDownloadLink200Response + * @return ?DocDownloadLinkResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function downloadLink(string $docId, string $layerName, DocDownloadLinkRequest $request = new DocDownloadLinkRequest(), ?array $options = null): ?DocDownloadLink200Response + public function downloadLink(string $docId, string $layerName, DocDownloadLinkRequest $request = new DocDownloadLinkRequest(), ?array $options = null): ?DocDownloadLinkResponse { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -368,7 +368,7 @@ public function downloadLink(string $docId, string $layerName, DocDownloadLinkRe if (empty($json)) { return null; } - return DocDownloadLink200Response::fromJson($json); + return DocDownloadLinkResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -403,11 +403,11 @@ public function downloadLink(string $docId, string $layerName, DocDownloadLinkRe * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocManifest200Response + * @return ?DocManifestResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function manifest(string $docId, string $layerName, ManifestDocRequest $request = new ManifestDocRequest(), ?array $options = null): ?DocManifest200Response + public function manifest(string $docId, string $layerName, ManifestDocRequest $request = new ManifestDocRequest(), ?array $options = null): ?DocManifestResponse { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -430,7 +430,7 @@ public function manifest(string $docId, string $layerName, ManifestDocRequest $r if (empty($json)) { return null; } - return DocManifest200Response::fromJson($json); + return DocManifestResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -459,7 +459,7 @@ public function manifest(string $docId, string $layerName, ManifestDocRequest $r * * @param string $docId * @param string $layerName - * @param string $pageKey The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. + * @param string $pageKey The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotationKey` and `fieldKey`. * @param RenderDocRequest $request * @param ?array{ * baseUrl?: string, @@ -517,7 +517,7 @@ public function render(string $docId, string $layerName, string $pageKey, Render * * @param string $docId * @param string $layerName - * @param string $pageKey The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. + * @param string $pageKey The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotationKey` and `fieldKey`. * @param TextDocRequest $request * @param ?array{ * baseUrl?: string, @@ -527,11 +527,11 @@ public function render(string $docId, string $layerName, string $pageKey, Render * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocText200Response + * @return ?DocTextResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function text(string $docId, string $layerName, string $pageKey, TextDocRequest $request = new TextDocRequest(), ?array $options = null): ?DocText200Response + public function text(string $docId, string $layerName, string $pageKey, TextDocRequest $request = new TextDocRequest(), ?array $options = null): ?DocTextResponse { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -554,7 +554,7 @@ public function text(string $docId, string $layerName, string $pageKey, TextDocR if (empty($json)) { return null; } - return DocText200Response::fromJson($json); + return DocTextResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); diff --git a/src/Doc/Fonts/Programs/ProgramsClient.php b/src/Doc/Fonts/Programs/ProgramsClient.php index d9be1432..d6474582 100644 --- a/src/Doc/Fonts/Programs/ProgramsClient.php +++ b/src/Doc/Fonts/Programs/ProgramsClient.php @@ -59,14 +59,14 @@ public function __construct( * $client->doc->fonts->programs->download( * 'docId', * 'layerName', - * 'displayHash', + * 'displaySha256', * new DownloadProgramsRequest([]), * ); * ``` * * @param string $docId * @param string $layerName - * @param string $displayHash + * @param string $displaySha256 * @param DownloadProgramsRequest $request * @param ?array{ * baseUrl?: string, @@ -80,7 +80,7 @@ public function __construct( * @throws CloudPDFException * @throws CloudPDFApiException */ - public function download(string $docId, string $layerName, string $displayHash, DownloadProgramsRequest $request = new DownloadProgramsRequest(), ?array $options = null): string + public function download(string $docId, string $layerName, string $displaySha256, DownloadProgramsRequest $request = new DownloadProgramsRequest(), ?array $options = null): string { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -91,7 +91,7 @@ public function download(string $docId, string $layerName, string $displayHash, $response = $this->client->sendRequest( new JsonApiRequest( baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Saas->value, - path: "v1/docs/{$docId}/layers/{$layerName}/font-program-files/{$displayHash}", + path: "v1/docs/{$docId}/layers/{$layerName}/font-program-files/{$displaySha256}", method: HttpMethod::GET, headers: $headers, ), @@ -117,14 +117,14 @@ public function download(string $docId, string $layerName, string $displayHash, * $client->doc->fonts->programs->get( * 'docId', * 'layerName', - * 'displayHash', + * 'displaySha256', * new GetProgramsRequest([]), * ); * ``` * * @param string $docId * @param string $layerName - * @param string $displayHash + * @param string $displaySha256 * @param GetProgramsRequest $request * @param ?array{ * baseUrl?: string, @@ -138,7 +138,7 @@ public function download(string $docId, string $layerName, string $displayHash, * @throws CloudPDFException * @throws CloudPDFApiException */ - public function get(string $docId, string $layerName, string $displayHash, GetProgramsRequest $request = new GetProgramsRequest(), ?array $options = null): ?FontProgramInfo + public function get(string $docId, string $layerName, string $displaySha256, GetProgramsRequest $request = new GetProgramsRequest(), ?array $options = null): ?FontProgramInfo { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -149,7 +149,7 @@ public function get(string $docId, string $layerName, string $displayHash, GetPr $response = $this->client->sendRequest( new JsonApiRequest( baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Saas->value, - path: "v1/docs/{$docId}/layers/{$layerName}/font-programs/{$displayHash}", + path: "v1/docs/{$docId}/layers/{$layerName}/font-programs/{$displaySha256}", method: HttpMethod::GET, headers: $headers, ), diff --git a/src/Doc/Forms/FormsClient.php b/src/Doc/Forms/FormsClient.php index d1321a5b..d43652f6 100644 --- a/src/Doc/Forms/FormsClient.php +++ b/src/Doc/Forms/FormsClient.php @@ -5,7 +5,7 @@ use Psr\Http\Client\ClientInterface; use CloudPDF\Core\Client\RawClient; use CloudPDF\Doc\Forms\Requests\ListFormsRequest; -use CloudPDF\Types\DocFormsList200Response; +use CloudPDF\Types\DocFormsListResponse; use CloudPDF\Exceptions\CloudPDFException; use CloudPDF\Exceptions\CloudPDFApiException; use CloudPDF\Core\Json\JsonApiRequest; @@ -14,17 +14,17 @@ use JsonException; use Psr\Http\Client\ClientExceptionInterface; use CloudPDF\Doc\Forms\Requests\DocFormsReorderCalculationsRequest; -use CloudPDF\Types\DocFormsReorderCalculations200Response; +use CloudPDF\Types\DocFormsReorderCalculationsResponse; use CloudPDF\Doc\Forms\Requests\SetValueFormsRequest; -use CloudPDF\Types\DocFormsSetValue200Response; +use CloudPDF\Types\DocFormsSetValueResponse; use CloudPDF\Doc\Forms\Requests\DocFormsResetRequest; -use CloudPDF\Types\DocFormsReset200Response; +use CloudPDF\Types\DocFormsResetResponse; use CloudPDF\Doc\Forms\Requests\DeleteWidgetFormsRequest; -use CloudPDF\Types\DocFormsDeleteWidget200Response; +use CloudPDF\Types\DocFormsDeleteWidgetResponse; use CloudPDF\Doc\Forms\Requests\DocFormsUpdateWidgetRequest; -use CloudPDF\Types\DocFormsUpdateWidget200Response; +use CloudPDF\Types\DocFormsUpdateWidgetResponse; use CloudPDF\Doc\Forms\Requests\DocFormsReorderWidgetsRequest; -use CloudPDF\Types\DocFormsReorderWidgets200Response; +use CloudPDF\Types\DocFormsReorderWidgetsResponse; class FormsClient { @@ -83,11 +83,11 @@ public function __construct( * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocFormsList200Response + * @return ?DocFormsListResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function list(string $docId, string $layerName, ListFormsRequest $request = new ListFormsRequest(), ?array $options = null): ?DocFormsList200Response + public function list(string $docId, string $layerName, ListFormsRequest $request = new ListFormsRequest(), ?array $options = null): ?DocFormsListResponse { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -110,7 +110,7 @@ public function list(string $docId, string $layerName, ListFormsRequest $request if (empty($json)) { return null; } - return DocFormsList200Response::fromJson($json); + return DocFormsListResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -152,11 +152,11 @@ public function list(string $docId, string $layerName, ListFormsRequest $request * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocFormsReorderCalculations200Response + * @return ?DocFormsReorderCalculationsResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function reorderCalculations(string $docId, string $layerName, DocFormsReorderCalculationsRequest $request, ?array $options = null): ?DocFormsReorderCalculations200Response + public function reorderCalculations(string $docId, string $layerName, DocFormsReorderCalculationsRequest $request, ?array $options = null): ?DocFormsReorderCalculationsResponse { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -183,7 +183,7 @@ public function reorderCalculations(string $docId, string $layerName, DocFormsRe if (empty($json)) { return null; } - return DocFormsReorderCalculations200Response::fromJson($json); + return DocFormsReorderCalculationsResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -224,11 +224,11 @@ public function reorderCalculations(string $docId, string $layerName, DocFormsRe * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocFormsSetValue200Response + * @return ?DocFormsSetValueResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function setValue(string $docId, string $layerName, string $fieldKey, SetValueFormsRequest $request, ?array $options = null): ?DocFormsSetValue200Response + public function setValue(string $docId, string $layerName, string $fieldKey, SetValueFormsRequest $request, ?array $options = null): ?DocFormsSetValueResponse { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -255,7 +255,7 @@ public function setValue(string $docId, string $layerName, string $fieldKey, Set if (empty($json)) { return null; } - return DocFormsSetValue200Response::fromJson($json); + return DocFormsSetValueResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -290,11 +290,11 @@ public function setValue(string $docId, string $layerName, string $fieldKey, Set * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocFormsReset200Response + * @return ?DocFormsResetResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function reset(string $docId, string $layerName, DocFormsResetRequest $request = new DocFormsResetRequest(), ?array $options = null): ?DocFormsReset200Response + public function reset(string $docId, string $layerName, DocFormsResetRequest $request = new DocFormsResetRequest(), ?array $options = null): ?DocFormsResetResponse { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -321,7 +321,7 @@ public function reset(string $docId, string $layerName, DocFormsResetRequest $re if (empty($json)) { return null; } - return DocFormsReset200Response::fromJson($json); + return DocFormsResetResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -342,15 +342,15 @@ public function reset(string $docId, string $layerName, DocFormsResetRequest $re * 'docId', * 'layerName', * 'pageKey', - * 'annotKey', + * 'annotationKey', * new DeleteWidgetFormsRequest([]), * ); * ``` * * @param string $docId * @param string $layerName - * @param string $pageKey The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. - * @param string $annotKey The annotation's address on the page: `obj:N`, its indirect object number, or `base:N` for an annotation the uploaded file stored inline (without an object number of its own), the position it was born at in the page's /Annots. The name the annotation's `ref` carries for life. + * @param string $pageKey The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotationKey` and `fieldKey`. + * @param string $annotationKey The annotation's address on the page: `obj:N`, its indirect object number, or `base:N` for an annotation the uploaded file stored inline (without an object number of its own), the position it was born at in the page's /Annots. The name the annotation's `ref` carries for life. * @param DeleteWidgetFormsRequest $request * @param ?array{ * baseUrl?: string, @@ -360,11 +360,11 @@ public function reset(string $docId, string $layerName, DocFormsResetRequest $re * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocFormsDeleteWidget200Response + * @return ?DocFormsDeleteWidgetResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function deleteWidget(string $docId, string $layerName, string $pageKey, string $annotKey, DeleteWidgetFormsRequest $request = new DeleteWidgetFormsRequest(), ?array $options = null): ?DocFormsDeleteWidget200Response + public function deleteWidget(string $docId, string $layerName, string $pageKey, string $annotationKey, DeleteWidgetFormsRequest $request = new DeleteWidgetFormsRequest(), ?array $options = null): ?DocFormsDeleteWidgetResponse { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -378,7 +378,7 @@ public function deleteWidget(string $docId, string $layerName, string $pageKey, $response = $this->client->sendRequest( new JsonApiRequest( baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Saas->value, - path: "v1/docs/{$docId}/layers/{$layerName}/form/widgets/{$pageKey}/{$annotKey}", + path: "v1/docs/{$docId}/layers/{$layerName}/form/widgets/{$pageKey}/{$annotationKey}", method: HttpMethod::DELETE, headers: $headers, ), @@ -390,7 +390,7 @@ public function deleteWidget(string $docId, string $layerName, string $pageKey, if (empty($json)) { return null; } - return DocFormsDeleteWidget200Response::fromJson($json); + return DocFormsDeleteWidgetResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -411,7 +411,7 @@ public function deleteWidget(string $docId, string $layerName, string $pageKey, * 'docId', * 'layerName', * 'pageKey', - * 'annotKey', + * 'annotationKey', * new DocFormsUpdateWidgetRequest([ * 'patch' => new WidgetPatch([]), * ]), @@ -420,8 +420,8 @@ public function deleteWidget(string $docId, string $layerName, string $pageKey, * * @param string $docId * @param string $layerName - * @param string $pageKey The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. - * @param string $annotKey The annotation's address on the page: `obj:N`, its indirect object number, or `base:N` for an annotation the uploaded file stored inline (without an object number of its own), the position it was born at in the page's /Annots. The name the annotation's `ref` carries for life. + * @param string $pageKey The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotationKey` and `fieldKey`. + * @param string $annotationKey The annotation's address on the page: `obj:N`, its indirect object number, or `base:N` for an annotation the uploaded file stored inline (without an object number of its own), the position it was born at in the page's /Annots. The name the annotation's `ref` carries for life. * @param DocFormsUpdateWidgetRequest $request * @param ?array{ * baseUrl?: string, @@ -431,11 +431,11 @@ public function deleteWidget(string $docId, string $layerName, string $pageKey, * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocFormsUpdateWidget200Response + * @return ?DocFormsUpdateWidgetResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function updateWidget(string $docId, string $layerName, string $pageKey, string $annotKey, DocFormsUpdateWidgetRequest $request, ?array $options = null): ?DocFormsUpdateWidget200Response + public function updateWidget(string $docId, string $layerName, string $pageKey, string $annotationKey, DocFormsUpdateWidgetRequest $request, ?array $options = null): ?DocFormsUpdateWidgetResponse { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -449,7 +449,7 @@ public function updateWidget(string $docId, string $layerName, string $pageKey, $response = $this->client->sendRequest( new JsonApiRequest( baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Saas->value, - path: "v1/docs/{$docId}/layers/{$layerName}/form/widgets/{$pageKey}/{$annotKey}", + path: "v1/docs/{$docId}/layers/{$layerName}/form/widgets/{$pageKey}/{$annotationKey}", method: HttpMethod::PATCH, headers: $headers, body: $request, @@ -462,7 +462,7 @@ public function updateWidget(string $docId, string $layerName, string $pageKey, if (empty($json)) { return null; } - return DocFormsUpdateWidget200Response::fromJson($json); + return DocFormsUpdateWidgetResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -500,7 +500,7 @@ public function updateWidget(string $docId, string $layerName, string $pageKey, * * @param string $docId * @param string $layerName - * @param string $pageKey The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. + * @param string $pageKey The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotationKey` and `fieldKey`. * @param DocFormsReorderWidgetsRequest $request * @param ?array{ * baseUrl?: string, @@ -510,11 +510,11 @@ public function updateWidget(string $docId, string $layerName, string $pageKey, * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocFormsReorderWidgets200Response + * @return ?DocFormsReorderWidgetsResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function reorderWidgets(string $docId, string $layerName, string $pageKey, DocFormsReorderWidgetsRequest $request, ?array $options = null): ?DocFormsReorderWidgets200Response + public function reorderWidgets(string $docId, string $layerName, string $pageKey, DocFormsReorderWidgetsRequest $request, ?array $options = null): ?DocFormsReorderWidgetsResponse { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -541,7 +541,7 @@ public function reorderWidgets(string $docId, string $layerName, string $pageKey if (empty($json)) { return null; } - return DocFormsReorderWidgets200Response::fromJson($json); + return DocFormsReorderWidgetsResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); diff --git a/src/Doc/Pages/PagesClient.php b/src/Doc/Pages/PagesClient.php index 74cf4e36..a4a220d1 100644 --- a/src/Doc/Pages/PagesClient.php +++ b/src/Doc/Pages/PagesClient.php @@ -5,7 +5,7 @@ use Psr\Http\Client\ClientInterface; use CloudPDF\Core\Client\RawClient; use CloudPDF\Doc\Pages\Requests\DocPagesSetScaleRequest; -use CloudPDF\Types\DocPagesSetScale200Response; +use CloudPDF\Types\DocPagesSetScaleResponse; use CloudPDF\Exceptions\CloudPDFException; use CloudPDF\Exceptions\CloudPDFApiException; use CloudPDF\Core\Json\JsonApiRequest; @@ -14,14 +14,14 @@ use JsonException; use Psr\Http\Client\ClientExceptionInterface; use CloudPDF\Doc\Pages\Requests\ViewportsPagesRequest; -use CloudPDF\Types\DocPagesViewports200Response; +use CloudPDF\Types\DocPagesViewportsResponse; use CloudPDF\Doc\Pages\Requests\ExtractPagesRequest; use CloudPDF\Doc\Pages\Requests\FlattenPagesRequest; -use CloudPDF\Types\DocPagesFlatten200Response; +use CloudPDF\Types\DocPagesFlattenResponse; use CloudPDF\Doc\Pages\Requests\SetNamePagesRequest; -use CloudPDF\Types\DocPagesSetName200Response; +use CloudPDF\Types\DocPagesSetNameResponse; use CloudPDF\Doc\Pages\Requests\RemoveNamePagesRequest; -use CloudPDF\Types\DocPagesRemoveName200Response; +use CloudPDF\Types\DocPagesRemoveNameResponse; class PagesClient { @@ -72,7 +72,7 @@ public function __construct( * * @param string $docId * @param string $layerName - * @param string $pageKey The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. + * @param string $pageKey The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotationKey` and `fieldKey`. * @param DocPagesSetScaleRequest $request * @param ?array{ * baseUrl?: string, @@ -82,11 +82,11 @@ public function __construct( * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocPagesSetScale200Response + * @return ?DocPagesSetScaleResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function setScale(string $docId, string $layerName, string $pageKey, DocPagesSetScaleRequest $request, ?array $options = null): ?DocPagesSetScale200Response + public function setScale(string $docId, string $layerName, string $pageKey, DocPagesSetScaleRequest $request, ?array $options = null): ?DocPagesSetScaleResponse { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -113,7 +113,7 @@ public function setScale(string $docId, string $layerName, string $pageKey, DocP if (empty($json)) { return null; } - return DocPagesSetScale200Response::fromJson($json); + return DocPagesSetScaleResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -140,7 +140,7 @@ public function setScale(string $docId, string $layerName, string $pageKey, DocP * * @param string $docId * @param string $layerName - * @param string $pageKey The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. + * @param string $pageKey The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotationKey` and `fieldKey`. * @param ViewportsPagesRequest $request * @param ?array{ * baseUrl?: string, @@ -150,11 +150,11 @@ public function setScale(string $docId, string $layerName, string $pageKey, DocP * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocPagesViewports200Response + * @return ?DocPagesViewportsResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function viewports(string $docId, string $layerName, string $pageKey, ViewportsPagesRequest $request = new ViewportsPagesRequest(), ?array $options = null): ?DocPagesViewports200Response + public function viewports(string $docId, string $layerName, string $pageKey, ViewportsPagesRequest $request = new ViewportsPagesRequest(), ?array $options = null): ?DocPagesViewportsResponse { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -177,7 +177,7 @@ public function viewports(string $docId, string $layerName, string $pageKey, Vie if (empty($json)) { return null; } - return DocPagesViewports200Response::fromJson($json); + return DocPagesViewportsResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -281,11 +281,11 @@ public function extract(string $docId, string $layerName, ExtractPagesRequest $r * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocPagesFlatten200Response + * @return ?DocPagesFlattenResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function flatten(string $docId, string $layerName, FlattenPagesRequest $request, ?array $options = null): ?DocPagesFlatten200Response + public function flatten(string $docId, string $layerName, FlattenPagesRequest $request, ?array $options = null): ?DocPagesFlattenResponse { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -312,7 +312,7 @@ public function flatten(string $docId, string $layerName, FlattenPagesRequest $r if (empty($json)) { return null; } - return DocPagesFlatten200Response::fromJson($json); + return DocPagesFlattenResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -351,11 +351,11 @@ public function flatten(string $docId, string $layerName, FlattenPagesRequest $r * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocPagesSetName200Response + * @return ?DocPagesSetNameResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function setName(string $docId, string $layerName, SetNamePagesRequest $request, ?array $options = null): ?DocPagesSetName200Response + public function setName(string $docId, string $layerName, SetNamePagesRequest $request, ?array $options = null): ?DocPagesSetNameResponse { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -382,7 +382,7 @@ public function setName(string $docId, string $layerName, SetNamePagesRequest $r if (empty($json)) { return null; } - return DocPagesSetName200Response::fromJson($json); + return DocPagesSetNameResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -421,11 +421,11 @@ public function setName(string $docId, string $layerName, SetNamePagesRequest $r * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocPagesRemoveName200Response + * @return ?DocPagesRemoveNameResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function removeName(string $docId, string $layerName, RemoveNamePagesRequest $request, ?array $options = null): ?DocPagesRemoveName200Response + public function removeName(string $docId, string $layerName, RemoveNamePagesRequest $request, ?array $options = null): ?DocPagesRemoveNameResponse { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -452,7 +452,7 @@ public function removeName(string $docId, string $layerName, RemoveNamePagesRequ if (empty($json)) { return null; } - return DocPagesRemoveName200Response::fromJson($json); + return DocPagesRemoveNameResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); diff --git a/src/Doc/Redactions/RedactionsClient.php b/src/Doc/Redactions/RedactionsClient.php index 7400c511..a1477926 100644 --- a/src/Doc/Redactions/RedactionsClient.php +++ b/src/Doc/Redactions/RedactionsClient.php @@ -5,7 +5,7 @@ use Psr\Http\Client\ClientInterface; use CloudPDF\Core\Client\RawClient; use CloudPDF\Doc\Redactions\Requests\DocRedactionsApplyRequest; -use CloudPDF\Types\DocRedactionsApply200Response; +use CloudPDF\Types\DocRedactionsApplyResponse; use CloudPDF\Exceptions\CloudPDFException; use CloudPDF\Exceptions\CloudPDFApiException; use CloudPDF\Core\Json\JsonApiRequest; @@ -71,11 +71,11 @@ public function __construct( * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocRedactionsApply200Response + * @return ?DocRedactionsApplyResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function apply(string $docId, string $layerName, DocRedactionsApplyRequest $request = new DocRedactionsApplyRequest(), ?array $options = null): ?DocRedactionsApply200Response + public function apply(string $docId, string $layerName, DocRedactionsApplyRequest $request = new DocRedactionsApplyRequest(), ?array $options = null): ?DocRedactionsApplyResponse { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -102,7 +102,7 @@ public function apply(string $docId, string $layerName, DocRedactionsApplyReques if (empty($json)) { return null; } - return DocRedactionsApply200Response::fromJson($json); + return DocRedactionsApplyResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); diff --git a/src/Doc/Requests/DocDownloadLinkRequest.php b/src/Doc/Requests/DocDownloadLinkRequest.php index d49b179b..3329041e 100644 --- a/src/Doc/Requests/DocDownloadLinkRequest.php +++ b/src/Doc/Requests/DocDownloadLinkRequest.php @@ -13,21 +13,21 @@ class DocDownloadLinkRequest extends JsonSerializableType public ?string $documentPassword; /** - * @var ?int $expiresIn + * @var ?int $expiresInSeconds */ - #[JsonProperty('expiresIn')] - public ?int $expiresIn; + #[JsonProperty('expiresInSeconds')] + public ?int $expiresInSeconds; /** * @param array{ * documentPassword?: ?string, - * expiresIn?: ?int, + * expiresInSeconds?: ?int, * } $values */ public function __construct( array $values = [], ) { $this->documentPassword = $values['documentPassword'] ?? null; - $this->expiresIn = $values['expiresIn'] ?? null; + $this->expiresInSeconds = $values['expiresInSeconds'] ?? null; } } diff --git a/src/Doc/Signatures/SignaturesClient.php b/src/Doc/Signatures/SignaturesClient.php index 98a841b0..3eeb39fb 100644 --- a/src/Doc/Signatures/SignaturesClient.php +++ b/src/Doc/Signatures/SignaturesClient.php @@ -5,7 +5,7 @@ use Psr\Http\Client\ClientInterface; use CloudPDF\Core\Client\RawClient; use CloudPDF\Doc\Signatures\Requests\ListSignaturesRequest; -use CloudPDF\Types\DocSignaturesList200Response; +use CloudPDF\Types\DocSignaturesListResponse; use CloudPDF\Exceptions\CloudPDFException; use CloudPDF\Exceptions\CloudPDFApiException; use CloudPDF\Core\Json\JsonApiRequest; @@ -14,13 +14,13 @@ use JsonException; use Psr\Http\Client\ClientExceptionInterface; use CloudPDF\Doc\Signatures\Requests\CancelSignaturesRequest; -use CloudPDF\Types\DocSignaturesCancel200Response; +use CloudPDF\Types\DocSignaturesCancelResponse; use CloudPDF\Doc\Signatures\Requests\DocSignaturesCompleteRequest; -use CloudPDF\Types\DocSignaturesComplete200Response; +use CloudPDF\Types\DocSignaturesCompleteResponse; use CloudPDF\Doc\Signatures\Requests\AnalysisSignaturesRequest; -use CloudPDF\Types\DocSignaturesAnalysis200Response; +use CloudPDF\Types\DocSignaturesAnalysisResponse; use CloudPDF\Doc\Signatures\Requests\PrepareSignaturesRequest; -use CloudPDF\Types\DocSignaturesPrepare200Response; +use CloudPDF\Types\DocSignaturesPrepareResponse; use CloudPDF\Core\Multipart\MultipartFormData; use CloudPDF\Core\Multipart\MultipartApiRequest; @@ -83,11 +83,11 @@ public function __construct( * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocSignaturesList200Response + * @return ?DocSignaturesListResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function list(string $docId, string $layerName, ListSignaturesRequest $request = new ListSignaturesRequest(), ?array $options = null): ?DocSignaturesList200Response + public function list(string $docId, string $layerName, ListSignaturesRequest $request = new ListSignaturesRequest(), ?array $options = null): ?DocSignaturesListResponse { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -110,7 +110,7 @@ public function list(string $docId, string $layerName, ListSignaturesRequest $re if (empty($json)) { return null; } - return DocSignaturesList200Response::fromJson($json); + return DocSignaturesListResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -147,11 +147,11 @@ public function list(string $docId, string $layerName, ListSignaturesRequest $re * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocSignaturesCancel200Response + * @return ?DocSignaturesCancelResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function cancel(string $docId, string $layerName, string $signingId, CancelSignaturesRequest $request = new CancelSignaturesRequest(), ?array $options = null): ?DocSignaturesCancel200Response + public function cancel(string $docId, string $layerName, string $signingId, CancelSignaturesRequest $request = new CancelSignaturesRequest(), ?array $options = null): ?DocSignaturesCancelResponse { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -174,7 +174,7 @@ public function cancel(string $docId, string $layerName, string $signingId, Canc if (empty($json)) { return null; } - return DocSignaturesCancel200Response::fromJson($json); + return DocSignaturesCancelResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -219,11 +219,11 @@ public function cancel(string $docId, string $layerName, string $signingId, Canc * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocSignaturesComplete200Response + * @return ?DocSignaturesCompleteResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function complete(string $docId, string $layerName, string $signingId, DocSignaturesCompleteRequest $request, ?array $options = null): ?DocSignaturesComplete200Response + public function complete(string $docId, string $layerName, string $signingId, DocSignaturesCompleteRequest $request, ?array $options = null): ?DocSignaturesCompleteResponse { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -247,7 +247,7 @@ public function complete(string $docId, string $layerName, string $signingId, Do if (empty($json)) { return null; } - return DocSignaturesComplete200Response::fromJson($json); + return DocSignaturesCompleteResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -284,11 +284,11 @@ public function complete(string $docId, string $layerName, string $signingId, Do * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocSignaturesAnalysis200Response + * @return ?DocSignaturesAnalysisResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function analysis(string $docId, string $layerName, AnalysisSignaturesRequest $request = new AnalysisSignaturesRequest(), ?array $options = null): ?DocSignaturesAnalysis200Response + public function analysis(string $docId, string $layerName, AnalysisSignaturesRequest $request = new AnalysisSignaturesRequest(), ?array $options = null): ?DocSignaturesAnalysisResponse { $options = array_merge($this->options, $options ?? []); $query = []; @@ -322,7 +322,7 @@ public function analysis(string $docId, string $layerName, AnalysisSignaturesReq if (empty($json)) { return null; } - return DocSignaturesAnalysis200Response::fromJson($json); + return DocSignaturesAnalysisResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -360,11 +360,11 @@ public function analysis(string $docId, string $layerName, AnalysisSignaturesReq * headers?: array, * queryParameters?: array, * } $options - * @return ?DocSignaturesPrepare200Response + * @return ?DocSignaturesPrepareResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function prepare(string $docId, string $layerName, PrepareSignaturesRequest $request, ?array $options = null): ?DocSignaturesPrepare200Response + public function prepare(string $docId, string $layerName, PrepareSignaturesRequest $request, ?array $options = null): ?DocSignaturesPrepareResponse { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -390,7 +390,7 @@ public function prepare(string $docId, string $layerName, PrepareSignaturesReque if (empty($json)) { return null; } - return DocSignaturesPrepare200Response::fromJson($json); + return DocSignaturesPrepareResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); diff --git a/src/Doc/Versions/VersionsClient.php b/src/Doc/Versions/VersionsClient.php index 7fcee37e..db46311f 100644 --- a/src/Doc/Versions/VersionsClient.php +++ b/src/Doc/Versions/VersionsClient.php @@ -5,7 +5,7 @@ use Psr\Http\Client\ClientInterface; use CloudPDF\Core\Client\RawClient; use CloudPDF\Doc\Versions\Requests\ListVersionsRequest; -use CloudPDF\Types\DocVersionsList200Response; +use CloudPDF\Types\DocVersionsListResponse; use CloudPDF\Exceptions\CloudPDFException; use CloudPDF\Exceptions\CloudPDFApiException; use CloudPDF\Core\Json\JsonApiRequest; @@ -14,11 +14,11 @@ use JsonException; use Psr\Http\Client\ClientExceptionInterface; use CloudPDF\Doc\Versions\Requests\AnalysisVersionsRequest; -use CloudPDF\Types\DocVersionsAnalysis200Response; +use CloudPDF\Types\DocVersionsAnalysisResponse; use CloudPDF\Doc\Versions\Requests\DownloadVersionsRequest; use CloudPDF\Doc\Versions\Requests\RevisionVersionsRequest; use CloudPDF\Doc\Versions\Requests\SignaturesVersionsRequest; -use CloudPDF\Types\DocVersionsSignatures200Response; +use CloudPDF\Types\DocVersionsSignaturesResponse; use CloudPDF\Doc\Versions\Requests\SignatureContentsVersionsRequest; use CloudPDF\Doc\Versions\Types\SignatureDigestVersionsRequestAlgorithm; use CloudPDF\Doc\Versions\Requests\SignatureDigestVersionsRequest; @@ -82,11 +82,11 @@ public function __construct( * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocVersionsList200Response + * @return ?DocVersionsListResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function list(string $docId, string $layerName, ListVersionsRequest $request = new ListVersionsRequest(), ?array $options = null): ?DocVersionsList200Response + public function list(string $docId, string $layerName, ListVersionsRequest $request = new ListVersionsRequest(), ?array $options = null): ?DocVersionsListResponse { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -109,7 +109,7 @@ public function list(string $docId, string $layerName, ListVersionsRequest $requ if (empty($json)) { return null; } - return DocVersionsList200Response::fromJson($json); + return DocVersionsListResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -131,14 +131,14 @@ public function list(string $docId, string $layerName, ListVersionsRequest $requ * $client->doc->versions->analysis( * 'docId', * 'layerName', - * 'sha', + * 'sha256', * new AnalysisVersionsRequest([]), * ); * ``` * * @param string $docId * @param string $layerName - * @param string $sha + * @param string $sha256 * @param AnalysisVersionsRequest $request * @param ?array{ * baseUrl?: string, @@ -148,11 +148,11 @@ public function list(string $docId, string $layerName, ListVersionsRequest $requ * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocVersionsAnalysis200Response + * @return ?DocVersionsAnalysisResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function analysis(string $docId, string $layerName, string $sha, AnalysisVersionsRequest $request = new AnalysisVersionsRequest(), ?array $options = null): ?DocVersionsAnalysis200Response + public function analysis(string $docId, string $layerName, string $sha256, AnalysisVersionsRequest $request = new AnalysisVersionsRequest(), ?array $options = null): ?DocVersionsAnalysisResponse { $options = array_merge($this->options, $options ?? []); $query = []; @@ -179,7 +179,7 @@ public function analysis(string $docId, string $layerName, string $sha, Analysis $response = $this->client->sendRequest( new JsonApiRequest( baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Saas->value, - path: "v1/docs/{$docId}/layers/{$layerName}/versions/analysis/{$sha}", + path: "v1/docs/{$docId}/layers/{$layerName}/versions/analysis/{$sha256}", method: HttpMethod::GET, headers: $headers, query: $query, @@ -192,7 +192,7 @@ public function analysis(string $docId, string $layerName, string $sha, Analysis if (empty($json)) { return null; } - return DocVersionsAnalysis200Response::fromJson($json); + return DocVersionsAnalysisResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -212,14 +212,14 @@ public function analysis(string $docId, string $layerName, string $sha, Analysis * $client->doc->versions->download( * 'docId', * 'layerName', - * 'sha', + * 'sha256', * new DownloadVersionsRequest([]), * ); * ``` * * @param string $docId * @param string $layerName - * @param string $sha + * @param string $sha256 * @param DownloadVersionsRequest $request * @param ?array{ * baseUrl?: string, @@ -233,7 +233,7 @@ public function analysis(string $docId, string $layerName, string $sha, Analysis * @throws CloudPDFException * @throws CloudPDFApiException */ - public function download(string $docId, string $layerName, string $sha, DownloadVersionsRequest $request = new DownloadVersionsRequest(), ?array $options = null): string + public function download(string $docId, string $layerName, string $sha256, DownloadVersionsRequest $request = new DownloadVersionsRequest(), ?array $options = null): string { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -244,7 +244,7 @@ public function download(string $docId, string $layerName, string $sha, Download $response = $this->client->sendRequest( new JsonApiRequest( baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Saas->value, - path: "v1/docs/{$docId}/layers/{$layerName}/versions/download/{$sha}", + path: "v1/docs/{$docId}/layers/{$layerName}/versions/download/{$sha256}", method: HttpMethod::GET, headers: $headers, ), @@ -270,7 +270,7 @@ public function download(string $docId, string $layerName, string $sha, Download * $client->doc->versions->revision( * 'docId', * 'layerName', - * 'sha', + * 'sha256', * 1, * new RevisionVersionsRequest([]), * ); @@ -278,7 +278,7 @@ public function download(string $docId, string $layerName, string $sha, Download * * @param string $docId * @param string $layerName - * @param string $sha + * @param string $sha256 * @param int $index * @param RevisionVersionsRequest $request * @param ?array{ @@ -293,7 +293,7 @@ public function download(string $docId, string $layerName, string $sha, Download * @throws CloudPDFException * @throws CloudPDFApiException */ - public function revision(string $docId, string $layerName, string $sha, int $index, RevisionVersionsRequest $request = new RevisionVersionsRequest(), ?array $options = null): string + public function revision(string $docId, string $layerName, string $sha256, int $index, RevisionVersionsRequest $request = new RevisionVersionsRequest(), ?array $options = null): string { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -304,7 +304,7 @@ public function revision(string $docId, string $layerName, string $sha, int $ind $response = $this->client->sendRequest( new JsonApiRequest( baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Saas->value, - path: "v1/docs/{$docId}/layers/{$layerName}/versions/revisions/{$sha}/{$index}", + path: "v1/docs/{$docId}/layers/{$layerName}/versions/revisions/{$sha256}/{$index}", method: HttpMethod::GET, headers: $headers, ), @@ -330,14 +330,14 @@ public function revision(string $docId, string $layerName, string $sha, int $ind * $client->doc->versions->signatures( * 'docId', * 'layerName', - * 'sha', + * 'sha256', * new SignaturesVersionsRequest([]), * ); * ``` * * @param string $docId * @param string $layerName - * @param string $sha + * @param string $sha256 * @param SignaturesVersionsRequest $request * @param ?array{ * baseUrl?: string, @@ -347,11 +347,11 @@ public function revision(string $docId, string $layerName, string $sha, int $ind * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocVersionsSignatures200Response + * @return ?DocVersionsSignaturesResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function signatures(string $docId, string $layerName, string $sha, SignaturesVersionsRequest $request = new SignaturesVersionsRequest(), ?array $options = null): ?DocVersionsSignatures200Response + public function signatures(string $docId, string $layerName, string $sha256, SignaturesVersionsRequest $request = new SignaturesVersionsRequest(), ?array $options = null): ?DocVersionsSignaturesResponse { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -362,7 +362,7 @@ public function signatures(string $docId, string $layerName, string $sha, Signat $response = $this->client->sendRequest( new JsonApiRequest( baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Saas->value, - path: "v1/docs/{$docId}/layers/{$layerName}/versions/signatures/{$sha}", + path: "v1/docs/{$docId}/layers/{$layerName}/versions/signatures/{$sha256}", method: HttpMethod::GET, headers: $headers, ), @@ -374,7 +374,7 @@ public function signatures(string $docId, string $layerName, string $sha, Signat if (empty($json)) { return null; } - return DocVersionsSignatures200Response::fromJson($json); + return DocVersionsSignaturesResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -396,7 +396,7 @@ public function signatures(string $docId, string $layerName, string $sha, Signat * $client->doc->versions->signatureContents( * 'docId', * 'layerName', - * 'sha', + * 'sha256', * 'fieldKey', * new SignatureContentsVersionsRequest([]), * ); @@ -404,7 +404,7 @@ public function signatures(string $docId, string $layerName, string $sha, Signat * * @param string $docId * @param string $layerName - * @param string $sha + * @param string $sha256 * @param string $fieldKey * @param SignatureContentsVersionsRequest $request * @param ?array{ @@ -419,7 +419,7 @@ public function signatures(string $docId, string $layerName, string $sha, Signat * @throws CloudPDFException * @throws CloudPDFApiException */ - public function signatureContents(string $docId, string $layerName, string $sha, string $fieldKey, SignatureContentsVersionsRequest $request = new SignatureContentsVersionsRequest(), ?array $options = null): string + public function signatureContents(string $docId, string $layerName, string $sha256, string $fieldKey, SignatureContentsVersionsRequest $request = new SignatureContentsVersionsRequest(), ?array $options = null): string { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -430,7 +430,7 @@ public function signatureContents(string $docId, string $layerName, string $sha, $response = $this->client->sendRequest( new JsonApiRequest( baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Saas->value, - path: "v1/docs/{$docId}/layers/{$layerName}/versions/signatures/{$sha}/{$fieldKey}/contents", + path: "v1/docs/{$docId}/layers/{$layerName}/versions/signatures/{$sha256}/{$fieldKey}/contents", method: HttpMethod::GET, headers: $headers, ), @@ -458,7 +458,7 @@ public function signatureContents(string $docId, string $layerName, string $sha, * $client->doc->versions->signatureDigest( * 'docId', * 'layerName', - * 'sha', + * 'sha256', * 'fieldKey', * SignatureDigestVersionsRequestAlgorithm::Sha1->value, * new SignatureDigestVersionsRequest([]), @@ -467,7 +467,7 @@ public function signatureContents(string $docId, string $layerName, string $sha, * * @param string $docId * @param string $layerName - * @param string $sha + * @param string $sha256 * @param string $fieldKey * @param value-of $algorithm * @param SignatureDigestVersionsRequest $request @@ -483,7 +483,7 @@ public function signatureContents(string $docId, string $layerName, string $sha, * @throws CloudPDFException * @throws CloudPDFApiException */ - public function signatureDigest(string $docId, string $layerName, string $sha, string $fieldKey, string $algorithm, SignatureDigestVersionsRequest $request = new SignatureDigestVersionsRequest(), ?array $options = null): string + public function signatureDigest(string $docId, string $layerName, string $sha256, string $fieldKey, string $algorithm, SignatureDigestVersionsRequest $request = new SignatureDigestVersionsRequest(), ?array $options = null): string { $options = array_merge($this->options, $options ?? []); $headers = []; @@ -494,7 +494,7 @@ public function signatureDigest(string $docId, string $layerName, string $sha, s $response = $this->client->sendRequest( new JsonApiRequest( baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Saas->value, - path: "v1/docs/{$docId}/layers/{$layerName}/versions/signatures/{$sha}/{$fieldKey}/digest/{$algorithm}", + path: "v1/docs/{$docId}/layers/{$layerName}/versions/signatures/{$sha256}/{$fieldKey}/digest/{$algorithm}", method: HttpMethod::GET, headers: $headers, ), diff --git a/src/Documents/DocumentsClient.php b/src/Documents/DocumentsClient.php index 02bd6daa..30a7b75e 100644 --- a/src/Documents/DocumentsClient.php +++ b/src/Documents/DocumentsClient.php @@ -6,7 +6,7 @@ use Psr\Http\Client\ClientInterface; use CloudPDF\Core\Client\RawClient; use CloudPDF\Documents\Requests\ListDocumentsRequest; -use CloudPDF\Types\DocumentsList200Response; +use CloudPDF\Types\DocumentsListResponse; use CloudPDF\Exceptions\CloudPDFException; use CloudPDF\Exceptions\CloudPDFApiException; use CloudPDF\Core\Json\JsonApiRequest; @@ -14,19 +14,19 @@ use CloudPDF\Core\Client\HttpMethod; use JsonException; use Psr\Http\Client\ClientExceptionInterface; -use CloudPDF\Types\DocumentsGet200Response; +use CloudPDF\Types\DocumentsGetResponse; use CloudPDF\Documents\Requests\DocumentsUpdateRequest; -use CloudPDF\Types\DocumentsUpdate200Response; +use CloudPDF\Types\DocumentsUpdateResponse; use CloudPDF\Documents\Requests\DocumentsCommitRequest; -use CloudPDF\Types\DocumentsCommit200Response; +use CloudPDF\Types\DocumentsCommitResponse; use CloudPDF\Documents\Requests\UploadProxyDocumentsRequest; -use CloudPDF\Types\DocumentsUploadProxy200Response; +use CloudPDF\Types\DocumentsUploadProxyResponse; use CloudPDF\Core\Multipart\MultipartFormData; use CloudPDF\Core\Multipart\MultipartApiRequest; use CloudPDF\Documents\Requests\DocumentsImportFromRequest; use CloudPDF\Types\DocumentsImportFrom200Response; use CloudPDF\Documents\Requests\DocumentsInitRequest; -use CloudPDF\Types\DocumentsInit200Response; +use CloudPDF\Types\DocumentsInitResponse; class DocumentsClient { @@ -89,11 +89,11 @@ public function __construct( * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocumentsList200Response + * @return ?DocumentsListResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function list(string $tenantId, ListDocumentsRequest $request = new ListDocumentsRequest(), ?array $options = null): ?DocumentsList200Response + public function list(string $tenantId, ListDocumentsRequest $request = new ListDocumentsRequest(), ?array $options = null): ?DocumentsListResponse { $options = array_merge($this->options, $options ?? []); $query = []; @@ -134,7 +134,7 @@ public function list(string $tenantId, ListDocumentsRequest $request = new ListD if (empty($json)) { return null; } - return DocumentsList200Response::fromJson($json); + return DocumentsListResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -153,12 +153,12 @@ public function list(string $tenantId, ListDocumentsRequest $request = new ListD * ```php * $client->documents->get( * 'tenantId', - * 'id', + * 'docId', * ); * ``` * * @param string $tenantId - * @param string $id + * @param string $docId * @param ?array{ * baseUrl?: string, * maxRetries?: int, @@ -167,18 +167,18 @@ public function list(string $tenantId, ListDocumentsRequest $request = new ListD * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocumentsGet200Response + * @return ?DocumentsGetResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function get(string $tenantId, string $id, ?array $options = null): ?DocumentsGet200Response + public function get(string $tenantId, string $docId, ?array $options = null): ?DocumentsGetResponse { $options = array_merge($this->options, $options ?? []); try { $response = $this->client->sendRequest( new JsonApiRequest( baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Saas->value, - path: "v1/tenants/{$tenantId}/documents/{$id}", + path: "v1/tenants/{$tenantId}/documents/{$docId}", method: HttpMethod::GET, ), $options, @@ -189,7 +189,7 @@ public function get(string $tenantId, string $id, ?array $options = null): ?Docu if (empty($json)) { return null; } - return DocumentsGet200Response::fromJson($json); + return DocumentsGetResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -208,12 +208,12 @@ public function get(string $tenantId, string $id, ?array $options = null): ?Docu * ```php * $client->documents->delete( * 'tenantId', - * 'id', + * 'docId', * ); * ``` * * @param string $tenantId - * @param string $id + * @param string $docId * @param ?array{ * baseUrl?: string, * maxRetries?: int, @@ -225,14 +225,14 @@ public function get(string $tenantId, string $id, ?array $options = null): ?Docu * @throws CloudPDFException * @throws CloudPDFApiException */ - public function delete(string $tenantId, string $id, ?array $options = null): void + public function delete(string $tenantId, string $docId, ?array $options = null): void { $options = array_merge($this->options, $options ?? []); try { $response = $this->client->sendRequest( new JsonApiRequest( baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Saas->value, - path: "v1/tenants/{$tenantId}/documents/{$id}", + path: "v1/tenants/{$tenantId}/documents/{$docId}", method: HttpMethod::DELETE, ), $options, @@ -258,7 +258,7 @@ public function delete(string $tenantId, string $id, ?array $options = null): vo * ```php * $client->documents->update( * 'tenantId', - * 'id', + * 'docId', * new DocumentsUpdateRequest([ * 'name' => 'name', * ]), @@ -266,7 +266,7 @@ public function delete(string $tenantId, string $id, ?array $options = null): vo * ``` * * @param string $tenantId - * @param string $id + * @param string $docId * @param DocumentsUpdateRequest $request * @param ?array{ * baseUrl?: string, @@ -276,18 +276,18 @@ public function delete(string $tenantId, string $id, ?array $options = null): vo * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocumentsUpdate200Response + * @return ?DocumentsUpdateResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function update(string $tenantId, string $id, DocumentsUpdateRequest $request, ?array $options = null): ?DocumentsUpdate200Response + public function update(string $tenantId, string $docId, DocumentsUpdateRequest $request, ?array $options = null): ?DocumentsUpdateResponse { $options = array_merge($this->options, $options ?? []); try { $response = $this->client->sendRequest( new JsonApiRequest( baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Saas->value, - path: "v1/tenants/{$tenantId}/documents/{$id}", + path: "v1/tenants/{$tenantId}/documents/{$docId}", method: HttpMethod::PATCH, body: $request, ), @@ -299,7 +299,7 @@ public function update(string $tenantId, string $id, DocumentsUpdateRequest $req if (empty($json)) { return null; } - return DocumentsUpdate200Response::fromJson($json); + return DocumentsUpdateResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -320,7 +320,7 @@ public function update(string $tenantId, string $id, DocumentsUpdateRequest $req * ```php * $client->documents->commit( * 'tenantId', - * 'id', + * 'docId', * new DocumentsCommitRequest([ * 'sha256' => 'sha256', * ]), @@ -328,7 +328,7 @@ public function update(string $tenantId, string $id, DocumentsUpdateRequest $req * ``` * * @param string $tenantId - * @param string $id + * @param string $docId * @param DocumentsCommitRequest $request * @param ?array{ * baseUrl?: string, @@ -338,18 +338,18 @@ public function update(string $tenantId, string $id, DocumentsUpdateRequest $req * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocumentsCommit200Response + * @return ?DocumentsCommitResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function commit(string $tenantId, string $id, DocumentsCommitRequest $request, ?array $options = null): ?DocumentsCommit200Response + public function commit(string $tenantId, string $docId, DocumentsCommitRequest $request, ?array $options = null): ?DocumentsCommitResponse { $options = array_merge($this->options, $options ?? []); try { $response = $this->client->sendRequest( new JsonApiRequest( baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Saas->value, - path: "v1/tenants/{$tenantId}/documents/{$id}/commit", + path: "v1/tenants/{$tenantId}/documents/{$docId}/commit", method: HttpMethod::POST, body: $request, ), @@ -361,7 +361,7 @@ public function commit(string $tenantId, string $id, DocumentsCommitRequest $req if (empty($json)) { return null; } - return DocumentsCommit200Response::fromJson($json); + return DocumentsCommitResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -380,12 +380,12 @@ public function commit(string $tenantId, string $id, DocumentsCommitRequest $req * ```php * $client->documents->download( * 'tenantId', - * 'id', + * 'docId', * ); * ``` * * @param string $tenantId - * @param string $id + * @param string $docId * @param ?array{ * baseUrl?: string, * maxRetries?: int, @@ -398,14 +398,14 @@ public function commit(string $tenantId, string $id, DocumentsCommitRequest $req * @throws CloudPDFException * @throws CloudPDFApiException */ - public function download(string $tenantId, string $id, ?array $options = null): string + public function download(string $tenantId, string $docId, ?array $options = null): string { $options = array_merge($this->options, $options ?? []); try { $response = $this->client->sendRequest( new JsonApiRequest( baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Saas->value, - path: "v1/tenants/{$tenantId}/documents/{$id}/download", + path: "v1/tenants/{$tenantId}/documents/{$docId}/download", method: HttpMethod::GET, ), $options, @@ -429,12 +429,12 @@ public function download(string $tenantId, string $id, ?array $options = null): * ```php * $client->documents->thumbnail( * 'tenantId', - * 'id', + * 'docId', * ); * ``` * * @param string $tenantId - * @param string $id + * @param string $docId * @param ?array{ * baseUrl?: string, * maxRetries?: int, @@ -447,14 +447,14 @@ public function download(string $tenantId, string $id, ?array $options = null): * @throws CloudPDFException * @throws CloudPDFApiException */ - public function thumbnail(string $tenantId, string $id, ?array $options = null): string + public function thumbnail(string $tenantId, string $docId, ?array $options = null): string { $options = array_merge($this->options, $options ?? []); try { $response = $this->client->sendRequest( new JsonApiRequest( baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Saas->value, - path: "v1/tenants/{$tenantId}/documents/{$id}/thumbnail", + path: "v1/tenants/{$tenantId}/documents/{$docId}/thumbnail", method: HttpMethod::GET, ), $options, @@ -480,7 +480,7 @@ public function thumbnail(string $tenantId, string $id, ?array $options = null): * ```php * $client->documents->uploadProxy( * 'tenantId', - * 'id', + * 'docId', * new UploadProxyDocumentsRequest([ * 'file' => File::createFromString("example_file", "example_file"), * ]), @@ -488,7 +488,7 @@ public function thumbnail(string $tenantId, string $id, ?array $options = null): * ``` * * @param string $tenantId - * @param string $id + * @param string $docId * @param UploadProxyDocumentsRequest $request * @param ?array{ * baseUrl?: string, @@ -497,11 +497,11 @@ public function thumbnail(string $tenantId, string $id, ?array $options = null): * headers?: array, * queryParameters?: array, * } $options - * @return ?DocumentsUploadProxy200Response + * @return ?DocumentsUploadProxyResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function uploadProxy(string $tenantId, string $id, UploadProxyDocumentsRequest $request, ?array $options = null): ?DocumentsUploadProxy200Response + public function uploadProxy(string $tenantId, string $docId, UploadProxyDocumentsRequest $request, ?array $options = null): ?DocumentsUploadProxyResponse { $options = array_merge($this->options, $options ?? []); $body = new MultipartFormData(); @@ -510,7 +510,7 @@ public function uploadProxy(string $tenantId, string $id, UploadProxyDocumentsRe $response = $this->client->sendRequest( new MultipartApiRequest( baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Saas->value, - path: "v1/tenants/{$tenantId}/documents/{$id}/upload-proxy", + path: "v1/tenants/{$tenantId}/documents/{$docId}/upload-proxy", method: HttpMethod::POST, body: $body, ), @@ -522,7 +522,7 @@ public function uploadProxy(string $tenantId, string $id, UploadProxyDocumentsRe if (empty($json)) { return null; } - return DocumentsUploadProxy200Response::fromJson($json); + return DocumentsUploadProxyResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -599,14 +599,14 @@ public function importFrom(string $tenantId, DocumentsImportFromRequest $request } /** - * With an upload token, the document goes into the token's folder with the token's metadata, whatever the request says; contentLength must be within the token's maxBytes, and the token makes at most maxFiles documents (403 after). docId, idempotencyKey and dedupMode reuse-existing are refused (400): each could reach a document the token didn't make. + * With an upload token, the document goes into the token's folder with the token's metadata, whatever the request says; sizeBytes must be within the token's maxBytes, and the token makes at most maxFiles documents (403 after). docId, idempotencyKey and dedupMode reuse-existing are refused (400): each could reach a document the token didn't make. * * Example: * ```php * $client->documents->init( * 'tenantId', * new DocumentsInitRequest([ - * 'contentLength' => 1.1, + * 'sizeBytes' => 1, * 'contentSha256' => 'contentSha256', * ]), * ); @@ -622,11 +622,11 @@ public function importFrom(string $tenantId, DocumentsImportFromRequest $request * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocumentsInit200Response + * @return ?DocumentsInitResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function init(string $tenantId, DocumentsInitRequest $request, ?array $options = null): ?DocumentsInit200Response + public function init(string $tenantId, DocumentsInitRequest $request, ?array $options = null): ?DocumentsInitResponse { $options = array_merge($this->options, $options ?? []); try { @@ -645,7 +645,7 @@ public function init(string $tenantId, DocumentsInitRequest $request, ?array $op if (empty($json)) { return null; } - return DocumentsInit200Response::fromJson($json); + return DocumentsInitResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); diff --git a/src/Documents/Layers/LayersClient.php b/src/Documents/Layers/LayersClient.php index 477a1308..c9ced468 100644 --- a/src/Documents/Layers/LayersClient.php +++ b/src/Documents/Layers/LayersClient.php @@ -5,7 +5,7 @@ use Psr\Http\Client\ClientInterface; use CloudPDF\Core\Client\RawClient; use CloudPDF\Documents\Layers\Requests\ListLayersRequest; -use CloudPDF\Types\DocumentsLayersList200Response; +use CloudPDF\Types\DocumentsLayersListResponse; use CloudPDF\Exceptions\CloudPDFException; use CloudPDF\Exceptions\CloudPDFApiException; use CloudPDF\Core\Json\JsonApiRequest; @@ -55,13 +55,13 @@ public function __construct( * ```php * $client->documents->layers->list( * 'tenantId', - * 'id', + * 'docId', * new ListLayersRequest([]), * ); * ``` * * @param string $tenantId - * @param string $id + * @param string $docId * @param ListLayersRequest $request * @param ?array{ * baseUrl?: string, @@ -71,11 +71,11 @@ public function __construct( * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?DocumentsLayersList200Response + * @return ?DocumentsLayersListResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function list(string $tenantId, string $id, ListLayersRequest $request = new ListLayersRequest(), ?array $options = null): ?DocumentsLayersList200Response + public function list(string $tenantId, string $docId, ListLayersRequest $request = new ListLayersRequest(), ?array $options = null): ?DocumentsLayersListResponse { $options = array_merge($this->options, $options ?? []); $query = []; @@ -92,7 +92,7 @@ public function list(string $tenantId, string $id, ListLayersRequest $request = $response = $this->client->sendRequest( new JsonApiRequest( baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Saas->value, - path: "v1/tenants/{$tenantId}/documents/{$id}/layers", + path: "v1/tenants/{$tenantId}/documents/{$docId}/layers", method: HttpMethod::GET, query: $query, ), @@ -104,7 +104,7 @@ public function list(string $tenantId, string $id, ListLayersRequest $request = if (empty($json)) { return null; } - return DocumentsLayersList200Response::fromJson($json); + return DocumentsLayersListResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -123,13 +123,13 @@ public function list(string $tenantId, string $id, ListLayersRequest $request = * ```php * $client->documents->layers->delete( * 'tenantId', - * 'id', + * 'docId', * 'layerName', * ); * ``` * * @param string $tenantId - * @param string $id + * @param string $docId * @param string $layerName * @param ?array{ * baseUrl?: string, @@ -142,14 +142,14 @@ public function list(string $tenantId, string $id, ListLayersRequest $request = * @throws CloudPDFException * @throws CloudPDFApiException */ - public function delete(string $tenantId, string $id, string $layerName, ?array $options = null): void + public function delete(string $tenantId, string $docId, string $layerName, ?array $options = null): void { $options = array_merge($this->options, $options ?? []); try { $response = $this->client->sendRequest( new JsonApiRequest( baseUrl: $options['baseUrl'] ?? $this->client->options['baseUrl'] ?? Environments::Saas->value, - path: "v1/tenants/{$tenantId}/documents/{$id}/layers/{$layerName}", + path: "v1/tenants/{$tenantId}/documents/{$docId}/layers/{$layerName}", method: HttpMethod::DELETE, ), $options, diff --git a/src/Documents/Requests/DocumentsInitRequest.php b/src/Documents/Requests/DocumentsInitRequest.php index ac961531..a4f6fbbd 100644 --- a/src/Documents/Requests/DocumentsInitRequest.php +++ b/src/Documents/Requests/DocumentsInitRequest.php @@ -11,10 +11,10 @@ class DocumentsInitRequest extends JsonSerializableType { /** - * @var float $contentLength + * @var int $sizeBytes */ - #[JsonProperty('contentLength')] - public float $contentLength; + #[JsonProperty('sizeBytes')] + public int $sizeBytes; /** * @var string $contentSha256 @@ -59,10 +59,10 @@ class DocumentsInitRequest extends JsonSerializableType public ?string $docId; /** - * @var ?float $uploadTtlSec + * @var ?int $uploadTtlSeconds */ - #[JsonProperty('uploadTtlSec')] - public ?float $uploadTtlSec; + #[JsonProperty('uploadTtlSeconds')] + public ?int $uploadTtlSeconds; /** * @var ?value-of $uploadPreference @@ -72,7 +72,7 @@ class DocumentsInitRequest extends JsonSerializableType /** * @param array{ - * contentLength: float, + * sizeBytes: int, * contentSha256: string, * name?: ?string, * folderId?: ?string, @@ -80,14 +80,14 @@ class DocumentsInitRequest extends JsonSerializableType * idempotencyKey?: ?string, * dedupMode?: ?value-of, * docId?: ?string, - * uploadTtlSec?: ?float, + * uploadTtlSeconds?: ?int, * uploadPreference?: ?value-of, * } $values */ public function __construct( array $values, ) { - $this->contentLength = $values['contentLength']; + $this->sizeBytes = $values['sizeBytes']; $this->contentSha256 = $values['contentSha256']; $this->name = $values['name'] ?? null; $this->folderId = $values['folderId'] ?? null; @@ -95,7 +95,7 @@ public function __construct( $this->idempotencyKey = $values['idempotencyKey'] ?? null; $this->dedupMode = $values['dedupMode'] ?? null; $this->docId = $values['docId'] ?? null; - $this->uploadTtlSec = $values['uploadTtlSec'] ?? null; + $this->uploadTtlSeconds = $values['uploadTtlSeconds'] ?? null; $this->uploadPreference = $values['uploadPreference'] ?? null; } } diff --git a/src/Folders/FoldersClient.php b/src/Folders/FoldersClient.php index ae707c2c..545d74fa 100644 --- a/src/Folders/FoldersClient.php +++ b/src/Folders/FoldersClient.php @@ -5,7 +5,7 @@ use Psr\Http\Client\ClientInterface; use CloudPDF\Core\Client\RawClient; use CloudPDF\Folders\Requests\ListFoldersRequest; -use CloudPDF\Types\FoldersList200Response; +use CloudPDF\Types\FoldersListResponse; use CloudPDF\Exceptions\CloudPDFException; use CloudPDF\Exceptions\CloudPDFApiException; use CloudPDF\Core\Json\JsonApiRequest; @@ -14,11 +14,11 @@ use JsonException; use Psr\Http\Client\ClientExceptionInterface; use CloudPDF\Folders\Requests\FoldersCreateRequest; -use CloudPDF\Types\FoldersCreate200Response; -use CloudPDF\Types\FoldersGet200Response; +use CloudPDF\Types\FoldersCreateResponse; +use CloudPDF\Types\FoldersGetResponse; use CloudPDF\Folders\Requests\DeleteFoldersRequest; use CloudPDF\Folders\Requests\FoldersUpdateRequest; -use CloudPDF\Types\FoldersUpdate200Response; +use CloudPDF\Types\FoldersUpdateResponse; use CloudPDF\Folders\Requests\FoldersMoveIntoRequest; class FoldersClient @@ -76,11 +76,11 @@ public function __construct( * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?FoldersList200Response + * @return ?FoldersListResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function list(string $tenantId, ListFoldersRequest $request = new ListFoldersRequest(), ?array $options = null): ?FoldersList200Response + public function list(string $tenantId, ListFoldersRequest $request = new ListFoldersRequest(), ?array $options = null): ?FoldersListResponse { $options = array_merge($this->options, $options ?? []); $query = []; @@ -109,7 +109,7 @@ public function list(string $tenantId, ListFoldersRequest $request = new ListFol if (empty($json)) { return null; } - return FoldersList200Response::fromJson($json); + return FoldersListResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -146,11 +146,11 @@ public function list(string $tenantId, ListFoldersRequest $request = new ListFol * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?FoldersCreate200Response + * @return ?FoldersCreateResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function create(string $tenantId, FoldersCreateRequest $request, ?array $options = null): ?FoldersCreate200Response + public function create(string $tenantId, FoldersCreateRequest $request, ?array $options = null): ?FoldersCreateResponse { $options = array_merge($this->options, $options ?? []); try { @@ -169,7 +169,7 @@ public function create(string $tenantId, FoldersCreateRequest $request, ?array $ if (empty($json)) { return null; } - return FoldersCreate200Response::fromJson($json); + return FoldersCreateResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -202,11 +202,11 @@ public function create(string $tenantId, FoldersCreateRequest $request, ?array $ * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?FoldersGet200Response + * @return ?FoldersGetResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function get(string $tenantId, string $folderId, ?array $options = null): ?FoldersGet200Response + public function get(string $tenantId, string $folderId, ?array $options = null): ?FoldersGetResponse { $options = array_merge($this->options, $options ?? []); try { @@ -224,7 +224,7 @@ public function get(string $tenantId, string $folderId, ?array $options = null): if (empty($json)) { return null; } - return FoldersGet200Response::fromJson($json); + return FoldersGetResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -320,11 +320,11 @@ public function delete(string $tenantId, string $folderId, DeleteFoldersRequest * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?FoldersUpdate200Response + * @return ?FoldersUpdateResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function update(string $tenantId, string $folderId, FoldersUpdateRequest $request, ?array $options = null): ?FoldersUpdate200Response + public function update(string $tenantId, string $folderId, FoldersUpdateRequest $request, ?array $options = null): ?FoldersUpdateResponse { $options = array_merge($this->options, $options ?? []); try { @@ -343,7 +343,7 @@ public function update(string $tenantId, string $folderId, FoldersUpdateRequest if (empty($json)) { return null; } - return FoldersUpdate200Response::fromJson($json); + return FoldersUpdateResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -358,7 +358,7 @@ public function update(string $tenantId, string $folderId, FoldersUpdateRequest } /** - * Up to 1,000 ids in total. A folder moves with everything in it. 404 NotFound names the ids that do not exist or are being deleted in `details.documentIds` and `details.folderIds`. 409 Conflict carries `details.reason`: `cycle` (the destination is a moved folder or inside one; `details.folderId`), `too-deep` (the move would nest folders deeper than 100 levels; `details.maxDepth`) or `name-taken` (a moved folder's name is taken in the destination, ignoring case; `details.name`). + * Up to 1,000 ids in total. A folder moves with everything in it. 404 NotFound names the ids that do not exist or are being deleted in `details.docIds` and `details.folderIds`. 409 Conflict carries `details.reason`: `cycle` (the destination is a moved folder or inside one; `details.folderId`), `too-deep` (the move would nest folders deeper than 100 levels; `details.maxDepth`) or `name-taken` (a moved folder's name is taken in the destination, ignoring case; `details.name`). * * Example: * ```php diff --git a/src/Folders/Requests/FoldersMoveIntoRequest.php b/src/Folders/Requests/FoldersMoveIntoRequest.php index 2aaec060..ac8b6c21 100644 --- a/src/Folders/Requests/FoldersMoveIntoRequest.php +++ b/src/Folders/Requests/FoldersMoveIntoRequest.php @@ -9,10 +9,10 @@ class FoldersMoveIntoRequest extends JsonSerializableType { /** - * @var ?array $documentIds + * @var ?array $docIds */ - #[JsonProperty('documentIds'), ArrayType(['string'])] - public ?array $documentIds; + #[JsonProperty('docIds'), ArrayType(['string'])] + public ?array $docIds; /** * @var ?array $folderIds @@ -22,14 +22,14 @@ class FoldersMoveIntoRequest extends JsonSerializableType /** * @param array{ - * documentIds?: ?array, + * docIds?: ?array, * folderIds?: ?array, * } $values */ public function __construct( array $values = [], ) { - $this->documentIds = $values['documentIds'] ?? null; + $this->docIds = $values['docIds'] ?? null; $this->folderIds = $values['folderIds'] ?? null; } } diff --git a/src/Grants/GrantsClient.php b/src/Grants/GrantsClient.php index c5174cae..68c8d16d 100644 --- a/src/Grants/GrantsClient.php +++ b/src/Grants/GrantsClient.php @@ -6,7 +6,7 @@ use Psr\Http\Client\ClientInterface; use CloudPDF\Core\Client\RawClient; use CloudPDF\Grants\Requests\GrantsExchangeRequest; -use CloudPDF\Types\GrantsExchange200Response; +use CloudPDF\Types\GrantsExchangeResponse; use CloudPDF\Exceptions\CloudPDFException; use CloudPDF\Exceptions\CloudPDFApiException; use CloudPDF\Core\Json\JsonApiRequest; @@ -15,13 +15,13 @@ use JsonException; use Psr\Http\Client\ClientExceptionInterface; use CloudPDF\Grants\Requests\ListGrantsRequest; -use CloudPDF\Types\GrantsList200Response; +use CloudPDF\Types\GrantsListResponse; use CloudPDF\Grants\Requests\GrantsCreateRequest; -use CloudPDF\Types\GrantsCreate200Response; -use CloudPDF\Types\GrantsGet200Response; +use CloudPDF\Types\GrantsCreateResponse; +use CloudPDF\Types\GrantsGetResponse; use CloudPDF\Grants\Requests\GrantsUpdateRequest; -use CloudPDF\Types\GrantsUpdate200Response; -use CloudPDF\Types\GrantsArchive200Response; +use CloudPDF\Types\GrantsUpdateResponse; +use CloudPDF\Types\GrantsArchiveResponse; class GrantsClient { @@ -86,11 +86,11 @@ public function __construct( * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?GrantsExchange200Response + * @return ?GrantsExchangeResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function exchange(GrantsExchangeRequest $request, ?array $options = null): ?GrantsExchange200Response + public function exchange(GrantsExchangeRequest $request, ?array $options = null): ?GrantsExchangeResponse { $options = array_merge($this->options, $options ?? []); try { @@ -109,7 +109,7 @@ public function exchange(GrantsExchangeRequest $request, ?array $options = null) if (empty($json)) { return null; } - return GrantsExchange200Response::fromJson($json); + return GrantsExchangeResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -142,11 +142,11 @@ public function exchange(GrantsExchangeRequest $request, ?array $options = null) * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?GrantsList200Response + * @return ?GrantsListResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function list(string $tenantId, ListGrantsRequest $request = new ListGrantsRequest(), ?array $options = null): ?GrantsList200Response + public function list(string $tenantId, ListGrantsRequest $request = new ListGrantsRequest(), ?array $options = null): ?GrantsListResponse { $options = array_merge($this->options, $options ?? []); $query = []; @@ -178,7 +178,7 @@ public function list(string $tenantId, ListGrantsRequest $request = new ListGran if (empty($json)) { return null; } - return GrantsList200Response::fromJson($json); + return GrantsListResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -218,11 +218,11 @@ public function list(string $tenantId, ListGrantsRequest $request = new ListGran * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?GrantsCreate200Response + * @return ?GrantsCreateResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function create(string $tenantId, GrantsCreateRequest $request, ?array $options = null): ?GrantsCreate200Response + public function create(string $tenantId, GrantsCreateRequest $request, ?array $options = null): ?GrantsCreateResponse { $options = array_merge($this->options, $options ?? []); try { @@ -241,7 +241,7 @@ public function create(string $tenantId, GrantsCreateRequest $request, ?array $o if (empty($json)) { return null; } - return GrantsCreate200Response::fromJson($json); + return GrantsCreateResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -274,11 +274,11 @@ public function create(string $tenantId, GrantsCreateRequest $request, ?array $o * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?GrantsGet200Response + * @return ?GrantsGetResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function get(string $tenantId, string $grantId, ?array $options = null): ?GrantsGet200Response + public function get(string $tenantId, string $grantId, ?array $options = null): ?GrantsGetResponse { $options = array_merge($this->options, $options ?? []); try { @@ -296,7 +296,7 @@ public function get(string $tenantId, string $grantId, ?array $options = null): if (empty($json)) { return null; } - return GrantsGet200Response::fromJson($json); + return GrantsGetResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -379,11 +379,11 @@ public function delete(string $tenantId, string $grantId, ?array $options = null * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?GrantsUpdate200Response + * @return ?GrantsUpdateResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function update(string $tenantId, string $grantId, GrantsUpdateRequest $request = new GrantsUpdateRequest(), ?array $options = null): ?GrantsUpdate200Response + public function update(string $tenantId, string $grantId, GrantsUpdateRequest $request = new GrantsUpdateRequest(), ?array $options = null): ?GrantsUpdateResponse { $options = array_merge($this->options, $options ?? []); try { @@ -402,7 +402,7 @@ public function update(string $tenantId, string $grantId, GrantsUpdateRequest $r if (empty($json)) { return null; } - return GrantsUpdate200Response::fromJson($json); + return GrantsUpdateResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -437,11 +437,11 @@ public function update(string $tenantId, string $grantId, GrantsUpdateRequest $r * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?GrantsArchive200Response + * @return ?GrantsArchiveResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function archive(string $tenantId, string $grantId, ?array $options = null): ?GrantsArchive200Response + public function archive(string $tenantId, string $grantId, ?array $options = null): ?GrantsArchiveResponse { $options = array_merge($this->options, $options ?? []); try { @@ -459,7 +459,7 @@ public function archive(string $tenantId, string $grantId, ?array $options = nul if (empty($json)) { return null; } - return GrantsArchive200Response::fromJson($json); + return GrantsArchiveResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); diff --git a/src/Grants/Requests/GrantsCreateRequest.php b/src/Grants/Requests/GrantsCreateRequest.php index fe7f2ca7..54e60e75 100644 --- a/src/Grants/Requests/GrantsCreateRequest.php +++ b/src/Grants/Requests/GrantsCreateRequest.php @@ -8,6 +8,8 @@ use CloudPDF\Grants\Types\GrantsCreateRequestVisitorIdentity; use CloudPDF\Types\Identity; use CloudPDF\Core\Types\ArrayType; +use DateTime; +use CloudPDF\Core\Types\Date; class GrantsCreateRequest extends JsonSerializableType { @@ -84,10 +86,10 @@ class GrantsCreateRequest extends JsonSerializableType public ?int $sessionTtlSeconds; /** - * @var ?int $expiresAt + * @var ?DateTime $expiresAt */ - #[JsonProperty('expiresAt')] - public ?int $expiresAt; + #[JsonProperty('expiresAt'), Date(Date::TYPE_DATETIME)] + public ?DateTime $expiresAt; /** * @param array{ @@ -103,7 +105,7 @@ class GrantsCreateRequest extends JsonSerializableType * origins?: ?array, * passphrase?: ?string, * sessionTtlSeconds?: ?int, - * expiresAt?: ?int, + * expiresAt?: ?DateTime, * } $values */ public function __construct( diff --git a/src/Grants/Requests/GrantsUpdateRequest.php b/src/Grants/Requests/GrantsUpdateRequest.php index f2d170c6..61f29b50 100644 --- a/src/Grants/Requests/GrantsUpdateRequest.php +++ b/src/Grants/Requests/GrantsUpdateRequest.php @@ -8,6 +8,8 @@ use CloudPDF\Grants\Types\GrantsUpdateRequestVisitorIdentity; use CloudPDF\Types\Identity; use CloudPDF\Core\Types\ArrayType; +use DateTime; +use CloudPDF\Core\Types\Date; class GrantsUpdateRequest extends JsonSerializableType { @@ -84,10 +86,10 @@ class GrantsUpdateRequest extends JsonSerializableType public ?bool $disabled; /** - * @var ?int $expiresAt + * @var ?DateTime $expiresAt */ - #[JsonProperty('expiresAt')] - public ?int $expiresAt; + #[JsonProperty('expiresAt'), Date(Date::TYPE_DATETIME)] + public ?DateTime $expiresAt; /** * @param array{ @@ -103,7 +105,7 @@ class GrantsUpdateRequest extends JsonSerializableType * passphrase?: ?string, * sessionTtlSeconds?: ?int, * disabled?: ?bool, - * expiresAt?: ?int, + * expiresAt?: ?DateTime, * } $values */ public function __construct( diff --git a/src/Grants/Visitors/VisitorsClient.php b/src/Grants/Visitors/VisitorsClient.php index 7a6b3586..580213e6 100644 --- a/src/Grants/Visitors/VisitorsClient.php +++ b/src/Grants/Visitors/VisitorsClient.php @@ -5,7 +5,7 @@ use Psr\Http\Client\ClientInterface; use CloudPDF\Core\Client\RawClient; use CloudPDF\Grants\Visitors\Requests\ListVisitorsRequest; -use CloudPDF\Types\GrantsVisitorsList200Response; +use CloudPDF\Types\GrantsVisitorsListResponse; use CloudPDF\Exceptions\CloudPDFException; use CloudPDF\Exceptions\CloudPDFApiException; use CloudPDF\Core\Json\JsonApiRequest; @@ -73,11 +73,11 @@ public function __construct( * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?GrantsVisitorsList200Response + * @return ?GrantsVisitorsListResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function list(string $tenantId, string $grantId, ListVisitorsRequest $request = new ListVisitorsRequest(), ?array $options = null): ?GrantsVisitorsList200Response + public function list(string $tenantId, string $grantId, ListVisitorsRequest $request = new ListVisitorsRequest(), ?array $options = null): ?GrantsVisitorsListResponse { $options = array_merge($this->options, $options ?? []); $query = []; @@ -103,7 +103,7 @@ public function list(string $tenantId, string $grantId, ListVisitorsRequest $req if (empty($json)) { return null; } - return GrantsVisitorsList200Response::fromJson($json); + return GrantsVisitorsListResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); diff --git a/src/Tenants/TenantsClient.php b/src/Tenants/TenantsClient.php index c38343a4..4b52f40b 100644 --- a/src/Tenants/TenantsClient.php +++ b/src/Tenants/TenantsClient.php @@ -5,7 +5,7 @@ use Psr\Http\Client\ClientInterface; use CloudPDF\Core\Client\RawClient; use CloudPDF\Tenants\Requests\ListTenantsRequest; -use CloudPDF\Types\TenantsList200Response; +use CloudPDF\Types\TenantsListResponse; use CloudPDF\Exceptions\CloudPDFException; use CloudPDF\Exceptions\CloudPDFApiException; use CloudPDF\Core\Json\JsonApiRequest; @@ -14,13 +14,13 @@ use JsonException; use Psr\Http\Client\ClientExceptionInterface; use CloudPDF\Tenants\Requests\TenantsCreateRequest; -use CloudPDF\Types\TenantsCreate200Response; -use CloudPDF\Types\TenantsGet200Response; +use CloudPDF\Types\TenantsCreateResponse; +use CloudPDF\Types\TenantsGetResponse; use CloudPDF\Tenants\Requests\TenantsUpdateRequest; -use CloudPDF\Types\TenantsUpdate200Response; +use CloudPDF\Types\TenantsUpdateResponse; use CloudPDF\Tenants\Requests\TenantsSuspendRequest; use CloudPDF\Tenants\Requests\UsageTenantsRequest; -use CloudPDF\Types\TenantsUsage200Response; +use CloudPDF\Types\TenantsUsageResponse; class TenantsClient { @@ -75,11 +75,11 @@ public function __construct( * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?TenantsList200Response + * @return ?TenantsListResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function list(ListTenantsRequest $request = new ListTenantsRequest(), ?array $options = null): ?TenantsList200Response + public function list(ListTenantsRequest $request = new ListTenantsRequest(), ?array $options = null): ?TenantsListResponse { $options = array_merge($this->options, $options ?? []); $query = []; @@ -105,7 +105,7 @@ public function list(ListTenantsRequest $request = new ListTenantsRequest(), ?ar if (empty($json)) { return null; } - return TenantsList200Response::fromJson($json); + return TenantsListResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -138,11 +138,11 @@ public function list(ListTenantsRequest $request = new ListTenantsRequest(), ?ar * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?TenantsCreate200Response + * @return ?TenantsCreateResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function create(TenantsCreateRequest $request, ?array $options = null): ?TenantsCreate200Response + public function create(TenantsCreateRequest $request, ?array $options = null): ?TenantsCreateResponse { $options = array_merge($this->options, $options ?? []); try { @@ -161,7 +161,7 @@ public function create(TenantsCreateRequest $request, ?array $options = null): ? if (empty($json)) { return null; } - return TenantsCreate200Response::fromJson($json); + return TenantsCreateResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -192,11 +192,11 @@ public function create(TenantsCreateRequest $request, ?array $options = null): ? * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?TenantsGet200Response + * @return ?TenantsGetResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function get(string $tenantId, ?array $options = null): ?TenantsGet200Response + public function get(string $tenantId, ?array $options = null): ?TenantsGetResponse { $options = array_merge($this->options, $options ?? []); try { @@ -214,7 +214,7 @@ public function get(string $tenantId, ?array $options = null): ?TenantsGet200Res if (empty($json)) { return null; } - return TenantsGet200Response::fromJson($json); + return TenantsGetResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -303,11 +303,11 @@ public function delete(string $tenantId, ?array $options = null): void * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?TenantsUpdate200Response + * @return ?TenantsUpdateResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function update(string $tenantId, TenantsUpdateRequest $request, ?array $options = null): ?TenantsUpdate200Response + public function update(string $tenantId, TenantsUpdateRequest $request, ?array $options = null): ?TenantsUpdateResponse { $options = array_merge($this->options, $options ?? []); try { @@ -326,7 +326,7 @@ public function update(string $tenantId, TenantsUpdateRequest $request, ?array $ if (empty($json)) { return null; } - return TenantsUpdate200Response::fromJson($json); + return TenantsUpdateResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); @@ -458,11 +458,11 @@ public function suspend(string $tenantId, TenantsSuspendRequest $request = new T * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?TenantsUsage200Response + * @return ?TenantsUsageResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function usage(string $tenantId, UsageTenantsRequest $request = new UsageTenantsRequest(), ?array $options = null): ?TenantsUsage200Response + public function usage(string $tenantId, UsageTenantsRequest $request = new UsageTenantsRequest(), ?array $options = null): ?TenantsUsageResponse { $options = array_merge($this->options, $options ?? []); $query = []; @@ -491,7 +491,7 @@ public function usage(string $tenantId, UsageTenantsRequest $request = new Usage if (empty($json)) { return null; } - return TenantsUsage200Response::fromJson($json); + return TenantsUsageResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); diff --git a/src/Tokens/Requests/TokensRevokeRequest.php b/src/Tokens/Requests/TokensRevokeRequest.php index 9a54380c..de91509d 100644 --- a/src/Tokens/Requests/TokensRevokeRequest.php +++ b/src/Tokens/Requests/TokensRevokeRequest.php @@ -4,6 +4,8 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; +use DateTime; +use CloudPDF\Core\Types\Date; class TokensRevokeRequest extends JsonSerializableType { @@ -14,21 +16,21 @@ class TokensRevokeRequest extends JsonSerializableType public ?string $reason; /** - * @var ?int $expiresAtSeconds + * @var ?DateTime $expiresAt */ - #[JsonProperty('expiresAtSeconds')] - public ?int $expiresAtSeconds; + #[JsonProperty('expiresAt'), Date(Date::TYPE_DATETIME)] + public ?DateTime $expiresAt; /** * @param array{ * reason?: ?string, - * expiresAtSeconds?: ?int, + * expiresAt?: ?DateTime, * } $values */ public function __construct( array $values = [], ) { $this->reason = $values['reason'] ?? null; - $this->expiresAtSeconds = $values['expiresAtSeconds'] ?? null; + $this->expiresAt = $values['expiresAt'] ?? null; } } diff --git a/src/Tokens/TokensClient.php b/src/Tokens/TokensClient.php index 4e77da16..5c8d9cde 100644 --- a/src/Tokens/TokensClient.php +++ b/src/Tokens/TokensClient.php @@ -5,7 +5,7 @@ use Psr\Http\Client\ClientInterface; use CloudPDF\Core\Client\RawClient; use CloudPDF\Tokens\Requests\IssueTokensRequest; -use CloudPDF\Types\TokensIssue200Response; +use CloudPDF\Types\TokensIssueResponse; use CloudPDF\Exceptions\CloudPDFException; use CloudPDF\Exceptions\CloudPDFApiException; use CloudPDF\Core\Json\JsonApiRequest; @@ -65,7 +65,7 @@ public function __construct( * 'scope' => [ * 'scope', * ], - * 'expiresIn' => 1, + * 'expiresInSeconds' => 1, * ])), * ]), * ); @@ -81,11 +81,11 @@ public function __construct( * queryParameters?: array, * bodyProperties?: array, * } $options - * @return ?TokensIssue200Response + * @return ?TokensIssueResponse * @throws CloudPDFException * @throws CloudPDFApiException */ - public function issue(string $tenantId, IssueTokensRequest $request, ?array $options = null): ?TokensIssue200Response + public function issue(string $tenantId, IssueTokensRequest $request, ?array $options = null): ?TokensIssueResponse { $options = array_merge($this->options, $options ?? []); try { @@ -104,7 +104,7 @@ public function issue(string $tenantId, IssueTokensRequest $request, ?array $opt if (empty($json)) { return null; } - return TokensIssue200Response::fromJson($json); + return TokensIssueResponse::fromJson($json); } } catch (JsonException $e) { throw new CloudPDFException(message: "Failed to deserialize response: {$e->getMessage()}", previous: $e); diff --git a/src/Types/Annotation.php b/src/Types/Annotation.php index 870a1540..bde7e820 100644 --- a/src/Types/Annotation.php +++ b/src/Types/Annotation.php @@ -5,6 +5,9 @@ use CloudPDF\Core\Json\JsonSerializableType; use Exception; +/** + * An annotation, by its `subtype`. A newer server can add subtypes: read one your client doesn't know as `unsupported`, keeping the fields every annotation has, with `rawSubtypeCode` 0 and `rawSubtypeName` null when the body has neither. + */ class Annotation extends JsonSerializableType { /** diff --git a/src/Types/AnnotationDraftWidget.php b/src/Types/AnnotationDraftWidget.php index c5fdfb06..b02deec3 100644 --- a/src/Types/AnnotationDraftWidget.php +++ b/src/Types/AnnotationDraftWidget.php @@ -201,10 +201,10 @@ class AnnotationDraftWidget extends JsonSerializableType public ?AnnotationDraftWidgetBox $box; /** - * @var ?float $rotation + * @var ?int $rotation */ #[JsonProperty('rotation')] - public ?float $rotation; + public ?int $rotation; /** * @var ?string $color @@ -279,10 +279,16 @@ class AnnotationDraftWidget extends JsonSerializableType public mixed $field; /** - * @var mixed $fieldFamily + * @var mixed $fieldKind */ - #[JsonProperty('fieldFamily')] - public mixed $fieldFamily; + #[JsonProperty('fieldKind')] + public mixed $fieldKind; + + /** + * @var mixed $hasMark + */ + #[JsonProperty('hasMark')] + public mixed $hasMark; /** * @param array{ @@ -318,7 +324,7 @@ class AnnotationDraftWidget extends JsonSerializableType * importedBy?: mixed, * actions?: ?WidgetActionsPatch, * box?: ?AnnotationDraftWidgetBox, - * rotation?: ?float, + * rotation?: ?int, * color?: ?string, * interiorColor?: ?string, * strokeWidth?: ?float, @@ -331,7 +337,8 @@ class AnnotationDraftWidget extends JsonSerializableType * caption?: ?string, * checkStyle?: ?value-of, * field?: mixed, - * fieldFamily?: mixed, + * fieldKind?: mixed, + * hasMark?: mixed, * } $values */ public function __construct( @@ -382,7 +389,8 @@ public function __construct( $this->caption = $values['caption'] ?? null; $this->checkStyle = $values['checkStyle'] ?? null; $this->field = $values['field'] ?? null; - $this->fieldFamily = $values['fieldFamily'] ?? null; + $this->fieldKind = $values['fieldKind'] ?? null; + $this->hasMark = $values['hasMark'] ?? null; } /** diff --git a/src/Types/AnnotationLine.php b/src/Types/AnnotationLine.php index 026cf4b2..f6bb026e 100644 --- a/src/Types/AnnotationLine.php +++ b/src/Types/AnnotationLine.php @@ -263,16 +263,16 @@ class AnnotationLine extends JsonSerializableType public ?string $intent; /** - * @var ?AnnotationLineMeasure $measure + * @var ?PdfMeasurement $measure A measure, by its `subtype`. A newer server can add subtypes: read one your client doesn't know as `unknown`. */ #[JsonProperty('measure')] - public ?AnnotationLineMeasure $measure; + public ?PdfMeasurement $measure; /** - * @var ?bool $captionEnabled + * @var bool $captionEnabled */ #[JsonProperty('captionEnabled')] - public ?bool $captionEnabled; + public bool $captionEnabled; /** * @var value-of $captionPosition @@ -314,6 +314,7 @@ class AnnotationLine extends JsonSerializableType * borderStyle: value-of, * linePoints: AnnotationLineLinePoints, * lineEndings: AnnotationLineLineEndings, + * captionEnabled: bool, * captionPosition: value-of, * appearanceState?: ?string, * structurePosition?: ?array, @@ -337,8 +338,7 @@ class AnnotationLine extends JsonSerializableType * interiorColor?: ?string, * rotation?: ?float, * intent?: ?value-of, - * measure?: ?AnnotationLineMeasure, - * captionEnabled?: ?bool, + * measure?: ?PdfMeasurement, * captionOffset?: ?AnnotationLineCaptionOffset, * leader?: ?AnnotationLineLeader, * } $values @@ -389,7 +389,7 @@ public function __construct( $this->rotation = $values['rotation'] ?? null; $this->intent = $values['intent'] ?? null; $this->measure = $values['measure'] ?? null; - $this->captionEnabled = $values['captionEnabled'] ?? null; + $this->captionEnabled = $values['captionEnabled']; $this->captionPosition = $values['captionPosition']; $this->captionOffset = $values['captionOffset'] ?? null; $this->leader = $values['leader'] ?? null; diff --git a/src/Types/AnnotationLineMeasureGeospatial.php b/src/Types/AnnotationLineMeasureGeospatial.php deleted file mode 100644 index 0ab85eda..00000000 --- a/src/Types/AnnotationLineMeasureGeospatial.php +++ /dev/null @@ -1,26 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/AnnotationLineMeasureRectilinear.php b/src/Types/AnnotationLineMeasureRectilinear.php deleted file mode 100644 index 99d0ca48..00000000 --- a/src/Types/AnnotationLineMeasureRectilinear.php +++ /dev/null @@ -1,99 +0,0 @@ - $x - */ - #[JsonProperty('x'), ArrayType([AnnotationLineMeasureRectilinearXItem::class])] - public array $x; - - /** - * @var ?array $y - */ - #[JsonProperty('y'), ArrayType([AnnotationLineMeasureRectilinearYItem::class])] - public ?array $y; - - /** - * @var array $distance - */ - #[JsonProperty('distance'), ArrayType([AnnotationLineMeasureRectilinearDistanceItem::class])] - public array $distance; - - /** - * @var array $area - */ - #[JsonProperty('area'), ArrayType([AnnotationLineMeasureRectilinearAreaItem::class])] - public array $area; - - /** - * @var ?array $angle - */ - #[JsonProperty('angle'), ArrayType([AnnotationLineMeasureRectilinearAngleItem::class])] - public ?array $angle; - - /** - * @var ?array $slope - */ - #[JsonProperty('slope'), ArrayType([AnnotationLineMeasureRectilinearSlopeItem::class])] - public ?array $slope; - - /** - * @var ?AnnotationLineMeasureRectilinearOrigin $origin - */ - #[JsonProperty('origin')] - public ?AnnotationLineMeasureRectilinearOrigin $origin; - - /** - * @var ?float $cyx - */ - #[JsonProperty('cyx')] - public ?float $cyx; - - /** - * @param array{ - * x: array, - * distance: array, - * area: array, - * ratio?: ?string, - * y?: ?array, - * angle?: ?array, - * slope?: ?array, - * origin?: ?AnnotationLineMeasureRectilinearOrigin, - * cyx?: ?float, - * } $values - */ - public function __construct( - array $values, - ) { - $this->ratio = $values['ratio'] ?? null; - $this->x = $values['x']; - $this->y = $values['y'] ?? null; - $this->distance = $values['distance']; - $this->area = $values['area']; - $this->angle = $values['angle'] ?? null; - $this->slope = $values['slope'] ?? null; - $this->origin = $values['origin'] ?? null; - $this->cyx = $values['cyx'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/AnnotationLineMeasureRectilinearAngleItem.php b/src/Types/AnnotationLineMeasureRectilinearAngleItem.php deleted file mode 100644 index 699075f2..00000000 --- a/src/Types/AnnotationLineMeasureRectilinearAngleItem.php +++ /dev/null @@ -1,106 +0,0 @@ - $fraction - */ - #[JsonProperty('fraction')] - public ?string $fraction; - - /** - * @var ?int $precision - */ - #[JsonProperty('precision')] - public ?int $precision; - - /** - * @var ?bool $fixed - */ - #[JsonProperty('fixed')] - public ?bool $fixed; - - /** - * @var ?string $thousands - */ - #[JsonProperty('thousands')] - public ?string $thousands; - - /** - * @var ?string $decimal - */ - #[JsonProperty('decimal')] - public ?string $decimal; - - /** - * @var ?string $prefixSpacing - */ - #[JsonProperty('prefixSpacing')] - public ?string $prefixSpacing; - - /** - * @var ?string $suffixSpacing - */ - #[JsonProperty('suffixSpacing')] - public ?string $suffixSpacing; - - /** - * @var ?value-of $labelPosition - */ - #[JsonProperty('labelPosition')] - public ?string $labelPosition; - - /** - * @param array{ - * unit: string, - * conversion?: ?float, - * fraction?: ?value-of, - * precision?: ?int, - * fixed?: ?bool, - * thousands?: ?string, - * decimal?: ?string, - * prefixSpacing?: ?string, - * suffixSpacing?: ?string, - * labelPosition?: ?value-of, - * } $values - */ - public function __construct( - array $values, - ) { - $this->unit = $values['unit']; - $this->conversion = $values['conversion'] ?? null; - $this->fraction = $values['fraction'] ?? null; - $this->precision = $values['precision'] ?? null; - $this->fixed = $values['fixed'] ?? null; - $this->thousands = $values['thousands'] ?? null; - $this->decimal = $values['decimal'] ?? null; - $this->prefixSpacing = $values['prefixSpacing'] ?? null; - $this->suffixSpacing = $values['suffixSpacing'] ?? null; - $this->labelPosition = $values['labelPosition'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/AnnotationLineMeasureRectilinearAngleItemFraction.php b/src/Types/AnnotationLineMeasureRectilinearAngleItemFraction.php deleted file mode 100644 index 44be064d..00000000 --- a/src/Types/AnnotationLineMeasureRectilinearAngleItemFraction.php +++ /dev/null @@ -1,11 +0,0 @@ - $fraction - */ - #[JsonProperty('fraction')] - public ?string $fraction; - - /** - * @var ?int $precision - */ - #[JsonProperty('precision')] - public ?int $precision; - - /** - * @var ?bool $fixed - */ - #[JsonProperty('fixed')] - public ?bool $fixed; - - /** - * @var ?string $thousands - */ - #[JsonProperty('thousands')] - public ?string $thousands; - - /** - * @var ?string $decimal - */ - #[JsonProperty('decimal')] - public ?string $decimal; - - /** - * @var ?string $prefixSpacing - */ - #[JsonProperty('prefixSpacing')] - public ?string $prefixSpacing; - - /** - * @var ?string $suffixSpacing - */ - #[JsonProperty('suffixSpacing')] - public ?string $suffixSpacing; - - /** - * @var ?value-of $labelPosition - */ - #[JsonProperty('labelPosition')] - public ?string $labelPosition; - - /** - * @param array{ - * unit: string, - * conversion?: ?float, - * fraction?: ?value-of, - * precision?: ?int, - * fixed?: ?bool, - * thousands?: ?string, - * decimal?: ?string, - * prefixSpacing?: ?string, - * suffixSpacing?: ?string, - * labelPosition?: ?value-of, - * } $values - */ - public function __construct( - array $values, - ) { - $this->unit = $values['unit']; - $this->conversion = $values['conversion'] ?? null; - $this->fraction = $values['fraction'] ?? null; - $this->precision = $values['precision'] ?? null; - $this->fixed = $values['fixed'] ?? null; - $this->thousands = $values['thousands'] ?? null; - $this->decimal = $values['decimal'] ?? null; - $this->prefixSpacing = $values['prefixSpacing'] ?? null; - $this->suffixSpacing = $values['suffixSpacing'] ?? null; - $this->labelPosition = $values['labelPosition'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/AnnotationLineMeasureRectilinearDistanceItemFraction.php b/src/Types/AnnotationLineMeasureRectilinearDistanceItemFraction.php deleted file mode 100644 index ee39b3f1..00000000 --- a/src/Types/AnnotationLineMeasureRectilinearDistanceItemFraction.php +++ /dev/null @@ -1,11 +0,0 @@ - $fraction - */ - #[JsonProperty('fraction')] - public ?string $fraction; - - /** - * @var ?int $precision - */ - #[JsonProperty('precision')] - public ?int $precision; - - /** - * @var ?bool $fixed - */ - #[JsonProperty('fixed')] - public ?bool $fixed; - - /** - * @var ?string $thousands - */ - #[JsonProperty('thousands')] - public ?string $thousands; - - /** - * @var ?string $decimal - */ - #[JsonProperty('decimal')] - public ?string $decimal; - - /** - * @var ?string $prefixSpacing - */ - #[JsonProperty('prefixSpacing')] - public ?string $prefixSpacing; - - /** - * @var ?string $suffixSpacing - */ - #[JsonProperty('suffixSpacing')] - public ?string $suffixSpacing; - - /** - * @var ?value-of $labelPosition - */ - #[JsonProperty('labelPosition')] - public ?string $labelPosition; - - /** - * @param array{ - * unit: string, - * conversion?: ?float, - * fraction?: ?value-of, - * precision?: ?int, - * fixed?: ?bool, - * thousands?: ?string, - * decimal?: ?string, - * prefixSpacing?: ?string, - * suffixSpacing?: ?string, - * labelPosition?: ?value-of, - * } $values - */ - public function __construct( - array $values, - ) { - $this->unit = $values['unit']; - $this->conversion = $values['conversion'] ?? null; - $this->fraction = $values['fraction'] ?? null; - $this->precision = $values['precision'] ?? null; - $this->fixed = $values['fixed'] ?? null; - $this->thousands = $values['thousands'] ?? null; - $this->decimal = $values['decimal'] ?? null; - $this->prefixSpacing = $values['prefixSpacing'] ?? null; - $this->suffixSpacing = $values['suffixSpacing'] ?? null; - $this->labelPosition = $values['labelPosition'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/AnnotationLineMeasureRectilinearSlopeItemFraction.php b/src/Types/AnnotationLineMeasureRectilinearSlopeItemFraction.php deleted file mode 100644 index b6acd1e5..00000000 --- a/src/Types/AnnotationLineMeasureRectilinearSlopeItemFraction.php +++ /dev/null @@ -1,11 +0,0 @@ - $changed + * @var array $changedRefs */ - #[JsonProperty('changed'), ArrayType([AnnotationRef::class])] - public array $changed; + #[JsonProperty('changedRefs'), ArrayType([AnnotationRef::class])] + public array $changedRefs; /** * @param array{ * affectedPages: array, * opId: string, * undoable: bool, - * changed: array, + * changedRefs: array, * cacheDelta?: ?CacheDelta, * missingCharacters?: ?array, * } $values @@ -62,7 +62,7 @@ public function __construct( $this->opId = $values['opId']; $this->undoable = $values['undoable']; $this->missingCharacters = $values['missingCharacters'] ?? null; - $this->changed = $values['changed']; + $this->changedRefs = $values['changedRefs']; } /** diff --git a/src/Types/AnnotationPolygon.php b/src/Types/AnnotationPolygon.php index 9bbd5eee..cb689dc2 100644 --- a/src/Types/AnnotationPolygon.php +++ b/src/Types/AnnotationPolygon.php @@ -269,10 +269,10 @@ class AnnotationPolygon extends JsonSerializableType public ?string $intent; /** - * @var ?AnnotationPolygonMeasure $measure + * @var ?PdfMeasurement $measure A measure, by its `subtype`. A newer server can add subtypes: read one your client doesn't know as `unknown`. */ #[JsonProperty('measure')] - public ?AnnotationPolygonMeasure $measure; + public ?PdfMeasurement $measure; /** * @var ?float $cloudyIntensity @@ -325,7 +325,7 @@ class AnnotationPolygon extends JsonSerializableType * captionEnabled?: ?bool, * captionCenter?: ?AnnotationPolygonCaptionCenter, * intent?: ?value-of, - * measure?: ?AnnotationPolygonMeasure, + * measure?: ?PdfMeasurement, * cloudyIntensity?: ?float, * } $values */ diff --git a/src/Types/AnnotationPolygonMeasure.php b/src/Types/AnnotationPolygonMeasure.php deleted file mode 100644 index f1259dd0..00000000 --- a/src/Types/AnnotationPolygonMeasure.php +++ /dev/null @@ -1,241 +0,0 @@ -subtype = $values['subtype']; - $this->value = $values['value']; - } - - /** - * @param AnnotationPolygonMeasureRectilinear $rectilinear - * @return AnnotationPolygonMeasure - */ - public static function rectilinear(AnnotationPolygonMeasureRectilinear $rectilinear): AnnotationPolygonMeasure - { - return new AnnotationPolygonMeasure([ - 'subtype' => 'rectilinear', - 'value' => $rectilinear, - ]); - } - - /** - * @param AnnotationPolygonMeasureGeospatial $geospatial - * @return AnnotationPolygonMeasure - */ - public static function geospatial(AnnotationPolygonMeasureGeospatial $geospatial): AnnotationPolygonMeasure - { - return new AnnotationPolygonMeasure([ - 'subtype' => 'geospatial', - 'value' => $geospatial, - ]); - } - - /** - * @param AnnotationPolygonMeasureUnknown $unknown - * @return AnnotationPolygonMeasure - */ - public static function unknown(AnnotationPolygonMeasureUnknown $unknown): AnnotationPolygonMeasure - { - return new AnnotationPolygonMeasure([ - 'subtype' => 'unknown', - 'value' => $unknown, - ]); - } - - /** - * @return bool - */ - public function isRectilinear(): bool - { - return $this->value instanceof AnnotationPolygonMeasureRectilinear && $this->subtype === 'rectilinear'; - } - - /** - * @return AnnotationPolygonMeasureRectilinear - */ - public function asRectilinear(): AnnotationPolygonMeasureRectilinear - { - if (!($this->value instanceof AnnotationPolygonMeasureRectilinear && $this->subtype === 'rectilinear')) { - throw new Exception( - "Expected rectilinear; got " . $this->subtype . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isGeospatial(): bool - { - return $this->value instanceof AnnotationPolygonMeasureGeospatial && $this->subtype === 'geospatial'; - } - - /** - * @return AnnotationPolygonMeasureGeospatial - */ - public function asGeospatial(): AnnotationPolygonMeasureGeospatial - { - if (!($this->value instanceof AnnotationPolygonMeasureGeospatial && $this->subtype === 'geospatial')) { - throw new Exception( - "Expected geospatial; got " . $this->subtype . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isUnknown(): bool - { - return $this->value instanceof AnnotationPolygonMeasureUnknown && $this->subtype === 'unknown'; - } - - /** - * @return AnnotationPolygonMeasureUnknown - */ - public function asUnknown(): AnnotationPolygonMeasureUnknown - { - if (!($this->value instanceof AnnotationPolygonMeasureUnknown && $this->subtype === 'unknown')) { - throw new Exception( - "Expected unknown; got " . $this->subtype . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } - - /** - * @return array - */ - public function jsonSerialize(): array - { - $result = []; - $result['subtype'] = $this->subtype; - - $base = parent::jsonSerialize(); - $result = array_merge($base, $result); - - switch ($this->subtype) { - case 'rectilinear': - $value = $this->asRectilinear()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'geospatial': - $value = $this->asGeospatial()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'unknown': - $value = $this->asUnknown()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case '_unknown': - default: - if (is_null($this->value)) { - break; - } - if ($this->value instanceof JsonSerializableType) { - $value = $this->value->jsonSerialize(); - $result = array_merge($value, $result); - } elseif (is_array($this->value)) { - $result = array_merge($this->value, $result); - } - } - - return $result; - } - - /** - * @param array $data - */ - public static function jsonDeserialize(array $data): static - { - $args = []; - if (!array_key_exists('subtype', $data)) { - throw new Exception( - "JSON data is missing property 'subtype'", - ); - } - $subtype = $data['subtype']; - if (!(is_string($subtype))) { - throw new Exception( - "Expected property 'subtype' in JSON data to be string, instead received " . get_debug_type($data['subtype']), - ); - } - - $args['subtype'] = $subtype; - switch ($subtype) { - case 'rectilinear': - $args['value'] = AnnotationPolygonMeasureRectilinear::jsonDeserialize($data); - break; - case 'geospatial': - $args['value'] = AnnotationPolygonMeasureGeospatial::jsonDeserialize($data); - break; - case 'unknown': - $args['value'] = AnnotationPolygonMeasureUnknown::jsonDeserialize($data); - break; - case '_unknown': - default: - $args['subtype'] = '_unknown'; - $args['value'] = $data; - } - - // @phpstan-ignore-next-line - return new static($args); - } -} diff --git a/src/Types/AnnotationPolygonMeasureGeospatial.php b/src/Types/AnnotationPolygonMeasureGeospatial.php deleted file mode 100644 index cd0baf97..00000000 --- a/src/Types/AnnotationPolygonMeasureGeospatial.php +++ /dev/null @@ -1,26 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/AnnotationPolygonMeasureRectilinear.php b/src/Types/AnnotationPolygonMeasureRectilinear.php deleted file mode 100644 index f810454e..00000000 --- a/src/Types/AnnotationPolygonMeasureRectilinear.php +++ /dev/null @@ -1,99 +0,0 @@ - $x - */ - #[JsonProperty('x'), ArrayType([AnnotationPolygonMeasureRectilinearXItem::class])] - public array $x; - - /** - * @var ?array $y - */ - #[JsonProperty('y'), ArrayType([AnnotationPolygonMeasureRectilinearYItem::class])] - public ?array $y; - - /** - * @var array $distance - */ - #[JsonProperty('distance'), ArrayType([AnnotationPolygonMeasureRectilinearDistanceItem::class])] - public array $distance; - - /** - * @var array $area - */ - #[JsonProperty('area'), ArrayType([AnnotationPolygonMeasureRectilinearAreaItem::class])] - public array $area; - - /** - * @var ?array $angle - */ - #[JsonProperty('angle'), ArrayType([AnnotationPolygonMeasureRectilinearAngleItem::class])] - public ?array $angle; - - /** - * @var ?array $slope - */ - #[JsonProperty('slope'), ArrayType([AnnotationPolygonMeasureRectilinearSlopeItem::class])] - public ?array $slope; - - /** - * @var ?AnnotationPolygonMeasureRectilinearOrigin $origin - */ - #[JsonProperty('origin')] - public ?AnnotationPolygonMeasureRectilinearOrigin $origin; - - /** - * @var ?float $cyx - */ - #[JsonProperty('cyx')] - public ?float $cyx; - - /** - * @param array{ - * x: array, - * distance: array, - * area: array, - * ratio?: ?string, - * y?: ?array, - * angle?: ?array, - * slope?: ?array, - * origin?: ?AnnotationPolygonMeasureRectilinearOrigin, - * cyx?: ?float, - * } $values - */ - public function __construct( - array $values, - ) { - $this->ratio = $values['ratio'] ?? null; - $this->x = $values['x']; - $this->y = $values['y'] ?? null; - $this->distance = $values['distance']; - $this->area = $values['area']; - $this->angle = $values['angle'] ?? null; - $this->slope = $values['slope'] ?? null; - $this->origin = $values['origin'] ?? null; - $this->cyx = $values['cyx'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/AnnotationPolygonMeasureRectilinearAngleItem.php b/src/Types/AnnotationPolygonMeasureRectilinearAngleItem.php deleted file mode 100644 index 1cfe5b4c..00000000 --- a/src/Types/AnnotationPolygonMeasureRectilinearAngleItem.php +++ /dev/null @@ -1,106 +0,0 @@ - $fraction - */ - #[JsonProperty('fraction')] - public ?string $fraction; - - /** - * @var ?int $precision - */ - #[JsonProperty('precision')] - public ?int $precision; - - /** - * @var ?bool $fixed - */ - #[JsonProperty('fixed')] - public ?bool $fixed; - - /** - * @var ?string $thousands - */ - #[JsonProperty('thousands')] - public ?string $thousands; - - /** - * @var ?string $decimal - */ - #[JsonProperty('decimal')] - public ?string $decimal; - - /** - * @var ?string $prefixSpacing - */ - #[JsonProperty('prefixSpacing')] - public ?string $prefixSpacing; - - /** - * @var ?string $suffixSpacing - */ - #[JsonProperty('suffixSpacing')] - public ?string $suffixSpacing; - - /** - * @var ?value-of $labelPosition - */ - #[JsonProperty('labelPosition')] - public ?string $labelPosition; - - /** - * @param array{ - * unit: string, - * conversion?: ?float, - * fraction?: ?value-of, - * precision?: ?int, - * fixed?: ?bool, - * thousands?: ?string, - * decimal?: ?string, - * prefixSpacing?: ?string, - * suffixSpacing?: ?string, - * labelPosition?: ?value-of, - * } $values - */ - public function __construct( - array $values, - ) { - $this->unit = $values['unit']; - $this->conversion = $values['conversion'] ?? null; - $this->fraction = $values['fraction'] ?? null; - $this->precision = $values['precision'] ?? null; - $this->fixed = $values['fixed'] ?? null; - $this->thousands = $values['thousands'] ?? null; - $this->decimal = $values['decimal'] ?? null; - $this->prefixSpacing = $values['prefixSpacing'] ?? null; - $this->suffixSpacing = $values['suffixSpacing'] ?? null; - $this->labelPosition = $values['labelPosition'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/AnnotationPolygonMeasureRectilinearAngleItemFraction.php b/src/Types/AnnotationPolygonMeasureRectilinearAngleItemFraction.php deleted file mode 100644 index aa3a1a8f..00000000 --- a/src/Types/AnnotationPolygonMeasureRectilinearAngleItemFraction.php +++ /dev/null @@ -1,11 +0,0 @@ - $fraction - */ - #[JsonProperty('fraction')] - public ?string $fraction; - - /** - * @var ?int $precision - */ - #[JsonProperty('precision')] - public ?int $precision; - - /** - * @var ?bool $fixed - */ - #[JsonProperty('fixed')] - public ?bool $fixed; - - /** - * @var ?string $thousands - */ - #[JsonProperty('thousands')] - public ?string $thousands; - - /** - * @var ?string $decimal - */ - #[JsonProperty('decimal')] - public ?string $decimal; - - /** - * @var ?string $prefixSpacing - */ - #[JsonProperty('prefixSpacing')] - public ?string $prefixSpacing; - - /** - * @var ?string $suffixSpacing - */ - #[JsonProperty('suffixSpacing')] - public ?string $suffixSpacing; - - /** - * @var ?value-of $labelPosition - */ - #[JsonProperty('labelPosition')] - public ?string $labelPosition; - - /** - * @param array{ - * unit: string, - * conversion?: ?float, - * fraction?: ?value-of, - * precision?: ?int, - * fixed?: ?bool, - * thousands?: ?string, - * decimal?: ?string, - * prefixSpacing?: ?string, - * suffixSpacing?: ?string, - * labelPosition?: ?value-of, - * } $values - */ - public function __construct( - array $values, - ) { - $this->unit = $values['unit']; - $this->conversion = $values['conversion'] ?? null; - $this->fraction = $values['fraction'] ?? null; - $this->precision = $values['precision'] ?? null; - $this->fixed = $values['fixed'] ?? null; - $this->thousands = $values['thousands'] ?? null; - $this->decimal = $values['decimal'] ?? null; - $this->prefixSpacing = $values['prefixSpacing'] ?? null; - $this->suffixSpacing = $values['suffixSpacing'] ?? null; - $this->labelPosition = $values['labelPosition'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/AnnotationPolygonMeasureRectilinearAreaItemFraction.php b/src/Types/AnnotationPolygonMeasureRectilinearAreaItemFraction.php deleted file mode 100644 index 2252e09e..00000000 --- a/src/Types/AnnotationPolygonMeasureRectilinearAreaItemFraction.php +++ /dev/null @@ -1,11 +0,0 @@ - $fraction - */ - #[JsonProperty('fraction')] - public ?string $fraction; - - /** - * @var ?int $precision - */ - #[JsonProperty('precision')] - public ?int $precision; - - /** - * @var ?bool $fixed - */ - #[JsonProperty('fixed')] - public ?bool $fixed; - - /** - * @var ?string $thousands - */ - #[JsonProperty('thousands')] - public ?string $thousands; - - /** - * @var ?string $decimal - */ - #[JsonProperty('decimal')] - public ?string $decimal; - - /** - * @var ?string $prefixSpacing - */ - #[JsonProperty('prefixSpacing')] - public ?string $prefixSpacing; - - /** - * @var ?string $suffixSpacing - */ - #[JsonProperty('suffixSpacing')] - public ?string $suffixSpacing; - - /** - * @var ?value-of $labelPosition - */ - #[JsonProperty('labelPosition')] - public ?string $labelPosition; - - /** - * @param array{ - * unit: string, - * conversion?: ?float, - * fraction?: ?value-of, - * precision?: ?int, - * fixed?: ?bool, - * thousands?: ?string, - * decimal?: ?string, - * prefixSpacing?: ?string, - * suffixSpacing?: ?string, - * labelPosition?: ?value-of, - * } $values - */ - public function __construct( - array $values, - ) { - $this->unit = $values['unit']; - $this->conversion = $values['conversion'] ?? null; - $this->fraction = $values['fraction'] ?? null; - $this->precision = $values['precision'] ?? null; - $this->fixed = $values['fixed'] ?? null; - $this->thousands = $values['thousands'] ?? null; - $this->decimal = $values['decimal'] ?? null; - $this->prefixSpacing = $values['prefixSpacing'] ?? null; - $this->suffixSpacing = $values['suffixSpacing'] ?? null; - $this->labelPosition = $values['labelPosition'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/AnnotationPolygonMeasureRectilinearDistanceItemFraction.php b/src/Types/AnnotationPolygonMeasureRectilinearDistanceItemFraction.php deleted file mode 100644 index 9ffc86a4..00000000 --- a/src/Types/AnnotationPolygonMeasureRectilinearDistanceItemFraction.php +++ /dev/null @@ -1,11 +0,0 @@ -x = $values['x']; - $this->y = $values['y']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/AnnotationPolygonMeasureRectilinearSlopeItem.php b/src/Types/AnnotationPolygonMeasureRectilinearSlopeItem.php deleted file mode 100644 index 769e4e0b..00000000 --- a/src/Types/AnnotationPolygonMeasureRectilinearSlopeItem.php +++ /dev/null @@ -1,106 +0,0 @@ - $fraction - */ - #[JsonProperty('fraction')] - public ?string $fraction; - - /** - * @var ?int $precision - */ - #[JsonProperty('precision')] - public ?int $precision; - - /** - * @var ?bool $fixed - */ - #[JsonProperty('fixed')] - public ?bool $fixed; - - /** - * @var ?string $thousands - */ - #[JsonProperty('thousands')] - public ?string $thousands; - - /** - * @var ?string $decimal - */ - #[JsonProperty('decimal')] - public ?string $decimal; - - /** - * @var ?string $prefixSpacing - */ - #[JsonProperty('prefixSpacing')] - public ?string $prefixSpacing; - - /** - * @var ?string $suffixSpacing - */ - #[JsonProperty('suffixSpacing')] - public ?string $suffixSpacing; - - /** - * @var ?value-of $labelPosition - */ - #[JsonProperty('labelPosition')] - public ?string $labelPosition; - - /** - * @param array{ - * unit: string, - * conversion?: ?float, - * fraction?: ?value-of, - * precision?: ?int, - * fixed?: ?bool, - * thousands?: ?string, - * decimal?: ?string, - * prefixSpacing?: ?string, - * suffixSpacing?: ?string, - * labelPosition?: ?value-of, - * } $values - */ - public function __construct( - array $values, - ) { - $this->unit = $values['unit']; - $this->conversion = $values['conversion'] ?? null; - $this->fraction = $values['fraction'] ?? null; - $this->precision = $values['precision'] ?? null; - $this->fixed = $values['fixed'] ?? null; - $this->thousands = $values['thousands'] ?? null; - $this->decimal = $values['decimal'] ?? null; - $this->prefixSpacing = $values['prefixSpacing'] ?? null; - $this->suffixSpacing = $values['suffixSpacing'] ?? null; - $this->labelPosition = $values['labelPosition'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/AnnotationPolygonMeasureRectilinearSlopeItemFraction.php b/src/Types/AnnotationPolygonMeasureRectilinearSlopeItemFraction.php deleted file mode 100644 index e3b46977..00000000 --- a/src/Types/AnnotationPolygonMeasureRectilinearSlopeItemFraction.php +++ /dev/null @@ -1,11 +0,0 @@ - $fraction - */ - #[JsonProperty('fraction')] - public ?string $fraction; - - /** - * @var ?int $precision - */ - #[JsonProperty('precision')] - public ?int $precision; - - /** - * @var ?bool $fixed - */ - #[JsonProperty('fixed')] - public ?bool $fixed; - - /** - * @var ?string $thousands - */ - #[JsonProperty('thousands')] - public ?string $thousands; - - /** - * @var ?string $decimal - */ - #[JsonProperty('decimal')] - public ?string $decimal; - - /** - * @var ?string $prefixSpacing - */ - #[JsonProperty('prefixSpacing')] - public ?string $prefixSpacing; - - /** - * @var ?string $suffixSpacing - */ - #[JsonProperty('suffixSpacing')] - public ?string $suffixSpacing; - - /** - * @var ?value-of $labelPosition - */ - #[JsonProperty('labelPosition')] - public ?string $labelPosition; - - /** - * @param array{ - * unit: string, - * conversion?: ?float, - * fraction?: ?value-of, - * precision?: ?int, - * fixed?: ?bool, - * thousands?: ?string, - * decimal?: ?string, - * prefixSpacing?: ?string, - * suffixSpacing?: ?string, - * labelPosition?: ?value-of, - * } $values - */ - public function __construct( - array $values, - ) { - $this->unit = $values['unit']; - $this->conversion = $values['conversion'] ?? null; - $this->fraction = $values['fraction'] ?? null; - $this->precision = $values['precision'] ?? null; - $this->fixed = $values['fixed'] ?? null; - $this->thousands = $values['thousands'] ?? null; - $this->decimal = $values['decimal'] ?? null; - $this->prefixSpacing = $values['prefixSpacing'] ?? null; - $this->suffixSpacing = $values['suffixSpacing'] ?? null; - $this->labelPosition = $values['labelPosition'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/AnnotationPolygonMeasureRectilinearYItemFraction.php b/src/Types/AnnotationPolygonMeasureRectilinearYItemFraction.php deleted file mode 100644 index 1f7741f4..00000000 --- a/src/Types/AnnotationPolygonMeasureRectilinearYItemFraction.php +++ /dev/null @@ -1,11 +0,0 @@ -, - * measure?: ?AnnotationPolylineMeasure, + * measure?: ?PdfMeasurement, * } $values */ public function __construct( diff --git a/src/Types/AnnotationPolylineMeasure.php b/src/Types/AnnotationPolylineMeasure.php deleted file mode 100644 index 9ab5f942..00000000 --- a/src/Types/AnnotationPolylineMeasure.php +++ /dev/null @@ -1,241 +0,0 @@ -subtype = $values['subtype']; - $this->value = $values['value']; - } - - /** - * @param AnnotationPolylineMeasureRectilinear $rectilinear - * @return AnnotationPolylineMeasure - */ - public static function rectilinear(AnnotationPolylineMeasureRectilinear $rectilinear): AnnotationPolylineMeasure - { - return new AnnotationPolylineMeasure([ - 'subtype' => 'rectilinear', - 'value' => $rectilinear, - ]); - } - - /** - * @param AnnotationPolylineMeasureGeospatial $geospatial - * @return AnnotationPolylineMeasure - */ - public static function geospatial(AnnotationPolylineMeasureGeospatial $geospatial): AnnotationPolylineMeasure - { - return new AnnotationPolylineMeasure([ - 'subtype' => 'geospatial', - 'value' => $geospatial, - ]); - } - - /** - * @param AnnotationPolylineMeasureUnknown $unknown - * @return AnnotationPolylineMeasure - */ - public static function unknown(AnnotationPolylineMeasureUnknown $unknown): AnnotationPolylineMeasure - { - return new AnnotationPolylineMeasure([ - 'subtype' => 'unknown', - 'value' => $unknown, - ]); - } - - /** - * @return bool - */ - public function isRectilinear(): bool - { - return $this->value instanceof AnnotationPolylineMeasureRectilinear && $this->subtype === 'rectilinear'; - } - - /** - * @return AnnotationPolylineMeasureRectilinear - */ - public function asRectilinear(): AnnotationPolylineMeasureRectilinear - { - if (!($this->value instanceof AnnotationPolylineMeasureRectilinear && $this->subtype === 'rectilinear')) { - throw new Exception( - "Expected rectilinear; got " . $this->subtype . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isGeospatial(): bool - { - return $this->value instanceof AnnotationPolylineMeasureGeospatial && $this->subtype === 'geospatial'; - } - - /** - * @return AnnotationPolylineMeasureGeospatial - */ - public function asGeospatial(): AnnotationPolylineMeasureGeospatial - { - if (!($this->value instanceof AnnotationPolylineMeasureGeospatial && $this->subtype === 'geospatial')) { - throw new Exception( - "Expected geospatial; got " . $this->subtype . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isUnknown(): bool - { - return $this->value instanceof AnnotationPolylineMeasureUnknown && $this->subtype === 'unknown'; - } - - /** - * @return AnnotationPolylineMeasureUnknown - */ - public function asUnknown(): AnnotationPolylineMeasureUnknown - { - if (!($this->value instanceof AnnotationPolylineMeasureUnknown && $this->subtype === 'unknown')) { - throw new Exception( - "Expected unknown; got " . $this->subtype . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } - - /** - * @return array - */ - public function jsonSerialize(): array - { - $result = []; - $result['subtype'] = $this->subtype; - - $base = parent::jsonSerialize(); - $result = array_merge($base, $result); - - switch ($this->subtype) { - case 'rectilinear': - $value = $this->asRectilinear()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'geospatial': - $value = $this->asGeospatial()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'unknown': - $value = $this->asUnknown()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case '_unknown': - default: - if (is_null($this->value)) { - break; - } - if ($this->value instanceof JsonSerializableType) { - $value = $this->value->jsonSerialize(); - $result = array_merge($value, $result); - } elseif (is_array($this->value)) { - $result = array_merge($this->value, $result); - } - } - - return $result; - } - - /** - * @param array $data - */ - public static function jsonDeserialize(array $data): static - { - $args = []; - if (!array_key_exists('subtype', $data)) { - throw new Exception( - "JSON data is missing property 'subtype'", - ); - } - $subtype = $data['subtype']; - if (!(is_string($subtype))) { - throw new Exception( - "Expected property 'subtype' in JSON data to be string, instead received " . get_debug_type($data['subtype']), - ); - } - - $args['subtype'] = $subtype; - switch ($subtype) { - case 'rectilinear': - $args['value'] = AnnotationPolylineMeasureRectilinear::jsonDeserialize($data); - break; - case 'geospatial': - $args['value'] = AnnotationPolylineMeasureGeospatial::jsonDeserialize($data); - break; - case 'unknown': - $args['value'] = AnnotationPolylineMeasureUnknown::jsonDeserialize($data); - break; - case '_unknown': - default: - $args['subtype'] = '_unknown'; - $args['value'] = $data; - } - - // @phpstan-ignore-next-line - return new static($args); - } -} diff --git a/src/Types/AnnotationPolylineMeasureGeospatial.php b/src/Types/AnnotationPolylineMeasureGeospatial.php deleted file mode 100644 index 709d8ee3..00000000 --- a/src/Types/AnnotationPolylineMeasureGeospatial.php +++ /dev/null @@ -1,26 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/AnnotationPolylineMeasureRectilinear.php b/src/Types/AnnotationPolylineMeasureRectilinear.php deleted file mode 100644 index e071b913..00000000 --- a/src/Types/AnnotationPolylineMeasureRectilinear.php +++ /dev/null @@ -1,99 +0,0 @@ - $x - */ - #[JsonProperty('x'), ArrayType([AnnotationPolylineMeasureRectilinearXItem::class])] - public array $x; - - /** - * @var ?array $y - */ - #[JsonProperty('y'), ArrayType([AnnotationPolylineMeasureRectilinearYItem::class])] - public ?array $y; - - /** - * @var array $distance - */ - #[JsonProperty('distance'), ArrayType([AnnotationPolylineMeasureRectilinearDistanceItem::class])] - public array $distance; - - /** - * @var array $area - */ - #[JsonProperty('area'), ArrayType([AnnotationPolylineMeasureRectilinearAreaItem::class])] - public array $area; - - /** - * @var ?array $angle - */ - #[JsonProperty('angle'), ArrayType([AnnotationPolylineMeasureRectilinearAngleItem::class])] - public ?array $angle; - - /** - * @var ?array $slope - */ - #[JsonProperty('slope'), ArrayType([AnnotationPolylineMeasureRectilinearSlopeItem::class])] - public ?array $slope; - - /** - * @var ?AnnotationPolylineMeasureRectilinearOrigin $origin - */ - #[JsonProperty('origin')] - public ?AnnotationPolylineMeasureRectilinearOrigin $origin; - - /** - * @var ?float $cyx - */ - #[JsonProperty('cyx')] - public ?float $cyx; - - /** - * @param array{ - * x: array, - * distance: array, - * area: array, - * ratio?: ?string, - * y?: ?array, - * angle?: ?array, - * slope?: ?array, - * origin?: ?AnnotationPolylineMeasureRectilinearOrigin, - * cyx?: ?float, - * } $values - */ - public function __construct( - array $values, - ) { - $this->ratio = $values['ratio'] ?? null; - $this->x = $values['x']; - $this->y = $values['y'] ?? null; - $this->distance = $values['distance']; - $this->area = $values['area']; - $this->angle = $values['angle'] ?? null; - $this->slope = $values['slope'] ?? null; - $this->origin = $values['origin'] ?? null; - $this->cyx = $values['cyx'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/AnnotationPolylineMeasureRectilinearAngleItem.php b/src/Types/AnnotationPolylineMeasureRectilinearAngleItem.php deleted file mode 100644 index 3cce4d32..00000000 --- a/src/Types/AnnotationPolylineMeasureRectilinearAngleItem.php +++ /dev/null @@ -1,106 +0,0 @@ - $fraction - */ - #[JsonProperty('fraction')] - public ?string $fraction; - - /** - * @var ?int $precision - */ - #[JsonProperty('precision')] - public ?int $precision; - - /** - * @var ?bool $fixed - */ - #[JsonProperty('fixed')] - public ?bool $fixed; - - /** - * @var ?string $thousands - */ - #[JsonProperty('thousands')] - public ?string $thousands; - - /** - * @var ?string $decimal - */ - #[JsonProperty('decimal')] - public ?string $decimal; - - /** - * @var ?string $prefixSpacing - */ - #[JsonProperty('prefixSpacing')] - public ?string $prefixSpacing; - - /** - * @var ?string $suffixSpacing - */ - #[JsonProperty('suffixSpacing')] - public ?string $suffixSpacing; - - /** - * @var ?value-of $labelPosition - */ - #[JsonProperty('labelPosition')] - public ?string $labelPosition; - - /** - * @param array{ - * unit: string, - * conversion?: ?float, - * fraction?: ?value-of, - * precision?: ?int, - * fixed?: ?bool, - * thousands?: ?string, - * decimal?: ?string, - * prefixSpacing?: ?string, - * suffixSpacing?: ?string, - * labelPosition?: ?value-of, - * } $values - */ - public function __construct( - array $values, - ) { - $this->unit = $values['unit']; - $this->conversion = $values['conversion'] ?? null; - $this->fraction = $values['fraction'] ?? null; - $this->precision = $values['precision'] ?? null; - $this->fixed = $values['fixed'] ?? null; - $this->thousands = $values['thousands'] ?? null; - $this->decimal = $values['decimal'] ?? null; - $this->prefixSpacing = $values['prefixSpacing'] ?? null; - $this->suffixSpacing = $values['suffixSpacing'] ?? null; - $this->labelPosition = $values['labelPosition'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/AnnotationPolylineMeasureRectilinearAngleItemFraction.php b/src/Types/AnnotationPolylineMeasureRectilinearAngleItemFraction.php deleted file mode 100644 index 6a96edcf..00000000 --- a/src/Types/AnnotationPolylineMeasureRectilinearAngleItemFraction.php +++ /dev/null @@ -1,11 +0,0 @@ - $fraction - */ - #[JsonProperty('fraction')] - public ?string $fraction; - - /** - * @var ?int $precision - */ - #[JsonProperty('precision')] - public ?int $precision; - - /** - * @var ?bool $fixed - */ - #[JsonProperty('fixed')] - public ?bool $fixed; - - /** - * @var ?string $thousands - */ - #[JsonProperty('thousands')] - public ?string $thousands; - - /** - * @var ?string $decimal - */ - #[JsonProperty('decimal')] - public ?string $decimal; - - /** - * @var ?string $prefixSpacing - */ - #[JsonProperty('prefixSpacing')] - public ?string $prefixSpacing; - - /** - * @var ?string $suffixSpacing - */ - #[JsonProperty('suffixSpacing')] - public ?string $suffixSpacing; - - /** - * @var ?value-of $labelPosition - */ - #[JsonProperty('labelPosition')] - public ?string $labelPosition; - - /** - * @param array{ - * unit: string, - * conversion?: ?float, - * fraction?: ?value-of, - * precision?: ?int, - * fixed?: ?bool, - * thousands?: ?string, - * decimal?: ?string, - * prefixSpacing?: ?string, - * suffixSpacing?: ?string, - * labelPosition?: ?value-of, - * } $values - */ - public function __construct( - array $values, - ) { - $this->unit = $values['unit']; - $this->conversion = $values['conversion'] ?? null; - $this->fraction = $values['fraction'] ?? null; - $this->precision = $values['precision'] ?? null; - $this->fixed = $values['fixed'] ?? null; - $this->thousands = $values['thousands'] ?? null; - $this->decimal = $values['decimal'] ?? null; - $this->prefixSpacing = $values['prefixSpacing'] ?? null; - $this->suffixSpacing = $values['suffixSpacing'] ?? null; - $this->labelPosition = $values['labelPosition'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/AnnotationPolylineMeasureRectilinearAreaItemFraction.php b/src/Types/AnnotationPolylineMeasureRectilinearAreaItemFraction.php deleted file mode 100644 index cb57b8d6..00000000 --- a/src/Types/AnnotationPolylineMeasureRectilinearAreaItemFraction.php +++ /dev/null @@ -1,11 +0,0 @@ - $fraction - */ - #[JsonProperty('fraction')] - public ?string $fraction; - - /** - * @var ?int $precision - */ - #[JsonProperty('precision')] - public ?int $precision; - - /** - * @var ?bool $fixed - */ - #[JsonProperty('fixed')] - public ?bool $fixed; - - /** - * @var ?string $thousands - */ - #[JsonProperty('thousands')] - public ?string $thousands; - - /** - * @var ?string $decimal - */ - #[JsonProperty('decimal')] - public ?string $decimal; - - /** - * @var ?string $prefixSpacing - */ - #[JsonProperty('prefixSpacing')] - public ?string $prefixSpacing; - - /** - * @var ?string $suffixSpacing - */ - #[JsonProperty('suffixSpacing')] - public ?string $suffixSpacing; - - /** - * @var ?value-of $labelPosition - */ - #[JsonProperty('labelPosition')] - public ?string $labelPosition; - - /** - * @param array{ - * unit: string, - * conversion?: ?float, - * fraction?: ?value-of, - * precision?: ?int, - * fixed?: ?bool, - * thousands?: ?string, - * decimal?: ?string, - * prefixSpacing?: ?string, - * suffixSpacing?: ?string, - * labelPosition?: ?value-of, - * } $values - */ - public function __construct( - array $values, - ) { - $this->unit = $values['unit']; - $this->conversion = $values['conversion'] ?? null; - $this->fraction = $values['fraction'] ?? null; - $this->precision = $values['precision'] ?? null; - $this->fixed = $values['fixed'] ?? null; - $this->thousands = $values['thousands'] ?? null; - $this->decimal = $values['decimal'] ?? null; - $this->prefixSpacing = $values['prefixSpacing'] ?? null; - $this->suffixSpacing = $values['suffixSpacing'] ?? null; - $this->labelPosition = $values['labelPosition'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/AnnotationPolylineMeasureRectilinearDistanceItemFraction.php b/src/Types/AnnotationPolylineMeasureRectilinearDistanceItemFraction.php deleted file mode 100644 index 5205e8af..00000000 --- a/src/Types/AnnotationPolylineMeasureRectilinearDistanceItemFraction.php +++ /dev/null @@ -1,11 +0,0 @@ -x = $values['x']; - $this->y = $values['y']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/AnnotationPolylineMeasureRectilinearSlopeItem.php b/src/Types/AnnotationPolylineMeasureRectilinearSlopeItem.php deleted file mode 100644 index 0070a519..00000000 --- a/src/Types/AnnotationPolylineMeasureRectilinearSlopeItem.php +++ /dev/null @@ -1,106 +0,0 @@ - $fraction - */ - #[JsonProperty('fraction')] - public ?string $fraction; - - /** - * @var ?int $precision - */ - #[JsonProperty('precision')] - public ?int $precision; - - /** - * @var ?bool $fixed - */ - #[JsonProperty('fixed')] - public ?bool $fixed; - - /** - * @var ?string $thousands - */ - #[JsonProperty('thousands')] - public ?string $thousands; - - /** - * @var ?string $decimal - */ - #[JsonProperty('decimal')] - public ?string $decimal; - - /** - * @var ?string $prefixSpacing - */ - #[JsonProperty('prefixSpacing')] - public ?string $prefixSpacing; - - /** - * @var ?string $suffixSpacing - */ - #[JsonProperty('suffixSpacing')] - public ?string $suffixSpacing; - - /** - * @var ?value-of $labelPosition - */ - #[JsonProperty('labelPosition')] - public ?string $labelPosition; - - /** - * @param array{ - * unit: string, - * conversion?: ?float, - * fraction?: ?value-of, - * precision?: ?int, - * fixed?: ?bool, - * thousands?: ?string, - * decimal?: ?string, - * prefixSpacing?: ?string, - * suffixSpacing?: ?string, - * labelPosition?: ?value-of, - * } $values - */ - public function __construct( - array $values, - ) { - $this->unit = $values['unit']; - $this->conversion = $values['conversion'] ?? null; - $this->fraction = $values['fraction'] ?? null; - $this->precision = $values['precision'] ?? null; - $this->fixed = $values['fixed'] ?? null; - $this->thousands = $values['thousands'] ?? null; - $this->decimal = $values['decimal'] ?? null; - $this->prefixSpacing = $values['prefixSpacing'] ?? null; - $this->suffixSpacing = $values['suffixSpacing'] ?? null; - $this->labelPosition = $values['labelPosition'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/AnnotationPolylineMeasureRectilinearSlopeItemFraction.php b/src/Types/AnnotationPolylineMeasureRectilinearSlopeItemFraction.php deleted file mode 100644 index c598e094..00000000 --- a/src/Types/AnnotationPolylineMeasureRectilinearSlopeItemFraction.php +++ /dev/null @@ -1,11 +0,0 @@ - $fraction - */ - #[JsonProperty('fraction')] - public ?string $fraction; - - /** - * @var ?int $precision - */ - #[JsonProperty('precision')] - public ?int $precision; - - /** - * @var ?bool $fixed - */ - #[JsonProperty('fixed')] - public ?bool $fixed; - - /** - * @var ?string $thousands - */ - #[JsonProperty('thousands')] - public ?string $thousands; - - /** - * @var ?string $decimal - */ - #[JsonProperty('decimal')] - public ?string $decimal; - - /** - * @var ?string $prefixSpacing - */ - #[JsonProperty('prefixSpacing')] - public ?string $prefixSpacing; - - /** - * @var ?string $suffixSpacing - */ - #[JsonProperty('suffixSpacing')] - public ?string $suffixSpacing; - - /** - * @var ?value-of $labelPosition - */ - #[JsonProperty('labelPosition')] - public ?string $labelPosition; - - /** - * @param array{ - * unit: string, - * conversion?: ?float, - * fraction?: ?value-of, - * precision?: ?int, - * fixed?: ?bool, - * thousands?: ?string, - * decimal?: ?string, - * prefixSpacing?: ?string, - * suffixSpacing?: ?string, - * labelPosition?: ?value-of, - * } $values - */ - public function __construct( - array $values, - ) { - $this->unit = $values['unit']; - $this->conversion = $values['conversion'] ?? null; - $this->fraction = $values['fraction'] ?? null; - $this->precision = $values['precision'] ?? null; - $this->fixed = $values['fixed'] ?? null; - $this->thousands = $values['thousands'] ?? null; - $this->decimal = $values['decimal'] ?? null; - $this->prefixSpacing = $values['prefixSpacing'] ?? null; - $this->suffixSpacing = $values['suffixSpacing'] ?? null; - $this->labelPosition = $values['labelPosition'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/AnnotationPolylineMeasureRectilinearXItemFraction.php b/src/Types/AnnotationPolylineMeasureRectilinearXItemFraction.php deleted file mode 100644 index 650c5a5b..00000000 --- a/src/Types/AnnotationPolylineMeasureRectilinearXItemFraction.php +++ /dev/null @@ -1,11 +0,0 @@ - $fraction - */ - #[JsonProperty('fraction')] - public ?string $fraction; - - /** - * @var ?int $precision - */ - #[JsonProperty('precision')] - public ?int $precision; - - /** - * @var ?bool $fixed - */ - #[JsonProperty('fixed')] - public ?bool $fixed; - - /** - * @var ?string $thousands - */ - #[JsonProperty('thousands')] - public ?string $thousands; - - /** - * @var ?string $decimal - */ - #[JsonProperty('decimal')] - public ?string $decimal; - - /** - * @var ?string $prefixSpacing - */ - #[JsonProperty('prefixSpacing')] - public ?string $prefixSpacing; - - /** - * @var ?string $suffixSpacing - */ - #[JsonProperty('suffixSpacing')] - public ?string $suffixSpacing; - - /** - * @var ?value-of $labelPosition - */ - #[JsonProperty('labelPosition')] - public ?string $labelPosition; - - /** - * @param array{ - * unit: string, - * conversion?: ?float, - * fraction?: ?value-of, - * precision?: ?int, - * fixed?: ?bool, - * thousands?: ?string, - * decimal?: ?string, - * prefixSpacing?: ?string, - * suffixSpacing?: ?string, - * labelPosition?: ?value-of, - * } $values - */ - public function __construct( - array $values, - ) { - $this->unit = $values['unit']; - $this->conversion = $values['conversion'] ?? null; - $this->fraction = $values['fraction'] ?? null; - $this->precision = $values['precision'] ?? null; - $this->fixed = $values['fixed'] ?? null; - $this->thousands = $values['thousands'] ?? null; - $this->decimal = $values['decimal'] ?? null; - $this->prefixSpacing = $values['prefixSpacing'] ?? null; - $this->suffixSpacing = $values['suffixSpacing'] ?? null; - $this->labelPosition = $values['labelPosition'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/AnnotationPolylineMeasureRectilinearYItemFraction.php b/src/Types/AnnotationPolylineMeasureRectilinearYItemFraction.php deleted file mode 100644 index 0e25c352..00000000 --- a/src/Types/AnnotationPolylineMeasureRectilinearYItemFraction.php +++ /dev/null @@ -1,11 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/Attachment.php b/src/Types/Attachment.php index e54289e8..7c292c5e 100644 --- a/src/Types/Attachment.php +++ b/src/Types/Attachment.php @@ -34,16 +34,16 @@ class Attachment extends JsonSerializableType public ?string $description; /** - * @var ?int $size + * @var ?int $sizeBytes */ - #[JsonProperty('size')] - public ?int $size; + #[JsonProperty('sizeBytes')] + public ?int $sizeBytes; /** - * @var ?string $checksum + * @var ?string $md5 */ - #[JsonProperty('checksum')] - public ?string $checksum; + #[JsonProperty('md5')] + public ?string $md5; /** * @var ?DateTime $createdAt @@ -70,8 +70,8 @@ class Attachment extends JsonSerializableType * index: int, * mimeType?: ?string, * description?: ?string, - * size?: ?int, - * checksum?: ?string, + * sizeBytes?: ?int, + * md5?: ?string, * createdAt?: ?DateTime, * modifiedAt?: ?DateTime, * } $values @@ -83,8 +83,8 @@ public function __construct( $this->name = $values['name']; $this->mimeType = $values['mimeType'] ?? null; $this->description = $values['description'] ?? null; - $this->size = $values['size'] ?? null; - $this->checksum = $values['checksum'] ?? null; + $this->sizeBytes = $values['sizeBytes'] ?? null; + $this->md5 = $values['md5'] ?? null; $this->createdAt = $values['createdAt'] ?? null; $this->modifiedAt = $values['modifiedAt'] ?? null; $this->index = $values['index']; diff --git a/src/Types/AttachmentFileInfo.php b/src/Types/AttachmentFileInfo.php index 39d96dd9..665e709b 100644 --- a/src/Types/AttachmentFileInfo.php +++ b/src/Types/AttachmentFileInfo.php @@ -28,16 +28,16 @@ class AttachmentFileInfo extends JsonSerializableType public ?string $description; /** - * @var ?int $size + * @var ?int $sizeBytes */ - #[JsonProperty('size')] - public ?int $size; + #[JsonProperty('sizeBytes')] + public ?int $sizeBytes; /** - * @var ?string $checksum + * @var ?string $md5 */ - #[JsonProperty('checksum')] - public ?string $checksum; + #[JsonProperty('md5')] + public ?string $md5; /** * @var ?DateTime $createdAt @@ -56,8 +56,8 @@ class AttachmentFileInfo extends JsonSerializableType * name: string, * mimeType?: ?string, * description?: ?string, - * size?: ?int, - * checksum?: ?string, + * sizeBytes?: ?int, + * md5?: ?string, * createdAt?: ?DateTime, * modifiedAt?: ?DateTime, * } $values @@ -68,8 +68,8 @@ public function __construct( $this->name = $values['name']; $this->mimeType = $values['mimeType'] ?? null; $this->description = $values['description'] ?? null; - $this->size = $values['size'] ?? null; - $this->checksum = $values['checksum'] ?? null; + $this->sizeBytes = $values['sizeBytes'] ?? null; + $this->md5 = $values['md5'] ?? null; $this->createdAt = $values['createdAt'] ?? null; $this->modifiedAt = $values['modifiedAt'] ?? null; } diff --git a/src/Types/AttachmentMutationMeta.php b/src/Types/AttachmentMutationMeta.php index e08231f8..331c5726 100644 --- a/src/Types/AttachmentMutationMeta.php +++ b/src/Types/AttachmentMutationMeta.php @@ -39,17 +39,17 @@ class AttachmentMutationMeta extends JsonSerializableType public ?array $missingCharacters; /** - * @var array $changed + * @var array $changedRefs */ - #[JsonProperty('changed'), ArrayType([AttachmentRef::class])] - public array $changed; + #[JsonProperty('changedRefs'), ArrayType([AttachmentRef::class])] + public array $changedRefs; /** * @param array{ * affectedPages: array, * opId: string, * undoable: bool, - * changed: array, + * changedRefs: array, * cacheDelta?: ?CacheDelta, * missingCharacters?: ?array, * } $values @@ -62,7 +62,7 @@ public function __construct( $this->opId = $values['opId']; $this->undoable = $values['undoable']; $this->missingCharacters = $values['missingCharacters'] ?? null; - $this->changed = $values['changed']; + $this->changedRefs = $values['changedRefs']; } /** diff --git a/src/Types/CacheDelta.php b/src/Types/CacheDelta.php index 1ee21b44..00b8e14e 100644 --- a/src/Types/CacheDelta.php +++ b/src/Types/CacheDelta.php @@ -62,6 +62,12 @@ class CacheDelta extends JsonSerializableType #[JsonProperty('fontsVersion')] public ?int $fontsVersion; + /** + * @var ?int $contentsVersion + */ + #[JsonProperty('contentsVersion')] + public ?int $contentsVersion; + /** * @var ?int $layerVersion */ @@ -92,6 +98,7 @@ class CacheDelta extends JsonSerializableType * attachmentsVersion?: ?int, * outlineVersion?: ?int, * fontsVersion?: ?int, + * contentsVersion?: ?int, * layerVersion?: ?int, * working?: ?bool, * } $values @@ -108,6 +115,7 @@ public function __construct( $this->attachmentsVersion = $values['attachmentsVersion'] ?? null; $this->outlineVersion = $values['outlineVersion'] ?? null; $this->fontsVersion = $values['fontsVersion'] ?? null; + $this->contentsVersion = $values['contentsVersion'] ?? null; $this->layerVersion = $values['layerVersion'] ?? null; $this->working = $values['working'] ?? null; $this->pages = $values['pages']; diff --git a/src/Types/ChangeItemFormsDeleteWidget.php b/src/Types/ChangeItemFormsDeleteWidget.php index d9c22cc1..a864667c 100644 --- a/src/Types/ChangeItemFormsDeleteWidget.php +++ b/src/Types/ChangeItemFormsDeleteWidget.php @@ -20,7 +20,7 @@ class ChangeItemFormsDeleteWidget extends JsonSerializableType public PageRef $page; /** - * @var ?FormField $field + * @var ?FormField $field A form field, by its `family`. A newer server can add families: read one your client doesn't know as `unknown`, keeping the fields every field has, with `rawValue` an empty string when the body has none. */ #[JsonProperty('field')] public ?FormField $field; diff --git a/src/Types/ChangeItemFormsRestoreWidget.php b/src/Types/ChangeItemFormsRestoreWidget.php index 1bd0433d..fc33f4d1 100644 --- a/src/Types/ChangeItemFormsRestoreWidget.php +++ b/src/Types/ChangeItemFormsRestoreWidget.php @@ -9,7 +9,7 @@ class ChangeItemFormsRestoreWidget extends JsonSerializableType { /** - * @var ?FormField $field + * @var ?FormField $field A form field, by its `family`. A newer server can add families: read one your client doesn't know as `unknown`, keeping the fields every field has, with `rawValue` an empty string when the body has none. */ #[JsonProperty('field')] public ?FormField $field; diff --git a/src/Types/ChangeItemPagesCopyLayoutPagesItem.php b/src/Types/ChangeItemPagesCopyLayoutPagesItem.php index be7632a7..8972948d 100644 --- a/src/Types/ChangeItemPagesCopyLayoutPagesItem.php +++ b/src/Types/ChangeItemPagesCopyLayoutPagesItem.php @@ -32,10 +32,10 @@ class ChangeItemPagesCopyLayoutPagesItem extends JsonSerializableType public ChangeItemPagesCopyLayoutPagesItemSize $size; /** - * @var float $rotation + * @var int $rotation */ #[JsonProperty('rotation')] - public float $rotation; + public int $rotation; /** * @var float $userUnit @@ -72,7 +72,7 @@ class ChangeItemPagesCopyLayoutPagesItem extends JsonSerializableType * index: int, * ref: PageRef, * size: ChangeItemPagesCopyLayoutPagesItemSize, - * rotation: float, + * rotation: int, * userUnit: float, * boxes: ChangeItemPagesCopyLayoutPagesItemBoxes, * pdfCropBox: ChangeItemPagesCopyLayoutPagesItemPdfCropBox, diff --git a/src/Types/ChangeItemPagesDeleteLayoutPagesItem.php b/src/Types/ChangeItemPagesDeleteLayoutPagesItem.php index c2cc134a..2798487e 100644 --- a/src/Types/ChangeItemPagesDeleteLayoutPagesItem.php +++ b/src/Types/ChangeItemPagesDeleteLayoutPagesItem.php @@ -32,10 +32,10 @@ class ChangeItemPagesDeleteLayoutPagesItem extends JsonSerializableType public ChangeItemPagesDeleteLayoutPagesItemSize $size; /** - * @var float $rotation + * @var int $rotation */ #[JsonProperty('rotation')] - public float $rotation; + public int $rotation; /** * @var float $userUnit @@ -72,7 +72,7 @@ class ChangeItemPagesDeleteLayoutPagesItem extends JsonSerializableType * index: int, * ref: PageRef, * size: ChangeItemPagesDeleteLayoutPagesItemSize, - * rotation: float, + * rotation: int, * userUnit: float, * boxes: ChangeItemPagesDeleteLayoutPagesItemBoxes, * pdfCropBox: ChangeItemPagesDeleteLayoutPagesItemPdfCropBox, diff --git a/src/Types/ChangeItemPagesInsertBlankLayoutPagesItem.php b/src/Types/ChangeItemPagesInsertBlankLayoutPagesItem.php index a99ea830..42783999 100644 --- a/src/Types/ChangeItemPagesInsertBlankLayoutPagesItem.php +++ b/src/Types/ChangeItemPagesInsertBlankLayoutPagesItem.php @@ -32,10 +32,10 @@ class ChangeItemPagesInsertBlankLayoutPagesItem extends JsonSerializableType public ChangeItemPagesInsertBlankLayoutPagesItemSize $size; /** - * @var float $rotation + * @var int $rotation */ #[JsonProperty('rotation')] - public float $rotation; + public int $rotation; /** * @var float $userUnit @@ -72,7 +72,7 @@ class ChangeItemPagesInsertBlankLayoutPagesItem extends JsonSerializableType * index: int, * ref: PageRef, * size: ChangeItemPagesInsertBlankLayoutPagesItemSize, - * rotation: float, + * rotation: int, * userUnit: float, * boxes: ChangeItemPagesInsertBlankLayoutPagesItemBoxes, * pdfCropBox: ChangeItemPagesInsertBlankLayoutPagesItemPdfCropBox, diff --git a/src/Types/ChangeItemPagesInsertLayoutPagesItem.php b/src/Types/ChangeItemPagesInsertLayoutPagesItem.php index c5eac391..4067e56c 100644 --- a/src/Types/ChangeItemPagesInsertLayoutPagesItem.php +++ b/src/Types/ChangeItemPagesInsertLayoutPagesItem.php @@ -32,10 +32,10 @@ class ChangeItemPagesInsertLayoutPagesItem extends JsonSerializableType public ChangeItemPagesInsertLayoutPagesItemSize $size; /** - * @var float $rotation + * @var int $rotation */ #[JsonProperty('rotation')] - public float $rotation; + public int $rotation; /** * @var float $userUnit @@ -72,7 +72,7 @@ class ChangeItemPagesInsertLayoutPagesItem extends JsonSerializableType * index: int, * ref: PageRef, * size: ChangeItemPagesInsertLayoutPagesItemSize, - * rotation: float, + * rotation: int, * userUnit: float, * boxes: ChangeItemPagesInsertLayoutPagesItemBoxes, * pdfCropBox: ChangeItemPagesInsertLayoutPagesItemPdfCropBox, diff --git a/src/Types/ChangeItemPagesReorderLayoutPagesItem.php b/src/Types/ChangeItemPagesReorderLayoutPagesItem.php index ef58dda2..fbbdef0a 100644 --- a/src/Types/ChangeItemPagesReorderLayoutPagesItem.php +++ b/src/Types/ChangeItemPagesReorderLayoutPagesItem.php @@ -32,10 +32,10 @@ class ChangeItemPagesReorderLayoutPagesItem extends JsonSerializableType public ChangeItemPagesReorderLayoutPagesItemSize $size; /** - * @var float $rotation + * @var int $rotation */ #[JsonProperty('rotation')] - public float $rotation; + public int $rotation; /** * @var float $userUnit @@ -72,7 +72,7 @@ class ChangeItemPagesReorderLayoutPagesItem extends JsonSerializableType * index: int, * ref: PageRef, * size: ChangeItemPagesReorderLayoutPagesItemSize, - * rotation: float, + * rotation: int, * userUnit: float, * boxes: ChangeItemPagesReorderLayoutPagesItemBoxes, * pdfCropBox: ChangeItemPagesReorderLayoutPagesItemPdfCropBox, diff --git a/src/Types/ChangeItemPagesRestoreLayoutPagesItem.php b/src/Types/ChangeItemPagesRestoreLayoutPagesItem.php index 8321b1e4..0aadf0ba 100644 --- a/src/Types/ChangeItemPagesRestoreLayoutPagesItem.php +++ b/src/Types/ChangeItemPagesRestoreLayoutPagesItem.php @@ -32,10 +32,10 @@ class ChangeItemPagesRestoreLayoutPagesItem extends JsonSerializableType public ChangeItemPagesRestoreLayoutPagesItemSize $size; /** - * @var float $rotation + * @var int $rotation */ #[JsonProperty('rotation')] - public float $rotation; + public int $rotation; /** * @var float $userUnit @@ -72,7 +72,7 @@ class ChangeItemPagesRestoreLayoutPagesItem extends JsonSerializableType * index: int, * ref: PageRef, * size: ChangeItemPagesRestoreLayoutPagesItemSize, - * rotation: float, + * rotation: int, * userUnit: float, * boxes: ChangeItemPagesRestoreLayoutPagesItemBoxes, * pdfCropBox: ChangeItemPagesRestoreLayoutPagesItemPdfCropBox, diff --git a/src/Types/ChangeItemPagesRotate.php b/src/Types/ChangeItemPagesRotate.php index 2ab8f46d..95305253 100644 --- a/src/Types/ChangeItemPagesRotate.php +++ b/src/Types/ChangeItemPagesRotate.php @@ -15,10 +15,10 @@ class ChangeItemPagesRotate extends JsonSerializableType public array $pages; /** - * @var float $rotation + * @var int $rotation */ #[JsonProperty('rotation')] - public float $rotation; + public int $rotation; /** * @var ChangeItemPagesRotateLayout $layout @@ -35,7 +35,7 @@ class ChangeItemPagesRotate extends JsonSerializableType /** * @param array{ * pages: array, - * rotation: float, + * rotation: int, * layout: ChangeItemPagesRotateLayout, * meta: MutationMeta, * } $values diff --git a/src/Types/ChangeItemPagesRotateLayoutPagesItem.php b/src/Types/ChangeItemPagesRotateLayoutPagesItem.php index ad773096..ecfa9536 100644 --- a/src/Types/ChangeItemPagesRotateLayoutPagesItem.php +++ b/src/Types/ChangeItemPagesRotateLayoutPagesItem.php @@ -32,10 +32,10 @@ class ChangeItemPagesRotateLayoutPagesItem extends JsonSerializableType public ChangeItemPagesRotateLayoutPagesItemSize $size; /** - * @var float $rotation + * @var int $rotation */ #[JsonProperty('rotation')] - public float $rotation; + public int $rotation; /** * @var float $userUnit @@ -72,7 +72,7 @@ class ChangeItemPagesRotateLayoutPagesItem extends JsonSerializableType * index: int, * ref: PageRef, * size: ChangeItemPagesRotateLayoutPagesItemSize, - * rotation: float, + * rotation: int, * userUnit: float, * boxes: ChangeItemPagesRotateLayoutPagesItemBoxes, * pdfCropBox: ChangeItemPagesRotateLayoutPagesItemPdfCropBox, diff --git a/src/Types/ChangeOpPagesRotate.php b/src/Types/ChangeOpPagesRotate.php index 59bb698e..fda4cfb7 100644 --- a/src/Types/ChangeOpPagesRotate.php +++ b/src/Types/ChangeOpPagesRotate.php @@ -15,15 +15,15 @@ class ChangeOpPagesRotate extends JsonSerializableType public array $pages; /** - * @var float $rotation + * @var int $rotation */ #[JsonProperty('rotation')] - public float $rotation; + public int $rotation; /** * @param array{ * pages: array, - * rotation: float, + * rotation: int, * } $values */ public function __construct( diff --git a/src/Types/DeploymentLicenseStatusResponse.php b/src/Types/DeploymentLicenseStatusResponse.php index 2205c668..5a905aac 100644 --- a/src/Types/DeploymentLicenseStatusResponse.php +++ b/src/Types/DeploymentLicenseStatusResponse.php @@ -4,38 +4,39 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; +use CloudPDF\Core\Types\ArrayType; class DeploymentLicenseStatusResponse extends JsonSerializableType { /** - * @var mixed $license + * @var array $license */ - #[JsonProperty('license')] - public mixed $license; + #[JsonProperty('license'), ArrayType(['string' => 'mixed'])] + public array $license; /** - * @var mixed $reporting + * @var ?array $reporting */ - #[JsonProperty('reporting')] - public mixed $reporting; + #[JsonProperty('reporting'), ArrayType(['string' => 'mixed'])] + public ?array $reporting; /** - * @var mixed $usage + * @var ?array $usage */ - #[JsonProperty('usage')] - public mixed $usage; + #[JsonProperty('usage'), ArrayType(['string' => 'mixed'])] + public ?array $usage; /** * @param array{ - * license?: mixed, - * reporting?: mixed, - * usage?: mixed, + * license: array, + * reporting?: ?array, + * usage?: ?array, * } $values */ public function __construct( - array $values = [], + array $values, ) { - $this->license = $values['license'] ?? null; + $this->license = $values['license']; $this->reporting = $values['reporting'] ?? null; $this->usage = $values['usage'] ?? null; } diff --git a/src/Types/DocAnnotationsCreate200Response.php b/src/Types/DocAnnotationsCreateResponse.php similarity index 92% rename from src/Types/DocAnnotationsCreate200Response.php rename to src/Types/DocAnnotationsCreateResponse.php index e3df4b67..ef052d9e 100644 --- a/src/Types/DocAnnotationsCreate200Response.php +++ b/src/Types/DocAnnotationsCreateResponse.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocAnnotationsCreate200Response extends JsonSerializableType +class DocAnnotationsCreateResponse extends JsonSerializableType { /** * @var Annotation $annotation diff --git a/src/Types/DocAnnotationsDelete200Response.php b/src/Types/DocAnnotationsDeleteResponse.php similarity index 89% rename from src/Types/DocAnnotationsDelete200Response.php rename to src/Types/DocAnnotationsDeleteResponse.php index fd0df102..7b7ee335 100644 --- a/src/Types/DocAnnotationsDelete200Response.php +++ b/src/Types/DocAnnotationsDeleteResponse.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocAnnotationsDelete200Response extends JsonSerializableType +class DocAnnotationsDeleteResponse extends JsonSerializableType { /** * @var AnnotationMutationMeta $meta diff --git a/src/Types/DocAnnotationsFlatten200Response.php b/src/Types/DocAnnotationsFlattenResponse.php similarity index 68% rename from src/Types/DocAnnotationsFlatten200Response.php rename to src/Types/DocAnnotationsFlattenResponse.php index dab1661a..2a6870fe 100644 --- a/src/Types/DocAnnotationsFlatten200Response.php +++ b/src/Types/DocAnnotationsFlattenResponse.php @@ -6,7 +6,7 @@ use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; -class DocAnnotationsFlatten200Response extends JsonSerializableType +class DocAnnotationsFlattenResponse extends JsonSerializableType { /** * @var PageRef $page @@ -15,15 +15,15 @@ class DocAnnotationsFlatten200Response extends JsonSerializableType public PageRef $page; /** - * @var value-of $usage + * @var value-of $usage */ #[JsonProperty('usage')] public string $usage; /** - * @var array $results + * @var array $results */ - #[JsonProperty('results'), ArrayType([DocAnnotationsFlatten200ResponseResultsItem::class])] + #[JsonProperty('results'), ArrayType([DocAnnotationsFlattenResponseResultsItem::class])] public array $results; /** @@ -35,8 +35,8 @@ class DocAnnotationsFlatten200Response extends JsonSerializableType /** * @param array{ * page: PageRef, - * usage: value-of, - * results: array, + * usage: value-of, + * results: array, * meta: MutationMeta, * } $values */ diff --git a/src/Types/DocAnnotationsFlatten200ResponseResultsItem.php b/src/Types/DocAnnotationsFlattenResponseResultsItem.php similarity index 73% rename from src/Types/DocAnnotationsFlatten200ResponseResultsItem.php rename to src/Types/DocAnnotationsFlattenResponseResultsItem.php index 0e30b7de..fbbe7861 100644 --- a/src/Types/DocAnnotationsFlatten200ResponseResultsItem.php +++ b/src/Types/DocAnnotationsFlattenResponseResultsItem.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocAnnotationsFlatten200ResponseResultsItem extends JsonSerializableType +class DocAnnotationsFlattenResponseResultsItem extends JsonSerializableType { /** * @var AnnotationRef $ref @@ -14,7 +14,7 @@ class DocAnnotationsFlatten200ResponseResultsItem extends JsonSerializableType public AnnotationRef $ref; /** - * @var value-of $status + * @var value-of $status */ #[JsonProperty('status')] public string $status; @@ -22,7 +22,7 @@ class DocAnnotationsFlatten200ResponseResultsItem extends JsonSerializableType /** * @param array{ * ref: AnnotationRef, - * status: value-of, + * status: value-of, * } $values */ public function __construct( diff --git a/src/Types/DocRedactionsApply200ResponseResultsItemStatus.php b/src/Types/DocAnnotationsFlattenResponseResultsItemStatus.php similarity index 62% rename from src/Types/DocRedactionsApply200ResponseResultsItemStatus.php rename to src/Types/DocAnnotationsFlattenResponseResultsItemStatus.php index 69dc8e68..ffa16ed5 100644 --- a/src/Types/DocRedactionsApply200ResponseResultsItemStatus.php +++ b/src/Types/DocAnnotationsFlattenResponseResultsItemStatus.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocRedactionsApply200ResponseResultsItemStatus: string +enum DocAnnotationsFlattenResponseResultsItemStatus: string { case Applied = "applied"; case Unchanged = "unchanged"; diff --git a/src/Types/DocAnnotationsFlatten200ResponseUsage.php b/src/Types/DocAnnotationsFlattenResponseUsage.php similarity index 65% rename from src/Types/DocAnnotationsFlatten200ResponseUsage.php rename to src/Types/DocAnnotationsFlattenResponseUsage.php index d786bf3c..f20ada15 100644 --- a/src/Types/DocAnnotationsFlatten200ResponseUsage.php +++ b/src/Types/DocAnnotationsFlattenResponseUsage.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocAnnotationsFlatten200ResponseUsage: string +enum DocAnnotationsFlattenResponseUsage: string { case Display = "display"; case Print_ = "print"; diff --git a/src/Types/DocAnnotationsReorder200Response.php b/src/Types/DocAnnotationsReorderResponse.php similarity index 92% rename from src/Types/DocAnnotationsReorder200Response.php rename to src/Types/DocAnnotationsReorderResponse.php index 64bd244e..85d0a5a3 100644 --- a/src/Types/DocAnnotationsReorder200Response.php +++ b/src/Types/DocAnnotationsReorderResponse.php @@ -6,7 +6,7 @@ use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; -class DocAnnotationsReorder200Response extends JsonSerializableType +class DocAnnotationsReorderResponse extends JsonSerializableType { /** * @var array $order diff --git a/src/Types/DocAnnotationsUpdate200Response.php b/src/Types/DocAnnotationsUpdateResponse.php similarity index 77% rename from src/Types/DocAnnotationsUpdate200Response.php rename to src/Types/DocAnnotationsUpdateResponse.php index a51dae57..1db44ec0 100644 --- a/src/Types/DocAnnotationsUpdate200Response.php +++ b/src/Types/DocAnnotationsUpdateResponse.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocAnnotationsUpdate200Response extends JsonSerializableType +class DocAnnotationsUpdateResponse extends JsonSerializableType { /** * @var Annotation $annotation @@ -14,10 +14,10 @@ class DocAnnotationsUpdate200Response extends JsonSerializableType public Annotation $annotation; /** - * @var DocAnnotationsUpdate200ResponseAppearance $appearance + * @var DocAnnotationsUpdateResponseAppearance $appearance */ #[JsonProperty('appearance')] - public DocAnnotationsUpdate200ResponseAppearance $appearance; + public DocAnnotationsUpdateResponseAppearance $appearance; /** * @var AnnotationMutationMeta $meta @@ -28,7 +28,7 @@ class DocAnnotationsUpdate200Response extends JsonSerializableType /** * @param array{ * annotation: Annotation, - * appearance: DocAnnotationsUpdate200ResponseAppearance, + * appearance: DocAnnotationsUpdateResponseAppearance, * meta: AnnotationMutationMeta, * } $values */ diff --git a/src/Types/DocAnnotationsUpdate200ResponseAppearance.php b/src/Types/DocAnnotationsUpdateResponseAppearance.php similarity index 73% rename from src/Types/DocAnnotationsUpdate200ResponseAppearance.php rename to src/Types/DocAnnotationsUpdateResponseAppearance.php index 524d8772..d2016c35 100644 --- a/src/Types/DocAnnotationsUpdate200ResponseAppearance.php +++ b/src/Types/DocAnnotationsUpdateResponseAppearance.php @@ -5,10 +5,10 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocAnnotationsUpdate200ResponseAppearance extends JsonSerializableType +class DocAnnotationsUpdateResponseAppearance extends JsonSerializableType { /** - * @var value-of $action + * @var value-of $action */ #[JsonProperty('action')] public string $action; @@ -21,7 +21,7 @@ class DocAnnotationsUpdate200ResponseAppearance extends JsonSerializableType /** * @param array{ - * action: value-of, + * action: value-of, * changed: bool, * } $values */ diff --git a/src/Types/DocAnnotationsUpdate200ResponseAppearanceAction.php b/src/Types/DocAnnotationsUpdateResponseAppearanceAction.php similarity index 76% rename from src/Types/DocAnnotationsUpdate200ResponseAppearanceAction.php rename to src/Types/DocAnnotationsUpdateResponseAppearanceAction.php index 6fa9f281..020ad6ba 100644 --- a/src/Types/DocAnnotationsUpdate200ResponseAppearanceAction.php +++ b/src/Types/DocAnnotationsUpdateResponseAppearanceAction.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocAnnotationsUpdate200ResponseAppearanceAction: string +enum DocAnnotationsUpdateResponseAppearanceAction: string { case Preserved = "preserved"; case Regenerated = "regenerated"; diff --git a/src/Types/DocChanges200Response.php b/src/Types/DocChangesResponse.php similarity index 65% rename from src/Types/DocChanges200Response.php rename to src/Types/DocChangesResponse.php index 89e731b2..ebf6ea94 100644 --- a/src/Types/DocChanges200Response.php +++ b/src/Types/DocChangesResponse.php @@ -6,17 +6,17 @@ use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; -class DocChanges200Response extends JsonSerializableType +class DocChangesResponse extends JsonSerializableType { /** - * @var array $changes + * @var array $changes */ - #[JsonProperty('changes'), ArrayType([DocChanges200ResponseChangesItem::class])] + #[JsonProperty('changes'), ArrayType([DocChangesResponseChangesItem::class])] public array $changes; /** * @param array{ - * changes: array, + * changes: array, * } $values */ public function __construct( diff --git a/src/Types/DocChanges200ResponseChangesItem.php b/src/Types/DocChangesResponseChangesItem.php similarity index 68% rename from src/Types/DocChanges200ResponseChangesItem.php rename to src/Types/DocChangesResponseChangesItem.php index 124d7d5b..c625dced 100644 --- a/src/Types/DocChanges200ResponseChangesItem.php +++ b/src/Types/DocChangesResponseChangesItem.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use Exception; -class DocChanges200ResponseChangesItem extends JsonSerializableType +class DocChangesResponseChangesItem extends JsonSerializableType { /** * @var ( @@ -18,8 +18,8 @@ class DocChanges200ResponseChangesItem extends JsonSerializableType /** * @var ( - * DocChanges200ResponseChangesItemApplied - * |DocChanges200ResponseChangesItemRefused + * DocChangesResponseChangesItemApplied + * |DocChangesResponseChangesItemRefused * |mixed * ) $value */ @@ -33,8 +33,8 @@ class DocChanges200ResponseChangesItem extends JsonSerializableType * |'_unknown' * ), * value: ( - * DocChanges200ResponseChangesItemApplied - * |DocChanges200ResponseChangesItemRefused + * DocChangesResponseChangesItemApplied + * |DocChangesResponseChangesItemRefused * |mixed * ), * } $values @@ -47,24 +47,24 @@ private function __construct( } /** - * @param DocChanges200ResponseChangesItemApplied $applied - * @return DocChanges200ResponseChangesItem + * @param DocChangesResponseChangesItemApplied $applied + * @return DocChangesResponseChangesItem */ - public static function applied(DocChanges200ResponseChangesItemApplied $applied): DocChanges200ResponseChangesItem + public static function applied(DocChangesResponseChangesItemApplied $applied): DocChangesResponseChangesItem { - return new DocChanges200ResponseChangesItem([ + return new DocChangesResponseChangesItem([ 'status' => 'applied', 'value' => $applied, ]); } /** - * @param DocChanges200ResponseChangesItemRefused $refused - * @return DocChanges200ResponseChangesItem + * @param DocChangesResponseChangesItemRefused $refused + * @return DocChangesResponseChangesItem */ - public static function refused(DocChanges200ResponseChangesItemRefused $refused): DocChanges200ResponseChangesItem + public static function refused(DocChangesResponseChangesItemRefused $refused): DocChangesResponseChangesItem { - return new DocChanges200ResponseChangesItem([ + return new DocChangesResponseChangesItem([ 'status' => 'refused', 'value' => $refused, ]); @@ -75,15 +75,15 @@ public static function refused(DocChanges200ResponseChangesItemRefused $refused) */ public function isApplied(): bool { - return $this->value instanceof DocChanges200ResponseChangesItemApplied && $this->status === 'applied'; + return $this->value instanceof DocChangesResponseChangesItemApplied && $this->status === 'applied'; } /** - * @return DocChanges200ResponseChangesItemApplied + * @return DocChangesResponseChangesItemApplied */ - public function asApplied(): DocChanges200ResponseChangesItemApplied + public function asApplied(): DocChangesResponseChangesItemApplied { - if (!($this->value instanceof DocChanges200ResponseChangesItemApplied && $this->status === 'applied')) { + if (!($this->value instanceof DocChangesResponseChangesItemApplied && $this->status === 'applied')) { throw new Exception( "Expected applied; got " . $this->status . " with value of type " . get_debug_type($this->value), ); @@ -97,15 +97,15 @@ public function asApplied(): DocChanges200ResponseChangesItemApplied */ public function isRefused(): bool { - return $this->value instanceof DocChanges200ResponseChangesItemRefused && $this->status === 'refused'; + return $this->value instanceof DocChangesResponseChangesItemRefused && $this->status === 'refused'; } /** - * @return DocChanges200ResponseChangesItemRefused + * @return DocChangesResponseChangesItemRefused */ - public function asRefused(): DocChanges200ResponseChangesItemRefused + public function asRefused(): DocChangesResponseChangesItemRefused { - if (!($this->value instanceof DocChanges200ResponseChangesItemRefused && $this->status === 'refused')) { + if (!($this->value instanceof DocChangesResponseChangesItemRefused && $this->status === 'refused')) { throw new Exception( "Expected refused; got " . $this->status . " with value of type " . get_debug_type($this->value), ); @@ -179,10 +179,10 @@ public static function jsonDeserialize(array $data): static $args['status'] = $status; switch ($status) { case 'applied': - $args['value'] = DocChanges200ResponseChangesItemApplied::jsonDeserialize($data); + $args['value'] = DocChangesResponseChangesItemApplied::jsonDeserialize($data); break; case 'refused': - $args['value'] = DocChanges200ResponseChangesItemRefused::jsonDeserialize($data); + $args['value'] = DocChangesResponseChangesItemRefused::jsonDeserialize($data); break; case '_unknown': default: diff --git a/src/Types/DocChanges200ResponseChangesItemApplied.php b/src/Types/DocChangesResponseChangesItemApplied.php similarity index 90% rename from src/Types/DocChanges200ResponseChangesItemApplied.php rename to src/Types/DocChangesResponseChangesItemApplied.php index 88aaff3a..d8f193c5 100644 --- a/src/Types/DocChanges200ResponseChangesItemApplied.php +++ b/src/Types/DocChangesResponseChangesItemApplied.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocChanges200ResponseChangesItemApplied extends JsonSerializableType +class DocChangesResponseChangesItemApplied extends JsonSerializableType { /** * @var string $opId diff --git a/src/Types/DocChanges200ResponseChangesItemRefused.php b/src/Types/DocChangesResponseChangesItemRefused.php similarity index 76% rename from src/Types/DocChanges200ResponseChangesItemRefused.php rename to src/Types/DocChangesResponseChangesItemRefused.php index c11f1c70..eb9e6ca8 100644 --- a/src/Types/DocChanges200ResponseChangesItemRefused.php +++ b/src/Types/DocChangesResponseChangesItemRefused.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocChanges200ResponseChangesItemRefused extends JsonSerializableType +class DocChangesResponseChangesItemRefused extends JsonSerializableType { /** * @var string $opId @@ -14,15 +14,15 @@ class DocChanges200ResponseChangesItemRefused extends JsonSerializableType public string $opId; /** - * @var EngineErrorPayload $error + * @var EngineError $error */ #[JsonProperty('error')] - public EngineErrorPayload $error; + public EngineError $error; /** * @param array{ * opId: string, - * error: EngineErrorPayload, + * error: EngineError, * } $values */ public function __construct( diff --git a/src/Types/DocDownloadLink200Response.php b/src/Types/DocDownloadLinkResponse.php similarity index 69% rename from src/Types/DocDownloadLink200Response.php rename to src/Types/DocDownloadLinkResponse.php index 96342163..2adfb27c 100644 --- a/src/Types/DocDownloadLink200Response.php +++ b/src/Types/DocDownloadLinkResponse.php @@ -4,8 +4,10 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; +use DateTime; +use CloudPDF\Core\Types\Date; -class DocDownloadLink200Response extends JsonSerializableType +class DocDownloadLinkResponse extends JsonSerializableType { /** * @var string $url @@ -14,15 +16,15 @@ class DocDownloadLink200Response extends JsonSerializableType public string $url; /** - * @var float $expiresAt + * @var DateTime $expiresAt */ - #[JsonProperty('expiresAt')] - public float $expiresAt; + #[JsonProperty('expiresAt'), Date(Date::TYPE_DATETIME)] + public DateTime $expiresAt; /** * @param array{ * url: string, - * expiresAt: float, + * expiresAt: DateTime, * } $values */ public function __construct( diff --git a/src/Types/DocFormsDeleteWidget200Response.php b/src/Types/DocFormsDeleteWidgetResponse.php similarity index 78% rename from src/Types/DocFormsDeleteWidget200Response.php rename to src/Types/DocFormsDeleteWidgetResponse.php index b1cd846b..fd49b6c0 100644 --- a/src/Types/DocFormsDeleteWidget200Response.php +++ b/src/Types/DocFormsDeleteWidgetResponse.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocFormsDeleteWidget200Response extends JsonSerializableType +class DocFormsDeleteWidgetResponse extends JsonSerializableType { /** * @var AnnotationRef $widget @@ -20,7 +20,7 @@ class DocFormsDeleteWidget200Response extends JsonSerializableType public PageRef $page; /** - * @var ?FormField $field + * @var ?FormField $field A form field, by its `family`. A newer server can add families: read one your client doesn't know as `unknown`, keeping the fields every field has, with `rawValue` an empty string when the body has none. */ #[JsonProperty('field')] public ?FormField $field; diff --git a/src/Types/DocFormsList200Response.php b/src/Types/DocFormsListResponse.php similarity index 89% rename from src/Types/DocFormsList200Response.php rename to src/Types/DocFormsListResponse.php index f06bd5f2..c20a190c 100644 --- a/src/Types/DocFormsList200Response.php +++ b/src/Types/DocFormsListResponse.php @@ -7,10 +7,10 @@ use CloudPDF\Core\Types\ArrayType; use CloudPDF\Core\Types\Union; -class DocFormsList200Response extends JsonSerializableType +class DocFormsListResponse extends JsonSerializableType { /** - * @var value-of $formKind + * @var value-of $formKind */ #[JsonProperty('formKind')] public string $formKind; @@ -41,7 +41,7 @@ class DocFormsList200Response extends JsonSerializableType /** * @param array{ - * formKind: value-of, + * formKind: value-of, * needsAppearances: bool, * fields: array, * widgets: array, diff --git a/src/Types/DocFormsList200ResponseFormKind.php b/src/Types/DocFormsListResponseFormKind.php similarity index 72% rename from src/Types/DocFormsList200ResponseFormKind.php rename to src/Types/DocFormsListResponseFormKind.php index 1f754b9a..47ae79b4 100644 --- a/src/Types/DocFormsList200ResponseFormKind.php +++ b/src/Types/DocFormsListResponseFormKind.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocFormsList200ResponseFormKind: string +enum DocFormsListResponseFormKind: string { case None = "none"; case Acroform = "acroform"; diff --git a/src/Types/DocFormsReorderCalculations200Response.php b/src/Types/DocFormsReorderCalculationsResponse.php similarity index 92% rename from src/Types/DocFormsReorderCalculations200Response.php rename to src/Types/DocFormsReorderCalculationsResponse.php index f9a2f13a..42e0463f 100644 --- a/src/Types/DocFormsReorderCalculations200Response.php +++ b/src/Types/DocFormsReorderCalculationsResponse.php @@ -6,7 +6,7 @@ use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; -class DocFormsReorderCalculations200Response extends JsonSerializableType +class DocFormsReorderCalculationsResponse extends JsonSerializableType { /** * @var array $calculationOrder diff --git a/src/Types/DocFormsReorderWidgets200Response.php b/src/Types/DocFormsReorderWidgetsResponse.php similarity index 93% rename from src/Types/DocFormsReorderWidgets200Response.php rename to src/Types/DocFormsReorderWidgetsResponse.php index 70cb39f8..9c8425d9 100644 --- a/src/Types/DocFormsReorderWidgets200Response.php +++ b/src/Types/DocFormsReorderWidgetsResponse.php @@ -6,7 +6,7 @@ use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; -class DocFormsReorderWidgets200Response extends JsonSerializableType +class DocFormsReorderWidgetsResponse extends JsonSerializableType { /** * @var PageRef $page diff --git a/src/Types/DocFormsReset200Response.php b/src/Types/DocFormsResetResponse.php similarity index 94% rename from src/Types/DocFormsReset200Response.php rename to src/Types/DocFormsResetResponse.php index 1e0f1a7e..22d13ad5 100644 --- a/src/Types/DocFormsReset200Response.php +++ b/src/Types/DocFormsResetResponse.php @@ -6,7 +6,7 @@ use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; -class DocFormsReset200Response extends JsonSerializableType +class DocFormsResetResponse extends JsonSerializableType { /** * @var array $fields diff --git a/src/Types/DocFormsSetValue200Response.php b/src/Types/DocFormsSetValueResponse.php similarity index 94% rename from src/Types/DocFormsSetValue200Response.php rename to src/Types/DocFormsSetValueResponse.php index 044b8023..d1de90c3 100644 --- a/src/Types/DocFormsSetValue200Response.php +++ b/src/Types/DocFormsSetValueResponse.php @@ -6,7 +6,7 @@ use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; -class DocFormsSetValue200Response extends JsonSerializableType +class DocFormsSetValueResponse extends JsonSerializableType { /** * @var FormField $field diff --git a/src/Types/DocFormsUpdateWidget200Response.php b/src/Types/DocFormsUpdateWidgetResponse.php similarity index 76% rename from src/Types/DocFormsUpdateWidget200Response.php rename to src/Types/DocFormsUpdateWidgetResponse.php index 9a57fd38..98259f0c 100644 --- a/src/Types/DocFormsUpdateWidget200Response.php +++ b/src/Types/DocFormsUpdateWidgetResponse.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocFormsUpdateWidget200Response extends JsonSerializableType +class DocFormsUpdateWidgetResponse extends JsonSerializableType { /** * @var WidgetAnnotation $widget @@ -14,10 +14,10 @@ class DocFormsUpdateWidget200Response extends JsonSerializableType public WidgetAnnotation $widget; /** - * @var DocFormsUpdateWidget200ResponseAppearance $appearance + * @var DocFormsUpdateWidgetResponseAppearance $appearance */ #[JsonProperty('appearance')] - public DocFormsUpdateWidget200ResponseAppearance $appearance; + public DocFormsUpdateWidgetResponseAppearance $appearance; /** * @var FormMutationMeta $meta @@ -28,7 +28,7 @@ class DocFormsUpdateWidget200Response extends JsonSerializableType /** * @param array{ * widget: WidgetAnnotation, - * appearance: DocFormsUpdateWidget200ResponseAppearance, + * appearance: DocFormsUpdateWidgetResponseAppearance, * meta: FormMutationMeta, * } $values */ diff --git a/src/Types/DocFormsUpdateWidget200ResponseAppearance.php b/src/Types/DocFormsUpdateWidgetResponseAppearance.php similarity index 73% rename from src/Types/DocFormsUpdateWidget200ResponseAppearance.php rename to src/Types/DocFormsUpdateWidgetResponseAppearance.php index f724b293..50a450a5 100644 --- a/src/Types/DocFormsUpdateWidget200ResponseAppearance.php +++ b/src/Types/DocFormsUpdateWidgetResponseAppearance.php @@ -5,10 +5,10 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocFormsUpdateWidget200ResponseAppearance extends JsonSerializableType +class DocFormsUpdateWidgetResponseAppearance extends JsonSerializableType { /** - * @var value-of $action + * @var value-of $action */ #[JsonProperty('action')] public string $action; @@ -21,7 +21,7 @@ class DocFormsUpdateWidget200ResponseAppearance extends JsonSerializableType /** * @param array{ - * action: value-of, + * action: value-of, * changed: bool, * } $values */ diff --git a/src/Types/DocFormsUpdateWidget200ResponseAppearanceAction.php b/src/Types/DocFormsUpdateWidgetResponseAppearanceAction.php similarity index 76% rename from src/Types/DocFormsUpdateWidget200ResponseAppearanceAction.php rename to src/Types/DocFormsUpdateWidgetResponseAppearanceAction.php index 1f4c9fe2..3940fe2a 100644 --- a/src/Types/DocFormsUpdateWidget200ResponseAppearanceAction.php +++ b/src/Types/DocFormsUpdateWidgetResponseAppearanceAction.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocFormsUpdateWidget200ResponseAppearanceAction: string +enum DocFormsUpdateWidgetResponseAppearanceAction: string { case Preserved = "preserved"; case Regenerated = "regenerated"; diff --git a/src/Types/DocHead200Response.php b/src/Types/DocHead200Response.php deleted file mode 100644 index 8c849edc..00000000 --- a/src/Types/DocHead200Response.php +++ /dev/null @@ -1,90 +0,0 @@ - $state - */ - #[JsonProperty('state')] - public string $state; - - /** - * @var DocHead200ResponseEncryption $encryption - */ - #[JsonProperty('encryption')] - public DocHead200ResponseEncryption $encryption; - - /** - * @var DocHead200ResponsePermissions $permissions - */ - #[JsonProperty('permissions')] - public DocHead200ResponsePermissions $permissions; - - /** - * @var DocHead200ResponseAccess $access - */ - #[JsonProperty('access')] - public DocHead200ResponseAccess $access; - - /** - * @param array{ - * id: string, - * baseSha: string, - * storageSizeBytes: int, - * docVersion: int, - * state: value-of, - * encryption: DocHead200ResponseEncryption, - * permissions: DocHead200ResponsePermissions, - * access: DocHead200ResponseAccess, - * } $values - */ - public function __construct( - array $values, - ) { - $this->id = $values['id']; - $this->baseSha = $values['baseSha']; - $this->storageSizeBytes = $values['storageSizeBytes']; - $this->docVersion = $values['docVersion']; - $this->state = $values['state']; - $this->encryption = $values['encryption']; - $this->permissions = $values['permissions']; - $this->access = $values['access']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/DocHeadResponse.php b/src/Types/DocHeadResponse.php new file mode 100644 index 00000000..c146382a --- /dev/null +++ b/src/Types/DocHeadResponse.php @@ -0,0 +1,99 @@ + $state + */ + #[JsonProperty('state')] + public string $state; + + /** + * @var DocHeadResponseEncryption $encryption + */ + #[JsonProperty('encryption')] + public DocHeadResponseEncryption $encryption; + + /** + * @var DocHeadResponsePermissions $permissions + */ + #[JsonProperty('permissions')] + public DocHeadResponsePermissions $permissions; + + /** + * @var DocHeadResponseAccess $access + */ + #[JsonProperty('access')] + public DocHeadResponseAccess $access; + + /** + * @var array $engine + */ + #[JsonProperty('engine'), ArrayType(['string' => 'string'])] + public array $engine; + + /** + * @param array{ + * id: string, + * baseSha256: string, + * sizeBytes: int, + * docVersion: int, + * state: value-of, + * encryption: DocHeadResponseEncryption, + * permissions: DocHeadResponsePermissions, + * access: DocHeadResponseAccess, + * engine: array, + * } $values + */ + public function __construct( + array $values, + ) { + $this->id = $values['id']; + $this->baseSha256 = $values['baseSha256']; + $this->sizeBytes = $values['sizeBytes']; + $this->docVersion = $values['docVersion']; + $this->state = $values['state']; + $this->encryption = $values['encryption']; + $this->permissions = $values['permissions']; + $this->access = $values['access']; + $this->engine = $values['engine']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocHead200ResponseAccess.php b/src/Types/DocHeadResponseAccess.php similarity index 81% rename from src/Types/DocHead200ResponseAccess.php rename to src/Types/DocHeadResponseAccess.php index f803b8fb..eb548136 100644 --- a/src/Types/DocHead200ResponseAccess.php +++ b/src/Types/DocHeadResponseAccess.php @@ -6,7 +6,7 @@ use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; -class DocHead200ResponseAccess extends JsonSerializableType +class DocHeadResponseAccess extends JsonSerializableType { /** * @var bool $required @@ -15,7 +15,7 @@ class DocHead200ResponseAccess extends JsonSerializableType public bool $required; /** - * @var array> $reasons + * @var array> $reasons */ #[JsonProperty('reasons'), ArrayType(['string'])] public array $reasons; @@ -29,7 +29,7 @@ class DocHead200ResponseAccess extends JsonSerializableType /** * @param array{ * required: bool, - * reasons: array>, + * reasons: array>, * endpoint?: ?string, * } $values */ diff --git a/src/Types/DocHead200ResponseAccessReasonsItem.php b/src/Types/DocHeadResponseAccessReasonsItem.php similarity index 74% rename from src/Types/DocHead200ResponseAccessReasonsItem.php rename to src/Types/DocHeadResponseAccessReasonsItem.php index 29937291..50818291 100644 --- a/src/Types/DocHead200ResponseAccessReasonsItem.php +++ b/src/Types/DocHeadResponseAccessReasonsItem.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocHead200ResponseAccessReasonsItem: string +enum DocHeadResponseAccessReasonsItem: string { case Password = "password"; case Cdn = "cdn"; diff --git a/src/Types/DocHead200ResponseEncryption.php b/src/Types/DocHeadResponseEncryption.php similarity index 79% rename from src/Types/DocHead200ResponseEncryption.php rename to src/Types/DocHeadResponseEncryption.php index 77f377f9..eed0487f 100644 --- a/src/Types/DocHead200ResponseEncryption.php +++ b/src/Types/DocHeadResponseEncryption.php @@ -5,10 +5,10 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocHead200ResponseEncryption extends JsonSerializableType +class DocHeadResponseEncryption extends JsonSerializableType { /** - * @var value-of $state + * @var value-of $state */ #[JsonProperty('state')] public string $state; @@ -21,7 +21,7 @@ class DocHead200ResponseEncryption extends JsonSerializableType /** * @param array{ - * state: value-of, + * state: value-of, * requiresPassword?: ?bool, * } $values */ diff --git a/src/Types/DocHead200ResponseEncryptionState.php b/src/Types/DocHeadResponseEncryptionState.php similarity index 77% rename from src/Types/DocHead200ResponseEncryptionState.php rename to src/Types/DocHeadResponseEncryptionState.php index 3a502a50..63cac7cf 100644 --- a/src/Types/DocHead200ResponseEncryptionState.php +++ b/src/Types/DocHeadResponseEncryptionState.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocHead200ResponseEncryptionState: string +enum DocHeadResponseEncryptionState: string { case Unknown = "unknown"; case None = "none"; diff --git a/src/Types/DocHead200ResponsePermissions.php b/src/Types/DocHeadResponsePermissions.php similarity index 77% rename from src/Types/DocHead200ResponsePermissions.php rename to src/Types/DocHeadResponsePermissions.php index b6ec18db..2ca539da 100644 --- a/src/Types/DocHead200ResponsePermissions.php +++ b/src/Types/DocHeadResponsePermissions.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocHead200ResponsePermissions extends JsonSerializableType +class DocHeadResponsePermissions extends JsonSerializableType { /** * @var bool $known @@ -14,10 +14,10 @@ class DocHead200ResponsePermissions extends JsonSerializableType public bool $known; /** - * @var ?int $bits + * @var ?PdfPermissionFlags $flags */ - #[JsonProperty('bits')] - public ?int $bits; + #[JsonProperty('flags')] + public ?PdfPermissionFlags $flags; /** * @var ?bool $allAllowed @@ -26,7 +26,7 @@ class DocHead200ResponsePermissions extends JsonSerializableType public ?bool $allAllowed; /** - * @var ?value-of $openedAs + * @var ?value-of $openedAs */ #[JsonProperty('openedAs')] public ?string $openedAs; @@ -47,9 +47,9 @@ class DocHead200ResponsePermissions extends JsonSerializableType * @param array{ * known: bool, * canUpgradeToOwner: bool, - * bits?: ?int, + * flags?: ?PdfPermissionFlags, * allAllowed?: ?bool, - * openedAs?: ?value-of, + * openedAs?: ?value-of, * securityHandlerRevision?: ?int, * } $values */ @@ -57,7 +57,7 @@ public function __construct( array $values, ) { $this->known = $values['known']; - $this->bits = $values['bits'] ?? null; + $this->flags = $values['flags'] ?? null; $this->allAllowed = $values['allAllowed'] ?? null; $this->openedAs = $values['openedAs'] ?? null; $this->securityHandlerRevision = $values['securityHandlerRevision'] ?? null; diff --git a/src/Types/DocHead200ResponsePermissionsOpenedAs.php b/src/Types/DocHeadResponsePermissionsOpenedAs.php similarity index 68% rename from src/Types/DocHead200ResponsePermissionsOpenedAs.php rename to src/Types/DocHeadResponsePermissionsOpenedAs.php index f4195ec2..57c7dcd7 100644 --- a/src/Types/DocHead200ResponsePermissionsOpenedAs.php +++ b/src/Types/DocHeadResponsePermissionsOpenedAs.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocHead200ResponsePermissionsOpenedAs: string +enum DocHeadResponsePermissionsOpenedAs: string { case None = "none"; case User = "user"; diff --git a/src/Types/DocHead200ResponseState.php b/src/Types/DocHeadResponseState.php similarity index 80% rename from src/Types/DocHead200ResponseState.php rename to src/Types/DocHeadResponseState.php index 83ae72fd..cc4fa189 100644 --- a/src/Types/DocHead200ResponseState.php +++ b/src/Types/DocHeadResponseState.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocHead200ResponseState: string +enum DocHeadResponseState: string { case Pending = "pending"; case Ready = "ready"; diff --git a/src/Types/DocManifest200ResponseProtectionFieldLocksItemSpec.php b/src/Types/DocManifest200ResponseProtectionFieldLocksItemSpec.php deleted file mode 100644 index a468e919..00000000 --- a/src/Types/DocManifest200ResponseProtectionFieldLocksItemSpec.php +++ /dev/null @@ -1,51 +0,0 @@ - $action - */ - #[JsonProperty('action')] - public string $action; - - /** - * @var array $fields - */ - #[JsonProperty('fields'), ArrayType(['string'])] - public array $fields; - - /** - * @var ?float $permission - */ - #[JsonProperty('permission')] - public ?float $permission; - - /** - * @param array{ - * action: value-of, - * fields: array, - * permission?: ?float, - * } $values - */ - public function __construct( - array $values, - ) { - $this->action = $values['action']; - $this->fields = $values['fields']; - $this->permission = $values['permission'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/DocManifest200ResponseProtectionFieldLocksItemSpecAction.php b/src/Types/DocManifest200ResponseProtectionFieldLocksItemSpecAction.php deleted file mode 100644 index 0b83cdeb..00000000 --- a/src/Types/DocManifest200ResponseProtectionFieldLocksItemSpecAction.php +++ /dev/null @@ -1,10 +0,0 @@ - $pages + * @var array $pages */ - #[JsonProperty('pages'), ArrayType([DocManifest200ResponsePagesItem::class])] + #[JsonProperty('pages'), ArrayType([DocManifestResponsePagesItem::class])] public array $pages; /** @@ -121,21 +121,21 @@ class DocManifest200Response extends JsonSerializableType * docVersion: int, * layoutVersion: int, * metadataVersion: int, - * serverFonts: string, * auditHead: int, - * baseSha: string, - * pages: array, + * baseSha256: string, + * pages: array, * actionsVersion?: ?int, * attachmentsVersion?: ?int, * annotationsVersion?: ?int, * formsVersion?: ?int, * outlineVersion?: ?int, * fontsVersion?: ?int, + * contentsVersion?: ?int, * layerVersion?: ?int, * working?: ?bool, - * baseByteLength?: ?int, - * scopes?: ?DocManifest200ResponseScopes, - * protection?: ?DocManifest200ResponseProtection, + * baseSizeBytes?: ?int, + * scopes?: ?DocManifestResponseScopes, + * protection?: ?DocManifestResponseProtection, * } $values */ public function __construct( @@ -150,12 +150,12 @@ public function __construct( $this->formsVersion = $values['formsVersion'] ?? null; $this->outlineVersion = $values['outlineVersion'] ?? null; $this->fontsVersion = $values['fontsVersion'] ?? null; - $this->serverFonts = $values['serverFonts']; + $this->contentsVersion = $values['contentsVersion'] ?? null; $this->auditHead = $values['auditHead']; - $this->baseSha = $values['baseSha']; + $this->baseSha256 = $values['baseSha256']; $this->layerVersion = $values['layerVersion'] ?? null; $this->working = $values['working'] ?? null; - $this->baseByteLength = $values['baseByteLength'] ?? null; + $this->baseSizeBytes = $values['baseSizeBytes'] ?? null; $this->scopes = $values['scopes'] ?? null; $this->protection = $values['protection'] ?? null; $this->pages = $values['pages']; diff --git a/src/Types/DocManifest200ResponsePagesItem.php b/src/Types/DocManifestResponsePagesItem.php similarity index 72% rename from src/Types/DocManifest200ResponsePagesItem.php rename to src/Types/DocManifestResponsePagesItem.php index 4e0cc8fc..4663d0dc 100644 --- a/src/Types/DocManifest200ResponsePagesItem.php +++ b/src/Types/DocManifestResponsePagesItem.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocManifest200ResponsePagesItem extends JsonSerializableType +class DocManifestResponsePagesItem extends JsonSerializableType { /** * @var PageRef $page @@ -14,15 +14,15 @@ class DocManifest200ResponsePagesItem extends JsonSerializableType public PageRef $page; /** - * @var DocManifest200ResponsePagesItemCache $cache + * @var DocManifestResponsePagesItemCache $cache */ #[JsonProperty('cache')] - public DocManifest200ResponsePagesItemCache $cache; + public DocManifestResponsePagesItemCache $cache; /** * @param array{ * page: PageRef, - * cache: DocManifest200ResponsePagesItemCache, + * cache: DocManifestResponsePagesItemCache, * } $values */ public function __construct( diff --git a/src/Types/DocManifest200ResponsePagesItemCache.php b/src/Types/DocManifestResponsePagesItemCache.php similarity index 93% rename from src/Types/DocManifest200ResponsePagesItemCache.php rename to src/Types/DocManifestResponsePagesItemCache.php index 79b7ad38..87f59be7 100644 --- a/src/Types/DocManifest200ResponsePagesItemCache.php +++ b/src/Types/DocManifestResponsePagesItemCache.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocManifest200ResponsePagesItemCache extends JsonSerializableType +class DocManifestResponsePagesItemCache extends JsonSerializableType { /** * @var int $contentVersion diff --git a/src/Types/DocManifest200ResponseProtection.php b/src/Types/DocManifestResponseProtection.php similarity index 56% rename from src/Types/DocManifest200ResponseProtection.php rename to src/Types/DocManifestResponseProtection.php index 9f37dd7b..ed70a301 100644 --- a/src/Types/DocManifest200ResponseProtection.php +++ b/src/Types/DocManifestResponseProtection.php @@ -6,30 +6,30 @@ use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; -class DocManifest200ResponseProtection extends JsonSerializableType +class DocManifestResponseProtection extends JsonSerializableType { /** - * @var ?value-of $enforced + * @var ?value-of $enforced */ #[JsonProperty('enforced')] public ?string $enforced; /** - * @var ?value-of $judged + * @var ?value-of $judged */ #[JsonProperty('judged')] public ?string $judged; /** - * @var ?DocManifest200ResponseProtectionCertification $certification + * @var ?DocManifestResponseProtectionCertification $certification */ #[JsonProperty('certification')] - public ?DocManifest200ResponseProtectionCertification $certification; + public ?DocManifestResponseProtectionCertification $certification; /** - * @var array $fieldLocks + * @var array $fieldLocks */ - #[JsonProperty('fieldLocks'), ArrayType([DocManifest200ResponseProtectionFieldLocksItem::class])] + #[JsonProperty('fieldLocks'), ArrayType([DocManifestResponseProtectionFieldLocksItem::class])] public array $fieldLocks; /** @@ -40,11 +40,11 @@ class DocManifest200ResponseProtection extends JsonSerializableType /** * @param array{ - * fieldLocks: array, + * fieldLocks: array, * policyVersion: int, - * enforced?: ?value-of, - * judged?: ?value-of, - * certification?: ?DocManifest200ResponseProtectionCertification, + * enforced?: ?value-of, + * judged?: ?value-of, + * certification?: ?DocManifestResponseProtectionCertification, * } $values */ public function __construct( diff --git a/src/Types/DocManifest200ResponseProtectionCertification.php b/src/Types/DocManifestResponseProtectionCertification.php similarity index 80% rename from src/Types/DocManifest200ResponseProtectionCertification.php rename to src/Types/DocManifestResponseProtectionCertification.php index 25194bbe..e1f3023c 100644 --- a/src/Types/DocManifest200ResponseProtectionCertification.php +++ b/src/Types/DocManifestResponseProtectionCertification.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocManifest200ResponseProtectionCertification extends JsonSerializableType +class DocManifestResponseProtectionCertification extends JsonSerializableType { /** * @var int $signatureIndex @@ -14,15 +14,15 @@ class DocManifest200ResponseProtectionCertification extends JsonSerializableType public int $signatureIndex; /** - * @var float $permission + * @var int $permission */ #[JsonProperty('permission')] - public float $permission; + public int $permission; /** * @param array{ * signatureIndex: int, - * permission: float, + * permission: int, * } $values */ public function __construct( diff --git a/src/Types/DocManifest200ResponseProtectionJudged.php b/src/Types/DocManifestResponseProtectionEnforced.php similarity index 72% rename from src/Types/DocManifest200ResponseProtectionJudged.php rename to src/Types/DocManifestResponseProtectionEnforced.php index def68617..9339bc46 100644 --- a/src/Types/DocManifest200ResponseProtectionJudged.php +++ b/src/Types/DocManifestResponseProtectionEnforced.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocManifest200ResponseProtectionJudged: string +enum DocManifestResponseProtectionEnforced: string { case None = "none"; case Lta = "lta"; diff --git a/src/Types/DocManifest200ResponseProtectionFieldLocksItem.php b/src/Types/DocManifestResponseProtectionFieldLocksItem.php similarity index 63% rename from src/Types/DocManifest200ResponseProtectionFieldLocksItem.php rename to src/Types/DocManifestResponseProtectionFieldLocksItem.php index 24004b54..9e72267a 100644 --- a/src/Types/DocManifest200ResponseProtectionFieldLocksItem.php +++ b/src/Types/DocManifestResponseProtectionFieldLocksItem.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocManifest200ResponseProtectionFieldLocksItem extends JsonSerializableType +class DocManifestResponseProtectionFieldLocksItem extends JsonSerializableType { /** * @var int $signatureIndex @@ -14,22 +14,22 @@ class DocManifest200ResponseProtectionFieldLocksItem extends JsonSerializableTyp public int $signatureIndex; /** - * @var value-of $source + * @var value-of $source */ #[JsonProperty('source')] public string $source; /** - * @var DocManifest200ResponseProtectionFieldLocksItemSpec $spec + * @var FieldLockSpec $spec */ #[JsonProperty('spec')] - public DocManifest200ResponseProtectionFieldLocksItemSpec $spec; + public FieldLockSpec $spec; /** * @param array{ * signatureIndex: int, - * source: value-of, - * spec: DocManifest200ResponseProtectionFieldLocksItemSpec, + * source: value-of, + * spec: FieldLockSpec, * } $values */ public function __construct( diff --git a/src/Types/DocManifest200ResponseProtectionFieldLocksItemSource.php b/src/Types/DocManifestResponseProtectionFieldLocksItemSource.php similarity index 58% rename from src/Types/DocManifest200ResponseProtectionFieldLocksItemSource.php rename to src/Types/DocManifestResponseProtectionFieldLocksItemSource.php index 01ca0075..3d2c8b99 100644 --- a/src/Types/DocManifest200ResponseProtectionFieldLocksItemSource.php +++ b/src/Types/DocManifestResponseProtectionFieldLocksItemSource.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocManifest200ResponseProtectionFieldLocksItemSource: string +enum DocManifestResponseProtectionFieldLocksItemSource: string { case Fieldmdp = "fieldmdp"; case Lock = "lock"; diff --git a/src/Types/DocManifest200ResponseProtectionEnforced.php b/src/Types/DocManifestResponseProtectionJudged.php similarity index 72% rename from src/Types/DocManifest200ResponseProtectionEnforced.php rename to src/Types/DocManifestResponseProtectionJudged.php index 1a629e6e..e62b0bb1 100644 --- a/src/Types/DocManifest200ResponseProtectionEnforced.php +++ b/src/Types/DocManifestResponseProtectionJudged.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocManifest200ResponseProtectionEnforced: string +enum DocManifestResponseProtectionJudged: string { case None = "none"; case Lta = "lta"; diff --git a/src/Types/DocManifest200ResponseScopes.php b/src/Types/DocManifestResponseScopes.php similarity index 54% rename from src/Types/DocManifest200ResponseScopes.php rename to src/Types/DocManifestResponseScopes.php index 4059e892..c149412f 100644 --- a/src/Types/DocManifest200ResponseScopes.php +++ b/src/Types/DocManifestResponseScopes.php @@ -5,66 +5,66 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocManifest200ResponseScopes extends JsonSerializableType +class DocManifestResponseScopes extends JsonSerializableType { /** - * @var value-of $content + * @var value-of $content */ #[JsonProperty('content')] public string $content; /** - * @var value-of $annotations + * @var value-of $annotations */ #[JsonProperty('annotations')] public string $annotations; /** - * @var value-of $forms + * @var value-of $forms */ #[JsonProperty('forms')] public string $forms; /** - * @var value-of $layout + * @var value-of $layout */ #[JsonProperty('layout')] public string $layout; /** - * @var value-of $attachments + * @var value-of $attachments */ #[JsonProperty('attachments')] public string $attachments; /** - * @var value-of $metadata + * @var value-of $metadata */ #[JsonProperty('metadata')] public string $metadata; /** - * @var value-of $actions + * @var value-of $actions */ #[JsonProperty('actions')] public string $actions; /** - * @var value-of $outline + * @var value-of $outline */ #[JsonProperty('outline')] public string $outline; /** * @param array{ - * content: value-of, - * annotations: value-of, - * forms: value-of, - * layout: value-of, - * attachments: value-of, - * metadata: value-of, - * actions: value-of, - * outline: value-of, + * content: value-of, + * annotations: value-of, + * forms: value-of, + * layout: value-of, + * attachments: value-of, + * metadata: value-of, + * actions: value-of, + * outline: value-of, * } $values */ public function __construct( diff --git a/src/Types/DocManifest200ResponseScopesForms.php b/src/Types/DocManifestResponseScopesActions.php similarity index 65% rename from src/Types/DocManifest200ResponseScopesForms.php rename to src/Types/DocManifestResponseScopesActions.php index 0370ab20..81d5ddbb 100644 --- a/src/Types/DocManifest200ResponseScopesForms.php +++ b/src/Types/DocManifestResponseScopesActions.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocManifest200ResponseScopesForms: string +enum DocManifestResponseScopesActions: string { case Base = "base"; case Layer = "layer"; diff --git a/src/Types/DocManifestResponseScopesAnnotations.php b/src/Types/DocManifestResponseScopesAnnotations.php new file mode 100644 index 00000000..8792b781 --- /dev/null +++ b/src/Types/DocManifestResponseScopesAnnotations.php @@ -0,0 +1,9 @@ + $pages @@ -15,15 +15,15 @@ class DocPagesFlatten200Response extends JsonSerializableType public array $pages; /** - * @var value-of $usage + * @var value-of $usage */ #[JsonProperty('usage')] public string $usage; /** - * @var array $results + * @var array $results */ - #[JsonProperty('results'), ArrayType([DocPagesFlatten200ResponseResultsItem::class])] + #[JsonProperty('results'), ArrayType([DocPagesFlattenResponseResultsItem::class])] public array $results; /** @@ -35,8 +35,8 @@ class DocPagesFlatten200Response extends JsonSerializableType /** * @param array{ * pages: array, - * usage: value-of, - * results: array, + * usage: value-of, + * results: array, * meta: MutationMeta, * } $values */ diff --git a/src/Types/DocPagesFlatten200ResponseResultsItem.php b/src/Types/DocPagesFlattenResponseResultsItem.php similarity index 74% rename from src/Types/DocPagesFlatten200ResponseResultsItem.php rename to src/Types/DocPagesFlattenResponseResultsItem.php index 07b73f92..738ad9d5 100644 --- a/src/Types/DocPagesFlatten200ResponseResultsItem.php +++ b/src/Types/DocPagesFlattenResponseResultsItem.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocPagesFlatten200ResponseResultsItem extends JsonSerializableType +class DocPagesFlattenResponseResultsItem extends JsonSerializableType { /** * @var PageRef $page @@ -14,7 +14,7 @@ class DocPagesFlatten200ResponseResultsItem extends JsonSerializableType public PageRef $page; /** - * @var value-of $status + * @var value-of $status */ #[JsonProperty('status')] public string $status; @@ -22,7 +22,7 @@ class DocPagesFlatten200ResponseResultsItem extends JsonSerializableType /** * @param array{ * page: PageRef, - * status: value-of, + * status: value-of, * } $values */ public function __construct( diff --git a/src/Types/DocPagesFlatten200ResponseResultsItemStatus.php b/src/Types/DocPagesFlattenResponseResultsItemStatus.php similarity index 64% rename from src/Types/DocPagesFlatten200ResponseResultsItemStatus.php rename to src/Types/DocPagesFlattenResponseResultsItemStatus.php index a0b79800..d7431adc 100644 --- a/src/Types/DocPagesFlatten200ResponseResultsItemStatus.php +++ b/src/Types/DocPagesFlattenResponseResultsItemStatus.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocPagesFlatten200ResponseResultsItemStatus: string +enum DocPagesFlattenResponseResultsItemStatus: string { case Applied = "applied"; case Unchanged = "unchanged"; diff --git a/src/Types/DocPagesFlatten200ResponseUsage.php b/src/Types/DocPagesFlattenResponseUsage.php similarity index 67% rename from src/Types/DocPagesFlatten200ResponseUsage.php rename to src/Types/DocPagesFlattenResponseUsage.php index 9b0dc861..a859ddab 100644 --- a/src/Types/DocPagesFlatten200ResponseUsage.php +++ b/src/Types/DocPagesFlattenResponseUsage.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocPagesFlatten200ResponseUsage: string +enum DocPagesFlattenResponseUsage: string { case Display = "display"; case Print_ = "print"; diff --git a/src/Types/DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetDangling.php b/src/Types/DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetDangling.php deleted file mode 100644 index dd7909fd..00000000 --- a/src/Types/DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetDangling.php +++ /dev/null @@ -1,26 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/DocPagesRemoveName200ResponseLayoutPagesItemBoxes.php b/src/Types/DocPagesRemoveName200ResponseLayoutPagesItemBoxes.php deleted file mode 100644 index 62242665..00000000 --- a/src/Types/DocPagesRemoveName200ResponseLayoutPagesItemBoxes.php +++ /dev/null @@ -1,66 +0,0 @@ -media = $values['media']; - $this->crop = $values['crop']; - $this->bleed = $values['bleed']; - $this->trim = $values['trim']; - $this->art = $values['art']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/DocPagesRemoveName200ResponseLayoutPagesItemBoxesArt.php b/src/Types/DocPagesRemoveName200ResponseLayoutPagesItemBoxesArt.php deleted file mode 100644 index 0798814c..00000000 --- a/src/Types/DocPagesRemoveName200ResponseLayoutPagesItemBoxesArt.php +++ /dev/null @@ -1,58 +0,0 @@ -x = $values['x']; - $this->y = $values['y']; - $this->width = $values['width']; - $this->height = $values['height']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/DocPagesRemoveName200ResponseLayoutPagesItemBoxesBleed.php b/src/Types/DocPagesRemoveName200ResponseLayoutPagesItemBoxesBleed.php deleted file mode 100644 index d512453b..00000000 --- a/src/Types/DocPagesRemoveName200ResponseLayoutPagesItemBoxesBleed.php +++ /dev/null @@ -1,58 +0,0 @@ -x = $values['x']; - $this->y = $values['y']; - $this->width = $values['width']; - $this->height = $values['height']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/DocPagesRemoveName200ResponseLayoutPagesItemBoxesCrop.php b/src/Types/DocPagesRemoveName200ResponseLayoutPagesItemBoxesCrop.php deleted file mode 100644 index ef410951..00000000 --- a/src/Types/DocPagesRemoveName200ResponseLayoutPagesItemBoxesCrop.php +++ /dev/null @@ -1,58 +0,0 @@ -x = $values['x']; - $this->y = $values['y']; - $this->width = $values['width']; - $this->height = $values['height']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/DocPagesRemoveName200ResponseLayoutPagesItemBoxesMedia.php b/src/Types/DocPagesRemoveName200ResponseLayoutPagesItemBoxesMedia.php deleted file mode 100644 index f58a35ba..00000000 --- a/src/Types/DocPagesRemoveName200ResponseLayoutPagesItemBoxesMedia.php +++ /dev/null @@ -1,58 +0,0 @@ -x = $values['x']; - $this->y = $values['y']; - $this->width = $values['width']; - $this->height = $values['height']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/DocPagesRemoveName200ResponseLayoutPagesItemBoxesTrim.php b/src/Types/DocPagesRemoveName200ResponseLayoutPagesItemBoxesTrim.php deleted file mode 100644 index f2afa564..00000000 --- a/src/Types/DocPagesRemoveName200ResponseLayoutPagesItemBoxesTrim.php +++ /dev/null @@ -1,58 +0,0 @@ -x = $values['x']; - $this->y = $values['y']; - $this->width = $values['width']; - $this->height = $values['height']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/DocPagesSetName200Response.php b/src/Types/DocPagesRemoveNameResponse.php similarity index 74% rename from src/Types/DocPagesSetName200Response.php rename to src/Types/DocPagesRemoveNameResponse.php index 15ae52b2..02e72b40 100644 --- a/src/Types/DocPagesSetName200Response.php +++ b/src/Types/DocPagesRemoveNameResponse.php @@ -5,13 +5,13 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocPagesSetName200Response extends JsonSerializableType +class DocPagesRemoveNameResponse extends JsonSerializableType { /** - * @var DocPagesSetName200ResponseLayout $layout + * @var DocPagesRemoveNameResponseLayout $layout */ #[JsonProperty('layout')] - public DocPagesSetName200ResponseLayout $layout; + public DocPagesRemoveNameResponseLayout $layout; /** * @var MutationMeta $meta @@ -21,7 +21,7 @@ class DocPagesSetName200Response extends JsonSerializableType /** * @param array{ - * layout: DocPagesSetName200ResponseLayout, + * layout: DocPagesRemoveNameResponseLayout, * meta: MutationMeta, * } $values */ diff --git a/src/Types/DocPagesSetName200ResponseLayout.php b/src/Types/DocPagesRemoveNameResponseLayout.php similarity index 60% rename from src/Types/DocPagesSetName200ResponseLayout.php rename to src/Types/DocPagesRemoveNameResponseLayout.php index 8897a0dd..a31f140f 100644 --- a/src/Types/DocPagesSetName200ResponseLayout.php +++ b/src/Types/DocPagesRemoveNameResponseLayout.php @@ -6,7 +6,7 @@ use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; -class DocPagesSetName200ResponseLayout extends JsonSerializableType +class DocPagesRemoveNameResponseLayout extends JsonSerializableType { /** * @var int $pageCount @@ -15,29 +15,29 @@ class DocPagesSetName200ResponseLayout extends JsonSerializableType public int $pageCount; /** - * @var array $pages + * @var array $pages */ - #[JsonProperty('pages'), ArrayType([DocPagesSetName200ResponseLayoutPagesItem::class])] + #[JsonProperty('pages'), ArrayType([DocPagesRemoveNameResponseLayoutPagesItem::class])] public array $pages; /** - * @var array $labels + * @var array $labels */ - #[JsonProperty('labels'), ArrayType([DocPagesSetName200ResponseLayoutLabelsItem::class])] + #[JsonProperty('labels'), ArrayType([DocPagesRemoveNameResponseLayoutLabelsItem::class])] public array $labels; /** - * @var array $namedPages + * @var array $namedPages */ - #[JsonProperty('namedPages'), ArrayType([DocPagesSetName200ResponseLayoutNamedPagesItem::class])] + #[JsonProperty('namedPages'), ArrayType([DocPagesRemoveNameResponseLayoutNamedPagesItem::class])] public array $namedPages; /** * @param array{ * pageCount: int, - * pages: array, - * labels: array, - * namedPages: array, + * pages: array, + * labels: array, + * namedPages: array, * } $values */ public function __construct( diff --git a/src/Types/DocPagesSetName200ResponseLayoutLabelsItem.php b/src/Types/DocPagesRemoveNameResponseLayoutLabelsItem.php similarity index 84% rename from src/Types/DocPagesSetName200ResponseLayoutLabelsItem.php rename to src/Types/DocPagesRemoveNameResponseLayoutLabelsItem.php index 06d03ae1..bcb59369 100644 --- a/src/Types/DocPagesSetName200ResponseLayoutLabelsItem.php +++ b/src/Types/DocPagesRemoveNameResponseLayoutLabelsItem.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocPagesSetName200ResponseLayoutLabelsItem extends JsonSerializableType +class DocPagesRemoveNameResponseLayoutLabelsItem extends JsonSerializableType { /** * @var int $firstPage @@ -14,7 +14,7 @@ class DocPagesSetName200ResponseLayoutLabelsItem extends JsonSerializableType public int $firstPage; /** - * @var ?value-of $style + * @var ?value-of $style */ #[JsonProperty('style')] public ?string $style; @@ -36,7 +36,7 @@ class DocPagesSetName200ResponseLayoutLabelsItem extends JsonSerializableType * firstPage: int, * firstNumber: int, * prefix: string, - * style?: ?value-of, + * style?: ?value-of, * } $values */ public function __construct( diff --git a/src/Types/DocPagesSetName200ResponseLayoutLabelsItemStyle.php b/src/Types/DocPagesRemoveNameResponseLayoutLabelsItemStyle.php similarity index 78% rename from src/Types/DocPagesSetName200ResponseLayoutLabelsItemStyle.php rename to src/Types/DocPagesRemoveNameResponseLayoutLabelsItemStyle.php index 73bb0ece..a6344cd3 100644 --- a/src/Types/DocPagesSetName200ResponseLayoutLabelsItemStyle.php +++ b/src/Types/DocPagesRemoveNameResponseLayoutLabelsItemStyle.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocPagesSetName200ResponseLayoutLabelsItemStyle: string +enum DocPagesRemoveNameResponseLayoutLabelsItemStyle: string { case Decimal = "decimal"; case UpperRoman = "upperRoman"; diff --git a/src/Types/DocPagesSetName200ResponseLayoutNamedPagesItem.php b/src/Types/DocPagesRemoveNameResponseLayoutNamedPagesItem.php similarity index 72% rename from src/Types/DocPagesSetName200ResponseLayoutNamedPagesItem.php rename to src/Types/DocPagesRemoveNameResponseLayoutNamedPagesItem.php index 889fafec..8624e558 100644 --- a/src/Types/DocPagesSetName200ResponseLayoutNamedPagesItem.php +++ b/src/Types/DocPagesRemoveNameResponseLayoutNamedPagesItem.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocPagesSetName200ResponseLayoutNamedPagesItem extends JsonSerializableType +class DocPagesRemoveNameResponseLayoutNamedPagesItem extends JsonSerializableType { /** * @var string $name @@ -14,15 +14,15 @@ class DocPagesSetName200ResponseLayoutNamedPagesItem extends JsonSerializableTyp public string $name; /** - * @var DocPagesSetName200ResponseLayoutNamedPagesItemTarget $target + * @var DocPagesRemoveNameResponseLayoutNamedPagesItemTarget $target */ #[JsonProperty('target')] - public DocPagesSetName200ResponseLayoutNamedPagesItemTarget $target; + public DocPagesRemoveNameResponseLayoutNamedPagesItemTarget $target; /** * @param array{ * name: string, - * target: DocPagesSetName200ResponseLayoutNamedPagesItemTarget, + * target: DocPagesRemoveNameResponseLayoutNamedPagesItemTarget, * } $values */ public function __construct( diff --git a/src/Types/DocPagesSetName200ResponseLayoutNamedPagesItemTarget.php b/src/Types/DocPagesRemoveNameResponseLayoutNamedPagesItemTarget.php similarity index 69% rename from src/Types/DocPagesSetName200ResponseLayoutNamedPagesItemTarget.php rename to src/Types/DocPagesRemoveNameResponseLayoutNamedPagesItemTarget.php index d4d82c52..ecea2277 100644 --- a/src/Types/DocPagesSetName200ResponseLayoutNamedPagesItemTarget.php +++ b/src/Types/DocPagesRemoveNameResponseLayoutNamedPagesItemTarget.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use Exception; -class DocPagesSetName200ResponseLayoutNamedPagesItemTarget extends JsonSerializableType +class DocPagesRemoveNameResponseLayoutNamedPagesItemTarget extends JsonSerializableType { /** * @var ( @@ -19,9 +19,9 @@ class DocPagesSetName200ResponseLayoutNamedPagesItemTarget extends JsonSerializa /** * @var ( - * DocPagesSetName200ResponseLayoutNamedPagesItemTargetPage - * |DocPagesSetName200ResponseLayoutNamedPagesItemTargetTemplate - * |DocPagesSetName200ResponseLayoutNamedPagesItemTargetDangling + * DocPagesRemoveNameResponseLayoutNamedPagesItemTargetPage + * |DocPagesRemoveNameResponseLayoutNamedPagesItemTargetTemplate + * |DocPagesRemoveNameResponseLayoutNamedPagesItemTargetDangling * |mixed * ) $value */ @@ -36,9 +36,9 @@ class DocPagesSetName200ResponseLayoutNamedPagesItemTarget extends JsonSerializa * |'_unknown' * ), * value: ( - * DocPagesSetName200ResponseLayoutNamedPagesItemTargetPage - * |DocPagesSetName200ResponseLayoutNamedPagesItemTargetTemplate - * |DocPagesSetName200ResponseLayoutNamedPagesItemTargetDangling + * DocPagesRemoveNameResponseLayoutNamedPagesItemTargetPage + * |DocPagesRemoveNameResponseLayoutNamedPagesItemTargetTemplate + * |DocPagesRemoveNameResponseLayoutNamedPagesItemTargetDangling * |mixed * ), * } $values @@ -51,36 +51,36 @@ private function __construct( } /** - * @param DocPagesSetName200ResponseLayoutNamedPagesItemTargetPage $page - * @return DocPagesSetName200ResponseLayoutNamedPagesItemTarget + * @param DocPagesRemoveNameResponseLayoutNamedPagesItemTargetPage $page + * @return DocPagesRemoveNameResponseLayoutNamedPagesItemTarget */ - public static function page(DocPagesSetName200ResponseLayoutNamedPagesItemTargetPage $page): DocPagesSetName200ResponseLayoutNamedPagesItemTarget + public static function page(DocPagesRemoveNameResponseLayoutNamedPagesItemTargetPage $page): DocPagesRemoveNameResponseLayoutNamedPagesItemTarget { - return new DocPagesSetName200ResponseLayoutNamedPagesItemTarget([ + return new DocPagesRemoveNameResponseLayoutNamedPagesItemTarget([ 'kind' => 'page', 'value' => $page, ]); } /** - * @param DocPagesSetName200ResponseLayoutNamedPagesItemTargetTemplate $template - * @return DocPagesSetName200ResponseLayoutNamedPagesItemTarget + * @param DocPagesRemoveNameResponseLayoutNamedPagesItemTargetTemplate $template + * @return DocPagesRemoveNameResponseLayoutNamedPagesItemTarget */ - public static function template(DocPagesSetName200ResponseLayoutNamedPagesItemTargetTemplate $template): DocPagesSetName200ResponseLayoutNamedPagesItemTarget + public static function template(DocPagesRemoveNameResponseLayoutNamedPagesItemTargetTemplate $template): DocPagesRemoveNameResponseLayoutNamedPagesItemTarget { - return new DocPagesSetName200ResponseLayoutNamedPagesItemTarget([ + return new DocPagesRemoveNameResponseLayoutNamedPagesItemTarget([ 'kind' => 'template', 'value' => $template, ]); } /** - * @param DocPagesSetName200ResponseLayoutNamedPagesItemTargetDangling $dangling - * @return DocPagesSetName200ResponseLayoutNamedPagesItemTarget + * @param DocPagesRemoveNameResponseLayoutNamedPagesItemTargetDangling $dangling + * @return DocPagesRemoveNameResponseLayoutNamedPagesItemTarget */ - public static function dangling(DocPagesSetName200ResponseLayoutNamedPagesItemTargetDangling $dangling): DocPagesSetName200ResponseLayoutNamedPagesItemTarget + public static function dangling(DocPagesRemoveNameResponseLayoutNamedPagesItemTargetDangling $dangling): DocPagesRemoveNameResponseLayoutNamedPagesItemTarget { - return new DocPagesSetName200ResponseLayoutNamedPagesItemTarget([ + return new DocPagesRemoveNameResponseLayoutNamedPagesItemTarget([ 'kind' => 'dangling', 'value' => $dangling, ]); @@ -91,15 +91,15 @@ public static function dangling(DocPagesSetName200ResponseLayoutNamedPagesItemTa */ public function isPage(): bool { - return $this->value instanceof DocPagesSetName200ResponseLayoutNamedPagesItemTargetPage && $this->kind === 'page'; + return $this->value instanceof DocPagesRemoveNameResponseLayoutNamedPagesItemTargetPage && $this->kind === 'page'; } /** - * @return DocPagesSetName200ResponseLayoutNamedPagesItemTargetPage + * @return DocPagesRemoveNameResponseLayoutNamedPagesItemTargetPage */ - public function asPage(): DocPagesSetName200ResponseLayoutNamedPagesItemTargetPage + public function asPage(): DocPagesRemoveNameResponseLayoutNamedPagesItemTargetPage { - if (!($this->value instanceof DocPagesSetName200ResponseLayoutNamedPagesItemTargetPage && $this->kind === 'page')) { + if (!($this->value instanceof DocPagesRemoveNameResponseLayoutNamedPagesItemTargetPage && $this->kind === 'page')) { throw new Exception( "Expected page; got " . $this->kind . " with value of type " . get_debug_type($this->value), ); @@ -113,15 +113,15 @@ public function asPage(): DocPagesSetName200ResponseLayoutNamedPagesItemTargetPa */ public function isTemplate(): bool { - return $this->value instanceof DocPagesSetName200ResponseLayoutNamedPagesItemTargetTemplate && $this->kind === 'template'; + return $this->value instanceof DocPagesRemoveNameResponseLayoutNamedPagesItemTargetTemplate && $this->kind === 'template'; } /** - * @return DocPagesSetName200ResponseLayoutNamedPagesItemTargetTemplate + * @return DocPagesRemoveNameResponseLayoutNamedPagesItemTargetTemplate */ - public function asTemplate(): DocPagesSetName200ResponseLayoutNamedPagesItemTargetTemplate + public function asTemplate(): DocPagesRemoveNameResponseLayoutNamedPagesItemTargetTemplate { - if (!($this->value instanceof DocPagesSetName200ResponseLayoutNamedPagesItemTargetTemplate && $this->kind === 'template')) { + if (!($this->value instanceof DocPagesRemoveNameResponseLayoutNamedPagesItemTargetTemplate && $this->kind === 'template')) { throw new Exception( "Expected template; got " . $this->kind . " with value of type " . get_debug_type($this->value), ); @@ -135,15 +135,15 @@ public function asTemplate(): DocPagesSetName200ResponseLayoutNamedPagesItemTarg */ public function isDangling(): bool { - return $this->value instanceof DocPagesSetName200ResponseLayoutNamedPagesItemTargetDangling && $this->kind === 'dangling'; + return $this->value instanceof DocPagesRemoveNameResponseLayoutNamedPagesItemTargetDangling && $this->kind === 'dangling'; } /** - * @return DocPagesSetName200ResponseLayoutNamedPagesItemTargetDangling + * @return DocPagesRemoveNameResponseLayoutNamedPagesItemTargetDangling */ - public function asDangling(): DocPagesSetName200ResponseLayoutNamedPagesItemTargetDangling + public function asDangling(): DocPagesRemoveNameResponseLayoutNamedPagesItemTargetDangling { - if (!($this->value instanceof DocPagesSetName200ResponseLayoutNamedPagesItemTargetDangling && $this->kind === 'dangling')) { + if (!($this->value instanceof DocPagesRemoveNameResponseLayoutNamedPagesItemTargetDangling && $this->kind === 'dangling')) { throw new Exception( "Expected dangling; got " . $this->kind . " with value of type " . get_debug_type($this->value), ); @@ -221,13 +221,13 @@ public static function jsonDeserialize(array $data): static $args['kind'] = $kind; switch ($kind) { case 'page': - $args['value'] = DocPagesSetName200ResponseLayoutNamedPagesItemTargetPage::jsonDeserialize($data); + $args['value'] = DocPagesRemoveNameResponseLayoutNamedPagesItemTargetPage::jsonDeserialize($data); break; case 'template': - $args['value'] = DocPagesSetName200ResponseLayoutNamedPagesItemTargetTemplate::jsonDeserialize($data); + $args['value'] = DocPagesRemoveNameResponseLayoutNamedPagesItemTargetTemplate::jsonDeserialize($data); break; case 'dangling': - $args['value'] = DocPagesSetName200ResponseLayoutNamedPagesItemTargetDangling::jsonDeserialize($data); + $args['value'] = DocPagesRemoveNameResponseLayoutNamedPagesItemTargetDangling::jsonDeserialize($data); break; case '_unknown': default: diff --git a/src/Types/DocPagesSetName200ResponseLayoutNamedPagesItemTargetDangling.php b/src/Types/DocPagesRemoveNameResponseLayoutNamedPagesItemTargetDangling.php similarity index 85% rename from src/Types/DocPagesSetName200ResponseLayoutNamedPagesItemTargetDangling.php rename to src/Types/DocPagesRemoveNameResponseLayoutNamedPagesItemTargetDangling.php index 37025f40..beac77f3 100644 --- a/src/Types/DocPagesSetName200ResponseLayoutNamedPagesItemTargetDangling.php +++ b/src/Types/DocPagesRemoveNameResponseLayoutNamedPagesItemTargetDangling.php @@ -4,7 +4,7 @@ use CloudPDF\Core\Json\JsonSerializableType; -class DocPagesSetName200ResponseLayoutNamedPagesItemTargetDangling extends JsonSerializableType +class DocPagesRemoveNameResponseLayoutNamedPagesItemTargetDangling extends JsonSerializableType { /** * @param array{ diff --git a/src/Types/DocPagesSetName200ResponseLayoutNamedPagesItemTargetPage.php b/src/Types/DocPagesRemoveNameResponseLayoutNamedPagesItemTargetPage.php similarity index 89% rename from src/Types/DocPagesSetName200ResponseLayoutNamedPagesItemTargetPage.php rename to src/Types/DocPagesRemoveNameResponseLayoutNamedPagesItemTargetPage.php index 3f680a69..9dfc12e9 100644 --- a/src/Types/DocPagesSetName200ResponseLayoutNamedPagesItemTargetPage.php +++ b/src/Types/DocPagesRemoveNameResponseLayoutNamedPagesItemTargetPage.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocPagesSetName200ResponseLayoutNamedPagesItemTargetPage extends JsonSerializableType +class DocPagesRemoveNameResponseLayoutNamedPagesItemTargetPage extends JsonSerializableType { /** * @var PageRef $page diff --git a/src/Types/DocPagesSetName200ResponseLayoutNamedPagesItemTargetTemplate.php b/src/Types/DocPagesRemoveNameResponseLayoutNamedPagesItemTargetTemplate.php similarity index 90% rename from src/Types/DocPagesSetName200ResponseLayoutNamedPagesItemTargetTemplate.php rename to src/Types/DocPagesRemoveNameResponseLayoutNamedPagesItemTargetTemplate.php index b1046cad..2cbd4fcc 100644 --- a/src/Types/DocPagesSetName200ResponseLayoutNamedPagesItemTargetTemplate.php +++ b/src/Types/DocPagesRemoveNameResponseLayoutNamedPagesItemTargetTemplate.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocPagesSetName200ResponseLayoutNamedPagesItemTargetTemplate extends JsonSerializableType +class DocPagesRemoveNameResponseLayoutNamedPagesItemTargetTemplate extends JsonSerializableType { /** * @var int $objectNumber diff --git a/src/Types/DocPagesSetName200ResponseLayoutPagesItem.php b/src/Types/DocPagesRemoveNameResponseLayoutPagesItem.php similarity index 68% rename from src/Types/DocPagesSetName200ResponseLayoutPagesItem.php rename to src/Types/DocPagesRemoveNameResponseLayoutPagesItem.php index 4a8d27fa..ace5c75b 100644 --- a/src/Types/DocPagesSetName200ResponseLayoutPagesItem.php +++ b/src/Types/DocPagesRemoveNameResponseLayoutPagesItem.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocPagesSetName200ResponseLayoutPagesItem extends JsonSerializableType +class DocPagesRemoveNameResponseLayoutPagesItem extends JsonSerializableType { /** * @var int $index @@ -26,16 +26,16 @@ class DocPagesSetName200ResponseLayoutPagesItem extends JsonSerializableType public ?string $label; /** - * @var DocPagesSetName200ResponseLayoutPagesItemSize $size + * @var DocPagesRemoveNameResponseLayoutPagesItemSize $size */ #[JsonProperty('size')] - public DocPagesSetName200ResponseLayoutPagesItemSize $size; + public DocPagesRemoveNameResponseLayoutPagesItemSize $size; /** - * @var float $rotation + * @var int $rotation */ #[JsonProperty('rotation')] - public float $rotation; + public int $rotation; /** * @var float $userUnit @@ -44,22 +44,22 @@ class DocPagesSetName200ResponseLayoutPagesItem extends JsonSerializableType public float $userUnit; /** - * @var ?value-of $tabOrder + * @var ?value-of $tabOrder */ #[JsonProperty('tabOrder')] public ?string $tabOrder; /** - * @var DocPagesSetName200ResponseLayoutPagesItemBoxes $boxes + * @var DocPagesRemoveNameResponseLayoutPagesItemBoxes $boxes */ #[JsonProperty('boxes')] - public DocPagesSetName200ResponseLayoutPagesItemBoxes $boxes; + public DocPagesRemoveNameResponseLayoutPagesItemBoxes $boxes; /** - * @var DocPagesSetName200ResponseLayoutPagesItemPdfCropBox $pdfCropBox + * @var DocPagesRemoveNameResponseLayoutPagesItemPdfCropBox $pdfCropBox */ #[JsonProperty('pdfCropBox')] - public DocPagesSetName200ResponseLayoutPagesItemPdfCropBox $pdfCropBox; + public DocPagesRemoveNameResponseLayoutPagesItemPdfCropBox $pdfCropBox; /** * @var ?PdfPageActions $actions @@ -71,13 +71,13 @@ class DocPagesSetName200ResponseLayoutPagesItem extends JsonSerializableType * @param array{ * index: int, * ref: PageRef, - * size: DocPagesSetName200ResponseLayoutPagesItemSize, - * rotation: float, + * size: DocPagesRemoveNameResponseLayoutPagesItemSize, + * rotation: int, * userUnit: float, - * boxes: DocPagesSetName200ResponseLayoutPagesItemBoxes, - * pdfCropBox: DocPagesSetName200ResponseLayoutPagesItemPdfCropBox, + * boxes: DocPagesRemoveNameResponseLayoutPagesItemBoxes, + * pdfCropBox: DocPagesRemoveNameResponseLayoutPagesItemPdfCropBox, * label?: ?string, - * tabOrder?: ?value-of, + * tabOrder?: ?value-of, * actions?: ?PdfPageActions, * } $values */ diff --git a/src/Types/DocPagesRemoveNameResponseLayoutPagesItemBoxes.php b/src/Types/DocPagesRemoveNameResponseLayoutPagesItemBoxes.php new file mode 100644 index 00000000..e745bb08 --- /dev/null +++ b/src/Types/DocPagesRemoveNameResponseLayoutPagesItemBoxes.php @@ -0,0 +1,66 @@ +media = $values['media']; + $this->crop = $values['crop']; + $this->bleed = $values['bleed']; + $this->trim = $values['trim']; + $this->art = $values['art']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocPagesSetName200ResponseLayoutPagesItemBoxesArt.php b/src/Types/DocPagesRemoveNameResponseLayoutPagesItemBoxesArt.php similarity index 93% rename from src/Types/DocPagesSetName200ResponseLayoutPagesItemBoxesArt.php rename to src/Types/DocPagesRemoveNameResponseLayoutPagesItemBoxesArt.php index 2b7be2a7..c7f9b5a7 100644 --- a/src/Types/DocPagesSetName200ResponseLayoutPagesItemBoxesArt.php +++ b/src/Types/DocPagesRemoveNameResponseLayoutPagesItemBoxesArt.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocPagesSetName200ResponseLayoutPagesItemBoxesArt extends JsonSerializableType +class DocPagesRemoveNameResponseLayoutPagesItemBoxesArt extends JsonSerializableType { /** * @var float $x diff --git a/src/Types/DocPagesSetName200ResponseLayoutPagesItemBoxesBleed.php b/src/Types/DocPagesRemoveNameResponseLayoutPagesItemBoxesBleed.php similarity index 93% rename from src/Types/DocPagesSetName200ResponseLayoutPagesItemBoxesBleed.php rename to src/Types/DocPagesRemoveNameResponseLayoutPagesItemBoxesBleed.php index 2f32f7d3..75749b30 100644 --- a/src/Types/DocPagesSetName200ResponseLayoutPagesItemBoxesBleed.php +++ b/src/Types/DocPagesRemoveNameResponseLayoutPagesItemBoxesBleed.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocPagesSetName200ResponseLayoutPagesItemBoxesBleed extends JsonSerializableType +class DocPagesRemoveNameResponseLayoutPagesItemBoxesBleed extends JsonSerializableType { /** * @var float $x diff --git a/src/Types/DocPagesSetName200ResponseLayoutPagesItemBoxesTrim.php b/src/Types/DocPagesRemoveNameResponseLayoutPagesItemBoxesCrop.php similarity index 93% rename from src/Types/DocPagesSetName200ResponseLayoutPagesItemBoxesTrim.php rename to src/Types/DocPagesRemoveNameResponseLayoutPagesItemBoxesCrop.php index 350f1dc8..6e31d9d6 100644 --- a/src/Types/DocPagesSetName200ResponseLayoutPagesItemBoxesTrim.php +++ b/src/Types/DocPagesRemoveNameResponseLayoutPagesItemBoxesCrop.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocPagesSetName200ResponseLayoutPagesItemBoxesTrim extends JsonSerializableType +class DocPagesRemoveNameResponseLayoutPagesItemBoxesCrop extends JsonSerializableType { /** * @var float $x diff --git a/src/Types/DocPagesSetName200ResponseLayoutPagesItemBoxesMedia.php b/src/Types/DocPagesRemoveNameResponseLayoutPagesItemBoxesMedia.php similarity index 93% rename from src/Types/DocPagesSetName200ResponseLayoutPagesItemBoxesMedia.php rename to src/Types/DocPagesRemoveNameResponseLayoutPagesItemBoxesMedia.php index 691d5eef..a587f8d7 100644 --- a/src/Types/DocPagesSetName200ResponseLayoutPagesItemBoxesMedia.php +++ b/src/Types/DocPagesRemoveNameResponseLayoutPagesItemBoxesMedia.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocPagesSetName200ResponseLayoutPagesItemBoxesMedia extends JsonSerializableType +class DocPagesRemoveNameResponseLayoutPagesItemBoxesMedia extends JsonSerializableType { /** * @var float $x diff --git a/src/Types/DocPagesSetName200ResponseLayoutPagesItemBoxesCrop.php b/src/Types/DocPagesRemoveNameResponseLayoutPagesItemBoxesTrim.php similarity index 93% rename from src/Types/DocPagesSetName200ResponseLayoutPagesItemBoxesCrop.php rename to src/Types/DocPagesRemoveNameResponseLayoutPagesItemBoxesTrim.php index b976c4d9..30dffad0 100644 --- a/src/Types/DocPagesSetName200ResponseLayoutPagesItemBoxesCrop.php +++ b/src/Types/DocPagesRemoveNameResponseLayoutPagesItemBoxesTrim.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocPagesSetName200ResponseLayoutPagesItemBoxesCrop extends JsonSerializableType +class DocPagesRemoveNameResponseLayoutPagesItemBoxesTrim extends JsonSerializableType { /** * @var float $x diff --git a/src/Types/DocPagesSetName200ResponseLayoutPagesItemPdfCropBox.php b/src/Types/DocPagesRemoveNameResponseLayoutPagesItemPdfCropBox.php similarity index 94% rename from src/Types/DocPagesSetName200ResponseLayoutPagesItemPdfCropBox.php rename to src/Types/DocPagesRemoveNameResponseLayoutPagesItemPdfCropBox.php index 3bce983a..746af310 100644 --- a/src/Types/DocPagesSetName200ResponseLayoutPagesItemPdfCropBox.php +++ b/src/Types/DocPagesRemoveNameResponseLayoutPagesItemPdfCropBox.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocPagesSetName200ResponseLayoutPagesItemPdfCropBox extends JsonSerializableType +class DocPagesRemoveNameResponseLayoutPagesItemPdfCropBox extends JsonSerializableType { /** * @var float $left diff --git a/src/Types/DocPagesSetName200ResponseLayoutPagesItemSize.php b/src/Types/DocPagesRemoveNameResponseLayoutPagesItemSize.php similarity index 91% rename from src/Types/DocPagesSetName200ResponseLayoutPagesItemSize.php rename to src/Types/DocPagesRemoveNameResponseLayoutPagesItemSize.php index 634c3405..ae0758d1 100644 --- a/src/Types/DocPagesSetName200ResponseLayoutPagesItemSize.php +++ b/src/Types/DocPagesRemoveNameResponseLayoutPagesItemSize.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocPagesSetName200ResponseLayoutPagesItemSize extends JsonSerializableType +class DocPagesRemoveNameResponseLayoutPagesItemSize extends JsonSerializableType { /** * @var float $width diff --git a/src/Types/DocPagesSetName200ResponseLayoutPagesItemTabOrder.php b/src/Types/DocPagesRemoveNameResponseLayoutPagesItemTabOrder.php similarity index 75% rename from src/Types/DocPagesSetName200ResponseLayoutPagesItemTabOrder.php rename to src/Types/DocPagesRemoveNameResponseLayoutPagesItemTabOrder.php index 4171c498..c5c3d7d1 100644 --- a/src/Types/DocPagesSetName200ResponseLayoutPagesItemTabOrder.php +++ b/src/Types/DocPagesRemoveNameResponseLayoutPagesItemTabOrder.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocPagesSetName200ResponseLayoutPagesItemTabOrder: string +enum DocPagesRemoveNameResponseLayoutPagesItemTabOrder: string { case Rows = "rows"; case Columns = "columns"; diff --git a/src/Types/DocPagesSetName200ResponseLayoutPagesItemBoxes.php b/src/Types/DocPagesSetName200ResponseLayoutPagesItemBoxes.php deleted file mode 100644 index 3b57aa74..00000000 --- a/src/Types/DocPagesSetName200ResponseLayoutPagesItemBoxes.php +++ /dev/null @@ -1,66 +0,0 @@ -media = $values['media']; - $this->crop = $values['crop']; - $this->bleed = $values['bleed']; - $this->trim = $values['trim']; - $this->art = $values['art']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/DocPagesRemoveName200Response.php b/src/Types/DocPagesSetNameResponse.php similarity index 73% rename from src/Types/DocPagesRemoveName200Response.php rename to src/Types/DocPagesSetNameResponse.php index 9d7e74e5..3ccba86f 100644 --- a/src/Types/DocPagesRemoveName200Response.php +++ b/src/Types/DocPagesSetNameResponse.php @@ -5,13 +5,13 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocPagesRemoveName200Response extends JsonSerializableType +class DocPagesSetNameResponse extends JsonSerializableType { /** - * @var DocPagesRemoveName200ResponseLayout $layout + * @var DocPagesSetNameResponseLayout $layout */ #[JsonProperty('layout')] - public DocPagesRemoveName200ResponseLayout $layout; + public DocPagesSetNameResponseLayout $layout; /** * @var MutationMeta $meta @@ -21,7 +21,7 @@ class DocPagesRemoveName200Response extends JsonSerializableType /** * @param array{ - * layout: DocPagesRemoveName200ResponseLayout, + * layout: DocPagesSetNameResponseLayout, * meta: MutationMeta, * } $values */ diff --git a/src/Types/DocPagesRemoveName200ResponseLayout.php b/src/Types/DocPagesSetNameResponseLayout.php similarity index 51% rename from src/Types/DocPagesRemoveName200ResponseLayout.php rename to src/Types/DocPagesSetNameResponseLayout.php index 14cbca57..3a8de4d3 100644 --- a/src/Types/DocPagesRemoveName200ResponseLayout.php +++ b/src/Types/DocPagesSetNameResponseLayout.php @@ -6,7 +6,7 @@ use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; -class DocPagesRemoveName200ResponseLayout extends JsonSerializableType +class DocPagesSetNameResponseLayout extends JsonSerializableType { /** * @var int $pageCount @@ -15,29 +15,29 @@ class DocPagesRemoveName200ResponseLayout extends JsonSerializableType public int $pageCount; /** - * @var array $pages + * @var array $pages */ - #[JsonProperty('pages'), ArrayType([DocPagesRemoveName200ResponseLayoutPagesItem::class])] + #[JsonProperty('pages'), ArrayType([DocPagesSetNameResponseLayoutPagesItem::class])] public array $pages; /** - * @var array $labels + * @var array $labels */ - #[JsonProperty('labels'), ArrayType([DocPagesRemoveName200ResponseLayoutLabelsItem::class])] + #[JsonProperty('labels'), ArrayType([DocPagesSetNameResponseLayoutLabelsItem::class])] public array $labels; /** - * @var array $namedPages + * @var array $namedPages */ - #[JsonProperty('namedPages'), ArrayType([DocPagesRemoveName200ResponseLayoutNamedPagesItem::class])] + #[JsonProperty('namedPages'), ArrayType([DocPagesSetNameResponseLayoutNamedPagesItem::class])] public array $namedPages; /** * @param array{ * pageCount: int, - * pages: array, - * labels: array, - * namedPages: array, + * pages: array, + * labels: array, + * namedPages: array, * } $values */ public function __construct( diff --git a/src/Types/DocPagesRemoveName200ResponseLayoutLabelsItem.php b/src/Types/DocPagesSetNameResponseLayoutLabelsItem.php similarity index 80% rename from src/Types/DocPagesRemoveName200ResponseLayoutLabelsItem.php rename to src/Types/DocPagesSetNameResponseLayoutLabelsItem.php index 7e633235..701f8f19 100644 --- a/src/Types/DocPagesRemoveName200ResponseLayoutLabelsItem.php +++ b/src/Types/DocPagesSetNameResponseLayoutLabelsItem.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocPagesRemoveName200ResponseLayoutLabelsItem extends JsonSerializableType +class DocPagesSetNameResponseLayoutLabelsItem extends JsonSerializableType { /** * @var int $firstPage @@ -14,7 +14,7 @@ class DocPagesRemoveName200ResponseLayoutLabelsItem extends JsonSerializableType public int $firstPage; /** - * @var ?value-of $style + * @var ?value-of $style */ #[JsonProperty('style')] public ?string $style; @@ -36,7 +36,7 @@ class DocPagesRemoveName200ResponseLayoutLabelsItem extends JsonSerializableType * firstPage: int, * firstNumber: int, * prefix: string, - * style?: ?value-of, + * style?: ?value-of, * } $values */ public function __construct( diff --git a/src/Types/DocPagesRemoveName200ResponseLayoutLabelsItemStyle.php b/src/Types/DocPagesSetNameResponseLayoutLabelsItemStyle.php similarity index 77% rename from src/Types/DocPagesRemoveName200ResponseLayoutLabelsItemStyle.php rename to src/Types/DocPagesSetNameResponseLayoutLabelsItemStyle.php index f6d2ec66..c8abc99e 100644 --- a/src/Types/DocPagesRemoveName200ResponseLayoutLabelsItemStyle.php +++ b/src/Types/DocPagesSetNameResponseLayoutLabelsItemStyle.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocPagesRemoveName200ResponseLayoutLabelsItemStyle: string +enum DocPagesSetNameResponseLayoutLabelsItemStyle: string { case Decimal = "decimal"; case UpperRoman = "upperRoman"; diff --git a/src/Types/DocPagesRemoveName200ResponseLayoutNamedPagesItem.php b/src/Types/DocPagesSetNameResponseLayoutNamedPagesItem.php similarity index 66% rename from src/Types/DocPagesRemoveName200ResponseLayoutNamedPagesItem.php rename to src/Types/DocPagesSetNameResponseLayoutNamedPagesItem.php index 116a1fa7..0fde3bdd 100644 --- a/src/Types/DocPagesRemoveName200ResponseLayoutNamedPagesItem.php +++ b/src/Types/DocPagesSetNameResponseLayoutNamedPagesItem.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocPagesRemoveName200ResponseLayoutNamedPagesItem extends JsonSerializableType +class DocPagesSetNameResponseLayoutNamedPagesItem extends JsonSerializableType { /** * @var string $name @@ -14,15 +14,15 @@ class DocPagesRemoveName200ResponseLayoutNamedPagesItem extends JsonSerializable public string $name; /** - * @var DocPagesRemoveName200ResponseLayoutNamedPagesItemTarget $target + * @var DocPagesSetNameResponseLayoutNamedPagesItemTarget $target */ #[JsonProperty('target')] - public DocPagesRemoveName200ResponseLayoutNamedPagesItemTarget $target; + public DocPagesSetNameResponseLayoutNamedPagesItemTarget $target; /** * @param array{ * name: string, - * target: DocPagesRemoveName200ResponseLayoutNamedPagesItemTarget, + * target: DocPagesSetNameResponseLayoutNamedPagesItemTarget, * } $values */ public function __construct( diff --git a/src/Types/DocPagesRemoveName200ResponseLayoutNamedPagesItemTarget.php b/src/Types/DocPagesSetNameResponseLayoutNamedPagesItemTarget.php similarity index 56% rename from src/Types/DocPagesRemoveName200ResponseLayoutNamedPagesItemTarget.php rename to src/Types/DocPagesSetNameResponseLayoutNamedPagesItemTarget.php index 3c291364..a8f06dbe 100644 --- a/src/Types/DocPagesRemoveName200ResponseLayoutNamedPagesItemTarget.php +++ b/src/Types/DocPagesSetNameResponseLayoutNamedPagesItemTarget.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use Exception; -class DocPagesRemoveName200ResponseLayoutNamedPagesItemTarget extends JsonSerializableType +class DocPagesSetNameResponseLayoutNamedPagesItemTarget extends JsonSerializableType { /** * @var ( @@ -19,9 +19,9 @@ class DocPagesRemoveName200ResponseLayoutNamedPagesItemTarget extends JsonSerial /** * @var ( - * DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetPage - * |DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetTemplate - * |DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetDangling + * DocPagesSetNameResponseLayoutNamedPagesItemTargetPage + * |DocPagesSetNameResponseLayoutNamedPagesItemTargetTemplate + * |DocPagesSetNameResponseLayoutNamedPagesItemTargetDangling * |mixed * ) $value */ @@ -36,9 +36,9 @@ class DocPagesRemoveName200ResponseLayoutNamedPagesItemTarget extends JsonSerial * |'_unknown' * ), * value: ( - * DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetPage - * |DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetTemplate - * |DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetDangling + * DocPagesSetNameResponseLayoutNamedPagesItemTargetPage + * |DocPagesSetNameResponseLayoutNamedPagesItemTargetTemplate + * |DocPagesSetNameResponseLayoutNamedPagesItemTargetDangling * |mixed * ), * } $values @@ -51,36 +51,36 @@ private function __construct( } /** - * @param DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetPage $page - * @return DocPagesRemoveName200ResponseLayoutNamedPagesItemTarget + * @param DocPagesSetNameResponseLayoutNamedPagesItemTargetPage $page + * @return DocPagesSetNameResponseLayoutNamedPagesItemTarget */ - public static function page(DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetPage $page): DocPagesRemoveName200ResponseLayoutNamedPagesItemTarget + public static function page(DocPagesSetNameResponseLayoutNamedPagesItemTargetPage $page): DocPagesSetNameResponseLayoutNamedPagesItemTarget { - return new DocPagesRemoveName200ResponseLayoutNamedPagesItemTarget([ + return new DocPagesSetNameResponseLayoutNamedPagesItemTarget([ 'kind' => 'page', 'value' => $page, ]); } /** - * @param DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetTemplate $template - * @return DocPagesRemoveName200ResponseLayoutNamedPagesItemTarget + * @param DocPagesSetNameResponseLayoutNamedPagesItemTargetTemplate $template + * @return DocPagesSetNameResponseLayoutNamedPagesItemTarget */ - public static function template(DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetTemplate $template): DocPagesRemoveName200ResponseLayoutNamedPagesItemTarget + public static function template(DocPagesSetNameResponseLayoutNamedPagesItemTargetTemplate $template): DocPagesSetNameResponseLayoutNamedPagesItemTarget { - return new DocPagesRemoveName200ResponseLayoutNamedPagesItemTarget([ + return new DocPagesSetNameResponseLayoutNamedPagesItemTarget([ 'kind' => 'template', 'value' => $template, ]); } /** - * @param DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetDangling $dangling - * @return DocPagesRemoveName200ResponseLayoutNamedPagesItemTarget + * @param DocPagesSetNameResponseLayoutNamedPagesItemTargetDangling $dangling + * @return DocPagesSetNameResponseLayoutNamedPagesItemTarget */ - public static function dangling(DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetDangling $dangling): DocPagesRemoveName200ResponseLayoutNamedPagesItemTarget + public static function dangling(DocPagesSetNameResponseLayoutNamedPagesItemTargetDangling $dangling): DocPagesSetNameResponseLayoutNamedPagesItemTarget { - return new DocPagesRemoveName200ResponseLayoutNamedPagesItemTarget([ + return new DocPagesSetNameResponseLayoutNamedPagesItemTarget([ 'kind' => 'dangling', 'value' => $dangling, ]); @@ -91,15 +91,15 @@ public static function dangling(DocPagesRemoveName200ResponseLayoutNamedPagesIte */ public function isPage(): bool { - return $this->value instanceof DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetPage && $this->kind === 'page'; + return $this->value instanceof DocPagesSetNameResponseLayoutNamedPagesItemTargetPage && $this->kind === 'page'; } /** - * @return DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetPage + * @return DocPagesSetNameResponseLayoutNamedPagesItemTargetPage */ - public function asPage(): DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetPage + public function asPage(): DocPagesSetNameResponseLayoutNamedPagesItemTargetPage { - if (!($this->value instanceof DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetPage && $this->kind === 'page')) { + if (!($this->value instanceof DocPagesSetNameResponseLayoutNamedPagesItemTargetPage && $this->kind === 'page')) { throw new Exception( "Expected page; got " . $this->kind . " with value of type " . get_debug_type($this->value), ); @@ -113,15 +113,15 @@ public function asPage(): DocPagesRemoveName200ResponseLayoutNamedPagesItemTarge */ public function isTemplate(): bool { - return $this->value instanceof DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetTemplate && $this->kind === 'template'; + return $this->value instanceof DocPagesSetNameResponseLayoutNamedPagesItemTargetTemplate && $this->kind === 'template'; } /** - * @return DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetTemplate + * @return DocPagesSetNameResponseLayoutNamedPagesItemTargetTemplate */ - public function asTemplate(): DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetTemplate + public function asTemplate(): DocPagesSetNameResponseLayoutNamedPagesItemTargetTemplate { - if (!($this->value instanceof DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetTemplate && $this->kind === 'template')) { + if (!($this->value instanceof DocPagesSetNameResponseLayoutNamedPagesItemTargetTemplate && $this->kind === 'template')) { throw new Exception( "Expected template; got " . $this->kind . " with value of type " . get_debug_type($this->value), ); @@ -135,15 +135,15 @@ public function asTemplate(): DocPagesRemoveName200ResponseLayoutNamedPagesItemT */ public function isDangling(): bool { - return $this->value instanceof DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetDangling && $this->kind === 'dangling'; + return $this->value instanceof DocPagesSetNameResponseLayoutNamedPagesItemTargetDangling && $this->kind === 'dangling'; } /** - * @return DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetDangling + * @return DocPagesSetNameResponseLayoutNamedPagesItemTargetDangling */ - public function asDangling(): DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetDangling + public function asDangling(): DocPagesSetNameResponseLayoutNamedPagesItemTargetDangling { - if (!($this->value instanceof DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetDangling && $this->kind === 'dangling')) { + if (!($this->value instanceof DocPagesSetNameResponseLayoutNamedPagesItemTargetDangling && $this->kind === 'dangling')) { throw new Exception( "Expected dangling; got " . $this->kind . " with value of type " . get_debug_type($this->value), ); @@ -221,13 +221,13 @@ public static function jsonDeserialize(array $data): static $args['kind'] = $kind; switch ($kind) { case 'page': - $args['value'] = DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetPage::jsonDeserialize($data); + $args['value'] = DocPagesSetNameResponseLayoutNamedPagesItemTargetPage::jsonDeserialize($data); break; case 'template': - $args['value'] = DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetTemplate::jsonDeserialize($data); + $args['value'] = DocPagesSetNameResponseLayoutNamedPagesItemTargetTemplate::jsonDeserialize($data); break; case 'dangling': - $args['value'] = DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetDangling::jsonDeserialize($data); + $args['value'] = DocPagesSetNameResponseLayoutNamedPagesItemTargetDangling::jsonDeserialize($data); break; case '_unknown': default: diff --git a/src/Types/AnnotationPolygonMeasureUnknown.php b/src/Types/DocPagesSetNameResponseLayoutNamedPagesItemTargetDangling.php similarity index 79% rename from src/Types/AnnotationPolygonMeasureUnknown.php rename to src/Types/DocPagesSetNameResponseLayoutNamedPagesItemTargetDangling.php index 0c16c4ac..c31c00d8 100644 --- a/src/Types/AnnotationPolygonMeasureUnknown.php +++ b/src/Types/DocPagesSetNameResponseLayoutNamedPagesItemTargetDangling.php @@ -4,7 +4,7 @@ use CloudPDF\Core\Json\JsonSerializableType; -class AnnotationPolygonMeasureUnknown extends JsonSerializableType +class DocPagesSetNameResponseLayoutNamedPagesItemTargetDangling extends JsonSerializableType { /** * @param array{ diff --git a/src/Types/DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetPage.php b/src/Types/DocPagesSetNameResponseLayoutNamedPagesItemTargetPage.php similarity index 84% rename from src/Types/DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetPage.php rename to src/Types/DocPagesSetNameResponseLayoutNamedPagesItemTargetPage.php index f65f9a53..a25cfe71 100644 --- a/src/Types/DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetPage.php +++ b/src/Types/DocPagesSetNameResponseLayoutNamedPagesItemTargetPage.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetPage extends JsonSerializableType +class DocPagesSetNameResponseLayoutNamedPagesItemTargetPage extends JsonSerializableType { /** * @var PageRef $page diff --git a/src/Types/DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetTemplate.php b/src/Types/DocPagesSetNameResponseLayoutNamedPagesItemTargetTemplate.php similarity index 85% rename from src/Types/DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetTemplate.php rename to src/Types/DocPagesSetNameResponseLayoutNamedPagesItemTargetTemplate.php index 289c2d37..9659bf01 100644 --- a/src/Types/DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetTemplate.php +++ b/src/Types/DocPagesSetNameResponseLayoutNamedPagesItemTargetTemplate.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocPagesRemoveName200ResponseLayoutNamedPagesItemTargetTemplate extends JsonSerializableType +class DocPagesSetNameResponseLayoutNamedPagesItemTargetTemplate extends JsonSerializableType { /** * @var int $objectNumber diff --git a/src/Types/DocPagesRemoveName200ResponseLayoutPagesItem.php b/src/Types/DocPagesSetNameResponseLayoutPagesItem.php similarity index 64% rename from src/Types/DocPagesRemoveName200ResponseLayoutPagesItem.php rename to src/Types/DocPagesSetNameResponseLayoutPagesItem.php index 19d4eeb9..c83d8a5f 100644 --- a/src/Types/DocPagesRemoveName200ResponseLayoutPagesItem.php +++ b/src/Types/DocPagesSetNameResponseLayoutPagesItem.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocPagesRemoveName200ResponseLayoutPagesItem extends JsonSerializableType +class DocPagesSetNameResponseLayoutPagesItem extends JsonSerializableType { /** * @var int $index @@ -26,16 +26,16 @@ class DocPagesRemoveName200ResponseLayoutPagesItem extends JsonSerializableType public ?string $label; /** - * @var DocPagesRemoveName200ResponseLayoutPagesItemSize $size + * @var DocPagesSetNameResponseLayoutPagesItemSize $size */ #[JsonProperty('size')] - public DocPagesRemoveName200ResponseLayoutPagesItemSize $size; + public DocPagesSetNameResponseLayoutPagesItemSize $size; /** - * @var float $rotation + * @var int $rotation */ #[JsonProperty('rotation')] - public float $rotation; + public int $rotation; /** * @var float $userUnit @@ -44,22 +44,22 @@ class DocPagesRemoveName200ResponseLayoutPagesItem extends JsonSerializableType public float $userUnit; /** - * @var ?value-of $tabOrder + * @var ?value-of $tabOrder */ #[JsonProperty('tabOrder')] public ?string $tabOrder; /** - * @var DocPagesRemoveName200ResponseLayoutPagesItemBoxes $boxes + * @var DocPagesSetNameResponseLayoutPagesItemBoxes $boxes */ #[JsonProperty('boxes')] - public DocPagesRemoveName200ResponseLayoutPagesItemBoxes $boxes; + public DocPagesSetNameResponseLayoutPagesItemBoxes $boxes; /** - * @var DocPagesRemoveName200ResponseLayoutPagesItemPdfCropBox $pdfCropBox + * @var DocPagesSetNameResponseLayoutPagesItemPdfCropBox $pdfCropBox */ #[JsonProperty('pdfCropBox')] - public DocPagesRemoveName200ResponseLayoutPagesItemPdfCropBox $pdfCropBox; + public DocPagesSetNameResponseLayoutPagesItemPdfCropBox $pdfCropBox; /** * @var ?PdfPageActions $actions @@ -71,13 +71,13 @@ class DocPagesRemoveName200ResponseLayoutPagesItem extends JsonSerializableType * @param array{ * index: int, * ref: PageRef, - * size: DocPagesRemoveName200ResponseLayoutPagesItemSize, - * rotation: float, + * size: DocPagesSetNameResponseLayoutPagesItemSize, + * rotation: int, * userUnit: float, - * boxes: DocPagesRemoveName200ResponseLayoutPagesItemBoxes, - * pdfCropBox: DocPagesRemoveName200ResponseLayoutPagesItemPdfCropBox, + * boxes: DocPagesSetNameResponseLayoutPagesItemBoxes, + * pdfCropBox: DocPagesSetNameResponseLayoutPagesItemPdfCropBox, * label?: ?string, - * tabOrder?: ?value-of, + * tabOrder?: ?value-of, * actions?: ?PdfPageActions, * } $values */ diff --git a/src/Types/DocPagesSetNameResponseLayoutPagesItemBoxes.php b/src/Types/DocPagesSetNameResponseLayoutPagesItemBoxes.php new file mode 100644 index 00000000..b82caa40 --- /dev/null +++ b/src/Types/DocPagesSetNameResponseLayoutPagesItemBoxes.php @@ -0,0 +1,66 @@ +media = $values['media']; + $this->crop = $values['crop']; + $this->bleed = $values['bleed']; + $this->trim = $values['trim']; + $this->art = $values['art']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocPagesSetNameResponseLayoutPagesItemBoxesArt.php b/src/Types/DocPagesSetNameResponseLayoutPagesItemBoxesArt.php new file mode 100644 index 00000000..d4f214c3 --- /dev/null +++ b/src/Types/DocPagesSetNameResponseLayoutPagesItemBoxesArt.php @@ -0,0 +1,58 @@ +x = $values['x']; + $this->y = $values['y']; + $this->width = $values['width']; + $this->height = $values['height']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocPagesSetNameResponseLayoutPagesItemBoxesBleed.php b/src/Types/DocPagesSetNameResponseLayoutPagesItemBoxesBleed.php new file mode 100644 index 00000000..25bc3446 --- /dev/null +++ b/src/Types/DocPagesSetNameResponseLayoutPagesItemBoxesBleed.php @@ -0,0 +1,58 @@ +x = $values['x']; + $this->y = $values['y']; + $this->width = $values['width']; + $this->height = $values['height']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocPagesSetNameResponseLayoutPagesItemBoxesCrop.php b/src/Types/DocPagesSetNameResponseLayoutPagesItemBoxesCrop.php new file mode 100644 index 00000000..9e50b168 --- /dev/null +++ b/src/Types/DocPagesSetNameResponseLayoutPagesItemBoxesCrop.php @@ -0,0 +1,58 @@ +x = $values['x']; + $this->y = $values['y']; + $this->width = $values['width']; + $this->height = $values['height']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocPagesSetNameResponseLayoutPagesItemBoxesMedia.php b/src/Types/DocPagesSetNameResponseLayoutPagesItemBoxesMedia.php new file mode 100644 index 00000000..c52dad08 --- /dev/null +++ b/src/Types/DocPagesSetNameResponseLayoutPagesItemBoxesMedia.php @@ -0,0 +1,58 @@ +x = $values['x']; + $this->y = $values['y']; + $this->width = $values['width']; + $this->height = $values['height']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocPagesSetNameResponseLayoutPagesItemBoxesTrim.php b/src/Types/DocPagesSetNameResponseLayoutPagesItemBoxesTrim.php new file mode 100644 index 00000000..109b9333 --- /dev/null +++ b/src/Types/DocPagesSetNameResponseLayoutPagesItemBoxesTrim.php @@ -0,0 +1,58 @@ +x = $values['x']; + $this->y = $values['y']; + $this->width = $values['width']; + $this->height = $values['height']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocPagesRemoveName200ResponseLayoutPagesItemPdfCropBox.php b/src/Types/DocPagesSetNameResponseLayoutPagesItemPdfCropBox.php similarity index 91% rename from src/Types/DocPagesRemoveName200ResponseLayoutPagesItemPdfCropBox.php rename to src/Types/DocPagesSetNameResponseLayoutPagesItemPdfCropBox.php index 73d595d0..9c755930 100644 --- a/src/Types/DocPagesRemoveName200ResponseLayoutPagesItemPdfCropBox.php +++ b/src/Types/DocPagesSetNameResponseLayoutPagesItemPdfCropBox.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocPagesRemoveName200ResponseLayoutPagesItemPdfCropBox extends JsonSerializableType +class DocPagesSetNameResponseLayoutPagesItemPdfCropBox extends JsonSerializableType { /** * @var float $left diff --git a/src/Types/DocPagesRemoveName200ResponseLayoutPagesItemSize.php b/src/Types/DocPagesSetNameResponseLayoutPagesItemSize.php similarity index 89% rename from src/Types/DocPagesRemoveName200ResponseLayoutPagesItemSize.php rename to src/Types/DocPagesSetNameResponseLayoutPagesItemSize.php index bc821fab..b63b0ab8 100644 --- a/src/Types/DocPagesRemoveName200ResponseLayoutPagesItemSize.php +++ b/src/Types/DocPagesSetNameResponseLayoutPagesItemSize.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocPagesRemoveName200ResponseLayoutPagesItemSize extends JsonSerializableType +class DocPagesSetNameResponseLayoutPagesItemSize extends JsonSerializableType { /** * @var float $width diff --git a/src/Types/DocPagesRemoveName200ResponseLayoutPagesItemTabOrder.php b/src/Types/DocPagesSetNameResponseLayoutPagesItemTabOrder.php similarity index 74% rename from src/Types/DocPagesRemoveName200ResponseLayoutPagesItemTabOrder.php rename to src/Types/DocPagesSetNameResponseLayoutPagesItemTabOrder.php index 52c3296f..fb7c0647 100644 --- a/src/Types/DocPagesRemoveName200ResponseLayoutPagesItemTabOrder.php +++ b/src/Types/DocPagesSetNameResponseLayoutPagesItemTabOrder.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocPagesRemoveName200ResponseLayoutPagesItemTabOrder: string +enum DocPagesSetNameResponseLayoutPagesItemTabOrder: string { case Rows = "rows"; case Columns = "columns"; diff --git a/src/Types/DocPagesSetScale200Response.php b/src/Types/DocPagesSetScaleResponse.php similarity index 91% rename from src/Types/DocPagesSetScale200Response.php rename to src/Types/DocPagesSetScaleResponse.php index fb9957b4..effabaa7 100644 --- a/src/Types/DocPagesSetScale200Response.php +++ b/src/Types/DocPagesSetScaleResponse.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocPagesSetScale200Response extends JsonSerializableType +class DocPagesSetScaleResponse extends JsonSerializableType { /** * @var PageRef $page diff --git a/src/Types/DocPagesViewports200ResponseViewportsItemMeasure.php b/src/Types/DocPagesViewports200ResponseViewportsItemMeasure.php deleted file mode 100644 index 33fceb8f..00000000 --- a/src/Types/DocPagesViewports200ResponseViewportsItemMeasure.php +++ /dev/null @@ -1,241 +0,0 @@ -subtype = $values['subtype']; - $this->value = $values['value']; - } - - /** - * @param DocPagesViewports200ResponseViewportsItemMeasureRectilinear $rectilinear - * @return DocPagesViewports200ResponseViewportsItemMeasure - */ - public static function rectilinear(DocPagesViewports200ResponseViewportsItemMeasureRectilinear $rectilinear): DocPagesViewports200ResponseViewportsItemMeasure - { - return new DocPagesViewports200ResponseViewportsItemMeasure([ - 'subtype' => 'rectilinear', - 'value' => $rectilinear, - ]); - } - - /** - * @param DocPagesViewports200ResponseViewportsItemMeasureGeospatial $geospatial - * @return DocPagesViewports200ResponseViewportsItemMeasure - */ - public static function geospatial(DocPagesViewports200ResponseViewportsItemMeasureGeospatial $geospatial): DocPagesViewports200ResponseViewportsItemMeasure - { - return new DocPagesViewports200ResponseViewportsItemMeasure([ - 'subtype' => 'geospatial', - 'value' => $geospatial, - ]); - } - - /** - * @param DocPagesViewports200ResponseViewportsItemMeasureUnknown $unknown - * @return DocPagesViewports200ResponseViewportsItemMeasure - */ - public static function unknown(DocPagesViewports200ResponseViewportsItemMeasureUnknown $unknown): DocPagesViewports200ResponseViewportsItemMeasure - { - return new DocPagesViewports200ResponseViewportsItemMeasure([ - 'subtype' => 'unknown', - 'value' => $unknown, - ]); - } - - /** - * @return bool - */ - public function isRectilinear(): bool - { - return $this->value instanceof DocPagesViewports200ResponseViewportsItemMeasureRectilinear && $this->subtype === 'rectilinear'; - } - - /** - * @return DocPagesViewports200ResponseViewportsItemMeasureRectilinear - */ - public function asRectilinear(): DocPagesViewports200ResponseViewportsItemMeasureRectilinear - { - if (!($this->value instanceof DocPagesViewports200ResponseViewportsItemMeasureRectilinear && $this->subtype === 'rectilinear')) { - throw new Exception( - "Expected rectilinear; got " . $this->subtype . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isGeospatial(): bool - { - return $this->value instanceof DocPagesViewports200ResponseViewportsItemMeasureGeospatial && $this->subtype === 'geospatial'; - } - - /** - * @return DocPagesViewports200ResponseViewportsItemMeasureGeospatial - */ - public function asGeospatial(): DocPagesViewports200ResponseViewportsItemMeasureGeospatial - { - if (!($this->value instanceof DocPagesViewports200ResponseViewportsItemMeasureGeospatial && $this->subtype === 'geospatial')) { - throw new Exception( - "Expected geospatial; got " . $this->subtype . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isUnknown(): bool - { - return $this->value instanceof DocPagesViewports200ResponseViewportsItemMeasureUnknown && $this->subtype === 'unknown'; - } - - /** - * @return DocPagesViewports200ResponseViewportsItemMeasureUnknown - */ - public function asUnknown(): DocPagesViewports200ResponseViewportsItemMeasureUnknown - { - if (!($this->value instanceof DocPagesViewports200ResponseViewportsItemMeasureUnknown && $this->subtype === 'unknown')) { - throw new Exception( - "Expected unknown; got " . $this->subtype . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } - - /** - * @return array - */ - public function jsonSerialize(): array - { - $result = []; - $result['subtype'] = $this->subtype; - - $base = parent::jsonSerialize(); - $result = array_merge($base, $result); - - switch ($this->subtype) { - case 'rectilinear': - $value = $this->asRectilinear()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'geospatial': - $value = $this->asGeospatial()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'unknown': - $value = $this->asUnknown()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case '_unknown': - default: - if (is_null($this->value)) { - break; - } - if ($this->value instanceof JsonSerializableType) { - $value = $this->value->jsonSerialize(); - $result = array_merge($value, $result); - } elseif (is_array($this->value)) { - $result = array_merge($this->value, $result); - } - } - - return $result; - } - - /** - * @param array $data - */ - public static function jsonDeserialize(array $data): static - { - $args = []; - if (!array_key_exists('subtype', $data)) { - throw new Exception( - "JSON data is missing property 'subtype'", - ); - } - $subtype = $data['subtype']; - if (!(is_string($subtype))) { - throw new Exception( - "Expected property 'subtype' in JSON data to be string, instead received " . get_debug_type($data['subtype']), - ); - } - - $args['subtype'] = $subtype; - switch ($subtype) { - case 'rectilinear': - $args['value'] = DocPagesViewports200ResponseViewportsItemMeasureRectilinear::jsonDeserialize($data); - break; - case 'geospatial': - $args['value'] = DocPagesViewports200ResponseViewportsItemMeasureGeospatial::jsonDeserialize($data); - break; - case 'unknown': - $args['value'] = DocPagesViewports200ResponseViewportsItemMeasureUnknown::jsonDeserialize($data); - break; - case '_unknown': - default: - $args['subtype'] = '_unknown'; - $args['value'] = $data; - } - - // @phpstan-ignore-next-line - return new static($args); - } -} diff --git a/src/Types/DocPagesViewports200ResponseViewportsItemMeasureGeospatial.php b/src/Types/DocPagesViewports200ResponseViewportsItemMeasureGeospatial.php deleted file mode 100644 index 26771b95..00000000 --- a/src/Types/DocPagesViewports200ResponseViewportsItemMeasureGeospatial.php +++ /dev/null @@ -1,26 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinear.php b/src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinear.php deleted file mode 100644 index a57bde57..00000000 --- a/src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinear.php +++ /dev/null @@ -1,99 +0,0 @@ - $x - */ - #[JsonProperty('x'), ArrayType([DocPagesViewports200ResponseViewportsItemMeasureRectilinearXItem::class])] - public array $x; - - /** - * @var ?array $y - */ - #[JsonProperty('y'), ArrayType([DocPagesViewports200ResponseViewportsItemMeasureRectilinearYItem::class])] - public ?array $y; - - /** - * @var array $distance - */ - #[JsonProperty('distance'), ArrayType([DocPagesViewports200ResponseViewportsItemMeasureRectilinearDistanceItem::class])] - public array $distance; - - /** - * @var array $area - */ - #[JsonProperty('area'), ArrayType([DocPagesViewports200ResponseViewportsItemMeasureRectilinearAreaItem::class])] - public array $area; - - /** - * @var ?array $angle - */ - #[JsonProperty('angle'), ArrayType([DocPagesViewports200ResponseViewportsItemMeasureRectilinearAngleItem::class])] - public ?array $angle; - - /** - * @var ?array $slope - */ - #[JsonProperty('slope'), ArrayType([DocPagesViewports200ResponseViewportsItemMeasureRectilinearSlopeItem::class])] - public ?array $slope; - - /** - * @var ?DocPagesViewports200ResponseViewportsItemMeasureRectilinearOrigin $origin - */ - #[JsonProperty('origin')] - public ?DocPagesViewports200ResponseViewportsItemMeasureRectilinearOrigin $origin; - - /** - * @var ?float $cyx - */ - #[JsonProperty('cyx')] - public ?float $cyx; - - /** - * @param array{ - * x: array, - * distance: array, - * area: array, - * ratio?: ?string, - * y?: ?array, - * angle?: ?array, - * slope?: ?array, - * origin?: ?DocPagesViewports200ResponseViewportsItemMeasureRectilinearOrigin, - * cyx?: ?float, - * } $values - */ - public function __construct( - array $values, - ) { - $this->ratio = $values['ratio'] ?? null; - $this->x = $values['x']; - $this->y = $values['y'] ?? null; - $this->distance = $values['distance']; - $this->area = $values['area']; - $this->angle = $values['angle'] ?? null; - $this->slope = $values['slope'] ?? null; - $this->origin = $values['origin'] ?? null; - $this->cyx = $values['cyx'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearAngleItem.php b/src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearAngleItem.php deleted file mode 100644 index 7d3fff84..00000000 --- a/src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearAngleItem.php +++ /dev/null @@ -1,106 +0,0 @@ - $fraction - */ - #[JsonProperty('fraction')] - public ?string $fraction; - - /** - * @var ?int $precision - */ - #[JsonProperty('precision')] - public ?int $precision; - - /** - * @var ?bool $fixed - */ - #[JsonProperty('fixed')] - public ?bool $fixed; - - /** - * @var ?string $thousands - */ - #[JsonProperty('thousands')] - public ?string $thousands; - - /** - * @var ?string $decimal - */ - #[JsonProperty('decimal')] - public ?string $decimal; - - /** - * @var ?string $prefixSpacing - */ - #[JsonProperty('prefixSpacing')] - public ?string $prefixSpacing; - - /** - * @var ?string $suffixSpacing - */ - #[JsonProperty('suffixSpacing')] - public ?string $suffixSpacing; - - /** - * @var ?value-of $labelPosition - */ - #[JsonProperty('labelPosition')] - public ?string $labelPosition; - - /** - * @param array{ - * unit: string, - * conversion?: ?float, - * fraction?: ?value-of, - * precision?: ?int, - * fixed?: ?bool, - * thousands?: ?string, - * decimal?: ?string, - * prefixSpacing?: ?string, - * suffixSpacing?: ?string, - * labelPosition?: ?value-of, - * } $values - */ - public function __construct( - array $values, - ) { - $this->unit = $values['unit']; - $this->conversion = $values['conversion'] ?? null; - $this->fraction = $values['fraction'] ?? null; - $this->precision = $values['precision'] ?? null; - $this->fixed = $values['fixed'] ?? null; - $this->thousands = $values['thousands'] ?? null; - $this->decimal = $values['decimal'] ?? null; - $this->prefixSpacing = $values['prefixSpacing'] ?? null; - $this->suffixSpacing = $values['suffixSpacing'] ?? null; - $this->labelPosition = $values['labelPosition'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearAngleItemFraction.php b/src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearAngleItemFraction.php deleted file mode 100644 index ca4825d0..00000000 --- a/src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearAngleItemFraction.php +++ /dev/null @@ -1,11 +0,0 @@ - $fraction - */ - #[JsonProperty('fraction')] - public ?string $fraction; - - /** - * @var ?int $precision - */ - #[JsonProperty('precision')] - public ?int $precision; - - /** - * @var ?bool $fixed - */ - #[JsonProperty('fixed')] - public ?bool $fixed; - - /** - * @var ?string $thousands - */ - #[JsonProperty('thousands')] - public ?string $thousands; - - /** - * @var ?string $decimal - */ - #[JsonProperty('decimal')] - public ?string $decimal; - - /** - * @var ?string $prefixSpacing - */ - #[JsonProperty('prefixSpacing')] - public ?string $prefixSpacing; - - /** - * @var ?string $suffixSpacing - */ - #[JsonProperty('suffixSpacing')] - public ?string $suffixSpacing; - - /** - * @var ?value-of $labelPosition - */ - #[JsonProperty('labelPosition')] - public ?string $labelPosition; - - /** - * @param array{ - * unit: string, - * conversion?: ?float, - * fraction?: ?value-of, - * precision?: ?int, - * fixed?: ?bool, - * thousands?: ?string, - * decimal?: ?string, - * prefixSpacing?: ?string, - * suffixSpacing?: ?string, - * labelPosition?: ?value-of, - * } $values - */ - public function __construct( - array $values, - ) { - $this->unit = $values['unit']; - $this->conversion = $values['conversion'] ?? null; - $this->fraction = $values['fraction'] ?? null; - $this->precision = $values['precision'] ?? null; - $this->fixed = $values['fixed'] ?? null; - $this->thousands = $values['thousands'] ?? null; - $this->decimal = $values['decimal'] ?? null; - $this->prefixSpacing = $values['prefixSpacing'] ?? null; - $this->suffixSpacing = $values['suffixSpacing'] ?? null; - $this->labelPosition = $values['labelPosition'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearAreaItemFraction.php b/src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearAreaItemFraction.php deleted file mode 100644 index 29871241..00000000 --- a/src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearAreaItemFraction.php +++ /dev/null @@ -1,11 +0,0 @@ - $fraction - */ - #[JsonProperty('fraction')] - public ?string $fraction; - - /** - * @var ?int $precision - */ - #[JsonProperty('precision')] - public ?int $precision; - - /** - * @var ?bool $fixed - */ - #[JsonProperty('fixed')] - public ?bool $fixed; - - /** - * @var ?string $thousands - */ - #[JsonProperty('thousands')] - public ?string $thousands; - - /** - * @var ?string $decimal - */ - #[JsonProperty('decimal')] - public ?string $decimal; - - /** - * @var ?string $prefixSpacing - */ - #[JsonProperty('prefixSpacing')] - public ?string $prefixSpacing; - - /** - * @var ?string $suffixSpacing - */ - #[JsonProperty('suffixSpacing')] - public ?string $suffixSpacing; - - /** - * @var ?value-of $labelPosition - */ - #[JsonProperty('labelPosition')] - public ?string $labelPosition; - - /** - * @param array{ - * unit: string, - * conversion?: ?float, - * fraction?: ?value-of, - * precision?: ?int, - * fixed?: ?bool, - * thousands?: ?string, - * decimal?: ?string, - * prefixSpacing?: ?string, - * suffixSpacing?: ?string, - * labelPosition?: ?value-of, - * } $values - */ - public function __construct( - array $values, - ) { - $this->unit = $values['unit']; - $this->conversion = $values['conversion'] ?? null; - $this->fraction = $values['fraction'] ?? null; - $this->precision = $values['precision'] ?? null; - $this->fixed = $values['fixed'] ?? null; - $this->thousands = $values['thousands'] ?? null; - $this->decimal = $values['decimal'] ?? null; - $this->prefixSpacing = $values['prefixSpacing'] ?? null; - $this->suffixSpacing = $values['suffixSpacing'] ?? null; - $this->labelPosition = $values['labelPosition'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearDistanceItemFraction.php b/src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearDistanceItemFraction.php deleted file mode 100644 index 0130a611..00000000 --- a/src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearDistanceItemFraction.php +++ /dev/null @@ -1,11 +0,0 @@ -x = $values['x']; - $this->y = $values['y']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearSlopeItem.php b/src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearSlopeItem.php deleted file mode 100644 index 72f7d8c3..00000000 --- a/src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearSlopeItem.php +++ /dev/null @@ -1,106 +0,0 @@ - $fraction - */ - #[JsonProperty('fraction')] - public ?string $fraction; - - /** - * @var ?int $precision - */ - #[JsonProperty('precision')] - public ?int $precision; - - /** - * @var ?bool $fixed - */ - #[JsonProperty('fixed')] - public ?bool $fixed; - - /** - * @var ?string $thousands - */ - #[JsonProperty('thousands')] - public ?string $thousands; - - /** - * @var ?string $decimal - */ - #[JsonProperty('decimal')] - public ?string $decimal; - - /** - * @var ?string $prefixSpacing - */ - #[JsonProperty('prefixSpacing')] - public ?string $prefixSpacing; - - /** - * @var ?string $suffixSpacing - */ - #[JsonProperty('suffixSpacing')] - public ?string $suffixSpacing; - - /** - * @var ?value-of $labelPosition - */ - #[JsonProperty('labelPosition')] - public ?string $labelPosition; - - /** - * @param array{ - * unit: string, - * conversion?: ?float, - * fraction?: ?value-of, - * precision?: ?int, - * fixed?: ?bool, - * thousands?: ?string, - * decimal?: ?string, - * prefixSpacing?: ?string, - * suffixSpacing?: ?string, - * labelPosition?: ?value-of, - * } $values - */ - public function __construct( - array $values, - ) { - $this->unit = $values['unit']; - $this->conversion = $values['conversion'] ?? null; - $this->fraction = $values['fraction'] ?? null; - $this->precision = $values['precision'] ?? null; - $this->fixed = $values['fixed'] ?? null; - $this->thousands = $values['thousands'] ?? null; - $this->decimal = $values['decimal'] ?? null; - $this->prefixSpacing = $values['prefixSpacing'] ?? null; - $this->suffixSpacing = $values['suffixSpacing'] ?? null; - $this->labelPosition = $values['labelPosition'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearSlopeItemFraction.php b/src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearSlopeItemFraction.php deleted file mode 100644 index 5bb26060..00000000 --- a/src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearSlopeItemFraction.php +++ /dev/null @@ -1,11 +0,0 @@ - $fraction - */ - #[JsonProperty('fraction')] - public ?string $fraction; - - /** - * @var ?int $precision - */ - #[JsonProperty('precision')] - public ?int $precision; - - /** - * @var ?bool $fixed - */ - #[JsonProperty('fixed')] - public ?bool $fixed; - - /** - * @var ?string $thousands - */ - #[JsonProperty('thousands')] - public ?string $thousands; - - /** - * @var ?string $decimal - */ - #[JsonProperty('decimal')] - public ?string $decimal; - - /** - * @var ?string $prefixSpacing - */ - #[JsonProperty('prefixSpacing')] - public ?string $prefixSpacing; - - /** - * @var ?string $suffixSpacing - */ - #[JsonProperty('suffixSpacing')] - public ?string $suffixSpacing; - - /** - * @var ?value-of $labelPosition - */ - #[JsonProperty('labelPosition')] - public ?string $labelPosition; - - /** - * @param array{ - * unit: string, - * conversion?: ?float, - * fraction?: ?value-of, - * precision?: ?int, - * fixed?: ?bool, - * thousands?: ?string, - * decimal?: ?string, - * prefixSpacing?: ?string, - * suffixSpacing?: ?string, - * labelPosition?: ?value-of, - * } $values - */ - public function __construct( - array $values, - ) { - $this->unit = $values['unit']; - $this->conversion = $values['conversion'] ?? null; - $this->fraction = $values['fraction'] ?? null; - $this->precision = $values['precision'] ?? null; - $this->fixed = $values['fixed'] ?? null; - $this->thousands = $values['thousands'] ?? null; - $this->decimal = $values['decimal'] ?? null; - $this->prefixSpacing = $values['prefixSpacing'] ?? null; - $this->suffixSpacing = $values['suffixSpacing'] ?? null; - $this->labelPosition = $values['labelPosition'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearXItemFraction.php b/src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearXItemFraction.php deleted file mode 100644 index 0cfaf7d8..00000000 --- a/src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearXItemFraction.php +++ /dev/null @@ -1,11 +0,0 @@ - $fraction - */ - #[JsonProperty('fraction')] - public ?string $fraction; - - /** - * @var ?int $precision - */ - #[JsonProperty('precision')] - public ?int $precision; - - /** - * @var ?bool $fixed - */ - #[JsonProperty('fixed')] - public ?bool $fixed; - - /** - * @var ?string $thousands - */ - #[JsonProperty('thousands')] - public ?string $thousands; - - /** - * @var ?string $decimal - */ - #[JsonProperty('decimal')] - public ?string $decimal; - - /** - * @var ?string $prefixSpacing - */ - #[JsonProperty('prefixSpacing')] - public ?string $prefixSpacing; - - /** - * @var ?string $suffixSpacing - */ - #[JsonProperty('suffixSpacing')] - public ?string $suffixSpacing; - - /** - * @var ?value-of $labelPosition - */ - #[JsonProperty('labelPosition')] - public ?string $labelPosition; - - /** - * @param array{ - * unit: string, - * conversion?: ?float, - * fraction?: ?value-of, - * precision?: ?int, - * fixed?: ?bool, - * thousands?: ?string, - * decimal?: ?string, - * prefixSpacing?: ?string, - * suffixSpacing?: ?string, - * labelPosition?: ?value-of, - * } $values - */ - public function __construct( - array $values, - ) { - $this->unit = $values['unit']; - $this->conversion = $values['conversion'] ?? null; - $this->fraction = $values['fraction'] ?? null; - $this->precision = $values['precision'] ?? null; - $this->fixed = $values['fixed'] ?? null; - $this->thousands = $values['thousands'] ?? null; - $this->decimal = $values['decimal'] ?? null; - $this->prefixSpacing = $values['prefixSpacing'] ?? null; - $this->suffixSpacing = $values['suffixSpacing'] ?? null; - $this->labelPosition = $values['labelPosition'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearYItemFraction.php b/src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearYItemFraction.php deleted file mode 100644 index 62adbde5..00000000 --- a/src/Types/DocPagesViewports200ResponseViewportsItemMeasureRectilinearYItemFraction.php +++ /dev/null @@ -1,11 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/DocPagesViewports200Response.php b/src/Types/DocPagesViewportsResponse.php similarity index 62% rename from src/Types/DocPagesViewports200Response.php rename to src/Types/DocPagesViewportsResponse.php index 039ea9e3..e0e45835 100644 --- a/src/Types/DocPagesViewports200Response.php +++ b/src/Types/DocPagesViewportsResponse.php @@ -6,17 +6,17 @@ use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; -class DocPagesViewports200Response extends JsonSerializableType +class DocPagesViewportsResponse extends JsonSerializableType { /** - * @var array $viewports + * @var array $viewports */ - #[JsonProperty('viewports'), ArrayType([DocPagesViewports200ResponseViewportsItem::class])] + #[JsonProperty('viewports'), ArrayType([DocPagesViewportsResponseViewportsItem::class])] public array $viewports; /** * @param array{ - * viewports: array, + * viewports: array, * } $values */ public function __construct( diff --git a/src/Types/DocPagesViewports200ResponseViewportsItem.php b/src/Types/DocPagesViewportsResponseViewportsItem.php similarity index 64% rename from src/Types/DocPagesViewports200ResponseViewportsItem.php rename to src/Types/DocPagesViewportsResponseViewportsItem.php index 3b0543a3..a9dffbc9 100644 --- a/src/Types/DocPagesViewports200ResponseViewportsItem.php +++ b/src/Types/DocPagesViewportsResponseViewportsItem.php @@ -5,13 +5,13 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocPagesViewports200ResponseViewportsItem extends JsonSerializableType +class DocPagesViewportsResponseViewportsItem extends JsonSerializableType { /** - * @var DocPagesViewports200ResponseViewportsItemBbox $bbox + * @var DocPagesViewportsResponseViewportsItemBbox $bbox */ #[JsonProperty('bbox')] - public DocPagesViewports200ResponseViewportsItemBbox $bbox; + public DocPagesViewportsResponseViewportsItemBbox $bbox; /** * @var ?string $name @@ -20,10 +20,10 @@ class DocPagesViewports200ResponseViewportsItem extends JsonSerializableType public ?string $name; /** - * @var ?DocPagesViewports200ResponseViewportsItemMeasure $measure + * @var ?PdfMeasurement $measure A measure, by its `subtype`. A newer server can add subtypes: read one your client doesn't know as `unknown`. */ #[JsonProperty('measure')] - public ?DocPagesViewports200ResponseViewportsItemMeasure $measure; + public ?PdfMeasurement $measure; /** * @var bool $owned @@ -33,10 +33,10 @@ class DocPagesViewports200ResponseViewportsItem extends JsonSerializableType /** * @param array{ - * bbox: DocPagesViewports200ResponseViewportsItemBbox, + * bbox: DocPagesViewportsResponseViewportsItemBbox, * owned: bool, * name?: ?string, - * measure?: ?DocPagesViewports200ResponseViewportsItemMeasure, + * measure?: ?PdfMeasurement, * } $values */ public function __construct( diff --git a/src/Types/DocPagesViewports200ResponseViewportsItemBbox.php b/src/Types/DocPagesViewportsResponseViewportsItemBbox.php similarity index 92% rename from src/Types/DocPagesViewports200ResponseViewportsItemBbox.php rename to src/Types/DocPagesViewportsResponseViewportsItemBbox.php index 0eb3ffdc..1b051533 100644 --- a/src/Types/DocPagesViewports200ResponseViewportsItemBbox.php +++ b/src/Types/DocPagesViewportsResponseViewportsItemBbox.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocPagesViewports200ResponseViewportsItemBbox extends JsonSerializableType +class DocPagesViewportsResponseViewportsItemBbox extends JsonSerializableType { /** * @var float $x diff --git a/src/Types/DocRedactionsApply200Response.php b/src/Types/DocRedactionsApplyResponse.php similarity index 69% rename from src/Types/DocRedactionsApply200Response.php rename to src/Types/DocRedactionsApplyResponse.php index dba3a673..addcc88b 100644 --- a/src/Types/DocRedactionsApply200Response.php +++ b/src/Types/DocRedactionsApplyResponse.php @@ -6,18 +6,18 @@ use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; -class DocRedactionsApply200Response extends JsonSerializableType +class DocRedactionsApplyResponse extends JsonSerializableType { /** - * @var DocRedactionsApply200ResponseScope $scope + * @var DocRedactionsApplyResponseScope $scope */ #[JsonProperty('scope')] - public DocRedactionsApply200ResponseScope $scope; + public DocRedactionsApplyResponseScope $scope; /** - * @var array $results + * @var array $results */ - #[JsonProperty('results'), ArrayType([DocRedactionsApply200ResponseResultsItem::class])] + #[JsonProperty('results'), ArrayType([DocRedactionsApplyResponseResultsItem::class])] public array $results; /** @@ -34,8 +34,8 @@ class DocRedactionsApply200Response extends JsonSerializableType /** * @param array{ - * scope: DocRedactionsApply200ResponseScope, - * results: array, + * scope: DocRedactionsApplyResponseScope, + * results: array, * removedAnnotationCount: int, * meta: MutationMeta, * } $values diff --git a/src/Types/DocRedactionsApply200ResponseResultsItem.php b/src/Types/DocRedactionsApplyResponseResultsItem.php similarity index 79% rename from src/Types/DocRedactionsApply200ResponseResultsItem.php rename to src/Types/DocRedactionsApplyResponseResultsItem.php index bec6392f..acba2a22 100644 --- a/src/Types/DocRedactionsApply200ResponseResultsItem.php +++ b/src/Types/DocRedactionsApplyResponseResultsItem.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocRedactionsApply200ResponseResultsItem extends JsonSerializableType +class DocRedactionsApplyResponseResultsItem extends JsonSerializableType { /** * @var PageRef $page @@ -14,7 +14,7 @@ class DocRedactionsApply200ResponseResultsItem extends JsonSerializableType public PageRef $page; /** - * @var value-of $status + * @var value-of $status */ #[JsonProperty('status')] public string $status; @@ -28,7 +28,7 @@ class DocRedactionsApply200ResponseResultsItem extends JsonSerializableType /** * @param array{ * page: PageRef, - * status: value-of, + * status: value-of, * removedAnnotationCount: int, * } $values */ diff --git a/src/Types/DocAnnotationsFlatten200ResponseResultsItemStatus.php b/src/Types/DocRedactionsApplyResponseResultsItemStatus.php similarity index 61% rename from src/Types/DocAnnotationsFlatten200ResponseResultsItemStatus.php rename to src/Types/DocRedactionsApplyResponseResultsItemStatus.php index 0a320ef5..a580b95f 100644 --- a/src/Types/DocAnnotationsFlatten200ResponseResultsItemStatus.php +++ b/src/Types/DocRedactionsApplyResponseResultsItemStatus.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocAnnotationsFlatten200ResponseResultsItemStatus: string +enum DocRedactionsApplyResponseResultsItemStatus: string { case Applied = "applied"; case Unchanged = "unchanged"; diff --git a/src/Types/DocRedactionsApply200ResponseScope.php b/src/Types/DocRedactionsApplyResponseScope.php similarity index 92% rename from src/Types/DocRedactionsApply200ResponseScope.php rename to src/Types/DocRedactionsApplyResponseScope.php index b6295847..049fc2db 100644 --- a/src/Types/DocRedactionsApply200ResponseScope.php +++ b/src/Types/DocRedactionsApplyResponseScope.php @@ -6,7 +6,7 @@ use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; -class DocRedactionsApply200ResponseScope extends JsonSerializableType +class DocRedactionsApplyResponseScope extends JsonSerializableType { /** * @var ?array $pages diff --git a/src/Types/DocSignaturesAnalysis200Response.php b/src/Types/DocSignaturesAnalysisResponse.php similarity index 54% rename from src/Types/DocSignaturesAnalysis200Response.php rename to src/Types/DocSignaturesAnalysisResponse.php index 0bd110d8..a08f8381 100644 --- a/src/Types/DocSignaturesAnalysis200Response.php +++ b/src/Types/DocSignaturesAnalysisResponse.php @@ -6,10 +6,10 @@ use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; -class DocSignaturesAnalysis200Response extends JsonSerializableType +class DocSignaturesAnalysisResponse extends JsonSerializableType { /** - * @var value-of $mode + * @var value-of $mode */ #[JsonProperty('mode')] public string $mode; @@ -21,43 +21,43 @@ class DocSignaturesAnalysis200Response extends JsonSerializableType public int $policyVersion; /** - * @var DocSignaturesAnalysis200ResponseBasis $basis + * @var DocSignaturesAnalysisResponseBasis $basis */ #[JsonProperty('basis')] - public DocSignaturesAnalysis200ResponseBasis $basis; + public DocSignaturesAnalysisResponseBasis $basis; /** - * @var DocSignaturesAnalysis200ResponseSince $since + * @var DocSignaturesAnalysisResponseSince $since */ #[JsonProperty('since')] - public DocSignaturesAnalysis200ResponseSince $since; + public DocSignaturesAnalysisResponseSince $since; /** - * @var DocSignaturesAnalysis200ResponseUntil $until + * @var DocSignaturesAnalysisResponseUntil $until */ #[JsonProperty('until')] - public DocSignaturesAnalysis200ResponseUntil $until; + public DocSignaturesAnalysisResponseUntil $until; /** - * @var array $restrictions + * @var array $restrictions */ - #[JsonProperty('restrictions'), ArrayType([DocSignaturesAnalysis200ResponseRestrictionsItem::class])] + #[JsonProperty('restrictions'), ArrayType([DocSignaturesAnalysisResponseRestrictionsItem::class])] public array $restrictions; /** - * @var DocSignaturesAnalysis200ResponseCurrent $current + * @var DocSignaturesAnalysisResponseCurrent $current */ #[JsonProperty('current')] - public DocSignaturesAnalysis200ResponseCurrent $current; + public DocSignaturesAnalysisResponseCurrent $current; /** - * @var DocSignaturesAnalysis200ResponseLater $later + * @var DocSignaturesAnalysisResponseLater $later */ #[JsonProperty('later')] - public DocSignaturesAnalysis200ResponseLater $later; + public DocSignaturesAnalysisResponseLater $later; /** - * @var value-of $verdict + * @var value-of $verdict */ #[JsonProperty('verdict')] public string $verdict; @@ -70,15 +70,15 @@ class DocSignaturesAnalysis200Response extends JsonSerializableType /** * @param array{ - * mode: value-of, + * mode: value-of, * policyVersion: int, - * basis: DocSignaturesAnalysis200ResponseBasis, - * since: DocSignaturesAnalysis200ResponseSince, - * until: DocSignaturesAnalysis200ResponseUntil, - * restrictions: array, - * current: DocSignaturesAnalysis200ResponseCurrent, - * later: DocSignaturesAnalysis200ResponseLater, - * verdict: value-of, + * basis: DocSignaturesAnalysisResponseBasis, + * since: DocSignaturesAnalysisResponseSince, + * until: DocSignaturesAnalysisResponseUntil, + * restrictions: array, + * current: DocSignaturesAnalysisResponseCurrent, + * later: DocSignaturesAnalysisResponseLater, + * verdict: value-of, * steps: array, * } $values */ diff --git a/src/Types/DocVersionsAnalysis200ResponseBasis.php b/src/Types/DocSignaturesAnalysisResponseBasis.php similarity index 65% rename from src/Types/DocVersionsAnalysis200ResponseBasis.php rename to src/Types/DocSignaturesAnalysisResponseBasis.php index 91e61a68..9c556f79 100644 --- a/src/Types/DocVersionsAnalysis200ResponseBasis.php +++ b/src/Types/DocSignaturesAnalysisResponseBasis.php @@ -5,13 +5,13 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocVersionsAnalysis200ResponseBasis extends JsonSerializableType +class DocSignaturesAnalysisResponseBasis extends JsonSerializableType { /** - * @var DocVersionsAnalysis200ResponseBasisVersion $version + * @var DocSignaturesAnalysisResponseBasisVersion $version */ #[JsonProperty('version')] - public DocVersionsAnalysis200ResponseBasisVersion $version; + public DocSignaturesAnalysisResponseBasisVersion $version; /** * @var int $editsVersion @@ -20,16 +20,16 @@ class DocVersionsAnalysis200ResponseBasis extends JsonSerializableType public int $editsVersion; /** - * @var value-of $source + * @var value-of $source */ #[JsonProperty('source')] public string $source; /** * @param array{ - * version: DocVersionsAnalysis200ResponseBasisVersion, + * version: DocSignaturesAnalysisResponseBasisVersion, * editsVersion: int, - * source: value-of, + * source: value-of, * } $values */ public function __construct( diff --git a/src/Types/DocVersionsAnalysis200ResponseBasisSource.php b/src/Types/DocSignaturesAnalysisResponseBasisSource.php similarity index 66% rename from src/Types/DocVersionsAnalysis200ResponseBasisSource.php rename to src/Types/DocSignaturesAnalysisResponseBasisSource.php index 09e61bbe..cacc0d9c 100644 --- a/src/Types/DocVersionsAnalysis200ResponseBasisSource.php +++ b/src/Types/DocSignaturesAnalysisResponseBasisSource.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocVersionsAnalysis200ResponseBasisSource: string +enum DocSignaturesAnalysisResponseBasisSource: string { case Persisted = "persisted"; case WorkingCopy = "working-copy"; diff --git a/src/Types/DocVersionsAnalysis200ResponseBasisVersion.php b/src/Types/DocSignaturesAnalysisResponseBasisVersion.php similarity index 69% rename from src/Types/DocVersionsAnalysis200ResponseBasisVersion.php rename to src/Types/DocSignaturesAnalysisResponseBasisVersion.php index ec4496cf..b5694124 100644 --- a/src/Types/DocVersionsAnalysis200ResponseBasisVersion.php +++ b/src/Types/DocSignaturesAnalysisResponseBasisVersion.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocVersionsAnalysis200ResponseBasisVersion extends JsonSerializableType +class DocSignaturesAnalysisResponseBasisVersion extends JsonSerializableType { /** * @var string $sha256 @@ -14,22 +14,22 @@ class DocVersionsAnalysis200ResponseBasisVersion extends JsonSerializableType public string $sha256; /** - * @var int $byteLength + * @var int $sizeBytes */ - #[JsonProperty('byteLength')] - public int $byteLength; + #[JsonProperty('sizeBytes')] + public int $sizeBytes; /** * @param array{ * sha256: string, - * byteLength: int, + * sizeBytes: int, * } $values */ public function __construct( array $values, ) { $this->sha256 = $values['sha256']; - $this->byteLength = $values['byteLength']; + $this->sizeBytes = $values['sizeBytes']; } /** diff --git a/src/Types/DocSignaturesAnalysis200ResponseCurrent.php b/src/Types/DocSignaturesAnalysisResponseCurrent.php similarity index 57% rename from src/Types/DocSignaturesAnalysis200ResponseCurrent.php rename to src/Types/DocSignaturesAnalysisResponseCurrent.php index 59a7672d..56f06462 100644 --- a/src/Types/DocSignaturesAnalysis200ResponseCurrent.php +++ b/src/Types/DocSignaturesAnalysisResponseCurrent.php @@ -6,10 +6,10 @@ use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; -class DocSignaturesAnalysis200ResponseCurrent extends JsonSerializableType +class DocSignaturesAnalysisResponseCurrent extends JsonSerializableType { /** - * @var value-of $verdict + * @var value-of $verdict */ #[JsonProperty('verdict')] public string $verdict; @@ -21,30 +21,30 @@ class DocSignaturesAnalysis200ResponseCurrent extends JsonSerializableType public bool $complete; /** - * @var ?DocSignaturesAnalysis200ResponseCurrentPrimary $primary + * @var ?DocSignaturesAnalysisResponseCurrentPrimary $primary */ #[JsonProperty('primary')] - public ?DocSignaturesAnalysis200ResponseCurrentPrimary $primary; + public ?DocSignaturesAnalysisResponseCurrentPrimary $primary; /** - * @var array $findings + * @var array $findings */ - #[JsonProperty('findings'), ArrayType([DocSignaturesAnalysis200ResponseCurrentFindingsItem::class])] + #[JsonProperty('findings'), ArrayType([DocSignaturesAnalysisResponseCurrentFindingsItem::class])] public array $findings; /** - * @var value-of $method + * @var value-of $method */ #[JsonProperty('method')] public string $method; /** * @param array{ - * verdict: value-of, + * verdict: value-of, * complete: bool, - * findings: array, - * method: value-of, - * primary?: ?DocSignaturesAnalysis200ResponseCurrentPrimary, + * findings: array, + * method: value-of, + * primary?: ?DocSignaturesAnalysisResponseCurrentPrimary, * } $values */ public function __construct( diff --git a/src/Types/DocVersionsAnalysis200ResponseCurrentFindingsItem.php b/src/Types/DocSignaturesAnalysisResponseCurrentFindingsItem.php similarity index 82% rename from src/Types/DocVersionsAnalysis200ResponseCurrentFindingsItem.php rename to src/Types/DocSignaturesAnalysisResponseCurrentFindingsItem.php index 2ffa5d85..1d579901 100644 --- a/src/Types/DocVersionsAnalysis200ResponseCurrentFindingsItem.php +++ b/src/Types/DocSignaturesAnalysisResponseCurrentFindingsItem.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocVersionsAnalysis200ResponseCurrentFindingsItem extends JsonSerializableType +class DocSignaturesAnalysisResponseCurrentFindingsItem extends JsonSerializableType { /** * @var string $rule @@ -14,7 +14,7 @@ class DocVersionsAnalysis200ResponseCurrentFindingsItem extends JsonSerializable public string $rule; /** - * @var value-of $verdict + * @var value-of $verdict */ #[JsonProperty('verdict')] public string $verdict; @@ -40,7 +40,7 @@ class DocVersionsAnalysis200ResponseCurrentFindingsItem extends JsonSerializable /** * @param array{ * rule: string, - * verdict: value-of, + * verdict: value-of, * objectNumber: int, * edge?: ?string, * detail?: ?string, diff --git a/src/Types/DocVersionsAnalysis200ResponseCurrentFindingsItemVerdict.php b/src/Types/DocSignaturesAnalysisResponseCurrentFindingsItemVerdict.php similarity index 66% rename from src/Types/DocVersionsAnalysis200ResponseCurrentFindingsItemVerdict.php rename to src/Types/DocSignaturesAnalysisResponseCurrentFindingsItemVerdict.php index 21262cc6..0fa47833 100644 --- a/src/Types/DocVersionsAnalysis200ResponseCurrentFindingsItemVerdict.php +++ b/src/Types/DocSignaturesAnalysisResponseCurrentFindingsItemVerdict.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocVersionsAnalysis200ResponseCurrentFindingsItemVerdict: string +enum DocSignaturesAnalysisResponseCurrentFindingsItemVerdict: string { case Permitted = "permitted"; case Forbidden = "forbidden"; diff --git a/src/Types/DocVersionsAnalysis200ResponseCurrentMethod.php b/src/Types/DocSignaturesAnalysisResponseCurrentMethod.php similarity index 67% rename from src/Types/DocVersionsAnalysis200ResponseCurrentMethod.php rename to src/Types/DocSignaturesAnalysisResponseCurrentMethod.php index 817e6c21..9c06c6cd 100644 --- a/src/Types/DocVersionsAnalysis200ResponseCurrentMethod.php +++ b/src/Types/DocSignaturesAnalysisResponseCurrentMethod.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocVersionsAnalysis200ResponseCurrentMethod: string +enum DocSignaturesAnalysisResponseCurrentMethod: string { case NetState = "net-state"; case NetStateReplay = "net-state+replay"; diff --git a/src/Types/DocVersionsAnalysis200ResponseCurrentPrimary.php b/src/Types/DocSignaturesAnalysisResponseCurrentPrimary.php similarity index 83% rename from src/Types/DocVersionsAnalysis200ResponseCurrentPrimary.php rename to src/Types/DocSignaturesAnalysisResponseCurrentPrimary.php index caf6e0ed..7ee5b270 100644 --- a/src/Types/DocVersionsAnalysis200ResponseCurrentPrimary.php +++ b/src/Types/DocSignaturesAnalysisResponseCurrentPrimary.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocVersionsAnalysis200ResponseCurrentPrimary extends JsonSerializableType +class DocSignaturesAnalysisResponseCurrentPrimary extends JsonSerializableType { /** * @var string $rule @@ -14,7 +14,7 @@ class DocVersionsAnalysis200ResponseCurrentPrimary extends JsonSerializableType public string $rule; /** - * @var value-of $verdict + * @var value-of $verdict */ #[JsonProperty('verdict')] public string $verdict; @@ -40,7 +40,7 @@ class DocVersionsAnalysis200ResponseCurrentPrimary extends JsonSerializableType /** * @param array{ * rule: string, - * verdict: value-of, + * verdict: value-of, * objectNumber: int, * edge?: ?string, * detail?: ?string, diff --git a/src/Types/DocVersionsAnalysis200ResponseCurrentPrimaryVerdict.php b/src/Types/DocSignaturesAnalysisResponseCurrentPrimaryVerdict.php similarity index 68% rename from src/Types/DocVersionsAnalysis200ResponseCurrentPrimaryVerdict.php rename to src/Types/DocSignaturesAnalysisResponseCurrentPrimaryVerdict.php index 6bc920a9..30a23e5e 100644 --- a/src/Types/DocVersionsAnalysis200ResponseCurrentPrimaryVerdict.php +++ b/src/Types/DocSignaturesAnalysisResponseCurrentPrimaryVerdict.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocVersionsAnalysis200ResponseCurrentPrimaryVerdict: string +enum DocSignaturesAnalysisResponseCurrentPrimaryVerdict: string { case Permitted = "permitted"; case Forbidden = "forbidden"; diff --git a/src/Types/DocVersionsAnalysis200ResponseCurrentVerdict.php b/src/Types/DocSignaturesAnalysisResponseCurrentVerdict.php similarity index 75% rename from src/Types/DocVersionsAnalysis200ResponseCurrentVerdict.php rename to src/Types/DocSignaturesAnalysisResponseCurrentVerdict.php index 5a3d74f2..2df3514e 100644 --- a/src/Types/DocVersionsAnalysis200ResponseCurrentVerdict.php +++ b/src/Types/DocSignaturesAnalysisResponseCurrentVerdict.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocVersionsAnalysis200ResponseCurrentVerdict: string +enum DocSignaturesAnalysisResponseCurrentVerdict: string { case Unchanged = "unchanged"; case Permitted = "permitted"; diff --git a/src/Types/DocVersionsAnalysis200ResponseLater.php b/src/Types/DocSignaturesAnalysisResponseLater.php similarity index 92% rename from src/Types/DocVersionsAnalysis200ResponseLater.php rename to src/Types/DocSignaturesAnalysisResponseLater.php index d5624701..bd48b610 100644 --- a/src/Types/DocVersionsAnalysis200ResponseLater.php +++ b/src/Types/DocSignaturesAnalysisResponseLater.php @@ -6,7 +6,7 @@ use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; -class DocVersionsAnalysis200ResponseLater extends JsonSerializableType +class DocSignaturesAnalysisResponseLater extends JsonSerializableType { /** * @var int $revisionCount diff --git a/src/Types/DocVersionsAnalysis200ResponseMode.php b/src/Types/DocSignaturesAnalysisResponseMode.php similarity index 71% rename from src/Types/DocVersionsAnalysis200ResponseMode.php rename to src/Types/DocSignaturesAnalysisResponseMode.php index 4cbb207f..5a540d36 100644 --- a/src/Types/DocVersionsAnalysis200ResponseMode.php +++ b/src/Types/DocSignaturesAnalysisResponseMode.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocVersionsAnalysis200ResponseMode: string +enum DocSignaturesAnalysisResponseMode: string { case Authoritative = "authoritative"; case Exploratory = "exploratory"; diff --git a/src/Types/DocVersionsAnalysis200ResponseRestrictionsItem.php b/src/Types/DocSignaturesAnalysisResponseRestrictionsItem.php similarity index 79% rename from src/Types/DocVersionsAnalysis200ResponseRestrictionsItem.php rename to src/Types/DocSignaturesAnalysisResponseRestrictionsItem.php index 4d7d6be4..8b914295 100644 --- a/src/Types/DocVersionsAnalysis200ResponseRestrictionsItem.php +++ b/src/Types/DocSignaturesAnalysisResponseRestrictionsItem.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocVersionsAnalysis200ResponseRestrictionsItem extends JsonSerializableType +class DocSignaturesAnalysisResponseRestrictionsItem extends JsonSerializableType { /** * @var int $signatureIndex @@ -20,7 +20,7 @@ class DocVersionsAnalysis200ResponseRestrictionsItem extends JsonSerializableTyp public int $revisionIndex; /** - * @var value-of $source + * @var value-of $source */ #[JsonProperty('source')] public string $source; @@ -32,10 +32,10 @@ class DocVersionsAnalysis200ResponseRestrictionsItem extends JsonSerializableTyp public bool $own; /** - * @var ?float $permission + * @var ?int $permission */ #[JsonProperty('permission')] - public ?float $permission; + public ?int $permission; /** * @var mixed $fields @@ -47,9 +47,9 @@ class DocVersionsAnalysis200ResponseRestrictionsItem extends JsonSerializableTyp * @param array{ * signatureIndex: int, * revisionIndex: int, - * source: value-of, + * source: value-of, * own: bool, - * permission?: ?float, + * permission?: ?int, * fields?: mixed, * } $values */ diff --git a/src/Types/DocVersionsAnalysis200ResponseRestrictionsItemSource.php b/src/Types/DocSignaturesAnalysisResponseRestrictionsItemSource.php similarity index 64% rename from src/Types/DocVersionsAnalysis200ResponseRestrictionsItemSource.php rename to src/Types/DocSignaturesAnalysisResponseRestrictionsItemSource.php index e6d5fa4f..7b0c5f13 100644 --- a/src/Types/DocVersionsAnalysis200ResponseRestrictionsItemSource.php +++ b/src/Types/DocSignaturesAnalysisResponseRestrictionsItemSource.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocVersionsAnalysis200ResponseRestrictionsItemSource: string +enum DocSignaturesAnalysisResponseRestrictionsItemSource: string { case Docmdp = "docmdp"; case Fieldmdp = "fieldmdp"; diff --git a/src/Types/DocVersionsAnalysis200ResponseSince.php b/src/Types/DocSignaturesAnalysisResponseSince.php similarity index 91% rename from src/Types/DocVersionsAnalysis200ResponseSince.php rename to src/Types/DocSignaturesAnalysisResponseSince.php index dc0e8902..b57e5810 100644 --- a/src/Types/DocVersionsAnalysis200ResponseSince.php +++ b/src/Types/DocSignaturesAnalysisResponseSince.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocVersionsAnalysis200ResponseSince extends JsonSerializableType +class DocSignaturesAnalysisResponseSince extends JsonSerializableType { /** * @var int $revisionIndex diff --git a/src/Types/DocVersionsAnalysis200ResponseUntil.php b/src/Types/DocSignaturesAnalysisResponseUntil.php similarity index 88% rename from src/Types/DocVersionsAnalysis200ResponseUntil.php rename to src/Types/DocSignaturesAnalysisResponseUntil.php index 062e5ba2..c4c301eb 100644 --- a/src/Types/DocVersionsAnalysis200ResponseUntil.php +++ b/src/Types/DocSignaturesAnalysisResponseUntil.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocVersionsAnalysis200ResponseUntil extends JsonSerializableType +class DocSignaturesAnalysisResponseUntil extends JsonSerializableType { /** * @var int $revisionIndex diff --git a/src/Types/DocVersionsAnalysis200ResponseVerdict.php b/src/Types/DocSignaturesAnalysisResponseVerdict.php similarity index 78% rename from src/Types/DocVersionsAnalysis200ResponseVerdict.php rename to src/Types/DocSignaturesAnalysisResponseVerdict.php index 47f83cbb..07fb6b0e 100644 --- a/src/Types/DocVersionsAnalysis200ResponseVerdict.php +++ b/src/Types/DocSignaturesAnalysisResponseVerdict.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocVersionsAnalysis200ResponseVerdict: string +enum DocSignaturesAnalysisResponseVerdict: string { case Unchanged = "unchanged"; case Permitted = "permitted"; diff --git a/src/Types/DocSignaturesCancel200Response.php b/src/Types/DocSignaturesCancelResponse.php similarity index 71% rename from src/Types/DocSignaturesCancel200Response.php rename to src/Types/DocSignaturesCancelResponse.php index 537c7ec5..3f7db3c5 100644 --- a/src/Types/DocSignaturesCancel200Response.php +++ b/src/Types/DocSignaturesCancelResponse.php @@ -5,17 +5,17 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocSignaturesCancel200Response extends JsonSerializableType +class DocSignaturesCancelResponse extends JsonSerializableType { /** - * @var value-of $status + * @var value-of $status */ #[JsonProperty('status')] public string $status; /** * @param array{ - * status: value-of, + * status: value-of, * } $values */ public function __construct( diff --git a/src/Types/DocSignaturesCancel200ResponseStatus.php b/src/Types/DocSignaturesCancelResponseStatus.php similarity index 75% rename from src/Types/DocSignaturesCancel200ResponseStatus.php rename to src/Types/DocSignaturesCancelResponseStatus.php index 21e39272..d4cd87f4 100644 --- a/src/Types/DocSignaturesCancel200ResponseStatus.php +++ b/src/Types/DocSignaturesCancelResponseStatus.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocSignaturesCancel200ResponseStatus: string +enum DocSignaturesCancelResponseStatus: string { case Cancelled = "cancelled"; case AlreadyCompleted = "already-completed"; diff --git a/src/Types/DocSignaturesComplete200ResponseProtectionEnforced.php b/src/Types/DocSignaturesComplete200ResponseProtectionEnforced.php deleted file mode 100644 index 74c88664..00000000 --- a/src/Types/DocSignaturesComplete200ResponseProtectionEnforced.php +++ /dev/null @@ -1,11 +0,0 @@ - $action - */ - #[JsonProperty('action')] - public string $action; - - /** - * @var array $fields - */ - #[JsonProperty('fields'), ArrayType(['string'])] - public array $fields; - - /** - * @var ?float $permission - */ - #[JsonProperty('permission')] - public ?float $permission; - - /** - * @param array{ - * action: value-of, - * fields: array, - * permission?: ?float, - * } $values - */ - public function __construct( - array $values, - ) { - $this->action = $values['action']; - $this->fields = $values['fields']; - $this->permission = $values['permission'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/DocSignaturesComplete200ResponseProtectionFieldLocksItemSpecAction.php b/src/Types/DocSignaturesComplete200ResponseProtectionFieldLocksItemSpecAction.php deleted file mode 100644 index f50df38c..00000000 --- a/src/Types/DocSignaturesComplete200ResponseProtectionFieldLocksItemSpecAction.php +++ /dev/null @@ -1,10 +0,0 @@ - $action - */ - #[JsonProperty('action')] - public string $action; - - /** - * @var array $fields - */ - #[JsonProperty('fields'), ArrayType(['string'])] - public array $fields; - - /** - * @var ?float $permission - */ - #[JsonProperty('permission')] - public ?float $permission; - - /** - * @param array{ - * action: value-of, - * fields: array, - * permission?: ?float, - * } $values - */ - public function __construct( - array $values, - ) { - $this->action = $values['action']; - $this->fields = $values['fields']; - $this->permission = $values['permission'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/DocSignaturesComplete200ResponseSignatureFieldMdpAction.php b/src/Types/DocSignaturesComplete200ResponseSignatureFieldMdpAction.php deleted file mode 100644 index 8b6ebf48..00000000 --- a/src/Types/DocSignaturesComplete200ResponseSignatureFieldMdpAction.php +++ /dev/null @@ -1,10 +0,0 @@ - $status + * @var value-of $status */ #[JsonProperty('status')] public string $status; /** - * @var DocSignaturesComplete200ResponseSignature $signature + * @var DocSignaturesCompleteResponseSignature $signature */ #[JsonProperty('signature')] - public DocSignaturesComplete200ResponseSignature $signature; + public DocSignaturesCompleteResponseSignature $signature; /** - * @var DocSignaturesComplete200ResponseVersion $version + * @var DocSignaturesCompleteResponseVersion $version */ #[JsonProperty('version')] - public DocSignaturesComplete200ResponseVersion $version; + public DocSignaturesCompleteResponseVersion $version; /** - * @var DocSignaturesComplete200ResponsePrevious $previous + * @var DocSignaturesCompleteResponsePrevious $previous */ #[JsonProperty('previous')] - public DocSignaturesComplete200ResponsePrevious $previous; + public DocSignaturesCompleteResponsePrevious $previous; /** - * @var DocSignaturesComplete200ResponseProtection $protection + * @var DocSignaturesCompleteResponseProtection $protection */ #[JsonProperty('protection')] - public DocSignaturesComplete200ResponseProtection $protection; + public DocSignaturesCompleteResponseProtection $protection; /** * @var MutationMeta $meta @@ -45,11 +45,11 @@ class DocSignaturesComplete200Response extends JsonSerializableType /** * @param array{ - * status: value-of, - * signature: DocSignaturesComplete200ResponseSignature, - * version: DocSignaturesComplete200ResponseVersion, - * previous: DocSignaturesComplete200ResponsePrevious, - * protection: DocSignaturesComplete200ResponseProtection, + * status: value-of, + * signature: DocSignaturesCompleteResponseSignature, + * version: DocSignaturesCompleteResponseVersion, + * previous: DocSignaturesCompleteResponsePrevious, + * protection: DocSignaturesCompleteResponseProtection, * meta: MutationMeta, * } $values */ diff --git a/src/Types/DocSignaturesComplete200ResponsePrevious.php b/src/Types/DocSignaturesCompleteResponsePrevious.php similarity index 90% rename from src/Types/DocSignaturesComplete200ResponsePrevious.php rename to src/Types/DocSignaturesCompleteResponsePrevious.php index 908998f9..960f56e5 100644 --- a/src/Types/DocSignaturesComplete200ResponsePrevious.php +++ b/src/Types/DocSignaturesCompleteResponsePrevious.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocSignaturesComplete200ResponsePrevious extends JsonSerializableType +class DocSignaturesCompleteResponsePrevious extends JsonSerializableType { /** * @var string $baseSha256 diff --git a/src/Types/DocSignaturesComplete200ResponseProtection.php b/src/Types/DocSignaturesCompleteResponseProtection.php similarity index 56% rename from src/Types/DocSignaturesComplete200ResponseProtection.php rename to src/Types/DocSignaturesCompleteResponseProtection.php index dfa32bc1..b920d094 100644 --- a/src/Types/DocSignaturesComplete200ResponseProtection.php +++ b/src/Types/DocSignaturesCompleteResponseProtection.php @@ -6,30 +6,30 @@ use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; -class DocSignaturesComplete200ResponseProtection extends JsonSerializableType +class DocSignaturesCompleteResponseProtection extends JsonSerializableType { /** - * @var ?value-of $enforced + * @var ?value-of $enforced */ #[JsonProperty('enforced')] public ?string $enforced; /** - * @var ?value-of $judged + * @var ?value-of $judged */ #[JsonProperty('judged')] public ?string $judged; /** - * @var ?DocSignaturesComplete200ResponseProtectionCertification $certification + * @var ?DocSignaturesCompleteResponseProtectionCertification $certification */ #[JsonProperty('certification')] - public ?DocSignaturesComplete200ResponseProtectionCertification $certification; + public ?DocSignaturesCompleteResponseProtectionCertification $certification; /** - * @var array $fieldLocks + * @var array $fieldLocks */ - #[JsonProperty('fieldLocks'), ArrayType([DocSignaturesComplete200ResponseProtectionFieldLocksItem::class])] + #[JsonProperty('fieldLocks'), ArrayType([DocSignaturesCompleteResponseProtectionFieldLocksItem::class])] public array $fieldLocks; /** @@ -40,11 +40,11 @@ class DocSignaturesComplete200ResponseProtection extends JsonSerializableType /** * @param array{ - * fieldLocks: array, + * fieldLocks: array, * policyVersion: int, - * enforced?: ?value-of, - * judged?: ?value-of, - * certification?: ?DocSignaturesComplete200ResponseProtectionCertification, + * enforced?: ?value-of, + * judged?: ?value-of, + * certification?: ?DocSignaturesCompleteResponseProtectionCertification, * } $values */ public function __construct( diff --git a/src/Types/DocSignaturesList200ResponseProtectionCertification.php b/src/Types/DocSignaturesCompleteResponseProtectionCertification.php similarity index 72% rename from src/Types/DocSignaturesList200ResponseProtectionCertification.php rename to src/Types/DocSignaturesCompleteResponseProtectionCertification.php index 0388f0b9..cc23dd3f 100644 --- a/src/Types/DocSignaturesList200ResponseProtectionCertification.php +++ b/src/Types/DocSignaturesCompleteResponseProtectionCertification.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocSignaturesList200ResponseProtectionCertification extends JsonSerializableType +class DocSignaturesCompleteResponseProtectionCertification extends JsonSerializableType { /** * @var int $signatureIndex @@ -14,22 +14,22 @@ class DocSignaturesList200ResponseProtectionCertification extends JsonSerializab public int $signatureIndex; /** - * @var ?float $permission + * @var int $permission */ #[JsonProperty('permission')] - public ?float $permission; + public int $permission; /** * @param array{ * signatureIndex: int, - * permission?: ?float, + * permission: int, * } $values */ public function __construct( array $values, ) { $this->signatureIndex = $values['signatureIndex']; - $this->permission = $values['permission'] ?? null; + $this->permission = $values['permission']; } /** diff --git a/src/Types/DocSignaturesCompleteResponseProtectionEnforced.php b/src/Types/DocSignaturesCompleteResponseProtectionEnforced.php new file mode 100644 index 00000000..993e151a --- /dev/null +++ b/src/Types/DocSignaturesCompleteResponseProtectionEnforced.php @@ -0,0 +1,11 @@ + $source + * @var value-of $source */ #[JsonProperty('source')] public string $source; /** - * @var ?DocSignaturesList200ResponseProtectionFieldLocksItemSpec $spec + * @var FieldLockSpec $spec */ #[JsonProperty('spec')] - public ?DocSignaturesList200ResponseProtectionFieldLocksItemSpec $spec; + public FieldLockSpec $spec; /** * @param array{ * signatureIndex: int, - * source: value-of, - * spec?: ?DocSignaturesList200ResponseProtectionFieldLocksItemSpec, + * source: value-of, + * spec: FieldLockSpec, * } $values */ public function __construct( @@ -37,7 +37,7 @@ public function __construct( ) { $this->signatureIndex = $values['signatureIndex']; $this->source = $values['source']; - $this->spec = $values['spec'] ?? null; + $this->spec = $values['spec']; } /** diff --git a/src/Types/DocVersionsSignatures200ResponseProtectionFieldLocksItemSource.php b/src/Types/DocSignaturesCompleteResponseProtectionFieldLocksItemSource.php similarity index 55% rename from src/Types/DocVersionsSignatures200ResponseProtectionFieldLocksItemSource.php rename to src/Types/DocSignaturesCompleteResponseProtectionFieldLocksItemSource.php index 80f3ddbc..6761a567 100644 --- a/src/Types/DocVersionsSignatures200ResponseProtectionFieldLocksItemSource.php +++ b/src/Types/DocSignaturesCompleteResponseProtectionFieldLocksItemSource.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocVersionsSignatures200ResponseProtectionFieldLocksItemSource: string +enum DocSignaturesCompleteResponseProtectionFieldLocksItemSource: string { case Fieldmdp = "fieldmdp"; case Lock = "lock"; diff --git a/src/Types/DocSignaturesList200ResponseProtectionEnforced.php b/src/Types/DocSignaturesCompleteResponseProtectionJudged.php similarity index 70% rename from src/Types/DocSignaturesList200ResponseProtectionEnforced.php rename to src/Types/DocSignaturesCompleteResponseProtectionJudged.php index d2b72343..3e12cacc 100644 --- a/src/Types/DocSignaturesList200ResponseProtectionEnforced.php +++ b/src/Types/DocSignaturesCompleteResponseProtectionJudged.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocSignaturesList200ResponseProtectionEnforced: string +enum DocSignaturesCompleteResponseProtectionJudged: string { case None = "none"; case Lta = "lta"; diff --git a/src/Types/DocSignaturesComplete200ResponseSignature.php b/src/Types/DocSignaturesCompleteResponseSignature.php similarity index 67% rename from src/Types/DocSignaturesComplete200ResponseSignature.php rename to src/Types/DocSignaturesCompleteResponseSignature.php index e831bf18..0d68faa9 100644 --- a/src/Types/DocSignaturesComplete200ResponseSignature.php +++ b/src/Types/DocSignaturesCompleteResponseSignature.php @@ -6,7 +6,7 @@ use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; -class DocSignaturesComplete200ResponseSignature extends JsonSerializableType +class DocSignaturesCompleteResponseSignature extends JsonSerializableType { /** * @var int $index @@ -39,7 +39,7 @@ class DocSignaturesComplete200ResponseSignature extends JsonSerializableType public bool $signed; /** - * @var value-of $kind + * @var value-of $kind */ #[JsonProperty('kind')] public string $kind; @@ -63,13 +63,13 @@ class DocSignaturesComplete200ResponseSignature extends JsonSerializableType public ?array $byteRange; /** - * @var int $contentsSize + * @var int $contentsSizeBytes */ - #[JsonProperty('contentsSize')] - public int $contentsSize; + #[JsonProperty('contentsSizeBytes')] + public int $contentsSizeBytes; /** - * @var ?value-of $coverage + * @var ?value-of $coverage */ #[JsonProperty('coverage')] public ?string $coverage; @@ -81,16 +81,16 @@ class DocSignaturesComplete200ResponseSignature extends JsonSerializableType public ?int $revisionIndex; /** - * @var DocSignaturesComplete200ResponseSignatureSigner $signer + * @var DocSignaturesCompleteResponseSignatureSigner $signer */ #[JsonProperty('signer')] - public DocSignaturesComplete200ResponseSignatureSigner $signer; + public DocSignaturesCompleteResponseSignatureSigner $signer; /** - * @var ?float $docMdp + * @var ?int $docMdp */ #[JsonProperty('docMdp')] - public ?float $docMdp; + public ?int $docMdp; /** * @var bool $catalogCertification @@ -99,22 +99,22 @@ class DocSignaturesComplete200ResponseSignature extends JsonSerializableType public bool $catalogCertification; /** - * @var ?DocSignaturesComplete200ResponseSignatureFieldMdp $fieldMdp + * @var ?FieldLockSpec $fieldMdp */ #[JsonProperty('fieldMdp')] - public ?DocSignaturesComplete200ResponseSignatureFieldMdp $fieldMdp; + public ?FieldLockSpec $fieldMdp; /** - * @var ?DocSignaturesComplete200ResponseSignatureLock $lock + * @var ?FieldLockSpec $lock */ #[JsonProperty('lock')] - public ?DocSignaturesComplete200ResponseSignatureLock $lock; + public ?FieldLockSpec $lock; /** - * @var ?DocSignaturesComplete200ResponseSignatureSeedValue $seedValue + * @var ?DocSignaturesCompleteResponseSignatureSeedValue $seedValue */ #[JsonProperty('seedValue')] - public ?DocSignaturesComplete200ResponseSignatureSeedValue $seedValue; + public ?DocSignaturesCompleteResponseSignatureSeedValue $seedValue; /** * @param array{ @@ -122,20 +122,20 @@ class DocSignaturesComplete200ResponseSignature extends JsonSerializableType * field: FormFieldRef, * fieldName: string, * signed: bool, - * kind: value-of, - * contentsSize: int, - * signer: DocSignaturesComplete200ResponseSignatureSigner, + * kind: value-of, + * contentsSizeBytes: int, + * signer: DocSignaturesCompleteResponseSignatureSigner, * catalogCertification: bool, * widget?: ?FormWidget, * filter?: ?string, * subFilter?: ?string, * byteRange?: ?array, - * coverage?: ?value-of, + * coverage?: ?value-of, * revisionIndex?: ?int, - * docMdp?: ?float, - * fieldMdp?: ?DocSignaturesComplete200ResponseSignatureFieldMdp, - * lock?: ?DocSignaturesComplete200ResponseSignatureLock, - * seedValue?: ?DocSignaturesComplete200ResponseSignatureSeedValue, + * docMdp?: ?int, + * fieldMdp?: ?FieldLockSpec, + * lock?: ?FieldLockSpec, + * seedValue?: ?DocSignaturesCompleteResponseSignatureSeedValue, * } $values */ public function __construct( @@ -150,7 +150,7 @@ public function __construct( $this->filter = $values['filter'] ?? null; $this->subFilter = $values['subFilter'] ?? null; $this->byteRange = $values['byteRange'] ?? null; - $this->contentsSize = $values['contentsSize']; + $this->contentsSizeBytes = $values['contentsSizeBytes']; $this->coverage = $values['coverage'] ?? null; $this->revisionIndex = $values['revisionIndex'] ?? null; $this->signer = $values['signer']; diff --git a/src/Types/DocSignaturesComplete200ResponseSignatureCoverage.php b/src/Types/DocSignaturesCompleteResponseSignatureCoverage.php similarity index 69% rename from src/Types/DocSignaturesComplete200ResponseSignatureCoverage.php rename to src/Types/DocSignaturesCompleteResponseSignatureCoverage.php index 3824166b..155eec26 100644 --- a/src/Types/DocSignaturesComplete200ResponseSignatureCoverage.php +++ b/src/Types/DocSignaturesCompleteResponseSignatureCoverage.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocSignaturesComplete200ResponseSignatureCoverage: string +enum DocSignaturesCompleteResponseSignatureCoverage: string { case WholeRevision = "whole-revision"; case Partial = "partial"; diff --git a/src/Types/DocSignaturesComplete200ResponseSignatureKind.php b/src/Types/DocSignaturesCompleteResponseSignatureKind.php similarity index 64% rename from src/Types/DocSignaturesComplete200ResponseSignatureKind.php rename to src/Types/DocSignaturesCompleteResponseSignatureKind.php index 68585a7f..e48d8cfd 100644 --- a/src/Types/DocSignaturesComplete200ResponseSignatureKind.php +++ b/src/Types/DocSignaturesCompleteResponseSignatureKind.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocSignaturesComplete200ResponseSignatureKind: string +enum DocSignaturesCompleteResponseSignatureKind: string { case Signature = "signature"; case Timestamp = "timestamp"; diff --git a/src/Types/DocSignaturesComplete200ResponseSignatureSeedValue.php b/src/Types/DocSignaturesCompleteResponseSignatureSeedValue.php similarity index 52% rename from src/Types/DocSignaturesComplete200ResponseSignatureSeedValue.php rename to src/Types/DocSignaturesCompleteResponseSignatureSeedValue.php index f1389261..caa0782a 100644 --- a/src/Types/DocSignaturesComplete200ResponseSignatureSeedValue.php +++ b/src/Types/DocSignaturesCompleteResponseSignatureSeedValue.php @@ -6,31 +6,25 @@ use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; -class DocSignaturesComplete200ResponseSignatureSeedValue extends JsonSerializableType +class DocSignaturesCompleteResponseSignatureSeedValue extends JsonSerializableType { /** - * @var int $requiredFlags + * @var ?int $parserVersion */ - #[JsonProperty('requiredFlags')] - public int $requiredFlags; + #[JsonProperty('parserVersion')] + public ?int $parserVersion; /** - * @var int $presentFlags + * @var bool $parserVersionRequired */ - #[JsonProperty('presentFlags')] - public int $presentFlags; + #[JsonProperty('parserVersionRequired')] + public bool $parserVersionRequired; /** - * @var ?int $version - */ - #[JsonProperty('version')] - public ?int $version; - - /** - * @var ?float $mdp + * @var ?int $mdp */ #[JsonProperty('mdp')] - public ?float $mdp; + public ?int $mdp; /** * @var ?string $filter @@ -38,24 +32,48 @@ class DocSignaturesComplete200ResponseSignatureSeedValue extends JsonSerializabl #[JsonProperty('filter')] public ?string $filter; + /** + * @var bool $filterRequired + */ + #[JsonProperty('filterRequired')] + public bool $filterRequired; + /** * @var array $subFilters */ #[JsonProperty('subFilters'), ArrayType(['string'])] public array $subFilters; + /** + * @var bool $subFiltersRequired + */ + #[JsonProperty('subFiltersRequired')] + public bool $subFiltersRequired; + /** * @var array $digestMethods */ #[JsonProperty('digestMethods'), ArrayType(['string'])] public array $digestMethods; + /** + * @var bool $digestMethodsRequired + */ + #[JsonProperty('digestMethodsRequired')] + public bool $digestMethodsRequired; + /** * @var array $reasons */ #[JsonProperty('reasons'), ArrayType(['string'])] public array $reasons; + /** + * @var bool $reasonsRequired + */ + #[JsonProperty('reasonsRequired')] + public bool $reasonsRequired; + /** * @var bool $unsupportedRequired */ @@ -64,28 +82,34 @@ class DocSignaturesComplete200ResponseSignatureSeedValue extends JsonSerializabl /** * @param array{ - * requiredFlags: int, - * presentFlags: int, + * parserVersionRequired: bool, + * filterRequired: bool, * subFilters: array, + * subFiltersRequired: bool, * digestMethods: array, + * digestMethodsRequired: bool, * reasons: array, + * reasonsRequired: bool, * unsupportedRequired: bool, - * version?: ?int, - * mdp?: ?float, + * parserVersion?: ?int, + * mdp?: ?int, * filter?: ?string, * } $values */ public function __construct( array $values, ) { - $this->requiredFlags = $values['requiredFlags']; - $this->presentFlags = $values['presentFlags']; - $this->version = $values['version'] ?? null; + $this->parserVersion = $values['parserVersion'] ?? null; + $this->parserVersionRequired = $values['parserVersionRequired']; $this->mdp = $values['mdp'] ?? null; $this->filter = $values['filter'] ?? null; + $this->filterRequired = $values['filterRequired']; $this->subFilters = $values['subFilters']; + $this->subFiltersRequired = $values['subFiltersRequired']; $this->digestMethods = $values['digestMethods']; + $this->digestMethodsRequired = $values['digestMethodsRequired']; $this->reasons = $values['reasons']; + $this->reasonsRequired = $values['reasonsRequired']; $this->unsupportedRequired = $values['unsupportedRequired']; } diff --git a/src/Types/DocSignaturesComplete200ResponseSignatureSigner.php b/src/Types/DocSignaturesCompleteResponseSignatureSigner.php similarity index 94% rename from src/Types/DocSignaturesComplete200ResponseSignatureSigner.php rename to src/Types/DocSignaturesCompleteResponseSignatureSigner.php index 8cee15bc..bb73441d 100644 --- a/src/Types/DocSignaturesComplete200ResponseSignatureSigner.php +++ b/src/Types/DocSignaturesCompleteResponseSignatureSigner.php @@ -7,7 +7,7 @@ use DateTime; use CloudPDF\Core\Types\Date; -class DocSignaturesComplete200ResponseSignatureSigner extends JsonSerializableType +class DocSignaturesCompleteResponseSignatureSigner extends JsonSerializableType { /** * @var ?string $name diff --git a/src/Types/DocSignaturesComplete200ResponseStatus.php b/src/Types/DocSignaturesCompleteResponseStatus.php similarity index 69% rename from src/Types/DocSignaturesComplete200ResponseStatus.php rename to src/Types/DocSignaturesCompleteResponseStatus.php index ab544f9b..b4ea5365 100644 --- a/src/Types/DocSignaturesComplete200ResponseStatus.php +++ b/src/Types/DocSignaturesCompleteResponseStatus.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocSignaturesComplete200ResponseStatus: string +enum DocSignaturesCompleteResponseStatus: string { case Completed = "completed"; case AlreadyCompleted = "already-completed"; diff --git a/src/Types/DocSignaturesAnalysis200ResponseBasisVersion.php b/src/Types/DocSignaturesCompleteResponseVersion.php similarity index 69% rename from src/Types/DocSignaturesAnalysis200ResponseBasisVersion.php rename to src/Types/DocSignaturesCompleteResponseVersion.php index 0754a758..d0cad42d 100644 --- a/src/Types/DocSignaturesAnalysis200ResponseBasisVersion.php +++ b/src/Types/DocSignaturesCompleteResponseVersion.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocSignaturesAnalysis200ResponseBasisVersion extends JsonSerializableType +class DocSignaturesCompleteResponseVersion extends JsonSerializableType { /** * @var string $sha256 @@ -14,22 +14,22 @@ class DocSignaturesAnalysis200ResponseBasisVersion extends JsonSerializableType public string $sha256; /** - * @var int $byteLength + * @var int $sizeBytes */ - #[JsonProperty('byteLength')] - public int $byteLength; + #[JsonProperty('sizeBytes')] + public int $sizeBytes; /** * @param array{ * sha256: string, - * byteLength: int, + * sizeBytes: int, * } $values */ public function __construct( array $values, ) { $this->sha256 = $values['sha256']; - $this->byteLength = $values['byteLength']; + $this->sizeBytes = $values['sizeBytes']; } /** diff --git a/src/Types/DocSignaturesList200ResponseProtectionFieldLocksItemSpec.php b/src/Types/DocSignaturesList200ResponseProtectionFieldLocksItemSpec.php deleted file mode 100644 index f5096c58..00000000 --- a/src/Types/DocSignaturesList200ResponseProtectionFieldLocksItemSpec.php +++ /dev/null @@ -1,51 +0,0 @@ - $action - */ - #[JsonProperty('action')] - public string $action; - - /** - * @var array $fields - */ - #[JsonProperty('fields'), ArrayType(['string'])] - public array $fields; - - /** - * @var ?float $permission - */ - #[JsonProperty('permission')] - public ?float $permission; - - /** - * @param array{ - * action: value-of, - * fields: array, - * permission?: ?float, - * } $values - */ - public function __construct( - array $values, - ) { - $this->action = $values['action']; - $this->fields = $values['fields']; - $this->permission = $values['permission'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/DocSignaturesList200ResponseProtectionFieldLocksItemSpecAction.php b/src/Types/DocSignaturesList200ResponseProtectionFieldLocksItemSpecAction.php deleted file mode 100644 index 7e4641b5..00000000 --- a/src/Types/DocSignaturesList200ResponseProtectionFieldLocksItemSpecAction.php +++ /dev/null @@ -1,10 +0,0 @@ - $action - */ - #[JsonProperty('action')] - public string $action; - - /** - * @var array $fields - */ - #[JsonProperty('fields'), ArrayType(['string'])] - public array $fields; - - /** - * @var ?float $permission - */ - #[JsonProperty('permission')] - public ?float $permission; - - /** - * @param array{ - * action: value-of, - * fields: array, - * permission?: ?float, - * } $values - */ - public function __construct( - array $values, - ) { - $this->action = $values['action']; - $this->fields = $values['fields']; - $this->permission = $values['permission'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/DocSignaturesList200ResponseSignaturesItemFieldMdpAction.php b/src/Types/DocSignaturesList200ResponseSignaturesItemFieldMdpAction.php deleted file mode 100644 index 3a8cd3f6..00000000 --- a/src/Types/DocSignaturesList200ResponseSignaturesItemFieldMdpAction.php +++ /dev/null @@ -1,10 +0,0 @@ - $action - */ - #[JsonProperty('action')] - public string $action; - - /** - * @var array $fields - */ - #[JsonProperty('fields'), ArrayType(['string'])] - public array $fields; - - /** - * @var ?float $permission - */ - #[JsonProperty('permission')] - public ?float $permission; - - /** - * @param array{ - * action: value-of, - * fields: array, - * permission?: ?float, - * } $values - */ - public function __construct( - array $values, - ) { - $this->action = $values['action']; - $this->fields = $values['fields']; - $this->permission = $values['permission'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/DocSignaturesList200ResponseSignaturesItemLockAction.php b/src/Types/DocSignaturesList200ResponseSignaturesItemLockAction.php deleted file mode 100644 index 64f8bfcb..00000000 --- a/src/Types/DocSignaturesList200ResponseSignaturesItemLockAction.php +++ /dev/null @@ -1,10 +0,0 @@ - $revisions + * @var array $revisions */ - #[JsonProperty('revisions'), ArrayType([DocSignaturesList200ResponseRevisionsItem::class])] + #[JsonProperty('revisions'), ArrayType([DocSignaturesListResponseRevisionsItem::class])] public array $revisions; /** - * @var array $signatures + * @var array $signatures */ - #[JsonProperty('signatures'), ArrayType([DocSignaturesList200ResponseSignaturesItem::class])] + #[JsonProperty('signatures'), ArrayType([DocSignaturesListResponseSignaturesItem::class])] public array $signatures; /** - * @var DocSignaturesList200ResponseProtection $protection + * @var DocSignaturesListResponseProtection $protection */ #[JsonProperty('protection')] - public DocSignaturesList200ResponseProtection $protection; + public DocSignaturesListResponseProtection $protection; /** * @param array{ * chainValid: bool, - * revisions: array, - * signatures: array, - * protection: DocSignaturesList200ResponseProtection, + * revisions: array, + * signatures: array, + * protection: DocSignaturesListResponseProtection, * } $values */ public function __construct( diff --git a/src/Types/DocSignaturesList200ResponseProtection.php b/src/Types/DocSignaturesListResponseProtection.php similarity index 54% rename from src/Types/DocSignaturesList200ResponseProtection.php rename to src/Types/DocSignaturesListResponseProtection.php index f7bbc2d3..2dd7ad92 100644 --- a/src/Types/DocSignaturesList200ResponseProtection.php +++ b/src/Types/DocSignaturesListResponseProtection.php @@ -6,30 +6,30 @@ use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; -class DocSignaturesList200ResponseProtection extends JsonSerializableType +class DocSignaturesListResponseProtection extends JsonSerializableType { /** - * @var ?value-of $enforced + * @var ?value-of $enforced */ #[JsonProperty('enforced')] public ?string $enforced; /** - * @var ?value-of $judged + * @var ?value-of $judged */ #[JsonProperty('judged')] public ?string $judged; /** - * @var ?DocSignaturesList200ResponseProtectionCertification $certification + * @var ?DocSignaturesListResponseProtectionCertification $certification */ #[JsonProperty('certification')] - public ?DocSignaturesList200ResponseProtectionCertification $certification; + public ?DocSignaturesListResponseProtectionCertification $certification; /** - * @var array $fieldLocks + * @var array $fieldLocks */ - #[JsonProperty('fieldLocks'), ArrayType([DocSignaturesList200ResponseProtectionFieldLocksItem::class])] + #[JsonProperty('fieldLocks'), ArrayType([DocSignaturesListResponseProtectionFieldLocksItem::class])] public array $fieldLocks; /** @@ -40,11 +40,11 @@ class DocSignaturesList200ResponseProtection extends JsonSerializableType /** * @param array{ - * fieldLocks: array, + * fieldLocks: array, * policyVersion: int, - * enforced?: ?value-of, - * judged?: ?value-of, - * certification?: ?DocSignaturesList200ResponseProtectionCertification, + * enforced?: ?value-of, + * judged?: ?value-of, + * certification?: ?DocSignaturesListResponseProtectionCertification, * } $values */ public function __construct( diff --git a/src/Types/DocSignaturesComplete200ResponseProtectionCertification.php b/src/Types/DocSignaturesListResponseProtectionCertification.php similarity index 72% rename from src/Types/DocSignaturesComplete200ResponseProtectionCertification.php rename to src/Types/DocSignaturesListResponseProtectionCertification.php index c502707c..63ac46bf 100644 --- a/src/Types/DocSignaturesComplete200ResponseProtectionCertification.php +++ b/src/Types/DocSignaturesListResponseProtectionCertification.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocSignaturesComplete200ResponseProtectionCertification extends JsonSerializableType +class DocSignaturesListResponseProtectionCertification extends JsonSerializableType { /** * @var int $signatureIndex @@ -14,22 +14,22 @@ class DocSignaturesComplete200ResponseProtectionCertification extends JsonSerial public int $signatureIndex; /** - * @var ?float $permission + * @var int $permission */ #[JsonProperty('permission')] - public ?float $permission; + public int $permission; /** * @param array{ * signatureIndex: int, - * permission?: ?float, + * permission: int, * } $values */ public function __construct( array $values, ) { $this->signatureIndex = $values['signatureIndex']; - $this->permission = $values['permission'] ?? null; + $this->permission = $values['permission']; } /** diff --git a/src/Types/DocSignaturesList200ResponseProtectionJudged.php b/src/Types/DocSignaturesListResponseProtectionEnforced.php similarity index 70% rename from src/Types/DocSignaturesList200ResponseProtectionJudged.php rename to src/Types/DocSignaturesListResponseProtectionEnforced.php index 295fcf97..0f67e524 100644 --- a/src/Types/DocSignaturesList200ResponseProtectionJudged.php +++ b/src/Types/DocSignaturesListResponseProtectionEnforced.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocSignaturesList200ResponseProtectionJudged: string +enum DocSignaturesListResponseProtectionEnforced: string { case None = "none"; case Lta = "lta"; diff --git a/src/Types/DocSignaturesComplete200ResponseProtectionFieldLocksItem.php b/src/Types/DocSignaturesListResponseProtectionFieldLocksItem.php similarity index 56% rename from src/Types/DocSignaturesComplete200ResponseProtectionFieldLocksItem.php rename to src/Types/DocSignaturesListResponseProtectionFieldLocksItem.php index 247b3c66..84aab497 100644 --- a/src/Types/DocSignaturesComplete200ResponseProtectionFieldLocksItem.php +++ b/src/Types/DocSignaturesListResponseProtectionFieldLocksItem.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocSignaturesComplete200ResponseProtectionFieldLocksItem extends JsonSerializableType +class DocSignaturesListResponseProtectionFieldLocksItem extends JsonSerializableType { /** * @var int $signatureIndex @@ -14,22 +14,22 @@ class DocSignaturesComplete200ResponseProtectionFieldLocksItem extends JsonSeria public int $signatureIndex; /** - * @var value-of $source + * @var value-of $source */ #[JsonProperty('source')] public string $source; /** - * @var ?DocSignaturesComplete200ResponseProtectionFieldLocksItemSpec $spec + * @var FieldLockSpec $spec */ #[JsonProperty('spec')] - public ?DocSignaturesComplete200ResponseProtectionFieldLocksItemSpec $spec; + public FieldLockSpec $spec; /** * @param array{ * signatureIndex: int, - * source: value-of, - * spec?: ?DocSignaturesComplete200ResponseProtectionFieldLocksItemSpec, + * source: value-of, + * spec: FieldLockSpec, * } $values */ public function __construct( @@ -37,7 +37,7 @@ public function __construct( ) { $this->signatureIndex = $values['signatureIndex']; $this->source = $values['source']; - $this->spec = $values['spec'] ?? null; + $this->spec = $values['spec']; } /** diff --git a/src/Types/DocSignaturesList200ResponseProtectionFieldLocksItemSource.php b/src/Types/DocSignaturesListResponseProtectionFieldLocksItemSource.php similarity index 56% rename from src/Types/DocSignaturesList200ResponseProtectionFieldLocksItemSource.php rename to src/Types/DocSignaturesListResponseProtectionFieldLocksItemSource.php index 73336f31..de1b1eea 100644 --- a/src/Types/DocSignaturesList200ResponseProtectionFieldLocksItemSource.php +++ b/src/Types/DocSignaturesListResponseProtectionFieldLocksItemSource.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocSignaturesList200ResponseProtectionFieldLocksItemSource: string +enum DocSignaturesListResponseProtectionFieldLocksItemSource: string { case Fieldmdp = "fieldmdp"; case Lock = "lock"; diff --git a/src/Types/DocSignaturesListResponseProtectionJudged.php b/src/Types/DocSignaturesListResponseProtectionJudged.php new file mode 100644 index 00000000..7c737bd4 --- /dev/null +++ b/src/Types/DocSignaturesListResponseProtectionJudged.php @@ -0,0 +1,11 @@ + $kind + * @var value-of $kind */ #[JsonProperty('kind')] public string $kind; @@ -63,13 +63,13 @@ class DocSignaturesList200ResponseSignaturesItem extends JsonSerializableType public ?array $byteRange; /** - * @var int $contentsSize + * @var int $contentsSizeBytes */ - #[JsonProperty('contentsSize')] - public int $contentsSize; + #[JsonProperty('contentsSizeBytes')] + public int $contentsSizeBytes; /** - * @var ?value-of $coverage + * @var ?value-of $coverage */ #[JsonProperty('coverage')] public ?string $coverage; @@ -81,16 +81,16 @@ class DocSignaturesList200ResponseSignaturesItem extends JsonSerializableType public ?int $revisionIndex; /** - * @var DocSignaturesList200ResponseSignaturesItemSigner $signer + * @var DocSignaturesListResponseSignaturesItemSigner $signer */ #[JsonProperty('signer')] - public DocSignaturesList200ResponseSignaturesItemSigner $signer; + public DocSignaturesListResponseSignaturesItemSigner $signer; /** - * @var ?float $docMdp + * @var ?int $docMdp */ #[JsonProperty('docMdp')] - public ?float $docMdp; + public ?int $docMdp; /** * @var bool $catalogCertification @@ -99,22 +99,22 @@ class DocSignaturesList200ResponseSignaturesItem extends JsonSerializableType public bool $catalogCertification; /** - * @var ?DocSignaturesList200ResponseSignaturesItemFieldMdp $fieldMdp + * @var ?FieldLockSpec $fieldMdp */ #[JsonProperty('fieldMdp')] - public ?DocSignaturesList200ResponseSignaturesItemFieldMdp $fieldMdp; + public ?FieldLockSpec $fieldMdp; /** - * @var ?DocSignaturesList200ResponseSignaturesItemLock $lock + * @var ?FieldLockSpec $lock */ #[JsonProperty('lock')] - public ?DocSignaturesList200ResponseSignaturesItemLock $lock; + public ?FieldLockSpec $lock; /** - * @var ?DocSignaturesList200ResponseSignaturesItemSeedValue $seedValue + * @var ?DocSignaturesListResponseSignaturesItemSeedValue $seedValue */ #[JsonProperty('seedValue')] - public ?DocSignaturesList200ResponseSignaturesItemSeedValue $seedValue; + public ?DocSignaturesListResponseSignaturesItemSeedValue $seedValue; /** * @param array{ @@ -122,20 +122,20 @@ class DocSignaturesList200ResponseSignaturesItem extends JsonSerializableType * field: FormFieldRef, * fieldName: string, * signed: bool, - * kind: value-of, - * contentsSize: int, - * signer: DocSignaturesList200ResponseSignaturesItemSigner, + * kind: value-of, + * contentsSizeBytes: int, + * signer: DocSignaturesListResponseSignaturesItemSigner, * catalogCertification: bool, * widget?: ?FormWidget, * filter?: ?string, * subFilter?: ?string, * byteRange?: ?array, - * coverage?: ?value-of, + * coverage?: ?value-of, * revisionIndex?: ?int, - * docMdp?: ?float, - * fieldMdp?: ?DocSignaturesList200ResponseSignaturesItemFieldMdp, - * lock?: ?DocSignaturesList200ResponseSignaturesItemLock, - * seedValue?: ?DocSignaturesList200ResponseSignaturesItemSeedValue, + * docMdp?: ?int, + * fieldMdp?: ?FieldLockSpec, + * lock?: ?FieldLockSpec, + * seedValue?: ?DocSignaturesListResponseSignaturesItemSeedValue, * } $values */ public function __construct( @@ -150,7 +150,7 @@ public function __construct( $this->filter = $values['filter'] ?? null; $this->subFilter = $values['subFilter'] ?? null; $this->byteRange = $values['byteRange'] ?? null; - $this->contentsSize = $values['contentsSize']; + $this->contentsSizeBytes = $values['contentsSizeBytes']; $this->coverage = $values['coverage'] ?? null; $this->revisionIndex = $values['revisionIndex'] ?? null; $this->signer = $values['signer']; diff --git a/src/Types/DocSignaturesList200ResponseSignaturesItemCoverage.php b/src/Types/DocSignaturesListResponseSignaturesItemCoverage.php similarity index 69% rename from src/Types/DocSignaturesList200ResponseSignaturesItemCoverage.php rename to src/Types/DocSignaturesListResponseSignaturesItemCoverage.php index a4635283..9b2e0a5e 100644 --- a/src/Types/DocSignaturesList200ResponseSignaturesItemCoverage.php +++ b/src/Types/DocSignaturesListResponseSignaturesItemCoverage.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocSignaturesList200ResponseSignaturesItemCoverage: string +enum DocSignaturesListResponseSignaturesItemCoverage: string { case WholeRevision = "whole-revision"; case Partial = "partial"; diff --git a/src/Types/DocSignaturesList200ResponseSignaturesItemKind.php b/src/Types/DocSignaturesListResponseSignaturesItemKind.php similarity index 63% rename from src/Types/DocSignaturesList200ResponseSignaturesItemKind.php rename to src/Types/DocSignaturesListResponseSignaturesItemKind.php index b861c535..59163bfe 100644 --- a/src/Types/DocSignaturesList200ResponseSignaturesItemKind.php +++ b/src/Types/DocSignaturesListResponseSignaturesItemKind.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocSignaturesList200ResponseSignaturesItemKind: string +enum DocSignaturesListResponseSignaturesItemKind: string { case Signature = "signature"; case Timestamp = "timestamp"; diff --git a/src/Types/DocSignaturesList200ResponseSignaturesItemSeedValue.php b/src/Types/DocSignaturesListResponseSignaturesItemSeedValue.php similarity index 52% rename from src/Types/DocSignaturesList200ResponseSignaturesItemSeedValue.php rename to src/Types/DocSignaturesListResponseSignaturesItemSeedValue.php index a03df796..9599ac11 100644 --- a/src/Types/DocSignaturesList200ResponseSignaturesItemSeedValue.php +++ b/src/Types/DocSignaturesListResponseSignaturesItemSeedValue.php @@ -6,31 +6,25 @@ use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; -class DocSignaturesList200ResponseSignaturesItemSeedValue extends JsonSerializableType +class DocSignaturesListResponseSignaturesItemSeedValue extends JsonSerializableType { /** - * @var int $requiredFlags + * @var ?int $parserVersion */ - #[JsonProperty('requiredFlags')] - public int $requiredFlags; + #[JsonProperty('parserVersion')] + public ?int $parserVersion; /** - * @var int $presentFlags + * @var bool $parserVersionRequired */ - #[JsonProperty('presentFlags')] - public int $presentFlags; + #[JsonProperty('parserVersionRequired')] + public bool $parserVersionRequired; /** - * @var ?int $version - */ - #[JsonProperty('version')] - public ?int $version; - - /** - * @var ?float $mdp + * @var ?int $mdp */ #[JsonProperty('mdp')] - public ?float $mdp; + public ?int $mdp; /** * @var ?string $filter @@ -38,24 +32,48 @@ class DocSignaturesList200ResponseSignaturesItemSeedValue extends JsonSerializab #[JsonProperty('filter')] public ?string $filter; + /** + * @var bool $filterRequired + */ + #[JsonProperty('filterRequired')] + public bool $filterRequired; + /** * @var array $subFilters */ #[JsonProperty('subFilters'), ArrayType(['string'])] public array $subFilters; + /** + * @var bool $subFiltersRequired + */ + #[JsonProperty('subFiltersRequired')] + public bool $subFiltersRequired; + /** * @var array $digestMethods */ #[JsonProperty('digestMethods'), ArrayType(['string'])] public array $digestMethods; + /** + * @var bool $digestMethodsRequired + */ + #[JsonProperty('digestMethodsRequired')] + public bool $digestMethodsRequired; + /** * @var array $reasons */ #[JsonProperty('reasons'), ArrayType(['string'])] public array $reasons; + /** + * @var bool $reasonsRequired + */ + #[JsonProperty('reasonsRequired')] + public bool $reasonsRequired; + /** * @var bool $unsupportedRequired */ @@ -64,28 +82,34 @@ class DocSignaturesList200ResponseSignaturesItemSeedValue extends JsonSerializab /** * @param array{ - * requiredFlags: int, - * presentFlags: int, + * parserVersionRequired: bool, + * filterRequired: bool, * subFilters: array, + * subFiltersRequired: bool, * digestMethods: array, + * digestMethodsRequired: bool, * reasons: array, + * reasonsRequired: bool, * unsupportedRequired: bool, - * version?: ?int, - * mdp?: ?float, + * parserVersion?: ?int, + * mdp?: ?int, * filter?: ?string, * } $values */ public function __construct( array $values, ) { - $this->requiredFlags = $values['requiredFlags']; - $this->presentFlags = $values['presentFlags']; - $this->version = $values['version'] ?? null; + $this->parserVersion = $values['parserVersion'] ?? null; + $this->parserVersionRequired = $values['parserVersionRequired']; $this->mdp = $values['mdp'] ?? null; $this->filter = $values['filter'] ?? null; + $this->filterRequired = $values['filterRequired']; $this->subFilters = $values['subFilters']; + $this->subFiltersRequired = $values['subFiltersRequired']; $this->digestMethods = $values['digestMethods']; + $this->digestMethodsRequired = $values['digestMethodsRequired']; $this->reasons = $values['reasons']; + $this->reasonsRequired = $values['reasonsRequired']; $this->unsupportedRequired = $values['unsupportedRequired']; } diff --git a/src/Types/DocSignaturesList200ResponseSignaturesItemSigner.php b/src/Types/DocSignaturesListResponseSignaturesItemSigner.php similarity index 94% rename from src/Types/DocSignaturesList200ResponseSignaturesItemSigner.php rename to src/Types/DocSignaturesListResponseSignaturesItemSigner.php index 24964f6f..cabb897b 100644 --- a/src/Types/DocSignaturesList200ResponseSignaturesItemSigner.php +++ b/src/Types/DocSignaturesListResponseSignaturesItemSigner.php @@ -7,7 +7,7 @@ use DateTime; use CloudPDF\Core\Types\Date; -class DocSignaturesList200ResponseSignaturesItemSigner extends JsonSerializableType +class DocSignaturesListResponseSignaturesItemSigner extends JsonSerializableType { /** * @var ?string $name diff --git a/src/Types/DocSignaturesPrepare200Response.php b/src/Types/DocSignaturesPrepareResponse.php similarity index 64% rename from src/Types/DocSignaturesPrepare200Response.php rename to src/Types/DocSignaturesPrepareResponse.php index fa5fd317..b03f12fc 100644 --- a/src/Types/DocSignaturesPrepare200Response.php +++ b/src/Types/DocSignaturesPrepareResponse.php @@ -5,8 +5,10 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; +use DateTime; +use CloudPDF\Core\Types\Date; -class DocSignaturesPrepare200Response extends JsonSerializableType +class DocSignaturesPrepareResponse extends JsonSerializableType { /** * @var string $signingId @@ -21,7 +23,7 @@ class DocSignaturesPrepare200Response extends JsonSerializableType public string $digest; /** - * @var value-of $algorithm + * @var value-of $algorithm */ #[JsonProperty('algorithm')] public string $algorithm; @@ -33,10 +35,10 @@ class DocSignaturesPrepare200Response extends JsonSerializableType public array $byteRange; /** - * @var int $contentsSize + * @var int $contentsSizeBytes */ - #[JsonProperty('contentsSize')] - public int $contentsSize; + #[JsonProperty('contentsSizeBytes')] + public int $contentsSizeBytes; /** * @var string $subFilter @@ -45,27 +47,27 @@ class DocSignaturesPrepare200Response extends JsonSerializableType public string $subFilter; /** - * @var DocSignaturesPrepare200ResponseExpectedVersion $expectedVersion + * @var DocSignaturesPrepareResponseExpectedVersion $expectedVersion */ #[JsonProperty('expectedVersion')] - public DocSignaturesPrepare200ResponseExpectedVersion $expectedVersion; + public DocSignaturesPrepareResponseExpectedVersion $expectedVersion; /** - * @var ?string $expiresAt + * @var ?DateTime $expiresAt */ - #[JsonProperty('expiresAt')] - public ?string $expiresAt; + #[JsonProperty('expiresAt'), Date(Date::TYPE_DATETIME)] + public ?DateTime $expiresAt; /** * @param array{ * signingId: string, * digest: string, - * algorithm: value-of, + * algorithm: value-of, * byteRange: array, - * contentsSize: int, + * contentsSizeBytes: int, * subFilter: string, - * expectedVersion: DocSignaturesPrepare200ResponseExpectedVersion, - * expiresAt?: ?string, + * expectedVersion: DocSignaturesPrepareResponseExpectedVersion, + * expiresAt?: ?DateTime, * } $values */ public function __construct( @@ -75,7 +77,7 @@ public function __construct( $this->digest = $values['digest']; $this->algorithm = $values['algorithm']; $this->byteRange = $values['byteRange']; - $this->contentsSize = $values['contentsSize']; + $this->contentsSizeBytes = $values['contentsSizeBytes']; $this->subFilter = $values['subFilter']; $this->expectedVersion = $values['expectedVersion']; $this->expiresAt = $values['expiresAt'] ?? null; diff --git a/src/Types/DocSignaturesPrepare200ResponseAlgorithm.php b/src/Types/DocSignaturesPrepareResponseAlgorithm.php similarity index 69% rename from src/Types/DocSignaturesPrepare200ResponseAlgorithm.php rename to src/Types/DocSignaturesPrepareResponseAlgorithm.php index 9553cb4d..6278d65a 100644 --- a/src/Types/DocSignaturesPrepare200ResponseAlgorithm.php +++ b/src/Types/DocSignaturesPrepareResponseAlgorithm.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocSignaturesPrepare200ResponseAlgorithm: string +enum DocSignaturesPrepareResponseAlgorithm: string { case Sha256 = "sha256"; case Sha384 = "sha384"; diff --git a/src/Types/DocSignaturesPrepare200ResponseExpectedVersion.php b/src/Types/DocSignaturesPrepareResponseExpectedVersion.php similarity index 90% rename from src/Types/DocSignaturesPrepare200ResponseExpectedVersion.php rename to src/Types/DocSignaturesPrepareResponseExpectedVersion.php index b1bcf800..62e1855e 100644 --- a/src/Types/DocSignaturesPrepare200ResponseExpectedVersion.php +++ b/src/Types/DocSignaturesPrepareResponseExpectedVersion.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocSignaturesPrepare200ResponseExpectedVersion extends JsonSerializableType +class DocSignaturesPrepareResponseExpectedVersion extends JsonSerializableType { /** * @var string $baseSha256 diff --git a/src/Types/DocText200Response.php b/src/Types/DocTextResponse.php similarity index 94% rename from src/Types/DocText200Response.php rename to src/Types/DocTextResponse.php index fe7b8917..66495445 100644 --- a/src/Types/DocText200Response.php +++ b/src/Types/DocTextResponse.php @@ -6,7 +6,7 @@ use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; -class DocText200Response extends JsonSerializableType +class DocTextResponse extends JsonSerializableType { /** * @var string $text diff --git a/src/Types/DocVersionsAnalysis200Response.php b/src/Types/DocVersionsAnalysisResponse.php similarity index 54% rename from src/Types/DocVersionsAnalysis200Response.php rename to src/Types/DocVersionsAnalysisResponse.php index 956885b8..3e42cbc6 100644 --- a/src/Types/DocVersionsAnalysis200Response.php +++ b/src/Types/DocVersionsAnalysisResponse.php @@ -6,10 +6,10 @@ use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; -class DocVersionsAnalysis200Response extends JsonSerializableType +class DocVersionsAnalysisResponse extends JsonSerializableType { /** - * @var value-of $mode + * @var value-of $mode */ #[JsonProperty('mode')] public string $mode; @@ -21,43 +21,43 @@ class DocVersionsAnalysis200Response extends JsonSerializableType public int $policyVersion; /** - * @var DocVersionsAnalysis200ResponseBasis $basis + * @var DocVersionsAnalysisResponseBasis $basis */ #[JsonProperty('basis')] - public DocVersionsAnalysis200ResponseBasis $basis; + public DocVersionsAnalysisResponseBasis $basis; /** - * @var DocVersionsAnalysis200ResponseSince $since + * @var DocVersionsAnalysisResponseSince $since */ #[JsonProperty('since')] - public DocVersionsAnalysis200ResponseSince $since; + public DocVersionsAnalysisResponseSince $since; /** - * @var DocVersionsAnalysis200ResponseUntil $until + * @var DocVersionsAnalysisResponseUntil $until */ #[JsonProperty('until')] - public DocVersionsAnalysis200ResponseUntil $until; + public DocVersionsAnalysisResponseUntil $until; /** - * @var array $restrictions + * @var array $restrictions */ - #[JsonProperty('restrictions'), ArrayType([DocVersionsAnalysis200ResponseRestrictionsItem::class])] + #[JsonProperty('restrictions'), ArrayType([DocVersionsAnalysisResponseRestrictionsItem::class])] public array $restrictions; /** - * @var DocVersionsAnalysis200ResponseCurrent $current + * @var DocVersionsAnalysisResponseCurrent $current */ #[JsonProperty('current')] - public DocVersionsAnalysis200ResponseCurrent $current; + public DocVersionsAnalysisResponseCurrent $current; /** - * @var DocVersionsAnalysis200ResponseLater $later + * @var DocVersionsAnalysisResponseLater $later */ #[JsonProperty('later')] - public DocVersionsAnalysis200ResponseLater $later; + public DocVersionsAnalysisResponseLater $later; /** - * @var value-of $verdict + * @var value-of $verdict */ #[JsonProperty('verdict')] public string $verdict; @@ -70,15 +70,15 @@ class DocVersionsAnalysis200Response extends JsonSerializableType /** * @param array{ - * mode: value-of, + * mode: value-of, * policyVersion: int, - * basis: DocVersionsAnalysis200ResponseBasis, - * since: DocVersionsAnalysis200ResponseSince, - * until: DocVersionsAnalysis200ResponseUntil, - * restrictions: array, - * current: DocVersionsAnalysis200ResponseCurrent, - * later: DocVersionsAnalysis200ResponseLater, - * verdict: value-of, + * basis: DocVersionsAnalysisResponseBasis, + * since: DocVersionsAnalysisResponseSince, + * until: DocVersionsAnalysisResponseUntil, + * restrictions: array, + * current: DocVersionsAnalysisResponseCurrent, + * later: DocVersionsAnalysisResponseLater, + * verdict: value-of, * steps: array, * } $values */ diff --git a/src/Types/DocSignaturesAnalysis200ResponseBasis.php b/src/Types/DocVersionsAnalysisResponseBasis.php similarity index 65% rename from src/Types/DocSignaturesAnalysis200ResponseBasis.php rename to src/Types/DocVersionsAnalysisResponseBasis.php index aa826deb..ce08e4f1 100644 --- a/src/Types/DocSignaturesAnalysis200ResponseBasis.php +++ b/src/Types/DocVersionsAnalysisResponseBasis.php @@ -5,13 +5,13 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocSignaturesAnalysis200ResponseBasis extends JsonSerializableType +class DocVersionsAnalysisResponseBasis extends JsonSerializableType { /** - * @var DocSignaturesAnalysis200ResponseBasisVersion $version + * @var DocVersionsAnalysisResponseBasisVersion $version */ #[JsonProperty('version')] - public DocSignaturesAnalysis200ResponseBasisVersion $version; + public DocVersionsAnalysisResponseBasisVersion $version; /** * @var int $editsVersion @@ -20,16 +20,16 @@ class DocSignaturesAnalysis200ResponseBasis extends JsonSerializableType public int $editsVersion; /** - * @var value-of $source + * @var value-of $source */ #[JsonProperty('source')] public string $source; /** * @param array{ - * version: DocSignaturesAnalysis200ResponseBasisVersion, + * version: DocVersionsAnalysisResponseBasisVersion, * editsVersion: int, - * source: value-of, + * source: value-of, * } $values */ public function __construct( diff --git a/src/Types/DocSignaturesAnalysis200ResponseBasisSource.php b/src/Types/DocVersionsAnalysisResponseBasisSource.php similarity index 66% rename from src/Types/DocSignaturesAnalysis200ResponseBasisSource.php rename to src/Types/DocVersionsAnalysisResponseBasisSource.php index 63a3d72d..4fa34570 100644 --- a/src/Types/DocSignaturesAnalysis200ResponseBasisSource.php +++ b/src/Types/DocVersionsAnalysisResponseBasisSource.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocSignaturesAnalysis200ResponseBasisSource: string +enum DocVersionsAnalysisResponseBasisSource: string { case Persisted = "persisted"; case WorkingCopy = "working-copy"; diff --git a/src/Types/DocSignaturesComplete200ResponseVersion.php b/src/Types/DocVersionsAnalysisResponseBasisVersion.php similarity index 71% rename from src/Types/DocSignaturesComplete200ResponseVersion.php rename to src/Types/DocVersionsAnalysisResponseBasisVersion.php index 3ba60b76..e5f955d2 100644 --- a/src/Types/DocSignaturesComplete200ResponseVersion.php +++ b/src/Types/DocVersionsAnalysisResponseBasisVersion.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocSignaturesComplete200ResponseVersion extends JsonSerializableType +class DocVersionsAnalysisResponseBasisVersion extends JsonSerializableType { /** * @var string $sha256 @@ -14,22 +14,22 @@ class DocSignaturesComplete200ResponseVersion extends JsonSerializableType public string $sha256; /** - * @var int $byteLength + * @var int $sizeBytes */ - #[JsonProperty('byteLength')] - public int $byteLength; + #[JsonProperty('sizeBytes')] + public int $sizeBytes; /** * @param array{ * sha256: string, - * byteLength: int, + * sizeBytes: int, * } $values */ public function __construct( array $values, ) { $this->sha256 = $values['sha256']; - $this->byteLength = $values['byteLength']; + $this->sizeBytes = $values['sizeBytes']; } /** diff --git a/src/Types/DocVersionsAnalysis200ResponseCurrent.php b/src/Types/DocVersionsAnalysisResponseCurrent.php similarity index 54% rename from src/Types/DocVersionsAnalysis200ResponseCurrent.php rename to src/Types/DocVersionsAnalysisResponseCurrent.php index e4ed1ed6..10c7ed6b 100644 --- a/src/Types/DocVersionsAnalysis200ResponseCurrent.php +++ b/src/Types/DocVersionsAnalysisResponseCurrent.php @@ -6,10 +6,10 @@ use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; -class DocVersionsAnalysis200ResponseCurrent extends JsonSerializableType +class DocVersionsAnalysisResponseCurrent extends JsonSerializableType { /** - * @var value-of $verdict + * @var value-of $verdict */ #[JsonProperty('verdict')] public string $verdict; @@ -21,30 +21,30 @@ class DocVersionsAnalysis200ResponseCurrent extends JsonSerializableType public bool $complete; /** - * @var ?DocVersionsAnalysis200ResponseCurrentPrimary $primary + * @var ?DocVersionsAnalysisResponseCurrentPrimary $primary */ #[JsonProperty('primary')] - public ?DocVersionsAnalysis200ResponseCurrentPrimary $primary; + public ?DocVersionsAnalysisResponseCurrentPrimary $primary; /** - * @var array $findings + * @var array $findings */ - #[JsonProperty('findings'), ArrayType([DocVersionsAnalysis200ResponseCurrentFindingsItem::class])] + #[JsonProperty('findings'), ArrayType([DocVersionsAnalysisResponseCurrentFindingsItem::class])] public array $findings; /** - * @var value-of $method + * @var value-of $method */ #[JsonProperty('method')] public string $method; /** * @param array{ - * verdict: value-of, + * verdict: value-of, * complete: bool, - * findings: array, - * method: value-of, - * primary?: ?DocVersionsAnalysis200ResponseCurrentPrimary, + * findings: array, + * method: value-of, + * primary?: ?DocVersionsAnalysisResponseCurrentPrimary, * } $values */ public function __construct( diff --git a/src/Types/DocSignaturesAnalysis200ResponseCurrentPrimary.php b/src/Types/DocVersionsAnalysisResponseCurrentFindingsItem.php similarity index 83% rename from src/Types/DocSignaturesAnalysis200ResponseCurrentPrimary.php rename to src/Types/DocVersionsAnalysisResponseCurrentFindingsItem.php index 9fe285e6..24e61298 100644 --- a/src/Types/DocSignaturesAnalysis200ResponseCurrentPrimary.php +++ b/src/Types/DocVersionsAnalysisResponseCurrentFindingsItem.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocSignaturesAnalysis200ResponseCurrentPrimary extends JsonSerializableType +class DocVersionsAnalysisResponseCurrentFindingsItem extends JsonSerializableType { /** * @var string $rule @@ -14,7 +14,7 @@ class DocSignaturesAnalysis200ResponseCurrentPrimary extends JsonSerializableTyp public string $rule; /** - * @var value-of $verdict + * @var value-of $verdict */ #[JsonProperty('verdict')] public string $verdict; @@ -40,7 +40,7 @@ class DocSignaturesAnalysis200ResponseCurrentPrimary extends JsonSerializableTyp /** * @param array{ * rule: string, - * verdict: value-of, + * verdict: value-of, * objectNumber: int, * edge?: ?string, * detail?: ?string, diff --git a/src/Types/DocSignaturesAnalysis200ResponseCurrentPrimaryVerdict.php b/src/Types/DocVersionsAnalysisResponseCurrentFindingsItemVerdict.php similarity index 69% rename from src/Types/DocSignaturesAnalysis200ResponseCurrentPrimaryVerdict.php rename to src/Types/DocVersionsAnalysisResponseCurrentFindingsItemVerdict.php index 2145817d..2c9c0b74 100644 --- a/src/Types/DocSignaturesAnalysis200ResponseCurrentPrimaryVerdict.php +++ b/src/Types/DocVersionsAnalysisResponseCurrentFindingsItemVerdict.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocSignaturesAnalysis200ResponseCurrentPrimaryVerdict: string +enum DocVersionsAnalysisResponseCurrentFindingsItemVerdict: string { case Permitted = "permitted"; case Forbidden = "forbidden"; diff --git a/src/Types/DocSignaturesAnalysis200ResponseCurrentMethod.php b/src/Types/DocVersionsAnalysisResponseCurrentMethod.php similarity index 66% rename from src/Types/DocSignaturesAnalysis200ResponseCurrentMethod.php rename to src/Types/DocVersionsAnalysisResponseCurrentMethod.php index bcdf0cd0..09a97599 100644 --- a/src/Types/DocSignaturesAnalysis200ResponseCurrentMethod.php +++ b/src/Types/DocVersionsAnalysisResponseCurrentMethod.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocSignaturesAnalysis200ResponseCurrentMethod: string +enum DocVersionsAnalysisResponseCurrentMethod: string { case NetState = "net-state"; case NetStateReplay = "net-state+replay"; diff --git a/src/Types/DocSignaturesAnalysis200ResponseCurrentFindingsItem.php b/src/Types/DocVersionsAnalysisResponseCurrentPrimary.php similarity index 81% rename from src/Types/DocSignaturesAnalysis200ResponseCurrentFindingsItem.php rename to src/Types/DocVersionsAnalysisResponseCurrentPrimary.php index aa839133..3a536aee 100644 --- a/src/Types/DocSignaturesAnalysis200ResponseCurrentFindingsItem.php +++ b/src/Types/DocVersionsAnalysisResponseCurrentPrimary.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocSignaturesAnalysis200ResponseCurrentFindingsItem extends JsonSerializableType +class DocVersionsAnalysisResponseCurrentPrimary extends JsonSerializableType { /** * @var string $rule @@ -14,7 +14,7 @@ class DocSignaturesAnalysis200ResponseCurrentFindingsItem extends JsonSerializab public string $rule; /** - * @var value-of $verdict + * @var value-of $verdict */ #[JsonProperty('verdict')] public string $verdict; @@ -40,7 +40,7 @@ class DocSignaturesAnalysis200ResponseCurrentFindingsItem extends JsonSerializab /** * @param array{ * rule: string, - * verdict: value-of, + * verdict: value-of, * objectNumber: int, * edge?: ?string, * detail?: ?string, diff --git a/src/Types/DocSignaturesAnalysis200ResponseCurrentFindingsItemVerdict.php b/src/Types/DocVersionsAnalysisResponseCurrentPrimaryVerdict.php similarity index 66% rename from src/Types/DocSignaturesAnalysis200ResponseCurrentFindingsItemVerdict.php rename to src/Types/DocVersionsAnalysisResponseCurrentPrimaryVerdict.php index 79c2d5b8..0eb27951 100644 --- a/src/Types/DocSignaturesAnalysis200ResponseCurrentFindingsItemVerdict.php +++ b/src/Types/DocVersionsAnalysisResponseCurrentPrimaryVerdict.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocSignaturesAnalysis200ResponseCurrentFindingsItemVerdict: string +enum DocVersionsAnalysisResponseCurrentPrimaryVerdict: string { case Permitted = "permitted"; case Forbidden = "forbidden"; diff --git a/src/Types/DocSignaturesAnalysis200ResponseCurrentVerdict.php b/src/Types/DocVersionsAnalysisResponseCurrentVerdict.php similarity index 75% rename from src/Types/DocSignaturesAnalysis200ResponseCurrentVerdict.php rename to src/Types/DocVersionsAnalysisResponseCurrentVerdict.php index 1ce53539..332f5e78 100644 --- a/src/Types/DocSignaturesAnalysis200ResponseCurrentVerdict.php +++ b/src/Types/DocVersionsAnalysisResponseCurrentVerdict.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocSignaturesAnalysis200ResponseCurrentVerdict: string +enum DocVersionsAnalysisResponseCurrentVerdict: string { case Unchanged = "unchanged"; case Permitted = "permitted"; diff --git a/src/Types/DocSignaturesAnalysis200ResponseLater.php b/src/Types/DocVersionsAnalysisResponseLater.php similarity index 92% rename from src/Types/DocSignaturesAnalysis200ResponseLater.php rename to src/Types/DocVersionsAnalysisResponseLater.php index 519e83ae..7b5f9fa1 100644 --- a/src/Types/DocSignaturesAnalysis200ResponseLater.php +++ b/src/Types/DocVersionsAnalysisResponseLater.php @@ -6,7 +6,7 @@ use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; -class DocSignaturesAnalysis200ResponseLater extends JsonSerializableType +class DocVersionsAnalysisResponseLater extends JsonSerializableType { /** * @var int $revisionCount diff --git a/src/Types/DocSignaturesAnalysis200ResponseMode.php b/src/Types/DocVersionsAnalysisResponseMode.php similarity index 70% rename from src/Types/DocSignaturesAnalysis200ResponseMode.php rename to src/Types/DocVersionsAnalysisResponseMode.php index 10f67236..1978720c 100644 --- a/src/Types/DocSignaturesAnalysis200ResponseMode.php +++ b/src/Types/DocVersionsAnalysisResponseMode.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocSignaturesAnalysis200ResponseMode: string +enum DocVersionsAnalysisResponseMode: string { case Authoritative = "authoritative"; case Exploratory = "exploratory"; diff --git a/src/Types/DocSignaturesAnalysis200ResponseRestrictionsItem.php b/src/Types/DocVersionsAnalysisResponseRestrictionsItem.php similarity index 79% rename from src/Types/DocSignaturesAnalysis200ResponseRestrictionsItem.php rename to src/Types/DocVersionsAnalysisResponseRestrictionsItem.php index 3aee5055..d0d46b1e 100644 --- a/src/Types/DocSignaturesAnalysis200ResponseRestrictionsItem.php +++ b/src/Types/DocVersionsAnalysisResponseRestrictionsItem.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocSignaturesAnalysis200ResponseRestrictionsItem extends JsonSerializableType +class DocVersionsAnalysisResponseRestrictionsItem extends JsonSerializableType { /** * @var int $signatureIndex @@ -20,7 +20,7 @@ class DocSignaturesAnalysis200ResponseRestrictionsItem extends JsonSerializableT public int $revisionIndex; /** - * @var value-of $source + * @var value-of $source */ #[JsonProperty('source')] public string $source; @@ -32,10 +32,10 @@ class DocSignaturesAnalysis200ResponseRestrictionsItem extends JsonSerializableT public bool $own; /** - * @var ?float $permission + * @var ?int $permission */ #[JsonProperty('permission')] - public ?float $permission; + public ?int $permission; /** * @var mixed $fields @@ -47,9 +47,9 @@ class DocSignaturesAnalysis200ResponseRestrictionsItem extends JsonSerializableT * @param array{ * signatureIndex: int, * revisionIndex: int, - * source: value-of, + * source: value-of, * own: bool, - * permission?: ?float, + * permission?: ?int, * fields?: mixed, * } $values */ diff --git a/src/Types/DocSignaturesAnalysis200ResponseRestrictionsItemSource.php b/src/Types/DocVersionsAnalysisResponseRestrictionsItemSource.php similarity index 64% rename from src/Types/DocSignaturesAnalysis200ResponseRestrictionsItemSource.php rename to src/Types/DocVersionsAnalysisResponseRestrictionsItemSource.php index 945972c4..de98761a 100644 --- a/src/Types/DocSignaturesAnalysis200ResponseRestrictionsItemSource.php +++ b/src/Types/DocVersionsAnalysisResponseRestrictionsItemSource.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocSignaturesAnalysis200ResponseRestrictionsItemSource: string +enum DocVersionsAnalysisResponseRestrictionsItemSource: string { case Docmdp = "docmdp"; case Fieldmdp = "fieldmdp"; diff --git a/src/Types/DocSignaturesAnalysis200ResponseSince.php b/src/Types/DocVersionsAnalysisResponseSince.php similarity index 91% rename from src/Types/DocSignaturesAnalysis200ResponseSince.php rename to src/Types/DocVersionsAnalysisResponseSince.php index 45dfe484..78f3e6de 100644 --- a/src/Types/DocSignaturesAnalysis200ResponseSince.php +++ b/src/Types/DocVersionsAnalysisResponseSince.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocSignaturesAnalysis200ResponseSince extends JsonSerializableType +class DocVersionsAnalysisResponseSince extends JsonSerializableType { /** * @var int $revisionIndex diff --git a/src/Types/DocSignaturesAnalysis200ResponseUntil.php b/src/Types/DocVersionsAnalysisResponseUntil.php similarity index 88% rename from src/Types/DocSignaturesAnalysis200ResponseUntil.php rename to src/Types/DocVersionsAnalysisResponseUntil.php index 3a93c523..b4d279e1 100644 --- a/src/Types/DocSignaturesAnalysis200ResponseUntil.php +++ b/src/Types/DocVersionsAnalysisResponseUntil.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocSignaturesAnalysis200ResponseUntil extends JsonSerializableType +class DocVersionsAnalysisResponseUntil extends JsonSerializableType { /** * @var int $revisionIndex diff --git a/src/Types/DocSignaturesAnalysis200ResponseVerdict.php b/src/Types/DocVersionsAnalysisResponseVerdict.php similarity index 77% rename from src/Types/DocSignaturesAnalysis200ResponseVerdict.php rename to src/Types/DocVersionsAnalysisResponseVerdict.php index d1110bac..246acf7f 100644 --- a/src/Types/DocSignaturesAnalysis200ResponseVerdict.php +++ b/src/Types/DocVersionsAnalysisResponseVerdict.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocSignaturesAnalysis200ResponseVerdict: string +enum DocVersionsAnalysisResponseVerdict: string { case Unchanged = "unchanged"; case Permitted = "permitted"; diff --git a/src/Types/DocVersionsList200Response.php b/src/Types/DocVersionsListResponse.php similarity index 53% rename from src/Types/DocVersionsList200Response.php rename to src/Types/DocVersionsListResponse.php index c17b4dcc..1cfa3e74 100644 --- a/src/Types/DocVersionsList200Response.php +++ b/src/Types/DocVersionsListResponse.php @@ -6,30 +6,30 @@ use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; -class DocVersionsList200Response extends JsonSerializableType +class DocVersionsListResponse extends JsonSerializableType { /** - * @var string $baseSha + * @var string $baseSha256 */ - #[JsonProperty('baseSha')] - public string $baseSha; + #[JsonProperty('baseSha256')] + public string $baseSha256; /** - * @var array $versions + * @var array $versions */ - #[JsonProperty('versions'), ArrayType([DocVersionsList200ResponseVersionsItem::class])] + #[JsonProperty('versions'), ArrayType([DocVersionsListResponseVersionsItem::class])] public array $versions; /** * @param array{ - * baseSha: string, - * versions: array, + * baseSha256: string, + * versions: array, * } $values */ public function __construct( array $values, ) { - $this->baseSha = $values['baseSha']; + $this->baseSha256 = $values['baseSha256']; $this->versions = $values['versions']; } diff --git a/src/Types/DocVersionsList200ResponseVersionsItem.php b/src/Types/DocVersionsListResponseVersionsItem.php similarity index 69% rename from src/Types/DocVersionsList200ResponseVersionsItem.php rename to src/Types/DocVersionsListResponseVersionsItem.php index 9d34195a..1d164d37 100644 --- a/src/Types/DocVersionsList200ResponseVersionsItem.php +++ b/src/Types/DocVersionsListResponseVersionsItem.php @@ -4,8 +4,10 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; +use DateTime; +use CloudPDF\Core\Types\Date; -class DocVersionsList200ResponseVersionsItem extends JsonSerializableType +class DocVersionsListResponseVersionsItem extends JsonSerializableType { /** * @var string $sha256 @@ -14,10 +16,10 @@ class DocVersionsList200ResponseVersionsItem extends JsonSerializableType public string $sha256; /** - * @var int $byteLength + * @var int $sizeBytes */ - #[JsonProperty('byteLength')] - public int $byteLength; + #[JsonProperty('sizeBytes')] + public int $sizeBytes; /** * @var int $number @@ -32,7 +34,7 @@ class DocVersionsList200ResponseVersionsItem extends JsonSerializableType public ?string $parentSha256; /** - * @var value-of $producer + * @var value-of $producer */ #[JsonProperty('producer')] public string $producer; @@ -44,18 +46,18 @@ class DocVersionsList200ResponseVersionsItem extends JsonSerializableType public ?string $signingId; /** - * @var int $createdAt + * @var DateTime $createdAt */ - #[JsonProperty('createdAt')] - public int $createdAt; + #[JsonProperty('createdAt'), Date(Date::TYPE_DATETIME)] + public DateTime $createdAt; /** * @param array{ * sha256: string, - * byteLength: int, + * sizeBytes: int, * number: int, - * producer: value-of, - * createdAt: int, + * producer: value-of, + * createdAt: DateTime, * parentSha256?: ?string, * signingId?: ?string, * } $values @@ -64,7 +66,7 @@ public function __construct( array $values, ) { $this->sha256 = $values['sha256']; - $this->byteLength = $values['byteLength']; + $this->sizeBytes = $values['sizeBytes']; $this->number = $values['number']; $this->parentSha256 = $values['parentSha256'] ?? null; $this->producer = $values['producer']; diff --git a/src/Types/DocVersionsList200ResponseVersionsItemProducer.php b/src/Types/DocVersionsListResponseVersionsItemProducer.php similarity index 62% rename from src/Types/DocVersionsList200ResponseVersionsItemProducer.php rename to src/Types/DocVersionsListResponseVersionsItemProducer.php index 5f9549b0..2aae475e 100644 --- a/src/Types/DocVersionsList200ResponseVersionsItemProducer.php +++ b/src/Types/DocVersionsListResponseVersionsItemProducer.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocVersionsList200ResponseVersionsItemProducer: string +enum DocVersionsListResponseVersionsItemProducer: string { case Upload = "upload"; case Signature = "signature"; diff --git a/src/Types/DocVersionsSignatures200ResponseProtectionEnforced.php b/src/Types/DocVersionsSignatures200ResponseProtectionEnforced.php deleted file mode 100644 index d6111c32..00000000 --- a/src/Types/DocVersionsSignatures200ResponseProtectionEnforced.php +++ /dev/null @@ -1,11 +0,0 @@ - $action - */ - #[JsonProperty('action')] - public string $action; - - /** - * @var array $fields - */ - #[JsonProperty('fields'), ArrayType(['string'])] - public array $fields; - - /** - * @var ?float $permission - */ - #[JsonProperty('permission')] - public ?float $permission; - - /** - * @param array{ - * action: value-of, - * fields: array, - * permission?: ?float, - * } $values - */ - public function __construct( - array $values, - ) { - $this->action = $values['action']; - $this->fields = $values['fields']; - $this->permission = $values['permission'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/DocVersionsSignatures200ResponseProtectionFieldLocksItemSpecAction.php b/src/Types/DocVersionsSignatures200ResponseProtectionFieldLocksItemSpecAction.php deleted file mode 100644 index 44548717..00000000 --- a/src/Types/DocVersionsSignatures200ResponseProtectionFieldLocksItemSpecAction.php +++ /dev/null @@ -1,10 +0,0 @@ - $action - */ - #[JsonProperty('action')] - public string $action; - - /** - * @var array $fields - */ - #[JsonProperty('fields'), ArrayType(['string'])] - public array $fields; - - /** - * @var ?float $permission - */ - #[JsonProperty('permission')] - public ?float $permission; - - /** - * @param array{ - * action: value-of, - * fields: array, - * permission?: ?float, - * } $values - */ - public function __construct( - array $values, - ) { - $this->action = $values['action']; - $this->fields = $values['fields']; - $this->permission = $values['permission'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/DocVersionsSignatures200ResponseSignaturesItemFieldMdpAction.php b/src/Types/DocVersionsSignatures200ResponseSignaturesItemFieldMdpAction.php deleted file mode 100644 index 26ace10e..00000000 --- a/src/Types/DocVersionsSignatures200ResponseSignaturesItemFieldMdpAction.php +++ /dev/null @@ -1,10 +0,0 @@ - $action - */ - #[JsonProperty('action')] - public string $action; - - /** - * @var array $fields - */ - #[JsonProperty('fields'), ArrayType(['string'])] - public array $fields; - - /** - * @var ?float $permission - */ - #[JsonProperty('permission')] - public ?float $permission; - - /** - * @param array{ - * action: value-of, - * fields: array, - * permission?: ?float, - * } $values - */ - public function __construct( - array $values, - ) { - $this->action = $values['action']; - $this->fields = $values['fields']; - $this->permission = $values['permission'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/DocVersionsSignatures200ResponseSignaturesItemLockAction.php b/src/Types/DocVersionsSignatures200ResponseSignaturesItemLockAction.php deleted file mode 100644 index be755ffe..00000000 --- a/src/Types/DocVersionsSignatures200ResponseSignaturesItemLockAction.php +++ /dev/null @@ -1,10 +0,0 @@ - $revisions + * @var array $revisions */ - #[JsonProperty('revisions'), ArrayType([DocVersionsSignatures200ResponseRevisionsItem::class])] + #[JsonProperty('revisions'), ArrayType([DocVersionsSignaturesResponseRevisionsItem::class])] public array $revisions; /** - * @var array $signatures + * @var array $signatures */ - #[JsonProperty('signatures'), ArrayType([DocVersionsSignatures200ResponseSignaturesItem::class])] + #[JsonProperty('signatures'), ArrayType([DocVersionsSignaturesResponseSignaturesItem::class])] public array $signatures; /** - * @var DocVersionsSignatures200ResponseProtection $protection + * @var DocVersionsSignaturesResponseProtection $protection */ #[JsonProperty('protection')] - public DocVersionsSignatures200ResponseProtection $protection; + public DocVersionsSignaturesResponseProtection $protection; /** * @param array{ * chainValid: bool, - * revisions: array, - * signatures: array, - * protection: DocVersionsSignatures200ResponseProtection, + * revisions: array, + * signatures: array, + * protection: DocVersionsSignaturesResponseProtection, * } $values */ public function __construct( diff --git a/src/Types/DocVersionsSignatures200ResponseProtection.php b/src/Types/DocVersionsSignaturesResponseProtection.php similarity index 56% rename from src/Types/DocVersionsSignatures200ResponseProtection.php rename to src/Types/DocVersionsSignaturesResponseProtection.php index 0c56764a..f4415f0c 100644 --- a/src/Types/DocVersionsSignatures200ResponseProtection.php +++ b/src/Types/DocVersionsSignaturesResponseProtection.php @@ -6,30 +6,30 @@ use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; -class DocVersionsSignatures200ResponseProtection extends JsonSerializableType +class DocVersionsSignaturesResponseProtection extends JsonSerializableType { /** - * @var ?value-of $enforced + * @var ?value-of $enforced */ #[JsonProperty('enforced')] public ?string $enforced; /** - * @var ?value-of $judged + * @var ?value-of $judged */ #[JsonProperty('judged')] public ?string $judged; /** - * @var ?DocVersionsSignatures200ResponseProtectionCertification $certification + * @var ?DocVersionsSignaturesResponseProtectionCertification $certification */ #[JsonProperty('certification')] - public ?DocVersionsSignatures200ResponseProtectionCertification $certification; + public ?DocVersionsSignaturesResponseProtectionCertification $certification; /** - * @var array $fieldLocks + * @var array $fieldLocks */ - #[JsonProperty('fieldLocks'), ArrayType([DocVersionsSignatures200ResponseProtectionFieldLocksItem::class])] + #[JsonProperty('fieldLocks'), ArrayType([DocVersionsSignaturesResponseProtectionFieldLocksItem::class])] public array $fieldLocks; /** @@ -40,11 +40,11 @@ class DocVersionsSignatures200ResponseProtection extends JsonSerializableType /** * @param array{ - * fieldLocks: array, + * fieldLocks: array, * policyVersion: int, - * enforced?: ?value-of, - * judged?: ?value-of, - * certification?: ?DocVersionsSignatures200ResponseProtectionCertification, + * enforced?: ?value-of, + * judged?: ?value-of, + * certification?: ?DocVersionsSignaturesResponseProtectionCertification, * } $values */ public function __construct( diff --git a/src/Types/DocVersionsSignatures200ResponseProtectionCertification.php b/src/Types/DocVersionsSignaturesResponseProtectionCertification.php similarity index 72% rename from src/Types/DocVersionsSignatures200ResponseProtectionCertification.php rename to src/Types/DocVersionsSignaturesResponseProtectionCertification.php index 22bf04a1..de4649ef 100644 --- a/src/Types/DocVersionsSignatures200ResponseProtectionCertification.php +++ b/src/Types/DocVersionsSignaturesResponseProtectionCertification.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocVersionsSignatures200ResponseProtectionCertification extends JsonSerializableType +class DocVersionsSignaturesResponseProtectionCertification extends JsonSerializableType { /** * @var int $signatureIndex @@ -14,22 +14,22 @@ class DocVersionsSignatures200ResponseProtectionCertification extends JsonSerial public int $signatureIndex; /** - * @var ?float $permission + * @var int $permission */ #[JsonProperty('permission')] - public ?float $permission; + public int $permission; /** * @param array{ * signatureIndex: int, - * permission?: ?float, + * permission: int, * } $values */ public function __construct( array $values, ) { $this->signatureIndex = $values['signatureIndex']; - $this->permission = $values['permission'] ?? null; + $this->permission = $values['permission']; } /** diff --git a/src/Types/DocVersionsSignaturesResponseProtectionEnforced.php b/src/Types/DocVersionsSignaturesResponseProtectionEnforced.php new file mode 100644 index 00000000..a0a34ecc --- /dev/null +++ b/src/Types/DocVersionsSignaturesResponseProtectionEnforced.php @@ -0,0 +1,11 @@ + $source + * @var value-of $source */ #[JsonProperty('source')] public string $source; /** - * @var ?DocVersionsSignatures200ResponseProtectionFieldLocksItemSpec $spec + * @var FieldLockSpec $spec */ #[JsonProperty('spec')] - public ?DocVersionsSignatures200ResponseProtectionFieldLocksItemSpec $spec; + public FieldLockSpec $spec; /** * @param array{ * signatureIndex: int, - * source: value-of, - * spec?: ?DocVersionsSignatures200ResponseProtectionFieldLocksItemSpec, + * source: value-of, + * spec: FieldLockSpec, * } $values */ public function __construct( @@ -37,7 +37,7 @@ public function __construct( ) { $this->signatureIndex = $values['signatureIndex']; $this->source = $values['source']; - $this->spec = $values['spec'] ?? null; + $this->spec = $values['spec']; } /** diff --git a/src/Types/DocSignaturesComplete200ResponseProtectionFieldLocksItemSource.php b/src/Types/DocVersionsSignaturesResponseProtectionFieldLocksItemSource.php similarity index 55% rename from src/Types/DocSignaturesComplete200ResponseProtectionFieldLocksItemSource.php rename to src/Types/DocVersionsSignaturesResponseProtectionFieldLocksItemSource.php index 55090c54..dbc65e14 100644 --- a/src/Types/DocSignaturesComplete200ResponseProtectionFieldLocksItemSource.php +++ b/src/Types/DocVersionsSignaturesResponseProtectionFieldLocksItemSource.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocSignaturesComplete200ResponseProtectionFieldLocksItemSource: string +enum DocVersionsSignaturesResponseProtectionFieldLocksItemSource: string { case Fieldmdp = "fieldmdp"; case Lock = "lock"; diff --git a/src/Types/DocVersionsSignaturesResponseProtectionJudged.php b/src/Types/DocVersionsSignaturesResponseProtectionJudged.php new file mode 100644 index 00000000..43921f32 --- /dev/null +++ b/src/Types/DocVersionsSignaturesResponseProtectionJudged.php @@ -0,0 +1,11 @@ + $kind + * @var value-of $kind */ #[JsonProperty('kind')] public string $kind; @@ -63,13 +63,13 @@ class DocVersionsSignatures200ResponseSignaturesItem extends JsonSerializableTyp public ?array $byteRange; /** - * @var int $contentsSize + * @var int $contentsSizeBytes */ - #[JsonProperty('contentsSize')] - public int $contentsSize; + #[JsonProperty('contentsSizeBytes')] + public int $contentsSizeBytes; /** - * @var ?value-of $coverage + * @var ?value-of $coverage */ #[JsonProperty('coverage')] public ?string $coverage; @@ -81,16 +81,16 @@ class DocVersionsSignatures200ResponseSignaturesItem extends JsonSerializableTyp public ?int $revisionIndex; /** - * @var DocVersionsSignatures200ResponseSignaturesItemSigner $signer + * @var DocVersionsSignaturesResponseSignaturesItemSigner $signer */ #[JsonProperty('signer')] - public DocVersionsSignatures200ResponseSignaturesItemSigner $signer; + public DocVersionsSignaturesResponseSignaturesItemSigner $signer; /** - * @var ?float $docMdp + * @var ?int $docMdp */ #[JsonProperty('docMdp')] - public ?float $docMdp; + public ?int $docMdp; /** * @var bool $catalogCertification @@ -99,22 +99,22 @@ class DocVersionsSignatures200ResponseSignaturesItem extends JsonSerializableTyp public bool $catalogCertification; /** - * @var ?DocVersionsSignatures200ResponseSignaturesItemFieldMdp $fieldMdp + * @var ?FieldLockSpec $fieldMdp */ #[JsonProperty('fieldMdp')] - public ?DocVersionsSignatures200ResponseSignaturesItemFieldMdp $fieldMdp; + public ?FieldLockSpec $fieldMdp; /** - * @var ?DocVersionsSignatures200ResponseSignaturesItemLock $lock + * @var ?FieldLockSpec $lock */ #[JsonProperty('lock')] - public ?DocVersionsSignatures200ResponseSignaturesItemLock $lock; + public ?FieldLockSpec $lock; /** - * @var ?DocVersionsSignatures200ResponseSignaturesItemSeedValue $seedValue + * @var ?DocVersionsSignaturesResponseSignaturesItemSeedValue $seedValue */ #[JsonProperty('seedValue')] - public ?DocVersionsSignatures200ResponseSignaturesItemSeedValue $seedValue; + public ?DocVersionsSignaturesResponseSignaturesItemSeedValue $seedValue; /** * @param array{ @@ -122,20 +122,20 @@ class DocVersionsSignatures200ResponseSignaturesItem extends JsonSerializableTyp * field: FormFieldRef, * fieldName: string, * signed: bool, - * kind: value-of, - * contentsSize: int, - * signer: DocVersionsSignatures200ResponseSignaturesItemSigner, + * kind: value-of, + * contentsSizeBytes: int, + * signer: DocVersionsSignaturesResponseSignaturesItemSigner, * catalogCertification: bool, * widget?: ?FormWidget, * filter?: ?string, * subFilter?: ?string, * byteRange?: ?array, - * coverage?: ?value-of, + * coverage?: ?value-of, * revisionIndex?: ?int, - * docMdp?: ?float, - * fieldMdp?: ?DocVersionsSignatures200ResponseSignaturesItemFieldMdp, - * lock?: ?DocVersionsSignatures200ResponseSignaturesItemLock, - * seedValue?: ?DocVersionsSignatures200ResponseSignaturesItemSeedValue, + * docMdp?: ?int, + * fieldMdp?: ?FieldLockSpec, + * lock?: ?FieldLockSpec, + * seedValue?: ?DocVersionsSignaturesResponseSignaturesItemSeedValue, * } $values */ public function __construct( @@ -150,7 +150,7 @@ public function __construct( $this->filter = $values['filter'] ?? null; $this->subFilter = $values['subFilter'] ?? null; $this->byteRange = $values['byteRange'] ?? null; - $this->contentsSize = $values['contentsSize']; + $this->contentsSizeBytes = $values['contentsSizeBytes']; $this->coverage = $values['coverage'] ?? null; $this->revisionIndex = $values['revisionIndex'] ?? null; $this->signer = $values['signer']; diff --git a/src/Types/DocVersionsSignatures200ResponseSignaturesItemCoverage.php b/src/Types/DocVersionsSignaturesResponseSignaturesItemCoverage.php similarity index 68% rename from src/Types/DocVersionsSignatures200ResponseSignaturesItemCoverage.php rename to src/Types/DocVersionsSignaturesResponseSignaturesItemCoverage.php index 1f294e78..2462b93b 100644 --- a/src/Types/DocVersionsSignatures200ResponseSignaturesItemCoverage.php +++ b/src/Types/DocVersionsSignaturesResponseSignaturesItemCoverage.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocVersionsSignatures200ResponseSignaturesItemCoverage: string +enum DocVersionsSignaturesResponseSignaturesItemCoverage: string { case WholeRevision = "whole-revision"; case Partial = "partial"; diff --git a/src/Types/DocVersionsSignatures200ResponseSignaturesItemKind.php b/src/Types/DocVersionsSignaturesResponseSignaturesItemKind.php similarity index 62% rename from src/Types/DocVersionsSignatures200ResponseSignaturesItemKind.php rename to src/Types/DocVersionsSignaturesResponseSignaturesItemKind.php index 54cc38ca..726e2938 100644 --- a/src/Types/DocVersionsSignatures200ResponseSignaturesItemKind.php +++ b/src/Types/DocVersionsSignaturesResponseSignaturesItemKind.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocVersionsSignatures200ResponseSignaturesItemKind: string +enum DocVersionsSignaturesResponseSignaturesItemKind: string { case Signature = "signature"; case Timestamp = "timestamp"; diff --git a/src/Types/DocVersionsSignatures200ResponseSignaturesItemSeedValue.php b/src/Types/DocVersionsSignaturesResponseSignaturesItemSeedValue.php similarity index 52% rename from src/Types/DocVersionsSignatures200ResponseSignaturesItemSeedValue.php rename to src/Types/DocVersionsSignaturesResponseSignaturesItemSeedValue.php index 7fd9d18b..a1842aed 100644 --- a/src/Types/DocVersionsSignatures200ResponseSignaturesItemSeedValue.php +++ b/src/Types/DocVersionsSignaturesResponseSignaturesItemSeedValue.php @@ -6,31 +6,25 @@ use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; -class DocVersionsSignatures200ResponseSignaturesItemSeedValue extends JsonSerializableType +class DocVersionsSignaturesResponseSignaturesItemSeedValue extends JsonSerializableType { /** - * @var int $requiredFlags + * @var ?int $parserVersion */ - #[JsonProperty('requiredFlags')] - public int $requiredFlags; + #[JsonProperty('parserVersion')] + public ?int $parserVersion; /** - * @var int $presentFlags + * @var bool $parserVersionRequired */ - #[JsonProperty('presentFlags')] - public int $presentFlags; + #[JsonProperty('parserVersionRequired')] + public bool $parserVersionRequired; /** - * @var ?int $version - */ - #[JsonProperty('version')] - public ?int $version; - - /** - * @var ?float $mdp + * @var ?int $mdp */ #[JsonProperty('mdp')] - public ?float $mdp; + public ?int $mdp; /** * @var ?string $filter @@ -38,24 +32,48 @@ class DocVersionsSignatures200ResponseSignaturesItemSeedValue extends JsonSerial #[JsonProperty('filter')] public ?string $filter; + /** + * @var bool $filterRequired + */ + #[JsonProperty('filterRequired')] + public bool $filterRequired; + /** * @var array $subFilters */ #[JsonProperty('subFilters'), ArrayType(['string'])] public array $subFilters; + /** + * @var bool $subFiltersRequired + */ + #[JsonProperty('subFiltersRequired')] + public bool $subFiltersRequired; + /** * @var array $digestMethods */ #[JsonProperty('digestMethods'), ArrayType(['string'])] public array $digestMethods; + /** + * @var bool $digestMethodsRequired + */ + #[JsonProperty('digestMethodsRequired')] + public bool $digestMethodsRequired; + /** * @var array $reasons */ #[JsonProperty('reasons'), ArrayType(['string'])] public array $reasons; + /** + * @var bool $reasonsRequired + */ + #[JsonProperty('reasonsRequired')] + public bool $reasonsRequired; + /** * @var bool $unsupportedRequired */ @@ -64,28 +82,34 @@ class DocVersionsSignatures200ResponseSignaturesItemSeedValue extends JsonSerial /** * @param array{ - * requiredFlags: int, - * presentFlags: int, + * parserVersionRequired: bool, + * filterRequired: bool, * subFilters: array, + * subFiltersRequired: bool, * digestMethods: array, + * digestMethodsRequired: bool, * reasons: array, + * reasonsRequired: bool, * unsupportedRequired: bool, - * version?: ?int, - * mdp?: ?float, + * parserVersion?: ?int, + * mdp?: ?int, * filter?: ?string, * } $values */ public function __construct( array $values, ) { - $this->requiredFlags = $values['requiredFlags']; - $this->presentFlags = $values['presentFlags']; - $this->version = $values['version'] ?? null; + $this->parserVersion = $values['parserVersion'] ?? null; + $this->parserVersionRequired = $values['parserVersionRequired']; $this->mdp = $values['mdp'] ?? null; $this->filter = $values['filter'] ?? null; + $this->filterRequired = $values['filterRequired']; $this->subFilters = $values['subFilters']; + $this->subFiltersRequired = $values['subFiltersRequired']; $this->digestMethods = $values['digestMethods']; + $this->digestMethodsRequired = $values['digestMethodsRequired']; $this->reasons = $values['reasons']; + $this->reasonsRequired = $values['reasonsRequired']; $this->unsupportedRequired = $values['unsupportedRequired']; } diff --git a/src/Types/DocVersionsSignatures200ResponseSignaturesItemSigner.php b/src/Types/DocVersionsSignaturesResponseSignaturesItemSigner.php similarity index 94% rename from src/Types/DocVersionsSignatures200ResponseSignaturesItemSigner.php rename to src/Types/DocVersionsSignaturesResponseSignaturesItemSigner.php index eac0190e..b4fd91dd 100644 --- a/src/Types/DocVersionsSignatures200ResponseSignaturesItemSigner.php +++ b/src/Types/DocVersionsSignaturesResponseSignaturesItemSigner.php @@ -7,7 +7,7 @@ use DateTime; use CloudPDF\Core\Types\Date; -class DocVersionsSignatures200ResponseSignaturesItemSigner extends JsonSerializableType +class DocVersionsSignaturesResponseSignaturesItemSigner extends JsonSerializableType { /** * @var ?string $name diff --git a/src/Types/DocumentsGet200Response.php b/src/Types/DocumentsCommitResponse.php similarity index 67% rename from src/Types/DocumentsGet200Response.php rename to src/Types/DocumentsCommitResponse.php index 29a2c5d7..ac3e92b0 100644 --- a/src/Types/DocumentsGet200Response.php +++ b/src/Types/DocumentsCommitResponse.php @@ -5,17 +5,17 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocumentsGet200Response extends JsonSerializableType +class DocumentsCommitResponse extends JsonSerializableType { /** - * @var DocumentsGet200ResponseDocument $document + * @var DocumentsCommitResponseDocument $document */ #[JsonProperty('document')] - public DocumentsGet200ResponseDocument $document; + public DocumentsCommitResponseDocument $document; /** * @param array{ - * document: DocumentsGet200ResponseDocument, + * document: DocumentsCommitResponseDocument, * } $values */ public function __construct( diff --git a/src/Types/DocumentsGet200ResponseDocument.php b/src/Types/DocumentsCommitResponseDocument.php similarity index 68% rename from src/Types/DocumentsGet200ResponseDocument.php rename to src/Types/DocumentsCommitResponseDocument.php index 20356437..a2092878 100644 --- a/src/Types/DocumentsGet200ResponseDocument.php +++ b/src/Types/DocumentsCommitResponseDocument.php @@ -5,8 +5,10 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; +use DateTime; +use CloudPDF\Core\Types\Date; -class DocumentsGet200ResponseDocument extends JsonSerializableType +class DocumentsCommitResponseDocument extends JsonSerializableType { /** * @var string $id @@ -33,22 +35,22 @@ class DocumentsGet200ResponseDocument extends JsonSerializableType public string $folderId; /** - * @var value-of $state + * @var value-of $state */ #[JsonProperty('state')] public string $state; /** - * @var ?string $baseSha + * @var ?string $baseSha256 */ - #[JsonProperty('baseSha')] - public ?string $baseSha; + #[JsonProperty('baseSha256')] + public ?string $baseSha256; /** - * @var ?float $storageSizeBytes + * @var ?int $sizeBytes */ - #[JsonProperty('storageSizeBytes')] - public ?float $storageSizeBytes; + #[JsonProperty('sizeBytes')] + public ?int $sizeBytes; /** * @var ?array $metadata @@ -69,10 +71,10 @@ class DocumentsGet200ResponseDocument extends JsonSerializableType public ?string $failureReason; /** - * @var ?value-of $thumbnailState + * @var value-of $thumbnailState */ #[JsonProperty('thumbnailState')] - public ?string $thumbnailState; + public string $thumbnailState; /** * @var ?string $thumbnailUrl @@ -81,16 +83,16 @@ class DocumentsGet200ResponseDocument extends JsonSerializableType public ?string $thumbnailUrl; /** - * @var float $createdAt + * @var DateTime $createdAt */ - #[JsonProperty('createdAt')] - public float $createdAt; + #[JsonProperty('createdAt'), Date(Date::TYPE_DATETIME)] + public DateTime $createdAt; /** - * @var float $updatedAt + * @var DateTime $updatedAt */ - #[JsonProperty('updatedAt')] - public float $updatedAt; + #[JsonProperty('updatedAt'), Date(Date::TYPE_DATETIME)] + public DateTime $updatedAt; /** * @var ?string $createdBy @@ -104,15 +106,15 @@ class DocumentsGet200ResponseDocument extends JsonSerializableType * tenantId: string, * name: string, * folderId: string, - * state: value-of, - * createdAt: float, - * updatedAt: float, - * baseSha?: ?string, - * storageSizeBytes?: ?float, + * state: value-of, + * thumbnailState: value-of, + * createdAt: DateTime, + * updatedAt: DateTime, + * baseSha256?: ?string, + * sizeBytes?: ?int, * metadata?: ?array, * idempotencyKey?: ?string, * failureReason?: ?string, - * thumbnailState?: ?value-of, * thumbnailUrl?: ?string, * createdBy?: ?string, * } $values @@ -125,12 +127,12 @@ public function __construct( $this->name = $values['name']; $this->folderId = $values['folderId']; $this->state = $values['state']; - $this->baseSha = $values['baseSha'] ?? null; - $this->storageSizeBytes = $values['storageSizeBytes'] ?? null; + $this->baseSha256 = $values['baseSha256'] ?? null; + $this->sizeBytes = $values['sizeBytes'] ?? null; $this->metadata = $values['metadata'] ?? null; $this->idempotencyKey = $values['idempotencyKey'] ?? null; $this->failureReason = $values['failureReason'] ?? null; - $this->thumbnailState = $values['thumbnailState'] ?? null; + $this->thumbnailState = $values['thumbnailState']; $this->thumbnailUrl = $values['thumbnailUrl'] ?? null; $this->createdAt = $values['createdAt']; $this->updatedAt = $values['updatedAt']; diff --git a/src/Types/DocumentsGet200ResponseDocumentState.php b/src/Types/DocumentsCommitResponseDocumentState.php similarity index 75% rename from src/Types/DocumentsGet200ResponseDocumentState.php rename to src/Types/DocumentsCommitResponseDocumentState.php index 3d475283..c4ccae8b 100644 --- a/src/Types/DocumentsGet200ResponseDocumentState.php +++ b/src/Types/DocumentsCommitResponseDocumentState.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocumentsGet200ResponseDocumentState: string +enum DocumentsCommitResponseDocumentState: string { case Pending = "pending"; case Ready = "ready"; diff --git a/src/Types/DocumentsGet200ResponseDocumentThumbnailState.php b/src/Types/DocumentsCommitResponseDocumentThumbnailState.php similarity index 71% rename from src/Types/DocumentsGet200ResponseDocumentThumbnailState.php rename to src/Types/DocumentsCommitResponseDocumentThumbnailState.php index 9e6bcfbf..f212b6e9 100644 --- a/src/Types/DocumentsGet200ResponseDocumentThumbnailState.php +++ b/src/Types/DocumentsCommitResponseDocumentThumbnailState.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocumentsGet200ResponseDocumentThumbnailState: string +enum DocumentsCommitResponseDocumentThumbnailState: string { case Pending = "pending"; case Ready = "ready"; diff --git a/src/Types/DocumentsCommit200Response.php b/src/Types/DocumentsGetResponse.php similarity index 66% rename from src/Types/DocumentsCommit200Response.php rename to src/Types/DocumentsGetResponse.php index 91d6cd75..4eaaa420 100644 --- a/src/Types/DocumentsCommit200Response.php +++ b/src/Types/DocumentsGetResponse.php @@ -5,17 +5,17 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocumentsCommit200Response extends JsonSerializableType +class DocumentsGetResponse extends JsonSerializableType { /** - * @var DocumentsCommit200ResponseDocument $document + * @var DocumentsGetResponseDocument $document */ #[JsonProperty('document')] - public DocumentsCommit200ResponseDocument $document; + public DocumentsGetResponseDocument $document; /** * @param array{ - * document: DocumentsCommit200ResponseDocument, + * document: DocumentsGetResponseDocument, * } $values */ public function __construct( diff --git a/src/Types/DocumentsCommit200ResponseDocument.php b/src/Types/DocumentsGetResponseDocument.php similarity index 68% rename from src/Types/DocumentsCommit200ResponseDocument.php rename to src/Types/DocumentsGetResponseDocument.php index 084e5d35..b9fc054e 100644 --- a/src/Types/DocumentsCommit200ResponseDocument.php +++ b/src/Types/DocumentsGetResponseDocument.php @@ -5,8 +5,10 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; +use DateTime; +use CloudPDF\Core\Types\Date; -class DocumentsCommit200ResponseDocument extends JsonSerializableType +class DocumentsGetResponseDocument extends JsonSerializableType { /** * @var string $id @@ -33,22 +35,22 @@ class DocumentsCommit200ResponseDocument extends JsonSerializableType public string $folderId; /** - * @var value-of $state + * @var value-of $state */ #[JsonProperty('state')] public string $state; /** - * @var ?string $baseSha + * @var ?string $baseSha256 */ - #[JsonProperty('baseSha')] - public ?string $baseSha; + #[JsonProperty('baseSha256')] + public ?string $baseSha256; /** - * @var ?float $storageSizeBytes + * @var ?int $sizeBytes */ - #[JsonProperty('storageSizeBytes')] - public ?float $storageSizeBytes; + #[JsonProperty('sizeBytes')] + public ?int $sizeBytes; /** * @var ?array $metadata @@ -69,10 +71,10 @@ class DocumentsCommit200ResponseDocument extends JsonSerializableType public ?string $failureReason; /** - * @var ?value-of $thumbnailState + * @var value-of $thumbnailState */ #[JsonProperty('thumbnailState')] - public ?string $thumbnailState; + public string $thumbnailState; /** * @var ?string $thumbnailUrl @@ -81,16 +83,16 @@ class DocumentsCommit200ResponseDocument extends JsonSerializableType public ?string $thumbnailUrl; /** - * @var float $createdAt + * @var DateTime $createdAt */ - #[JsonProperty('createdAt')] - public float $createdAt; + #[JsonProperty('createdAt'), Date(Date::TYPE_DATETIME)] + public DateTime $createdAt; /** - * @var float $updatedAt + * @var DateTime $updatedAt */ - #[JsonProperty('updatedAt')] - public float $updatedAt; + #[JsonProperty('updatedAt'), Date(Date::TYPE_DATETIME)] + public DateTime $updatedAt; /** * @var ?string $createdBy @@ -104,15 +106,15 @@ class DocumentsCommit200ResponseDocument extends JsonSerializableType * tenantId: string, * name: string, * folderId: string, - * state: value-of, - * createdAt: float, - * updatedAt: float, - * baseSha?: ?string, - * storageSizeBytes?: ?float, + * state: value-of, + * thumbnailState: value-of, + * createdAt: DateTime, + * updatedAt: DateTime, + * baseSha256?: ?string, + * sizeBytes?: ?int, * metadata?: ?array, * idempotencyKey?: ?string, * failureReason?: ?string, - * thumbnailState?: ?value-of, * thumbnailUrl?: ?string, * createdBy?: ?string, * } $values @@ -125,12 +127,12 @@ public function __construct( $this->name = $values['name']; $this->folderId = $values['folderId']; $this->state = $values['state']; - $this->baseSha = $values['baseSha'] ?? null; - $this->storageSizeBytes = $values['storageSizeBytes'] ?? null; + $this->baseSha256 = $values['baseSha256'] ?? null; + $this->sizeBytes = $values['sizeBytes'] ?? null; $this->metadata = $values['metadata'] ?? null; $this->idempotencyKey = $values['idempotencyKey'] ?? null; $this->failureReason = $values['failureReason'] ?? null; - $this->thumbnailState = $values['thumbnailState'] ?? null; + $this->thumbnailState = $values['thumbnailState']; $this->thumbnailUrl = $values['thumbnailUrl'] ?? null; $this->createdAt = $values['createdAt']; $this->updatedAt = $values['updatedAt']; diff --git a/src/Types/DocumentsCommit200ResponseDocumentState.php b/src/Types/DocumentsGetResponseDocumentState.php similarity index 74% rename from src/Types/DocumentsCommit200ResponseDocumentState.php rename to src/Types/DocumentsGetResponseDocumentState.php index 9caaa928..19ea22bb 100644 --- a/src/Types/DocumentsCommit200ResponseDocumentState.php +++ b/src/Types/DocumentsGetResponseDocumentState.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocumentsCommit200ResponseDocumentState: string +enum DocumentsGetResponseDocumentState: string { case Pending = "pending"; case Ready = "ready"; diff --git a/src/Types/DocumentsCommit200ResponseDocumentThumbnailState.php b/src/Types/DocumentsGetResponseDocumentThumbnailState.php similarity index 70% rename from src/Types/DocumentsCommit200ResponseDocumentThumbnailState.php rename to src/Types/DocumentsGetResponseDocumentThumbnailState.php index 4cf89033..0a43a289 100644 --- a/src/Types/DocumentsCommit200ResponseDocumentThumbnailState.php +++ b/src/Types/DocumentsGetResponseDocumentThumbnailState.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocumentsCommit200ResponseDocumentThumbnailState: string +enum DocumentsGetResponseDocumentThumbnailState: string { case Pending = "pending"; case Ready = "ready"; diff --git a/src/Types/DocumentsImportFrom200Response.php b/src/Types/DocumentsImportFrom200Response.php index 518e11c5..2c8d97ac 100644 --- a/src/Types/DocumentsImportFrom200Response.php +++ b/src/Types/DocumentsImportFrom200Response.php @@ -8,10 +8,10 @@ class DocumentsImportFrom200Response extends JsonSerializableType { /** - * @var value-of $tag + * @var value-of $status */ - #[JsonProperty('tag')] - public string $tag; + #[JsonProperty('status')] + public string $status; /** * @var DocumentsImportFrom200ResponseDocument $document @@ -21,14 +21,14 @@ class DocumentsImportFrom200Response extends JsonSerializableType /** * @param array{ - * tag: value-of, + * status: value-of, * document: DocumentsImportFrom200ResponseDocument, * } $values */ public function __construct( array $values, ) { - $this->tag = $values['tag']; + $this->status = $values['status']; $this->document = $values['document']; } diff --git a/src/Types/DocumentsImportFrom200ResponseDocument.php b/src/Types/DocumentsImportFrom200ResponseDocument.php index b043306c..a2464eb9 100644 --- a/src/Types/DocumentsImportFrom200ResponseDocument.php +++ b/src/Types/DocumentsImportFrom200ResponseDocument.php @@ -5,6 +5,8 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; +use DateTime; +use CloudPDF\Core\Types\Date; class DocumentsImportFrom200ResponseDocument extends JsonSerializableType { @@ -39,16 +41,16 @@ class DocumentsImportFrom200ResponseDocument extends JsonSerializableType public string $state; /** - * @var ?string $baseSha + * @var ?string $baseSha256 */ - #[JsonProperty('baseSha')] - public ?string $baseSha; + #[JsonProperty('baseSha256')] + public ?string $baseSha256; /** - * @var ?float $storageSizeBytes + * @var ?int $sizeBytes */ - #[JsonProperty('storageSizeBytes')] - public ?float $storageSizeBytes; + #[JsonProperty('sizeBytes')] + public ?int $sizeBytes; /** * @var ?array $metadata @@ -69,10 +71,10 @@ class DocumentsImportFrom200ResponseDocument extends JsonSerializableType public ?string $failureReason; /** - * @var ?value-of $thumbnailState + * @var value-of $thumbnailState */ #[JsonProperty('thumbnailState')] - public ?string $thumbnailState; + public string $thumbnailState; /** * @var ?string $thumbnailUrl @@ -81,16 +83,16 @@ class DocumentsImportFrom200ResponseDocument extends JsonSerializableType public ?string $thumbnailUrl; /** - * @var float $createdAt + * @var DateTime $createdAt */ - #[JsonProperty('createdAt')] - public float $createdAt; + #[JsonProperty('createdAt'), Date(Date::TYPE_DATETIME)] + public DateTime $createdAt; /** - * @var float $updatedAt + * @var DateTime $updatedAt */ - #[JsonProperty('updatedAt')] - public float $updatedAt; + #[JsonProperty('updatedAt'), Date(Date::TYPE_DATETIME)] + public DateTime $updatedAt; /** * @var ?string $createdBy @@ -105,14 +107,14 @@ class DocumentsImportFrom200ResponseDocument extends JsonSerializableType * name: string, * folderId: string, * state: value-of, - * createdAt: float, - * updatedAt: float, - * baseSha?: ?string, - * storageSizeBytes?: ?float, + * thumbnailState: value-of, + * createdAt: DateTime, + * updatedAt: DateTime, + * baseSha256?: ?string, + * sizeBytes?: ?int, * metadata?: ?array, * idempotencyKey?: ?string, * failureReason?: ?string, - * thumbnailState?: ?value-of, * thumbnailUrl?: ?string, * createdBy?: ?string, * } $values @@ -125,12 +127,12 @@ public function __construct( $this->name = $values['name']; $this->folderId = $values['folderId']; $this->state = $values['state']; - $this->baseSha = $values['baseSha'] ?? null; - $this->storageSizeBytes = $values['storageSizeBytes'] ?? null; + $this->baseSha256 = $values['baseSha256'] ?? null; + $this->sizeBytes = $values['sizeBytes'] ?? null; $this->metadata = $values['metadata'] ?? null; $this->idempotencyKey = $values['idempotencyKey'] ?? null; $this->failureReason = $values['failureReason'] ?? null; - $this->thumbnailState = $values['thumbnailState'] ?? null; + $this->thumbnailState = $values['thumbnailState']; $this->thumbnailUrl = $values['thumbnailUrl'] ?? null; $this->createdAt = $values['createdAt']; $this->updatedAt = $values['updatedAt']; diff --git a/src/Types/DocumentsImportFrom200ResponseTag.php b/src/Types/DocumentsImportFrom200ResponseStatus.php similarity index 72% rename from src/Types/DocumentsImportFrom200ResponseTag.php rename to src/Types/DocumentsImportFrom200ResponseStatus.php index 812483e8..3703c3cd 100644 --- a/src/Types/DocumentsImportFrom200ResponseTag.php +++ b/src/Types/DocumentsImportFrom200ResponseStatus.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocumentsImportFrom200ResponseTag: string +enum DocumentsImportFrom200ResponseStatus: string { case Imported = "imported"; case Deduped = "deduped"; diff --git a/src/Types/DocumentsImportFrom202Response.php b/src/Types/DocumentsImportFrom202Response.php index 8db08f4b..e0933998 100644 --- a/src/Types/DocumentsImportFrom202Response.php +++ b/src/Types/DocumentsImportFrom202Response.php @@ -8,10 +8,10 @@ class DocumentsImportFrom202Response extends JsonSerializableType { /** - * @var value-of $tag + * @var value-of $status */ - #[JsonProperty('tag')] - public string $tag; + #[JsonProperty('status')] + public string $status; /** * @var DocumentsImportFrom202ResponseDocument $document @@ -21,14 +21,14 @@ class DocumentsImportFrom202Response extends JsonSerializableType /** * @param array{ - * tag: value-of, + * status: value-of, * document: DocumentsImportFrom202ResponseDocument, * } $values */ public function __construct( array $values, ) { - $this->tag = $values['tag']; + $this->status = $values['status']; $this->document = $values['document']; } diff --git a/src/Types/DocumentsImportFrom202ResponseDocument.php b/src/Types/DocumentsImportFrom202ResponseDocument.php index 4dae8085..56bf7ebc 100644 --- a/src/Types/DocumentsImportFrom202ResponseDocument.php +++ b/src/Types/DocumentsImportFrom202ResponseDocument.php @@ -5,6 +5,8 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; +use DateTime; +use CloudPDF\Core\Types\Date; class DocumentsImportFrom202ResponseDocument extends JsonSerializableType { @@ -39,16 +41,16 @@ class DocumentsImportFrom202ResponseDocument extends JsonSerializableType public string $state; /** - * @var ?string $baseSha + * @var ?string $baseSha256 */ - #[JsonProperty('baseSha')] - public ?string $baseSha; + #[JsonProperty('baseSha256')] + public ?string $baseSha256; /** - * @var ?float $storageSizeBytes + * @var ?int $sizeBytes */ - #[JsonProperty('storageSizeBytes')] - public ?float $storageSizeBytes; + #[JsonProperty('sizeBytes')] + public ?int $sizeBytes; /** * @var ?array $metadata @@ -69,10 +71,10 @@ class DocumentsImportFrom202ResponseDocument extends JsonSerializableType public ?string $failureReason; /** - * @var ?value-of $thumbnailState + * @var value-of $thumbnailState */ #[JsonProperty('thumbnailState')] - public ?string $thumbnailState; + public string $thumbnailState; /** * @var ?string $thumbnailUrl @@ -81,16 +83,16 @@ class DocumentsImportFrom202ResponseDocument extends JsonSerializableType public ?string $thumbnailUrl; /** - * @var float $createdAt + * @var DateTime $createdAt */ - #[JsonProperty('createdAt')] - public float $createdAt; + #[JsonProperty('createdAt'), Date(Date::TYPE_DATETIME)] + public DateTime $createdAt; /** - * @var float $updatedAt + * @var DateTime $updatedAt */ - #[JsonProperty('updatedAt')] - public float $updatedAt; + #[JsonProperty('updatedAt'), Date(Date::TYPE_DATETIME)] + public DateTime $updatedAt; /** * @var ?string $createdBy @@ -105,14 +107,14 @@ class DocumentsImportFrom202ResponseDocument extends JsonSerializableType * name: string, * folderId: string, * state: value-of, - * createdAt: float, - * updatedAt: float, - * baseSha?: ?string, - * storageSizeBytes?: ?float, + * thumbnailState: value-of, + * createdAt: DateTime, + * updatedAt: DateTime, + * baseSha256?: ?string, + * sizeBytes?: ?int, * metadata?: ?array, * idempotencyKey?: ?string, * failureReason?: ?string, - * thumbnailState?: ?value-of, * thumbnailUrl?: ?string, * createdBy?: ?string, * } $values @@ -125,12 +127,12 @@ public function __construct( $this->name = $values['name']; $this->folderId = $values['folderId']; $this->state = $values['state']; - $this->baseSha = $values['baseSha'] ?? null; - $this->storageSizeBytes = $values['storageSizeBytes'] ?? null; + $this->baseSha256 = $values['baseSha256'] ?? null; + $this->sizeBytes = $values['sizeBytes'] ?? null; $this->metadata = $values['metadata'] ?? null; $this->idempotencyKey = $values['idempotencyKey'] ?? null; $this->failureReason = $values['failureReason'] ?? null; - $this->thumbnailState = $values['thumbnailState'] ?? null; + $this->thumbnailState = $values['thumbnailState']; $this->thumbnailUrl = $values['thumbnailUrl'] ?? null; $this->createdAt = $values['createdAt']; $this->updatedAt = $values['updatedAt']; diff --git a/src/Types/DocumentsImportFrom202ResponseTag.php b/src/Types/DocumentsImportFrom202ResponseStatus.php similarity index 72% rename from src/Types/DocumentsImportFrom202ResponseTag.php rename to src/Types/DocumentsImportFrom202ResponseStatus.php index d976f252..240a5bdc 100644 --- a/src/Types/DocumentsImportFrom202ResponseTag.php +++ b/src/Types/DocumentsImportFrom202ResponseStatus.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocumentsImportFrom202ResponseTag: string +enum DocumentsImportFrom202ResponseStatus: string { case Imported = "imported"; case Deduped = "deduped"; diff --git a/src/Types/DocumentsInit200ResponseCreatedDocumentState.php b/src/Types/DocumentsInit200ResponseCreatedDocumentState.php deleted file mode 100644 index 8b28efc3..00000000 --- a/src/Types/DocumentsInit200ResponseCreatedDocumentState.php +++ /dev/null @@ -1,11 +0,0 @@ - $state - */ - #[JsonProperty('state')] - public string $state; - - /** - * @var ?string $baseSha - */ - #[JsonProperty('baseSha')] - public ?string $baseSha; - - /** - * @var ?float $storageSizeBytes - */ - #[JsonProperty('storageSizeBytes')] - public ?float $storageSizeBytes; - - /** - * @var ?array $metadata - */ - #[JsonProperty('metadata'), ArrayType(['string' => 'mixed'])] - public ?array $metadata; - - /** - * @var ?string $idempotencyKey - */ - #[JsonProperty('idempotencyKey')] - public ?string $idempotencyKey; - - /** - * @var ?string $failureReason - */ - #[JsonProperty('failureReason')] - public ?string $failureReason; - - /** - * @var ?value-of $thumbnailState - */ - #[JsonProperty('thumbnailState')] - public ?string $thumbnailState; - - /** - * @var ?string $thumbnailUrl - */ - #[JsonProperty('thumbnailUrl')] - public ?string $thumbnailUrl; - - /** - * @var float $createdAt - */ - #[JsonProperty('createdAt')] - public float $createdAt; - - /** - * @var float $updatedAt - */ - #[JsonProperty('updatedAt')] - public float $updatedAt; - - /** - * @var ?string $createdBy - */ - #[JsonProperty('createdBy')] - public ?string $createdBy; - - /** - * @param array{ - * id: string, - * tenantId: string, - * name: string, - * folderId: string, - * state: value-of, - * createdAt: float, - * updatedAt: float, - * baseSha?: ?string, - * storageSizeBytes?: ?float, - * metadata?: ?array, - * idempotencyKey?: ?string, - * failureReason?: ?string, - * thumbnailState?: ?value-of, - * thumbnailUrl?: ?string, - * createdBy?: ?string, - * } $values - */ - public function __construct( - array $values, - ) { - $this->id = $values['id']; - $this->tenantId = $values['tenantId']; - $this->name = $values['name']; - $this->folderId = $values['folderId']; - $this->state = $values['state']; - $this->baseSha = $values['baseSha'] ?? null; - $this->storageSizeBytes = $values['storageSizeBytes'] ?? null; - $this->metadata = $values['metadata'] ?? null; - $this->idempotencyKey = $values['idempotencyKey'] ?? null; - $this->failureReason = $values['failureReason'] ?? null; - $this->thumbnailState = $values['thumbnailState'] ?? null; - $this->thumbnailUrl = $values['thumbnailUrl'] ?? null; - $this->createdAt = $values['createdAt']; - $this->updatedAt = $values['updatedAt']; - $this->createdBy = $values['createdBy'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/DocumentsInit200ResponseResumedDocumentState.php b/src/Types/DocumentsInit200ResponseResumedDocumentState.php deleted file mode 100644 index 28b61a5c..00000000 --- a/src/Types/DocumentsInit200ResponseResumedDocumentState.php +++ /dev/null @@ -1,11 +0,0 @@ -tag = $values['tag']; + $this->status = $values['status']; $this->value = $values['value']; } /** - * @param DocumentsInit200ResponseCreated $created - * @return DocumentsInit200Response + * @param DocumentsInitResponseCreated $created + * @return DocumentsInitResponse */ - public static function created(DocumentsInit200ResponseCreated $created): DocumentsInit200Response + public static function created(DocumentsInitResponseCreated $created): DocumentsInitResponse { - return new DocumentsInit200Response([ - 'tag' => 'created', + return new DocumentsInitResponse([ + 'status' => 'created', 'value' => $created, ]); } /** - * @param DocumentsInit200ResponseResumed $resumed - * @return DocumentsInit200Response + * @param DocumentsInitResponseResumed $resumed + * @return DocumentsInitResponse */ - public static function resumed(DocumentsInit200ResponseResumed $resumed): DocumentsInit200Response + public static function resumed(DocumentsInitResponseResumed $resumed): DocumentsInitResponse { - return new DocumentsInit200Response([ - 'tag' => 'resumed', + return new DocumentsInitResponse([ + 'status' => 'resumed', 'value' => $resumed, ]); } /** - * @param DocumentsInit200ResponseDeduped $deduped - * @return DocumentsInit200Response + * @param DocumentsInitResponseDeduped $deduped + * @return DocumentsInitResponse */ - public static function deduped(DocumentsInit200ResponseDeduped $deduped): DocumentsInit200Response + public static function deduped(DocumentsInitResponseDeduped $deduped): DocumentsInitResponse { - return new DocumentsInit200Response([ - 'tag' => 'deduped', + return new DocumentsInitResponse([ + 'status' => 'deduped', 'value' => $deduped, ]); } @@ -91,17 +91,17 @@ public static function deduped(DocumentsInit200ResponseDeduped $deduped): Docume */ public function isCreated(): bool { - return $this->value instanceof DocumentsInit200ResponseCreated && $this->tag === 'created'; + return $this->value instanceof DocumentsInitResponseCreated && $this->status === 'created'; } /** - * @return DocumentsInit200ResponseCreated + * @return DocumentsInitResponseCreated */ - public function asCreated(): DocumentsInit200ResponseCreated + public function asCreated(): DocumentsInitResponseCreated { - if (!($this->value instanceof DocumentsInit200ResponseCreated && $this->tag === 'created')) { + if (!($this->value instanceof DocumentsInitResponseCreated && $this->status === 'created')) { throw new Exception( - "Expected created; got " . $this->tag . " with value of type " . get_debug_type($this->value), + "Expected created; got " . $this->status . " with value of type " . get_debug_type($this->value), ); } @@ -113,17 +113,17 @@ public function asCreated(): DocumentsInit200ResponseCreated */ public function isResumed(): bool { - return $this->value instanceof DocumentsInit200ResponseResumed && $this->tag === 'resumed'; + return $this->value instanceof DocumentsInitResponseResumed && $this->status === 'resumed'; } /** - * @return DocumentsInit200ResponseResumed + * @return DocumentsInitResponseResumed */ - public function asResumed(): DocumentsInit200ResponseResumed + public function asResumed(): DocumentsInitResponseResumed { - if (!($this->value instanceof DocumentsInit200ResponseResumed && $this->tag === 'resumed')) { + if (!($this->value instanceof DocumentsInitResponseResumed && $this->status === 'resumed')) { throw new Exception( - "Expected resumed; got " . $this->tag . " with value of type " . get_debug_type($this->value), + "Expected resumed; got " . $this->status . " with value of type " . get_debug_type($this->value), ); } @@ -135,17 +135,17 @@ public function asResumed(): DocumentsInit200ResponseResumed */ public function isDeduped(): bool { - return $this->value instanceof DocumentsInit200ResponseDeduped && $this->tag === 'deduped'; + return $this->value instanceof DocumentsInitResponseDeduped && $this->status === 'deduped'; } /** - * @return DocumentsInit200ResponseDeduped + * @return DocumentsInitResponseDeduped */ - public function asDeduped(): DocumentsInit200ResponseDeduped + public function asDeduped(): DocumentsInitResponseDeduped { - if (!($this->value instanceof DocumentsInit200ResponseDeduped && $this->tag === 'deduped')) { + if (!($this->value instanceof DocumentsInitResponseDeduped && $this->status === 'deduped')) { throw new Exception( - "Expected deduped; got " . $this->tag . " with value of type " . get_debug_type($this->value), + "Expected deduped; got " . $this->status . " with value of type " . get_debug_type($this->value), ); } @@ -166,12 +166,12 @@ public function __toString(): string public function jsonSerialize(): array { $result = []; - $result['tag'] = $this->tag; + $result['status'] = $this->status; $base = parent::jsonSerialize(); $result = array_merge($base, $result); - switch ($this->tag) { + switch ($this->status) { case 'created': $value = $this->asCreated()->jsonSerialize(); $result = array_merge($value, $result); @@ -206,32 +206,32 @@ public function jsonSerialize(): array public static function jsonDeserialize(array $data): static { $args = []; - if (!array_key_exists('tag', $data)) { + if (!array_key_exists('status', $data)) { throw new Exception( - "JSON data is missing property 'tag'", + "JSON data is missing property 'status'", ); } - $tag = $data['tag']; - if (!(is_string($tag))) { + $status = $data['status']; + if (!(is_string($status))) { throw new Exception( - "Expected property 'tag' in JSON data to be string, instead received " . get_debug_type($data['tag']), + "Expected property 'status' in JSON data to be string, instead received " . get_debug_type($data['status']), ); } - $args['tag'] = $tag; - switch ($tag) { + $args['status'] = $status; + switch ($status) { case 'created': - $args['value'] = DocumentsInit200ResponseCreated::jsonDeserialize($data); + $args['value'] = DocumentsInitResponseCreated::jsonDeserialize($data); break; case 'resumed': - $args['value'] = DocumentsInit200ResponseResumed::jsonDeserialize($data); + $args['value'] = DocumentsInitResponseResumed::jsonDeserialize($data); break; case 'deduped': - $args['value'] = DocumentsInit200ResponseDeduped::jsonDeserialize($data); + $args['value'] = DocumentsInitResponseDeduped::jsonDeserialize($data); break; case '_unknown': default: - $args['tag'] = '_unknown'; + $args['status'] = '_unknown'; $args['value'] = $data; } diff --git a/src/Types/DocumentsInit200ResponseResumed.php b/src/Types/DocumentsInitResponseCreated.php similarity index 56% rename from src/Types/DocumentsInit200ResponseResumed.php rename to src/Types/DocumentsInitResponseCreated.php index 685bec45..0b8f7dac 100644 --- a/src/Types/DocumentsInit200ResponseResumed.php +++ b/src/Types/DocumentsInitResponseCreated.php @@ -5,24 +5,24 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocumentsInit200ResponseResumed extends JsonSerializableType +class DocumentsInitResponseCreated extends JsonSerializableType { /** - * @var DocumentsInit200ResponseResumedDocument $document + * @var DocumentsInitResponseCreatedDocument $document */ #[JsonProperty('document')] - public DocumentsInit200ResponseResumedDocument $document; + public DocumentsInitResponseCreatedDocument $document; /** - * @var DocumentsInit200ResponseResumedUpload $upload + * @var DocumentsInitResponseCreatedUpload $upload */ #[JsonProperty('upload')] - public DocumentsInit200ResponseResumedUpload $upload; + public DocumentsInitResponseCreatedUpload $upload; /** * @param array{ - * document: DocumentsInit200ResponseResumedDocument, - * upload: DocumentsInit200ResponseResumedUpload, + * document: DocumentsInitResponseCreatedDocument, + * upload: DocumentsInitResponseCreatedUpload, * } $values */ public function __construct( diff --git a/src/Types/DocumentsUpdate200ResponseDocument.php b/src/Types/DocumentsInitResponseCreatedDocument.php similarity index 68% rename from src/Types/DocumentsUpdate200ResponseDocument.php rename to src/Types/DocumentsInitResponseCreatedDocument.php index 162b47dc..763d1559 100644 --- a/src/Types/DocumentsUpdate200ResponseDocument.php +++ b/src/Types/DocumentsInitResponseCreatedDocument.php @@ -5,8 +5,10 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; +use DateTime; +use CloudPDF\Core\Types\Date; -class DocumentsUpdate200ResponseDocument extends JsonSerializableType +class DocumentsInitResponseCreatedDocument extends JsonSerializableType { /** * @var string $id @@ -33,22 +35,22 @@ class DocumentsUpdate200ResponseDocument extends JsonSerializableType public string $folderId; /** - * @var value-of $state + * @var value-of $state */ #[JsonProperty('state')] public string $state; /** - * @var ?string $baseSha + * @var ?string $baseSha256 */ - #[JsonProperty('baseSha')] - public ?string $baseSha; + #[JsonProperty('baseSha256')] + public ?string $baseSha256; /** - * @var ?float $storageSizeBytes + * @var ?int $sizeBytes */ - #[JsonProperty('storageSizeBytes')] - public ?float $storageSizeBytes; + #[JsonProperty('sizeBytes')] + public ?int $sizeBytes; /** * @var ?array $metadata @@ -69,10 +71,10 @@ class DocumentsUpdate200ResponseDocument extends JsonSerializableType public ?string $failureReason; /** - * @var ?value-of $thumbnailState + * @var value-of $thumbnailState */ #[JsonProperty('thumbnailState')] - public ?string $thumbnailState; + public string $thumbnailState; /** * @var ?string $thumbnailUrl @@ -81,16 +83,16 @@ class DocumentsUpdate200ResponseDocument extends JsonSerializableType public ?string $thumbnailUrl; /** - * @var float $createdAt + * @var DateTime $createdAt */ - #[JsonProperty('createdAt')] - public float $createdAt; + #[JsonProperty('createdAt'), Date(Date::TYPE_DATETIME)] + public DateTime $createdAt; /** - * @var float $updatedAt + * @var DateTime $updatedAt */ - #[JsonProperty('updatedAt')] - public float $updatedAt; + #[JsonProperty('updatedAt'), Date(Date::TYPE_DATETIME)] + public DateTime $updatedAt; /** * @var ?string $createdBy @@ -104,15 +106,15 @@ class DocumentsUpdate200ResponseDocument extends JsonSerializableType * tenantId: string, * name: string, * folderId: string, - * state: value-of, - * createdAt: float, - * updatedAt: float, - * baseSha?: ?string, - * storageSizeBytes?: ?float, + * state: value-of, + * thumbnailState: value-of, + * createdAt: DateTime, + * updatedAt: DateTime, + * baseSha256?: ?string, + * sizeBytes?: ?int, * metadata?: ?array, * idempotencyKey?: ?string, * failureReason?: ?string, - * thumbnailState?: ?value-of, * thumbnailUrl?: ?string, * createdBy?: ?string, * } $values @@ -125,12 +127,12 @@ public function __construct( $this->name = $values['name']; $this->folderId = $values['folderId']; $this->state = $values['state']; - $this->baseSha = $values['baseSha'] ?? null; - $this->storageSizeBytes = $values['storageSizeBytes'] ?? null; + $this->baseSha256 = $values['baseSha256'] ?? null; + $this->sizeBytes = $values['sizeBytes'] ?? null; $this->metadata = $values['metadata'] ?? null; $this->idempotencyKey = $values['idempotencyKey'] ?? null; $this->failureReason = $values['failureReason'] ?? null; - $this->thumbnailState = $values['thumbnailState'] ?? null; + $this->thumbnailState = $values['thumbnailState']; $this->thumbnailUrl = $values['thumbnailUrl'] ?? null; $this->createdAt = $values['createdAt']; $this->updatedAt = $values['updatedAt']; diff --git a/src/Types/DocumentsInitResponseCreatedDocumentState.php b/src/Types/DocumentsInitResponseCreatedDocumentState.php new file mode 100644 index 00000000..6493badf --- /dev/null +++ b/src/Types/DocumentsInitResponseCreatedDocumentState.php @@ -0,0 +1,11 @@ + 'presigned', 'value' => $presigned, ]); } /** - * @param DocumentsInit200ResponseResumedUploadProxy $proxy - * @return DocumentsInit200ResponseResumedUpload + * @param DocumentsInitResponseCreatedUploadProxy $proxy + * @return DocumentsInitResponseCreatedUpload */ - public static function proxy(DocumentsInit200ResponseResumedUploadProxy $proxy): DocumentsInit200ResponseResumedUpload + public static function proxy(DocumentsInitResponseCreatedUploadProxy $proxy): DocumentsInitResponseCreatedUpload { - return new DocumentsInit200ResponseResumedUpload([ + return new DocumentsInitResponseCreatedUpload([ 'kind' => 'proxy', 'value' => $proxy, ]); @@ -75,15 +75,15 @@ public static function proxy(DocumentsInit200ResponseResumedUploadProxy $proxy): */ public function isPresigned(): bool { - return $this->value instanceof DocumentsInit200ResponseResumedUploadPresigned && $this->kind === 'presigned'; + return $this->value instanceof DocumentsInitResponseCreatedUploadPresigned && $this->kind === 'presigned'; } /** - * @return DocumentsInit200ResponseResumedUploadPresigned + * @return DocumentsInitResponseCreatedUploadPresigned */ - public function asPresigned(): DocumentsInit200ResponseResumedUploadPresigned + public function asPresigned(): DocumentsInitResponseCreatedUploadPresigned { - if (!($this->value instanceof DocumentsInit200ResponseResumedUploadPresigned && $this->kind === 'presigned')) { + if (!($this->value instanceof DocumentsInitResponseCreatedUploadPresigned && $this->kind === 'presigned')) { throw new Exception( "Expected presigned; got " . $this->kind . " with value of type " . get_debug_type($this->value), ); @@ -97,15 +97,15 @@ public function asPresigned(): DocumentsInit200ResponseResumedUploadPresigned */ public function isProxy(): bool { - return $this->value instanceof DocumentsInit200ResponseResumedUploadProxy && $this->kind === 'proxy'; + return $this->value instanceof DocumentsInitResponseCreatedUploadProxy && $this->kind === 'proxy'; } /** - * @return DocumentsInit200ResponseResumedUploadProxy + * @return DocumentsInitResponseCreatedUploadProxy */ - public function asProxy(): DocumentsInit200ResponseResumedUploadProxy + public function asProxy(): DocumentsInitResponseCreatedUploadProxy { - if (!($this->value instanceof DocumentsInit200ResponseResumedUploadProxy && $this->kind === 'proxy')) { + if (!($this->value instanceof DocumentsInitResponseCreatedUploadProxy && $this->kind === 'proxy')) { throw new Exception( "Expected proxy; got " . $this->kind . " with value of type " . get_debug_type($this->value), ); @@ -179,10 +179,10 @@ public static function jsonDeserialize(array $data): static $args['kind'] = $kind; switch ($kind) { case 'presigned': - $args['value'] = DocumentsInit200ResponseResumedUploadPresigned::jsonDeserialize($data); + $args['value'] = DocumentsInitResponseCreatedUploadPresigned::jsonDeserialize($data); break; case 'proxy': - $args['value'] = DocumentsInit200ResponseResumedUploadProxy::jsonDeserialize($data); + $args['value'] = DocumentsInitResponseCreatedUploadProxy::jsonDeserialize($data); break; case '_unknown': default: diff --git a/src/Types/DocumentsInit200ResponseCreatedUploadPresigned.php b/src/Types/DocumentsInitResponseCreatedUploadPresigned.php similarity index 66% rename from src/Types/DocumentsInit200ResponseCreatedUploadPresigned.php rename to src/Types/DocumentsInitResponseCreatedUploadPresigned.php index bc8cdb7c..aef30196 100644 --- a/src/Types/DocumentsInit200ResponseCreatedUploadPresigned.php +++ b/src/Types/DocumentsInitResponseCreatedUploadPresigned.php @@ -5,13 +5,13 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocumentsInit200ResponseCreatedUploadPresigned extends JsonSerializableType +class DocumentsInitResponseCreatedUploadPresigned extends JsonSerializableType { /** - * @var DocumentsInit200ResponseCreatedUploadPresignedPresigned $presigned + * @var DocumentsInitResponseCreatedUploadPresignedPresigned $presigned */ #[JsonProperty('presigned')] - public DocumentsInit200ResponseCreatedUploadPresignedPresigned $presigned; + public DocumentsInitResponseCreatedUploadPresignedPresigned $presigned; /** * @var string $key @@ -21,7 +21,7 @@ class DocumentsInit200ResponseCreatedUploadPresigned extends JsonSerializableTyp /** * @param array{ - * presigned: DocumentsInit200ResponseCreatedUploadPresignedPresigned, + * presigned: DocumentsInitResponseCreatedUploadPresignedPresigned, * key: string, * } $values */ diff --git a/src/Types/DocumentsInit200ResponseCreatedUploadPresignedPresigned.php b/src/Types/DocumentsInitResponseCreatedUploadPresignedPresigned.php similarity index 67% rename from src/Types/DocumentsInit200ResponseCreatedUploadPresignedPresigned.php rename to src/Types/DocumentsInitResponseCreatedUploadPresignedPresigned.php index 55b7dd1e..aaf66f67 100644 --- a/src/Types/DocumentsInit200ResponseCreatedUploadPresignedPresigned.php +++ b/src/Types/DocumentsInitResponseCreatedUploadPresignedPresigned.php @@ -5,8 +5,10 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; +use DateTime; +use CloudPDF\Core\Types\Date; -class DocumentsInit200ResponseCreatedUploadPresignedPresigned extends JsonSerializableType +class DocumentsInitResponseCreatedUploadPresignedPresigned extends JsonSerializableType { /** * @var string $url @@ -21,23 +23,23 @@ class DocumentsInit200ResponseCreatedUploadPresignedPresigned extends JsonSerial public array $headers; /** - * @var value-of $method + * @var value-of $method */ #[JsonProperty('method')] public string $method; /** - * @var float $expiresAt + * @var DateTime $expiresAt */ - #[JsonProperty('expiresAt')] - public float $expiresAt; + #[JsonProperty('expiresAt'), Date(Date::TYPE_DATETIME)] + public DateTime $expiresAt; /** * @param array{ * url: string, * headers: array, - * method: value-of, - * expiresAt: float, + * method: value-of, + * expiresAt: DateTime, * } $values */ public function __construct( diff --git a/src/Types/DocumentsInitResponseCreatedUploadPresignedPresignedMethod.php b/src/Types/DocumentsInitResponseCreatedUploadPresignedPresignedMethod.php new file mode 100644 index 00000000..c7cd6ef6 --- /dev/null +++ b/src/Types/DocumentsInitResponseCreatedUploadPresignedPresignedMethod.php @@ -0,0 +1,8 @@ + $state + */ + #[JsonProperty('state')] + public string $state; + + /** + * @var ?string $baseSha256 + */ + #[JsonProperty('baseSha256')] + public ?string $baseSha256; + + /** + * @var ?int $sizeBytes + */ + #[JsonProperty('sizeBytes')] + public ?int $sizeBytes; + + /** + * @var ?array $metadata + */ + #[JsonProperty('metadata'), ArrayType(['string' => 'mixed'])] + public ?array $metadata; + + /** + * @var ?string $idempotencyKey + */ + #[JsonProperty('idempotencyKey')] + public ?string $idempotencyKey; + + /** + * @var ?string $failureReason + */ + #[JsonProperty('failureReason')] + public ?string $failureReason; + + /** + * @var value-of $thumbnailState + */ + #[JsonProperty('thumbnailState')] + public string $thumbnailState; + + /** + * @var ?string $thumbnailUrl + */ + #[JsonProperty('thumbnailUrl')] + public ?string $thumbnailUrl; + + /** + * @var DateTime $createdAt + */ + #[JsonProperty('createdAt'), Date(Date::TYPE_DATETIME)] + public DateTime $createdAt; + + /** + * @var DateTime $updatedAt + */ + #[JsonProperty('updatedAt'), Date(Date::TYPE_DATETIME)] + public DateTime $updatedAt; + + /** + * @var ?string $createdBy + */ + #[JsonProperty('createdBy')] + public ?string $createdBy; + + /** + * @param array{ + * id: string, + * tenantId: string, + * name: string, + * folderId: string, + * state: value-of, + * thumbnailState: value-of, + * createdAt: DateTime, + * updatedAt: DateTime, + * baseSha256?: ?string, + * sizeBytes?: ?int, + * metadata?: ?array, + * idempotencyKey?: ?string, + * failureReason?: ?string, + * thumbnailUrl?: ?string, + * createdBy?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->id = $values['id']; + $this->tenantId = $values['tenantId']; + $this->name = $values['name']; + $this->folderId = $values['folderId']; + $this->state = $values['state']; + $this->baseSha256 = $values['baseSha256'] ?? null; + $this->sizeBytes = $values['sizeBytes'] ?? null; + $this->metadata = $values['metadata'] ?? null; + $this->idempotencyKey = $values['idempotencyKey'] ?? null; + $this->failureReason = $values['failureReason'] ?? null; + $this->thumbnailState = $values['thumbnailState']; + $this->thumbnailUrl = $values['thumbnailUrl'] ?? null; + $this->createdAt = $values['createdAt']; + $this->updatedAt = $values['updatedAt']; + $this->createdBy = $values['createdBy'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocumentsInitResponseDedupedDocumentState.php b/src/Types/DocumentsInitResponseDedupedDocumentState.php new file mode 100644 index 00000000..d6d0f0ce --- /dev/null +++ b/src/Types/DocumentsInitResponseDedupedDocumentState.php @@ -0,0 +1,11 @@ + $state + */ + #[JsonProperty('state')] + public string $state; + + /** + * @var ?string $baseSha256 + */ + #[JsonProperty('baseSha256')] + public ?string $baseSha256; + + /** + * @var ?int $sizeBytes + */ + #[JsonProperty('sizeBytes')] + public ?int $sizeBytes; + + /** + * @var ?array $metadata + */ + #[JsonProperty('metadata'), ArrayType(['string' => 'mixed'])] + public ?array $metadata; + + /** + * @var ?string $idempotencyKey + */ + #[JsonProperty('idempotencyKey')] + public ?string $idempotencyKey; + + /** + * @var ?string $failureReason + */ + #[JsonProperty('failureReason')] + public ?string $failureReason; + + /** + * @var value-of $thumbnailState + */ + #[JsonProperty('thumbnailState')] + public string $thumbnailState; + + /** + * @var ?string $thumbnailUrl + */ + #[JsonProperty('thumbnailUrl')] + public ?string $thumbnailUrl; + + /** + * @var DateTime $createdAt + */ + #[JsonProperty('createdAt'), Date(Date::TYPE_DATETIME)] + public DateTime $createdAt; + + /** + * @var DateTime $updatedAt + */ + #[JsonProperty('updatedAt'), Date(Date::TYPE_DATETIME)] + public DateTime $updatedAt; + + /** + * @var ?string $createdBy + */ + #[JsonProperty('createdBy')] + public ?string $createdBy; + + /** + * @param array{ + * id: string, + * tenantId: string, + * name: string, + * folderId: string, + * state: value-of, + * thumbnailState: value-of, + * createdAt: DateTime, + * updatedAt: DateTime, + * baseSha256?: ?string, + * sizeBytes?: ?int, + * metadata?: ?array, + * idempotencyKey?: ?string, + * failureReason?: ?string, + * thumbnailUrl?: ?string, + * createdBy?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->id = $values['id']; + $this->tenantId = $values['tenantId']; + $this->name = $values['name']; + $this->folderId = $values['folderId']; + $this->state = $values['state']; + $this->baseSha256 = $values['baseSha256'] ?? null; + $this->sizeBytes = $values['sizeBytes'] ?? null; + $this->metadata = $values['metadata'] ?? null; + $this->idempotencyKey = $values['idempotencyKey'] ?? null; + $this->failureReason = $values['failureReason'] ?? null; + $this->thumbnailState = $values['thumbnailState']; + $this->thumbnailUrl = $values['thumbnailUrl'] ?? null; + $this->createdAt = $values['createdAt']; + $this->updatedAt = $values['updatedAt']; + $this->createdBy = $values['createdBy'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/DocumentsInitResponseResumedDocumentState.php b/src/Types/DocumentsInitResponseResumedDocumentState.php new file mode 100644 index 00000000..ab853b36 --- /dev/null +++ b/src/Types/DocumentsInitResponseResumedDocumentState.php @@ -0,0 +1,11 @@ + 'presigned', 'value' => $presigned, ]); } /** - * @param DocumentsInit200ResponseCreatedUploadProxy $proxy - * @return DocumentsInit200ResponseCreatedUpload + * @param DocumentsInitResponseResumedUploadProxy $proxy + * @return DocumentsInitResponseResumedUpload */ - public static function proxy(DocumentsInit200ResponseCreatedUploadProxy $proxy): DocumentsInit200ResponseCreatedUpload + public static function proxy(DocumentsInitResponseResumedUploadProxy $proxy): DocumentsInitResponseResumedUpload { - return new DocumentsInit200ResponseCreatedUpload([ + return new DocumentsInitResponseResumedUpload([ 'kind' => 'proxy', 'value' => $proxy, ]); @@ -75,15 +75,15 @@ public static function proxy(DocumentsInit200ResponseCreatedUploadProxy $proxy): */ public function isPresigned(): bool { - return $this->value instanceof DocumentsInit200ResponseCreatedUploadPresigned && $this->kind === 'presigned'; + return $this->value instanceof DocumentsInitResponseResumedUploadPresigned && $this->kind === 'presigned'; } /** - * @return DocumentsInit200ResponseCreatedUploadPresigned + * @return DocumentsInitResponseResumedUploadPresigned */ - public function asPresigned(): DocumentsInit200ResponseCreatedUploadPresigned + public function asPresigned(): DocumentsInitResponseResumedUploadPresigned { - if (!($this->value instanceof DocumentsInit200ResponseCreatedUploadPresigned && $this->kind === 'presigned')) { + if (!($this->value instanceof DocumentsInitResponseResumedUploadPresigned && $this->kind === 'presigned')) { throw new Exception( "Expected presigned; got " . $this->kind . " with value of type " . get_debug_type($this->value), ); @@ -97,15 +97,15 @@ public function asPresigned(): DocumentsInit200ResponseCreatedUploadPresigned */ public function isProxy(): bool { - return $this->value instanceof DocumentsInit200ResponseCreatedUploadProxy && $this->kind === 'proxy'; + return $this->value instanceof DocumentsInitResponseResumedUploadProxy && $this->kind === 'proxy'; } /** - * @return DocumentsInit200ResponseCreatedUploadProxy + * @return DocumentsInitResponseResumedUploadProxy */ - public function asProxy(): DocumentsInit200ResponseCreatedUploadProxy + public function asProxy(): DocumentsInitResponseResumedUploadProxy { - if (!($this->value instanceof DocumentsInit200ResponseCreatedUploadProxy && $this->kind === 'proxy')) { + if (!($this->value instanceof DocumentsInitResponseResumedUploadProxy && $this->kind === 'proxy')) { throw new Exception( "Expected proxy; got " . $this->kind . " with value of type " . get_debug_type($this->value), ); @@ -179,10 +179,10 @@ public static function jsonDeserialize(array $data): static $args['kind'] = $kind; switch ($kind) { case 'presigned': - $args['value'] = DocumentsInit200ResponseCreatedUploadPresigned::jsonDeserialize($data); + $args['value'] = DocumentsInitResponseResumedUploadPresigned::jsonDeserialize($data); break; case 'proxy': - $args['value'] = DocumentsInit200ResponseCreatedUploadProxy::jsonDeserialize($data); + $args['value'] = DocumentsInitResponseResumedUploadProxy::jsonDeserialize($data); break; case '_unknown': default: diff --git a/src/Types/DocumentsInit200ResponseResumedUploadPresigned.php b/src/Types/DocumentsInitResponseResumedUploadPresigned.php similarity index 66% rename from src/Types/DocumentsInit200ResponseResumedUploadPresigned.php rename to src/Types/DocumentsInitResponseResumedUploadPresigned.php index f4aa7d87..64f628df 100644 --- a/src/Types/DocumentsInit200ResponseResumedUploadPresigned.php +++ b/src/Types/DocumentsInitResponseResumedUploadPresigned.php @@ -5,13 +5,13 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocumentsInit200ResponseResumedUploadPresigned extends JsonSerializableType +class DocumentsInitResponseResumedUploadPresigned extends JsonSerializableType { /** - * @var DocumentsInit200ResponseResumedUploadPresignedPresigned $presigned + * @var DocumentsInitResponseResumedUploadPresignedPresigned $presigned */ #[JsonProperty('presigned')] - public DocumentsInit200ResponseResumedUploadPresignedPresigned $presigned; + public DocumentsInitResponseResumedUploadPresignedPresigned $presigned; /** * @var string $key @@ -21,7 +21,7 @@ class DocumentsInit200ResponseResumedUploadPresigned extends JsonSerializableTyp /** * @param array{ - * presigned: DocumentsInit200ResponseResumedUploadPresignedPresigned, + * presigned: DocumentsInitResponseResumedUploadPresignedPresigned, * key: string, * } $values */ diff --git a/src/Types/DocumentsInit200ResponseResumedUploadPresignedPresigned.php b/src/Types/DocumentsInitResponseResumedUploadPresignedPresigned.php similarity index 67% rename from src/Types/DocumentsInit200ResponseResumedUploadPresignedPresigned.php rename to src/Types/DocumentsInitResponseResumedUploadPresignedPresigned.php index bb017f9f..08be1bc0 100644 --- a/src/Types/DocumentsInit200ResponseResumedUploadPresignedPresigned.php +++ b/src/Types/DocumentsInitResponseResumedUploadPresignedPresigned.php @@ -5,8 +5,10 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; +use DateTime; +use CloudPDF\Core\Types\Date; -class DocumentsInit200ResponseResumedUploadPresignedPresigned extends JsonSerializableType +class DocumentsInitResponseResumedUploadPresignedPresigned extends JsonSerializableType { /** * @var string $url @@ -21,23 +23,23 @@ class DocumentsInit200ResponseResumedUploadPresignedPresigned extends JsonSerial public array $headers; /** - * @var value-of $method + * @var value-of $method */ #[JsonProperty('method')] public string $method; /** - * @var float $expiresAt + * @var DateTime $expiresAt */ - #[JsonProperty('expiresAt')] - public float $expiresAt; + #[JsonProperty('expiresAt'), Date(Date::TYPE_DATETIME)] + public DateTime $expiresAt; /** * @param array{ * url: string, * headers: array, - * method: value-of, - * expiresAt: float, + * method: value-of, + * expiresAt: DateTime, * } $values */ public function __construct( diff --git a/src/Types/DocumentsInitResponseResumedUploadPresignedPresignedMethod.php b/src/Types/DocumentsInitResponseResumedUploadPresignedPresignedMethod.php new file mode 100644 index 00000000..52c091b0 --- /dev/null +++ b/src/Types/DocumentsInitResponseResumedUploadPresignedPresignedMethod.php @@ -0,0 +1,8 @@ + $layers + * @var array $layers */ - #[JsonProperty('layers'), ArrayType([DocumentsLayersList200ResponseLayersItem::class])] + #[JsonProperty('layers'), ArrayType([DocumentsLayersListResponseLayersItem::class])] public array $layers; /** @@ -22,7 +22,7 @@ class DocumentsLayersList200Response extends JsonSerializableType /** * @param array{ - * layers: array, + * layers: array, * nextCursor?: ?string, * } $values */ diff --git a/src/Types/DocumentsLayersList200ResponseLayersItem.php b/src/Types/DocumentsLayersListResponseLayersItem.php similarity index 63% rename from src/Types/DocumentsLayersList200ResponseLayersItem.php rename to src/Types/DocumentsLayersListResponseLayersItem.php index fe9b1791..66abe33d 100644 --- a/src/Types/DocumentsLayersList200ResponseLayersItem.php +++ b/src/Types/DocumentsLayersListResponseLayersItem.php @@ -4,8 +4,10 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; +use DateTime; +use CloudPDF\Core\Types\Date; -class DocumentsLayersList200ResponseLayersItem extends JsonSerializableType +class DocumentsLayersListResponseLayersItem extends JsonSerializableType { /** * @var string $docId @@ -32,39 +34,39 @@ class DocumentsLayersList200ResponseLayersItem extends JsonSerializableType public ?string $visitorId; /** - * @var ?float $storageSizeBytes + * @var ?int $sizeBytes */ - #[JsonProperty('storageSizeBytes')] - public ?float $storageSizeBytes; + #[JsonProperty('sizeBytes')] + public ?int $sizeBytes; /** - * @var float $createdAt + * @var DateTime $createdAt */ - #[JsonProperty('createdAt')] - public float $createdAt; + #[JsonProperty('createdAt'), Date(Date::TYPE_DATETIME)] + public DateTime $createdAt; /** - * @var float $updatedAt + * @var DateTime $updatedAt */ - #[JsonProperty('updatedAt')] - public float $updatedAt; + #[JsonProperty('updatedAt'), Date(Date::TYPE_DATETIME)] + public DateTime $updatedAt; /** - * @var ?float $lastSeenAt + * @var ?DateTime $lastSeenAt */ - #[JsonProperty('lastSeenAt')] - public ?float $lastSeenAt; + #[JsonProperty('lastSeenAt'), Date(Date::TYPE_DATETIME)] + public ?DateTime $lastSeenAt; /** * @param array{ * docId: string, * layerName: string, - * createdAt: float, - * updatedAt: float, + * createdAt: DateTime, + * updatedAt: DateTime, * grantId?: ?string, * visitorId?: ?string, - * storageSizeBytes?: ?float, - * lastSeenAt?: ?float, + * sizeBytes?: ?int, + * lastSeenAt?: ?DateTime, * } $values */ public function __construct( @@ -74,7 +76,7 @@ public function __construct( $this->layerName = $values['layerName']; $this->grantId = $values['grantId'] ?? null; $this->visitorId = $values['visitorId'] ?? null; - $this->storageSizeBytes = $values['storageSizeBytes'] ?? null; + $this->sizeBytes = $values['sizeBytes'] ?? null; $this->createdAt = $values['createdAt']; $this->updatedAt = $values['updatedAt']; $this->lastSeenAt = $values['lastSeenAt'] ?? null; diff --git a/src/Types/DocumentsList200ResponseDocumentsItem.php b/src/Types/DocumentsList200ResponseDocumentsItem.php deleted file mode 100644 index 5c8634df..00000000 --- a/src/Types/DocumentsList200ResponseDocumentsItem.php +++ /dev/null @@ -1,147 +0,0 @@ - $state - */ - #[JsonProperty('state')] - public string $state; - - /** - * @var ?string $baseSha - */ - #[JsonProperty('baseSha')] - public ?string $baseSha; - - /** - * @var ?float $storageSizeBytes - */ - #[JsonProperty('storageSizeBytes')] - public ?float $storageSizeBytes; - - /** - * @var ?array $metadata - */ - #[JsonProperty('metadata'), ArrayType(['string' => 'mixed'])] - public ?array $metadata; - - /** - * @var ?string $idempotencyKey - */ - #[JsonProperty('idempotencyKey')] - public ?string $idempotencyKey; - - /** - * @var ?string $failureReason - */ - #[JsonProperty('failureReason')] - public ?string $failureReason; - - /** - * @var ?value-of $thumbnailState - */ - #[JsonProperty('thumbnailState')] - public ?string $thumbnailState; - - /** - * @var ?string $thumbnailUrl - */ - #[JsonProperty('thumbnailUrl')] - public ?string $thumbnailUrl; - - /** - * @var float $createdAt - */ - #[JsonProperty('createdAt')] - public float $createdAt; - - /** - * @var float $updatedAt - */ - #[JsonProperty('updatedAt')] - public float $updatedAt; - - /** - * @var ?string $createdBy - */ - #[JsonProperty('createdBy')] - public ?string $createdBy; - - /** - * @param array{ - * id: string, - * tenantId: string, - * name: string, - * folderId: string, - * state: value-of, - * createdAt: float, - * updatedAt: float, - * baseSha?: ?string, - * storageSizeBytes?: ?float, - * metadata?: ?array, - * idempotencyKey?: ?string, - * failureReason?: ?string, - * thumbnailState?: ?value-of, - * thumbnailUrl?: ?string, - * createdBy?: ?string, - * } $values - */ - public function __construct( - array $values, - ) { - $this->id = $values['id']; - $this->tenantId = $values['tenantId']; - $this->name = $values['name']; - $this->folderId = $values['folderId']; - $this->state = $values['state']; - $this->baseSha = $values['baseSha'] ?? null; - $this->storageSizeBytes = $values['storageSizeBytes'] ?? null; - $this->metadata = $values['metadata'] ?? null; - $this->idempotencyKey = $values['idempotencyKey'] ?? null; - $this->failureReason = $values['failureReason'] ?? null; - $this->thumbnailState = $values['thumbnailState'] ?? null; - $this->thumbnailUrl = $values['thumbnailUrl'] ?? null; - $this->createdAt = $values['createdAt']; - $this->updatedAt = $values['updatedAt']; - $this->createdBy = $values['createdBy'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/DocumentsList200ResponseDocumentsItemState.php b/src/Types/DocumentsList200ResponseDocumentsItemState.php deleted file mode 100644 index 551fbd94..00000000 --- a/src/Types/DocumentsList200ResponseDocumentsItemState.php +++ /dev/null @@ -1,11 +0,0 @@ - $documents + * @var array $documents */ - #[JsonProperty('documents'), ArrayType([DocumentsList200ResponseDocumentsItem::class])] + #[JsonProperty('documents'), ArrayType([DocumentsListResponseDocumentsItem::class])] public array $documents; /** @@ -22,7 +22,7 @@ class DocumentsList200Response extends JsonSerializableType /** * @param array{ - * documents: array, + * documents: array, * nextCursor?: ?string, * } $values */ diff --git a/src/Types/DocumentsInit200ResponseDedupedDocument.php b/src/Types/DocumentsListResponseDocumentsItem.php similarity index 68% rename from src/Types/DocumentsInit200ResponseDedupedDocument.php rename to src/Types/DocumentsListResponseDocumentsItem.php index a560f550..638e5a80 100644 --- a/src/Types/DocumentsInit200ResponseDedupedDocument.php +++ b/src/Types/DocumentsListResponseDocumentsItem.php @@ -5,8 +5,10 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; +use DateTime; +use CloudPDF\Core\Types\Date; -class DocumentsInit200ResponseDedupedDocument extends JsonSerializableType +class DocumentsListResponseDocumentsItem extends JsonSerializableType { /** * @var string $id @@ -33,22 +35,22 @@ class DocumentsInit200ResponseDedupedDocument extends JsonSerializableType public string $folderId; /** - * @var value-of $state + * @var value-of $state */ #[JsonProperty('state')] public string $state; /** - * @var ?string $baseSha + * @var ?string $baseSha256 */ - #[JsonProperty('baseSha')] - public ?string $baseSha; + #[JsonProperty('baseSha256')] + public ?string $baseSha256; /** - * @var ?float $storageSizeBytes + * @var ?int $sizeBytes */ - #[JsonProperty('storageSizeBytes')] - public ?float $storageSizeBytes; + #[JsonProperty('sizeBytes')] + public ?int $sizeBytes; /** * @var ?array $metadata @@ -69,10 +71,10 @@ class DocumentsInit200ResponseDedupedDocument extends JsonSerializableType public ?string $failureReason; /** - * @var ?value-of $thumbnailState + * @var value-of $thumbnailState */ #[JsonProperty('thumbnailState')] - public ?string $thumbnailState; + public string $thumbnailState; /** * @var ?string $thumbnailUrl @@ -81,16 +83,16 @@ class DocumentsInit200ResponseDedupedDocument extends JsonSerializableType public ?string $thumbnailUrl; /** - * @var float $createdAt + * @var DateTime $createdAt */ - #[JsonProperty('createdAt')] - public float $createdAt; + #[JsonProperty('createdAt'), Date(Date::TYPE_DATETIME)] + public DateTime $createdAt; /** - * @var float $updatedAt + * @var DateTime $updatedAt */ - #[JsonProperty('updatedAt')] - public float $updatedAt; + #[JsonProperty('updatedAt'), Date(Date::TYPE_DATETIME)] + public DateTime $updatedAt; /** * @var ?string $createdBy @@ -104,15 +106,15 @@ class DocumentsInit200ResponseDedupedDocument extends JsonSerializableType * tenantId: string, * name: string, * folderId: string, - * state: value-of, - * createdAt: float, - * updatedAt: float, - * baseSha?: ?string, - * storageSizeBytes?: ?float, + * state: value-of, + * thumbnailState: value-of, + * createdAt: DateTime, + * updatedAt: DateTime, + * baseSha256?: ?string, + * sizeBytes?: ?int, * metadata?: ?array, * idempotencyKey?: ?string, * failureReason?: ?string, - * thumbnailState?: ?value-of, * thumbnailUrl?: ?string, * createdBy?: ?string, * } $values @@ -125,12 +127,12 @@ public function __construct( $this->name = $values['name']; $this->folderId = $values['folderId']; $this->state = $values['state']; - $this->baseSha = $values['baseSha'] ?? null; - $this->storageSizeBytes = $values['storageSizeBytes'] ?? null; + $this->baseSha256 = $values['baseSha256'] ?? null; + $this->sizeBytes = $values['sizeBytes'] ?? null; $this->metadata = $values['metadata'] ?? null; $this->idempotencyKey = $values['idempotencyKey'] ?? null; $this->failureReason = $values['failureReason'] ?? null; - $this->thumbnailState = $values['thumbnailState'] ?? null; + $this->thumbnailState = $values['thumbnailState']; $this->thumbnailUrl = $values['thumbnailUrl'] ?? null; $this->createdAt = $values['createdAt']; $this->updatedAt = $values['updatedAt']; diff --git a/src/Types/DocumentsUpdate200ResponseDocumentState.php b/src/Types/DocumentsListResponseDocumentsItemState.php similarity index 74% rename from src/Types/DocumentsUpdate200ResponseDocumentState.php rename to src/Types/DocumentsListResponseDocumentsItemState.php index 6dce8b23..6a60c221 100644 --- a/src/Types/DocumentsUpdate200ResponseDocumentState.php +++ b/src/Types/DocumentsListResponseDocumentsItemState.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocumentsUpdate200ResponseDocumentState: string +enum DocumentsListResponseDocumentsItemState: string { case Pending = "pending"; case Ready = "ready"; diff --git a/src/Types/DocumentsUpdate200ResponseDocumentThumbnailState.php b/src/Types/DocumentsListResponseDocumentsItemThumbnailState.php similarity index 70% rename from src/Types/DocumentsUpdate200ResponseDocumentThumbnailState.php rename to src/Types/DocumentsListResponseDocumentsItemThumbnailState.php index 6b25b6d4..b499ecbc 100644 --- a/src/Types/DocumentsUpdate200ResponseDocumentThumbnailState.php +++ b/src/Types/DocumentsListResponseDocumentsItemThumbnailState.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocumentsUpdate200ResponseDocumentThumbnailState: string +enum DocumentsListResponseDocumentsItemThumbnailState: string { case Pending = "pending"; case Ready = "ready"; diff --git a/src/Types/DocumentsThumbnailResponse.php b/src/Types/DocumentsThumbnailResponse.php deleted file mode 100644 index 2071d358..00000000 --- a/src/Types/DocumentsThumbnailResponse.php +++ /dev/null @@ -1,34 +0,0 @@ -error = $values['error']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/DocumentsThumbnailResponseError.php b/src/Types/DocumentsThumbnailResponseError.php deleted file mode 100644 index 71992308..00000000 --- a/src/Types/DocumentsThumbnailResponseError.php +++ /dev/null @@ -1,50 +0,0 @@ -code = $values['code']; - $this->message = $values['message']; - $this->state = $values['state']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/DocumentsUpdate200Response.php b/src/Types/DocumentsUpdateResponse.php similarity index 66% rename from src/Types/DocumentsUpdate200Response.php rename to src/Types/DocumentsUpdateResponse.php index 0395cd2b..6b3c0fde 100644 --- a/src/Types/DocumentsUpdate200Response.php +++ b/src/Types/DocumentsUpdateResponse.php @@ -5,17 +5,17 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class DocumentsUpdate200Response extends JsonSerializableType +class DocumentsUpdateResponse extends JsonSerializableType { /** - * @var DocumentsUpdate200ResponseDocument $document + * @var DocumentsUpdateResponseDocument $document */ #[JsonProperty('document')] - public DocumentsUpdate200ResponseDocument $document; + public DocumentsUpdateResponseDocument $document; /** * @param array{ - * document: DocumentsUpdate200ResponseDocument, + * document: DocumentsUpdateResponseDocument, * } $values */ public function __construct( diff --git a/src/Types/DocumentsInit200ResponseCreatedDocument.php b/src/Types/DocumentsUpdateResponseDocument.php similarity index 68% rename from src/Types/DocumentsInit200ResponseCreatedDocument.php rename to src/Types/DocumentsUpdateResponseDocument.php index 969e7532..fee92eaa 100644 --- a/src/Types/DocumentsInit200ResponseCreatedDocument.php +++ b/src/Types/DocumentsUpdateResponseDocument.php @@ -5,8 +5,10 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; +use DateTime; +use CloudPDF\Core\Types\Date; -class DocumentsInit200ResponseCreatedDocument extends JsonSerializableType +class DocumentsUpdateResponseDocument extends JsonSerializableType { /** * @var string $id @@ -33,22 +35,22 @@ class DocumentsInit200ResponseCreatedDocument extends JsonSerializableType public string $folderId; /** - * @var value-of $state + * @var value-of $state */ #[JsonProperty('state')] public string $state; /** - * @var ?string $baseSha + * @var ?string $baseSha256 */ - #[JsonProperty('baseSha')] - public ?string $baseSha; + #[JsonProperty('baseSha256')] + public ?string $baseSha256; /** - * @var ?float $storageSizeBytes + * @var ?int $sizeBytes */ - #[JsonProperty('storageSizeBytes')] - public ?float $storageSizeBytes; + #[JsonProperty('sizeBytes')] + public ?int $sizeBytes; /** * @var ?array $metadata @@ -69,10 +71,10 @@ class DocumentsInit200ResponseCreatedDocument extends JsonSerializableType public ?string $failureReason; /** - * @var ?value-of $thumbnailState + * @var value-of $thumbnailState */ #[JsonProperty('thumbnailState')] - public ?string $thumbnailState; + public string $thumbnailState; /** * @var ?string $thumbnailUrl @@ -81,16 +83,16 @@ class DocumentsInit200ResponseCreatedDocument extends JsonSerializableType public ?string $thumbnailUrl; /** - * @var float $createdAt + * @var DateTime $createdAt */ - #[JsonProperty('createdAt')] - public float $createdAt; + #[JsonProperty('createdAt'), Date(Date::TYPE_DATETIME)] + public DateTime $createdAt; /** - * @var float $updatedAt + * @var DateTime $updatedAt */ - #[JsonProperty('updatedAt')] - public float $updatedAt; + #[JsonProperty('updatedAt'), Date(Date::TYPE_DATETIME)] + public DateTime $updatedAt; /** * @var ?string $createdBy @@ -104,15 +106,15 @@ class DocumentsInit200ResponseCreatedDocument extends JsonSerializableType * tenantId: string, * name: string, * folderId: string, - * state: value-of, - * createdAt: float, - * updatedAt: float, - * baseSha?: ?string, - * storageSizeBytes?: ?float, + * state: value-of, + * thumbnailState: value-of, + * createdAt: DateTime, + * updatedAt: DateTime, + * baseSha256?: ?string, + * sizeBytes?: ?int, * metadata?: ?array, * idempotencyKey?: ?string, * failureReason?: ?string, - * thumbnailState?: ?value-of, * thumbnailUrl?: ?string, * createdBy?: ?string, * } $values @@ -125,12 +127,12 @@ public function __construct( $this->name = $values['name']; $this->folderId = $values['folderId']; $this->state = $values['state']; - $this->baseSha = $values['baseSha'] ?? null; - $this->storageSizeBytes = $values['storageSizeBytes'] ?? null; + $this->baseSha256 = $values['baseSha256'] ?? null; + $this->sizeBytes = $values['sizeBytes'] ?? null; $this->metadata = $values['metadata'] ?? null; $this->idempotencyKey = $values['idempotencyKey'] ?? null; $this->failureReason = $values['failureReason'] ?? null; - $this->thumbnailState = $values['thumbnailState'] ?? null; + $this->thumbnailState = $values['thumbnailState']; $this->thumbnailUrl = $values['thumbnailUrl'] ?? null; $this->createdAt = $values['createdAt']; $this->updatedAt = $values['updatedAt']; diff --git a/src/Types/DocumentsUpdateResponseDocumentState.php b/src/Types/DocumentsUpdateResponseDocumentState.php new file mode 100644 index 00000000..085b35f5 --- /dev/null +++ b/src/Types/DocumentsUpdateResponseDocumentState.php @@ -0,0 +1,11 @@ + $code Why the request failed. A newer server can add codes: read one your client doesn't know as `Unknown`. */ #[JsonProperty('code')] public string $code; @@ -21,14 +21,14 @@ class AdminErrorPayloadError extends JsonSerializableType public string $message; /** - * @var ?array $details + * @var ?array $details What a code carries besides its message, as each code says. */ #[JsonProperty('details'), ArrayType(['string' => 'mixed'])] public ?array $details; /** * @param array{ - * code: string, + * code: value-of, * message: string, * details?: ?array, * } $values diff --git a/src/Types/EngineErrorPayloadCode.php b/src/Types/EngineErrorCode.php similarity index 67% rename from src/Types/EngineErrorPayloadCode.php rename to src/Types/EngineErrorCode.php index b9acda9e..201f96ed 100644 --- a/src/Types/EngineErrorPayloadCode.php +++ b/src/Types/EngineErrorCode.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum EngineErrorPayloadCode: string +enum EngineErrorCode: string { case Unknown = "Unknown"; case InvalidArg = "InvalidArg"; @@ -34,4 +34,18 @@ enum EngineErrorPayloadCode: string case IdempotencyKeyReused = "IdempotencyKeyReused"; case LayerDeleted = "LayerDeleted"; case VisitorIdentityRequired = "VisitorIdentityRequired"; + case Conflict = "Conflict"; + case EngineBusy = "EngineBusy"; + case EngineRestarting = "EngineRestarting"; + case DocumentQuarantined = "DocumentQuarantined"; + case ThumbnailNotReady = "ThumbnailNotReady"; + case TooManyRequests = "TooManyRequests"; + case GrantExpired = "GrantExpired"; + case OriginRequired = "OriginRequired"; + case OriginNotAllowed = "OriginNotAllowed"; + case FeatureNotEnabled = "FeatureNotEnabled"; + case FeatureStopped = "FeatureStopped"; + case LicenseInvalid = "LicenseInvalid"; + case LicenseUsageLimit = "LicenseUsageLimit"; + case UpstreamError = "UpstreamError"; } diff --git a/src/Types/EngineErrorPayload.php b/src/Types/EngineErrorPayload.php deleted file mode 100644 index 235da9e3..00000000 --- a/src/Types/EngineErrorPayload.php +++ /dev/null @@ -1,59 +0,0 @@ - $name - */ - #[JsonProperty('name')] - public string $name; - - /** - * @var value-of $code - */ - #[JsonProperty('code')] - public string $code; - - /** - * @var string $message - */ - #[JsonProperty('message')] - public string $message; - - /** - * @var ?array $details - */ - #[JsonProperty('details'), ArrayType(['string' => 'mixed'])] - public ?array $details; - - /** - * @param array{ - * name: value-of, - * code: value-of, - * message: string, - * details?: ?array, - * } $values - */ - public function __construct( - array $values, - ) { - $this->name = $values['name']; - $this->code = $values['code']; - $this->message = $values['message']; - $this->details = $values['details'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/EngineErrorPayloadName.php b/src/Types/EngineErrorPayloadName.php deleted file mode 100644 index bfb12a20..00000000 --- a/src/Types/EngineErrorPayloadName.php +++ /dev/null @@ -1,8 +0,0 @@ - $action + * @var value-of $action */ #[JsonProperty('action')] public string $action; @@ -21,16 +21,16 @@ class DocSignaturesComplete200ResponseSignatureLock extends JsonSerializableType public array $fields; /** - * @var ?float $permission + * @var ?int $permission */ #[JsonProperty('permission')] - public ?float $permission; + public ?int $permission; /** * @param array{ - * action: value-of, + * action: value-of, * fields: array, - * permission?: ?float, + * permission?: ?int, * } $values */ public function __construct( diff --git a/src/Types/DocSignaturesComplete200ResponseSignatureLockAction.php b/src/Types/FieldLockSpecAction.php similarity index 65% rename from src/Types/DocSignaturesComplete200ResponseSignatureLockAction.php rename to src/Types/FieldLockSpecAction.php index cd03692a..118e440f 100644 --- a/src/Types/DocSignaturesComplete200ResponseSignatureLockAction.php +++ b/src/Types/FieldLockSpecAction.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum DocSignaturesComplete200ResponseSignatureLockAction: string +enum FieldLockSpecAction: string { case All = "all"; case Include_ = "include"; diff --git a/src/Types/FoldersCreate200Response.php b/src/Types/FoldersCreateResponse.php similarity index 68% rename from src/Types/FoldersCreate200Response.php rename to src/Types/FoldersCreateResponse.php index 9df5aee4..802517eb 100644 --- a/src/Types/FoldersCreate200Response.php +++ b/src/Types/FoldersCreateResponse.php @@ -5,17 +5,17 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class FoldersCreate200Response extends JsonSerializableType +class FoldersCreateResponse extends JsonSerializableType { /** - * @var FoldersCreate200ResponseFolder $folder + * @var FoldersCreateResponseFolder $folder */ #[JsonProperty('folder')] - public FoldersCreate200ResponseFolder $folder; + public FoldersCreateResponseFolder $folder; /** * @param array{ - * folder: FoldersCreate200ResponseFolder, + * folder: FoldersCreateResponseFolder, * } $values */ public function __construct( diff --git a/src/Types/FoldersGet200ResponseFolder.php b/src/Types/FoldersCreateResponseFolder.php similarity index 77% rename from src/Types/FoldersGet200ResponseFolder.php rename to src/Types/FoldersCreateResponseFolder.php index e102eff2..04471d17 100644 --- a/src/Types/FoldersGet200ResponseFolder.php +++ b/src/Types/FoldersCreateResponseFolder.php @@ -4,8 +4,10 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; +use DateTime; +use CloudPDF\Core\Types\Date; -class FoldersGet200ResponseFolder extends JsonSerializableType +class FoldersCreateResponseFolder extends JsonSerializableType { /** * @var string $id @@ -32,16 +34,16 @@ class FoldersGet200ResponseFolder extends JsonSerializableType public string $name; /** - * @var float $createdAt + * @var DateTime $createdAt */ - #[JsonProperty('createdAt')] - public float $createdAt; + #[JsonProperty('createdAt'), Date(Date::TYPE_DATETIME)] + public DateTime $createdAt; /** - * @var float $updatedAt + * @var DateTime $updatedAt */ - #[JsonProperty('updatedAt')] - public float $updatedAt; + #[JsonProperty('updatedAt'), Date(Date::TYPE_DATETIME)] + public DateTime $updatedAt; /** * @var ?string $createdBy @@ -55,8 +57,8 @@ class FoldersGet200ResponseFolder extends JsonSerializableType * tenantId: string, * parentId: string, * name: string, - * createdAt: float, - * updatedAt: float, + * createdAt: DateTime, + * updatedAt: DateTime, * createdBy?: ?string, * } $values */ diff --git a/src/Types/FoldersGet200Response.php b/src/Types/FoldersGetResponse.php similarity index 54% rename from src/Types/FoldersGet200Response.php rename to src/Types/FoldersGetResponse.php index f867d916..fa473605 100644 --- a/src/Types/FoldersGet200Response.php +++ b/src/Types/FoldersGetResponse.php @@ -6,24 +6,24 @@ use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; -class FoldersGet200Response extends JsonSerializableType +class FoldersGetResponse extends JsonSerializableType { /** - * @var FoldersGet200ResponseFolder $folder + * @var FoldersGetResponseFolder $folder */ #[JsonProperty('folder')] - public FoldersGet200ResponseFolder $folder; + public FoldersGetResponseFolder $folder; /** - * @var array $path The folders above this one, from the top level down. Neither root nor the folder itself. + * @var array $path The folders above this one, from the top level down. Neither root nor the folder itself. */ - #[JsonProperty('path'), ArrayType([FoldersGet200ResponsePathItem::class])] + #[JsonProperty('path'), ArrayType([FoldersGetResponsePathItem::class])] public array $path; /** * @param array{ - * folder: FoldersGet200ResponseFolder, - * path: array, + * folder: FoldersGetResponseFolder, + * path: array, * } $values */ public function __construct( diff --git a/src/Types/FoldersList200ResponseFoldersItem.php b/src/Types/FoldersGetResponseFolder.php similarity index 77% rename from src/Types/FoldersList200ResponseFoldersItem.php rename to src/Types/FoldersGetResponseFolder.php index e81da247..b50985d8 100644 --- a/src/Types/FoldersList200ResponseFoldersItem.php +++ b/src/Types/FoldersGetResponseFolder.php @@ -4,8 +4,10 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; +use DateTime; +use CloudPDF\Core\Types\Date; -class FoldersList200ResponseFoldersItem extends JsonSerializableType +class FoldersGetResponseFolder extends JsonSerializableType { /** * @var string $id @@ -32,16 +34,16 @@ class FoldersList200ResponseFoldersItem extends JsonSerializableType public string $name; /** - * @var float $createdAt + * @var DateTime $createdAt */ - #[JsonProperty('createdAt')] - public float $createdAt; + #[JsonProperty('createdAt'), Date(Date::TYPE_DATETIME)] + public DateTime $createdAt; /** - * @var float $updatedAt + * @var DateTime $updatedAt */ - #[JsonProperty('updatedAt')] - public float $updatedAt; + #[JsonProperty('updatedAt'), Date(Date::TYPE_DATETIME)] + public DateTime $updatedAt; /** * @var ?string $createdBy @@ -55,8 +57,8 @@ class FoldersList200ResponseFoldersItem extends JsonSerializableType * tenantId: string, * parentId: string, * name: string, - * createdAt: float, - * updatedAt: float, + * createdAt: DateTime, + * updatedAt: DateTime, * createdBy?: ?string, * } $values */ diff --git a/src/Types/FoldersGet200ResponsePathItem.php b/src/Types/FoldersGetResponsePathItem.php similarity index 91% rename from src/Types/FoldersGet200ResponsePathItem.php rename to src/Types/FoldersGetResponsePathItem.php index 04cd299f..0596bcb5 100644 --- a/src/Types/FoldersGet200ResponsePathItem.php +++ b/src/Types/FoldersGetResponsePathItem.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class FoldersGet200ResponsePathItem extends JsonSerializableType +class FoldersGetResponsePathItem extends JsonSerializableType { /** * @var string $id diff --git a/src/Types/FoldersList200Response.php b/src/Types/FoldersListResponse.php similarity index 72% rename from src/Types/FoldersList200Response.php rename to src/Types/FoldersListResponse.php index a1bd086c..1b2147ec 100644 --- a/src/Types/FoldersList200Response.php +++ b/src/Types/FoldersListResponse.php @@ -6,12 +6,12 @@ use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; -class FoldersList200Response extends JsonSerializableType +class FoldersListResponse extends JsonSerializableType { /** - * @var array $folders + * @var array $folders */ - #[JsonProperty('folders'), ArrayType([FoldersList200ResponseFoldersItem::class])] + #[JsonProperty('folders'), ArrayType([FoldersListResponseFoldersItem::class])] public array $folders; /** @@ -22,7 +22,7 @@ class FoldersList200Response extends JsonSerializableType /** * @param array{ - * folders: array, + * folders: array, * nextCursor?: ?string, * } $values */ diff --git a/src/Types/FoldersUpdate200ResponseFolder.php b/src/Types/FoldersListResponseFoldersItem.php similarity index 77% rename from src/Types/FoldersUpdate200ResponseFolder.php rename to src/Types/FoldersListResponseFoldersItem.php index f1569406..ce4323a2 100644 --- a/src/Types/FoldersUpdate200ResponseFolder.php +++ b/src/Types/FoldersListResponseFoldersItem.php @@ -4,8 +4,10 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; +use DateTime; +use CloudPDF\Core\Types\Date; -class FoldersUpdate200ResponseFolder extends JsonSerializableType +class FoldersListResponseFoldersItem extends JsonSerializableType { /** * @var string $id @@ -32,16 +34,16 @@ class FoldersUpdate200ResponseFolder extends JsonSerializableType public string $name; /** - * @var float $createdAt + * @var DateTime $createdAt */ - #[JsonProperty('createdAt')] - public float $createdAt; + #[JsonProperty('createdAt'), Date(Date::TYPE_DATETIME)] + public DateTime $createdAt; /** - * @var float $updatedAt + * @var DateTime $updatedAt */ - #[JsonProperty('updatedAt')] - public float $updatedAt; + #[JsonProperty('updatedAt'), Date(Date::TYPE_DATETIME)] + public DateTime $updatedAt; /** * @var ?string $createdBy @@ -55,8 +57,8 @@ class FoldersUpdate200ResponseFolder extends JsonSerializableType * tenantId: string, * parentId: string, * name: string, - * createdAt: float, - * updatedAt: float, + * createdAt: DateTime, + * updatedAt: DateTime, * createdBy?: ?string, * } $values */ diff --git a/src/Types/FoldersUpdate200Response.php b/src/Types/FoldersUpdateResponse.php similarity index 68% rename from src/Types/FoldersUpdate200Response.php rename to src/Types/FoldersUpdateResponse.php index 894f204c..b374b0aa 100644 --- a/src/Types/FoldersUpdate200Response.php +++ b/src/Types/FoldersUpdateResponse.php @@ -5,17 +5,17 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class FoldersUpdate200Response extends JsonSerializableType +class FoldersUpdateResponse extends JsonSerializableType { /** - * @var FoldersUpdate200ResponseFolder $folder + * @var FoldersUpdateResponseFolder $folder */ #[JsonProperty('folder')] - public FoldersUpdate200ResponseFolder $folder; + public FoldersUpdateResponseFolder $folder; /** * @param array{ - * folder: FoldersUpdate200ResponseFolder, + * folder: FoldersUpdateResponseFolder, * } $values */ public function __construct( diff --git a/src/Types/FoldersCreate200ResponseFolder.php b/src/Types/FoldersUpdateResponseFolder.php similarity index 77% rename from src/Types/FoldersCreate200ResponseFolder.php rename to src/Types/FoldersUpdateResponseFolder.php index c8fa79df..982e1375 100644 --- a/src/Types/FoldersCreate200ResponseFolder.php +++ b/src/Types/FoldersUpdateResponseFolder.php @@ -4,8 +4,10 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; +use DateTime; +use CloudPDF\Core\Types\Date; -class FoldersCreate200ResponseFolder extends JsonSerializableType +class FoldersUpdateResponseFolder extends JsonSerializableType { /** * @var string $id @@ -32,16 +34,16 @@ class FoldersCreate200ResponseFolder extends JsonSerializableType public string $name; /** - * @var float $createdAt + * @var DateTime $createdAt */ - #[JsonProperty('createdAt')] - public float $createdAt; + #[JsonProperty('createdAt'), Date(Date::TYPE_DATETIME)] + public DateTime $createdAt; /** - * @var float $updatedAt + * @var DateTime $updatedAt */ - #[JsonProperty('updatedAt')] - public float $updatedAt; + #[JsonProperty('updatedAt'), Date(Date::TYPE_DATETIME)] + public DateTime $updatedAt; /** * @var ?string $createdBy @@ -55,8 +57,8 @@ class FoldersCreate200ResponseFolder extends JsonSerializableType * tenantId: string, * parentId: string, * name: string, - * createdAt: float, - * updatedAt: float, + * createdAt: DateTime, + * updatedAt: DateTime, * createdBy?: ?string, * } $values */ diff --git a/src/Types/FontProgram.php b/src/Types/FontProgram.php index 93a3dc0a..a08b05a5 100644 --- a/src/Types/FontProgram.php +++ b/src/Types/FontProgram.php @@ -8,16 +8,16 @@ class FontProgram extends JsonSerializableType { /** - * @var ?string $displayHash + * @var ?string $displaySha256 */ - #[JsonProperty('displayHash')] - public ?string $displayHash; + #[JsonProperty('displaySha256')] + public ?string $displaySha256; /** - * @var ?string $sourceHash + * @var ?string $sourceSha256 */ - #[JsonProperty('sourceHash')] - public ?string $sourceHash; + #[JsonProperty('sourceSha256')] + public ?string $sourceSha256; /** * @var value-of $embedded @@ -47,8 +47,8 @@ class FontProgram extends JsonSerializableType * @param array{ * embedded: value-of, * canDownload: bool, - * displayHash?: ?string, - * sourceHash?: ?string, + * displaySha256?: ?string, + * sourceSha256?: ?string, * format?: ?value-of, * embeddingPermission?: ?value-of, * } $values @@ -56,8 +56,8 @@ class FontProgram extends JsonSerializableType public function __construct( array $values, ) { - $this->displayHash = $values['displayHash'] ?? null; - $this->sourceHash = $values['sourceHash'] ?? null; + $this->displaySha256 = $values['displaySha256'] ?? null; + $this->sourceSha256 = $values['sourceSha256'] ?? null; $this->embedded = $values['embedded']; $this->format = $values['format'] ?? null; $this->embeddingPermission = $values['embeddingPermission'] ?? null; diff --git a/src/Types/FontProgramInfo.php b/src/Types/FontProgramInfo.php index 6a4df9fd..409cbade 100644 --- a/src/Types/FontProgramInfo.php +++ b/src/Types/FontProgramInfo.php @@ -9,16 +9,16 @@ class FontProgramInfo extends JsonSerializableType { /** - * @var ?string $displayHash + * @var ?string $displaySha256 */ - #[JsonProperty('displayHash')] - public ?string $displayHash; + #[JsonProperty('displaySha256')] + public ?string $displaySha256; /** - * @var ?string $sourceHash + * @var ?string $sourceSha256 */ - #[JsonProperty('sourceHash')] - public ?string $sourceHash; + #[JsonProperty('sourceSha256')] + public ?string $sourceSha256; /** * @var value-of $embedded @@ -69,8 +69,8 @@ class FontProgramInfo extends JsonSerializableType * covers: array, * ascent: float, * descent: float, - * displayHash?: ?string, - * sourceHash?: ?string, + * displaySha256?: ?string, + * sourceSha256?: ?string, * format?: ?value-of, * embeddingPermission?: ?value-of, * } $values @@ -78,8 +78,8 @@ class FontProgramInfo extends JsonSerializableType public function __construct( array $values, ) { - $this->displayHash = $values['displayHash'] ?? null; - $this->sourceHash = $values['sourceHash'] ?? null; + $this->displaySha256 = $values['displaySha256'] ?? null; + $this->sourceSha256 = $values['sourceSha256'] ?? null; $this->embedded = $values['embedded']; $this->format = $values['format'] ?? null; $this->embeddingPermission = $values['embeddingPermission'] ?? null; diff --git a/src/Types/FormField.php b/src/Types/FormField.php index af149bc4..6c83fa07 100644 --- a/src/Types/FormField.php +++ b/src/Types/FormField.php @@ -5,6 +5,9 @@ use CloudPDF\Core\Json\JsonSerializableType; use Exception; +/** + * A form field, by its `family`. A newer server can add families: read one your client doesn't know as `unknown`, keeping the fields every field has, with `rawValue` an empty string when the body has none. + */ class FormField extends JsonSerializableType { /** @@ -18,9 +21,9 @@ class FormField extends JsonSerializableType * |'signature' * |'unknown' * |'_unknown' - * ) $family + * ) $kind */ - public readonly string $family; + public readonly string $kind; /** * @var ( @@ -39,7 +42,7 @@ class FormField extends JsonSerializableType /** * @param array{ - * family: ( + * kind: ( * 'text' * |'checkbox' * |'radio' @@ -66,7 +69,7 @@ class FormField extends JsonSerializableType private function __construct( array $values, ) { - $this->family = $values['family']; + $this->kind = $values['kind']; $this->value = $values['value']; } @@ -77,7 +80,7 @@ private function __construct( public static function text(FormFieldText $text): FormField { return new FormField([ - 'family' => 'text', + 'kind' => 'text', 'value' => $text, ]); } @@ -89,7 +92,7 @@ public static function text(FormFieldText $text): FormField public static function checkbox(FormFieldCheckbox $checkbox): FormField { return new FormField([ - 'family' => 'checkbox', + 'kind' => 'checkbox', 'value' => $checkbox, ]); } @@ -101,7 +104,7 @@ public static function checkbox(FormFieldCheckbox $checkbox): FormField public static function radio(FormFieldRadio $radio): FormField { return new FormField([ - 'family' => 'radio', + 'kind' => 'radio', 'value' => $radio, ]); } @@ -113,7 +116,7 @@ public static function radio(FormFieldRadio $radio): FormField public static function combobox(FormFieldCombobox $combobox): FormField { return new FormField([ - 'family' => 'combobox', + 'kind' => 'combobox', 'value' => $combobox, ]); } @@ -125,7 +128,7 @@ public static function combobox(FormFieldCombobox $combobox): FormField public static function listbox(FormFieldListbox $listbox): FormField { return new FormField([ - 'family' => 'listbox', + 'kind' => 'listbox', 'value' => $listbox, ]); } @@ -137,7 +140,7 @@ public static function listbox(FormFieldListbox $listbox): FormField public static function pushbutton(FormFieldPushbutton $pushbutton): FormField { return new FormField([ - 'family' => 'pushbutton', + 'kind' => 'pushbutton', 'value' => $pushbutton, ]); } @@ -149,7 +152,7 @@ public static function pushbutton(FormFieldPushbutton $pushbutton): FormField public static function signature(FormFieldSignature $signature): FormField { return new FormField([ - 'family' => 'signature', + 'kind' => 'signature', 'value' => $signature, ]); } @@ -161,7 +164,7 @@ public static function signature(FormFieldSignature $signature): FormField public static function unknown(FormFieldUnknown $unknown): FormField { return new FormField([ - 'family' => 'unknown', + 'kind' => 'unknown', 'value' => $unknown, ]); } @@ -171,7 +174,7 @@ public static function unknown(FormFieldUnknown $unknown): FormField */ public function isText(): bool { - return $this->value instanceof FormFieldText && $this->family === 'text'; + return $this->value instanceof FormFieldText && $this->kind === 'text'; } /** @@ -179,9 +182,9 @@ public function isText(): bool */ public function asText(): FormFieldText { - if (!($this->value instanceof FormFieldText && $this->family === 'text')) { + if (!($this->value instanceof FormFieldText && $this->kind === 'text')) { throw new Exception( - "Expected text; got " . $this->family . " with value of type " . get_debug_type($this->value), + "Expected text; got " . $this->kind . " with value of type " . get_debug_type($this->value), ); } @@ -193,7 +196,7 @@ public function asText(): FormFieldText */ public function isCheckbox(): bool { - return $this->value instanceof FormFieldCheckbox && $this->family === 'checkbox'; + return $this->value instanceof FormFieldCheckbox && $this->kind === 'checkbox'; } /** @@ -201,9 +204,9 @@ public function isCheckbox(): bool */ public function asCheckbox(): FormFieldCheckbox { - if (!($this->value instanceof FormFieldCheckbox && $this->family === 'checkbox')) { + if (!($this->value instanceof FormFieldCheckbox && $this->kind === 'checkbox')) { throw new Exception( - "Expected checkbox; got " . $this->family . " with value of type " . get_debug_type($this->value), + "Expected checkbox; got " . $this->kind . " with value of type " . get_debug_type($this->value), ); } @@ -215,7 +218,7 @@ public function asCheckbox(): FormFieldCheckbox */ public function isRadio(): bool { - return $this->value instanceof FormFieldRadio && $this->family === 'radio'; + return $this->value instanceof FormFieldRadio && $this->kind === 'radio'; } /** @@ -223,9 +226,9 @@ public function isRadio(): bool */ public function asRadio(): FormFieldRadio { - if (!($this->value instanceof FormFieldRadio && $this->family === 'radio')) { + if (!($this->value instanceof FormFieldRadio && $this->kind === 'radio')) { throw new Exception( - "Expected radio; got " . $this->family . " with value of type " . get_debug_type($this->value), + "Expected radio; got " . $this->kind . " with value of type " . get_debug_type($this->value), ); } @@ -237,7 +240,7 @@ public function asRadio(): FormFieldRadio */ public function isCombobox(): bool { - return $this->value instanceof FormFieldCombobox && $this->family === 'combobox'; + return $this->value instanceof FormFieldCombobox && $this->kind === 'combobox'; } /** @@ -245,9 +248,9 @@ public function isCombobox(): bool */ public function asCombobox(): FormFieldCombobox { - if (!($this->value instanceof FormFieldCombobox && $this->family === 'combobox')) { + if (!($this->value instanceof FormFieldCombobox && $this->kind === 'combobox')) { throw new Exception( - "Expected combobox; got " . $this->family . " with value of type " . get_debug_type($this->value), + "Expected combobox; got " . $this->kind . " with value of type " . get_debug_type($this->value), ); } @@ -259,7 +262,7 @@ public function asCombobox(): FormFieldCombobox */ public function isListbox(): bool { - return $this->value instanceof FormFieldListbox && $this->family === 'listbox'; + return $this->value instanceof FormFieldListbox && $this->kind === 'listbox'; } /** @@ -267,9 +270,9 @@ public function isListbox(): bool */ public function asListbox(): FormFieldListbox { - if (!($this->value instanceof FormFieldListbox && $this->family === 'listbox')) { + if (!($this->value instanceof FormFieldListbox && $this->kind === 'listbox')) { throw new Exception( - "Expected listbox; got " . $this->family . " with value of type " . get_debug_type($this->value), + "Expected listbox; got " . $this->kind . " with value of type " . get_debug_type($this->value), ); } @@ -281,7 +284,7 @@ public function asListbox(): FormFieldListbox */ public function isPushbutton(): bool { - return $this->value instanceof FormFieldPushbutton && $this->family === 'pushbutton'; + return $this->value instanceof FormFieldPushbutton && $this->kind === 'pushbutton'; } /** @@ -289,9 +292,9 @@ public function isPushbutton(): bool */ public function asPushbutton(): FormFieldPushbutton { - if (!($this->value instanceof FormFieldPushbutton && $this->family === 'pushbutton')) { + if (!($this->value instanceof FormFieldPushbutton && $this->kind === 'pushbutton')) { throw new Exception( - "Expected pushbutton; got " . $this->family . " with value of type " . get_debug_type($this->value), + "Expected pushbutton; got " . $this->kind . " with value of type " . get_debug_type($this->value), ); } @@ -303,7 +306,7 @@ public function asPushbutton(): FormFieldPushbutton */ public function isSignature(): bool { - return $this->value instanceof FormFieldSignature && $this->family === 'signature'; + return $this->value instanceof FormFieldSignature && $this->kind === 'signature'; } /** @@ -311,9 +314,9 @@ public function isSignature(): bool */ public function asSignature(): FormFieldSignature { - if (!($this->value instanceof FormFieldSignature && $this->family === 'signature')) { + if (!($this->value instanceof FormFieldSignature && $this->kind === 'signature')) { throw new Exception( - "Expected signature; got " . $this->family . " with value of type " . get_debug_type($this->value), + "Expected signature; got " . $this->kind . " with value of type " . get_debug_type($this->value), ); } @@ -325,7 +328,7 @@ public function asSignature(): FormFieldSignature */ public function isUnknown(): bool { - return $this->value instanceof FormFieldUnknown && $this->family === 'unknown'; + return $this->value instanceof FormFieldUnknown && $this->kind === 'unknown'; } /** @@ -333,9 +336,9 @@ public function isUnknown(): bool */ public function asUnknown(): FormFieldUnknown { - if (!($this->value instanceof FormFieldUnknown && $this->family === 'unknown')) { + if (!($this->value instanceof FormFieldUnknown && $this->kind === 'unknown')) { throw new Exception( - "Expected unknown; got " . $this->family . " with value of type " . get_debug_type($this->value), + "Expected unknown; got " . $this->kind . " with value of type " . get_debug_type($this->value), ); } @@ -356,12 +359,12 @@ public function __toString(): string public function jsonSerialize(): array { $result = []; - $result['family'] = $this->family; + $result['kind'] = $this->kind; $base = parent::jsonSerialize(); $result = array_merge($base, $result); - switch ($this->family) { + switch ($this->kind) { case 'text': $value = $this->asText()->jsonSerialize(); $result = array_merge($value, $result); @@ -416,20 +419,20 @@ public function jsonSerialize(): array public static function jsonDeserialize(array $data): static { $args = []; - if (!array_key_exists('family', $data)) { + if (!array_key_exists('kind', $data)) { throw new Exception( - "JSON data is missing property 'family'", + "JSON data is missing property 'kind'", ); } - $family = $data['family']; - if (!(is_string($family))) { + $kind = $data['kind']; + if (!(is_string($kind))) { throw new Exception( - "Expected property 'family' in JSON data to be string, instead received " . get_debug_type($data['family']), + "Expected property 'kind' in JSON data to be string, instead received " . get_debug_type($data['kind']), ); } - $args['family'] = $family; - switch ($family) { + $args['kind'] = $kind; + switch ($kind) { case 'text': $args['value'] = FormFieldText::jsonDeserialize($data); break; @@ -456,7 +459,7 @@ public static function jsonDeserialize(array $data): static break; case '_unknown': default: - $args['family'] = '_unknown'; + $args['kind'] = '_unknown'; $args['value'] = $data; } diff --git a/src/Types/FormFieldCheckbox.php b/src/Types/FormFieldCheckbox.php index 294a6fdd..dd566657 100644 --- a/src/Types/FormFieldCheckbox.php +++ b/src/Types/FormFieldCheckbox.php @@ -59,16 +59,16 @@ class FormFieldCheckbox extends JsonSerializableType public ?string $mappingName; /** - * @var FormFieldCheckboxValueEntry $valueEntry + * @var FormValueEntry $valueEntry */ #[JsonProperty('valueEntry')] - public FormFieldCheckboxValueEntry $valueEntry; + public FormValueEntry $valueEntry; /** - * @var FormFieldCheckboxDefaultValueEntry $defaultValueEntry + * @var FormValueEntry $defaultValueEntry */ #[JsonProperty('defaultValueEntry')] - public FormFieldCheckboxDefaultValueEntry $defaultValueEntry; + public FormValueEntry $defaultValueEntry; /** * @var ?PdfFieldActions $actions @@ -144,8 +144,8 @@ class FormFieldCheckbox extends JsonSerializableType * readOnly: bool, * required: bool, * noExport: bool, - * valueEntry: FormFieldCheckboxValueEntry, - * defaultValueEntry: FormFieldCheckboxDefaultValueEntry, + * valueEntry: FormValueEntry, + * defaultValueEntry: FormValueEntry, * widgets: array, * checked: bool, * exportValue: string, diff --git a/src/Types/FormFieldCheckboxDefaultValueEntry.php b/src/Types/FormFieldCheckboxDefaultValueEntry.php deleted file mode 100644 index 6e8630d5..00000000 --- a/src/Types/FormFieldCheckboxDefaultValueEntry.php +++ /dev/null @@ -1,286 +0,0 @@ -kind = $values['kind']; - $this->value = $values['value']; - } - - /** - * @param FormFieldCheckboxDefaultValueEntryNone $none - * @return FormFieldCheckboxDefaultValueEntry - */ - public static function none(FormFieldCheckboxDefaultValueEntryNone $none): FormFieldCheckboxDefaultValueEntry - { - return new FormFieldCheckboxDefaultValueEntry([ - 'kind' => 'none', - 'value' => $none, - ]); - } - - /** - * @param FormFieldCheckboxDefaultValueEntryScalar $scalar - * @return FormFieldCheckboxDefaultValueEntry - */ - public static function scalar(FormFieldCheckboxDefaultValueEntryScalar $scalar): FormFieldCheckboxDefaultValueEntry - { - return new FormFieldCheckboxDefaultValueEntry([ - 'kind' => 'scalar', - 'value' => $scalar, - ]); - } - - /** - * @param FormFieldCheckboxDefaultValueEntryArray $array - * @return FormFieldCheckboxDefaultValueEntry - */ - public static function array(FormFieldCheckboxDefaultValueEntryArray $array): FormFieldCheckboxDefaultValueEntry - { - return new FormFieldCheckboxDefaultValueEntry([ - 'kind' => 'array', - 'value' => $array, - ]); - } - - /** - * @param FormFieldCheckboxDefaultValueEntryUnsupported $unsupported - * @return FormFieldCheckboxDefaultValueEntry - */ - public static function unsupported(FormFieldCheckboxDefaultValueEntryUnsupported $unsupported): FormFieldCheckboxDefaultValueEntry - { - return new FormFieldCheckboxDefaultValueEntry([ - 'kind' => 'unsupported', - 'value' => $unsupported, - ]); - } - - /** - * @return bool - */ - public function isNone(): bool - { - return $this->value instanceof FormFieldCheckboxDefaultValueEntryNone && $this->kind === 'none'; - } - - /** - * @return FormFieldCheckboxDefaultValueEntryNone - */ - public function asNone(): FormFieldCheckboxDefaultValueEntryNone - { - if (!($this->value instanceof FormFieldCheckboxDefaultValueEntryNone && $this->kind === 'none')) { - throw new Exception( - "Expected none; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isScalar(): bool - { - return $this->value instanceof FormFieldCheckboxDefaultValueEntryScalar && $this->kind === 'scalar'; - } - - /** - * @return FormFieldCheckboxDefaultValueEntryScalar - */ - public function asScalar(): FormFieldCheckboxDefaultValueEntryScalar - { - if (!($this->value instanceof FormFieldCheckboxDefaultValueEntryScalar && $this->kind === 'scalar')) { - throw new Exception( - "Expected scalar; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isArray(): bool - { - return $this->value instanceof FormFieldCheckboxDefaultValueEntryArray && $this->kind === 'array'; - } - - /** - * @return FormFieldCheckboxDefaultValueEntryArray - */ - public function asArray(): FormFieldCheckboxDefaultValueEntryArray - { - if (!($this->value instanceof FormFieldCheckboxDefaultValueEntryArray && $this->kind === 'array')) { - throw new Exception( - "Expected array; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isUnsupported(): bool - { - return $this->value instanceof FormFieldCheckboxDefaultValueEntryUnsupported && $this->kind === 'unsupported'; - } - - /** - * @return FormFieldCheckboxDefaultValueEntryUnsupported - */ - public function asUnsupported(): FormFieldCheckboxDefaultValueEntryUnsupported - { - if (!($this->value instanceof FormFieldCheckboxDefaultValueEntryUnsupported && $this->kind === 'unsupported')) { - throw new Exception( - "Expected unsupported; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } - - /** - * @return array - */ - public function jsonSerialize(): array - { - $result = []; - $result['kind'] = $this->kind; - - $base = parent::jsonSerialize(); - $result = array_merge($base, $result); - - switch ($this->kind) { - case 'none': - $value = $this->asNone()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'scalar': - $value = $this->asScalar()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'array': - $value = $this->asArray()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'unsupported': - $value = $this->asUnsupported()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case '_unknown': - default: - if (is_null($this->value)) { - break; - } - if ($this->value instanceof JsonSerializableType) { - $value = $this->value->jsonSerialize(); - $result = array_merge($value, $result); - } elseif (is_array($this->value)) { - $result = array_merge($this->value, $result); - } - } - - return $result; - } - - /** - * @param array $data - */ - public static function jsonDeserialize(array $data): static - { - $args = []; - if (!array_key_exists('kind', $data)) { - throw new Exception( - "JSON data is missing property 'kind'", - ); - } - $kind = $data['kind']; - if (!(is_string($kind))) { - throw new Exception( - "Expected property 'kind' in JSON data to be string, instead received " . get_debug_type($data['kind']), - ); - } - - $args['kind'] = $kind; - switch ($kind) { - case 'none': - $args['value'] = FormFieldCheckboxDefaultValueEntryNone::jsonDeserialize($data); - break; - case 'scalar': - $args['value'] = FormFieldCheckboxDefaultValueEntryScalar::jsonDeserialize($data); - break; - case 'array': - $args['value'] = FormFieldCheckboxDefaultValueEntryArray::jsonDeserialize($data); - break; - case 'unsupported': - $args['value'] = FormFieldCheckboxDefaultValueEntryUnsupported::jsonDeserialize($data); - break; - case '_unknown': - default: - $args['kind'] = '_unknown'; - $args['value'] = $data; - } - - // @phpstan-ignore-next-line - return new static($args); - } -} diff --git a/src/Types/FormFieldCheckboxDefaultValueEntryArray.php b/src/Types/FormFieldCheckboxDefaultValueEntryArray.php deleted file mode 100644 index 5211e500..00000000 --- a/src/Types/FormFieldCheckboxDefaultValueEntryArray.php +++ /dev/null @@ -1,35 +0,0 @@ - $values - */ - #[JsonProperty('values'), ArrayType(['string'])] - public array $values; - - /** - * @param array{ - * values: array, - * } $values - */ - public function __construct( - array $values, - ) { - $this->values = $values['values']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/FormFieldCheckboxDefaultValueEntryNone.php b/src/Types/FormFieldCheckboxDefaultValueEntryNone.php deleted file mode 100644 index 0d46e6bc..00000000 --- a/src/Types/FormFieldCheckboxDefaultValueEntryNone.php +++ /dev/null @@ -1,26 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/FormFieldCheckboxDefaultValueEntryScalar.php b/src/Types/FormFieldCheckboxDefaultValueEntryScalar.php deleted file mode 100644 index 29626239..00000000 --- a/src/Types/FormFieldCheckboxDefaultValueEntryScalar.php +++ /dev/null @@ -1,34 +0,0 @@ -value = $values['value']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/FormFieldCheckboxDefaultValueEntryUnsupported.php b/src/Types/FormFieldCheckboxDefaultValueEntryUnsupported.php deleted file mode 100644 index 8bd3a002..00000000 --- a/src/Types/FormFieldCheckboxDefaultValueEntryUnsupported.php +++ /dev/null @@ -1,26 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/FormFieldCheckboxValueEntry.php b/src/Types/FormFieldCheckboxValueEntry.php deleted file mode 100644 index 1c9e50b3..00000000 --- a/src/Types/FormFieldCheckboxValueEntry.php +++ /dev/null @@ -1,286 +0,0 @@ -kind = $values['kind']; - $this->value = $values['value']; - } - - /** - * @param FormFieldCheckboxValueEntryNone $none - * @return FormFieldCheckboxValueEntry - */ - public static function none(FormFieldCheckboxValueEntryNone $none): FormFieldCheckboxValueEntry - { - return new FormFieldCheckboxValueEntry([ - 'kind' => 'none', - 'value' => $none, - ]); - } - - /** - * @param FormFieldCheckboxValueEntryScalar $scalar - * @return FormFieldCheckboxValueEntry - */ - public static function scalar(FormFieldCheckboxValueEntryScalar $scalar): FormFieldCheckboxValueEntry - { - return new FormFieldCheckboxValueEntry([ - 'kind' => 'scalar', - 'value' => $scalar, - ]); - } - - /** - * @param FormFieldCheckboxValueEntryArray $array - * @return FormFieldCheckboxValueEntry - */ - public static function array(FormFieldCheckboxValueEntryArray $array): FormFieldCheckboxValueEntry - { - return new FormFieldCheckboxValueEntry([ - 'kind' => 'array', - 'value' => $array, - ]); - } - - /** - * @param FormFieldCheckboxValueEntryUnsupported $unsupported - * @return FormFieldCheckboxValueEntry - */ - public static function unsupported(FormFieldCheckboxValueEntryUnsupported $unsupported): FormFieldCheckboxValueEntry - { - return new FormFieldCheckboxValueEntry([ - 'kind' => 'unsupported', - 'value' => $unsupported, - ]); - } - - /** - * @return bool - */ - public function isNone(): bool - { - return $this->value instanceof FormFieldCheckboxValueEntryNone && $this->kind === 'none'; - } - - /** - * @return FormFieldCheckboxValueEntryNone - */ - public function asNone(): FormFieldCheckboxValueEntryNone - { - if (!($this->value instanceof FormFieldCheckboxValueEntryNone && $this->kind === 'none')) { - throw new Exception( - "Expected none; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isScalar(): bool - { - return $this->value instanceof FormFieldCheckboxValueEntryScalar && $this->kind === 'scalar'; - } - - /** - * @return FormFieldCheckboxValueEntryScalar - */ - public function asScalar(): FormFieldCheckboxValueEntryScalar - { - if (!($this->value instanceof FormFieldCheckboxValueEntryScalar && $this->kind === 'scalar')) { - throw new Exception( - "Expected scalar; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isArray(): bool - { - return $this->value instanceof FormFieldCheckboxValueEntryArray && $this->kind === 'array'; - } - - /** - * @return FormFieldCheckboxValueEntryArray - */ - public function asArray(): FormFieldCheckboxValueEntryArray - { - if (!($this->value instanceof FormFieldCheckboxValueEntryArray && $this->kind === 'array')) { - throw new Exception( - "Expected array; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isUnsupported(): bool - { - return $this->value instanceof FormFieldCheckboxValueEntryUnsupported && $this->kind === 'unsupported'; - } - - /** - * @return FormFieldCheckboxValueEntryUnsupported - */ - public function asUnsupported(): FormFieldCheckboxValueEntryUnsupported - { - if (!($this->value instanceof FormFieldCheckboxValueEntryUnsupported && $this->kind === 'unsupported')) { - throw new Exception( - "Expected unsupported; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } - - /** - * @return array - */ - public function jsonSerialize(): array - { - $result = []; - $result['kind'] = $this->kind; - - $base = parent::jsonSerialize(); - $result = array_merge($base, $result); - - switch ($this->kind) { - case 'none': - $value = $this->asNone()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'scalar': - $value = $this->asScalar()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'array': - $value = $this->asArray()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'unsupported': - $value = $this->asUnsupported()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case '_unknown': - default: - if (is_null($this->value)) { - break; - } - if ($this->value instanceof JsonSerializableType) { - $value = $this->value->jsonSerialize(); - $result = array_merge($value, $result); - } elseif (is_array($this->value)) { - $result = array_merge($this->value, $result); - } - } - - return $result; - } - - /** - * @param array $data - */ - public static function jsonDeserialize(array $data): static - { - $args = []; - if (!array_key_exists('kind', $data)) { - throw new Exception( - "JSON data is missing property 'kind'", - ); - } - $kind = $data['kind']; - if (!(is_string($kind))) { - throw new Exception( - "Expected property 'kind' in JSON data to be string, instead received " . get_debug_type($data['kind']), - ); - } - - $args['kind'] = $kind; - switch ($kind) { - case 'none': - $args['value'] = FormFieldCheckboxValueEntryNone::jsonDeserialize($data); - break; - case 'scalar': - $args['value'] = FormFieldCheckboxValueEntryScalar::jsonDeserialize($data); - break; - case 'array': - $args['value'] = FormFieldCheckboxValueEntryArray::jsonDeserialize($data); - break; - case 'unsupported': - $args['value'] = FormFieldCheckboxValueEntryUnsupported::jsonDeserialize($data); - break; - case '_unknown': - default: - $args['kind'] = '_unknown'; - $args['value'] = $data; - } - - // @phpstan-ignore-next-line - return new static($args); - } -} diff --git a/src/Types/FormFieldCheckboxValueEntryArray.php b/src/Types/FormFieldCheckboxValueEntryArray.php deleted file mode 100644 index 7a77c58d..00000000 --- a/src/Types/FormFieldCheckboxValueEntryArray.php +++ /dev/null @@ -1,35 +0,0 @@ - $values - */ - #[JsonProperty('values'), ArrayType(['string'])] - public array $values; - - /** - * @param array{ - * values: array, - * } $values - */ - public function __construct( - array $values, - ) { - $this->values = $values['values']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/FormFieldCheckboxValueEntryNone.php b/src/Types/FormFieldCheckboxValueEntryNone.php deleted file mode 100644 index 5eb78dcf..00000000 --- a/src/Types/FormFieldCheckboxValueEntryNone.php +++ /dev/null @@ -1,26 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/FormFieldCheckboxValueEntryScalar.php b/src/Types/FormFieldCheckboxValueEntryScalar.php deleted file mode 100644 index 6d998061..00000000 --- a/src/Types/FormFieldCheckboxValueEntryScalar.php +++ /dev/null @@ -1,34 +0,0 @@ -value = $values['value']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/FormFieldCheckboxValueEntryUnsupported.php b/src/Types/FormFieldCheckboxValueEntryUnsupported.php deleted file mode 100644 index 2010b521..00000000 --- a/src/Types/FormFieldCheckboxValueEntryUnsupported.php +++ /dev/null @@ -1,26 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/FormFieldCombobox.php b/src/Types/FormFieldCombobox.php index a8a1f47c..2ebf464b 100644 --- a/src/Types/FormFieldCombobox.php +++ b/src/Types/FormFieldCombobox.php @@ -59,16 +59,16 @@ class FormFieldCombobox extends JsonSerializableType public ?string $mappingName; /** - * @var FormFieldComboboxValueEntry $valueEntry + * @var FormValueEntry $valueEntry */ #[JsonProperty('valueEntry')] - public FormFieldComboboxValueEntry $valueEntry; + public FormValueEntry $valueEntry; /** - * @var FormFieldComboboxDefaultValueEntry $defaultValueEntry + * @var FormValueEntry $defaultValueEntry */ #[JsonProperty('defaultValueEntry')] - public FormFieldComboboxDefaultValueEntry $defaultValueEntry; + public FormValueEntry $defaultValueEntry; /** * @var ?PdfFieldActions $actions @@ -156,8 +156,8 @@ class FormFieldCombobox extends JsonSerializableType * readOnly: bool, * required: bool, * noExport: bool, - * valueEntry: FormFieldComboboxValueEntry, - * defaultValueEntry: FormFieldComboboxDefaultValueEntry, + * valueEntry: FormValueEntry, + * defaultValueEntry: FormValueEntry, * widgets: array, * value: string, * defaultValue: string, diff --git a/src/Types/FormFieldComboboxDefaultValueEntry.php b/src/Types/FormFieldComboboxDefaultValueEntry.php deleted file mode 100644 index 21c68a5a..00000000 --- a/src/Types/FormFieldComboboxDefaultValueEntry.php +++ /dev/null @@ -1,286 +0,0 @@ -kind = $values['kind']; - $this->value = $values['value']; - } - - /** - * @param FormFieldComboboxDefaultValueEntryNone $none - * @return FormFieldComboboxDefaultValueEntry - */ - public static function none(FormFieldComboboxDefaultValueEntryNone $none): FormFieldComboboxDefaultValueEntry - { - return new FormFieldComboboxDefaultValueEntry([ - 'kind' => 'none', - 'value' => $none, - ]); - } - - /** - * @param FormFieldComboboxDefaultValueEntryScalar $scalar - * @return FormFieldComboboxDefaultValueEntry - */ - public static function scalar(FormFieldComboboxDefaultValueEntryScalar $scalar): FormFieldComboboxDefaultValueEntry - { - return new FormFieldComboboxDefaultValueEntry([ - 'kind' => 'scalar', - 'value' => $scalar, - ]); - } - - /** - * @param FormFieldComboboxDefaultValueEntryArray $array - * @return FormFieldComboboxDefaultValueEntry - */ - public static function array(FormFieldComboboxDefaultValueEntryArray $array): FormFieldComboboxDefaultValueEntry - { - return new FormFieldComboboxDefaultValueEntry([ - 'kind' => 'array', - 'value' => $array, - ]); - } - - /** - * @param FormFieldComboboxDefaultValueEntryUnsupported $unsupported - * @return FormFieldComboboxDefaultValueEntry - */ - public static function unsupported(FormFieldComboboxDefaultValueEntryUnsupported $unsupported): FormFieldComboboxDefaultValueEntry - { - return new FormFieldComboboxDefaultValueEntry([ - 'kind' => 'unsupported', - 'value' => $unsupported, - ]); - } - - /** - * @return bool - */ - public function isNone(): bool - { - return $this->value instanceof FormFieldComboboxDefaultValueEntryNone && $this->kind === 'none'; - } - - /** - * @return FormFieldComboboxDefaultValueEntryNone - */ - public function asNone(): FormFieldComboboxDefaultValueEntryNone - { - if (!($this->value instanceof FormFieldComboboxDefaultValueEntryNone && $this->kind === 'none')) { - throw new Exception( - "Expected none; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isScalar(): bool - { - return $this->value instanceof FormFieldComboboxDefaultValueEntryScalar && $this->kind === 'scalar'; - } - - /** - * @return FormFieldComboboxDefaultValueEntryScalar - */ - public function asScalar(): FormFieldComboboxDefaultValueEntryScalar - { - if (!($this->value instanceof FormFieldComboboxDefaultValueEntryScalar && $this->kind === 'scalar')) { - throw new Exception( - "Expected scalar; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isArray(): bool - { - return $this->value instanceof FormFieldComboboxDefaultValueEntryArray && $this->kind === 'array'; - } - - /** - * @return FormFieldComboboxDefaultValueEntryArray - */ - public function asArray(): FormFieldComboboxDefaultValueEntryArray - { - if (!($this->value instanceof FormFieldComboboxDefaultValueEntryArray && $this->kind === 'array')) { - throw new Exception( - "Expected array; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isUnsupported(): bool - { - return $this->value instanceof FormFieldComboboxDefaultValueEntryUnsupported && $this->kind === 'unsupported'; - } - - /** - * @return FormFieldComboboxDefaultValueEntryUnsupported - */ - public function asUnsupported(): FormFieldComboboxDefaultValueEntryUnsupported - { - if (!($this->value instanceof FormFieldComboboxDefaultValueEntryUnsupported && $this->kind === 'unsupported')) { - throw new Exception( - "Expected unsupported; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } - - /** - * @return array - */ - public function jsonSerialize(): array - { - $result = []; - $result['kind'] = $this->kind; - - $base = parent::jsonSerialize(); - $result = array_merge($base, $result); - - switch ($this->kind) { - case 'none': - $value = $this->asNone()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'scalar': - $value = $this->asScalar()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'array': - $value = $this->asArray()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'unsupported': - $value = $this->asUnsupported()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case '_unknown': - default: - if (is_null($this->value)) { - break; - } - if ($this->value instanceof JsonSerializableType) { - $value = $this->value->jsonSerialize(); - $result = array_merge($value, $result); - } elseif (is_array($this->value)) { - $result = array_merge($this->value, $result); - } - } - - return $result; - } - - /** - * @param array $data - */ - public static function jsonDeserialize(array $data): static - { - $args = []; - if (!array_key_exists('kind', $data)) { - throw new Exception( - "JSON data is missing property 'kind'", - ); - } - $kind = $data['kind']; - if (!(is_string($kind))) { - throw new Exception( - "Expected property 'kind' in JSON data to be string, instead received " . get_debug_type($data['kind']), - ); - } - - $args['kind'] = $kind; - switch ($kind) { - case 'none': - $args['value'] = FormFieldComboboxDefaultValueEntryNone::jsonDeserialize($data); - break; - case 'scalar': - $args['value'] = FormFieldComboboxDefaultValueEntryScalar::jsonDeserialize($data); - break; - case 'array': - $args['value'] = FormFieldComboboxDefaultValueEntryArray::jsonDeserialize($data); - break; - case 'unsupported': - $args['value'] = FormFieldComboboxDefaultValueEntryUnsupported::jsonDeserialize($data); - break; - case '_unknown': - default: - $args['kind'] = '_unknown'; - $args['value'] = $data; - } - - // @phpstan-ignore-next-line - return new static($args); - } -} diff --git a/src/Types/FormFieldComboboxDefaultValueEntryArray.php b/src/Types/FormFieldComboboxDefaultValueEntryArray.php deleted file mode 100644 index 9a9b1869..00000000 --- a/src/Types/FormFieldComboboxDefaultValueEntryArray.php +++ /dev/null @@ -1,35 +0,0 @@ - $values - */ - #[JsonProperty('values'), ArrayType(['string'])] - public array $values; - - /** - * @param array{ - * values: array, - * } $values - */ - public function __construct( - array $values, - ) { - $this->values = $values['values']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/FormFieldComboboxDefaultValueEntryNone.php b/src/Types/FormFieldComboboxDefaultValueEntryNone.php deleted file mode 100644 index a0a186e8..00000000 --- a/src/Types/FormFieldComboboxDefaultValueEntryNone.php +++ /dev/null @@ -1,26 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/FormFieldComboboxDefaultValueEntryScalar.php b/src/Types/FormFieldComboboxDefaultValueEntryScalar.php deleted file mode 100644 index cf26e557..00000000 --- a/src/Types/FormFieldComboboxDefaultValueEntryScalar.php +++ /dev/null @@ -1,34 +0,0 @@ -value = $values['value']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/FormFieldComboboxDefaultValueEntryUnsupported.php b/src/Types/FormFieldComboboxDefaultValueEntryUnsupported.php deleted file mode 100644 index 5cad6d38..00000000 --- a/src/Types/FormFieldComboboxDefaultValueEntryUnsupported.php +++ /dev/null @@ -1,26 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/FormFieldComboboxValueEntry.php b/src/Types/FormFieldComboboxValueEntry.php deleted file mode 100644 index 2752a2d6..00000000 --- a/src/Types/FormFieldComboboxValueEntry.php +++ /dev/null @@ -1,286 +0,0 @@ -kind = $values['kind']; - $this->value = $values['value']; - } - - /** - * @param FormFieldComboboxValueEntryNone $none - * @return FormFieldComboboxValueEntry - */ - public static function none(FormFieldComboboxValueEntryNone $none): FormFieldComboboxValueEntry - { - return new FormFieldComboboxValueEntry([ - 'kind' => 'none', - 'value' => $none, - ]); - } - - /** - * @param FormFieldComboboxValueEntryScalar $scalar - * @return FormFieldComboboxValueEntry - */ - public static function scalar(FormFieldComboboxValueEntryScalar $scalar): FormFieldComboboxValueEntry - { - return new FormFieldComboboxValueEntry([ - 'kind' => 'scalar', - 'value' => $scalar, - ]); - } - - /** - * @param FormFieldComboboxValueEntryArray $array - * @return FormFieldComboboxValueEntry - */ - public static function array(FormFieldComboboxValueEntryArray $array): FormFieldComboboxValueEntry - { - return new FormFieldComboboxValueEntry([ - 'kind' => 'array', - 'value' => $array, - ]); - } - - /** - * @param FormFieldComboboxValueEntryUnsupported $unsupported - * @return FormFieldComboboxValueEntry - */ - public static function unsupported(FormFieldComboboxValueEntryUnsupported $unsupported): FormFieldComboboxValueEntry - { - return new FormFieldComboboxValueEntry([ - 'kind' => 'unsupported', - 'value' => $unsupported, - ]); - } - - /** - * @return bool - */ - public function isNone(): bool - { - return $this->value instanceof FormFieldComboboxValueEntryNone && $this->kind === 'none'; - } - - /** - * @return FormFieldComboboxValueEntryNone - */ - public function asNone(): FormFieldComboboxValueEntryNone - { - if (!($this->value instanceof FormFieldComboboxValueEntryNone && $this->kind === 'none')) { - throw new Exception( - "Expected none; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isScalar(): bool - { - return $this->value instanceof FormFieldComboboxValueEntryScalar && $this->kind === 'scalar'; - } - - /** - * @return FormFieldComboboxValueEntryScalar - */ - public function asScalar(): FormFieldComboboxValueEntryScalar - { - if (!($this->value instanceof FormFieldComboboxValueEntryScalar && $this->kind === 'scalar')) { - throw new Exception( - "Expected scalar; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isArray(): bool - { - return $this->value instanceof FormFieldComboboxValueEntryArray && $this->kind === 'array'; - } - - /** - * @return FormFieldComboboxValueEntryArray - */ - public function asArray(): FormFieldComboboxValueEntryArray - { - if (!($this->value instanceof FormFieldComboboxValueEntryArray && $this->kind === 'array')) { - throw new Exception( - "Expected array; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isUnsupported(): bool - { - return $this->value instanceof FormFieldComboboxValueEntryUnsupported && $this->kind === 'unsupported'; - } - - /** - * @return FormFieldComboboxValueEntryUnsupported - */ - public function asUnsupported(): FormFieldComboboxValueEntryUnsupported - { - if (!($this->value instanceof FormFieldComboboxValueEntryUnsupported && $this->kind === 'unsupported')) { - throw new Exception( - "Expected unsupported; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } - - /** - * @return array - */ - public function jsonSerialize(): array - { - $result = []; - $result['kind'] = $this->kind; - - $base = parent::jsonSerialize(); - $result = array_merge($base, $result); - - switch ($this->kind) { - case 'none': - $value = $this->asNone()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'scalar': - $value = $this->asScalar()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'array': - $value = $this->asArray()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'unsupported': - $value = $this->asUnsupported()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case '_unknown': - default: - if (is_null($this->value)) { - break; - } - if ($this->value instanceof JsonSerializableType) { - $value = $this->value->jsonSerialize(); - $result = array_merge($value, $result); - } elseif (is_array($this->value)) { - $result = array_merge($this->value, $result); - } - } - - return $result; - } - - /** - * @param array $data - */ - public static function jsonDeserialize(array $data): static - { - $args = []; - if (!array_key_exists('kind', $data)) { - throw new Exception( - "JSON data is missing property 'kind'", - ); - } - $kind = $data['kind']; - if (!(is_string($kind))) { - throw new Exception( - "Expected property 'kind' in JSON data to be string, instead received " . get_debug_type($data['kind']), - ); - } - - $args['kind'] = $kind; - switch ($kind) { - case 'none': - $args['value'] = FormFieldComboboxValueEntryNone::jsonDeserialize($data); - break; - case 'scalar': - $args['value'] = FormFieldComboboxValueEntryScalar::jsonDeserialize($data); - break; - case 'array': - $args['value'] = FormFieldComboboxValueEntryArray::jsonDeserialize($data); - break; - case 'unsupported': - $args['value'] = FormFieldComboboxValueEntryUnsupported::jsonDeserialize($data); - break; - case '_unknown': - default: - $args['kind'] = '_unknown'; - $args['value'] = $data; - } - - // @phpstan-ignore-next-line - return new static($args); - } -} diff --git a/src/Types/FormFieldComboboxValueEntryArray.php b/src/Types/FormFieldComboboxValueEntryArray.php deleted file mode 100644 index 5b8705f9..00000000 --- a/src/Types/FormFieldComboboxValueEntryArray.php +++ /dev/null @@ -1,35 +0,0 @@ - $values - */ - #[JsonProperty('values'), ArrayType(['string'])] - public array $values; - - /** - * @param array{ - * values: array, - * } $values - */ - public function __construct( - array $values, - ) { - $this->values = $values['values']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/FormFieldComboboxValueEntryNone.php b/src/Types/FormFieldComboboxValueEntryNone.php deleted file mode 100644 index b629bae7..00000000 --- a/src/Types/FormFieldComboboxValueEntryNone.php +++ /dev/null @@ -1,26 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/FormFieldComboboxValueEntryScalar.php b/src/Types/FormFieldComboboxValueEntryScalar.php deleted file mode 100644 index 05171cfb..00000000 --- a/src/Types/FormFieldComboboxValueEntryScalar.php +++ /dev/null @@ -1,34 +0,0 @@ -value = $values['value']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/FormFieldComboboxValueEntryUnsupported.php b/src/Types/FormFieldComboboxValueEntryUnsupported.php deleted file mode 100644 index cff88c9d..00000000 --- a/src/Types/FormFieldComboboxValueEntryUnsupported.php +++ /dev/null @@ -1,26 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/FormFieldDraft.php b/src/Types/FormFieldDraft.php index 285fb51e..f93ef0b3 100644 --- a/src/Types/FormFieldDraft.php +++ b/src/Types/FormFieldDraft.php @@ -17,9 +17,9 @@ class FormFieldDraft extends JsonSerializableType * |'pushbutton' * |'signature' * |'_unknown' - * ) $family + * ) $kind */ - public readonly string $family; + public readonly string $kind; /** * @var ( @@ -37,7 +37,7 @@ class FormFieldDraft extends JsonSerializableType /** * @param array{ - * family: ( + * kind: ( * 'text' * |'checkbox' * |'radio' @@ -62,7 +62,7 @@ class FormFieldDraft extends JsonSerializableType private function __construct( array $values, ) { - $this->family = $values['family']; + $this->kind = $values['kind']; $this->value = $values['value']; } @@ -73,7 +73,7 @@ private function __construct( public static function text(FormFieldDraftText $text): FormFieldDraft { return new FormFieldDraft([ - 'family' => 'text', + 'kind' => 'text', 'value' => $text, ]); } @@ -85,7 +85,7 @@ public static function text(FormFieldDraftText $text): FormFieldDraft public static function checkbox(FormFieldDraftCheckbox $checkbox): FormFieldDraft { return new FormFieldDraft([ - 'family' => 'checkbox', + 'kind' => 'checkbox', 'value' => $checkbox, ]); } @@ -97,7 +97,7 @@ public static function checkbox(FormFieldDraftCheckbox $checkbox): FormFieldDraf public static function radio(FormFieldDraftRadio $radio): FormFieldDraft { return new FormFieldDraft([ - 'family' => 'radio', + 'kind' => 'radio', 'value' => $radio, ]); } @@ -109,7 +109,7 @@ public static function radio(FormFieldDraftRadio $radio): FormFieldDraft public static function combobox(FormFieldDraftCombobox $combobox): FormFieldDraft { return new FormFieldDraft([ - 'family' => 'combobox', + 'kind' => 'combobox', 'value' => $combobox, ]); } @@ -121,7 +121,7 @@ public static function combobox(FormFieldDraftCombobox $combobox): FormFieldDraf public static function listbox(FormFieldDraftListbox $listbox): FormFieldDraft { return new FormFieldDraft([ - 'family' => 'listbox', + 'kind' => 'listbox', 'value' => $listbox, ]); } @@ -133,7 +133,7 @@ public static function listbox(FormFieldDraftListbox $listbox): FormFieldDraft public static function pushbutton(FormFieldDraftPushbutton $pushbutton): FormFieldDraft { return new FormFieldDraft([ - 'family' => 'pushbutton', + 'kind' => 'pushbutton', 'value' => $pushbutton, ]); } @@ -145,7 +145,7 @@ public static function pushbutton(FormFieldDraftPushbutton $pushbutton): FormFie public static function signature(FormFieldDraftSignature $signature): FormFieldDraft { return new FormFieldDraft([ - 'family' => 'signature', + 'kind' => 'signature', 'value' => $signature, ]); } @@ -155,7 +155,7 @@ public static function signature(FormFieldDraftSignature $signature): FormFieldD */ public function isText(): bool { - return $this->value instanceof FormFieldDraftText && $this->family === 'text'; + return $this->value instanceof FormFieldDraftText && $this->kind === 'text'; } /** @@ -163,9 +163,9 @@ public function isText(): bool */ public function asText(): FormFieldDraftText { - if (!($this->value instanceof FormFieldDraftText && $this->family === 'text')) { + if (!($this->value instanceof FormFieldDraftText && $this->kind === 'text')) { throw new Exception( - "Expected text; got " . $this->family . " with value of type " . get_debug_type($this->value), + "Expected text; got " . $this->kind . " with value of type " . get_debug_type($this->value), ); } @@ -177,7 +177,7 @@ public function asText(): FormFieldDraftText */ public function isCheckbox(): bool { - return $this->value instanceof FormFieldDraftCheckbox && $this->family === 'checkbox'; + return $this->value instanceof FormFieldDraftCheckbox && $this->kind === 'checkbox'; } /** @@ -185,9 +185,9 @@ public function isCheckbox(): bool */ public function asCheckbox(): FormFieldDraftCheckbox { - if (!($this->value instanceof FormFieldDraftCheckbox && $this->family === 'checkbox')) { + if (!($this->value instanceof FormFieldDraftCheckbox && $this->kind === 'checkbox')) { throw new Exception( - "Expected checkbox; got " . $this->family . " with value of type " . get_debug_type($this->value), + "Expected checkbox; got " . $this->kind . " with value of type " . get_debug_type($this->value), ); } @@ -199,7 +199,7 @@ public function asCheckbox(): FormFieldDraftCheckbox */ public function isRadio(): bool { - return $this->value instanceof FormFieldDraftRadio && $this->family === 'radio'; + return $this->value instanceof FormFieldDraftRadio && $this->kind === 'radio'; } /** @@ -207,9 +207,9 @@ public function isRadio(): bool */ public function asRadio(): FormFieldDraftRadio { - if (!($this->value instanceof FormFieldDraftRadio && $this->family === 'radio')) { + if (!($this->value instanceof FormFieldDraftRadio && $this->kind === 'radio')) { throw new Exception( - "Expected radio; got " . $this->family . " with value of type " . get_debug_type($this->value), + "Expected radio; got " . $this->kind . " with value of type " . get_debug_type($this->value), ); } @@ -221,7 +221,7 @@ public function asRadio(): FormFieldDraftRadio */ public function isCombobox(): bool { - return $this->value instanceof FormFieldDraftCombobox && $this->family === 'combobox'; + return $this->value instanceof FormFieldDraftCombobox && $this->kind === 'combobox'; } /** @@ -229,9 +229,9 @@ public function isCombobox(): bool */ public function asCombobox(): FormFieldDraftCombobox { - if (!($this->value instanceof FormFieldDraftCombobox && $this->family === 'combobox')) { + if (!($this->value instanceof FormFieldDraftCombobox && $this->kind === 'combobox')) { throw new Exception( - "Expected combobox; got " . $this->family . " with value of type " . get_debug_type($this->value), + "Expected combobox; got " . $this->kind . " with value of type " . get_debug_type($this->value), ); } @@ -243,7 +243,7 @@ public function asCombobox(): FormFieldDraftCombobox */ public function isListbox(): bool { - return $this->value instanceof FormFieldDraftListbox && $this->family === 'listbox'; + return $this->value instanceof FormFieldDraftListbox && $this->kind === 'listbox'; } /** @@ -251,9 +251,9 @@ public function isListbox(): bool */ public function asListbox(): FormFieldDraftListbox { - if (!($this->value instanceof FormFieldDraftListbox && $this->family === 'listbox')) { + if (!($this->value instanceof FormFieldDraftListbox && $this->kind === 'listbox')) { throw new Exception( - "Expected listbox; got " . $this->family . " with value of type " . get_debug_type($this->value), + "Expected listbox; got " . $this->kind . " with value of type " . get_debug_type($this->value), ); } @@ -265,7 +265,7 @@ public function asListbox(): FormFieldDraftListbox */ public function isPushbutton(): bool { - return $this->value instanceof FormFieldDraftPushbutton && $this->family === 'pushbutton'; + return $this->value instanceof FormFieldDraftPushbutton && $this->kind === 'pushbutton'; } /** @@ -273,9 +273,9 @@ public function isPushbutton(): bool */ public function asPushbutton(): FormFieldDraftPushbutton { - if (!($this->value instanceof FormFieldDraftPushbutton && $this->family === 'pushbutton')) { + if (!($this->value instanceof FormFieldDraftPushbutton && $this->kind === 'pushbutton')) { throw new Exception( - "Expected pushbutton; got " . $this->family . " with value of type " . get_debug_type($this->value), + "Expected pushbutton; got " . $this->kind . " with value of type " . get_debug_type($this->value), ); } @@ -287,7 +287,7 @@ public function asPushbutton(): FormFieldDraftPushbutton */ public function isSignature(): bool { - return $this->value instanceof FormFieldDraftSignature && $this->family === 'signature'; + return $this->value instanceof FormFieldDraftSignature && $this->kind === 'signature'; } /** @@ -295,9 +295,9 @@ public function isSignature(): bool */ public function asSignature(): FormFieldDraftSignature { - if (!($this->value instanceof FormFieldDraftSignature && $this->family === 'signature')) { + if (!($this->value instanceof FormFieldDraftSignature && $this->kind === 'signature')) { throw new Exception( - "Expected signature; got " . $this->family . " with value of type " . get_debug_type($this->value), + "Expected signature; got " . $this->kind . " with value of type " . get_debug_type($this->value), ); } @@ -318,12 +318,12 @@ public function __toString(): string public function jsonSerialize(): array { $result = []; - $result['family'] = $this->family; + $result['kind'] = $this->kind; $base = parent::jsonSerialize(); $result = array_merge($base, $result); - switch ($this->family) { + switch ($this->kind) { case 'text': $value = $this->asText()->jsonSerialize(); $result = array_merge($value, $result); @@ -374,20 +374,20 @@ public function jsonSerialize(): array public static function jsonDeserialize(array $data): static { $args = []; - if (!array_key_exists('family', $data)) { + if (!array_key_exists('kind', $data)) { throw new Exception( - "JSON data is missing property 'family'", + "JSON data is missing property 'kind'", ); } - $family = $data['family']; - if (!(is_string($family))) { + $kind = $data['kind']; + if (!(is_string($kind))) { throw new Exception( - "Expected property 'family' in JSON data to be string, instead received " . get_debug_type($data['family']), + "Expected property 'kind' in JSON data to be string, instead received " . get_debug_type($data['kind']), ); } - $args['family'] = $family; - switch ($family) { + $args['kind'] = $kind; + switch ($kind) { case 'text': $args['value'] = FormFieldDraftText::jsonDeserialize($data); break; @@ -411,7 +411,7 @@ public static function jsonDeserialize(array $data): static break; case '_unknown': default: - $args['family'] = '_unknown'; + $args['kind'] = '_unknown'; $args['value'] = $data; } diff --git a/src/Types/FormFieldListbox.php b/src/Types/FormFieldListbox.php index 5b268a52..45b18a21 100644 --- a/src/Types/FormFieldListbox.php +++ b/src/Types/FormFieldListbox.php @@ -59,16 +59,16 @@ class FormFieldListbox extends JsonSerializableType public ?string $mappingName; /** - * @var FormFieldListboxValueEntry $valueEntry + * @var FormValueEntry $valueEntry */ #[JsonProperty('valueEntry')] - public FormFieldListboxValueEntry $valueEntry; + public FormValueEntry $valueEntry; /** - * @var FormFieldListboxDefaultValueEntry $defaultValueEntry + * @var FormValueEntry $defaultValueEntry */ #[JsonProperty('defaultValueEntry')] - public FormFieldListboxDefaultValueEntry $defaultValueEntry; + public FormValueEntry $defaultValueEntry; /** * @var ?PdfFieldActions $actions @@ -162,8 +162,8 @@ class FormFieldListbox extends JsonSerializableType * readOnly: bool, * required: bool, * noExport: bool, - * valueEntry: FormFieldListboxValueEntry, - * defaultValueEntry: FormFieldListboxDefaultValueEntry, + * valueEntry: FormValueEntry, + * defaultValueEntry: FormValueEntry, * widgets: array, * selectedValues: array, * defaultValue: array, diff --git a/src/Types/FormFieldListboxDefaultValueEntry.php b/src/Types/FormFieldListboxDefaultValueEntry.php deleted file mode 100644 index e7550efd..00000000 --- a/src/Types/FormFieldListboxDefaultValueEntry.php +++ /dev/null @@ -1,286 +0,0 @@ -kind = $values['kind']; - $this->value = $values['value']; - } - - /** - * @param FormFieldListboxDefaultValueEntryNone $none - * @return FormFieldListboxDefaultValueEntry - */ - public static function none(FormFieldListboxDefaultValueEntryNone $none): FormFieldListboxDefaultValueEntry - { - return new FormFieldListboxDefaultValueEntry([ - 'kind' => 'none', - 'value' => $none, - ]); - } - - /** - * @param FormFieldListboxDefaultValueEntryScalar $scalar - * @return FormFieldListboxDefaultValueEntry - */ - public static function scalar(FormFieldListboxDefaultValueEntryScalar $scalar): FormFieldListboxDefaultValueEntry - { - return new FormFieldListboxDefaultValueEntry([ - 'kind' => 'scalar', - 'value' => $scalar, - ]); - } - - /** - * @param FormFieldListboxDefaultValueEntryArray $array - * @return FormFieldListboxDefaultValueEntry - */ - public static function array(FormFieldListboxDefaultValueEntryArray $array): FormFieldListboxDefaultValueEntry - { - return new FormFieldListboxDefaultValueEntry([ - 'kind' => 'array', - 'value' => $array, - ]); - } - - /** - * @param FormFieldListboxDefaultValueEntryUnsupported $unsupported - * @return FormFieldListboxDefaultValueEntry - */ - public static function unsupported(FormFieldListboxDefaultValueEntryUnsupported $unsupported): FormFieldListboxDefaultValueEntry - { - return new FormFieldListboxDefaultValueEntry([ - 'kind' => 'unsupported', - 'value' => $unsupported, - ]); - } - - /** - * @return bool - */ - public function isNone(): bool - { - return $this->value instanceof FormFieldListboxDefaultValueEntryNone && $this->kind === 'none'; - } - - /** - * @return FormFieldListboxDefaultValueEntryNone - */ - public function asNone(): FormFieldListboxDefaultValueEntryNone - { - if (!($this->value instanceof FormFieldListboxDefaultValueEntryNone && $this->kind === 'none')) { - throw new Exception( - "Expected none; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isScalar(): bool - { - return $this->value instanceof FormFieldListboxDefaultValueEntryScalar && $this->kind === 'scalar'; - } - - /** - * @return FormFieldListboxDefaultValueEntryScalar - */ - public function asScalar(): FormFieldListboxDefaultValueEntryScalar - { - if (!($this->value instanceof FormFieldListboxDefaultValueEntryScalar && $this->kind === 'scalar')) { - throw new Exception( - "Expected scalar; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isArray(): bool - { - return $this->value instanceof FormFieldListboxDefaultValueEntryArray && $this->kind === 'array'; - } - - /** - * @return FormFieldListboxDefaultValueEntryArray - */ - public function asArray(): FormFieldListboxDefaultValueEntryArray - { - if (!($this->value instanceof FormFieldListboxDefaultValueEntryArray && $this->kind === 'array')) { - throw new Exception( - "Expected array; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isUnsupported(): bool - { - return $this->value instanceof FormFieldListboxDefaultValueEntryUnsupported && $this->kind === 'unsupported'; - } - - /** - * @return FormFieldListboxDefaultValueEntryUnsupported - */ - public function asUnsupported(): FormFieldListboxDefaultValueEntryUnsupported - { - if (!($this->value instanceof FormFieldListboxDefaultValueEntryUnsupported && $this->kind === 'unsupported')) { - throw new Exception( - "Expected unsupported; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } - - /** - * @return array - */ - public function jsonSerialize(): array - { - $result = []; - $result['kind'] = $this->kind; - - $base = parent::jsonSerialize(); - $result = array_merge($base, $result); - - switch ($this->kind) { - case 'none': - $value = $this->asNone()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'scalar': - $value = $this->asScalar()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'array': - $value = $this->asArray()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'unsupported': - $value = $this->asUnsupported()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case '_unknown': - default: - if (is_null($this->value)) { - break; - } - if ($this->value instanceof JsonSerializableType) { - $value = $this->value->jsonSerialize(); - $result = array_merge($value, $result); - } elseif (is_array($this->value)) { - $result = array_merge($this->value, $result); - } - } - - return $result; - } - - /** - * @param array $data - */ - public static function jsonDeserialize(array $data): static - { - $args = []; - if (!array_key_exists('kind', $data)) { - throw new Exception( - "JSON data is missing property 'kind'", - ); - } - $kind = $data['kind']; - if (!(is_string($kind))) { - throw new Exception( - "Expected property 'kind' in JSON data to be string, instead received " . get_debug_type($data['kind']), - ); - } - - $args['kind'] = $kind; - switch ($kind) { - case 'none': - $args['value'] = FormFieldListboxDefaultValueEntryNone::jsonDeserialize($data); - break; - case 'scalar': - $args['value'] = FormFieldListboxDefaultValueEntryScalar::jsonDeserialize($data); - break; - case 'array': - $args['value'] = FormFieldListboxDefaultValueEntryArray::jsonDeserialize($data); - break; - case 'unsupported': - $args['value'] = FormFieldListboxDefaultValueEntryUnsupported::jsonDeserialize($data); - break; - case '_unknown': - default: - $args['kind'] = '_unknown'; - $args['value'] = $data; - } - - // @phpstan-ignore-next-line - return new static($args); - } -} diff --git a/src/Types/FormFieldListboxDefaultValueEntryArray.php b/src/Types/FormFieldListboxDefaultValueEntryArray.php deleted file mode 100644 index 33476286..00000000 --- a/src/Types/FormFieldListboxDefaultValueEntryArray.php +++ /dev/null @@ -1,35 +0,0 @@ - $values - */ - #[JsonProperty('values'), ArrayType(['string'])] - public array $values; - - /** - * @param array{ - * values: array, - * } $values - */ - public function __construct( - array $values, - ) { - $this->values = $values['values']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/FormFieldListboxDefaultValueEntryNone.php b/src/Types/FormFieldListboxDefaultValueEntryNone.php deleted file mode 100644 index c10d5c3d..00000000 --- a/src/Types/FormFieldListboxDefaultValueEntryNone.php +++ /dev/null @@ -1,26 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/FormFieldListboxDefaultValueEntryScalar.php b/src/Types/FormFieldListboxDefaultValueEntryScalar.php deleted file mode 100644 index e3d34685..00000000 --- a/src/Types/FormFieldListboxDefaultValueEntryScalar.php +++ /dev/null @@ -1,34 +0,0 @@ -value = $values['value']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/FormFieldListboxDefaultValueEntryUnsupported.php b/src/Types/FormFieldListboxDefaultValueEntryUnsupported.php deleted file mode 100644 index a8238d3c..00000000 --- a/src/Types/FormFieldListboxDefaultValueEntryUnsupported.php +++ /dev/null @@ -1,26 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/FormFieldListboxValueEntry.php b/src/Types/FormFieldListboxValueEntry.php deleted file mode 100644 index 092df6f3..00000000 --- a/src/Types/FormFieldListboxValueEntry.php +++ /dev/null @@ -1,286 +0,0 @@ -kind = $values['kind']; - $this->value = $values['value']; - } - - /** - * @param FormFieldListboxValueEntryNone $none - * @return FormFieldListboxValueEntry - */ - public static function none(FormFieldListboxValueEntryNone $none): FormFieldListboxValueEntry - { - return new FormFieldListboxValueEntry([ - 'kind' => 'none', - 'value' => $none, - ]); - } - - /** - * @param FormFieldListboxValueEntryScalar $scalar - * @return FormFieldListboxValueEntry - */ - public static function scalar(FormFieldListboxValueEntryScalar $scalar): FormFieldListboxValueEntry - { - return new FormFieldListboxValueEntry([ - 'kind' => 'scalar', - 'value' => $scalar, - ]); - } - - /** - * @param FormFieldListboxValueEntryArray $array - * @return FormFieldListboxValueEntry - */ - public static function array(FormFieldListboxValueEntryArray $array): FormFieldListboxValueEntry - { - return new FormFieldListboxValueEntry([ - 'kind' => 'array', - 'value' => $array, - ]); - } - - /** - * @param FormFieldListboxValueEntryUnsupported $unsupported - * @return FormFieldListboxValueEntry - */ - public static function unsupported(FormFieldListboxValueEntryUnsupported $unsupported): FormFieldListboxValueEntry - { - return new FormFieldListboxValueEntry([ - 'kind' => 'unsupported', - 'value' => $unsupported, - ]); - } - - /** - * @return bool - */ - public function isNone(): bool - { - return $this->value instanceof FormFieldListboxValueEntryNone && $this->kind === 'none'; - } - - /** - * @return FormFieldListboxValueEntryNone - */ - public function asNone(): FormFieldListboxValueEntryNone - { - if (!($this->value instanceof FormFieldListboxValueEntryNone && $this->kind === 'none')) { - throw new Exception( - "Expected none; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isScalar(): bool - { - return $this->value instanceof FormFieldListboxValueEntryScalar && $this->kind === 'scalar'; - } - - /** - * @return FormFieldListboxValueEntryScalar - */ - public function asScalar(): FormFieldListboxValueEntryScalar - { - if (!($this->value instanceof FormFieldListboxValueEntryScalar && $this->kind === 'scalar')) { - throw new Exception( - "Expected scalar; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isArray(): bool - { - return $this->value instanceof FormFieldListboxValueEntryArray && $this->kind === 'array'; - } - - /** - * @return FormFieldListboxValueEntryArray - */ - public function asArray(): FormFieldListboxValueEntryArray - { - if (!($this->value instanceof FormFieldListboxValueEntryArray && $this->kind === 'array')) { - throw new Exception( - "Expected array; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isUnsupported(): bool - { - return $this->value instanceof FormFieldListboxValueEntryUnsupported && $this->kind === 'unsupported'; - } - - /** - * @return FormFieldListboxValueEntryUnsupported - */ - public function asUnsupported(): FormFieldListboxValueEntryUnsupported - { - if (!($this->value instanceof FormFieldListboxValueEntryUnsupported && $this->kind === 'unsupported')) { - throw new Exception( - "Expected unsupported; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } - - /** - * @return array - */ - public function jsonSerialize(): array - { - $result = []; - $result['kind'] = $this->kind; - - $base = parent::jsonSerialize(); - $result = array_merge($base, $result); - - switch ($this->kind) { - case 'none': - $value = $this->asNone()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'scalar': - $value = $this->asScalar()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'array': - $value = $this->asArray()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'unsupported': - $value = $this->asUnsupported()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case '_unknown': - default: - if (is_null($this->value)) { - break; - } - if ($this->value instanceof JsonSerializableType) { - $value = $this->value->jsonSerialize(); - $result = array_merge($value, $result); - } elseif (is_array($this->value)) { - $result = array_merge($this->value, $result); - } - } - - return $result; - } - - /** - * @param array $data - */ - public static function jsonDeserialize(array $data): static - { - $args = []; - if (!array_key_exists('kind', $data)) { - throw new Exception( - "JSON data is missing property 'kind'", - ); - } - $kind = $data['kind']; - if (!(is_string($kind))) { - throw new Exception( - "Expected property 'kind' in JSON data to be string, instead received " . get_debug_type($data['kind']), - ); - } - - $args['kind'] = $kind; - switch ($kind) { - case 'none': - $args['value'] = FormFieldListboxValueEntryNone::jsonDeserialize($data); - break; - case 'scalar': - $args['value'] = FormFieldListboxValueEntryScalar::jsonDeserialize($data); - break; - case 'array': - $args['value'] = FormFieldListboxValueEntryArray::jsonDeserialize($data); - break; - case 'unsupported': - $args['value'] = FormFieldListboxValueEntryUnsupported::jsonDeserialize($data); - break; - case '_unknown': - default: - $args['kind'] = '_unknown'; - $args['value'] = $data; - } - - // @phpstan-ignore-next-line - return new static($args); - } -} diff --git a/src/Types/FormFieldListboxValueEntryArray.php b/src/Types/FormFieldListboxValueEntryArray.php deleted file mode 100644 index 6749a3bc..00000000 --- a/src/Types/FormFieldListboxValueEntryArray.php +++ /dev/null @@ -1,35 +0,0 @@ - $values - */ - #[JsonProperty('values'), ArrayType(['string'])] - public array $values; - - /** - * @param array{ - * values: array, - * } $values - */ - public function __construct( - array $values, - ) { - $this->values = $values['values']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/FormFieldListboxValueEntryScalar.php b/src/Types/FormFieldListboxValueEntryScalar.php deleted file mode 100644 index 6276b53d..00000000 --- a/src/Types/FormFieldListboxValueEntryScalar.php +++ /dev/null @@ -1,34 +0,0 @@ -value = $values['value']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/FormFieldListboxValueEntryUnsupported.php b/src/Types/FormFieldListboxValueEntryUnsupported.php deleted file mode 100644 index 9a0402eb..00000000 --- a/src/Types/FormFieldListboxValueEntryUnsupported.php +++ /dev/null @@ -1,26 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/FormFieldPatch.php b/src/Types/FormFieldPatch.php index aec5f45f..9e6599c2 100644 --- a/src/Types/FormFieldPatch.php +++ b/src/Types/FormFieldPatch.php @@ -58,10 +58,10 @@ class FormFieldPatch extends JsonSerializableType public ?FieldActionsPatch $actions; /** - * @var ?value-of $family + * @var ?value-of $kind */ - #[JsonProperty('family')] - public ?string $family; + #[JsonProperty('kind')] + public ?string $kind; /** * @var ( @@ -136,7 +136,7 @@ class FormFieldPatch extends JsonSerializableType * mappingName?: ?string, * groupId?: ?string, * actions?: ?FieldActionsPatch, - * family?: ?value-of, + * kind?: ?value-of, * defaultValue?: ( * string * |array @@ -163,7 +163,7 @@ public function __construct( $this->mappingName = $values['mappingName'] ?? null; $this->groupId = $values['groupId'] ?? null; $this->actions = $values['actions'] ?? null; - $this->family = $values['family'] ?? null; + $this->kind = $values['kind'] ?? null; $this->defaultValue = $values['defaultValue'] ?? null; $this->maxLength = $values['maxLength'] ?? null; $this->multiline = $values['multiline'] ?? null; diff --git a/src/Types/FormFieldPatchFamily.php b/src/Types/FormFieldPatchKind.php similarity index 88% rename from src/Types/FormFieldPatchFamily.php rename to src/Types/FormFieldPatchKind.php index 4b3d42bd..f54dde9e 100644 --- a/src/Types/FormFieldPatchFamily.php +++ b/src/Types/FormFieldPatchKind.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum FormFieldPatchFamily: string +enum FormFieldPatchKind: string { case Text = "text"; case Checkbox = "checkbox"; diff --git a/src/Types/FormFieldPushbutton.php b/src/Types/FormFieldPushbutton.php index 28f7f802..22cebaa8 100644 --- a/src/Types/FormFieldPushbutton.php +++ b/src/Types/FormFieldPushbutton.php @@ -59,16 +59,16 @@ class FormFieldPushbutton extends JsonSerializableType public ?string $mappingName; /** - * @var FormFieldPushbuttonValueEntry $valueEntry + * @var FormValueEntry $valueEntry */ #[JsonProperty('valueEntry')] - public FormFieldPushbuttonValueEntry $valueEntry; + public FormValueEntry $valueEntry; /** - * @var FormFieldPushbuttonDefaultValueEntry $defaultValueEntry + * @var FormValueEntry $defaultValueEntry */ #[JsonProperty('defaultValueEntry')] - public FormFieldPushbuttonDefaultValueEntry $defaultValueEntry; + public FormValueEntry $defaultValueEntry; /** * @var ?PdfFieldActions $actions @@ -132,8 +132,8 @@ class FormFieldPushbutton extends JsonSerializableType * readOnly: bool, * required: bool, * noExport: bool, - * valueEntry: FormFieldPushbuttonValueEntry, - * defaultValueEntry: FormFieldPushbuttonDefaultValueEntry, + * valueEntry: FormValueEntry, + * defaultValueEntry: FormValueEntry, * widgets: array, * alternateName?: ?string, * mappingName?: ?string, diff --git a/src/Types/FormFieldPushbuttonDefaultValueEntry.php b/src/Types/FormFieldPushbuttonDefaultValueEntry.php deleted file mode 100644 index c1f2dcdc..00000000 --- a/src/Types/FormFieldPushbuttonDefaultValueEntry.php +++ /dev/null @@ -1,286 +0,0 @@ -kind = $values['kind']; - $this->value = $values['value']; - } - - /** - * @param FormFieldPushbuttonDefaultValueEntryNone $none - * @return FormFieldPushbuttonDefaultValueEntry - */ - public static function none(FormFieldPushbuttonDefaultValueEntryNone $none): FormFieldPushbuttonDefaultValueEntry - { - return new FormFieldPushbuttonDefaultValueEntry([ - 'kind' => 'none', - 'value' => $none, - ]); - } - - /** - * @param FormFieldPushbuttonDefaultValueEntryScalar $scalar - * @return FormFieldPushbuttonDefaultValueEntry - */ - public static function scalar(FormFieldPushbuttonDefaultValueEntryScalar $scalar): FormFieldPushbuttonDefaultValueEntry - { - return new FormFieldPushbuttonDefaultValueEntry([ - 'kind' => 'scalar', - 'value' => $scalar, - ]); - } - - /** - * @param FormFieldPushbuttonDefaultValueEntryArray $array - * @return FormFieldPushbuttonDefaultValueEntry - */ - public static function array(FormFieldPushbuttonDefaultValueEntryArray $array): FormFieldPushbuttonDefaultValueEntry - { - return new FormFieldPushbuttonDefaultValueEntry([ - 'kind' => 'array', - 'value' => $array, - ]); - } - - /** - * @param FormFieldPushbuttonDefaultValueEntryUnsupported $unsupported - * @return FormFieldPushbuttonDefaultValueEntry - */ - public static function unsupported(FormFieldPushbuttonDefaultValueEntryUnsupported $unsupported): FormFieldPushbuttonDefaultValueEntry - { - return new FormFieldPushbuttonDefaultValueEntry([ - 'kind' => 'unsupported', - 'value' => $unsupported, - ]); - } - - /** - * @return bool - */ - public function isNone(): bool - { - return $this->value instanceof FormFieldPushbuttonDefaultValueEntryNone && $this->kind === 'none'; - } - - /** - * @return FormFieldPushbuttonDefaultValueEntryNone - */ - public function asNone(): FormFieldPushbuttonDefaultValueEntryNone - { - if (!($this->value instanceof FormFieldPushbuttonDefaultValueEntryNone && $this->kind === 'none')) { - throw new Exception( - "Expected none; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isScalar(): bool - { - return $this->value instanceof FormFieldPushbuttonDefaultValueEntryScalar && $this->kind === 'scalar'; - } - - /** - * @return FormFieldPushbuttonDefaultValueEntryScalar - */ - public function asScalar(): FormFieldPushbuttonDefaultValueEntryScalar - { - if (!($this->value instanceof FormFieldPushbuttonDefaultValueEntryScalar && $this->kind === 'scalar')) { - throw new Exception( - "Expected scalar; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isArray(): bool - { - return $this->value instanceof FormFieldPushbuttonDefaultValueEntryArray && $this->kind === 'array'; - } - - /** - * @return FormFieldPushbuttonDefaultValueEntryArray - */ - public function asArray(): FormFieldPushbuttonDefaultValueEntryArray - { - if (!($this->value instanceof FormFieldPushbuttonDefaultValueEntryArray && $this->kind === 'array')) { - throw new Exception( - "Expected array; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isUnsupported(): bool - { - return $this->value instanceof FormFieldPushbuttonDefaultValueEntryUnsupported && $this->kind === 'unsupported'; - } - - /** - * @return FormFieldPushbuttonDefaultValueEntryUnsupported - */ - public function asUnsupported(): FormFieldPushbuttonDefaultValueEntryUnsupported - { - if (!($this->value instanceof FormFieldPushbuttonDefaultValueEntryUnsupported && $this->kind === 'unsupported')) { - throw new Exception( - "Expected unsupported; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } - - /** - * @return array - */ - public function jsonSerialize(): array - { - $result = []; - $result['kind'] = $this->kind; - - $base = parent::jsonSerialize(); - $result = array_merge($base, $result); - - switch ($this->kind) { - case 'none': - $value = $this->asNone()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'scalar': - $value = $this->asScalar()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'array': - $value = $this->asArray()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'unsupported': - $value = $this->asUnsupported()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case '_unknown': - default: - if (is_null($this->value)) { - break; - } - if ($this->value instanceof JsonSerializableType) { - $value = $this->value->jsonSerialize(); - $result = array_merge($value, $result); - } elseif (is_array($this->value)) { - $result = array_merge($this->value, $result); - } - } - - return $result; - } - - /** - * @param array $data - */ - public static function jsonDeserialize(array $data): static - { - $args = []; - if (!array_key_exists('kind', $data)) { - throw new Exception( - "JSON data is missing property 'kind'", - ); - } - $kind = $data['kind']; - if (!(is_string($kind))) { - throw new Exception( - "Expected property 'kind' in JSON data to be string, instead received " . get_debug_type($data['kind']), - ); - } - - $args['kind'] = $kind; - switch ($kind) { - case 'none': - $args['value'] = FormFieldPushbuttonDefaultValueEntryNone::jsonDeserialize($data); - break; - case 'scalar': - $args['value'] = FormFieldPushbuttonDefaultValueEntryScalar::jsonDeserialize($data); - break; - case 'array': - $args['value'] = FormFieldPushbuttonDefaultValueEntryArray::jsonDeserialize($data); - break; - case 'unsupported': - $args['value'] = FormFieldPushbuttonDefaultValueEntryUnsupported::jsonDeserialize($data); - break; - case '_unknown': - default: - $args['kind'] = '_unknown'; - $args['value'] = $data; - } - - // @phpstan-ignore-next-line - return new static($args); - } -} diff --git a/src/Types/FormFieldPushbuttonDefaultValueEntryArray.php b/src/Types/FormFieldPushbuttonDefaultValueEntryArray.php deleted file mode 100644 index 5c8280cb..00000000 --- a/src/Types/FormFieldPushbuttonDefaultValueEntryArray.php +++ /dev/null @@ -1,35 +0,0 @@ - $values - */ - #[JsonProperty('values'), ArrayType(['string'])] - public array $values; - - /** - * @param array{ - * values: array, - * } $values - */ - public function __construct( - array $values, - ) { - $this->values = $values['values']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/FormFieldPushbuttonDefaultValueEntryNone.php b/src/Types/FormFieldPushbuttonDefaultValueEntryNone.php deleted file mode 100644 index 09a06f00..00000000 --- a/src/Types/FormFieldPushbuttonDefaultValueEntryNone.php +++ /dev/null @@ -1,26 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/FormFieldPushbuttonDefaultValueEntryScalar.php b/src/Types/FormFieldPushbuttonDefaultValueEntryScalar.php deleted file mode 100644 index 5713f615..00000000 --- a/src/Types/FormFieldPushbuttonDefaultValueEntryScalar.php +++ /dev/null @@ -1,34 +0,0 @@ -value = $values['value']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/FormFieldPushbuttonDefaultValueEntryUnsupported.php b/src/Types/FormFieldPushbuttonDefaultValueEntryUnsupported.php deleted file mode 100644 index e37fcdf8..00000000 --- a/src/Types/FormFieldPushbuttonDefaultValueEntryUnsupported.php +++ /dev/null @@ -1,26 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/FormFieldPushbuttonValueEntry.php b/src/Types/FormFieldPushbuttonValueEntry.php deleted file mode 100644 index 992025a1..00000000 --- a/src/Types/FormFieldPushbuttonValueEntry.php +++ /dev/null @@ -1,286 +0,0 @@ -kind = $values['kind']; - $this->value = $values['value']; - } - - /** - * @param FormFieldPushbuttonValueEntryNone $none - * @return FormFieldPushbuttonValueEntry - */ - public static function none(FormFieldPushbuttonValueEntryNone $none): FormFieldPushbuttonValueEntry - { - return new FormFieldPushbuttonValueEntry([ - 'kind' => 'none', - 'value' => $none, - ]); - } - - /** - * @param FormFieldPushbuttonValueEntryScalar $scalar - * @return FormFieldPushbuttonValueEntry - */ - public static function scalar(FormFieldPushbuttonValueEntryScalar $scalar): FormFieldPushbuttonValueEntry - { - return new FormFieldPushbuttonValueEntry([ - 'kind' => 'scalar', - 'value' => $scalar, - ]); - } - - /** - * @param FormFieldPushbuttonValueEntryArray $array - * @return FormFieldPushbuttonValueEntry - */ - public static function array(FormFieldPushbuttonValueEntryArray $array): FormFieldPushbuttonValueEntry - { - return new FormFieldPushbuttonValueEntry([ - 'kind' => 'array', - 'value' => $array, - ]); - } - - /** - * @param FormFieldPushbuttonValueEntryUnsupported $unsupported - * @return FormFieldPushbuttonValueEntry - */ - public static function unsupported(FormFieldPushbuttonValueEntryUnsupported $unsupported): FormFieldPushbuttonValueEntry - { - return new FormFieldPushbuttonValueEntry([ - 'kind' => 'unsupported', - 'value' => $unsupported, - ]); - } - - /** - * @return bool - */ - public function isNone(): bool - { - return $this->value instanceof FormFieldPushbuttonValueEntryNone && $this->kind === 'none'; - } - - /** - * @return FormFieldPushbuttonValueEntryNone - */ - public function asNone(): FormFieldPushbuttonValueEntryNone - { - if (!($this->value instanceof FormFieldPushbuttonValueEntryNone && $this->kind === 'none')) { - throw new Exception( - "Expected none; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isScalar(): bool - { - return $this->value instanceof FormFieldPushbuttonValueEntryScalar && $this->kind === 'scalar'; - } - - /** - * @return FormFieldPushbuttonValueEntryScalar - */ - public function asScalar(): FormFieldPushbuttonValueEntryScalar - { - if (!($this->value instanceof FormFieldPushbuttonValueEntryScalar && $this->kind === 'scalar')) { - throw new Exception( - "Expected scalar; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isArray(): bool - { - return $this->value instanceof FormFieldPushbuttonValueEntryArray && $this->kind === 'array'; - } - - /** - * @return FormFieldPushbuttonValueEntryArray - */ - public function asArray(): FormFieldPushbuttonValueEntryArray - { - if (!($this->value instanceof FormFieldPushbuttonValueEntryArray && $this->kind === 'array')) { - throw new Exception( - "Expected array; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isUnsupported(): bool - { - return $this->value instanceof FormFieldPushbuttonValueEntryUnsupported && $this->kind === 'unsupported'; - } - - /** - * @return FormFieldPushbuttonValueEntryUnsupported - */ - public function asUnsupported(): FormFieldPushbuttonValueEntryUnsupported - { - if (!($this->value instanceof FormFieldPushbuttonValueEntryUnsupported && $this->kind === 'unsupported')) { - throw new Exception( - "Expected unsupported; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } - - /** - * @return array - */ - public function jsonSerialize(): array - { - $result = []; - $result['kind'] = $this->kind; - - $base = parent::jsonSerialize(); - $result = array_merge($base, $result); - - switch ($this->kind) { - case 'none': - $value = $this->asNone()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'scalar': - $value = $this->asScalar()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'array': - $value = $this->asArray()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'unsupported': - $value = $this->asUnsupported()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case '_unknown': - default: - if (is_null($this->value)) { - break; - } - if ($this->value instanceof JsonSerializableType) { - $value = $this->value->jsonSerialize(); - $result = array_merge($value, $result); - } elseif (is_array($this->value)) { - $result = array_merge($this->value, $result); - } - } - - return $result; - } - - /** - * @param array $data - */ - public static function jsonDeserialize(array $data): static - { - $args = []; - if (!array_key_exists('kind', $data)) { - throw new Exception( - "JSON data is missing property 'kind'", - ); - } - $kind = $data['kind']; - if (!(is_string($kind))) { - throw new Exception( - "Expected property 'kind' in JSON data to be string, instead received " . get_debug_type($data['kind']), - ); - } - - $args['kind'] = $kind; - switch ($kind) { - case 'none': - $args['value'] = FormFieldPushbuttonValueEntryNone::jsonDeserialize($data); - break; - case 'scalar': - $args['value'] = FormFieldPushbuttonValueEntryScalar::jsonDeserialize($data); - break; - case 'array': - $args['value'] = FormFieldPushbuttonValueEntryArray::jsonDeserialize($data); - break; - case 'unsupported': - $args['value'] = FormFieldPushbuttonValueEntryUnsupported::jsonDeserialize($data); - break; - case '_unknown': - default: - $args['kind'] = '_unknown'; - $args['value'] = $data; - } - - // @phpstan-ignore-next-line - return new static($args); - } -} diff --git a/src/Types/FormFieldPushbuttonValueEntryArray.php b/src/Types/FormFieldPushbuttonValueEntryArray.php deleted file mode 100644 index 05951c4a..00000000 --- a/src/Types/FormFieldPushbuttonValueEntryArray.php +++ /dev/null @@ -1,35 +0,0 @@ - $values - */ - #[JsonProperty('values'), ArrayType(['string'])] - public array $values; - - /** - * @param array{ - * values: array, - * } $values - */ - public function __construct( - array $values, - ) { - $this->values = $values['values']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/FormFieldPushbuttonValueEntryNone.php b/src/Types/FormFieldPushbuttonValueEntryNone.php deleted file mode 100644 index 6d5433a3..00000000 --- a/src/Types/FormFieldPushbuttonValueEntryNone.php +++ /dev/null @@ -1,26 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/FormFieldPushbuttonValueEntryScalar.php b/src/Types/FormFieldPushbuttonValueEntryScalar.php deleted file mode 100644 index 9aa654c0..00000000 --- a/src/Types/FormFieldPushbuttonValueEntryScalar.php +++ /dev/null @@ -1,34 +0,0 @@ -value = $values['value']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/FormFieldPushbuttonValueEntryUnsupported.php b/src/Types/FormFieldPushbuttonValueEntryUnsupported.php deleted file mode 100644 index 8e2c71d2..00000000 --- a/src/Types/FormFieldPushbuttonValueEntryUnsupported.php +++ /dev/null @@ -1,26 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/FormFieldRadio.php b/src/Types/FormFieldRadio.php index 617e1720..bde09925 100644 --- a/src/Types/FormFieldRadio.php +++ b/src/Types/FormFieldRadio.php @@ -59,16 +59,16 @@ class FormFieldRadio extends JsonSerializableType public ?string $mappingName; /** - * @var FormFieldRadioValueEntry $valueEntry + * @var FormValueEntry $valueEntry */ #[JsonProperty('valueEntry')] - public FormFieldRadioValueEntry $valueEntry; + public FormValueEntry $valueEntry; /** - * @var FormFieldRadioDefaultValueEntry $defaultValueEntry + * @var FormValueEntry $defaultValueEntry */ #[JsonProperty('defaultValueEntry')] - public FormFieldRadioDefaultValueEntry $defaultValueEntry; + public FormValueEntry $defaultValueEntry; /** * @var ?PdfFieldActions $actions @@ -150,8 +150,8 @@ class FormFieldRadio extends JsonSerializableType * readOnly: bool, * required: bool, * noExport: bool, - * valueEntry: FormFieldRadioValueEntry, - * defaultValueEntry: FormFieldRadioDefaultValueEntry, + * valueEntry: FormValueEntry, + * defaultValueEntry: FormValueEntry, * widgets: array, * value: string, * radiosInUnison: bool, diff --git a/src/Types/FormFieldRadioDefaultValueEntry.php b/src/Types/FormFieldRadioDefaultValueEntry.php deleted file mode 100644 index 36d91315..00000000 --- a/src/Types/FormFieldRadioDefaultValueEntry.php +++ /dev/null @@ -1,286 +0,0 @@ -kind = $values['kind']; - $this->value = $values['value']; - } - - /** - * @param FormFieldRadioDefaultValueEntryNone $none - * @return FormFieldRadioDefaultValueEntry - */ - public static function none(FormFieldRadioDefaultValueEntryNone $none): FormFieldRadioDefaultValueEntry - { - return new FormFieldRadioDefaultValueEntry([ - 'kind' => 'none', - 'value' => $none, - ]); - } - - /** - * @param FormFieldRadioDefaultValueEntryScalar $scalar - * @return FormFieldRadioDefaultValueEntry - */ - public static function scalar(FormFieldRadioDefaultValueEntryScalar $scalar): FormFieldRadioDefaultValueEntry - { - return new FormFieldRadioDefaultValueEntry([ - 'kind' => 'scalar', - 'value' => $scalar, - ]); - } - - /** - * @param FormFieldRadioDefaultValueEntryArray $array - * @return FormFieldRadioDefaultValueEntry - */ - public static function array(FormFieldRadioDefaultValueEntryArray $array): FormFieldRadioDefaultValueEntry - { - return new FormFieldRadioDefaultValueEntry([ - 'kind' => 'array', - 'value' => $array, - ]); - } - - /** - * @param FormFieldRadioDefaultValueEntryUnsupported $unsupported - * @return FormFieldRadioDefaultValueEntry - */ - public static function unsupported(FormFieldRadioDefaultValueEntryUnsupported $unsupported): FormFieldRadioDefaultValueEntry - { - return new FormFieldRadioDefaultValueEntry([ - 'kind' => 'unsupported', - 'value' => $unsupported, - ]); - } - - /** - * @return bool - */ - public function isNone(): bool - { - return $this->value instanceof FormFieldRadioDefaultValueEntryNone && $this->kind === 'none'; - } - - /** - * @return FormFieldRadioDefaultValueEntryNone - */ - public function asNone(): FormFieldRadioDefaultValueEntryNone - { - if (!($this->value instanceof FormFieldRadioDefaultValueEntryNone && $this->kind === 'none')) { - throw new Exception( - "Expected none; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isScalar(): bool - { - return $this->value instanceof FormFieldRadioDefaultValueEntryScalar && $this->kind === 'scalar'; - } - - /** - * @return FormFieldRadioDefaultValueEntryScalar - */ - public function asScalar(): FormFieldRadioDefaultValueEntryScalar - { - if (!($this->value instanceof FormFieldRadioDefaultValueEntryScalar && $this->kind === 'scalar')) { - throw new Exception( - "Expected scalar; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isArray(): bool - { - return $this->value instanceof FormFieldRadioDefaultValueEntryArray && $this->kind === 'array'; - } - - /** - * @return FormFieldRadioDefaultValueEntryArray - */ - public function asArray(): FormFieldRadioDefaultValueEntryArray - { - if (!($this->value instanceof FormFieldRadioDefaultValueEntryArray && $this->kind === 'array')) { - throw new Exception( - "Expected array; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isUnsupported(): bool - { - return $this->value instanceof FormFieldRadioDefaultValueEntryUnsupported && $this->kind === 'unsupported'; - } - - /** - * @return FormFieldRadioDefaultValueEntryUnsupported - */ - public function asUnsupported(): FormFieldRadioDefaultValueEntryUnsupported - { - if (!($this->value instanceof FormFieldRadioDefaultValueEntryUnsupported && $this->kind === 'unsupported')) { - throw new Exception( - "Expected unsupported; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } - - /** - * @return array - */ - public function jsonSerialize(): array - { - $result = []; - $result['kind'] = $this->kind; - - $base = parent::jsonSerialize(); - $result = array_merge($base, $result); - - switch ($this->kind) { - case 'none': - $value = $this->asNone()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'scalar': - $value = $this->asScalar()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'array': - $value = $this->asArray()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'unsupported': - $value = $this->asUnsupported()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case '_unknown': - default: - if (is_null($this->value)) { - break; - } - if ($this->value instanceof JsonSerializableType) { - $value = $this->value->jsonSerialize(); - $result = array_merge($value, $result); - } elseif (is_array($this->value)) { - $result = array_merge($this->value, $result); - } - } - - return $result; - } - - /** - * @param array $data - */ - public static function jsonDeserialize(array $data): static - { - $args = []; - if (!array_key_exists('kind', $data)) { - throw new Exception( - "JSON data is missing property 'kind'", - ); - } - $kind = $data['kind']; - if (!(is_string($kind))) { - throw new Exception( - "Expected property 'kind' in JSON data to be string, instead received " . get_debug_type($data['kind']), - ); - } - - $args['kind'] = $kind; - switch ($kind) { - case 'none': - $args['value'] = FormFieldRadioDefaultValueEntryNone::jsonDeserialize($data); - break; - case 'scalar': - $args['value'] = FormFieldRadioDefaultValueEntryScalar::jsonDeserialize($data); - break; - case 'array': - $args['value'] = FormFieldRadioDefaultValueEntryArray::jsonDeserialize($data); - break; - case 'unsupported': - $args['value'] = FormFieldRadioDefaultValueEntryUnsupported::jsonDeserialize($data); - break; - case '_unknown': - default: - $args['kind'] = '_unknown'; - $args['value'] = $data; - } - - // @phpstan-ignore-next-line - return new static($args); - } -} diff --git a/src/Types/FormFieldRadioDefaultValueEntryArray.php b/src/Types/FormFieldRadioDefaultValueEntryArray.php deleted file mode 100644 index 5c32f730..00000000 --- a/src/Types/FormFieldRadioDefaultValueEntryArray.php +++ /dev/null @@ -1,35 +0,0 @@ - $values - */ - #[JsonProperty('values'), ArrayType(['string'])] - public array $values; - - /** - * @param array{ - * values: array, - * } $values - */ - public function __construct( - array $values, - ) { - $this->values = $values['values']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/FormFieldRadioDefaultValueEntryNone.php b/src/Types/FormFieldRadioDefaultValueEntryNone.php deleted file mode 100644 index dd183b43..00000000 --- a/src/Types/FormFieldRadioDefaultValueEntryNone.php +++ /dev/null @@ -1,26 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/FormFieldRadioDefaultValueEntryScalar.php b/src/Types/FormFieldRadioDefaultValueEntryScalar.php deleted file mode 100644 index 5e654de4..00000000 --- a/src/Types/FormFieldRadioDefaultValueEntryScalar.php +++ /dev/null @@ -1,34 +0,0 @@ -value = $values['value']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/FormFieldRadioDefaultValueEntryUnsupported.php b/src/Types/FormFieldRadioDefaultValueEntryUnsupported.php deleted file mode 100644 index 64047bf5..00000000 --- a/src/Types/FormFieldRadioDefaultValueEntryUnsupported.php +++ /dev/null @@ -1,26 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/FormFieldRadioValueEntry.php b/src/Types/FormFieldRadioValueEntry.php deleted file mode 100644 index f1149e5c..00000000 --- a/src/Types/FormFieldRadioValueEntry.php +++ /dev/null @@ -1,286 +0,0 @@ -kind = $values['kind']; - $this->value = $values['value']; - } - - /** - * @param FormFieldRadioValueEntryNone $none - * @return FormFieldRadioValueEntry - */ - public static function none(FormFieldRadioValueEntryNone $none): FormFieldRadioValueEntry - { - return new FormFieldRadioValueEntry([ - 'kind' => 'none', - 'value' => $none, - ]); - } - - /** - * @param FormFieldRadioValueEntryScalar $scalar - * @return FormFieldRadioValueEntry - */ - public static function scalar(FormFieldRadioValueEntryScalar $scalar): FormFieldRadioValueEntry - { - return new FormFieldRadioValueEntry([ - 'kind' => 'scalar', - 'value' => $scalar, - ]); - } - - /** - * @param FormFieldRadioValueEntryArray $array - * @return FormFieldRadioValueEntry - */ - public static function array(FormFieldRadioValueEntryArray $array): FormFieldRadioValueEntry - { - return new FormFieldRadioValueEntry([ - 'kind' => 'array', - 'value' => $array, - ]); - } - - /** - * @param FormFieldRadioValueEntryUnsupported $unsupported - * @return FormFieldRadioValueEntry - */ - public static function unsupported(FormFieldRadioValueEntryUnsupported $unsupported): FormFieldRadioValueEntry - { - return new FormFieldRadioValueEntry([ - 'kind' => 'unsupported', - 'value' => $unsupported, - ]); - } - - /** - * @return bool - */ - public function isNone(): bool - { - return $this->value instanceof FormFieldRadioValueEntryNone && $this->kind === 'none'; - } - - /** - * @return FormFieldRadioValueEntryNone - */ - public function asNone(): FormFieldRadioValueEntryNone - { - if (!($this->value instanceof FormFieldRadioValueEntryNone && $this->kind === 'none')) { - throw new Exception( - "Expected none; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isScalar(): bool - { - return $this->value instanceof FormFieldRadioValueEntryScalar && $this->kind === 'scalar'; - } - - /** - * @return FormFieldRadioValueEntryScalar - */ - public function asScalar(): FormFieldRadioValueEntryScalar - { - if (!($this->value instanceof FormFieldRadioValueEntryScalar && $this->kind === 'scalar')) { - throw new Exception( - "Expected scalar; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isArray(): bool - { - return $this->value instanceof FormFieldRadioValueEntryArray && $this->kind === 'array'; - } - - /** - * @return FormFieldRadioValueEntryArray - */ - public function asArray(): FormFieldRadioValueEntryArray - { - if (!($this->value instanceof FormFieldRadioValueEntryArray && $this->kind === 'array')) { - throw new Exception( - "Expected array; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isUnsupported(): bool - { - return $this->value instanceof FormFieldRadioValueEntryUnsupported && $this->kind === 'unsupported'; - } - - /** - * @return FormFieldRadioValueEntryUnsupported - */ - public function asUnsupported(): FormFieldRadioValueEntryUnsupported - { - if (!($this->value instanceof FormFieldRadioValueEntryUnsupported && $this->kind === 'unsupported')) { - throw new Exception( - "Expected unsupported; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } - - /** - * @return array - */ - public function jsonSerialize(): array - { - $result = []; - $result['kind'] = $this->kind; - - $base = parent::jsonSerialize(); - $result = array_merge($base, $result); - - switch ($this->kind) { - case 'none': - $value = $this->asNone()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'scalar': - $value = $this->asScalar()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'array': - $value = $this->asArray()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'unsupported': - $value = $this->asUnsupported()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case '_unknown': - default: - if (is_null($this->value)) { - break; - } - if ($this->value instanceof JsonSerializableType) { - $value = $this->value->jsonSerialize(); - $result = array_merge($value, $result); - } elseif (is_array($this->value)) { - $result = array_merge($this->value, $result); - } - } - - return $result; - } - - /** - * @param array $data - */ - public static function jsonDeserialize(array $data): static - { - $args = []; - if (!array_key_exists('kind', $data)) { - throw new Exception( - "JSON data is missing property 'kind'", - ); - } - $kind = $data['kind']; - if (!(is_string($kind))) { - throw new Exception( - "Expected property 'kind' in JSON data to be string, instead received " . get_debug_type($data['kind']), - ); - } - - $args['kind'] = $kind; - switch ($kind) { - case 'none': - $args['value'] = FormFieldRadioValueEntryNone::jsonDeserialize($data); - break; - case 'scalar': - $args['value'] = FormFieldRadioValueEntryScalar::jsonDeserialize($data); - break; - case 'array': - $args['value'] = FormFieldRadioValueEntryArray::jsonDeserialize($data); - break; - case 'unsupported': - $args['value'] = FormFieldRadioValueEntryUnsupported::jsonDeserialize($data); - break; - case '_unknown': - default: - $args['kind'] = '_unknown'; - $args['value'] = $data; - } - - // @phpstan-ignore-next-line - return new static($args); - } -} diff --git a/src/Types/FormFieldRadioValueEntryArray.php b/src/Types/FormFieldRadioValueEntryArray.php deleted file mode 100644 index 8511158c..00000000 --- a/src/Types/FormFieldRadioValueEntryArray.php +++ /dev/null @@ -1,35 +0,0 @@ - $values - */ - #[JsonProperty('values'), ArrayType(['string'])] - public array $values; - - /** - * @param array{ - * values: array, - * } $values - */ - public function __construct( - array $values, - ) { - $this->values = $values['values']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/FormFieldRadioValueEntryScalar.php b/src/Types/FormFieldRadioValueEntryScalar.php deleted file mode 100644 index 50b3e184..00000000 --- a/src/Types/FormFieldRadioValueEntryScalar.php +++ /dev/null @@ -1,34 +0,0 @@ -value = $values['value']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/FormFieldRadioValueEntryUnsupported.php b/src/Types/FormFieldRadioValueEntryUnsupported.php deleted file mode 100644 index b198320d..00000000 --- a/src/Types/FormFieldRadioValueEntryUnsupported.php +++ /dev/null @@ -1,26 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/FormFieldSignature.php b/src/Types/FormFieldSignature.php index 9327e603..9e0c2f1b 100644 --- a/src/Types/FormFieldSignature.php +++ b/src/Types/FormFieldSignature.php @@ -59,16 +59,16 @@ class FormFieldSignature extends JsonSerializableType public ?string $mappingName; /** - * @var FormFieldSignatureValueEntry $valueEntry + * @var FormValueEntry $valueEntry */ #[JsonProperty('valueEntry')] - public FormFieldSignatureValueEntry $valueEntry; + public FormValueEntry $valueEntry; /** - * @var FormFieldSignatureDefaultValueEntry $defaultValueEntry + * @var FormValueEntry $defaultValueEntry */ #[JsonProperty('defaultValueEntry')] - public FormFieldSignatureDefaultValueEntry $defaultValueEntry; + public FormValueEntry $defaultValueEntry; /** * @var ?PdfFieldActions $actions @@ -132,8 +132,8 @@ class FormFieldSignature extends JsonSerializableType * readOnly: bool, * required: bool, * noExport: bool, - * valueEntry: FormFieldSignatureValueEntry, - * defaultValueEntry: FormFieldSignatureDefaultValueEntry, + * valueEntry: FormValueEntry, + * defaultValueEntry: FormValueEntry, * widgets: array, * alternateName?: ?string, * mappingName?: ?string, diff --git a/src/Types/FormFieldSignatureDefaultValueEntry.php b/src/Types/FormFieldSignatureDefaultValueEntry.php deleted file mode 100644 index 9e93337c..00000000 --- a/src/Types/FormFieldSignatureDefaultValueEntry.php +++ /dev/null @@ -1,286 +0,0 @@ -kind = $values['kind']; - $this->value = $values['value']; - } - - /** - * @param FormFieldSignatureDefaultValueEntryNone $none - * @return FormFieldSignatureDefaultValueEntry - */ - public static function none(FormFieldSignatureDefaultValueEntryNone $none): FormFieldSignatureDefaultValueEntry - { - return new FormFieldSignatureDefaultValueEntry([ - 'kind' => 'none', - 'value' => $none, - ]); - } - - /** - * @param FormFieldSignatureDefaultValueEntryScalar $scalar - * @return FormFieldSignatureDefaultValueEntry - */ - public static function scalar(FormFieldSignatureDefaultValueEntryScalar $scalar): FormFieldSignatureDefaultValueEntry - { - return new FormFieldSignatureDefaultValueEntry([ - 'kind' => 'scalar', - 'value' => $scalar, - ]); - } - - /** - * @param FormFieldSignatureDefaultValueEntryArray $array - * @return FormFieldSignatureDefaultValueEntry - */ - public static function array(FormFieldSignatureDefaultValueEntryArray $array): FormFieldSignatureDefaultValueEntry - { - return new FormFieldSignatureDefaultValueEntry([ - 'kind' => 'array', - 'value' => $array, - ]); - } - - /** - * @param FormFieldSignatureDefaultValueEntryUnsupported $unsupported - * @return FormFieldSignatureDefaultValueEntry - */ - public static function unsupported(FormFieldSignatureDefaultValueEntryUnsupported $unsupported): FormFieldSignatureDefaultValueEntry - { - return new FormFieldSignatureDefaultValueEntry([ - 'kind' => 'unsupported', - 'value' => $unsupported, - ]); - } - - /** - * @return bool - */ - public function isNone(): bool - { - return $this->value instanceof FormFieldSignatureDefaultValueEntryNone && $this->kind === 'none'; - } - - /** - * @return FormFieldSignatureDefaultValueEntryNone - */ - public function asNone(): FormFieldSignatureDefaultValueEntryNone - { - if (!($this->value instanceof FormFieldSignatureDefaultValueEntryNone && $this->kind === 'none')) { - throw new Exception( - "Expected none; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isScalar(): bool - { - return $this->value instanceof FormFieldSignatureDefaultValueEntryScalar && $this->kind === 'scalar'; - } - - /** - * @return FormFieldSignatureDefaultValueEntryScalar - */ - public function asScalar(): FormFieldSignatureDefaultValueEntryScalar - { - if (!($this->value instanceof FormFieldSignatureDefaultValueEntryScalar && $this->kind === 'scalar')) { - throw new Exception( - "Expected scalar; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isArray(): bool - { - return $this->value instanceof FormFieldSignatureDefaultValueEntryArray && $this->kind === 'array'; - } - - /** - * @return FormFieldSignatureDefaultValueEntryArray - */ - public function asArray(): FormFieldSignatureDefaultValueEntryArray - { - if (!($this->value instanceof FormFieldSignatureDefaultValueEntryArray && $this->kind === 'array')) { - throw new Exception( - "Expected array; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isUnsupported(): bool - { - return $this->value instanceof FormFieldSignatureDefaultValueEntryUnsupported && $this->kind === 'unsupported'; - } - - /** - * @return FormFieldSignatureDefaultValueEntryUnsupported - */ - public function asUnsupported(): FormFieldSignatureDefaultValueEntryUnsupported - { - if (!($this->value instanceof FormFieldSignatureDefaultValueEntryUnsupported && $this->kind === 'unsupported')) { - throw new Exception( - "Expected unsupported; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } - - /** - * @return array - */ - public function jsonSerialize(): array - { - $result = []; - $result['kind'] = $this->kind; - - $base = parent::jsonSerialize(); - $result = array_merge($base, $result); - - switch ($this->kind) { - case 'none': - $value = $this->asNone()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'scalar': - $value = $this->asScalar()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'array': - $value = $this->asArray()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'unsupported': - $value = $this->asUnsupported()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case '_unknown': - default: - if (is_null($this->value)) { - break; - } - if ($this->value instanceof JsonSerializableType) { - $value = $this->value->jsonSerialize(); - $result = array_merge($value, $result); - } elseif (is_array($this->value)) { - $result = array_merge($this->value, $result); - } - } - - return $result; - } - - /** - * @param array $data - */ - public static function jsonDeserialize(array $data): static - { - $args = []; - if (!array_key_exists('kind', $data)) { - throw new Exception( - "JSON data is missing property 'kind'", - ); - } - $kind = $data['kind']; - if (!(is_string($kind))) { - throw new Exception( - "Expected property 'kind' in JSON data to be string, instead received " . get_debug_type($data['kind']), - ); - } - - $args['kind'] = $kind; - switch ($kind) { - case 'none': - $args['value'] = FormFieldSignatureDefaultValueEntryNone::jsonDeserialize($data); - break; - case 'scalar': - $args['value'] = FormFieldSignatureDefaultValueEntryScalar::jsonDeserialize($data); - break; - case 'array': - $args['value'] = FormFieldSignatureDefaultValueEntryArray::jsonDeserialize($data); - break; - case 'unsupported': - $args['value'] = FormFieldSignatureDefaultValueEntryUnsupported::jsonDeserialize($data); - break; - case '_unknown': - default: - $args['kind'] = '_unknown'; - $args['value'] = $data; - } - - // @phpstan-ignore-next-line - return new static($args); - } -} diff --git a/src/Types/FormFieldSignatureDefaultValueEntryArray.php b/src/Types/FormFieldSignatureDefaultValueEntryArray.php deleted file mode 100644 index e41d8c5c..00000000 --- a/src/Types/FormFieldSignatureDefaultValueEntryArray.php +++ /dev/null @@ -1,35 +0,0 @@ - $values - */ - #[JsonProperty('values'), ArrayType(['string'])] - public array $values; - - /** - * @param array{ - * values: array, - * } $values - */ - public function __construct( - array $values, - ) { - $this->values = $values['values']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/FormFieldSignatureDefaultValueEntryNone.php b/src/Types/FormFieldSignatureDefaultValueEntryNone.php deleted file mode 100644 index 6cdd77a1..00000000 --- a/src/Types/FormFieldSignatureDefaultValueEntryNone.php +++ /dev/null @@ -1,26 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/FormFieldSignatureDefaultValueEntryScalar.php b/src/Types/FormFieldSignatureDefaultValueEntryScalar.php deleted file mode 100644 index 27f2c94a..00000000 --- a/src/Types/FormFieldSignatureDefaultValueEntryScalar.php +++ /dev/null @@ -1,34 +0,0 @@ -value = $values['value']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/FormFieldSignatureDefaultValueEntryUnsupported.php b/src/Types/FormFieldSignatureDefaultValueEntryUnsupported.php deleted file mode 100644 index 12088521..00000000 --- a/src/Types/FormFieldSignatureDefaultValueEntryUnsupported.php +++ /dev/null @@ -1,26 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/FormFieldSignatureValueEntry.php b/src/Types/FormFieldSignatureValueEntry.php deleted file mode 100644 index a8b9673b..00000000 --- a/src/Types/FormFieldSignatureValueEntry.php +++ /dev/null @@ -1,286 +0,0 @@ -kind = $values['kind']; - $this->value = $values['value']; - } - - /** - * @param FormFieldSignatureValueEntryNone $none - * @return FormFieldSignatureValueEntry - */ - public static function none(FormFieldSignatureValueEntryNone $none): FormFieldSignatureValueEntry - { - return new FormFieldSignatureValueEntry([ - 'kind' => 'none', - 'value' => $none, - ]); - } - - /** - * @param FormFieldSignatureValueEntryScalar $scalar - * @return FormFieldSignatureValueEntry - */ - public static function scalar(FormFieldSignatureValueEntryScalar $scalar): FormFieldSignatureValueEntry - { - return new FormFieldSignatureValueEntry([ - 'kind' => 'scalar', - 'value' => $scalar, - ]); - } - - /** - * @param FormFieldSignatureValueEntryArray $array - * @return FormFieldSignatureValueEntry - */ - public static function array(FormFieldSignatureValueEntryArray $array): FormFieldSignatureValueEntry - { - return new FormFieldSignatureValueEntry([ - 'kind' => 'array', - 'value' => $array, - ]); - } - - /** - * @param FormFieldSignatureValueEntryUnsupported $unsupported - * @return FormFieldSignatureValueEntry - */ - public static function unsupported(FormFieldSignatureValueEntryUnsupported $unsupported): FormFieldSignatureValueEntry - { - return new FormFieldSignatureValueEntry([ - 'kind' => 'unsupported', - 'value' => $unsupported, - ]); - } - - /** - * @return bool - */ - public function isNone(): bool - { - return $this->value instanceof FormFieldSignatureValueEntryNone && $this->kind === 'none'; - } - - /** - * @return FormFieldSignatureValueEntryNone - */ - public function asNone(): FormFieldSignatureValueEntryNone - { - if (!($this->value instanceof FormFieldSignatureValueEntryNone && $this->kind === 'none')) { - throw new Exception( - "Expected none; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isScalar(): bool - { - return $this->value instanceof FormFieldSignatureValueEntryScalar && $this->kind === 'scalar'; - } - - /** - * @return FormFieldSignatureValueEntryScalar - */ - public function asScalar(): FormFieldSignatureValueEntryScalar - { - if (!($this->value instanceof FormFieldSignatureValueEntryScalar && $this->kind === 'scalar')) { - throw new Exception( - "Expected scalar; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isArray(): bool - { - return $this->value instanceof FormFieldSignatureValueEntryArray && $this->kind === 'array'; - } - - /** - * @return FormFieldSignatureValueEntryArray - */ - public function asArray(): FormFieldSignatureValueEntryArray - { - if (!($this->value instanceof FormFieldSignatureValueEntryArray && $this->kind === 'array')) { - throw new Exception( - "Expected array; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isUnsupported(): bool - { - return $this->value instanceof FormFieldSignatureValueEntryUnsupported && $this->kind === 'unsupported'; - } - - /** - * @return FormFieldSignatureValueEntryUnsupported - */ - public function asUnsupported(): FormFieldSignatureValueEntryUnsupported - { - if (!($this->value instanceof FormFieldSignatureValueEntryUnsupported && $this->kind === 'unsupported')) { - throw new Exception( - "Expected unsupported; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } - - /** - * @return array - */ - public function jsonSerialize(): array - { - $result = []; - $result['kind'] = $this->kind; - - $base = parent::jsonSerialize(); - $result = array_merge($base, $result); - - switch ($this->kind) { - case 'none': - $value = $this->asNone()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'scalar': - $value = $this->asScalar()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'array': - $value = $this->asArray()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'unsupported': - $value = $this->asUnsupported()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case '_unknown': - default: - if (is_null($this->value)) { - break; - } - if ($this->value instanceof JsonSerializableType) { - $value = $this->value->jsonSerialize(); - $result = array_merge($value, $result); - } elseif (is_array($this->value)) { - $result = array_merge($this->value, $result); - } - } - - return $result; - } - - /** - * @param array $data - */ - public static function jsonDeserialize(array $data): static - { - $args = []; - if (!array_key_exists('kind', $data)) { - throw new Exception( - "JSON data is missing property 'kind'", - ); - } - $kind = $data['kind']; - if (!(is_string($kind))) { - throw new Exception( - "Expected property 'kind' in JSON data to be string, instead received " . get_debug_type($data['kind']), - ); - } - - $args['kind'] = $kind; - switch ($kind) { - case 'none': - $args['value'] = FormFieldSignatureValueEntryNone::jsonDeserialize($data); - break; - case 'scalar': - $args['value'] = FormFieldSignatureValueEntryScalar::jsonDeserialize($data); - break; - case 'array': - $args['value'] = FormFieldSignatureValueEntryArray::jsonDeserialize($data); - break; - case 'unsupported': - $args['value'] = FormFieldSignatureValueEntryUnsupported::jsonDeserialize($data); - break; - case '_unknown': - default: - $args['kind'] = '_unknown'; - $args['value'] = $data; - } - - // @phpstan-ignore-next-line - return new static($args); - } -} diff --git a/src/Types/FormFieldSignatureValueEntryArray.php b/src/Types/FormFieldSignatureValueEntryArray.php deleted file mode 100644 index b5267e64..00000000 --- a/src/Types/FormFieldSignatureValueEntryArray.php +++ /dev/null @@ -1,35 +0,0 @@ - $values - */ - #[JsonProperty('values'), ArrayType(['string'])] - public array $values; - - /** - * @param array{ - * values: array, - * } $values - */ - public function __construct( - array $values, - ) { - $this->values = $values['values']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/FormFieldSignatureValueEntryNone.php b/src/Types/FormFieldSignatureValueEntryNone.php deleted file mode 100644 index 64002749..00000000 --- a/src/Types/FormFieldSignatureValueEntryNone.php +++ /dev/null @@ -1,26 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/FormFieldSignatureValueEntryScalar.php b/src/Types/FormFieldSignatureValueEntryScalar.php deleted file mode 100644 index e530b81a..00000000 --- a/src/Types/FormFieldSignatureValueEntryScalar.php +++ /dev/null @@ -1,34 +0,0 @@ -value = $values['value']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/FormFieldSignatureValueEntryUnsupported.php b/src/Types/FormFieldSignatureValueEntryUnsupported.php deleted file mode 100644 index 3f2a8c70..00000000 --- a/src/Types/FormFieldSignatureValueEntryUnsupported.php +++ /dev/null @@ -1,26 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/FormFieldText.php b/src/Types/FormFieldText.php index 089306e0..b935749c 100644 --- a/src/Types/FormFieldText.php +++ b/src/Types/FormFieldText.php @@ -59,16 +59,16 @@ class FormFieldText extends JsonSerializableType public ?string $mappingName; /** - * @var FormFieldTextValueEntry $valueEntry + * @var FormValueEntry $valueEntry */ #[JsonProperty('valueEntry')] - public FormFieldTextValueEntry $valueEntry; + public FormValueEntry $valueEntry; /** - * @var FormFieldTextDefaultValueEntry $defaultValueEntry + * @var FormValueEntry $defaultValueEntry */ #[JsonProperty('defaultValueEntry')] - public FormFieldTextDefaultValueEntry $defaultValueEntry; + public FormValueEntry $defaultValueEntry; /** * @var ?PdfFieldActions $actions @@ -168,8 +168,8 @@ class FormFieldText extends JsonSerializableType * readOnly: bool, * required: bool, * noExport: bool, - * valueEntry: FormFieldTextValueEntry, - * defaultValueEntry: FormFieldTextDefaultValueEntry, + * valueEntry: FormValueEntry, + * defaultValueEntry: FormValueEntry, * widgets: array, * value: string, * defaultValue: string, diff --git a/src/Types/FormFieldTextDefaultValueEntry.php b/src/Types/FormFieldTextDefaultValueEntry.php deleted file mode 100644 index 6fca464f..00000000 --- a/src/Types/FormFieldTextDefaultValueEntry.php +++ /dev/null @@ -1,286 +0,0 @@ -kind = $values['kind']; - $this->value = $values['value']; - } - - /** - * @param FormFieldTextDefaultValueEntryNone $none - * @return FormFieldTextDefaultValueEntry - */ - public static function none(FormFieldTextDefaultValueEntryNone $none): FormFieldTextDefaultValueEntry - { - return new FormFieldTextDefaultValueEntry([ - 'kind' => 'none', - 'value' => $none, - ]); - } - - /** - * @param FormFieldTextDefaultValueEntryScalar $scalar - * @return FormFieldTextDefaultValueEntry - */ - public static function scalar(FormFieldTextDefaultValueEntryScalar $scalar): FormFieldTextDefaultValueEntry - { - return new FormFieldTextDefaultValueEntry([ - 'kind' => 'scalar', - 'value' => $scalar, - ]); - } - - /** - * @param FormFieldTextDefaultValueEntryArray $array - * @return FormFieldTextDefaultValueEntry - */ - public static function array(FormFieldTextDefaultValueEntryArray $array): FormFieldTextDefaultValueEntry - { - return new FormFieldTextDefaultValueEntry([ - 'kind' => 'array', - 'value' => $array, - ]); - } - - /** - * @param FormFieldTextDefaultValueEntryUnsupported $unsupported - * @return FormFieldTextDefaultValueEntry - */ - public static function unsupported(FormFieldTextDefaultValueEntryUnsupported $unsupported): FormFieldTextDefaultValueEntry - { - return new FormFieldTextDefaultValueEntry([ - 'kind' => 'unsupported', - 'value' => $unsupported, - ]); - } - - /** - * @return bool - */ - public function isNone(): bool - { - return $this->value instanceof FormFieldTextDefaultValueEntryNone && $this->kind === 'none'; - } - - /** - * @return FormFieldTextDefaultValueEntryNone - */ - public function asNone(): FormFieldTextDefaultValueEntryNone - { - if (!($this->value instanceof FormFieldTextDefaultValueEntryNone && $this->kind === 'none')) { - throw new Exception( - "Expected none; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isScalar(): bool - { - return $this->value instanceof FormFieldTextDefaultValueEntryScalar && $this->kind === 'scalar'; - } - - /** - * @return FormFieldTextDefaultValueEntryScalar - */ - public function asScalar(): FormFieldTextDefaultValueEntryScalar - { - if (!($this->value instanceof FormFieldTextDefaultValueEntryScalar && $this->kind === 'scalar')) { - throw new Exception( - "Expected scalar; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isArray(): bool - { - return $this->value instanceof FormFieldTextDefaultValueEntryArray && $this->kind === 'array'; - } - - /** - * @return FormFieldTextDefaultValueEntryArray - */ - public function asArray(): FormFieldTextDefaultValueEntryArray - { - if (!($this->value instanceof FormFieldTextDefaultValueEntryArray && $this->kind === 'array')) { - throw new Exception( - "Expected array; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isUnsupported(): bool - { - return $this->value instanceof FormFieldTextDefaultValueEntryUnsupported && $this->kind === 'unsupported'; - } - - /** - * @return FormFieldTextDefaultValueEntryUnsupported - */ - public function asUnsupported(): FormFieldTextDefaultValueEntryUnsupported - { - if (!($this->value instanceof FormFieldTextDefaultValueEntryUnsupported && $this->kind === 'unsupported')) { - throw new Exception( - "Expected unsupported; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } - - /** - * @return array - */ - public function jsonSerialize(): array - { - $result = []; - $result['kind'] = $this->kind; - - $base = parent::jsonSerialize(); - $result = array_merge($base, $result); - - switch ($this->kind) { - case 'none': - $value = $this->asNone()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'scalar': - $value = $this->asScalar()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'array': - $value = $this->asArray()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'unsupported': - $value = $this->asUnsupported()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case '_unknown': - default: - if (is_null($this->value)) { - break; - } - if ($this->value instanceof JsonSerializableType) { - $value = $this->value->jsonSerialize(); - $result = array_merge($value, $result); - } elseif (is_array($this->value)) { - $result = array_merge($this->value, $result); - } - } - - return $result; - } - - /** - * @param array $data - */ - public static function jsonDeserialize(array $data): static - { - $args = []; - if (!array_key_exists('kind', $data)) { - throw new Exception( - "JSON data is missing property 'kind'", - ); - } - $kind = $data['kind']; - if (!(is_string($kind))) { - throw new Exception( - "Expected property 'kind' in JSON data to be string, instead received " . get_debug_type($data['kind']), - ); - } - - $args['kind'] = $kind; - switch ($kind) { - case 'none': - $args['value'] = FormFieldTextDefaultValueEntryNone::jsonDeserialize($data); - break; - case 'scalar': - $args['value'] = FormFieldTextDefaultValueEntryScalar::jsonDeserialize($data); - break; - case 'array': - $args['value'] = FormFieldTextDefaultValueEntryArray::jsonDeserialize($data); - break; - case 'unsupported': - $args['value'] = FormFieldTextDefaultValueEntryUnsupported::jsonDeserialize($data); - break; - case '_unknown': - default: - $args['kind'] = '_unknown'; - $args['value'] = $data; - } - - // @phpstan-ignore-next-line - return new static($args); - } -} diff --git a/src/Types/FormFieldTextDefaultValueEntryArray.php b/src/Types/FormFieldTextDefaultValueEntryArray.php deleted file mode 100644 index 1867f1fc..00000000 --- a/src/Types/FormFieldTextDefaultValueEntryArray.php +++ /dev/null @@ -1,35 +0,0 @@ - $values - */ - #[JsonProperty('values'), ArrayType(['string'])] - public array $values; - - /** - * @param array{ - * values: array, - * } $values - */ - public function __construct( - array $values, - ) { - $this->values = $values['values']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/FormFieldTextDefaultValueEntryNone.php b/src/Types/FormFieldTextDefaultValueEntryNone.php deleted file mode 100644 index 3d61644e..00000000 --- a/src/Types/FormFieldTextDefaultValueEntryNone.php +++ /dev/null @@ -1,26 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/FormFieldTextDefaultValueEntryScalar.php b/src/Types/FormFieldTextDefaultValueEntryScalar.php deleted file mode 100644 index 4e42f8d3..00000000 --- a/src/Types/FormFieldTextDefaultValueEntryScalar.php +++ /dev/null @@ -1,34 +0,0 @@ -value = $values['value']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/FormFieldTextDefaultValueEntryUnsupported.php b/src/Types/FormFieldTextDefaultValueEntryUnsupported.php deleted file mode 100644 index c4703c54..00000000 --- a/src/Types/FormFieldTextDefaultValueEntryUnsupported.php +++ /dev/null @@ -1,26 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/FormFieldTextValueEntryUnsupported.php b/src/Types/FormFieldTextValueEntryUnsupported.php deleted file mode 100644 index 8110b47f..00000000 --- a/src/Types/FormFieldTextValueEntryUnsupported.php +++ /dev/null @@ -1,26 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/FormFieldUnknown.php b/src/Types/FormFieldUnknown.php index 7d88c4c3..fd5cd52a 100644 --- a/src/Types/FormFieldUnknown.php +++ b/src/Types/FormFieldUnknown.php @@ -59,16 +59,16 @@ class FormFieldUnknown extends JsonSerializableType public ?string $mappingName; /** - * @var FormFieldUnknownValueEntry $valueEntry + * @var FormValueEntry $valueEntry */ #[JsonProperty('valueEntry')] - public FormFieldUnknownValueEntry $valueEntry; + public FormValueEntry $valueEntry; /** - * @var FormFieldUnknownDefaultValueEntry $defaultValueEntry + * @var FormValueEntry $defaultValueEntry */ #[JsonProperty('defaultValueEntry')] - public FormFieldUnknownDefaultValueEntry $defaultValueEntry; + public FormValueEntry $defaultValueEntry; /** * @var ?PdfFieldActions $actions @@ -138,8 +138,8 @@ class FormFieldUnknown extends JsonSerializableType * readOnly: bool, * required: bool, * noExport: bool, - * valueEntry: FormFieldUnknownValueEntry, - * defaultValueEntry: FormFieldUnknownDefaultValueEntry, + * valueEntry: FormValueEntry, + * defaultValueEntry: FormValueEntry, * widgets: array, * rawValue: string, * alternateName?: ?string, diff --git a/src/Types/FormFieldUnknownDefaultValueEntry.php b/src/Types/FormFieldUnknownDefaultValueEntry.php deleted file mode 100644 index bce9a991..00000000 --- a/src/Types/FormFieldUnknownDefaultValueEntry.php +++ /dev/null @@ -1,286 +0,0 @@ -kind = $values['kind']; - $this->value = $values['value']; - } - - /** - * @param FormFieldUnknownDefaultValueEntryNone $none - * @return FormFieldUnknownDefaultValueEntry - */ - public static function none(FormFieldUnknownDefaultValueEntryNone $none): FormFieldUnknownDefaultValueEntry - { - return new FormFieldUnknownDefaultValueEntry([ - 'kind' => 'none', - 'value' => $none, - ]); - } - - /** - * @param FormFieldUnknownDefaultValueEntryScalar $scalar - * @return FormFieldUnknownDefaultValueEntry - */ - public static function scalar(FormFieldUnknownDefaultValueEntryScalar $scalar): FormFieldUnknownDefaultValueEntry - { - return new FormFieldUnknownDefaultValueEntry([ - 'kind' => 'scalar', - 'value' => $scalar, - ]); - } - - /** - * @param FormFieldUnknownDefaultValueEntryArray $array - * @return FormFieldUnknownDefaultValueEntry - */ - public static function array(FormFieldUnknownDefaultValueEntryArray $array): FormFieldUnknownDefaultValueEntry - { - return new FormFieldUnknownDefaultValueEntry([ - 'kind' => 'array', - 'value' => $array, - ]); - } - - /** - * @param FormFieldUnknownDefaultValueEntryUnsupported $unsupported - * @return FormFieldUnknownDefaultValueEntry - */ - public static function unsupported(FormFieldUnknownDefaultValueEntryUnsupported $unsupported): FormFieldUnknownDefaultValueEntry - { - return new FormFieldUnknownDefaultValueEntry([ - 'kind' => 'unsupported', - 'value' => $unsupported, - ]); - } - - /** - * @return bool - */ - public function isNone(): bool - { - return $this->value instanceof FormFieldUnknownDefaultValueEntryNone && $this->kind === 'none'; - } - - /** - * @return FormFieldUnknownDefaultValueEntryNone - */ - public function asNone(): FormFieldUnknownDefaultValueEntryNone - { - if (!($this->value instanceof FormFieldUnknownDefaultValueEntryNone && $this->kind === 'none')) { - throw new Exception( - "Expected none; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isScalar(): bool - { - return $this->value instanceof FormFieldUnknownDefaultValueEntryScalar && $this->kind === 'scalar'; - } - - /** - * @return FormFieldUnknownDefaultValueEntryScalar - */ - public function asScalar(): FormFieldUnknownDefaultValueEntryScalar - { - if (!($this->value instanceof FormFieldUnknownDefaultValueEntryScalar && $this->kind === 'scalar')) { - throw new Exception( - "Expected scalar; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isArray(): bool - { - return $this->value instanceof FormFieldUnknownDefaultValueEntryArray && $this->kind === 'array'; - } - - /** - * @return FormFieldUnknownDefaultValueEntryArray - */ - public function asArray(): FormFieldUnknownDefaultValueEntryArray - { - if (!($this->value instanceof FormFieldUnknownDefaultValueEntryArray && $this->kind === 'array')) { - throw new Exception( - "Expected array; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isUnsupported(): bool - { - return $this->value instanceof FormFieldUnknownDefaultValueEntryUnsupported && $this->kind === 'unsupported'; - } - - /** - * @return FormFieldUnknownDefaultValueEntryUnsupported - */ - public function asUnsupported(): FormFieldUnknownDefaultValueEntryUnsupported - { - if (!($this->value instanceof FormFieldUnknownDefaultValueEntryUnsupported && $this->kind === 'unsupported')) { - throw new Exception( - "Expected unsupported; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } - - /** - * @return array - */ - public function jsonSerialize(): array - { - $result = []; - $result['kind'] = $this->kind; - - $base = parent::jsonSerialize(); - $result = array_merge($base, $result); - - switch ($this->kind) { - case 'none': - $value = $this->asNone()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'scalar': - $value = $this->asScalar()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'array': - $value = $this->asArray()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'unsupported': - $value = $this->asUnsupported()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case '_unknown': - default: - if (is_null($this->value)) { - break; - } - if ($this->value instanceof JsonSerializableType) { - $value = $this->value->jsonSerialize(); - $result = array_merge($value, $result); - } elseif (is_array($this->value)) { - $result = array_merge($this->value, $result); - } - } - - return $result; - } - - /** - * @param array $data - */ - public static function jsonDeserialize(array $data): static - { - $args = []; - if (!array_key_exists('kind', $data)) { - throw new Exception( - "JSON data is missing property 'kind'", - ); - } - $kind = $data['kind']; - if (!(is_string($kind))) { - throw new Exception( - "Expected property 'kind' in JSON data to be string, instead received " . get_debug_type($data['kind']), - ); - } - - $args['kind'] = $kind; - switch ($kind) { - case 'none': - $args['value'] = FormFieldUnknownDefaultValueEntryNone::jsonDeserialize($data); - break; - case 'scalar': - $args['value'] = FormFieldUnknownDefaultValueEntryScalar::jsonDeserialize($data); - break; - case 'array': - $args['value'] = FormFieldUnknownDefaultValueEntryArray::jsonDeserialize($data); - break; - case 'unsupported': - $args['value'] = FormFieldUnknownDefaultValueEntryUnsupported::jsonDeserialize($data); - break; - case '_unknown': - default: - $args['kind'] = '_unknown'; - $args['value'] = $data; - } - - // @phpstan-ignore-next-line - return new static($args); - } -} diff --git a/src/Types/FormFieldUnknownDefaultValueEntryArray.php b/src/Types/FormFieldUnknownDefaultValueEntryArray.php deleted file mode 100644 index 91b0da0a..00000000 --- a/src/Types/FormFieldUnknownDefaultValueEntryArray.php +++ /dev/null @@ -1,35 +0,0 @@ - $values - */ - #[JsonProperty('values'), ArrayType(['string'])] - public array $values; - - /** - * @param array{ - * values: array, - * } $values - */ - public function __construct( - array $values, - ) { - $this->values = $values['values']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/FormFieldUnknownDefaultValueEntryNone.php b/src/Types/FormFieldUnknownDefaultValueEntryNone.php deleted file mode 100644 index fe4bd9d1..00000000 --- a/src/Types/FormFieldUnknownDefaultValueEntryNone.php +++ /dev/null @@ -1,26 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/FormFieldUnknownDefaultValueEntryScalar.php b/src/Types/FormFieldUnknownDefaultValueEntryScalar.php deleted file mode 100644 index 031044b3..00000000 --- a/src/Types/FormFieldUnknownDefaultValueEntryScalar.php +++ /dev/null @@ -1,34 +0,0 @@ -value = $values['value']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/FormFieldUnknownDefaultValueEntryUnsupported.php b/src/Types/FormFieldUnknownDefaultValueEntryUnsupported.php deleted file mode 100644 index 3bb6e7d1..00000000 --- a/src/Types/FormFieldUnknownDefaultValueEntryUnsupported.php +++ /dev/null @@ -1,26 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/FormFieldUnknownValueEntry.php b/src/Types/FormFieldUnknownValueEntry.php deleted file mode 100644 index 2acba432..00000000 --- a/src/Types/FormFieldUnknownValueEntry.php +++ /dev/null @@ -1,286 +0,0 @@ -kind = $values['kind']; - $this->value = $values['value']; - } - - /** - * @param FormFieldUnknownValueEntryNone $none - * @return FormFieldUnknownValueEntry - */ - public static function none(FormFieldUnknownValueEntryNone $none): FormFieldUnknownValueEntry - { - return new FormFieldUnknownValueEntry([ - 'kind' => 'none', - 'value' => $none, - ]); - } - - /** - * @param FormFieldUnknownValueEntryScalar $scalar - * @return FormFieldUnknownValueEntry - */ - public static function scalar(FormFieldUnknownValueEntryScalar $scalar): FormFieldUnknownValueEntry - { - return new FormFieldUnknownValueEntry([ - 'kind' => 'scalar', - 'value' => $scalar, - ]); - } - - /** - * @param FormFieldUnknownValueEntryArray $array - * @return FormFieldUnknownValueEntry - */ - public static function array(FormFieldUnknownValueEntryArray $array): FormFieldUnknownValueEntry - { - return new FormFieldUnknownValueEntry([ - 'kind' => 'array', - 'value' => $array, - ]); - } - - /** - * @param FormFieldUnknownValueEntryUnsupported $unsupported - * @return FormFieldUnknownValueEntry - */ - public static function unsupported(FormFieldUnknownValueEntryUnsupported $unsupported): FormFieldUnknownValueEntry - { - return new FormFieldUnknownValueEntry([ - 'kind' => 'unsupported', - 'value' => $unsupported, - ]); - } - - /** - * @return bool - */ - public function isNone(): bool - { - return $this->value instanceof FormFieldUnknownValueEntryNone && $this->kind === 'none'; - } - - /** - * @return FormFieldUnknownValueEntryNone - */ - public function asNone(): FormFieldUnknownValueEntryNone - { - if (!($this->value instanceof FormFieldUnknownValueEntryNone && $this->kind === 'none')) { - throw new Exception( - "Expected none; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isScalar(): bool - { - return $this->value instanceof FormFieldUnknownValueEntryScalar && $this->kind === 'scalar'; - } - - /** - * @return FormFieldUnknownValueEntryScalar - */ - public function asScalar(): FormFieldUnknownValueEntryScalar - { - if (!($this->value instanceof FormFieldUnknownValueEntryScalar && $this->kind === 'scalar')) { - throw new Exception( - "Expected scalar; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isArray(): bool - { - return $this->value instanceof FormFieldUnknownValueEntryArray && $this->kind === 'array'; - } - - /** - * @return FormFieldUnknownValueEntryArray - */ - public function asArray(): FormFieldUnknownValueEntryArray - { - if (!($this->value instanceof FormFieldUnknownValueEntryArray && $this->kind === 'array')) { - throw new Exception( - "Expected array; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return bool - */ - public function isUnsupported(): bool - { - return $this->value instanceof FormFieldUnknownValueEntryUnsupported && $this->kind === 'unsupported'; - } - - /** - * @return FormFieldUnknownValueEntryUnsupported - */ - public function asUnsupported(): FormFieldUnknownValueEntryUnsupported - { - if (!($this->value instanceof FormFieldUnknownValueEntryUnsupported && $this->kind === 'unsupported')) { - throw new Exception( - "Expected unsupported; got " . $this->kind . " with value of type " . get_debug_type($this->value), - ); - } - - return $this->value; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } - - /** - * @return array - */ - public function jsonSerialize(): array - { - $result = []; - $result['kind'] = $this->kind; - - $base = parent::jsonSerialize(); - $result = array_merge($base, $result); - - switch ($this->kind) { - case 'none': - $value = $this->asNone()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'scalar': - $value = $this->asScalar()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'array': - $value = $this->asArray()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case 'unsupported': - $value = $this->asUnsupported()->jsonSerialize(); - $result = array_merge($value, $result); - break; - case '_unknown': - default: - if (is_null($this->value)) { - break; - } - if ($this->value instanceof JsonSerializableType) { - $value = $this->value->jsonSerialize(); - $result = array_merge($value, $result); - } elseif (is_array($this->value)) { - $result = array_merge($this->value, $result); - } - } - - return $result; - } - - /** - * @param array $data - */ - public static function jsonDeserialize(array $data): static - { - $args = []; - if (!array_key_exists('kind', $data)) { - throw new Exception( - "JSON data is missing property 'kind'", - ); - } - $kind = $data['kind']; - if (!(is_string($kind))) { - throw new Exception( - "Expected property 'kind' in JSON data to be string, instead received " . get_debug_type($data['kind']), - ); - } - - $args['kind'] = $kind; - switch ($kind) { - case 'none': - $args['value'] = FormFieldUnknownValueEntryNone::jsonDeserialize($data); - break; - case 'scalar': - $args['value'] = FormFieldUnknownValueEntryScalar::jsonDeserialize($data); - break; - case 'array': - $args['value'] = FormFieldUnknownValueEntryArray::jsonDeserialize($data); - break; - case 'unsupported': - $args['value'] = FormFieldUnknownValueEntryUnsupported::jsonDeserialize($data); - break; - case '_unknown': - default: - $args['kind'] = '_unknown'; - $args['value'] = $data; - } - - // @phpstan-ignore-next-line - return new static($args); - } -} diff --git a/src/Types/FormFieldUnknownValueEntryArray.php b/src/Types/FormFieldUnknownValueEntryArray.php deleted file mode 100644 index a8b531ff..00000000 --- a/src/Types/FormFieldUnknownValueEntryArray.php +++ /dev/null @@ -1,35 +0,0 @@ - $values - */ - #[JsonProperty('values'), ArrayType(['string'])] - public array $values; - - /** - * @param array{ - * values: array, - * } $values - */ - public function __construct( - array $values, - ) { - $this->values = $values['values']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/FormFieldUnknownValueEntryNone.php b/src/Types/FormFieldUnknownValueEntryNone.php deleted file mode 100644 index ba572a8d..00000000 --- a/src/Types/FormFieldUnknownValueEntryNone.php +++ /dev/null @@ -1,26 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/FormFieldUnknownValueEntryScalar.php b/src/Types/FormFieldUnknownValueEntryScalar.php deleted file mode 100644 index 1bb45b4c..00000000 --- a/src/Types/FormFieldUnknownValueEntryScalar.php +++ /dev/null @@ -1,34 +0,0 @@ -value = $values['value']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/FormFieldUnknownValueEntryUnsupported.php b/src/Types/FormFieldUnknownValueEntryUnsupported.php deleted file mode 100644 index e562cb50..00000000 --- a/src/Types/FormFieldUnknownValueEntryUnsupported.php +++ /dev/null @@ -1,26 +0,0 @@ -toJson(); - } -} diff --git a/src/Types/FormFieldTextValueEntry.php b/src/Types/FormValueEntry.php similarity index 63% rename from src/Types/FormFieldTextValueEntry.php rename to src/Types/FormValueEntry.php index ddd8c276..4f8fe699 100644 --- a/src/Types/FormFieldTextValueEntry.php +++ b/src/Types/FormValueEntry.php @@ -5,7 +5,10 @@ use CloudPDF\Core\Json\JsonSerializableType; use Exception; -class FormFieldTextValueEntry extends JsonSerializableType +/** + * A field's stored value, by its `kind`. A newer server can add kinds: read one your client doesn't know as `unsupported`. + */ +class FormValueEntry extends JsonSerializableType { /** * @var ( @@ -20,10 +23,10 @@ class FormFieldTextValueEntry extends JsonSerializableType /** * @var ( - * FormFieldTextValueEntryNone - * |FormFieldTextValueEntryScalar - * |FormFieldTextValueEntryArray - * |FormFieldTextValueEntryUnsupported + * FormValueEntryNone + * |FormValueEntryScalar + * |FormValueEntryArray + * |FormValueEntryUnsupported * |mixed * ) $value */ @@ -39,10 +42,10 @@ class FormFieldTextValueEntry extends JsonSerializableType * |'_unknown' * ), * value: ( - * FormFieldTextValueEntryNone - * |FormFieldTextValueEntryScalar - * |FormFieldTextValueEntryArray - * |FormFieldTextValueEntryUnsupported + * FormValueEntryNone + * |FormValueEntryScalar + * |FormValueEntryArray + * |FormValueEntryUnsupported * |mixed * ), * } $values @@ -55,48 +58,48 @@ private function __construct( } /** - * @param FormFieldTextValueEntryNone $none - * @return FormFieldTextValueEntry + * @param FormValueEntryNone $none + * @return FormValueEntry */ - public static function none(FormFieldTextValueEntryNone $none): FormFieldTextValueEntry + public static function none(FormValueEntryNone $none): FormValueEntry { - return new FormFieldTextValueEntry([ + return new FormValueEntry([ 'kind' => 'none', 'value' => $none, ]); } /** - * @param FormFieldTextValueEntryScalar $scalar - * @return FormFieldTextValueEntry + * @param FormValueEntryScalar $scalar + * @return FormValueEntry */ - public static function scalar(FormFieldTextValueEntryScalar $scalar): FormFieldTextValueEntry + public static function scalar(FormValueEntryScalar $scalar): FormValueEntry { - return new FormFieldTextValueEntry([ + return new FormValueEntry([ 'kind' => 'scalar', 'value' => $scalar, ]); } /** - * @param FormFieldTextValueEntryArray $array - * @return FormFieldTextValueEntry + * @param FormValueEntryArray $array + * @return FormValueEntry */ - public static function array(FormFieldTextValueEntryArray $array): FormFieldTextValueEntry + public static function array(FormValueEntryArray $array): FormValueEntry { - return new FormFieldTextValueEntry([ + return new FormValueEntry([ 'kind' => 'array', 'value' => $array, ]); } /** - * @param FormFieldTextValueEntryUnsupported $unsupported - * @return FormFieldTextValueEntry + * @param FormValueEntryUnsupported $unsupported + * @return FormValueEntry */ - public static function unsupported(FormFieldTextValueEntryUnsupported $unsupported): FormFieldTextValueEntry + public static function unsupported(FormValueEntryUnsupported $unsupported): FormValueEntry { - return new FormFieldTextValueEntry([ + return new FormValueEntry([ 'kind' => 'unsupported', 'value' => $unsupported, ]); @@ -107,15 +110,15 @@ public static function unsupported(FormFieldTextValueEntryUnsupported $unsupport */ public function isNone(): bool { - return $this->value instanceof FormFieldTextValueEntryNone && $this->kind === 'none'; + return $this->value instanceof FormValueEntryNone && $this->kind === 'none'; } /** - * @return FormFieldTextValueEntryNone + * @return FormValueEntryNone */ - public function asNone(): FormFieldTextValueEntryNone + public function asNone(): FormValueEntryNone { - if (!($this->value instanceof FormFieldTextValueEntryNone && $this->kind === 'none')) { + if (!($this->value instanceof FormValueEntryNone && $this->kind === 'none')) { throw new Exception( "Expected none; got " . $this->kind . " with value of type " . get_debug_type($this->value), ); @@ -129,15 +132,15 @@ public function asNone(): FormFieldTextValueEntryNone */ public function isScalar(): bool { - return $this->value instanceof FormFieldTextValueEntryScalar && $this->kind === 'scalar'; + return $this->value instanceof FormValueEntryScalar && $this->kind === 'scalar'; } /** - * @return FormFieldTextValueEntryScalar + * @return FormValueEntryScalar */ - public function asScalar(): FormFieldTextValueEntryScalar + public function asScalar(): FormValueEntryScalar { - if (!($this->value instanceof FormFieldTextValueEntryScalar && $this->kind === 'scalar')) { + if (!($this->value instanceof FormValueEntryScalar && $this->kind === 'scalar')) { throw new Exception( "Expected scalar; got " . $this->kind . " with value of type " . get_debug_type($this->value), ); @@ -151,15 +154,15 @@ public function asScalar(): FormFieldTextValueEntryScalar */ public function isArray(): bool { - return $this->value instanceof FormFieldTextValueEntryArray && $this->kind === 'array'; + return $this->value instanceof FormValueEntryArray && $this->kind === 'array'; } /** - * @return FormFieldTextValueEntryArray + * @return FormValueEntryArray */ - public function asArray(): FormFieldTextValueEntryArray + public function asArray(): FormValueEntryArray { - if (!($this->value instanceof FormFieldTextValueEntryArray && $this->kind === 'array')) { + if (!($this->value instanceof FormValueEntryArray && $this->kind === 'array')) { throw new Exception( "Expected array; got " . $this->kind . " with value of type " . get_debug_type($this->value), ); @@ -173,15 +176,15 @@ public function asArray(): FormFieldTextValueEntryArray */ public function isUnsupported(): bool { - return $this->value instanceof FormFieldTextValueEntryUnsupported && $this->kind === 'unsupported'; + return $this->value instanceof FormValueEntryUnsupported && $this->kind === 'unsupported'; } /** - * @return FormFieldTextValueEntryUnsupported + * @return FormValueEntryUnsupported */ - public function asUnsupported(): FormFieldTextValueEntryUnsupported + public function asUnsupported(): FormValueEntryUnsupported { - if (!($this->value instanceof FormFieldTextValueEntryUnsupported && $this->kind === 'unsupported')) { + if (!($this->value instanceof FormValueEntryUnsupported && $this->kind === 'unsupported')) { throw new Exception( "Expected unsupported; got " . $this->kind . " with value of type " . get_debug_type($this->value), ); @@ -263,16 +266,16 @@ public static function jsonDeserialize(array $data): static $args['kind'] = $kind; switch ($kind) { case 'none': - $args['value'] = FormFieldTextValueEntryNone::jsonDeserialize($data); + $args['value'] = FormValueEntryNone::jsonDeserialize($data); break; case 'scalar': - $args['value'] = FormFieldTextValueEntryScalar::jsonDeserialize($data); + $args['value'] = FormValueEntryScalar::jsonDeserialize($data); break; case 'array': - $args['value'] = FormFieldTextValueEntryArray::jsonDeserialize($data); + $args['value'] = FormValueEntryArray::jsonDeserialize($data); break; case 'unsupported': - $args['value'] = FormFieldTextValueEntryUnsupported::jsonDeserialize($data); + $args['value'] = FormValueEntryUnsupported::jsonDeserialize($data); break; case '_unknown': default: diff --git a/src/Types/FormFieldTextValueEntryArray.php b/src/Types/FormValueEntryArray.php similarity index 90% rename from src/Types/FormFieldTextValueEntryArray.php rename to src/Types/FormValueEntryArray.php index 2e2606de..e582b8d7 100644 --- a/src/Types/FormFieldTextValueEntryArray.php +++ b/src/Types/FormValueEntryArray.php @@ -6,7 +6,7 @@ use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; -class FormFieldTextValueEntryArray extends JsonSerializableType +class FormValueEntryArray extends JsonSerializableType { /** * @var array $values diff --git a/src/Types/FormFieldTextValueEntryNone.php b/src/Types/FormValueEntryNone.php similarity index 85% rename from src/Types/FormFieldTextValueEntryNone.php rename to src/Types/FormValueEntryNone.php index e9e7c341..7f28f579 100644 --- a/src/Types/FormFieldTextValueEntryNone.php +++ b/src/Types/FormValueEntryNone.php @@ -4,7 +4,7 @@ use CloudPDF\Core\Json\JsonSerializableType; -class FormFieldTextValueEntryNone extends JsonSerializableType +class FormValueEntryNone extends JsonSerializableType { /** * @param array{ diff --git a/src/Types/FormFieldTextValueEntryScalar.php b/src/Types/FormValueEntryScalar.php similarity index 89% rename from src/Types/FormFieldTextValueEntryScalar.php rename to src/Types/FormValueEntryScalar.php index c7b538ed..d7eb9166 100644 --- a/src/Types/FormFieldTextValueEntryScalar.php +++ b/src/Types/FormValueEntryScalar.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class FormFieldTextValueEntryScalar extends JsonSerializableType +class FormValueEntryScalar extends JsonSerializableType { /** * @var string $value diff --git a/src/Types/FormFieldRadioValueEntryNone.php b/src/Types/FormValueEntryUnsupported.php similarity index 84% rename from src/Types/FormFieldRadioValueEntryNone.php rename to src/Types/FormValueEntryUnsupported.php index 9dbae0e2..fa29f9d9 100644 --- a/src/Types/FormFieldRadioValueEntryNone.php +++ b/src/Types/FormValueEntryUnsupported.php @@ -4,7 +4,7 @@ use CloudPDF\Core\Json\JsonSerializableType; -class FormFieldRadioValueEntryNone extends JsonSerializableType +class FormValueEntryUnsupported extends JsonSerializableType { /** * @param array{ diff --git a/src/Types/GrantsArchive200ResponseGrantLayerMode.php b/src/Types/GrantsArchive200ResponseGrantLayerMode.php deleted file mode 100644 index 556ad715..00000000 --- a/src/Types/GrantsArchive200ResponseGrantLayerMode.php +++ /dev/null @@ -1,9 +0,0 @@ - $layerMode + * @var value-of $layerMode */ #[JsonProperty('layerMode')] public string $layerMode; @@ -51,16 +53,16 @@ class GrantsList200ResponseGrantsItem extends JsonSerializableType public bool $keepVisitorLayers; /** - * @var ?float $visitorIdleSeconds + * @var ?int $visitorIdleSeconds */ #[JsonProperty('visitorIdleSeconds')] - public ?float $visitorIdleSeconds; + public ?int $visitorIdleSeconds; /** - * @var ?GrantsList200ResponseGrantsItemVisitorIdentity $visitorIdentity + * @var ?GrantsArchiveResponseGrantVisitorIdentity $visitorIdentity */ #[JsonProperty('visitorIdentity')] - public ?GrantsList200ResponseGrantsItemVisitorIdentity $visitorIdentity; + public ?GrantsArchiveResponseGrantVisitorIdentity $visitorIdentity; /** * @var ?Identity $identity @@ -87,10 +89,10 @@ class GrantsList200ResponseGrantsItem extends JsonSerializableType public bool $passphraseProtected; /** - * @var float $sessionTtlSeconds + * @var int $sessionTtlSeconds */ #[JsonProperty('sessionTtlSeconds')] - public float $sessionTtlSeconds; + public int $sessionTtlSeconds; /** * @var bool $disabled @@ -99,28 +101,28 @@ class GrantsList200ResponseGrantsItem extends JsonSerializableType public bool $disabled; /** - * @var ?float $archivedAt + * @var ?DateTime $archivedAt */ - #[JsonProperty('archivedAt')] - public ?float $archivedAt; + #[JsonProperty('archivedAt'), Date(Date::TYPE_DATETIME)] + public ?DateTime $archivedAt; /** - * @var ?float $expiresAt + * @var ?DateTime $expiresAt */ - #[JsonProperty('expiresAt')] - public ?float $expiresAt; + #[JsonProperty('expiresAt'), Date(Date::TYPE_DATETIME)] + public ?DateTime $expiresAt; /** - * @var float $exchangeCount + * @var int $exchangeCount */ #[JsonProperty('exchangeCount')] - public float $exchangeCount; + public int $exchangeCount; /** - * @var ?float $lastExchangedAt + * @var ?DateTime $lastExchangedAt */ - #[JsonProperty('lastExchangedAt')] - public ?float $lastExchangedAt; + #[JsonProperty('lastExchangedAt'), Date(Date::TYPE_DATETIME)] + public ?DateTime $lastExchangedAt; /** * @var string $createdBy @@ -129,41 +131,41 @@ class GrantsList200ResponseGrantsItem extends JsonSerializableType public string $createdBy; /** - * @var float $createdAt + * @var DateTime $createdAt */ - #[JsonProperty('createdAt')] - public float $createdAt; + #[JsonProperty('createdAt'), Date(Date::TYPE_DATETIME)] + public DateTime $createdAt; /** - * @var float $updatedAt + * @var DateTime $updatedAt */ - #[JsonProperty('updatedAt')] - public float $updatedAt; + #[JsonProperty('updatedAt'), Date(Date::TYPE_DATETIME)] + public DateTime $updatedAt; /** * @param array{ * id: string, * tenantId: string, * docId: string, - * layerMode: value-of, + * layerMode: value-of, * keepVisitorLayers: bool, * scope: array, * passphraseProtected: bool, - * sessionTtlSeconds: float, + * sessionTtlSeconds: int, * disabled: bool, - * exchangeCount: float, + * exchangeCount: int, * createdBy: string, - * createdAt: float, - * updatedAt: float, + * createdAt: DateTime, + * updatedAt: DateTime, * name?: ?string, * layerName?: ?string, - * visitorIdleSeconds?: ?float, - * visitorIdentity?: ?GrantsList200ResponseGrantsItemVisitorIdentity, + * visitorIdleSeconds?: ?int, + * visitorIdentity?: ?GrantsArchiveResponseGrantVisitorIdentity, * identity?: ?Identity, * origins?: ?array, - * archivedAt?: ?float, - * expiresAt?: ?float, - * lastExchangedAt?: ?float, + * archivedAt?: ?DateTime, + * expiresAt?: ?DateTime, + * lastExchangedAt?: ?DateTime, * } $values */ public function __construct( diff --git a/src/Types/GrantsUpdate200ResponseGrantLayerMode.php b/src/Types/GrantsArchiveResponseGrantLayerMode.php similarity index 66% rename from src/Types/GrantsUpdate200ResponseGrantLayerMode.php rename to src/Types/GrantsArchiveResponseGrantLayerMode.php index db278daa..29ce841d 100644 --- a/src/Types/GrantsUpdate200ResponseGrantLayerMode.php +++ b/src/Types/GrantsArchiveResponseGrantLayerMode.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum GrantsUpdate200ResponseGrantLayerMode: string +enum GrantsArchiveResponseGrantLayerMode: string { case Shared = "shared"; case PerVisitor = "per-visitor"; diff --git a/src/Types/GrantsUpdate200ResponseGrantVisitorIdentity.php b/src/Types/GrantsArchiveResponseGrantVisitorIdentity.php similarity index 68% rename from src/Types/GrantsUpdate200ResponseGrantVisitorIdentity.php rename to src/Types/GrantsArchiveResponseGrantVisitorIdentity.php index 868e1286..5535642f 100644 --- a/src/Types/GrantsUpdate200ResponseGrantVisitorIdentity.php +++ b/src/Types/GrantsArchiveResponseGrantVisitorIdentity.php @@ -5,16 +5,16 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class GrantsUpdate200ResponseGrantVisitorIdentity extends JsonSerializableType +class GrantsArchiveResponseGrantVisitorIdentity extends JsonSerializableType { /** - * @var GrantsUpdate200ResponseGrantVisitorIdentityFields $fields + * @var GrantsArchiveResponseGrantVisitorIdentityFields $fields */ #[JsonProperty('fields')] - public GrantsUpdate200ResponseGrantVisitorIdentityFields $fields; + public GrantsArchiveResponseGrantVisitorIdentityFields $fields; /** - * @var value-of $ask + * @var value-of $ask */ #[JsonProperty('ask')] public string $ask; @@ -33,8 +33,8 @@ class GrantsUpdate200ResponseGrantVisitorIdentity extends JsonSerializableType /** * @param array{ - * fields: GrantsUpdate200ResponseGrantVisitorIdentityFields, - * ask: value-of, + * fields: GrantsArchiveResponseGrantVisitorIdentityFields, + * ask: value-of, * purpose?: ?string, * privacyUrl?: ?string, * } $values diff --git a/src/Types/GrantsCreate200ResponseGrantVisitorIdentityAsk.php b/src/Types/GrantsArchiveResponseGrantVisitorIdentityAsk.php similarity index 66% rename from src/Types/GrantsCreate200ResponseGrantVisitorIdentityAsk.php rename to src/Types/GrantsArchiveResponseGrantVisitorIdentityAsk.php index f9d1a32f..e11702fa 100644 --- a/src/Types/GrantsCreate200ResponseGrantVisitorIdentityAsk.php +++ b/src/Types/GrantsArchiveResponseGrantVisitorIdentityAsk.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum GrantsCreate200ResponseGrantVisitorIdentityAsk: string +enum GrantsArchiveResponseGrantVisitorIdentityAsk: string { case OnOpen = "on-open"; case BeforeFirstChange = "before-first-change"; diff --git a/src/Types/GrantsUpdate200ResponseGrantVisitorIdentityFields.php b/src/Types/GrantsArchiveResponseGrantVisitorIdentityFields.php similarity index 51% rename from src/Types/GrantsUpdate200ResponseGrantVisitorIdentityFields.php rename to src/Types/GrantsArchiveResponseGrantVisitorIdentityFields.php index 675f8e46..a1e0fe92 100644 --- a/src/Types/GrantsUpdate200ResponseGrantVisitorIdentityFields.php +++ b/src/Types/GrantsArchiveResponseGrantVisitorIdentityFields.php @@ -5,45 +5,45 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class GrantsUpdate200ResponseGrantVisitorIdentityFields extends JsonSerializableType +class GrantsArchiveResponseGrantVisitorIdentityFields extends JsonSerializableType { /** - * @var ?value-of $displayName + * @var ?value-of $displayName */ #[JsonProperty('displayName')] public ?string $displayName; /** - * @var ?value-of $email + * @var ?value-of $email */ #[JsonProperty('email')] public ?string $email; /** - * @var ?value-of $title + * @var ?value-of $title */ #[JsonProperty('title')] public ?string $title; /** - * @var ?value-of $organization + * @var ?value-of $organization */ #[JsonProperty('organization')] public ?string $organization; /** - * @var ?value-of $organizationalUnit + * @var ?value-of $organizationalUnit */ #[JsonProperty('organizationalUnit')] public ?string $organizationalUnit; /** * @param array{ - * displayName?: ?value-of, - * email?: ?value-of, - * title?: ?value-of, - * organization?: ?value-of, - * organizationalUnit?: ?value-of, + * displayName?: ?value-of, + * email?: ?value-of, + * title?: ?value-of, + * organization?: ?value-of, + * organizationalUnit?: ?value-of, * } $values */ public function __construct( diff --git a/src/Types/GrantsExchange200ResponseVisitorIdentityRequestFieldsEmail.php b/src/Types/GrantsArchiveResponseGrantVisitorIdentityFieldsDisplayName.php similarity index 63% rename from src/Types/GrantsExchange200ResponseVisitorIdentityRequestFieldsEmail.php rename to src/Types/GrantsArchiveResponseGrantVisitorIdentityFieldsDisplayName.php index 5cee1347..e35ab909 100644 --- a/src/Types/GrantsExchange200ResponseVisitorIdentityRequestFieldsEmail.php +++ b/src/Types/GrantsArchiveResponseGrantVisitorIdentityFieldsDisplayName.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum GrantsExchange200ResponseVisitorIdentityRequestFieldsEmail: string +enum GrantsArchiveResponseGrantVisitorIdentityFieldsDisplayName: string { case Required = "required"; case Optional = "optional"; diff --git a/src/Types/GrantsArchiveResponseGrantVisitorIdentityFieldsEmail.php b/src/Types/GrantsArchiveResponseGrantVisitorIdentityFieldsEmail.php new file mode 100644 index 00000000..30d42bdd --- /dev/null +++ b/src/Types/GrantsArchiveResponseGrantVisitorIdentityFieldsEmail.php @@ -0,0 +1,9 @@ + $layerMode + * @var value-of $layerMode */ #[JsonProperty('layerMode')] public string $layerMode; @@ -51,16 +53,16 @@ class GrantsGet200ResponseGrant extends JsonSerializableType public bool $keepVisitorLayers; /** - * @var ?float $visitorIdleSeconds + * @var ?int $visitorIdleSeconds */ #[JsonProperty('visitorIdleSeconds')] - public ?float $visitorIdleSeconds; + public ?int $visitorIdleSeconds; /** - * @var ?GrantsGet200ResponseGrantVisitorIdentity $visitorIdentity + * @var ?GrantsCreateResponseGrantVisitorIdentity $visitorIdentity */ #[JsonProperty('visitorIdentity')] - public ?GrantsGet200ResponseGrantVisitorIdentity $visitorIdentity; + public ?GrantsCreateResponseGrantVisitorIdentity $visitorIdentity; /** * @var ?Identity $identity @@ -87,10 +89,10 @@ class GrantsGet200ResponseGrant extends JsonSerializableType public bool $passphraseProtected; /** - * @var float $sessionTtlSeconds + * @var int $sessionTtlSeconds */ #[JsonProperty('sessionTtlSeconds')] - public float $sessionTtlSeconds; + public int $sessionTtlSeconds; /** * @var bool $disabled @@ -99,28 +101,28 @@ class GrantsGet200ResponseGrant extends JsonSerializableType public bool $disabled; /** - * @var ?float $archivedAt + * @var ?DateTime $archivedAt */ - #[JsonProperty('archivedAt')] - public ?float $archivedAt; + #[JsonProperty('archivedAt'), Date(Date::TYPE_DATETIME)] + public ?DateTime $archivedAt; /** - * @var ?float $expiresAt + * @var ?DateTime $expiresAt */ - #[JsonProperty('expiresAt')] - public ?float $expiresAt; + #[JsonProperty('expiresAt'), Date(Date::TYPE_DATETIME)] + public ?DateTime $expiresAt; /** - * @var float $exchangeCount + * @var int $exchangeCount */ #[JsonProperty('exchangeCount')] - public float $exchangeCount; + public int $exchangeCount; /** - * @var ?float $lastExchangedAt + * @var ?DateTime $lastExchangedAt */ - #[JsonProperty('lastExchangedAt')] - public ?float $lastExchangedAt; + #[JsonProperty('lastExchangedAt'), Date(Date::TYPE_DATETIME)] + public ?DateTime $lastExchangedAt; /** * @var string $createdBy @@ -129,41 +131,41 @@ class GrantsGet200ResponseGrant extends JsonSerializableType public string $createdBy; /** - * @var float $createdAt + * @var DateTime $createdAt */ - #[JsonProperty('createdAt')] - public float $createdAt; + #[JsonProperty('createdAt'), Date(Date::TYPE_DATETIME)] + public DateTime $createdAt; /** - * @var float $updatedAt + * @var DateTime $updatedAt */ - #[JsonProperty('updatedAt')] - public float $updatedAt; + #[JsonProperty('updatedAt'), Date(Date::TYPE_DATETIME)] + public DateTime $updatedAt; /** * @param array{ * id: string, * tenantId: string, * docId: string, - * layerMode: value-of, + * layerMode: value-of, * keepVisitorLayers: bool, * scope: array, * passphraseProtected: bool, - * sessionTtlSeconds: float, + * sessionTtlSeconds: int, * disabled: bool, - * exchangeCount: float, + * exchangeCount: int, * createdBy: string, - * createdAt: float, - * updatedAt: float, + * createdAt: DateTime, + * updatedAt: DateTime, * name?: ?string, * layerName?: ?string, - * visitorIdleSeconds?: ?float, - * visitorIdentity?: ?GrantsGet200ResponseGrantVisitorIdentity, + * visitorIdleSeconds?: ?int, + * visitorIdentity?: ?GrantsCreateResponseGrantVisitorIdentity, * identity?: ?Identity, * origins?: ?array, - * archivedAt?: ?float, - * expiresAt?: ?float, - * lastExchangedAt?: ?float, + * archivedAt?: ?DateTime, + * expiresAt?: ?DateTime, + * lastExchangedAt?: ?DateTime, * } $values */ public function __construct( diff --git a/src/Types/GrantsExchange200ResponseLayerMode.php b/src/Types/GrantsCreateResponseGrantLayerMode.php similarity index 68% rename from src/Types/GrantsExchange200ResponseLayerMode.php rename to src/Types/GrantsCreateResponseGrantLayerMode.php index 08954137..606e22ee 100644 --- a/src/Types/GrantsExchange200ResponseLayerMode.php +++ b/src/Types/GrantsCreateResponseGrantLayerMode.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum GrantsExchange200ResponseLayerMode: string +enum GrantsCreateResponseGrantLayerMode: string { case Shared = "shared"; case PerVisitor = "per-visitor"; diff --git a/src/Types/GrantsGet200ResponseGrantVisitorIdentity.php b/src/Types/GrantsCreateResponseGrantVisitorIdentity.php similarity index 71% rename from src/Types/GrantsGet200ResponseGrantVisitorIdentity.php rename to src/Types/GrantsCreateResponseGrantVisitorIdentity.php index 280c78b2..8638870e 100644 --- a/src/Types/GrantsGet200ResponseGrantVisitorIdentity.php +++ b/src/Types/GrantsCreateResponseGrantVisitorIdentity.php @@ -5,16 +5,16 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class GrantsGet200ResponseGrantVisitorIdentity extends JsonSerializableType +class GrantsCreateResponseGrantVisitorIdentity extends JsonSerializableType { /** - * @var GrantsGet200ResponseGrantVisitorIdentityFields $fields + * @var GrantsCreateResponseGrantVisitorIdentityFields $fields */ #[JsonProperty('fields')] - public GrantsGet200ResponseGrantVisitorIdentityFields $fields; + public GrantsCreateResponseGrantVisitorIdentityFields $fields; /** - * @var value-of $ask + * @var value-of $ask */ #[JsonProperty('ask')] public string $ask; @@ -33,8 +33,8 @@ class GrantsGet200ResponseGrantVisitorIdentity extends JsonSerializableType /** * @param array{ - * fields: GrantsGet200ResponseGrantVisitorIdentityFields, - * ask: value-of, + * fields: GrantsCreateResponseGrantVisitorIdentityFields, + * ask: value-of, * purpose?: ?string, * privacyUrl?: ?string, * } $values diff --git a/src/Types/GrantsGet200ResponseGrantVisitorIdentityAsk.php b/src/Types/GrantsCreateResponseGrantVisitorIdentityAsk.php similarity index 67% rename from src/Types/GrantsGet200ResponseGrantVisitorIdentityAsk.php rename to src/Types/GrantsCreateResponseGrantVisitorIdentityAsk.php index abf1964b..8041578d 100644 --- a/src/Types/GrantsGet200ResponseGrantVisitorIdentityAsk.php +++ b/src/Types/GrantsCreateResponseGrantVisitorIdentityAsk.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum GrantsGet200ResponseGrantVisitorIdentityAsk: string +enum GrantsCreateResponseGrantVisitorIdentityAsk: string { case OnOpen = "on-open"; case BeforeFirstChange = "before-first-change"; diff --git a/src/Types/GrantsGet200ResponseGrantVisitorIdentityFields.php b/src/Types/GrantsCreateResponseGrantVisitorIdentityFields.php similarity index 66% rename from src/Types/GrantsGet200ResponseGrantVisitorIdentityFields.php rename to src/Types/GrantsCreateResponseGrantVisitorIdentityFields.php index 91c06de4..bc0863e3 100644 --- a/src/Types/GrantsGet200ResponseGrantVisitorIdentityFields.php +++ b/src/Types/GrantsCreateResponseGrantVisitorIdentityFields.php @@ -5,45 +5,45 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class GrantsGet200ResponseGrantVisitorIdentityFields extends JsonSerializableType +class GrantsCreateResponseGrantVisitorIdentityFields extends JsonSerializableType { /** - * @var ?value-of $displayName + * @var ?value-of $displayName */ #[JsonProperty('displayName')] public ?string $displayName; /** - * @var ?value-of $email + * @var ?value-of $email */ #[JsonProperty('email')] public ?string $email; /** - * @var ?value-of $title + * @var ?value-of $title */ #[JsonProperty('title')] public ?string $title; /** - * @var ?value-of $organization + * @var ?value-of $organization */ #[JsonProperty('organization')] public ?string $organization; /** - * @var ?value-of $organizationalUnit + * @var ?value-of $organizationalUnit */ #[JsonProperty('organizationalUnit')] public ?string $organizationalUnit; /** * @param array{ - * displayName?: ?value-of, - * email?: ?value-of, - * title?: ?value-of, - * organization?: ?value-of, - * organizationalUnit?: ?value-of, + * displayName?: ?value-of, + * email?: ?value-of, + * title?: ?value-of, + * organization?: ?value-of, + * organizationalUnit?: ?value-of, * } $values */ public function __construct( diff --git a/src/Types/GrantsGet200ResponseGrantVisitorIdentityFieldsDisplayName.php b/src/Types/GrantsCreateResponseGrantVisitorIdentityFieldsDisplayName.php similarity index 63% rename from src/Types/GrantsGet200ResponseGrantVisitorIdentityFieldsDisplayName.php rename to src/Types/GrantsCreateResponseGrantVisitorIdentityFieldsDisplayName.php index 6d6a2325..91fe4649 100644 --- a/src/Types/GrantsGet200ResponseGrantVisitorIdentityFieldsDisplayName.php +++ b/src/Types/GrantsCreateResponseGrantVisitorIdentityFieldsDisplayName.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum GrantsGet200ResponseGrantVisitorIdentityFieldsDisplayName: string +enum GrantsCreateResponseGrantVisitorIdentityFieldsDisplayName: string { case Required = "required"; case Optional = "optional"; diff --git a/src/Types/GrantsGet200ResponseGrantVisitorIdentityFieldsEmail.php b/src/Types/GrantsCreateResponseGrantVisitorIdentityFieldsEmail.php similarity index 61% rename from src/Types/GrantsGet200ResponseGrantVisitorIdentityFieldsEmail.php rename to src/Types/GrantsCreateResponseGrantVisitorIdentityFieldsEmail.php index d7e1a54c..9e9f7938 100644 --- a/src/Types/GrantsGet200ResponseGrantVisitorIdentityFieldsEmail.php +++ b/src/Types/GrantsCreateResponseGrantVisitorIdentityFieldsEmail.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum GrantsGet200ResponseGrantVisitorIdentityFieldsEmail: string +enum GrantsCreateResponseGrantVisitorIdentityFieldsEmail: string { case Required = "required"; case Optional = "optional"; diff --git a/src/Types/GrantsExchange200ResponseVisitorIdentityRequestFieldsTitle.php b/src/Types/GrantsCreateResponseGrantVisitorIdentityFieldsOrganization.php similarity index 63% rename from src/Types/GrantsExchange200ResponseVisitorIdentityRequestFieldsTitle.php rename to src/Types/GrantsCreateResponseGrantVisitorIdentityFieldsOrganization.php index 1e937d14..c6a1d86e 100644 --- a/src/Types/GrantsExchange200ResponseVisitorIdentityRequestFieldsTitle.php +++ b/src/Types/GrantsCreateResponseGrantVisitorIdentityFieldsOrganization.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum GrantsExchange200ResponseVisitorIdentityRequestFieldsTitle: string +enum GrantsCreateResponseGrantVisitorIdentityFieldsOrganization: string { case Required = "required"; case Optional = "optional"; diff --git a/src/Types/GrantsGet200ResponseGrantVisitorIdentityFieldsOrganizationalUnit.php b/src/Types/GrantsCreateResponseGrantVisitorIdentityFieldsOrganizationalUnit.php similarity index 64% rename from src/Types/GrantsGet200ResponseGrantVisitorIdentityFieldsOrganizationalUnit.php rename to src/Types/GrantsCreateResponseGrantVisitorIdentityFieldsOrganizationalUnit.php index 1bbc1562..d862b6a1 100644 --- a/src/Types/GrantsGet200ResponseGrantVisitorIdentityFieldsOrganizationalUnit.php +++ b/src/Types/GrantsCreateResponseGrantVisitorIdentityFieldsOrganizationalUnit.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum GrantsGet200ResponseGrantVisitorIdentityFieldsOrganizationalUnit: string +enum GrantsCreateResponseGrantVisitorIdentityFieldsOrganizationalUnit: string { case Required = "required"; case Optional = "optional"; diff --git a/src/Types/GrantsGet200ResponseGrantVisitorIdentityFieldsTitle.php b/src/Types/GrantsCreateResponseGrantVisitorIdentityFieldsTitle.php similarity index 61% rename from src/Types/GrantsGet200ResponseGrantVisitorIdentityFieldsTitle.php rename to src/Types/GrantsCreateResponseGrantVisitorIdentityFieldsTitle.php index ea7abe9e..33feedd1 100644 --- a/src/Types/GrantsGet200ResponseGrantVisitorIdentityFieldsTitle.php +++ b/src/Types/GrantsCreateResponseGrantVisitorIdentityFieldsTitle.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum GrantsGet200ResponseGrantVisitorIdentityFieldsTitle: string +enum GrantsCreateResponseGrantVisitorIdentityFieldsTitle: string { case Required = "required"; case Optional = "optional"; diff --git a/src/Types/GrantsExchange200ResponseVisitorIdentityRequestFields.php b/src/Types/GrantsExchange200ResponseVisitorIdentityRequestFields.php deleted file mode 100644 index 0bd433d9..00000000 --- a/src/Types/GrantsExchange200ResponseVisitorIdentityRequestFields.php +++ /dev/null @@ -1,66 +0,0 @@ - $displayName - */ - #[JsonProperty('displayName')] - public ?string $displayName; - - /** - * @var ?value-of $email - */ - #[JsonProperty('email')] - public ?string $email; - - /** - * @var ?value-of $title - */ - #[JsonProperty('title')] - public ?string $title; - - /** - * @var ?value-of $organization - */ - #[JsonProperty('organization')] - public ?string $organization; - - /** - * @var ?value-of $organizationalUnit - */ - #[JsonProperty('organizationalUnit')] - public ?string $organizationalUnit; - - /** - * @param array{ - * displayName?: ?value-of, - * email?: ?value-of, - * title?: ?value-of, - * organization?: ?value-of, - * organizationalUnit?: ?value-of, - * } $values - */ - public function __construct( - array $values = [], - ) { - $this->displayName = $values['displayName'] ?? null; - $this->email = $values['email'] ?? null; - $this->title = $values['title'] ?? null; - $this->organization = $values['organization'] ?? null; - $this->organizationalUnit = $values['organizationalUnit'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/GrantsExchange200ResponseVisitorIdentityRequestFieldsDisplayName.php b/src/Types/GrantsExchange200ResponseVisitorIdentityRequestFieldsDisplayName.php deleted file mode 100644 index ea3c822e..00000000 --- a/src/Types/GrantsExchange200ResponseVisitorIdentityRequestFieldsDisplayName.php +++ /dev/null @@ -1,9 +0,0 @@ - $layerMode + * @var value-of $layerMode */ #[JsonProperty('layerMode')] public string $layerMode; /** - * @var GrantsExchange200ResponseVisitor $visitor + * @var GrantsExchangeResponseVisitor $visitor */ #[JsonProperty('visitor')] - public GrantsExchange200ResponseVisitor $visitor; + public GrantsExchangeResponseVisitor $visitor; /** - * @var float $expiresAt + * @var DateTime $expiresAt */ - #[JsonProperty('expiresAt')] - public float $expiresAt; + #[JsonProperty('expiresAt'), Date(Date::TYPE_DATETIME)] + public DateTime $expiresAt; /** * @param array{ * token: string, * docId: string, * layerName: string, - * layerMode: value-of, - * visitor: GrantsExchange200ResponseVisitor, - * expiresAt: float, + * layerMode: value-of, + * visitor: GrantsExchangeResponseVisitor, + * expiresAt: DateTime, * } $values */ public function __construct( diff --git a/src/Types/GrantsGet200ResponseGrantLayerMode.php b/src/Types/GrantsExchangeResponseLayerMode.php similarity index 68% rename from src/Types/GrantsGet200ResponseGrantLayerMode.php rename to src/Types/GrantsExchangeResponseLayerMode.php index 7e8fa82c..ccaa43d5 100644 --- a/src/Types/GrantsGet200ResponseGrantLayerMode.php +++ b/src/Types/GrantsExchangeResponseLayerMode.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum GrantsGet200ResponseGrantLayerMode: string +enum GrantsExchangeResponseLayerMode: string { case Shared = "shared"; case PerVisitor = "per-visitor"; diff --git a/src/Types/GrantsExchange200ResponseVisitor.php b/src/Types/GrantsExchangeResponseVisitor.php similarity index 73% rename from src/Types/GrantsExchange200ResponseVisitor.php rename to src/Types/GrantsExchangeResponseVisitor.php index 83b8882c..da50d9bc 100644 --- a/src/Types/GrantsExchange200ResponseVisitor.php +++ b/src/Types/GrantsExchangeResponseVisitor.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class GrantsExchange200ResponseVisitor extends JsonSerializableType +class GrantsExchangeResponseVisitor extends JsonSerializableType { /** * @var string $handle @@ -20,16 +20,16 @@ class GrantsExchange200ResponseVisitor extends JsonSerializableType public bool $keep; /** - * @var ?GrantsExchange200ResponseVisitorIdentityRequest $identityRequest + * @var ?GrantsExchangeResponseVisitorIdentityRequest $identityRequest */ #[JsonProperty('identityRequest')] - public ?GrantsExchange200ResponseVisitorIdentityRequest $identityRequest; + public ?GrantsExchangeResponseVisitorIdentityRequest $identityRequest; /** * @param array{ * handle: string, * keep: bool, - * identityRequest?: ?GrantsExchange200ResponseVisitorIdentityRequest, + * identityRequest?: ?GrantsExchangeResponseVisitorIdentityRequest, * } $values */ public function __construct( diff --git a/src/Types/GrantsExchange200ResponseVisitorIdentityRequest.php b/src/Types/GrantsExchangeResponseVisitorIdentityRequest.php similarity index 63% rename from src/Types/GrantsExchange200ResponseVisitorIdentityRequest.php rename to src/Types/GrantsExchangeResponseVisitorIdentityRequest.php index 0e466ab8..73beea5f 100644 --- a/src/Types/GrantsExchange200ResponseVisitorIdentityRequest.php +++ b/src/Types/GrantsExchangeResponseVisitorIdentityRequest.php @@ -6,22 +6,22 @@ use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; -class GrantsExchange200ResponseVisitorIdentityRequest extends JsonSerializableType +class GrantsExchangeResponseVisitorIdentityRequest extends JsonSerializableType { /** - * @var GrantsExchange200ResponseVisitorIdentityRequestFields $fields + * @var GrantsExchangeResponseVisitorIdentityRequestFields $fields */ #[JsonProperty('fields')] - public GrantsExchange200ResponseVisitorIdentityRequestFields $fields; + public GrantsExchangeResponseVisitorIdentityRequestFields $fields; /** - * @var array> $missing + * @var array> $missing */ #[JsonProperty('missing'), ArrayType(['string'])] public array $missing; /** - * @var array> $invalid + * @var array> $invalid */ #[JsonProperty('invalid'), ArrayType(['string'])] public array $invalid; @@ -40,9 +40,9 @@ class GrantsExchange200ResponseVisitorIdentityRequest extends JsonSerializableTy /** * @param array{ - * fields: GrantsExchange200ResponseVisitorIdentityRequestFields, - * missing: array>, - * invalid: array>, + * fields: GrantsExchangeResponseVisitorIdentityRequestFields, + * missing: array>, + * invalid: array>, * purpose?: ?string, * privacyUrl?: ?string, * } $values diff --git a/src/Types/GrantsArchive200ResponseGrantVisitorIdentityFields.php b/src/Types/GrantsExchangeResponseVisitorIdentityRequestFields.php similarity index 52% rename from src/Types/GrantsArchive200ResponseGrantVisitorIdentityFields.php rename to src/Types/GrantsExchangeResponseVisitorIdentityRequestFields.php index 452e5248..1f10686a 100644 --- a/src/Types/GrantsArchive200ResponseGrantVisitorIdentityFields.php +++ b/src/Types/GrantsExchangeResponseVisitorIdentityRequestFields.php @@ -5,45 +5,45 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class GrantsArchive200ResponseGrantVisitorIdentityFields extends JsonSerializableType +class GrantsExchangeResponseVisitorIdentityRequestFields extends JsonSerializableType { /** - * @var ?value-of $displayName + * @var ?value-of $displayName */ #[JsonProperty('displayName')] public ?string $displayName; /** - * @var ?value-of $email + * @var ?value-of $email */ #[JsonProperty('email')] public ?string $email; /** - * @var ?value-of $title + * @var ?value-of $title */ #[JsonProperty('title')] public ?string $title; /** - * @var ?value-of $organization + * @var ?value-of $organization */ #[JsonProperty('organization')] public ?string $organization; /** - * @var ?value-of $organizationalUnit + * @var ?value-of $organizationalUnit */ #[JsonProperty('organizationalUnit')] public ?string $organizationalUnit; /** * @param array{ - * displayName?: ?value-of, - * email?: ?value-of, - * title?: ?value-of, - * organization?: ?value-of, - * organizationalUnit?: ?value-of, + * displayName?: ?value-of, + * email?: ?value-of, + * title?: ?value-of, + * organization?: ?value-of, + * organizationalUnit?: ?value-of, * } $values */ public function __construct( diff --git a/src/Types/GrantsArchive200ResponseGrantVisitorIdentityFieldsDisplayName.php b/src/Types/GrantsExchangeResponseVisitorIdentityRequestFieldsDisplayName.php similarity index 63% rename from src/Types/GrantsArchive200ResponseGrantVisitorIdentityFieldsDisplayName.php rename to src/Types/GrantsExchangeResponseVisitorIdentityRequestFieldsDisplayName.php index df84ceef..75c6244e 100644 --- a/src/Types/GrantsArchive200ResponseGrantVisitorIdentityFieldsDisplayName.php +++ b/src/Types/GrantsExchangeResponseVisitorIdentityRequestFieldsDisplayName.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum GrantsArchive200ResponseGrantVisitorIdentityFieldsDisplayName: string +enum GrantsExchangeResponseVisitorIdentityRequestFieldsDisplayName: string { case Required = "required"; case Optional = "optional"; diff --git a/src/Types/GrantsArchive200ResponseGrantVisitorIdentityFieldsTitle.php b/src/Types/GrantsExchangeResponseVisitorIdentityRequestFieldsEmail.php similarity index 62% rename from src/Types/GrantsArchive200ResponseGrantVisitorIdentityFieldsTitle.php rename to src/Types/GrantsExchangeResponseVisitorIdentityRequestFieldsEmail.php index be405d4b..bc067142 100644 --- a/src/Types/GrantsArchive200ResponseGrantVisitorIdentityFieldsTitle.php +++ b/src/Types/GrantsExchangeResponseVisitorIdentityRequestFieldsEmail.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum GrantsArchive200ResponseGrantVisitorIdentityFieldsTitle: string +enum GrantsExchangeResponseVisitorIdentityRequestFieldsEmail: string { case Required = "required"; case Optional = "optional"; diff --git a/src/Types/GrantsArchive200ResponseGrantVisitorIdentityFieldsOrganization.php b/src/Types/GrantsExchangeResponseVisitorIdentityRequestFieldsOrganization.php similarity index 64% rename from src/Types/GrantsArchive200ResponseGrantVisitorIdentityFieldsOrganization.php rename to src/Types/GrantsExchangeResponseVisitorIdentityRequestFieldsOrganization.php index 6282eaab..4aa5b1cd 100644 --- a/src/Types/GrantsArchive200ResponseGrantVisitorIdentityFieldsOrganization.php +++ b/src/Types/GrantsExchangeResponseVisitorIdentityRequestFieldsOrganization.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum GrantsArchive200ResponseGrantVisitorIdentityFieldsOrganization: string +enum GrantsExchangeResponseVisitorIdentityRequestFieldsOrganization: string { case Required = "required"; case Optional = "optional"; diff --git a/src/Types/GrantsArchive200ResponseGrantVisitorIdentityFieldsOrganizationalUnit.php b/src/Types/GrantsExchangeResponseVisitorIdentityRequestFieldsOrganizationalUnit.php similarity index 65% rename from src/Types/GrantsArchive200ResponseGrantVisitorIdentityFieldsOrganizationalUnit.php rename to src/Types/GrantsExchangeResponseVisitorIdentityRequestFieldsOrganizationalUnit.php index 947467a9..5e3f3a3b 100644 --- a/src/Types/GrantsArchive200ResponseGrantVisitorIdentityFieldsOrganizationalUnit.php +++ b/src/Types/GrantsExchangeResponseVisitorIdentityRequestFieldsOrganizationalUnit.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum GrantsArchive200ResponseGrantVisitorIdentityFieldsOrganizationalUnit: string +enum GrantsExchangeResponseVisitorIdentityRequestFieldsOrganizationalUnit: string { case Required = "required"; case Optional = "optional"; diff --git a/src/Types/GrantsArchive200ResponseGrantVisitorIdentityFieldsEmail.php b/src/Types/GrantsExchangeResponseVisitorIdentityRequestFieldsTitle.php similarity index 62% rename from src/Types/GrantsArchive200ResponseGrantVisitorIdentityFieldsEmail.php rename to src/Types/GrantsExchangeResponseVisitorIdentityRequestFieldsTitle.php index d9976f35..a98eac26 100644 --- a/src/Types/GrantsArchive200ResponseGrantVisitorIdentityFieldsEmail.php +++ b/src/Types/GrantsExchangeResponseVisitorIdentityRequestFieldsTitle.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum GrantsArchive200ResponseGrantVisitorIdentityFieldsEmail: string +enum GrantsExchangeResponseVisitorIdentityRequestFieldsTitle: string { case Required = "required"; case Optional = "optional"; diff --git a/src/Types/GrantsExchange200ResponseVisitorIdentityRequestInvalidItem.php b/src/Types/GrantsExchangeResponseVisitorIdentityRequestInvalidItem.php similarity index 75% rename from src/Types/GrantsExchange200ResponseVisitorIdentityRequestInvalidItem.php rename to src/Types/GrantsExchangeResponseVisitorIdentityRequestInvalidItem.php index dc172532..c5dde60f 100644 --- a/src/Types/GrantsExchange200ResponseVisitorIdentityRequestInvalidItem.php +++ b/src/Types/GrantsExchangeResponseVisitorIdentityRequestInvalidItem.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum GrantsExchange200ResponseVisitorIdentityRequestInvalidItem: string +enum GrantsExchangeResponseVisitorIdentityRequestInvalidItem: string { case DisplayName = "displayName"; case Email = "email"; diff --git a/src/Types/GrantsExchange200ResponseVisitorIdentityRequestMissingItem.php b/src/Types/GrantsExchangeResponseVisitorIdentityRequestMissingItem.php similarity index 75% rename from src/Types/GrantsExchange200ResponseVisitorIdentityRequestMissingItem.php rename to src/Types/GrantsExchangeResponseVisitorIdentityRequestMissingItem.php index 877f4eaf..b7fc6518 100644 --- a/src/Types/GrantsExchange200ResponseVisitorIdentityRequestMissingItem.php +++ b/src/Types/GrantsExchangeResponseVisitorIdentityRequestMissingItem.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum GrantsExchange200ResponseVisitorIdentityRequestMissingItem: string +enum GrantsExchangeResponseVisitorIdentityRequestMissingItem: string { case DisplayName = "displayName"; case Email = "email"; diff --git a/src/Types/GrantsUpdate200Response.php b/src/Types/GrantsGetResponse.php similarity index 69% rename from src/Types/GrantsUpdate200Response.php rename to src/Types/GrantsGetResponse.php index 98a848da..86236729 100644 --- a/src/Types/GrantsUpdate200Response.php +++ b/src/Types/GrantsGetResponse.php @@ -5,17 +5,17 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class GrantsUpdate200Response extends JsonSerializableType +class GrantsGetResponse extends JsonSerializableType { /** - * @var GrantsUpdate200ResponseGrant $grant + * @var GrantsGetResponseGrant $grant */ #[JsonProperty('grant')] - public GrantsUpdate200ResponseGrant $grant; + public GrantsGetResponseGrant $grant; /** * @param array{ - * grant: GrantsUpdate200ResponseGrant, + * grant: GrantsGetResponseGrant, * } $values */ public function __construct( diff --git a/src/Types/GrantsArchive200ResponseGrant.php b/src/Types/GrantsGetResponseGrant.php similarity index 70% rename from src/Types/GrantsArchive200ResponseGrant.php rename to src/Types/GrantsGetResponseGrant.php index f870e2bd..3d879f04 100644 --- a/src/Types/GrantsArchive200ResponseGrant.php +++ b/src/Types/GrantsGetResponseGrant.php @@ -5,8 +5,10 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; +use DateTime; +use CloudPDF\Core\Types\Date; -class GrantsArchive200ResponseGrant extends JsonSerializableType +class GrantsGetResponseGrant extends JsonSerializableType { /** * @var string $id @@ -33,7 +35,7 @@ class GrantsArchive200ResponseGrant extends JsonSerializableType public ?string $name; /** - * @var value-of $layerMode + * @var value-of $layerMode */ #[JsonProperty('layerMode')] public string $layerMode; @@ -51,16 +53,16 @@ class GrantsArchive200ResponseGrant extends JsonSerializableType public bool $keepVisitorLayers; /** - * @var ?float $visitorIdleSeconds + * @var ?int $visitorIdleSeconds */ #[JsonProperty('visitorIdleSeconds')] - public ?float $visitorIdleSeconds; + public ?int $visitorIdleSeconds; /** - * @var ?GrantsArchive200ResponseGrantVisitorIdentity $visitorIdentity + * @var ?GrantsGetResponseGrantVisitorIdentity $visitorIdentity */ #[JsonProperty('visitorIdentity')] - public ?GrantsArchive200ResponseGrantVisitorIdentity $visitorIdentity; + public ?GrantsGetResponseGrantVisitorIdentity $visitorIdentity; /** * @var ?Identity $identity @@ -87,10 +89,10 @@ class GrantsArchive200ResponseGrant extends JsonSerializableType public bool $passphraseProtected; /** - * @var float $sessionTtlSeconds + * @var int $sessionTtlSeconds */ #[JsonProperty('sessionTtlSeconds')] - public float $sessionTtlSeconds; + public int $sessionTtlSeconds; /** * @var bool $disabled @@ -99,28 +101,28 @@ class GrantsArchive200ResponseGrant extends JsonSerializableType public bool $disabled; /** - * @var ?float $archivedAt + * @var ?DateTime $archivedAt */ - #[JsonProperty('archivedAt')] - public ?float $archivedAt; + #[JsonProperty('archivedAt'), Date(Date::TYPE_DATETIME)] + public ?DateTime $archivedAt; /** - * @var ?float $expiresAt + * @var ?DateTime $expiresAt */ - #[JsonProperty('expiresAt')] - public ?float $expiresAt; + #[JsonProperty('expiresAt'), Date(Date::TYPE_DATETIME)] + public ?DateTime $expiresAt; /** - * @var float $exchangeCount + * @var int $exchangeCount */ #[JsonProperty('exchangeCount')] - public float $exchangeCount; + public int $exchangeCount; /** - * @var ?float $lastExchangedAt + * @var ?DateTime $lastExchangedAt */ - #[JsonProperty('lastExchangedAt')] - public ?float $lastExchangedAt; + #[JsonProperty('lastExchangedAt'), Date(Date::TYPE_DATETIME)] + public ?DateTime $lastExchangedAt; /** * @var string $createdBy @@ -129,41 +131,41 @@ class GrantsArchive200ResponseGrant extends JsonSerializableType public string $createdBy; /** - * @var float $createdAt + * @var DateTime $createdAt */ - #[JsonProperty('createdAt')] - public float $createdAt; + #[JsonProperty('createdAt'), Date(Date::TYPE_DATETIME)] + public DateTime $createdAt; /** - * @var float $updatedAt + * @var DateTime $updatedAt */ - #[JsonProperty('updatedAt')] - public float $updatedAt; + #[JsonProperty('updatedAt'), Date(Date::TYPE_DATETIME)] + public DateTime $updatedAt; /** * @param array{ * id: string, * tenantId: string, * docId: string, - * layerMode: value-of, + * layerMode: value-of, * keepVisitorLayers: bool, * scope: array, * passphraseProtected: bool, - * sessionTtlSeconds: float, + * sessionTtlSeconds: int, * disabled: bool, - * exchangeCount: float, + * exchangeCount: int, * createdBy: string, - * createdAt: float, - * updatedAt: float, + * createdAt: DateTime, + * updatedAt: DateTime, * name?: ?string, * layerName?: ?string, - * visitorIdleSeconds?: ?float, - * visitorIdentity?: ?GrantsArchive200ResponseGrantVisitorIdentity, + * visitorIdleSeconds?: ?int, + * visitorIdentity?: ?GrantsGetResponseGrantVisitorIdentity, * identity?: ?Identity, * origins?: ?array, - * archivedAt?: ?float, - * expiresAt?: ?float, - * lastExchangedAt?: ?float, + * archivedAt?: ?DateTime, + * expiresAt?: ?DateTime, + * lastExchangedAt?: ?DateTime, * } $values */ public function __construct( diff --git a/src/Types/GrantsCreate200ResponseGrantLayerMode.php b/src/Types/GrantsGetResponseGrantLayerMode.php similarity index 66% rename from src/Types/GrantsCreate200ResponseGrantLayerMode.php rename to src/Types/GrantsGetResponseGrantLayerMode.php index 56ddf11e..be0a5362 100644 --- a/src/Types/GrantsCreate200ResponseGrantLayerMode.php +++ b/src/Types/GrantsGetResponseGrantLayerMode.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum GrantsCreate200ResponseGrantLayerMode: string +enum GrantsGetResponseGrantLayerMode: string { case Shared = "shared"; case PerVisitor = "per-visitor"; diff --git a/src/Types/GrantsArchive200ResponseGrantVisitorIdentity.php b/src/Types/GrantsGetResponseGrantVisitorIdentity.php similarity index 68% rename from src/Types/GrantsArchive200ResponseGrantVisitorIdentity.php rename to src/Types/GrantsGetResponseGrantVisitorIdentity.php index 5e51465c..ca880b59 100644 --- a/src/Types/GrantsArchive200ResponseGrantVisitorIdentity.php +++ b/src/Types/GrantsGetResponseGrantVisitorIdentity.php @@ -5,16 +5,16 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class GrantsArchive200ResponseGrantVisitorIdentity extends JsonSerializableType +class GrantsGetResponseGrantVisitorIdentity extends JsonSerializableType { /** - * @var GrantsArchive200ResponseGrantVisitorIdentityFields $fields + * @var GrantsGetResponseGrantVisitorIdentityFields $fields */ #[JsonProperty('fields')] - public GrantsArchive200ResponseGrantVisitorIdentityFields $fields; + public GrantsGetResponseGrantVisitorIdentityFields $fields; /** - * @var value-of $ask + * @var value-of $ask */ #[JsonProperty('ask')] public string $ask; @@ -33,8 +33,8 @@ class GrantsArchive200ResponseGrantVisitorIdentity extends JsonSerializableType /** * @param array{ - * fields: GrantsArchive200ResponseGrantVisitorIdentityFields, - * ask: value-of, + * fields: GrantsGetResponseGrantVisitorIdentityFields, + * ask: value-of, * purpose?: ?string, * privacyUrl?: ?string, * } $values diff --git a/src/Types/GrantsUpdate200ResponseGrantVisitorIdentityAsk.php b/src/Types/GrantsGetResponseGrantVisitorIdentityAsk.php similarity index 66% rename from src/Types/GrantsUpdate200ResponseGrantVisitorIdentityAsk.php rename to src/Types/GrantsGetResponseGrantVisitorIdentityAsk.php index 6549e30f..ccc631f1 100644 --- a/src/Types/GrantsUpdate200ResponseGrantVisitorIdentityAsk.php +++ b/src/Types/GrantsGetResponseGrantVisitorIdentityAsk.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum GrantsUpdate200ResponseGrantVisitorIdentityAsk: string +enum GrantsGetResponseGrantVisitorIdentityAsk: string { case OnOpen = "on-open"; case BeforeFirstChange = "before-first-change"; diff --git a/src/Types/GrantsGetResponseGrantVisitorIdentityFields.php b/src/Types/GrantsGetResponseGrantVisitorIdentityFields.php new file mode 100644 index 00000000..bc4edca7 --- /dev/null +++ b/src/Types/GrantsGetResponseGrantVisitorIdentityFields.php @@ -0,0 +1,66 @@ + $displayName + */ + #[JsonProperty('displayName')] + public ?string $displayName; + + /** + * @var ?value-of $email + */ + #[JsonProperty('email')] + public ?string $email; + + /** + * @var ?value-of $title + */ + #[JsonProperty('title')] + public ?string $title; + + /** + * @var ?value-of $organization + */ + #[JsonProperty('organization')] + public ?string $organization; + + /** + * @var ?value-of $organizationalUnit + */ + #[JsonProperty('organizationalUnit')] + public ?string $organizationalUnit; + + /** + * @param array{ + * displayName?: ?value-of, + * email?: ?value-of, + * title?: ?value-of, + * organization?: ?value-of, + * organizationalUnit?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->displayName = $values['displayName'] ?? null; + $this->email = $values['email'] ?? null; + $this->title = $values['title'] ?? null; + $this->organization = $values['organization'] ?? null; + $this->organizationalUnit = $values['organizationalUnit'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/GrantsCreate200ResponseGrantVisitorIdentityFieldsEmail.php b/src/Types/GrantsGetResponseGrantVisitorIdentityFieldsDisplayName.php similarity index 62% rename from src/Types/GrantsCreate200ResponseGrantVisitorIdentityFieldsEmail.php rename to src/Types/GrantsGetResponseGrantVisitorIdentityFieldsDisplayName.php index 5328d680..ae5f0a4a 100644 --- a/src/Types/GrantsCreate200ResponseGrantVisitorIdentityFieldsEmail.php +++ b/src/Types/GrantsGetResponseGrantVisitorIdentityFieldsDisplayName.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum GrantsCreate200ResponseGrantVisitorIdentityFieldsEmail: string +enum GrantsGetResponseGrantVisitorIdentityFieldsDisplayName: string { case Required = "required"; case Optional = "optional"; diff --git a/src/Types/GrantsGetResponseGrantVisitorIdentityFieldsEmail.php b/src/Types/GrantsGetResponseGrantVisitorIdentityFieldsEmail.php new file mode 100644 index 00000000..66ee2ead --- /dev/null +++ b/src/Types/GrantsGetResponseGrantVisitorIdentityFieldsEmail.php @@ -0,0 +1,9 @@ + $ask - */ - #[JsonProperty('ask')] - public string $ask; - - /** - * @var ?string $purpose - */ - #[JsonProperty('purpose')] - public ?string $purpose; - - /** - * @var ?string $privacyUrl - */ - #[JsonProperty('privacyUrl')] - public ?string $privacyUrl; - - /** - * @param array{ - * fields: GrantsList200ResponseGrantsItemVisitorIdentityFields, - * ask: value-of, - * purpose?: ?string, - * privacyUrl?: ?string, - * } $values - */ - public function __construct( - array $values, - ) { - $this->fields = $values['fields']; - $this->ask = $values['ask']; - $this->purpose = $values['purpose'] ?? null; - $this->privacyUrl = $values['privacyUrl'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/GrantsList200ResponseGrantsItemVisitorIdentityAsk.php b/src/Types/GrantsList200ResponseGrantsItemVisitorIdentityAsk.php deleted file mode 100644 index adc0d7a6..00000000 --- a/src/Types/GrantsList200ResponseGrantsItemVisitorIdentityAsk.php +++ /dev/null @@ -1,9 +0,0 @@ - $displayName - */ - #[JsonProperty('displayName')] - public ?string $displayName; - - /** - * @var ?value-of $email - */ - #[JsonProperty('email')] - public ?string $email; - - /** - * @var ?value-of $title - */ - #[JsonProperty('title')] - public ?string $title; - - /** - * @var ?value-of $organization - */ - #[JsonProperty('organization')] - public ?string $organization; - - /** - * @var ?value-of $organizationalUnit - */ - #[JsonProperty('organizationalUnit')] - public ?string $organizationalUnit; - - /** - * @param array{ - * displayName?: ?value-of, - * email?: ?value-of, - * title?: ?value-of, - * organization?: ?value-of, - * organizationalUnit?: ?value-of, - * } $values - */ - public function __construct( - array $values = [], - ) { - $this->displayName = $values['displayName'] ?? null; - $this->email = $values['email'] ?? null; - $this->title = $values['title'] ?? null; - $this->organization = $values['organization'] ?? null; - $this->organizationalUnit = $values['organizationalUnit'] ?? null; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/GrantsList200ResponseGrantsItemVisitorIdentityFieldsDisplayName.php b/src/Types/GrantsList200ResponseGrantsItemVisitorIdentityFieldsDisplayName.php deleted file mode 100644 index 6dc3198f..00000000 --- a/src/Types/GrantsList200ResponseGrantsItemVisitorIdentityFieldsDisplayName.php +++ /dev/null @@ -1,9 +0,0 @@ - $grants + * @var array $grants */ - #[JsonProperty('grants'), ArrayType([GrantsList200ResponseGrantsItem::class])] + #[JsonProperty('grants'), ArrayType([GrantsListResponseGrantsItem::class])] public array $grants; /** @@ -22,7 +22,7 @@ class GrantsList200Response extends JsonSerializableType /** * @param array{ - * grants: array, + * grants: array, * nextCursor?: ?string, * } $values */ diff --git a/src/Types/GrantsUpdate200ResponseGrant.php b/src/Types/GrantsListResponseGrantsItem.php similarity index 70% rename from src/Types/GrantsUpdate200ResponseGrant.php rename to src/Types/GrantsListResponseGrantsItem.php index b662d460..e306ffb9 100644 --- a/src/Types/GrantsUpdate200ResponseGrant.php +++ b/src/Types/GrantsListResponseGrantsItem.php @@ -5,8 +5,10 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; +use DateTime; +use CloudPDF\Core\Types\Date; -class GrantsUpdate200ResponseGrant extends JsonSerializableType +class GrantsListResponseGrantsItem extends JsonSerializableType { /** * @var string $id @@ -33,7 +35,7 @@ class GrantsUpdate200ResponseGrant extends JsonSerializableType public ?string $name; /** - * @var value-of $layerMode + * @var value-of $layerMode */ #[JsonProperty('layerMode')] public string $layerMode; @@ -51,16 +53,16 @@ class GrantsUpdate200ResponseGrant extends JsonSerializableType public bool $keepVisitorLayers; /** - * @var ?float $visitorIdleSeconds + * @var ?int $visitorIdleSeconds */ #[JsonProperty('visitorIdleSeconds')] - public ?float $visitorIdleSeconds; + public ?int $visitorIdleSeconds; /** - * @var ?GrantsUpdate200ResponseGrantVisitorIdentity $visitorIdentity + * @var ?GrantsListResponseGrantsItemVisitorIdentity $visitorIdentity */ #[JsonProperty('visitorIdentity')] - public ?GrantsUpdate200ResponseGrantVisitorIdentity $visitorIdentity; + public ?GrantsListResponseGrantsItemVisitorIdentity $visitorIdentity; /** * @var ?Identity $identity @@ -87,10 +89,10 @@ class GrantsUpdate200ResponseGrant extends JsonSerializableType public bool $passphraseProtected; /** - * @var float $sessionTtlSeconds + * @var int $sessionTtlSeconds */ #[JsonProperty('sessionTtlSeconds')] - public float $sessionTtlSeconds; + public int $sessionTtlSeconds; /** * @var bool $disabled @@ -99,28 +101,28 @@ class GrantsUpdate200ResponseGrant extends JsonSerializableType public bool $disabled; /** - * @var ?float $archivedAt + * @var ?DateTime $archivedAt */ - #[JsonProperty('archivedAt')] - public ?float $archivedAt; + #[JsonProperty('archivedAt'), Date(Date::TYPE_DATETIME)] + public ?DateTime $archivedAt; /** - * @var ?float $expiresAt + * @var ?DateTime $expiresAt */ - #[JsonProperty('expiresAt')] - public ?float $expiresAt; + #[JsonProperty('expiresAt'), Date(Date::TYPE_DATETIME)] + public ?DateTime $expiresAt; /** - * @var float $exchangeCount + * @var int $exchangeCount */ #[JsonProperty('exchangeCount')] - public float $exchangeCount; + public int $exchangeCount; /** - * @var ?float $lastExchangedAt + * @var ?DateTime $lastExchangedAt */ - #[JsonProperty('lastExchangedAt')] - public ?float $lastExchangedAt; + #[JsonProperty('lastExchangedAt'), Date(Date::TYPE_DATETIME)] + public ?DateTime $lastExchangedAt; /** * @var string $createdBy @@ -129,41 +131,41 @@ class GrantsUpdate200ResponseGrant extends JsonSerializableType public string $createdBy; /** - * @var float $createdAt + * @var DateTime $createdAt */ - #[JsonProperty('createdAt')] - public float $createdAt; + #[JsonProperty('createdAt'), Date(Date::TYPE_DATETIME)] + public DateTime $createdAt; /** - * @var float $updatedAt + * @var DateTime $updatedAt */ - #[JsonProperty('updatedAt')] - public float $updatedAt; + #[JsonProperty('updatedAt'), Date(Date::TYPE_DATETIME)] + public DateTime $updatedAt; /** * @param array{ * id: string, * tenantId: string, * docId: string, - * layerMode: value-of, + * layerMode: value-of, * keepVisitorLayers: bool, * scope: array, * passphraseProtected: bool, - * sessionTtlSeconds: float, + * sessionTtlSeconds: int, * disabled: bool, - * exchangeCount: float, + * exchangeCount: int, * createdBy: string, - * createdAt: float, - * updatedAt: float, + * createdAt: DateTime, + * updatedAt: DateTime, * name?: ?string, * layerName?: ?string, - * visitorIdleSeconds?: ?float, - * visitorIdentity?: ?GrantsUpdate200ResponseGrantVisitorIdentity, + * visitorIdleSeconds?: ?int, + * visitorIdentity?: ?GrantsListResponseGrantsItemVisitorIdentity, * identity?: ?Identity, * origins?: ?array, - * archivedAt?: ?float, - * expiresAt?: ?float, - * lastExchangedAt?: ?float, + * archivedAt?: ?DateTime, + * expiresAt?: ?DateTime, + * lastExchangedAt?: ?DateTime, * } $values */ public function __construct( diff --git a/src/Types/GrantsListResponseGrantsItemLayerMode.php b/src/Types/GrantsListResponseGrantsItemLayerMode.php new file mode 100644 index 00000000..9e43bdd6 --- /dev/null +++ b/src/Types/GrantsListResponseGrantsItemLayerMode.php @@ -0,0 +1,9 @@ + $ask + * @var value-of $ask */ #[JsonProperty('ask')] public string $ask; @@ -33,8 +33,8 @@ class GrantsCreate200ResponseGrantVisitorIdentity extends JsonSerializableType /** * @param array{ - * fields: GrantsCreate200ResponseGrantVisitorIdentityFields, - * ask: value-of, + * fields: GrantsListResponseGrantsItemVisitorIdentityFields, + * ask: value-of, * purpose?: ?string, * privacyUrl?: ?string, * } $values diff --git a/src/Types/GrantsArchive200ResponseGrantVisitorIdentityAsk.php b/src/Types/GrantsListResponseGrantsItemVisitorIdentityAsk.php similarity index 66% rename from src/Types/GrantsArchive200ResponseGrantVisitorIdentityAsk.php rename to src/Types/GrantsListResponseGrantsItemVisitorIdentityAsk.php index b61f1fb0..cbad1563 100644 --- a/src/Types/GrantsArchive200ResponseGrantVisitorIdentityAsk.php +++ b/src/Types/GrantsListResponseGrantsItemVisitorIdentityAsk.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum GrantsArchive200ResponseGrantVisitorIdentityAsk: string +enum GrantsListResponseGrantsItemVisitorIdentityAsk: string { case OnOpen = "on-open"; case BeforeFirstChange = "before-first-change"; diff --git a/src/Types/GrantsCreate200ResponseGrantVisitorIdentityFields.php b/src/Types/GrantsListResponseGrantsItemVisitorIdentityFields.php similarity index 64% rename from src/Types/GrantsCreate200ResponseGrantVisitorIdentityFields.php rename to src/Types/GrantsListResponseGrantsItemVisitorIdentityFields.php index 662bfddc..d830bee3 100644 --- a/src/Types/GrantsCreate200ResponseGrantVisitorIdentityFields.php +++ b/src/Types/GrantsListResponseGrantsItemVisitorIdentityFields.php @@ -5,45 +5,45 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class GrantsCreate200ResponseGrantVisitorIdentityFields extends JsonSerializableType +class GrantsListResponseGrantsItemVisitorIdentityFields extends JsonSerializableType { /** - * @var ?value-of $displayName + * @var ?value-of $displayName */ #[JsonProperty('displayName')] public ?string $displayName; /** - * @var ?value-of $email + * @var ?value-of $email */ #[JsonProperty('email')] public ?string $email; /** - * @var ?value-of $title + * @var ?value-of $title */ #[JsonProperty('title')] public ?string $title; /** - * @var ?value-of $organization + * @var ?value-of $organization */ #[JsonProperty('organization')] public ?string $organization; /** - * @var ?value-of $organizationalUnit + * @var ?value-of $organizationalUnit */ #[JsonProperty('organizationalUnit')] public ?string $organizationalUnit; /** * @param array{ - * displayName?: ?value-of, - * email?: ?value-of, - * title?: ?value-of, - * organization?: ?value-of, - * organizationalUnit?: ?value-of, + * displayName?: ?value-of, + * email?: ?value-of, + * title?: ?value-of, + * organization?: ?value-of, + * organizationalUnit?: ?value-of, * } $values */ public function __construct( diff --git a/src/Types/GrantsUpdate200ResponseGrantVisitorIdentityFieldsDisplayName.php b/src/Types/GrantsListResponseGrantsItemVisitorIdentityFieldsDisplayName.php similarity index 63% rename from src/Types/GrantsUpdate200ResponseGrantVisitorIdentityFieldsDisplayName.php rename to src/Types/GrantsListResponseGrantsItemVisitorIdentityFieldsDisplayName.php index 8ac8d385..1ba94ae6 100644 --- a/src/Types/GrantsUpdate200ResponseGrantVisitorIdentityFieldsDisplayName.php +++ b/src/Types/GrantsListResponseGrantsItemVisitorIdentityFieldsDisplayName.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum GrantsUpdate200ResponseGrantVisitorIdentityFieldsDisplayName: string +enum GrantsListResponseGrantsItemVisitorIdentityFieldsDisplayName: string { case Required = "required"; case Optional = "optional"; diff --git a/src/Types/GrantsUpdate200ResponseGrantVisitorIdentityFieldsEmail.php b/src/Types/GrantsListResponseGrantsItemVisitorIdentityFieldsEmail.php similarity index 62% rename from src/Types/GrantsUpdate200ResponseGrantVisitorIdentityFieldsEmail.php rename to src/Types/GrantsListResponseGrantsItemVisitorIdentityFieldsEmail.php index 9fde8979..31dbc6d3 100644 --- a/src/Types/GrantsUpdate200ResponseGrantVisitorIdentityFieldsEmail.php +++ b/src/Types/GrantsListResponseGrantsItemVisitorIdentityFieldsEmail.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum GrantsUpdate200ResponseGrantVisitorIdentityFieldsEmail: string +enum GrantsListResponseGrantsItemVisitorIdentityFieldsEmail: string { case Required = "required"; case Optional = "optional"; diff --git a/src/Types/GrantsCreate200ResponseGrantVisitorIdentityFieldsOrganization.php b/src/Types/GrantsListResponseGrantsItemVisitorIdentityFieldsOrganization.php similarity index 63% rename from src/Types/GrantsCreate200ResponseGrantVisitorIdentityFieldsOrganization.php rename to src/Types/GrantsListResponseGrantsItemVisitorIdentityFieldsOrganization.php index 00a39aef..d6f34d49 100644 --- a/src/Types/GrantsCreate200ResponseGrantVisitorIdentityFieldsOrganization.php +++ b/src/Types/GrantsListResponseGrantsItemVisitorIdentityFieldsOrganization.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum GrantsCreate200ResponseGrantVisitorIdentityFieldsOrganization: string +enum GrantsListResponseGrantsItemVisitorIdentityFieldsOrganization: string { case Required = "required"; case Optional = "optional"; diff --git a/src/Types/GrantsCreate200ResponseGrantVisitorIdentityFieldsOrganizationalUnit.php b/src/Types/GrantsListResponseGrantsItemVisitorIdentityFieldsOrganizationalUnit.php similarity index 65% rename from src/Types/GrantsCreate200ResponseGrantVisitorIdentityFieldsOrganizationalUnit.php rename to src/Types/GrantsListResponseGrantsItemVisitorIdentityFieldsOrganizationalUnit.php index 546d2f23..9bfdfb14 100644 --- a/src/Types/GrantsCreate200ResponseGrantVisitorIdentityFieldsOrganizationalUnit.php +++ b/src/Types/GrantsListResponseGrantsItemVisitorIdentityFieldsOrganizationalUnit.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum GrantsCreate200ResponseGrantVisitorIdentityFieldsOrganizationalUnit: string +enum GrantsListResponseGrantsItemVisitorIdentityFieldsOrganizationalUnit: string { case Required = "required"; case Optional = "optional"; diff --git a/src/Types/GrantsCreate200ResponseGrantVisitorIdentityFieldsTitle.php b/src/Types/GrantsListResponseGrantsItemVisitorIdentityFieldsTitle.php similarity index 62% rename from src/Types/GrantsCreate200ResponseGrantVisitorIdentityFieldsTitle.php rename to src/Types/GrantsListResponseGrantsItemVisitorIdentityFieldsTitle.php index 93b886bf..77b1eabc 100644 --- a/src/Types/GrantsCreate200ResponseGrantVisitorIdentityFieldsTitle.php +++ b/src/Types/GrantsListResponseGrantsItemVisitorIdentityFieldsTitle.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum GrantsCreate200ResponseGrantVisitorIdentityFieldsTitle: string +enum GrantsListResponseGrantsItemVisitorIdentityFieldsTitle: string { case Required = "required"; case Optional = "optional"; diff --git a/src/Types/GrantsUpdate200ResponseGrantVisitorIdentityFieldsOrganization.php b/src/Types/GrantsUpdate200ResponseGrantVisitorIdentityFieldsOrganization.php deleted file mode 100644 index 94890cef..00000000 --- a/src/Types/GrantsUpdate200ResponseGrantVisitorIdentityFieldsOrganization.php +++ /dev/null @@ -1,9 +0,0 @@ - $layerMode + * @var value-of $layerMode */ #[JsonProperty('layerMode')] public string $layerMode; @@ -51,16 +53,16 @@ class GrantsCreate200ResponseGrant extends JsonSerializableType public bool $keepVisitorLayers; /** - * @var ?float $visitorIdleSeconds + * @var ?int $visitorIdleSeconds */ #[JsonProperty('visitorIdleSeconds')] - public ?float $visitorIdleSeconds; + public ?int $visitorIdleSeconds; /** - * @var ?GrantsCreate200ResponseGrantVisitorIdentity $visitorIdentity + * @var ?GrantsUpdateResponseGrantVisitorIdentity $visitorIdentity */ #[JsonProperty('visitorIdentity')] - public ?GrantsCreate200ResponseGrantVisitorIdentity $visitorIdentity; + public ?GrantsUpdateResponseGrantVisitorIdentity $visitorIdentity; /** * @var ?Identity $identity @@ -87,10 +89,10 @@ class GrantsCreate200ResponseGrant extends JsonSerializableType public bool $passphraseProtected; /** - * @var float $sessionTtlSeconds + * @var int $sessionTtlSeconds */ #[JsonProperty('sessionTtlSeconds')] - public float $sessionTtlSeconds; + public int $sessionTtlSeconds; /** * @var bool $disabled @@ -99,28 +101,28 @@ class GrantsCreate200ResponseGrant extends JsonSerializableType public bool $disabled; /** - * @var ?float $archivedAt + * @var ?DateTime $archivedAt */ - #[JsonProperty('archivedAt')] - public ?float $archivedAt; + #[JsonProperty('archivedAt'), Date(Date::TYPE_DATETIME)] + public ?DateTime $archivedAt; /** - * @var ?float $expiresAt + * @var ?DateTime $expiresAt */ - #[JsonProperty('expiresAt')] - public ?float $expiresAt; + #[JsonProperty('expiresAt'), Date(Date::TYPE_DATETIME)] + public ?DateTime $expiresAt; /** - * @var float $exchangeCount + * @var int $exchangeCount */ #[JsonProperty('exchangeCount')] - public float $exchangeCount; + public int $exchangeCount; /** - * @var ?float $lastExchangedAt + * @var ?DateTime $lastExchangedAt */ - #[JsonProperty('lastExchangedAt')] - public ?float $lastExchangedAt; + #[JsonProperty('lastExchangedAt'), Date(Date::TYPE_DATETIME)] + public ?DateTime $lastExchangedAt; /** * @var string $createdBy @@ -129,41 +131,41 @@ class GrantsCreate200ResponseGrant extends JsonSerializableType public string $createdBy; /** - * @var float $createdAt + * @var DateTime $createdAt */ - #[JsonProperty('createdAt')] - public float $createdAt; + #[JsonProperty('createdAt'), Date(Date::TYPE_DATETIME)] + public DateTime $createdAt; /** - * @var float $updatedAt + * @var DateTime $updatedAt */ - #[JsonProperty('updatedAt')] - public float $updatedAt; + #[JsonProperty('updatedAt'), Date(Date::TYPE_DATETIME)] + public DateTime $updatedAt; /** * @param array{ * id: string, * tenantId: string, * docId: string, - * layerMode: value-of, + * layerMode: value-of, * keepVisitorLayers: bool, * scope: array, * passphraseProtected: bool, - * sessionTtlSeconds: float, + * sessionTtlSeconds: int, * disabled: bool, - * exchangeCount: float, + * exchangeCount: int, * createdBy: string, - * createdAt: float, - * updatedAt: float, + * createdAt: DateTime, + * updatedAt: DateTime, * name?: ?string, * layerName?: ?string, - * visitorIdleSeconds?: ?float, - * visitorIdentity?: ?GrantsCreate200ResponseGrantVisitorIdentity, + * visitorIdleSeconds?: ?int, + * visitorIdentity?: ?GrantsUpdateResponseGrantVisitorIdentity, * identity?: ?Identity, * origins?: ?array, - * archivedAt?: ?float, - * expiresAt?: ?float, - * lastExchangedAt?: ?float, + * archivedAt?: ?DateTime, + * expiresAt?: ?DateTime, + * lastExchangedAt?: ?DateTime, * } $values */ public function __construct( diff --git a/src/Types/GrantsUpdateResponseGrantLayerMode.php b/src/Types/GrantsUpdateResponseGrantLayerMode.php new file mode 100644 index 00000000..46ad2d11 --- /dev/null +++ b/src/Types/GrantsUpdateResponseGrantLayerMode.php @@ -0,0 +1,9 @@ + $ask + */ + #[JsonProperty('ask')] + public string $ask; + + /** + * @var ?string $purpose + */ + #[JsonProperty('purpose')] + public ?string $purpose; + + /** + * @var ?string $privacyUrl + */ + #[JsonProperty('privacyUrl')] + public ?string $privacyUrl; + + /** + * @param array{ + * fields: GrantsUpdateResponseGrantVisitorIdentityFields, + * ask: value-of, + * purpose?: ?string, + * privacyUrl?: ?string, + * } $values + */ + public function __construct( + array $values, + ) { + $this->fields = $values['fields']; + $this->ask = $values['ask']; + $this->purpose = $values['purpose'] ?? null; + $this->privacyUrl = $values['privacyUrl'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/GrantsUpdateResponseGrantVisitorIdentityAsk.php b/src/Types/GrantsUpdateResponseGrantVisitorIdentityAsk.php new file mode 100644 index 00000000..a1af3a6b --- /dev/null +++ b/src/Types/GrantsUpdateResponseGrantVisitorIdentityAsk.php @@ -0,0 +1,9 @@ + $displayName + */ + #[JsonProperty('displayName')] + public ?string $displayName; + + /** + * @var ?value-of $email + */ + #[JsonProperty('email')] + public ?string $email; + + /** + * @var ?value-of $title + */ + #[JsonProperty('title')] + public ?string $title; + + /** + * @var ?value-of $organization + */ + #[JsonProperty('organization')] + public ?string $organization; + + /** + * @var ?value-of $organizationalUnit + */ + #[JsonProperty('organizationalUnit')] + public ?string $organizationalUnit; + + /** + * @param array{ + * displayName?: ?value-of, + * email?: ?value-of, + * title?: ?value-of, + * organization?: ?value-of, + * organizationalUnit?: ?value-of, + * } $values + */ + public function __construct( + array $values = [], + ) { + $this->displayName = $values['displayName'] ?? null; + $this->email = $values['email'] ?? null; + $this->title = $values['title'] ?? null; + $this->organization = $values['organization'] ?? null; + $this->organizationalUnit = $values['organizationalUnit'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/GrantsList200ResponseGrantsItemVisitorIdentityFieldsEmail.php b/src/Types/GrantsUpdateResponseGrantVisitorIdentityFieldsDisplayName.php similarity index 63% rename from src/Types/GrantsList200ResponseGrantsItemVisitorIdentityFieldsEmail.php rename to src/Types/GrantsUpdateResponseGrantVisitorIdentityFieldsDisplayName.php index 253f78b4..7acfdcc7 100644 --- a/src/Types/GrantsList200ResponseGrantsItemVisitorIdentityFieldsEmail.php +++ b/src/Types/GrantsUpdateResponseGrantVisitorIdentityFieldsDisplayName.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum GrantsList200ResponseGrantsItemVisitorIdentityFieldsEmail: string +enum GrantsUpdateResponseGrantVisitorIdentityFieldsDisplayName: string { case Required = "required"; case Optional = "optional"; diff --git a/src/Types/GrantsUpdateResponseGrantVisitorIdentityFieldsEmail.php b/src/Types/GrantsUpdateResponseGrantVisitorIdentityFieldsEmail.php new file mode 100644 index 00000000..9a2022cd --- /dev/null +++ b/src/Types/GrantsUpdateResponseGrantVisitorIdentityFieldsEmail.php @@ -0,0 +1,9 @@ + $visitors + * @var array $visitors */ - #[JsonProperty('visitors'), ArrayType([GrantsVisitorsList200ResponseVisitorsItem::class])] + #[JsonProperty('visitors'), ArrayType([GrantsVisitorsListResponseVisitorsItem::class])] public array $visitors; /** @@ -22,7 +22,7 @@ class GrantsVisitorsList200Response extends JsonSerializableType /** * @param array{ - * visitors: array, + * visitors: array, * nextCursor?: ?string, * } $values */ diff --git a/src/Types/GrantsVisitorsList200ResponseVisitorsItem.php b/src/Types/GrantsVisitorsListResponseVisitorsItem.php similarity index 53% rename from src/Types/GrantsVisitorsList200ResponseVisitorsItem.php rename to src/Types/GrantsVisitorsListResponseVisitorsItem.php index c420661e..1e13aa62 100644 --- a/src/Types/GrantsVisitorsList200ResponseVisitorsItem.php +++ b/src/Types/GrantsVisitorsListResponseVisitorsItem.php @@ -4,8 +4,10 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; +use DateTime; +use CloudPDF\Core\Types\Date; -class GrantsVisitorsList200ResponseVisitorsItem extends JsonSerializableType +class GrantsVisitorsListResponseVisitorsItem extends JsonSerializableType { /** * @var string $visitorId @@ -14,10 +16,10 @@ class GrantsVisitorsList200ResponseVisitorsItem extends JsonSerializableType public string $visitorId; /** - * @var GrantsVisitorsList200ResponseVisitorsItemAnswers $answers + * @var GrantsVisitorsListResponseVisitorsItemAnswers $answers */ #[JsonProperty('answers')] - public GrantsVisitorsList200ResponseVisitorsItemAnswers $answers; + public GrantsVisitorsListResponseVisitorsItemAnswers $answers; /** * @var bool $emailVerified @@ -26,38 +28,38 @@ class GrantsVisitorsList200ResponseVisitorsItem extends JsonSerializableType public bool $emailVerified; /** - * @var ?float $consentedAt + * @var ?DateTime $consentedAt */ - #[JsonProperty('consentedAt')] - public ?float $consentedAt; + #[JsonProperty('consentedAt'), Date(Date::TYPE_DATETIME)] + public ?DateTime $consentedAt; /** - * @var float $firstSeenAt + * @var DateTime $firstSeenAt */ - #[JsonProperty('firstSeenAt')] - public float $firstSeenAt; + #[JsonProperty('firstSeenAt'), Date(Date::TYPE_DATETIME)] + public DateTime $firstSeenAt; /** - * @var float $lastSeenAt + * @var DateTime $lastSeenAt */ - #[JsonProperty('lastSeenAt')] - public float $lastSeenAt; + #[JsonProperty('lastSeenAt'), Date(Date::TYPE_DATETIME)] + public DateTime $lastSeenAt; /** - * @var ?GrantsVisitorsList200ResponseVisitorsItemLayer $layer + * @var ?GrantsVisitorsListResponseVisitorsItemLayer $layer */ #[JsonProperty('layer')] - public ?GrantsVisitorsList200ResponseVisitorsItemLayer $layer; + public ?GrantsVisitorsListResponseVisitorsItemLayer $layer; /** * @param array{ * visitorId: string, - * answers: GrantsVisitorsList200ResponseVisitorsItemAnswers, + * answers: GrantsVisitorsListResponseVisitorsItemAnswers, * emailVerified: bool, - * firstSeenAt: float, - * lastSeenAt: float, - * consentedAt?: ?float, - * layer?: ?GrantsVisitorsList200ResponseVisitorsItemLayer, + * firstSeenAt: DateTime, + * lastSeenAt: DateTime, + * consentedAt?: ?DateTime, + * layer?: ?GrantsVisitorsListResponseVisitorsItemLayer, * } $values */ public function __construct( diff --git a/src/Types/GrantsVisitorsList200ResponseVisitorsItemAnswers.php b/src/Types/GrantsVisitorsListResponseVisitorsItemAnswers.php similarity index 94% rename from src/Types/GrantsVisitorsList200ResponseVisitorsItemAnswers.php rename to src/Types/GrantsVisitorsListResponseVisitorsItemAnswers.php index b6daf392..f7c75d0b 100644 --- a/src/Types/GrantsVisitorsList200ResponseVisitorsItemAnswers.php +++ b/src/Types/GrantsVisitorsListResponseVisitorsItemAnswers.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class GrantsVisitorsList200ResponseVisitorsItemAnswers extends JsonSerializableType +class GrantsVisitorsListResponseVisitorsItemAnswers extends JsonSerializableType { /** * @var ?string $displayName diff --git a/src/Types/GrantsVisitorsList200ResponseVisitorsItemLayer.php b/src/Types/GrantsVisitorsListResponseVisitorsItemLayer.php similarity index 65% rename from src/Types/GrantsVisitorsList200ResponseVisitorsItemLayer.php rename to src/Types/GrantsVisitorsListResponseVisitorsItemLayer.php index 70e111c4..b5499e50 100644 --- a/src/Types/GrantsVisitorsList200ResponseVisitorsItemLayer.php +++ b/src/Types/GrantsVisitorsListResponseVisitorsItemLayer.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class GrantsVisitorsList200ResponseVisitorsItemLayer extends JsonSerializableType +class GrantsVisitorsListResponseVisitorsItemLayer extends JsonSerializableType { /** * @var string $layerName @@ -14,22 +14,22 @@ class GrantsVisitorsList200ResponseVisitorsItemLayer extends JsonSerializableTyp public string $layerName; /** - * @var ?float $storageSizeBytes + * @var ?int $sizeBytes */ - #[JsonProperty('storageSizeBytes')] - public ?float $storageSizeBytes; + #[JsonProperty('sizeBytes')] + public ?int $sizeBytes; /** * @param array{ * layerName: string, - * storageSizeBytes?: ?float, + * sizeBytes?: ?int, * } $values */ public function __construct( array $values, ) { $this->layerName = $values['layerName']; - $this->storageSizeBytes = $values['storageSizeBytes'] ?? null; + $this->sizeBytes = $values['sizeBytes'] ?? null; } /** diff --git a/src/Types/OutlineItem.php b/src/Types/OutlineItem.php index 9c5b45b0..ad9449b2 100644 --- a/src/Types/OutlineItem.php +++ b/src/Types/OutlineItem.php @@ -26,7 +26,7 @@ class OutlineItem extends JsonSerializableType public string $title; /** - * @var ?PdfLinkTarget $target + * @var ?PdfLinkTarget $target Where a link goes, by its `kind`. A newer server can add kinds: read one your client doesn't know as `unsupported`. */ #[JsonProperty('target')] public ?PdfLinkTarget $target; diff --git a/src/Types/OutlineMutationMeta.php b/src/Types/OutlineMutationMeta.php index d2c13958..e27943d2 100644 --- a/src/Types/OutlineMutationMeta.php +++ b/src/Types/OutlineMutationMeta.php @@ -39,17 +39,17 @@ class OutlineMutationMeta extends JsonSerializableType public ?array $missingCharacters; /** - * @var array $changed + * @var array $changedRefs */ - #[JsonProperty('changed'), ArrayType([OutlineItemRef::class])] - public array $changed; + #[JsonProperty('changedRefs'), ArrayType([OutlineItemRef::class])] + public array $changedRefs; /** * @param array{ * affectedPages: array, * opId: string, * undoable: bool, - * changed: array, + * changedRefs: array, * cacheDelta?: ?CacheDelta, * missingCharacters?: ?array, * } $values @@ -62,7 +62,7 @@ public function __construct( $this->opId = $values['opId']; $this->undoable = $values['undoable']; $this->missingCharacters = $values['missingCharacters'] ?? null; - $this->changed = $values['changed']; + $this->changedRefs = $values['changedRefs']; } /** diff --git a/src/Types/PdfActionNode.php b/src/Types/PdfActionNode.php index 1e343c87..e8f53b43 100644 --- a/src/Types/PdfActionNode.php +++ b/src/Types/PdfActionNode.php @@ -5,6 +5,9 @@ use CloudPDF\Core\Json\JsonSerializableType; use Exception; +/** + * An action, by its `type`. A newer server can add types: read one your client doesn't know as `unknown`, keeping its `subtype` and `next`. + */ class PdfActionNode extends JsonSerializableType { /** diff --git a/src/Types/PdfActionNodeSubmitFormPayload.php b/src/Types/PdfActionNodeSubmitFormPayload.php index bd451b65..ff727116 100644 --- a/src/Types/PdfActionNodeSubmitFormPayload.php +++ b/src/Types/PdfActionNodeSubmitFormPayload.php @@ -21,10 +21,70 @@ class PdfActionNodeSubmitFormPayload extends JsonSerializableType public ?array $fields; /** - * @var PdfActionNodeSubmitFormPayloadFlags $flags + * @var bool $exclude */ - #[JsonProperty('flags')] - public PdfActionNodeSubmitFormPayloadFlags $flags; + #[JsonProperty('exclude')] + public bool $exclude; + + /** + * @var bool $includeNoValueFields + */ + #[JsonProperty('includeNoValueFields')] + public bool $includeNoValueFields; + + /** + * @var value-of $format + */ + #[JsonProperty('format')] + public string $format; + + /** + * @var value-of $method + */ + #[JsonProperty('method')] + public string $method; + + /** + * @var bool $submitCoordinates + */ + #[JsonProperty('submitCoordinates')] + public bool $submitCoordinates; + + /** + * @var bool $includeAppendSaves + */ + #[JsonProperty('includeAppendSaves')] + public bool $includeAppendSaves; + + /** + * @var bool $includeAnnotations + */ + #[JsonProperty('includeAnnotations')] + public bool $includeAnnotations; + + /** + * @var bool $canonicalFormat + */ + #[JsonProperty('canonicalFormat')] + public bool $canonicalFormat; + + /** + * @var bool $exclNonUserAnnots + */ + #[JsonProperty('exclNonUserAnnots')] + public bool $exclNonUserAnnots; + + /** + * @var bool $exclFKey + */ + #[JsonProperty('exclFKey')] + public bool $exclFKey; + + /** + * @var bool $embedForm + */ + #[JsonProperty('embedForm')] + public bool $embedForm; /** * @var ?string $charSet @@ -35,7 +95,17 @@ class PdfActionNodeSubmitFormPayload extends JsonSerializableType /** * @param array{ * url: string, - * flags: PdfActionNodeSubmitFormPayloadFlags, + * exclude: bool, + * includeNoValueFields: bool, + * format: value-of, + * method: value-of, + * submitCoordinates: bool, + * includeAppendSaves: bool, + * includeAnnotations: bool, + * canonicalFormat: bool, + * exclNonUserAnnots: bool, + * exclFKey: bool, + * embedForm: bool, * fields?: ?array, * charSet?: ?string, * } $values @@ -45,7 +115,17 @@ public function __construct( ) { $this->url = $values['url']; $this->fields = $values['fields'] ?? null; - $this->flags = $values['flags']; + $this->exclude = $values['exclude']; + $this->includeNoValueFields = $values['includeNoValueFields']; + $this->format = $values['format']; + $this->method = $values['method']; + $this->submitCoordinates = $values['submitCoordinates']; + $this->includeAppendSaves = $values['includeAppendSaves']; + $this->includeAnnotations = $values['includeAnnotations']; + $this->canonicalFormat = $values['canonicalFormat']; + $this->exclNonUserAnnots = $values['exclNonUserAnnots']; + $this->exclFKey = $values['exclFKey']; + $this->embedForm = $values['embedForm']; $this->charSet = $values['charSet'] ?? null; } diff --git a/src/Types/PdfActionNodeSubmitFormPayloadFlags.php b/src/Types/PdfActionNodeSubmitFormPayloadFlags.php deleted file mode 100644 index 3e17dc4d..00000000 --- a/src/Types/PdfActionNodeSubmitFormPayloadFlags.php +++ /dev/null @@ -1,122 +0,0 @@ - $format - */ - #[JsonProperty('format')] - public string $format; - - /** - * @var value-of $method - */ - #[JsonProperty('method')] - public string $method; - - /** - * @var bool $submitCoordinates - */ - #[JsonProperty('submitCoordinates')] - public bool $submitCoordinates; - - /** - * @var bool $includeAppendSaves - */ - #[JsonProperty('includeAppendSaves')] - public bool $includeAppendSaves; - - /** - * @var bool $includeAnnotations - */ - #[JsonProperty('includeAnnotations')] - public bool $includeAnnotations; - - /** - * @var bool $canonicalFormat - */ - #[JsonProperty('canonicalFormat')] - public bool $canonicalFormat; - - /** - * @var bool $exclNonUserAnnots - */ - #[JsonProperty('exclNonUserAnnots')] - public bool $exclNonUserAnnots; - - /** - * @var bool $exclFKey - */ - #[JsonProperty('exclFKey')] - public bool $exclFKey; - - /** - * @var bool $embedForm - */ - #[JsonProperty('embedForm')] - public bool $embedForm; - - /** - * @param array{ - * raw: int, - * exclude: bool, - * includeNoValueFields: bool, - * format: value-of, - * method: value-of, - * submitCoordinates: bool, - * includeAppendSaves: bool, - * includeAnnotations: bool, - * canonicalFormat: bool, - * exclNonUserAnnots: bool, - * exclFKey: bool, - * embedForm: bool, - * } $values - */ - public function __construct( - array $values, - ) { - $this->raw = $values['raw']; - $this->exclude = $values['exclude']; - $this->includeNoValueFields = $values['includeNoValueFields']; - $this->format = $values['format']; - $this->method = $values['method']; - $this->submitCoordinates = $values['submitCoordinates']; - $this->includeAppendSaves = $values['includeAppendSaves']; - $this->includeAnnotations = $values['includeAnnotations']; - $this->canonicalFormat = $values['canonicalFormat']; - $this->exclNonUserAnnots = $values['exclNonUserAnnots']; - $this->exclFKey = $values['exclFKey']; - $this->embedForm = $values['embedForm']; - } - - /** - * @return string - */ - public function __toString(): string - { - return $this->toJson(); - } -} diff --git a/src/Types/PdfActionNodeSubmitFormPayloadFlagsFormat.php b/src/Types/PdfActionNodeSubmitFormPayloadFormat.php similarity index 70% rename from src/Types/PdfActionNodeSubmitFormPayloadFlagsFormat.php rename to src/Types/PdfActionNodeSubmitFormPayloadFormat.php index 1d9c97a2..162aaddb 100644 --- a/src/Types/PdfActionNodeSubmitFormPayloadFlagsFormat.php +++ b/src/Types/PdfActionNodeSubmitFormPayloadFormat.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum PdfActionNodeSubmitFormPayloadFlagsFormat: string +enum PdfActionNodeSubmitFormPayloadFormat: string { case Fdf = "fdf"; case Html = "html"; diff --git a/src/Types/PdfActionNodeSubmitFormPayloadFlagsMethod.php b/src/Types/PdfActionNodeSubmitFormPayloadMethod.php similarity index 60% rename from src/Types/PdfActionNodeSubmitFormPayloadFlagsMethod.php rename to src/Types/PdfActionNodeSubmitFormPayloadMethod.php index 6d25f94a..dd8d8d59 100644 --- a/src/Types/PdfActionNodeSubmitFormPayloadFlagsMethod.php +++ b/src/Types/PdfActionNodeSubmitFormPayloadMethod.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum PdfActionNodeSubmitFormPayloadFlagsMethod: string +enum PdfActionNodeSubmitFormPayloadMethod: string { case Post = "post"; case Get = "get"; diff --git a/src/Types/PdfActionTree.php b/src/Types/PdfActionTree.php index 8966a54d..2b08f395 100644 --- a/src/Types/PdfActionTree.php +++ b/src/Types/PdfActionTree.php @@ -20,12 +20,6 @@ class PdfActionTree extends JsonSerializableType #[JsonProperty('incomplete')] public bool $incomplete; - /** - * @var int $warningFlags - */ - #[JsonProperty('warningFlags')] - public int $warningFlags; - /** * @var array> $warnings */ @@ -35,7 +29,6 @@ class PdfActionTree extends JsonSerializableType /** * @param array{ * incomplete: bool, - * warningFlags: int, * warnings: array>, * root?: ?PdfActionNode, * } $values @@ -45,7 +38,6 @@ public function __construct( ) { $this->root = $values['root'] ?? null; $this->incomplete = $values['incomplete']; - $this->warningFlags = $values['warningFlags']; $this->warnings = $values['warnings']; } diff --git a/src/Types/PdfActionWriteSubmitForm.php b/src/Types/PdfActionWriteSubmitForm.php index 03287524..6072b6ae 100644 --- a/src/Types/PdfActionWriteSubmitForm.php +++ b/src/Types/PdfActionWriteSubmitForm.php @@ -21,10 +21,70 @@ class PdfActionWriteSubmitForm extends JsonSerializableType public ?array $fields; /** - * @var ?int $flags + * @var ?bool $exclude */ - #[JsonProperty('flags')] - public ?int $flags; + #[JsonProperty('exclude')] + public ?bool $exclude; + + /** + * @var ?bool $includeNoValueFields + */ + #[JsonProperty('includeNoValueFields')] + public ?bool $includeNoValueFields; + + /** + * @var ?value-of $format + */ + #[JsonProperty('format')] + public ?string $format; + + /** + * @var ?value-of $method + */ + #[JsonProperty('method')] + public ?string $method; + + /** + * @var ?bool $submitCoordinates + */ + #[JsonProperty('submitCoordinates')] + public ?bool $submitCoordinates; + + /** + * @var ?bool $includeAppendSaves + */ + #[JsonProperty('includeAppendSaves')] + public ?bool $includeAppendSaves; + + /** + * @var ?bool $includeAnnotations + */ + #[JsonProperty('includeAnnotations')] + public ?bool $includeAnnotations; + + /** + * @var ?bool $canonicalFormat + */ + #[JsonProperty('canonicalFormat')] + public ?bool $canonicalFormat; + + /** + * @var ?bool $exclNonUserAnnots + */ + #[JsonProperty('exclNonUserAnnots')] + public ?bool $exclNonUserAnnots; + + /** + * @var ?bool $exclFKey + */ + #[JsonProperty('exclFKey')] + public ?bool $exclFKey; + + /** + * @var ?bool $embedForm + */ + #[JsonProperty('embedForm')] + public ?bool $embedForm; /** * @var ?array $next @@ -36,7 +96,17 @@ class PdfActionWriteSubmitForm extends JsonSerializableType * @param array{ * url: string, * fields?: ?array, - * flags?: ?int, + * exclude?: ?bool, + * includeNoValueFields?: ?bool, + * format?: ?value-of, + * method?: ?value-of, + * submitCoordinates?: ?bool, + * includeAppendSaves?: ?bool, + * includeAnnotations?: ?bool, + * canonicalFormat?: ?bool, + * exclNonUserAnnots?: ?bool, + * exclFKey?: ?bool, + * embedForm?: ?bool, * next?: ?array, * } $values */ @@ -45,7 +115,17 @@ public function __construct( ) { $this->url = $values['url']; $this->fields = $values['fields'] ?? null; - $this->flags = $values['flags'] ?? null; + $this->exclude = $values['exclude'] ?? null; + $this->includeNoValueFields = $values['includeNoValueFields'] ?? null; + $this->format = $values['format'] ?? null; + $this->method = $values['method'] ?? null; + $this->submitCoordinates = $values['submitCoordinates'] ?? null; + $this->includeAppendSaves = $values['includeAppendSaves'] ?? null; + $this->includeAnnotations = $values['includeAnnotations'] ?? null; + $this->canonicalFormat = $values['canonicalFormat'] ?? null; + $this->exclNonUserAnnots = $values['exclNonUserAnnots'] ?? null; + $this->exclFKey = $values['exclFKey'] ?? null; + $this->embedForm = $values['embedForm'] ?? null; $this->next = $values['next'] ?? null; } diff --git a/src/Types/PdfActionWriteSubmitFormFormat.php b/src/Types/PdfActionWriteSubmitFormFormat.php new file mode 100644 index 00000000..94eae9b2 --- /dev/null +++ b/src/Types/PdfActionWriteSubmitFormFormat.php @@ -0,0 +1,11 @@ + 'rectilinear', 'value' => $rectilinear, ]); } /** - * @param AnnotationLineMeasureGeospatial $geospatial - * @return AnnotationLineMeasure + * @param PdfMeasurementGeospatial $geospatial + * @return PdfMeasurement */ - public static function geospatial(AnnotationLineMeasureGeospatial $geospatial): AnnotationLineMeasure + public static function geospatial(PdfMeasurementGeospatial $geospatial): PdfMeasurement { - return new AnnotationLineMeasure([ + return new PdfMeasurement([ 'subtype' => 'geospatial', 'value' => $geospatial, ]); } /** - * @param AnnotationLineMeasureUnknown $unknown - * @return AnnotationLineMeasure + * @param PdfMeasurementUnknown $unknown + * @return PdfMeasurement */ - public static function unknown(AnnotationLineMeasureUnknown $unknown): AnnotationLineMeasure + public static function unknown(PdfMeasurementUnknown $unknown): PdfMeasurement { - return new AnnotationLineMeasure([ + return new PdfMeasurement([ 'subtype' => 'unknown', 'value' => $unknown, ]); @@ -91,15 +94,15 @@ public static function unknown(AnnotationLineMeasureUnknown $unknown): Annotatio */ public function isRectilinear(): bool { - return $this->value instanceof AnnotationLineMeasureRectilinear && $this->subtype === 'rectilinear'; + return $this->value instanceof PdfMeasurementRectilinear && $this->subtype === 'rectilinear'; } /** - * @return AnnotationLineMeasureRectilinear + * @return PdfMeasurementRectilinear */ - public function asRectilinear(): AnnotationLineMeasureRectilinear + public function asRectilinear(): PdfMeasurementRectilinear { - if (!($this->value instanceof AnnotationLineMeasureRectilinear && $this->subtype === 'rectilinear')) { + if (!($this->value instanceof PdfMeasurementRectilinear && $this->subtype === 'rectilinear')) { throw new Exception( "Expected rectilinear; got " . $this->subtype . " with value of type " . get_debug_type($this->value), ); @@ -113,15 +116,15 @@ public function asRectilinear(): AnnotationLineMeasureRectilinear */ public function isGeospatial(): bool { - return $this->value instanceof AnnotationLineMeasureGeospatial && $this->subtype === 'geospatial'; + return $this->value instanceof PdfMeasurementGeospatial && $this->subtype === 'geospatial'; } /** - * @return AnnotationLineMeasureGeospatial + * @return PdfMeasurementGeospatial */ - public function asGeospatial(): AnnotationLineMeasureGeospatial + public function asGeospatial(): PdfMeasurementGeospatial { - if (!($this->value instanceof AnnotationLineMeasureGeospatial && $this->subtype === 'geospatial')) { + if (!($this->value instanceof PdfMeasurementGeospatial && $this->subtype === 'geospatial')) { throw new Exception( "Expected geospatial; got " . $this->subtype . " with value of type " . get_debug_type($this->value), ); @@ -135,15 +138,15 @@ public function asGeospatial(): AnnotationLineMeasureGeospatial */ public function isUnknown(): bool { - return $this->value instanceof AnnotationLineMeasureUnknown && $this->subtype === 'unknown'; + return $this->value instanceof PdfMeasurementUnknown && $this->subtype === 'unknown'; } /** - * @return AnnotationLineMeasureUnknown + * @return PdfMeasurementUnknown */ - public function asUnknown(): AnnotationLineMeasureUnknown + public function asUnknown(): PdfMeasurementUnknown { - if (!($this->value instanceof AnnotationLineMeasureUnknown && $this->subtype === 'unknown')) { + if (!($this->value instanceof PdfMeasurementUnknown && $this->subtype === 'unknown')) { throw new Exception( "Expected unknown; got " . $this->subtype . " with value of type " . get_debug_type($this->value), ); @@ -221,13 +224,13 @@ public static function jsonDeserialize(array $data): static $args['subtype'] = $subtype; switch ($subtype) { case 'rectilinear': - $args['value'] = AnnotationLineMeasureRectilinear::jsonDeserialize($data); + $args['value'] = PdfMeasurementRectilinear::jsonDeserialize($data); break; case 'geospatial': - $args['value'] = AnnotationLineMeasureGeospatial::jsonDeserialize($data); + $args['value'] = PdfMeasurementGeospatial::jsonDeserialize($data); break; case 'unknown': - $args['value'] = AnnotationLineMeasureUnknown::jsonDeserialize($data); + $args['value'] = PdfMeasurementUnknown::jsonDeserialize($data); break; case '_unknown': default: diff --git a/src/Types/AnnotationLineMeasureUnknown.php b/src/Types/PdfMeasurementGeospatial.php similarity index 84% rename from src/Types/AnnotationLineMeasureUnknown.php rename to src/Types/PdfMeasurementGeospatial.php index b177db7b..5196ffb4 100644 --- a/src/Types/AnnotationLineMeasureUnknown.php +++ b/src/Types/PdfMeasurementGeospatial.php @@ -4,7 +4,7 @@ use CloudPDF\Core\Json\JsonSerializableType; -class AnnotationLineMeasureUnknown extends JsonSerializableType +class PdfMeasurementGeospatial extends JsonSerializableType { /** * @param array{ diff --git a/src/Types/PdfMeasurementRectilinear.php b/src/Types/PdfMeasurementRectilinear.php new file mode 100644 index 00000000..b3f19d2f --- /dev/null +++ b/src/Types/PdfMeasurementRectilinear.php @@ -0,0 +1,99 @@ + $x + */ + #[JsonProperty('x'), ArrayType([PdfMeasurementRectilinearXItem::class])] + public array $x; + + /** + * @var ?array $y + */ + #[JsonProperty('y'), ArrayType([PdfMeasurementRectilinearYItem::class])] + public ?array $y; + + /** + * @var array $distance + */ + #[JsonProperty('distance'), ArrayType([PdfMeasurementRectilinearDistanceItem::class])] + public array $distance; + + /** + * @var array $area + */ + #[JsonProperty('area'), ArrayType([PdfMeasurementRectilinearAreaItem::class])] + public array $area; + + /** + * @var ?array $angle + */ + #[JsonProperty('angle'), ArrayType([PdfMeasurementRectilinearAngleItem::class])] + public ?array $angle; + + /** + * @var ?array $slope + */ + #[JsonProperty('slope'), ArrayType([PdfMeasurementRectilinearSlopeItem::class])] + public ?array $slope; + + /** + * @var ?PdfMeasurementRectilinearOrigin $origin + */ + #[JsonProperty('origin')] + public ?PdfMeasurementRectilinearOrigin $origin; + + /** + * @var ?float $cyx + */ + #[JsonProperty('cyx')] + public ?float $cyx; + + /** + * @param array{ + * x: array, + * distance: array, + * area: array, + * ratio?: ?string, + * y?: ?array, + * angle?: ?array, + * slope?: ?array, + * origin?: ?PdfMeasurementRectilinearOrigin, + * cyx?: ?float, + * } $values + */ + public function __construct( + array $values, + ) { + $this->ratio = $values['ratio'] ?? null; + $this->x = $values['x']; + $this->y = $values['y'] ?? null; + $this->distance = $values['distance']; + $this->area = $values['area']; + $this->angle = $values['angle'] ?? null; + $this->slope = $values['slope'] ?? null; + $this->origin = $values['origin'] ?? null; + $this->cyx = $values['cyx'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/AnnotationLineMeasureRectilinearXItem.php b/src/Types/PdfMeasurementRectilinearAngleItem.php similarity index 84% rename from src/Types/AnnotationLineMeasureRectilinearXItem.php rename to src/Types/PdfMeasurementRectilinearAngleItem.php index 67a23167..e82602a3 100644 --- a/src/Types/AnnotationLineMeasureRectilinearXItem.php +++ b/src/Types/PdfMeasurementRectilinearAngleItem.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class AnnotationLineMeasureRectilinearXItem extends JsonSerializableType +class PdfMeasurementRectilinearAngleItem extends JsonSerializableType { /** * @var string $unit @@ -20,7 +20,7 @@ class AnnotationLineMeasureRectilinearXItem extends JsonSerializableType public ?float $conversion; /** - * @var ?value-of $fraction + * @var ?value-of $fraction */ #[JsonProperty('fraction')] public ?string $fraction; @@ -62,7 +62,7 @@ class AnnotationLineMeasureRectilinearXItem extends JsonSerializableType public ?string $suffixSpacing; /** - * @var ?value-of $labelPosition + * @var ?value-of $labelPosition */ #[JsonProperty('labelPosition')] public ?string $labelPosition; @@ -71,14 +71,14 @@ class AnnotationLineMeasureRectilinearXItem extends JsonSerializableType * @param array{ * unit: string, * conversion?: ?float, - * fraction?: ?value-of, + * fraction?: ?value-of, * precision?: ?int, * fixed?: ?bool, * thousands?: ?string, * decimal?: ?string, * prefixSpacing?: ?string, * suffixSpacing?: ?string, - * labelPosition?: ?value-of, + * labelPosition?: ?value-of, * } $values */ public function __construct( diff --git a/src/Types/AnnotationLineMeasureRectilinearYItemFraction.php b/src/Types/PdfMeasurementRectilinearAngleItemFraction.php similarity index 72% rename from src/Types/AnnotationLineMeasureRectilinearYItemFraction.php rename to src/Types/PdfMeasurementRectilinearAngleItemFraction.php index a93ebb04..68311d19 100644 --- a/src/Types/AnnotationLineMeasureRectilinearYItemFraction.php +++ b/src/Types/PdfMeasurementRectilinearAngleItemFraction.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum AnnotationLineMeasureRectilinearYItemFraction: string +enum PdfMeasurementRectilinearAngleItemFraction: string { case Decimal = "decimal"; case Fraction = "fraction"; diff --git a/src/Types/AnnotationLineMeasureRectilinearXItemLabelPosition.php b/src/Types/PdfMeasurementRectilinearAngleItemLabelPosition.php similarity index 59% rename from src/Types/AnnotationLineMeasureRectilinearXItemLabelPosition.php rename to src/Types/PdfMeasurementRectilinearAngleItemLabelPosition.php index a009b766..112e7f8a 100644 --- a/src/Types/AnnotationLineMeasureRectilinearXItemLabelPosition.php +++ b/src/Types/PdfMeasurementRectilinearAngleItemLabelPosition.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum AnnotationLineMeasureRectilinearXItemLabelPosition: string +enum PdfMeasurementRectilinearAngleItemLabelPosition: string { case Suffix = "suffix"; case Prefix = "prefix"; diff --git a/src/Types/AnnotationPolygonMeasureRectilinearXItem.php b/src/Types/PdfMeasurementRectilinearAreaItem.php similarity index 83% rename from src/Types/AnnotationPolygonMeasureRectilinearXItem.php rename to src/Types/PdfMeasurementRectilinearAreaItem.php index 97f3968b..5cefff6e 100644 --- a/src/Types/AnnotationPolygonMeasureRectilinearXItem.php +++ b/src/Types/PdfMeasurementRectilinearAreaItem.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class AnnotationPolygonMeasureRectilinearXItem extends JsonSerializableType +class PdfMeasurementRectilinearAreaItem extends JsonSerializableType { /** * @var string $unit @@ -20,7 +20,7 @@ class AnnotationPolygonMeasureRectilinearXItem extends JsonSerializableType public ?float $conversion; /** - * @var ?value-of $fraction + * @var ?value-of $fraction */ #[JsonProperty('fraction')] public ?string $fraction; @@ -62,7 +62,7 @@ class AnnotationPolygonMeasureRectilinearXItem extends JsonSerializableType public ?string $suffixSpacing; /** - * @var ?value-of $labelPosition + * @var ?value-of $labelPosition */ #[JsonProperty('labelPosition')] public ?string $labelPosition; @@ -71,14 +71,14 @@ class AnnotationPolygonMeasureRectilinearXItem extends JsonSerializableType * @param array{ * unit: string, * conversion?: ?float, - * fraction?: ?value-of, + * fraction?: ?value-of, * precision?: ?int, * fixed?: ?bool, * thousands?: ?string, * decimal?: ?string, * prefixSpacing?: ?string, * suffixSpacing?: ?string, - * labelPosition?: ?value-of, + * labelPosition?: ?value-of, * } $values */ public function __construct( diff --git a/src/Types/AnnotationLineMeasureRectilinearXItemFraction.php b/src/Types/PdfMeasurementRectilinearAreaItemFraction.php similarity index 72% rename from src/Types/AnnotationLineMeasureRectilinearXItemFraction.php rename to src/Types/PdfMeasurementRectilinearAreaItemFraction.php index 6067be28..5a459ae8 100644 --- a/src/Types/AnnotationLineMeasureRectilinearXItemFraction.php +++ b/src/Types/PdfMeasurementRectilinearAreaItemFraction.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum AnnotationLineMeasureRectilinearXItemFraction: string +enum PdfMeasurementRectilinearAreaItemFraction: string { case Decimal = "decimal"; case Fraction = "fraction"; diff --git a/src/Types/AnnotationLineMeasureRectilinearYItemLabelPosition.php b/src/Types/PdfMeasurementRectilinearAreaItemLabelPosition.php similarity index 59% rename from src/Types/AnnotationLineMeasureRectilinearYItemLabelPosition.php rename to src/Types/PdfMeasurementRectilinearAreaItemLabelPosition.php index a3c11a6f..e184a53b 100644 --- a/src/Types/AnnotationLineMeasureRectilinearYItemLabelPosition.php +++ b/src/Types/PdfMeasurementRectilinearAreaItemLabelPosition.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum AnnotationLineMeasureRectilinearYItemLabelPosition: string +enum PdfMeasurementRectilinearAreaItemLabelPosition: string { case Suffix = "suffix"; case Prefix = "prefix"; diff --git a/src/Types/AnnotationLineMeasureRectilinearYItem.php b/src/Types/PdfMeasurementRectilinearDistanceItem.php similarity index 86% rename from src/Types/AnnotationLineMeasureRectilinearYItem.php rename to src/Types/PdfMeasurementRectilinearDistanceItem.php index 13582394..2a181547 100644 --- a/src/Types/AnnotationLineMeasureRectilinearYItem.php +++ b/src/Types/PdfMeasurementRectilinearDistanceItem.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class AnnotationLineMeasureRectilinearYItem extends JsonSerializableType +class PdfMeasurementRectilinearDistanceItem extends JsonSerializableType { /** * @var string $unit @@ -20,7 +20,7 @@ class AnnotationLineMeasureRectilinearYItem extends JsonSerializableType public ?float $conversion; /** - * @var ?value-of $fraction + * @var ?value-of $fraction */ #[JsonProperty('fraction')] public ?string $fraction; @@ -62,7 +62,7 @@ class AnnotationLineMeasureRectilinearYItem extends JsonSerializableType public ?string $suffixSpacing; /** - * @var ?value-of $labelPosition + * @var ?value-of $labelPosition */ #[JsonProperty('labelPosition')] public ?string $labelPosition; @@ -71,14 +71,14 @@ class AnnotationLineMeasureRectilinearYItem extends JsonSerializableType * @param array{ * unit: string, * conversion?: ?float, - * fraction?: ?value-of, + * fraction?: ?value-of, * precision?: ?int, * fixed?: ?bool, * thousands?: ?string, * decimal?: ?string, * prefixSpacing?: ?string, * suffixSpacing?: ?string, - * labelPosition?: ?value-of, + * labelPosition?: ?value-of, * } $values */ public function __construct( diff --git a/src/Types/AnnotationLineMeasureRectilinearAreaItemFraction.php b/src/Types/PdfMeasurementRectilinearDistanceItemFraction.php similarity index 71% rename from src/Types/AnnotationLineMeasureRectilinearAreaItemFraction.php rename to src/Types/PdfMeasurementRectilinearDistanceItemFraction.php index 7aecd670..8371a98a 100644 --- a/src/Types/AnnotationLineMeasureRectilinearAreaItemFraction.php +++ b/src/Types/PdfMeasurementRectilinearDistanceItemFraction.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum AnnotationLineMeasureRectilinearAreaItemFraction: string +enum PdfMeasurementRectilinearDistanceItemFraction: string { case Decimal = "decimal"; case Fraction = "fraction"; diff --git a/src/Types/AnnotationPolygonMeasureRectilinearXItemLabelPosition.php b/src/Types/PdfMeasurementRectilinearDistanceItemLabelPosition.php similarity index 58% rename from src/Types/AnnotationPolygonMeasureRectilinearXItemLabelPosition.php rename to src/Types/PdfMeasurementRectilinearDistanceItemLabelPosition.php index 65efb471..7c85efa0 100644 --- a/src/Types/AnnotationPolygonMeasureRectilinearXItemLabelPosition.php +++ b/src/Types/PdfMeasurementRectilinearDistanceItemLabelPosition.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum AnnotationPolygonMeasureRectilinearXItemLabelPosition: string +enum PdfMeasurementRectilinearDistanceItemLabelPosition: string { case Suffix = "suffix"; case Prefix = "prefix"; diff --git a/src/Types/AnnotationLineMeasureRectilinearOrigin.php b/src/Types/PdfMeasurementRectilinearOrigin.php similarity index 89% rename from src/Types/AnnotationLineMeasureRectilinearOrigin.php rename to src/Types/PdfMeasurementRectilinearOrigin.php index a65d9618..e52800c8 100644 --- a/src/Types/AnnotationLineMeasureRectilinearOrigin.php +++ b/src/Types/PdfMeasurementRectilinearOrigin.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class AnnotationLineMeasureRectilinearOrigin extends JsonSerializableType +class PdfMeasurementRectilinearOrigin extends JsonSerializableType { /** * @var float $x diff --git a/src/Types/AnnotationLineMeasureRectilinearAreaItem.php b/src/Types/PdfMeasurementRectilinearSlopeItem.php similarity index 83% rename from src/Types/AnnotationLineMeasureRectilinearAreaItem.php rename to src/Types/PdfMeasurementRectilinearSlopeItem.php index b798a512..064692bf 100644 --- a/src/Types/AnnotationLineMeasureRectilinearAreaItem.php +++ b/src/Types/PdfMeasurementRectilinearSlopeItem.php @@ -5,7 +5,7 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class AnnotationLineMeasureRectilinearAreaItem extends JsonSerializableType +class PdfMeasurementRectilinearSlopeItem extends JsonSerializableType { /** * @var string $unit @@ -20,7 +20,7 @@ class AnnotationLineMeasureRectilinearAreaItem extends JsonSerializableType public ?float $conversion; /** - * @var ?value-of $fraction + * @var ?value-of $fraction */ #[JsonProperty('fraction')] public ?string $fraction; @@ -62,7 +62,7 @@ class AnnotationLineMeasureRectilinearAreaItem extends JsonSerializableType public ?string $suffixSpacing; /** - * @var ?value-of $labelPosition + * @var ?value-of $labelPosition */ #[JsonProperty('labelPosition')] public ?string $labelPosition; @@ -71,14 +71,14 @@ class AnnotationLineMeasureRectilinearAreaItem extends JsonSerializableType * @param array{ * unit: string, * conversion?: ?float, - * fraction?: ?value-of, + * fraction?: ?value-of, * precision?: ?int, * fixed?: ?bool, * thousands?: ?string, * decimal?: ?string, * prefixSpacing?: ?string, * suffixSpacing?: ?string, - * labelPosition?: ?value-of, + * labelPosition?: ?value-of, * } $values */ public function __construct( diff --git a/src/Types/AnnotationPolygonMeasureRectilinearXItemFraction.php b/src/Types/PdfMeasurementRectilinearSlopeItemFraction.php similarity index 71% rename from src/Types/AnnotationPolygonMeasureRectilinearXItemFraction.php rename to src/Types/PdfMeasurementRectilinearSlopeItemFraction.php index 9d2f2806..28a5994f 100644 --- a/src/Types/AnnotationPolygonMeasureRectilinearXItemFraction.php +++ b/src/Types/PdfMeasurementRectilinearSlopeItemFraction.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum AnnotationPolygonMeasureRectilinearXItemFraction: string +enum PdfMeasurementRectilinearSlopeItemFraction: string { case Decimal = "decimal"; case Fraction = "fraction"; diff --git a/src/Types/AnnotationLineMeasureRectilinearAreaItemLabelPosition.php b/src/Types/PdfMeasurementRectilinearSlopeItemLabelPosition.php similarity index 58% rename from src/Types/AnnotationLineMeasureRectilinearAreaItemLabelPosition.php rename to src/Types/PdfMeasurementRectilinearSlopeItemLabelPosition.php index 2a0cfc0b..0c7338d3 100644 --- a/src/Types/AnnotationLineMeasureRectilinearAreaItemLabelPosition.php +++ b/src/Types/PdfMeasurementRectilinearSlopeItemLabelPosition.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum AnnotationLineMeasureRectilinearAreaItemLabelPosition: string +enum PdfMeasurementRectilinearSlopeItemLabelPosition: string { case Suffix = "suffix"; case Prefix = "prefix"; diff --git a/src/Types/PdfMeasurementRectilinearXItem.php b/src/Types/PdfMeasurementRectilinearXItem.php new file mode 100644 index 00000000..d41e36ad --- /dev/null +++ b/src/Types/PdfMeasurementRectilinearXItem.php @@ -0,0 +1,106 @@ + $fraction + */ + #[JsonProperty('fraction')] + public ?string $fraction; + + /** + * @var ?int $precision + */ + #[JsonProperty('precision')] + public ?int $precision; + + /** + * @var ?bool $fixed + */ + #[JsonProperty('fixed')] + public ?bool $fixed; + + /** + * @var ?string $thousands + */ + #[JsonProperty('thousands')] + public ?string $thousands; + + /** + * @var ?string $decimal + */ + #[JsonProperty('decimal')] + public ?string $decimal; + + /** + * @var ?string $prefixSpacing + */ + #[JsonProperty('prefixSpacing')] + public ?string $prefixSpacing; + + /** + * @var ?string $suffixSpacing + */ + #[JsonProperty('suffixSpacing')] + public ?string $suffixSpacing; + + /** + * @var ?value-of $labelPosition + */ + #[JsonProperty('labelPosition')] + public ?string $labelPosition; + + /** + * @param array{ + * unit: string, + * conversion?: ?float, + * fraction?: ?value-of, + * precision?: ?int, + * fixed?: ?bool, + * thousands?: ?string, + * decimal?: ?string, + * prefixSpacing?: ?string, + * suffixSpacing?: ?string, + * labelPosition?: ?value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->unit = $values['unit']; + $this->conversion = $values['conversion'] ?? null; + $this->fraction = $values['fraction'] ?? null; + $this->precision = $values['precision'] ?? null; + $this->fixed = $values['fixed'] ?? null; + $this->thousands = $values['thousands'] ?? null; + $this->decimal = $values['decimal'] ?? null; + $this->prefixSpacing = $values['prefixSpacing'] ?? null; + $this->suffixSpacing = $values['suffixSpacing'] ?? null; + $this->labelPosition = $values['labelPosition'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/PdfMeasurementRectilinearXItemFraction.php b/src/Types/PdfMeasurementRectilinearXItemFraction.php new file mode 100644 index 00000000..380090f4 --- /dev/null +++ b/src/Types/PdfMeasurementRectilinearXItemFraction.php @@ -0,0 +1,11 @@ + $fraction + */ + #[JsonProperty('fraction')] + public ?string $fraction; + + /** + * @var ?int $precision + */ + #[JsonProperty('precision')] + public ?int $precision; + + /** + * @var ?bool $fixed + */ + #[JsonProperty('fixed')] + public ?bool $fixed; + + /** + * @var ?string $thousands + */ + #[JsonProperty('thousands')] + public ?string $thousands; + + /** + * @var ?string $decimal + */ + #[JsonProperty('decimal')] + public ?string $decimal; + + /** + * @var ?string $prefixSpacing + */ + #[JsonProperty('prefixSpacing')] + public ?string $prefixSpacing; + + /** + * @var ?string $suffixSpacing + */ + #[JsonProperty('suffixSpacing')] + public ?string $suffixSpacing; + + /** + * @var ?value-of $labelPosition + */ + #[JsonProperty('labelPosition')] + public ?string $labelPosition; + + /** + * @param array{ + * unit: string, + * conversion?: ?float, + * fraction?: ?value-of, + * precision?: ?int, + * fixed?: ?bool, + * thousands?: ?string, + * decimal?: ?string, + * prefixSpacing?: ?string, + * suffixSpacing?: ?string, + * labelPosition?: ?value-of, + * } $values + */ + public function __construct( + array $values, + ) { + $this->unit = $values['unit']; + $this->conversion = $values['conversion'] ?? null; + $this->fraction = $values['fraction'] ?? null; + $this->precision = $values['precision'] ?? null; + $this->fixed = $values['fixed'] ?? null; + $this->thousands = $values['thousands'] ?? null; + $this->decimal = $values['decimal'] ?? null; + $this->prefixSpacing = $values['prefixSpacing'] ?? null; + $this->suffixSpacing = $values['suffixSpacing'] ?? null; + $this->labelPosition = $values['labelPosition'] ?? null; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/PdfMeasurementRectilinearYItemFraction.php b/src/Types/PdfMeasurementRectilinearYItemFraction.php new file mode 100644 index 00000000..4fd302d4 --- /dev/null +++ b/src/Types/PdfMeasurementRectilinearYItemFraction.php @@ -0,0 +1,11 @@ +print = $values['print']; + $this->modifyContents = $values['modifyContents']; + $this->copy = $values['copy']; + $this->modifyAnnotations = $values['modifyAnnotations']; + $this->fillForms = $values['fillForms']; + $this->copyForAccessibility = $values['copyForAccessibility']; + $this->assemble = $values['assemble']; + $this->printHighQuality = $values['printHighQuality']; + } + + /** + * @return string + */ + public function __toString(): string + { + return $this->toJson(); + } +} diff --git a/src/Types/TenantsCreate200Response.php b/src/Types/TenantsCreateResponse.php similarity index 74% rename from src/Types/TenantsCreate200Response.php rename to src/Types/TenantsCreateResponse.php index 4acafe99..e2ac474f 100644 --- a/src/Types/TenantsCreate200Response.php +++ b/src/Types/TenantsCreateResponse.php @@ -5,13 +5,13 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class TenantsCreate200Response extends JsonSerializableType +class TenantsCreateResponse extends JsonSerializableType { /** - * @var TenantsCreate200ResponseTenant $tenant + * @var TenantsCreateResponseTenant $tenant */ #[JsonProperty('tenant')] - public TenantsCreate200ResponseTenant $tenant; + public TenantsCreateResponseTenant $tenant; /** * @var bool $created @@ -21,7 +21,7 @@ class TenantsCreate200Response extends JsonSerializableType /** * @param array{ - * tenant: TenantsCreate200ResponseTenant, + * tenant: TenantsCreateResponseTenant, * created: bool, * } $values */ diff --git a/src/Types/TenantsGet200ResponseTenant.php b/src/Types/TenantsCreateResponseTenant.php similarity index 77% rename from src/Types/TenantsGet200ResponseTenant.php rename to src/Types/TenantsCreateResponseTenant.php index c8417279..d39f1691 100644 --- a/src/Types/TenantsGet200ResponseTenant.php +++ b/src/Types/TenantsCreateResponseTenant.php @@ -5,8 +5,10 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; +use DateTime; +use CloudPDF\Core\Types\Date; -class TenantsGet200ResponseTenant extends JsonSerializableType +class TenantsCreateResponseTenant extends JsonSerializableType { /** * @var string $id @@ -27,7 +29,7 @@ class TenantsGet200ResponseTenant extends JsonSerializableType public bool $autoProvisioned; /** - * @var ?value-of $status + * @var ?value-of $status */ #[JsonProperty('status')] public ?string $status; @@ -39,18 +41,18 @@ class TenantsGet200ResponseTenant extends JsonSerializableType public ?array $features; /** - * @var float $createdAt + * @var DateTime $createdAt */ - #[JsonProperty('createdAt')] - public float $createdAt; + #[JsonProperty('createdAt'), Date(Date::TYPE_DATETIME)] + public DateTime $createdAt; /** * @param array{ * id: string, * name: string, * autoProvisioned: bool, - * createdAt: float, - * status?: ?value-of, + * createdAt: DateTime, + * status?: ?value-of, * features?: ?array, * } $values */ diff --git a/src/Types/TenantsGet200ResponseTenantStatus.php b/src/Types/TenantsCreateResponseTenantStatus.php similarity index 68% rename from src/Types/TenantsGet200ResponseTenantStatus.php rename to src/Types/TenantsCreateResponseTenantStatus.php index bc3d2504..2e847aca 100644 --- a/src/Types/TenantsGet200ResponseTenantStatus.php +++ b/src/Types/TenantsCreateResponseTenantStatus.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum TenantsGet200ResponseTenantStatus: string +enum TenantsCreateResponseTenantStatus: string { case Active = "active"; case Suspended = "suspended"; diff --git a/src/Types/TenantsGet200Response.php b/src/Types/TenantsGetResponse.php similarity index 69% rename from src/Types/TenantsGet200Response.php rename to src/Types/TenantsGetResponse.php index 9e94ff22..5d227fc4 100644 --- a/src/Types/TenantsGet200Response.php +++ b/src/Types/TenantsGetResponse.php @@ -5,17 +5,17 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class TenantsGet200Response extends JsonSerializableType +class TenantsGetResponse extends JsonSerializableType { /** - * @var TenantsGet200ResponseTenant $tenant + * @var TenantsGetResponseTenant $tenant */ #[JsonProperty('tenant')] - public TenantsGet200ResponseTenant $tenant; + public TenantsGetResponseTenant $tenant; /** * @param array{ - * tenant: TenantsGet200ResponseTenant, + * tenant: TenantsGetResponseTenant, * } $values */ public function __construct( diff --git a/src/Types/TenantsCreate200ResponseTenant.php b/src/Types/TenantsGetResponseTenant.php similarity index 78% rename from src/Types/TenantsCreate200ResponseTenant.php rename to src/Types/TenantsGetResponseTenant.php index d30860b8..75a1d8d7 100644 --- a/src/Types/TenantsCreate200ResponseTenant.php +++ b/src/Types/TenantsGetResponseTenant.php @@ -5,8 +5,10 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; +use DateTime; +use CloudPDF\Core\Types\Date; -class TenantsCreate200ResponseTenant extends JsonSerializableType +class TenantsGetResponseTenant extends JsonSerializableType { /** * @var string $id @@ -27,7 +29,7 @@ class TenantsCreate200ResponseTenant extends JsonSerializableType public bool $autoProvisioned; /** - * @var ?value-of $status + * @var ?value-of $status */ #[JsonProperty('status')] public ?string $status; @@ -39,18 +41,18 @@ class TenantsCreate200ResponseTenant extends JsonSerializableType public ?array $features; /** - * @var float $createdAt + * @var DateTime $createdAt */ - #[JsonProperty('createdAt')] - public float $createdAt; + #[JsonProperty('createdAt'), Date(Date::TYPE_DATETIME)] + public DateTime $createdAt; /** * @param array{ * id: string, * name: string, * autoProvisioned: bool, - * createdAt: float, - * status?: ?value-of, + * createdAt: DateTime, + * status?: ?value-of, * features?: ?array, * } $values */ diff --git a/src/Types/TenantsCreate200ResponseTenantStatus.php b/src/Types/TenantsGetResponseTenantStatus.php similarity index 66% rename from src/Types/TenantsCreate200ResponseTenantStatus.php rename to src/Types/TenantsGetResponseTenantStatus.php index 4eb9d494..24c937d4 100644 --- a/src/Types/TenantsCreate200ResponseTenantStatus.php +++ b/src/Types/TenantsGetResponseTenantStatus.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum TenantsCreate200ResponseTenantStatus: string +enum TenantsGetResponseTenantStatus: string { case Active = "active"; case Suspended = "suspended"; diff --git a/src/Types/TenantsList200Response.php b/src/Types/TenantsListResponse.php similarity index 72% rename from src/Types/TenantsList200Response.php rename to src/Types/TenantsListResponse.php index 06a9ff9b..351461ad 100644 --- a/src/Types/TenantsList200Response.php +++ b/src/Types/TenantsListResponse.php @@ -6,12 +6,12 @@ use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; -class TenantsList200Response extends JsonSerializableType +class TenantsListResponse extends JsonSerializableType { /** - * @var array $tenants + * @var array $tenants */ - #[JsonProperty('tenants'), ArrayType([TenantsList200ResponseTenantsItem::class])] + #[JsonProperty('tenants'), ArrayType([TenantsListResponseTenantsItem::class])] public array $tenants; /** @@ -22,7 +22,7 @@ class TenantsList200Response extends JsonSerializableType /** * @param array{ - * tenants: array, + * tenants: array, * nextCursor?: ?string, * } $values */ diff --git a/src/Types/TenantsUpdate200ResponseTenant.php b/src/Types/TenantsListResponseTenantsItem.php similarity index 77% rename from src/Types/TenantsUpdate200ResponseTenant.php rename to src/Types/TenantsListResponseTenantsItem.php index 42ced47a..6edd868f 100644 --- a/src/Types/TenantsUpdate200ResponseTenant.php +++ b/src/Types/TenantsListResponseTenantsItem.php @@ -5,8 +5,10 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; +use DateTime; +use CloudPDF\Core\Types\Date; -class TenantsUpdate200ResponseTenant extends JsonSerializableType +class TenantsListResponseTenantsItem extends JsonSerializableType { /** * @var string $id @@ -27,7 +29,7 @@ class TenantsUpdate200ResponseTenant extends JsonSerializableType public bool $autoProvisioned; /** - * @var ?value-of $status + * @var ?value-of $status */ #[JsonProperty('status')] public ?string $status; @@ -39,18 +41,18 @@ class TenantsUpdate200ResponseTenant extends JsonSerializableType public ?array $features; /** - * @var float $createdAt + * @var DateTime $createdAt */ - #[JsonProperty('createdAt')] - public float $createdAt; + #[JsonProperty('createdAt'), Date(Date::TYPE_DATETIME)] + public DateTime $createdAt; /** * @param array{ * id: string, * name: string, * autoProvisioned: bool, - * createdAt: float, - * status?: ?value-of, + * createdAt: DateTime, + * status?: ?value-of, * features?: ?array, * } $values */ diff --git a/src/Types/TenantsUpdate200ResponseTenantStatus.php b/src/Types/TenantsListResponseTenantsItemStatus.php similarity index 66% rename from src/Types/TenantsUpdate200ResponseTenantStatus.php rename to src/Types/TenantsListResponseTenantsItemStatus.php index eb719a5c..a8c7daae 100644 --- a/src/Types/TenantsUpdate200ResponseTenantStatus.php +++ b/src/Types/TenantsListResponseTenantsItemStatus.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum TenantsUpdate200ResponseTenantStatus: string +enum TenantsListResponseTenantsItemStatus: string { case Active = "active"; case Suspended = "suspended"; diff --git a/src/Types/TenantsUpdate200Response.php b/src/Types/TenantsUpdateResponse.php similarity index 68% rename from src/Types/TenantsUpdate200Response.php rename to src/Types/TenantsUpdateResponse.php index bfa70a07..bab1daba 100644 --- a/src/Types/TenantsUpdate200Response.php +++ b/src/Types/TenantsUpdateResponse.php @@ -5,17 +5,17 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class TenantsUpdate200Response extends JsonSerializableType +class TenantsUpdateResponse extends JsonSerializableType { /** - * @var TenantsUpdate200ResponseTenant $tenant + * @var TenantsUpdateResponseTenant $tenant */ #[JsonProperty('tenant')] - public TenantsUpdate200ResponseTenant $tenant; + public TenantsUpdateResponseTenant $tenant; /** * @param array{ - * tenant: TenantsUpdate200ResponseTenant, + * tenant: TenantsUpdateResponseTenant, * } $values */ public function __construct( diff --git a/src/Types/TenantsList200ResponseTenantsItem.php b/src/Types/TenantsUpdateResponseTenant.php similarity index 77% rename from src/Types/TenantsList200ResponseTenantsItem.php rename to src/Types/TenantsUpdateResponseTenant.php index 55898aeb..bd365a3a 100644 --- a/src/Types/TenantsList200ResponseTenantsItem.php +++ b/src/Types/TenantsUpdateResponseTenant.php @@ -5,8 +5,10 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Types\ArrayType; +use DateTime; +use CloudPDF\Core\Types\Date; -class TenantsList200ResponseTenantsItem extends JsonSerializableType +class TenantsUpdateResponseTenant extends JsonSerializableType { /** * @var string $id @@ -27,7 +29,7 @@ class TenantsList200ResponseTenantsItem extends JsonSerializableType public bool $autoProvisioned; /** - * @var ?value-of $status + * @var ?value-of $status */ #[JsonProperty('status')] public ?string $status; @@ -39,18 +41,18 @@ class TenantsList200ResponseTenantsItem extends JsonSerializableType public ?array $features; /** - * @var float $createdAt + * @var DateTime $createdAt */ - #[JsonProperty('createdAt')] - public float $createdAt; + #[JsonProperty('createdAt'), Date(Date::TYPE_DATETIME)] + public DateTime $createdAt; /** * @param array{ * id: string, * name: string, * autoProvisioned: bool, - * createdAt: float, - * status?: ?value-of, + * createdAt: DateTime, + * status?: ?value-of, * features?: ?array, * } $values */ diff --git a/src/Types/TenantsList200ResponseTenantsItemStatus.php b/src/Types/TenantsUpdateResponseTenantStatus.php similarity index 65% rename from src/Types/TenantsList200ResponseTenantsItemStatus.php rename to src/Types/TenantsUpdateResponseTenantStatus.php index cf4b0f87..ecd2c29e 100644 --- a/src/Types/TenantsList200ResponseTenantsItemStatus.php +++ b/src/Types/TenantsUpdateResponseTenantStatus.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum TenantsList200ResponseTenantsItemStatus: string +enum TenantsUpdateResponseTenantStatus: string { case Active = "active"; case Suspended = "suspended"; diff --git a/src/Types/TenantsUsage200Response.php b/src/Types/TenantsUsageResponse.php similarity index 67% rename from src/Types/TenantsUsage200Response.php rename to src/Types/TenantsUsageResponse.php index edde51bb..8a327d84 100644 --- a/src/Types/TenantsUsage200Response.php +++ b/src/Types/TenantsUsageResponse.php @@ -4,8 +4,9 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; +use CloudPDF\Core\Types\ArrayType; -class TenantsUsage200Response extends JsonSerializableType +class TenantsUsageResponse extends JsonSerializableType { /** * @var string $tenantId @@ -26,17 +27,24 @@ class TenantsUsage200Response extends JsonSerializableType public string $periodEnd; /** - * @var TenantsUsage200ResponseMetrics $metrics + * @var TenantsUsageResponseMetrics $metrics */ #[JsonProperty('metrics')] - public TenantsUsage200ResponseMetrics $metrics; + public TenantsUsageResponseMetrics $metrics; + + /** + * @var array $moduleMeters + */ + #[JsonProperty('moduleMeters'), ArrayType(['string' => 'integer'])] + public array $moduleMeters; /** * @param array{ * tenantId: string, * periodStart: string, * periodEnd: string, - * metrics: TenantsUsage200ResponseMetrics, + * metrics: TenantsUsageResponseMetrics, + * moduleMeters: array, * } $values */ public function __construct( @@ -46,6 +54,7 @@ public function __construct( $this->periodStart = $values['periodStart']; $this->periodEnd = $values['periodEnd']; $this->metrics = $values['metrics']; + $this->moduleMeters = $values['moduleMeters']; } /** diff --git a/src/Types/TenantsUsage200ResponseMetrics.php b/src/Types/TenantsUsageResponseMetrics.php similarity index 56% rename from src/Types/TenantsUsage200ResponseMetrics.php rename to src/Types/TenantsUsageResponseMetrics.php index 9c015d6a..2fc3afb3 100644 --- a/src/Types/TenantsUsage200ResponseMetrics.php +++ b/src/Types/TenantsUsageResponseMetrics.php @@ -5,31 +5,31 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; -class TenantsUsage200ResponseMetrics extends JsonSerializableType +class TenantsUsageResponseMetrics extends JsonSerializableType { /** - * @var float $pdfViews + * @var int $pdfViews */ - #[JsonProperty('pdf.views')] - public float $pdfViews; + #[JsonProperty('pdfViews')] + public int $pdfViews; /** - * @var float $pdfUploads + * @var int $pdfUploads */ - #[JsonProperty('pdf.uploads')] - public float $pdfUploads; + #[JsonProperty('pdfUploads')] + public int $pdfUploads; /** - * @var float $storageBytes + * @var int $storageBytes */ - #[JsonProperty('storage.bytes')] - public float $storageBytes; + #[JsonProperty('storageBytes')] + public int $storageBytes; /** * @param array{ - * pdfViews: float, - * pdfUploads: float, - * storageBytes: float, + * pdfViews: int, + * pdfUploads: int, + * storageBytes: int, * } $values */ public function __construct( diff --git a/src/Types/TokensIssueRequestDoc.php b/src/Types/TokensIssueRequestDoc.php index b0f33c0f..b4928410 100644 --- a/src/Types/TokensIssueRequestDoc.php +++ b/src/Types/TokensIssueRequestDoc.php @@ -45,17 +45,17 @@ class TokensIssueRequestDoc extends JsonSerializableType public ?array $origins; /** - * @var int $expiresIn + * @var int $expiresInSeconds */ - #[JsonProperty('expiresIn')] - public int $expiresIn; + #[JsonProperty('expiresInSeconds')] + public int $expiresInSeconds; /** * @param array{ * sub: string, * docId: string, * scope: array, - * expiresIn: int, + * expiresInSeconds: int, * layerName?: ?string, * identity?: ?Identity, * origins?: ?array, @@ -70,7 +70,7 @@ public function __construct( $this->scope = $values['scope']; $this->identity = $values['identity'] ?? null; $this->origins = $values['origins'] ?? null; - $this->expiresIn = $values['expiresIn']; + $this->expiresInSeconds = $values['expiresInSeconds']; } /** diff --git a/src/Types/TokensIssueRequestTenant.php b/src/Types/TokensIssueRequestTenant.php index 195abd10..fbdc802f 100644 --- a/src/Types/TokensIssueRequestTenant.php +++ b/src/Types/TokensIssueRequestTenant.php @@ -21,16 +21,16 @@ class TokensIssueRequestTenant extends JsonSerializableType public array $scope; /** - * @var int $expiresIn + * @var int $expiresInSeconds */ - #[JsonProperty('expiresIn')] - public int $expiresIn; + #[JsonProperty('expiresInSeconds')] + public int $expiresInSeconds; /** * @param array{ * sub: string, * scope: array, - * expiresIn: int, + * expiresInSeconds: int, * } $values */ public function __construct( @@ -38,7 +38,7 @@ public function __construct( ) { $this->sub = $values['sub']; $this->scope = $values['scope']; - $this->expiresIn = $values['expiresIn']; + $this->expiresInSeconds = $values['expiresInSeconds']; } /** diff --git a/src/Types/TokensIssueRequestUpload.php b/src/Types/TokensIssueRequestUpload.php index 73bb311c..9bd419e8 100644 --- a/src/Types/TokensIssueRequestUpload.php +++ b/src/Types/TokensIssueRequestUpload.php @@ -45,15 +45,15 @@ class TokensIssueRequestUpload extends JsonSerializableType public ?array $origins; /** - * @var int $expiresIn + * @var int $expiresInSeconds */ - #[JsonProperty('expiresIn')] - public int $expiresIn; + #[JsonProperty('expiresInSeconds')] + public int $expiresInSeconds; /** * @param array{ * sub: string, - * expiresIn: int, + * expiresInSeconds: int, * folderId?: ?string, * metadata?: ?array, * maxFiles?: ?int, @@ -70,7 +70,7 @@ public function __construct( $this->maxFiles = $values['maxFiles'] ?? null; $this->maxBytes = $values['maxBytes'] ?? null; $this->origins = $values['origins'] ?? null; - $this->expiresIn = $values['expiresIn']; + $this->expiresInSeconds = $values['expiresInSeconds']; } /** diff --git a/src/Types/TokensIssue200Response.php b/src/Types/TokensIssueResponse.php similarity index 74% rename from src/Types/TokensIssue200Response.php rename to src/Types/TokensIssueResponse.php index ae3661e9..63a2b362 100644 --- a/src/Types/TokensIssue200Response.php +++ b/src/Types/TokensIssueResponse.php @@ -4,8 +4,10 @@ use CloudPDF\Core\Json\JsonSerializableType; use CloudPDF\Core\Json\JsonProperty; +use DateTime; +use CloudPDF\Core\Types\Date; -class TokensIssue200Response extends JsonSerializableType +class TokensIssueResponse extends JsonSerializableType { /** * @var string $token @@ -20,16 +22,16 @@ class TokensIssue200Response extends JsonSerializableType public string $jti; /** - * @var float $expiresAt + * @var DateTime $expiresAt */ - #[JsonProperty('expiresAt')] - public float $expiresAt; + #[JsonProperty('expiresAt'), Date(Date::TYPE_DATETIME)] + public DateTime $expiresAt; /** * @param array{ * token: string, * jti: string, - * expiresAt: float, + * expiresAt: DateTime, * } $values */ public function __construct( diff --git a/src/Types/WidgetAnnotation.php b/src/Types/WidgetAnnotation.php index 33558ae7..e5941e2e 100644 --- a/src/Types/WidgetAnnotation.php +++ b/src/Types/WidgetAnnotation.php @@ -209,10 +209,10 @@ class WidgetAnnotation extends JsonSerializableType public WidgetAnnotationBox $box; /** - * @var ?float $rotation + * @var ?int $rotation */ #[JsonProperty('rotation')] - public ?float $rotation; + public ?int $rotation; /** * @var ?string $color @@ -287,10 +287,16 @@ class WidgetAnnotation extends JsonSerializableType public ?FormFieldRef $field; /** - * @var value-of $fieldFamily + * @var value-of $fieldKind Its field's family. A newer server can add families: read one your client doesn't know as `unknown`. */ - #[JsonProperty('fieldFamily')] - public string $fieldFamily; + #[JsonProperty('fieldKind')] + public string $fieldKind; + + /** + * @var bool $hasMark + */ + #[JsonProperty('hasMark')] + public bool $hasMark; /** * @param array{ @@ -314,7 +320,8 @@ class WidgetAnnotation extends JsonSerializableType * strokeWidth: float, * borderStyle: value-of, * textAlign: value-of, - * fieldFamily: value-of, + * fieldKind: value-of, + * hasMark: bool, * appearanceState?: ?string, * structurePosition?: ?array, * nm?: ?string, @@ -331,7 +338,7 @@ class WidgetAnnotation extends JsonSerializableType * modifiedBy?: ?string, * importedBy?: ?string, * actions?: ?PdfAnnotationActions, - * rotation?: ?float, + * rotation?: ?int, * color?: ?string, * interiorColor?: ?string, * dashArray?: ?array, @@ -392,7 +399,8 @@ public function __construct( $this->caption = $values['caption'] ?? null; $this->checkStyle = $values['checkStyle'] ?? null; $this->field = $values['field'] ?? null; - $this->fieldFamily = $values['fieldFamily']; + $this->fieldKind = $values['fieldKind']; + $this->hasMark = $values['hasMark']; } /** diff --git a/src/Types/WidgetAnnotationFieldFamily.php b/src/Types/WidgetAnnotationFieldKind.php similarity index 87% rename from src/Types/WidgetAnnotationFieldFamily.php rename to src/Types/WidgetAnnotationFieldKind.php index 409e13dc..3ea2761c 100644 --- a/src/Types/WidgetAnnotationFieldFamily.php +++ b/src/Types/WidgetAnnotationFieldKind.php @@ -2,7 +2,7 @@ namespace CloudPDF\Types; -enum WidgetAnnotationFieldFamily: string +enum WidgetAnnotationFieldKind: string { case Text = "text"; case Checkbox = "checkbox"; diff --git a/src/Types/WidgetPatch.php b/src/Types/WidgetPatch.php index 2cf48054..df54c96a 100644 --- a/src/Types/WidgetPatch.php +++ b/src/Types/WidgetPatch.php @@ -212,10 +212,10 @@ class WidgetPatch extends JsonSerializableType public ?WidgetPatchBox $box; /** - * @var ?float $rotation + * @var ?int $rotation */ #[JsonProperty('rotation')] - public ?float $rotation; + public ?int $rotation; /** * @var ?string $color @@ -290,10 +290,16 @@ class WidgetPatch extends JsonSerializableType public mixed $field; /** - * @var mixed $fieldFamily + * @var mixed $fieldKind */ - #[JsonProperty('fieldFamily')] - public mixed $fieldFamily; + #[JsonProperty('fieldKind')] + public mixed $fieldKind; + + /** + * @var mixed $hasMark + */ + #[JsonProperty('hasMark')] + public mixed $hasMark; /** * @param array{ @@ -334,7 +340,7 @@ class WidgetPatch extends JsonSerializableType * |null * ), * box?: ?WidgetPatchBox, - * rotation?: ?float, + * rotation?: ?int, * color?: ?string, * interiorColor?: ?string, * strokeWidth?: ?float, @@ -347,7 +353,8 @@ class WidgetPatch extends JsonSerializableType * caption?: ?string, * checkStyle?: ?value-of, * field?: mixed, - * fieldFamily?: mixed, + * fieldKind?: mixed, + * hasMark?: mixed, * } $values */ public function __construct( @@ -399,7 +406,8 @@ public function __construct( $this->caption = $values['caption'] ?? null; $this->checkStyle = $values['checkStyle'] ?? null; $this->field = $values['field'] ?? null; - $this->fieldFamily = $values['fieldFamily'] ?? null; + $this->fieldKind = $values['fieldKind'] ?? null; + $this->hasMark = $values['hasMark'] ?? null; } /** diff --git a/src/Types/WidgetPlacement.php b/src/Types/WidgetPlacement.php index a5cc86fa..dfb12867 100644 --- a/src/Types/WidgetPlacement.php +++ b/src/Types/WidgetPlacement.php @@ -27,10 +27,10 @@ class WidgetPlacement extends JsonSerializableType public ?WidgetPlacementBox $box; /** - * @var ?float $rotation + * @var ?int $rotation */ #[JsonProperty('rotation')] - public ?float $rotation; + public ?int $rotation; /** * @var ?string $exportValue @@ -115,7 +115,7 @@ class WidgetPlacement extends JsonSerializableType * page: PageRef, * rect?: ?WidgetPlacementRect, * box?: ?WidgetPlacementBox, - * rotation?: ?float, + * rotation?: ?int, * exportValue?: ?string, * actions?: ?WidgetActionsPatch, * color?: ?string, diff --git a/tests/Core/Client/RawClientTest.php b/tests/Core/Client/RawClientTest.php index 2d2f144f..45ca8631 100644 --- a/tests/Core/Client/RawClientTest.php +++ b/tests/Core/Client/RawClientTest.php @@ -2,6 +2,7 @@ namespace CloudPDF\Tests\Core\Client; +use InvalidArgumentException; use PHPUnit\Framework\TestCase; use Psr\Http\Client\ClientExceptionInterface; use Psr\Http\Message\RequestInterface; @@ -140,6 +141,38 @@ public function testEncodedPathParamDoesNotTraverse(): void ); } + /** + * @throws ClientExceptionInterface + */ + public function testRejectsDotSegmentPaths(): void + { + foreach (['/plants/..', '/plants/./leaves', '/plants/../leaves/L1', '/plants/%2e%2E/leaves'] as $path) { + $request = new JsonApiRequest($this->baseUrl, $path, HttpMethod::DELETE); + try { + $this->rawClient->sendRequest($request); + $this->fail("Expected InvalidArgumentException for path {$path}"); + } catch (InvalidArgumentException $e) { + $this->assertStringContainsString('path segments are not allowed', $e->getMessage()); + } + } + $this->assertNull($this->mockClient->getLastRequest()); + } + + /** + * @throws ClientExceptionInterface + */ + public function testAllowsPathSegmentsContainingDots(): void + { + $this->mockClient->append(self::createResponse(200)); + + $request = new JsonApiRequest($this->baseUrl, '/plants/v1.2/...', HttpMethod::GET); + $this->rawClient->sendRequest($request); + + $lastRequest = $this->mockClient->getLastRequest(); + $this->assertInstanceOf(RequestInterface::class, $lastRequest); + $this->assertEquals('https://api.example.com/plants/v1.2/...', (string)$lastRequest->getUri()); + } + /** * @throws ClientExceptionInterface */ diff --git a/tests/Core/Json/NullPropertyTest.php b/tests/Core/Json/NullPropertyTest.php index 84d85a26..aa1eb0c1 100644 --- a/tests/Core/Json/NullPropertyTest.php +++ b/tests/Core/Json/NullPropertyTest.php @@ -2,9 +2,12 @@ namespace CloudPDF\Tests\Core\Json; +use DateTime; use PHPUnit\Framework\TestCase; +use JsonException; use CloudPDF\Core\Json\JsonProperty; use CloudPDF\Core\Json\JsonSerializableType; +use CloudPDF\Core\Types\Date; class NullProperty extends JsonSerializableType { @@ -20,10 +23,24 @@ class NullProperty extends JsonSerializableType #[JsonProperty('null_property')] public ?string $nullProperty; + /** + * @var DateTime|null $nullDate + */ + #[JsonProperty('null_date'), Date(Date::TYPE_DATE)] + public ?DateTime $nullDate; + + /** + * @var DateTime|null $nullDateTime + */ + #[JsonProperty('null_datetime'), Date(Date::TYPE_DATETIME)] + public ?DateTime $nullDateTime; + /** * @param array{ * nonNullProperty: string, * nullProperty?: string|null, + * nullDate?: DateTime|null, + * nullDateTime?: DateTime|null, * } $values */ public function __construct( @@ -31,6 +48,8 @@ public function __construct( ) { $this->nonNullProperty = $values['nonNullProperty']; $this->nullProperty = $values['nullProperty'] ?? null; + $this->nullDate = $values['nullDate'] ?? null; + $this->nullDateTime = $values['nullDateTime'] ?? null; } } @@ -50,4 +69,34 @@ public function testNullPropertiesAreOmitted(): void $this->assertArrayNotHasKey('null_property', $serialized, 'null_property should be omitted from the serialized JSON.'); $this->assertEquals('Test String', $serialized['non_null_property'], 'non_null_property should have the correct value.'); } + + public function testNullDatePropertiesDeserialize(): void + { + $object = NullProperty::fromJson('{"non_null_property": "Test String", "null_date": null, "null_datetime": null}'); + $this->assertEquals('Test String', $object->nonNullProperty); + $this->assertNull($object->nullDate, 'null_date should deserialize to null.'); + $this->assertNull($object->nullDateTime, 'null_datetime should deserialize to null.'); + } + + public function testMissingDatePropertiesDeserialize(): void + { + $object = NullProperty::fromJson('{"non_null_property": "Test String"}'); + $this->assertNull($object->nullDate, 'Omitted null_date should deserialize to null.'); + $this->assertNull($object->nullDateTime, 'Omitted null_datetime should deserialize to null.'); + } + + public function testNonNullDatePropertiesDeserialize(): void + { + $object = NullProperty::fromJson('{"non_null_property": "Test String", "null_date": "2023-01-01", "null_datetime": "2023-01-01T12:00:00Z"}'); + $this->assertInstanceOf(DateTime::class, $object->nullDate); + $this->assertEquals('2023-01-01', $object->nullDate->format('Y-m-d')); + $this->assertInstanceOf(DateTime::class, $object->nullDateTime); + $this->assertEquals('2023-01-01T12:00:00+00:00', $object->nullDateTime->format(DateTime::ATOM)); + } + + public function testInvalidDatePropertyThrows(): void + { + $this->expectException(JsonException::class); + NullProperty::fromJson('{"non_null_property": "Test String", "null_datetime": 12345}'); + } }