@zapier/zapier-sdk 0.18.3 → 0.18.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 (71) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +1 -1
  3. package/dist/api/client.d.ts.map +1 -1
  4. package/dist/api/client.js +0 -18
  5. package/dist/api/schemas.d.ts +0 -109
  6. package/dist/api/schemas.d.ts.map +1 -1
  7. package/dist/api/schemas.js +0 -67
  8. package/dist/api/types.d.ts +2 -1
  9. package/dist/api/types.d.ts.map +1 -1
  10. package/dist/index.cjs +337 -673
  11. package/dist/index.d.mts +52 -105
  12. package/dist/index.mjs +337 -673
  13. package/dist/plugins/listApps/index.d.ts +2 -8
  14. package/dist/plugins/listApps/index.d.ts.map +1 -1
  15. package/dist/plugins/listApps/index.js +4 -6
  16. package/dist/plugins/listApps/index.test.js +62 -82
  17. package/dist/plugins/listApps/schemas.d.ts +35 -14
  18. package/dist/plugins/listApps/schemas.d.ts.map +1 -1
  19. package/dist/plugins/listApps/schemas.js +44 -14
  20. package/dist/plugins/listAuthentications/index.test.js +16 -0
  21. package/dist/schemas/App.d.ts +28 -28
  22. package/dist/schemas/App.d.ts.map +1 -1
  23. package/dist/schemas/App.js +3 -8
  24. package/dist/sdk.d.ts +1 -1
  25. package/dist/sdk.test.js +12 -9
  26. package/package.json +1 -1
  27. package/dist/api/client.integration.test.d.ts +0 -5
  28. package/dist/api/client.integration.test.d.ts.map +0 -1
  29. package/dist/api/client.integration.test.js +0 -318
  30. package/dist/api/client.methods.test.d.ts +0 -2
  31. package/dist/api/client.methods.test.d.ts.map +0 -1
  32. package/dist/api/client.methods.test.js +0 -158
  33. package/dist/api/router.d.ts +0 -16
  34. package/dist/api/router.d.ts.map +0 -1
  35. package/dist/api/router.js +0 -31
  36. package/dist/api/router.test.d.ts +0 -2
  37. package/dist/api/router.test.d.ts.map +0 -1
  38. package/dist/api/router.test.js +0 -103
  39. package/dist/temporary-internal-core/handlers/listApps.d.ts +0 -67
  40. package/dist/temporary-internal-core/handlers/listApps.d.ts.map +0 -1
  41. package/dist/temporary-internal-core/handlers/listApps.js +0 -134
  42. package/dist/temporary-internal-core/handlers/listApps.test.d.ts +0 -2
  43. package/dist/temporary-internal-core/handlers/listApps.test.d.ts.map +0 -1
  44. package/dist/temporary-internal-core/handlers/listApps.test.js +0 -367
  45. package/dist/temporary-internal-core/index.d.ts +0 -18
  46. package/dist/temporary-internal-core/index.d.ts.map +0 -1
  47. package/dist/temporary-internal-core/index.js +0 -18
  48. package/dist/temporary-internal-core/schemas/apps/index.d.ts +0 -175
  49. package/dist/temporary-internal-core/schemas/apps/index.d.ts.map +0 -1
  50. package/dist/temporary-internal-core/schemas/apps/index.js +0 -97
  51. package/dist/temporary-internal-core/schemas/errors/index.d.ts +0 -139
  52. package/dist/temporary-internal-core/schemas/errors/index.d.ts.map +0 -1
  53. package/dist/temporary-internal-core/schemas/errors/index.js +0 -129
  54. package/dist/temporary-internal-core/schemas/implementations/index.d.ts +0 -127
  55. package/dist/temporary-internal-core/schemas/implementations/index.d.ts.map +0 -1
  56. package/dist/temporary-internal-core/schemas/implementations/index.js +0 -79
  57. package/dist/temporary-internal-core/types/handler.d.ts +0 -51
  58. package/dist/temporary-internal-core/types/handler.d.ts.map +0 -1
  59. package/dist/temporary-internal-core/types/handler.js +0 -8
  60. package/dist/temporary-internal-core/types/index.d.ts +0 -5
  61. package/dist/temporary-internal-core/types/index.d.ts.map +0 -1
  62. package/dist/temporary-internal-core/types/index.js +0 -4
  63. package/dist/temporary-internal-core/utils/app-locators.d.ts +0 -34
  64. package/dist/temporary-internal-core/utils/app-locators.d.ts.map +0 -1
  65. package/dist/temporary-internal-core/utils/app-locators.js +0 -39
  66. package/dist/temporary-internal-core/utils/string-utils.d.ts +0 -28
  67. package/dist/temporary-internal-core/utils/string-utils.d.ts.map +0 -1
  68. package/dist/temporary-internal-core/utils/string-utils.js +0 -52
  69. package/dist/temporary-internal-core/utils/transformations.d.ts +0 -18
  70. package/dist/temporary-internal-core/utils/transformations.d.ts.map +0 -1
  71. package/dist/temporary-internal-core/utils/transformations.js +0 -36
package/dist/index.d.mts CHANGED
@@ -1,6 +1,7 @@
1
1
  import * as zod from 'zod';
2
2
  import { z } from 'zod';
3
3
  import { AuthenticationSchema, AuthenticationsResponseSchema, AuthenticationItem as AuthenticationItem$1, GetAuthenticationParam, GetAuthenticationResponse, GetAuthenticationParamSchema } from '@zapier/zapier-sdk-core/v0/schemas/authentications';
4
+ import { AppItem as AppItem$1 } from '@zapier/zapier-sdk-core/v0/schemas/apps';
4
5
  import * as zod_v4_core from 'zod/v4/core';
5
6
 
6
7
  /**
@@ -1362,23 +1363,29 @@ declare const GetAppSchema: z.ZodObject<{
1362
1363
  type GetAppOptions = z.infer<typeof GetAppSchema>;
1363
1364
 
1364
1365
  /**
1365
- * App and Service schemas
1366
+ * Plugin schemas for listApps
1366
1367
  *
1367
- * Covers:
1368
- * - App metadata
1369
- * - Service definitions
1370
- * - App listings and searches
1368
+ * Imports base query schema from @zapier/zapier-sdk-core (sdkapi) and extends
1369
+ * with SDK-specific options.
1370
+ *
1371
+ * Note: The sdkapi endpoint uses ListAppsQuerySchema (HTTP query params),
1372
+ * but the SDK exposes ListAppsSchema (user-friendly options):
1373
+ * - ListAppsOptions accepts `appKeys` as array, `cursor`, `maxItems`
1374
+ * - ListAppsQuery accepts `appKeys` as comma-separated string, `offset`
1375
+ * - The plugin transforms between these formats
1371
1376
  */
1372
1377
 
1373
1378
  /**
1374
- * Public API schema for listApps operation
1379
+ * SDK user-facing options for listApps
1375
1380
  *
1376
- * This is the user-facing schema that accepts app keys (slugs, implementation names, etc.)
1377
- * The plugin resolves these to implementation IDs before calling the handler.
1381
+ * Extends ListAppsQuerySchema from zapier-sdk-core with SDK-specific options:
1382
+ * - appKeys: array (not comma-separated string)
1383
+ * - cursor: pagination cursor (not offset)
1384
+ * - maxItems: SDK-specific pagination limit
1378
1385
  */
1379
- declare const ListAppsOptionsSchema: z.ZodObject<{
1380
- appKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
1386
+ declare const ListAppsSchema: z.ZodObject<{
1381
1387
  search: z.ZodOptional<z.ZodString>;
1388
+ appKeys: z.ZodOptional<z.ZodArray<z.ZodString>>;
1382
1389
  pageSize: z.ZodOptional<z.ZodNumber>;
1383
1390
  maxItems: z.ZodOptional<z.ZodNumber>;
1384
1391
  cursor: z.ZodOptional<z.ZodString>;
@@ -1386,80 +1393,20 @@ declare const ListAppsOptionsSchema: z.ZodObject<{
1386
1393
  isNested: z.ZodOptional<z.ZodBoolean>;
1387
1394
  }, z.core.$strip>>;
1388
1395
  }, z.core.$strip>;
1389
- type ListAppsOptions = z.infer<typeof ListAppsOptionsSchema>;
1390
- /**
1391
- * Normalized app item returned by listApps
1392
- * This extends ImplementationMetaSchema with transformed fields (title, key, implementation_id)
1393
- */
1394
- declare const AppItemSchema$1: z.ZodObject<{
1395
- categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
1396
- id: z.ZodNumber;
1397
- name: z.ZodString;
1398
- slug: z.ZodString;
1399
- }, z.core.$strip>>>;
1400
- actions: z.ZodOptional<z.ZodObject<{
1401
- read: z.ZodOptional<z.ZodNumber>;
1402
- read_bulk: z.ZodOptional<z.ZodNumber>;
1403
- write: z.ZodOptional<z.ZodNumber>;
1404
- search: z.ZodOptional<z.ZodNumber>;
1405
- search_or_write: z.ZodOptional<z.ZodNumber>;
1406
- search_and_write: z.ZodOptional<z.ZodNumber>;
1407
- filter: z.ZodOptional<z.ZodNumber>;
1408
- }, z.core.$strip>>;
1409
- description: z.ZodOptional<z.ZodString>;
1410
- is_hidden: z.ZodOptional<z.ZodBoolean>;
1411
- age_in_days: z.ZodOptional<z.ZodNumber>;
1412
- api_docs_url: z.ZodOptional<z.ZodString>;
1413
- banner: z.ZodOptional<z.ZodString>;
1414
- image: z.ZodOptional<z.ZodString>;
1415
- images: z.ZodOptional<z.ZodObject<{
1416
- url_16x16: z.ZodOptional<z.ZodString>;
1417
- url_32x32: z.ZodOptional<z.ZodString>;
1418
- url_64x64: z.ZodOptional<z.ZodString>;
1419
- url_128x128: z.ZodOptional<z.ZodString>;
1420
- }, z.core.$strip>>;
1421
- is_beta: z.ZodOptional<z.ZodBoolean>;
1422
- is_built_in: z.ZodOptional<z.ZodBoolean>;
1423
- is_featured: z.ZodOptional<z.ZodBoolean>;
1424
- is_premium: z.ZodOptional<z.ZodBoolean>;
1425
- is_public: z.ZodOptional<z.ZodBoolean>;
1426
- is_upcoming: z.ZodOptional<z.ZodBoolean>;
1427
- popularity: z.ZodOptional<z.ZodNumber>;
1428
- primary_color: z.ZodOptional<z.ZodString>;
1429
- slug: z.ZodString;
1430
- auth_type: z.ZodOptional<z.ZodString>;
1431
- is_deprecated: z.ZodOptional<z.ZodBoolean>;
1432
- secondary_color: z.ZodOptional<z.ZodString>;
1433
- has_filters: z.ZodOptional<z.ZodBoolean>;
1434
- has_reads: z.ZodOptional<z.ZodBoolean>;
1435
- has_searches: z.ZodOptional<z.ZodBoolean>;
1436
- has_searches_or_writes: z.ZodOptional<z.ZodBoolean>;
1437
- has_upfront_fields: z.ZodOptional<z.ZodBoolean>;
1438
- has_writes: z.ZodOptional<z.ZodBoolean>;
1439
- is_invite: z.ZodOptional<z.ZodBoolean>;
1440
- visibility: z.ZodOptional<z.ZodString>;
1441
- classification: z.ZodOptional<z.ZodString>;
1442
- title: z.ZodString;
1443
- key: z.ZodString;
1444
- implementation_id: z.ZodString;
1445
- version: z.ZodOptional<z.ZodString>;
1446
- }, z.core.$strip>;
1447
- type AppItem$1 = z.infer<typeof AppItemSchema$1>;
1396
+ type ListAppsOptions = z.infer<typeof ListAppsSchema>;
1397
+ interface ListAppsPage {
1398
+ data: AppItem$1[];
1399
+ nextCursor?: string;
1400
+ }
1448
1401
 
1449
1402
  interface ListAppsPluginProvides {
1450
- listApps: (options?: ListAppsOptions) => Promise<{
1451
- data: AppItem$1[];
1452
- nextCursor?: string;
1453
- }> & AsyncIterable<{
1454
- data: AppItem$1[];
1455
- nextCursor?: string;
1456
- }> & {
1403
+ listApps: (options?: ListAppsOptions) => Promise<ListAppsPage> & AsyncIterable<ListAppsPage> & {
1457
1404
  items(): AsyncIterable<AppItem$1>;
1458
1405
  };
1459
1406
  context: {
1460
1407
  meta: {
1461
1408
  listApps: {
1462
- inputSchema: typeof ListAppsOptionsSchema;
1409
+ inputSchema: typeof ListAppsSchema;
1463
1410
  };
1464
1411
  };
1465
1412
  };
@@ -1850,57 +1797,57 @@ interface PositionalMetadata {
1850
1797
  declare function isPositional(schema: z.ZodType): boolean;
1851
1798
 
1852
1799
  declare const AppItemSchema: z.ZodObject<{
1800
+ slug: z.ZodString;
1801
+ age_in_days: z.ZodOptional<z.ZodNumber>;
1802
+ auth_type: z.ZodOptional<z.ZodString>;
1803
+ banner: z.ZodOptional<z.ZodString>;
1853
1804
  categories: z.ZodOptional<z.ZodArray<z.ZodObject<{
1854
1805
  id: z.ZodNumber;
1855
1806
  name: z.ZodString;
1856
1807
  slug: z.ZodString;
1857
1808
  }, z.core.$strip>>>;
1858
- actions: z.ZodOptional<z.ZodObject<{
1859
- read: z.ZodOptional<z.ZodNumber>;
1860
- read_bulk: z.ZodOptional<z.ZodNumber>;
1861
- write: z.ZodOptional<z.ZodNumber>;
1862
- search: z.ZodOptional<z.ZodNumber>;
1863
- search_or_write: z.ZodOptional<z.ZodNumber>;
1864
- search_and_write: z.ZodOptional<z.ZodNumber>;
1865
- filter: z.ZodOptional<z.ZodNumber>;
1866
- }, z.core.$strip>>;
1867
- description: z.ZodOptional<z.ZodString>;
1868
- is_hidden: z.ZodOptional<z.ZodBoolean>;
1869
- age_in_days: z.ZodOptional<z.ZodNumber>;
1870
- api_docs_url: z.ZodOptional<z.ZodString>;
1871
- banner: z.ZodOptional<z.ZodString>;
1872
- image: z.ZodOptional<z.ZodString>;
1873
1809
  images: z.ZodOptional<z.ZodObject<{
1874
1810
  url_16x16: z.ZodOptional<z.ZodString>;
1875
1811
  url_32x32: z.ZodOptional<z.ZodString>;
1876
1812
  url_64x64: z.ZodOptional<z.ZodString>;
1877
1813
  url_128x128: z.ZodOptional<z.ZodString>;
1878
1814
  }, z.core.$strip>>;
1879
- is_beta: z.ZodOptional<z.ZodBoolean>;
1880
- is_built_in: z.ZodOptional<z.ZodBoolean>;
1881
- is_featured: z.ZodOptional<z.ZodBoolean>;
1882
- is_premium: z.ZodOptional<z.ZodBoolean>;
1883
- is_public: z.ZodOptional<z.ZodBoolean>;
1884
- is_upcoming: z.ZodOptional<z.ZodBoolean>;
1885
1815
  popularity: z.ZodOptional<z.ZodNumber>;
1886
- primary_color: z.ZodOptional<z.ZodString>;
1887
- slug: z.ZodString;
1888
- auth_type: z.ZodOptional<z.ZodString>;
1889
- is_deprecated: z.ZodOptional<z.ZodBoolean>;
1890
- secondary_color: z.ZodOptional<z.ZodString>;
1891
1816
  has_filters: z.ZodOptional<z.ZodBoolean>;
1892
1817
  has_reads: z.ZodOptional<z.ZodBoolean>;
1893
1818
  has_searches: z.ZodOptional<z.ZodBoolean>;
1894
1819
  has_searches_or_writes: z.ZodOptional<z.ZodBoolean>;
1895
1820
  has_upfront_fields: z.ZodOptional<z.ZodBoolean>;
1896
1821
  has_writes: z.ZodOptional<z.ZodBoolean>;
1822
+ is_beta: z.ZodOptional<z.ZodBoolean>;
1823
+ is_built_in: z.ZodOptional<z.ZodBoolean>;
1824
+ is_deprecated: z.ZodOptional<z.ZodBoolean>;
1825
+ is_featured: z.ZodOptional<z.ZodBoolean>;
1826
+ is_hidden: z.ZodOptional<z.ZodBoolean>;
1897
1827
  is_invite: z.ZodOptional<z.ZodBoolean>;
1898
- version: z.ZodOptional<z.ZodString>;
1828
+ is_premium: z.ZodOptional<z.ZodBoolean>;
1829
+ is_public: z.ZodOptional<z.ZodBoolean>;
1830
+ is_upcoming: z.ZodOptional<z.ZodBoolean>;
1899
1831
  visibility: z.ZodOptional<z.ZodString>;
1832
+ actions: z.ZodOptional<z.ZodObject<{
1833
+ read: z.ZodOptional<z.ZodNumber>;
1834
+ read_bulk: z.ZodOptional<z.ZodNumber>;
1835
+ write: z.ZodOptional<z.ZodNumber>;
1836
+ search: z.ZodOptional<z.ZodNumber>;
1837
+ search_or_write: z.ZodOptional<z.ZodNumber>;
1838
+ search_and_write: z.ZodOptional<z.ZodNumber>;
1839
+ filter: z.ZodOptional<z.ZodNumber>;
1840
+ }, z.core.$strip>>;
1841
+ description: z.ZodOptional<z.ZodString>;
1842
+ primary_color: z.ZodOptional<z.ZodString>;
1843
+ secondary_color: z.ZodOptional<z.ZodString>;
1900
1844
  classification: z.ZodOptional<z.ZodString>;
1845
+ api_docs_url: z.ZodOptional<z.ZodString>;
1846
+ image: z.ZodOptional<z.ZodString>;
1901
1847
  title: z.ZodString;
1902
1848
  key: z.ZodString;
1903
1849
  implementation_id: z.ZodString;
1850
+ version: z.ZodOptional<z.ZodString>;
1904
1851
  }, z.core.$strip>;
1905
1852
 
1906
1853
  declare const AuthenticationItemSchema: z.ZodObject<{
@@ -2306,7 +2253,7 @@ declare function createZapierSdkWithoutRegistry(options?: ZapierSdkOptions): Sdk
2306
2253
  } & {
2307
2254
  meta: {
2308
2255
  listApps: {
2309
- inputSchema: typeof ListAppsOptionsSchema;
2256
+ inputSchema: typeof ListAppsSchema;
2310
2257
  };
2311
2258
  };
2312
2259
  } & {