@osdk/functions 1.5.0-beta.3 → 1.5.0-beta.4

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.
Files changed (47) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/build/browser/public/experimental.js +2 -0
  3. package/build/browser/public/experimental.js.map +1 -0
  4. package/build/browser/public/unstable-do-not-use.js +1 -0
  5. package/build/browser/public/unstable-do-not-use.js.map +1 -1
  6. package/build/browser/transactions/EditRequestManager.js +20 -1
  7. package/build/browser/transactions/EditRequestManager.js.map +1 -1
  8. package/build/browser/transactions/EditRequestManager.test.js +130 -0
  9. package/build/browser/transactions/EditRequestManager.test.js.map +1 -1
  10. package/build/browser/transactions/WriteableClient.js.map +1 -1
  11. package/build/browser/transactions/createWriteableClient.js +5 -5
  12. package/build/browser/transactions/createWriteableClient.js.map +1 -1
  13. package/build/browser/transactions/flushEdits.js +21 -0
  14. package/build/browser/transactions/flushEdits.js.map +1 -0
  15. package/build/cjs/public/experimental.cjs +4 -0
  16. package/build/cjs/public/experimental.cjs.map +1 -0
  17. package/build/cjs/public/experimental.d.cts +35 -0
  18. package/build/cjs/public/unstable-do-not-use.cjs +33 -6
  19. package/build/cjs/public/unstable-do-not-use.cjs.map +1 -1
  20. package/build/cjs/public/unstable-do-not-use.d.cts +7 -19
  21. package/build/esm/public/experimental.js +2 -0
  22. package/build/esm/public/experimental.js.map +1 -0
  23. package/build/esm/public/unstable-do-not-use.js +1 -0
  24. package/build/esm/public/unstable-do-not-use.js.map +1 -1
  25. package/build/esm/transactions/EditRequestManager.js +20 -1
  26. package/build/esm/transactions/EditRequestManager.js.map +1 -1
  27. package/build/esm/transactions/EditRequestManager.test.js +130 -0
  28. package/build/esm/transactions/EditRequestManager.test.js.map +1 -1
  29. package/build/esm/transactions/WriteableClient.js.map +1 -1
  30. package/build/esm/transactions/createWriteableClient.js +5 -5
  31. package/build/esm/transactions/createWriteableClient.js.map +1 -1
  32. package/build/esm/transactions/flushEdits.js +21 -0
  33. package/build/esm/transactions/flushEdits.js.map +1 -0
  34. package/build/types/public/experimental.d.ts +1 -0
  35. package/build/types/public/experimental.d.ts.map +1 -0
  36. package/build/types/public/unstable-do-not-use.d.ts +1 -0
  37. package/build/types/public/unstable-do-not-use.d.ts.map +1 -1
  38. package/build/types/transactions/EditRequestManager.d.ts +1 -0
  39. package/build/types/transactions/EditRequestManager.d.ts.map +1 -1
  40. package/build/types/transactions/WriteableClient.d.ts +3 -1
  41. package/build/types/transactions/WriteableClient.d.ts.map +1 -1
  42. package/build/types/transactions/createWriteableClient.d.ts +2 -2
  43. package/build/types/transactions/createWriteableClient.d.ts.map +1 -1
  44. package/build/types/transactions/flushEdits.d.ts +2 -0
  45. package/build/types/transactions/flushEdits.d.ts.map +1 -0
  46. package/experimental.d.ts +17 -0
  47. package/package.json +12 -3
@@ -10,4 +10,5 @@ export declare class EditRequestManager {
10
10
  postEdit(edit: TransactionEdit): Promise<void>;
11
11
  private createInitialPromiseWithTimeout;
12
12
  private dispatchRequest;
13
+ flushPendingEdits(): Promise<void>;
13
14
  }
@@ -1 +1 @@
1
- {"mappings":"AAgBA,cAEO,uBACA,0BAA2B;AAClC,cAAc,uBAAuB,sBAAuB;AAG5D,OAAO,cAAM,mBAAmB;CAC9B,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,QAAQ;CAER,AAAO,YAAYA,QAAQ;CAI3B,AAAO,SAASC,MAAM,kBAAkB;CA2BxC,QAAQ;CAgBR,QAAc;AAWf","names":["client: WriteableClient<any>","edit: TransactionEdit"],"sources":["../../../src/transactions/EditRequestManager.ts"],"version":3,"file":"EditRequestManager.d.ts"}
1
+ {"mappings":"AAgBA,cAEO,uBACA,0BAA2B;AAClC,cAAc,uBAAuB,sBAAuB;AAG5D,OAAO,cAAM,mBAAmB;CAC9B,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,QAAQ;CAER,AAAO,YAAYA,QAAQ;CAI3B,AAAO,SAASC,MAAM,kBAAkB;CA2BxC,QAAQ;CAgBR,QAAc;CAYd,AAAa,qBAAqB;AAuBnC","names":["client: WriteableClient<any>","edit: TransactionEdit"],"sources":["../../../src/transactions/EditRequestManager.ts"],"version":3,"file":"EditRequestManager.d.ts"}
@@ -1,9 +1,11 @@
1
1
  import type { Client } from "@osdk/client";
2
2
  import type { AddLinkApiNames, AddLinkSources, AddLinkTargets, CreatableObjectOrInterfaceTypeProperties, CreatableObjectOrInterfaceTypes, DeletableObjectOrInterfaceLocators, RemoveLinkApiNames, RemoveLinkSources, RemoveLinkTargets, UpdatableObjectOrInterfaceLocatorProperties, UpdatableObjectOrInterfaceLocators } from "../edits/EditBatch.js";
3
3
  import type { AnyEdit } from "../edits/types.js";
4
+ import type { EditRequestManager } from "./EditRequestManager.js";
4
5
  export interface WriteableClientContext {
5
6
  ontologyRid: string | Promise<string>;
6
- transactionRid: string;
7
+ transactionId: string;
8
+ editRequestManager: EditRequestManager;
7
9
  }
8
10
  export interface WriteableClient<X extends AnyEdit> extends Client, WriteMethods<X> {
9
11
  [writeableClientContext]: WriteableClientContext;
@@ -1 +1 @@
1
- {"mappings":"AAgBA,cAAc,cAAc,cAAe;AAE3C,cACE,iBACA,gBACA,gBACA,0CACA,iCACA,oCACA,oBACA,mBACA,mBACA,6CACA,0CACK,uBAAwB;AAC/B,cAAc,eAAe,mBAAoB;AAOjD,iBAAiB,uBAAuB;CACtC,sBAAsB;CACtB;AACD;AAED,iBAAiB,gBAAgB,UAAU,iBACjC,QAAQ,aAAa,GAC/B;EACG,yBAAyB;AAC3B;AAED,iBAAiB,aAAa,UAAU,SAAS;CAC/C;EACE,YAAY,eAAe;EAC3B,UAAU,gBAAgB,GAAG;GAE7BA,QAAQ,KACRC,SAAS,GACTC,QAAQ,eAAe,GAAG,KAAK,OAC5B;CAEL;EACE,YAAY,kBAAkB;EAC9B,UAAU,mBAAmB,GAAG;GAEhCF,QAAQ,KACRC,SAAS,GACTE,QAAQ,kBAAkB,GAAG,KAAK,OAC/B;CAEL,SAAS,YAAY,gCAAgC,IACnDC,KAAK,KACLC,YAAY,yCAAyC,GAAG,SACrD;CAEL,SAAS,WAAW,mCAAmC,IACrDC,KAAK,OACF;CAEL,SAAS,WAAW,mCAAmC,IACrDA,KAAK,IACLC,YAAY,4CAA4C,GAAG,QACxD;AACN","names":["source: SOL","apiName: A","target: AddLinkTargets<X, SOL, A>","target: RemoveLinkTargets<X, SOL, A>","obj: OTD","properties: CreatableObjectOrInterfaceTypeProperties<X, OTD>","obj: OL","properties: UpdatableObjectOrInterfaceLocatorProperties<X, OL>"],"sources":["../../../src/transactions/WriteableClient.ts"],"version":3,"file":"WriteableClient.d.ts"}
1
+ {"mappings":"AAgBA,cAAc,cAAc,cAAe;AAE3C,cACE,iBACA,gBACA,gBACA,0CACA,iCACA,oCACA,oBACA,mBACA,mBACA,6CACA,0CACK,uBAAwB;AAC/B,cAAc,eAAe,mBAAoB;AACjD,cAAc,0BAA0B,yBAA0B;AAOlE,iBAAiB,uBAAuB;CACtC,sBAAsB;CACtB;CACA,oBAAoB;AACrB;AAED,iBAAiB,gBAAgB,UAAU,iBACjC,QAAQ,aAAa,GAC/B;EACG,yBAAyB;AAC3B;AAED,iBAAiB,aAAa,UAAU,SAAS;CAC/C;EACE,YAAY,eAAe;EAC3B,UAAU,gBAAgB,GAAG;GAE7BA,QAAQ,KACRC,SAAS,GACTC,QAAQ,eAAe,GAAG,KAAK,OAC5B;CAEL;EACE,YAAY,kBAAkB;EAC9B,UAAU,mBAAmB,GAAG;GAEhCF,QAAQ,KACRC,SAAS,GACTE,QAAQ,kBAAkB,GAAG,KAAK,OAC/B;CAEL,SAAS,YAAY,gCAAgC,IACnDC,KAAK,KACLC,YAAY,yCAAyC,GAAG,SACrD;CAEL,SAAS,WAAW,mCAAmC,IACrDC,KAAK,OACF;CAEL,SAAS,WAAW,mCAAmC,IACrDA,KAAK,IACLC,YAAY,4CAA4C,GAAG,QACxD;AACN","names":["source: SOL","apiName: A","target: AddLinkTargets<X, SOL, A>","target: RemoveLinkTargets<X, SOL, A>","obj: OTD","properties: CreatableObjectOrInterfaceTypeProperties<X, OTD>","obj: OL","properties: UpdatableObjectOrInterfaceLocatorProperties<X, OL>"],"sources":["../../../src/transactions/WriteableClient.ts"],"version":3,"file":"WriteableClient.d.ts"}
@@ -1,4 +1,4 @@
1
- import { createClientWithTransaction } from "@osdk/client/unstable-do-not-use";
1
+ import type { createClient } from "@osdk/client";
2
2
  import type { AnyEdit } from "../edits/types.js";
3
3
  import type { WriteableClient } from "./WriteableClient.js";
4
- export declare function createWriteableClient<X extends AnyEdit = never>(...args: Parameters<typeof createClientWithTransaction>): WriteableClient<X>;
4
+ export declare function createWriteableClient<X extends AnyEdit = never>(transactionId: string, ...args: Parameters<typeof createClient>): WriteableClient<X>;
@@ -1 +1 @@
1
- {"mappings":"AAgBA,SAAS,mCAAmC,kCAAmC;AAgB/E,cAAc,eAAe,mBAAoB;AAGjD,cACE,uBAGK,sBAAuB;AAG9B,OAAO,iBAAS,sBACd,UAAU,iBAEV,GAAG,MAAM,kBAAkB,+BAC1B,gBAAgB","names":[],"sources":["../../../src/transactions/createWriteableClient.ts"],"version":3,"file":"createWriteableClient.d.ts"}
1
+ {"mappings":"AAkBA,cAAsB,oBAAoB,cAAe;AAczD,cAAc,eAAe,mBAAoB;AAGjD,cACE,uBAGK,sBAAuB;AAG9B,OAAO,iBAAS,sBACd,UAAU,iBAEVA,uBACA,GAAG,MAAM,kBAAkB,gBAC1B,gBAAgB","names":["transactionId: string"],"sources":["../../../src/transactions/createWriteableClient.ts"],"version":3,"file":"createWriteableClient.d.ts"}
@@ -0,0 +1,2 @@
1
+ import { type WriteableClient } from "./WriteableClient.js";
2
+ export declare function flushEdits(client: WriteableClient<any>): Promise<void>;
@@ -0,0 +1 @@
1
+ {"mappings":"AAgBA,cACO,uBAEA,sBAAuB;AAE9B,OAAO,iBAAe,WAAWA,QAAQ,uBAAuB","names":["client: WriteableClient<any>"],"sources":["../../../src/transactions/flushEdits.ts"],"version":3,"file":"flushEdits.d.ts"}
@@ -0,0 +1,17 @@
1
+ /*
2
+ * Copyright 2024 Palantir Technologies, Inc. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ export * from "./build/cjs/public/experimental.cjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osdk/functions",
3
- "version": "1.5.0-beta.3",
3
+ "version": "1.5.0-beta.4",
4
4
  "description": "",
5
5
  "access": "public",
6
6
  "license": "Apache-2.0",
@@ -18,6 +18,15 @@
18
18
  "require": "./build/cjs/index.cjs",
19
19
  "default": "./build/browser/index.js"
20
20
  },
21
+ "./experimental": {
22
+ "browser": "./build/browser/public/experimental.js",
23
+ "import": {
24
+ "types": "./build/types/public/experimental.d.ts",
25
+ "default": "./build/esm/public/experimental.js"
26
+ },
27
+ "require": "./build/cjs/public/experimental.cjs",
28
+ "default": "./build/browser/public/experimental.js"
29
+ },
21
30
  "./internal": {
22
31
  "browser": "./build/browser/public/internal.js",
23
32
  "import": {
@@ -54,7 +63,7 @@
54
63
  "yaml": "^2.8.1"
55
64
  },
56
65
  "peerDependencies": {
57
- "@osdk/client": "^2.7.0-beta.5"
66
+ "@osdk/client": "^2.7.0-beta.8"
58
67
  },
59
68
  "devDependencies": {
60
69
  "@microsoft/api-documenter": "^7.26.32",
@@ -64,7 +73,7 @@
64
73
  "p-defer": "^4.0.1",
65
74
  "ts-expect": "^1.3.0",
66
75
  "typescript": "~5.5.4",
67
- "@osdk/client.test.ontology": "~2.7.0-beta.5",
76
+ "@osdk/client.test.ontology": "~2.7.0-beta.8",
68
77
  "@osdk/monorepo.tsconfig": "~0.6.0-beta.1",
69
78
  "@osdk/shared.test": "~2.7.0-beta.3",
70
79
  "@osdk/monorepo.api-extractor": "~0.6.0-beta.1"