@jigx/core-sdk 1.2.0-next.27 → 1.2.0-next.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/action/index.d.ts +1 -0
- package/dist/action/index.d.ts.map +1 -1
- package/dist/action/index.js +1 -1
- package/dist/action/ja.delete-queue-command.d.ts +11 -6
- package/dist/action/ja.delete-queue-command.d.ts.map +1 -1
- package/dist/action/ja.delete-queue-command.js +8 -8
- package/dist/action/ja.execute-entities.d.ts +2 -1
- package/dist/action/ja.execute-entities.d.ts.map +1 -1
- package/dist/action/ja.execute-entities.js +3 -2
- package/dist/action/ja.execute-entity.abstract.d.ts +8 -2
- package/dist/action/ja.execute-entity.abstract.d.ts.map +1 -1
- package/dist/action/ja.execute-entity.abstract.js +17 -1
- package/dist/action/ja.queue-options.d.ts +27 -0
- package/dist/action/ja.queue-options.d.ts.map +1 -0
- package/dist/action/ja.queue-options.js +30 -0
- package/dist/action/ja.retry-queue-command.d.ts +9 -4
- package/dist/action/ja.retry-queue-command.d.ts.map +1 -1
- package/dist/action/ja.retry-queue-command.js +9 -5
- package/dist/assets/example-extraction-cache.json +4 -4
- package/dist/assets/extracted-core-sdk-examples.yaml +130 -0
- package/dist/component/jc.amount-control.d.ts +2 -2
- package/dist/component/jc.amount-control.d.ts.map +1 -1
- package/dist/component/jc.amount-control.js +1 -1
- package/dist/component/jc.number-field.d.ts +1 -0
- package/dist/component/jc.number-field.d.ts.map +1 -1
- package/dist/component/jc.number-field.js +2 -1
- package/dist/component/jc.web-view.abstract.d.ts +1 -0
- package/dist/component/jc.web-view.abstract.d.ts.map +1 -1
- package/dist/component/jc.web-view.abstract.js +1 -1
- package/dist/datasource/datasource.reference.d.ts.map +1 -1
- package/dist/datasource/datasource.reference.js +7 -2
- package/dist/function/function.abstract.d.ts +4 -2
- package/dist/function/function.abstract.d.ts.map +1 -1
- package/dist/function/function.abstract.js +5 -3
- package/dist/function/function.guard.d.ts +2 -1
- package/dist/function/function.guard.d.ts.map +1 -1
- package/dist/function/function.guard.js +3 -2
- package/dist/function/function.rest.d.ts +8 -2
- package/dist/function/function.rest.d.ts.map +1 -1
- package/dist/function/function.rest.js +10 -6
- package/dist/function/function.rest.parameter-builder.d.ts.map +1 -1
- package/dist/function/function.rest.parameter-builder.js +7 -2
- package/dist/function/function.rest.types.d.ts +2 -0
- package/dist/function/function.rest.types.d.ts.map +1 -1
- package/dist/function/function.rest.types.js +1 -1
- package/dist/function/function.soap.parameter-builder.d.ts.map +1 -1
- package/dist/function/function.soap.parameter-builder.js +7 -2
- package/dist/screen/screen.abstract.d.ts +1 -1
- package/dist/screen/screen.abstract.d.ts.map +1 -1
- package/dist/screen/screen.abstract.js +1 -1
- package/docs/index.md +25 -20
- package/docs/overview.md +42 -467
- package/docs/pattern-command-batches.md +103 -0
- package/docs/pattern-data-runtime.md +99 -0
- package/docs/pattern-datasources.md +7 -0
- package/docs/pattern-navigation.md +7 -0
- package/docs/pattern-rest-acumatica.md +7 -0
- package/docs/pattern-sync.md +8 -0
- package/docs/recipe-index.md +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Data runtime behavior
|
|
2
|
+
|
|
3
|
+
These authoring notes track mobile source at `84410ee557` (September 18, 2026).
|
|
4
|
+
Confirm feature inclusion in the target mobile build. Web-renderer support and
|
|
5
|
+
backend deployment availability are separate checks.
|
|
6
|
+
|
|
7
|
+
## REST network retries and offline replay
|
|
8
|
+
|
|
9
|
+
[Mobile #7709](https://github.com/jigx-com/jigx/pull/7709) adds a literal boolean:
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
const create = app.addFunction.rest({
|
|
13
|
+
functionId: 'create-order',
|
|
14
|
+
method: 'POST',
|
|
15
|
+
url: 'https://api.example.com/orders',
|
|
16
|
+
disableNetworkRetries: true,
|
|
17
|
+
})
|
|
18
|
+
// Alternatively: create.disableNetworkRetries(true)
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The default remains false. This controls automatic network retries, not queue replay,
|
|
22
|
+
function error-handler retry policies or exactly-once delivery. A server can accept
|
|
23
|
+
a request whose response is lost; a later offline replay can send it again. Prefer a
|
|
24
|
+
stable request ID with server-side deduplication. A reconciling guard can check for
|
|
25
|
+
an existing remote record before a create, but check-then-create alone is not atomic.
|
|
26
|
+
Do not use an Expression for disableNetworkRetries: the runtime does not evaluate it.
|
|
27
|
+
|
|
28
|
+
## Guard and when short-circuits
|
|
29
|
+
|
|
30
|
+
[Mobile #7547](https://github.com/jigx-com/jigx/pull/7547) makes REST function error
|
|
31
|
+
handlers eligible when the function's when or guard result is falsy. An explicit
|
|
32
|
+
unconditional handler, such as `.error(true)`, can therefore turn an intentional
|
|
33
|
+
skip into an error. Match the intended condition and available function context:
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
create.error('=@ctx.response.status >= 400').title('Order could not be sent')
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
This example matches HTTP failures only; it does not match a pre-request guard skip
|
|
40
|
+
or a network failure without a response. Use a separate deliberate handler for those
|
|
41
|
+
cases when needed. In the audited current source, a handler with no when defaults
|
|
42
|
+
to a caught error or a failed attempted request; a missing response before any request
|
|
43
|
+
is not by itself a provider error. This differs from the earlier PR description.
|
|
44
|
+
A skip with no matching handler preserves the runtime's short-circuit result.
|
|
45
|
+
|
|
46
|
+
Function `guard.onRetry` already exists. Internal provider retry-count plumbing from
|
|
47
|
+
[#7777](https://github.com/jigx-com/jigx/pull/7777) adds no new public SDK option or
|
|
48
|
+
expression variable.
|
|
49
|
+
|
|
50
|
+
## File conversions and JSON bodies
|
|
51
|
+
|
|
52
|
+
[Mobile #7648](https://github.com/jigx-com/jigx/pull/7648) fixes local REST
|
|
53
|
+
(`useLocalCall: true`) inputTransform evaluation to see converted body values:
|
|
54
|
+
|
|
55
|
+
```typescript
|
|
56
|
+
const fn = app.addFunction.rest({
|
|
57
|
+
functionId: 'send-attachment', method: 'POST',
|
|
58
|
+
url: 'https://api.example.com/messages', useLocalCall: true,
|
|
59
|
+
})
|
|
60
|
+
fn.params.body('file', { type: 'string', required: true })
|
|
61
|
+
fn.params.body('subject', { type: 'string', required: true })
|
|
62
|
+
fn.conversion('file', 'local-uri', 'base64')
|
|
63
|
+
fn.inputTransform('={"subject": @ctx.parameters.subject, "attachment": @ctx.parameters.file}')
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
A transform consuming file embeds converted content inside its JSON envelope.
|
|
67
|
+
A raw-file upload without such a transform can use native streaming. Do not combine
|
|
68
|
+
a JSON envelope expectation with an assumption that the request body is raw file
|
|
69
|
+
bytes. This fix is local REST behavior; do not infer identical changes in a remote
|
|
70
|
+
proxy from this mobile PR.
|
|
71
|
+
|
|
72
|
+
## Dynamic Data transfers
|
|
73
|
+
|
|
74
|
+
[Resumable transfers #7577](https://github.com/jigx-com/jigx/pull/7577) use runtime
|
|
75
|
+
and backend capabilities, with whole-file fallback. TUS uploads require the CLF
|
|
76
|
+
runtime and supporting backend; there is no new public SDK resumable switch.
|
|
77
|
+
Dynamic Data downloads use Range support when available. REST uploads follow their
|
|
78
|
+
own streaming/JSON path; an authenticated open-url viewer is a separate path too.
|
|
79
|
+
|
|
80
|
+
[Offline transfers #7690](https://github.com/jigx-com/jigx/pull/7690) can be requeued.
|
|
81
|
+
[Async upload defaults #7747](https://github.com/jigx-com/jigx/pull/7747) mean later
|
|
82
|
+
writes can proceed before an upload finishes. Use explicit scheduling from
|
|
83
|
+
[Command batches](./pattern-command-batches.md) when ordering is required.
|
|
84
|
+
|
|
85
|
+
## Basic Auth
|
|
86
|
+
|
|
87
|
+
[Mobile #7744](https://github.com/jigx-com/jigx/pull/7744) fixes credential resolution
|
|
88
|
+
for existing basicAuth parameters. Use the existing credential configuration;
|
|
89
|
+
do not add an OAuth token dependency as a workaround. No new builder option is needed.
|
|
90
|
+
|
|
91
|
+
## SQLite calculations
|
|
92
|
+
|
|
93
|
+
[Parser update #7742](https://github.com/jigx-com/jigx/pull/7742) preserves grouping
|
|
94
|
+
and delegates calculations to SQLite. `9 / 2` evaluates to `4`; use `9.0 / 2` or
|
|
95
|
+
`CAST(value AS REAL)` when a fractional result is intended. Do not assume JavaScript
|
|
96
|
+
arithmetic. Continue using parameterized queries and the
|
|
97
|
+
[datasource recipes](./pattern-datasources.md). The datasource's existing
|
|
98
|
+
`rewriteQuery(false)` opts out of rewriting; an internal function-query implementation
|
|
99
|
+
argument is not a new public Function query property.
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Pattern: Datasources
|
|
2
2
|
|
|
3
|
+
## SQLite runtime arithmetic
|
|
4
|
+
|
|
5
|
+
The mobile runtime evaluates calculations using SQLite semantics: `9 / 2` is `4`;
|
|
6
|
+
use `9.0 / 2` for a fractional result. See [Data runtime behavior](./pattern-data-runtime.md)
|
|
7
|
+
for the source baseline and [Command batches](./pattern-command-batches.md) for
|
|
8
|
+
queued write dependencies.
|
|
9
|
+
|
|
3
10
|
This is the standard approach unless the user instructs otherwise.
|
|
4
11
|
|
|
5
12
|
## Rules
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Pattern: Navigation
|
|
2
2
|
|
|
3
|
+
## Screen instance lifetime
|
|
4
|
+
|
|
5
|
+
The mobile runtime cleans up Screen instance state when that instance unmounts
|
|
6
|
+
([mobile #7507](https://github.com/jigx-com/jigx/pull/7507)). Do not use a popped
|
|
7
|
+
Screen as durable storage. Persist drafts in local tables and pass inputs when
|
|
8
|
+
reopening the Screen; Application state has a different lifetime.
|
|
9
|
+
|
|
3
10
|
## Screen lifecycle — `onFocus` vs `onLoad`
|
|
4
11
|
|
|
5
12
|
- **`onFocus`** fires when the user navigates *to* a screen (via `goto`, a tab switch,
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Pattern: REST Integration (Acumatica)
|
|
2
2
|
|
|
3
|
+
## Current mobile data behavior
|
|
4
|
+
|
|
5
|
+
Use [Command batches](./pattern-command-batches.md) for dependent queued calls and
|
|
6
|
+
[Data runtime behavior](./pattern-data-runtime.md) for disableNetworkRetries, guard
|
|
7
|
+
short-circuits, Basic Auth and conversions inside a JSON attachment body. Keep
|
|
8
|
+
server-side idempotency and persisted completion checks even when calls share a batch.
|
|
9
|
+
|
|
3
10
|
## Best-practice boundary
|
|
4
11
|
|
|
5
12
|
Use this file to define how Acumatica REST functions are built, not when UI flows should call them.
|
package/docs/pattern-sync.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Pattern: Data Sync (Acumatica)
|
|
2
2
|
|
|
3
|
+
## Queued write ordering
|
|
4
|
+
|
|
5
|
+
For dependent writes, use [Command batches](./pattern-command-batches.md).
|
|
6
|
+
Sequential action lists control enqueueing, while batch processing controls remote
|
|
7
|
+
execution. Dynamic Data file uploads now default to async; choose explicit sync
|
|
8
|
+
when subsequent work requires upload completion. See [Data runtime behavior](./pattern-data-runtime.md)
|
|
9
|
+
for replay, guard and transfer semantics.
|
|
10
|
+
|
|
3
11
|
## Overview
|
|
4
12
|
|
|
5
13
|
Syncing data from Acumatica involves:
|
package/docs/recipe-index.md
CHANGED
|
@@ -15,6 +15,8 @@ Reference implementation: `workspace/acumatica-apps/create-customer/`
|
|
|
15
15
|
| [pattern-global-actions.md](pattern-global-actions.md) | Parameter snapshotting, local save action, JSONata save expression, TypeScript helpers |
|
|
16
16
|
| [pattern-rest-acumatica.md](pattern-rest-acumatica.md) | REST functions, Acumatica conventions, functionCall, accessToken, remote sync flag |
|
|
17
17
|
| [pattern-navigation.md](pattern-navigation.md) | behaviour: 'new', $uuid(), bottom panel order, list-detail-child flow, screen-scoped datasources |
|
|
18
|
+
| [pattern-command-batches.md](pattern-command-batches.md) | Queue ordering, sync/parallel/async scheduling, uploads and batch recovery |
|
|
19
|
+
| [pattern-data-runtime.md](pattern-data-runtime.md) | REST retries, guards, converted attachments and runtime compatibility |
|
|
18
20
|
| [pattern-sync.md](pattern-sync.md) | Initial sync, continuation, diff sync, sync scopes, OData vs REST |
|
|
19
21
|
| [pattern-sync-progress.md](pattern-sync-progress.md) | Sync progress bar UI ideas — weights, step text, show/hide, cards |
|
|
20
22
|
| [pattern-javascript-functions.md](pattern-javascript-functions.md) | `app.script()` — extend JSONata with custom JS functions (math, formatting, HTML templates, validation, transformation) |
|