@proveanything/smartlinks 1.17.5 → 1.17.6

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,7 +1,13 @@
1
- import type { IntegrationFlow, CreateFlowInput, UpdateFlowInput, ListFlowsQuery, FlowList, RunFlowInput, RunFlowResult, RunFlowSummary, RunFlowEnqueued } from "../types/integrations";
1
+ import type { IntegrationFlow, CreateFlowInput, UpdateFlowInput, ListFlowsQuery, FlowList, RunFlowInput, RunFlowResult, RunFlowSummary, RunFlowEnqueued, RecordTypesResponse } from "../types/integrations";
2
2
  export declare namespace integrations {
3
3
  /** List flows in a collection. GET /integrations/flows */
4
4
  function listFlows(collectionId: string, query?: ListFlowsQuery): Promise<FlowList>;
5
+ /**
6
+ * Discover the app-record types present in a collection + which app owns each
7
+ * (introspected), for picking a sub-record source/trigger.
8
+ * GET /integrations/record-types
9
+ */
10
+ function listRecordTypes(collectionId: string): Promise<RecordTypesResponse>;
5
11
  /** Create a flow. POST /integrations/flows */
6
12
  function createFlow(collectionId: string, input: CreateFlowInput): Promise<IntegrationFlow>;
7
13
  /** Get one flow. GET /integrations/flows/:id */
@@ -37,6 +37,15 @@ export var integrations;
37
37
  return request(`${base(collectionId)}${encodeQuery(query)}`);
38
38
  }
39
39
  integrations.listFlows = listFlows;
40
+ /**
41
+ * Discover the app-record types present in a collection + which app owns each
42
+ * (introspected), for picking a sub-record source/trigger.
43
+ * GET /integrations/record-types
44
+ */
45
+ async function listRecordTypes(collectionId) {
46
+ return request(`/admin/collection/${enc(collectionId)}/integrations/record-types`);
47
+ }
48
+ integrations.listRecordTypes = listRecordTypes;
40
49
  /** Create a flow. POST /integrations/flows */
41
50
  async function createFlow(collectionId, input) {
42
51
  return post(base(collectionId), input);