Skip to content

Releases: appwrite/sdk-generator

4.3.0

Choose a tag to compare

@ChiragAgg5k ChiragAgg5k released this 21 Aug 11:16
0c54ee3

What's Changed

Full Changelog: 4.2.0...4.3.0

4.2.0

Choose a tag to compare

@ChiragAgg5k ChiragAgg5k released this 21 Aug 09:24
6b4b88b

What's Changed

  • chore(deps): update gradle to v9.7.1 by @renovate-appwrite[bot] in #1819
  • feat: consume annotated enumerations by @ChiragAgg5k in #1818

Full Changelog: 4.1.0...4.2.0

4.1.0

Choose a tag to compare

@ChiragAgg5k ChiragAgg5k released this 21 Aug 03:56
9359528

Open enum parameters

An endpoint can document the values callers usually want without closing the set. In the spec that is anyOf over a string enum and an enum-free string branch.

Generated SDKs now keep both sides of that contract: documented values stay available as completions or constants, and any other string is still valid.

TypeScript is the only generated surface that can express this as a single type. The intersection keeps completions without letting string absorb the enum:

client.create(..., {
  webhookEvent: WebhookEvent.UserCreated, // completion
  // or
  webhookEvent: 'my.custom.event',        // any string
})
(WebhookEvent | (string & {}))[]

Every other SDK types the parameter as a plain string and emits the documented values as optional constants, so a closed language enum never rejects a custom value.

$client->create(..., webhookEvent: WebhookEvent::USERCREATED);
$client->create(..., webhookEvent: 'my.custom.event');
client.create(webhookEvent: WebhookEvent.userCreated);
client.create(webhookEvent: 'my.custom.event');
Language Parameter type Generated artifact
Web / Node / RN / Deno (WebhookEvent | (string & {})) enum WebhookEvent { UserCreated = 'user.created' }
PHP string final class WebhookEvent { public const USERCREATED = 'user.created'; }
Dart / Flutter String class WebhookEvent { static const String userCreated = 'user.created'; }
Kotlin / Android String object WebhookEvent { const val USERCREATED = "user.created" }
Swift / Apple String enum WebhookEvent { public static let userCreated = "user.created" }
Python str class attributes, not enum.Enum
Go / CLI / REST / GraphQL string no enum file

Scalar and array parameters both work. Before this, the parser exposed the raw composite and the generator treated it as an object, so TypeScript arrays degraded to Record<string, any>[].

Generator

Shape recognition lives in utopia-php/openapi. This generator consumes CompositeSchema::openStringEnumBranch() and keeps language-specific rendering locally. There is no generator-side union parser.

If the same enum name is open in one place and closed in another, the generated type stays closed. Open parameters are still typed as string (or the TypeScript union).

Other changes

  • Languages own open-enum typing instead of SDK special-casing Web and Deno
  • Open-enum examples unwrap the documented branch
  • utopia-php/openapi 0.1.5
  • mockery/mockery 1.6.15

Full Changelog: 4.0.6...4.1.0

4.0.6

Choose a tag to compare

@ChiragAgg5k ChiragAgg5k released this 19 Aug 10:18
c9fa3b8

What's Changed

Full Changelog: 4.0.5...4.0.6

4.0.5

Choose a tag to compare

@ChiragAgg5k ChiragAgg5k released this 19 Aug 08:37
0a61352

What's Changed

  • Prompt CLI login after refresh token rejection by @ChiragAgg5k in #1808
  • Generate formatted Dart and Flutter SDKs by @ChiragAgg5k in #1809
  • chore(deps): update dependency mockery/mockery to v1.6.14 by @renovate-appwrite[bot] in #1810
  • feat(cli): add guided function setup workflow by @ChiragAgg5k in #1811

Full Changelog: 4.0.4...4.0.5

4.0.4

Choose a tag to compare

@ChiragAgg5k ChiragAgg5k released this 18 Aug 03:33
5d3a873

What's Changed

Full Changelog: 4.0.3...4.0.4

4.0.3

Choose a tag to compare

@ChiragAgg5k ChiragAgg5k released this 17 Aug 11:00
612cdc2

What's Changed

  • chore(deps): update android and kotlin sdk template dependencies to v5.5.0 by @renovate-appwrite[bot] in #1805
  • fix(go): stop HTML-escaping model doc comments by @ChiragAgg5k in #1806

Full Changelog: 4.0.2...4.0.3

4.0.2

Choose a tag to compare

@ChiragAgg5k ChiragAgg5k released this 17 Aug 05:03
463353d

What's Changed

Full Changelog: 4.0.1...4.0.2

4.0.1

Choose a tag to compare

@ChiragAgg5k ChiragAgg5k released this 15 Aug 17:14
b02a0c0

What's Changed

Full Changelog: 4.0.0...4.0.1

4.0.0

Choose a tag to compare

@ChiragAgg5k ChiragAgg5k released this 15 Aug 09:09
2aa03be

The cli target now generates the Go CLI. The TypeScript implementation under templates/cli/lib is gone — 32,844 lines of commands, type generation and utilities — and templates/go-cli has moved into its place.

Why major

cli is the same target name producing a different language. Anything that drives this repository sees the change:

  • php example.php cli writes a Go module to examples/cli/. It no longer writes a Node package, and there is no package.json, package-lock.json.twig or tsconfig.json in the output.
  • go-cli is no longer an SDK argument. It was the transitional name while both implementations existed; cli is the only one now.
  • templates/go-cli/** has moved to templates/cli/**. A fork carrying patches against either path needs to rebase onto the new one.
  • The Bun end-to-end suites (CLIBun10Test, CLIBun11Test, CLIBun13Test) are removed. GoCLI126Test is now CLIGo126Test, GoCLIWasmTest is CLIWasmTest, and GoCLIWasmBrowserTest is CLIWasmBrowserTest, with their fixtures renamed to match.

Distribution is unchanged

The CLI still installs as appwrite-cli from npm and as appwrite from Scoop and the install scripts. The npm package is now a launcher that resolves a per-platform native binary through optionalDependencies rather than a bundled JavaScript entry point — no postinstall download, so it works under npm ci --ignore-scripts and behind a proxied registry, and each binary is integrity-checked like any other dependency.

Release asset names are unchanged and derive from a single parameter, language.params.npmPackage, shared by .goreleaser.yaml, the Scoop manifest, install.sh, install.ps1 and the npm platform packages. An existing install upgrades in place.

Fixes

  • The WASM suites were not running. CLIWasmTest and CLIWasmBrowserTest were renamed with the rest of the move but never added to the CI matrix, leaving the browser build — its own build tag, GOOS=js, a Chromium driver — with no coverage. Both are in the matrix now.
  • The npm launcher lost its check. Removing the TypeScript build steps from validation took the Node setup with them, so a broken bin field or a syntax error in run.js would have shipped silently. The CLI ships as a native binary behind a launcher, so it now has a check of its own rather than the generic entry-point one.
  • Generated npm packages declared an empty license. sdk.license was never set, while the Scoop manifest hardcoded BSD-3-Clause. Both now read the same value.

Other Changes

  • The CLI agent skill is rewritten as usage guidance: pull before push, pull only when the change table shows an empty local side, and --force as the non-interactive path. The stale boolean-flag warning is dropped.
  • mockery/mockery updated to 1.6.13 in the SDK templates.
  • The generated module targets Go 1.26.5; CI builds and tests it on 1.26.6.