@factify/sdk 0.3.8 → 0.3.9
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/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/openapi.json +0 -180
- package/package.json +1 -1
- package/src/lib/config.ts +2 -2
|
@@ -31,8 +31,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
31
31
|
export declare const SDK_METADATA: {
|
|
32
32
|
readonly language: "typescript";
|
|
33
33
|
readonly openapiDocVersion: "1.0.0";
|
|
34
|
-
readonly sdkVersion: "0.3.
|
|
34
|
+
readonly sdkVersion: "0.3.9";
|
|
35
35
|
readonly genVersion: "2.791.1";
|
|
36
|
-
readonly userAgent: "speakeasy-sdk/typescript 0.3.
|
|
36
|
+
readonly userAgent: "speakeasy-sdk/typescript 0.3.9 2.791.1 1.0.0 @factify/sdk";
|
|
37
37
|
};
|
|
38
38
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -35,8 +35,8 @@ function serverURLFromOptions(options) {
|
|
|
35
35
|
exports.SDK_METADATA = {
|
|
36
36
|
language: "typescript",
|
|
37
37
|
openapiDocVersion: "1.0.0",
|
|
38
|
-
sdkVersion: "0.3.
|
|
38
|
+
sdkVersion: "0.3.9",
|
|
39
39
|
genVersion: "2.791.1",
|
|
40
|
-
userAgent: "speakeasy-sdk/typescript 0.3.
|
|
40
|
+
userAgent: "speakeasy-sdk/typescript 0.3.9 2.791.1 1.0.0 @factify/sdk",
|
|
41
41
|
};
|
|
42
42
|
//# sourceMappingURL=config.js.map
|
package/dist/esm/lib/config.d.ts
CHANGED
|
@@ -31,8 +31,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
31
31
|
export declare const SDK_METADATA: {
|
|
32
32
|
readonly language: "typescript";
|
|
33
33
|
readonly openapiDocVersion: "1.0.0";
|
|
34
|
-
readonly sdkVersion: "0.3.
|
|
34
|
+
readonly sdkVersion: "0.3.9";
|
|
35
35
|
readonly genVersion: "2.791.1";
|
|
36
|
-
readonly userAgent: "speakeasy-sdk/typescript 0.3.
|
|
36
|
+
readonly userAgent: "speakeasy-sdk/typescript 0.3.9 2.791.1 1.0.0 @factify/sdk";
|
|
37
37
|
};
|
|
38
38
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/esm/lib/config.js
CHANGED
|
@@ -31,8 +31,8 @@ export function serverURLFromOptions(options) {
|
|
|
31
31
|
export const SDK_METADATA = {
|
|
32
32
|
language: "typescript",
|
|
33
33
|
openapiDocVersion: "1.0.0",
|
|
34
|
-
sdkVersion: "0.3.
|
|
34
|
+
sdkVersion: "0.3.9",
|
|
35
35
|
genVersion: "2.791.1",
|
|
36
|
-
userAgent: "speakeasy-sdk/typescript 0.3.
|
|
36
|
+
userAgent: "speakeasy-sdk/typescript 0.3.9 2.791.1 1.0.0 @factify/sdk",
|
|
37
37
|
};
|
|
38
38
|
//# sourceMappingURL=config.js.map
|
package/jsr.json
CHANGED
package/openapi.json
CHANGED
|
@@ -1203,21 +1203,6 @@
|
|
|
1203
1203
|
"lang": "typescript",
|
|
1204
1204
|
"label": "listDocuments",
|
|
1205
1205
|
"source": "import { Factify } from \"@factify/sdk\";\n\nconst factify = new Factify({\n bearerAuth: \"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n});\n\nasync function run() {\n const result = await factify.documents.list({\n pageToken: \"eyJpZCI6ImRvY18wMWgyeGNlanF0ZjJuYnJleHgzdnFqaHA0MSIsImQiOiJuZXh0In0\",\n });\n\n for await (const page of result) {\n console.log(page);\n }\n}\n\nrun();"
|
|
1206
|
-
},
|
|
1207
|
-
{
|
|
1208
|
-
"lang": "python",
|
|
1209
|
-
"label": "listDocuments",
|
|
1210
|
-
"source": "from openapi import Factify\n\n\nwith Factify(\n bearer_auth=\"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n) as factify:\n\n res = factify.documents.list(page_token=\"eyJpZCI6ImRvY18wMWgyeGNlanF0ZjJuYnJleHgzdnFqaHA0MSIsImQiOiJuZXh0In0\")\n\n while res is not None:\n # Handle items\n\n res = res.next()"
|
|
1211
|
-
},
|
|
1212
|
-
{
|
|
1213
|
-
"lang": "go",
|
|
1214
|
-
"label": "listDocuments",
|
|
1215
|
-
"source": "package main\n\nimport(\n\t\"context\"\n\t\"undefined\"\n\t\"undefined/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n\n s := undefined.New(\n undefined.WithSecurity(\"\u003cYOUR_BEARER_TOKEN_HERE\u003e\"),\n )\n\n res, err := s.Documents.List(ctx, operations.ListDocumentsRequest{\n PageToken: undefined.Pointer(\"eyJpZCI6ImRvY18wMWgyeGNlanF0ZjJuYnJleHgzdnFqaHA0MSIsImQiOiJuZXh0In0\"),\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.ListDocumentsResponse != nil {\n for {\n // handle items\n\n res, err = res.Next()\n\n if err != nil {\n // handle error\n }\n\n if res == nil {\n break\n }\n }\n }\n}"
|
|
1216
|
-
},
|
|
1217
|
-
{
|
|
1218
|
-
"lang": "java",
|
|
1219
|
-
"label": "listDocuments",
|
|
1220
|
-
"source": "package hello.world;\n\nimport java.lang.Exception;\nimport org.openapis.openapi.Factify;\nimport org.openapis.openapi.models.errors.Error;\nimport org.openapis.openapi.models.operations.ListDocumentsRequest;\nimport org.openapis.openapi.models.operations.ListDocumentsResponse;\n\npublic class Application {\n\n public static void main(String[] args) throws Error, Exception {\n\n Factify sdk = Factify.builder()\n .bearerAuth(System.getenv().getOrDefault(\"BEARER_AUTH\", \"\"))\n .build();\n\n ListDocumentsRequest req = ListDocumentsRequest.builder()\n .pageToken(\"eyJpZCI6ImRvY18wMWgyeGNlanF0ZjJuYnJleHgzdnFqaHA0MSIsImQiOiJuZXh0In0\")\n .build();\n\n\n sdk.documents().list()\n .callAsStream()\n .forEach((ListDocumentsResponse item) -\u003e {\n // handle page\n });\n\n }\n}"
|
|
1221
1206
|
}
|
|
1222
1207
|
]
|
|
1223
1208
|
},
|
|
@@ -1274,21 +1259,6 @@
|
|
|
1274
1259
|
"lang": "typescript",
|
|
1275
1260
|
"label": "createDocument",
|
|
1276
1261
|
"source": "import { Factify } from \"@factify/sdk\";\nimport { openAsBlob } from \"node:fs\";\n\nconst factify = new Factify({\n bearerAuth: \"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n});\n\nasync function run() {\n const result = await factify.documents.create({\n payload: await openAsBlob(\"example.file\"),\n title: \"\u003cvalue\u003e\",\n });\n\n console.log(result);\n}\n\nrun();"
|
|
1277
|
-
},
|
|
1278
|
-
{
|
|
1279
|
-
"lang": "python",
|
|
1280
|
-
"label": "createDocument",
|
|
1281
|
-
"source": "from openapi import Factify\n\n\nwith Factify(\n bearer_auth=\"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n) as factify:\n\n res = factify.documents.create(payload={\n \"file_name\": \"example.file\",\n \"content\": open(\"example.file\", \"rb\"),\n }, title=\"\u003cvalue\u003e\")\n\n # Handle response\n print(res)"
|
|
1282
|
-
},
|
|
1283
|
-
{
|
|
1284
|
-
"lang": "go",
|
|
1285
|
-
"label": "createDocument",
|
|
1286
|
-
"source": "package main\n\nimport(\n\t\"context\"\n\t\"undefined\"\n\t\"os\"\n\t\"undefined/models/components\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n\n s := undefined.New(\n undefined.WithSecurity(\"\u003cYOUR_BEARER_TOKEN_HERE\u003e\"),\n )\n\n example, fileErr := os.Open(\"example.file\")\n if fileErr != nil {\n panic(fileErr)\n }\n\n res, err := s.Documents.Create(ctx, components.CreateDocumentRequest{\n Payload: components.CreateDocumentRequestPayload{\n FileName: \"example.file\",\n Content: example,\n },\n Title: \"\u003cvalue\u003e\",\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.CreateDocumentResponse != nil {\n // handle response\n }\n}"
|
|
1287
|
-
},
|
|
1288
|
-
{
|
|
1289
|
-
"lang": "java",
|
|
1290
|
-
"label": "createDocument",
|
|
1291
|
-
"source": "package hello.world;\n\nimport java.lang.Exception;\nimport java.nio.file.Paths;\nimport org.openapis.openapi.Factify;\nimport org.openapis.openapi.models.components.CreateDocumentRequest;\nimport org.openapis.openapi.models.components.CreateDocumentRequestPayload;\nimport org.openapis.openapi.models.errors.Error;\nimport org.openapis.openapi.models.operations.CreateDocumentResponse;\nimport org.openapis.openapi.utils.Blob;\n\npublic class Application {\n\n public static void main(String[] args) throws Error, Exception {\n\n Factify sdk = Factify.builder()\n .bearerAuth(System.getenv().getOrDefault(\"BEARER_AUTH\", \"\"))\n .build();\n\n CreateDocumentRequest req = CreateDocumentRequest.builder()\n .payload(CreateDocumentRequestPayload.builder()\n .fileName(\"example.file\")\n .content(Blob.from(Paths.get(\"example.file\")))\n .build())\n .title(\"\u003cvalue\u003e\")\n .build();\n\n CreateDocumentResponse res = sdk.documents().create()\n .request(req)\n .call();\n\n }\n}"
|
|
1292
1262
|
}
|
|
1293
1263
|
]
|
|
1294
1264
|
}
|
|
@@ -1351,21 +1321,6 @@
|
|
|
1351
1321
|
"lang": "typescript",
|
|
1352
1322
|
"label": "getDocument",
|
|
1353
1323
|
"source": "import { Factify } from \"@factify/sdk\";\n\nconst factify = new Factify({\n bearerAuth: \"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n});\n\nasync function run() {\n const result = await factify.documents.get({\n documentId: \"\u003cid\u003e\",\n });\n\n console.log(result);\n}\n\nrun();"
|
|
1354
|
-
},
|
|
1355
|
-
{
|
|
1356
|
-
"lang": "python",
|
|
1357
|
-
"label": "getDocument",
|
|
1358
|
-
"source": "from openapi import Factify\n\n\nwith Factify(\n bearer_auth=\"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n) as factify:\n\n res = factify.documents.get(document_id=\"\u003cid\u003e\")\n\n # Handle response\n print(res)"
|
|
1359
|
-
},
|
|
1360
|
-
{
|
|
1361
|
-
"lang": "go",
|
|
1362
|
-
"label": "getDocument",
|
|
1363
|
-
"source": "package main\n\nimport(\n\t\"context\"\n\t\"undefined\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n\n s := undefined.New(\n undefined.WithSecurity(\"\u003cYOUR_BEARER_TOKEN_HERE\u003e\"),\n )\n\n res, err := s.Documents.Get(ctx, \"\u003cid\u003e\")\n if err != nil {\n log.Fatal(err)\n }\n if res.GetDocumentResponse != nil {\n // handle response\n }\n}"
|
|
1364
|
-
},
|
|
1365
|
-
{
|
|
1366
|
-
"lang": "java",
|
|
1367
|
-
"label": "getDocument",
|
|
1368
|
-
"source": "package hello.world;\n\nimport java.lang.Exception;\nimport org.openapis.openapi.Factify;\nimport org.openapis.openapi.models.errors.Error;\nimport org.openapis.openapi.models.operations.GetDocumentResponse;\n\npublic class Application {\n\n public static void main(String[] args) throws Error, Exception {\n\n Factify sdk = Factify.builder()\n .bearerAuth(System.getenv().getOrDefault(\"BEARER_AUTH\", \"\"))\n .build();\n\n GetDocumentResponse res = sdk.documents().get()\n .documentId(\"\u003cid\u003e\")\n .call();\n\n if (res.getDocumentResponse().isPresent()) {\n // handle response\n }\n }\n}"
|
|
1369
1324
|
}
|
|
1370
1325
|
]
|
|
1371
1326
|
},
|
|
@@ -1456,21 +1411,6 @@
|
|
|
1456
1411
|
"lang": "typescript",
|
|
1457
1412
|
"label": "updateDocument",
|
|
1458
1413
|
"source": "import { Factify } from \"@factify/sdk\";\n\nconst factify = new Factify({\n bearerAuth: \"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n});\n\nasync function run() {\n const result = await factify.documents.update({\n documentId: \"\u003cid\u003e\",\n body: {},\n });\n\n console.log(result);\n}\n\nrun();"
|
|
1459
|
-
},
|
|
1460
|
-
{
|
|
1461
|
-
"lang": "python",
|
|
1462
|
-
"label": "updateDocument",
|
|
1463
|
-
"source": "from openapi import Factify\n\n\nwith Factify(\n bearer_auth=\"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n) as factify:\n\n res = factify.documents.update(document_id=\"\u003cid\u003e\")\n\n # Handle response\n print(res)"
|
|
1464
|
-
},
|
|
1465
|
-
{
|
|
1466
|
-
"lang": "go",
|
|
1467
|
-
"label": "updateDocument",
|
|
1468
|
-
"source": "package main\n\nimport(\n\t\"context\"\n\t\"undefined\"\n\t\"undefined/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n\n s := undefined.New(\n undefined.WithSecurity(\"\u003cYOUR_BEARER_TOKEN_HERE\u003e\"),\n )\n\n res, err := s.Documents.Update(ctx, \"\u003cid\u003e\", operations.UpdateDocumentUpdateDocumentRequest{})\n if err != nil {\n log.Fatal(err)\n }\n if res.UpdateDocumentResponse != nil {\n // handle response\n }\n}"
|
|
1469
|
-
},
|
|
1470
|
-
{
|
|
1471
|
-
"lang": "java",
|
|
1472
|
-
"label": "updateDocument",
|
|
1473
|
-
"source": "package hello.world;\n\nimport java.lang.Exception;\nimport org.openapis.openapi.Factify;\nimport org.openapis.openapi.models.errors.Error;\nimport org.openapis.openapi.models.operations.UpdateDocumentResponse;\nimport org.openapis.openapi.models.operations.UpdateDocumentUpdateDocumentRequest;\n\npublic class Application {\n\n public static void main(String[] args) throws Error, Exception {\n\n Factify sdk = Factify.builder()\n .bearerAuth(System.getenv().getOrDefault(\"BEARER_AUTH\", \"\"))\n .build();\n\n UpdateDocumentResponse res = sdk.documents().update()\n .documentId(\"\u003cid\u003e\")\n .body(UpdateDocumentUpdateDocumentRequest.builder()\n .build())\n .call();\n\n if (res.updateDocumentResponse().isPresent()) {\n // handle response\n }\n }\n}"
|
|
1474
1414
|
}
|
|
1475
1415
|
]
|
|
1476
1416
|
}
|
|
@@ -1534,21 +1474,6 @@
|
|
|
1534
1474
|
"lang": "typescript",
|
|
1535
1475
|
"label": "generateDocumentEntryPage",
|
|
1536
1476
|
"source": "import { Factify } from \"@factify/sdk\";\n\nconst factify = new Factify({\n bearerAuth: \"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n});\n\nasync function run() {\n const result = await factify.entryPages.generate({\n documentId: \"\u003cid\u003e\",\n });\n\n console.log(result);\n}\n\nrun();"
|
|
1537
|
-
},
|
|
1538
|
-
{
|
|
1539
|
-
"lang": "python",
|
|
1540
|
-
"label": "generateDocumentEntryPage",
|
|
1541
|
-
"source": "from openapi import Factify\n\n\nwith Factify(\n bearer_auth=\"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n) as factify:\n\n res = factify.entry_pages.generate(document_id=\"\u003cid\u003e\")\n\n # Handle response\n print(res)"
|
|
1542
|
-
},
|
|
1543
|
-
{
|
|
1544
|
-
"lang": "go",
|
|
1545
|
-
"label": "generateDocumentEntryPage",
|
|
1546
|
-
"source": "package main\n\nimport(\n\t\"context\"\n\t\"undefined\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n\n s := undefined.New(\n undefined.WithSecurity(\"\u003cYOUR_BEARER_TOKEN_HERE\u003e\"),\n )\n\n res, err := s.EntryPages.Generate(ctx, \"\u003cid\u003e\")\n if err != nil {\n log.Fatal(err)\n }\n if res.GenerateEntryPageResponse != nil {\n // handle response\n }\n}"
|
|
1547
|
-
},
|
|
1548
|
-
{
|
|
1549
|
-
"lang": "java",
|
|
1550
|
-
"label": "generateDocumentEntryPage",
|
|
1551
|
-
"source": "package hello.world;\n\nimport java.lang.Exception;\nimport org.openapis.openapi.Factify;\nimport org.openapis.openapi.models.errors.Error;\nimport org.openapis.openapi.models.operations.GenerateDocumentEntryPageResponse;\n\npublic class Application {\n\n public static void main(String[] args) throws Error, Exception {\n\n Factify sdk = Factify.builder()\n .bearerAuth(System.getenv().getOrDefault(\"BEARER_AUTH\", \"\"))\n .build();\n\n GenerateDocumentEntryPageResponse res = sdk.entryPages().generate()\n .documentId(\"\u003cid\u003e\")\n .call();\n\n if (res.generateEntryPageResponse().isPresent()) {\n // handle response\n }\n }\n}"
|
|
1552
1477
|
}
|
|
1553
1478
|
]
|
|
1554
1479
|
}
|
|
@@ -1648,21 +1573,6 @@
|
|
|
1648
1573
|
"lang": "typescript",
|
|
1649
1574
|
"label": "listDocumentPolicies",
|
|
1650
1575
|
"source": "import { Factify } from \"@factify/sdk\";\n\nconst factify = new Factify({\n bearerAuth: \"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n});\n\nasync function run() {\n const result = await factify.policies.list({\n documentId: \"\u003cid\u003e\",\n pageToken: \"eyJpZCI6InBvbF8wMWgyeGNlanF0ZjJuYnJleHgzdnFqaHA0MSIsImQiOiJuZXh0IiwiZiI6eyJkb2NfaWQiOiJkb2NfMDFoMnhjZWpxdGYybmJyZXh4M3ZxamhwNDEifX0\",\n });\n\n for await (const page of result) {\n console.log(page);\n }\n}\n\nrun();"
|
|
1651
|
-
},
|
|
1652
|
-
{
|
|
1653
|
-
"lang": "python",
|
|
1654
|
-
"label": "listDocumentPolicies",
|
|
1655
|
-
"source": "from openapi import Factify\n\n\nwith Factify(\n bearer_auth=\"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n) as factify:\n\n res = factify.policies.list(document_id=\"\u003cid\u003e\", page_token=\"eyJpZCI6InBvbF8wMWgyeGNlanF0ZjJuYnJleHgzdnFqaHA0MSIsImQiOiJuZXh0IiwiZiI6eyJkb2NfaWQiOiJkb2NfMDFoMnhjZWpxdGYybmJyZXh4M3ZxamhwNDEifX0\")\n\n while res is not None:\n # Handle items\n\n res = res.next()"
|
|
1656
|
-
},
|
|
1657
|
-
{
|
|
1658
|
-
"lang": "go",
|
|
1659
|
-
"label": "listDocumentPolicies",
|
|
1660
|
-
"source": "package main\n\nimport(\n\t\"context\"\n\t\"undefined\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n\n s := undefined.New(\n undefined.WithSecurity(\"\u003cYOUR_BEARER_TOKEN_HERE\u003e\"),\n )\n\n res, err := s.Policies.List(ctx, \"\u003cid\u003e\", undefined.Pointer(\"eyJpZCI6InBvbF8wMWgyeGNlanF0ZjJuYnJleHgzdnFqaHA0MSIsImQiOiJuZXh0IiwiZiI6eyJkb2NfaWQiOiJkb2NfMDFoMnhjZWpxdGYybmJyZXh4M3ZxamhwNDEifX0\"), nil)\n if err != nil {\n log.Fatal(err)\n }\n if res.ListDocumentPoliciesResponse != nil {\n for {\n // handle items\n\n res, err = res.Next()\n\n if err != nil {\n // handle error\n }\n\n if res == nil {\n break\n }\n }\n }\n}"
|
|
1661
|
-
},
|
|
1662
|
-
{
|
|
1663
|
-
"lang": "java",
|
|
1664
|
-
"label": "listDocumentPolicies",
|
|
1665
|
-
"source": "package hello.world;\n\nimport java.lang.Exception;\nimport org.openapis.openapi.Factify;\nimport org.openapis.openapi.models.errors.Error;\nimport org.openapis.openapi.models.operations.ListDocumentPoliciesResponse;\n\npublic class Application {\n\n public static void main(String[] args) throws Error, Exception {\n\n Factify sdk = Factify.builder()\n .bearerAuth(System.getenv().getOrDefault(\"BEARER_AUTH\", \"\"))\n .build();\n\n\n sdk.policies().list()\n .documentId(\"\u003cid\u003e\")\n .pageToken(\"eyJpZCI6InBvbF8wMWgyeGNlanF0ZjJuYnJleHgzdnFqaHA0MSIsImQiOiJuZXh0IiwiZiI6eyJkb2NfaWQiOiJkb2NfMDFoMnhjZWpxdGYybmJyZXh4M3ZxamhwNDEifX0\")\n .callAsStream()\n .forEach((ListDocumentPoliciesResponse item) -\u003e {\n // handle page\n });\n\n }\n}"
|
|
1666
1576
|
}
|
|
1667
1577
|
]
|
|
1668
1578
|
},
|
|
@@ -1747,21 +1657,6 @@
|
|
|
1747
1657
|
"lang": "typescript",
|
|
1748
1658
|
"label": "attachDocumentPolicy",
|
|
1749
1659
|
"source": "import { Factify } from \"@factify/sdk\";\n\nconst factify = new Factify({\n bearerAuth: \"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n});\n\nasync function run() {\n const result = await factify.policies.attach({\n documentId: \"\u003cid\u003e\",\n body: {\n policyId: \"\u003cid\u003e\",\n },\n });\n\n console.log(result);\n}\n\nrun();"
|
|
1750
|
-
},
|
|
1751
|
-
{
|
|
1752
|
-
"lang": "python",
|
|
1753
|
-
"label": "attachDocumentPolicy",
|
|
1754
|
-
"source": "from openapi import Factify\n\n\nwith Factify(\n bearer_auth=\"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n) as factify:\n\n res = factify.policies.attach(document_id=\"\u003cid\u003e\", policy_id=\"\u003cid\u003e\")\n\n # Handle response\n print(res)"
|
|
1755
|
-
},
|
|
1756
|
-
{
|
|
1757
|
-
"lang": "go",
|
|
1758
|
-
"label": "attachDocumentPolicy",
|
|
1759
|
-
"source": "package main\n\nimport(\n\t\"context\"\n\t\"undefined\"\n\t\"undefined/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n\n s := undefined.New(\n undefined.WithSecurity(\"\u003cYOUR_BEARER_TOKEN_HERE\u003e\"),\n )\n\n res, err := s.Policies.Attach(ctx, \"\u003cid\u003e\", operations.AttachPolicyRequest{\n PolicyID: \"\u003cid\u003e\",\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.DocumentPolicy != nil {\n // handle response\n }\n}"
|
|
1760
|
-
},
|
|
1761
|
-
{
|
|
1762
|
-
"lang": "java",
|
|
1763
|
-
"label": "attachDocumentPolicy",
|
|
1764
|
-
"source": "package hello.world;\n\nimport java.lang.Exception;\nimport org.openapis.openapi.Factify;\nimport org.openapis.openapi.models.errors.Error;\nimport org.openapis.openapi.models.operations.AttachDocumentPolicyResponse;\nimport org.openapis.openapi.models.operations.AttachPolicyRequest;\n\npublic class Application {\n\n public static void main(String[] args) throws Error, Exception {\n\n Factify sdk = Factify.builder()\n .bearerAuth(System.getenv().getOrDefault(\"BEARER_AUTH\", \"\"))\n .build();\n\n AttachDocumentPolicyResponse res = sdk.policies().attach()\n .documentId(\"\u003cid\u003e\")\n .body(AttachPolicyRequest.builder()\n .policyId(\"\u003cid\u003e\")\n .build())\n .call();\n\n if (res.documentPolicy().isPresent()) {\n // handle response\n }\n }\n}"
|
|
1765
1660
|
}
|
|
1766
1661
|
]
|
|
1767
1662
|
}
|
|
@@ -1836,21 +1731,6 @@
|
|
|
1836
1731
|
"lang": "typescript",
|
|
1837
1732
|
"label": "detachDocumentPolicy",
|
|
1838
1733
|
"source": "import { Factify } from \"@factify/sdk\";\n\nconst factify = new Factify({\n bearerAuth: \"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n});\n\nasync function run() {\n const result = await factify.policies.detach({\n documentId: \"\u003cid\u003e\",\n policyId: \"\u003cid\u003e\",\n });\n\n console.log(result);\n}\n\nrun();"
|
|
1839
|
-
},
|
|
1840
|
-
{
|
|
1841
|
-
"lang": "python",
|
|
1842
|
-
"label": "detachDocumentPolicy",
|
|
1843
|
-
"source": "from openapi import Factify\n\n\nwith Factify(\n bearer_auth=\"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n) as factify:\n\n res = factify.policies.detach(document_id=\"\u003cid\u003e\", policy_id=\"\u003cid\u003e\")\n\n # Handle response\n print(res)"
|
|
1844
|
-
},
|
|
1845
|
-
{
|
|
1846
|
-
"lang": "go",
|
|
1847
|
-
"label": "detachDocumentPolicy",
|
|
1848
|
-
"source": "package main\n\nimport(\n\t\"context\"\n\t\"undefined\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n\n s := undefined.New(\n undefined.WithSecurity(\"\u003cYOUR_BEARER_TOKEN_HERE\u003e\"),\n )\n\n res, err := s.Policies.Detach(ctx, \"\u003cid\u003e\", \"\u003cid\u003e\")\n if err != nil {\n log.Fatal(err)\n }\n if res.Empty != nil {\n // handle response\n }\n}"
|
|
1849
|
-
},
|
|
1850
|
-
{
|
|
1851
|
-
"lang": "java",
|
|
1852
|
-
"label": "detachDocumentPolicy",
|
|
1853
|
-
"source": "package hello.world;\n\nimport java.lang.Exception;\nimport org.openapis.openapi.Factify;\nimport org.openapis.openapi.models.errors.Error;\nimport org.openapis.openapi.models.operations.DetachDocumentPolicyResponse;\n\npublic class Application {\n\n public static void main(String[] args) throws Error, Exception {\n\n Factify sdk = Factify.builder()\n .bearerAuth(System.getenv().getOrDefault(\"BEARER_AUTH\", \"\"))\n .build();\n\n DetachDocumentPolicyResponse res = sdk.policies().detach()\n .documentId(\"\u003cid\u003e\")\n .policyId(\"\u003cid\u003e\")\n .call();\n\n if (res.empty().isPresent()) {\n // handle response\n }\n }\n}"
|
|
1854
1734
|
}
|
|
1855
1735
|
]
|
|
1856
1736
|
}
|
|
@@ -1950,21 +1830,6 @@
|
|
|
1950
1830
|
"lang": "typescript",
|
|
1951
1831
|
"label": "listDocumentVersions",
|
|
1952
1832
|
"source": "import { Factify } from \"@factify/sdk\";\n\nconst factify = new Factify({\n bearerAuth: \"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n});\n\nasync function run() {\n const result = await factify.versions.list({\n documentId: \"\u003cid\u003e\",\n pageToken: \"eyJpZCI6InZlcl8wMWgyYWJjZDEyMzRlZmdoNTY3OGprbW5wdCIsImQiOiJuZXh0IiwiZiI6eyJkb2NfaWQiOiJkb2NfMDFoMnhjZWpxdGYybmJyZXh4M3ZxamhwNDEifX0\",\n });\n\n for await (const page of result) {\n console.log(page);\n }\n}\n\nrun();"
|
|
1953
|
-
},
|
|
1954
|
-
{
|
|
1955
|
-
"lang": "python",
|
|
1956
|
-
"label": "listDocumentVersions",
|
|
1957
|
-
"source": "from openapi import Factify\n\n\nwith Factify(\n bearer_auth=\"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n) as factify:\n\n res = factify.versions.list(document_id=\"\u003cid\u003e\", page_token=\"eyJpZCI6InZlcl8wMWgyYWJjZDEyMzRlZmdoNTY3OGprbW5wdCIsImQiOiJuZXh0IiwiZiI6eyJkb2NfaWQiOiJkb2NfMDFoMnhjZWpxdGYybmJyZXh4M3ZxamhwNDEifX0\")\n\n while res is not None:\n # Handle items\n\n res = res.next()"
|
|
1958
|
-
},
|
|
1959
|
-
{
|
|
1960
|
-
"lang": "go",
|
|
1961
|
-
"label": "listDocumentVersions",
|
|
1962
|
-
"source": "package main\n\nimport(\n\t\"context\"\n\t\"undefined\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n\n s := undefined.New(\n undefined.WithSecurity(\"\u003cYOUR_BEARER_TOKEN_HERE\u003e\"),\n )\n\n res, err := s.Versions.List(ctx, \"\u003cid\u003e\", undefined.Pointer(\"eyJpZCI6InZlcl8wMWgyYWJjZDEyMzRlZmdoNTY3OGprbW5wdCIsImQiOiJuZXh0IiwiZiI6eyJkb2NfaWQiOiJkb2NfMDFoMnhjZWpxdGYybmJyZXh4M3ZxamhwNDEifX0\"), nil)\n if err != nil {\n log.Fatal(err)\n }\n if res.ListVersionsResponse != nil {\n for {\n // handle items\n\n res, err = res.Next()\n\n if err != nil {\n // handle error\n }\n\n if res == nil {\n break\n }\n }\n }\n}"
|
|
1963
|
-
},
|
|
1964
|
-
{
|
|
1965
|
-
"lang": "java",
|
|
1966
|
-
"label": "listDocumentVersions",
|
|
1967
|
-
"source": "package hello.world;\n\nimport java.lang.Exception;\nimport org.openapis.openapi.Factify;\nimport org.openapis.openapi.models.errors.Error;\nimport org.openapis.openapi.models.operations.ListDocumentVersionsResponse;\n\npublic class Application {\n\n public static void main(String[] args) throws Error, Exception {\n\n Factify sdk = Factify.builder()\n .bearerAuth(System.getenv().getOrDefault(\"BEARER_AUTH\", \"\"))\n .build();\n\n\n sdk.versions().list()\n .documentId(\"\u003cid\u003e\")\n .pageToken(\"eyJpZCI6InZlcl8wMWgyYWJjZDEyMzRlZmdoNTY3OGprbW5wdCIsImQiOiJuZXh0IiwiZiI6eyJkb2NfaWQiOiJkb2NfMDFoMnhjZWpxdGYybmJyZXh4M3ZxamhwNDEifX0\")\n .callAsStream()\n .forEach((ListDocumentVersionsResponse item) -\u003e {\n // handle page\n });\n\n }\n}"
|
|
1968
1833
|
}
|
|
1969
1834
|
]
|
|
1970
1835
|
},
|
|
@@ -2035,21 +1900,6 @@
|
|
|
2035
1900
|
"lang": "typescript",
|
|
2036
1901
|
"label": "createDocumentVersion",
|
|
2037
1902
|
"source": "import { Factify } from \"@factify/sdk\";\nimport { openAsBlob } from \"node:fs\";\n\nconst factify = new Factify({\n bearerAuth: \"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n});\n\nasync function run() {\n const result = await factify.versions.create({\n documentId: \"\u003cid\u003e\",\n body: {\n payload: await openAsBlob(\"example.file\"),\n },\n });\n\n console.log(result);\n}\n\nrun();"
|
|
2038
|
-
},
|
|
2039
|
-
{
|
|
2040
|
-
"lang": "python",
|
|
2041
|
-
"label": "createDocumentVersion",
|
|
2042
|
-
"source": "from openapi import Factify\n\n\nwith Factify(\n bearer_auth=\"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n) as factify:\n\n res = factify.versions.create(document_id_param=\"\u003cvalue\u003e\", payload={\n \"file_name\": \"example.file\",\n \"content\": open(\"example.file\", \"rb\"),\n })\n\n # Handle response\n print(res)"
|
|
2043
|
-
},
|
|
2044
|
-
{
|
|
2045
|
-
"lang": "go",
|
|
2046
|
-
"label": "createDocumentVersion",
|
|
2047
|
-
"source": "package main\n\nimport(\n\t\"context\"\n\t\"undefined\"\n\t\"os\"\n\t\"undefined/models/components\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n\n s := undefined.New(\n undefined.WithSecurity(\"\u003cYOUR_BEARER_TOKEN_HERE\u003e\"),\n )\n\n example, fileErr := os.Open(\"example.file\")\n if fileErr != nil {\n panic(fileErr)\n }\n\n res, err := s.Versions.Create(ctx, \"\u003cid\u003e\", components.CreateVersionRequest{\n Payload: components.CreateVersionRequestPayload{\n FileName: \"example.file\",\n Content: example,\n },\n })\n if err != nil {\n log.Fatal(err)\n }\n if res.Version != nil {\n // handle response\n }\n}"
|
|
2048
|
-
},
|
|
2049
|
-
{
|
|
2050
|
-
"lang": "java",
|
|
2051
|
-
"label": "createDocumentVersion",
|
|
2052
|
-
"source": "package hello.world;\n\nimport java.lang.Exception;\nimport java.nio.file.Paths;\nimport org.openapis.openapi.Factify;\nimport org.openapis.openapi.models.components.CreateVersionRequest;\nimport org.openapis.openapi.models.components.CreateVersionRequestPayload;\nimport org.openapis.openapi.models.errors.Error;\nimport org.openapis.openapi.models.operations.CreateDocumentVersionResponse;\nimport org.openapis.openapi.utils.Blob;\n\npublic class Application {\n\n public static void main(String[] args) throws Error, Exception {\n\n Factify sdk = Factify.builder()\n .bearerAuth(System.getenv().getOrDefault(\"BEARER_AUTH\", \"\"))\n .build();\n\n CreateDocumentVersionResponse res = sdk.versions().create()\n .documentId(\"\u003cid\u003e\")\n .body(CreateVersionRequest.builder()\n .payload(CreateVersionRequestPayload.builder()\n .fileName(\"example.file\")\n .content(Blob.from(Paths.get(\"example.file\")))\n .build())\n .build())\n .call();\n\n }\n}"
|
|
2053
1903
|
}
|
|
2054
1904
|
]
|
|
2055
1905
|
}
|
|
@@ -2124,21 +1974,6 @@
|
|
|
2124
1974
|
"lang": "typescript",
|
|
2125
1975
|
"label": "getDocumentVersion",
|
|
2126
1976
|
"source": "import { Factify } from \"@factify/sdk\";\n\nconst factify = new Factify({\n bearerAuth: \"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n});\n\nasync function run() {\n const result = await factify.versions.get({\n documentId: \"\u003cid\u003e\",\n versionId: \"\u003cid\u003e\",\n });\n\n console.log(result);\n}\n\nrun();"
|
|
2127
|
-
},
|
|
2128
|
-
{
|
|
2129
|
-
"lang": "python",
|
|
2130
|
-
"label": "getDocumentVersion",
|
|
2131
|
-
"source": "from openapi import Factify\n\n\nwith Factify(\n bearer_auth=\"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n) as factify:\n\n res = factify.versions.get(document_id=\"\u003cid\u003e\", version_id=\"\u003cid\u003e\")\n\n # Handle response\n print(res)"
|
|
2132
|
-
},
|
|
2133
|
-
{
|
|
2134
|
-
"lang": "go",
|
|
2135
|
-
"label": "getDocumentVersion",
|
|
2136
|
-
"source": "package main\n\nimport(\n\t\"context\"\n\t\"undefined\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n\n s := undefined.New(\n undefined.WithSecurity(\"\u003cYOUR_BEARER_TOKEN_HERE\u003e\"),\n )\n\n res, err := s.Versions.Get(ctx, \"\u003cid\u003e\", \"\u003cid\u003e\")\n if err != nil {\n log.Fatal(err)\n }\n if res.Version != nil {\n // handle response\n }\n}"
|
|
2137
|
-
},
|
|
2138
|
-
{
|
|
2139
|
-
"lang": "java",
|
|
2140
|
-
"label": "getDocumentVersion",
|
|
2141
|
-
"source": "package hello.world;\n\nimport java.lang.Exception;\nimport org.openapis.openapi.Factify;\nimport org.openapis.openapi.models.errors.Error;\nimport org.openapis.openapi.models.operations.GetDocumentVersionResponse;\n\npublic class Application {\n\n public static void main(String[] args) throws Error, Exception {\n\n Factify sdk = Factify.builder()\n .bearerAuth(System.getenv().getOrDefault(\"BEARER_AUTH\", \"\"))\n .build();\n\n GetDocumentVersionResponse res = sdk.versions().get()\n .documentId(\"\u003cid\u003e\")\n .versionId(\"\u003cid\u003e\")\n .call();\n\n if (res.version().isPresent()) {\n // handle response\n }\n }\n}"
|
|
2142
1977
|
}
|
|
2143
1978
|
]
|
|
2144
1979
|
},
|
|
@@ -2239,21 +2074,6 @@
|
|
|
2239
2074
|
"lang": "typescript",
|
|
2240
2075
|
"label": "updateDocumentVersion",
|
|
2241
2076
|
"source": "import { Factify } from \"@factify/sdk\";\n\nconst factify = new Factify({\n bearerAuth: \"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n});\n\nasync function run() {\n const result = await factify.versions.update({\n documentId: \"\u003cid\u003e\",\n versionId: \"\u003cid\u003e\",\n body: {},\n });\n\n console.log(result);\n}\n\nrun();"
|
|
2242
|
-
},
|
|
2243
|
-
{
|
|
2244
|
-
"lang": "python",
|
|
2245
|
-
"label": "updateDocumentVersion",
|
|
2246
|
-
"source": "from openapi import Factify\n\n\nwith Factify(\n bearer_auth=\"\u003cYOUR_BEARER_TOKEN_HERE\u003e\",\n) as factify:\n\n res = factify.versions.update(document_id=\"\u003cid\u003e\", version_id=\"\u003cid\u003e\")\n\n # Handle response\n print(res)"
|
|
2247
|
-
},
|
|
2248
|
-
{
|
|
2249
|
-
"lang": "go",
|
|
2250
|
-
"label": "updateDocumentVersion",
|
|
2251
|
-
"source": "package main\n\nimport(\n\t\"context\"\n\t\"undefined\"\n\t\"undefined/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n ctx := context.Background()\n\n s := undefined.New(\n undefined.WithSecurity(\"\u003cYOUR_BEARER_TOKEN_HERE\u003e\"),\n )\n\n res, err := s.Versions.Update(ctx, \"\u003cid\u003e\", \"\u003cid\u003e\", operations.UpdateVersionRequest{})\n if err != nil {\n log.Fatal(err)\n }\n if res.Version != nil {\n // handle response\n }\n}"
|
|
2252
|
-
},
|
|
2253
|
-
{
|
|
2254
|
-
"lang": "java",
|
|
2255
|
-
"label": "updateDocumentVersion",
|
|
2256
|
-
"source": "package hello.world;\n\nimport java.lang.Exception;\nimport org.openapis.openapi.Factify;\nimport org.openapis.openapi.models.errors.Error;\nimport org.openapis.openapi.models.operations.UpdateDocumentVersionResponse;\nimport org.openapis.openapi.models.operations.UpdateVersionRequest;\n\npublic class Application {\n\n public static void main(String[] args) throws Error, Exception {\n\n Factify sdk = Factify.builder()\n .bearerAuth(System.getenv().getOrDefault(\"BEARER_AUTH\", \"\"))\n .build();\n\n UpdateDocumentVersionResponse res = sdk.versions().update()\n .documentId(\"\u003cid\u003e\")\n .versionId(\"\u003cid\u003e\")\n .body(UpdateVersionRequest.builder()\n .build())\n .call();\n\n if (res.version().isPresent()) {\n // handle response\n }\n }\n}"
|
|
2257
2077
|
}
|
|
2258
2078
|
]
|
|
2259
2079
|
}
|
package/package.json
CHANGED
package/src/lib/config.ts
CHANGED
|
@@ -65,7 +65,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
65
65
|
export const SDK_METADATA = {
|
|
66
66
|
language: "typescript",
|
|
67
67
|
openapiDocVersion: "1.0.0",
|
|
68
|
-
sdkVersion: "0.3.
|
|
68
|
+
sdkVersion: "0.3.9",
|
|
69
69
|
genVersion: "2.791.1",
|
|
70
|
-
userAgent: "speakeasy-sdk/typescript 0.3.
|
|
70
|
+
userAgent: "speakeasy-sdk/typescript 0.3.9 2.791.1 1.0.0 @factify/sdk",
|
|
71
71
|
} as const;
|