@delopay/sdk 0.97.0 → 0.98.0

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/index.d.cts CHANGED
@@ -3898,7 +3898,13 @@ interface AvailabilityPreviewResponse {
3898
3898
  * dashboard (or any client) uses these to hide UI elements for actions
3899
3899
  * the caller's role cannot perform, via `getRolePermissions()`.
3900
3900
  */
3901
- type ParentGroup = 'Operations' | 'Refunds' | 'Connectors' | 'Workflows' | 'Analytics' | 'Users' | 'Account' | 'ReconOps' | 'ReconReports' | 'Internal' | 'Theme' | 'ShopDetails' | 'ApiKeys' | 'Impersonation' | 'Settlement'
3901
+ type ParentGroup = 'Operations' | 'Refunds'
3902
+ /**
3903
+ * Connector accounts. The only group offering the `Edit` scope, for a role
3904
+ * that may add and maintain connectors but must not delete one — see
3905
+ * {@link PermissionScope}.
3906
+ */
3907
+ | 'Connectors' | 'Workflows' | 'Analytics' | 'Users' | 'Account' | 'ReconOps' | 'ReconReports' | 'Internal' | 'Theme' | 'ShopDetails' | 'ApiKeys' | 'Impersonation' | 'Settlement'
3902
3908
  /**
3903
3909
  * Whether the caller may open a transaction in the payment provider's own
3904
3910
  * dashboard. Gates discoverability of the deep link, not access — the id it
@@ -3906,8 +3912,24 @@ type ParentGroup = 'Operations' | 'Refunds' | 'Connectors' | 'Workflows' | 'Anal
3906
3912
  * the user itself. `Read` is the only scope.
3907
3913
  */
3908
3914
  | 'ConnectorDashboard';
3909
- /** Two scopes — `Read` allows viewing, `Write` is required for any mutation. */
3910
- type PermissionScope = 'Read' | 'Write';
3915
+ /**
3916
+ * What a role may do to the resources a {@link ParentGroup} names.
3917
+ *
3918
+ * A **ladder**, not a set: a scope carries every scope below it, so a role with
3919
+ * `Write` also satisfies `Edit` and `Read`. Order is `Read` < `Edit` < `Write`.
3920
+ *
3921
+ * - `Read` — view only.
3922
+ * - `Edit` — create and update, but **not** delete.
3923
+ * - `Write` — create, update and delete.
3924
+ *
3925
+ * `Edit` is offered for `Connectors` only. It was added beneath `Write` rather
3926
+ * than a `Delete` scope being added above it, so `Write` still means exactly
3927
+ * what it always did and no existing role's powers changed — treat `Write` as
3928
+ * full control, including deletion, as before.
3929
+ *
3930
+ * A role holding `Edit` may add and maintain connectors but cannot remove one.
3931
+ */
3932
+ type PermissionScope = 'Read' | 'Edit' | 'Write';
3911
3933
  /**
3912
3934
  * One entry in the response of `GET /user/role/v3`. The caller's role
3913
3935
  * has the listed `scopes` for the resources implied by `name`.
package/dist/index.d.ts CHANGED
@@ -3898,7 +3898,13 @@ interface AvailabilityPreviewResponse {
3898
3898
  * dashboard (or any client) uses these to hide UI elements for actions
3899
3899
  * the caller's role cannot perform, via `getRolePermissions()`.
3900
3900
  */
3901
- type ParentGroup = 'Operations' | 'Refunds' | 'Connectors' | 'Workflows' | 'Analytics' | 'Users' | 'Account' | 'ReconOps' | 'ReconReports' | 'Internal' | 'Theme' | 'ShopDetails' | 'ApiKeys' | 'Impersonation' | 'Settlement'
3901
+ type ParentGroup = 'Operations' | 'Refunds'
3902
+ /**
3903
+ * Connector accounts. The only group offering the `Edit` scope, for a role
3904
+ * that may add and maintain connectors but must not delete one — see
3905
+ * {@link PermissionScope}.
3906
+ */
3907
+ | 'Connectors' | 'Workflows' | 'Analytics' | 'Users' | 'Account' | 'ReconOps' | 'ReconReports' | 'Internal' | 'Theme' | 'ShopDetails' | 'ApiKeys' | 'Impersonation' | 'Settlement'
3902
3908
  /**
3903
3909
  * Whether the caller may open a transaction in the payment provider's own
3904
3910
  * dashboard. Gates discoverability of the deep link, not access — the id it
@@ -3906,8 +3912,24 @@ type ParentGroup = 'Operations' | 'Refunds' | 'Connectors' | 'Workflows' | 'Anal
3906
3912
  * the user itself. `Read` is the only scope.
3907
3913
  */
3908
3914
  | 'ConnectorDashboard';
3909
- /** Two scopes — `Read` allows viewing, `Write` is required for any mutation. */
3910
- type PermissionScope = 'Read' | 'Write';
3915
+ /**
3916
+ * What a role may do to the resources a {@link ParentGroup} names.
3917
+ *
3918
+ * A **ladder**, not a set: a scope carries every scope below it, so a role with
3919
+ * `Write` also satisfies `Edit` and `Read`. Order is `Read` < `Edit` < `Write`.
3920
+ *
3921
+ * - `Read` — view only.
3922
+ * - `Edit` — create and update, but **not** delete.
3923
+ * - `Write` — create, update and delete.
3924
+ *
3925
+ * `Edit` is offered for `Connectors` only. It was added beneath `Write` rather
3926
+ * than a `Delete` scope being added above it, so `Write` still means exactly
3927
+ * what it always did and no existing role's powers changed — treat `Write` as
3928
+ * full control, including deletion, as before.
3929
+ *
3930
+ * A role holding `Edit` may add and maintain connectors but cannot remove one.
3931
+ */
3932
+ type PermissionScope = 'Read' | 'Edit' | 'Write';
3911
3933
  /**
3912
3934
  * One entry in the response of `GET /user/role/v3`. The caller's role
3913
3935
  * has the listed `scopes` for the resources implied by `name`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@delopay/sdk",
3
- "version": "0.97.0",
3
+ "version": "0.98.0",
4
4
  "description": "Official Delopay TypeScript SDK",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -32,21 +32,6 @@
32
32
  "files": [
33
33
  "dist"
34
34
  ],
35
- "scripts": {
36
- "build": "tsup",
37
- "prepublishOnly": "pnpm check && tsup",
38
- "test": "vitest run",
39
- "test:watch": "vitest",
40
- "typecheck": "tsc --noEmit",
41
- "lint": "oxlint && eslint .",
42
- "lint:fix": "oxlint --fix && eslint . --fix",
43
- "format": "prettier --write .",
44
- "format:check": "prettier --check .",
45
- "check": "pnpm typecheck && pnpm lint && pnpm format:check && pnpm test && pnpm check:parity",
46
- "check:parity": "node scripts/parity-check.mjs",
47
- "validate:types": "npx tsx scripts/validate-types.ts",
48
- "gen:parity-corpus": "npx tsx scripts/gen-custom-field-parity-corpus.ts ../delopay-backend/crates/router/src/core/payment_link/custom_fields_parity_corpus.json"
49
- },
50
35
  "devDependencies": {
51
36
  "@eslint/js": "^10.0.1",
52
37
  "@types/node": "^25.6.0",
@@ -61,5 +46,19 @@
61
46
  "engines": {
62
47
  "node": ">=18.0.0"
63
48
  },
64
- "license": "MIT"
65
- }
49
+ "license": "MIT",
50
+ "scripts": {
51
+ "build": "tsup",
52
+ "test": "vitest run",
53
+ "test:watch": "vitest",
54
+ "typecheck": "tsc --noEmit",
55
+ "lint": "oxlint && eslint .",
56
+ "lint:fix": "oxlint --fix && eslint . --fix",
57
+ "format": "prettier --write .",
58
+ "format:check": "prettier --check .",
59
+ "check": "pnpm typecheck && pnpm lint && pnpm format:check && pnpm test && pnpm check:parity",
60
+ "check:parity": "node scripts/parity-check.mjs",
61
+ "validate:types": "npx tsx scripts/validate-types.ts",
62
+ "gen:parity-corpus": "npx tsx scripts/gen-custom-field-parity-corpus.ts ../delopay-backend/crates/router/src/core/payment_link/custom_fields_parity_corpus.json"
63
+ }
64
+ }