export const pullerYaml = () => `pullers: - id: "||VARIABLE_KEY_id||" name: "||VARIABLE_KEY_name||" description: "" options: [] beforePullSteps: - connectorId: "**SelfConnectorId**" rootStep: true key: GET_LAST_UPDATED name: Get Last Updated description: displayType: SQL next: arguments: {} data: timeout: "60" sql: |- select to_char(p.updated_at::timestamptz - INTERVAL '1 DAY', 'YYYY-MM-DD"T"HH24:MI:SS.000Z') as updated_at from ||VARIABLE_KEY_objectTable|| p order by p.updated_at desc limit 1; responseFilters: - key: updated_at type: Field pullSteps: - connectorId: "||VARIABLE_KEY_connectorId||" rootStep: true key: PULL_DATA name: Pull Data description: displayType: API next: arguments: since_id: |- {{ if puller.lastToken?.PULL_DATA?.since_id puller.lastToken.PULL_DATA.since_id end }} offset: |- {{ if puller.lastToken?.PULL_DATA?.offset (puller.lastToken.PULL_DATA.offset | string.to_int) + 250 else 0 end }} page: |- {{ if puller.lastToken?.PULL_DATA?.page (puller.lastToken.PULL_DATA.page | string.to_int) + 1 else 1 end }} updated_at: |- {{ if puller.history?.GET_LAST_UPDATED?.updated_at puller.history.GET_LAST_UPDATED.updated_at else if ||VARIABLE_KEY_useTimeBased|| == 1 date.now | date.add_months -1 end }} data: url: "TODO: Input the URL here" type: REST method: GET anonymous: false headers: "Content-Type": ["application/json"] queries: limit: 250 order: id asc since_id: "{{ __this.arguments.since_id }}" offset: "{{ __this.arguments.offset }}" page: "{{ __this.arguments.page }}" updated_at: "{{ __this.arguments.updated_at }}" body: acceptHttpStatuses: success: parser: regex expression: 2\\d{2} responseFilters: jsonata: items: acceptedStatuses: - success expression: >- $.products.{ "id": id, "title": title }[] variants: acceptedStatuses: - success expression: >- $.products.($product := $; variants.{ "product_id": $product.id, "product_title": $product.title, "variant_id": id, "variant_title": title }[])[] jsonpath: since_id: acceptedStatuses: - success expression: |- type: eval expression: |- $.products[-1:].id scriban: hasNextPage: acceptedStatuses: - success expression: |- {{(filters.jsonata.items | array.size) > 0}} afterPullSteps: [] responseFilters: items: $.PULL_DATA.items variants: $.PULL_DATA.variants hasNextPage: $.PULL_DATA.hasNextPage`;