@superdurable/connector-dropbox 0.1.0 → 0.2.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.
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "connectorId": "dropbox",
3
- "releaseTag": "connectors/dropbox/go/v0.1.0",
3
+ "releaseTag": "connectors/dropbox/go/v0.2.0",
4
4
  "package": {
5
5
  "ecosystem": "npm",
6
6
  "name": "@superdurable/connector-dropbox",
7
- "version": "0.1.0"
7
+ "version": "0.2.0"
8
8
  },
9
9
  "factories": [
10
10
  {
@@ -60,8 +60,7 @@
60
60
  }
61
61
  },
62
62
  "required": [
63
- "limit",
64
- "path"
63
+ "limit"
65
64
  ],
66
65
  "type": "object"
67
66
  }
@@ -48,7 +48,7 @@ function decodeSharedCredentials(value) {
48
48
  return credentials;
49
49
  }
50
50
  var ListFolderInputSchema = z.strictObject({
51
- "path": z.string(),
51
+ "path": z.string().optional(),
52
52
  "limit": z.number().int()
53
53
  });
54
54
  var EntryMetadataSchema = z.strictObject({
@@ -238,7 +238,6 @@ function newProjectCredentialProvider(project, connectionName, decode, encode, d
238
238
  // src/generated/mock.ts
239
239
  import { branchCase, retryCase, newMutation, newQuery } from "@superdurable/connectors-sdk/connectormock";
240
240
  var emptyListFolderInput = ListFolderInputSchema.parse({
241
- "path": "",
242
241
  "limit": 0
243
242
  });
244
243
  var emptyEntryMetadata = EntryMetadataSchema.parse({
@@ -45,7 +45,7 @@ type CredentialSource = RefreshingCredentialProvider<Credentials>;
45
45
  /** ListFolderInput selects one bounded page of a Dropbox folder. */
46
46
  interface ListFolderInput {
47
47
  /** Path is an empty string for the root or a Dropbox folder path or ID. */
48
- "path": string;
48
+ "path"?: string | undefined;
49
49
  /** Limit is the approximate number of entries per page, from 1 to 2000. */
50
50
  "limit": number;
51
51
  }
@@ -107,7 +107,7 @@ interface UploadedFile {
107
107
  }
108
108
  /** Runtime validator for ListFolderInput. */
109
109
  declare const ListFolderInputSchema: z.ZodObject<{
110
- path: z.ZodString;
110
+ path: z.ZodOptional<z.ZodString>;
111
111
  limit: z.ZodNumber;
112
112
  }, z.core.$strict>;
113
113
  /** Runtime validator for EntryMetadata. */
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as ContinueFolderInput, F as FolderPage, L as ListFolderInput, G as GetMetadataInput, E as EntryMetadata, D as DownloadFileInput, a as DownloadedFile, U as UploadFileInput, b as UploadedFile, c as Config, d as Credentials, e as Connection, O as Operations } from './connection-DDFkY9tu.js';
2
- export { f as ConfigSchema, g as ContinueFolderInputSchema, h as CredentialSource, i as DownloadFileInputSchema, j as DownloadedFileSchema, k as EntryMetadataSchema, l as FolderPageSchema, m as GetMetadataInputSchema, n as ListFolderInputSchema, o as UploadFileInputSchema, p as UploadedFileSchema, q as decodeCredentials, r as decodeSharedCredentials, s as newConnection, t as newConnectionWithOperations } from './connection-DDFkY9tu.js';
1
+ import { C as ContinueFolderInput, F as FolderPage, L as ListFolderInput, G as GetMetadataInput, E as EntryMetadata, D as DownloadFileInput, a as DownloadedFile, U as UploadFileInput, b as UploadedFile, c as Config, d as Credentials, e as Connection, O as Operations } from './connection-CufXPwNo.js';
2
+ export { f as ConfigSchema, g as ContinueFolderInputSchema, h as CredentialSource, i as DownloadFileInputSchema, j as DownloadedFileSchema, k as EntryMetadataSchema, l as FolderPageSchema, m as GetMetadataInputSchema, n as ListFolderInputSchema, o as UploadFileInputSchema, p as UploadedFileSchema, q as decodeCredentials, r as decodeSharedCredentials, s as newConnection, t as newConnectionWithOperations } from './connection-CufXPwNo.js';
3
3
  import * as _superdurable_connectors_sdk from '@superdurable/connectors-sdk';
4
4
  import { QueryDefinition, MutationDefinition, Query, Call, QueryAttempt, Mutation, MutationAttempt, CredentialProvider, CredentialRefreshDriver, QueryStepConfig, QueryResult, MutationStepConfig, MutationResult, QueryStep, MutationStep } from '@superdurable/connectors-sdk';
5
5
  import { ProviderRequest, ProviderResponse } from '@superdurable/connectors-sdk/providerhttp';
package/dist/index.js CHANGED
@@ -61,7 +61,7 @@ import {
61
61
  newConnection,
62
62
  newConnectionWithOperations,
63
63
  newProjectCredentialProvider
64
- } from "./chunk-OVLMU3VN.js";
64
+ } from "./chunk-SWXGPJ62.js";
65
65
 
66
66
  // src/client.ts
67
67
  import {
@@ -245,9 +245,10 @@ var ListFolderOperation = class {
245
245
  /** List one folder page. */
246
246
  async invoke(call, input) {
247
247
  input = ListFolderInputSchema.parse(input);
248
- if (!validPath(input.path, true) || !Number.isInteger(input.limit) || input.limit < 1 || input.limit > 2e3)
248
+ const path = input.path ?? "";
249
+ if (!validPath(path, true) || !Number.isInteger(input.limit) || input.limit < 1 || input.limit > 2e3)
249
250
  return queryFailure("listFolder", "defect", "VALIDATION", "folder path or page limit is invalid", emptyFolderPage);
250
- const exchange = await this.client.postJSON(call, "/2/files/list_folder", { path: input.path, limit: input.limit });
251
+ const exchange = await this.client.postJSON(call, "/2/files/list_folder", { path, limit: input.limit });
251
252
  const decision = queryDecision("listFolder", exchange, emptyFolderPage, "notFound");
252
253
  if (decision) return decision;
253
254
  try {
package/dist/mock.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { MockQuery, MockMutation, Case } from '@superdurable/connectors-sdk/connectormock';
2
2
  import { Failure } from '@superdurable/connectors-sdk';
3
- import { O as Operations, e as Connection, L as ListFolderInput, F as FolderPage, G as GetMetadataInput, E as EntryMetadata, C as ContinueFolderInput, D as DownloadFileInput, a as DownloadedFile, U as UploadFileInput, b as UploadedFile } from './connection-DDFkY9tu.js';
3
+ import { O as Operations, e as Connection, L as ListFolderInput, F as FolderPage, G as GetMetadataInput, E as EntryMetadata, C as ContinueFolderInput, D as DownloadFileInput, a as DownloadedFile, U as UploadFileInput, b as UploadedFile } from './connection-CufXPwNo.js';
4
4
  import 'zod';
5
5
 
6
6
  /** Go zero value for ListFolderInput in scripted cases. */
package/dist/mock.js CHANGED
@@ -49,7 +49,7 @@ import {
49
49
  uploadFileRetry,
50
50
  uploadFileUploaded,
51
51
  uploadFileUploadedDefault
52
- } from "./chunk-OVLMU3VN.js";
52
+ } from "./chunk-SWXGPJ62.js";
53
53
  export {
54
54
  GeneratedMock,
55
55
  continueFolderCursorExpired,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdurable/connector-dropbox",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Dropbox file operations for Dex TypeScript Flows",
5
5
  "license": "MIT",
6
6
  "repository": {