@factify/sdk 0.3.11 → 0.3.12

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.
@@ -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.11";
35
- readonly genVersion: "2.794.1";
36
- readonly userAgent: "speakeasy-sdk/typescript 0.3.11 2.794.1 1.0.0 @factify/sdk";
34
+ readonly sdkVersion: "0.3.12";
35
+ readonly genVersion: "2.795.8";
36
+ readonly userAgent: "speakeasy-sdk/typescript 0.3.12 2.795.8 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.11",
39
- genVersion: "2.794.1",
40
- userAgent: "speakeasy-sdk/typescript 0.3.11 2.794.1 1.0.0 @factify/sdk",
38
+ sdkVersion: "0.3.12",
39
+ genVersion: "2.795.8",
40
+ userAgent: "speakeasy-sdk/typescript 0.3.12 2.795.8 1.0.0 @factify/sdk",
41
41
  };
42
42
  //# sourceMappingURL=config.js.map
@@ -15,12 +15,12 @@ export type CreateOrganizationRequest = {
15
15
  * Required when the caller is a service account (service accounts cannot own organizations).
16
16
  * Pattern: user_[0-9a-hjkmnp-tv-z]{26}
17
17
  */
18
- ownerUserId?: string | undefined;
18
+ ownerUserId?: string | null | undefined;
19
19
  };
20
20
  /** @internal */
21
21
  export type CreateOrganizationRequest$Outbound = {
22
22
  name: string;
23
- owner_user_id?: string | undefined;
23
+ owner_user_id?: string | null | undefined;
24
24
  };
25
25
  /** @internal */
26
26
  export declare const CreateOrganizationRequest$outboundSchema: z.ZodMiniType<CreateOrganizationRequest$Outbound, CreateOrganizationRequest>;
@@ -1 +1 @@
1
- {"version":3,"file":"createorganizationrequest.d.ts","sourceRoot":"","sources":["../../../../src/models/components/createorganizationrequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAGjC;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,kCAAkC,GAAG;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,wCAAwC,EAAE,CAAC,CAAC,WAAW,CAClE,kCAAkC,EAClC,yBAAyB,CAW1B,CAAC;AAEF,wBAAgB,+BAA+B,CAC7C,yBAAyB,EAAE,yBAAyB,GACnD,MAAM,CAIR"}
1
+ {"version":3,"file":"createorganizationrequest.d.ts","sourceRoot":"","sources":["../../../../src/models/components/createorganizationrequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAGjC;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACzC,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,kCAAkC,GAAG;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CAC3C,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,wCAAwC,EAAE,CAAC,CAAC,WAAW,CAClE,kCAAkC,EAClC,yBAAyB,CAW1B,CAAC;AAEF,wBAAgB,+BAA+B,CAC7C,yBAAyB,EAAE,yBAAyB,GACnD,MAAM,CAIR"}
@@ -43,7 +43,7 @@ const primitives_js_1 = require("../../lib/primitives.js");
43
43
  /** @internal */
44
44
  exports.CreateOrganizationRequest$outboundSchema = z.pipe(z.object({
45
45
  name: z.string(),
46
- ownerUserId: z.optional(z.string()),
46
+ ownerUserId: z.optional(z.nullable(z.string())),
47
47
  }), z.transform((v) => {
48
48
  return (0, primitives_js_1.remap)(v, {
49
49
  ownerUserId: "owner_user_id",
@@ -1 +1 @@
1
- {"version":3,"file":"createorganizationrequest.js","sourceRoot":"","sources":["../../../../src/models/components/createorganizationrequest.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CH,0EAMC;AAlDD,+CAAiC;AACjC,2DAA0D;AA2B1D,gBAAgB;AACH,QAAA,wCAAwC,GAGjD,CAAC,CAAC,IAAI,CACR,CAAC,CAAC,MAAM,CAAC;IACP,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CACpC,CAAC,EACF,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IAChB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,WAAW,EAAE,eAAe;KAC7B,CAAC,CAAC;AACL,CAAC,CAAC,CACH,CAAC;AAEF,SAAgB,+BAA+B,CAC7C,yBAAoD;IAEpD,OAAO,IAAI,CAAC,SAAS,CACnB,gDAAwC,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAC1E,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"createorganizationrequest.js","sourceRoot":"","sources":["../../../../src/models/components/createorganizationrequest.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CH,0EAMC;AAlDD,+CAAiC;AACjC,2DAA0D;AA2B1D,gBAAgB;AACH,QAAA,wCAAwC,GAGjD,CAAC,CAAC,IAAI,CACR,CAAC,CAAC,MAAM,CAAC;IACP,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;CAChD,CAAC,EACF,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IAChB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,WAAW,EAAE,eAAe;KAC7B,CAAC,CAAC;AACL,CAAC,CAAC,CACH,CAAC;AAEF,SAAgB,+BAA+B,CAC7C,yBAAoD;IAEpD,OAAO,IAAI,CAAC,SAAS,CACnB,gDAAwC,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAC1E,CAAC;AACJ,CAAC"}
@@ -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.11";
35
- readonly genVersion: "2.794.1";
36
- readonly userAgent: "speakeasy-sdk/typescript 0.3.11 2.794.1 1.0.0 @factify/sdk";
34
+ readonly sdkVersion: "0.3.12";
35
+ readonly genVersion: "2.795.8";
36
+ readonly userAgent: "speakeasy-sdk/typescript 0.3.12 2.795.8 1.0.0 @factify/sdk";
37
37
  };
38
38
  //# sourceMappingURL=config.d.ts.map
@@ -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.11",
35
- genVersion: "2.794.1",
36
- userAgent: "speakeasy-sdk/typescript 0.3.11 2.794.1 1.0.0 @factify/sdk",
34
+ sdkVersion: "0.3.12",
35
+ genVersion: "2.795.8",
36
+ userAgent: "speakeasy-sdk/typescript 0.3.12 2.795.8 1.0.0 @factify/sdk",
37
37
  };
38
38
  //# sourceMappingURL=config.js.map
@@ -15,12 +15,12 @@ export type CreateOrganizationRequest = {
15
15
  * Required when the caller is a service account (service accounts cannot own organizations).
16
16
  * Pattern: user_[0-9a-hjkmnp-tv-z]{26}
17
17
  */
18
- ownerUserId?: string | undefined;
18
+ ownerUserId?: string | null | undefined;
19
19
  };
20
20
  /** @internal */
21
21
  export type CreateOrganizationRequest$Outbound = {
22
22
  name: string;
23
- owner_user_id?: string | undefined;
23
+ owner_user_id?: string | null | undefined;
24
24
  };
25
25
  /** @internal */
26
26
  export declare const CreateOrganizationRequest$outboundSchema: z.ZodMiniType<CreateOrganizationRequest$Outbound, CreateOrganizationRequest>;
@@ -1 +1 @@
1
- {"version":3,"file":"createorganizationrequest.d.ts","sourceRoot":"","sources":["../../../../src/models/components/createorganizationrequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAGjC;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,kCAAkC,GAAG;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,wCAAwC,EAAE,CAAC,CAAC,WAAW,CAClE,kCAAkC,EAClC,yBAAyB,CAW1B,CAAC;AAEF,wBAAgB,+BAA+B,CAC7C,yBAAyB,EAAE,yBAAyB,GACnD,MAAM,CAIR"}
1
+ {"version":3,"file":"createorganizationrequest.d.ts","sourceRoot":"","sources":["../../../../src/models/components/createorganizationrequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAGjC;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACzC,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,kCAAkC,GAAG;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CAC3C,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,wCAAwC,EAAE,CAAC,CAAC,WAAW,CAClE,kCAAkC,EAClC,yBAAyB,CAW1B,CAAC;AAEF,wBAAgB,+BAA+B,CAC7C,yBAAyB,EAAE,yBAAyB,GACnD,MAAM,CAIR"}
@@ -6,7 +6,7 @@ import { remap as remap$ } from "../../lib/primitives.js";
6
6
  /** @internal */
7
7
  export const CreateOrganizationRequest$outboundSchema = z.pipe(z.object({
8
8
  name: z.string(),
9
- ownerUserId: z.optional(z.string()),
9
+ ownerUserId: z.optional(z.nullable(z.string())),
10
10
  }), z.transform((v) => {
11
11
  return remap$(v, {
12
12
  ownerUserId: "owner_user_id",
@@ -1 +1 @@
1
- {"version":3,"file":"createorganizationrequest.js","sourceRoot":"","sources":["../../../../src/models/components/createorganizationrequest.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AA2B1D,gBAAgB;AAChB,MAAM,CAAC,MAAM,wCAAwC,GAGjD,CAAC,CAAC,IAAI,CACR,CAAC,CAAC,MAAM,CAAC;IACP,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CACpC,CAAC,EACF,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IAChB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,WAAW,EAAE,eAAe;KAC7B,CAAC,CAAC;AACL,CAAC,CAAC,CACH,CAAC;AAEF,MAAM,UAAU,+BAA+B,CAC7C,yBAAoD;IAEpD,OAAO,IAAI,CAAC,SAAS,CACnB,wCAAwC,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAC1E,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"createorganizationrequest.js","sourceRoot":"","sources":["../../../../src/models/components/createorganizationrequest.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AA2B1D,gBAAgB;AAChB,MAAM,CAAC,MAAM,wCAAwC,GAGjD,CAAC,CAAC,IAAI,CACR,CAAC,CAAC,MAAM,CAAC;IACP,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;CAChD,CAAC,EACF,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IAChB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,WAAW,EAAE,eAAe;KAC7B,CAAC,CAAC;AACL,CAAC,CAAC,CACH,CAAC;AAEF,MAAM,UAAU,+BAA+B,CAC7C,yBAAoD;IAEpD,OAAO,IAAI,CAAC,SAAS,CACnB,wCAAwC,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAC1E,CAAC;AACJ,CAAC"}
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "..": {
20
20
  "name": "@factify/sdk",
21
- "version": "0.3.11",
21
+ "version": "0.3.12",
22
22
  "dependencies": {
23
23
  "zod": "^3.25.65 || ^4.0.0"
24
24
  },
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@factify/sdk",
5
- "version": "0.3.11",
5
+ "version": "0.3.12",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/openapi.json CHANGED
@@ -403,6 +403,7 @@
403
403
  },
404
404
  "owner_user_id": {
405
405
  "description": "Owner user ID. If not provided, the authenticated user becomes the owner.\n Authorization: Specifying a different user requires system maintainer role.\n Required when the caller is a service account (service accounts cannot own organizations).\n Pattern: user_[0-9a-hjkmnp-tv-z]{26}",
406
+ "nullable": true,
406
407
  "pattern": "^user_[0-9a-hjkmnp-tv-z]{26}$",
407
408
  "title": "owner_user_id",
408
409
  "type": "string"
@@ -1541,7 +1542,14 @@
1541
1542
  },
1542
1543
  "type": "cursor"
1543
1544
  },
1544
- "x-speakeasy-name-override": "list"
1545
+ "x-speakeasy-name-override": "list",
1546
+ "x-codeSamples": [
1547
+ {
1548
+ "lang": "typescript",
1549
+ "label": "listApiKeys",
1550
+ "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.apiKeys.list({\n organizationId: \"\u003cid\u003e\",\n });\n\n for await (const page of result) {\n console.log(page);\n }\n}\n\nrun();"
1551
+ }
1552
+ ]
1545
1553
  },
1546
1554
  "post": {
1547
1555
  "description": "Creates a new API key for the specified organization. The secret is only returned once in the response and cannot be retrieved later.",
@@ -1590,7 +1598,14 @@
1590
1598
  "tags": [
1591
1599
  "API Keys"
1592
1600
  ],
1593
- "x-speakeasy-name-override": "create"
1601
+ "x-speakeasy-name-override": "create",
1602
+ "x-codeSamples": [
1603
+ {
1604
+ "lang": "typescript",
1605
+ "label": "createApiKey",
1606
+ "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.apiKeys.create({\n name: \"\u003cvalue\u003e\",\n organizationId: \"\u003cid\u003e\",\n });\n\n console.log(result);\n}\n\nrun();"
1607
+ }
1608
+ ]
1594
1609
  }
1595
1610
  },
1596
1611
  "/v1beta/api-keys/{api_key_id}/revoke": {
@@ -1669,7 +1684,14 @@
1669
1684
  "tags": [
1670
1685
  "API Keys"
1671
1686
  ],
1672
- "x-speakeasy-name-override": "revoke"
1687
+ "x-speakeasy-name-override": "revoke",
1688
+ "x-codeSamples": [
1689
+ {
1690
+ "lang": "typescript",
1691
+ "label": "revokeApiKey",
1692
+ "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.apiKeys.revoke({\n apiKeyId: \"\u003cid\u003e\",\n body: {},\n });\n\n console.log(result);\n}\n\nrun();"
1693
+ }
1694
+ ]
1673
1695
  }
1674
1696
  },
1675
1697
  "/v1beta/documents": {
@@ -1813,7 +1835,14 @@
1813
1835
  },
1814
1836
  "type": "cursor"
1815
1837
  },
1816
- "x-speakeasy-name-override": "list"
1838
+ "x-speakeasy-name-override": "list",
1839
+ "x-codeSamples": [
1840
+ {
1841
+ "lang": "typescript",
1842
+ "label": "listDocuments",
1843
+ "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();"
1844
+ }
1845
+ ]
1817
1846
  },
1818
1847
  "post": {
1819
1848
  "description": "Creates a new document by uploading a PDF file.",
@@ -1862,7 +1891,14 @@
1862
1891
  "tags": [
1863
1892
  "Documents"
1864
1893
  ],
1865
- "x-speakeasy-name-override": "create"
1894
+ "x-speakeasy-name-override": "create",
1895
+ "x-codeSamples": [
1896
+ {
1897
+ "lang": "typescript",
1898
+ "label": "createDocument",
1899
+ "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();"
1900
+ }
1901
+ ]
1866
1902
  }
1867
1903
  },
1868
1904
  "/v1beta/documents/{document_id}": {
@@ -1917,7 +1953,14 @@
1917
1953
  "tags": [
1918
1954
  "Documents"
1919
1955
  ],
1920
- "x-speakeasy-name-override": "get"
1956
+ "x-speakeasy-name-override": "get",
1957
+ "x-codeSamples": [
1958
+ {
1959
+ "lang": "typescript",
1960
+ "label": "getDocument",
1961
+ "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();"
1962
+ }
1963
+ ]
1921
1964
  },
1922
1965
  "patch": {
1923
1966
  "description": "Update document title and description.",
@@ -2000,7 +2043,14 @@
2000
2043
  "tags": [
2001
2044
  "Documents"
2002
2045
  ],
2003
- "x-speakeasy-name-override": "update"
2046
+ "x-speakeasy-name-override": "update",
2047
+ "x-codeSamples": [
2048
+ {
2049
+ "lang": "typescript",
2050
+ "label": "updateDocument",
2051
+ "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();"
2052
+ }
2053
+ ]
2004
2054
  }
2005
2055
  },
2006
2056
  "/v1beta/documents/{document_id}/entry_page": {
@@ -2056,7 +2106,14 @@
2056
2106
  "Sharing \u0026 Distribution"
2057
2107
  ],
2058
2108
  "x-speakeasy-group": "entryPages",
2059
- "x-speakeasy-name-override": "generate"
2109
+ "x-speakeasy-name-override": "generate",
2110
+ "x-codeSamples": [
2111
+ {
2112
+ "lang": "typescript",
2113
+ "label": "generateDocumentEntryPage",
2114
+ "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();"
2115
+ }
2116
+ ]
2060
2117
  }
2061
2118
  },
2062
2119
  "/v1beta/documents/{document_id}/policies": {
@@ -2148,7 +2205,14 @@
2148
2205
  },
2149
2206
  "type": "cursor"
2150
2207
  },
2151
- "x-speakeasy-name-override": "list"
2208
+ "x-speakeasy-name-override": "list",
2209
+ "x-codeSamples": [
2210
+ {
2211
+ "lang": "typescript",
2212
+ "label": "listDocumentPolicies",
2213
+ "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();"
2214
+ }
2215
+ ]
2152
2216
  },
2153
2217
  "post": {
2154
2218
  "description": "Attach a policy to a document.",
@@ -2225,7 +2289,14 @@
2225
2289
  "tags": [
2226
2290
  "Policies"
2227
2291
  ],
2228
- "x-speakeasy-name-override": "attach"
2292
+ "x-speakeasy-name-override": "attach",
2293
+ "x-codeSamples": [
2294
+ {
2295
+ "lang": "typescript",
2296
+ "label": "attachDocumentPolicy",
2297
+ "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();"
2298
+ }
2299
+ ]
2229
2300
  }
2230
2301
  },
2231
2302
  "/v1beta/documents/{document_id}/policies/{policy_id}": {
@@ -2292,7 +2363,14 @@
2292
2363
  "tags": [
2293
2364
  "Policies"
2294
2365
  ],
2295
- "x-speakeasy-name-override": "detach"
2366
+ "x-speakeasy-name-override": "detach",
2367
+ "x-codeSamples": [
2368
+ {
2369
+ "lang": "typescript",
2370
+ "label": "detachDocumentPolicy",
2371
+ "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();"
2372
+ }
2373
+ ]
2296
2374
  }
2297
2375
  },
2298
2376
  "/v1beta/documents/{document_id}/versions": {
@@ -2384,7 +2462,14 @@
2384
2462
  },
2385
2463
  "type": "cursor"
2386
2464
  },
2387
- "x-speakeasy-name-override": "list"
2465
+ "x-speakeasy-name-override": "list",
2466
+ "x-codeSamples": [
2467
+ {
2468
+ "lang": "typescript",
2469
+ "label": "listDocumentVersions",
2470
+ "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();"
2471
+ }
2472
+ ]
2388
2473
  },
2389
2474
  "post": {
2390
2475
  "description": "Creates a new version by uploading a PDF file.",
@@ -2447,7 +2532,14 @@
2447
2532
  "tags": [
2448
2533
  "Versions"
2449
2534
  ],
2450
- "x-speakeasy-name-override": "create"
2535
+ "x-speakeasy-name-override": "create",
2536
+ "x-codeSamples": [
2537
+ {
2538
+ "lang": "typescript",
2539
+ "label": "createDocumentVersion",
2540
+ "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();"
2541
+ }
2542
+ ]
2451
2543
  }
2452
2544
  },
2453
2545
  "/v1beta/organizations": {
@@ -2526,7 +2618,14 @@
2526
2618
  },
2527
2619
  "type": "cursor"
2528
2620
  },
2529
- "x-speakeasy-name-override": "list"
2621
+ "x-speakeasy-name-override": "list",
2622
+ "x-codeSamples": [
2623
+ {
2624
+ "lang": "typescript",
2625
+ "label": "listOrganizations",
2626
+ "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.organizations.list();\n\n for await (const page of result) {\n console.log(page);\n }\n}\n\nrun();"
2627
+ }
2628
+ ]
2530
2629
  },
2531
2630
  "post": {
2532
2631
  "description": "Creates a new organization. The authenticated user becomes the organization owner.",
@@ -2575,7 +2674,14 @@
2575
2674
  "tags": [
2576
2675
  "Organizations"
2577
2676
  ],
2578
- "x-speakeasy-name-override": "create"
2677
+ "x-speakeasy-name-override": "create",
2678
+ "x-codeSamples": [
2679
+ {
2680
+ "lang": "typescript",
2681
+ "label": "createOrganization",
2682
+ "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.organizations.create({\n name: \"\u003cvalue\u003e\",\n });\n\n console.log(result);\n}\n\nrun();"
2683
+ }
2684
+ ]
2579
2685
  }
2580
2686
  },
2581
2687
  "/v1beta/organizations/{organization_id}": {
@@ -2630,7 +2736,14 @@
2630
2736
  "tags": [
2631
2737
  "Organizations"
2632
2738
  ],
2633
- "x-speakeasy-name-override": "get"
2739
+ "x-speakeasy-name-override": "get",
2740
+ "x-codeSamples": [
2741
+ {
2742
+ "lang": "typescript",
2743
+ "label": "getOrganization",
2744
+ "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.organizations.get({\n organizationId: \"\u003cid\u003e\",\n });\n\n console.log(result);\n}\n\nrun();"
2745
+ }
2746
+ ]
2634
2747
  }
2635
2748
  },
2636
2749
  "/v1beta/versions/{version_id}": {
@@ -2685,7 +2798,14 @@
2685
2798
  "tags": [
2686
2799
  "Versions"
2687
2800
  ],
2688
- "x-speakeasy-name-override": "get"
2801
+ "x-speakeasy-name-override": "get",
2802
+ "x-codeSamples": [
2803
+ {
2804
+ "lang": "typescript",
2805
+ "label": "getVersion",
2806
+ "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 versionId: \"\u003cid\u003e\",\n });\n\n console.log(result);\n}\n\nrun();"
2807
+ }
2808
+ ]
2689
2809
  },
2690
2810
  "patch": {
2691
2811
  "description": "Update version title and description.",
@@ -2766,7 +2886,14 @@
2766
2886
  "tags": [
2767
2887
  "Versions"
2768
2888
  ],
2769
- "x-speakeasy-name-override": "update"
2889
+ "x-speakeasy-name-override": "update",
2890
+ "x-codeSamples": [
2891
+ {
2892
+ "lang": "typescript",
2893
+ "label": "updateVersion",
2894
+ "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 versionId: \"\u003cid\u003e\",\n body: {},\n });\n\n console.log(result);\n}\n\nrun();"
2895
+ }
2896
+ ]
2770
2897
  }
2771
2898
  }
2772
2899
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factify/sdk",
3
- "version": "0.3.11",
3
+ "version": "0.3.12",
4
4
  "author": "Factify",
5
5
  "type": "module",
6
6
  "tshy": {
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.11",
69
- genVersion: "2.794.1",
70
- userAgent: "speakeasy-sdk/typescript 0.3.11 2.794.1 1.0.0 @factify/sdk",
68
+ sdkVersion: "0.3.12",
69
+ genVersion: "2.795.8",
70
+ userAgent: "speakeasy-sdk/typescript 0.3.12 2.795.8 1.0.0 @factify/sdk",
71
71
  } as const;
@@ -21,13 +21,13 @@ export type CreateOrganizationRequest = {
21
21
  * Required when the caller is a service account (service accounts cannot own organizations).
22
22
  * Pattern: user_[0-9a-hjkmnp-tv-z]{26}
23
23
  */
24
- ownerUserId?: string | undefined;
24
+ ownerUserId?: string | null | undefined;
25
25
  };
26
26
 
27
27
  /** @internal */
28
28
  export type CreateOrganizationRequest$Outbound = {
29
29
  name: string;
30
- owner_user_id?: string | undefined;
30
+ owner_user_id?: string | null | undefined;
31
31
  };
32
32
 
33
33
  /** @internal */
@@ -37,7 +37,7 @@ export const CreateOrganizationRequest$outboundSchema: z.ZodMiniType<
37
37
  > = z.pipe(
38
38
  z.object({
39
39
  name: z.string(),
40
- ownerUserId: z.optional(z.string()),
40
+ ownerUserId: z.optional(z.nullable(z.string())),
41
41
  }),
42
42
  z.transform((v) => {
43
43
  return remap$(v, {