@or-sdk/cards 1.2.10-beta.4273.0 → 1.2.10-beta.4276.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/README.md CHANGED
@@ -1,9 +1,23 @@
1
- ## Installation:
1
+ # `@or-sdk/cards`
2
+
3
+ OneReach SDK client for Cards.
4
+
5
+ ## When to use
6
+
7
+ - Use this package when integrating with the Cards capability on the OneReach platform.
8
+ - Use its typed client and exported models instead of hand-writing requests to that service.
9
+
10
+ ## When not to use
11
+
12
+ - Do not use it for a different platform capability; choose the dedicated `@or-sdk/*` package instead.
13
+ - Do not use it for generic third-party HTTP calls.
14
+
15
+ ## Installation
2
16
  ```
3
17
  $ npm i @or-sdk/cards
4
18
  ```
5
19
 
6
- ## Usage:
20
+ ## Usage
7
21
  ```typescript
8
22
  import { Cards } from '@or-sdk/cards'
9
23
 
@@ -19,3 +33,45 @@ const cards = new Cards({
19
33
  discoveryUrl: 'http://example.discovery/endpoint'
20
34
  });
21
35
  ```
36
+
37
+ ## Configuration
38
+
39
+ - Prefer `dataHubSvcUrl` when the service URL is known; it avoids a discovery request.
40
+ - Use `discoveryUrl` only when the service URL is not available.
41
+ - Provide `token` as a bearer-token string or getter where supported.
42
+
43
+ ## Common pitfalls
44
+
45
+ - Keep the client token current when it can expire; a token getter is preferable where the constructor accepts one.
46
+ - Treat the generated TypeScript types as the authoritative contract for optional parameters and response shapes.
47
+
48
+ ## Method map
49
+
50
+ | Method | Purpose |
51
+ |---|---|
52
+ | `listCards(...)` | See the exported TypeScript signature for parameters and result. |
53
+ | `getCard(...)` | See the exported TypeScript signature for parameters and result. |
54
+ | `saveCard(...)` | See the exported TypeScript signature for parameters and result. |
55
+ | `return(...)` | See the exported TypeScript signature for parameters and result. |
56
+ | `createCard(...)` | See the exported TypeScript signature for parameters and result. |
57
+ | `updateCard(...)` | See the exported TypeScript signature for parameters and result. |
58
+ | `deleteCard(...)` | See the exported TypeScript signature for parameters and result. |
59
+ | `recoverCard(...)` | See the exported TypeScript signature for parameters and result. |
60
+ | `cloneCard(...)` | See the exported TypeScript signature for parameters and result. |
61
+ | `cloneLibraryCard(...)` | See the exported TypeScript signature for parameters and result. |
62
+ | `addTags(...)` | See the exported TypeScript signature for parameters and result. |
63
+
64
+ ## More detail
65
+
66
+ Full signatures and exported types are available in `src/` and `dist/types/`.
67
+
68
+
69
+ ## Additional API reference
70
+
71
+ Methods below were missing from the package guide. Signatures and return types are taken directly from the exported source API.
72
+
73
+ ### `Cards`
74
+
75
+ | Method | Returns | Purpose |
76
+ |---|---|---|
77
+ | `removeTags(source: Card, tagNames: string[])` | `Promise<Card>` | Remove tags |
@@ -5,16 +5,84 @@ export declare class Cards implements Taggable<Card> {
5
5
  private readonly dataHubSvc;
6
6
  private readonly tags;
7
7
  constructor(params: CardsConfig);
8
+ /**
9
+ * List cards
10
+ * ```typescript
11
+ * const cardList = await cards.listCards();
12
+ * ```
13
+ */
8
14
  listCards(params?: ListCardsParams, paginationOptions?: PaginationOptions): Promise<List<Card>>;
15
+ /**
16
+ * Get card
17
+ * ```typescript
18
+ * const card = await cards.getCard('card-id');
19
+ * ```
20
+ */
9
21
  getCard(id: string): Promise<Card>;
22
+ /**
23
+ * Save card
24
+ *
25
+ * If source contains existing id - existing card will be updated
26
+ * ```typescript
27
+ * const savedCard = await cards.saveCard(cardSource);
28
+ * ```
29
+ */
10
30
  saveCard(source: Card): Promise<Card>;
31
+ /**
32
+ * Create card
33
+ * ```typescript
34
+ * const card = await cards.createCard(cardSource);
35
+ * ```
36
+ */
11
37
  createCard(source: Card): Promise<Card>;
38
+ /**
39
+ * Update card
40
+ * ```typescript
41
+ * const card = await cards.updateCard(cardSource);
42
+ * ```
43
+ */
12
44
  updateCard(source: Card): Promise<Card>;
45
+ /**
46
+ * Delete card
47
+ * ```typescript
48
+ * await cards.deleteCard('card-id');
49
+ * ```
50
+ */
13
51
  deleteCard(cardId: string, temporarily?: boolean): Promise<void>;
52
+ /**
53
+ * Recover card
54
+ * ```typescript
55
+ * await cards.recoverCard('card-id');
56
+ * ```
57
+ */
14
58
  recoverCard(cardId: string): Promise<void>;
59
+ /**
60
+ * Clone card
61
+ * ```typescript
62
+ * const result = await cards.cloneCard('card-id');
63
+ * ```
64
+ */
15
65
  cloneCard(cardId: string, keepTemplateDetails?: boolean): Promise<Card>;
66
+ /**
67
+ * Clone card
68
+ * ```typescript
69
+ * const result = await cards.cloneCard('card-id');
70
+ * ```
71
+ */
16
72
  cloneLibraryCard(cardId: string, viewIds: string[]): Promise<Card>;
73
+ /**
74
+ * Add tags
75
+ * ```typescript
76
+ * const card = await cards.addTags(cardSource, tagIdsArr);
77
+ * ```
78
+ */
17
79
  addTags(source: Card, tagNames: string[]): Promise<Card>;
80
+ /**
81
+ * Remove tags
82
+ * ```typescript
83
+ * const card = await cards.removeTags(cardSource, tagIdsArr);
84
+ * ```
85
+ */
18
86
  removeTags(source: Card, tagNames: string[]): Promise<Card>;
19
87
  }
20
88
  //# sourceMappingURL=Cards.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Cards.d.ts","sourceRoot":"","sources":["../../src/Cards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAY,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,QAAQ,EAAgD,MAAM,cAAc,CAAC;AAEtF,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEhF,qBAAa,KAAM,YAAW,QAAQ,CAAC,IAAI,CAAC;IAC1C,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;IACxC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAO;gBAEhB,MAAM,EAAE,WAAW;IAyBlB,SAAS,CAAC,MAAM,GAAE,eAAoB,EAAE,iBAAiB,GAAE,iBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAoBvG,OAAO,CAAC,EAAE,EAAE,MA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SDK client for Cards",
4
5
  "license": "Apache-2.0",
5
6
  "main": "dist/cjs/index.js",
6
7
  "module": "dist/esm/index.js",
7
8
  "types": "dist/types/index.d.ts",
8
- "dependencies": {
9
- "@or-sdk/base": "^0.44.8-beta.4273.0",
10
- "@or-sdk/data-hub-svc": "^2.3.9-beta.4273.0",
11
- "@or-sdk/tags": "^1.1.10-beta.4273.0"
12
- },
13
- "devDependencies": {
14
- "concurrently": "^9.2.0",
15
- "typescript": "^5.6.2"
16
- },
17
- "publishConfig": {
18
- "access": "public"
19
- },
9
+ "files": [
10
+ "dist",
11
+ "src",
12
+ "README.md",
13
+ "CHANGELOG.md"
14
+ ],
20
15
  "scripts": {
21
- "build": "concurrently 'pnpm:build:*(!watch)'",
16
+ "build": "pnpm clean && concurrently 'pnpm:build:*(!watch)'",
22
17
  "build:cjs": "tsc --project tsconfig.json",
23
18
  "build:esm": "tsc --project tsconfig.esm.json",
24
19
  "build:types": "tsc --project tsconfig.types.json",
@@ -28,5 +23,17 @@
28
23
  "build:watch:types": "tsc --project tsconfig.types.json -w",
29
24
  "clean": "rm -rf ./dist",
30
25
  "dev": "pnpm build:watch:esm"
26
+ },
27
+ "dependencies": {
28
+ "@or-sdk/base": "^0.44.7",
29
+ "@or-sdk/data-hub-svc": "^2.3.9-beta.4276.0",
30
+ "@or-sdk/tags": "^1.1.10-beta.4276.0"
31
+ },
32
+ "devDependencies": {
33
+ "concurrently": "9.0.1",
34
+ "typescript": "5.6.2"
35
+ },
36
+ "publishConfig": {
37
+ "access": "public"
31
38
  }
32
- }
39
+ }
package/tsconfig.dev.json DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "extends": "./tsconfig.esm.json",
3
- "compilerOptions": {
4
- "declarationDir": "./dist/types",
5
- "rootDir": "./src",
6
- "declaration": true
7
- }
8
- }
package/tsconfig.esm.json DELETED
@@ -1,12 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "./dist/esm",
5
- "declarationDir": "./dist/types",
6
- "module": "ES6",
7
- "target": "es6",
8
- "rootDir": "./src",
9
- "declaration": true,
10
- "declarationMap": true
11
- }
12
- }
package/tsconfig.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "./dist/cjs/",
5
- "rootDir": "./src"
6
- }
7
- }
@@ -1,11 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "./dist/types",
5
- "rootDir": "./src",
6
- "declaration": true,
7
- "declarationMap": true,
8
- "emitDeclarationOnly": true,
9
- "removeComments": false
10
- }
11
- }