Skip to content

Commit

Permalink
Merge pull request #383 from doc4d/main
Browse files Browse the repository at this point in the history
update lang properties
  • Loading branch information
guillaume-kotulski authored Dec 26, 2024
2 parents c071bce + 8f9f1c7 commit 3d77d41
Show file tree
Hide file tree
Showing 13,114 changed files with 133,373 additions and 38,261 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ jobs:
workflow-check:
uses: ./.github/workflows/workflow-syntax-check.yml
workflow-build:
uses: ./.github/workflows/workflow-build.yml
uses: ./.github/workflows/workflow-build.yml
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
16 changes: 9 additions & 7 deletions docs/API/CryptoKeyClass.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,21 +304,22 @@ PEM definition of an encryption key to load. If the key is a private key, the RS

|Release|Changes|
|---|---|
|20 R8|Support of message as Blob|
|18 R4|Added
</details>

<!-- REF #CryptoKey.sign().Syntax -->.**sign** (*message* : Text ; *options* : Object) : Text<!-- END REF -->
<!-- REF #CryptoKey.sign().Syntax -->.**sign** (*message* : Text ; *options* : Object) : Text<br/>.**sign** (*message* : Blob ; *options* : Object) : Text<!-- END REF -->


<!-- REF #CryptoKey.sign().Params -->
|Parameter|Type||Description|
|---|----|---|---|
|message|Text|->|Message string to sign|
|message|Text OR Blob|->|Message to sign|
|options|Object|->|Signing options|
|Result|Text|<-|Signature in Base64 or Base64URL representation, depending on "encoding" option|
<!-- END REF -->

The `.sign()` function <!-- REF #CryptoKey.sign().Summary -->signs the utf8 representation of a *message* string<!-- END REF --> using the `CryptoKey` object keys and provided *options*. It returns its signature in base64 or base64URL format, depending on the value of the `options.encoding` attribute you passed.
The `.sign()` function <!-- REF #CryptoKey.sign().Summary -->signs the utf8 representation of a *message* string or Blob<!-- END REF --> using the `CryptoKey` object keys and provided *options*. It returns its signature in base64 or base64URL format, depending on the value of the `options.encoding` attribute you passed.

The `CryptoKey` must contain a valid **private** key.

Expand All @@ -329,11 +330,11 @@ The `CryptoKey` must contain a valid **private** key.
|hash|text|Digest algorithm to use. For example: "SHA256", "SHA384", or "SHA512". When used to produce a JWT, the hash size must match the PS@, ES@, RS@, or PS@ algorithm size|
|encodingEncrypted|text|Encoding used to convert the binary encrypted message into the result string. Can be "Base64", or "Base64URL". Default is "Base64".|
|pss|boolean|Use Probabilistic Signature Scheme (PSS). Ignored if the key is not an RSA key. Pass `true` when producing a JWT for PS@ algorithm|
|encoding|text|ERepresentation to be used for result signature. Possible values: "Base64" or "Base64URL". Default is "Base64".|
|encoding|text|Representation to be used for result signature. Possible values: "Base64" or "Base64URL". Default is "Base64".|

#### *Result*

The utf8 representation of the *message* string.
The utf8 representation of the *message*.
<!-- END REF -->

<!-- REF CryptoKey.size -->
Expand Down Expand Up @@ -382,16 +383,17 @@ Contains the <!-- REF #CryptoKey.type.Summary -->name of the key type - "RSA", "

|Release|Changes|
|---|---|
|20 R8|Support of message as Blob|
|18 R4|Added
</details>

<!-- REF #CryptoKey.verify().Syntax -->**.verify**( *message* : Text ; *signature* : Text ; *options* : Object) : Object<!-- END REF -->
<!-- REF #CryptoKey.verify().Syntax -->**.verify**( *message* : Text ; *signature* : Text ; *options* : Object) : Object<br/>*.verify**( *message* : Blob ; *signature* : Text ; *options* : Object) : Object<!-- END REF -->


<!-- REF #CryptoKey.verify().Params -->
|Parameter|Type||Description|
|---|---|---|---|
|message|Text|->|Message string that was used to produce the signature|
|message|Text OR Blob|->|Message that was used to produce the signature|
|signature|Text|->|Signature to verify, in Base64 or Base64URL representation, depending on `options.encoding` value|
|options|Object|->|Signing options|
|Result|Object|<-|Status of the verification|
Expand Down
16 changes: 16 additions & 0 deletions docs/API/DataClassClass.md
Original file line number Diff line number Diff line change
Expand Up @@ -1022,6 +1022,22 @@ You will not get the expected result because the null value will be evaluated by
$vSingles:=ds.Person.query("spouse = null") //correct syntax
```

#### Not equal to null or undefined values

The "not equal to *value*" comparator (`#` or `!=`) does not return attributes whose value is null or undefined. For example, the following query will only return persons whose "info.married" status is `false` and not persons whose "info.married" property is "null" or missing:

```4d
$notMarried:=ds.Person.query("info.married#true") //finds persons with attribute value is false
```

If you want to find persons whose "info.married" status is `false`, null, or not defined, you need to write:

```4d
$notMarried:=ds.Person.query("info.married#true | info.married=null") //finds false, null and undefined attributes
```



#### Not equal to in collections

When searching within dataclass object attributes containing collections, the "not equal to *value*" comparator (`#` or `!=`) will find elements where ALL properties are different from *value* (and not those where AT LEAST one property is different from *value*, which is how work other comparators). Basically, it is equivalent to search for "Not(find collection elements where property equals *value*"). For example, with the following entities:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,25 @@ id: OutgoingMessageClass
title: OutgoingMessage
---


The `4D.OutgoingMessage` class allows you to build messages to be returned by your application functions in response to [REST requests](../REST/REST_requests.md). If the response is of type `4D.OutgoingMessage`, the REST server does not return an object but the object instance of the `OutgoingMessage` class.

Typically, this class can be used in custom [HTTP request handler functions](../WebServer/http-request-handler.md#function-configuration) or in functions declared with the [`onHttpGet`](../ORDA/ordaClasses.md#onhttpget-keyword) keyword and designed to handle HTTP GET requests. Such requests are used, for example, to implement features such as download file, generate and download picture as well as receiving any content-type via a browser.
Typically, this class can be used in custom [HTTP request handler functions](../WebServer/http-request-handler.md#function-configuration) or in functions declared with the [`onHttpGet`](../ORDA/ordaClasses.md#onhttpget-keyword) keyword and designed to handle HTTP GET requests. Such requests are used, for example, to implement features such as download file, generate and download picture as well as receiving any content-type via a browser.

An instance of this class is built on 4D Server and can be sent to the browser by the [4D REST Server](../REST/gettingStarted.md) only. This class allows to use other technologies than HTTP (e.g. mobile).

<details><summary>Historique</summary>

| Release | Modifications |
| ------- | -------------- |
| 20 R7 | Classe ajoutée |


<details><summary>History</summary>

|Release|Changes|
|---|---|
|20 R7|Class added|

</details>

### Exemple
### Example

In this example, a `getFile()` function is implemented in the [Datastore class](../ORDA/ordaClasses.md#datastore-class) and [can be called](../ORDA/ordaClasses.md#onhttpget-keyword) by a REST request. The purpose is to return a **testFile.pdf** file as a response to the request:

Expand All @@ -36,25 +40,29 @@ exposed onHTTPGet Function getFile() : 4D.OutgoingMessage

### OutgoingMessage Object


4D.OutgoingMessage objects provide the following properties and functions:

| |
| -------------------------------------------------------------------------------------------------------------------------------------- |
| [<!-- INCLUDE #OutgoingMessageClass.body.Syntax -->](#body)<br/><!-- INCLUDE #OutgoingMessageClass.body.Summary --> |
| [<!-- INCLUDE #OutgoingMessageClass.headers.Syntax -->](#headers)<br/><!-- INCLUDE #OutgoingMessageClass.headers.Summary --> |
| [<!-- INCLUDE #OutgoingMessageClass.setBody().Syntax -->](#setbody)<br/><!-- INCLUDE #OutgoingMessageClass.setBody().Summary --> |
| [<!-- INCLUDE #OutgoingMessageClass.setHeader().Syntax -->](#setheader)<br/><!-- INCLUDE #OutgoingMessageClass.setHeader().Summary --> |
| [<!-- INCLUDE #OutgoingMessageClass.setStatus().Syntax -->](#setstatus)<br/><!-- INCLUDE #OutgoingMessageClass.setStatus().Summary --> |
| [<!-- INCLUDE #OutgoingMessageClass.status.Syntax -->](#status)<br/><!-- INCLUDE #OutgoingMessageClass.status.Summary --> |
||
|---|
|[<!-- INCLUDE #OutgoingMessageClass.body.Syntax -->](#body)<br/><!-- INCLUDE #OutgoingMessageClass.body.Summary -->|
|[<!-- INCLUDE #OutgoingMessageClass.headers.Syntax -->](#headers)<br/><!-- INCLUDE #OutgoingMessageClass.headers.Summary -->|
|[<!-- INCLUDE #OutgoingMessageClass.setBody().Syntax -->](#setbody)<br/><!-- INCLUDE #OutgoingMessageClass.setBody().Summary -->|
|[<!-- INCLUDE #OutgoingMessageClass.setHeader().Syntax -->](#setheader)<br/><!-- INCLUDE #OutgoingMessageClass.setHeader().Summary -->|
|[<!-- INCLUDE #OutgoingMessageClass.setStatus().Syntax -->](#setstatus)<br/><!-- INCLUDE #OutgoingMessageClass.setStatus().Summary -->|
|[<!-- INCLUDE #OutgoingMessageClass.status.Syntax -->](#status)<br/><!-- INCLUDE #OutgoingMessageClass.status.Summary -->|

:::note

A 4D.OutgoingMessage object is a [non-sharable](../Concepts/shared.md) object.

:::

<!-- REF #OutgoingMessageClass.body.Desc -->




<!-- REF #OutgoingMessageClass.body.Desc -->
## .body

<!-- REF #OutgoingMessageClass.body.Syntax -->**body** : any<!-- END REF -->
Expand All @@ -70,43 +78,42 @@ The `.body` property contains <!-- REF #OutgoingMessageClass.body.Summary -->the

The `.body` property is read-write.

You can also set the `.body` property using the [`setBody()`](#setbody) function, in which case the `content-type` header is automatically set.
You can also set the `.body` property using the [`setBody()`](#setbody) function, in which case the `content-type` header is automatically set.

<!-- END REF -->

<!-- REF #OutgoingMessageClass.headers.Desc -->

<!-- REF #OutgoingMessageClass.headers.Desc -->
## .headers

<!-- REF #OutgoingMessageClass.headers.Syntax -->**headers** : Object<!-- END REF -->

#### Description

The `.headers` property contains <!-- REF #OutgoingMessageClass.headers.Summary -->the current headers of the outgoing message as key/value pairs<!-- END REF -->.
The `.headers` property contains <!-- REF #OutgoingMessageClass.headers.Summary -->the current headers of the outgoing message as key/value pairs<!-- END REF -->.

The `.headers` property is read-only. To set a header, use the [`setHeader()`](#setheader) function.
The `.headers` property is read-only. To set a header, use the [`setHeader()`](#setheader) function.

<!-- END REF -->

<!-- REF #OutgoingMessageClass.setBody().Desc -->

<!-- REF #OutgoingMessageClass.setBody().Desc -->
## .setBody()

<!-- REF #OutgoingMessageClass.setBody().Syntax -->**.setBody**( *body* : any )<!-- END REF -->

<!-- REF #OutgoingMessageClass.setBody().Params -->

| Paramètres | Type | | Description |
| ---------- | ---- | -- | ---------------------------- |
| body | any | -> | Body of the outgoing message |

<!-- REF #OutgoingMessageClass.setBody().Params -->
|Parameter|Type||Description|
|---|--- |---|------|
|body|any |->|Body of the outgoing message|
<!-- END REF -->

#### Description

The `.setBody()` function <!-- REF #OutgoingMessageClass.setBody().Summary -->sets the outgoing message *body*<!-- END REF -->.

The following data types are supported in the *body*:
The following data types are supported in the *body*:

- Text
- Blob
Expand All @@ -124,47 +131,45 @@ If *body* is not of a supported value type, an error is returned.

<!-- END REF -->

<!-- REF #OutgoingMessageClass.setHeader().Desc -->

<!-- REF #OutgoingMessageClass.setHeader().Desc -->
## .setHeader()

<!-- REF #OutgoingMessageClass.setHeader().Syntax -->**.setHeader**( *key* : Text ; *value* : Text )<!-- END REF -->

<!-- REF #OutgoingMessageClass.setHeader().Params -->

| Paramètres | Type | | Description |
| ---------- | ---- | -- | ---------------------------- |
| key | Text | -> | Header property to set |
| value | Text | -> | Value of the header property |

<!-- REF #OutgoingMessageClass.setHeader().Params -->
|Parameter|Type||Description|
|---|--- |---|------|
|key|Text|->|Header property to set|
|value|Text|->|Value of the header property|
<!-- END REF -->

#### Description

The `.setHeader()` function <!-- REF #OutgoingMessageClass.setHeader().Summary -->sets the outgoing message header *key* with the provided *value*<!-- END REF -->. If both parameters are not Text values, an error is raised.

When returning a 4D.OutgoingMessage object instance, 4D automatically sets some headers (e.g. `Set-Cookie` with `WASID4D=...` and `4DSID__ProjectName_=....`).
When returning a 4D.OutgoingMessage object instance, 4D automatically sets some headers (e.g. `Set-Cookie` with `WASID4D=...` and `4DSID__ProjectName_=....`).

:::note

If you set a *value* for the "Content-Type" header *key*, make sure you call this function after the call to [`setBody()`](#setbody), because `setBody()` automatically fills this header. For a list of "Content-Type" header values, please refer to the [`WEB SEND BLOB`](../commands-legacy/web-send-blob.md) documentation.
If you set a *value* for the "Content-Type" header *key*, make sure you call this function after the call to [`setBody()`](#setbody), because `setBody()` automatically fills this header. For a list of "Content-Type" header values, please refer to the [`WEB SEND BLOB`](../commands-legacy/web-send-blob.md) documentation.

:::


<!-- END REF -->

<!-- REF #OutgoingMessageClass.setStatus().Desc -->

## .setStatus()

<!-- REF #OutgoingMessageClass.setStatus().Syntax -->**.setStatus**( *status* : Integer )<!-- END REF -->

<!-- REF #OutgoingMessageClass.setStatus().Params -->

| Paramètres | Type | | Description |
| ---------- | ------- | -- | ------------- |
| status | Integer | -> | Status to set |

<!-- REF #OutgoingMessageClass.setStatus().Params -->
|Parameter|Type||Description|
|---|--- |---|------|
|status|Integer|->|Status to set|
<!-- END REF -->

#### Description
Expand All @@ -173,12 +178,14 @@ The `.setStatus()` function <!-- REF #OutgoingMessageClass.setStatus().Summary -

If *status* is not an integer value, an error is raised.

For a list of HTTP status codes, please refer the [HTTP status code list on Wikipedia](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes).
For a list of HTTP status codes, please refer the [HTTP status code list on Wikipedia](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes).


<!-- END REF -->

<!-- REF #OutgoingMessageClass.status.Desc -->


<!-- REF #OutgoingMessageClass.status.Desc -->
## .status

<!-- REF #OutgoingMessageClass.status.Syntax -->**status** : Integer<!-- END REF -->
Expand Down
3 changes: 1 addition & 2 deletions docs/Debugging/debugging-remote.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ Only one debugger can debug a 4D Server application at a given time. It is calle
* the local 4D Server debugger (default) - if the server is not running headless.
* the debugger of a remote 4D client - if the remote session has access to Design mode.
* the [Qodly debugger](../WebServer/qodly-studio.md#using-qodly-debugger-on-4d-server) on 4D Server - if the server allows access to Qodly Studio.
* the VS Code debugger, provided you installed the [4D-Debugger](https://github.com/4d/4D-Debugger-VSCode) extension.
* the **VS Code** debugger, provided you installed the [4D-Debugger](https://github.com/4d/4D-Debugger-VSCode) extension.

:::

The attached debugger is called whenever a 4D Server encounters:
* a break point
Expand Down
3 changes: 3 additions & 0 deletions docs/Notes/updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ Read [**What’s new in 4D 20 R8**](https://blog.4d.com/en-whats-new-in-4d-v20-R
- Support of [standalone sessions](../API/SessionClass.md) to simplify local coding for client/server applications.
- [4D debugger](../Debugging/debugger.md): new design and auto-save, display mode features.
- [New built component architecture](../Desktop/building.md#build-component) for a better compliance with Apple notarization guidelines.
- Dependencies: Use the Dependency manager to [check for new versions](../Project/components.md#checking-for-new-versions) and [update](../Project/components.md#updating-dependencies) GitHub components.
- 4D Language:
- Modified commands: [`FORM EDIT`](../commands/form-edit.md)
- [`.sign()`](../API/CryptoKeyClass.md#sign) and [`.verify()`](../API/CryptoKeyClass.md#verify) functions of the [4D.CryptoKey class](../API/CryptoKeyClass.md) support Blob in the *message* parameter.
- [**Fixed bug list**](https://bugs.4d.fr/fixedbugslist?version=20_R8): list of all bugs that have been fixed in 4D 20 R8.

#### Behavior changes
Expand Down Expand Up @@ -54,6 +56,7 @@ Read [**What’s new in 4D 20 R7**](https://blog.4d.com/en-whats-new-in-4d-v20-R

- Documentations for [4D Language](../commands/command-index.md) and [4D Write Pro Language](../WritePro/commands/command-index.md) are now fully available on developer.4d.com. Find out about all the new features and changes concerning these documentations in this release note.
- The [`File`](../commands/file.md) command (as well as [`4D.File.new()`](../API/FileClass.md#4dfilenew)) is stricter when it comes to checking the syntax of the *path* supplied as a parameter.
- The **describe** action [permission](../ORDA/privileges.md#permission-actions) has been removed from available actions. Access to [`/rest/$catalog`](../REST/$catalog.md) urls is no longer controlled. Session *describe* privileges are now ignored.


## 4D 20 R6
Expand Down
2 changes: 1 addition & 1 deletion docs/ORDA/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ title: Glossary

## Action

Every action that can be done on a [resource](#resource). Available actions are: create, read, update, drop, execute, promote, and describe.
Every action that can be done on a [resource](#resource). Available actions are: create, read, update, drop, execute, and promote.

## Attribute

Expand Down
Loading

0 comments on commit 3d77d41

Please sign in to comment.