diff --git a/docs-main/appdev/reference/daml-standard-library/da-action-state.mdx b/docs-main/appdev/reference/daml-standard-library/da-action-state.mdx index 9d89076d1..a04e792d3 100644 --- a/docs-main/appdev/reference/daml-standard-library/da-action-state.mdx +++ b/docs-main/appdev/reference/daml-standard-library/da-action-state.mdx @@ -79,7 +79,7 @@ Instances: ### `evalState` -```haskell +```daml evalState : State s a -> s -> a ``` @@ -89,7 +89,7 @@ Special case of `runState` that does not return the final state. ### `execState` -```haskell +```daml execState : State s a -> s -> s ``` diff --git a/docs-main/appdev/reference/daml-standard-library/da-action.mdx b/docs-main/appdev/reference/daml-standard-library/da-action.mdx index 6320811a6..cfa252b8e 100644 --- a/docs-main/appdev/reference/daml-standard-library/da-action.mdx +++ b/docs-main/appdev/reference/daml-standard-library/da-action.mdx @@ -31,7 +31,7 @@ Deprecated since: `-` ### `when` -```haskell +```daml when : Applicative f => Bool -> f () -> f () ``` @@ -50,7 +50,7 @@ is not evaluated at all. ### `unless` -```haskell +```daml unless : Applicative f => Bool -> f () -> f () ``` @@ -64,7 +64,7 @@ is not evaluated at all. ### `foldrA` -```haskell +```daml foldrA : Action m => (a -> b -> m b) -> b -> [a] -> m b ``` @@ -76,7 +76,7 @@ over the list arguments. ### `foldr1A` -```haskell +```daml foldr1A : Action m => (a -> a -> m a) -> [a] -> m a ``` @@ -87,7 +87,7 @@ with an empty list argument. ### `foldlA` -```haskell +```daml foldlA : Action m => (b -> a -> m b) -> b -> [a] -> m b ``` @@ -99,7 +99,7 @@ left-to-right over the list arguments. ### `foldl1A` -```haskell +```daml foldl1A : Action m => (a -> a -> m a) -> [a] -> m a ``` @@ -110,7 +110,7 @@ presented with an empty list argument. ### `filterA` -```haskell +```daml filterA : Applicative m => (a -> m Bool) -> [a] -> m [a] ``` @@ -125,7 +125,7 @@ filterA (fmap (\iou -> iou.currency == "GBP") . fetch) iouCids ### `replicateA` -```haskell +```daml replicateA : Applicative m => Int -> m a -> m [a] ``` @@ -136,7 +136,7 @@ results. ### `replicateA_` -```haskell +```daml replicateA_ : Applicative m => Int -> m a -> m () ``` @@ -146,7 +146,7 @@ Like `replicateA`, but discards the result. ### `>=>` -```haskell +```daml >=> : Action m => (a -> m b) -> (b -> m c) -> a -> m c ``` @@ -156,7 +156,7 @@ Left-to-right composition of Kleisli arrows. ### `<=<` -```haskell +```daml <=< : Action m => (b -> m c) -> (a -> m b) -> a -> m c ``` diff --git a/docs-main/appdev/reference/daml-standard-library/da-assert.mdx b/docs-main/appdev/reference/daml-standard-library/da-assert.mdx index e48ba3ae0..c2ec708c5 100644 --- a/docs-main/appdev/reference/daml-standard-library/da-assert.mdx +++ b/docs-main/appdev/reference/daml-standard-library/da-assert.mdx @@ -29,7 +29,7 @@ Deprecated since: `-` ### `assertEq` -```haskell +```daml assertEq : (CanAssert m, Show a, Eq a) => a -> a -> m () ``` @@ -40,7 +40,7 @@ fail with a message. ### `===` -```haskell +```daml === : (CanAssert m, Show a, Eq a) => a -> a -> m () ``` @@ -50,7 +50,7 @@ Infix version of `assertEq`. ### `assertNotEq` -```haskell +```daml assertNotEq : (CanAssert m, Show a, Eq a) => a -> a -> m () ``` @@ -61,7 +61,7 @@ fail with a message. ### `=/=` -```haskell +```daml =/= : (CanAssert m, Show a, Eq a) => a -> a -> m () ``` @@ -71,7 +71,7 @@ Infix version of `assertNotEq`. ### `assertAfterMsg` -```haskell +```daml assertAfterMsg : (CanAssert m, HasTime m) => Text -> Time -> m () ``` @@ -82,7 +82,7 @@ abort with a message. ### `assertBeforeMsg` -```haskell +```daml assertBeforeMsg : (CanAssert m, HasTime m) => Text -> Time -> m () ``` @@ -93,7 +93,7 @@ abort with a message. ### `assertWithinDeadline` -```haskell +```daml assertWithinDeadline : Text -> Time -> Update () ``` @@ -104,7 +104,7 @@ If it's not, abort with a message. ### `assertDeadlineExceeded` -```haskell +```daml assertDeadlineExceeded : Text -> Time -> Update () ``` diff --git a/docs-main/appdev/reference/daml-standard-library/da-bifunctor.mdx b/docs-main/appdev/reference/daml-standard-library/da-bifunctor.mdx index 98a099533..022a6a6d3 100644 --- a/docs-main/appdev/reference/daml-standard-library/da-bifunctor.mdx +++ b/docs-main/appdev/reference/daml-standard-library/da-bifunctor.mdx @@ -45,13 +45,13 @@ defining both first and second. If you supply bimap, you should ensure that: -```haskell-force +```daml-force `bimap identity identity` ≡ `identity` ``` If you supply first and second, ensure: -```haskell-force +```daml-force first identity ≡ identity second identity ≡ identity @@ -59,13 +59,13 @@ second identity ≡ identity If you supply both, you should also ensure: -```haskell-force +```daml-force bimap f g ≡ first f . second g ``` By parametricity, these will ensure that: -```haskell-force +```daml-force bimap (f . g) (h . i) ≡ bimap f h . bimap g i first (f . g) ≡ first f . first g @@ -78,7 +78,7 @@ Methods: - `bimap : (a -> b) -> (c -> d) -> p a c -> p b d` Map over both arguments at the same time. - ```haskell-force + ```daml-force bimap f g ≡ first f . second g ``` @@ -97,7 +97,7 @@ Methods: - `first : (a -> b) -> p a c -> p b c` Map covariantly over the first argument. - ```haskell-force + ```daml-force first f ≡ bimap f identity ``` @@ -113,7 +113,7 @@ Methods: - `second : (b -> c) -> p a b -> p a c` Map covariantly over the second argument. - ```haskell-force + ```daml-force second ≡ bimap identity ``` diff --git a/docs-main/appdev/reference/daml-standard-library/da-crypto-text.mdx b/docs-main/appdev/reference/daml-standard-library/da-crypto-text.mdx index 5e7152192..a3da35b7b 100644 --- a/docs-main/appdev/reference/daml-standard-library/da-crypto-text.mdx +++ b/docs-main/appdev/reference/daml-standard-library/da-crypto-text.mdx @@ -94,7 +94,7 @@ Instances: ### `isHex` -```haskell +```daml isHex : Text -> Bool ``` @@ -105,7 +105,7 @@ hex or hexadecimal characters. ### `sha256` -```haskell +```daml sha256 : BytesHex -> BytesHex ``` @@ -116,7 +116,7 @@ form. The hex encoding uses lowercase letters. ### `keccak256` -```haskell +```daml keccak256 : BytesHex -> BytesHex ``` @@ -127,7 +127,7 @@ form. The hex encoding uses lowercase letters. ### `secp256k1WithEcdsaOnly` -```haskell +```daml secp256k1WithEcdsaOnly : SignatureHex -> BytesHex -> PublicKeyHex -> Bool ``` @@ -137,7 +137,7 @@ Validate the SECP256K1 signature given a hex encoded message and a hex encoded D ### `secp256k1` -```haskell +```daml secp256k1 : SignatureHex -> BytesHex -> PublicKeyHex -> Bool ``` @@ -147,7 +147,7 @@ Validate the SECP256K1 signature given a SHA256 hash of a hex encoded message an ### `numericViaStringToHex` -```haskell +```daml numericViaStringToHex : NumericScale n => Numeric n -> BytesHex ``` @@ -155,7 +155,7 @@ numericViaStringToHex : NumericScale n => Numeric n -> BytesHex ### `numericViaStringFromHex` -```haskell +```daml numericViaStringFromHex : NumericScale n => BytesHex -> Optional (Numeric n) ``` @@ -163,7 +163,7 @@ numericViaStringFromHex : NumericScale n => BytesHex -> Optional (Numeric n) ### `byteCount` -```haskell +```daml byteCount : BytesHex -> Int ``` @@ -173,7 +173,7 @@ Number of bytes present in a byte encoded string. ### `minBytes32Hex` -```haskell +```daml minBytes32Hex : BytesHex ``` @@ -183,7 +183,7 @@ Minimum Bytes32 hex value ### `maxBytes32Hex` -```haskell +```daml maxBytes32Hex : BytesHex ``` @@ -193,7 +193,7 @@ Maximum Bytes32 hex value ### `isBytes32Hex` -```haskell +```daml isBytes32Hex : BytesHex -> Bool ``` @@ -203,7 +203,7 @@ Validate that the byte encoded string is Bytes32Hex ### `minUInt32Hex` -```haskell +```daml minUInt32Hex : BytesHex ``` @@ -213,7 +213,7 @@ Minimum UInt32 hex value ### `maxUInt32Hex` -```haskell +```daml maxUInt32Hex : BytesHex ``` @@ -223,7 +223,7 @@ Maximum UInt32 hex value ### `isUInt32Hex` -```haskell +```daml isUInt32Hex : BytesHex -> Bool ``` @@ -233,7 +233,7 @@ Validate that the byte encoded string is UInt32Hex ### `minUInt64Hex` -```haskell +```daml minUInt64Hex : BytesHex ``` @@ -243,7 +243,7 @@ Minimum UInt64 hex value ### `maxUInt64Hex` -```haskell +```daml maxUInt64Hex : BytesHex ``` @@ -253,7 +253,7 @@ Maximum UInt64 hex value ### `isUInt64Hex` -```haskell +```daml isUInt64Hex : BytesHex -> Bool ``` @@ -263,7 +263,7 @@ Validate that the byte encoded string is UInt64Hex ### `minUInt256Hex` -```haskell +```daml minUInt256Hex : BytesHex ``` @@ -273,7 +273,7 @@ Minimum UInt256 hex value ### `maxUInt256Hex` -```haskell +```daml maxUInt256Hex : BytesHex ``` @@ -283,7 +283,7 @@ Maximum UInt256 hex value ### `isUInt256Hex` -```haskell +```daml isUInt256Hex : BytesHex -> Bool ``` @@ -293,7 +293,7 @@ Validate that the byte encoded string is UInt256Hex ### `packHexBytes` -```haskell +```daml packHexBytes : BytesHex -> Int -> Optional BytesHex ``` @@ -304,7 +304,7 @@ size, then prefix with 00 byte strings. If the byte string is larger, then trunc ### `sliceHexBytes` -```haskell +```daml sliceHexBytes : BytesHex -> Int -> Int -> Either Text BytesHex ``` diff --git a/docs-main/appdev/reference/daml-standard-library/da-date.mdx b/docs-main/appdev/reference/daml-standard-library/da-date.mdx index ea79180b9..26d185096 100644 --- a/docs-main/appdev/reference/daml-standard-library/da-date.mdx +++ b/docs-main/appdev/reference/daml-standard-library/da-date.mdx @@ -110,7 +110,7 @@ Instances: ### `addDays` -```haskell +```daml addDays : Date -> Int -> Date ``` @@ -120,7 +120,7 @@ Add the given number of days to a date. ### `subtractDays` -```haskell +```daml subtractDays : Date -> Int -> Date ``` @@ -132,7 +132,7 @@ Subtract the given number of days from a date. ### `subDate` -```haskell +```daml subDate : Date -> Date -> Int ``` @@ -142,7 +142,7 @@ Returns the number of days between the two given dates. ### `dayOfWeek` -```haskell +```daml dayOfWeek : Date -> DayOfWeek ``` @@ -152,7 +152,7 @@ Returns the day of week for the given date. ### `fromGregorian` -```haskell +```daml fromGregorian : (Int, Month, Int) -> Date ``` @@ -162,7 +162,7 @@ Constructs a `Date` from the triplet `(year, month, days)`. ### `toGregorian` -```haskell +```daml toGregorian : Date -> (Int, Month, Int) ``` @@ -173,7 +173,7 @@ to the Gregorian calendar. ### `date` -```haskell +```daml date : Int -> Month -> Int -> Date ``` @@ -185,7 +185,7 @@ Raises an error if `d` is outside the range `1 .. monthDayCount y m`. ### `isLeapYear` -```haskell +```daml isLeapYear : Int -> Bool ``` @@ -195,7 +195,7 @@ Returns `True` if the given year is a leap year. ### `fromMonth` -```haskell +```daml fromMonth : Month -> Int ``` @@ -206,7 +206,7 @@ to `1`, `Feb` corresponds to `2`, and so on. ### `monthDayCount` -```haskell +```daml monthDayCount : Int -> Month -> Int ``` @@ -218,7 +218,7 @@ moves from Julian to Gregorian calendar), but does count leap years. ### `datetime` -```haskell +```daml datetime : Int -> Month -> Int -> Int -> Int -> Int -> Time ``` @@ -228,7 +228,7 @@ Constructs an instant using `year`, `month`, `day`, `hours`, `minutes`, `seconds ### `toDateUTC` -```haskell +```daml toDateUTC : Time -> Date ``` diff --git a/docs-main/appdev/reference/daml-standard-library/da-either.mdx b/docs-main/appdev/reference/daml-standard-library/da-either.mdx index d46605a87..e17213b39 100644 --- a/docs-main/appdev/reference/daml-standard-library/da-either.mdx +++ b/docs-main/appdev/reference/daml-standard-library/da-either.mdx @@ -39,7 +39,7 @@ Deprecated since: `-` ### `lefts` -```haskell +```daml lefts : [Either a b] -> [a] ``` @@ -49,7 +49,7 @@ Extracts all the `Left` elements from a list. ### `rights` -```haskell +```daml rights : [Either a b] -> [b] ``` @@ -59,7 +59,7 @@ Extracts all the `Right` elements from a list. ### `partitionEithers` -```haskell +```daml partitionEithers : [Either a b] -> ([a], [b]) ``` @@ -70,7 +70,7 @@ Partitions a list of `Either` into two lists, the `Left` and ### `isLeft` -```haskell +```daml isLeft : Either a b -> Bool ``` @@ -81,7 +81,7 @@ otherwise. ### `isRight` -```haskell +```daml isRight : Either a b -> Bool ``` @@ -92,7 +92,7 @@ otherwise. ### `fromLeft` -```haskell +```daml fromLeft : a -> Either a b -> a ``` @@ -103,7 +103,7 @@ in case of a `Right`-value. ### `fromRight` -```haskell +```daml fromRight : b -> Either a b -> b ``` @@ -114,7 +114,7 @@ in case of a `Left`-value. ### `optionalToEither` -```haskell +```daml optionalToEither : a -> Optional b -> Either a b ``` @@ -125,7 +125,7 @@ parameter as the `Left` value if the `Optional` is `None`. ### `eitherToOptional` -```haskell +```daml eitherToOptional : Either a b -> Optional b ``` @@ -136,7 +136,7 @@ Convert an `Either` value to a `Optional`, dropping any value in ### `maybeToEither` -```haskell +```daml maybeToEither : a -> Optional b -> Either a b ``` @@ -144,6 +144,6 @@ maybeToEither : a -> Optional b -> Either a b ### `eitherToMaybe` -```haskell +```daml eitherToMaybe : Either a b -> Optional b ``` diff --git a/docs-main/appdev/reference/daml-standard-library/da-fail.mdx b/docs-main/appdev/reference/daml-standard-library/da-fail.mdx index 5b460fe7e..cebf32b14 100644 --- a/docs-main/appdev/reference/daml-standard-library/da-fail.mdx +++ b/docs-main/appdev/reference/daml-standard-library/da-fail.mdx @@ -33,7 +33,7 @@ Deprecated since: `-` The category of the failure, which determines the status code and log level of the failure. Maps 1-1 to the Canton error categories documented -here: [Error categories inventory](/global-synchronizer/reference/error-codes#error-categories-inventory) +here: https://docs.digitalasset.com/operate/3.4/reference/error_codes.html#error-categories-inventory If you are more familiar with gRPC error codes, you can use the synonyms referenced in the comments. @@ -47,7 +47,7 @@ and should thus not be retried. Corresponds to the gRPC status code `INVALID_ARGUMENT`. -See [Error categories inventory](/global-synchronizer/reference/error-codes#error-categories-inventory) +See https://docs.digitalasset.com/operate/3.4/reference/error_codes.html#invalidindependentofsystemstate for more information. - `InvalidGivenCurrentSystemStateOther` @@ -57,7 +57,7 @@ requests after reading updated state from the ledger. Corresponds to the gRPC status code `FAILED_PRECONDITION`. -See [Error categories inventory](/global-synchronizer/reference/error-codes#error-categories-inventory) +See https://docs.digitalasset.com/operate/3.4/reference/error_codes.html#error-categories-inventory for more information. Instances: @@ -118,7 +118,7 @@ Instances: ### `invalidArgument` -```haskell +```daml invalidArgument : FailureCategory ``` @@ -128,7 +128,7 @@ Alternative name for `InvalidIndependentOfSystemState`. ### `failedPrecondition` -```haskell +```daml failedPrecondition : FailureCategory ``` @@ -138,7 +138,7 @@ Alternative name for `InvalidGivenCurrentSystemStateOther`. ### `failWithStatusPure` -```haskell +```daml failWithStatusPure : FailureStatus -> a ``` @@ -177,5 +177,3 @@ Fail with a failure status in a pure context - `instance ActionFail Update` - `instance CanAbort Update` - -{/* Mintlify preview rebuild marker. */} diff --git a/docs-main/appdev/reference/daml-standard-library/da-foldable.mdx b/docs-main/appdev/reference/daml-standard-library/da-foldable.mdx index 226cac921..d9268b6bf 100644 --- a/docs-main/appdev/reference/daml-standard-library/da-foldable.mdx +++ b/docs-main/appdev/reference/daml-standard-library/da-foldable.mdx @@ -92,7 +92,7 @@ Instances: ### `mapA_` -```haskell +```daml mapA_ : (Foldable t, Applicative f) => (a -> f b) -> t a -> f () ``` @@ -104,7 +104,7 @@ that doesn't ignore the results see 'DA.Traversable.mapA'. ### `forA_` -```haskell +```daml forA_ : (Foldable t, Applicative f) => t a -> (a -> f b) -> f () ``` @@ -115,7 +115,7 @@ that doesn't ignore the results see 'DA.Traversable.forA'. ### `forM_` -```haskell +```daml forM_ : (Foldable t, Applicative f) => t a -> (a -> f b) -> f () ``` @@ -123,7 +123,7 @@ forM_ : (Foldable t, Applicative f) => t a -> (a -> f b) -> f () ### `sequence_` -```haskell +```daml sequence_ : (Foldable t, Action m) => t (m a) -> m () ``` @@ -135,7 +135,7 @@ results see 'DA.Traversable.sequence'. ### `concat` -```haskell +```daml concat : Foldable t => t [a] -> [a] ``` @@ -145,7 +145,7 @@ The concatenation of all the elements of a container of lists. ### `and` -```haskell +```daml and : Foldable t => t Bool -> Bool ``` @@ -155,7 +155,7 @@ and : Foldable t => t Bool -> Bool ### `or` -```haskell +```daml or : Foldable t => t Bool -> Bool ``` @@ -165,7 +165,7 @@ or : Foldable t => t Bool -> Bool ### `any` -```haskell +```daml any : Foldable t => (a -> Bool) -> t a -> Bool ``` @@ -175,7 +175,7 @@ Determines whether any element of the structure satisfies the predicate. ### `all` -```haskell +```daml all : Foldable t => (a -> Bool) -> t a -> Bool ``` diff --git a/docs-main/appdev/reference/daml-standard-library/da-functor.mdx b/docs-main/appdev/reference/daml-standard-library/da-functor.mdx index 17dd13162..4a4306582 100644 --- a/docs-main/appdev/reference/daml-standard-library/da-functor.mdx +++ b/docs-main/appdev/reference/daml-standard-library/da-functor.mdx @@ -31,7 +31,7 @@ Deprecated since: `-` ### `$>` -```haskell +```daml $> : Functor f => f a -> b -> f b ``` @@ -42,7 +42,7 @@ value (on the right). ### `<&>` -```haskell +```daml <&> : Functor f => f a -> (a -> b) -> f b ``` @@ -54,7 +54,7 @@ arguments are in reverse order. ### `<$$>` -```haskell +```daml <$$> : (Functor f, Functor g) => (a -> b) -> g (f a) -> g (f b) ``` @@ -64,7 +64,7 @@ Nested `<$>`. ### `void` -```haskell +```daml void : Functor f => f a -> f () ``` diff --git a/docs-main/appdev/reference/daml-standard-library/da-internal-interface-anyview.mdx b/docs-main/appdev/reference/daml-standard-library/da-internal-interface-anyview.mdx index d35e54286..3940f7afd 100644 --- a/docs-main/appdev/reference/daml-standard-library/da-internal-interface-anyview.mdx +++ b/docs-main/appdev/reference/daml-standard-library/da-internal-interface-anyview.mdx @@ -35,7 +35,7 @@ Deprecated since: `-` ### `fromAnyView` -```haskell +```daml fromAnyView : (HasTemplateTypeRep i, HasFromAnyView i v) => AnyView -> Optional v ``` diff --git a/docs-main/appdev/reference/daml-standard-library/da-list-builtinorder.mdx b/docs-main/appdev/reference/daml-standard-library/da-list-builtinorder.mdx index dd03ba7b7..57b8319f7 100644 --- a/docs-main/appdev/reference/daml-standard-library/da-list-builtinorder.mdx +++ b/docs-main/appdev/reference/daml-standard-library/da-list-builtinorder.mdx @@ -51,7 +51,7 @@ Deprecated since: `-` ### `dedup` -```haskell +```daml dedup : Ord a => [a] -> [a] ``` @@ -71,7 +71,7 @@ stability, consider using `dedupSort` which is more efficient. ### `dedupOn` -```haskell +```daml dedupOn : Ord k => (v -> k) -> [v] -> [v] ``` @@ -91,7 +91,7 @@ stability, consider using `dedupOnSort` which is more efficient. ### `dedupSort` -```haskell +```daml dedupSort : Ord a => [a] -> [a] ``` @@ -109,7 +109,7 @@ ordering. ### `dedupOnSort` -```haskell +```daml dedupOnSort : Ord k => (v -> k) -> [v] -> [v] ``` @@ -128,7 +128,7 @@ For duplicates, the first element in the list will be included in the output. ### `sort` -```haskell +```daml sort : Ord a => [a] -> [a] ``` @@ -146,7 +146,7 @@ are indistinguishable so stability is not relevant here. ### `sortOn` -```haskell +```daml sortOn : Ord b => (a -> b) -> [a] -> [a] ``` @@ -165,7 +165,7 @@ will be ordered by their position in the input. ### `unique` -```haskell +```daml unique : Ord a => [a] -> Bool ``` @@ -180,7 +180,7 @@ True ### `uniqueOn` -```haskell +```daml uniqueOn : Ord k => (a -> k) -> [a] -> Bool ``` diff --git a/docs-main/appdev/reference/daml-standard-library/da-list-total.mdx b/docs-main/appdev/reference/daml-standard-library/da-list-total.mdx index ee9c2a8fc..6c7ee3505 100644 --- a/docs-main/appdev/reference/daml-standard-library/da-list-total.mdx +++ b/docs-main/appdev/reference/daml-standard-library/da-list-total.mdx @@ -29,7 +29,7 @@ Deprecated since: `-` ### `head` -```haskell +```daml head : [a] -> Optional a ``` @@ -39,7 +39,7 @@ Return the first element of a list. Return `None` if list is empty. ### `tail` -```haskell +```daml tail : [a] -> Optional [a] ``` @@ -49,7 +49,7 @@ Return all but the first element of a list. Return `None` if list is empty. ### `last` -```haskell +```daml last : [a] -> Optional a ``` @@ -59,7 +59,7 @@ Extract the last element of a list. Returns `None` if list is empty. ### `init` -```haskell +```daml init : [a] -> Optional [a] ``` @@ -69,7 +69,7 @@ Return all the elements of a list except the last one. Returns `None` if list is ### `!!` -```haskell +```daml !! : [a] -> Int -> Optional a ``` @@ -79,7 +79,7 @@ Return the nth element of a list. Return `None` if index is out of bounds. ### `foldl1` -```haskell +```daml foldl1 : (a -> a -> a) -> [a] -> Optional a ``` @@ -91,7 +91,7 @@ Return `None` if list is empty. ### `foldr1` -```haskell +```daml foldr1 : (a -> a -> a) -> [a] -> Optional a ``` @@ -102,7 +102,7 @@ For example, `foldr1 f [a,b,c] = f a (f b c)` ### `foldBalanced1` -```haskell +```daml foldBalanced1 : (a -> a -> a) -> [a] -> Optional a ``` @@ -119,7 +119,7 @@ Return `None` if list is empty. ### `minimumBy` -```haskell +```daml minimumBy : (a -> a -> Ordering) -> [a] -> Optional a ``` @@ -130,7 +130,7 @@ Return `None` if list is empty. ### `maximumBy` -```haskell +```daml maximumBy : (a -> a -> Ordering) -> [a] -> Optional a ``` @@ -141,7 +141,7 @@ Return `None` if list is empty. ### `minimumOn` -```haskell +```daml minimumOn : Ord k => (a -> k) -> [a] -> Optional a ``` @@ -153,7 +153,7 @@ Return `None` if list is empty. ### `maximumOn` -```haskell +```daml maximumOn : Ord k => (a -> k) -> [a] -> Optional a ``` diff --git a/docs-main/appdev/reference/daml-standard-library/da-list.mdx b/docs-main/appdev/reference/daml-standard-library/da-list.mdx index 86d1cc485..ab5a23c65 100644 --- a/docs-main/appdev/reference/daml-standard-library/da-list.mdx +++ b/docs-main/appdev/reference/daml-standard-library/da-list.mdx @@ -31,7 +31,7 @@ Deprecated since: `-` ### `sort` -```haskell +```daml sort : Ord a => [a] -> [a] ``` @@ -46,7 +46,7 @@ the order they appeared in the input (a stable sort). ### `sortBy` -```haskell +```daml sortBy : (a -> a -> Ordering) -> [a] -> [a] ``` @@ -56,7 +56,7 @@ The `sortBy` function is the non-overloaded version of `sort`. ### `minimumBy` -```haskell +```daml minimumBy : (a -> a -> Ordering) -> [a] -> a ``` @@ -67,7 +67,7 @@ is either `LT` or `EQ` for all other `y` in `xs`. `xs` must be non-empty. ### `maximumBy` -```haskell +```daml maximumBy : (a -> a -> Ordering) -> [a] -> a ``` @@ -78,7 +78,7 @@ is either `GT` or `EQ` for all other `y` in `xs`. `xs` must be non-empty. ### `sortOn` -```haskell +```daml sortOn : Ord k => (a -> k) -> [a] -> [a] ``` @@ -95,7 +95,7 @@ duplicates in the order they appeared in the input. ### `minimumOn` -```haskell +```daml minimumOn : Ord k => (a -> k) -> [a] -> a ``` @@ -107,7 +107,7 @@ non-empty. ### `maximumOn` -```haskell +```daml maximumOn : Ord k => (a -> k) -> [a] -> a ``` @@ -119,7 +119,7 @@ non-empty. ### `mergeBy` -```haskell +```daml mergeBy : (a -> a -> Ordering) -> [a] -> [a] -> [a] ``` @@ -130,7 +130,7 @@ the programmer to specify the comparison function. ### `combinePairs` -```haskell +```daml combinePairs : (a -> a -> a) -> [a] -> [a] ``` @@ -141,7 +141,7 @@ function from two list inputs into a single list. ### `foldBalanced1` -```haskell +```daml foldBalanced1 : (a -> a -> a) -> [a] -> a ``` @@ -156,7 +156,7 @@ same result as `foldl1` or `foldr1`. ### `group` -```haskell +```daml group : Eq a => [a] -> [[a]] ``` @@ -167,7 +167,7 @@ that the concatenation of the result is equal to the argument. ### `groupBy` -```haskell +```daml groupBy : (a -> a -> Bool) -> [a] -> [[a]] ``` @@ -177,7 +177,7 @@ The 'groupBy' function is the non-overloaded version of 'group'. ### `groupOn` -```haskell +```daml groupOn : Eq k => (a -> k) -> [a] -> [[a]] ``` @@ -188,7 +188,7 @@ extracted value. ### `dedup` -```haskell +```daml dedup : Ord a => [a] -> [a] ``` @@ -202,7 +202,7 @@ their own equality test. ### `dedupBy` -```haskell +```daml dedupBy : (a -> a -> Ordering) -> [a] -> [a] ``` @@ -212,7 +212,7 @@ A version of `dedup` with a custom predicate. ### `dedupOn` -```haskell +```daml dedupOn : Ord k => (a -> k) -> [a] -> [a] ``` @@ -223,7 +223,7 @@ after applyng function. Example use: `dedupOn (.employeeNo) employees` ### `dedupSort` -```haskell +```daml dedupSort : Ord a => [a] -> [a] ``` @@ -235,7 +235,7 @@ element. ### `dedupSortBy` -```haskell +```daml dedupSortBy : (a -> a -> Ordering) -> [a] -> [a] ``` @@ -245,7 +245,7 @@ A version of `dedupSort` with a custom predicate. ### `unique` -```haskell +```daml unique : Ord a => [a] -> Bool ``` @@ -255,7 +255,7 @@ Returns True if and only if there are no duplicate elements in the given list. ### `uniqueBy` -```haskell +```daml uniqueBy : (a -> a -> Ordering) -> [a] -> Bool ``` @@ -265,7 +265,7 @@ A version of `unique` with a custom predicate. ### `uniqueOn` -```haskell +```daml uniqueOn : Ord k => (a -> k) -> [a] -> Bool ``` @@ -276,7 +276,7 @@ after applyng function. Example use: `assert $ uniqueOn (.employeeNo) employees` ### `replace` -```haskell +```daml replace : Eq a => [a] -> [a] -> [a] -> [a] ``` @@ -287,7 +287,7 @@ the search list with the replacement list in the operation list. ### `dropPrefix` -```haskell +```daml dropPrefix : Eq a => [a] -> [a] -> [a] ``` @@ -298,7 +298,7 @@ sequence if the sequence doesn't start with the given prefix. ### `dropSuffix` -```haskell +```daml dropSuffix : Eq a => [a] -> [a] -> [a] ``` @@ -309,7 +309,7 @@ sequence if the sequence doesn't end with the given suffix. ### `stripPrefix` -```haskell +```daml stripPrefix : Eq a => [a] -> [a] -> Optional [a] ``` @@ -321,7 +321,7 @@ given, or `Some` the list after the prefix, if it does. ### `stripSuffix` -```haskell +```daml stripSuffix : Eq a => [a] -> [a] -> Optional [a] ``` @@ -332,7 +332,7 @@ entire first list. ### `stripInfix` -```haskell +```daml stripInfix : Eq a => [a] -> [a] -> Optional ([a], [a]) ``` @@ -351,7 +351,7 @@ None ### `isPrefixOf` -```haskell +```daml isPrefixOf : Eq a => [a] -> [a] -> Bool ``` @@ -362,7 +362,7 @@ and only if the first is a prefix of the second. ### `isSuffixOf` -```haskell +```daml isSuffixOf : Eq a => [a] -> [a] -> Bool ``` @@ -373,7 +373,7 @@ and only if the first list is a suffix of the second. ### `isInfixOf` -```haskell +```daml isInfixOf : Eq a => [a] -> [a] -> Bool ``` @@ -384,7 +384,7 @@ and only if the first list is contained anywhere within the second. ### `mapAccumL` -```haskell +```daml mapAccumL : (acc -> x -> (acc, y)) -> acc -> [x] -> (acc, [y]) ``` @@ -397,7 +397,7 @@ value of this accumulator together with the new list. ### `mapWithIndex` -```haskell +```daml mapWithIndex : (Int -> a -> b) -> [a] -> [b] ``` @@ -409,7 +409,7 @@ element in the sequence. ### `inits` -```haskell +```daml inits : [a] -> [[a]] ``` @@ -420,7 +420,7 @@ shortest first. ### `intersperse` -```haskell +```daml intersperse : a -> [a] -> [a] ``` @@ -431,7 +431,7 @@ The `intersperse` function takes an element and a list and ### `intercalate` -```haskell +```daml intercalate : [a] -> [[a]] -> [a] ``` @@ -442,7 +442,7 @@ and concatenates the result. ### `tails` -```haskell +```daml tails : [a] -> [[a]] ``` @@ -453,7 +453,7 @@ longest first. ### `dropWhileEnd` -```haskell +```daml dropWhileEnd : (a -> Bool) -> [a] -> [a] ``` @@ -463,7 +463,7 @@ A version of `dropWhile` operating from the end. ### `takeWhileEnd` -```haskell +```daml takeWhileEnd : (a -> Bool) -> [a] -> [a] ``` @@ -473,7 +473,7 @@ A version of `takeWhile` operating from the end. ### `transpose` -```haskell +```daml transpose : [[a]] -> [[a]] ``` @@ -484,7 +484,7 @@ argument. ### `breakEnd` -```haskell +```daml breakEnd : (a -> Bool) -> [a] -> ([a], [a]) ``` @@ -494,7 +494,7 @@ Break, but from the end. ### `breakOn` -```haskell +```daml breakOn : Eq a => [a] -> [a] -> ([a], [a]) ``` @@ -508,7 +508,7 @@ before `needle` is matched. The second is the remainder of ### `breakOnEnd` -```haskell +```daml breakOnEnd : Eq a => [a] -> [a] -> ([a], [a]) ``` @@ -523,7 +523,7 @@ remainder of `haystack`, following the match. ### `linesBy` -```haskell +```daml linesBy : (a -> Bool) -> [a] -> [[a]] ``` @@ -534,7 +534,7 @@ is a trailing separator it will be discarded. ### `wordsBy` -```haskell +```daml wordsBy : (a -> Bool) -> [a] -> [[a]] ``` @@ -545,7 +545,7 @@ separators are discarded, as are leading or trailing separators. ### `head` -```haskell +```daml head : [a] -> a ``` @@ -555,7 +555,7 @@ Extract the first element of a list, which must be non-empty. ### `tail` -```haskell +```daml tail : [a] -> [a] ``` @@ -566,7 +566,7 @@ non-empty. ### `last` -```haskell +```daml last : [a] -> a ``` @@ -577,7 +577,7 @@ non-empty. ### `init` -```haskell +```daml init : [a] -> [a] ``` @@ -588,7 +588,7 @@ must be non-empty. ### `foldl1` -```haskell +```daml foldl1 : (a -> a -> a) -> [a] -> a ``` @@ -598,7 +598,7 @@ Left associative fold of a list that must be non-empty. ### `foldr1` -```haskell +```daml foldr1 : (a -> a -> a) -> [a] -> a ``` @@ -608,7 +608,7 @@ Right associative fold of a list that must be non-empty. ### `repeatedly` -```haskell +```daml repeatedly : ([a] -> (b, [a])) -> [a] -> [b] ``` @@ -619,7 +619,7 @@ and the remainder of the list. ### `chunksOf` -```haskell +```daml chunksOf : Int -> [a] -> [[a]] ``` @@ -632,7 +632,7 @@ not divisible by @n@. ### `delete` -```haskell +```daml delete : Eq a => a -> [a] -> [a] ``` @@ -651,7 +651,7 @@ supply their own equality test. ### `deleteBy` -```haskell +```daml deleteBy : (a -> a -> Bool) -> a -> [a] -> [a] ``` @@ -667,7 +667,7 @@ user-supplied equality predicate. ### `\\` -```haskell +```daml \\ : Eq a => [a] -> [a] -> [a] ``` @@ -685,7 +685,7 @@ Note this function is _O(n*m)_ given lists of size _n_ and _m_. ### `singleton` -```haskell +```daml singleton : a -> [a] ``` @@ -700,7 +700,7 @@ Produce a singleton list. ### `!!` -```haskell +```daml !! : [a] -> Int -> a ``` @@ -714,7 +714,7 @@ unlike in languages such as Java where array indexing is _O(1)_. ### `elemIndex` -```haskell +```daml elemIndex : Eq a => a -> [a] -> Optional Int ``` @@ -725,7 +725,7 @@ Will return `None` if not found. ### `findIndex` -```haskell +```daml findIndex : (a -> Bool) -> [a] -> Optional Int ``` diff --git a/docs-main/appdev/reference/daml-standard-library/da-logic.mdx b/docs-main/appdev/reference/daml-standard-library/da-logic.mdx index 92f72efaa..904334c8d 100644 --- a/docs-main/appdev/reference/daml-standard-library/da-logic.mdx +++ b/docs-main/appdev/reference/daml-standard-library/da-logic.mdx @@ -64,7 +64,7 @@ Instances: ### `&&&` -```haskell +```daml &&& : Formula t -> Formula t -> Formula t ``` @@ -75,7 +75,7 @@ be read as "and" ### `|||` -```haskell +```daml ||| : Formula t -> Formula t -> Formula t ``` @@ -86,7 +86,7 @@ be read as "or" ### `true` -```haskell +```daml true : Formula t ``` @@ -97,7 +97,7 @@ represented as an empty conjunction. ### `false` -```haskell +```daml false : Formula t ``` @@ -108,7 +108,7 @@ represented as an empty disjunction. ### `neg` -```haskell +```daml neg : Formula t -> Formula t ``` @@ -119,7 +119,7 @@ formulas. ### `conj` -```haskell +```daml conj : [Formula t] -> Formula t ``` @@ -130,7 +130,7 @@ of ∧. ### `disj` -```haskell +```daml disj : [Formula t] -> Formula t ``` @@ -141,7 +141,7 @@ of ∨. ### `fromBool` -```haskell +```daml fromBool : Bool -> Formula t ``` @@ -151,7 +151,7 @@ fromBool : Bool -> Formula t ### `toNNF` -```haskell +```daml toNNF : Formula t -> Formula t ``` @@ -162,7 +162,7 @@ toNNF : Formula t -> Formula t ### `toDNF` -```haskell +```daml toDNF : Formula t -> Formula t ``` @@ -173,7 +173,7 @@ toDNF : Formula t -> Formula t ### `traverse` -```haskell +```daml traverse : Applicative f => (t -> f s) -> Formula t -> f (Formula s) ``` @@ -183,7 +183,7 @@ An implementation of `traverse` in the usual sense. ### `zipFormulas` -```haskell +```daml zipFormulas : Formula t -> Formula s -> Formula (t, s) ``` @@ -194,7 +194,7 @@ propositions are different and zips them up. ### `substitute` -```haskell +```daml substitute : (t -> Optional Bool) -> Formula t -> Formula t ``` @@ -205,7 +205,7 @@ substitute : (t -> Optional Bool) -> Formula t -> Formula t ### `reduce` -```haskell +```daml reduce : Formula t -> Formula t ``` @@ -218,7 +218,7 @@ reduce : Formula t -> Formula t ### `isBool` -```haskell +```daml isBool : Formula t -> Optional Bool ``` @@ -230,7 +230,7 @@ Otherwise, it returns `None`. ### `interpret` -```haskell +```daml interpret : (t -> Optional Bool) -> Formula t -> Either (Formula t) Bool ``` @@ -241,7 +241,7 @@ a truth function and then reduces as far as possible. ### `substituteA` -```haskell +```daml substituteA : Applicative f => (t -> f (Optional Bool)) -> Formula t -> f (Formula t) ``` @@ -252,7 +252,7 @@ values to be obtained from an action. ### `interpretA` -```haskell +```daml interpretA : Applicative f => (t -> f (Optional Bool)) -> Formula t -> f (Either (Formula t) Bool) ``` diff --git a/docs-main/appdev/reference/daml-standard-library/da-map.mdx b/docs-main/appdev/reference/daml-standard-library/da-map.mdx index a3d2c57fe..01268dc3f 100644 --- a/docs-main/appdev/reference/daml-standard-library/da-map.mdx +++ b/docs-main/appdev/reference/daml-standard-library/da-map.mdx @@ -79,7 +79,7 @@ Deprecated since: `-` ### `fromList` -```haskell +```daml fromList : Ord k => [(k, v)] -> Map k v ``` @@ -89,7 +89,7 @@ Create a map from a list of key/value pairs. ### `fromListWithL` -```haskell +```daml fromListWithL : Ord k => (v -> v -> v) -> [(k, v)] -> Map k v ``` @@ -111,7 +111,7 @@ True ### `fromListWithR` -```haskell +```daml fromListWithR : Ord k => (v -> v -> v) -> [(k, v)] -> Map k v ``` @@ -129,7 +129,7 @@ True ### `fromListWith` -```haskell +```daml fromListWith : Ord k => (v -> v -> v) -> [(k, v)] -> Map k v ``` @@ -137,7 +137,7 @@ fromListWith : Ord k => (v -> v -> v) -> [(k, v)] -> Map k v ### `keys` -```haskell +```daml keys : Map k v -> [k] ``` @@ -154,7 +154,7 @@ when using `deriving Ord`. ### `values` -```haskell +```daml values : Map k v -> [v] ``` @@ -170,7 +170,7 @@ their respective keys from `M.keys`. ### `toList` -```haskell +```daml toList : Map k v -> [(k, v)] ``` @@ -181,7 +181,7 @@ by key, as in `M.keys`. ### `empty` -```haskell +```daml empty : Map k v ``` @@ -191,7 +191,7 @@ The empty map. ### `size` -```haskell +```daml size : Map k v -> Int ``` @@ -201,7 +201,7 @@ Number of elements in the map. ### `null` -```haskell +```daml null : Map k v -> Bool ``` @@ -211,7 +211,7 @@ Is the map empty? ### `lookup` -```haskell +```daml lookup : Ord k => k -> Map k v -> Optional v ``` @@ -221,7 +221,7 @@ Lookup the value at a key in the map. ### `member` -```haskell +```daml member : Ord k => k -> Map k v -> Bool ``` @@ -231,7 +231,7 @@ Is the key a member of the map? ### `filter` -```haskell +```daml filter : Ord k => (v -> Bool) -> Map k v -> Map k v ``` @@ -242,7 +242,7 @@ value satisfies the predicate. ### `filterWithKey` -```haskell +```daml filterWithKey : Ord k => (k -> v -> Bool) -> Map k v -> Map k v ``` @@ -253,7 +253,7 @@ satisfy the predicate. ### `delete` -```haskell +```daml delete : Ord k => k -> Map k v -> Map k v ``` @@ -264,7 +264,7 @@ member of the map, the original map is returned. ### `singleton` -```haskell +```daml singleton : Ord k => k -> v -> Map k v ``` @@ -274,7 +274,7 @@ Create a singleton map. ### `insert` -```haskell +```daml insert : Ord k => k -> v -> Map k v -> Map k v ``` @@ -286,7 +286,7 @@ supplied value. ### `insertWith` -```haskell +```daml insertWith : Ord k => (v -> v -> v) -> k -> v -> Map k v -> Map k v ``` @@ -298,7 +298,7 @@ present in the map, it is combined with the previous value using the given funct ### `alter` -```haskell +```daml alter : Ord k => (Optional v -> Optional v) -> k -> Map k v -> Map k v ``` @@ -319,7 +319,7 @@ Some implications of this behavior: ### `union` -```haskell +```daml union : Ord k => Map k v -> Map k v -> Map k v ``` @@ -330,7 +330,7 @@ keys are encountered. ### `unionWith` -```haskell +```daml unionWith : Ord k => (v -> v -> v) -> Map k v -> Map k v -> Map k v ``` @@ -341,7 +341,7 @@ exist in both maps. ### `merge` -```haskell +```daml merge : Ord k => (k -> a -> Optional c) -> (k -> b -> Optional c) -> (k -> a -> b -> Optional c) -> Map k a -> Map k b -> Map k c ``` diff --git a/docs-main/appdev/reference/daml-standard-library/da-math.mdx b/docs-main/appdev/reference/daml-standard-library/da-math.mdx index 8d4ab0444..867a097f6 100644 --- a/docs-main/appdev/reference/daml-standard-library/da-math.mdx +++ b/docs-main/appdev/reference/daml-standard-library/da-math.mdx @@ -39,7 +39,7 @@ Deprecated since: `-` ### `**` -```haskell +```daml ** : Decimal -> Decimal -> Decimal ``` @@ -49,7 +49,7 @@ Take a power of a number Example: `2.0 ** 3.0 == 8.0`. ### `sqrt` -```haskell +```daml sqrt : Decimal -> Decimal ``` @@ -64,7 +64,7 @@ Calculate the square root of a Decimal. ### `exp` -```haskell +```daml exp : Decimal -> Decimal ``` @@ -74,7 +74,7 @@ The exponential function. Example: `exp 0.0 == 1.0` ### `log` -```haskell +```daml log : Decimal -> Decimal ``` @@ -84,7 +84,7 @@ The natural logarithm. Example: `log 10.0 == 2.30258509299` ### `logBase` -```haskell +```daml logBase : Decimal -> Decimal -> Decimal ``` @@ -94,7 +94,7 @@ The logarithm of a number to a given base. Example: `log 10.0 100.0 == 2.0` ### `sin` -```haskell +```daml sin : Decimal -> Decimal ``` @@ -104,7 +104,7 @@ sin : Decimal -> Decimal ### `cos` -```haskell +```daml cos : Decimal -> Decimal ``` @@ -114,7 +114,7 @@ cos : Decimal -> Decimal ### `tan` -```haskell +```daml tan : Decimal -> Decimal ``` diff --git a/docs-main/appdev/reference/daml-standard-library/da-nonempty.mdx b/docs-main/appdev/reference/daml-standard-library/da-nonempty.mdx index ff9755b70..9a4a9e0e1 100644 --- a/docs-main/appdev/reference/daml-standard-library/da-nonempty.mdx +++ b/docs-main/appdev/reference/daml-standard-library/da-nonempty.mdx @@ -45,7 +45,7 @@ Deprecated since: `-` ### `cons` -```haskell +```daml cons : a -> NonEmpty a -> NonEmpty a ``` @@ -55,7 +55,7 @@ Prepend an element to a non-empty list. ### `append` -```haskell +```daml append : NonEmpty a -> NonEmpty a -> NonEmpty a ``` @@ -65,7 +65,7 @@ Append or concatenate two non-empty lists. ### `map` -```haskell +```daml map : (a -> b) -> NonEmpty a -> NonEmpty b ``` @@ -75,7 +75,7 @@ Apply a function over each element in the non-empty list. ### `nonEmpty` -```haskell +```daml nonEmpty : [a] -> Optional (NonEmpty a) ``` @@ -86,7 +86,7 @@ Turn a list into a non-empty list, if possible. Returns ### `singleton` -```haskell +```daml singleton : a -> NonEmpty a ``` @@ -96,7 +96,7 @@ A non-empty list with a single element. ### `toList` -```haskell +```daml toList : NonEmpty a -> [a] ``` @@ -106,7 +106,7 @@ Turn a non-empty list into a list (by forgetting that it is not empty). ### `reverse` -```haskell +```daml reverse : NonEmpty a -> NonEmpty a ``` @@ -116,7 +116,7 @@ Reverse a non-empty list. ### `find` -```haskell +```daml find : (a -> Bool) -> NonEmpty a -> Optional a ``` @@ -126,7 +126,7 @@ Find an element in a non-empty list. ### `deleteBy` -```haskell +```daml deleteBy : (a -> a -> Bool) -> a -> NonEmpty a -> [a] ``` @@ -137,7 +137,7 @@ user-supplied equality predicate. ### `delete` -```haskell +```daml delete : Eq a => a -> NonEmpty a -> [a] ``` @@ -148,7 +148,7 @@ removing all elements. ### `foldl1` -```haskell +```daml foldl1 : (a -> a -> a) -> NonEmpty a -> a ``` @@ -159,7 +159,7 @@ from the left. For example, `foldl1 (+) (NonEmpty 1 [2,3,4]) = ((1 + 2) + 3) + 4 ### `foldr1` -```haskell +```daml foldr1 : (a -> a -> a) -> NonEmpty a -> a ``` @@ -170,7 +170,7 @@ from the right. For example, `foldr1 (+) (NonEmpty 1 [2,3,4]) = 1 + (2 + (3 + 4) ### `foldr` -```haskell +```daml foldr : (a -> b -> b) -> b -> NonEmpty a -> b ``` @@ -182,7 +182,7 @@ from the right, with a given initial value. For example, ### `foldrA` -```haskell +```daml foldrA : Action m => (a -> b -> m b) -> b -> NonEmpty a -> m b ``` @@ -192,7 +192,7 @@ The same as `foldr` but running an action each time. ### `foldr1A` -```haskell +```daml foldr1A : Action m => (a -> a -> m a) -> NonEmpty a -> m a ``` @@ -202,7 +202,7 @@ The same as `foldr1` but running an action each time. ### `foldl` -```haskell +```daml foldl : (b -> a -> b) -> b -> NonEmpty a -> b ``` @@ -214,7 +214,7 @@ from the left, with a given initial value. For example, ### `foldlA` -```haskell +```daml foldlA : Action m => (b -> a -> m b) -> b -> NonEmpty a -> m b ``` @@ -224,7 +224,7 @@ The same as `foldl` but running an action each time. ### `foldl1A` -```haskell +```daml foldl1A : Action m => (a -> a -> m a) -> NonEmpty a -> m a ``` diff --git a/docs-main/appdev/reference/daml-standard-library/da-numeric.mdx b/docs-main/appdev/reference/daml-standard-library/da-numeric.mdx index 9c5a415f0..66df22010 100644 --- a/docs-main/appdev/reference/daml-standard-library/da-numeric.mdx +++ b/docs-main/appdev/reference/daml-standard-library/da-numeric.mdx @@ -68,7 +68,7 @@ be represented without rounding at the targeted scale. ### `mul` -```haskell +```daml mul : NumericScale n3 => Numeric n1 -> Numeric n2 -> Numeric n3 ``` @@ -81,7 +81,7 @@ scale otherwise. ### `div` -```haskell +```daml div : NumericScale n3 => Numeric n1 -> Numeric n2 -> Numeric n3 ``` @@ -94,7 +94,7 @@ scale otherwise. ### `cast` -```haskell +```daml cast : NumericScale n2 => Numeric n1 -> Numeric n2 ``` @@ -104,7 +104,7 @@ Cast a Numeric. Raises an error on overflow or loss of precision. ### `castAndRound` -```haskell +```daml castAndRound : NumericScale n2 => Numeric n1 -> Numeric n2 ``` @@ -115,7 +115,7 @@ scale otherwise. ### `shift` -```haskell +```daml shift : NumericScale n2 => Numeric n1 -> Numeric n2 ``` @@ -126,7 +126,7 @@ value by 10^(n1 - n2). Does not overflow or underflow. ### `pi` -```haskell +```daml pi : NumericScale n => Numeric n ``` @@ -136,7 +136,7 @@ The number pi. ### `epsilon` -```haskell +```daml epsilon : NumericScale n => Numeric n ``` @@ -146,7 +146,7 @@ The minimum strictly positive value that can be represented by a numeric of scal ### `roundNumeric` -```haskell +```daml roundNumeric : NumericScale n => Int -> RoundingMode -> Numeric n -> Numeric n ``` diff --git a/docs-main/appdev/reference/daml-standard-library/da-optional.mdx b/docs-main/appdev/reference/daml-standard-library/da-optional.mdx index 4253e9703..6db781796 100644 --- a/docs-main/appdev/reference/daml-standard-library/da-optional.mdx +++ b/docs-main/appdev/reference/daml-standard-library/da-optional.mdx @@ -45,7 +45,7 @@ Deprecated since: `-` ### `fromSome` -```haskell +```daml fromSome : Optional a -> a ``` @@ -59,7 +59,7 @@ to get a better error on failures. ### `fromSomeNote` -```haskell +```daml fromSomeNote : Text -> Optional a -> a ``` @@ -69,7 +69,7 @@ Like `fromSome` but with a custom error message. ### `catOptionals` -```haskell +```daml catOptionals : [Optional a] -> [a] ``` @@ -80,7 +80,7 @@ list of all the `Some` values. ### `listToOptional` -```haskell +```daml listToOptional : [a] -> Optional a ``` @@ -91,7 +91,7 @@ The `listToOptional` function returns `None` on an empty list or ### `optionalToList` -```haskell +```daml optionalToList : Optional a -> [a] ``` @@ -102,7 +102,7 @@ The `optionalToList` function returns an empty list when given ### `fromOptional` -```haskell +```daml fromOptional : a -> Optional a -> a ``` @@ -114,7 +114,7 @@ otherwise, it returns the value contained in the `Optional`. ### `isSome` -```haskell +```daml isSome : Optional a -> Bool ``` @@ -125,7 +125,7 @@ form `Some _`. ### `isNone` -```haskell +```daml isNone : Optional a -> Bool ``` @@ -136,7 +136,7 @@ The `isNone` function returns `True` iff its argument is ### `mapOptional` -```haskell +```daml mapOptional : (a -> Optional b) -> [a] -> [b] ``` @@ -150,7 +150,7 @@ result list. ### `whenSome` -```haskell +```daml whenSome : Applicative m => Optional a -> (a -> m ()) -> m () ``` @@ -161,7 +161,7 @@ Perform some operation on `Some`, given the field inside the ### `findOptional` -```haskell +```daml findOptional : (a -> Optional b) -> [a] -> Optional b ``` diff --git a/docs-main/appdev/reference/daml-standard-library/da-record.mdx b/docs-main/appdev/reference/daml-standard-library/da-record.mdx index 7e4eb3e33..75cc56f00 100644 --- a/docs-main/appdev/reference/daml-standard-library/da-record.mdx +++ b/docs-main/appdev/reference/daml-standard-library/da-record.mdx @@ -53,7 +53,7 @@ MyRecord {foo = 3, bar = "hello"} daml> ``` -For more on Record syntax, see [DA.Record](/appdev/reference/daml-standard-library/da-record). +For more on Record syntax, see https://docs.digitalasset.com/build/3.4/reference/daml/stdlib/DA-Record.html. `GetField x r a` and `SetField x r a` are typeclasses taking three parameters. The first parameter `x` is the field name, the second parameter `r` is the record type, diff --git a/docs-main/appdev/reference/daml-standard-library/da-set.mdx b/docs-main/appdev/reference/daml-standard-library/da-set.mdx index e42759815..34d9096ab 100644 --- a/docs-main/appdev/reference/daml-standard-library/da-set.mdx +++ b/docs-main/appdev/reference/daml-standard-library/da-set.mdx @@ -107,7 +107,7 @@ Instances: ### `empty` -```haskell +```daml empty : Set k ``` @@ -117,7 +117,7 @@ The empty set. ### `size` -```haskell +```daml size : Set k -> Int ``` @@ -127,7 +127,7 @@ The number of elements in the set. ### `toList` -```haskell +```daml toList : Set k -> [k] ``` @@ -137,7 +137,7 @@ Convert the set to a list of elements. ### `fromList` -```haskell +```daml fromList : Ord k => [k] -> Set k ``` @@ -147,7 +147,7 @@ Create a set from a list of elements. ### `toMap` -```haskell +```daml toMap : Set k -> Map k () ``` @@ -157,7 +157,7 @@ Convert a `Set` into a `Map`. ### `fromMap` -```haskell +```daml fromMap : Map k () -> Set k ``` @@ -167,7 +167,7 @@ Create a `Set` from a `Map`. ### `member` -```haskell +```daml member : Ord k => k -> Set k -> Bool ``` @@ -177,7 +177,7 @@ Is the element in the set? ### `notMember` -```haskell +```daml notMember : Ord k => k -> Set k -> Bool ``` @@ -188,7 +188,7 @@ Is the element not in the set? ### `null` -```haskell +```daml null : Set k -> Bool ``` @@ -198,7 +198,7 @@ Is this the empty set? ### `insert` -```haskell +```daml insert : Ord k => k -> Set k -> Set k ``` @@ -209,7 +209,7 @@ element, this returns the set unchanged. ### `filter` -```haskell +```daml filter : Ord k => (k -> Bool) -> Set k -> Set k ``` @@ -219,7 +219,7 @@ Filter all elements that satisfy the predicate. ### `delete` -```haskell +```daml delete : Ord k => k -> Set k -> Set k ``` @@ -229,7 +229,7 @@ Delete an element from a set. ### `singleton` -```haskell +```daml singleton : Ord k => k -> Set k ``` @@ -239,7 +239,7 @@ Create a singleton set. ### `union` -```haskell +```daml union : Ord k => Set k -> Set k -> Set k ``` @@ -249,7 +249,7 @@ The union of two sets. ### `intersection` -```haskell +```daml intersection : Ord k => Set k -> Set k -> Set k ``` @@ -259,7 +259,7 @@ The intersection of two sets. ### `difference` -```haskell +```daml difference : Ord k => Set k -> Set k -> Set k ``` @@ -275,7 +275,7 @@ fromList [2, 3] ### `isSubsetOf` -```haskell +```daml isSubsetOf : Ord k => Set k -> Set k -> Bool ``` @@ -286,7 +286,7 @@ that is, if every element of `a` is in `b`. ### `isProperSubsetOf` -```haskell +```daml isProperSubsetOf : Ord k => Set k -> Set k -> Bool ``` diff --git a/docs-main/appdev/reference/daml-standard-library/da-stack.mdx b/docs-main/appdev/reference/daml-standard-library/da-stack.mdx index 57afcda20..f3c82dcd8 100644 --- a/docs-main/appdev/reference/daml-standard-library/da-stack.mdx +++ b/docs-main/appdev/reference/daml-standard-library/da-stack.mdx @@ -70,7 +70,7 @@ Instances: ### `prettyCallStack` -```haskell +```daml prettyCallStack : CallStack -> Text ``` @@ -80,7 +80,7 @@ Pretty-print a `CallStack`. ### `getCallStack` -```haskell +```daml getCallStack : CallStack -> [(Text, SrcLoc)] ``` @@ -92,7 +92,7 @@ The most recent call comes first. ### `callStack` -```haskell +```daml callStack : HasCallStack => CallStack ``` diff --git a/docs-main/appdev/reference/daml-standard-library/da-text.mdx b/docs-main/appdev/reference/daml-standard-library/da-text.mdx index 704d32408..dbd0b37a7 100644 --- a/docs-main/appdev/reference/daml-standard-library/da-text.mdx +++ b/docs-main/appdev/reference/daml-standard-library/da-text.mdx @@ -31,7 +31,7 @@ Deprecated since: `-` ### `explode` -```haskell +```daml explode : Text -> [Text] ``` @@ -39,7 +39,7 @@ explode : Text -> [Text] ### `implode` -```haskell +```daml implode : [Text] -> Text ``` @@ -47,7 +47,7 @@ implode : [Text] -> Text ### `isEmpty` -```haskell +```daml isEmpty : Text -> Bool ``` @@ -57,7 +57,7 @@ Test for emptiness. ### `isNotEmpty` -```haskell +```daml isNotEmpty : Text -> Bool ``` @@ -67,7 +67,7 @@ Test for non-emptiness. ### `length` -```haskell +```daml length : Text -> Int ``` @@ -77,7 +77,7 @@ Compute the number of symbols in the text. ### `trim` -```haskell +```daml trim : Text -> Text ``` @@ -87,7 +87,7 @@ Remove spaces from either side of the given text. ### `replace` -```haskell +```daml replace : Text -> Text -> Text -> Text ``` @@ -98,7 +98,7 @@ must not be empty. ### `lines` -```haskell +```daml lines : Text -> [Text] ``` @@ -109,7 +109,7 @@ symbols. The resulting texts do not contain newline symbols. ### `unlines` -```haskell +```daml unlines : [Text] -> Text ``` @@ -119,7 +119,7 @@ Joins lines, after appending a terminating newline to each. ### `words` -```haskell +```daml words : Text -> [Text] ``` @@ -130,7 +130,7 @@ representing white space. ### `unwords` -```haskell +```daml unwords : [Text] -> Text ``` @@ -140,7 +140,7 @@ Joins words using single space symbols. ### `linesBy` -```haskell +```daml linesBy : (Text -> Bool) -> Text -> [Text] ``` @@ -151,7 +151,7 @@ is a trailing separator it will be discarded. ### `wordsBy` -```haskell +```daml wordsBy : (Text -> Bool) -> Text -> [Text] ``` @@ -162,7 +162,7 @@ separators are discarded, as are leading or trailing separators. ### `intercalate` -```haskell +```daml intercalate : Text -> [Text] -> Text ``` @@ -173,7 +173,7 @@ in `ts` and concatenates the result. ### `dropPrefix` -```haskell +```daml dropPrefix : Text -> Text -> Text ``` @@ -184,7 +184,7 @@ the original text if the text doesn't start with the given prefix. ### `dropSuffix` -```haskell +```daml dropSuffix : Text -> Text -> Text ``` @@ -200,7 +200,7 @@ text if the text doesn't end with the given suffix. Examples: ### `stripSuffix` -```haskell +```daml stripSuffix : Text -> Text -> Optional Text ``` @@ -216,7 +216,7 @@ entire first text. Examples: ### `stripPrefix` -```haskell +```daml stripPrefix : Text -> Text -> Optional Text ``` @@ -228,7 +228,7 @@ the prefix. ### `isPrefixOf` -```haskell +```daml isPrefixOf : Text -> Text -> Bool ``` @@ -239,7 +239,7 @@ The `isPrefixOf` function takes two text arguments and returns ### `isSuffixOf` -```haskell +```daml isSuffixOf : Text -> Text -> Bool ``` @@ -250,7 +250,7 @@ The `isSuffixOf` function takes two text arguments and returns ### `isInfixOf` -```haskell +```daml isInfixOf : Text -> Text -> Bool ``` @@ -262,7 +262,7 @@ anywhere within the second. ### `takeWhile` -```haskell +```daml takeWhile : (Text -> Bool) -> Text -> Text ``` @@ -274,7 +274,7 @@ returns the longest prefix (possibly empty) of symbols that satisfy ### `takeWhileEnd` -```haskell +```daml takeWhileEnd : (Text -> Bool) -> Text -> Text ``` @@ -286,7 +286,7 @@ that satisfy `p`. ### `dropWhile` -```haskell +```daml dropWhile : (Text -> Bool) -> Text -> Text ``` @@ -297,7 +297,7 @@ t`. ### `dropWhileEnd` -```haskell +```daml dropWhileEnd : (Text -> Bool) -> Text -> Text ``` @@ -308,7 +308,7 @@ symbols that satisfy the predicate `p` from the end of `t`. ### `splitOn` -```haskell +```daml splitOn : Text -> Text -> [Text] ``` @@ -319,7 +319,7 @@ Break a text into pieces separated by the first text argument ### `splitAt` -```haskell +```daml splitAt : Int -> Text -> (Text, Text) ``` @@ -330,7 +330,7 @@ Split a text before a given position so that for `0 <= n <= length t`, ### `take` -```haskell +```daml take : Int -> Text -> Text ``` @@ -341,7 +341,7 @@ length `n`, or `t` itself if `n` is greater than the length of `t`. ### `drop` -```haskell +```daml drop : Int -> Text -> Text ``` @@ -353,7 +353,7 @@ than the length of `t`. ### `substring` -```haskell +```daml substring : Int -> Int -> Text -> Text ``` @@ -364,7 +364,7 @@ text starting at `s`. ### `isPred` -```haskell +```daml isPred : (Text -> Bool) -> Text -> Bool ``` @@ -375,7 +375,7 @@ for all symbols in `t`. ### `isSpace` -```haskell +```daml isSpace : Text -> Bool ``` @@ -386,7 +386,7 @@ spaces. ### `isNewLine` -```haskell +```daml isNewLine : Text -> Bool ``` @@ -397,7 +397,7 @@ newlines. ### `isUpper` -```haskell +```daml isUpper : Text -> Bool ``` @@ -408,7 +408,7 @@ uppercase symbols. ### `isLower` -```haskell +```daml isLower : Text -> Bool ``` @@ -419,7 +419,7 @@ lowercase symbols. ### `isDigit` -```haskell +```daml isDigit : Text -> Bool ``` @@ -430,7 +430,7 @@ digit symbols. ### `isAlpha` -```haskell +```daml isAlpha : Text -> Bool ``` @@ -441,7 +441,7 @@ alphabet symbols. ### `isAlphaNum` -```haskell +```daml isAlphaNum : Text -> Bool ``` @@ -452,7 +452,7 @@ alphanumeric symbols. ### `parseInt` -```haskell +```daml parseInt : Text -> Optional Int ``` @@ -462,7 +462,7 @@ Attempt to parse an `Int` value from a given `Text`. ### `parseNumeric` -```haskell +```daml parseNumeric : NumericScale n => Text -> Optional (Numeric n) ``` @@ -482,7 +482,7 @@ Examples: ### `parseDecimal` -```haskell +```daml parseDecimal : Text -> Optional Decimal ``` @@ -502,7 +502,7 @@ Examples: ### `sha256` -```haskell +```daml sha256 : Text -> Text ``` @@ -515,7 +515,7 @@ This function will crash at runtime if you compile Daml to Daml-LF < 1.2. ### `reverse` -```haskell +```daml reverse : Text -> Text ``` @@ -528,7 +528,7 @@ Reverse some `Text`. ### `toCodePoints` -```haskell +```daml toCodePoints : Text -> [Int] ``` @@ -538,7 +538,7 @@ Convert a `Text` into a sequence of unicode code points. ### `fromCodePoints` -```haskell +```daml fromCodePoints : [Int] -> Text ``` @@ -549,7 +549,7 @@ exception if any of the code points is invalid. ### `asciiToLower` -```haskell +```daml asciiToLower : Text -> Text ``` @@ -560,7 +560,7 @@ all other characters remain unchanged. ### `asciiToUpper` -```haskell +```daml asciiToUpper : Text -> Text ``` diff --git a/docs-main/appdev/reference/daml-standard-library/da-textmap.mdx b/docs-main/appdev/reference/daml-standard-library/da-textmap.mdx index 236f0b9f6..d5c98087c 100644 --- a/docs-main/appdev/reference/daml-standard-library/da-textmap.mdx +++ b/docs-main/appdev/reference/daml-standard-library/da-textmap.mdx @@ -35,7 +35,7 @@ Deprecated since: `-` ### `fromList` -```haskell +```daml fromList : [(Text, a)] -> TextMap a ``` @@ -45,7 +45,7 @@ Create a map from a list of key/value pairs. ### `fromListWithL` -```haskell +```daml fromListWithL : (a -> a -> a) -> [(Text, a)] -> TextMap a ``` @@ -67,7 +67,7 @@ True ### `fromListWithR` -```haskell +```daml fromListWithR : (a -> a -> a) -> [(Text, a)] -> TextMap a ``` @@ -85,7 +85,7 @@ True ### `fromListWith` -```haskell +```daml fromListWith : (a -> a -> a) -> [(Text, a)] -> TextMap a ``` @@ -93,7 +93,7 @@ fromListWith : (a -> a -> a) -> [(Text, a)] -> TextMap a ### `toList` -```haskell +```daml toList : TextMap a -> [(Text, a)] ``` @@ -104,7 +104,7 @@ in ascending order. ### `empty` -```haskell +```daml empty : TextMap a ``` @@ -114,7 +114,7 @@ The empty map. ### `size` -```haskell +```daml size : TextMap a -> Int ``` @@ -124,7 +124,7 @@ Number of elements in the map. ### `null` -```haskell +```daml null : TextMap v -> Bool ``` @@ -134,7 +134,7 @@ Is the map empty? ### `lookup` -```haskell +```daml lookup : Text -> TextMap a -> Optional a ``` @@ -144,7 +144,7 @@ Lookup the value at a key in the map. ### `member` -```haskell +```daml member : Text -> TextMap v -> Bool ``` @@ -154,7 +154,7 @@ Is the key a member of the map? ### `filter` -```haskell +```daml filter : (v -> Bool) -> TextMap v -> TextMap v ``` @@ -165,7 +165,7 @@ value satisfies the predicate. ### `filterWithKey` -```haskell +```daml filterWithKey : (Text -> v -> Bool) -> TextMap v -> TextMap v ``` @@ -176,7 +176,7 @@ satisfy the predicate. ### `delete` -```haskell +```daml delete : Text -> TextMap a -> TextMap a ``` @@ -187,7 +187,7 @@ member of the map, the original map is returned. ### `singleton` -```haskell +```daml singleton : Text -> a -> TextMap a ``` @@ -197,7 +197,7 @@ Create a singleton map. ### `insert` -```haskell +```daml insert : Text -> a -> TextMap a -> TextMap a ``` @@ -209,7 +209,7 @@ supplied value. ### `insertWith` -```haskell +```daml insertWith : (v -> v -> v) -> Text -> v -> TextMap v -> TextMap v ``` @@ -221,7 +221,7 @@ present in the map, it is combined with the previous value using the given funct ### `union` -```haskell +```daml union : TextMap a -> TextMap a -> TextMap a ``` @@ -232,7 +232,7 @@ keys are encountered. ### `merge` -```haskell +```daml merge : (Text -> a -> Optional c) -> (Text -> b -> Optional c) -> (Text -> a -> b -> Optional c) -> TextMap a -> TextMap b -> TextMap c ``` diff --git a/docs-main/appdev/reference/daml-standard-library/da-time.mdx b/docs-main/appdev/reference/daml-standard-library/da-time.mdx index 224d5b587..15a631246 100644 --- a/docs-main/appdev/reference/daml-standard-library/da-time.mdx +++ b/docs-main/appdev/reference/daml-standard-library/da-time.mdx @@ -56,7 +56,7 @@ Instances: ### `time` -```haskell +```daml time : Date -> Int -> Int -> Int -> Time ``` @@ -67,7 +67,7 @@ into a UTC timestamp (`Time`). Does not handle leap seconds. ### `addRelTime` -```haskell +```daml addRelTime : Time -> RelTime -> Time ``` @@ -77,7 +77,7 @@ Adjusts `Time` with given time offset. ### `subTime` -```haskell +```daml subTime : Time -> Time -> RelTime ``` @@ -87,7 +87,7 @@ Returns time offset between two given instants. ### `wholeDays` -```haskell +```daml wholeDays : RelTime -> Int ``` @@ -97,7 +97,7 @@ Returns the number of whole days in a time offset. Fraction of time is rounded t ### `days` -```haskell +```daml days : Int -> RelTime ``` @@ -107,7 +107,7 @@ A number of days in relative time. ### `hours` -```haskell +```daml hours : Int -> RelTime ``` @@ -117,7 +117,7 @@ A number of hours in relative time. ### `minutes` -```haskell +```daml minutes : Int -> RelTime ``` @@ -127,7 +127,7 @@ A number of minutes in relative time. ### `seconds` -```haskell +```daml seconds : Int -> RelTime ``` @@ -137,7 +137,7 @@ A number of seconds in relative time. ### `milliseconds` -```haskell +```daml milliseconds : Int -> RelTime ``` @@ -147,7 +147,7 @@ A number of milliseconds in relative time. ### `microseconds` -```haskell +```daml microseconds : Int -> RelTime ``` @@ -157,7 +157,7 @@ A number of microseconds in relative time. ### `convertRelTimeToMicroseconds` -```haskell +```daml convertRelTimeToMicroseconds : RelTime -> Int ``` @@ -168,7 +168,7 @@ Use higher level functions instead of the internal microseconds ### `convertMicrosecondsToRelTime` -```haskell +```daml convertMicrosecondsToRelTime : Int -> RelTime ``` @@ -179,7 +179,7 @@ Use higher level functions instead of the internal microseconds ### `isLedgerTimeLT` -```haskell +```daml isLedgerTimeLT : Time -> Update Bool ``` @@ -189,7 +189,7 @@ True iff the ledger time of the transaction is less than the given time. ### `isLedgerTimeLE` -```haskell +```daml isLedgerTimeLE : Time -> Update Bool ``` @@ -199,7 +199,7 @@ True iff the ledger time of the transaction is less than or equal to the given t ### `isLedgerTimeGT` -```haskell +```daml isLedgerTimeGT : Time -> Update Bool ``` @@ -209,7 +209,7 @@ True iff the ledger time of the transaction is greater than the given time. ### `isLedgerTimeGE` -```haskell +```daml isLedgerTimeGE : Time -> Update Bool ``` diff --git a/docs-main/appdev/reference/daml-standard-library/da-traversable.mdx b/docs-main/appdev/reference/daml-standard-library/da-traversable.mdx index a091825cf..412452d76 100644 --- a/docs-main/appdev/reference/daml-standard-library/da-traversable.mdx +++ b/docs-main/appdev/reference/daml-standard-library/da-traversable.mdx @@ -69,7 +69,7 @@ Instances: ### `forA` -```haskell +```daml forA : (Traversable t, Applicative f) => t a -> (a -> f b) -> f (t b) ``` diff --git a/docs-main/appdev/reference/daml-standard-library/da-tuple.mdx b/docs-main/appdev/reference/daml-standard-library/da-tuple.mdx index 41410d381..6e029f9a9 100644 --- a/docs-main/appdev/reference/daml-standard-library/da-tuple.mdx +++ b/docs-main/appdev/reference/daml-standard-library/da-tuple.mdx @@ -31,7 +31,7 @@ Deprecated since: `-` ### `first` -```haskell +```daml first : (a -> a') -> (a, b) -> (a', b) ``` @@ -42,7 +42,7 @@ supplied function to the argument pair's first field. ### `second` -```haskell +```daml second : (b -> b') -> (a, b) -> (a, b') ``` @@ -53,7 +53,7 @@ supplied function to the argument pair's second field. ### `both` -```haskell +```daml both : (a -> b) -> (a, a) -> (b, b) ``` @@ -65,7 +65,7 @@ fields. ### `swap` -```haskell +```daml swap : (a, b) -> (b, a) ``` @@ -76,7 +76,7 @@ argument pair's first and second fields. ### `dupe` -```haskell +```daml dupe : a -> (a, a) ``` @@ -88,7 +88,7 @@ Duplicate a single value into a pair. ### `fst3` -```haskell +```daml fst3 : (a, b, c) -> a ``` @@ -98,7 +98,7 @@ Extract the 'fst' of a triple. ### `snd3` -```haskell +```daml snd3 : (a, b, c) -> b ``` @@ -108,7 +108,7 @@ Extract the 'snd' of a triple. ### `thd3` -```haskell +```daml thd3 : (a, b, c) -> c ``` @@ -118,7 +118,7 @@ Extract the final element of a triple. ### `curry3` -```haskell +```daml curry3 : ((a, b, c) -> d) -> a -> b -> c -> d ``` @@ -128,7 +128,7 @@ Converts an uncurried function to a curried function. ### `uncurry3` -```haskell +```daml uncurry3 : (a -> b -> c -> d) -> (a, b, c) -> d ``` diff --git a/docs-main/appdev/reference/daml-standard-library/da-validation.mdx b/docs-main/appdev/reference/daml-standard-library/da-validation.mdx index b2208a9cf..e5e884b2d 100644 --- a/docs-main/appdev/reference/daml-standard-library/da-validation.mdx +++ b/docs-main/appdev/reference/daml-standard-library/da-validation.mdx @@ -57,7 +57,7 @@ Instances: ### `invalid` -```haskell +```daml invalid : err -> Validation err a ``` @@ -67,7 +67,7 @@ Fail for the given reason. ### `ok` -```haskell +```daml ok : a -> Validation err a ``` @@ -77,7 +77,7 @@ Succeed with the given value. ### `validate` -```haskell +```daml validate : Either err a -> Validation err a ``` @@ -87,7 +87,7 @@ Turn an `Either` into a `Validation`. ### `run` -```haskell +```daml run : Validation err a -> Either (NonEmpty err) a ``` @@ -98,7 +98,7 @@ taking the non-empty list of errors as the left value. ### `run1` -```haskell +```daml run1 : Validation err a -> Either err a ``` @@ -109,7 +109,7 @@ taking just the first error as the left value. ### `runWithDefault` -```haskell +```daml runWithDefault : a -> Validation err a -> a ``` @@ -119,7 +119,7 @@ Run a `Validation err a` with a default value in case of errors. ### `` -```haskell +```daml : Optional b -> err -> Validation err b ``` diff --git a/docs-main/appdev/reference/daml-standard-library/index.mdx b/docs-main/appdev/reference/daml-standard-library/index.mdx index 6b14cd54c..fd2ab184a 100644 --- a/docs-main/appdev/reference/daml-standard-library/index.mdx +++ b/docs-main/appdev/reference/daml-standard-library/index.mdx @@ -1,17 +1,17 @@ --- title: "Details and history" -description: "Reference documentation for Daml Standard Library modules." +description: "Generated source details and version history for Daml Standard Library modules." ---
-

Daml Reference

+

Details and history

-

Daml Standard Library

+

Daml Standard Library details and history

-

Generated module overview for the Daml Standard Library, built from versioned docs JSON snapshots.

+

Generated-source metadata, version coverage, module inventory, and module lifecycle changes for this source stream.

@@ -26,1922 +26,789 @@ description: "Reference documentation for Daml Standard Library modules."
-
Publish version
-
3.4.11
-
- -
-
Source
-
Published Daml Standard Library docs JSON from local SDK artifacts
-
- -
-
Version filter
-
configured Daml SDK artifact versions
-
- -
- -
- - -## Modules - - -Open a module page for declarations, type signatures, warnings, and lifecycle details. - - - -
- - - - -
-

DA.Action

- -
- - Since 3.4.9 - -
- -
- -

Action

- - -
- -
-
Kind
-
Module
-
- -
-
Introduced
-
3.4.9
-
- -
-
Changed
-
-
-
- -
-
Deprecated
-
-
-
- -
-
Removed
-
-
-
- -
- - -
- - - - - -
-

DA.Action.State

- -
- - Since 3.4.9 - -
- -
- -

DA.Action.State

- - -
- -
-
Kind
-
Module
-
- -
-
Introduced
-
3.4.9
-
- -
-
Changed
-
-
-
- -
-
Deprecated
-
-
-
- -
-
Removed
-
-
-
- -
- - -
- - - - - -
-

DA.Action.State.Class

- -
- - Since 3.4.9 - -
- -
- -

DA.Action.State.Class

- - -
- -
-
Kind
-
Module
-
- -
-
Introduced
-
3.4.9
-
- -
-
Changed
-
-
-
- -
-
Deprecated
-
-
-
- -
-
Removed
-
-
-
- -
- - -
- - - - - -
-

DA.Assert

- -
- - Since 3.4.9 - -
- -
- -

-

- - -
- -
-
Kind
-
Module
-
- -
-
Introduced
-
3.4.9
-
- -
-
Changed
-
-
-
- -
-
Deprecated
-
-
-
- -
-
Removed
-
-
-
- -
- - -
- - - - - -
-

DA.Bifunctor

- -
- - Since 3.4.9 - -
- -
- -

-

- - -
- -
-
Kind
-
Module
-
- -
-
Introduced
-
3.4.9
-
- -
-
Changed
-
-
-
- -
-
Deprecated
-
-
-
- -
-
Removed
-
-
-
- -
- - -
- - - - - -
-

DA.Crypto.Text

- -
- - Since 3.4.9 - -
- -
- -

Functions for working with Crypto builtins.

- - -
- -
-
Kind
-
Module
-
- -
-
Introduced
-
3.4.9
-
- -
-
Changed
-
-
-
- -
-
Deprecated
-
-
-
- -
-
Removed
-
-
-
- -
- - -
- - - - - -
-

DA.Date

- -
- - Since 3.4.9 - -
- -
- -

This module provides a set of functions to manipulate Date values.

- - -
- -
-
Kind
-
Module
-
- -
-
Introduced
-
3.4.9
-
- -
-
Changed
-
-
-
- -
-
Deprecated
-
-
-
- -
-
Removed
-
-
-
- -
- - -
- - - - - -
-

DA.Either

- -
- - Since 3.4.9 - -
- -
- -

The Either type represents values with two possibilities.

- - -
- -
-
Kind
-
Module
-
- -
-
Introduced
-
3.4.9
-
- -
-
Changed
-
-
-
- -
-
Deprecated
-
-
-
- -
-
Removed
-
-
-
- -
- - -
- - - - - -
-

DA.Exception

- -
- - Since 3.4.9 - - Deprecated 3.4.9 - -
- -
- -

Exception handling in Daml.

- - -
- -
-
Kind
-
Module
-
- -
-
Introduced
-
3.4.9
-
- -
-
Changed
-
-
-
- -
-
Deprecated
-
3.4.9
-
- -
-
Removed
-
-
-
- -
- - -
- - - - - -
-

DA.Fail

- -
- - Since 3.4.9 - -
- -
- -

Fail, for FailureStatus

- - -
- -
-
Kind
-
Module
-
- -
-
Introduced
-
3.4.9
-
- -
-
Changed
-
-
-
- -
-
Deprecated
-
-
-
- -
-
Removed
-
-
-
- -
- - -
- - - - - -
-

DA.Foldable

- -
- - Since 3.4.9 - -
- -
- -

Class of data structures that can be folded to a summary value.

- - -
- -
-
Kind
-
Module
-
- -
-
Introduced
-
3.4.9
-
- -
-
Changed
-
-
-
- -
-
Deprecated
-
-
-
- -
-
Removed
-
-
-
- -
- - -
- - - - - -
-

DA.Functor

- -
- - Since 3.4.9 - -
- -
- -

The Functor class is used for types that can be mapped over.

- - -
- -
-
Kind
-
Module
-
- -
-
Introduced
-
3.4.9
-
- -
-
Changed
-
-
-
- -
-
Deprecated
-
-
-
- -
-
Removed
-
-
-
- -
- - -
- - - - - -
-

DA.Internal.Interface.AnyView

- -
- - Since 3.4.9 - -
- -
- -

-

- - -
- -
-
Kind
-
Module
-
- -
-
Introduced
-
3.4.9
-
- -
-
Changed
-
-
-
- -
-
Deprecated
-
-
-
- -
-
Removed
-
-
-
- -
- - -
- - - - - -
-

DA.Internal.Interface.AnyView.Types

- -
- - Since 3.4.9 - -
- -
- -

-

- - -
- -
-
Kind
-
Module
-
- -
-
Introduced
-
3.4.9
-
- -
-
Changed
-
-
-
- -
-
Deprecated
-
-
-
- -
-
Removed
-
-
-
- -
- - -
- - - - - -
-

DA.List

- -
- - Since 3.4.9 - -
- -
- -

List

- - -
- -
-
Kind
-
Module
-
- -
-
Introduced
-
3.4.9
-
- -
-
Changed
-
-
-
- -
-
Deprecated
-
-
-
- -
-
Removed
-
-
-
- -
- - -
- - - - - -
-

DA.List.BuiltinOrder

- -
- - Since 3.4.9 - -
- -
- -

Note: This is only supported in Daml-LF 1.11 or later.

- - -
- -
-
Kind
-
Module
-
- -
-
Introduced
-
3.4.9
-
- -
-
Changed
-
-
-
- -
-
Deprecated
-
-
-
- -
-
Removed
-
-
-
- -
- - -
- - - - - -
-

DA.List.Total

- -
- - Since 3.4.9 - -
- -
- -

-

- - -
- -
-
Kind
-
Module
-
- -
-
Introduced
-
3.4.9
-
- -
-
Changed
-
-
-
- -
-
Deprecated
-
-
-
- -
-
Removed
-
-
-
- -
- - -
- - - - - -
-

DA.Logic

- -
- - Since 3.4.9 - -
- -
- -

Logic - Propositional calculus.

- - -
- -
-
Kind
-
Module
-
- -
-
Introduced
-
3.4.9
-
- -
-
Changed
-
-
-
- -
-
Deprecated
-
-
-
- -
-
Removed
-
-
-
- -
- - -
- - - - - -
-

DA.Map

- -
- - Since 3.4.9 - -
- -
- -

Note: This is only supported in Daml-LF 1.11 or later.

- - -
- -
-
Kind
-
Module
-
- -
-
Introduced
-
3.4.9
-
- -
-
Changed
-
-
-
- -
-
Deprecated
-
-
-
- -
-
Removed
-
-
-
- -
- - -
- - - - - -
-

DA.Math

- -
- - Since 3.4.9 - -
- -
- -

Math - Utility Math functions for Decimal

- - -
- -
-
Kind
-
Module
-
- -
-
Introduced
-
3.4.9
-
- -
-
Changed
-
-
-
- -
-
Deprecated
-
-
-
- -
-
Removed
-
-
-
- -
- - -
- - - - - -
-

DA.Monoid

- -
- - Since 3.4.9 - -
- -
- -

-

- - -
- -
-
Kind
-
Module
-
- -
-
Introduced
-
3.4.9
-
- -
-
Changed
-
-
-
- -
-
Deprecated
-
-
-
- -
-
Removed
-
-
-
- -
- - -
- - - - - -
-

DA.NonEmpty

- -
- - Since 3.4.9 - -
- -
- -

Type and functions for non-empty lists. This module re-exports many functions with

- - -
- -
-
Kind
-
Module
-
- -
-
Introduced
-
3.4.9
-
- -
-
Changed
-
-
-
- -
-
Deprecated
-
-
-
- -
-
Removed
-
-
-
- -
- - -
- - - - - -
-

DA.NonEmpty.Types

- -
- - Since 3.4.9 - -
- -
- -

This module contains the type for non-empty lists so we can give it a stable package id.

- - -
- -
-
Kind
-
Module
-
- -
-
Introduced
-
3.4.9
-
- -
-
Changed
-
-
-
- -
-
Deprecated
-
-
-
- -
-
Removed
-
-
-
- -
- - -
- - - - - -
-

DA.Numeric

- -
- - Since 3.4.9 - -
- -
- -

-

- - -
- -
-
Kind
-
Module
-
- -
-
Introduced
-
3.4.9
-
- -
-
Changed
-
-
-
- -
-
Deprecated
-
-
-
- -
-
Removed
-
-
-
- -
- - -
- - - - - -
-

DA.Optional

- -
- - Since 3.4.9 - -
- -
- -

The Optional type encapsulates an optional value. A value of type

- - -
- -
-
Kind
-
Module
-
- -
-
Introduced
-
3.4.9
-
- -
-
Changed
-
-
-
- -
-
Deprecated
-
-
-
- -
-
Removed
-
-
-
- -
- - -
- - - - - -
-

DA.Record

- -
- - Since 3.4.9 - -
- -
- -

Exports the record machinery necessary to allow one to annotate

- - -
- -
-
Kind
-
Module
-
- -
-
Introduced
-
3.4.9
-
- -
-
Changed
-
-
-
- -
-
Deprecated
-
-
-
- -
-
Removed
-
-
-
- -
- - -
- - - - - -
-

DA.Semigroup

- -
- - Since 3.4.9 - -
- -
- -

-

- - -
- -
-
Kind
-
Module
-
- -
-
Introduced
-
3.4.9
-
- -
-
Changed
-
-
-
- -
-
Deprecated
-
-
-
- -
-
Removed
-
-
-
- -
- - -
- - - - - -
-

DA.Set

- -
- - Since 3.4.9 - -
- -
- -

Note: This is only supported in Daml-LF 1.11 or later.

- - -
- -
-
Kind
-
Module
-
- -
-
Introduced
-
3.4.9
-
- -
-
Changed
-
-
-
- -
-
Deprecated
-
-
-
- -
-
Removed
-
-
-
- -
- - -
- - - - - -
-

DA.Stack

- -
- - Since 3.4.9 - -
- -
- -

-

- - -
- -
-
Kind
-
Module
-
- -
-
Introduced
-
3.4.9
-
- -
-
Changed
-
-
-
- -
-
Deprecated
-
-
-
- -
-
Removed
-
-
-
- -
- - -
- - - - - -
-

DA.Text

- -
- - Since 3.4.9 - -
- -
- -

Functions for working with Text.

- - -
- -
-
Kind
-
Module
-
- -
-
Introduced
-
3.4.9
-
- -
-
Changed
-
-
+
Source stream
+
Daml Standard Library
-
Deprecated
-
-
+
Publish version
+
3.4.11
-
Removed
-
-
+
Versions compared
+
3.4.9, 3.4.10, 3.4.11
- -
- - - - - -
-

DA.TextMap

- -
- - Since 3.4.9 -
-
- -

TextMap - A map is an associative array data type composed of a

+## Generated from
-
Kind
-
Module
-
- -
-
Introduced
-
3.4.9
-
- -
-
Changed
-
-
+
Input family
+
Published Daml Standard Library docs JSON from local SDK artifacts
-
Deprecated
-
-
+
Version filter
+
configured Daml SDK artifact versions
-
Removed
-
-
+
Modules
+
36
-
- +
- +
-

DA.Time

- -
- - Since 3.4.9 - -
+

Generated reference pages

-

This module provides a set of functions to manipulate Time values.

+

Module pages are generated from the publish-version Daml docs JSON, with lifecycle facts calculated across selected snapshots.

-
Kind
-
Module
-
- -
-
Introduced
-
3.4.9
-
- -
-
Changed
-
-
-
- -
-
Deprecated
-
-
-
- -
-
Removed
-
-
+
Modules
+
36
-
- - - - - -
-

DA.Traversable

- -
- - Since 3.4.9 - -
- -
- -

Class of data structures that can be traversed from left to right, performing an action on each element.

- - -
- -
-
Kind
-
Module
-
- -
-
Introduced
-
3.4.9
-
- -
-
Changed
-
-
-
- -
-
Deprecated
-
-
-
- -
-
Removed
-
-
-
- - -
- - - - - -
-

DA.Tuple

- -
- - Since 3.4.9
-
- -

Tuple - Ubiquitous functions of tuples.

-
- -
-
Kind
-
Module
-
- -
-
Introduced
-
3.4.9
-
- -
-
Changed
-
-
-
- -
-
Deprecated
-
-
-
- -
-
Removed
-
-
-
- -
- - -
- - - - - - - - - - - -## Version Summary - - - - -
- - -
- -
-

3.4.9

- -
- - Added 38 - - Changed 0 - - Removed 0 - -
- -
- -

Module changes included in this Daml docs JSON snapshot.

- - - -
- - - -
- -
-

3.4.10

- -
- - Added 0 - - Changed 0 - - Removed 0 - -
- -
- -

Module changes included in this Daml docs JSON snapshot.

- - - -
- - - -
- -
-

3.4.11

- -
- - Added 0 - - Changed 0 - - Removed 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TYPESTATUSSUMMARY
+ DA.Action + +
+ + + Since 3.4.9 + + +
+
Action
+ DA.Action.State + +
+ + + Since 3.4.9 + + +
+
DA.Action.State
+ DA.Action.State.Class + +
+ + + Since 3.4.9 + + +
+
DA.Action.State.Class
+ DA.Assert + +
+ + + Since 3.4.9 + + +
+
-
+ DA.Bifunctor + +
+ + + Since 3.4.9 + + +
+
-
+ DA.Crypto.Text + +
+ + + Since 3.4.9 + + +
+
Functions for working with Crypto builtins.
+ DA.Date + +
+ + + Since 3.4.9 + + +
+
This module provides a set of functions to manipulate Date values.
+ DA.Either + +
+ + + Since 3.4.9 + + +
+
The Either type represents values with two possibilities.
+ DA.Exception + +
+ + + Since 3.4.9 + + + Deprecated 3.4.9 + +
+
Exception handling in Daml.
+ DA.Fail + +
+ + + Since 3.4.9 + + +
+
Fail, for FailureStatus
+ DA.Foldable + +
+ + + Since 3.4.9 + + +
+
Class of data structures that can be folded to a summary value.
+ DA.Functor + +
+ + + Since 3.4.9 + + +
+
The Functor class is used for types that can be mapped over.
+ DA.Internal.Interface.AnyView + +
+ + + Since 3.4.9 + + +
+
-
+ DA.Internal.Interface.AnyView.Types + +
+ + + Since 3.4.9 + + +
+
-
+ DA.List + +
+ + + Since 3.4.9 + + +
+
List
+ DA.List.BuiltinOrder + +
+ + + Since 3.4.9 + + +
+
Note: This is only supported in Daml-LF 1.11 or later.
+ DA.List.Total + +
+ + + Since 3.4.9 + + +
+
-
+ DA.Logic + +
+ + + Since 3.4.9 + + +
+
Logic - Propositional calculus.
+ DA.Map + +
+ + + Since 3.4.9 + + +
+
Note: This is only supported in Daml-LF 1.11 or later.
+ DA.Math + +
+ + + Since 3.4.9 + + +
+
Math - Utility Math functions for Decimal
+ DA.Monoid + +
+ + + Since 3.4.9 + + +
+
-
+ DA.NonEmpty + +
+ + + Since 3.4.9 + + +
+
Type and functions for non-empty lists. This module re-exports many functions with
+ DA.NonEmpty.Types + +
+ + + Since 3.4.9 + + +
+
This module contains the type for non-empty lists so we can give it a stable package id.
+ DA.Numeric + +
+ + + Since 3.4.9 + + +
+
-
+ DA.Optional + +
+ + + Since 3.4.9 + + +
+
The Optional type encapsulates an optional value. A value of type
+ DA.Record + +
+ + + Since 3.4.9 + + +
+
Exports the record machinery necessary to allow one to annotate
+ DA.Semigroup + +
+ + + Since 3.4.9 + + +
+
-
+ DA.Set + +
+ + + Since 3.4.9 + + +
+
Note: This is only supported in Daml-LF 1.11 or later.
+ DA.Stack + +
+ + + Since 3.4.9 + + +
+
-
+ DA.Text + +
+ + + Since 3.4.9 + + +
+
Functions for working with Text.
+ DA.TextMap + +
+ + + Since 3.4.9 + + +
+
TextMap - A map is an associative array data type composed of a
+ DA.Time + +
+ + + Since 3.4.9 + + +
+
This module provides a set of functions to manipulate Time values.
+ DA.Traversable + +
+ + + Since 3.4.9 + + +
+
Class of data structures that can be traversed from left to right, performing an action on each element.
+ DA.Tuple + +
+ + + Since 3.4.9 + + +
+
Tuple - Ubiquitous functions of tuples.
+ DA.Validation + +
+ + + Since 3.4.9 + + +
+
Validation type and associated functions.
+ Prelude + +
+ + + Since 3.4.9 + + +
+
The pieces that make up the Daml language.
+ + + + + +## Change details + +
+ +
+ 3.4.9 + + Deprecated DA.Exception + Module carries source deprecation metadata. + +
-
- -

Module changes included in this Daml docs JSON snapshot.

+## Known limits + + +- Change detection compares selected Daml docs JSON snapshots; it does not infer behavioral compatibility. -
- - -
+- Deprecation and replacement metadata are included only when the source docs JSON carries the supported warning or deprecation transport. diff --git a/docs-main/appdev/reference/daml-standard-library/prelude.mdx b/docs-main/appdev/reference/daml-standard-library/prelude.mdx index 79b8e44ce..67ca9cd59 100644 --- a/docs-main/appdev/reference/daml-standard-library/prelude.mdx +++ b/docs-main/appdev/reference/daml-standard-library/prelude.mdx @@ -3,9 +3,6 @@ title: "Prelude" description: "Reference documentation for Daml module Prelude." --- -import DamlAppdevModulesM3LanguageFundamentalsL145 from "/snippets/daml-docs/appdev_modules_m3-language-fundamentals_L145.mdx"; -import DamlAppdevModulesM3LanguageFundamentalsL452 from "/snippets/daml-docs/appdev_modules_m3-language-fundamentals_L452.mdx"; - # Prelude @@ -820,7 +817,7 @@ Instances: ### `assert` -```haskell +```daml assert : CanAssert m => Bool -> m () ``` @@ -830,7 +827,7 @@ Check whether a condition is true. If it's not, abort the transaction. ### `assertMsg` -```haskell +```daml assertMsg : CanAssert m => Text -> Bool -> m () ``` @@ -841,7 +838,7 @@ with a message. ### `assertAfter` -```haskell +```daml assertAfter : (CanAssert m, HasTime m) => Time -> m () ``` @@ -851,7 +848,7 @@ Check whether the given time is in the future. If it's not, abort the transactio ### `assertBefore` -```haskell +```daml assertBefore : (CanAssert m, HasTime m) => Time -> m () ``` @@ -861,7 +858,7 @@ Check whether the given time is in the past. If it's not, abort the transaction. ### `daysSinceEpochToDate` -```haskell +```daml daysSinceEpochToDate : Int -> Date ``` @@ -872,7 +869,7 @@ January 1, 1970) to a date. ### `dateToDaysSinceEpoch` -```haskell +```daml dateToDaysSinceEpoch : Date -> Int ``` @@ -883,7 +880,7 @@ since January 1, 1970). ### `interfaceTypeRep` -```haskell +```daml interfaceTypeRep : HasInterfaceTypeRep i => i -> TemplateTypeRep ``` @@ -893,7 +890,7 @@ interfaceTypeRep : HasInterfaceTypeRep i => i -> TemplateTypeRep ### `toInterface` -```haskell +```daml toInterface : HasToInterface t i => t -> i ``` @@ -905,7 +902,7 @@ For example `toInterface @MyInterface value` converts a template ### `toInterfaceContractId` -```haskell +```daml toInterfaceContractId : HasToInterface t i => ContractId t -> ContractId i ``` @@ -916,7 +913,7 @@ contract id. For example, `toInterfaceContractId @MyInterface cid`. ### `fromInterfaceContractId` -```haskell +```daml fromInterfaceContractId : HasFromInterface t i => ContractId i -> ContractId t ``` @@ -945,7 +942,7 @@ In all other cases, consider using `fetchFromInterface` instead. ### `coerceInterfaceContractId` -```haskell +```daml coerceInterfaceContractId : (HasInterfaceTypeRep i, HasInterfaceTypeRep j) => ContractId i -> ContractId j ``` @@ -971,7 +968,7 @@ appropriate response to the contract having the wrong type. ### `fetchFromInterface` -```haskell +```daml fetchFromInterface : (HasFromInterface t i, HasFetch i) => ContractId i -> Update (Optional (ContractId t, t)) ``` @@ -997,7 +994,7 @@ do ### `_exerciseInterfaceGuard` -```haskell +```daml _exerciseInterfaceGuard : a -> b -> c -> Bool ``` @@ -1005,7 +1002,7 @@ _exerciseInterfaceGuard : a -> b -> c -> Bool ### `view` -```haskell +```daml view : HasInterfaceView i v => i -> v ``` @@ -1013,7 +1010,7 @@ view : HasInterfaceView i v => i -> v ### `partyToText` -```haskell +```daml partyToText : Party -> Text ``` @@ -1025,7 +1022,7 @@ the party in `'ticks'` making it clear it was a `Party` originally. ### `partyFromText` -```haskell +```daml partyFromText : Text -> Optional Party ``` @@ -1042,7 +1039,7 @@ exists on a given ledger is to involve it in a contract. This function, together with `partyToText`, forms an isomorphism between valid party strings and parties. In other words, the following equations hold: -```haskell-force +```daml-force ∀ p. partyFromText (partyToText p) = Some p ∀ txt p. partyFromText txt = Some p ==> partyToText p = txt ``` @@ -1053,7 +1050,7 @@ This function will crash at runtime if you compile Daml to Daml-LF < 1.2. ### `coerceContractId` -```haskell +```daml coerceContractId : ContractId a -> ContractId b ``` @@ -1065,7 +1062,7 @@ template of the contract on the ledger doesn't match. ### `curry` -```haskell +```daml curry : ((a, b) -> c) -> a -> b -> c ``` @@ -1075,7 +1072,9 @@ Turn a function that takes a pair into a function that takes two arguments. ### `uncurry` - +```daml +uncurry : (a -> b -> c) -> (a, b) -> c +``` Turn a function that takes two arguments into a function that takes a pair. @@ -1083,7 +1082,7 @@ Turn a function that takes two arguments into a function that takes a pair. ### `>>` -```haskell +```daml >> : Action m => m a -> m b -> m b ``` @@ -1095,7 +1094,7 @@ in imperative languages. ### `ap` -```haskell +```daml ap : Applicative f => f (a -> b) -> f a -> f b ``` @@ -1105,7 +1104,7 @@ Synonym for `<*>`. ### `return` -```haskell +```daml return : Applicative m => a -> m a ``` @@ -1116,7 +1115,7 @@ value of type `a`, `return` would give you an `Update a`. ### `join` -```haskell +```daml join : Action m => m (m a) -> m a ``` @@ -1126,7 +1125,7 @@ Collapses nested actions into a single action. ### `identity` -```haskell +```daml identity : a -> a ``` @@ -1136,7 +1135,7 @@ The identity function. ### `guard` -```haskell +```daml guard : ActionFail m => Bool -> m () ``` @@ -1144,7 +1143,9 @@ guard : ActionFail m => Bool -> m () ### `foldl` - +```daml +foldl : (b -> a -> b) -> b -> [a] -> b +``` This function is a left fold, which you can use to inspect/analyse/consume lists. `foldl f i xs` performs a left fold over the list `xs` using @@ -1166,7 +1167,7 @@ Note that foldl works from left-to-right over the list arguments. ### `find` -```haskell +```daml find : (a -> Bool) -> [a] -> Optional a ``` @@ -1178,7 +1179,7 @@ is why this function returns an `Optional a`. ### `length` -```haskell +```daml length : [a] -> Int ``` @@ -1188,7 +1189,7 @@ Gives the length of the list. ### `any` -```haskell +```daml any : (a -> Bool) -> [a] -> Bool ``` @@ -1199,7 +1200,7 @@ Are there any elements in the list where the predicate is true? ### `all` -```haskell +```daml all : (a -> Bool) -> [a] -> Bool ``` @@ -1210,7 +1211,7 @@ Is the predicate true for all of the elements in the list? ### `or` -```haskell +```daml or : [Bool] -> Bool ``` @@ -1221,7 +1222,7 @@ Is at least one of elements in a list of `Bool` true? ### `and` -```haskell +```daml and : [Bool] -> Bool ``` @@ -1232,7 +1233,7 @@ Is every element in a list of Bool true? ### `elem` -```haskell +```daml elem : Eq a => a -> [a] -> Bool ``` @@ -1243,7 +1244,7 @@ Does this value exist in this list? ### `notElem` -```haskell +```daml notElem : Eq a => a -> [a] -> Bool ``` @@ -1254,7 +1255,7 @@ Negation of `elem`: ### `<$>` -```haskell +```daml <$> : Functor f => (a -> b) -> f a -> f b ``` @@ -1264,7 +1265,7 @@ Synonym for `fmap`. ### `optional` -```haskell +```daml optional : b -> (a -> b) -> Optional a -> b ``` @@ -1307,7 +1308,7 @@ returns the empty string instead of (for example) `None`: ### `either` -```haskell +```daml either : (a -> c) -> (b -> c) -> Either a b -> c ``` @@ -1333,7 +1334,7 @@ or the "times-two" function (if it has an `Int`): ### `concat` -```haskell +```daml concat : [[a]] -> [a] ``` @@ -1343,7 +1344,7 @@ Take a list of lists and concatenate those lists into one list. ### `++` -```haskell +```daml ++ : [a] -> [a] -> [a] ``` @@ -1353,7 +1354,7 @@ Concatenate two lists. ### `flip` -```haskell +```daml flip : (a -> b -> c) -> b -> a -> c ``` @@ -1363,7 +1364,7 @@ Flip the order of the arguments of a two argument function. ### `reverse` -```haskell +```daml reverse : [a] -> [a] ``` @@ -1373,7 +1374,7 @@ Reverse a list. ### `mapA` -```haskell +```daml mapA : Applicative m => (a -> m b) -> [a] -> m [b] ``` @@ -1383,7 +1384,7 @@ Apply an applicative function to each element of a list. ### `forA` -```haskell +```daml forA : Applicative m => [a] -> (a -> m b) -> m [b] ``` @@ -1393,7 +1394,7 @@ forA : Applicative m => [a] -> (a -> m b) -> m [b] ### `sequence` -```haskell +```daml sequence : Applicative m => [m a] -> m [a] ``` @@ -1403,7 +1404,7 @@ Perform a list of actions in sequence and collect the results. ### `=<<` -```haskell +```daml =<< : Action m => (a -> m b) -> m a -> m b ``` @@ -1413,7 +1414,7 @@ Perform a list of actions in sequence and collect the results. ### `concatMap` -```haskell +```daml concatMap : (a -> [b]) -> [a] -> [b] ``` @@ -1423,7 +1424,7 @@ Map a function over each element of a list, and concatenate all the results. ### `replicate` -```haskell +```daml replicate : Int -> a -> [a] ``` @@ -1433,7 +1434,7 @@ replicate : Int -> a -> [a] ### `take` -```haskell +```daml take : Int -> [a] -> [a] ``` @@ -1443,7 +1444,7 @@ Take the first `n` elements of a list. ### `drop` -```haskell +```daml drop : Int -> [a] -> [a] ``` @@ -1453,7 +1454,7 @@ Drop the first `n` elements of a list. ### `splitAt` -```haskell +```daml splitAt : Int -> [a] -> ([a], [a]) ``` @@ -1463,7 +1464,7 @@ Split a list at a given index. ### `takeWhile` -```haskell +```daml takeWhile : (a -> Bool) -> [a] -> [a] ``` @@ -1473,7 +1474,7 @@ Take elements from a list while the predicate holds. ### `dropWhile` -```haskell +```daml dropWhile : (a -> Bool) -> [a] -> [a] ``` @@ -1483,7 +1484,7 @@ Drop elements from a list while the predicate holds. ### `span` -```haskell +```daml span : (a -> Bool) -> [a] -> ([a], [a]) ``` @@ -1493,7 +1494,7 @@ span : (a -> Bool) -> [a] -> ([a], [a]) ### `partition` -```haskell +```daml partition : (a -> Bool) -> [a] -> ([a], [a]) ``` @@ -1512,7 +1513,7 @@ predicate, respectively; i.e., ### `break` -```haskell +```daml break : (a -> Bool) -> [a] -> ([a], [a]) ``` @@ -1523,7 +1524,7 @@ Break a list into two, just before the first element where the predicate holds. ### `lookup` -```haskell +```daml lookup : Eq a => a -> [(a, b)] -> Optional b ``` @@ -1533,7 +1534,7 @@ Look up the first element with a matching key. ### `enumerate` -```haskell +```daml enumerate : (Enum a, Bounded a) => [a] ``` @@ -1543,7 +1544,7 @@ Generate a list containing all values of a given enumeration. ### `zip` -```haskell +```daml zip : [a] -> [b] -> [(a, b)] ``` @@ -1554,7 +1555,7 @@ If one list is shorter, the excess elements of the longer list are discarded. ### `zip3` -```haskell +```daml zip3 : [a] -> [b] -> [c] -> [(a, b, c)] ``` @@ -1564,7 +1565,7 @@ zip3 : [a] -> [b] -> [c] -> [(a, b, c)] ### `zipWith` -```haskell +```daml zipWith : (a -> b -> c) -> [a] -> [b] -> [c] ``` @@ -1576,7 +1577,7 @@ If one list is shorter, the excess elements of the longer list are discarded. ### `zipWith3` -```haskell +```daml zipWith3 : (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d] ``` @@ -1586,7 +1587,7 @@ zipWith3 : (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d] ### `unzip` -```haskell +```daml unzip : [(a, b)] -> ([a], [b]) ``` @@ -1596,7 +1597,7 @@ Turn a list of pairs into a pair of lists. ### `unzip3` -```haskell +```daml unzip3 : [(a, b, c)] -> ([a], [b], [c]) ``` @@ -1606,7 +1607,7 @@ Turn a list of triples into a triple of lists. ### `traceRaw` -```haskell +```daml traceRaw : Text -> a -> a ``` @@ -1618,7 +1619,7 @@ The default configuration on the participant logs these messages at DEBUG level. ### `trace` -```haskell +```daml trace : Show b => b -> a -> a ``` @@ -1630,7 +1631,7 @@ The default configuration on the participant logs these messages at DEBUG level. ### `traceId` -```haskell +```daml traceId : Show b => b -> b ``` @@ -1642,7 +1643,7 @@ The default configuration on the participant logs these messages at DEBUG level. ### `debug` -```haskell +```daml debug : (Show b, Action m) => b -> m () ``` @@ -1654,7 +1655,7 @@ The default configuration on the participant logs these messages at DEBUG level. ### `debugRaw` -```haskell +```daml debugRaw : Action m => Text -> m () ``` @@ -1666,7 +1667,7 @@ The default configuration on the participant logs these messages at DEBUG level. ### `fst` -```haskell +```daml fst : (a, b) -> a ``` @@ -1676,7 +1677,7 @@ Return the first element of a tuple. ### `snd` -```haskell +```daml snd : (a, b) -> b ``` @@ -1686,7 +1687,7 @@ Return the second element of a tuple. ### `truncate` -```haskell +```daml truncate : Numeric n -> Int ``` @@ -1696,7 +1697,7 @@ truncate : Numeric n -> Int ### `intToNumeric` -```haskell +```daml intToNumeric : NumericScale n => Int -> Numeric n ``` @@ -1706,7 +1707,7 @@ Convert an `Int` to a `Numeric`. ### `intToDecimal` -```haskell +```daml intToDecimal : Int -> Decimal ``` @@ -1716,7 +1717,7 @@ Convert an `Int` to a `Decimal`. ### `roundBankers` -```haskell +```daml roundBankers : Int -> Numeric n -> Numeric n ``` @@ -1726,7 +1727,7 @@ Bankers' Rounding: `roundBankers dp x` rounds `x` to `dp` decimal places, where ### `roundCommercial` -```haskell +```daml roundCommercial : NumericScale n => Int -> Numeric n -> Numeric n ``` @@ -1736,7 +1737,7 @@ Commercial Rounding: `roundCommercial dp x` rounds `x` to `dp` decimal places, w ### `round` -```haskell +```daml round : NumericScale n => Numeric n -> Int ``` @@ -1746,7 +1747,7 @@ Round a `Numeric` to the nearest integer, where a `.5` is rounded away from zero ### `floor` -```haskell +```daml floor : NumericScale n => Numeric n -> Int ``` @@ -1756,7 +1757,7 @@ Round a `Decimal` down to the nearest integer. ### `ceiling` -```haskell +```daml ceiling : NumericScale n => Numeric n -> Int ``` @@ -1766,7 +1767,7 @@ Round a `Decimal` up to the nearest integer. ### `null` -```haskell +```daml null : [a] -> Bool ``` @@ -1776,7 +1777,7 @@ Is the list empty? `null xs` is true if `xs` is the empty list. ### `filter` -```haskell +```daml filter : (a -> Bool) -> [a] -> [a] ``` @@ -1786,7 +1787,7 @@ Filters the list using the function: keep only the elements where the predicate ### `sum` -```haskell +```daml sum : Additive a => [a] -> a ``` @@ -1796,7 +1797,7 @@ Add together all the elements in the list. ### `product` -```haskell +```daml product : Multiplicative a => [a] -> a ``` @@ -1806,7 +1807,7 @@ Multiply all the elements in the list together. ### `undefined` -```haskell +```daml undefined : a ``` @@ -1817,7 +1818,7 @@ Always throws an error with "Not implemented." ### `softFetch` -```haskell +```daml softFetch : HasSoftFetch t => ContractId t -> Update t ``` @@ -1825,7 +1826,7 @@ softFetch : HasSoftFetch t => ContractId t -> Update t ### `softExercise` -```haskell +```daml softExercise : HasSoftExercise t c r => ContractId t -> c -> Update r ``` @@ -1833,7 +1834,7 @@ softExercise : HasSoftExercise t c r => ContractId t -> c -> Update r ### `stakeholder` -```haskell +```daml stakeholder : (HasSignatory t, HasObserver t) => t -> [Party] ``` @@ -1843,7 +1844,7 @@ The stakeholders of a contract: its signatories and observers. ### `maintainer` -```haskell +```daml maintainer : HasMaintainer t k => k -> [Party] ``` @@ -1853,7 +1854,7 @@ The list of maintainers of a contract key. ### `exerciseByKey` -```haskell +```daml exerciseByKey : HasExerciseByKey t k c r => k -> c -> Update r ``` @@ -1868,7 +1869,7 @@ template `Account` given by its key `k`, you must call ### `createAndExercise` -```haskell +```daml createAndExercise : (HasCreate t, HasExercise t c r) => t -> c -> Update r ``` @@ -1878,7 +1879,7 @@ Create a contract and exercise the choice on the newly created contract. ### `templateTypeRep` -```haskell +```daml templateTypeRep : HasTemplateTypeRep t => TemplateTypeRep ``` @@ -1888,7 +1889,7 @@ Generate a unique textual representation of the template id. ### `toAnyTemplate` -```haskell +```daml toAnyTemplate : HasToAnyTemplate t => t -> AnyTemplate ``` @@ -1900,7 +1901,7 @@ Only available for Daml-LF 1.7 or later. ### `fromAnyTemplate` -```haskell +```daml fromAnyTemplate : HasFromAnyTemplate t => AnyTemplate -> Optional t ``` @@ -1913,7 +1914,7 @@ Only available for Daml-LF 1.7 or later. ### `toAnyChoice` -```haskell +```daml toAnyChoice : (HasTemplateTypeRep t, HasToAnyChoice t c r) => c -> AnyChoice ``` @@ -1928,7 +1929,7 @@ Only available for Daml-LF 1.7 or later. ### `fromAnyChoice` -```haskell +```daml fromAnyChoice : (HasTemplateTypeRep t, HasFromAnyChoice t c r) => AnyChoice -> Optional c ``` @@ -1944,7 +1945,7 @@ Only available for Daml-LF 1.7 or later. ### `toAnyContractKey` -```haskell +```daml toAnyContractKey : (HasTemplateTypeRep t, HasToAnyContractKey t k) => k -> AnyContractKey ``` @@ -1959,7 +1960,7 @@ Only available for Daml-LF 1.7 or later. ### `fromAnyContractKey` -```haskell +```daml fromAnyContractKey : (HasTemplateTypeRep t, HasFromAnyContractKey t k) => AnyContractKey -> Optional k ``` @@ -1975,7 +1976,7 @@ Only available for Daml-LF 1.7 or later. ### `visibleByKey` -```haskell +```daml visibleByKey : HasLookupByKey t k => k -> Update Bool ``` diff --git a/docs-main/appdev/reference/protobuf-history/index.mdx b/docs-main/appdev/reference/protobuf-history/index.mdx index 2e3b31f79..97e0fff09 100644 --- a/docs-main/appdev/reference/protobuf-history/index.mdx +++ b/docs-main/appdev/reference/protobuf-history/index.mdx @@ -1,808 +1,476 @@ --- -title: "Details and History" -description: "Descriptor-backed protobuf API history grouped by package." +title: "Ledger API protobuf details and history" +description: "Generated source details and version history for the Ledger API protobuf reference." ---
- -

Protobuf Reference

- - -

Details and History

- - -

Operation-first gRPC pages with package-level browsing and recursive related schema sections.

- - -
- - Protobuf - - v3.4.11 - -
- - -
- -
-
Source
-
Canton protobuf trees from published release bundles
-
- -
-
Version filter
-
stable Canton release bundles >= 3.2.0
-
- -
-
Latest release
-
v3.4.11
-
- -
-
Packages
-
6
-
- -
-
Endpoints
-
56
-
- -
-
Messages
-
229
-
- -
- -
+

Details and history

-## Release Summary +

Ledger API protobuf details and history

-Counts are shown as added / changed / removed within each release slice. +

Generated-source metadata, version coverage, package inventory, and per-release changes for this source stream.

-
- - -
- -
-

3.4.0

-
- - Release - -
-
- -

Endpoint / message / enum deltas for this release.

- - -
- -
-
Endpoints
-
55 / 0 / 0
-
- -
-
Messages
-
227 / 0 / 0
-
- -
-
Enums
-
12 / 0 / 0
-
- -
- - -
- - - -
- -
-

3.4.2

- -
- - Release - -
+ Protobuf -
- -

Endpoint / message / enum deltas for this release.

- - -
- -
-
Endpoints
-
0 / 0 / 0
-
- -
-
Messages
-
0 / 0 / 0
-
- -
-
Enums
-
0 / 0 / 0
-
- -
+ v3.4.11 - -
- - - -
- -
-

3.4.3

- -
- - Release -
-
- -

Endpoint / message / enum deltas for this release.

- - -
- -
-
Endpoints
-
0 / 0 / 0
-
- -
-
Messages
-
0 / 0 / 0
-
- -
-
Enums
-
0 / 0 / 0
-
- -
- - -
- - - -
- -
-

3.4.4

- -
- - Release - -
-
- -

Endpoint / message / enum deltas for this release.

- -
- -
-
Endpoints
-
0 / 0 / 0
-
- -
-
Messages
-
0 / 1 / 0
-
- -
-
Enums
-
0 / 0 / 0
-
- -
- - -
- - - -
- -
-

3.4.5

- -
- - Release - -
-
- -

Endpoint / message / enum deltas for this release.

- - -
- -
-
Endpoints
-
0 / 0 / 0
-
- -
-
Messages
-
0 / 0 / 0
-
-
-
Enums
-
0 / 0 / 0
-
- -
- - +
Source stream
+
Ledger API protobuf
- - - -
- -
-

3.4.6

- -
- - Release - -
-
- -

Endpoint / message / enum deltas for this release.

- - -
- -
-
Endpoints
-
0 / 0 / 0
-
- -
-
Messages
-
0 / 0 / 0
-
-
-
Enums
-
0 / 0 / 0
-
- -
- - +
Latest release
+
v3.4.11
- - - -
- -
-

3.4.7

- -
- - Release - -
-
- -

Endpoint / message / enum deltas for this release.

- - -
-
-
Endpoints
-
0 / 0 / 0
+
Versions compared
+
3.4.0, 3.4.2, 3.4.3, 3.4.4, 3.4.5, 3.4.6, 3.4.7, 3.4.8, 3.4.9, 3.4.10, 3.4.11
- -
-
Messages
-
0 / 0 / 0
-
- -
-
Enums
-
0 / 0 / 0
-
- -
- -
- - - -
- -
-

3.4.8

- -
- - Release - -
- -
- -

Endpoint / message / enum deltas for this release.

- - -
- -
-
Endpoints
-
0 / 0 / 0
-
- -
-
Messages
-
0 / 0 / 0
-
- -
-
Enums
-
0 / 0 / 0
-
-
- -
- - - -
- -
-

3.4.9

- -
- - Release -
-
- -

Endpoint / message / enum deltas for this release.

- - -
- -
-
Endpoints
-
0 / 0 / 0
-
- -
-
Messages
-
0 / 0 / 0
-
- -
-
Enums
-
0 / 0 / 0
-
- -
+## Generated from - -
- - - -
- -
-

3.4.10

- -
- - Release - -
-
- -

Endpoint / message / enum deltas for this release.

- -
- -
-
Endpoints
-
0 / 0 / 0
-
- +
-
Messages
-
0 / 1 / 0
+
Input family
+
Canton protobuf trees from published release bundles
- +
-
Enums
-
0 / 0 / 0
+
Version filter
+
stable Canton release bundles >= 3.2.0
- -
- +
+
Packages
+
6
- - - -
- -
-

3.4.11

- -
- - Release - -
-
- -

Endpoint / message / enum deltas for this release.

- - -
-
Endpoints
-
1 / 0 / 0
+
56
- +
Messages
-
2 / 0 / 0
-
- -
-
Enums
-
0 / 0 / 0
-
- -
- - +
229
- - -
- - - + -## Ledger API +
+
- +## Version summary +
+ Active since / added + Changed + Removed + Deprecated +
-## Schema Packages + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VERSIONSTATUSSUMMARY
3.4.0 +
+ + + + 294 added + + +
+
294 added.
3.4.2 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
3.4.3 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
3.4.4 +
+ + + + 1 changed + + +
+
1 changed.
3.4.5 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
3.4.6 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
3.4.7 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
3.4.8 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
3.4.9 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
3.4.10 +
+ + + + 1 changed + + +
+
1 changed.
3.4.11 +
+ + + + 3 added + + +
+
3 added.
+ + + +## Current reference inventory + + +### Published packages + + +These packages are present in the latest selected descriptor snapshot and link to generated package pages. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TYPESTATUSSUMMARY
+ com.daml.ledger.api.v2 + +
+ + + Since 3.4.0 + + + Changed 3.4.11 + +
+
9 services, 20 endpoints, 115 messages, 8 enums
+ com.daml.ledger.api.v2.admin + +
+ + + Since 3.4.0 + + +
+
6 services, 28 endpoints, 78 messages, 3 enums
+ com.daml.ledger.api.v2.interactive + +
+ + + Since 3.4.0 + + +
+
1 services, 6 endpoints, 28 messages, 1 enums
+ com.daml.ledger.api.v2.testing + +
+ + + Since 3.4.0 + + +
+
1 services, 2 endpoints, 3 messages
+ com.daml.ledger.api + +
+ + + Current + + +
+
0 services, 0 endpoints, 0 messages
+ com.daml.ledger.api.v2.interactive.transaction.v1 + +
+ + + Current + + +
+
0 services, 0 endpoints, 5 messages
+ + + + + +## Change details + +
+ +
+ 3.4.0 + + Release 3.4.0 + endpoints: 55 added, 0 changed, 0 removed; messages: 227 added, 0 changed, 0 removed; enums: 12 added, 0 changed, 0 removed + +
+ +
+ 3.4.4 + + Release 3.4.4 + messages: 0 added, 1 changed, 0 removed + +
+ +
+ 3.4.10 + + Release 3.4.10 + messages: 0 added, 1 changed, 0 removed + +
+ +
+ 3.4.11 + + Release 3.4.11 + endpoints: 1 added, 0 changed, 0 removed; messages: 2 added, 0 changed, 0 removed + +
+
- +- Lifecycle labels and replacement links are included only when the protobuf source or metadata overlay carries that information. diff --git a/docs-main/docs.json b/docs-main/docs.json index 21a65f38c..31e3996db 100644 --- a/docs-main/docs.json +++ b/docs-main/docs.json @@ -960,52 +960,53 @@ { "group": "AsyncAPI", "pages": [ + "reference/json-api-asyncapi-reference/operations/details", { "group": "/v2/commands/completions", "pages": [ + "reference/json-api-asyncapi-reference/operations/v2-commands-completions/details", "reference/json-api-asyncapi-reference/operations/v2-commands-completions/publish", - "reference/json-api-asyncapi-reference/operations/v2-commands-completions/subscribe", - "reference/json-api-asyncapi-reference/operations/v2-commands-completions/details" + "reference/json-api-asyncapi-reference/operations/v2-commands-completions/subscribe" ] }, { "group": "/v2/state/active-contracts", "pages": [ + "reference/json-api-asyncapi-reference/operations/v2-state-active-contracts/details", "reference/json-api-asyncapi-reference/operations/v2-state-active-contracts/publish", - "reference/json-api-asyncapi-reference/operations/v2-state-active-contracts/subscribe", - "reference/json-api-asyncapi-reference/operations/v2-state-active-contracts/details" + "reference/json-api-asyncapi-reference/operations/v2-state-active-contracts/subscribe" ] }, { "group": "/v2/updates", "pages": [ + "reference/json-api-asyncapi-reference/operations/v2-updates/details", "reference/json-api-asyncapi-reference/operations/v2-updates/publish", - "reference/json-api-asyncapi-reference/operations/v2-updates/subscribe", - "reference/json-api-asyncapi-reference/operations/v2-updates/details" + "reference/json-api-asyncapi-reference/operations/v2-updates/subscribe" ] }, { "group": "/v2/updates/flats", "pages": [ + "reference/json-api-asyncapi-reference/operations/v2-updates-flats/details", "reference/json-api-asyncapi-reference/operations/v2-updates-flats/publish", - "reference/json-api-asyncapi-reference/operations/v2-updates-flats/subscribe", - "reference/json-api-asyncapi-reference/operations/v2-updates-flats/details" + "reference/json-api-asyncapi-reference/operations/v2-updates-flats/subscribe" ] }, { "group": "/v2/updates/trees", "pages": [ + "reference/json-api-asyncapi-reference/operations/v2-updates-trees/details", "reference/json-api-asyncapi-reference/operations/v2-updates-trees/publish", - "reference/json-api-asyncapi-reference/operations/v2-updates-trees/subscribe", - "reference/json-api-asyncapi-reference/operations/v2-updates-trees/details" + "reference/json-api-asyncapi-reference/operations/v2-updates-trees/subscribe" ] - }, - "reference/json-api-asyncapi-reference/operations/details" + } ] }, { "group": "gRPC API", "pages": [ + "reference/grpc-ledger-api-reference/details", { "group": "Packages", "pages": [ @@ -1201,13 +1202,13 @@ ] } ] - }, - "reference/grpc-ledger-api-reference/details" + } ] }, { "group": "Protobufs", "pages": [ + "reference/protobuf/index", { "group": "Packages", "pages": [ @@ -1409,13 +1410,13 @@ ] } ] - }, - "reference/protobuf/index" + } ] }, { "group": "Java Bindings", "pages": [ + "reference/java-bindings", { "group": "Javadocs", "pages": [ @@ -1620,8 +1621,7 @@ ] } ] - }, - "reference/java-bindings" + } ] } ] @@ -1629,6 +1629,7 @@ { "group": "Daml Standard Library", "pages": [ + "appdev/reference/daml-standard-library/index", { "group": "Modules", "pages": [ @@ -1669,13 +1670,13 @@ "appdev/reference/daml-standard-library/da-validation", "appdev/reference/daml-standard-library/prelude" ] - }, - "appdev/reference/daml-standard-library/index" + } ] }, { "group": "TypeScript", "pages": [ + "reference/typescript-details", "reference/typescript" ] }, @@ -1685,6 +1686,7 @@ { "group": "Sync dApp API", "pages": [ + "reference/wallet-gateway-json-rpc/operations/dapp-api/details", "reference/wallet-gateway-json-rpc/operations/dapp-api/accountschanged", "reference/wallet-gateway-json-rpc/operations/dapp-api/connect", "reference/wallet-gateway-json-rpc/operations/dapp-api/disconnect", @@ -1696,13 +1698,13 @@ "reference/wallet-gateway-json-rpc/operations/dapp-api/prepareexecuteandwait", "reference/wallet-gateway-json-rpc/operations/dapp-api/signmessage", "reference/wallet-gateway-json-rpc/operations/dapp-api/status", - "reference/wallet-gateway-json-rpc/operations/dapp-api/txchanged", - "reference/wallet-gateway-json-rpc/operations/dapp-api/details" + "reference/wallet-gateway-json-rpc/operations/dapp-api/txchanged" ] }, { "group": "Async dApp API", "pages": [ + "reference/wallet-gateway-json-rpc/operations/dapp-remote-api/details", "reference/wallet-gateway-json-rpc/operations/dapp-remote-api/accountschanged", "reference/wallet-gateway-json-rpc/operations/dapp-remote-api/connect", "reference/wallet-gateway-json-rpc/operations/dapp-remote-api/connected", @@ -1715,8 +1717,7 @@ "reference/wallet-gateway-json-rpc/operations/dapp-remote-api/prepareexecute", "reference/wallet-gateway-json-rpc/operations/dapp-remote-api/signmessage", "reference/wallet-gateway-json-rpc/operations/dapp-remote-api/status", - "reference/wallet-gateway-json-rpc/operations/dapp-remote-api/txchanged", - "reference/wallet-gateway-json-rpc/operations/dapp-remote-api/details" + "reference/wallet-gateway-json-rpc/operations/dapp-remote-api/txchanged" ] } ] @@ -1724,9 +1725,11 @@ { "group": "Wallet Gateway", "pages": [ + "reference/wallet-gateway-json-rpc/operations/details", { "group": "User API", "pages": [ + "reference/wallet-gateway-json-rpc/operations/user-api/details", "reference/wallet-gateway-json-rpc/operations/user-api/addidp", "reference/wallet-gateway-json-rpc/operations/user-api/addnetwork", "reference/wallet-gateway-json-rpc/operations/user-api/addsession", @@ -1748,13 +1751,13 @@ "reference/wallet-gateway-json-rpc/operations/user-api/removewallet", "reference/wallet-gateway-json-rpc/operations/user-api/setprimarywallet", "reference/wallet-gateway-json-rpc/operations/user-api/sign", - "reference/wallet-gateway-json-rpc/operations/user-api/syncwallets", - "reference/wallet-gateway-json-rpc/operations/user-api/details" + "reference/wallet-gateway-json-rpc/operations/user-api/syncwallets" ] }, { "group": "Signing API", "pages": [ + "reference/wallet-gateway-json-rpc/operations/signing-api/details", "reference/wallet-gateway-json-rpc/operations/signing-api/createkey", "reference/wallet-gateway-json-rpc/operations/signing-api/getconfiguration", "reference/wallet-gateway-json-rpc/operations/signing-api/getkeys", @@ -1762,11 +1765,9 @@ "reference/wallet-gateway-json-rpc/operations/signing-api/gettransactions", "reference/wallet-gateway-json-rpc/operations/signing-api/setconfiguration", "reference/wallet-gateway-json-rpc/operations/signing-api/signtransaction", - "reference/wallet-gateway-json-rpc/operations/signing-api/subscribetransactions", - "reference/wallet-gateway-json-rpc/operations/signing-api/details" + "reference/wallet-gateway-json-rpc/operations/signing-api/subscribetransactions" ] - }, - "reference/wallet-gateway-json-rpc/operations/details" + } ] }, { @@ -1980,6 +1981,7 @@ { "group": "gRPC API", "pages": [ + "reference/admin-api/protobuf/index", { "group": "Packages", "pages": [ @@ -2308,8 +2310,7 @@ ] } ] - }, - "reference/admin-api/protobuf/index" + } ] } ] diff --git a/docs-main/reference/admin-api/protobuf/index.mdx b/docs-main/reference/admin-api/protobuf/index.mdx index b3d8454b0..2e951a4ce 100644 --- a/docs-main/reference/admin-api/protobuf/index.mdx +++ b/docs-main/reference/admin-api/protobuf/index.mdx @@ -1,271 +1,105 @@ --- -title: "Details and History" +title: "Admin API protobuf details and history" +description: "Generated source details and version history for the Admin API protobuf reference." --- -
+
-
-
+

Details and history

-
- -

openrpc spec

- -

Signing API

-

Details and history

-

Descriptor-backed protobuf API history grouped by package. Operation-first gRPC pages with package-level browsing and recursive related schema sections.

- -
- - Protobuf - - v3.4.11 - -
+

Admin API protobuf details and history

-
-
- - -
- -
-
Source
-
Canton Admin API protobuf trees from published release bundles
-
- -
-
Version filter
-
stable Canton release bundles >= 3.2.0
-
- -
-
Latest release
-
v3.4.11
-
- -
-
Packages
-
11
-
- -
-
Endpoints
-
123
-
- -
-
Messages
-
366
-
- -
- -
- - -## Release Summary +

Generated-source metadata, version coverage, package inventory, and per-release changes for this source stream.

-Counts are shown as added / changed / removed within each release slice. - - - -
- - -
- -
-

3.4.0

- Release - -
- -
- -

Endpoint / message / enum deltas for this release.

- - -
- -
-
Endpoints
-
123 / 0 / 0
-
- -
-
Messages
-
366 / 0 / 0
-
- -
-
Enums
-
10 / 0 / 0
-
- -
- - -
- - - -
- -
-

3.4.2

- -
+ Protobuf - Release + v3.4.11
-
- -

Endpoint / message / enum deltas for this release.

-
-
Endpoints
-
0 / 0 / 0
+
Source stream
+
Admin API protobuf
-
Messages
-
0 / 0 / 0
+
Latest release
+
v3.4.11
-
Enums
-
0 / 0 / 0
+
Versions compared
+
3.4.0, 3.4.2, 3.4.3, 3.4.4, 3.4.5, 3.4.6, 3.4.7, 3.4.8, 3.4.9, 3.4.10, 3.4.11
- -
- - - -
- -
-

3.4.3

- -
- - Release -
-
- -

Endpoint / message / enum deltas for this release.

+## Generated from
-
Endpoints
-
0 / 0 / 0
+
Input family
+
Canton Admin API protobuf trees from published release bundles
-
Messages
-
0 / 0 / 0
+
Version filter
+
stable Canton release bundles >= 3.2.0
-
Enums
-
0 / 0 / 0
-
- -
- - +
Packages
+
11
- - -
- -
-

3.4.4

- -
- - Release - -
- -
- -

Endpoint / message / enum deltas for this release.

- - -
-
Endpoints
-
0 / 0 / 0
+
123
Messages
-
0 / 0 / 0
-
- -
-
Enums
-
0 / 1 / 0
+
366
-
- +
-

3.4.5

- -
- - Release - -
+

Generated reference pages

-

Endpoint / message / enum deltas for this release.

+

Package and operation pages are generated from the latest descriptor snapshot, with history calculated across selected release bundles.

-
Endpoints
-
0 / 0 / 0
-
- -
-
Messages
-
0 / 0 / 0
+
Packages
+
11
-
Enums
-
0 / 0 / 0
+
Operations
+
123
@@ -274,804 +108,444 @@ Counts are shown as added / changed / removed within each release slice.
- -
- -
-

3.4.6

- -
- - Release -
-
- -

Endpoint / message / enum deltas for this release.

- - -
- -
-
Endpoints
-
0 / 0 / 0
-
- -
-
Messages
-
0 / 0 / 0
-
- -
-
Enums
-
0 / 0 / 0
-
-
- - -
- - - -
-
-

3.4.7

- -
- - Release +## Version summary +
+ Active since / added + Changed + Removed + Deprecated
-
- -

Endpoint / message / enum deltas for this release.

- - -
- -
-
Endpoints
-
0 / 0 / 0
-
- -
-
Messages
-
0 / 0 / 0
-
- -
-
Enums
-
0 / 0 / 0
-
- -
- - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VERSIONSTATUSSUMMARY
3.4.0 +
+ + + + 499 added + + +
+
499 added.
3.4.2 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
3.4.3 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
3.4.4 +
+ + + + 1 changed + + +
+
1 changed.
3.4.5 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
3.4.6 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
3.4.7 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
3.4.8 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
3.4.9 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
3.4.10 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
3.4.11 +
+ + + + 1 added + + + + + 2 changed + + +
+
1 added, 2 changed.
+ + + +## Current reference inventory + + +### Published packages + + +These packages are present in the latest selected descriptor snapshot and link to generated package pages. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TYPESTATUSSUMMARY
+ com.digitalasset.canton.admin.participant.v30 + +
+ + + Since 3.4.0 + + +
+
11 services, 69 endpoints, 169 messages, 7 enums
+ com.digitalasset.canton.admin.sequencer.v30 + +
+ + + Since 3.4.0 + + +
+
1 services, 1 endpoints, 12 messages, 1 enums
+ com.digitalasset.canton.admin.mediator.v30 + +
+ + + Since 3.4.0 + + +
+
1 services, 1 endpoints, 3 messages
+ com.digitalasset.canton.admin.health.v30 + +
+ + + Since 3.4.0 + + +
+
1 services, 4 endpoints, 14 messages, 1 enums
+ com.digitalasset.canton.crypto.admin.v30 + +
+ + + Since 3.4.0 + + +
+
1 services, 12 endpoints, 33 messages
+ com.digitalasset.canton.time.admin.v30 + +
+ + + Since 3.4.0 + + +
+
1 services, 2 endpoints, 4 messages
+ com.digitalasset.canton.topology.admin.v30 + +
+ + + Since 3.4.0 + + +
+
4 services, 34 endpoints, 100 messages, 1 enums
+ com.digitalasset.canton.admin + +
+ + + Current + + +
+
0 services, 0 endpoints, 0 messages
+ com.digitalasset.canton.admin.crypto.v30 + +
+ + + Current + + +
+
0 services, 0 endpoints, 1 messages, 1 enums
+ com.digitalasset.canton.admin.pruning.v30 + +
+ + + Current + + +
+
0 services, 0 endpoints, 28 messages
+ com.digitalasset.canton.admin.time.v30 + +
+ + + Current + + +
+
0 services, 0 endpoints, 2 messages
+ + + + + +## Change details + +
+ +
+ 3.4.0 + + Release 3.4.0 + endpoints: 123 added, 0 changed, 0 removed; messages: 366 added, 0 changed, 0 removed; enums: 10 added, 0 changed, 0 removed + +
+ +
+ 3.4.4 + + Release 3.4.4 + enums: 0 added, 1 changed, 0 removed + +
+ +
+ 3.4.11 + + Release 3.4.11 + messages: 0 added, 2 changed, 0 removed; enums: 1 added, 0 changed, 0 removed +
- - -
- -
-

3.4.8

- -
- - Release -
-
- -

Endpoint / message / enum deltas for this release.

- - -
- -
-
Endpoints
-
0 / 0 / 0
-
- -
-
Messages
-
0 / 0 / 0
-
- -
-
Enums
-
0 / 0 / 0
-
- -
- - -
- - -
- -
-

3.4.9

- -
- - Release - -
-
- -

Endpoint / message / enum deltas for this release.

+## Known limits -
+- Change detection is structural and compares selected descriptor images; it does not infer behavioral compatibility. -
-
Endpoints
-
0 / 0 / 0
-
+- Endpoint, message, and enum additions, removals, and structural changes are tracked when they are present in the selected snapshots. -
-
Messages
-
0 / 0 / 0
-
- -
-
Enums
-
0 / 0 / 0
-
- -
- - -
- - - -
- -
-

3.4.10

- -
- - Release - -
- -
- -

Endpoint / message / enum deltas for this release.

- - -
- -
-
Endpoints
-
0 / 0 / 0
-
- -
-
Messages
-
0 / 0 / 0
-
- -
-
Enums
-
0 / 0 / 0
-
- -
- - -
- - - -
- -
-

3.4.11

- -
- - Release - -
- -
- -

Endpoint / message / enum deltas for this release.

- - -
- -
-
Endpoints
-
0 / 0 / 0
-
- -
-
Messages
-
0 / 2 / 0
-
- -
-
Enums
-
1 / 0 / 0
-
- -
- - -
- - -
- - - - - -## Participant Administration - - - - - - - - - - -## Sequencer - - - - - - - - - - -## Mediator - - - - - - - - - - -## Shared Administration - - - - - - - - - - -## Schema Packages - - - - - +- Lifecycle labels and replacement links are included only when the protobuf source or metadata overlay carries that information. diff --git a/docs-main/reference/grpc-ledger-api-reference/details.mdx b/docs-main/reference/grpc-ledger-api-reference/details.mdx index dc98e15de..5ca046b50 100644 --- a/docs-main/reference/grpc-ledger-api-reference/details.mdx +++ b/docs-main/reference/grpc-ledger-api-reference/details.mdx @@ -1,648 +1,407 @@ --- -title: "Details and history" +title: "Ledger API gRPC details and history" +description: "Generated source details and version history for the Ledger API gRPC reference." --- -
+
-
-
+

Details and history

-
- -

openrpc spec

- -

gRPC API

-

Details and history

-

Generated Ledger API gRPC reference grouped by package. Operation-first gRPC pages with package-level browsing and recursive related schema sections.

- -
- - gRPC - - v3.4.11 - -
+

Ledger API gRPC details and history

-
-
- - -
- -
-
Source
-
Canton Ledger API protobuf release bundles
-
- -
-
Version filter
-
stable Canton release bundles >= 3.4.4
-
- -
-
Latest release
-
v3.4.11
-
- -
-
Packages
-
5
-
- -
-
Endpoints
-
56
-
- -
-
Messages
-
229
-
- -
- -
+

Generated-source metadata, version coverage, package inventory, and per-release changes for this source stream.

-## Release Summary +
-Counts are shown as added / changed / removed within each release slice. - + gRPC + v3.4.11 -
- - -
- -
-

3.4.4

- -
- - Release -
-
- -

Endpoint / message / enum deltas for this release.

- - -
- -
-
Endpoints
-
55 / 0 / 0
-
- -
-
Messages
-
227 / 0 / 0
-
- -
-
Enums
-
12 / 0 / 0
-
- -
- - -
- - - -
- -
-

3.4.5

- -
- - Release - -
-
- -

Endpoint / message / enum deltas for this release.

- -
- -
-
Endpoints
-
0 / 0 / 0
-
- -
-
Messages
-
0 / 0 / 0
-
- -
-
Enums
-
0 / 0 / 0
-
- -
- -
- - - -
- -
-

3.4.6

- -
- - Release - -
- -
- -

Endpoint / message / enum deltas for this release.

- - -
-
-
Endpoints
-
0 / 0 / 0
-
- -
-
Messages
-
0 / 0 / 0
-
- -
-
Enums
-
0 / 0 / 0
-
- -
- - +
Source stream
+
Ledger API gRPC
- - - -
- -
-

3.4.7

- -
- - Release - -
-
- -

Endpoint / message / enum deltas for this release.

- - -
- -
-
Endpoints
-
0 / 0 / 0
-
- -
-
Messages
-
0 / 0 / 0
-
-
-
Enums
-
0 / 0 / 0
-
- -
- - +
Latest release
+
v3.4.11
- - - -
- -
-

3.4.8

- -
- - Release - -
-
- -

Endpoint / message / enum deltas for this release.

- - -
-
-
Endpoints
-
0 / 0 / 0
-
- -
-
Messages
-
0 / 0 / 0
+
Versions compared
+
3.4.4, 3.4.5, 3.4.6, 3.4.7, 3.4.8, 3.4.9, 3.4.10, 3.4.11
- -
-
Enums
-
0 / 0 / 0
-
- +
- -
- - - -
- -
-

3.4.9

- -
- - Release -
-
- -

Endpoint / message / enum deltas for this release.

- - -
- -
-
Endpoints
-
0 / 0 / 0
-
- -
-
Messages
-
0 / 0 / 0
-
- -
-
Enums
-
0 / 0 / 0
-
- -
+## Generated from - -
- - - -
- -
-

3.4.10

- -
- - Release - -
-
- -

Endpoint / message / enum deltas for this release.

- -
- -
-
Endpoints
-
0 / 0 / 0
-
- +
-
Messages
-
0 / 1 / 0
+
Input family
+
Canton Ledger API protobuf release bundles
- +
-
Enums
-
0 / 0 / 0
+
Version filter
+
stable Canton release bundles >= 3.4.4
- -
- +
+
Packages
+
5
- - - -
- -
-

3.4.11

- -
- - Release - -
-
- -

Endpoint / message / enum deltas for this release.

- - -
-
Endpoints
-
1 / 0 / 0
+
56
- +
Messages
-
2 / 0 / 0
-
- -
-
Enums
-
0 / 0 / 0
-
- -
- - +
229
- - -
+ +
-## Ledger API +
+
+

Generated reference pages

+
+

Package and operation pages are generated from the latest descriptor snapshot, with history calculated across selected release bundles.

-
- - - - -
-

v2

- -
- - gRPC - -
-
- -

9 services, 20 endpoints, 115 messages, 8 enums

- -
- -
-
Services
-
9
-
- -
-
Endpoints
-
20
-
- +
-
Messages
-
115
+
Packages
+
5
- +
-
Enums
-
8
+
Operations
+
56
- +
- -
- - - - - -
-

v2.admin

- -
- - gRPC - -
-
- -

6 services, 28 endpoints, 78 messages, 3 enums

- - -
- -
-
Services
-
6
- -
-
Endpoints
-
28
-
- -
-
Messages
-
78
-
- -
-
Enums
-
3
-
- -
- -
- - - - - -
-

v2.interactive

- -
- - gRPC - +
-
- -

1 services, 6 endpoints, 28 messages, 1 enums

- - -
- -
-
Services
-
1
-
- -
-
Endpoints
-
6
-
- -
-
Messages
-
28
-
- -
-
Enums
-
1
-
- -
- -
- - - - - -
-

v2.testing

- -
- - gRPC - -
-
- -

1 services, 2 endpoints, 3 messages

- - -
- -
-
Services
-
1
-
- -
-
Endpoints
-
2
-
- -
-
Messages
-
3
-
- -
-
Enums
-
0
-
- -
+## Version summary - -
- - +
+ Active since / added + Changed + Removed + Deprecated
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VERSIONSTATUSSUMMARY
3.4.4 +
+ + + + 294 added + + +
+
294 added.
3.4.5 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
3.4.6 +
+ + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
3.4.7 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
3.4.8 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
3.4.9 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
3.4.10 +
+ + + + 1 changed + + +
+
1 changed.
3.4.11 +
+ + + + 3 added + + +
+
3 added.
+ + + +## Current reference inventory + + +### Published packages + + +These packages are present in the latest selected descriptor snapshot and link to generated package pages. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TYPESTATUSSUMMARY
+ com.daml.ledger.api.v2 + +
+ + + Since 3.4.4 + + + Changed 3.4.11 + +
+
9 services, 20 endpoints, 115 messages, 8 enums
+ com.daml.ledger.api.v2.admin + +
+ + + Since 3.4.4 + + +
+
6 services, 28 endpoints, 78 messages, 3 enums
+ com.daml.ledger.api.v2.interactive + +
+ + + Since 3.4.4 + + +
+
1 services, 6 endpoints, 28 messages, 1 enums
+ com.daml.ledger.api.v2.testing + +
+ + + Since 3.4.4 + + +
+
1 services, 2 endpoints, 3 messages
+ com.daml.ledger.api.v2.interactive.transaction.v1 + +
+ + + Current + +
+
0 services, 0 endpoints, 5 messages
+ + + + + +## Change details + +
+ +
+ 3.4.4 + + Release 3.4.4 + endpoints: 55 added, 0 changed, 0 removed; messages: 227 added, 0 changed, 0 removed; enums: 12 added, 0 changed, 0 removed + +
+ +
+ 3.4.10 + + Release 3.4.10 + messages: 0 added, 1 changed, 0 removed + +
+ +
+ 3.4.11 + + Release 3.4.11 + endpoints: 1 added, 0 changed, 0 removed; messages: 2 added, 0 changed, 0 removed + +
+
-## Schema Packages +## Known limits - +- Lifecycle labels and replacement links are included only when the protobuf source or metadata overlay carries that information. diff --git a/docs-main/reference/java-bindings.mdx b/docs-main/reference/java-bindings.mdx index 60bad8951..7e1e28d72 100644 --- a/docs-main/reference/java-bindings.mdx +++ b/docs-main/reference/java-bindings.mdx @@ -1,27 +1,313 @@ --- title: "Details and history" -description: "Generated lifecycle timeline and reference pages for local Javadoc artifacts" +description: "Generated source details and version history for Java bindings Javadocs." --- -This page is generated from supplied local Javadoc jars. +
-## Source +

Details and history

-- Source name: `Published Java docs snapshots` -- Version filter: `configured bindings artifact versions` -- Artifacts: `1` -- Types: `185` -- Members: `1268` -## Artifacts +

Java Bindings details and history

-| Details | Artifact | Language | Versions | Symbols | Introduced | Deprecated | Removed | -| --- | --- | --- | --- | --- | --- | --- | --- | -| [View](./java) | `com.daml:bindings-java` | `java` | `3.4.8, 3.4.9, 3.4.10, 3.4.11` | `1453` | `2` | `2` | `1` | -## Notes +

Generated-source metadata, version coverage, artifact inventory, and symbol lifecycle changes for this source stream.

+ + +
+ + Javadocs + +
+ + +
+ +
+
Source stream
+
Java Bindings
+
+ +
+
Artifacts
+
1
+
+ +
+
Types
+
185
+
+ +
+
Members
+
1268
+
+ +
+ +
+ +## Generated from + + +
+ +
+
Input family
+
Published Java docs snapshots
+
+ +
+
Version filter
+
configured bindings artifact versions
+
+ +
+
Artifacts
+
1
+
+ +
+
Types
+
185
+
+ +
+
Members
+
1268
+
+ +
+ + +
+ + +
+ +
+

Generated reference pages

+ +
+ +

Artifact, package, and object pages are generated from selected local Javadoc snapshots.

+ + +
+ +
+
Artifacts
+
1
+
+ +
+
Failures
+
0
+
+ +
+ + +
+ + +
+ + + +## Version summary + +
+ Active since / added + Changed + Removed + Deprecated +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VERSIONSTATUSSUMMARY
3.4.8 +
+ + + + 1451 added + + + + + 2 deprecated + + +
+
1451 added, 2 deprecated.
3.4.9 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
3.4.10 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
3.4.11 +
+ + + + 2 added + + + + + 1 removed + + +
+
2 added, 1 removed.
+ + + +## Current reference inventory + + +### Published artifacts + + +These artifacts link to generated package and object reference pages. + + + + + + + + + + + + + + + + + + + + +
TYPESTATUSSUMMARY
+ com.daml:bindings-java + +
+ + + Since 3.4.8 + + +
+
185 types and 1268 members across 4 selected versions.
+ + + + + +## Change details + + + + + +## Known limits + - Input acquisition stays outside x2mdx; this report is built from supplied local Javadoc jars. + - Object statuses must come from per-artifact status manifests unless Java deprecation metadata provides a deprecated fallback. + - Java deprecation metadata is best-effort from deprecated-list.html when present. + + - Removed means the first configured version after the last observed presence. diff --git a/docs-main/reference/json-api-asyncapi-reference/operations/details.mdx b/docs-main/reference/json-api-asyncapi-reference/operations/details.mdx index 4c8eb8020..ccf331bc4 100644 --- a/docs-main/reference/json-api-asyncapi-reference/operations/details.mdx +++ b/docs-main/reference/json-api-asyncapi-reference/operations/details.mdx @@ -1,251 +1,358 @@ --- title: "Details and history" +description: "JSON Ledger API WebSocket AsyncAPI reference and version history." --- -
+
-
-
+

Details and history

-
- -

asyncapi reference

- -

JSON API AsyncAPI Reference

-

Details and history

-

JSON Ledger API WebSocket AsyncAPI reference and version history. Operation-first WebSocket reference pages built from AsyncAPI channel snapshots and lifecycle deltas.

- -
- - AsyncAPI - - v3.5 - -
+

JSON API AsyncAPI Reference details and history

+ + +

Generated-source metadata, version coverage, channel inventory, and per-version changes for this source stream.

+ + +
+ + AsyncAPI + + 3.5 + +
+ -
-
-
- + +
+
Source stream
+
JSON API AsyncAPI Reference
+
+
Publish version
3.5
- +
-
AsyncAPI version
-
2.6.0
+
Versions compared
+
3.4, 3.5
- + +
+ +
+ +## Generated from + + +
+
-
Source
+
Input family
Canton release bundle JSON Ledger API AsyncAPI fixtures
- +
Version filter
configured docs major versions from Canton release bundles
- -
-
+
+
Latest source path
+
canton-release-bundle/json-ledger-api/asyncapi.yaml
+
+
+
AsyncAPI version
+
2.6.0
+
-## Channels + -Use the channel page to choose a specific `publish` or `subscribe` action. Action pages are the primary reference surface. +
+
-
- - - -
-

/v2/commands/completions

+

Generated reference pages

+
-

Subscribe to command completion events.

-
- - WebSocket - - Since 3.4 - - Changed 3.5 - -
- - +

Channel and action pages are generated from the publish-version AsyncAPI document, with history calculated across selected snapshots.

+ +
- +
-
Actions
-
publish, subscribe
+
Channels
+
5
- +
-
Last seen
-
3.5
+
Actions
+
10
- +
- -
- - - - - -
-

/v2/state/active-contracts

-
-

Returns a stream of the snapshot of the active contracts and incomplete (un)assignments at a ledger offset. Once the stream of GetActiveContractsResponses completes, the client...

-
- - WebSocket - - Since 3.4 - - Changed 3.5 - -
- - -
- -
-
Actions
-
publish, subscribe
-
- -
-
Last seen
-
3.5
- -
- -
- - - - - -
-

/v2/updates

-
-

Read the ledger's filtered update stream for the specified contents and filters. It returns the event types in accordance with the stream contents selected. Also the selection c...

-
- - WebSocket - - Since 3.4 - - Changed 3.5 - +
- - + + +## Version summary + +
+ Active since / added + Changed + Removed + Deprecated +
+ + + + + + + + + + + + + + + + + + + + + + + + +
VERSIONSTATUSSUMMARY
3.4 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
3.5 +
+ + + + 5 changed + + +
+
5 changed.
+ + + +## Current reference inventory + + +### Published channels + + +These channels are present in the publish version and link to channel pages for publish and subscribe actions. + +
- +
-
Actions
-
publish, subscribe
+
Channels
+
5
- +
-
Last seen
+
Publish version
3.5
- +
- -
- - - - - -
-

/v2/updates/flats

-
-

Get flat transactions update stream. Provided for backwards compatibility, it will be removed in the Canton version 3.5.0, use v2/updates instead.

-
- - WebSocket - - Since 3.4 - - Changed 3.5 - -
- - -
- -
- - - - - - - -
-

/v2/updates/trees

-
-

Get update transactions tree stream. Provided for backwards compatibility, it will be removed in the Canton version 3.5.0, use v2/updates instead.

-
- - WebSocket - - Since 3.4 - - Changed 3.5 - -
+
+ 3.5 + + Changed /v2/state/active-contracts + channel description updated; publish description updated; publish required fields removed: `eventFormat`; subscribe description updated + +
- - -
- -
-
Actions
-
publish, subscribe
+
+ 3.5 + + Changed /v2/updates + channel description updated; publish description updated; publish required fields added: `beginExclusive`; publish required fields removed: `updateFormat`; subscribe description updated +
- -
-
Last seen
-
3.5
+ +
+ 3.5 + + Changed /v2/updates/flats + publish description updated; publish required fields added: `beginExclusive`; publish required fields removed: `updateFormat`; subscribe description updated + +
+ +
+ 3.5 + + Changed /v2/updates/trees + publish description updated; publish required fields added: `beginExclusive`; publish required fields removed: `updateFormat`; subscribe description updated +
- -
- - - -
+ + + +## Known limits + + +- Change detection is structural and compares selected generated inputs; it does not infer behavioral compatibility. + +- Channel-level additions, removals, and changed message shapes are tracked when they are present in the selected snapshots. + +- Lifecycle labels and replacement links are included only when the source document carries that metadata. diff --git a/docs-main/reference/protobuf/index.mdx b/docs-main/reference/protobuf/index.mdx index dfb92e34b..97e0fff09 100644 --- a/docs-main/reference/protobuf/index.mdx +++ b/docs-main/reference/protobuf/index.mdx @@ -1,813 +1,476 @@ --- -title: "Details and History" +title: "Ledger API protobuf details and history" +description: "Generated source details and version history for the Ledger API protobuf reference." --- -
+
-
-
+

Details and history

-
- -

protobuf reference

- -

Protobuf

-

Details and history

-

Descriptor-backed protobuf API history grouped by package. Operation-first gRPC pages with package-level browsing and recursive related schema sections.

- -
- - Protobuf - - v3.4.11 - -
+

Ledger API protobuf details and history

-
-
- - -
- -
-
Source
-
Canton protobuf trees from published release bundles
-
- -
-
Version filter
-
stable Canton release bundles >= 3.2.0
-
- -
-
Latest release
-
v3.4.11
-
- -
-
Packages
-
6
-
- -
-
Endpoints
-
56
-
- -
-
Messages
-
229
-
- -
- -
+

Generated-source metadata, version coverage, package inventory, and per-release changes for this source stream.

-## Release Summary +
-Counts are shown as added / changed / removed within each release slice. - + Protobuf + v3.4.11 -
- - -
- -
-

3.4.0

- -
- - Release -
-
- -

Endpoint / message / enum deltas for this release.

- - -
- -
-
Endpoints
-
55 / 0 / 0
-
- -
-
Messages
-
227 / 0 / 0
-
- -
-
Enums
-
12 / 0 / 0
-
- -
- - -
- - - -
- -
-

3.4.2

- -
- - Release - -
-
- -

Endpoint / message / enum deltas for this release.

- -
- -
-
Endpoints
-
0 / 0 / 0
-
- -
-
Messages
-
0 / 0 / 0
-
- -
-
Enums
-
0 / 0 / 0
-
- -
- - -
- - - -
- -
-

3.4.3

- -
- - Release - -
-
- -

Endpoint / message / enum deltas for this release.

- - -
-
-
Endpoints
-
0 / 0 / 0
-
- -
-
Messages
-
0 / 0 / 0
+
Source stream
+
Ledger API protobuf
- -
-
Enums
-
0 / 0 / 0
-
- -
- -
- - - -
- -
-

3.4.4

- -
- - Release - -
- -
- -

Endpoint / message / enum deltas for this release.

- - -
- -
-
Endpoints
-
0 / 0 / 0
-
-
-
Messages
-
0 / 1 / 0
-
- -
-
Enums
-
0 / 0 / 0
+
Latest release
+
v3.4.11
- -
- -
- - - -
- -
-

3.4.5

- -
- - Release - -
- -
- -

Endpoint / message / enum deltas for this release.

- - -
- -
-
Endpoints
-
0 / 0 / 0
-
- -
-
Messages
-
0 / 0 / 0
-
-
-
Enums
-
0 / 0 / 0
+
Versions compared
+
3.4.0, 3.4.2, 3.4.3, 3.4.4, 3.4.5, 3.4.6, 3.4.7, 3.4.8, 3.4.9, 3.4.10, 3.4.11
- -
- -
- - - -
- -
-

3.4.6

- -
- - Release - -
- -
- -

Endpoint / message / enum deltas for this release.

- - -
- -
-
Endpoints
-
0 / 0 / 0
-
- -
-
Messages
-
0 / 0 / 0
-
- -
-
Enums
-
0 / 0 / 0
-
-
- -
- - - -
- -
-

3.4.7

- -
- - Release -
-
- -

Endpoint / message / enum deltas for this release.

- - -
- -
-
Endpoints
-
0 / 0 / 0
-
- -
-
Messages
-
0 / 0 / 0
-
- -
-
Enums
-
0 / 0 / 0
-
- -
+## Generated from - -
- - - -
- -
-

3.4.8

- -
- - Release - -
-
- -

Endpoint / message / enum deltas for this release.

- -
- -
-
Endpoints
-
0 / 0 / 0
-
- -
-
Messages
-
0 / 0 / 0
-
- -
-
Enums
-
0 / 0 / 0
-
- -
- - -
- - - -
- -
-

3.4.9

- -
- - Release - -
-
- -

Endpoint / message / enum deltas for this release.

- - -
- -
-
Endpoints
-
0 / 0 / 0
-
-
-
Messages
-
0 / 0 / 0
-
- -
-
Enums
-
0 / 0 / 0
-
- -
- - +
Input family
+
Canton protobuf trees from published release bundles
- - - -
- -
-

3.4.10

- -
- - Release - -
-
- -

Endpoint / message / enum deltas for this release.

- - -
- -
-
Endpoints
-
0 / 0 / 0
-
-
-
Messages
-
0 / 1 / 0
-
- -
-
Enums
-
0 / 0 / 0
+
Version filter
+
stable Canton release bundles >= 3.2.0
- -
- +
+
Packages
+
6
- - - -
- -
-

3.4.11

- -
- - Release - -
-
- -

Endpoint / message / enum deltas for this release.

- - -
-
Endpoints
-
1 / 0 / 0
+
56
- +
Messages
-
2 / 0 / 0
-
- -
-
Enums
-
0 / 0 / 0
-
- -
- - +
229
- - -
- - - + -## Ledger API +
+
- +## Version summary +
+ Active since / added + Changed + Removed + Deprecated +
-## Schema Packages + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VERSIONSTATUSSUMMARY
3.4.0 +
+ + + + 294 added + + +
+
294 added.
3.4.2 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
3.4.3 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
3.4.4 +
+ + + + 1 changed + + +
+
1 changed.
3.4.5 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
3.4.6 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
3.4.7 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
3.4.8 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
3.4.9 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
3.4.10 +
+ + + + 1 changed + + +
+
1 changed.
3.4.11 +
+ + + + 3 added + + +
+
3 added.
+ + + +## Current reference inventory + + +### Published packages + + +These packages are present in the latest selected descriptor snapshot and link to generated package pages. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TYPESTATUSSUMMARY
+ com.daml.ledger.api.v2 + +
+ + + Since 3.4.0 + + + Changed 3.4.11 + +
+
9 services, 20 endpoints, 115 messages, 8 enums
+ com.daml.ledger.api.v2.admin + +
+ + + Since 3.4.0 + + +
+
6 services, 28 endpoints, 78 messages, 3 enums
+ com.daml.ledger.api.v2.interactive + +
+ + + Since 3.4.0 + + +
+
1 services, 6 endpoints, 28 messages, 1 enums
+ com.daml.ledger.api.v2.testing + +
+ + + Since 3.4.0 + + +
+
1 services, 2 endpoints, 3 messages
+ com.daml.ledger.api + +
+ + + Current + + +
+
0 services, 0 endpoints, 0 messages
+ com.daml.ledger.api.v2.interactive.transaction.v1 + +
+ + + Current + + +
+
0 services, 0 endpoints, 5 messages
+ + + + + +## Change details + +
+ +
+ 3.4.0 + + Release 3.4.0 + endpoints: 55 added, 0 changed, 0 removed; messages: 227 added, 0 changed, 0 removed; enums: 12 added, 0 changed, 0 removed + +
+ +
+ 3.4.4 + + Release 3.4.4 + messages: 0 added, 1 changed, 0 removed + +
+ +
+ 3.4.10 + + Release 3.4.10 + messages: 0 added, 1 changed, 0 removed + +
+ +
+ 3.4.11 + + Release 3.4.11 + endpoints: 1 added, 0 changed, 0 removed; messages: 2 added, 0 changed, 0 removed + +
+
- +- Lifecycle labels and replacement links are included only when the protobuf source or metadata overlay carries that information. diff --git a/docs-main/reference/protobuf/packages/com-daml-ledger-api.mdx b/docs-main/reference/protobuf/packages/com-daml-ledger-api.mdx index 5797d439f..c1d2f6ee4 100644 --- a/docs-main/reference/protobuf/packages/com-daml-ledger-api.mdx +++ b/docs-main/reference/protobuf/packages/com-daml-ledger-api.mdx @@ -3,8 +3,6 @@ title: "com.daml.ledger.api" description: "Package-level overview for com.daml.ledger.api." --- -{/* Mintlify rebuild marker: global sidebar footer patch preview validation. */} -

Back to overview

diff --git a/docs-main/reference/typescript-details.mdx b/docs-main/reference/typescript-details.mdx new file mode 100644 index 000000000..680a04365 --- /dev/null +++ b/docs-main/reference/typescript-details.mdx @@ -0,0 +1,949 @@ +--- +title: "@daml/types details and history" +description: "TypeScript and JavaScript language bindings for Canton." +--- + +
+ +

Details and history

+ + +

@daml/types details and history

+ + +

Generated-source metadata, version coverage, export inventory, and per-version changes for this source stream.

+ + +
+ + TypeDoc + + 3.4.11 + +
+ + +
+ +
+
Source stream
+
@daml/types
+
+ +
+
Publish version
+
3.4.11
+
+ +
+
Versions compared
+
3.4.8, 3.4.9, 3.4.10, 3.4.11
+
+ +
+ +
+ +## Generated from + + +
+ +
+
Input family
+
Published @daml/types npm tarballs rendered to local TypeDoc JSON
+
+ +
+
Version filter
+
configured @daml/types npm versions
+
+ +
+
Package
+
@daml/types
+
+ +
+ + +
+ + +
+ +
+

Generated reference page

+ +
+ +

The TypeScript reference page is generated from the publish-version TypeDoc JSON, with history calculated across selected snapshots.

+ + +
+ +
+
Exports
+
40
+
+ +
+ + +
+ + +
+ + + +## Version summary + +
+ Active since / added + Changed + Removed + Deprecated +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
VERSIONSTATUSSUMMARY
3.4.8 +
+ + + + 40 added + + +
+
40 added.
3.4.9 +
+ + + + 3 changed + + +
+
3 changed.
3.4.10 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
3.4.11 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
+ + + +## Current reference inventory + + +### Interfaces + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TYPESTATUSSUMMARY
+ Choice + +
+ + + Since 3.4.8 + + +
+
Interface for objects representing Daml choices.
+ ChoiceFrom + +
+ + + Since 3.4.8 + + +
+
The origin companion that contained a [[Choice]].
+ ContractTypeCompanion + +
+ + + Since 3.4.8 + + + Changed 3.4.9 + +
+
Companion objects for templates and interfaces, containing their choices.
+ FromTemplate + +
+ + + Since 3.4.8 + + +
+
A mixin for [[InterfaceCompanion]]. This supplies the basis for the methods of [[ToInterface]]. Even interfaces that retroactively implement for no templates implement this, because forward implementations still require this marker to work.
+ Map + +
+ + + Since 3.4.8 + + +
+
The counterpart of Daml's ``DA.Map.Map K V`` type. This is an immutable map which compares keys via deep equality. The order of iteration is unspecified; the only guarantee is that the order in ``keys`` and ``values`` match, i.e. ``m.get(k)`` is (deep-, value-based) equal to ``[...m.values()][[...m.keys()].findIndex((l) => _.isEqual(k, l))]``
+ Serializable + +
+ + + Since 3.4.8 + + +
+
Interface for companion objects of serializable types. Its main purpose is to serialize and deserialize values between raw JSON and typed values.
+ Template + +
+ + + Since 3.4.8 + + + Changed 3.4.9 + +
+
Interface for objects representing Daml templates. It is similar to the ``Template`` type class in Daml.
+ ToInterface + +
+ + + Since 3.4.8 + + +
+
A mixin for [[Template]] that provides the ``toInterface`` and ``unsafeFromInterface`` contract ID conversion functions. Even templates that directly implement no interfaces implement this, because this also permits conversion with interfaces that supply retroactive implementations to this template.
+ Unit + +
+ + + Since 3.4.8 + + +
+
The counterpart of Daml's ``()`` type.
+ + +### Type Aliases + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TYPESTATUSSUMMARY
+ Bool + +
+ + + Since 3.4.8 + + +
+
The counterpart of Daml's ``Bool`` type.
+ ContractId + +
+ + + Since 3.4.8 + + +
+
The counterpart of Daml's ``ContractId T`` type. We represent ``ContractId``s as strings. Their exact format of these strings depends on the ledger the Daml application is running on. The purpose of the intersection with ``{ [ContractIdBrand]: T }`` is to prevent accidental use of a ``ContractId<T>`` when a ``ContractId<U>`` is needed (unless ``T`` is a subtype of ``U``). This technique is known as "branding" in the TypeScript community.
+ Date + +
+ + + Since 3.4.8 + + +
+
The counterpart of Daml's ``Date`` type. We represent ``Date``s as strings with format ``YYYY-MM-DD``.
+ Decimal + +
+ + + Since 3.4.8 + + +
+
The counterpart of Daml's ``Decimal`` type. In Daml, Decimal's are the same as Numeric with precision 10.
+ DisclosedContract + +
+ + + Since 3.4.8 + + +
+
A disclosed contract that can be passed on a command submission.
+ Int + +
+ + + Since 3.4.8 + + +
+
The counterpart of Daml's ``Int`` type. We represent ``Int``s as string in order to avoid a loss of precision.
+ Interface + +
+ + + Since 3.4.8 + + +
+
An interface type, for use with contract IDs.
+ InterfaceCompanion + +
+ + + Since 3.4.8 + + +
+
Interface for objects representing Daml interfaces.
+ List + +
+ + + Since 3.4.8 + + +
+
The counterpart of Daml's ``[T]`` list type. We represent lists using arrays.
+ Numeric + +
+ + + Since 3.4.8 + + +
+
The counterpart of Daml's ``Numeric`` type. We represent ``Numeric``s as string in order to avoid a loss of precision. The string must match the regular expression ``-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?``.
+ Optional + +
+ + + Since 3.4.8 + + +
+
The counterpart of Daml's ``Optional T`` type.
+ Party + +
+ + + Since 3.4.8 + + +
+
The counterpart of Daml's ``Party`` type. We represent ``Party``s as strings matching the regular expression ``[A-Za-z0-9:_\- ]+``.
+ TemplateOrInterface + +
+ + + Since 3.4.8 + + + Changed 3.4.9 + +
+
-
+ Text + +
+ + + Since 3.4.8 + + +
+
The counterpart of Daml's ``Text`` type.
+ TextMap + +
+ + + Since 3.4.8 + + +
+
The counterpart of Daml's ``TextMap T`` type. We represent ``TextMap``s as dictionaries.
+ Time + +
+ + + Since 3.4.8 + + +
+
The counterpart of Daml's ``Time`` type. We represent ``Times``s as strings with format ``YYYY-MM-DDThh:mm:ss[.ssssss]Z``.
+ + +### Variables + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TYPESTATUSSUMMARY
+ Bool + +
+ + + Since 3.4.8 + + +
+
Companion object of the [[Bool]] type.
+ Date + +
+ + + Since 3.4.8 + + +
+
Companion object of the [[Date]] type.
+ Decimal + +
+ + + Since 3.4.8 + + +
+
Companion object of the [[Decimal]] type.
+ Int + +
+ + + Since 3.4.8 + + +
+
Companion object of the [[Int]] type.
+ Party + +
+ + + Since 3.4.8 + + +
+
Companion object of the [[Party]] type.
+ Text + +
+ + + Since 3.4.8 + + +
+
Companion object of the [[Text]] type.
+ Time + +
+ + + Since 3.4.8 + + +
+
Companion object of the [[Time]] type.
+ Unit + +
+ + + Since 3.4.8 + + +
+
Companion object of the [[Unit]] type.
+ + +### Functions + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TYPESTATUSSUMMARY
+ ContractId + +
+ + + Since 3.4.8 + + +
+
Companion object of the [[ContractId]] type.
+ emptyMap + +
+ + + Since 3.4.8 + + +
+
-
+ List + +
+ + + Since 3.4.8 + + +
+
Companion object of the [[List]] type.
+ Map + +
+ + + Since 3.4.8 + + +
+
Companion function of the [[GenMap]] type.
+ Numeric + +
+ + + Since 3.4.8 + + +
+
Companion function of the [[Numeric]] type.
+ Optional + +
+ + + Since 3.4.8 + + +
+
Companion function of the [[Optional]] type.
+ TextMap + +
+ + + Since 3.4.8 + + +
+
Companion object of the [[TextMap]] type.
+ + + + + +## Change details + +
+ +
+ 3.4.9 + + Changed ContractTypeCompanion + members added: `templateIdWithPackageId` + +
+ +
+ 3.4.9 + + Changed Template + members added: `templateIdWithPackageId` + +
+ +
+ 3.4.9 + + Changed TemplateOrInterface + signature updated; type parameter renamed: `I` -> `Id` + +
+ +
+ + + +## Known limits + + +- Change detection is structural and compares selected TypeDoc JSON inputs; it does not infer behavioral compatibility. + +- Lifecycle labels and replacement links are included only when parsed from supported TypeDoc metadata. diff --git a/docs-main/reference/wallet-gateway-json-rpc/operations/dapp-api/details.mdx b/docs-main/reference/wallet-gateway-json-rpc/operations/dapp-api/details.mdx index f7cb29809..acd7fa8c7 100644 --- a/docs-main/reference/wallet-gateway-json-rpc/operations/dapp-api/details.mdx +++ b/docs-main/reference/wallet-gateway-json-rpc/operations/dapp-api/details.mdx @@ -1,507 +1,429 @@ --- -title: "Details and history" +title: "Sync dApp API details and history" +description: "Generated source details and version history for the Sync dApp API JSON-RPC reference." --- -
+

Back to Sync dApp API

-
-
+
+

Details and history

-
- -

openrpc spec

- -

Sync dApp API

-

Details and history

-

An OpenRPC specification for the dapp to interact with a Wallet Provider.

- -
- - JSON-RPC - - Since 0.24.0 - -
-
-
- - -
- -
-
Latest source path
-
api-specs/openrpc-dapp-api.json
-
- -
-
Publish version
-
0.25.0
-
- -
-
OpenRPC version
-
1.2.6
-
- -
-
Spec info.version
-
0.5.0
-
- -
- -
+

Sync dApp API details and history

-## Methods +

Generated-source metadata, version coverage, method inventory, and per-version changes for this source stream.

-Method pages are the primary reference surface. This spec page stays focused on grouping and discovery. +
+ JSON-RPC + 0.25.0 -
- - - - -
-

accountsChanged

- -
- - JSON-RPC - Since 0.24.0 - +
-
- - +
- -
-
Parameters
-
0
-
- +
-
Result
-
array[object]
+
Source stream
+
Sync dApp API
- -
- -
- - - - - -
-

connect

- -
- - JSON-RPC - - Since 0.24.0 - -
- -
- -

Ensures ledger connectivity and returns the connected network information along with the session information.

- - -
-
-
Parameters
-
0
+
Publish version
+
0.25.0
- +
-
Result
-
object
+
Versions compared
+
0.24.0, 0.25.0
- +
- -
- - - - - -
-

disconnect

- -
- - JSON-RPC - - Since 0.24.0 -
-
- -

Invoke a disconnect of the wallet provider session.

- - -
- -
-
Parameters
-
0
-
- -
-
Result
-
null
-
- -
+## Generated from - -
- - - - - -
-

getActiveNetwork

- -
- - JSON-RPC - - Since 0.24.0 - -
-
- -

Returns the active network.

- -
- -
-
Parameters
-
0
-
- +
-
Result
-
object
+
Input family
+
splice-wallet-kernel Wallet Gateway OpenRPC specs from wallet-gateway-remote releases
- -
- -
- - - - - -
-

getPrimaryAccount

- -
- - JSON-RPC - - Since 0.24.0 - -
- -
- -

Returns the primary account.

- - -
-
-
Parameters
-
0
+
Version filter
+
@canton-network/wallet-gateway-remote@ GitHub releases
- +
-
Result
-
object
+
Latest source path
+
api-specs/openrpc-dapp-api.json
- -
- -
- - - - - -
-

ledgerApi

- -
- - JSON-RPC - - Since 0.24.0 - -
- -
- -

Proxy for the JSON-API endpoints. Injects authorization headers automatically.

- - -
-
-
Parameters
-
1
+
OpenRPC version
+
1.2.6
- +
-
Result
-
object
+
Spec info.version
+
0.5.0
- +
- -
- - - - - -
-

listAccounts

- -
- - JSON-RPC - - Since 0.24.0 - -
-
- -

Lists the addresses (wallets) with their properties; including which network they are associated to and with signing provider is used.

- - -
- -
-
Parameters
-
0
-
- -
-
Result
-
array[object]
-
- -
+
+ + +
- - - - - - -
-

prepareExecute

- -
- - JSON-RPC - - Since 0.24.0 - -
+

Generated reference pages

- -

Prepares a transaction for subsequent signing & execution.

- - + +

Operation pages are generated from the publish-version OpenRPC document, with history calculated across selected snapshots.

+ +
- + - +
-
Result
-
null
+
Operation pages
+
12
- +
- - - - - - - -
-

prepareExecuteAndWait

- -
- - JSON-RPC - - Since 0.24.0 - -
-
- -

Like prepareExecute, but waits for the transaction to be executed on the ledger.

- - -
- -
-
Parameters
-
1
- -
-
Result
-
object
-
- -
- -
- - - - - -
-

signMessage

- -
- - JSON-RPC - - Since 0.24.0 - +
-
- -

Signs a message.

- - -
- -
-
Parameters
-
1
-
- -
-
Result
-
object
-
- -
- -
- - - - - -
-

status

- -
- - JSON-RPC - - Since 0.24.0 - + +## Version summary + +
+ Active since / added + Changed + Removed + Deprecated
-
- -

Returns the current status of the wallet provider session.

- - + + + + + + + + + + + + + + + + + + + + + + + +
VERSIONSTATUSSUMMARY
0.24.0 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
0.25.0 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
+ + + +## Current reference inventory + + +### Published methods + + +These methods are present in the publish version and link to the generated operation pages. + +
- +
-
Parameters
-
0
+
Methods
+
12
- +
-
Result
-
object
+
Publish version
+
0.25.0
- +
- -
- - - - - -
-

txChanged

- -
- - JSON-RPC - - Since 0.24.0 - -
-
- - -
- -
-
Parameters
-
0
-
- -
-
Result
-
oneOf
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TYPESTATUSSUMMARY
+ accountsChanged + +
+ + + Since 0.24.0 + + +
+
-
+ connect + +
+ + + Since 0.24.0 + + +
+
Ensures ledger connectivity and returns the connected network information along with the session information.
+ disconnect + +
+ + + Since 0.24.0 + + +
+
Invoke a disconnect of the wallet provider session.
+ getActiveNetwork + +
+ + + Since 0.24.0 + + +
+
Returns the active network.
+ getPrimaryAccount + +
+ + + Since 0.24.0 + + +
+
Returns the primary account.
+ ledgerApi + +
+ + + Since 0.24.0 + + +
+
Proxy for the JSON-API endpoints. Injects authorization headers automatically.
+ listAccounts + +
+ + + Since 0.24.0 + + +
+
Lists the addresses (wallets) with their properties; including which network they are associated to and with signing provider is used.
+ prepareExecute + +
+ + + Since 0.24.0 + + +
+
Prepares a transaction for subsequent signing & execution.
+ prepareExecuteAndWait + +
+ + + Since 0.24.0 + + +
+
Like prepareExecute, but waits for the transaction to be executed on the ledger.
+ signMessage + +
+ + + Since 0.24.0 + + +
+
Signs a message.
+ status + +
+ + + Since 0.24.0 + + +
+
Returns the current status of the wallet provider session.
+ txChanged + +
+ + + Since 0.24.0 + + +
+
-
+ + + + + +## Change details + +
+ +
+ 0.24.0 + + Initial selected snapshot + 12 methods were present when this source stream first appears in the selected inputs. +
- -
- -
- -
+ + + +## Known limits + + +- Change detection is structural and compares selected generated inputs; it does not infer behavioral compatibility. + +- Method-level additions, removals, and changed request or result shapes are tracked when they are present in the selected snapshots. + +- Lifecycle labels and replacement links are included only when the source document carries that metadata. diff --git a/docs-main/reference/wallet-gateway-json-rpc/operations/dapp-remote-api/details.mdx b/docs-main/reference/wallet-gateway-json-rpc/operations/dapp-remote-api/details.mdx index 28bcb1ef2..e6a93aeda 100644 --- a/docs-main/reference/wallet-gateway-json-rpc/operations/dapp-remote-api/details.mdx +++ b/docs-main/reference/wallet-gateway-json-rpc/operations/dapp-remote-api/details.mdx @@ -1,539 +1,445 @@ --- -title: "Details and history" +title: "Async dApp API details and history" +description: "Generated source details and version history for the Async dApp API JSON-RPC reference." --- -
+

Back to Async dApp API

-
-
+
+

Details and history

-
- -

openrpc spec

- -

Async dApp API

-

Details and history

-

An OpenRPC specification for remotely hosted Wallet Providers. Due to the remote nature, an implementing provider must bridge certain functionality on the client-side to satisfy the general dApp API spec.

- -
- - JSON-RPC - - Since 0.24.0 - -
-
-
+

Async dApp API details and history

-
- -
-
Latest source path
-
api-specs/openrpc-dapp-remote-api.json
-
- -
-
Publish version
-
0.25.0
-
- -
-
OpenRPC version
-
1.2.6
-
- -
-
Spec info.version
-
0.1.0
-
- -
- -
+

Generated-source metadata, version coverage, method inventory, and per-version changes for this source stream.

-## Methods +
-Method pages are the primary reference surface. This spec page stays focused on grouping and discovery. - + JSON-RPC + 0.25.0 -
- - - - -
-

accountsChanged

- -
- - JSON-RPC - Since 0.24.0 - +
-
- - +
- -
-
Parameters
-
0
-
- +
-
Result
-
array[object]
+
Source stream
+
Async dApp API
- -
- -
- - - - - -
-

connect

- -
- - JSON-RPC - - Since 0.24.0 - -
- -
- -

Ensures ledger connectivity and returns the connected network information.

- - -
-
-
Parameters
-
0
+
Publish version
+
0.25.0
- +
-
Result
-
object
+
Versions compared
+
0.24.0, 0.25.0
- +
- -
- - - - - -
-

connected

- -
- - JSON-RPC - - Since 0.24.0 -
-
- -

Informs when the user connects to a network.

- - -
- -
-
Parameters
-
0
-
- -
-
Result
-
object
-
- -
+## Generated from - -
- - - - - -
-

disconnect

- -
- - JSON-RPC - - Since 0.24.0 - -
-
- -

Invoke a disconnect of the wallet gateway session.

- -
- -
-
Parameters
-
0
-
- +
-
Result
-
null
+
Input family
+
splice-wallet-kernel Wallet Gateway OpenRPC specs from wallet-gateway-remote releases
- -
- - -
- - - - - -
-

getActiveNetwork

- -
- - JSON-RPC - - Since 0.24.0 - -
-
- -

Returns the active network.

- - -
-
-
Parameters
-
0
+
Version filter
+
@canton-network/wallet-gateway-remote@ GitHub releases
- +
-
Result
-
object
+
Latest source path
+
api-specs/openrpc-dapp-remote-api.json
- -
- -
- - - - - -
-

getPrimaryAccount

- -
- - JSON-RPC - - Since 0.24.0 - -
- -
- -

Returns the primary account.

- - -
-
-
Parameters
-
0
+
OpenRPC version
+
1.2.6
- +
-
Result
-
object
+
Spec info.version
+
0.1.0
- +
- -
- - - - - -
-

ledgerApi

- -
- - JSON-RPC - - Since 0.24.0 - -
-
- -

Proxy for the JSON-API endpoints. Injects authorization headers automatically.

- - -
- -
-
Parameters
-
1
-
- -
-
Result
-
object
-
- -
+
- - - - - - - -
-

listAccounts

- -
- - JSON-RPC - - Since 0.24.0 - -
-
- - -
- -
-
Parameters
-
0
-
- -
-
Result
-
array[object]
-
- -
+
- - - - - - -
-

onStatusChanged

- -
- - JSON-RPC - - Since 0.24.0 - -
+

Generated reference pages

- - + +

Operation pages are generated from the publish-version OpenRPC document, with history calculated across selected snapshots.

+ +
- + - +
-
Result
-
object
+
Operation pages
+
13
- +
- - - - - - - -
-

prepareExecute

- -
- - JSON-RPC - - Since 0.24.0 - -
-
- -

Prepares, signs, and executes a transaction.

- - -
- -
-
Parameters
-
1
- -
-
Result
-
object
-
- -
- -
- - - - - -
-

signMessage

- -
- - JSON-RPC - - Since 0.24.0 - +
-
- -

Signs a message.

- - -
- -
-
Parameters
-
1
-
- -
-
Result
-
object
-
- -
- -
- - - - - -
-

status

- -
- - JSON-RPC - - Since 0.24.0 - + +## Version summary + +
+ Active since / added + Changed + Removed + Deprecated
-
- -

Returns the current status of the wallet provider session.

- - + + + + + + + + + + + + + + + + + + + + + + + +
VERSIONSTATUSSUMMARY
0.24.0 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
0.25.0 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
+ + + +## Current reference inventory + + +### Published methods + + +These methods are present in the publish version and link to the generated operation pages. + +
- +
-
Parameters
-
0
+
Methods
+
13
- +
-
Result
-
object
+
Publish version
+
0.25.0
- +
- -
- - - - - -
-

txChanged

- -
- - JSON-RPC - - Since 0.24.0 - -
-
- - -
- -
-
Parameters
-
0
-
- -
-
Result
-
oneOf
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TYPESTATUSSUMMARY
+ accountsChanged + +
+ + + Since 0.24.0 + + +
+
-
+ connect + +
+ + + Since 0.24.0 + + +
+
Ensures ledger connectivity and returns the connected network information.
+ connected + +
+ + + Since 0.24.0 + + +
+
Informs when the user connects to a network.
+ disconnect + +
+ + + Since 0.24.0 + + +
+
Invoke a disconnect of the wallet gateway session.
+ getActiveNetwork + +
+ + + Since 0.24.0 + + +
+
Returns the active network.
+ getPrimaryAccount + +
+ + + Since 0.24.0 + + +
+
Returns the primary account.
+ ledgerApi + +
+ + + Since 0.24.0 + + +
+
Proxy for the JSON-API endpoints. Injects authorization headers automatically.
+ listAccounts + +
+ + + Since 0.24.0 + + +
+
-
+ onStatusChanged + +
+ + + Since 0.24.0 + + +
+
-
+ prepareExecute + +
+ + + Since 0.24.0 + + +
+
Prepares, signs, and executes a transaction.
+ signMessage + +
+ + + Since 0.24.0 + + +
+
Signs a message.
+ status + +
+ + + Since 0.24.0 + + +
+
Returns the current status of the wallet provider session.
+ txChanged + +
+ + + Since 0.24.0 + + +
+
-
+ + + + + +## Change details + +
+ +
+ 0.24.0 + + Initial selected snapshot + 13 methods were present when this source stream first appears in the selected inputs. +
- -
- -
- -
+ + + +## Known limits + + +- Change detection is structural and compares selected generated inputs; it does not infer behavioral compatibility. + +- Method-level additions, removals, and changed request or result shapes are tracked when they are present in the selected snapshots. + +- Lifecycle labels and replacement links are included only when the source document carries that metadata. diff --git a/docs-main/reference/wallet-gateway-json-rpc/operations/signing-api/details.mdx b/docs-main/reference/wallet-gateway-json-rpc/operations/signing-api/details.mdx index 4b23038e0..a0bd1d4f2 100644 --- a/docs-main/reference/wallet-gateway-json-rpc/operations/signing-api/details.mdx +++ b/docs-main/reference/wallet-gateway-json-rpc/operations/signing-api/details.mdx @@ -1,361 +1,365 @@ --- -title: "Details and history" +title: "Signing API details and history" +description: "Generated source details and version history for the Signing API JSON-RPC reference." --- -
+

Back to Signing API

-
-
+
+

Details and history

-
- -

openrpc spec

- -

Signing API

-

Details and history

-

An OpenRPC specification for the Signing API which allows the Wallet Gateway to interact with a Wallet Providers.

- -
- - JSON-RPC - - Since 0.24.0 - -
-
-
- - -
- -
-
Latest source path
-
api-specs/openrpc-signing-api.json
-
- -
-
Publish version
-
0.25.0
-
- -
-
OpenRPC version
-
1.2.6
-
- -
-
Spec info.version
-
0.1.0
-
- -
- -
+

Signing API details and history

-## Methods +

Generated-source metadata, version coverage, method inventory, and per-version changes for this source stream.

-Method pages are the primary reference surface. This spec page stays focused on grouping and discovery. +
+ JSON-RPC + 0.25.0 -
- - - - -
-

createKey

- -
- - JSON-RPC - Since 0.24.0 - +
-
- -

Create a new key at the Wallet Provider.

- - +
- -
-
Parameters
-
1
-
- +
-
Result
-
oneOf
+
Source stream
+
Signing API
- -
- -
- - - - - -
-

getConfiguration

- -
- - JSON-RPC - - Since 0.24.0 - -
- -
- - -
-
-
Parameters
-
0
+
Publish version
+
0.25.0
- +
-
Result
-
object
+
Versions compared
+
0.24.0, 0.25.0
- +
- -
- - - - - -
-

getKeys

- -
- - JSON-RPC - - Since 0.24.0 -
-
- -

Get a list of public keys availabile for signing.

- - +## Generated from + +
- +
-
Parameters
-
0
+
Input family
+
splice-wallet-kernel Wallet Gateway OpenRPC specs from wallet-gateway-remote releases
- +
-
Result
-
oneOf
+
Version filter
+
@canton-network/wallet-gateway-remote@ GitHub releases
- -
- -
- - - - - -
-

getTransaction

- -
- - JSON-RPC - - Since 0.24.0 - -
+
+
Latest source path
+
api-specs/openrpc-signing-api.json
+
-
- -

Get the status of a single transaction by its ID.

- - -
-
-
Parameters
-
1
+
OpenRPC version
+
1.2.6
- +
-
Result
-
oneOf
+
Spec info.version
+
0.1.0
- +
- -
- - - - - + +
+ + +
+
-

getTransactions

- -
- - JSON-RPC - - Since 0.24.0 - -
+

Generated reference pages

- -

Get the status of multiple transactions, filtering by txIds or publicKeys. Either publicKeys or txIds must be provided.

- - + +

Operation pages are generated from the publish-version OpenRPC document, with history calculated across selected snapshots.

+ +
- + - +
-
Result
-
oneOf
+
Operation pages
+
8
- +
- - - - - - - -
-

setConfiguration

- -
- - JSON-RPC - - Since 0.24.0 - -
-
- -

Set configuration parameters for the Wallet Provider. The paramaters will change depending on the Wallet Provider implementation

- - -
- -
-
Parameters
-
1
-
- -
-
Result
-
object
- -
- -
- - - - - -
-

signTransaction

- -
- - JSON-RPC - - Since 0.24.0 - +
-
- -

Uses the Wallet Provider to sign a transaction. This will likely be an asynchronous operation.

- - -
- -
-
Parameters
-
1
-
- -
-
Result
-
oneOf
-
- -
- -
- - - - - -
-

subscribeTransactions

- -
- - JSON-RPC - - Since 0.24.0 - + +## Version summary + +
+ Active since / added + Changed + Removed + Deprecated
-
- -

Subscribe to updates for specific transactions. The server will emit updates when the status of the specified transactions have changed. On initial subscription, the s...

- - + + + + + + + + + + + + + + + + + + + + + + + +
VERSIONSTATUSSUMMARY
0.24.0 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
0.25.0 +
+ + + + 0 surface changes + + +
+
No surface changes detected in the selected inputs.
+ + + +## Current reference inventory + + +### Published methods + + +These methods are present in the publish version and link to the generated operation pages. + +
- +
-
Parameters
-
1
+
Methods
+
8
- +
-
Result
-
object
+
Publish version
+
0.25.0
- +
- -
- - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TYPESTATUSSUMMARY
+ createKey + +
+ + + Since 0.24.0 + + +
+
Create a new key at the Wallet Provider.
+ getConfiguration + +
+ + + Since 0.24.0 + + +
+
-
+ getKeys + +
+ + + Since 0.24.0 + + +
+
Get a list of public keys availabile for signing.
+ getTransaction + +
+ + + Since 0.24.0 + + +
+
Get the status of a single transaction by its ID.
+ getTransactions + +
+ + + Since 0.24.0 + + +
+
Get the status of multiple transactions, filtering by txIds or publicKeys. Either publicKeys or txIds must be provided.
+ setConfiguration + +
+ + + Since 0.24.0 + + +
+
Set configuration parameters for the Wallet Provider. The paramaters will change depending on the Wallet Provider implementation
+ signTransaction + +
+ + + Since 0.24.0 + + +
+
Uses the Wallet Provider to sign a transaction. This will likely be an asynchronous operation.
+ subscribeTransactions + +
+ + + Since 0.24.0 + + +
+
Subscribe to updates for specific transactions. The server will emit updates when the status of the specified transactions have changed. On initial...
+ + + + + +## Change details + +
+ +
+ 0.24.0 + + Initial selected snapshot + 8 methods were present when this source stream first appears in the selected inputs. + +
+
+ + + +## Known limits + + +- Change detection is structural and compares selected generated inputs; it does not infer behavioral compatibility. + +- Method-level additions, removals, and changed request or result shapes are tracked when they are present in the selected snapshots. + +- Lifecycle labels and replacement links are included only when the source document carries that metadata. diff --git a/docs-main/reference/wallet-gateway-json-rpc/operations/user-api/details.mdx b/docs-main/reference/wallet-gateway-json-rpc/operations/user-api/details.mdx index 2d5c2fad2..1e883b161 100644 --- a/docs-main/reference/wallet-gateway-json-rpc/operations/user-api/details.mdx +++ b/docs-main/reference/wallet-gateway-json-rpc/operations/user-api/details.mdx @@ -1,871 +1,589 @@ --- -title: "Details and history" +title: "User API details and history" +description: "Generated source details and version history for the User API JSON-RPC reference." --- -
+

Back to User API

-
-
+
+

Details and history

-
- -

openrpc spec

- -

User API

-

Details and history

-

An OpenRPC specification for the user to interact with the Wallet Gateway.

- -
- - JSON-RPC - - Since 0.24.0 - -
-
-
+

User API details and history

- -
- -
-
Latest source path
-
api-specs/openrpc-user-api.json
-
- -
-
Publish version
-
0.25.0
-
- -
-
OpenRPC version
-
1.2.6
-
- -
-
Spec info.version
-
0.1.0
-
- -
- -
+

Generated-source metadata, version coverage, method inventory, and per-version changes for this source stream.

-## Methods +
-Method pages are the primary reference surface. This spec page stays focused on grouping and discovery. - + JSON-RPC + 0.25.0 -
- - - - -
-

addIdp

- -
- - JSON-RPC - Since 0.24.0 - +
-
- -

Adds a new identity provider.

- - +
- -
-
Parameters
-
1
-
- +
-
Result
-
null
+
Source stream
+
User API
- -
- -
- - - - - -
-

addNetwork

- -
- - JSON-RPC - - Since 0.24.0 - -
- -
- -

Adds a new network configuration (similar to EIP-3085).

- - -
-
-
Parameters
-
1
+
Publish version
+
0.25.0
- +
-
Result
-
null
+
Versions compared
+
0.24.0, 0.25.0
- +
- -
- - - - - -
-

addSession

- -
- - JSON-RPC - - Since 0.24.0 -
-
- -

Adds a network session.

- - -
- -
-
Parameters
-
1
-
- -
-
Result
-
object
-
- -
+## Generated from - -
- - - - - -
-

allocatePartyForWallet

- -
- - JSON-RPC - - Since 0.24.0 - -
-
- -

Allocates a party for an already initialized wallet if external signing is complete.

- -
- -
-
Parameters
-
1
-
- +
-
Result
-
object
+
Input family
+
splice-wallet-kernel Wallet Gateway OpenRPC specs from wallet-gateway-remote releases
- -
- -
- - - - - -
-

createWallet

- -
- - JSON-RPC - - Since 0.24.0 - -
- -
- -

Creates a new wallet and party with the given hint.

- - -
-
-
Parameters
-
1
+
Version filter
+
@canton-network/wallet-gateway-remote@ GitHub releases
- +
-
Result
-
object
+
Latest source path
+
api-specs/openrpc-user-api.json
- -
- - -
- - - - - -
-

deleteTransaction

- -
- - JSON-RPC - - Since 0.24.0 - -
-
- -

Deletes a pending transaction. Only transactions with status 'pending' can be deleted.

- - -
-
-
Parameters
-
1
+
OpenRPC version
+
1.2.6
- +
-
Result
-
null
+
Spec info.version
+
0.1.0
- +
- -
- - - - - -
-

execute

- -
- - JSON-RPC - - Since 0.24.0 - -
-
- -

Executes a signed transaction.

- - -
- -
-
Parameters
-
1
-
- -
-
Result
-
object
-
- -
+
- - - - - - - -
-

getTransaction

- -
- - JSON-RPC - - Since 0.24.0 - -
-
- - -
- -
-
Parameters
-
1
-
- -
-
Result
-
object
-
- -
+
- - - - - - -
-

getUser

- -
- - JSON-RPC - - Since 0.24.0 - -
+

Generated reference pages

- -

Returns information about the current user, including whether they are an admin.

- - -
- -
-
Parameters
-
0
-
- -
-
Result
-
object
-
- -
- -
- - - - - -
-

isWalletSyncNeeded

- -
- - JSON-RPC - - Since 0.24.0 - -
+

Operation pages are generated from the publish-version OpenRPC document, with history calculated across selected snapshots.

+ -
- -

Checks if wallet sync is needed (disabled wallets or new parties on ledger).

- -
- + - +
-
Result
-
object
+
Operation pages
+
22
- +
- - - - - - - -
-

listIdps

- -
- - JSON-RPC - - Since 0.24.0 - -
-
- - -
- -
-
Parameters
-
0
-
- -
-
Result
-
object
- -
- -
- - - - - -
-

listNetworks

- -
- - JSON-RPC - - Since 0.24.0 - +
-
- - -
- -
-
Parameters
-
0
-
- -
-
Result
-
object
-
- -
- -
- - - - - -
-

listSessions

- -
- - JSON-RPC - - Since 0.24.0 - -
-
- - -
- -
-
Parameters
-
0
-
- -
-
Result
-
object
-
- -
+## Version summary - -
- - - - - -
-

listTransactions

- -
- - JSON-RPC - - Since 0.24.0 - +
+ Active since / added + Changed + Removed + Deprecated
-
- - -
- -
-
Parameters
-
0
-
- -
-
Result
-
object
-
- -
+ + + + + + + + + - - - - - - - -
-

listWallets

- -
- - JSON-RPC - - Since 0.24.0 - -
+
+ + + + - - -

Removes an identity provider. Fails if an existing network is using the identity provider.

- - -
- -
-
Parameters
-
1
-
- -
-
Result
-
null
-
- -
+
+ + + + - - - - - - - -
-

removeSession

- -
- - JSON-RPC - - Since 0.24.0 - -
+
+
VERSIONSTATUSSUMMARY
0.24.0 +
-
- -

Lists wallets.

- - -
- -
-
Parameters
-
1
-
- -
-
Result
-
array[object]
-
- -
+ + + 0 surface changes + - - - - - - - -
-

removeIdp

- -
- - JSON-RPC - - Since 0.24.0 - -
+
+
No surface changes detected in the selected inputs.
0.25.0 + + No surface changes detected in the selected inputs.
-
- -

Removes the current network session.

- - -
- -
-
Parameters
-
0
-
- -
-
Result
-
null
-
- -
- -
- - - - - -
-

removeWallet

- -
- - JSON-RPC - - Since 0.24.0 - -
-
- -

Removes a party with the given hint.

- - -
- -
-
Parameters
-
1
-
- -
-
Result
-
object
-
- -
+## Current reference inventory - -
- - - - - -
-

setPrimaryWallet

- -
- - JSON-RPC - - Since 0.24.0 - -
-
- -

Sets the specified wallet as the primary wallet for dApp usage.

- - -
- -
-
Parameters
-
1
-
- -
-
Result
-
null
-
- -
+### Published methods + + +These methods are present in the publish version and link to the generated operation pages. - -
- - - - - -
-

sign

- -
- - JSON-RPC - - Since 0.24.0 - -
-
- -

Signs the provided data with the private key of the specified or active party.

- -
- +
-
Parameters
-
1
+
Methods
+
22
- +
-
Result
-
oneOf
+
Publish version
+
0.25.0
- +
- -
- - - - - -
-

syncWallets

- -
- - JSON-RPC - - Since 0.24.0 - -
-
- -

Synchronizes wallets with the connected network.

- - -
- -
-
Parameters
-
0
-
- -
-
Result
-
object
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TYPESTATUSSUMMARY
+ addIdp + +
+ + + Since 0.24.0 + + +
+
Adds a new identity provider.
+ addNetwork + +
+ + + Since 0.24.0 + + +
+
Adds a new network configuration (similar to EIP-3085).
+ addSession + +
+ + + Since 0.24.0 + + +
+
Adds a network session.
+ allocatePartyForWallet + +
+ + + Since 0.24.0 + + +
+
Allocates a party for an already initialized wallet if external signing is complete.
+ createWallet + +
+ + + Since 0.24.0 + + +
+
Creates a new wallet and party with the given hint.
+ deleteTransaction + +
+ + + Since 0.24.0 + + +
+
Deletes a pending transaction. Only transactions with status 'pending' can be deleted.
+ execute + +
+ + + Since 0.24.0 + + +
+
Executes a signed transaction.
+ getTransaction + +
+ + + Since 0.24.0 + + +
+
-
+ getUser + +
+ + + Since 0.24.0 + + +
+
Returns information about the current user, including whether they are an admin.
+ isWalletSyncNeeded + +
+ + + Since 0.24.0 + + +
+
Checks if wallet sync is needed (disabled wallets or new parties on ledger).
+ listIdps + +
+ + + Since 0.24.0 + + +
+
-
+ listNetworks + +
+ + + Since 0.24.0 + + +
+
-
+ listSessions + +
+ + + Since 0.24.0 + + +
+
-
+ listTransactions + +
+ + + Since 0.24.0 + + +
+
-
+ listWallets + +
+ + + Since 0.24.0 + + +
+
Lists wallets.
+ removeIdp + +
+ + + Since 0.24.0 + + +
+
Removes an identity provider. Fails if an existing network is using the identity provider.
+ removeNetwork + +
+ + + Since 0.24.0 + + +
+
Removes a new network configuration (similar to EIP-3085).
+ removeSession + +
+ + + Since 0.24.0 + + +
+
Removes the current network session.
+ removeWallet + +
+ + + Since 0.24.0 + + +
+
Removes a party with the given hint.
+ setPrimaryWallet + +
+ + + Since 0.24.0 + + +
+
Sets the specified wallet as the primary wallet for dApp usage.
+ sign + +
+ + + Since 0.24.0 + + +
+
Signs the provided data with the private key of the specified or active party.
+ syncWallets + +
+ + + Since 0.24.0 + + +
+
Synchronizes wallets with the connected network.
+ + + + + +## Change details + +
+ +
+ 0.24.0 + + Initial selected snapshot + 22 methods were present when this source stream first appears in the selected inputs. +
- -
- -
- -
+ + + +## Known limits + + +- Change detection is structural and compares selected generated inputs; it does not infer behavioral compatibility. + +- Method-level additions, removals, and changed request or result shapes are tracked when they are present in the selected snapshots. + +- Lifecycle labels and replacement links are included only when the source document carries that metadata. diff --git a/docs-main/styles.css b/docs-main/styles.css index 81502eed8..c57147bb6 100644 --- a/docs-main/styles.css +++ b/docs-main/styles.css @@ -752,6 +752,190 @@ body:has(.x2mdx-ref-page--operation) [aria-label="Table of contents"] { color: rgb(185, 28, 28); } +.x2mdx-ref-status-legend { + display: flex; + flex-wrap: wrap; + gap: 1rem; + margin: 0.65rem 0 0.75rem; + color: rgb(31, 41, 55); + font-size: 0.86rem; +} + +.x2mdx-ref-status-legend span, +.x2mdx-ref-status-item { + display: inline-flex; + align-items: center; + gap: 0.5rem; +} + +.x2mdx-ref-status-table { + width: min(100%, 40rem); + margin: 0 0 1.2rem; + border-collapse: separate; + border-spacing: 0; + overflow: hidden; + border: 1px solid rgba(15, 23, 42, 0.08); + border-radius: 0.3rem; + font-size: 0.88rem; +} + +.x2mdx-ref-status-table--inventory { + width: min(100%, 54rem); +} + +.x2mdx-ref-status-table th, +.x2mdx-ref-status-table td { + height: 3.5rem; + padding: 0.55rem 1rem; + border-bottom: 1px solid rgba(15, 23, 42, 0.07); + vertical-align: middle; +} + +.x2mdx-ref-status-table tr:last-child th, +.x2mdx-ref-status-table tr:last-child td { + border-bottom: 0; +} + +.x2mdx-ref-status-table thead th { + height: 2.5rem; + background: rgba(255, 255, 255, 0.82); + color: rgb(104, 78, 255); + font-size: 0.72rem; + font-weight: 700; + letter-spacing: 0; + text-align: left; + text-transform: uppercase; +} + +.x2mdx-ref-status-table tbody th { + width: 16.6rem; + font-weight: 600; + white-space: nowrap; +} + +.x2mdx-ref-status-table tbody th a { + color: inherit; + text-decoration: none; +} + +.x2mdx-ref-status-table tbody th a:hover { + color: var(--canton-highlight); +} + +.x2mdx-ref-status-table tbody td:last-child { + color: rgb(31, 41, 55); +} + +.x2mdx-ref-status-cell { + display: flex; + flex-wrap: wrap; + gap: 0.5rem; +} + +.x2mdx-ref-status-item { + white-space: nowrap; +} + +.x2mdx-ref-status-chip { + display: inline-flex; + align-items: center; + min-height: 1.25rem; + padding: 0.08rem 0.38rem; + border-radius: 999px; + background: rgba(107, 114, 128, 0.1); + color: rgb(75, 85, 99); + font-size: 0.68rem; + font-weight: 650; + line-height: 1.1; +} + +.x2mdx-ref-status-chip--added { + background: rgba(22, 163, 74, 0.1); + color: rgb(21, 128, 61); +} + +.x2mdx-ref-status-chip--changed { + background: rgba(250, 180, 40, 0.16); + color: rgb(146, 96, 0); +} + +.x2mdx-ref-status-chip--removed { + background: rgba(220, 38, 38, 0.1); + color: rgb(185, 28, 28); +} + +.x2mdx-ref-status-dot { + display: inline-block; + width: 0.5rem; + height: 0.5rem; + flex: 0 0 auto; + border-radius: 999px; + background: rgb(107, 114, 128); +} + +.x2mdx-ref-status-dot--added { + background: rgb(72, 201, 61); +} + +.x2mdx-ref-status-dot--changed, +.x2mdx-ref-status-dot--deprecated, +.x2mdx-ref-status-dot--replaced { + background: rgb(250, 180, 40); +} + +.x2mdx-ref-status-dot--removed { + background: rgb(226, 73, 69); +} + +:root.dark .x2mdx-ref-status-legend, +[data-theme="dark"] .x2mdx-ref-status-legend, +:root.dark .x2mdx-ref-status-table tbody td:last-child, +[data-theme="dark"] .x2mdx-ref-status-table tbody td:last-child { + color: rgb(229, 231, 235); +} + +:root.dark .x2mdx-ref-status-table, +[data-theme="dark"] .x2mdx-ref-status-table { + border-color: rgba(148, 163, 184, 0.16); +} + +:root.dark .x2mdx-ref-status-table th, +:root.dark .x2mdx-ref-status-table td, +[data-theme="dark"] .x2mdx-ref-status-table th, +[data-theme="dark"] .x2mdx-ref-status-table td { + border-bottom-color: rgba(148, 163, 184, 0.14); +} + +:root.dark .x2mdx-ref-status-table thead th, +[data-theme="dark"] .x2mdx-ref-status-table thead th { + background: rgba(15, 23, 42, 0.54); + color: rgb(167, 139, 250); +} + +:root.dark .x2mdx-ref-status-chip, +[data-theme="dark"] .x2mdx-ref-status-chip { + background: rgba(156, 163, 175, 0.14); + color: rgb(229, 231, 235); +} + +:root.dark .x2mdx-ref-status-chip--added, +[data-theme="dark"] .x2mdx-ref-status-chip--added { + background: rgba(34, 197, 94, 0.14); + color: rgb(134, 239, 172); +} + +:root.dark .x2mdx-ref-status-chip--changed, +[data-theme="dark"] .x2mdx-ref-status-chip--changed { + background: rgba(250, 180, 40, 0.18); + color: rgb(253, 224, 71); +} + +:root.dark .x2mdx-ref-status-chip--removed, +[data-theme="dark"] .x2mdx-ref-status-chip--removed { + background: rgba(248, 113, 113, 0.14); + color: rgb(252, 165, 165); +} + .x2mdx-ref-meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); diff --git a/scripts/generate_all_reference_docs.py b/scripts/generate_all_reference_docs.py index 00534cc55..ae69f3e17 100644 --- a/scripts/generate_all_reference_docs.py +++ b/scripts/generate_all_reference_docs.py @@ -142,17 +142,23 @@ def dropdown_pages(docs: dict[str, Any], *, dropdown_label: str) -> list[Any]: if not isinstance(navigation, dict): raise ValueError(f"docs.json missing navigation object: {DOCS_JSON_PATH}") dropdowns = navigation.get("dropdowns") - if not isinstance(dropdowns, list): - raise ValueError(f"docs.json navigation.dropdowns must be a list: {DOCS_JSON_PATH}") - dropdown = next( - (item for item in dropdowns if isinstance(item, dict) and item.get("dropdown") == dropdown_label), - None, - ) - if dropdown is None: - raise ValueError(f"Dropdown not found in docs.json: {dropdown_label}") - pages = dropdown.get("pages") + nav_section = None + if isinstance(dropdowns, list): + nav_section = next( + (item for item in dropdowns if isinstance(item, dict) and item.get("dropdown") == dropdown_label), + None, + ) + products = navigation.get("products") + if nav_section is None and isinstance(products, list): + nav_section = next( + (item for item in products if isinstance(item, dict) and item.get("product") == dropdown_label), + None, + ) + if nav_section is None: + raise ValueError(f"Navigation section not found in docs.json: {dropdown_label}") + pages = nav_section.get("pages") if not isinstance(pages, list): - raise ValueError(f"Dropdown does not expose a pages list: {dropdown_label}") + raise ValueError(f"Navigation section does not expose a pages list: {dropdown_label}") return pages diff --git a/scripts/generate_canton_protobuf_history.py b/scripts/generate_canton_protobuf_history.py index c2e50465d..a75d581ae 100644 --- a/scripts/generate_canton_protobuf_history.py +++ b/scripts/generate_canton_protobuf_history.py @@ -406,24 +406,33 @@ def update_docs_navigation( navigation = docs.get("navigation") if not isinstance(navigation, dict): raise ValueError(f"docs.json navigation must be an object: {docs_json_path}") + nav_section = None dropdowns = navigation.get("dropdowns") - if not isinstance(dropdowns, list): - raise ValueError(f"docs.json navigation.dropdowns must be a list: {docs_json_path}") - dropdown = next((item for item in dropdowns if isinstance(item, dict) and item.get("dropdown") == dropdown_label), None) - if dropdown is None: - raise ValueError(f"Dropdown not found in docs.json: {dropdown_label}") - pages = dropdown.get("pages") + if isinstance(dropdowns, list): + nav_section = next( + (item for item in dropdowns if isinstance(item, dict) and item.get("dropdown") == dropdown_label), + None, + ) + products = navigation.get("products") + if nav_section is None and isinstance(products, list): + nav_section = next( + (item for item in products if isinstance(item, dict) and item.get("product") == dropdown_label), + None, + ) + if nav_section is None: + raise ValueError(f"Navigation section not found in docs.json: {dropdown_label}") + pages = nav_section.get("pages") if not isinstance(pages, list): - raise ValueError(f"Dropdown does not expose a pages list: {dropdown_label}") + raise ValueError(f"Navigation section does not expose a pages list: {dropdown_label}") page_ref = docs_json_page_ref(output_dir / "index.mdx", docs_json_path) legacy_page_ref = docs_json_page_ref(legacy_overview_path, docs_json_path) - dropdown["pages"] = prune_nav_items( + nav_section["pages"] = prune_nav_items( pages, page_refs={page_ref, legacy_page_ref}, group_labels=reference_nav.PROTOBUF_GROUP_ALIASES, ) - target_pages = ensure_group_path(dropdown["pages"], parent_groups) + target_pages = ensure_group_path(nav_section["pages"], parent_groups) target_pages.append({"group": GROUP_LABEL, "pages": [page_ref, legacy_page_ref]}) docs_json_path.write_text(json.dumps(docs, indent=2) + "\n", encoding="utf-8") print(f"Updated docs navigation: {docs_json_path}") @@ -453,15 +462,24 @@ def update_split_protobuf_navigation( navigation = docs.get("navigation") if not isinstance(navigation, dict): raise ValueError(f"docs.json navigation must be an object: {docs_json_path}") + nav_section = None dropdowns = navigation.get("dropdowns") - if not isinstance(dropdowns, list): - raise ValueError(f"docs.json navigation.dropdowns must be a list: {docs_json_path}") - dropdown = next((item for item in dropdowns if isinstance(item, dict) and item.get("dropdown") == dropdown_label), None) - if dropdown is None: - raise ValueError(f"Dropdown not found in docs.json: {dropdown_label}") - pages = dropdown.get("pages") + if isinstance(dropdowns, list): + nav_section = next( + (item for item in dropdowns if isinstance(item, dict) and item.get("dropdown") == dropdown_label), + None, + ) + products = navigation.get("products") + if nav_section is None and isinstance(products, list): + nav_section = next( + (item for item in products if isinstance(item, dict) and item.get("product") == dropdown_label), + None, + ) + if nav_section is None: + raise ValueError(f"Navigation section not found in docs.json: {dropdown_label}") + pages = nav_section.get("pages") if not isinstance(pages, list): - raise ValueError(f"Dropdown does not expose a pages list: {dropdown_label}") + raise ValueError(f"Navigation section does not expose a pages list: {dropdown_label}") stale_refs = { docs_json_page_ref(ledger_output_dir / "index.mdx", docs_json_path), @@ -469,7 +487,7 @@ def update_split_protobuf_navigation( } if admin_output_dir is not None: stale_refs.add(docs_json_page_ref(admin_output_dir / "index.mdx", docs_json_path)) - dropdown["pages"] = prune_nav_items( + nav_section["pages"] = prune_nav_items( pages, page_refs=stale_refs, group_labels=reference_nav.PROTOBUF_GROUP_ALIASES, @@ -481,7 +499,7 @@ def update_split_protobuf_navigation( group_label=reference_nav.PROTOBUF_GROUP, ) replace_group_at_path( - dropdown["pages"], + nav_section["pages"], [reference_nav.LEDGER_API_PARENT_GROUP], ledger_group, ) @@ -495,13 +513,13 @@ def update_split_protobuf_navigation( include_details_page=False, )["pages"] replace_group_at_path( - dropdown["pages"], + nav_section["pages"], [reference_nav.ADMIN_API_PARENT_GROUP], { "group": reference_nav.GRPC_GROUP, "pages": [ - *admin_protobuf_group_pages, admin_details_page_ref, + *admin_protobuf_group_pages, ], }, ) @@ -615,6 +633,8 @@ def render_protobuf_reference( output_dir: Path, source_name: str, version_filter: str, + page_title: str, + page_description: str, ) -> int: command = repo_direnv_command( REPO_ROOT, @@ -629,6 +649,10 @@ def render_protobuf_reference( source_name, "--version-filter", version_filter, + "--page-title", + page_title, + "--page-description", + page_description, ) print("Running:", " ".join(command)) completed = subprocess.run(command, cwd=REPO_ROOT) @@ -694,6 +718,8 @@ def main() -> int: output_dir=Path(args.output_dir).resolve(), source_name=args.source_name, version_filter=version_filter, + page_title="Ledger API protobuf", + page_description="Generated source details and version history for the Ledger API protobuf reference.", ) if result != 0: return result @@ -731,6 +757,8 @@ def main() -> int: output_dir=admin_output_dir, source_name=admin_source_name, version_filter=version_filter, + page_title="Admin API protobuf", + page_description="Generated source details and version history for the Admin API protobuf reference.", ) if result != 0: return result diff --git a/scripts/generate_daml_standard_library_reference.py b/scripts/generate_daml_standard_library_reference.py index ba04d4136..73530882b 100644 --- a/scripts/generate_daml_standard_library_reference.py +++ b/scripts/generate_daml_standard_library_reference.py @@ -229,15 +229,19 @@ def update_docs_navigation( output_dir: Path, ) -> Path: docs = load_json(docs_json_path) - dropdowns = docs.get("navigation", {}).get("dropdowns") - if not isinstance(dropdowns, list): - raise ValueError(f"docs.json navigation.dropdowns must be a list: {docs_json_path}") - dropdown = next((item for item in dropdowns if isinstance(item, dict) and item.get("dropdown") == dropdown_label), None) - if dropdown is None: - raise ValueError(f"Dropdown not found in docs.json: {dropdown_label}") - pages = dropdown.get("pages") + navigation = docs.get("navigation", {}) + nav_section = None + dropdowns = navigation.get("dropdowns") if isinstance(navigation, dict) else None + if isinstance(dropdowns, list): + nav_section = next((item for item in dropdowns if isinstance(item, dict) and item.get("dropdown") == dropdown_label), None) + products = navigation.get("products") if isinstance(navigation, dict) else None + if nav_section is None and isinstance(products, list): + nav_section = next((item for item in products if isinstance(item, dict) and item.get("product") == dropdown_label), None) + if nav_section is None: + raise ValueError(f"Navigation section not found in docs.json: {dropdown_label}") + pages = nav_section.get("pages") if not isinstance(pages, list): - raise ValueError(f"Dropdown does not expose a pages list: {dropdown_label}") + raise ValueError(f"Navigation section does not expose a pages list: {dropdown_label}") page_entries: list[tuple[str, str, Path]] = [] for page in sorted(output_dir.glob("*.mdx")): @@ -247,17 +251,17 @@ def update_docs_navigation( page_refs = {page_ref for _title, page_ref, _path in page_entries} existing_group_index = find_group_index(find_group_path(pages, parent_groups), GROUP_LABEL) - dropdown["pages"] = prune_nav_items(pages, page_refs=page_refs, group_labels={GROUP_LABEL}) - target_pages = ensure_group_path(dropdown["pages"], parent_groups) + nav_section["pages"] = prune_nav_items(pages, page_refs=page_refs, group_labels={GROUP_LABEL}) + target_pages = ensure_group_path(nav_section["pages"], parent_groups) overview_entry = next(((page_ref, path) for _title, page_ref, path in page_entries if path.name == "index.mdx"), None) module_refs = [page_ref for _title, page_ref, path in page_entries if path.name != "index.mdx"] group_pages: list[Any] = [] - if module_refs: - group_pages.append({"group": MODULES_GROUP_LABEL, "pages": module_refs}) if overview_entry is not None: overview_ref, overview_path = overview_entry set_mdx_title(overview_path, DETAILS_AND_HISTORY_LABEL) group_pages.append(overview_ref) + if module_refs: + group_pages.append({"group": MODULES_GROUP_LABEL, "pages": module_refs}) group = { "group": GROUP_LABEL, "pages": group_pages, diff --git a/scripts/generate_grpc_ledger_api_reference.py b/scripts/generate_grpc_ledger_api_reference.py index 05fec4c81..662a4fa77 100644 --- a/scripts/generate_grpc_ledger_api_reference.py +++ b/scripts/generate_grpc_ledger_api_reference.py @@ -505,9 +505,9 @@ def build_nav_group( package_groups.append({"group": mdx_title(package_page), "pages": package_pages}) pages: list[Any] = [] + pages.append(details_ref) if package_groups: pages.append({"group": "Packages", "pages": package_groups}) - pages.append(details_ref) return {"group": GROUP_LABEL, "pages": pages}, refs @@ -533,27 +533,30 @@ def update_docs_navigation( navigation = docs.get("navigation") if not isinstance(navigation, dict): raise ValueError(f"docs.json navigation must be an object: {docs_json_path}") + nav_section = None dropdowns = navigation.get("dropdowns") - if not isinstance(dropdowns, list): - raise ValueError(f"docs.json navigation.dropdowns must be a list: {docs_json_path}") - dropdown = next((item for item in dropdowns if isinstance(item, dict) and item.get("dropdown") == dropdown_label), None) - if dropdown is None: - raise ValueError(f"Dropdown not found in docs.json: {dropdown_label}") - pages = dropdown.get("pages") + if isinstance(dropdowns, list): + nav_section = next((item for item in dropdowns if isinstance(item, dict) and item.get("dropdown") == dropdown_label), None) + products = navigation.get("products") + if nav_section is None and isinstance(products, list): + nav_section = next((item for item in products if isinstance(item, dict) and item.get("product") == dropdown_label), None) + if nav_section is None: + raise ValueError(f"Navigation section not found in docs.json: {dropdown_label}") + pages = nav_section.get("pages") if not isinstance(pages, list): - raise ValueError(f"Dropdown does not expose a pages list: {dropdown_label}") + raise ValueError(f"Navigation section does not expose a pages list: {dropdown_label}") nav_group, generated_refs = build_nav_group( docs_json_path=docs_json_path, details_path=details_path, page_paths=page_paths, ) - dropdown["pages"] = canton_protobuf_history.prune_nav_items( + nav_section["pages"] = canton_protobuf_history.prune_nav_items( pages, page_refs=generated_refs, group_labels={GROUP_LABEL, LEGACY_GROUP_LABEL}, ) - target_pages = canton_protobuf_history.ensure_group_path(dropdown["pages"], parent_groups) + target_pages = canton_protobuf_history.ensure_group_path(nav_section["pages"], parent_groups) insert_group(target_pages, group=nav_group, after_group=insert_after_group) docs_json_path.write_text(json.dumps(docs, indent=2) + "\n", encoding="utf-8") print(f"Updated docs navigation: {docs_json_path}") @@ -674,7 +677,12 @@ def main() -> int: output_dir = Path(args.output_dir).resolve() if output_dir.exists(): shutil.rmtree(output_dir) - root, pages = build_pages(report, output_dir=output_dir) + root, pages = build_pages( + report, + output_dir=output_dir, + page_title="Ledger API gRPC", + page_description="Generated source details and version history for the Ledger API gRPC reference.", + ) written_paths = write_pages(pages, root) retitle_generated_pages(output_dir=output_dir) page_paths = flatten_generated_tree( diff --git a/scripts/generate_ledger_bindings_api_reference.py b/scripts/generate_ledger_bindings_api_reference.py index e4b91030b..a74f9c88e 100644 --- a/scripts/generate_ledger_bindings_api_reference.py +++ b/scripts/generate_ledger_bindings_api_reference.py @@ -288,20 +288,25 @@ def update_docs_navigation( navigation = docs.get("navigation") if not isinstance(navigation, dict): raise ValueError(f"docs.json missing navigation object: {docs_json_path}") + nav_section = None dropdowns = navigation.get("dropdowns") - if not isinstance(dropdowns, list): - raise ValueError(f"docs.json navigation.dropdowns must be a list: {docs_json_path}") - - dropdown = next( - (item for item in dropdowns if isinstance(item, dict) and item.get("dropdown") == dropdown_label), - None, - ) - if dropdown is None: - raise ValueError(f"Dropdown not found in docs.json: {dropdown_label}") + if isinstance(dropdowns, list): + nav_section = next( + (item for item in dropdowns if isinstance(item, dict) and item.get("dropdown") == dropdown_label), + None, + ) + products = navigation.get("products") + if nav_section is None and isinstance(products, list): + nav_section = next( + (item for item in products if isinstance(item, dict) and item.get("product") == dropdown_label), + None, + ) + if nav_section is None: + raise ValueError(f"Navigation section not found in docs.json: {dropdown_label}") - pages = dropdown.get("pages") + pages = nav_section.get("pages") if not isinstance(pages, list): - raise ValueError(f"Dropdown does not expose a pages list: {dropdown_label}") + raise ValueError(f"Navigation section does not expose a pages list: {dropdown_label}") jvm_group, generated_refs = build_jvm_nav_group( publish_root=publish_root, @@ -312,13 +317,13 @@ def update_docs_navigation( generated_refs.add(overview_ref) jvm_pages = jvm_group.setdefault("pages", []) if isinstance(jvm_pages, list) and overview_ref not in jvm_pages: - jvm_pages.append(overview_ref) - dropdown["pages"] = prune_nav_items( + jvm_pages.insert(0, overview_ref) + nav_section["pages"] = prune_nav_items( pages, page_refs=generated_refs, group_labels={group_label}, ) - target_pages = ensure_group_path(dropdown["pages"], parent_groups) + target_pages = ensure_group_path(nav_section["pages"], parent_groups) target_pages.append(jvm_group) docs_json_path.write_text(json.dumps(docs, indent=2) + "\n", encoding="utf-8") diff --git a/scripts/generate_typescript_bindings_reference.py b/scripts/generate_typescript_bindings_reference.py index 7851214d9..e178ce6e2 100644 --- a/scripts/generate_typescript_bindings_reference.py +++ b/scripts/generate_typescript_bindings_reference.py @@ -21,6 +21,7 @@ DEFAULT_MANIFEST = REPO_ROOT / ".internal" / "generated" / "x2mdx" / "typescript-bindings" / "manifest.json" DEFAULT_TYPEDOC_DIR = REPO_ROOT / ".internal" / "generated" / "x2mdx" / "typescript-bindings" / "typedoc" DEFAULT_OUTPUT_FILE = REPO_ROOT / "docs-main" / "reference" / "typescript.mdx" +DEFAULT_DETAILS_OUTPUT_FILE = REPO_ROOT / "docs-main" / "reference" / "typescript-details.mdx" LEGACY_OUTPUT_FILE = REPO_ROOT / "docs-main" / "sdks-tools" / "language-bindings" / "typescript.mdx" DEFAULT_DOCS_JSON = REPO_ROOT / "docs-main" / "docs.json" DEFAULT_NAV_GROUP = "TypeScript" @@ -40,6 +41,7 @@ def parse_args() -> argparse.Namespace: parser.add_argument("--typedoc-dir", default=str(DEFAULT_TYPEDOC_DIR)) parser.add_argument("--manifest-out", default=str(DEFAULT_MANIFEST)) parser.add_argument("--output-file", default=str(DEFAULT_OUTPUT_FILE)) + parser.add_argument("--details-output-file", default=str(DEFAULT_DETAILS_OUTPUT_FILE)) parser.add_argument("--docs-json", default=str(DEFAULT_DOCS_JSON)) parser.add_argument("--nav-dropdown", default="API Reference") parser.add_argument("--nav-group", default=DEFAULT_NAV_GROUP) @@ -117,28 +119,35 @@ def update_docs_navigation( docs_json_path: Path, dropdown_label: str, output_file: Path, + details_output_file: Path, nav_group: str, ) -> Path: docs = load_json(docs_json_path) - dropdowns = docs.get("navigation", {}).get("dropdowns") - if not isinstance(dropdowns, list): - raise ValueError(f"docs.json navigation.dropdowns must be a list: {docs_json_path}") - dropdown = next((item for item in dropdowns if isinstance(item, dict) and item.get("dropdown") == dropdown_label), None) - if dropdown is None: - raise ValueError(f"Dropdown not found in docs.json: {dropdown_label}") - pages = dropdown.get("pages") + navigation = docs.get("navigation", {}) + nav_section = None + dropdowns = navigation.get("dropdowns") if isinstance(navigation, dict) else None + if isinstance(dropdowns, list): + nav_section = next((item for item in dropdowns if isinstance(item, dict) and item.get("dropdown") == dropdown_label), None) + products = navigation.get("products") if isinstance(navigation, dict) else None + if nav_section is None and isinstance(products, list): + nav_section = next((item for item in products if isinstance(item, dict) and item.get("product") == dropdown_label), None) + if nav_section is None: + raise ValueError(f"Navigation section not found in docs.json: {dropdown_label}") + pages = nav_section.get("pages") if not isinstance(pages, list): - raise ValueError(f"Dropdown does not expose a pages list: {dropdown_label}") + raise ValueError(f"Navigation section does not expose a pages list: {dropdown_label}") page_ref = docs_json_page_ref(output_file, docs_json_path) + details_page_ref = docs_json_page_ref(details_output_file, docs_json_path) existing_index = nav_group_index(pages, group_label=nav_group) updated_pages = prune_nav_items(pages, page_ref=page_ref, group_label=nav_group) - nav_item = {"group": nav_group, "pages": [page_ref]} + updated_pages = prune_nav_items(updated_pages, page_ref=details_page_ref, group_label=nav_group) + nav_item = {"group": nav_group, "pages": [details_page_ref, page_ref]} if existing_index is None: updated_pages.append(nav_item) else: updated_pages.insert(min(existing_index, len(updated_pages)), nav_item) - dropdown["pages"] = updated_pages + nav_section["pages"] = updated_pages docs_json_path.write_text(json.dumps(docs, indent=2) + "\n", encoding="utf-8") print(f"Updated docs navigation: {docs_json_path}") @@ -330,6 +339,8 @@ def main() -> int: str(manifest_path), "--output-file", str(Path(args.output_file).resolve()), + "--details-output-file", + str(Path(args.details_output_file).resolve()), "--publish-version", publish_version, "--source-name", @@ -353,6 +364,7 @@ def main() -> int: docs_json_path=Path(args.docs_json).resolve(), dropdown_label=args.nav_dropdown, output_file=Path(args.output_file).resolve(), + details_output_file=Path(args.details_output_file).resolve(), nav_group=args.nav_group, ) return 0 diff --git a/scripts/generate_wallet_gateway_openrpc_reference.py b/scripts/generate_wallet_gateway_openrpc_reference.py index b2f26d6f4..d8eeffd7f 100644 --- a/scripts/generate_wallet_gateway_openrpc_reference.py +++ b/scripts/generate_wallet_gateway_openrpc_reference.py @@ -214,7 +214,14 @@ def rewrite_frontmatter_title(contents: str, title: str) -> str: return "---\n" + "\n".join(updated) + contents[end:] -def write_details_pages(*, output_dir: Path, spec_entries: list[dict[str, Any]]) -> None: +def write_details_pages( + *, + output_dir: Path, + spec_entries: list[dict[str, Any]], + openrpc_report: Any | None = None, + link_prefix: str | None = None, + preserved_spec_details: dict[str, str] | None = None, +) -> None: overview = output_dir / "index.mdx" if overview.exists(): details = output_dir / "operations" / "details.mdx" @@ -226,10 +233,35 @@ def write_details_pages(*, output_dir: Path, spec_entries: list[dict[str, Any]]) for spec in spec_entries: spec_id = str(spec["spec_id"]) + if openrpc_report is not None: + from x2mdx.openrpc.render import build_spec_details_history_page + from x2mdx.reference_pages import render_details_history_page + from x2mdx.render import write_page + + report_spec = next((item for item in openrpc_report.specs if item.spec_id == spec_id), None) + if report_spec is None: + raise ValueError(f"OpenRPC report does not contain spec '{spec_id}'") + page = render_details_history_page( + build_spec_details_history_page( + openrpc_report, + report_spec, + output_dir=output_dir, + overview_name="index.mdx", + spec_dir_name=SPEC_DIR_NAME, + link_prefix=link_prefix, + ) + ) + write_page(page, output_dir / page.path) + continue + details = output_dir / "operations" / slugify(spec_id) / "details.mdx" + preserved_contents = (preserved_spec_details or {}).get(spec_id) + if preserved_contents is not None: + details.parent.mkdir(parents=True, exist_ok=True) + details.write_text(preserved_contents, encoding="utf-8") + continue spec_page = output_dir / SPEC_DIR_NAME / f"{slugify(spec_id)}.mdx" if not spec_page.exists(): continue - details = output_dir / "operations" / slugify(spec_id) / "details.mdx" details.parent.mkdir(parents=True, exist_ok=True) details.write_text( rewrite_frontmatter_title(spec_page.read_text(encoding="utf-8"), DETAILS_LABEL), @@ -237,6 +269,18 @@ def write_details_pages(*, output_dir: Path, spec_entries: list[dict[str, Any]]) ) +def read_existing_spec_details(output_dir: Path, spec_entries: list[dict[str, Any]], *, exclude_spec_ids: set[str]) -> dict[str, str]: + preserved: dict[str, str] = {} + for spec in spec_entries: + spec_id = str(spec["spec_id"]) + if spec_id in exclude_spec_ids: + continue + details = output_dir / "operations" / slugify(spec_id) / "details.mdx" + if details.exists(): + preserved[spec_id] = details.read_text(encoding="utf-8") + return preserved + + def prune_nav_items(items: list[Any], *, page_refs: set[str], group_labels: set[str]) -> list[Any]: pruned: list[Any] = [] for item in items: @@ -268,15 +312,24 @@ def update_docs_navigation( navigation = docs.get("navigation") if not isinstance(navigation, dict): raise ValueError(f"docs.json navigation must be an object: {docs_json_path}") + nav_container = None dropdowns = navigation.get("dropdowns") - if not isinstance(dropdowns, list): - raise ValueError(f"docs.json navigation.dropdowns must be a list: {docs_json_path}") - dropdown = next((item for item in dropdowns if isinstance(item, dict) and item.get("dropdown") == dropdown_label), None) - if dropdown is None: - raise ValueError(f"Dropdown not found in docs.json: {dropdown_label}") - pages = dropdown.get("pages") + if isinstance(dropdowns, list): + nav_container = next( + (item for item in dropdowns if isinstance(item, dict) and item.get("dropdown") == dropdown_label), + None, + ) + products = navigation.get("products") + if nav_container is None and isinstance(products, list): + nav_container = next( + (item for item in products if isinstance(item, dict) and item.get("product") == dropdown_label), + None, + ) + if nav_container is None: + raise ValueError(f"Navigation section not found in docs.json: {dropdown_label}") + pages = nav_container.get("pages") if not isinstance(pages, list): - raise ValueError(f"Dropdown does not expose a pages list: {dropdown_label}") + raise ValueError(f"Navigation section does not expose a pages list: {dropdown_label}") refs = {overview_page_ref(output_dir, docs_json_path), docs_json_page_ref(output_dir / "operations" / "details.mdx", docs_json_path)} refs.update(spec_page_ref(output_dir, docs_json_path, spec["spec_id"]) for spec in spec_entries) @@ -306,11 +359,11 @@ def update_docs_navigation( details_refs = [item for item in group["pages"] if isinstance(item, str)] for wallet_group in wallet_groups: if wallet_group.get("group") == GROUP_LABEL: - wallet_group["pages"].extend(details_refs) + wallet_group["pages"] = [*details_refs, *wallet_group["pages"]] break for offset, wallet_group in enumerate(wallet_groups): pruned_pages.insert(min(insert_at + offset, len(pruned_pages)), wallet_group) - dropdown["pages"] = pruned_pages + nav_container["pages"] = pruned_pages docs_json_path.write_text(json.dumps(docs, indent=2) + "\n", encoding="utf-8") print(f"Updated docs navigation: {docs_json_path}") @@ -364,6 +417,9 @@ def main() -> int: ensure_repo_direnv(repo_root=REPO_ROOT, script_path=Path(__file__).resolve(), argv=sys.argv[1:]) args = parse_args() source_config = load_json(Path(args.source_config).resolve()) + from x2mdx.openrpc.lifecycle import build_openrpc_report_from_sources + from x2mdx.openrpc.snapshots import load_openrpc_source_snapshots + include_versions = set(args.version) if args.version else None remote = str(source_config.get("remote") or "") release_repo = str(source_config.get("release_repo") or DEFAULT_RELEASE_REPO) @@ -420,6 +476,15 @@ def main() -> int: ) fixture_root = REPO_ROOT + output_dir = Path(args.output_dir).resolve() + docs_json_path = Path(args.docs_json).resolve() + link_prefix = overview_route_prefix(output_dir, docs_json_path) + preserved_spec_details = read_existing_spec_details( + output_dir, + spec_entries, + exclude_spec_ids={str(spec["spec_id"]) for spec in spec_entries}, + ) + command = repo_direnv_command( REPO_ROOT, "x2mdx", @@ -430,13 +495,13 @@ def main() -> int: "--fixture-root", str(fixture_root), "--output-dir", - str(Path(args.output_dir).resolve()), + str(output_dir), "--publish-version", publish_version, "--overview-title", args.overview_title, "--link-prefix", - overview_route_prefix(Path(args.output_dir).resolve(), Path(args.docs_json).resolve()), + link_prefix, "--source-name", args.source_name, "--version-filter", @@ -449,14 +514,28 @@ def main() -> int: if completed.returncode != 0: return completed.returncode + include_versions = set(args.version) if args.version else None + openrpc_report = build_openrpc_report_from_sources( + load_openrpc_source_snapshots( + manifest_path, + fixture_root=fixture_root, + include_versions=include_versions, + ), + source_name=args.source_name, + version_filter=args.version_filter or f"{tag_prefix} GitHub releases", + publish_version=publish_version, + ) write_details_pages( - output_dir=Path(args.output_dir).resolve(), + output_dir=output_dir, spec_entries=spec_entries, + openrpc_report=openrpc_report, + link_prefix=link_prefix, + preserved_spec_details=preserved_spec_details, ) update_docs_navigation( - docs_json_path=Path(args.docs_json).resolve(), + docs_json_path=docs_json_path, dropdown_label=args.nav_dropdown, - output_dir=Path(args.output_dir).resolve(), + output_dir=output_dir, spec_entries=spec_entries, ) return 0 diff --git a/scripts/generated_reference_nav.py b/scripts/generated_reference_nav.py index e9f360604..7f365cf8b 100644 --- a/scripts/generated_reference_nav.py +++ b/scripts/generated_reference_nav.py @@ -76,7 +76,7 @@ def build_asyncapi_nav_group( docs_json_page_ref(path, docs_json_path) for path in sorted( operation_dir.glob("*.mdx"), - key=lambda path: (path.name == "details.mdx", mdx_title(path)), + key=lambda path: (path.name != "details.mdx", mdx_title(path)), ) ] channel_groups.append( @@ -85,10 +85,10 @@ def build_asyncapi_nav_group( "pages": operation_refs, } ) - pages.extend(channel_groups) details_page = operation_root / "details.mdx" if details_page.exists(): pages.append(docs_json_page_ref(details_page, docs_json_path)) + pages.extend(channel_groups) return {"group": group_label, "pages": pages} @@ -115,7 +115,7 @@ def build_openrpc_nav_group( ] details_page = operation_dir / "details.mdx" if details_page.exists(): - operation_refs.append(docs_json_page_ref(details_page, docs_json_path)) + operation_refs.insert(0, docs_json_page_ref(details_page, docs_json_path)) section = spec_group_sections.get(spec_id) if spec_group_sections else None if section: section_pages.setdefault(section, []).append( @@ -138,7 +138,7 @@ def build_openrpc_nav_group( pages.append({"group": section, "pages": grouped_pages}) details_page = output_dir / "operations" / "details.mdx" if details_page.exists(): - pages.append(docs_json_page_ref(details_page, docs_json_path)) + pages.insert(0, docs_json_page_ref(details_page, docs_json_path)) return {"group": group_label, "pages": pages} @@ -178,12 +178,12 @@ def build_protobuf_nav_group( if service_groups: package_pages.append({"group": "Services", "pages": service_groups}) package_groups.append({"group": mdx_title(package_page), "pages": package_pages}) - if package_groups: - pages.append({"group": "Packages", "pages": package_groups}) details_refs = [details_page_ref] if include_details_page else [] for page_ref in [*(extra_page_refs or []), *details_refs]: if page_ref not in pages: pages.append(page_ref) + if package_groups: + pages.append({"group": "Packages", "pages": package_groups}) return {"group": group_label, "pages": pages} @@ -192,18 +192,24 @@ def replace_group_in_dropdown(*, docs_json_path: Path, dropdown_label: str, grou navigation = payload.get("navigation") if not isinstance(navigation, dict): raise ValueError(f"docs.json missing navigation object: {docs_json_path}") + nav_section = None dropdowns = navigation.get("dropdowns") - if not isinstance(dropdowns, list): - raise ValueError(f"docs.json navigation.dropdowns must be a list: {docs_json_path}") - dropdown = next( - (item for item in dropdowns if isinstance(item, dict) and item.get("dropdown") == dropdown_label), - None, - ) - if dropdown is None: - raise ValueError(f"Dropdown not found in docs.json: {dropdown_label}") - pages = dropdown.get("pages") + if isinstance(dropdowns, list): + nav_section = next( + (item for item in dropdowns if isinstance(item, dict) and item.get("dropdown") == dropdown_label), + None, + ) + products = navigation.get("products") + if nav_section is None and isinstance(products, list): + nav_section = next( + (item for item in products if isinstance(item, dict) and item.get("product") == dropdown_label), + None, + ) + if nav_section is None: + raise ValueError(f"Navigation section not found in docs.json: {dropdown_label}") + pages = nav_section.get("pages") if not isinstance(pages, list): - raise ValueError(f"Dropdown does not expose a pages list: {dropdown_label}") + raise ValueError(f"Navigation section does not expose a pages list: {dropdown_label}") if not _replace_group(pages, group): pages.append(group) diff --git a/scripts/reference_nav.py b/scripts/reference_nav.py index 936e8d104..a64bbf809 100644 --- a/scripts/reference_nav.py +++ b/scripts/reference_nav.py @@ -280,20 +280,25 @@ def regroup_ledger_api_nav(*, docs_json_path: Path, dropdown_label: str) -> None if not isinstance(navigation, dict): raise ValueError(f"docs.json missing navigation object: {docs_json_path}") + nav_section = None dropdowns = navigation.get("dropdowns") - if not isinstance(dropdowns, list): - raise ValueError(f"docs.json navigation.dropdowns must be a list: {docs_json_path}") - - dropdown = next( - (item for item in dropdowns if isinstance(item, dict) and item.get("dropdown") == dropdown_label), - None, - ) - if dropdown is None: - raise ValueError(f"Dropdown not found in docs.json: {dropdown_label}") + if isinstance(dropdowns, list): + nav_section = next( + (item for item in dropdowns if isinstance(item, dict) and item.get("dropdown") == dropdown_label), + None, + ) + products = navigation.get("products") + if nav_section is None and isinstance(products, list): + nav_section = next( + (item for item in products if isinstance(item, dict) and item.get("product") == dropdown_label), + None, + ) + if nav_section is None: + raise ValueError(f"Navigation section not found in docs.json: {dropdown_label}") - pages = dropdown.get("pages") + pages = nav_section.get("pages") if not isinstance(pages, list): - raise ValueError(f"Dropdown does not expose a pages list: {dropdown_label}") + raise ValueError(f"Navigation section does not expose a pages list: {dropdown_label}") known_labels = { LEDGER_API_PARENT_GROUP, @@ -340,5 +345,5 @@ def regroup_ledger_api_nav(*, docs_json_path: Path, dropdown_label: str) -> None else: remaining.insert(min(insert_at, len(remaining)), parent_group) - dropdown["pages"] = remaining + nav_section["pages"] = remaining docs_json_path.write_text(json.dumps(docs, indent=2) + "\n", encoding="utf-8") diff --git a/src/x2mdx/asyncapi/render.py b/src/x2mdx/asyncapi/render.py index b18ed2d75..2c190627f 100644 --- a/src/x2mdx/asyncapi/render.py +++ b/src/x2mdx/asyncapi/render.py @@ -9,6 +9,9 @@ from x2mdx.asyncapi.models import AsyncApiChannelLifecycle, AsyncApiReport from x2mdx.reference_pages import ( + DetailsHistoryChange, + DetailsHistoryPage, + DetailsHistoryVersionRow, ReferenceBadge, ReferenceBreadcrumb, ReferenceCard, @@ -23,6 +26,7 @@ markdown_page_from_template, relative_page_ref, render_collection_page, + render_details_history_page, render_operation_page, safe_markdown_text, schema_from_sample, @@ -274,6 +278,169 @@ def build_overview_page( ) +def version_summary_rows(report: AsyncApiReport) -> list[DetailsHistoryVersionRow]: + rows: list[DetailsHistoryVersionRow] = [] + for version in report.versions: + deltas = report.per_version_deltas.get(version, {}) + deprecated_count = sum( + 1 + for channel in report.channels + if channel.lifecycle_state == "deprecated" + and (channel.introduced_version == version or version in channel.changed_in_versions) + ) + replaced_count = sum( + 1 + for channel in report.channels + if channel.replaces + and (channel.introduced_version == version or version in channel.changed_in_versions) + ) + rows.append( + DetailsHistoryVersionRow( + version=version, + added=str(deltas.get("added_count", 0)), + changed=str(deltas.get("changed_count", 0)), + removed=str(deltas.get("removed_count", 0)), + deprecated=str(deprecated_count or "-"), + replaced=str(replaced_count or "-"), + ) + ) + return rows + + +def details_history_changes(report: AsyncApiReport, *, details_path: Path, output_dir: Path) -> list[DetailsHistoryChange]: + changes: list[DetailsHistoryChange] = [ + DetailsHistoryChange( + version=report.versions[0], + title="Initial selected snapshot", + details=f"{sum(1 for channel in report.channels if channel.introduced_version == report.versions[0])} channels were present when this source stream first appears in the selected inputs.", + tone="added", + ) + ] + for channel in report.channels: + href = page_ref(details_path, channel_page_path(output_dir, channel)) + if channel.introduced_version != report.versions[0]: + changes.append( + DetailsHistoryChange( + version=channel.introduced_version, + title=f"Added {channel.channel}", + details="Channel added to the published WebSocket surface.", + tone="added", + href=href, + ) + ) + for entry in channel.change_details: + changes.append( + DetailsHistoryChange( + version=str(entry["version"]), + title=f"Changed {channel.channel}", + details="; ".join(str(change) for change in entry.get("changes", [])) or "details updated", + tone="changed", + href=href, + ) + ) + if channel.removed_version: + changes.append( + DetailsHistoryChange( + version=channel.removed_version, + title=f"Removed {channel.channel}", + details=f"Last seen in {channel.last_seen_in}.", + tone="removed", + href=href, + ) + ) + version_order = {version: index for index, version in enumerate(report.versions)} + tone_order = {"added": 0, "changed": 1, "removed": 2} + return sorted(changes, key=lambda change: (version_order.get(change.version, len(version_order)), tone_order.get(change.tone, 9), change.title)) + + +def build_details_history_page( + report: AsyncApiReport, + *, + output_dir: Path, + overview_name: str, + page_title: str, + page_description: str, +) -> DetailsHistoryPage: + details_path = output_dir / overview_name + active_channels = [channel for channel in report.channels if channel.status != "removed"] + removed_channels = [channel for channel in report.channels if channel.status == "removed"] + + def channel_cards(channels: list[AsyncApiChannelLifecycle]) -> list[ReferenceCard]: + return [ + ReferenceCard( + title=channel.channel, + href=page_ref(details_path, channel_page_path(output_dir, channel)), + summary=channel_summary(channel), + badges=lifecycle_badges(channel), + meta_items=[ + ReferenceMetaItem("Actions", ", ".join(channel.latest.get("action_names") or []) or "-"), + ReferenceMetaItem("Last seen", channel.last_seen_in), + *lifecycle_meta_items(channel), + ], + ) + for channel in channels + ] + + inventory_sections = [ + ReferenceSection( + heading="Published channels", + body_markdown=safe_markdown_text("These channels are present in the publish version and link to channel pages for publish and subscribe actions."), + meta_items=[ + ReferenceMetaItem("Channels", str(len(active_channels))), + ReferenceMetaItem("Publish version", report.publish_version), + ], + cards=channel_cards(active_channels), + ) + ] + if removed_channels: + inventory_sections.append( + ReferenceSection( + heading="Removed channels", + body_markdown=safe_markdown_text("These channels are retained for history because they appeared in earlier selected inputs."), + meta_items=[ReferenceMetaItem("Channels", str(len(removed_channels)))], + cards=channel_cards(removed_channels), + ) + ) + + return DetailsHistoryPage( + path=overview_name, + title=f"{page_title} details and history", + description=page_description, + eyebrow="Details and history", + summary="Generated-source metadata, version coverage, channel inventory, and per-version changes for this source stream.", + badges=[ReferenceBadge("AsyncAPI", tone="protocol"), ReferenceBadge(report.publish_version, tone="neutral")], + meta_items=[ + ReferenceMetaItem("Source stream", page_title), + ReferenceMetaItem("Publish version", report.publish_version), + ReferenceMetaItem("Versions compared", ", ".join(report.versions)), + ], + source_items=[ + ReferenceMetaItem("Input family", report.source_name), + ReferenceMetaItem("Version filter", report.version_filter), + ReferenceMetaItem("Latest source path", report.latest_source_path), + ReferenceMetaItem("AsyncAPI version", report.asyncapi_version or "-"), + ], + source_cards=[ + ReferenceCard( + title="Generated reference pages", + summary="Channel and action pages are generated from the publish-version AsyncAPI document, with history calculated across selected snapshots.", + meta_items=[ + ReferenceMetaItem("Channels", str(len(report.channels))), + ReferenceMetaItem("Actions", str(sum(len(channel.latest.get("actions", [])) for channel in report.channels))), + ], + ) + ], + version_rows=version_summary_rows(report), + inventory_sections=inventory_sections, + changes=details_history_changes(report, details_path=details_path, output_dir=output_dir), + limitations=[ + "Change detection is structural and compares selected generated inputs; it does not infer behavioral compatibility.", + "Channel-level additions, removals, and changed message shapes are tracked when they are present in the selected snapshots.", + "Lifecycle labels and replacement links are included only when the source document carries that metadata.", + ], + ) + + def build_channel_page( channel: AsyncApiChannelLifecycle, *, @@ -332,8 +499,8 @@ def build_pages( page_description: str = "WebSocket AsyncAPI reference and version history.", ) -> tuple[Path, list[Any]]: pages = [ - render_collection_page( - build_overview_page( + render_details_history_page( + build_details_history_page( report, output_dir=output_dir, overview_name=overview_name, diff --git a/src/x2mdx/cli.py b/src/x2mdx/cli.py index 0a875f09e..c20eb79c1 100644 --- a/src/x2mdx/cli.py +++ b/src/x2mdx/cli.py @@ -282,6 +282,16 @@ def build_parser() -> argparse.ArgumentParser: "--version-filter", help="Optional label describing the selected version set.", ) + build_protobuf.add_argument( + "--page-title", + default="Protobuf", + help="Title prefix to use for the generated details and history page.", + ) + build_protobuf.add_argument( + "--page-description", + default="Descriptor-backed protobuf API source details and version history.", + help="Description to use for the generated details and history page.", + ) typedoc = subparsers.add_parser("typedoc", help="TypeDoc-based TypeScript bindings commands") typedoc_subparsers = typedoc.add_subparsers(dest="typedoc_command", required=True) @@ -300,6 +310,10 @@ def build_parser() -> argparse.ArgumentParser: required=True, help="Exact MDX file path to write for the generated TypeScript bindings page", ) + build_typedoc.add_argument( + "--details-output-file", + help="Optional MDX file path to write for the generated TypeScript bindings Details and History page.", + ) build_typedoc.add_argument( "--fixture-root", help="Directory to resolve manifest JSON paths from; defaults to the manifest directory", @@ -550,14 +564,19 @@ def main(argv: Sequence[str] | None = None) -> int: output_dir = Path(args.output_dir) if output_dir.exists(): shutil.rmtree(output_dir) - output_root, pages = build_pages(report, output_dir=output_dir) + output_root, pages = build_pages( + report, + output_dir=output_dir, + page_title=args.page_title, + page_description=args.page_description, + ) write_pages(pages, output_root) return 0 if args.command == "typedoc": if args.typedoc_command == "build-api-pages-from-manifest": from x2mdx.render import write_page - from x2mdx.typedoc.render import build_page + from x2mdx.typedoc.render import build_details_history_page, build_page report = build_typedoc_report_from_manifest_args(args) output_file = Path(args.output_file) @@ -568,6 +587,16 @@ def main(argv: Sequence[str] | None = None) -> int: page_description=args.page_description, ) write_page(page, output_file) + if args.details_output_file: + details_output_file = Path(args.details_output_file) + details_page = build_details_history_page( + report, + output_path=details_output_file.name, + page_title=args.page_title, + page_description=args.page_description, + reference_href=f"./{output_file.with_suffix('').name}", + ) + write_page(details_page, details_output_file) return 0 if args.command == "asyncapi": diff --git a/src/x2mdx/daml_json/render.py b/src/x2mdx/daml_json/render.py index 8218c1336..bb3bc2dda 100644 --- a/src/x2mdx/daml_json/render.py +++ b/src/x2mdx/daml_json/render.py @@ -10,12 +10,16 @@ from x2mdx.daml_json.models import DamlDocsReport from x2mdx.output import Page, RawMarkdown from x2mdx.reference_pages import ( + DetailsHistoryChange, + DetailsHistoryPage, + DetailsHistoryVersionRow, ReferenceBadge, ReferenceCard, ReferenceCollectionPage, ReferenceMetaItem, ReferenceSection, render_collection_page, + render_details_history_page, safe_markdown_text, ) from x2mdx.templating import markdown_page, render_template @@ -646,13 +650,71 @@ def module_lifecycle_badges( ) -> list[ReferenceBadge]: badges = [ReferenceBadge(f"Since {lifecycle.get('introduced_in') or '-'}", tone="added")] if deprecation_version: - badges.append(ReferenceBadge(f"Deprecated {deprecation_version}", tone="removed")) + badges.append(ReferenceBadge(f"Deprecated {deprecation_version}", tone="deprecated")) removed_in = lifecycle.get("removed_in") if removed_in: badges.append(ReferenceBadge(f"Removed {removed_in}", tone="removed")) return badges +def version_rows(report: DamlDocsReport) -> list[DetailsHistoryVersionRow]: + rows: list[DetailsHistoryVersionRow] = [] + for version in report.versions: + rows.append( + DetailsHistoryVersionRow( + version=version, + added=str(sum(1 for lifecycle in report.module_lifecycle.values() if lifecycle.get("introduced_in") == version)), + removed=str(sum(1 for lifecycle in report.module_lifecycle.values() if lifecycle.get("removed_in") == version)), + deprecated=str(sum(1 for seen in report.module_deprecation_first_seen.values() if seen == version) or "-"), + ) + ) + return rows + + +def change_list(report: DamlDocsReport, *, module_entries: list[tuple[str, str, str]]) -> list[DetailsHistoryChange]: + display_by_name = {source_name: display_name for source_name, display_name, _target in module_entries} + href_by_name = {source_name: target for source_name, _display_name, target in module_entries} + changes: list[DetailsHistoryChange] = [] + for source_name, lifecycle in report.module_lifecycle.items(): + display_name = display_by_name.get(source_name, module_display_name(source_name)) + href = href_by_name.get(source_name) + introduced = lifecycle.get("introduced_in") + if introduced and introduced != report.versions[0]: + changes.append( + DetailsHistoryChange( + version=introduced, + title=f"Added {display_name}", + details="Module added to the generated Daml docs JSON surface.", + tone="added", + href=href, + ) + ) + deprecated = report.module_deprecation_first_seen.get(source_name) + if deprecated: + changes.append( + DetailsHistoryChange( + version=deprecated, + title=f"Deprecated {display_name}", + details="Module carries source deprecation metadata.", + tone="deprecated", + href=href, + ) + ) + removed = lifecycle.get("removed_in") + if removed: + changes.append( + DetailsHistoryChange( + version=removed, + title=f"Removed {display_name}", + details="Module is absent from the publish-version snapshot and retained for history.", + tone="removed", + href=href, + ) + ) + version_order = {version: index for index, version in enumerate(report.versions)} + return sorted(changes, key=lambda change: (version_order.get(change.version, 999), change.title)) + + def strip_raw_markdown_trailing_whitespace(page: Page) -> Page: return Page( path=page.path, @@ -678,6 +740,8 @@ def build_pages( pages: list[Page] = [] module_entries: list[tuple[str, str, str]] = [] module_cards: list[ReferenceCard] = [] + published_module_cards: list[ReferenceCard] = [] + removed_module_cards: list[ReferenceCard] = [] normalized_link_prefix = normalize_link_prefix(link_prefix) if link_prefix else None modules_sorted = sorted( report.modules, @@ -715,71 +779,85 @@ def build_pages( else: module_link = (output_dir / target).relative_to(root).with_suffix("").as_posix() module_doc = modules_by_name[source_name] - module_cards.append( - ReferenceCard( - title=display_name, - href=module_link, - summary=module_summary_preview(module_doc), - badges=module_lifecycle_badges( - lifecycle=lifecycle, - deprecation_version=deprecation_version, - ), - meta_items=[ - ReferenceMetaItem("Kind", "Module"), - ReferenceMetaItem("Introduced", lifecycle.get("introduced_in") or "-"), - ReferenceMetaItem("Changed", "-"), - ReferenceMetaItem("Deprecated", deprecation_version or "-"), - ReferenceMetaItem("Removed", lifecycle.get("removed_in") or "-"), - ], - ) + module_card = ReferenceCard( + title=display_name, + href=module_link, + summary=module_summary_preview(module_doc), + badges=module_lifecycle_badges( + lifecycle=lifecycle, + deprecation_version=deprecation_version, + ), + meta_items=[ + ReferenceMetaItem("Kind", "Module"), + ReferenceMetaItem("Introduced", lifecycle.get("introduced_in") or "-"), + ReferenceMetaItem("Changed", "-"), + ReferenceMetaItem("Deprecated", deprecation_version or "-"), + ReferenceMetaItem("Removed", lifecycle.get("removed_in") or "-"), + ], ) - version_cards = [ - ReferenceCard( - title=version, - summary="Module changes included in this Daml docs JSON snapshot.", - badges=[ - ReferenceBadge( - f"Added {sum(1 for lifecycle in report.module_lifecycle.values() if lifecycle.get('introduced_in') == version)}", - tone="added", - ), - ReferenceBadge("Changed 0", tone="changed"), - ReferenceBadge( - f"Removed {sum(1 for lifecycle in report.module_lifecycle.values() if lifecycle.get('removed_in') == version)}", - tone="removed", - ), + module_cards.append(module_card) + if lifecycle.get("removed_in"): + removed_module_cards.append(module_card) + else: + published_module_cards.append(module_card) + inventory_sections = [ + ReferenceSection( + heading="Published modules", + body_markdown=safe_markdown_text( + "Open a module page for declarations, type signatures, warnings, and lifecycle details." + ), + meta_items=[ + ReferenceMetaItem("Modules", str(len(published_module_cards))), + ReferenceMetaItem("Publish version", report.publish_version), ], + cards=published_module_cards, ) - for version in report.versions ] - + if removed_module_cards: + inventory_sections.append( + ReferenceSection( + heading="Removed modules", + body_markdown=safe_markdown_text( + "These modules are retained for history because they appeared in earlier selected inputs." + ), + meta_items=[ReferenceMetaItem("Modules", str(len(removed_module_cards)))], + cards=removed_module_cards, + ) + ) pages.insert( 0, strip_raw_markdown_trailing_whitespace( - render_collection_page( - ReferenceCollectionPage( + render_details_history_page( + DetailsHistoryPage( path=(output_dir / "index.mdx").relative_to(root).as_posix(), - title=overview_title, - description=f"Reference documentation for {overview_title} modules.", - eyebrow="Daml Reference", - summary="Generated module overview for the Daml Standard Library, built from versioned docs JSON snapshots.", + title=f"{overview_title} details and history", + description=f"Generated source details and version history for {overview_title} modules.", + eyebrow="Details and history", + summary="Generated-source metadata, version coverage, module inventory, and module lifecycle changes for this source stream.", badges=[ReferenceBadge("Daml", tone="protocol"), ReferenceBadge(report.publish_version, tone="neutral")], meta_items=[ + ReferenceMetaItem("Source stream", overview_title), ReferenceMetaItem("Publish version", report.publish_version), - ReferenceMetaItem("Source", report.source_name), + ReferenceMetaItem("Versions compared", ", ".join(report.versions)), + ], + source_items=[ + ReferenceMetaItem("Input family", report.source_name), ReferenceMetaItem("Version filter", report.version_filter), + ReferenceMetaItem("Modules", str(len(module_cards))), + ], + source_cards=[ + ReferenceCard( + title="Generated reference pages", + summary="Module pages are generated from the publish-version Daml docs JSON, with lifecycle facts calculated across selected snapshots.", + meta_items=[ReferenceMetaItem("Modules", str(len(module_cards)))], + ) ], - sections=[ - ReferenceSection( - heading="Modules", - body_markdown=safe_markdown_text( - "Open a module page for declarations, type signatures, warnings, and lifecycle details." - ), - cards=module_cards, - ), - ReferenceSection( - heading="Version Summary", - cards=version_cards, - ), + version_rows=version_rows(report), + inventory_sections=inventory_sections, + changes=change_list(report, module_entries=module_entries), + limitations=[ + "Change detection compares selected Daml docs JSON snapshots; it does not infer behavioral compatibility.", + "Deprecation and replacement metadata are included only when the source docs JSON carries the supported warning or deprecation transport.", ], ) ) diff --git a/src/x2mdx/jvm_docs/render.py b/src/x2mdx/jvm_docs/render.py index 81de802de..09ad7b067 100644 --- a/src/x2mdx/jvm_docs/render.py +++ b/src/x2mdx/jvm_docs/render.py @@ -13,6 +13,16 @@ from x2mdx.jvm_docs.models import JvmDocArtifactLifecycle, JvmDocLifecycleReport, JvmDocSymbolLifecycle from x2mdx.output import Page +from x2mdx.reference_pages import ( + DetailsHistoryChange, + DetailsHistoryPage, + DetailsHistoryVersionRow, + ReferenceBadge, + ReferenceCard, + ReferenceMetaItem, + ReferenceSection, + render_details_history_page, +) from x2mdx.templating import markdown_page CHANGE_MARKER = "🔵" @@ -99,6 +109,133 @@ def summarize_changes(artifact: JvmDocArtifactLifecycle) -> dict[str, int]: } +def aggregate_version_rows(report: JvmDocLifecycleReport) -> list[DetailsHistoryVersionRow]: + versions: list[str] = [] + for artifact in report.artifacts: + for version in artifact.versions: + if version not in versions: + versions.append(version) + rows: list[DetailsHistoryVersionRow] = [] + for version in versions: + added = sum(1 for artifact in report.artifacts for symbol in artifact.symbols if symbol.introduced_version == version) + deprecated = sum(1 for artifact in report.artifacts for symbol in artifact.symbols if symbol.deprecated_version == version) + removed = sum(1 for artifact in report.artifacts for symbol in artifact.symbols if symbol.removed_version == version) + rows.append( + DetailsHistoryVersionRow( + version=version, + added=str(added), + deprecated=str(deprecated or "-"), + removed=str(removed), + ) + ) + return rows + + +def build_details_history_page( + report: JvmDocLifecycleReport, + *, + overview_output: Path, + details_dir: Path, + overview_title: str, + artifact_pages: list[tuple[JvmDocArtifactLifecycle, Page]], +) -> DetailsHistoryPage: + root = compute_output_root(overview_output, details_dir) + cards: list[ReferenceCard] = [] + changes: list[DetailsHistoryChange] = [] + for artifact, artifact_page in artifact_pages: + summary = summarize_changes(artifact) + cards.append( + ReferenceCard( + title=f"{artifact.group}:{artifact.artifact}", + href=relative_page_link(overview_output, root / artifact_page.path), + summary=f"{artifact.type_count} types and {artifact.member_count} members across {len(artifact.versions)} selected versions.", + badges=[ + ReferenceBadge(f"Since {artifact.versions[0]}", tone="added"), + ReferenceBadge(f"{artifact.language}", tone="neutral"), + ], + meta_items=[ + ReferenceMetaItem("Versions", ", ".join(artifact.versions)), + ReferenceMetaItem("Introduced", str(summary["introduced"])), + ReferenceMetaItem("Deprecated", str(summary["deprecated"])), + ReferenceMetaItem("Removed", str(summary["removed"])), + ], + ) + ) + for symbol in changed_symbols(artifact): + if symbol.introduced_version != artifact.versions[0]: + changes.append( + DetailsHistoryChange( + version=symbol.introduced_version, + title=f"Added {symbol.symbol}", + details=symbol.kind, + tone="added", + href=latest_doc_link(symbol) or None, + ) + ) + if symbol.deprecated_version: + changes.append( + DetailsHistoryChange( + version=symbol.deprecated_version, + title=f"Deprecated {symbol.symbol}", + details=symbol.deprecation_note or symbol.kind, + tone="deprecated", + href=latest_doc_link(symbol) or None, + ) + ) + if symbol.removed_version: + changes.append( + DetailsHistoryChange( + version=symbol.removed_version, + title=f"Removed {symbol.symbol}", + details=symbol.kind, + tone="removed", + href=latest_doc_link(symbol) or None, + ) + ) + + return DetailsHistoryPage( + path=page_path(root, overview_output), + title=f"{overview_title} details and history", + description="Generated source details and version history for Java bindings Javadocs.", + eyebrow="Details and history", + summary="Generated-source metadata, version coverage, artifact inventory, and symbol lifecycle changes for this source stream.", + badges=[ReferenceBadge("Javadocs", tone="protocol")], + meta_items=[ + ReferenceMetaItem("Source stream", overview_title), + ReferenceMetaItem("Artifacts", str(report.summary["artifact_count"])), + ReferenceMetaItem("Types", str(report.summary["type_count"])), + ReferenceMetaItem("Members", str(report.summary["member_count"])), + ], + source_items=[ + ReferenceMetaItem("Input family", report.source_name), + ReferenceMetaItem("Version filter", report.version_filter), + ReferenceMetaItem("Artifacts", str(report.summary["artifact_count"])), + ReferenceMetaItem("Types", str(report.summary["type_count"])), + ReferenceMetaItem("Members", str(report.summary["member_count"])), + ], + source_cards=[ + ReferenceCard( + title="Generated reference pages", + summary="Artifact, package, and object pages are generated from selected local Javadoc snapshots.", + meta_items=[ + ReferenceMetaItem("Artifacts", str(len(report.artifacts))), + ReferenceMetaItem("Failures", str(sum(len(artifact.failures) for artifact in report.artifacts))), + ], + ) + ], + version_rows=aggregate_version_rows(report), + inventory_sections=[ + ReferenceSection( + heading="Published artifacts", + body_markdown="These artifacts link to generated package and object reference pages.", + cards=cards, + ) + ], + changes=sorted(changes, key=lambda change: (change.version, change.title)), + limitations=report.notes, + ) + + def format_lifecycle_value(value: str | None) -> str: if not value: return "-" @@ -566,20 +703,14 @@ def build_pages( ] ) - overview_page = markdown_page( - path=page_path(root, overview_output), - title=overview_title, - description="Generated lifecycle timeline and reference pages for local Javadoc/Scaladoc artifacts", - template_name="jvm_docs/overview.md.j2", - source_items=[ - f"Source name: `{md_code(report.source_name)}`", - f"Version filter: `{md_code(report.version_filter)}`", - f"Artifacts: `{report.summary['artifact_count']}`", - f"Types: `{report.summary['type_count']}`", - f"Members: `{report.summary['member_count']}`", - ], - overview_rows=overview_rows, - notes=[md_text(note) for note in report.notes], + overview_page = render_details_history_page( + build_details_history_page( + report, + overview_output=overview_output, + details_dir=details_dir, + overview_title=overview_title, + artifact_pages=artifact_pages, + ) ) pages.append(overview_page) diff --git a/src/x2mdx/mintlify.py b/src/x2mdx/mintlify.py index 20d2a4803..194c2d905 100644 --- a/src/x2mdx/mintlify.py +++ b/src/x2mdx/mintlify.py @@ -133,20 +133,25 @@ def update_docs_json_navigation( docs = json.loads(docs_json_path.read_text(encoding="utf-8")) page_ref = docs_json_page_ref(output_file, docs_json_path) navigation = docs.setdefault("navigation", {}) + nav_section = None dropdowns = navigation.get("dropdowns") - if not isinstance(dropdowns, list): - raise ValueError("docs.json navigation.dropdowns must be present") - - dropdown = next( - (item for item in dropdowns if isinstance(item, dict) and item.get("dropdown") == target.dropdown), - None, - ) - if dropdown is None: - raise ValueError(f"Dropdown not found in docs.json: {target.dropdown}") + if isinstance(dropdowns, list): + nav_section = next( + (item for item in dropdowns if isinstance(item, dict) and item.get("dropdown") == target.dropdown), + None, + ) + products = navigation.get("products") + if nav_section is None and isinstance(products, list): + nav_section = next( + (item for item in products if isinstance(item, dict) and item.get("product") == target.dropdown), + None, + ) + if nav_section is None: + raise ValueError(f"Navigation section not found in docs.json: {target.dropdown}") _remove_page_reference(navigation, page_ref) - versions = dropdown.get("versions") + versions = nav_section.get("versions") if isinstance(versions, list): version_names = target.versions or [ item.get("version") @@ -159,12 +164,12 @@ def update_docs_json_navigation( None, ) if version_entry is None: - raise ValueError(f"Version not found under dropdown {target.dropdown}: {version_name}") + raise ValueError(f"Version not found under navigation section {target.dropdown}: {version_name}") pages = _ensure_group_path(version_entry, target.groups) if page_ref not in pages: pages.append(page_ref) else: - pages = _ensure_group_path(dropdown, target.groups) + pages = _ensure_group_path(nav_section, target.groups) if page_ref not in pages: pages.append(page_ref) diff --git a/src/x2mdx/openrpc/render.py b/src/x2mdx/openrpc/render.py index 2eeb7f787..148da8b9a 100644 --- a/src/x2mdx/openrpc/render.py +++ b/src/x2mdx/openrpc/render.py @@ -9,6 +9,9 @@ from x2mdx.openrpc.models import OpenRpcMethodLifecycle, OpenRpcReport, OpenRpcSpecLifecycle from x2mdx.reference_pages import ( + DetailsHistoryChange, + DetailsHistoryPage, + DetailsHistoryVersionRow, ReferenceBadge, ReferenceBreadcrumb, ReferenceCard, @@ -45,6 +48,10 @@ def operation_page_path(output_dir: Path, spec: OpenRpcSpecLifecycle, method: Op return output_dir / "operations" / slugify(spec.spec_id) / f"{slugify(method.method)}.mdx" +def spec_details_history_page_path(output_dir: Path, spec: OpenRpcSpecLifecycle) -> Path: + return output_dir / "operations" / slugify(spec.spec_id) / "details.mdx" + + def normalize_link_prefix(link_prefix: str) -> str: trimmed = link_prefix.strip() if not trimmed: @@ -271,6 +278,240 @@ def build_spec_page( ) +def count_matching_methods(methods: list[OpenRpcMethodLifecycle], version: str, field_name: str) -> int: + count = 0 + for method in methods: + value = getattr(method, field_name) + if value == version: + count += 1 + elif isinstance(value, list) and version in value: + count += 1 + return count + + +def version_summary_rows(spec: OpenRpcSpecLifecycle) -> list[DetailsHistoryVersionRow]: + rows: list[DetailsHistoryVersionRow] = [] + for version in spec.versions_present: + deltas = spec.per_version_method_deltas.get(version, {}) + deprecated_count = sum( + 1 + for method in spec.methods + if method.lifecycle_state == "deprecated" + and (method.introduced_version == version or version in method.changed_in_versions) + ) + replaced_count = sum( + 1 + for method in spec.methods + if method.replaces + and (method.introduced_version == version or version in method.changed_in_versions) + ) + rows.append( + DetailsHistoryVersionRow( + version=version, + added=str(deltas.get("added_count", 0)), + changed=str(deltas.get("changed_count", 0)), + removed=str(deltas.get("removed_count", 0)), + deprecated=str(deprecated_count or "-"), + replaced=str(replaced_count or "-"), + ) + ) + return rows + + +def details_history_change_list( + spec: OpenRpcSpecLifecycle, + *, + details_path: Path, + output_dir: Path, + link_prefix: str | None, +) -> list[DetailsHistoryChange]: + changes: list[DetailsHistoryChange] = [ + DetailsHistoryChange( + version=spec.introduced_version, + title="Initial selected snapshot", + details=f"{len([method for method in spec.methods if method.introduced_version == spec.introduced_version])} methods were present when this source stream first appears in the selected inputs.", + tone="added", + ) + ] + + for method in spec.methods: + operation_path = operation_page_path(output_dir, spec, method) + href = page_ref(details_path, operation_path, output_dir=output_dir, link_prefix=link_prefix) + if method.introduced_version != spec.introduced_version: + changes.append( + DetailsHistoryChange( + version=method.introduced_version, + title=f"Added {method.method}", + details="Method added to the published JSON-RPC surface.", + tone="added", + href=href, + ) + ) + for entry in method.change_details: + version = str(entry["version"]) + changes.append( + DetailsHistoryChange( + version=version, + title=f"Changed {method.method}", + details="; ".join(str(change) for change in entry["changes"]), + tone="changed", + href=href, + ) + ) + if method.removed_version: + changes.append( + DetailsHistoryChange( + version=method.removed_version, + title=f"Removed {method.method}", + details=f"Last seen in {method.last_seen_in}.", + tone="removed", + href=href, + ) + ) + + version_order = {version: index for index, version in enumerate(spec.versions_present)} + tone_order = {"added": 0, "changed": 1, "removed": 2} + return sorted( + changes, + key=lambda change: ( + version_order.get(change.version, len(version_order)), + tone_order.get(change.tone, 9), + change.title, + ), + ) + + +def method_inventory_cards( + spec: OpenRpcSpecLifecycle, + methods: list[OpenRpcMethodLifecycle], + *, + details_path: Path, + output_dir: Path, + link_prefix: str | None, +) -> list[ReferenceCard]: + cards: list[ReferenceCard] = [] + for method in methods: + cards.append( + ReferenceCard( + title=method.method, + href=page_ref(details_path, operation_page_path(output_dir, spec, method), output_dir=output_dir, link_prefix=link_prefix), + summary=compact_text(method.latest.get("summary") or method.latest.get("description") or "", limit=150), + badges=lifecycle_badges( + protocol_label="JSON-RPC", + introduced=method.introduced_version, + lifecycle_state=method.lifecycle_state, + changed=method.changed_in_versions, + removed=method.removed_version, + ), + meta_items=[ + ReferenceMetaItem("Parameters", str(len(method.latest.get("params", [])))), + ReferenceMetaItem("Result", str(method.latest.get("result", {}).get("schema") or "-")), + ReferenceMetaItem("Last seen", method.last_seen_in), + *lifecycle_meta_items(method), + ], + ) + ) + return cards + + +def build_spec_details_history_page( + report: OpenRpcReport, + spec: OpenRpcSpecLifecycle, + *, + output_dir: Path, + overview_name: str, + spec_dir_name: str, + link_prefix: str | None = None, +) -> DetailsHistoryPage: + details_path = spec_details_history_page_path(output_dir, spec) + spec_path = spec_page_path(output_dir, spec, spec_dir_name=spec_dir_name) + normalized_link_prefix = normalize_link_prefix(link_prefix) if link_prefix else None + active_methods = [method for method in spec.methods if method.status != "removed"] + removed_methods = [method for method in spec.methods if method.status == "removed"] + inventory_sections = [ + ReferenceSection( + heading="Published methods", + body_markdown=safe_markdown_text("These methods are present in the publish version and link to the generated operation pages."), + meta_items=[ + ReferenceMetaItem("Methods", str(len(active_methods))), + ReferenceMetaItem("Publish version", report.publish_version), + ], + cards=method_inventory_cards( + spec, + active_methods, + details_path=details_path, + output_dir=output_dir, + link_prefix=normalized_link_prefix, + ), + ) + ] + if removed_methods: + inventory_sections.append( + ReferenceSection( + heading="Removed methods", + body_markdown=safe_markdown_text("These methods are retained for history because they appeared in earlier selected inputs."), + meta_items=[ReferenceMetaItem("Methods", str(len(removed_methods)))], + cards=method_inventory_cards( + spec, + removed_methods, + details_path=details_path, + output_dir=output_dir, + link_prefix=normalized_link_prefix, + ), + ) + ) + + return DetailsHistoryPage( + path=details_path.relative_to(output_dir).as_posix(), + title=f"{spec.display_name} details and history", + description=f"Generated source details and version history for the {spec.display_name} JSON-RPC reference.", + eyebrow="Details and history", + summary="Generated-source metadata, version coverage, method inventory, and per-version changes for this source stream.", + back_link=page_ref(details_path, spec_path, output_dir=output_dir, link_prefix=normalized_link_prefix), + back_label=f"Back to {spec.display_name}", + badges=[ + ReferenceBadge("JSON-RPC", tone="protocol"), + ReferenceBadge(report.publish_version, tone="neutral"), + ReferenceBadge(f"Since {spec.introduced_version}", tone="added"), + ], + meta_items=[ + ReferenceMetaItem("Source stream", spec.display_name), + ReferenceMetaItem("Publish version", report.publish_version), + ReferenceMetaItem("Versions compared", ", ".join(spec.versions_present)), + ], + source_items=[ + ReferenceMetaItem("Input family", report.source_name), + ReferenceMetaItem("Version filter", report.version_filter), + ReferenceMetaItem("Latest source path", spec.latest_source_path), + ReferenceMetaItem("OpenRPC version", spec.openrpc_version or "-"), + ReferenceMetaItem("Spec info.version", spec.info_version or "-"), + ], + source_cards=[ + ReferenceCard( + title="Generated reference pages", + summary="Operation pages are generated from the publish-version OpenRPC document, with history calculated across selected snapshots.", + meta_items=[ + ReferenceMetaItem("Spec page", spec.display_name, href=page_ref(details_path, spec_path, output_dir=output_dir, link_prefix=normalized_link_prefix)), + ReferenceMetaItem("Operation pages", str(len(spec.methods))), + ], + ) + ], + version_rows=version_summary_rows(spec), + inventory_sections=inventory_sections, + changes=details_history_change_list( + spec, + details_path=details_path, + output_dir=output_dir, + link_prefix=normalized_link_prefix, + ), + limitations=[ + "Change detection is structural and compares selected generated inputs; it does not infer behavioral compatibility.", + "Method-level additions, removals, and changed request or result shapes are tracked when they are present in the selected snapshots.", + "Lifecycle labels and replacement links are included only when the source document carries that metadata.", + ], + ) + + def build_method_page( spec: OpenRpcSpecLifecycle, method: OpenRpcMethodLifecycle, diff --git a/src/x2mdx/protobuf/render.py b/src/x2mdx/protobuf/render.py index 77984c4cb..f4a591cb2 100644 --- a/src/x2mdx/protobuf/render.py +++ b/src/x2mdx/protobuf/render.py @@ -9,6 +9,9 @@ from typing import Any from x2mdx.reference_pages import ( + DetailsHistoryChange, + DetailsHistoryPage, + DetailsHistoryVersionRow, ReferenceBadge, ReferenceBreadcrumb, ReferenceCard, @@ -24,6 +27,7 @@ compact_text, relative_page_ref, render_collection_page, + render_details_history_page, render_operation_page, safe_markdown_text, ) @@ -492,6 +496,142 @@ def build_overview_page( ) +def release_version_rows(report: dict[str, Any]) -> list[DetailsHistoryVersionRow]: + rows: list[DetailsHistoryVersionRow] = [] + for release in report["releases"]: + counts = release["changes"]["counts"] + added = sum(int(counts[kind]["added"]) for kind in ("endpoints", "messages", "enums")) + changed = sum(int(counts[kind]["modified"]) for kind in ("endpoints", "messages", "enums")) + removed = sum(int(counts[kind]["removed"]) for kind in ("endpoints", "messages", "enums")) + rows.append( + DetailsHistoryVersionRow( + version=str(release["version"]), + added=str(added), + changed=str(changed), + removed=str(removed), + ) + ) + return rows + + +def package_lifecycle_badges(package: dict[str, Any], report: dict[str, Any]) -> list[ReferenceBadge]: + version_order = {str(release["version"]): index for index, release in enumerate(report["releases"])} + endpoint_lifecycles = [ + entry + for entry in report["endpointLifecycle"] + if entry.get("package") == package["package"] + ] + if not endpoint_lifecycles: + return [ReferenceBadge("Current", tone="neutral")] + + introduced = min((str(entry["introducedIn"]) for entry in endpoint_lifecycles), key=lambda version: version_order.get(version, 9999)) + changed_versions = [ + str(entry["lastChangedIn"]) + for entry in endpoint_lifecycles + if entry.get("lastChangedIn") and str(entry["lastChangedIn"]) != introduced + ] + badges = [ReferenceBadge(f"Since {introduced}", tone="added")] + if changed_versions: + latest_changed = max(changed_versions, key=lambda version: version_order.get(version, -1)) + badges.append(ReferenceBadge(f"Changed {latest_changed}", tone="changed")) + return badges + + +def protobuf_details_changes(report: dict[str, Any]) -> list[DetailsHistoryChange]: + changes: list[DetailsHistoryChange] = [] + for release in report["releases"]: + version = str(release["version"]) + counts = release["changes"]["counts"] + parts = [] + for label, key in (("endpoints", "endpoints"), ("messages", "messages"), ("enums", "enums")): + added = int(counts[key]["added"]) + changed = int(counts[key]["modified"]) + removed = int(counts[key]["removed"]) + if added or changed or removed: + parts.append(f"{label}: {added} added, {changed} changed, {removed} removed") + if parts: + changes.append( + DetailsHistoryChange( + version=version, + title=f"Release {version}", + details="; ".join(parts), + tone="changed", + ) + ) + return changes + + +def build_details_history_page( + report: dict[str, Any], + *, + output_dir: Path, + package_docs: list[dict[str, Any]], + page_title: str = "Protobuf", + page_description: str = "Descriptor-backed protobuf API source details and version history.", +) -> DetailsHistoryPage: + latest = report["latestSnapshot"] + details_path = output_dir / "index.mdx" + package_cards = [ + ReferenceCard( + title=package["package"], + href=page_ref(details_path, package_page_path(output_dir, package["package"])), + summary=compact_package_summary(package), + badges=package_lifecycle_badges(package, report), + meta_items=[ + ReferenceMetaItem("Services", str(package["serviceCount"])), + ReferenceMetaItem("Endpoints", str(package["endpointCount"])), + ReferenceMetaItem("Messages", str(package["messageCount"])), + ReferenceMetaItem("Enums", str(package["enumCount"])), + ], + ) + for package in package_docs + ] + return DetailsHistoryPage( + path="index.mdx", + title=f"{page_title} details and history", + description=page_description, + eyebrow="Details and history", + summary="Generated-source metadata, version coverage, package inventory, and per-release changes for this source stream.", + badges=[ReferenceBadge("Protobuf", tone="protocol"), ReferenceBadge(str(report["latestRelease"]), tone="neutral")], + meta_items=[ + ReferenceMetaItem("Source stream", page_title), + ReferenceMetaItem("Latest release", str(report["latestRelease"])), + ReferenceMetaItem("Versions compared", ", ".join(str(release["version"]) for release in report["releases"])), + ], + source_items=[ + ReferenceMetaItem("Input family", str(report["sourceName"])), + ReferenceMetaItem("Version filter", str(report["versionFilter"])), + ReferenceMetaItem("Packages", str(latest["stats"]["packages"])), + ReferenceMetaItem("Endpoints", str(latest["stats"]["endpoints"])), + ReferenceMetaItem("Messages", str(latest["stats"]["messages"])), + ], + source_cards=[ + ReferenceCard( + title="Generated reference pages", + summary="Package and operation pages are generated from the latest descriptor snapshot, with history calculated across selected release bundles.", + meta_items=[ + ReferenceMetaItem("Packages", str(len(package_docs))), + ReferenceMetaItem("Operations", str(latest["stats"]["endpoints"])), + ], + ) + ], + version_rows=release_version_rows(report), + inventory_sections=[ + ReferenceSection( + heading="Published packages", + body_markdown=safe_markdown_text("These packages are present in the latest selected descriptor snapshot and link to generated package pages."), + cards=package_cards, + ) + ], + changes=protobuf_details_changes(report), + limitations=[ + "Change detection is structural and compares selected descriptor images; it does not infer behavioral compatibility.", + "Endpoint, message, and enum additions, removals, and structural changes are tracked when they are present in the selected snapshots.", + "Lifecycle labels and replacement links are included only when the protobuf source or metadata overlay carries that information.", + ], + ) + + def build_package_page( package_doc: dict[str, Any], report: dict[str, Any], @@ -696,7 +836,13 @@ def build_operation_page( ) -def build_pages(report: dict[str, Any], *, output_dir: Path) -> tuple[Path, list[Any]]: +def build_pages( + report: dict[str, Any], + *, + output_dir: Path, + page_title: str = "Protobuf", + page_description: str = "Descriptor-backed protobuf API source details and version history.", +) -> tuple[Path, list[Any]]: latest = report["latestSnapshot"] ctx = { "files": latest["files"], @@ -711,7 +857,17 @@ def build_pages(report: dict[str, Any], *, output_dir: Path) -> tuple[Path, list endpoint_docs = endpoint_snapshot_map(report) lifecycle_map = {entry["id"]: entry for entry in report["endpointLifecycle"]} - pages = [render_collection_page(build_overview_page(report, output_dir=output_dir, package_docs=package_docs))] + pages = [ + render_details_history_page( + build_details_history_page( + report, + output_dir=output_dir, + package_docs=package_docs, + page_title=page_title, + page_description=page_description, + ) + ) + ] for package_doc in package_docs: pages.append( render_collection_page( diff --git a/src/x2mdx/reference_pages.py b/src/x2mdx/reference_pages.py index 920dc90cc..d50280e5d 100644 --- a/src/x2mdx/reference_pages.py +++ b/src/x2mdx/reference_pages.py @@ -78,6 +78,47 @@ class ReferenceCard: badges: list[ReferenceBadge] = field(default_factory=list) meta_items: list[ReferenceMetaItem] = field(default_factory=list) + @property + def status_label(self) -> str: + primary = self.status_primary_badge + if primary is None: + return "Current" + return primary.label + + @property + def status_tone(self) -> str: + primary = self.status_primary_badge + if primary is None: + return "neutral" + if primary.label.lower().startswith("deprecated"): + return "deprecated" + return primary.tone + + @property + def status_chips(self) -> list[ReferenceBadge]: + primary = self.status_primary_badge + ignored = {"protocol", "neutral"} + chips: list[ReferenceBadge] = [] + for badge in self.badges: + if badge == primary or badge.tone in ignored: + continue + chips.append(badge) + return chips + + @property + def status_primary_badge(self) -> ReferenceBadge | None: + priority = [ + lambda badge: badge.label.lower().startswith("removed"), + lambda badge: badge.label.lower().startswith("since"), + lambda badge: badge.label.lower().startswith("changed"), + lambda badge: badge.label.lower().startswith("deprecated"), + ] + for predicate in priority: + match = next((badge for badge in self.badges if predicate(badge)), None) + if match is not None: + return match + return next((badge for badge in self.badges if badge.tone not in {"protocol", "neutral"}), None) + @dataclass(frozen=True) class ReferenceSection: @@ -103,6 +144,76 @@ class ReferenceCollectionPage: sections: list[ReferenceSection] = field(default_factory=list) +@dataclass(frozen=True) +class DetailsHistoryVersionRow: + version: str + added: str = "-" + changed: str = "-" + removed: str = "-" + deprecated: str = "-" + replaced: str = "-" + + @property + def status_items(self) -> list["DetailsHistoryStatusItem"]: + entries = [ + ("added", self.added, "added"), + ("changed", self.changed, "changed"), + ("removed", self.removed, "removed"), + ("deprecated", self.deprecated, "deprecated"), + ("replaced", self.replaced, "replaced"), + ] + items = [ + DetailsHistoryStatusItem(label=label, value=value, tone=tone) + for label, value, tone in entries + if has_meaningful_count(value) + ] + if items: + return items + return [DetailsHistoryStatusItem(label="surface changes", value="0", tone="neutral")] + + @property + def summary(self) -> str: + items = self.status_items + if len(items) == 1 and items[0].tone == "neutral": + return "No surface changes detected in the selected inputs." + return ", ".join(f"{item.value} {item.label}" for item in items) + "." + + +@dataclass(frozen=True) +class DetailsHistoryStatusItem: + label: str + value: str + tone: str = "neutral" + + +@dataclass(frozen=True) +class DetailsHistoryChange: + version: str + title: str + details: str = "" + tone: str = "changed" + href: str | None = None + + +@dataclass(frozen=True) +class DetailsHistoryPage: + path: str + title: str + description: str | None = None + eyebrow: str | None = None + summary: str | None = None + back_link: str | None = None + back_label: str | None = None + badges: list[ReferenceBadge] = field(default_factory=list) + meta_items: list[ReferenceMetaItem] = field(default_factory=list) + source_items: list[ReferenceMetaItem] = field(default_factory=list) + source_cards: list[ReferenceCard] = field(default_factory=list) + version_rows: list[DetailsHistoryVersionRow] = field(default_factory=list) + inventory_sections: list[ReferenceSection] = field(default_factory=list) + changes: list[DetailsHistoryChange] = field(default_factory=list) + limitations: list[str] = field(default_factory=list) + + @dataclass(frozen=True) class ReferenceChange: version: str @@ -159,6 +270,17 @@ def render_collection_page(page: ReferenceCollectionPage) -> Page: ) +def render_details_history_page(page: DetailsHistoryPage) -> Page: + body = render_template("reference/details_history.md.j2", collapse_blank_lines=False, page=page) + body = "\n".join(line.rstrip() for line in body.splitlines()) + return Page( + path=page.path, + title=page.title, + description=page.description, + blocks=[RawMarkdown(body)], + ) + + def render_operation_page(page: ReferenceOperationPage) -> Page: return markdown_page_from_template( path=page.path, @@ -178,6 +300,11 @@ def compact_text(text: str, *, limit: int = 160) -> str: return normalized[: limit - 3].rstrip() + "..." +def has_meaningful_count(value: str) -> bool: + normalized = str(value or "").strip() + return bool(normalized and normalized not in {"-", "0"}) + + def safe_markdown_text(text: str) -> str: return str(text or "").replace("<", "<") diff --git a/src/x2mdx/templates/reference/details_history.md.j2 b/src/x2mdx/templates/reference/details_history.md.j2 new file mode 100644 index 000000000..bb2dba483 --- /dev/null +++ b/src/x2mdx/templates/reference/details_history.md.j2 @@ -0,0 +1,115 @@ +{% import "shared/reference_macros.md.j2" as ref %} +{{ ref.header(page.eyebrow, page.title, page.summary, page.back_link, page.back_label, page.badges, page.meta_items) }} + +## Generated from + +{{ ref.meta_grid(page.source_items) }} +{{ ref.card_grid(page.source_cards) }} + +{% if page.version_rows %} +## Version summary + +
+ Active since / added + Changed + Removed + Deprecated +
+ + + + + + + + + + +{% for row in page.version_rows %} + + + + + +{% endfor %} + +
VERSIONSTATUSSUMMARY
{{ escape_mdx_html_text(inline_text(row.version)) }} +
+ {% for item in row.status_items %} + + + {{ escape_mdx_html_text(inline_text(item.value)) }} {{ escape_mdx_html_text(inline_text(item.label)) }} + + {% endfor %} +
+
{{ escape_mdx_html_text(inline_text(row.summary)) }}
+{% endif %} + +{% if page.inventory_sections %} +## Current reference inventory + +{% for section in page.inventory_sections %} +### {{ section.heading }} + +{% if section.body_markdown %} +{{ section.body_markdown }} +{% endif %} +{{ ref.meta_grid(section.meta_items) }} +{% if section.cards %} + + + + + + + + + + {% for card in section.cards %} + + + + + + {% endfor %} + +
TYPESTATUSSUMMARY
+ {% if card.href %}{{ escape_mdx_html_text(inline_text(card.title)) }}{% else %}{{ escape_mdx_html_text(inline_text(card.title)) }}{% endif %} + +
+ + + {{ escape_mdx_html_text(inline_text(card.status_label)) }} + + {% for chip in card.status_chips %} + {{ escape_mdx_html_text(inline_text(chip.label)) }} + {% endfor %} +
+
{{ escape_mdx_html_text(inline_text(card.summary or "-")) }}
+{% endif %} +{% endfor %} +{% endif %} + +{% if page.changes %} +## Change details + +
+ {% for change in page.changes %} +
+ {{ escape_mdx_html_text(inline_text(change.version)) }} + + {% if change.href %}{{ escape_mdx_html_text(inline_text(change.title)) }}{% else %}{{ escape_mdx_html_text(inline_text(change.title)) }}{% endif %} + {% if change.details %}{{ escape_mdx_html_text(inline_text(change.details)) }}{% endif %} + +
+ {% endfor %} +
+{% endif %} + +{% if page.limitations %} +## Known limits + +{% for limitation in page.limitations %} +- {{ safe_markdown_text(limitation) }} +{% endfor %} +{% endif %} diff --git a/src/x2mdx/templating.py b/src/x2mdx/templating.py index 87c84a943..482454f73 100644 --- a/src/x2mdx/templating.py +++ b/src/x2mdx/templating.py @@ -62,6 +62,14 @@ def inline_text(value: Any) -> str: return re.sub(r"\s+", " ", "" if value is None else str(value)).strip() +def escape_md_cell(value: Any) -> str: + return str("" if value is None else value).replace("|", "\\|").replace("\n", " ") + + +def safe_markdown_text(value: Any) -> str: + return str("" if value is None else value).replace("<", "<") + + def accordion_list(title: str, items: list[str]) -> str: lines = ["", f''] lines.extend(f"- {item}" for item in items) @@ -182,6 +190,8 @@ def template_environment() -> Environment: escape_mdx_html_text=escape_mdx_html_text, escape_js_template_literal=escape_js_template_literal, inline_text=inline_text, + escape_md_cell=escape_md_cell, + safe_markdown_text=safe_markdown_text, accordion_list=accordion_list, render_card_group=render_card_group, pretty_json=pretty_json, diff --git a/src/x2mdx/typedoc/render.py b/src/x2mdx/typedoc/render.py index 19a8168ce..41b128fab 100644 --- a/src/x2mdx/typedoc/render.py +++ b/src/x2mdx/typedoc/render.py @@ -7,6 +7,16 @@ from typing import Any from x2mdx.output import Page +from x2mdx.reference_pages import ( + DetailsHistoryChange, + DetailsHistoryPage, + DetailsHistoryVersionRow, + ReferenceBadge, + ReferenceCard, + ReferenceMetaItem, + ReferenceSection, + render_details_history_page, +) from x2mdx.templating import markdown_page @@ -50,6 +60,158 @@ def version_change_summary_rows(exports: list[dict[str, object]], versions: list return rows +def version_rows(exports: list[dict[str, object]], versions: list[str]) -> list[DetailsHistoryVersionRow]: + rows: list[DetailsHistoryVersionRow] = [] + for version in versions: + added = sum(1 for export in exports if export["introduced_in"] == version) + changed = sum( + 1 + for export in exports + if any(str(entry["version"]) == version for entry in export["change_details"]) + ) + removed = sum(1 for export in exports if export["removed_in"] == version) + deprecated = sum( + 1 + for export in exports + if export["lifecycle_label"] == "Deprecated" and export["introduced_in"] == version + ) + replaced = sum(1 for export in exports if export["replaces"] and export["introduced_in"] == version) + rows.append( + DetailsHistoryVersionRow( + version=version, + added=str(added), + changed=str(changed), + removed=str(removed), + deprecated=str(deprecated or "-"), + replaced=str(replaced or "-"), + ) + ) + return rows + + +def build_details_history_page( + report, + *, + output_path: str, + page_title: str, + page_description: str, + reference_href: str, +) -> Page: + exports_by_group: dict[str, list[dict[str, Any]]] = defaultdict(list) + for export in report.exports: + exports_by_group[str(export["group"])].append(export) + + inventory_sections: list[ReferenceSection] = [] + for group_title in report.export_groups: + exports = exports_by_group.get(group_title) + if not exports: + continue + inventory_sections.append( + ReferenceSection( + heading=group_title, + cards=[ + ReferenceCard( + title=str(export["name"]), + href=f"{reference_href}#{export['anchor']}", + summary=str(export["summary"] or "-"), + badges=[ + ReferenceBadge(f"Since {export['introduced_in']}", tone="added"), + *( + [ReferenceBadge(str(export["lifecycle_label"]), tone="deprecated" if export["lifecycle_label"] == "Deprecated" else "neutral")] + if export["lifecycle_label"] + else [] + ), + *( + [ReferenceBadge(f"Changed {export['change_details'][-1]['version']}", tone="changed")] + if export["change_details"] + else [] + ), + *( + [ReferenceBadge(f"Removed {export['removed_in']}", tone="removed")] + if export["removed_in"] + else [] + ), + ], + meta_items=[ + ReferenceMetaItem("Kind", str(export["kind_label"])), + ReferenceMetaItem("Introduced", str(export["introduced_in"])), + ReferenceMetaItem("Removed", str(export["removed_in"] or "-")), + ], + ) + for export in exports + ], + ) + ) + + changes: list[DetailsHistoryChange] = [] + for export in report.exports: + href = f"{reference_href}#{export['anchor']}" + if export["introduced_in"] != report.versions[0]: + changes.append( + DetailsHistoryChange( + version=str(export["introduced_in"]), + title=f"Added {export['name']}", + details=str(export["kind_label"]), + tone="added", + href=href, + ) + ) + for entry in export["change_details"]: + changes.append( + DetailsHistoryChange( + version=str(entry["version"]), + title=f"Changed {export['name']}", + details="; ".join(str(change) for change in entry["changes"]), + tone="changed", + href=href, + ) + ) + if export["removed_in"]: + changes.append( + DetailsHistoryChange( + version=str(export["removed_in"]), + title=f"Removed {export['name']}", + details=str(export["kind_label"]), + tone="removed", + href=href, + ) + ) + + page = DetailsHistoryPage( + path=output_path, + title=f"{page_title} details and history", + description=page_description, + eyebrow="Details and history", + summary="Generated-source metadata, version coverage, export inventory, and per-version changes for this source stream.", + badges=[ReferenceBadge("TypeDoc", tone="protocol"), ReferenceBadge(report.publish_version, tone="neutral")], + meta_items=[ + ReferenceMetaItem("Source stream", report.package_name), + ReferenceMetaItem("Publish version", report.publish_version), + ReferenceMetaItem("Versions compared", ", ".join(report.versions)), + ], + source_items=[ + ReferenceMetaItem("Input family", report.source_name), + ReferenceMetaItem("Version filter", report.version_filter), + ReferenceMetaItem("Package", report.package_name), + ], + source_cards=[ + ReferenceCard( + title="Generated reference page", + summary="The TypeScript reference page is generated from the publish-version TypeDoc JSON, with history calculated across selected snapshots.", + meta_items=[ReferenceMetaItem("Exports", str(len(report.exports)))], + ) + ], + version_rows=version_rows(report.exports, report.versions), + inventory_sections=inventory_sections, + changes=sorted(changes, key=lambda change: (report.versions.index(change.version) if change.version in report.versions else 999, change.title)), + limitations=[ + "Change detection is structural and compares selected TypeDoc JSON inputs; it does not infer behavioral compatibility.", + "Lifecycle labels and replacement links are included only when parsed from supported TypeDoc metadata.", + ], + ) + return render_details_history_page(page) + + def _type_parameter_rows(items: list[dict[str, Any]]) -> list[list[str]]: return [ [ diff --git a/tests/test_asyncapi.py b/tests/test_asyncapi.py index 35321f497..344565943 100644 --- a/tests/test_asyncapi.py +++ b/tests/test_asyncapi.py @@ -426,7 +426,12 @@ def test_cli_builds_multipage_asyncapi_pages_and_updates_docs_json(self) -> None action = (output_dir / "operations" / "stream" / "subscribe.mdx").read_text(encoding="utf-8") docs = json.loads(docs_json.read_text(encoding="utf-8")) - self.assertIn("## Channels", overview) + self.assertIn("AsyncAPI WebSocket Reference details and history", overview) + self.assertIn("## Generated from", overview) + self.assertIn("## Version summary", overview) + self.assertIn("## Current reference inventory", overview) + self.assertIn("x2mdx-ref-status-table--inventory", overview) + self.assertIn('/stream', overview) self.assertIn("## Actions", channel) self.assertIn("## Outputs", action) self.assertIn("wscat", action) diff --git a/tests/test_canton_protobuf_generator.py b/tests/test_canton_protobuf_generator.py index 5978b3ce3..192f9d98e 100644 --- a/tests/test_canton_protobuf_generator.py +++ b/tests/test_canton_protobuf_generator.py @@ -130,7 +130,7 @@ def test_split_protobuf_navigation_flattens_admin_packages_under_grpc(self) -> N self.assertFalse( any(isinstance(item, dict) and item.get("group") == "Protobufs" for item in admin_grpc["pages"]) ) - self.assertEqual(admin_grpc["pages"][-1], "reference/admin-api/protobuf/index") + self.assertEqual(admin_grpc["pages"][0], "reference/admin-api/protobuf/index") if __name__ == "__main__": diff --git a/tests/test_daml_json.py b/tests/test_daml_json.py index 0aeceb7d9..976451e7f 100644 --- a/tests/test_daml_json.py +++ b/tests/test_daml_json.py @@ -194,9 +194,15 @@ def test_cli_builds_index_and_module_pages(self) -> None: self.assertIn("Utility Credential API", index_text) self.assertIn('
', index_text) - self.assertIn('

Daml Reference

', index_text) - self.assertIn('', index_text) + self.assertIn('

Details and history

', index_text) + self.assertIn("## Generated from", index_text) + self.assertIn("## Version summary", index_text) + self.assertIn("## Current reference inventory", index_text) + self.assertIn("### Published modules", index_text) + self.assertIn("### Removed modules", index_text) + self.assertIn('
DA.List', index_text) self.assertIn("Removed 1.1.0", index_text) + self.assertIn("Deprecated 1.1.0", index_text) self.assertIn("Deprecated since: `1.1.0`", list_text) self.assertIn("historical reference", legacy_text) @@ -266,4 +272,4 @@ def test_cli_uses_root_relative_link_prefix_for_overview_links(self) -> None: self.assertEqual(result, 0) index_text = (output_dir / "index.mdx").read_text(encoding="utf-8") - self.assertIn('', index_text) + self.assertIn('DA.List', index_text) diff --git a/tests/test_jvm_docs.py b/tests/test_jvm_docs.py index a4fdcbca9..45392a0c2 100644 --- a/tests/test_jvm_docs.py +++ b/tests/test_jvm_docs.py @@ -529,10 +529,10 @@ def test_cli_builds_pages_and_updates_docs_json(self) -> None: self.assertNotIn("## Lifecycle Summary", java_text) self.assertNotIn("## Package Reference", java_text) self.assertIn("## Package `com.example`", java_package_text) - self.assertIn("[`Foo`](foo)", java_package_text) - self.assertIn("[`Foo.Inner`](foo-inner)", java_package_text) - self.assertIn("[`Bar`](bar)", java_package_text) - self.assertIn("[`Legacy`](legacy)", java_package_text) + self.assertIn("[`Foo`](./foo)", java_package_text) + self.assertIn("[`Foo.Inner`](./foo-inner)", java_package_text) + self.assertIn("[`Bar`](./bar)", java_package_text) + self.assertIn("[`Legacy`](./legacy)", java_package_text) self.assertIn("## Table of Contents", java_package_text) self.assertIn("| NAME | STATUS | SUMMARY |", java_package_text) self.assertIn("`stable`", java_package_text) diff --git a/tests/test_ledger_bindings_nav.py b/tests/test_ledger_bindings_nav.py index 0447be489..0457e7cb6 100644 --- a/tests/test_ledger_bindings_nav.py +++ b/tests/test_ledger_bindings_nav.py @@ -76,11 +76,11 @@ def test_java_bindings_nav_includes_details_and_history_page(tmp_path: Path) -> assert ledger_pages[-1] == { "group": "Java Bindings", "pages": [ + "reference/java-bindings", { "group": "Javadocs", "pages": [{"group": "com.example", "pages": ["reference/java/com-example/Client"]}], }, - "reference/java-bindings", ], } diff --git a/tests/test_openrpc.py b/tests/test_openrpc.py index e8efcc554..d4438b51e 100644 --- a/tests/test_openrpc.py +++ b/tests/test_openrpc.py @@ -11,7 +11,9 @@ from x2mdx.cli import main as cli_main from x2mdx.openrpc.lifecycle import build_openrpc_report_from_sources, parse_openrpc from x2mdx.openrpc.models import OpenRpcSourceSnapshot -from x2mdx.openrpc.render import build_method_page +from x2mdx.openrpc.render import build_method_page, build_spec_details_history_page +from x2mdx.reference_pages import render_details_history_page +from x2mdx.render import render_page def write_text(path: Path, contents: str) -> None: @@ -463,3 +465,86 @@ def test_method_adapter_builds_operation_page_context(self) -> None: self.assertEqual(page.examples[0].title, "cURL") self.assertIn('"method": "status"', page.examples[0].body) self.assertEqual(page.examples[1].title, "Result") + + def test_spec_details_history_template_renders_source_scoped_openrpc_page(self) -> None: + report = build_openrpc_report_from_sources( + [ + self._snapshot( + version="1.0.0", + spec_id="user-api", + display_name="User API", + source_path="api-specs/openrpc-user-api.json", + contents=""" + { + "openrpc": "1.2.6", + "info": {"title": "User API", "version": "1.0.0"}, + "methods": [ + { + "name": "status", + "description": "Return user API status.", + "params": [], + "result": {"name": "result", "schema": {"type": "string"}} + } + ] + } + """, + ), + self._snapshot( + version="1.1.0", + spec_id="user-api", + display_name="User API", + source_path="api-specs/openrpc-user-api.json", + contents=""" + { + "openrpc": "1.2.6", + "info": {"title": "User API", "version": "1.1.0"}, + "methods": [ + { + "name": "status", + "description": "Return Wallet Gateway user API status.", + "params": [], + "result": {"name": "result", "schema": {"type": "string"}} + }, + { + "name": "balance", + "description": "Return the user balance.", + "params": [], + "result": {"name": "result", "schema": {"type": "string"}} + } + ] + } + """, + ), + ], + source_name="wallet-gateway-remote release snapshots", + version_filter="@canton-network/wallet-gateway-remote@ releases", + publish_version="1.1.0", + ) + + page = build_spec_details_history_page( + report, + report.specs[0], + output_dir=self.root / "out", + overview_name="index.mdx", + spec_dir_name="specs", + link_prefix="/reference/wallet-gateway-json-rpc", + ) + rendered = render_page(render_details_history_page(page)) + + self.assertEqual(page.path, "operations/user-api/details.mdx") + self.assertIn("User API details and history", rendered) + self.assertIn("## Generated from", rendered) + self.assertIn("## Version summary", rendered) + self.assertIn('class="x2mdx-ref-status-table"', rendered) + self.assertIn('class="x2mdx-ref-status-dot x2mdx-ref-status-dot--added"', rendered) + self.assertIn("1 added, 1 changed.", rendered) + self.assertNotIn("| Added | Changed | Removed | Deprecated | Replaced |", rendered) + self.assertIn("## Current reference inventory", rendered) + self.assertGreaterEqual(rendered.count('class="x2mdx-ref-status-table'), 2) + self.assertIn("TYPE", rendered) + self.assertIn("## Change details", rendered) + self.assertIn("Added balance", rendered) + self.assertIn("Changed status", rendered) + self.assertIn('href="/reference/wallet-gateway-json-rpc/operations/user-api/balance"', rendered) + self.assertIn("## Known limits", rendered) + self.assertNotIn("OpenAPI", rendered) diff --git a/tests/test_protobuf.py b/tests/test_protobuf.py index b84ff5b79..1440b2783 100644 --- a/tests/test_protobuf.py +++ b/tests/test_protobuf.py @@ -184,10 +184,13 @@ def test_cli_builds_overview_and_package_pages(self) -> None: / "getfoo.mdx" ).read_text(encoding="utf-8") - self.assertIn("Canton Protobuf Reference", overview_text) - self.assertIn("## Release Summary", overview_text) + self.assertIn("Protobuf details and history", overview_text) + self.assertIn("## Generated from", overview_text) + self.assertIn("## Version summary", overview_text) + self.assertIn("## Current reference inventory", overview_text) + self.assertIn("x2mdx-ref-status-table--inventory", overview_text) self.assertIn("com.example.v1", overview_text) - self.assertIn('href="packages/com-example-v1"', overview_text) + self.assertIn('href="./packages/com-example-v1"', overview_text) self.assertIn("## ExampleService", package_text) self.assertIn("ExampleService.GetFoo", package_text) self.assertIn("## Protocol Details", operation_text) diff --git a/tests/test_wallet_kernel_nav.py b/tests/test_wallet_kernel_nav.py index 75380731d..68c0f7995 100644 --- a/tests/test_wallet_kernel_nav.py +++ b/tests/test_wallet_kernel_nav.py @@ -91,15 +91,15 @@ def test_openrpc_nav_uses_wallet_gateway_section_shape(tmp_path: Path) -> None: { "group": "Sync dApp API", "pages": [ - "reference/wallet-gateway-json-rpc/operations/dapp-api/connect", "reference/wallet-gateway-json-rpc/operations/dapp-api/details", + "reference/wallet-gateway-json-rpc/operations/dapp-api/connect", ], }, { "group": "Async dApp API", "pages": [ - "reference/wallet-gateway-json-rpc/operations/dapp-remote-api/connect", "reference/wallet-gateway-json-rpc/operations/dapp-remote-api/details", + "reference/wallet-gateway-json-rpc/operations/dapp-remote-api/connect", ], }, ], @@ -107,27 +107,85 @@ def test_openrpc_nav_uses_wallet_gateway_section_shape(tmp_path: Path) -> None: { "group": "Wallet Gateway", "pages": [ + "reference/wallet-gateway-json-rpc/operations/details", { "group": "User API", "pages": [ - "reference/wallet-gateway-json-rpc/operations/user-api/createWallet", "reference/wallet-gateway-json-rpc/operations/user-api/details", + "reference/wallet-gateway-json-rpc/operations/user-api/createWallet", ], }, { "group": "Signing API", "pages": [ - "reference/wallet-gateway-json-rpc/operations/signing-api/signTransaction", "reference/wallet-gateway-json-rpc/operations/signing-api/details", + "reference/wallet-gateway-json-rpc/operations/signing-api/signTransaction", ], }, - "reference/wallet-gateway-json-rpc/operations/details", ], }, {"group": "Splice APIs", "pages": []}, ] +def test_openrpc_nav_updates_api_reference_product_shape(tmp_path: Path) -> None: + generate_wallet_gateway_openrpc_reference = load_script("generate_wallet_gateway_openrpc_reference") + docs_json = tmp_path / "docs-main" / "docs.json" + docs_json.parent.mkdir(parents=True) + docs_json.write_text( + json.dumps( + { + "navigation": { + "products": [ + {"product": "Overview", "groups": []}, + { + "product": "API Reference", + "pages": [ + {"group": "TypeScript", "pages": []}, + {"group": "Wallet Gateway JSON-RPC", "pages": ["old-wallet"]}, + ], + }, + ] + } + } + ), + encoding="utf-8", + ) + output_dir = docs_json.parent / "reference" / "wallet-gateway-json-rpc" + + write_mdx(output_dir / "index.mdx", "Wallet Gateway") + write_mdx(output_dir / "specs" / "user-api.mdx", "User API") + write_mdx(output_dir / "operations" / "user-api" / "createWallet.mdx", "createWallet") + write_mdx(output_dir / "operations" / "user-api" / "details.mdx", "User API details and history") + write_mdx(output_dir / "operations" / "details.mdx", "Details and history") + + generate_wallet_gateway_openrpc_reference.update_docs_navigation( + docs_json_path=docs_json, + dropdown_label="API Reference", + output_dir=output_dir, + spec_entries=[{"spec_id": "user-api"}], + ) + docs = json.loads(docs_json.read_text(encoding="utf-8")) + pages = docs["navigation"]["products"][1]["pages"] + + assert pages == [ + {"group": "TypeScript", "pages": []}, + { + "group": "Wallet Gateway", + "pages": [ + "reference/wallet-gateway-json-rpc/operations/details", + { + "group": "User API", + "pages": [ + "reference/wallet-gateway-json-rpc/operations/user-api/details", + "reference/wallet-gateway-json-rpc/operations/user-api/createWallet", + ], + }, + ], + }, + ] + + def test_openrpc_nav_group_helper_omits_redundant_spec_page_child(tmp_path: Path) -> None: generated_reference_nav = load_script("generated_reference_nav") docs_json = tmp_path / "docs-main" / "docs.json"